/// <summary> /// Renders the specified NDC item and appends it to the specified <see cref="StringBuilder" />. /// </summary> /// <param name="builder">The <see cref="StringBuilder"/> to append the rendered data to.</param> /// <param name="logEvent">Logging event.</param> protected internal override void Append(StringBuilder builder, LogEventInfo logEvent) { string msg; if (TopFrames != -1) { msg = NDC.GetTopMessages(TopFrames, Separator); } else if (BottomFrames != -1) { msg = NDC.GetBottomMessages(BottomFrames, Separator); } else { msg = NDC.GetAllMessages(Separator); } builder.Append(ApplyPadding(msg)); }