Home

Awesome

Jiguang.JPush.Extensions

Build status

中文文档

Jiguang.JPush.Extensions is an extension library that allows you to use JPush easier in Asp.net core / .Net core 2.0+

Supported platforms

Installation

Nuget package

Basic use

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"
}

Now, you can use JPushClient in your classes.

private readonly JPushClient _client;

public Constructor(JPushClient client)
{
    _client = client;
}

Other information