Class SettingValue
- Namespace
- IntentSharp.Guardrails
- Assembly
- IntentSharp.dll
A setting as one check resolved it: its value, whether the value removes the limit, and where it came from. Test IsUnlimited first: the typed readers return false for an unlimited value.
public sealed class SettingValue
- Inheritance
-
objectSettingValue
- Inherited Members
-
object.Equals(object)object.Equals(object, object)object.GetHashCode()object.GetType()object.ReferenceEquals(object, object)object.ToString()
- Extension Methods
Constructors
- SettingValue()
Creates a resolved value. The check creates these; a test or a custom source may create its own.
Properties
- IsUnlimited
True when the value is
"unlimited": the setting's limit is removed.
- Name
The setting's name.
- Source
Where the value came from.
Methods
- AsText()
The value as text; null when it is unlimited, absent or not text.
- TryGetBoolean(out bool)
Reads the value as true or false; false when it is absent or not JSON true or false.
- TryGetCount(out long)
Reads the value as a whole number; false when it is unlimited, absent or not a whole number.
- TryGetDuration(out TimeSpan)
Reads the value as a length of time; false when it is unlimited, absent or not a duration.