public ServiceInstance() { var instanceId = NewId.Next(); InstanceId = instanceId.ToGuid(); InstanceName = instanceId.ToString(Util.FormatUtil.Formatter); _clientCache = new ServiceInstanceClientCache(); }
public ServiceEndpointClientCache(IServiceInstanceClientCache instanceClientCache) { _instanceClientCache = instanceClientCache; _cache = new GreenCache <ServiceClientContext>(ServiceInstanceClientCacheDefaults.Settings); _index = _cache.AddIndex("clientId", x => x.ClientId); _messageTypes = new ConcurrentDictionary <Type, IServiceEndpointMessageClientCache>(); instanceClientCache.Connect(this); }