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

            _rpcHandlers.Add(service);
        }
예제 #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);
        }
예제 #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);
        }
예제 #4
0
파일: NetServer.cs 프로젝트: lanicon/EuNet
        /// <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);
        }