Class Stem
Provides a way to support assigning a stem to a value.
public sealed class Stem
- Inheritance
-
Stem
Constructors
Stem(string)
Initializes a new instance of the Stem class.
public Stem(string value)
Parameters
valuestringThe stem to apply affixes.
Properties
Value
Gets the value of this instance.
public string Value { get; }
Property Value
- string
The value of this instance.
Methods
AttachPrefix(string)
Attaches the specified prefix to the stem of this instance.
public Stem AttachPrefix(string prefix)
Parameters
prefixstringThe affix that must appear before the stem of this instance.
Returns
- Stem
A string where the specified
prefixappears before the stem of this instance.
Remarks
This method attaches the prefix to the stem only if not already part of the beginning.
AttachPrefix(string, Func<string, bool>)
Attaches the specified prefix to the stem of this instance.
public Stem AttachPrefix(string prefix, Func<string, bool> condition)
Parameters
prefixstringThe affix that must appear before the stem of this instance.
conditionFunc<string, bool>The function delegate that provides a condition for when to attach the
prefixto the stem.
Returns
- Stem
A string where the specified
prefixappears before the stem of this instance.
AttachSuffix(string)
Attaches the specified suffix to the stem of this instance.
public Stem AttachSuffix(string suffix)
Parameters
suffixstringThe affix that must appear after the stem of this instance.
Returns
- Stem
A string where the specified
suffixappears after the stem of this instance.
Remarks
This method attaches the suffix to the stem only if not already part of the ending.
AttachSuffix(string, Func<string, bool>)
Attaches the specified suffix to the stem of this instance.
public Stem AttachSuffix(string suffix, Func<string, bool> condition)
Parameters
suffixstringThe affix that must appear after the stem of this instance.
conditionFunc<string, bool>The function delegate that provides a condition for when to attach the
suffixto the stem.
Returns
- Stem
A string where the specified
suffixappears after the stem of this instance.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
implicit operator string(Stem)
public static implicit operator string(Stem stem)
Parameters
Returns
implicit operator Stem(string)
public static implicit operator Stem(string stem)