コード例 #1
0
        public static RpcClientObserverItem GetClientItem(string serverUri, string service, string method, string serviceRole)
        {
            RpcClientObserverItem ret;
            var key = new ComboClass<string, string, string>(serverUri, service, method);

            lock (_syncClient) {
                if (!_clientDic.TryGetValue(key, out ret)) {
                    ret = new RpcClientObserverItem(serverUri, service, method, serviceRole);
                    _clientDic.Add(key, ret);
                }
            }
            return ret;
        }
コード例 #2
0
ファイル: RpcObserverManager.cs プロジェクト: ilahsa/bai_pro
        public static RpcClientObserverItem GetClientItem(string serverUri, string service, string method, string serviceRole)
        {
            RpcClientObserverItem ret;
            var key = new ComboClass <string, string, string>(serverUri, service, method);

            lock (_syncClient) {
                if (!_clientDic.TryGetValue(key, out ret))
                {
                    ret = new RpcClientObserverItem(serverUri, service, method, serviceRole);
                    _clientDic.Add(key, ret);
                }
            }
            return(ret);
        }