private void serialize <valueType>(ref valueType value, CharStream jsonStream, SerializeConfig config) { Config = config ?? DefaultConfig; CharStream.From(jsonStream); try { serialize(ref value); } finally { jsonStream.From(CharStream); } }
private SerializeWarning serialize <valueType>(valueType value, CharStream xmlStream, SerializeConfig config) { Config = config ?? DefaultConfig; CharStream.From(xmlStream); try { serialize(value); return(Warning); } finally { xmlStream.From(CharStream); } }
/// <summary> /// εΊεε /// </summary> /// <typeparam name="valueType"></typeparam> /// <param name="stream"></param> /// <param name="value"></param> internal void SerializeTcpServer <valueType>(ref valueType value, UnmanagedStream stream) //where valueType : struct { int index = stream.Data.CurrentIndex; if (forefatherCount != 0) { System.Array.Clear(forefather, 0, forefatherCount); forefatherCount = 0; } CharStream.From(stream); try { //Warning = SerializeWarning.None; TypeSerializer <valueType> .SerializeTcpServer(this, ref value); } finally { stream.From(CharStream); } if (((stream.Data.CurrentIndex - index) & 2) != 0) { stream.Write(' '); } }