Skip to content

Class BehaviorTopologyBuilder

Namespace: Cephalon.Behaviors.Builders
Assembly: Cephalon.Behaviors.dll

Fluent builder for constructing a . Implements so behaviors can declare topology from both manual Register<T> callbacks and auto-discovered static ConfigureTopology methods.

public sealed class BehaviorTopologyBuilder : IBehaviorTopologyBuilder

objectBehaviorTopologyBuilder

IBehaviorTopologyBuilder

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

Declares this behavior as CQRS-shaped (command/query split, 200/202 HTTP semantics).

public IBehaviorTopologyBuilder AsCqrs()

IBehaviorTopologyBuilder

Declares this behavior as direct (no architectural pattern — input → handler → output, 200/204 HTTP).

public IBehaviorTopologyBuilder AsDirect()

IBehaviorTopologyBuilder

Declares this behavior as a durable execution workflow with event-store replay semantics.

public IBehaviorTopologyBuilder AsDurableExecution()

IBehaviorTopologyBuilder

Declares this behavior as event-driven (fire-and-forget, 202 HTTP, fanout).

public IBehaviorTopologyBuilder AsEventDriven()

IBehaviorTopologyBuilder

Declares this behavior as a process manager step (long-running, durable checkpoint).

public IBehaviorTopologyBuilder AsProcessManager()

IBehaviorTopologyBuilder

Declares this behavior as a saga step (stateful, compensation chain).

public IBehaviorTopologyBuilder AsSaga()

IBehaviorTopologyBuilder

Declares this behavior as a choreography-based saga step (event-reaction coordination).

public IBehaviorTopologyBuilder AsSagaChoreography()

IBehaviorTopologyBuilder

Builds the immutable for the given behavior identifier.

public BehaviorTopologyDescriptor Build(string behaviorId)

behaviorId string

The stable behavior identifier.

BehaviorTopologyDescriptor

The resolved topology descriptor.

Requires one Cephalon feature flag to be enabled before the behavior can execute.

public BehaviorTopologyBuilder RequireFeatureFlag(string featureFlagId)

featureFlagId string

The feature-flag identifier that must resolve to enabled.

BehaviorTopologyBuilder

The same builder for fluent chaining.

Requires all requested Cephalon feature flags to be enabled before the behavior can execute.

public BehaviorTopologyBuilder RequireFeatureFlags(params string[] featureFlagIds)

featureFlagIds string[]

The feature-flag identifiers that must resolve to enabled.

BehaviorTopologyBuilder

The same builder for fluent chaining.

Declares exposure over the grpc transport.

public BehaviorTopologyBuilder ViaGrpc()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Declares exposure over the http.graphql transport.

public BehaviorTopologyBuilder ViaHttpGraphQl()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Declares exposure over the http.graphql-sse transport.

public BehaviorTopologyBuilder ViaHttpGraphQlSse()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Declares exposure over the http.graphql-ws transport.

public BehaviorTopologyBuilder ViaHttpGraphQlWs()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Declares exposure over the http.jsonrpc transport.

public BehaviorTopologyBuilder ViaHttpJsonRpc()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Declares exposure over the http.sse transport.

public BehaviorTopologyBuilder ViaHttpSse()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Declares exposure over the in-memory transport.

public BehaviorTopologyBuilder ViaInMemory()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Declares exposure over the kafka transport.

public BehaviorTopologyBuilder ViaKafka()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Declares exposure over the rabbitmq transport.

public BehaviorTopologyBuilder ViaRabbitMq()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Declares exposure over the http.ws (WebSocket) transport.

public BehaviorTopologyBuilder ViaWebSocket()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Overrides the logical API surface projected by route-shaped transport adapters.

public BehaviorTopologyBuilder WithApiSurface(string groupPath, string operationPath)

groupPath string

The logical group path, such as cart.

operationPath string

The logical operation path, such as get.

BehaviorTopologyBuilder

The same builder for fluent chaining.

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.

Sets the interaction pattern to cqrs.

public BehaviorTopologyBuilder WithCqrsPattern()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Sets the interaction pattern to direct.

public BehaviorTopologyBuilder WithDirectPattern()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Sets the interaction pattern to durable-execution.

public BehaviorTopologyBuilder WithDurableExecutionPattern()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Sets the interaction pattern to event-driven.

public BehaviorTopologyBuilder WithEventDrivenPattern()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Adds or replaces descriptor metadata that companion packages can later project into adapter-specific runtime behavior.

public BehaviorTopologyBuilder WithMetadata(string key, string? value)

key string

The metadata key to write.

value string?

The metadata value to store. Pass null to remove the key.

BehaviorTopologyBuilder

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)

configure Action<BehaviorTopologyOptions>

IBehaviorTopologyBuilder

Sets the interaction pattern to process-manager.

public BehaviorTopologyBuilder WithProcessManagerPattern()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Sets the interaction pattern to saga-choreography.

public BehaviorTopologyBuilder WithSagaChoreographyPattern()

BehaviorTopologyBuilder

The same builder for fluent chaining.

Sets the interaction pattern to saga-step.

public BehaviorTopologyBuilder WithSagaStepPattern()

BehaviorTopologyBuilder

The same builder for fluent chaining.