Table of Contents

Class BooleanResultBase<TMetadata>

Namespace
Motiv
Assembly
Motiv.dll

Represents a base class for boolean results with metadata.

public abstract class BooleanResultBase<TMetadata> : BooleanResultBase, IEquatable<BooleanResultBase>, IEquatable<bool>

Type Parameters

TMetadata

The type of the metadata associated with the boolean result.

Inheritance
BooleanResultBase<TMetadata>
Implements
Derived
Inherited Members
Extension Methods

Properties

CausesWithValues

Gets the underlying causes with metadata that contribute to this result.

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

Property Value

IEnumerable<BooleanResultBase<TMetadata>>

MetadataTier

Gets the metadata tree associated with this result.

public abstract MetadataNode<TMetadata> MetadataTier { get; }

Property Value

MetadataNode<TMetadata>

RootValues

Gets the metadata yielded by all results that evaulated.

public IEnumerable<TMetadata> RootValues { get; }

Property Value

IEnumerable<TMetadata>

UnderlyingMetadataSources

Gets the underlying BooleanResultBases that are the sources of the Values.

public IEnumerable<BooleanResultBase<TMetadata>> UnderlyingMetadataSources { get; }

Property Value

IEnumerable<BooleanResultBase<TMetadata>>

UnderlyingWithValues

Gets the underlying boolean results with metadata that contribute to this result.

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

Property Value

IEnumerable<BooleanResultBase<TMetadata>>

Values

Gets the metadata/assertions yielded by results that caused the outcome.

public IEnumerable<TMetadata> Values { get; }

Property Value

IEnumerable<TMetadata>

Methods

And(BooleanResultBase<TMetadata>)

Performs a logical AND operation between the current BooleanResultBase instance and another BooleanResultBase instance.

public BooleanResultBase<TMetadata> And(BooleanResultBase<TMetadata> right)

Parameters

right BooleanResultBase<TMetadata>

The other boolean result instance to perform the logical AND operation with.

Returns

BooleanResultBase<TMetadata>

A new boolean result instance representing the result of the logical AND operation.

AndAlso(BooleanResultBase<TMetadata>)

Performs a conditional AND operation between the current BooleanResultBase instance and another BooleanResultBase instance. This will short-circuit the evaluation of the right operand if the left operand is not satisfied.

public BooleanResultBase<TMetadata> AndAlso(BooleanResultBase<TMetadata> right)

Parameters

right BooleanResultBase<TMetadata>

The other boolean result instance to perform the logical AND operation with.

Returns

BooleanResultBase<TMetadata>

A new boolean result instance representing the result of the logical AND operation.

Not()

Returns a new instance of Motiv.Not.NotBooleanOperationResult<TMetadata> that represents the logical negation of the current instance.

public BooleanResultBase<TMetadata> Not()

Returns

BooleanResultBase<TMetadata>

A new instance of Motiv.Not.NotBooleanOperationResult<TMetadata> that represents the logical negation of the current instance.

Or(BooleanResultBase<TMetadata>)

Performs a logical OR operation between the current BooleanResultBase instance and another BooleanResultBase instance.

public BooleanResultBase<TMetadata> Or(BooleanResultBase<TMetadata> right)

Parameters

right BooleanResultBase<TMetadata>

The other boolean result instance to perform the OR operation with.

Returns

BooleanResultBase<TMetadata>

A new boolean result instance representing the result of the OR operation.

OrElse(BooleanResultBase<TMetadata>)

Performs a conditional OR operation between the current BooleanResultBase instance and another BooleanResultBase instance. This will short-circuit the evaluation of the right operand if the left operand is satisfied.

public BooleanResultBase<TMetadata> OrElse(BooleanResultBase<TMetadata> right)

Parameters

right BooleanResultBase<TMetadata>

The other boolean result instance to perform the OR operation with.

Returns

BooleanResultBase<TMetadata>

A new boolean result instance representing the result of the OR operation.

XOr(BooleanResultBase<TMetadata>)

Performs a logical exclusive OR (XOR) operation between this BooleanResultBase instance and another BooleanResultBase instance.

public BooleanResultBase<TMetadata> XOr(BooleanResultBase<TMetadata> right)

Parameters

right BooleanResultBase<TMetadata>

The other boolean result instance to perform the XOR operation with.

Returns

BooleanResultBase<TMetadata>

A new boolean result instance representing the result of the XOR operation.

Operators

operator &(BooleanResultBase<TMetadata>, BooleanResultBase<TMetadata>)

Overloads the bitwise AND operator to perform a logical AND operation on two BooleanResultBase instances.

public static BooleanResultBase<TMetadata> operator &(BooleanResultBase<TMetadata> left, BooleanResultBase<TMetadata> right)

Parameters

left BooleanResultBase<TMetadata>

The left boolean result instance.

right BooleanResultBase<TMetadata>

The right boolean result instance.

Returns

BooleanResultBase<TMetadata>

A new BooleanResultBase instance representing the result of the logical AND operation.

operator |(BooleanResultBase<TMetadata>, BooleanResultBase<TMetadata>)

Overloads the logical OR operator (|) to perform a logical OR operation on two BooleanResultBase instances.

public static BooleanResultBase<TMetadata> operator |(BooleanResultBase<TMetadata> left, BooleanResultBase<TMetadata> right)

Parameters

left BooleanResultBase<TMetadata>

The left boolean result instance.

right BooleanResultBase<TMetadata>

The right boolean result instance.

Returns

BooleanResultBase<TMetadata>

A new BooleanResultBase instance representing the result of the logical OR operation.

operator ^(BooleanResultBase<TMetadata>, BooleanResultBase<TMetadata>)

Overloads the ^ operator to perform an exclusive OR (XOR) operation on two BooleanResultBase instances.

public static BooleanResultBase<TMetadata> operator ^(BooleanResultBase<TMetadata> left, BooleanResultBase<TMetadata> right)

Parameters

left BooleanResultBase<TMetadata>

The left boolean result operand.

right BooleanResultBase<TMetadata>

The right boolean result operand.

Returns

BooleanResultBase<TMetadata>

A new BooleanResultBase instance representing the result of the XOR operation.

operator !(BooleanResultBase<TMetadata>)

Overloads the logical NOT operator for the BooleanResultBase class.

public static BooleanResultBase<TMetadata> operator !(BooleanResultBase<TMetadata> result)

Parameters

result BooleanResultBase<TMetadata>

The boolean result object to negate.

Returns

BooleanResultBase<TMetadata>

A new boolean result object that represents the negation of the input.