Пример #1
0
 /// <summary>
 /// GET, POST... 등등에 해당하는 값을 가져옵니다 
 /// </summary>
 /// <param name="Request"></param>
 /// <param name="Key"></param>
 /// <param name="DefaultValue"></param>
 /// <returns></returns>
 public static string GetValue(this IWebHttpRequest Request, string Key, string DefaultValue = null)
 {
     string value = GetParam(Request, Key, DefaultValue);
     return value == null && Request.FormAvailable ?
         (Request.Form.Exist(Key) ? Request.Form[Key][0] : DefaultValue) :
         value;
 }
Пример #2
0
 public static string GetHeader(this IWebHttpRequest Request, string Key, string DefaultValue = null) => Request.Headers.Exist(Key) ? Request.Headers[Key][0] : DefaultValue;
Пример #3
0
 public static string GetParam(this IWebHttpRequest Request, string Key, string DefaultValue = null) => Request.Params.Exist(Key) ? Request.Params[Key][0] : DefaultValue;
Пример #4
0
 /// <summary>
 /// 通过提供WebHttp请求方法构造webservice检查
 /// </summary>
 /// <param name="whr"></param>
 public DefaultWsConnectionCheck(IWebHttpRequest whr)
 {
     this.Web = whr;
 }
Пример #5
0
 public WebHttpContext(IWebHttpRequest Request, IWebHttpResponse Response, WebHttpSession Session, IWebHttpInfo Info)
 {
     this.Request = Request; this.Response = Response; this.Session = Session; this.Info = Info;
 }
Пример #6
0
 public WebHttpContextRaw(IWebHttpRequest Request, IWebHttpResponse Response, WebHttpSessionRaw Session, IWebHttpInfo Info, IWebSocketContext Socket)
 {
     this.Request = Request; this.Response = Response; this.Session = Session; this.Info = Info; this.Socket = Socket;
 }