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);
 }
Пример #2
0
 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 MyServiceProxy(IOutgoingRequestProcessor processor, string scope, TimeoutSettings timeoutSettings)
 {
     Processor       = processor;
     Scope           = scope;
     TimeoutSettings = timeoutSettings;
 }
 public IOutgoingRequestProcessor GetOutgoingMethodCallProcessor()
 {
     return outgoingRequestProcessor ?? (outgoingRequestProcessor =
                                            overrides.OutgoingMethodCallProcessor != null
                                                ? overrides.OutgoingMethodCallProcessor(this)
                                                : new OutgoingRequestProcessor(client.Topology, GetRequestSenderContainer(), GetCodecContainer()));
 }
Пример #8
0
 public ProxyContainer(IOutgoingRequestProcessor processor, IProxyFactory factory)
 {
     this.processor = processor;
     this.factory   = factory;
     proxySets      = new ConcurrentDictionary <Type, object>();
 }
Пример #9
0
 public ProxySet(IOutgoingRequestProcessor processor, Func <IOutgoingRequestProcessor, string, TimeoutSettings, T> constructor)
 {
     this.processor   = processor;
     this.constructor = constructor;
     scopedProxies    = new ConcurrentDictionary <ProxyKey, T>();
 }