Struct CommandOperations
- Namespace
- Cratis.Arc.Commands
- Assembly
- Cratis.Arc.Core.dll
An immutable, ordered batch of command operation declarations. Default and an empty collection expression are empty. Membership is copied immediately; descriptors should themselves be immutable business data.
public readonly struct CommandOperations : IReadOnlyList<ICommandOperation>, IReadOnlyCollection<ICommandOperation>, IEnumerable<ICommandOperation>, IEnumerable, IEquatable<CommandOperations>
- Implements
- Inherited Members
- Extension Methods
Constructors
CommandOperations(IEnumerable<ICommandOperation>)
Initializes a new instance of the CommandOperations struct by materializing a sequence once.
public CommandOperations(IEnumerable<ICommandOperation> operations)
Parameters
operationsIEnumerable<ICommandOperation>The declarations in execution order.
Exceptions
- InvalidCommandOperation
A declaration is null.
Properties
Count
public int Count { get; }
Property Value
this[int]
public ICommandOperation this[int index] { get; }
Parameters
indexint
Property Value
Methods
Create(ReadOnlySpan<ICommandOperation>)
Creates an immutable batch from a collection expression.
public static CommandOperations Create(ReadOnlySpan<ICommandOperation> operations)
Parameters
operationsReadOnlySpan<ICommandOperation>The declarations to copy.
Returns
- CommandOperations
The ordered batch.
Equals(CommandOperations)
public bool Equals(CommandOperations other)
Parameters
otherCommandOperations
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetEnumerator()
public IEnumerator<ICommandOperation> GetEnumerator()
Returns
GetHashCode()
public override int GetHashCode()
Returns
Operators
operator ==(CommandOperations, CommandOperations)
Compares ordered declaration membership.
public static bool operator ==(CommandOperations left, CommandOperations right)
Parameters
leftCommandOperationsThe first batch.
rightCommandOperationsThe second batch.
Returns
- bool
Whether membership is equal.
operator !=(CommandOperations, CommandOperations)
Compares ordered declaration membership for inequality.
public static bool operator !=(CommandOperations left, CommandOperations right)
Parameters
leftCommandOperationsThe first batch.
rightCommandOperationsThe second batch.
Returns
- bool
Whether membership differs.