public void Write(object value, ProtoWriter dest) { if (wellKnown) { BclHelpers.WriteTimestamp((DateTime)value, dest); } else if (includeKind) { BclHelpers.WriteDateTimeWithKind((DateTime)value, dest); } else { BclHelpers.WriteDateTime((DateTime)value, dest); } }
public void Write(ref ProtoWriter.State state, object value) { if (wellKnown) { BclHelpers.WriteTimestamp(ref state, (DateTime)value); } else if (includeKind) { BclHelpers.WriteDateTimeWithKind(ref state, (DateTime)value); } else { BclHelpers.WriteDateTime(ref state, (DateTime)value); } }