EndpointAddressBuilder Class
A factory for producing new (immutable) endpoint addresses with specific property values.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
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)));
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.