Documentation
Table of Contents

Method ResolveSettings

Namespace
IntentSharp
Assembly
IntentSharp.dll

ResolveSettings(IReadOnlyList<string>)

Resolves every declared setting through the normal layers without checking any rule, as ResolveSettings(IReadOnlyList<string>, IReadOnlyDictionary<string, JsonNode?>?, out IReadOnlyList<string>) does with no code values. What could not be read is left out of the answer; use that overload to see it.

public IReadOnlyDictionary<string, SettingValue> ResolveSettings(IReadOnlyList<string> sets)

Parameters

sets IReadOnlyList<string>

The sets whose settings: blocks apply, in order. Empty applies none, not the client's default sets.

Returns

IReadOnlyDictionary<string, SettingValue>

Every declared setting, by name, with its value and where the value came from.

Exceptions

ArgumentNullException

sets is null.

ResolveSettings(IReadOnlyList<string>, IReadOnlyDictionary<string, JsonNode?>?, out IReadOnlyList<string>)

Resolves every declared setting through the normal layers without checking any rule and without calling a model: each setting takes the value of the first of sets whose settings: block sets it, else the settings document's, else code's, else the client's code settings (CodeSettings), else its library default, or its fail-closed value when it is a security setting. A package reads the settings it declared with AddSetting(SettingDescriptor) this way, so the settings document sets them whether or not the package names a set. A check made with CheckAsync(GuardrailCheckpoint, SubjectValues, IReadOnlyList<string>, CancellationToken) that names the same sets and carries the same code values resolves the same settings.

public IReadOnlyDictionary<string, SettingValue> ResolveSettings(IReadOnlyList<string> sets, IReadOnlyDictionary<string, JsonNode?>? code, out IReadOnlyList<string> problems)

Parameters

sets IReadOnlyList<string>

The sets whose settings: blocks apply, in order. Empty applies none, not the client's default sets.

code IReadOnlyDictionary<string, JsonNode>

Code values by setting name, which take the place of the client's code settings for the same names; null for none.

problems IReadOnlyList<string>

What could not be read: a set that is not loaded, a source or a settings file that failed, a code value that names no declared setting or that the setting cannot take, which is then skipped. Empty when everything was read.

Returns

IReadOnlyDictionary<string, SettingValue>

Every declared setting, by name, with its value and where the value came from.

Remarks

The client's own client.* limits are resolved here from their code settings and library defaults only: the IntentClientOptions values the client applies to its calls are not part of this code layer unless code carries them.

Exceptions

ArgumentNullException

sets is null.