1
This commit is contained in:
22
Services/WeChatSettingsService.cs
Normal file
22
Services/WeChatSettingsService.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
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"];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user