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 IServiceProxyClassFactory GetServiceProxyClassFactory() { return(serviceProxyClassFactory ?? (serviceProxyClassFactory = overrides.ServiceProxyClassFactory != null ? overrides.ServiceProxyClassFactory(this) : new ServiceProxyClassFactory(GetServiceDescriptionBuilder(), GetCodecContainer()))); }
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 ServiceProxyContainer(IOutgoingMethodCallProcessor processor, IServiceProxyClassFactory factory) { this.processor = processor; this.factory = factory; proxySets = new ConcurrentDictionary <Type, object>(); }
public IServiceProxyClassFactory GetServiceProxyClassFactory() { return serviceProxyClassFactory ?? (serviceProxyClassFactory = overrides.ServiceProxyClassFactory != null ? overrides.ServiceProxyClassFactory(this) : new ServiceProxyClassFactory(GetServiceDescriptionBuilder(), GetCodecContainer())); }