Table of Contents

Class TFCsFormat

Namespace
SunamoDevCode
Assembly
SunamoDevCode.dll

Writes C# files with proper formatting: file-scoped namespace, sorted usings, and trimmed whitespace.

public class TFCsFormat
Inheritance
TFCsFormat
Inherited Members
Extension Methods

Methods

TrimWhiteSpaceRowFromEnd(List<string>)

Removes trailing whitespace-only lines from the end of the list.

public static void TrimWhiteSpaceRowFromEnd(List<string> lines)

Parameters

lines List<string>

List of lines to trim.

WriteAllLines(string, IEnumerable<string>)

Asynchronously writes lines to a C# file with proper formatting (file-scoped namespace, sorted usings).

public static Task WriteAllLines(string filePath, IEnumerable<string> lines)

Parameters

filePath string

Path to the file.

lines IEnumerable<string>

Lines to write.

Returns

Task

WriteAllLinesSync(string, IEnumerable<string>)

Synchronously writes lines to a C# file with proper formatting.

public static void WriteAllLinesSync(string filePath, IEnumerable<string> lines)

Parameters

filePath string

Path to the file.

lines IEnumerable<string>

Lines to write.

WriteAllText(string, string)

Asynchronously writes text to a C# file with proper formatting (file-scoped namespace, sorted usings).

public static Task WriteAllText(string filePath, string content)

Parameters

filePath string

Path to the file.

content string

Text content to write.

Returns

Task

WriteAllTextSync(string, string)

Synchronously writes text to a C# file with proper formatting.

public static void WriteAllTextSync(string filePath, string content)

Parameters

filePath string

Path to the file.

content string

Text content to write.