Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EndpointAddress::ApplyTo Method (Message^)

 

Assigns the URI and properties of the endpoint address to the values of the headers of a specified message.

Namespace:   System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public:
void ApplyTo(
	Message^ message
)

Parameters

message
Type: System.ServiceModel.Channels::Message^

The Message whose header values are being assigned.

Exception Condition
ArgumentNullException

message is null.

The ApplyTo(Message^) method sets the "To" of the message with the Uri of the current EndpointAddress. Remember that "ApplyTo" means here "apply this address to the 'To' header of the message".

The following code shows how to apply the URI and properties of an endpoint address to the headers of a message.

Message msg = Message.CreateMessage(MessageVersion.Soap11, "urn:action");
endpointAddress.ApplyTo(msg);

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2017 Microsoft