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); }
public virtual void Emit(ScalarEventInfo eventInfo) { nextEmitter.Emit(eventInfo); }
void IEventEmitter.Emit(ScalarEventInfo eventInfo) { emitter.Emit(new Scalar(eventInfo.Anchor, eventInfo.Tag, eventInfo.RenderedValue, eventInfo.Style, eventInfo.IsPlainImplicit, eventInfo.IsQuotedImplicit)); }