Ejemplo n.º 1
0
 public IProxyContainer GetIServiceProxyContainer()
 {
     return(proxyContainer ?? (proxyContainer =
                                   overrides.ServiceProxyContainer != null
                                          ? overrides.ServiceProxyContainer(this)
                                          : new ProxyContainer(GetOutgoingMethodCallProcessor(), GetServiceProxyClassFactory())));
 }
 public IProxyContainer GetIServiceProxyContainer()
 {
     return proxyContainer ?? (proxyContainer =
                                      overrides.ServiceProxyContainer != null
                                          ? overrides.ServiceProxyContainer(this)
                                          : new ProxyContainer(GetOutgoingMethodCallProcessor(), GetServiceProxyClassFactory()));
 }
Ejemplo n.º 3
0
        public RpcClient(ITopologyLoader topologyLoader, TimeoutSettings defaultTimeout, RpcClientComponentOverrides componentOverrides = null)
        {
            topology            = topologyLoader.Load();
            this.defaultTimeout = defaultTimeout;
            var componentContainer = new RpcClientComponentContainer(this, componentOverrides ?? new RpcClientComponentOverrides());

            proxyContainer = componentContainer.GetIServiceProxyContainer();
        }
Ejemplo n.º 4
0
        public RpcClientServer(ITopologyLoader topologyLoader, TimeoutSettings defaultTimeout, ISettingsLoader settingsLoader, RpcComponentOverrides componentOverrides = null)
        {
            topology            = topologyLoader.Load();
            this.defaultTimeout = defaultTimeout;
            settings            = settingsLoader.LoadHostSettings();
            var componentContainer = new RpcClientServerComponentContainer(this, componentOverrides ?? new RpcComponentOverrides());

            logger = componentContainer.GetLogger();
            serviceImplementationContainer = componentContainer.GetServiceImplementationContainer();
            requestReceiver = componentContainer.GetRequestReceiverContainer().GetReceiver(settings.EndPoint.Protocol);
            proxyContainer  = componentContainer.GetIServiceProxyContainer();
        }
        public static object CreateCommandService(
            Type serviceType,
            IProxyContainer proxyContainer,
            IOptimizationPackage optPack)
        {
            var connectedProxy    = ProxyFactory.CreateConnectedCommandProxy(serviceType, optPack);
            var disconnectedProxy = ProxyFactory.CreateDisconnectedCommandProxy(serviceType, optPack);

            proxyContainer.AddProxyObject(connectedProxy);
            proxyContainer.AddProxyObject(disconnectedProxy);

            var commandInvokationEvaluator = new CommandsInvokationEvaluator(connectedProxy, disconnectedProxy);

            return(CreateCommandServiceObject(commandInvokationEvaluator, serviceType, optPack));
        }
Ejemplo n.º 6
0
 public ProxyDisposerInterceptor(IProxyContainer proxyContainer)
 {
     this.proxyContainer = proxyContainer;
 }