MetadataExchangeClient Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the MetadataExchangeClient class.
MetadataExchangeClient() |
Initializes a new instance of the MetadataExchangeClient class. |
MetadataExchangeClient(Binding) |
Initializes a new instance of the MetadataExchangeClient class using the specified binding. |
MetadataExchangeClient(EndpointAddress) |
Initializes a new instance of the MetadataExchangeClient class. |
MetadataExchangeClient(String) |
Initializes a new instance of the MetadataExchangeClient class. |
MetadataExchangeClient(Uri, MetadataExchangeClientMode) |
Initializes a new instance of the MetadataExchangeClient class. |
The following table lists the default bindings that are used for various protocol schemes.
Scheme | Binding |
---|---|
http | WSHttpBinding (SecurityMode.None) |
https | WSHttpBinding (SecurityMode.Transport) |
net.tcp | CustomBinding with a TcpTransportBindingElement |
net.pipe | CustomBinding with a NamedPipeTransportBindingElement |
Initializes a new instance of the MetadataExchangeClient class.
public:
MetadataExchangeClient();
public MetadataExchangeClient ();
Public Sub New ()
Applies to
.NET Framework 4.8.1 e altre versioni
Prodotto | Versioni |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Initializes a new instance of the MetadataExchangeClient class using the specified binding.
public:
MetadataExchangeClient(System::ServiceModel::Channels::Binding ^ mexBinding);
public MetadataExchangeClient (System.ServiceModel.Channels.Binding mexBinding);
new System.ServiceModel.Description.MetadataExchangeClient : System.ServiceModel.Channels.Binding -> System.ServiceModel.Description.MetadataExchangeClient
Public Sub New (mexBinding As Binding)
Parameters
- mexBinding
- Binding
The binding to use when retrieving metadata using WS-Transfer.
Examples
The following code example shows the use of MetadataExchangeClient to specify a download binding, resolve any contained references to metadata, and download the metadata.
// Get metadata documents.
Console.WriteLine("URI of the metadata documents retreived:");
MetadataExchangeClient metaTransfer
= new MetadataExchangeClient(httpGetMetaAddress.Uri, MetadataExchangeClientMode.HttpGet);
metaTransfer.ResolveMetadataReferences = true;
MetadataSet otherDocs = metaTransfer.GetMetadata();
foreach (MetadataSection doc in otherDocs.MetadataSections)
Console.WriteLine(doc.Dialect + " : " + doc.Identifier);
Remarks
Use this constructor to specify a binding to use when downloading metadata.
Applies to
.NET Framework 4.8.1 e altre versioni
Prodotto | Versioni |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Initializes a new instance of the MetadataExchangeClient class.
public:
MetadataExchangeClient(System::ServiceModel::EndpointAddress ^ address);
public MetadataExchangeClient (System.ServiceModel.EndpointAddress address);
new System.ServiceModel.Description.MetadataExchangeClient : System.ServiceModel.EndpointAddress -> System.ServiceModel.Description.MetadataExchangeClient
Public Sub New (address As EndpointAddress)
Parameters
- address
- EndpointAddress
The metadata address.
Remarks
Use this constructor to specify the address of the metadata endpoint.
Applies to
.NET Framework 4.8.1 e altre versioni
Prodotto | Versioni |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Initializes a new instance of the MetadataExchangeClient class.
public:
MetadataExchangeClient(System::String ^ endpointConfigurationName);
public MetadataExchangeClient (string endpointConfigurationName);
new System.ServiceModel.Description.MetadataExchangeClient : string -> System.ServiceModel.Description.MetadataExchangeClient
Public Sub New (endpointConfigurationName As String)
Parameters
- endpointConfigurationName
- String
The name of the endpoint configuration information to use when downloading metadata.
Remarks
Use this constructor to use the data from a specific endpoint configuration element to create a channel to download the metadata.
Applies to
.NET Framework 4.8.1 e altre versioni
Prodotto | Versioni |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Initializes a new instance of the MetadataExchangeClient class.
public:
MetadataExchangeClient(Uri ^ address, System::ServiceModel::Description::MetadataExchangeClientMode mode);
public MetadataExchangeClient (Uri address, System.ServiceModel.Description.MetadataExchangeClientMode mode);
new System.ServiceModel.Description.MetadataExchangeClient : Uri * System.ServiceModel.Description.MetadataExchangeClientMode -> System.ServiceModel.Description.MetadataExchangeClient
Public Sub New (address As Uri, mode As MetadataExchangeClientMode)
Parameters
- address
- Uri
The address of the metadata.
The mode to use when downloading the metadata.
Examples
The following code example shows the use of MetadataExchangeClient to specify a download binding, resolve any contained references to metadata, and download the metadata.
// Get metadata documents.
Console.WriteLine("URI of the metadata documents retreived:");
MetadataExchangeClient metaTransfer
= new MetadataExchangeClient(httpGetMetaAddress.Uri, MetadataExchangeClientMode.HttpGet);
metaTransfer.ResolveMetadataReferences = true;
MetadataSet otherDocs = metaTransfer.GetMetadata();
foreach (MetadataSection doc in otherDocs.MetadataSections)
Console.WriteLine(doc.Dialect + " : " + doc.Identifier);
Remarks
Use this constructor to specify the address and whether to use an HTTP GET request or WS-Transfer Get. For more information, see System.ServiceModel.Description.MetadataExchangeClientMode.
Applies to
.NET Framework 4.8.1 e altre versioni
Prodotto | Versioni |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Feedback su .NET
.NET è un progetto di open source. Selezionare un collegamento per fornire feedback: