Modifiers
References[IoId("00000000-d22a-4b09-92af-cec49036f042")]
public sealed class Modifiers : IEquatable<Modifiers>, IStorable
Encapsulates all standard modifiers that can be applied to a data tree.
Constructors
Properties
Icons
#Gets an array of modeicons, representing all active modifiers. This array is cached and should not be modified.
Randomise
#Gets whether the items inside twigs ought to be randomised. This setting makes no sense in combination with Sort or Reverse.
Sort
#Gets whether the twigs ought to be sorted. This method will either use the default Comparer or find a comparer based on type assistants.
Methods
Apply
#Apply all enabled modifiers to a data tree.
Parameters:
| tree (ITree) | Tree to modify. |
| token (CancellationToken) | Token for cancellation. |
Returns: Modified tree, or original tree if no modifications are defined.
Apply
#Apply all enabled modifiers to a data tree.
Parameters:
| tree (ITree) | Tree to modify. |
Returns: Modified tree, or original tree if no modifications are defined.
Apply<T>
#Apply all enabled modifiers to a data tree.
Parameters:
| tree (Tree<T>) | Tree to modify. |
| token (CancellationToken) | Token for cancellation. |
Returns: Modified tree, or original tree if no modifications are defined.
Apply<T>
#Apply all enabled modifiers to a data tree.
Parameters:
| tree (Tree<T>) | Tree to modify. |
Returns: Modified tree, or original tree if no modifications are defined.
Equals
#Compare two modifiers for equality.
Parameters:
| other (Modifiers) | Other modifiers to compare against. |
Returns: True if both modifiers are identical.
Equals
#Compare two modifiers for equality.
Parameters:
| obj (object) | Other modifiers to compare against. |
Returns: True if both modifiers are identical.
Overrides: Object.Equals
WillAffectTree
#Tests whether any modifiers have been defined that apply to the given tree. This method does not check whether RemoveInvalidItems should or shouldn't execute, as testing for validity is potentially an expensive operation.
Parameters:
| tree (ITree) |
WithoutEmptyTwigRemoval
#Removes the RemoveEmptyTwigs flag and returns an updated Modifiers instance.
WithoutInvalidItemRemoval
#Removes the RemoveInvalidItems flag and returns an updated Modifiers instance.