Language

EndpointAddress コンストラクター

定義

EndpointAddress クラスの新しいインスタンスを初期化します。

オーバーロード

名前 説明
EndpointAddress(String)

指定した URI 文字列を使用して、 EndpointAddress クラスの新しいインスタンスを初期化します。

EndpointAddress(Uri, AddressHeader[])

指定した URI とヘッダーを使用して、 EndpointAddress クラスの新しいインスタンスを初期化します。

EndpointAddress(Uri, EndpointIdentity, AddressHeader[])

指定した URI、ID、およびヘッダーを使用して、 EndpointAddress クラスの新しいインスタンスを初期化します。

EndpointAddress(Uri, EndpointIdentity, AddressHeaderCollection)

指定した URI、ID、およびヘッダー コレクションを使用して、 EndpointAddress クラスの新しいインスタンスを初期化します。

EndpointAddress(Uri, EndpointIdentity, AddressHeaderCollection, XmlDictionaryReader, XmlDictionaryReader)

指定した URI、ID、ヘッダー コレクション、およびメタデータリーダーと拡張リーダーを使用して、 EndpointAddress クラスの新しいインスタンスを初期化します。

EndpointAddress(String)

ソース:
EndpointAddress.cs
ソース:
EndpointAddress.cs
ソース:
EndpointAddress.cs

指定した URI 文字列を使用して、 EndpointAddress クラスの新しいインスタンスを初期化します。

public:
 EndpointAddress(System::String ^ uri);
public EndpointAddress(string uri);
new System.ServiceModel.EndpointAddress : string -> System.ServiceModel.EndpointAddress
Public Sub New (uri As String)

パラメーター

uri
String

エンドポイントを識別する URI。

例

AddressHeader addressHeader1 = AddressHeader.CreateAddressHeader("specialservice1", "http://localhost:8000/service", 1);
AddressHeader addressHeader2 = AddressHeader.CreateAddressHeader("specialservice2", "http://localhost:8000/service", 2);

AddressHeader[] addressHeaders = new AddressHeader[2] { addressHeader1, addressHeader2 };
AddressHeaderCollection headers = new AddressHeaderCollection(addressHeaders);

EndpointIdentity endpointIdentity =
    EndpointIdentity.CreateUpnIdentity(WindowsIdentity.GetCurrent().Name);
EndpointAddress endpointAddress = new EndpointAddress(
    new Uri
    ("http://localhost:8003/servicemodelsamples/service/incode/identity"),
    endpointIdentity, addressHeaders);

Uri anonUri = EndpointAddress.AnonymousUri;

適用対象

EndpointAddress(Uri, AddressHeader[])

ソース:
EndpointAddress.cs
ソース:
EndpointAddress.cs
ソース:
EndpointAddress.cs

指定した URI とヘッダーを使用して、 EndpointAddress クラスの新しいインスタンスを初期化します。

public:
 EndpointAddress(Uri ^ uri, ... cli::array <System::ServiceModel::Channels::AddressHeader ^> ^ addressHeaders);
public EndpointAddress(Uri uri, params System.ServiceModel.Channels.AddressHeader[] addressHeaders);
new System.ServiceModel.EndpointAddress : Uri * System.ServiceModel.Channels.AddressHeader[] -> System.ServiceModel.EndpointAddress
Public Sub New (uri As Uri, ParamArray addressHeaders As AddressHeader())

パラメーター

uri
Uri

エンドポイントの場所を識別する Uri 。

addressHeaders
AddressHeader[]

エンドポイントとの対話に使用されるアドレス情報を含むArray型のAddressHeader。

例

次のコードは、このコンストラクターの使用方法を示しています。

適用対象

EndpointAddress(Uri, EndpointIdentity, AddressHeader[])

ソース:
EndpointAddress.cs
ソース:
EndpointAddress.cs
ソース:
EndpointAddress.cs

指定した URI、ID、およびヘッダーを使用して、 EndpointAddress クラスの新しいインスタンスを初期化します。

public:
 EndpointAddress(Uri ^ uri, System::ServiceModel::EndpointIdentity ^ identity, ... cli::array <System::ServiceModel::Channels::AddressHeader ^> ^ addressHeaders);
public EndpointAddress(Uri uri, System.ServiceModel.EndpointIdentity identity, params System.ServiceModel.Channels.AddressHeader[] addressHeaders);
new System.ServiceModel.EndpointAddress : Uri * System.ServiceModel.EndpointIdentity * System.ServiceModel.Channels.AddressHeader[] -> System.ServiceModel.EndpointAddress
Public Sub New (uri As Uri, identity As EndpointIdentity, ParamArray addressHeaders As AddressHeader())

パラメーター

uri
Uri

エンドポイントの場所を識別する Uri 。

identity
EndpointIdentity

エンドポイントの EndpointIdentity 。

addressHeaders
AddressHeader[]

エンドポイントとの対話に使用されるアドレス情報を含むArray型のAddressHeader。

例

次のコードは、EndpointAddress、Uri、およびEndpointIdentity オブジェクトの配列を持つAddressHeader オブジェクトを構築する方法を示しています。

        //Create new address headers for special services and add them to an array
        AddressHeader addressHeader1 = AddressHeader.CreateAddressHeader("specialservice1", "http://localhost:8000/service", 1);
        AddressHeader addressHeader2 = AddressHeader.CreateAddressHeader("specialservice2", "http://localhost:8000/service", 2);

        AddressHeader[] addressHeaders = new AddressHeader[2] { addressHeader1, addressHeader2 };

        EndpointIdentity endpointIdentity = EndpointIdentity.CreateUpnIdentity(WindowsIdentity.GetCurrent().Name);

        EndpointAddress endpointAddress = new EndpointAddress(
            new Uri
        ("http://localhost:8003/servicemodelsamples/service/incode/identity"),
        endpointIdentity, addressHeaders);

適用対象

EndpointAddress(Uri, EndpointIdentity, AddressHeaderCollection)

指定した URI、ID、およびヘッダー コレクションを使用して、 EndpointAddress クラスの新しいインスタンスを初期化します。

public:
 EndpointAddress(Uri ^ uri, System::ServiceModel::EndpointIdentity ^ identity, System::ServiceModel::Channels::AddressHeaderCollection ^ headers);
public EndpointAddress(Uri uri, System.ServiceModel.EndpointIdentity identity, System.ServiceModel.Channels.AddressHeaderCollection headers);
new System.ServiceModel.EndpointAddress : Uri * System.ServiceModel.EndpointIdentity * System.ServiceModel.Channels.AddressHeaderCollection -> System.ServiceModel.EndpointAddress
Public Sub New (uri As Uri, identity As EndpointIdentity, headers As AddressHeaderCollection)

パラメーター

uri
Uri

エンドポイントの場所を識別する Uri 。

identity
EndpointIdentity

エンドポイントの EndpointIdentity 。

headers
AddressHeaderCollection

エンドポイントとの対話に使用されるアドレス情報を含む AddressHeaderCollection 。

例

次のコードは、EndpointAddress、Uri、およびEndpointIdentity オブジェクトを使用してAddressHeaderCollection オブジェクトを構築する方法を示しています。

        //Create new address headers for special services and add them to an array
        AddressHeader addressHeader1 = AddressHeader.CreateAddressHeader("specialservice1", "http://localhost:8000/service", 1);
        AddressHeader addressHeader2 = AddressHeader.CreateAddressHeader("specialservice2", "http://localhost:8000/service", 2);

        AddressHeader[] addressHeaders = new AddressHeader[2] { addressHeader1, addressHeader2 };
        AddressHeaderCollection addressHeaderColl = new AddressHeaderCollection(addressHeaders);

    // <Snippet#15>
        EndpointIdentity endpointIdentity = EndpointIdentity.CreateUpnIdentity(WindowsIdentity.GetCurrent().Name);
        EndpointAddress endpointAddress = new EndpointAddress(
            new Uri("http://localhost:8003/servicemodelsamples/service/incode/identity"),
        endpointIdentity,
        addressHeaderColl);
    EndpointIdentity thisEndpointIdentity = endpointAddress.Identity;
    // </Snippet#15>

適用対象

EndpointAddress(Uri, EndpointIdentity, AddressHeaderCollection, XmlDictionaryReader, XmlDictionaryReader)

指定した URI、ID、ヘッダー コレクション、およびメタデータリーダーと拡張リーダーを使用して、 EndpointAddress クラスの新しいインスタンスを初期化します。

public:
 EndpointAddress(Uri ^ uri, System::ServiceModel::EndpointIdentity ^ identity, System::ServiceModel::Channels::AddressHeaderCollection ^ headers, System::Xml::XmlDictionaryReader ^ metadataReader, System::Xml::XmlDictionaryReader ^ extensionReader);
public EndpointAddress(Uri uri, System.ServiceModel.EndpointIdentity identity, System.ServiceModel.Channels.AddressHeaderCollection headers, System.Xml.XmlDictionaryReader metadataReader, System.Xml.XmlDictionaryReader extensionReader);
new System.ServiceModel.EndpointAddress : Uri * System.ServiceModel.EndpointIdentity * System.ServiceModel.Channels.AddressHeaderCollection * System.Xml.XmlDictionaryReader * System.Xml.XmlDictionaryReader -> System.ServiceModel.EndpointAddress
Public Sub New (uri As Uri, identity As EndpointIdentity, headers As AddressHeaderCollection, metadataReader As XmlDictionaryReader, extensionReader As XmlDictionaryReader)

パラメーター

uri
Uri

エンドポイントの場所を識別する Uri 。

identity
EndpointIdentity

エンドポイントの EndpointIdentity 。

headers
AddressHeaderCollection

エンドポイントとの対話に使用されるアドレス情報を含む AddressHeaderCollection 。

metadataReader
XmlDictionaryReader

エンドポイント メタデータの取得元となる XmlDictionaryReader 。

extensionReader
XmlDictionaryReader

拡張機能の取得元となる XmlDictionaryReader 。

例

次のコードは、EndpointAddress、Uri、ヘッダー コレクション、メタデータ EndpointIdentity、拡張機能のXmlDictionaryReaderを指定するXmlDictionaryReaderをインスタンス化する方法を示しています。

XmlDictionaryReader metadataReader = endpointAddress.GetReaderAtMetadata();
XmlDictionaryReader extensionReader = endpointAddress.GetReaderAtExtensions();
EndpointIdentity identity = EndpointIdentity.CreateUpnIdentity(WindowsIdentity.GetCurrent().Name);

EndpointAddress endpointAddress2 = new EndpointAddress(
    new Uri("http://localhost:8003/servicemodelsamples/service/incode/identity"), identity, headers, metadataReader, extensionReader);

注釈

WS-Addressing 仕様では、 XmlDictionaryReaderを使用して取得できるエンドポイント参照 (EPR) の末尾に任意の拡張要素を表示できます。

適用対象