PeanutButter
Loading...
Searching...
No Matches
PeanutButter.INI.BestEffortLineParser Class Reference

Provides the best-effort line parsing strategy - inherit from this to guide behavior, eg to set a custom comment delimiter or custom escaping of values, bearing in mind that doing so will probably make your ini file unreadable by other tooling. More...

Inheritance diagram for PeanutButter.INI.BestEffortLineParser:
PeanutButter.INI.ILineParser

Public Member Functions

IParsedLine Parse (string line)
 Attempts to parse a string to a structure which defines the parts of the line (key, value, comment, etc)

Static Public Attributes

const string DEFAULT_COMMENT_DELIMITER = ";"
 The default marker for the start of a comment.

Protected Member Functions

virtual string Unescape (string data, bool containsEscapedEntities)
 Un-escape a line.
string ApplyEscapeSequences (string data)
 Applies the escape sequences to an incoming data string and produces a new string.

Properties

virtual string CommentDelimiter [get, set]
 The marker used by this parser for the start of a comment.

Detailed Description

Provides the best-effort line parsing strategy - inherit from this to guide behavior, eg to set a custom comment delimiter or custom escaping of values, bearing in mind that doing so will probably make your ini file unreadable by other tooling.

Member Function Documentation

◆ ApplyEscapeSequences()

string PeanutButter.INI.BestEffortLineParser.ApplyEscapeSequences ( string data)
protected

Applies the escape sequences to an incoming data string and produces a new string.

Parameters
data
Returns

◆ Parse()

IParsedLine PeanutButter.INI.BestEffortLineParser.Parse ( string line)

Attempts to parse a string to a structure which defines the parts of the line (key, value, comment, etc)

Parameters
line
Returns

Implements PeanutButter.INI.ILineParser.

◆ Unescape()

virtual string PeanutButter.INI.BestEffortLineParser.Unescape ( string data,
bool containsEscapedEntities )
protectedvirtual

Un-escape a line.

Parameters
data
containsEscapedEntities
Returns

Property Documentation

◆ CommentDelimiter

virtual string PeanutButter.INI.BestEffortLineParser.CommentDelimiter
getset
Initial value:
=
const string DEFAULT_COMMENT_DELIMITER
The default marker for the start of a comment.
Definition BestEffortLineParser.cs:19

The marker used by this parser for the start of a comment.

Implements PeanutButter.INI.ILineParser.


The documentation for this class was generated from the following file:
  • source/INI/PeanutButter.INI/BestEffortLineParser.cs