コード例 #1
0
ファイル: Expression.cs プロジェクト: yongaru/fuse-studio
        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();
        }
コード例 #2
0
ファイル: Expressions.cs プロジェクト: yongaru/fuse-studio
 public static void Write(Instantiate o, BinaryWriter writer)
 {
     o.WriteExpression(writer);
 }