Exemple #1
0
        public RpcNode(RpcActor localActor,
                       IActorDirectory actorDirectory,
                       IServiceCatalogProvider serviceCatalog,
                       IServiceDirectory serviceDirectory,
                       IServiceProxyGenerator proxyGenerator,
                       RpcMethodFixture methodFixture)
            : base(localActor)
        {
            if (actorDirectory == null)
            {
                throw new ArgumentNullException("actorDirectory");
            }
            if (serviceCatalog == null)
            {
                throw new ArgumentNullException("serviceCatalog");
            }
            if (serviceDirectory == null)
            {
                throw new ArgumentNullException("serviceDirectory");
            }
            if (proxyGenerator == null)
            {
                throw new ArgumentNullException("proxyGenerator");
            }
            if (methodFixture == null)
            {
                throw new ArgumentNullException("methodFixture");
            }

            _actorDirectory   = actorDirectory;
            _serviceCatalog   = serviceCatalog;
            _serviceDirectory = serviceDirectory;
            _proxyGenerator   = proxyGenerator;
            _methodFixture    = methodFixture;
        }
Exemple #2
0
 public RpcClient(RpcActor localActor, IActorDirectory actorDirectory, IServiceProxyGenerator proxyGenerator)
     : this(localActor, actorDirectory, proxyGenerator,
            new RpcMethodFixture(
                new MethodLocatorExtractor(),
                new MethodArgumentEncoder(RpcActor.DefaultObjectEncoder),
                new MethodArgumentDecoder(RpcActor.DefaultObjectDecoder)))
 {
 }
Exemple #3
0
        public RpcClient(RpcActor localActor, IRateLimiter rateLimiter, IActorDirectory actorDirectory, IServiceProxyGenerator proxyGenerator, RpcMethodFixture methodFixture)
            : base(localActor, rateLimiter)
        {
            if (actorDirectory == null)
            {
                throw new ArgumentNullException("actorDirectory");
            }
            if (proxyGenerator == null)
            {
                throw new ArgumentNullException("proxyGenerator");
            }
            if (methodFixture == null)
            {
                throw new ArgumentNullException("methodFixture");
            }

            _actorDirectory = actorDirectory;
            _proxyGenerator = proxyGenerator;
            _methodFixture  = methodFixture;
        }
Exemple #4
0
 public ServiceProxy(IServiceProxyGenerator generator, IRemoteServiceCaller remoteServiceCaller)
 {
     _serviceProxyTypes   = generator.GetGeneratedServiceProxyTypes().ToList();
     _remoteServiceCaller = remoteServiceCaller;
 }
Exemple #5
0
 public RpcClient(ILogger <RpcClient> logger, NetworkClient client, IServiceProxyGenerator serviceProxyGenerator)
 {
     this.serviceProxyGenerator = serviceProxyGenerator;
     this.logger   = logger;
     networkClient = client;
 }