Last active
October 8, 2021 07:07
-
-
Save gfraiteur/f403e9847858eb251016da5c095166b2 to your computer and use it in GitHub Desktop.
AppendProlog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Appends the indent string, context description, and the record kind to the current <see cref="StringBuilder"/>. | |
/// </summary> | |
protected virtual void AppendProlog() | |
{ | |
#if DEBUG | |
if ( this.StringBuilder != this.actionStringBuilder ) | |
throw new AssertionFailedException(); | |
#endif | |
this.AppendIndentString(); | |
int lengthBefore = this.StringBuilder.Length; | |
this.AppendContextDescription(); | |
if ( this.StringBuilder.Length > lengthBefore ) | |
{ | |
this.AppendDelimiter(); | |
} | |
if ( this.HasRecordKindName() ) | |
{ | |
this.AppendRecordKind(); | |
this.RequirePunctuation( ':' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment