예제 #1
0
 /// <summary>
 /// Creates a new SCS Service application using an EndPoint.
 /// </summary>
 /// <param name="endPoint">EndPoint that represents address of the service</param>
 /// <returns>Created SCS service application</returns>
 public static IServerApplication CreateServerApplication(CJiaEndPoint endPoint)
 {
     return(new CJiaServer(ServerFactory.CreateServer(endPoint)));
 }
예제 #2
0
 /// <summary>
 /// Creates a client to connect to a SCS 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 IClientApplication <T> CreateClientApplication <T>(CJiaEndPoint endpoint, object clientObject = null) where T : class
 {
     return(new CJiaClient <T>(endpoint.CreateClient(), clientObject));
 }