public MemberBindingCodec(MemberBindingCollectionCodec memberBindingCollectionCodec, ExpressionCodec expressionCodec, ICodecContainer codecContainer) { memberBindingTypeCodec = codecContainer.GetManualCodecFor <MemberBindingType>(); memberAssignmentCodec = new MemberAssignmentCodec(expressionCodec, codecContainer); memberListBindingCodec = new MemberListBindingCodec(codecContainer); memberMemberBindingCodec = new MemberMemberBindingCodec(memberBindingCollectionCodec, codecContainer); }
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 NewExpressionSubcodec(ExpressionCodec commonCodec, ICodecContainer codecContainer) : base(commonCodec, codecContainer) { constructorInfoCodec = codecContainer.GetManualCodecFor <ConstructorInfo>(); expressionArrayCodec = codecContainer.GetManualCodecFor <Expression[]>(); memberInfoArrayCodec = codecContainer.GetManualCodecFor <MemberInfo[]>(); }
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 IncomingRequestProcessor(ILogger logger, IServiceImplementationContainer serviceImplementationContainer, IHandlerContainer handlerContainer, ICodecContainer codecContainer) { this.logger = logger; this.serviceImplementationContainer = serviceImplementationContainer; this.handlerContainer = handlerContainer; exceptionCodec = codecContainer.GetManualCodecFor<Exception>(); }
public IncomingRequestProcessor(ILogger logger, IServiceImplementationContainer serviceImplementationContainer, IHandlerContainer handlerContainer, ICodecContainer codecContainer) { this.logger = logger; this.serviceImplementationContainer = serviceImplementationContainer; this.handlerContainer = handlerContainer; exceptionCodec = codecContainer.GetManualCodecFor <Exception>(); }
public void Setup() { stringCodec = new ManualCodec <string>(new StringCodec()); var codecContainer = Substitute.For <ICodecContainer>(); codecContainer.GetManualCodecFor <string>().Returns(stringCodec); exceptionCodec = new ExceptionCodec(codecContainer); }
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>(); }
public MemberInfoCodec(ICodecContainer codecContainer) { memberTypesCodec = codecContainer.GetManualCodecFor <MemberTypes>(); constructorInfoCodec = codecContainer.GetManualCodecFor <ConstructorInfo>(); eventInfoCodec = codecContainer.GetManualCodecFor <EventInfo>(); fieldInfoCodec = codecContainer.GetManualCodecFor <FieldInfo>(); methodInfoCodec = codecContainer.GetManualCodecFor <MethodInfo>(); propertyInfoCodec = codecContainer.GetManualCodecFor <PropertyInfo>(); }
public static bool TryDecodeSingle <T>(this IManualCodec <T> codec, byte[] data, out T value) { try { value = codec.DecodeSingle(data); return(true); } catch { value = default(T); return(false); } }
public static byte[] EncodeSingle <T>(this IManualCodec <T> codec, T value) { var data = new byte[codec.CalculateSize(value)]; fixed(byte *pData = data) { var p = pData; codec.Encode(ref p, value); } return(data); }
public static T DecodeSingle <T>(this IManualCodec <T> codec, byte[] data) { T result; fixed(byte *pData = data) { var p = pData; int remainingBytes = data.Length; result = codec.Decode(ref p, ref remainingBytes, false); } return(result); }
public ExpressionCodec(ICodecContainer codecContainer) { expressionTypeCodec = codecContainer.GetManualCodecFor <ExpressionType>(); binarySubcodec = new BinaryExpressionSubcodec(this, codecContainer); blockSubcodec = new BlockExpressionSubcodec(this, codecContainer); conditionalSubcodec = new ConditionalExpressionSubcodec(this, codecContainer); constantSubcodec = new ConstantExpressionSubcodec(this, codecContainer); invocationSubcodec = new InvocationExpressionSubcodec(this, codecContainer); lambdaSubcodec = new LambdaExpressionSubcodec(this, codecContainer); listInitSubcodec = new ListInitExpressionSubcodec(this, codecContainer); memberSubcodec = new MemberExpressionSubcodec(this, codecContainer); var memberBindingCollectionCodec = new MemberBindingCollectionCodec(this, codecContainer); memberInitSubcodec = new MemberInitExpressionSubcodec(this, memberBindingCollectionCodec, codecContainer); methodCallSubcodec = new MethodCallExpressionSubcodec(this, codecContainer); newArrayBoundsSubcodec = new NewArrayBoundsExpressionSubcodec(this, codecContainer); newArrayInitSubcodec = new NewArrayInitExpressionSubcodec(this, codecContainer); newSubcodec = new NewExpressionSubcodec(this, codecContainer); parameterSubcodec = new ParameterExpressionSubcodec(this, codecContainer); typeEqualSubcodec = new TypeEqualExpressionSubcodec(this, codecContainer); typeIsSubcodec = new TypeIsExpressionSubcodec(this, codecContainer); unarySubcodec = new UnaryExpressionSubcodec(this, codecContainer); }
protected MethodBaseCodecBase(ICodecContainer codecContainer) : base(codecContainer) { typeArrayCodec = codecContainer.GetManualCodecFor <Type[]>(); }
public AbstractManualCodecWrapper(IManualCodec <T> realCodec) { this.realCodec = realCodec; }
public NewArrayInitExpressionSubcodec(ExpressionCodec commonCodec, ICodecContainer codecContainer) : base(commonCodec, codecContainer) { typeCodec = codecContainer.GetManualCodecFor <Type>(); expressionArrayCodec = codecContainer.GetManualCodecFor <Expression[]>(); }
public override void Setup() { base.Setup(); codec = CreateCodec(); }
public OutgoingRequestProcessor(IReadOnlyDictionary<string, IServiceTopology> topology, IRequestSenderContainer requestSenderContainer, ICodecContainer codecContainer) { this.topology = topology; this.requestSenderContainer = requestSenderContainer; exceptionCodec = codecContainer.GetManualCodecFor<Exception>(); }
protected ExpressionSubcodecBase(ExpressionCodec commonCodec, ICodecContainer codecContainer) { CommonCodec = commonCodec; CodecContainer = codecContainer; ExpressionTypeCodec = codecContainer.GetManualCodecFor <ExpressionType>(); }
protected MemberInfoCodecBase(ICodecContainer codecContainer) { stringCodec = codecContainer.GetManualCodecFor <string>(); typeCodec = codecContainer.GetManualCodecFor <Type>(); }
public MemberBindingCollectionCodec(ExpressionCodec expressionCodec, ICodecContainer codecContainer) { memberBindingCodec = new MemberBindingCodec(this, expressionCodec, codecContainer); intCodec = codecContainer.GetManualCodecFor<int>(); }
public UnaryExpressionSubcodec(ExpressionCodec commonCodec, ICodecContainer codecContainer) : base(commonCodec, codecContainer) { typeCodec = codecContainer.GetManualCodecFor <Type>(); methodInfoCodec = codecContainer.GetManualCodecFor <MethodInfo>(); }
public MemberBindingCollectionCodec(ExpressionCodec expressionCodec, ICodecContainer codecContainer) { memberBindingCodec = new MemberBindingCodec(this, expressionCodec, codecContainer); intCodec = codecContainer.GetManualCodecFor <int>(); }
public ExceptionCodec(ICodecContainer codecContainer) { stringCodec = codecContainer.GetManualCodecFor <string>(); createException = CreateExceptionCreator(); }
public ListInitExpressionSubcodec(ExpressionCodec commonCodec, ICodecContainer codecContainer) : base(commonCodec, codecContainer) { elementInitArrayCodec = codecContainer.GetManualCodecFor <ElementInit[]>(); }
public BinaryExpressionSubcodec(ExpressionCodec commonCodec, ICodecContainer codecContainer) : base(commonCodec, codecContainer) { boolCodec = codecContainer.GetManualCodecFor <bool>(); methodInfoCodec = codecContainer.GetManualCodecFor <MethodInfo>(); }
public MemberExpressionSubcodec(ExpressionCodec commonCodec, ICodecContainer codecContainer) : base(commonCodec, codecContainer) { memberInfoCodec = codecContainer.GetManualCodecFor <MemberInfo>(); }
public TypeEqualExpressionSubcodec(ExpressionCodec commonCodec, ICodecContainer codecContainer) : base(commonCodec, codecContainer) { typeCodec = codecContainer.GetManualCodecFor <Type>(); }
public MemberListBindingCodec(ICodecContainer codecContainer) { memberInfoCodec = codecContainer.GetManualCodecFor <MemberInfo>(); elementInitArrayCodec = codecContainer.GetManualCodecFor <ElementInit[]>(); }
public ParameterExpressionSubcodec(ExpressionCodec commonCodec, ICodecContainer codecContainer) : base(commonCodec, codecContainer) { typeCodec = codecContainer.GetManualCodecFor <Type>(); stringCodec = codecContainer.GetManualCodecFor <string>(); }
public InvocationExpressionSubcodec(ExpressionCodec commonCodec, ICodecContainer codecContainer) : base(commonCodec, codecContainer) { expressionArrayCodec = codecContainer.GetManualCodecFor <Expression[]>(); }
public OutgoingMethodCallProcessor(IReadOnlyDictionary <string, IServiceTopology> topology, IRequestSenderContainer requestSenderContainer, ICodecContainer codecContainer) { this.topology = topology; this.requestSenderContainer = requestSenderContainer; exceptionCodec = codecContainer.GetManualCodecFor <Exception>(); }
public MethodCallExpressionSubcodec(ExpressionCodec commonCodec, ICodecContainer codecContainer) : base(commonCodec, codecContainer) { methodInfoCodec = codecContainer.GetManualCodecFor <MethodInfo>(); expressionArrayCodec = codecContainer.GetManualCodecFor <Expression[]>(); }
public IndexExpressionSubcodec(ExpressionCodec commonCodec, ICodecContainer codecContainer) : base(commonCodec, codecContainer) { propertyInfoCodec = codecContainer.GetManualCodecFor <PropertyInfo>(); expressionArrayCodec = codecContainer.GetManualCodecFor <Expression[]>(); }
public MemberAssignmentCodec(ExpressionCodec expressionCodec, ICodecContainer codecContainer) { this.expressionCodec = expressionCodec; memberInfoCodec = codecContainer.GetManualCodecFor <MemberInfo>(); }