Documentation
Table of Contents

Method AddSubject

Namespace
IntentSharp
Assembly
IntentSharp.dll

AddSubject(SubjectDescriptor)

Declares a subject beyond the core subjects, such as a subject of a package's own checkpoint, so that every check of the client knows it, and a rule that names it is evaluated, without the caller declaring it again in Subjects. The subject joins those of Subjects. Works with or without WithGuardrails(GuardrailOptions); call it once for each subject. Options with OnBuild receive it when the client is built, as a rule file source from the Guardrails package does.

public IntentClientBuilder AddSubject(SubjectDescriptor descriptor)

Parameters

descriptor SubjectDescriptor

The subject.

Returns

IntentClientBuilder

Exceptions

ArgumentNullException

descriptor is null.

ArgumentException

The subject has no name or no checkpoint, it is a security subject with no fail-closed value, or a core subject or an earlier one has its name. Another subject of Subjects with the same name makes Build() throw ArgumentException; the same descriptor there (the same object, or one equal in every property) is counted once.