ContentGuardContext
AgentPrism.Abstractions.dllThe context of an IContentGuard call.
public sealed record ContentGuardContext : IEquatable<ContentGuardContext>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”IEquatable<ContentGuardContext>
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The context carries a single piece of text, not a message
list. If messages were concatenated into one text, a false pattern could
match at the boundary between two messages (example: if one message ends
with 4539 and the next starts with 5787…, an invalid card
number would “be found”).
Constructors
Section titled “Constructors”ContentGuardContext()
Section titled “ ContentGuardContext()”public ContentGuardContext()Properties
Section titled “Properties”AgentName
Section titled “ AgentName”The name of the agent executing the run. null if unknown.
public string? AgentName { get; init; }Property Value
Section titled “Property Value”Direction
Section titled “ Direction”The direction of the check.
public required ContentGuardDirection Direction { get; init; }Property Value
Section titled “Property Value”ModelId
Section titled “ ModelId”The identifier of the model being called. null if unknown.
public string? ModelId { get; init; }Property Value
Section titled “Property Value”The run identifier. null if called outside a run’s scope.
public Guid? RunId { get; init; }Property Value
Section titled “Property Value”Guid?
TenantId
Section titled “ TenantId”The run’s tenant. null if unknown.
public string? TenantId { get; init; }Property Value
Section titled “Property Value”The text to check.
public required string Text { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(ContentGuardContext?)
Section titled “ Equals(ContentGuardContext?)”public bool Equals(ContentGuardContext? other)Parameters
Section titled “Parameters”other ContentGuardContext?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(ContentGuardContext?, ContentGuardContext?)
Section titled “ operator ==(ContentGuardContext?, ContentGuardContext?)”public static bool operator ==(ContentGuardContext? left, ContentGuardContext? right)Parameters
Section titled “Parameters”left ContentGuardContext?
right ContentGuardContext?
Returns
Section titled “Returns”operator !=(ContentGuardContext?, ContentGuardContext?)
Section titled “ operator !=(ContentGuardContext?, ContentGuardContext?)”public static bool operator !=(ContentGuardContext? left, ContentGuardContext? right)Parameters
Section titled “Parameters”left ContentGuardContext?
right ContentGuardContext?