Ejemplo n.º 1
0
        private void writeNamesHeader(BinaryWriter writer)
        {
            // count
            BinaryWriterTools.WriteNumber(_names.Items.Count, writer);

            // Items
            foreach (string name in _names.Items)
            {
                BinaryWriterTools.WriteString(name, writer);
            }
        }
Ejemplo n.º 2
0
        private void writeTypesHeader(BinaryWriter writer)
        {
            // count
            BinaryWriterTools.WriteNumber(_types.Items.Count, writer);

            // Items
            foreach (Type type in _types.Items)
            {
                string typeName = _typeNameConverter.ConvertToTypeName(type);
                BinaryWriterTools.WriteString(typeName, writer);
            }
        }
Ejemplo n.º 3
0
 public override void Write(BinaryWriter writer)
 {
     BinaryWriterTools.WriteValue(Data, writer);
 }
Ejemplo n.º 4
0
 public override void Write(BinaryWriter writer)
 {
     BinaryWriterTools.WriteNumbers(Data, writer);
 }
Ejemplo n.º 5
0
 /// <summary>
 ///   Writes an array of numbers. It saves numbers with the least required bytes
 /// </summary>
 /// <param name = "numbers"></param>
 public void WriteNumbers(int[] numbers)
 {
     BinaryWriterTools.WriteNumbers(numbers, _writer);
 }
Ejemplo n.º 6
0
 /// <summary>
 ///   Writes an integer. It saves the number with the least required bytes
 /// </summary>
 /// <param name = "number"></param>
 public void WriteNumber(int number)
 {
     BinaryWriterTools.WriteNumber(number, _writer);
 }
Ejemplo n.º 7
0
 /// <summary>
 ///   Writes a simple value (value of a simple property)
 /// </summary>
 /// <param name = "value"></param>
 public void WriteValue(object value)
 {
     BinaryWriterTools.WriteValue(value, _writer);
 }
Ejemplo n.º 8
0
 /// <summary>
 ///   Writes property name
 /// </summary>
 /// <param name = "name"></param>
 public void WriteName(string name)
 {
     BinaryWriterTools.WriteString(name, _writer);
 }