예제 #1
0
 /// <summary>
 /// Converts the given <paramref name="data"/> to it's byte array representation.
 /// Structs are some kind of container used to store other python objects. Each substruct only supports one element
 /// in it's definition.
 ///
 /// The following opcodes are supported
 /// <seealso cref="Opcode.SubStruct" /> 1 byte + encoded python type
 /// </summary>
 /// <param name="writer">Where to write the encoded data to</param>
 /// <param name="data">The value to write</param>
 private static void ProcessSubStruct(BinaryWriter writer, PySubStruct data)
 {
     writer.WriteOpcode(Opcode.SubStruct);
     Process(writer, data.Definition);
 }