IPresets

References
public interface IPresets : IStorable
Collection of named presets.

Properties

AllPresets

#
IEnumerable<IPreset> AllPresets { get; }
Enumerate over all presets.

Count

#
int Count { get; }
Gets the number of preset values.

Names

#
IEnumerable<string> Names { get; }
Enumerate over all names.

Indexers

this[]

#
IPreset this[int index] { get; }
Access an indexed preset.
index (int)Index of preset.

this[]

#
IPreset this[string name] { get; }
Access a preset by name.
name (string)Name of preset.

Methods

Clear

#
void Clear()
Wipe all defined presets.

FindByValue

#
IPreset FindByValue(object value)
Attempt to find the preset associated with a value. If the value is of the wrong type or otherwise unknown to this preset collection, null will be returned.
value (object)

IsAvailable

#
bool IsAvailable(string name)
Gets whether a specific name is still available and adheres to the naming scheme.
name (string)Name to test.
True if name hasn't been defined.

Store

void Store(IWriter writer)
This method is called whenever the instance is required to serialize itself.
inherited fromIStorable
writer (IWriter)Writer object to serialize with.

TryCopyFrom

#
int TryCopyFrom(IPresets other)
Try and copy all presets from another collection.
other (IPresets)
Number of presets successfully copied.