Class GitConfigFileHelper
- Namespace
- SunamoGitConfig
- Assembly
- SunamoGitConfig.dll
Helper class for working with Git configuration files
public class GitConfigFileHelper : BlockNames
- Inheritance
-
GitConfigFileHelper
- Inherited Members
- Extension Methods
Methods
Format(string)
Formats Git configuration content by ensuring proper indentation
public static string Format(string content)
Parameters
contentstringThe Git configuration content to format
Returns
- string
Formatted Git configuration content
Load(string)
Loads and parses a Git configuration file
public static ExistsNonExistsListGitConfig Load(string path)
Parameters
pathstringThe path to the Git configuration file
Returns
- ExistsNonExistsListGitConfig
Parsed Git configuration data
Parse(string)
Parses Git configuration file content
public static ExistsNonExistsListGitConfig Parse(string content)
Parameters
contentstringThe content of the Git configuration file
Returns
- ExistsNonExistsListGitConfig
Parsed Git configuration data with existing and non-existing sections
ParseBlocks(string)
Parses and returns only the block headers from Git configuration content
public static List<string> ParseBlocks(string text)
Parameters
textstringThe Git configuration file content
Returns
Save(string, ExistsNonExistsListGitConfig)
Saves Git configuration data to a file
public static void Save(string path, ExistsNonExistsListGitConfig config)
Parameters
pathstringThe file path where to save the configuration
configExistsNonExistsListGitConfigThe Git configuration data to save