public IRawHandlerFactory GetServiceMethodDelegateFactory()
 {
     return(rawHandlerFactory ?? (rawHandlerFactory =
                                      overrides.ServiceMethodDelegateFactory != null
                                                 ? overrides.ServiceMethodDelegateFactory(this)
                                                 : new RawHandlerFactory(GetCodecContainer())));
 }
예제 #2
0
 public GenericHandler(ICodecContainer codecContainer, IRawHandlerFactory delegateFactory, IReadOnlyList <ServiceDescription> serviceDescriptionChain, MethodDescription methodDescription, ServicePath servicePath)
 {
     rawHandlers           = new ConcurrentDictionary <TypesKey, IHandler>();
     createRawHandler      = delegateFactory.CreateGenericClass(serviceDescriptionChain, methodDescription, servicePath);
     genericParameterCount = methodDescription.GenericParameters.Count;
     typeCodec             = codecContainer.GetManualCodecFor <Type>();
 }
예제 #3
0
 public GenericHandler(ICodecContainer codecContainer, IRawHandlerFactory delegateFactory, IReadOnlyList<ServiceDescription> serviceDescriptionChain, MethodDescription methodDescription, ServicePath servicePath)
 {
     rawHandlers = new ConcurrentDictionary<TypesKey, IHandler>();
     createRawHandler = delegateFactory.CreateGenericClass(serviceDescriptionChain, methodDescription, servicePath);
     genericParameterCount = methodDescription.GenericParameters.Count;
     typeCodec = codecContainer.GetManualCodecFor<Type>();
 }
        public void Setup()
        {
            var serviceDescriptionBuilder = new ServiceDescriptionBuilder(new MethodDescriptionBuilder());

            codecContainer           = new CodecContainer();
            factory                  = new RawHandlerFactory(codecContainer);
            service                  = Substitute.For <IGlobalService>();
            globalServiceDescription = serviceDescriptionBuilder.Build(typeof(IGlobalService));
        }
 public IRawHandlerFactory GetServiceMethodDelegateFactory()
 {
     return rawHandlerFactory ?? (rawHandlerFactory =
                                             overrides.ServiceMethodDelegateFactory != null
                                                 ? overrides.ServiceMethodDelegateFactory(this)
                                                 : new RawHandlerFactory(GetCodecContainer()));
 }
예제 #6
0
 public HandlerFactory(ICodecContainer codecContainer, IRawHandlerFactory rawHandlerFactory)
 {
     this.codecContainer    = codecContainer;
     this.rawHandlerFactory = rawHandlerFactory;
 }