/// <summary>
 /// 获取一个实例
 /// </summary>
 /// <returns>工厂类对象</returns>
 public static WeiXinHandlerFactory GetInstance()
 {
     if (_weiXinHandlerFactory == null)
     {
         _weiXinHandlerFactory = new WeiXinHandlerFactory();;
     }
     return(_weiXinHandlerFactory);
 }
 /// <summary>
 /// 获取一个实例
 /// </summary>
 /// <returns>工厂类对象</returns>
 public static WeiXinHandlerFactory GetInstance()
 {
     if (_weiXinHandlerFactory == null)
     {
         _weiXinHandlerFactory = new WeiXinHandlerFactory(); ;
     }
     return _weiXinHandlerFactory;
 }
示例#3
0
 /// <summary>
 /// 获取响应消息xml格式字符串
 /// </summary>
 /// <returns>响应消息xml格式字符串</returns>
 public string GetResponseXml()
 {
     try
     {
         IWeiXinHandler weiXinHandler = WeiXinHandlerFactory.GetInstance().CreateWeiXinHandler(this._context.Request);
         weiXinHandler.ProcessWeiXin(this._context);
     }
     catch (WeiXinHandlerNotFoundException ex)
     {
         throw ex;
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(this._context.Response.ResponseXml);
 }