Class Preferences.Preference<T>
- Namespace
- PAC
public class Preferences.Preference<T>
Type Parameters
T
- Inheritance
-
Preferences.Preference<T>
- Inherited Members
Constructors
Preference(string, Func<T>, Action<T>)
public Preference(string displayName, Func<T> getter, Action<T> setter)
Parameters
Properties
displayName
public string displayName { get; }
Property Value
Methods
Get()
Gets the value of the preference. Can also be done via casting.
public T Get()
Returns
- T
Set(T)
Change the value of the preference and save it.
public void Set(T value)
Parameters
value
T
Operators
implicit operator T(Preference<T>)
Gets the value of the preference.
public static implicit operator T(Preferences.Preference<T> pref)
Parameters
pref
Preferences.Preference<T>
Returns
- T