Exemple #1
0
        new public static Literal Read(BinaryReader reader)
        {
            var token = reader.ReadChar();

            switch (token)
            {
            case LiteralIdRegistry.BooleanLiteral: return(BooleanLiteral.Read(reader));

            case LiteralIdRegistry.StringLiteral: return(StringLiteral.Read(reader));

            case LiteralIdRegistry.NumberLiteral: return(NumberLiteral.Read(reader));

            case LiteralIdRegistry.EnumLiteral: return(EnumLiteral.Read(reader));

            case LiteralIdRegistry.BlobLiteral: return(BlobLiteral.Read(reader));
            }
            throw new InvalidDataException();
        }
Exemple #2
0
 protected override void WriteLiteral(BinaryWriter writer)
 {
     BooleanLiteral.Write(this, writer);
 }
Exemple #3
0
 public static void Write(BooleanLiteral l, BinaryWriter writer)
 {
     writer.Write(l.BooleanValue);
 }