EndpointAddressBuilder EndpointAddressBuilder EndpointAddressBuilder EndpointAddressBuilder Class

Definition

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

public ref class EndpointAddressBuilder
public class EndpointAddressBuilder
type EndpointAddressBuilder = class
Public Class EndpointAddressBuilder
Inheritance
EndpointAddressBuilderEndpointAddressBuilderEndpointAddressBuilderEndpointAddressBuilder

Examples

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)));
Dim eab As New EndpointAddressBuilder()
eab.Uri = New Uri("http://localhost/Uri")
eab.Headers.Add(AddressHeader.CreateAddressHeader("n", "ns", "val"))

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

Dim xdrExtensions As XmlDictionaryReader = eab.GetReaderAtExtensions()

Dim sr As New StringReader("<myExtension xmlns=""myExtNs"" />")
eab.SetExtensionReader(XmlDictionaryReader.CreateDictionaryReader(XmlReader.Create(sr)))

Dim ea As EndpointAddress = eab.ToEndpointAddress()

sr = New StringReader("<myMetadata xmlns=""myMetaNs"" />")
Dim xdrMetaData As XmlDictionaryReader = eab.GetReaderAtMetadata()

eab.SetMetadataReader(XmlDictionaryReader.CreateDictionaryReader(XmlReader.Create(sr)))

Remarks

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.

Constructors

EndpointAddressBuilder() EndpointAddressBuilder() EndpointAddressBuilder() EndpointAddressBuilder()

Initializes a new instance of the EndpointAddressBuilder class.

EndpointAddressBuilder(EndpointAddress) EndpointAddressBuilder(EndpointAddress) EndpointAddressBuilder(EndpointAddress) EndpointAddressBuilder(EndpointAddress)

Initializes a new instance of the EndpointAddressBuilder class from an existing endpoint address.

Properties

Headers Headers Headers Headers

Gets the list of address headers for the endpoints that the builder can create.

Identity Identity Identity Identity

Gets or sets the identity for the endpoints that the builder can create.

Uri Uri Uri Uri

Gets or sets the URI for the endpoints that the builder can create.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetReaderAtExtensions() GetReaderAtExtensions() GetReaderAtExtensions() GetReaderAtExtensions()

Returns the XML dictionary reader that contains the extensions of the endpoint address.

GetReaderAtMetadata() GetReaderAtMetadata() GetReaderAtMetadata() GetReaderAtMetadata()

Returns the reader that contains the metadata associated with the endpoint address.

GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetExtensionReader(XmlDictionaryReader) SetExtensionReader(XmlDictionaryReader) SetExtensionReader(XmlDictionaryReader) SetExtensionReader(XmlDictionaryReader)

Specifies the XML dictionary reader that contains the extensions of the endpoint address.

SetMetadataReader(XmlDictionaryReader) SetMetadataReader(XmlDictionaryReader) SetMetadataReader(XmlDictionaryReader) SetMetadataReader(XmlDictionaryReader)

Specifies the XML dictionary reader that contains the metadata associated with the endpoint address.

ToEndpointAddress() ToEndpointAddress() ToEndpointAddress() ToEndpointAddress()

Creates a new endpoint address initialized with the property values of the current endpoint address builder.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to