Documentation
Table of Contents

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

store IDocumentStore

The store that holds the manifest and the rule files; normally the store the client keeps its documents in.

options GuardrailSourceOptions

Where 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.

logger ILogger<DocumentGuardrailSource>

Receives the problems of documents that do not load and a line per new snapshot. Null logs nothing.

Exceptions

ArgumentNullException

store is 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.