public override void WriteToStream(GameMain.Editor.DataTableTools.DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter, string value)
 {
     //数组写之前 写入数组长度
     string[] array = Parse(value);
     binaryWriter.Write((Int32)array.Length);
     foreach (var s in array)
     {
         binaryWriter.Write(s);
     }
 }
Example #2
0
            public override void WriteToStream(GameMain.Editor.DataTableTools.DataTableProcessor dataTableProcessor, BinaryWriter binaryWriter, string value)
            {
                BinaryFormatter serializer = new BinaryFormatter();

                serializer.Serialize(binaryWriter.BaseStream, Parse(value)); //将对象序列化为内存流中
            }