Table of Contents

Enum MiddlewareCriticality

Namespace
Excalibur.Dispatch
Assembly
Excalibur.Dispatch.Abstractions.dll

Indicates whether a pipeline middleware entry may be omitted from the built pipeline when it cannot be materialized from the service provider.

public enum MiddlewareCriticality
Extension Methods

Fields

Optional = 1

The middleware is skipped and logged when it cannot be materialized, and the pipeline is built without it.

Required = 2

The middleware must be materialized. Building the pipeline fails when it cannot be, naming the middleware and the service that is missing.

Unspecified = 0

No criticality was stated. This is the zero value, so it is what an entry that was never given one holds, and building a pipeline from such an entry fails, naming the entry and the profile that declared it.

This value exists so that omission is loud rather than silent. It is deliberately not a synonym for either real criticality: a profile that skipped the question has not asked for best-effort behaviour, and guessing on its behalf is what this value prevents. It is never a valid criticality for a built pipeline, and no caller should state it explicitly.

Remarks

Criticality is decided by the code that declares the middleware, never inferred from whether its services happen to be registered. A profile that names a middleware has asked for it; omitting how much protection it wants is not the same as asking for none.