Share via


MessageFormatterDuplexPipeTracker.GetToken Method

Definition

Overloads

GetToken(PipeWriter)
Obsolete.

Creates a token to represent a PipeWriter as it is transmitted from the client to an RPC server as a method argument.

GetToken(IDuplexPipe)
Obsolete.

Creates a token to represent an IDuplexPipe as it is transmitted from the client to an RPC server as a method argument.

GetToken(PipeReader)
Obsolete.

Creates a token to represent a PipeReader as it is transmitted from the client to an RPC server as a method argument.

GetToken(PipeWriter)

Caution

Use GetULongToken instead.

Creates a token to represent a PipeWriter as it is transmitted from the client to an RPC server as a method argument.

public int? GetToken (System.IO.Pipelines.PipeWriter writer);
public int? GetToken (System.IO.Pipelines.PipeWriter? writer);
[System.Obsolete("Use GetULongToken instead.")]
public int? GetToken (System.IO.Pipelines.PipeWriter? writer);
member this.GetToken : System.IO.Pipelines.PipeWriter -> Nullable<int>
[<System.Obsolete("Use GetULongToken instead.")>]
member this.GetToken : System.IO.Pipelines.PipeWriter -> Nullable<int>
Public Function GetToken (writer As PipeWriter) As Nullable(Of Integer)

Parameters

writer
PipeWriter

The client pipe that is to be shared with the RPC server. May be null.

Returns

The token to use as the RPC method argument; or null if writer was null.

Attributes

Exceptions

Thrown if no MultiplexingStream was provided to the constructor or when serializing a message without an ID property.

Remarks

This method should only be called while serializing requests that include an ID (i.e. requests for which we expect a response). When the response is received, a call should always be made to OnResponseReceived(Int64, Boolean).

Applies to

GetToken(IDuplexPipe)

Caution

Use GetULongToken instead.

Creates a token to represent an IDuplexPipe as it is transmitted from the client to an RPC server as a method argument.

public int? GetToken (System.IO.Pipelines.IDuplexPipe duplexPipe);
public int? GetToken (System.IO.Pipelines.IDuplexPipe? duplexPipe);
[System.Obsolete("Use GetULongToken instead.")]
public int? GetToken (System.IO.Pipelines.IDuplexPipe? duplexPipe);
member this.GetToken : System.IO.Pipelines.IDuplexPipe -> Nullable<int>
[<System.Obsolete("Use GetULongToken instead.")>]
member this.GetToken : System.IO.Pipelines.IDuplexPipe -> Nullable<int>
Public Function GetToken (duplexPipe As IDuplexPipe) As Nullable(Of Integer)

Parameters

duplexPipe
IDuplexPipe

The client pipe that is to be shared with the RPC server. May be null.

Returns

The token to use as the RPC method argument; or null if duplexPipe was null.

Attributes

Exceptions

Thrown if no MultiplexingStream was provided to the constructor or when serializing a message without an ID property.

Remarks

This method should only be called while serializing requests that include an ID (i.e. requests for which we expect a response). When the response is received, a call should always be made to OnResponseReceived(Int64, Boolean).

Applies to

GetToken(PipeReader)

Caution

Use GetULongToken instead.

Creates a token to represent a PipeReader as it is transmitted from the client to an RPC server as a method argument.

public int? GetToken (System.IO.Pipelines.PipeReader reader);
public int? GetToken (System.IO.Pipelines.PipeReader? reader);
[System.Obsolete("Use GetULongToken instead.")]
public int? GetToken (System.IO.Pipelines.PipeReader? reader);
member this.GetToken : System.IO.Pipelines.PipeReader -> Nullable<int>
[<System.Obsolete("Use GetULongToken instead.")>]
member this.GetToken : System.IO.Pipelines.PipeReader -> Nullable<int>
Public Function GetToken (reader As PipeReader) As Nullable(Of Integer)

Parameters

reader
PipeReader

The client pipe that is to be shared with the RPC server. May be null.

Returns

The token to use as the RPC method argument; or null if reader was null.

Attributes

Exceptions

Thrown if no MultiplexingStream was provided to the constructor or when serializing a message without an ID property.

Remarks

This method should only be called while serializing requests that include an ID (i.e. requests for which we expect a response). When the response is received, a call should always be made to OnResponseReceived(Int64, Boolean).

Applies to