Table of Contents

Class PolicyResult<TModel, TMetadata>

Namespace
Motiv.HigherOrderProposition
Assembly
Motiv.dll

Represents a boolean result with an associated model and metadata.

public sealed class PolicyResult<TModel, TMetadata> : PolicyResultBase<TMetadata>, IEquatable<BooleanResultBase>, IEquatable<bool>

Type Parameters

TModel

The type of the associated model.

TMetadata

The type of the metadata.

Inheritance
PolicyResultBase<TMetadata>
PolicyResult<TModel, TMetadata>
Implements
Inherited Members
Extension Methods

Properties

Causes

Gets the causes of the result. These are the underlying results that determined the final result.

public override IEnumerable<BooleanResultBase> Causes { get; }

Property Value

IEnumerable<BooleanResultBase>

CausesWithValues

Gets the causes of the result, with metadata. These are the underlying results that determined the final result.

public override IEnumerable<BooleanResultBase<TMetadata>> CausesWithValues { get; }

Property Value

IEnumerable<BooleanResultBase<TMetadata>>

Description

Gets the description of the result.

public override ResultDescriptionBase Description { get; }

Property Value

ResultDescriptionBase

Explanation

Gets the explanation for the result, including any underlying explanations that led to this result.

public override Explanation Explanation { get; }

Property Value

Explanation

MetadataTier

Gets the metadata as a hierarchy of metadata nodes, with the root node representing the metadata yielded by this result's proposition.

public override MetadataNode<TMetadata> MetadataTier { get; }

Property Value

MetadataNode<TMetadata>

Model

Gets the model that this result evaluated.

public TModel Model { get; }

Property Value

TModel

Satisfied

Gets a value indicating whether the result is satisfied.

public override bool Satisfied { get; }

Property Value

bool

Underlying

Gets the underlying boolean result that this result encapsulates.

public override IEnumerable<BooleanResultBase> Underlying { get; }

Property Value

IEnumerable<BooleanResultBase>

UnderlyingWithValues

Gets the underlying boolean result that led to this result, that also shares the same metadata type.

public override IEnumerable<BooleanResultBase<TMetadata>> UnderlyingWithValues { get; }

Property Value

IEnumerable<BooleanResultBase<TMetadata>>

Value

Gets the metadata associated with the result. This is the scalar metadata yielded by the proposition.

public override TMetadata Value { get; }

Property Value

TMetadata