public static ServerServiceDefinition CreateDefinition( this ICsiRpcServiceFactory csiRpcServiceFactory, CsiRpcServiceType csiRpcServiceTypeSingle) { switch (csiRpcServiceTypeSingle) { case CsiRpcServiceType.Identity: return(Identity.BindService(csiRpcServiceFactory.CreateIdentityRpcService())); case CsiRpcServiceType.Controller: return(Controller.BindService(csiRpcServiceFactory.CreateControllerRpcService())); case CsiRpcServiceType.Node: return(Node.BindService(csiRpcServiceFactory.CreateNodeRpcService())); } throw new Exception("Unsupported service type " + csiRpcServiceTypeSingle); }
public CsiRpcServer(ICsiRpcServiceFactory csiRpcServiceFactory) => this.csiRpcServiceFactory = csiRpcServiceFactory;