Freigeben über


ServiceRpcDescriptor.ConstructRpc Method

Definition

Overloads

ConstructRpc(Object, IDuplexPipe)

Establishes an RPC connection to a given object over an IDuplexPipe, allowing the remote party to invoke methods locally on the given object.

ConstructRpc<T>(IDuplexPipe)

Creates an RPC client proxy over a given IDuplexPipe without providing a local RPC target for the remote party to invoke methods locally.

ConstructRpc<T>(Object, IDuplexPipe)

Creates an RPC client proxy over a given IDuplexPipe and provides a local RPC target for the remote party to invoke methods locally.

ConstructRpc(Object, IDuplexPipe)

Establishes an RPC connection to a given object over an IDuplexPipe, allowing the remote party to invoke methods locally on the given object.

public:
 void ConstructRpc(System::Object ^ rpcTarget, System::IO::Pipelines::IDuplexPipe ^ pipe);
public void ConstructRpc (object rpcTarget, System.IO.Pipelines.IDuplexPipe pipe);
member this.ConstructRpc : obj * System.IO.Pipelines.IDuplexPipe -> unit
Public Sub ConstructRpc (rpcTarget As Object, pipe As IDuplexPipe)

Parameters

rpcTarget
Object

The target of any RPC calls received over the supplied pipe. Raising events defined on this object may result in notifications being forwarded to the remote party. If this object implements IDisposable, Dispose() will be invoked when the client closes their connection.

pipe
IDuplexPipe

The pipe the rpcTarget should use to communicate.

Applies to

ConstructRpc<T>(IDuplexPipe)

Creates an RPC client proxy over a given IDuplexPipe without providing a local RPC target for the remote party to invoke methods locally.

public:
generic <typename T>
 where T : class T ConstructRpc(System::IO::Pipelines::IDuplexPipe ^ pipe);
public T ConstructRpc<T> (System.IO.Pipelines.IDuplexPipe pipe) where T : class;
member this.ConstructRpc : System.IO.Pipelines.IDuplexPipe -> 'T (requires 'T : null)
Public Function ConstructRpc(Of T As Class) (pipe As IDuplexPipe) As T

Type Parameters

T

The type of the RPC proxy to generate for invoking methods on the remote party or receiving events from it.

Parameters

pipe
IDuplexPipe

The pipe used to communicate with the remote party.

Returns

T

The generated proxy. This value should be disposed of when no longer needed, if it implements IDisposable at runtime. A convenient disposal syntax is: (proxy as IDisposable)?.Dispose();

Applies to

ConstructRpc<T>(Object, IDuplexPipe)

Creates an RPC client proxy over a given IDuplexPipe and provides a local RPC target for the remote party to invoke methods locally.

public:
generic <typename T>
 where T : class T ConstructRpc(System::Object ^ rpcTarget, System::IO::Pipelines::IDuplexPipe ^ pipe);
public T ConstructRpc<T> (object? rpcTarget, System.IO.Pipelines.IDuplexPipe pipe) where T : class;
member this.ConstructRpc : obj * System.IO.Pipelines.IDuplexPipe -> 'T (requires 'T : null)
Public Function ConstructRpc(Of T As Class) (rpcTarget As Object, pipe As IDuplexPipe) As T

Type Parameters

T

The type of the RPC proxy to generate for invoking methods on the remote party or receiving events from it.

Parameters

rpcTarget
Object

A local RPC target on which the remote party can invoke methods. This is usually optional for requestors of a service but is typically expected for the proffering services to provide. If this object implements IDisposable, Dispose() will be invoked when the client closes their connection.

pipe
IDuplexPipe

The pipe used to communicate with the remote party.

Returns

T

The generated proxy. This value should be disposed of when no longer needed, if it implements IDisposable at runtime. A convenient disposal syntax is: (proxy as IDisposable)?.Dispose();

Applies to