Table of Contents

Class EditorConfigHelper

Namespace
SunamoEditorConfig
Assembly
SunamoEditorConfig.dll

Provides helper methods for serializing and deserializing EditorConfig files

public static class EditorConfigHelper
Inheritance
EditorConfigHelper
Inherited Members

Methods

Deserialize(string, string?)

Deserializes an EditorConfig file from a path or text content

public static ResultWithExceptionEditorConfig<EditorConfigContent> Deserialize(string path, string? text)

Parameters

path string

The file path to read from

text string

The text content to parse (if null, reads from path)

Returns

ResultWithExceptionEditorConfig<EditorConfigContent>

A result containing the parsed EditorConfigContent or an exception if parsing fails

Serialize(string, EditorConfigContent, string)

Serializes EditorConfigContent to a string and optionally writes it to a file

public static string Serialize(string path, EditorConfigContent content, string newLine)

Parameters

path string

The file path to write to (can be null to skip file writing)

content EditorConfigContent

The EditorConfigContent to serialize

newLine string

The line ending to use in the serialized output

Returns

string

The serialized EditorConfig string