Beispiel #1
0
        new public static Expression _Read(BinaryReader reader)
        {
            var c = reader.ReadChar();

            switch (c)
            {
            case ExpressionIdRegistry.ReadVariable: return(ReadVariable.Read(reader));

            case ExpressionIdRegistry.Literal: return(Literal.Read(reader));

            case ExpressionIdRegistry.Lambda: return(Lambda.Read(reader));

            case ExpressionIdRegistry.MethodGroup: return(MethodGroup.Read(reader));

            case ExpressionIdRegistry.IsType: return(IsType.Read(reader));

            case ExpressionIdRegistry.LogicalOr: return(LogicalOr.Read(reader));

            case ExpressionIdRegistry.Instantiate: return(Instantiate.Read(reader));

            case ExpressionIdRegistry.CallLambda: return(CallLambda.Read(reader));

            case ExpressionIdRegistry.CallStaticMethod: return(CallStaticMethod.Read(reader));

            case ExpressionIdRegistry.CallDynamicMethod: return(CallDynamicMethod.Read(reader));

            case ExpressionIdRegistry.ReadStaticField: return(ReadStaticField.Read(reader));

            case ExpressionIdRegistry.ReadProperty: return(ReadProperty.Read(reader));

            case ExpressionIdRegistry.WriteProperty: return(WriteProperty.Read(reader));

            case ExpressionIdRegistry.AddEventHandler: return(AddEventHandler.Read(reader));

            case ExpressionIdRegistry.RemoveEventHandler: return(RemoveEventHandler.Read(reader));
            }
            throw new InvalidDataException();
        }
Beispiel #2
0
 public static void Write(ReadProperty o, BinaryWriter writer)
 {
     o.WriteExpression(writer);
 }