Example #1
0
 public ServiceImplementationFactory(IServiceDescriptionBuilder serviceDescriptionBuilder, IRpcClientServer clientServer,
                                     IEnumerable <InterfaceImplementationTypePair> interfaceImplementationTypePairs)
 {
     this.serviceDescriptionBuilder = serviceDescriptionBuilder;
     this.clientServer = clientServer;
     constructors      = new ConcurrentDictionary <string, ImplementationCreationInfo>(interfaceImplementationTypePairs.Select(ConvertPair));
 }
 public ServiceImplementationFactory(IServiceDescriptionBuilder serviceDescriptionBuilder, IRpcClientServer clientServer, 
     IEnumerable<InterfaceImplementationTypePair> interfaceImplementationTypePairs)
 {
     this.serviceDescriptionBuilder = serviceDescriptionBuilder;
     this.clientServer = clientServer;
     constructors = new ConcurrentDictionary<string, ImplementationCreationInfo>(interfaceImplementationTypePairs.Select(ConvertPair));
 }
 public IncomingRequestProcessor(IRpcClientServer clientServer, IServiceImplementationContainer serviceImplementationContainer, 
     IServiceMethodHandlerContainer serviceMethodHandlerContainer, ICodecContainer codecContainer)
 {
     this.clientServer = clientServer;
     this.logger = clientServer.Logger;
     this.serviceImplementationContainer = serviceImplementationContainer;
     this.serviceMethodHandlerContainer = serviceMethodHandlerContainer;
     exceptionCodec = codecContainer.GetManualCodecFor<Exception>();
 }
 private static object InvokeConstructor(ConstructorInfo constructor, IRpcClientServer clientServer, string scope)
 {
     var arguments = constructor.GetParameters().Select(x =>
         {
             var paramType = x.ParameterType;
             if (paramType == typeof(string))
                 return (object)scope;
             if (paramType == typeof(IRpcClient) || paramType == typeof(IRpcClientServer))
                 return (object)clientServer;
             throw new InvalidOperationException("Should never happen");
         }).ToArray();
     return constructor.Invoke(arguments);
 }
Example #5
0
        private static object InvokeConstructor(ConstructorInfo constructor, IRpcClientServer clientServer, string scope)
        {
            var arguments = constructor.GetParameters().Select(x =>
            {
                var paramType = x.ParameterType;
                if (paramType == typeof(string))
                {
                    return((object)scope);
                }
                if (paramType == typeof(IRpcClient) || paramType == typeof(IRpcClientServer))
                {
                    return((object)clientServer);
                }
                throw new InvalidOperationException("Should never happen");
            }).ToArray();

            return(constructor.Invoke(arguments));
        }
 public ReversedCompleteService(string scope, IRpcClientServer clientServer)
 {
     ClientServer = clientServer;
     Scope = scope;
 }
 public CompleteService(IRpcClientServer clientServer, string scope)
 {
     ClientServer = clientServer;
     Scope = scope;
 }
 public ClientServerOnlyServer(IRpcClientServer clientServer)
 {
     ClientServer = clientServer;
 }
 public void Setup()
 {
     rpcClientServer = Substitute.For<IRpcClientServer>();
     serviceDescriptionBuilder = new ServiceDescriptionBuilder(new MethodDescriptionBuilder());
 }
 public void Initialize(IRpcClientServer clientServer, IReadOnlyDictionary<string, string> settings, string scope)
 {
     throw new NotImplementedException();
 }
Example #11
0
 public CompleteService(IRpcClientServer clientServer, string scope)
 {
     ClientServer = clientServer;
     Scope        = scope;
 }
 public RpcClientServerComponentContainer(IRpcClientServer clientServer, RpcComponentOverrides overrides)
     : base(clientServer, overrides)
 {
     this.clientServer = clientServer;
     this.overrides = overrides;
 }
Example #13
0
 public void Setup()
 {
     rpcClientServer           = Substitute.For <IRpcClientServer>();
     serviceDescriptionBuilder = new ServiceDescriptionBuilder(new MethodDescriptionBuilder());
 }
Example #14
0
 public ReversedCompleteService(string scope, IRpcClientServer clientServer)
 {
     ClientServer = clientServer;
     Scope        = scope;
 }
Example #15
0
 public void Initialize(IRpcClientServer clientServer, IReadOnlyDictionary<string, string> settings, string scope)
 {
     State = ServiceImplementationState.Running;
 }
Example #16
0
 public RpcClientServerComponentContainer(IRpcClientServer clientServer, RpcComponentOverrides overrides)
     : base(clientServer, overrides)
 {
     this.clientServer = clientServer;
     this.overrides    = overrides;
 }
Example #17
0
 public ClientServerOnlyServer(IRpcClientServer clientServer)
 {
     ClientServer = clientServer;
 }