public void Setup()
 {
     processor = Substitute.For <IOutgoingMethodCallProcessor>();
     factory   = Substitute.For <IServiceProxyClassFactory>();
     factory.CreateProxyClass <IMyService>().Returns((p, s, t) => new MyServiceProxy(p, s, t));
     container = new ServiceProxyContainer(processor, factory);
 }
 public void Setup()
 {
     serviceDescriptionBuilder = new ServiceDescriptionBuilder(new MethodDescriptionBuilder());
     codecContainer            = new CodecContainer();
     methodCallProcessor       = Substitute.For <IOutgoingMethodCallProcessor>();
     factory = new ServiceProxyClassFactory(serviceDescriptionBuilder, codecContainer);
 }
Beispiel #3
0
 public IOutgoingMethodCallProcessor GetOutgoingMethodCallProcessor()
 {
     return(outgoingMethodCallProcessor ?? (outgoingMethodCallProcessor =
                                                overrides.OutgoingMethodCallProcessor != null
                                                ? overrides.OutgoingMethodCallProcessor(this)
                                                : new OutgoingMethodCallProcessor(client.Topology, GetRequestSenderContainer(), GetCodecContainer())));
 }
 public MyServiceProxy(IOutgoingMethodCallProcessor processor, string scope)
 {
     Processor = processor;
     Scope = scope;
 }
 public void Setup()
 {
     processor = Substitute.For<IOutgoingMethodCallProcessor>();
     factory = Substitute.For<IServiceProxyClassFactory>();
     factory.CreateProxyClass<IMyService>().Returns((p, s) => new MyServiceProxy(p, s));
     container = new ServiceProxyContainer(processor, factory);
 }
 public MyServiceProxy(IOutgoingMethodCallProcessor processor, string scope, TimeoutSettings timeoutSettings)
 {
     Processor       = processor;
     Scope           = scope;
     TimeoutSettings = timeoutSettings;
 }
 public ServiceProxyContainer(IOutgoingMethodCallProcessor processor, IServiceProxyClassFactory factory)
 {
     this.processor = processor;
     this.factory   = factory;
     proxySets      = new ConcurrentDictionary <Type, object>();
 }
 public ProxySet(IOutgoingMethodCallProcessor processor, Func <IOutgoingMethodCallProcessor, string, TimeoutSettings, T> constructor)
 {
     this.processor   = processor;
     this.constructor = constructor;
     scopedProxies    = new ConcurrentDictionary <ProxyKey, T>();
 }
 public IOutgoingMethodCallProcessor GetOutgoingMethodCallProcessor()
 {
     return outgoingMethodCallProcessor ?? (outgoingMethodCallProcessor =
                                            overrides.OutgoingMethodCallProcessor != null
                                                ? overrides.OutgoingMethodCallProcessor(this)
                                                : new OutgoingMethodCallProcessor(client.Topology, GetRequestSenderContainer(), GetCodecContainer()));
 }
 public void Setup()
 {
     serviceDescriptionBuilder = new ServiceDescriptionBuilder(new MethodDescriptionBuilder());
     codecContainer = new CodecContainer();
     methodCallProcessor = Substitute.For<IOutgoingMethodCallProcessor>();
     factory = new ServiceProxyClassFactory(serviceDescriptionBuilder, codecContainer);
 }