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; }
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); }