Exemplo n.º 1
0
 /// <summary>
 ///     Creates a new client to connect to a server using an end point.
 /// </summary>
 /// <param name="endpoint">End point of the server to connect it</param>
 /// <returns>Created TCP client</returns>
 public static IClient CreateClient(ProtocolEndPointBase endpoint)
 {
     return(endpoint.CreateClient());
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Creates a client to connect to a ZCF service.
 /// </summary>
 /// <typeparam name="T">Type of service interface for remote method call</typeparam>
 /// <param name="endpoint">EndPoint of the server</param>
 /// <param name="clientObject">
 ///     Client-side object that handles remote method calls from server to client.
 ///     May be null if client has no methods to be invoked by server
 /// </param>
 /// <returns>Created client object to connect to the server</returns>
 public static IServiceClient <T> CreateClient <T>(ProtocolEndPointBase endpoint, object clientObject = null) where T : class
 {
     return(new ServiceClient <T>(endpoint.CreateClient(), clientObject));
 }