RequestContext.Reply Method

Definition

Replies to a request message.

Overloads

Reply(Message)

When overridden in a derived class, replies to a request message.

Reply(Message, TimeSpan)

When overridden in a derived class, replies to a request message within a specified interval of time.

Reply(Message)

Source:
RequestContext.cs
Source:
RequestContext.cs

When overridden in a derived class, replies to a request message.

public abstract void Reply (System.ServiceModel.Channels.Message message);

Parameters

message
Message

The incoming Message that contains the request.

Remarks

Use Reply when it is acceptable for the current thread to be blocked while it replies to the request message. The thread is blocked up to the specified timeout.

If the application processing must continue without waiting for the reply to complete, use the asynchronous BeginReply method. This method receives notification, through a callback, of the identity of the event handler for the operation. The operation is not complete until either a message becomes available in the channel or the time-out occurs.

Applies to

.NET 8 (package-provided) e outras versões
Produto Versões
.NET Core 1.0, Core 1.1, 8 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0

Reply(Message, TimeSpan)

Source:
RequestContext.cs
Source:
RequestContext.cs

When overridden in a derived class, replies to a request message within a specified interval of time.

public abstract void Reply (System.ServiceModel.Channels.Message message, TimeSpan timeout);

Parameters

message
Message

The incoming Message that contains the request.

timeout
TimeSpan

The TimeSpan that specifies the interval of time to wait for the reply to a request.

Remarks

Use Reply when it is acceptable for the current thread to be blocked while it replies to the request message. The thread is blocked up to the specified timeout.

If the application processing must continue without waiting for the reply to complete, use the asynchronous BeginReply method. This method receives notification, through a callback, of the identity of the event handler for the operation. The operation is not complete until either a message becomes available in the channel or the time-out occurs.

Applies to

.NET 8 (package-provided) e outras versões
Produto Versões
.NET Core 1.0, Core 1.1, 8 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0