ערוך

שתף באמצעות


ServiceEndpointCollection.Find Method

Definition

Returns the first service endpoint found that satisfies specific criteria from the collection of service endpoints.

Overloads

Find(Type)

Returns the first service endpoint found that satisfies the specified contract type from the collection of service endpoints.

Find(Uri)

Returns a service endpoint with a specified address from the collection of service endpoints.

Find(XmlQualifiedName)

Returns a service endpoint with a specified namespace and contract name from the collection of service endpoints.

Find(Type, XmlQualifiedName)

Returns a service endpoint of a specified contract type and with a specified binding name and namespace from the collection of service endpoints.

Find(XmlQualifiedName, XmlQualifiedName)

Returns the first service endpoint with the specified contract name and namespace and binding name and namespace from the collection of service endpoints.

Remarks

There are potentially multiple endpoints that could satisfy the criteria. The method returns the first one encountered in the collection. If you need to find all of the ServiceEndpoint objects that satisfy the specified criteria, use one of the FindAll methods instead.

Find(Type)

Source:
ServiceEndpointCollection.cs
Source:
ServiceEndpointCollection.cs
Source:
ServiceEndpointCollection.cs

Returns the first service endpoint found that satisfies the specified contract type from the collection of service endpoints.

public:
 System::ServiceModel::Description::ServiceEndpoint ^ Find(Type ^ contractType);
public System.ServiceModel.Description.ServiceEndpoint Find (Type contractType);
member this.Find : Type -> System.ServiceModel.Description.ServiceEndpoint
Public Function Find (contractType As Type) As ServiceEndpoint

Parameters

contractType
Type

The Type of contract for the service endpoint.

Returns

The first ServiceEndpoint of the specified contract type or null if none was found.

Exceptions

contractType is null.

Remarks

This Find(Type) overload is specific to the Windows Communication Foundation (WCF) programming model. It looks at the ContractType property for each endpoint. The ContractType may be null if the ContractDescription was not created from the WCF programming model (types with *Contract attributes).

There are potentially multiple endpoints that could satisfy the criteria. The method returns the first one encountered in the collection. If you need to find all of the ServiceEndpoint objects that satisfy the specified criteria, use one of the FindAll methods instead.

Applies to

Find(Uri)

Source:
ServiceEndpointCollection.cs
Source:
ServiceEndpointCollection.cs
Source:
ServiceEndpointCollection.cs

Returns a service endpoint with a specified address from the collection of service endpoints.

public:
 System::ServiceModel::Description::ServiceEndpoint ^ Find(Uri ^ address);
public System.ServiceModel.Description.ServiceEndpoint Find (Uri address);
member this.Find : Uri -> System.ServiceModel.Description.ServiceEndpoint
Public Function Find (address As Uri) As ServiceEndpoint

Parameters

address
Uri

The Uri for the service endpoint.

Returns

The first ServiceEndpoint of the specified address or null if none was found.

Exceptions

address is null.

Remarks

There are potentially multiple endpoints that could satisfy the criteria. The method returns the first one encountered in the collection. If you need to find all of the ServiceEndpoint objects that satisfy the specified criteria, use one of the FindAll methods instead.

Applies to

Find(XmlQualifiedName)

Source:
ServiceEndpointCollection.cs
Source:
ServiceEndpointCollection.cs
Source:
ServiceEndpointCollection.cs

Returns a service endpoint with a specified namespace and contract name from the collection of service endpoints.

public:
 System::ServiceModel::Description::ServiceEndpoint ^ Find(System::Xml::XmlQualifiedName ^ contractName);
public System.ServiceModel.Description.ServiceEndpoint Find (System.Xml.XmlQualifiedName contractName);
member this.Find : System.Xml.XmlQualifiedName -> System.ServiceModel.Description.ServiceEndpoint
Public Function Find (contractName As XmlQualifiedName) As ServiceEndpoint

Parameters

contractName
XmlQualifiedName

The XmlQualifiedName for the contract of the service.

Returns

The first ServiceEndpoint with the specified namespace and contract name or null if none was found.

Remarks

There are potentially multiple endpoints that could satisfy the criteria. The method returns the first one encountered in the collection. If you need to find all of the ServiceEndpoint objects that satisfy the specified criteria, use one of the FindAll methods instead.

Applies to

Find(Type, XmlQualifiedName)

Source:
ServiceEndpointCollection.cs
Source:
ServiceEndpointCollection.cs
Source:
ServiceEndpointCollection.cs

Returns a service endpoint of a specified contract type and with a specified binding name and namespace from the collection of service endpoints.

public:
 System::ServiceModel::Description::ServiceEndpoint ^ Find(Type ^ contractType, System::Xml::XmlQualifiedName ^ bindingName);
public System.ServiceModel.Description.ServiceEndpoint Find (Type contractType, System.Xml.XmlQualifiedName bindingName);
member this.Find : Type * System.Xml.XmlQualifiedName -> System.ServiceModel.Description.ServiceEndpoint
Public Function Find (contractType As Type, bindingName As XmlQualifiedName) As ServiceEndpoint

Parameters

contractType
Type

The Type of contract for the service endpoint.

bindingName
XmlQualifiedName

The XmlQualifiedName for the binding of the service.

Returns

The first ServiceEndpoint of the specified contract type and binding name and namespace or null if none was found.

Exceptions

contractType or bindingName is null.

Remarks

There are potentially multiple endpoints that could satisfy the criteria. The method returns the first one encountered in the collection. If you need to find all of the ServiceEndpoint objects that satisfy the specified criteria, use one of the FindAll methods instead.

Applies to

Find(XmlQualifiedName, XmlQualifiedName)

Source:
ServiceEndpointCollection.cs
Source:
ServiceEndpointCollection.cs
Source:
ServiceEndpointCollection.cs

Returns the first service endpoint with the specified contract name and namespace and binding name and namespace from the collection of service endpoints.

public:
 System::ServiceModel::Description::ServiceEndpoint ^ Find(System::Xml::XmlQualifiedName ^ contractName, System::Xml::XmlQualifiedName ^ bindingName);
public System.ServiceModel.Description.ServiceEndpoint Find (System.Xml.XmlQualifiedName contractName, System.Xml.XmlQualifiedName bindingName);
member this.Find : System.Xml.XmlQualifiedName * System.Xml.XmlQualifiedName -> System.ServiceModel.Description.ServiceEndpoint
Public Function Find (contractName As XmlQualifiedName, bindingName As XmlQualifiedName) As ServiceEndpoint

Parameters

contractName
XmlQualifiedName

The XmlQualifiedName for the contract of the service.

bindingName
XmlQualifiedName

The XmlQualifiedName for the binding of the service.

Returns

The first ServiceEndpoint with the specified binding and contract names and namespaces.

Exceptions

contractName or bindingName is null.

Remarks

There are potentially multiple endpoints that could satisfy the criteria. The method returns the first one encountered in the collection. If you need to find all of the ServiceEndpoint objects that satisfy the specified criteria, use one of the FindAll methods instead.

Applies to