PrivMX DOCS
API Reference/PrivMX Endpoint C# Extra/Core

ConnectionAsyncExtensions

Extension methods that provide asynchronous method execution for objects implementing IConnection interface. Internally operations are executed using default ThreadPool.

Static Methods

ConnectAsync

Connects to the PrivMX Bridge server.

Params

userPrivKey

string

User's private key.

solutionId

string

ID of the Solution.

platformUrl

string

PrivMX Bridge URL.

token

CancellationToken

Cancellation token.

static ValueTask<Connection> ConnectAsync(
string userPrivKey,
string solutionId,
string platformUrl,
CancellationToken token = default
)

Returns

ValueTask<Connection> · Created and connected instance of the Connection

ConnectPublicAsync

Connects to the PrivMX Bridge server as a guest user.

Params

solutionId

string

ID of the Solution.

platformUrl

string

PrivMX Bridge URL.

token

CancellationToken

Cancellation token.

static ValueTask<Connection> ConnectPublicAsync(
string solutionId,
string platformUrl,
CancellationToken token = default
)

Returns

ValueTask<Connection> · Created and connected instance of the Connection.

ListContextsAsync

Gets a list of Contexts available for the user.

Params

connection

this IConnection

Extended object.

pagingQuery

PagingQuery

List query parameters.

token

CancellationToken

Cancellation token.

static ValueTask<PagingList<Context>> ListContextsAsync(
this IConnection connection,
PagingQuery pagingQuery,
CancellationToken token = default
)

Returns

ValueTask<PagingList<Context>> · List of contexts.

DisconnectAsync

Disconnects from the PrivMX Bridge.

Params

connection

this IConnection

token

CancellationToken

static ValueTask DisconnectAsync(
this IConnection connection,
CancellationToken token = default
)

Returns

ValueTask ·

GetConnectionIdAsync

Gets the ID of the current connection.

Params

connection

this IConnection

token

CancellationToken

static ValueTask<long> GetConnectionIdAsync(
this IConnection connection,
CancellationToken token = default
)

Returns

ValueTask<long> · ID of the connection.

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.