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
pathstringThe file path to read from
textstringThe 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
pathstringThe file path to write to (can be null to skip file writing)
contentEditorConfigContentThe EditorConfigContent to serialize
newLinestringThe line ending to use in the serialized output
Returns
- string
The serialized EditorConfig string