public ServiceEndpointMessageClientCache(IServiceEndpointClientCache endpointClientCache) { _endpointClientCache = endpointClientCache; _cache = new GreenCache <ServiceClientContext>(ServiceInstanceClientCacheDefaults.Settings); _index = _cache.AddIndex("clientId", x => x.ClientId); MessageInfo = MessageInfoCache.GetMessageInfo <TMessage>(); endpointClientCache.Connect(this); }
public ServiceEndpoint(IServiceInstance instance, IReceiveEndpointConfigurator endpointConfigurator, IServiceEndpointClientCache clientCache) { _instance = instance; endpointConfigurator.ConnectReceiveEndpointObserver(new ServiceEndpointObserver(this)); _sendEndpointProvider = TaskUtil.GetTask <ISendEndpointProvider>(); _publishEndpointProvider = TaskUtil.GetTask <IPublishEndpointProvider>(); _serviceAddress = new Lazy <Uri>(() => endpointConfigurator.InputAddress); _serviceInfo = TaskUtil.GetTask <ServiceInfo>(); _instanceInfo = TaskUtil.GetTask <InstanceInfo>(); ClientCache = clientCache; }