Beispiel #1
0
        public void AddRpcService(IRpcInvokable service)
        {
            if (_rpcHandlers.Contains(service))
            {
                throw new Exception("Already exist IRpcInvokable in _rpcHandlers");
            }

            _rpcHandlers.Add(service);
        }
Beispiel #2
0
        /// <summary>
        /// RPC Service를 등록합니다.
        /// </summary>
        /// <param name="service"></param>
        public void AddRpcService(IRpcInvokable service)
        {
            if (State != SessionState.Closed)
            {
                throw new Exception("Only possible when the client is stopped");
            }

            if (_rpcHandlers.Contains(service))
            {
                throw new Exception("Already exist IRpcInvokable in _rpcHandlers");
            }

            _rpcHandlers.Add(service);
        }
Beispiel #3
0
        /// <summary>
        /// RPC 서비스를 등록함.
        /// </summary>
        /// <param name="service"></param>
        public void AddRpcService(IRpcInvokable service)
        {
            if (_state != ServerState.None &&
                _state != ServerState.Stopped)
            {
                throw new Exception("Only possible when the server is stopped");
            }

            if (_rpcHandlers.Contains(service))
            {
                throw new Exception("Already exist IRpcInvokable in _rpcHandlers");
            }

            _rpcHandlers.Add(service);
        }
Beispiel #4
0
        /// <summary>
        /// RPC 서비스를 등록함.
        /// </summary>
        /// <param name="service"></param>
        public void AddRpcService(IRpcInvokable service)
        {
            if (_state != ServerState.None &&
                _state != ServerState.Stopped)
            {
                throw new Exception("Only possible when the server is stopped");
            }

            if (_rpcHandlers.Contains(service))
            {
                throw new Exception("Already exist IRpcInvokable in _rpcHandlers");
            }

            _logger.LogInformation($"Add Rpc Service : {service.GetType().Name}");

            _rpcHandlers.Add(service);
        }