public override void Encode(Stream outputStream) { if (outputStream == null || !outputStream.CanWrite) { return; } outputStream.WriteByte(Count); SimpleArray <ushort> .Encode(outputStream, DataSetWriterID, true); }
public void Encode(Stream outputStream) { if (outputStream == null || !outputStream.CanWrite) { return; } Name.Encode(outputStream); Description.Encode(outputStream); DataType.Encode(outputStream); BaseType.WriteToStream(outputStream, BitConverter.GetBytes(ValueRank)); SimpleArray <uint> .Encode(outputStream, ArrayDimension); BaseType.WriteToStream(outputStream, BitConverter.GetBytes(MaxStringLength)); BaseType.WriteToStream(outputStream, BitConverter.GetBytes(IsOptional)); }
public void Encode(Stream outputStream, bool withHeader = true) { if (outputStream == null || !outputStream.CanWrite) { return; } // 1. Name Name.Encode(outputStream); // 2. Description Description.Encode(outputStream); // 3. Field Flags Flags.Encode(outputStream); // 4. Built-in Type outputStream.WriteByte((byte)Type); // 5. DataType DataType.Encode(outputStream); // 6. Value Rank BaseType.WriteToStream(outputStream, BitConverter.GetBytes(ValueRank)); // 7. Array Dimension SimpleArray <uint> .Encode(outputStream, ArrayDimension); // 8. MaxStringLength BaseType.WriteToStream(outputStream, BitConverter.GetBytes(MaxStringLength)); // 9. FieldID BaseType.WriteToStream(outputStream, FieldID.ToByteArray()); // 10. Properties EncodeProperties(outputStream); }