Class BehaviorTopologyBuilder
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Behaviors.Builders
Assembly: Cephalon.Behaviors.dll
Fluent builder for constructing a Register<T> callbacks and auto-discovered
static ConfigureTopology methods.
public sealed class BehaviorTopologyBuilder : IBehaviorTopologyBuilderInheritance
Section titled “Inheritance”object ← BehaviorTopologyBuilder
Implements
Section titled “Implements”IBehaviorTopologyBuilder
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Methods
Section titled “Methods”AsCqrs()
Section titled “ AsCqrs()”Declares this behavior as CQRS-shaped (command/query split, 200/202 HTTP semantics).
public IBehaviorTopologyBuilder AsCqrs()Returns
Section titled “Returns”IBehaviorTopologyBuilder
AsDirect()
Section titled “ AsDirect()”Declares this behavior as direct (no architectural pattern — input → handler → output, 200/204 HTTP).
public IBehaviorTopologyBuilder AsDirect()Returns
Section titled “Returns”IBehaviorTopologyBuilder
AsDurableExecution()
Section titled “ AsDurableExecution()”Declares this behavior as a durable execution workflow with event-store replay semantics.
public IBehaviorTopologyBuilder AsDurableExecution()Returns
Section titled “Returns”IBehaviorTopologyBuilder
AsEventDriven()
Section titled “ AsEventDriven()”Declares this behavior as event-driven (fire-and-forget, 202 HTTP, fanout).
public IBehaviorTopologyBuilder AsEventDriven()Returns
Section titled “Returns”IBehaviorTopologyBuilder
AsProcessManager()
Section titled “ AsProcessManager()”Declares this behavior as a process manager step (long-running, durable checkpoint).
public IBehaviorTopologyBuilder AsProcessManager()Returns
Section titled “Returns”IBehaviorTopologyBuilder
AsSaga()
Section titled “ AsSaga()”Declares this behavior as a saga step (stateful, compensation chain).
public IBehaviorTopologyBuilder AsSaga()Returns
Section titled “Returns”IBehaviorTopologyBuilder
AsSagaChoreography()
Section titled “ AsSagaChoreography()”Declares this behavior as a choreography-based saga step (event-reaction coordination).
public IBehaviorTopologyBuilder AsSagaChoreography()Returns
Section titled “Returns”IBehaviorTopologyBuilder
Build(string)
Section titled “ Build(string)”Builds the immutable
public BehaviorTopologyDescriptor Build(string behaviorId)Parameters
Section titled “Parameters”behaviorId string
The stable behavior identifier.
Returns
Section titled “Returns”BehaviorTopologyDescriptor
The resolved topology descriptor.
RequireFeatureFlag(string)
Section titled “ RequireFeatureFlag(string)”Requires one Cephalon feature flag to be enabled before the behavior can execute.
public BehaviorTopologyBuilder RequireFeatureFlag(string featureFlagId)Parameters
Section titled “Parameters”featureFlagId string
The feature-flag identifier that must resolve to enabled.
Returns
Section titled “Returns”The same builder for fluent chaining.
RequireFeatureFlags(params string[])
Section titled “ RequireFeatureFlags(params string[])”Requires all requested Cephalon feature flags to be enabled before the behavior can execute.
public BehaviorTopologyBuilder RequireFeatureFlags(params string[] featureFlagIds)Parameters
Section titled “Parameters”featureFlagIds string[]
The feature-flag identifiers that must resolve to enabled.
Returns
Section titled “Returns”The same builder for fluent chaining.
ViaGrpc()
Section titled “ ViaGrpc()”Declares exposure over the grpc transport.
public BehaviorTopologyBuilder ViaGrpc()Returns
Section titled “Returns”The same builder for fluent chaining.
ViaHttpGraphQl()
Section titled “ ViaHttpGraphQl()”Declares exposure over the http.graphql transport.
public BehaviorTopologyBuilder ViaHttpGraphQl()Returns
Section titled “Returns”The same builder for fluent chaining.
ViaHttpGraphQlSse()
Section titled “ ViaHttpGraphQlSse()”Declares exposure over the http.graphql-sse transport.
public BehaviorTopologyBuilder ViaHttpGraphQlSse()Returns
Section titled “Returns”The same builder for fluent chaining.
ViaHttpGraphQlWs()
Section titled “ ViaHttpGraphQlWs()”Declares exposure over the http.graphql-ws transport.
public BehaviorTopologyBuilder ViaHttpGraphQlWs()Returns
Section titled “Returns”The same builder for fluent chaining.
ViaHttpJsonRpc()
Section titled “ ViaHttpJsonRpc()”Declares exposure over the http.jsonrpc transport.
public BehaviorTopologyBuilder ViaHttpJsonRpc()Returns
Section titled “Returns”The same builder for fluent chaining.
ViaHttpSse()
Section titled “ ViaHttpSse()”Declares exposure over the http.sse transport.
public BehaviorTopologyBuilder ViaHttpSse()Returns
Section titled “Returns”The same builder for fluent chaining.
ViaInMemory()
Section titled “ ViaInMemory()”Declares exposure over the in-memory transport.
public BehaviorTopologyBuilder ViaInMemory()Returns
Section titled “Returns”The same builder for fluent chaining.
ViaKafka()
Section titled “ ViaKafka()”Declares exposure over the kafka transport.
public BehaviorTopologyBuilder ViaKafka()Returns
Section titled “Returns”The same builder for fluent chaining.
ViaRabbitMq()
Section titled “ ViaRabbitMq()”Declares exposure over the rabbitmq transport.
public BehaviorTopologyBuilder ViaRabbitMq()Returns
Section titled “Returns”The same builder for fluent chaining.
ViaWebSocket()
Section titled “ ViaWebSocket()”Declares exposure over the http.ws (WebSocket) transport.
public BehaviorTopologyBuilder ViaWebSocket()Returns
Section titled “Returns”The same builder for fluent chaining.
WithApiSurface(string, string)
Section titled “ WithApiSurface(string, string)”Overrides the logical API surface projected by route-shaped transport adapters.
public BehaviorTopologyBuilder WithApiSurface(string groupPath, string operationPath)Parameters
Section titled “Parameters”groupPath string
The logical group path, such as cart.
operationPath string
The logical operation path, such as get.
Returns
Section titled “Returns”The same builder for fluent chaining.
Remarks
Section titled “Remarks”This primarily affects the shared HTTP behavior route contract used by route-shaped non-REST bindings such as JSON-RPC, GraphQL-over-SSE, GraphQL-over-WebSocket, Server-Sent Events, and WebSocket. Public REST stays module-owned, and GraphQL remains schema-owned.
WithCqrsPattern()
Section titled “ WithCqrsPattern()”Sets the interaction pattern to cqrs.
public BehaviorTopologyBuilder WithCqrsPattern()Returns
Section titled “Returns”The same builder for fluent chaining.
WithDirectPattern()
Section titled “ WithDirectPattern()”Sets the interaction pattern to direct.
public BehaviorTopologyBuilder WithDirectPattern()Returns
Section titled “Returns”The same builder for fluent chaining.
WithDurableExecutionPattern()
Section titled “ WithDurableExecutionPattern()”Sets the interaction pattern to durable-execution.
public BehaviorTopologyBuilder WithDurableExecutionPattern()Returns
Section titled “Returns”The same builder for fluent chaining.
WithEventDrivenPattern()
Section titled “ WithEventDrivenPattern()”Sets the interaction pattern to event-driven.
public BehaviorTopologyBuilder WithEventDrivenPattern()Returns
Section titled “Returns”The same builder for fluent chaining.
WithMetadata(string, string?)
Section titled “ WithMetadata(string, string?)”Adds or replaces descriptor metadata that companion packages can later project into adapter-specific runtime behavior.
public BehaviorTopologyBuilder WithMetadata(string key, string? value)Parameters
Section titled “Parameters”key string
The metadata key to write.
value string?
The metadata value to store. Pass null to remove the key.
Returns
Section titled “Returns”The same builder for fluent chaining.
WithOptions(Action<BehaviorTopologyOptions>)
Section titled “ WithOptions(Action<BehaviorTopologyOptions>)”Configures optional feature flags for this behavior (outbox, inbox, event sourcing).
public IBehaviorTopologyBuilder WithOptions(Action<BehaviorTopologyOptions> configure)Parameters
Section titled “Parameters”configure Action<BehaviorTopologyOptions>
Returns
Section titled “Returns”IBehaviorTopologyBuilder
WithProcessManagerPattern()
Section titled “ WithProcessManagerPattern()”Sets the interaction pattern to process-manager.
public BehaviorTopologyBuilder WithProcessManagerPattern()Returns
Section titled “Returns”The same builder for fluent chaining.
WithSagaChoreographyPattern()
Section titled “ WithSagaChoreographyPattern()”Sets the interaction pattern to saga-choreography.
public BehaviorTopologyBuilder WithSagaChoreographyPattern()Returns
Section titled “Returns”The same builder for fluent chaining.
WithSagaStepPattern()
Section titled “ WithSagaStepPattern()”Sets the interaction pattern to saga-step.
public BehaviorTopologyBuilder WithSagaStepPattern()Returns
Section titled “Returns”The same builder for fluent chaining.