protected override void WriteScalar(ref ObjectContext objectContext, ScalarEventInfo scalar) { // TODO: if ParameterKey is written to an object, It will not serialized a tag scalar.Tag = null; scalar.IsPlainImplicit = true; base.WriteScalar(ref objectContext, scalar); }
public override void Emit(ScalarEventInfo eventInfo) { eventInfo.IsPlainImplicit = true; eventInfo.Style = ScalarStyle.Plain; var typeCode = eventInfo.SourceValue != null ? Type.GetTypeCode(eventInfo.SourceType) : TypeCode.Empty; switch (typeCode) { case TypeCode.String: case TypeCode.Char: eventInfo.Style = ScalarStyle.DoubleQuoted; break; case TypeCode.Empty: eventInfo.RenderedValue = "null"; break; } base.Emit(eventInfo); }
public override void Emit(ScalarEventInfo eventInfo) { events.Add(eventInfo); }
void IEventEmitter.Emit(ScalarEventInfo eventInfo) { emitter.Emit(new Scalar(eventInfo.Anchor, eventInfo.Tag, eventInfo.RenderedValue, eventInfo.Style, eventInfo.IsPlainImplicit, eventInfo.IsQuotedImplicit)); }
public virtual void Emit(ScalarEventInfo eventInfo) { nextEmitter.Emit(eventInfo); }