Table of Contents

Class MascBlock

Namespace
SunamoEditorConfig
Assembly
SunamoEditorConfig.dll

Represents a MASC (Match And Settings Configuration) block in an EditorConfig file A MASC block starts with a pattern like [*.cs] and contains settings for matching files

public class MascBlock : RootBlock
Inheritance
MascBlock
Inherited Members
Extension Methods

Constructors

MascBlock(string, List<Definition>)

Initializes a new instance of the MascBlock class

public MascBlock(string validFor, List<Definition> definitions)

Parameters

validFor string

The file pattern this block is valid for (e.g., "*.cs")

definitions List<Definition>

The list of settings definitions for matching files

Methods

IsLineWithMasc(string)

Checks if a line represents the start of a MASC block (enclosed in square brackets)

public static bool IsLineWithMasc(string text)

Parameters

text string

The line text to check

Returns

bool

True if the line is a MASC block header, false otherwise

Parse(string)

Parses a text block into a MascBlock object

public static ResultWithExceptionEditorConfig<MascBlock> Parse(string block)

Parameters

block string

The text block containing the MASC block definition

Returns

ResultWithExceptionEditorConfig<MascBlock>

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

ToString()

Converts the MascBlock to its string representation in EditorConfig format

public override string ToString()

Returns

string

The EditorConfig formatted string