Materialize(IEnumerable) Method

Definition

Namespace Stunts
Assembly Stunts.dll

Materializes behavior registrations into the behavior instances for one pipeline seeding.

public static IReadOnlyList<IStuntBehavior> Materialize(IEnumerable<IStuntBehavior> behaviors)

Parameters

behaviors
IEnumerable<IStuntBehavior>

The registered behaviors.

Returns

IReadOnlyList<IStuntBehavior>
One behavior instance per registration, in registration order: Stunts.BehaviorFactory registrations are replaced by the instance their factory creates, behaviors implementing ICloneable are replaced by their Clone() result, and all other behaviors are shared as-is.

Remarks

Used when a pipeline is seeded from registrations (e.g. by StuntBuilder.Build), so stateful behaviors get per-pipeline instances. Direct BehaviorPipeline construction preserves instance identity and never clones or invokes factories.