Skip to content
ModularityKit.Mutator ModularityKit.Mutator Docs
  • Home
  • Core
  • Governance
  • Redis
  • API
Search Results for

    Show / Hide Table of Contents

    Class PolicyRequirement

    Represents a requirement that must be fulfilled before a mutation can proceed.

    Inheritance
    object
    PolicyRequirement
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: ModularityKit.Mutator.Abstractions.Policies
    Assembly: ModularityKit.Mutator.dll
    Syntax
    public sealed class PolicyRequirement
    Remarks

    Policy requirements are used in conjunction with PolicyDecision to enforce governance rules such as approvals, additional authentication, or compliance checks.

    Key points:

    • Type identifies the kind of requirement (e.g., "Approval", "TwoFactor").
    • Description provides a human-readable explanation of the requirement.
    • Data can carry structured information relevant to the requirement.
    • IsFulfilled indicates whether the requirement has already been satisfied.

    Properties

    | Edit this page View Source

    Data

    Optional structured data associated with the requirement.

    Declaration
    public object? Data { get; init; }
    Property Value
    Type Description
    object
    | Edit this page View Source

    Description

    Human-readable description of the requirement.

    Declaration
    public string Description { get; init; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    IsFulfilled

    Indicates whether the requirement has been fulfilled.

    Declaration
    public bool IsFulfilled { get; init; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    Type

    Type of the requirement (e.g., "Approval", "TwoFactor").

    Declaration
    public string Type { get; init; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    Approval(string, string)

    Creates an approval requirement specifying who must approve and why.

    Declaration
    public static PolicyRequirement Approval(string approver, string reason)
    Parameters
    Type Name Description
    string approver

    Identifier of the approver (e.g., email or username).

    string reason

    Reason for requiring approval.

    Returns
    Type Description
    PolicyRequirement

    A policy requirement representing an approval step.

    | Edit this page View Source

    TwoFactor()

    Creates a two-factor authentication requirement.

    Declaration
    public static PolicyRequirement TwoFactor()
    Returns
    Type Description
    PolicyRequirement

    A policy requirement representing a 2FA step.

    • Edit this page
    • View Source
    In this article
    ModularityKit.Mutator Generated from XML docs and published from main. Back to top