Documentation
Table of Contents

Class TargetInspection

Namespace
IntentSharp.Targets
Assembly
IntentSharp.dll

What a planned command would do, as InspectAsync(TargetCommand, TargetContext, CancellationToken) reads it without running it. The runtime hands it to the guardrail check at the Data checkpoint: the entities as data.entities, the operations as data.operations and each entry of Extra as the subject it names.

public sealed class TargetInspection
Inheritance
object
TargetInspection
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Extension Methods

Remarks

An inspection is a guard, not a permission boundary. It lets the rules refuse a command before it runs. Who may read or write the data is decided by the technology's own accounts and permissions, which an inspection does not replace.

Constructors

TargetInspection()

Creates an inspection that names nothing and refuses nothing.

Properties

Entities

The entities the command touches, by Name, such as dbo.orders. An inspection that names an operation and no entity is refused at the plan and execute stages, since nothing would then check what the command touches, unless TouchesNoEntity is true.

Extra

Values of the subjects the target declares in Subjects, by subject name, such as a count of literal values written into a statement. An entry for one of the runtime's own subjects (data.stage, data.entities, data.operations, data.results, data.timeout) is ignored: the runtime sets those itself.

Operations

What the command does: read, write, other, or names of the target's own. Every operation except read needs data.allowWrites to be true. An inspection that names no operation is refused, since nothing would then check what the command does.

ParameterNames

The names of the parameters the command uses.

Refusals

The target's own refusals of the command, in words the model can act on. Each one refuses the command whatever a rule file allows: a file can add refusals but never remove one.

TouchesNoEntity

True when the target is sure the command touches no entity at all, such as a statement that only computes a value and names no table; false, the default, when it is not sure. An inspection that names no entity runs only when this is true: a target that cannot find the entities of a command (a syntax it does not read, a view, a function) leaves it false, and the command is refused. It is ignored when Entities names an entity: those are checked as usual.