22 lines
590 B
C#
22 lines
590 B
C#
using Microsoft.Extensions.Configuration;
|
|
|
|
namespace WeChatSharp.Services;
|
|
|
|
public interface IWeChatSettings
|
|
{
|
|
public string AppId { get; }
|
|
public string AppSecret { get; }
|
|
public string Token { get; }
|
|
}
|
|
public class WeChatSettingsService:IWeChatSettings
|
|
{
|
|
public string AppId { get;private set; }
|
|
public string AppSecret { get;private set; }
|
|
public string Token { get; private set; }
|
|
public WeChatSettingsService(IConfiguration configuration)
|
|
{
|
|
AppId = configuration["WeChat:AppId"];
|
|
AppSecret = configuration["WeChat:AppSecret"];
|
|
Token = configuration["WeChat:Token"];
|
|
}
|
|
} |