Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
huangxiangyao committed Sep 18, 2023
1 parent 6ec708a commit a655260
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

A Razor ViewLocationExpander to serve dedicated views for Weixin or what-you-need browsers.

## Usage
### ConfigureServices()
```csharp
services.AddViewDivert();
```

### Use ViewDivert attribute
1.Put the attribute on Controller, so effect all actions in this Controller:
1. Put the attribute on Controller, so effect all actions in this Controller:
```csharp
/// <summary>
/// YES, ViewDivert on all actions!
Expand All @@ -31,7 +32,7 @@ public class HomeController : Controller
}
```

2.Put only on the specified action(s):
2. Put only on the specified action(s):
```csharp
public class Home2Controller : Controller
{
Expand Down Expand Up @@ -94,6 +95,6 @@ public class DeviceController : Controller
}
```

# Dev
## Dev
* [Visual Studio 2022](https://visualstudio.microsoft.com)
* [.NET 7.0, 6.0, 3.1](https://dotnet.microsoft.com/en-us/download/dotnet)

0 comments on commit a655260

Please sign in to comment.