Jiguang.JPush.Extensions is an extension library that allows you to use JPush easier in Asp.net core / .Net Stadard 2.0+
- .Net Standard 2.0+
Add JPush into Startup.ConfigureServices:
services.AddJPush(options =>
{
options.AppKey = "Your AppKey";
options.MasterSecret = "Your MasterSecret";
});Or, you can use another method, like below:
var configuration = new ConfigurationBuilder()
.AddJsonFile("whatever.json")
.Build();
services.AddJPush(configuration);If you use this way, you need to add a whatever.json file first, and with content:
{
"AppKey": "Your AppKey",
"MasterSecret": "Your MasterSecret"
}You can also just call
AddJPush()without any parameters, by doing this, you need to configureJPushOptionswithservices.Configure<JPushOptions>(configuration)inStartup.ConfigureServicesmethod.
Now, you can use JPushClient in your classes.
private readonly JPushClient _client;
public Constructor(JPushClient client)
{
_client = client;
}- The package version like v1.1.0 is related to Jiguang.JPush's v1.1.0, and so on.
- Newer version of Jiguang.JPush will be covered by Azure Pipelines automatically every month.
- Please raise an issue or contact me directly if some version hasn't been covered.