RequiredScopeExtensions.RequireScope<TBuilder> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This method adds metadata to route endpoint to describe required scopes. It's the imperative version of the [RequiredScope] attribute.
public static TBuilder RequireScope<TBuilder> (this TBuilder endpointConventionBuilder, params string[] scope) where TBuilder : Microsoft.AspNetCore.Builder.IEndpointConventionBuilder;
static member RequireScope : 'Builder * string[] -> 'Builder (requires 'Builder :> Microsoft.AspNetCore.Builder.IEndpointConventionBuilder)
<Extension()>
Public Function RequireScope(Of TBuilder As IEndpointConventionBuilder) (endpointConventionBuilder As TBuilder, ParamArray scope As String()) As TBuilder
Type Parameters
- TBuilder
Class implementing IEndpointConventionBuilder.
Parameters
- endpointConventionBuilder
- TBuilder
To customize the endpoints.
- scope
- String[]
Scope.
Returns
TBuilder
Builder.