共用方式為


ApiParameterRouteInfo.Constraints 屬性

定義

取得或設定 參數的 IRouteConstraint 物件集合。

public:
 property System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Routing::IRouteConstraint ^> ^ Constraints { System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Routing::IRouteConstraint ^> ^ get(); void set(System::Collections::Generic::IEnumerable<Microsoft::AspNetCore::Routing::IRouteConstraint ^> ^ value); };
public System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.IRouteConstraint> Constraints { get; set; }
public System.Collections.Generic.IEnumerable<Microsoft.AspNetCore.Routing.IRouteConstraint>? Constraints { get; set; }
member this.Constraints : seq<Microsoft.AspNetCore.Routing.IRouteConstraint> with get, set
Public Property Constraints As IEnumerable(Of IRouteConstraint)

屬性值

備註

只有在值系結自 URL 的路徑時,才會套用路由條件約束。 如需考慮的資料來源,請參閱 Source

適用於