Sdílet prostřednictvím


EndpointAddress.Equality(EndpointAddress, EndpointAddress) Operátor

Definice

Vrátí hodnotu, která určuje, jestli zadané adresy koncových bodů nejsou ekvivalentní.

public:
 static bool operator ==(System::ServiceModel::EndpointAddress ^ address1, System::ServiceModel::EndpointAddress ^ address2);
public static bool operator == (System.ServiceModel.EndpointAddress address1, System.ServiceModel.EndpointAddress address2);
static member ( = ) : System.ServiceModel.EndpointAddress * System.ServiceModel.EndpointAddress -> bool
Public Shared Operator == (address1 As EndpointAddress, address2 As EndpointAddress) As Boolean

Parametry

address1
EndpointAddress

Jeden z objektů, EndpointAddress které se porovnávají.

address2
EndpointAddress

Jeden z objektů, EndpointAddress které se porovnávají.

Návraty

Boolean

true pokud jsou adresy koncového bodu ekvivalentní; falsev opačném případě .

Příklady

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

if (endpointAddress == endpointAddress2)
    Console.WriteLine("The two endpoint addresses are equal");
else
    Console.WriteLine("The two endpoint addresses are not equal");

Poznámky

Ekvivalentní metoda tohoto operátoru je EndpointAddress.Equals.

Platí pro