コード例 #1
0
 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);
 }
コード例 #2
0
 public IServiceProxyClassFactory GetServiceProxyClassFactory()
 {
     return(serviceProxyClassFactory ?? (serviceProxyClassFactory =
                                             overrides.ServiceProxyClassFactory != null
                                             ? overrides.ServiceProxyClassFactory(this)
                                             : new ServiceProxyClassFactory(GetServiceDescriptionBuilder(), GetCodecContainer())));
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 public ServiceProxyContainer(IOutgoingMethodCallProcessor processor, IServiceProxyClassFactory factory)
 {
     this.processor = processor;
     this.factory   = factory;
     proxySets      = new ConcurrentDictionary <Type, object>();
 }
コード例 #5
0
 public IServiceProxyClassFactory GetServiceProxyClassFactory()
 {
     return serviceProxyClassFactory ?? (serviceProxyClassFactory =
                                         overrides.ServiceProxyClassFactory != null
                                             ? overrides.ServiceProxyClassFactory(this)
                                             : new ServiceProxyClassFactory(GetServiceDescriptionBuilder(), GetCodecContainer()));
 }