Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

EndpointAddressBuilder Class

A factory for producing new (immutable) endpoint addresses with specific property values.

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)
public class EndpointAddressBuilder

The new endpoint address can have its property values initialized from the property values of an existing endpoint address using the EndpointAddressBuilder(EndpointAddress) constructor.

The endpoint addresses created can have their URI and identity values set using the Uri and Identity properties of the endpoint address builder. Note that EndpointAddress is an immutable class.

EndpointAddressBuilder eab = new EndpointAddressBuilder();
eab.Uri = new Uri("http://localhost/Uri");
eab.Headers.Add(AddressHeader.CreateAddressHeader("n", "ns", "val"));

eab.Identity = EndpointIdentity.CreateUpnIdentity("foo");

XmlDictionaryReader xdrExtensions = eab.GetReaderAtExtensions();

StringReader sr = new StringReader(@"<myExtension xmlns=""myExtNs"" />");
eab.SetExtensionReader(XmlDictionaryReader.CreateDictionaryReader(XmlReader.Create(sr)));

EndpointAddress ea = eab.ToEndpointAddress();

sr = new StringReader(@"<myMetadata xmlns=""myMetaNs"" />");
XmlDictionaryReader xdrMetaData = eab.GetReaderAtMetadata();

eab.SetMetadataReader(XmlDictionaryReader.CreateDictionaryReader(XmlReader.Create(sr)));
System.Object
  System.ServiceModel.EndpointAddressBuilder
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.