/// <summary> /// 获取MpHelper,MpHelper是关于公众号的方法,避免方法名称冲突 /// </summary> /// <param name="helper"></param> /// <returns></returns> public static IQyHelper Qy(this IAPIHelper helper, APIType type = APIType.Weixin) { switch (type) { case APIType.Weixin: default: return(WeixinQyAPIHelper.Instance()); case APIType.Dingtalk: return(DingtalkQyAPIHelper.Instance()); } }
/// <summary> /// 获取单例对象 /// </summary> /// <returns></returns> internal static DingtalkQyAPIHelper Instance() { if (_instance == null) { lock (lockObject) { if (_instance == null) { _instance = new DingtalkQyAPIHelper(); } } } return(_instance); }