Exemple #1
0
 /// <summary>
 /// 根据 SenparcWeixinSetting 自动注册第三方平台信息
 /// </summary>
 /// <param name="registerService">RegisterService</param>
 /// <param name="weixinSettingForWork">SenparcWeixinSetting</param>
 /// <param name="name">统一标识,如果为null,则使用 SenparcWeixinSetting.ItemKey </param>
 /// <returns></returns>
 public static IRegisterService RegisterWorkAccount(this IRegisterService registerService, Weixin.Entities.ISenparcWeixinSettingForWork weixinSettingForWork, string name = null)
 {
     //配置全局参数
     if (!string.IsNullOrWhiteSpace(name))
     {
         Config.SenparcWeixinSetting[name] = new SenparcWeixinSettingItem(weixinSettingForWork);
     }
     return(RegisterWorkAccount(registerService, weixinSettingForWork.WeixinCorpId, weixinSettingForWork.WeixinCorpSecret, name ?? weixinSettingForWork.ItemKey));
 }
Exemple #2
0
 /// <summary>
 /// 根据 SenparcWeixinSetting 自动注册第三方平台信息
 /// </summary>
 /// <param name="registerService">RegisterService</param>
 /// <param name="weixinSettingForWork">SenparcWeixinSetting</param>
 /// <param name="name">统一标识,如果为null,则使用 SenparcWeixinSetting.ItemKey </param>
 /// <returns></returns>
 public static IRegisterService RegisterWorkAccount(this IRegisterService registerService, Weixin.Entities.ISenparcWeixinSettingForWork weixinSettingForWork, string name = null)
 {
     return(RegisterWorkAccount(registerService, weixinSettingForWork.WeixinCorpId, weixinSettingForWork.WeixinCorpSecret, name ?? weixinSettingForWork.ItemKey));
 }