Presets<T>
ReferencesGeneric implementation of IPresets.
Type parameters:
| T |
Constructors
Properties
Indexers
Methods
Add
#Attempt to add a preset.
Parameters:
| preset (Preset<T>) | Preset to add. |
Returns: True if preset was successfully added.
Add
#Attempt to add a preset.
Add
#Attempt to add a preset.
AddEnum<TE>
#Add all values from an enum as presets. This will only work if the enum numeric base type is compatible with the T constraint. The values are added under their own name, unless they have a [UiName] attribute.
Returns: Number of added values.
AddEnumByType
#Add all values from an enum as presets. This will only work if the enum numeric base type is compatible with the T constraint. The values are added under their own name, unless they have a [UiName] attribute.
Parameters:
| enumType (Type) |
Returns: Number of added values.
FindByValue
#Attempt to find the name of a value. If the value is of the wrong type or otherwise unknown to this preset collection, null or an empty string may be returned.
Parameters:
| value (object) |
Parameters:
| value (object) |
Implements: FindByValue
Parameters:
| other (IPresets) |
Implements: TryCopyFrom
IsAvailable
#Gets whether a specific name is still available and adheres to the naming scheme.
Parameters:
| name (string) | Name to test. |
Returns: True if name hasn't been defined.
Implements: IsAvailable