public void Setup() { processor = Substitute.For <IOutgoingRequestProcessor>(); factory = Substitute.For <IProxyFactory>(); factory.CreateProxy <IMyService>().Returns((p, s, t) => new MyServiceProxy(p, s, t)); container = new ProxyContainer(processor, factory); }
public IOutgoingRequestProcessor GetOutgoingMethodCallProcessor() { return(outgoingRequestProcessor ?? (outgoingRequestProcessor = overrides.OutgoingMethodCallProcessor != null ? overrides.OutgoingMethodCallProcessor(this) : new OutgoingRequestProcessor(client.Topology, GetRequestSenderContainer(), GetCodecContainer()))); }
public void Setup() { serviceDescriptionBuilder = new ServiceDescriptionBuilder(new MethodDescriptionBuilder()); codecContainer = new CodecContainer(); requestProcessor = Substitute.For <IOutgoingRequestProcessor>(); factory = new ProxyFactory(serviceDescriptionBuilder, codecContainer); }
public MyServiceProxy(IOutgoingRequestProcessor processor, string scope, TimeoutSettings timeoutSettings) { Processor = processor; Scope = scope; TimeoutSettings = timeoutSettings; }
public void Setup() { processor = Substitute.For<IOutgoingRequestProcessor>(); factory = Substitute.For<IProxyFactory>(); factory.CreateProxy<IMyService>().Returns((p, s, t) => new MyServiceProxy(p, s, t)); container = new ProxyContainer(processor, factory); }
public IOutgoingRequestProcessor GetOutgoingMethodCallProcessor() { return outgoingRequestProcessor ?? (outgoingRequestProcessor = overrides.OutgoingMethodCallProcessor != null ? overrides.OutgoingMethodCallProcessor(this) : new OutgoingRequestProcessor(client.Topology, GetRequestSenderContainer(), GetCodecContainer())); }
public ProxyContainer(IOutgoingRequestProcessor processor, IProxyFactory factory) { this.processor = processor; this.factory = factory; proxySets = new ConcurrentDictionary <Type, object>(); }
public ProxySet(IOutgoingRequestProcessor processor, Func <IOutgoingRequestProcessor, string, TimeoutSettings, T> constructor) { this.processor = processor; this.constructor = constructor; scopedProxies = new ConcurrentDictionary <ProxyKey, T>(); }