Corrected typos (#11000)
parent
8e2374ba5c
commit
ce52bb5ebd
|
@ -114,7 +114,7 @@ The `HandleRequirementAsync` method you implement in an authorization handler ha
|
|||
|
||||
For example, MVC passes an instance of [AuthorizationFilterContext](/dotnet/api/?term=AuthorizationFilterContext) in the `Resource` property. This property provides access to `HttpContext`, `RouteData`, and everything else provided by MVC and Razor Pages.
|
||||
|
||||
The use of the `Resource` property is framework specific. Using information in the `Resource` property limits your authorization policies to particular frameworks. You should cast the `Resource` property using the `as` keyword, and then confirm the cast has succeed to ensure your code doesn't crash with an `InvalidCastException` when run on other frameworks:
|
||||
The use of the `Resource` property is framework specific. Using information in the `Resource` property limits your authorization policies to particular frameworks. You should cast the `Resource` property using the `is` keyword, and then confirm the cast has succeeded to ensure your code doesn't crash with an `InvalidCastException` when run on other frameworks:
|
||||
|
||||
```csharp
|
||||
// Requires the following import:
|
||||
|
|
Loading…
Reference in New Issue