Export (0) Print
Expand All

EndpointAddressBuilder Class

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

System.Object
  System.ServiceModel.EndpointAddressBuilder

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

public class EndpointAddressBuilder

The EndpointAddressBuilder type exposes the following members.

  NameDescription
Public methodSupported by Portable Class LibraryEndpointAddressBuilder()Initializes a new instance of the EndpointAddressBuilder class.
Public methodSupported by Portable Class LibraryEndpointAddressBuilder(EndpointAddress)Initializes a new instance of the EndpointAddressBuilder class from an existing endpoint address.
Top

  NameDescription
Public propertySupported by Portable Class LibraryHeadersGets the list of address headers for the endpoints that the builder can create.
Public propertyIdentityGets or sets the identity for the endpoints that the builder can create.
Public propertySupported by Portable Class LibraryUriGets or sets the URI for the endpoints that the builder can create.
Top

  NameDescription
Public methodSupported by Portable Class LibraryEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodSupported by Portable Class LibraryFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported by Portable Class LibraryGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetReaderAtExtensionsReturns the XML dictionary reader that contains the extensions of the endpoint address.
Public methodGetReaderAtMetadataReturns the reader that contains the metadata associated with the endpoint address.
Public methodSupported by Portable Class LibraryGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported by Portable Class LibraryMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSetExtensionReaderSpecifies the XML dictionary reader that contains the extensions of the endpoint address.
Public methodSetMetadataReaderSpecifies the XML dictionary reader that contains the metadata associated with the endpoint address.
Public methodSupported by Portable Class LibraryToEndpointAddressCreates a new endpoint address initialized with the property values of the current endpoint address builder.
Public methodSupported by Portable Class LibraryToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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("identity");

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)));


.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft