A True/False switch that is never null and behaves similarly to a unix cmd line switch.
If unspecified, a Flag defaults to false, however, the default can be set to
true. Best used for on/off flags, particularly if used from command line,
where a
null value makes no sense.
A FlagProp is similar to a Boolean Property, but with these differences:
- A Flag is never null - it will always return true or false.
- Loaders will interpret the presence of the flag as setting the flag to
True (where possible). For instance, if a Flag is aliased as -enableTorpedos,
including
-enableTorpedos as a command line argument will cause
the CmdLineLoader to set it to true.
Explicitly setting a flag true or false on the command line is allowed, such
as
enableTorpedos=true.
By default this uses the TrimToNullTrimmer, which removes all whitespace from
the value and ultimately null if the value is all whitespace. Since being
present counts as 'on' for a flag, this would equate to true.