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

AsyncConnection

Connection container that manages connection and exposes asynchronous API.

Static Methods

Connect

Connects to the PrivMX Bridge server.

Params

userPrivateKey

string

User's private key.

solutionId

string

ID of the Solution.

platformUrl

string

PrivMX Bridge URL.

token

CancellationToken

Cancelation token.

static async Task<AsyncConnection> Connect(
string userPrivateKey,
string solutionId,
string platformUrl,
CancellationToken token = default
)

Returns

async Task<AsyncConnection> · Created and connected instance of the Connection.

ConnectPublic

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 async Task<AsyncConnection> ConnectPublic(
string solutionId,
string platformUrl,
CancellationToken token = default
)

Returns

async Task<AsyncConnection> · Created and connected instance of the Connection.

Methods

AsyncConnection

Wraps existing connection into async connection. It's user responsibility to provide valid (connected) connection.

Params

connection

IConnection

Connection to wrap

AsyncConnection(
IConnection connection
)

GetConnectionId

Gets the ID of the current connection.ID of the connection.

long GetConnectionId()

Returns

long ·

ListContexts

Gets a list of Contexts available for the user.pagingQueryList query parameterstokenCancellation token.A task that represents the asynchronous operation. The task result contains a paging list of contexts.

Params

pagingQuery

PagingQuery

token

CancellationToken

ValueTask<PagingList<Context>> ListContexts(
PagingQuery pagingQuery,
CancellationToken token = default
)

Returns

ValueTask<PagingList<Context>> ·

DisposeAsync

Disposes async connection with all related resources.

ValueTask DisposeAsync()

Returns

ValueTask ·

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.