Class BehaviorCollectionBuilder
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Behaviors.Services
Assembly: Cephalon.Behaviors.dll
Default implementation of
public sealed class BehaviorCollectionBuilder : IBehaviorCollectionBuilderInheritance
Section titled “Inheritance”object ← BehaviorCollectionBuilder
Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Extension Methods
Section titled “Extension Methods”PatternBehaviorExtensions.AddBehaviorPatterns(IBehaviorCollectionBuilder), MessagingBehaviorBindingServiceCollectionExtensions.AddMessagingBehaviorBindings(IBehaviorCollectionBuilder, IConfiguration), MessagingBehaviorBindingServiceCollectionExtensions.AddMessagingBehaviorBindings(IBehaviorCollectionBuilder), MessagingBehaviorBindingServiceCollectionExtensions.AddMessagingBehaviorBindings(IBehaviorCollectionBuilder, Action<InMemoryTransportOptions>?, Action<RabbitMqTransportOptions>?, Action<KafkaTransportOptions>?)
Constructors
Section titled “Constructors”BehaviorCollectionBuilder(IServiceCollection, BehaviorTypeRegistry)
Section titled “ BehaviorCollectionBuilder(IServiceCollection, BehaviorTypeRegistry)”Initializes the builder with the target service collection and shared type registry.
public BehaviorCollectionBuilder(IServiceCollection services, BehaviorTypeRegistry typeRegistry)Parameters
Section titled “Parameters”services IServiceCollection
The service collection to register behaviors into.
typeRegistry BehaviorTypeRegistry
The type registry to populate with behavior id-to-type mappings.
Properties
Section titled “Properties”Services
Section titled “ Services”Gets the underlying
public IServiceCollection Services { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Register<TBehavior>(Action<BehaviorTopologyBuilder>?)
Section titled “ Register<TBehavior>(Action<BehaviorTopologyBuilder>?)”Registers a behavior of type TBehavior with the runtime.
- Resolves the behavior id from
. - Registers
TBehavioras a transient service in DI. - Records the id-to-type mapping in the shared
. - When
configureTopologyis provided, adds aat Layer 4.
public IBehaviorCollectionBuilder Register<TBehavior>(Action<BehaviorTopologyBuilder>? configureTopology = null) where TBehavior : classParameters
Section titled “Parameters”configureTopology Action<BehaviorTopologyBuilder>?
An optional callback that configures the behavior’s transport topology at Layer 4 (highest priority). When null, topology is resolved from configuration layers only.
Returns
Section titled “Returns”The same builder for fluent chaining.
Type Parameters
Section titled “Type Parameters”TBehavior
The concrete behavior type. Must be decorated with
Exceptions
Section titled “Exceptions”Thrown when TBehavior is not decorated with