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

operations IEnumerable<ICommandOperation>

The declarations in execution order.

Exceptions

InvalidCommandOperation

A declaration is null.

Properties

Count

public int Count { get; }

Property Value

int

this[int]

public ICommandOperation this[int index] { get; }

Parameters

index int

Property Value

ICommandOperation

Methods

Create(ReadOnlySpan<ICommandOperation>)

Creates an immutable batch from a collection expression.

public static CommandOperations Create(ReadOnlySpan<ICommandOperation> operations)

Parameters

operations ReadOnlySpan<ICommandOperation>

The declarations to copy.

Returns

CommandOperations

The ordered batch.

Equals(CommandOperations)

public bool Equals(CommandOperations other)

Parameters

other CommandOperations

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetEnumerator()

public IEnumerator<ICommandOperation> GetEnumerator()

Returns

IEnumerator<ICommandOperation>

GetHashCode()

public override int GetHashCode()

Returns

int

Operators

operator ==(CommandOperations, CommandOperations)

Compares ordered declaration membership.

public static bool operator ==(CommandOperations left, CommandOperations right)

Parameters

left CommandOperations

The first batch.

right CommandOperations

The 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

left CommandOperations

The first batch.

right CommandOperations

The second batch.

Returns

bool

Whether membership differs.