Example #1
0
        public override void Write(ref ProtoWriter.State state, object value)
        {
            bool isFirst = Interlocked.Increment(ref _serializeCount) == 1;

            if (isFirst)
            {
                RuntimeTypeModel.OnDebugLog("Pre first write", typeof(T));
            }
            state.WriteBaseType <TBase>(TypeHelper <T> .FromObject(value));
            if (isFirst)
            {
                RuntimeTypeModel.OnDebugLog("Post first write", typeof(T));
            }
        }
Example #2
0
        void ISerializer <T> .Write(ref ProtoWriter.State state, T value)
        {
            bool isFirst = Interlocked.Increment(ref _serializeCount) == 1;

            if (isFirst)
            {
                RuntimeTypeModel.OnDebugLog("Pre first write", typeof(T));
            }
            state.WriteBaseType <TBase>(value);
            if (isFirst)
            {
                RuntimeTypeModel.OnDebugLog("Post first write", typeof(T));
            }
        }
Example #3
0
 public override void Write(ref ProtoWriter.State state, object value)
 {
     state.WriteBaseType <TBase>(TypeHelper <T> .FromObject(value));
 }
Example #4
0
 void ISerializer <T> .Write(ref ProtoWriter.State state, T value)
 {
     state.WriteBaseType <TBase>(value);
 }
Example #5
0
 public override void Write(ref ProtoWriter.State state, T value)
 => state.WriteBaseType <TBase>(value);