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

Class RestBehaviorEngineBuilderExtensions

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

Namespace: Cephalon.Behaviors.Http.Hosting
Assembly: Cephalon.Behaviors.Http.dll

Extends with low-code registration for module-owned REST behavior modules.

public static class RestBehaviorEngineBuilderExtensions

objectRestBehaviorEngineBuilderExtensions

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

AddGeneratedRestBehaviorModule<TMarker>(EngineBuilder, ModuleDescriptor, Action<IRestBehaviorEndpointGroupBuilder>?)

Section titled “ AddGeneratedRestBehaviorModule<TMarker>(EngineBuilder, ModuleDescriptor, Action<IRestBehaviorEndpointGroupBuilder>?)”

Adds a low-code generated REST module whose generated behavior-id prefix is the inline module descriptor id.

public static EngineBuilder AddGeneratedRestBehaviorModule<TMarker>(this EngineBuilder engine, ModuleDescriptor descriptor, Action<IRestBehaviorEndpointGroupBuilder>? configureGroup = null)

engine EngineBuilder

The engine builder to extend.

descriptor ModuleDescriptor

The descriptor that identifies the inline module. must also be a valid dot-separated generated behavior-id prefix.

configureGroup Action<IRestBehaviorEndpointGroupBuilder>?

An optional callback that applies group-level conventions such as ApiVersion(…) or WithTagName(…) before the generated profiles are mapped.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

Use this overload when the inline module id already matches the generated behavior-id prefix the module should own. When the module id and generated prefix should differ, use explicitly. This helper still creates a real module and still never publishes public REST from [AppBehavior] alone.

AddGeneratedRestBehaviorModule<TMarker>(EngineBuilder, string, string, string, Action<IRestBehaviorEndpointGroupBuilder>?, string?)

Section titled “ AddGeneratedRestBehaviorModule<TMarker>(EngineBuilder, string, string, string, Action<IRestBehaviorEndpointGroupBuilder>?, string?)”

Adds a low-code generated REST module whose generated behavior-id prefix is the inline module id.

public static EngineBuilder AddGeneratedRestBehaviorModule<TMarker>(this EngineBuilder engine, string moduleId, string displayName, string description, Action<IRestBehaviorEndpointGroupBuilder>? configureGroup = null, string? version = null)

engine EngineBuilder

The engine builder to extend.

moduleId string

The stable module identifier.

displayName string

The human-readable module name.

description string

The module description.

configureGroup Action<IRestBehaviorEndpointGroupBuilder>?

An optional callback that applies group-level conventions such as ApiVersion(…) or WithTagName(…) before the generated profiles are mapped.

version string?

The declared module version, when one is available.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

Use this overload when the module id already matches the generated behavior-id prefix the inline module should own. When the module needs explicit dependency, tag, or metadata declarations, use the descriptor-based overload explicitly.

AddGeneratedRestBehaviorModule<TMarker>(EngineBuilder, ModuleDescriptor, string, Action<IRestBehaviorEndpointGroupBuilder>?)

Section titled “ AddGeneratedRestBehaviorModule<TMarker>(EngineBuilder, ModuleDescriptor, string, Action<IRestBehaviorEndpointGroupBuilder>?)”

Adds a low-code generated REST module whose public route-group path is derived from a dot-separated behavior-id prefix.

public static EngineBuilder AddGeneratedRestBehaviorModule<TMarker>(this EngineBuilder engine, ModuleDescriptor descriptor, string behaviorIdPrefix, Action<IRestBehaviorEndpointGroupBuilder>? configureGroup = null)

engine EngineBuilder

The engine builder to extend.

descriptor ModuleDescriptor

The descriptor that identifies the inline module.

behaviorIdPrefix string

The dot-separated behavior-id prefix whose segments become the route-group path. For example, showcase.cart becomes /showcase/cart.

configureGroup Action<IRestBehaviorEndpointGroupBuilder>?

An optional callback that applies group-level conventions such as ApiVersion(…) or WithTagName(…) before the generated profiles are mapped.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

This helper still creates a real module and still maps through the same generated-profile projection, precedence, governance, and runtime-catalog pipeline as . It does not publish public REST from [AppBehavior] alone.

AddGeneratedRestBehaviorModule<TMarker>(EngineBuilder, string, string, string, string, Action<IRestBehaviorEndpointGroupBuilder>?, string?)

Section titled “ AddGeneratedRestBehaviorModule<TMarker>(EngineBuilder, string, string, string, string, Action<IRestBehaviorEndpointGroupBuilder>?, string?)”

Adds a low-code generated REST module whose public route-group path is derived from a dot-separated behavior-id prefix without requiring a manually constructed .

public static EngineBuilder AddGeneratedRestBehaviorModule<TMarker>(this EngineBuilder engine, string moduleId, string displayName, string description, string behaviorIdPrefix, Action<IRestBehaviorEndpointGroupBuilder>? configureGroup = null, string? version = null)

engine EngineBuilder

The engine builder to extend.

moduleId string

The stable module identifier.

displayName string

The human-readable module name.

description string

The module description.

behaviorIdPrefix string

The dot-separated behavior-id prefix whose segments become the route-group path. For example, showcase.cart becomes /showcase/cart.

configureGroup Action<IRestBehaviorEndpointGroupBuilder>?

An optional callback that applies group-level conventions such as ApiVersion(…) or WithTagName(…) before the generated profiles are mapped.

version string?

The declared module version, when one is available.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

Use this overload when the inline module should keep the low-ceremony string-based module descriptor path but its module id and generated behavior-id prefix should differ. When the module needs explicit dependency, tag, or metadata declarations, use the descriptor-based overload explicitly.

AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, ModuleDescriptor, Action<IRestBehaviorEndpointGroupBuilder>?)

Section titled “ AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, ModuleDescriptor, Action<IRestBehaviorEndpointGroupBuilder>?)”

Adds a low-code generated REST module that fans one generated behavior-id root prefix out into several derived route groups while reusing the descriptor id as the generated prefix.

public static EngineBuilder AddGeneratedRestBehaviorModuleGroups<TMarker>(this EngineBuilder engine, ModuleDescriptor descriptor, Action<IRestBehaviorEndpointGroupBuilder>? configureGroup = null)

engine EngineBuilder

The engine builder to extend.

descriptor ModuleDescriptor

The descriptor that identifies the inline module. must also be a valid dot-separated generated behavior-id prefix.

configureGroup Action<IRestBehaviorEndpointGroupBuilder>?

An optional callback that applies shared group-level conventions such as ApiVersion(…), WithTagName(…), or WithHostGovernanceScope(…) to each derived route group before the generated profiles are mapped.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

Use this overload when the inline module id already matches the generated root prefix whose parent segments should become several owned public route groups. When module identity and generated ownership prefix should differ, use explicitly. This helper still creates a real module and still never publishes public REST from [AppBehavior] alone.

AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, string, string, string, Action<IRestBehaviorEndpointGroupBuilder>?, string?)

Section titled “ AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, string, string, string, Action<IRestBehaviorEndpointGroupBuilder>?, string?)”

Adds a low-code generated REST module that fans one generated behavior-id root prefix out into several derived route groups while reusing the inline module id as the generated prefix.

public static EngineBuilder AddGeneratedRestBehaviorModuleGroups<TMarker>(this EngineBuilder engine, string moduleId, string displayName, string description, Action<IRestBehaviorEndpointGroupBuilder>? configureGroup = null, string? version = null)

engine EngineBuilder

The engine builder to extend.

moduleId string

The stable module identifier.

displayName string

The human-readable module name.

description string

The module description.

configureGroup Action<IRestBehaviorEndpointGroupBuilder>?

An optional callback that applies shared group-level conventions such as ApiVersion(…), WithTagName(…), or WithHostGovernanceScope(…) to each derived route group before the generated profiles are mapped.

version string?

The declared module version, when one is available.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

Use this overload when the module id already matches the generated root prefix the inline module should own. When the module needs explicit dependency, tag, or metadata declarations, use the descriptor-based overload explicitly.

AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, ModuleDescriptor, string, Action<IRestBehaviorEndpointGroupBuilder>?)

Section titled “ AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, ModuleDescriptor, string, Action<IRestBehaviorEndpointGroupBuilder>?)”

Adds a low-code generated REST module that fans one generated behavior-id root prefix out into several derived route groups.

public static EngineBuilder AddGeneratedRestBehaviorModuleGroups<TMarker>(this EngineBuilder engine, ModuleDescriptor descriptor, string behaviorIdPrefix, Action<IRestBehaviorEndpointGroupBuilder>? configureGroup = null)

engine EngineBuilder

The engine builder to extend.

descriptor ModuleDescriptor

The descriptor that identifies the inline module.

behaviorIdPrefix string

The root dot-separated behavior-id prefix whose child parent prefixes become the derived public route groups.

configureGroup Action<IRestBehaviorEndpointGroupBuilder>?

An optional callback that applies shared group-level conventions such as ApiVersion(…), WithTagName(…), or WithHostGovernanceScope(…) to each derived route group before the generated profiles are mapped.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

This helper still creates a real module and still maps through the same generated profile-group projection, precedence, governance, and runtime-catalog pipeline as . It does not publish public REST from [AppBehavior] alone.

AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, ModuleDescriptor, Action<string, IRestBehaviorEndpointGroupBuilder>)

Section titled “ AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, ModuleDescriptor, Action<string, IRestBehaviorEndpointGroupBuilder>)”

Adds a low-code generated REST module that fans one generated behavior-id root prefix out into several derived route groups while applying per-derived-group conventions with awareness of the derived generated behavior-id prefix.

public static EngineBuilder AddGeneratedRestBehaviorModuleGroups<TMarker>(this EngineBuilder engine, ModuleDescriptor descriptor, Action<string, IRestBehaviorEndpointGroupBuilder> configureGroup)

engine EngineBuilder

The engine builder to extend.

descriptor ModuleDescriptor

The descriptor that identifies the inline module.

configureGroup Action<string, IRestBehaviorEndpointGroupBuilder>

The callback applied to each derived route group before the generated profiles are mapped. The first argument is the derived behavior-id prefix for that route group.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, string, string, string, Action<string, IRestBehaviorEndpointGroupBuilder>, string?)

Section titled “ AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, string, string, string, Action<string, IRestBehaviorEndpointGroupBuilder>, string?)”

Adds a low-code generated REST module that fans one generated behavior-id root prefix out into several derived route groups while applying per-derived-group conventions with awareness of the derived generated behavior-id prefix.

public static EngineBuilder AddGeneratedRestBehaviorModuleGroups<TMarker>(this EngineBuilder engine, string moduleId, string displayName, string description, Action<string, IRestBehaviorEndpointGroupBuilder> configureGroup, string? version = null)

engine EngineBuilder

The engine builder to extend.

moduleId string

The stable module identifier.

displayName string

The human-readable module name.

description string

The module description.

configureGroup Action<string, IRestBehaviorEndpointGroupBuilder>

The callback applied to each derived route group before the generated profiles are mapped. The first argument is the derived behavior-id prefix for that route group.

version string?

The declared module version, when one is available.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, ModuleDescriptor, string, Action<string, IRestBehaviorEndpointGroupBuilder>)

Section titled “ AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, ModuleDescriptor, string, Action<string, IRestBehaviorEndpointGroupBuilder>)”

Adds a low-code generated REST module that fans one generated behavior-id root prefix out into several derived route groups while applying per-derived-group conventions with awareness of the derived generated behavior-id prefix.

public static EngineBuilder AddGeneratedRestBehaviorModuleGroups<TMarker>(this EngineBuilder engine, ModuleDescriptor descriptor, string behaviorIdPrefix, Action<string, IRestBehaviorEndpointGroupBuilder> configureGroup)

engine EngineBuilder

The engine builder to extend.

descriptor ModuleDescriptor

The descriptor that identifies the inline module.

behaviorIdPrefix string

The root dot-separated behavior-id prefix whose child parent prefixes become the derived public route groups.

configureGroup Action<string, IRestBehaviorEndpointGroupBuilder>

The callback applied to each derived route group before the generated profiles are mapped. The first argument is the derived behavior-id prefix for that route group.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, string, string, string, string, Action<string, IRestBehaviorEndpointGroupBuilder>, string?)

Section titled “ AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, string, string, string, string, Action<string, IRestBehaviorEndpointGroupBuilder>, string?)”

Adds a low-code generated REST module that fans one generated behavior-id root prefix out into several derived route groups without requiring a manually constructed , while applying per-derived-group conventions with awareness of the derived generated behavior-id prefix.

public static EngineBuilder AddGeneratedRestBehaviorModuleGroups<TMarker>(this EngineBuilder engine, string moduleId, string displayName, string description, string behaviorIdPrefix, Action<string, IRestBehaviorEndpointGroupBuilder> configureGroup, string? version = null)

engine EngineBuilder

The engine builder to extend.

moduleId string

The stable module identifier.

displayName string

The human-readable module name.

description string

The module description.

behaviorIdPrefix string

The root dot-separated behavior-id prefix whose child parent prefixes become the derived public route groups.

configureGroup Action<string, IRestBehaviorEndpointGroupBuilder>

The callback applied to each derived route group before the generated profiles are mapped. The first argument is the derived behavior-id prefix for that route group.

version string?

The declared module version, when one is available.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, string, string, string, string, Action<IRestBehaviorEndpointGroupBuilder>?, string?)

Section titled “ AddGeneratedRestBehaviorModuleGroups<TMarker>(EngineBuilder, string, string, string, string, Action<IRestBehaviorEndpointGroupBuilder>?, string?)”

Adds a low-code generated REST module that fans one generated behavior-id root prefix out into several derived route groups without requiring a manually constructed .

public static EngineBuilder AddGeneratedRestBehaviorModuleGroups<TMarker>(this EngineBuilder engine, string moduleId, string displayName, string description, string behaviorIdPrefix, Action<IRestBehaviorEndpointGroupBuilder>? configureGroup = null, string? version = null)

engine EngineBuilder

The engine builder to extend.

moduleId string

The stable module identifier.

displayName string

The human-readable module name.

description string

The module description.

behaviorIdPrefix string

The root dot-separated behavior-id prefix whose child parent prefixes become the derived public route groups.

configureGroup Action<IRestBehaviorEndpointGroupBuilder>?

An optional callback that applies shared group-level conventions such as ApiVersion(…), WithTagName(…), or WithHostGovernanceScope(…) to each derived route group before the generated profiles are mapped.

version string?

The declared module version, when one is available.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly.

Use this overload when the inline module should keep the low-ceremony string-based module descriptor path but its module id and generated root prefix should differ. When the module needs explicit dependency, tag, or metadata declarations, use the descriptor-based overload explicitly.

AddRestBehaviorModule<TMarker>(EngineBuilder, string, string, string, Action<IRestBehaviorModuleBuilder>, string?)

Section titled “ AddRestBehaviorModule<TMarker>(EngineBuilder, string, string, string, Action<IRestBehaviorModuleBuilder>, string?)”

Adds a low-code behavior-backed REST module without requiring a dedicated subclass or a manually constructed .

public static EngineBuilder AddRestBehaviorModule<TMarker>(this EngineBuilder engine, string moduleId, string displayName, string description, Action<IRestBehaviorModuleBuilder> configureRestBehaviors, string? version = null)

engine EngineBuilder

The engine builder to extend.

moduleId string

The stable module identifier.

displayName string

The human-readable module name.

description string

The module description.

configureRestBehaviors Action<IRestBehaviorModuleBuilder>

The callback that declares owned behaviors and their public REST surface.

version string?

The declared module version, when one is available.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly when MapGeneratedProfiles(…) is used.

This helper keeps the common inline module path low-ceremony while still materializing a real module descriptor and using the same projection, precedence, governance, and runtime catalog pipeline as the descriptor-based overload. When a module needs explicit dependency, tag, or metadata declarations, use the overload explicitly.

AddRestBehaviorModule<TMarker>(EngineBuilder, ModuleDescriptor, Action<IRestBehaviorModuleBuilder>)

Section titled “ AddRestBehaviorModule<TMarker>(EngineBuilder, ModuleDescriptor, Action<IRestBehaviorModuleBuilder>)”

Adds a low-code behavior-backed REST module without requiring a dedicated subclass.

public static EngineBuilder AddRestBehaviorModule<TMarker>(this EngineBuilder engine, ModuleDescriptor descriptor, Action<IRestBehaviorModuleBuilder> configureRestBehaviors)

engine EngineBuilder

The engine builder to extend.

descriptor ModuleDescriptor

The descriptor that identifies the inline module.

configureRestBehaviors Action<IRestBehaviorModuleBuilder>

The callback that declares owned behaviors and their public REST surface.

EngineBuilder

The same engine builder for fluent composition.

TMarker

A stable marker type from the module’s behavior assembly. Cephalon uses this marker both to create a distinct module type for engine validation and to resolve generated REST profile hints from the correct assembly when MapGeneratedProfiles(…) is used.

This helper remains explicit and module-owned. It does not publish public REST from [AppBehavior] alone. Use a dedicated subclass when a module needs richer lifecycle hooks, custom services, or additional manual endpoints. Use one stable marker type per inline module so engine module-type validation stays deterministic.