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); }
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(); }
public RpcClientServerComponentContainer(IRpcClientServer clientServer, RpcComponentOverrides overrides) : base(clientServer, overrides) { this.clientServer = clientServer; this.overrides = overrides; }
public void Setup() { rpcClientServer = Substitute.For <IRpcClientServer>(); serviceDescriptionBuilder = new ServiceDescriptionBuilder(new MethodDescriptionBuilder()); }
public void Initialize(IRpcClientServer clientServer, IReadOnlyDictionary<string, string> settings, string scope) { State = ServiceImplementationState.Running; }