ข้ามไปยังเนื้อหา

Class ExecutionStrategyRegistry

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Behaviors.Patterns.Registry
Assembly: Cephalon.Behaviors.Patterns.dll

Provides O(1) lookup of instances by pattern identifier. The registry is built once at construction time from a frozen dictionary for lock-free reads.

public sealed class ExecutionStrategyRegistry

objectExecutionStrategyRegistry

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

ExecutionStrategyRegistry(IEnumerable<IBehaviorExecutionStrategy>)

Section titled “ ExecutionStrategyRegistry(IEnumerable<IBehaviorExecutionStrategy>)”

Initializes the registry from the provided strategies. Duplicate pattern identifiers (case-insensitive) are not allowed.

public ExecutionStrategyRegistry(IEnumerable<IBehaviorExecutionStrategy> strategies)

strategies IEnumerable<IBehaviorExecutionStrategy>

The collection of strategies to register.

ArgumentNullException

Thrown when strategies is null.

ArgumentException

Thrown when two strategies share the same pattern identifier.

Gets all registered strategies.

public IReadOnlyList<IBehaviorExecutionStrategy> All { get; }

IReadOnlyList<IBehaviorExecutionStrategy>

Retrieves the strategy for the given pattern identifier.

public IBehaviorExecutionStrategy? GetStrategy(string pattern)

pattern string

The pattern identifier to look up (case-insensitive).

IBehaviorExecutionStrategy?

The matching strategy, or null if not found.