Method AddSetting
- Namespace
- IntentSharp
- Assembly
- IntentSharp.dll
AddSetting(SettingDescriptor)
Declares a setting beyond the core settings, so files and code can set it and every check resolves it. Works with or without WithGuardrails(GuardrailOptions). The same descriptor (the same object, or one equal in every property) in Settings is counted once; another setting there with the same name makes Build() throw ArgumentException. Options with OnBuild receive it when the client is built, as a rule file source from the Guardrails package does.
public IntentClientBuilder AddSetting(SettingDescriptor descriptor)
Parameters
descriptorSettingDescriptorThe setting.
Returns
Exceptions
- ArgumentNullException
descriptoris null.- ArgumentException
The setting has no name, a core setting or an earlier one has its name, it is a security setting with no fail-closed value, or its default or fail-closed value is one its own rules refuse.