/// <summary> /// 构造函数 /// </summary> /// <param name="config"></param> public WxBaseApi(WxAppCoinfig config) { if (config == null && DefaultConfig == null) { throw new ArgumentNullException("config", "构造函数中的config 和 全局DefaultConfig 配置信息同时为空,请通过构造函数赋值,或者在程序入口处给 DefaultConfig 赋值!"); } _config = config; }
/// <summary> /// 构造函数 /// </summary> /// <param name="config"></param> /// <param name="isAsync"></param> public WxBaseApi(WxAppCoinfig config, bool isAsync = false) { if (config == null && DefaultConfig == null) { throw new ArgumentNullException("config", "构造函数中的config 和 全局DefaultConfig 配置信息同时为空,请通过构造函数赋值,或者在程序入口处给 DefaultConfig 赋值!"); } m_Config = config; IsAsync = isAsync; }