Exemple #1
0
        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);
        }
Exemple #2
0
 public CsiRpcServer(ICsiRpcServiceFactory csiRpcServiceFactory)
 => this.csiRpcServiceFactory = csiRpcServiceFactory;