private static void WriteOrSerializeInner <T>(T val, BinaryTokenStreamWriter writer) where T : class { if (val == null) { writer.WriteNull(); } else { SerializationManager.SerializeInner(val, writer, val.GetType()); } }
/// <summary> /// Serialize the event sequence token. /// </summary> /// <param name="untypedInput">The object to serialize.</param> /// <param name="writer">The writer to write the binary stream to.</param> /// <param name="expected">The expected type.</param> public static void Serialize(object untypedInput, BinaryTokenStreamWriter writer, Type expected) { var typed = untypedInput as EventSequenceTokenV2; if (typed == null) { writer.WriteNull(); return; } writer.Write(typed.SequenceNumber); writer.Write(typed.EventIndex); }
public void Serialize(object item, BinaryTokenStreamWriter writer, Type expectedType) { SerializeCalled = true; writer.WriteNull(); }