Class Parenthesis
- Namespace
- Utils.Expressions
- Assembly
- Utils.dll
Describes a set of parenthesis tokens used by the expression parser.
public record Parenthesis : IEquatable<Parenthesis>
- Inheritance
-
Parenthesis
- Implements
- Inherited Members
- Extension Methods
Constructors
Parenthesis(string, string, string)
Describes a set of parenthesis tokens used by the expression parser.
public Parenthesis(string Start, string End, string Separator = null)
Parameters
StartstringToken that opens the group.
EndstringToken that closes the group.
SeparatorstringOptional separator token used between arguments.
Properties
End
Token that closes the group.
public string End { get; init; }
Property Value
Separator
Optional separator token used between arguments.
public string Separator { get; init; }
Property Value
Start
Token that opens the group.
public string Start { get; init; }
Property Value
Methods
Test(string, bool, out bool)
Tests a token while optionally ignoring the separator.
public bool Test(string token, bool ignoreSeparator, out bool isEnd)
Parameters
tokenstringToken to test.
ignoreSeparatorboolWhen true, separator tokens are ignored.
isEndboolSet to true if the token is the closing token.
Returns
Test(string, out bool)
Tests whether a token represents the end or separator of the parenthesis set.
public bool Test(string token, out bool isEnd)
Parameters
Returns
Operators
implicit operator Parenthesis((string Start, string End, string Separator))
Creates a Parenthesis from a tuple including a separator.
public static implicit operator Parenthesis((string Start, string End, string Separator) value)
Parameters
Returns
implicit operator Parenthesis((string Start, string End))
Creates a Parenthesis from a tuple of start and end tokens.
public static implicit operator Parenthesis((string Start, string End) value)