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

Class BehaviorRestProfileAttribute

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

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

Declares metadata-only REST projection preferences for a behavior without publishing a public REST route.

[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class BehaviorRestProfileAttribute : Attribute

objectAttributeBehaviorRestProfileAttribute

Attribute.Equals(object?), Attribute.GetCustomAttribute(Assembly, Type), Attribute.GetCustomAttribute(Assembly, Type, bool), Attribute.GetCustomAttribute(MemberInfo, Type), Attribute.GetCustomAttribute(MemberInfo, Type, bool), Attribute.GetCustomAttribute(Module, Type), Attribute.GetCustomAttribute(Module, Type, bool), Attribute.GetCustomAttribute(ParameterInfo, Type), Attribute.GetCustomAttribute(ParameterInfo, Type, bool), Attribute.GetCustomAttributes(Assembly), Attribute.GetCustomAttributes(Assembly, bool), Attribute.GetCustomAttributes(Assembly, Type), Attribute.GetCustomAttributes(Assembly, Type, bool), Attribute.GetCustomAttributes(MemberInfo), Attribute.GetCustomAttributes(MemberInfo, bool), Attribute.GetCustomAttributes(MemberInfo, Type), Attribute.GetCustomAttributes(MemberInfo, Type, bool), Attribute.GetCustomAttributes(Module), Attribute.GetCustomAttributes(Module, bool), Attribute.GetCustomAttributes(Module, Type), Attribute.GetCustomAttributes(Module, Type, bool), Attribute.GetCustomAttributes(ParameterInfo), Attribute.GetCustomAttributes(ParameterInfo, bool), Attribute.GetCustomAttributes(ParameterInfo, Type), Attribute.GetCustomAttributes(ParameterInfo, Type, bool), Attribute.GetHashCode(), Attribute.IsDefaultAttribute(), Attribute.IsDefined(Assembly, Type), Attribute.IsDefined(Assembly, Type, bool), Attribute.IsDefined(MemberInfo, Type), Attribute.IsDefined(MemberInfo, Type, bool), Attribute.IsDefined(Module, Type), Attribute.IsDefined(Module, Type, bool), Attribute.IsDefined(ParameterInfo, Type), Attribute.IsDefined(ParameterInfo, Type, bool), Attribute.Match(object?), Attribute.TypeId, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

This attribute does not activate public REST by itself. Cephalon keeps public REST module-owned, so the attribute only describes a candidate method, relative route pattern, and optional API version for future generated or descriptor-backed module projections. Use repeated declarations when a module-owned projection should bind selected input properties explicitly from route values, query string values, headers, or JSON body fields. When a profile declares explicit bindings and still needs remaining query values to flow implicitly, set to true.

BehaviorRestProfileAttribute(BehaviorRestMethod, string)

Section titled “ BehaviorRestProfileAttribute(BehaviorRestMethod, string)”

Initializes a new instance of .

public BehaviorRestProfileAttribute(BehaviorRestMethod method, string relativePattern)

method BehaviorRestMethod

The candidate REST method for a future module-owned projection.

relativePattern string

The candidate route pattern relative to a future owning REST group, for example ”/{cartId}” or ”/{cartId}/items”.

Gets or sets the candidate API major version for the future REST projection.

public int ApiVersionMajor { get; set; }

int

The default value 0 means “unspecified”. Host-level publication still depends on the published OpenAPI document allow-list such as OpenApi:EnabledVersions.

Gets the candidate REST method for the future module-owned projection.

public BehaviorRestMethod Method { get; }

BehaviorRestMethod

Gets or sets a value indicating whether explicit profile bindings should preserve the remaining implicit query-string fallback surface.

public bool PreserveImplicitQueryFallback { get; set; }

bool

This flag is meaningful only when the profile also declares explicit bindings through . It lets module-owned shorthand keep selected explicit route/query/header/body bindings while still letting unbound query-string values populate the remaining input properties deterministically.

Gets the candidate route pattern relative to a future owning REST group.

public string RelativePattern { get; }

string