Exemple #1
0
 private static void WriteProperty(BinaryWriter writer, BVProperty data)
 {
     if (data.Value.GetType() == typeof(BVPropertyCollection))
     {
         writer.Write((byte)0x00);
         WriteString(writer, data.Key);
         WritePropertyArray(writer, (BVPropertyCollection)data.Value);
         writer.Write((byte)0x08);
     }
     else if (data.Value.GetType() == typeof(BVStringToken))
     {
         writer.Write((byte)0x01);
         WriteString(writer, data.Key);
         WriteString(writer, ((BVStringToken)data.Value).Value);
     }
     else if (data.Value.GetType() == typeof(BVInt32Token))
     {
         writer.Write((byte)0x02);
         WriteString(writer, data.Key);
         writer.Write(((BVInt32Token)data.Value).Value);
     }
     else if (data.Value.GetType() == typeof(BVSingleToken))
     {
         writer.Write((byte)0x03);
         WriteString(writer, data.Key);
         writer.Write(((BVSingleToken)data.Value).Value);
     }
     else if (data.Value.GetType() == typeof(BVUInt64Token))
     {
         writer.Write((byte)0x07);
         WriteString(writer, data.Key);
         writer.Write(((BVUInt64Token)data.Value).Value);
     }
     else
     {
         throw new Exception(string.Format("Unknown Type {0}", data.GetType().ToString()));
     }
 }
Exemple #2
0
 public void Add(BVProperty vProperty)
 {
     Properties.Add(vProperty);
     NumericMemo = null; // we don't know anymore
 }