Search Results for

    Show / Hide Table of Contents

    Class User.FunctionsClient

    A class exposing functionality for calling remote Atlas Functions.

    Inheritance
    object
    User.FunctionsClient
    Namespace: Realms.Sync
    Assembly: Realm.dll
    Syntax
    public class User.FunctionsClient

    Methods

    | Improve this Doc View Source

    CallAsync(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.

    See Also
    Functions Docs
    | Improve this Doc View Source

    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 T.

    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.

    See Also
    Functions Docs

    See Also

    Functions Docs
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2020-2023 Realm
    Generated by DocFX