Class User.FunctionsClient
A class exposing functionality for calling remote Atlas Functions.
Namespace: Realms.Sync
Assembly: Realm.dll
Syntax
public class User.FunctionsClient
Methods
| Edit this page View SourceCallAsync(string, params object?[])
Calls a remote function with the supplied arguments.
Declaration
public Task<BsonValue> CallAsync(string name, params object?[] args)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of the Realm function to call. |
object[] | args | Arguments that will be sent to the Realm function. They have to be json serializable values. |
Returns
Type | Description |
---|---|
Task<BsonValue> | An awaitable Task<TResult> wrapping the asynchronous call function operation. The result of the task is the value returned by the function. |
CallAsync<T>(string, params object?[])
Calls a remote function with the supplied arguments.
Declaration
public Task<T> CallAsync<T>(string name, params object?[] args)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of the Realm function to call. |
object[] | args | Arguments that will be sent to the Realm function. They have to be json serializable values. |
Returns
Type | Description |
---|---|
Task<T> | An awaitable Task<TResult> wrapping the asynchronous call function operation. The result of the task is
the value returned by the function decoded as |
Type Parameters
Name | Description |
---|---|
T | The type that the response will be decoded to. |
Remarks
The MongoDB Bson library is used
to decode the response. It will automatically handle most cases, but if you want to control the behavior
of the deserializer, you can use the attributes in the
MongoDB.Bson.Serialization.Attributes
namespace.
If you want to modify the global conventions used when deserializing the response, such as convert
camelCase properties to PascalCase, you can register a
ConventionPack.