Boolean operations for Pure IBool primitives — composable, immutable value objects for logical and bitwise bool operations.
Pure.Primitives.Bool.Operations provides sealed record types that implement logical and bitwise operations over IBool values. Each type is a composable value object — the operation is evaluated lazily when .BoolValue is accessed.
| Type | Implements | Description |
|---|---|---|
And |
IBool |
Logical AND over a sequence of IBool values |
Or |
IBool |
Logical OR over a sequence of IBool values |
Not |
IBool |
Logical NOT of a single IBool value |
Xor |
IBool |
Logical XOR over a sequence of IBool values |
BitwiseAnd |
IBool |
Bitwise AND over a sequence of IBool values |
BitwiseOr |
IBool |
Bitwise OR over a sequence of IBool values |
EqualCondition |
IBool |
true if all supplied IBool values are equal |
NotEqualCondition |
IBool |
true if not all supplied IBool values are equal |
All types live in the Pure.Primitives.Bool.Operations namespace.
- Lazy evaluation — the operation is computed only when
.BoolValueis accessed. - Composable — any
IBoolcan be nested inside another operation. - AOT-compatible — no reflection; fully compatible with Native AOT.
Pure.Primitives.Abstractions—IBoolinterface