/// <summary> /// Returns true if the client is still valid and connected to the endpoint specified in the parameter. /// </summary> /// <param name="endpoint">endpoint string</param> /// <param name="client">WCF communication client</param> /// <returns>true if the client is valid, false otherwise</returns> protected override bool ValidateClient(string endpoint, WcfCommunicationClient <TServiceContract> client) { var clientChannel = client.ClientChannel; return((clientChannel.State == CommunicationState.Opened) && (clientChannel.RemoteAddress.Uri.Equals(new Uri(endpoint)))); }
/// <summary> /// Aborts the given client /// </summary> /// <param name="client">Communication client</param> protected override void AbortClient(WcfCommunicationClient <TServiceContract> client) { client.ClientChannel.Abort(); }
/// <summary> /// Returns true if the client is still valid. Connection oriented transports can use this method to indicate that the client is no longer /// connected to the service. /// </summary> /// <param name="client">WCF communication client</param> /// <returns>true if the client is valid, false otherwise</returns> protected override bool ValidateClient(WcfCommunicationClient <TServiceContract> client) { return(client.ClientChannel.State == CommunicationState.Opened); }