Constructor DocumentGuardrailSource
- Namespace
- IntentSharp.Guardrails
- Assembly
- IntentSharp.Guardrails.dll
DocumentGuardrailSource(IDocumentStore, GuardrailSourceOptions?, ILogger<DocumentGuardrailSource>?)
Creates the source over the rule files store holds. Nothing is read until Current is first used.
public DocumentGuardrailSource(IDocumentStore store, GuardrailSourceOptions? options = null, ILogger<DocumentGuardrailSource>? logger = null)
Parameters
storeIDocumentStoreThe store that holds the manifest and the rule files; normally the store the client keeps its documents in.
optionsGuardrailSourceOptionsWhere the manifest is, the pinned documents, the kinds, subjects and settings a rule file may name, and the code settings; copied now. Null uses the defaults.
loggerILogger<DocumentGuardrailSource>Receives the problems of documents that do not load and a line per new snapshot. Null logs nothing.
Exceptions
- ArgumentNullException
storeis null.- ArgumentException
A path in ExpectedHashes is not a document path, or its hash is blank; or a name in CodeSettings is not a declared setting, or its value is one the setting cannot take.