Summary
Gets the value for the specified key as a boolean.
Returns true only when the value equals "true" (case-insensitive).
Syntax
public static bool GetBoolValue(this ICakeConfiguration configuration, string key, bool defaultValue = false)
Parameters
| Name |
Type |
Description |
| configuration |
ICakeConfiguration |
The Cake configuration. |
| key |
string |
The configuration key. |
| defaultValue |
bool |
The value to return when the key is missing or not a recognized boolean. |
Return Value
| Type |
Description |
| bool |
true when the configuration value is "true" (case-insensitive); otherwise defaultValue. |