Exemplo n.º 1
0
 public HttpCommand(HttpSettings settings, string actionMethod, bool doWriteMessage, string writeMessage, ValidateResultEventHandler validateMethod)
 {
     CurrentHttpSettings = settings;
     method              = actionMethod;
     doWriteStream       = doWriteMessage;
     this.ValidateMethod = validateMethod;
     if (writeMessage != null)
     {
         if (writeMessage.Length > 0)
         {
             WriteStreamMessage(writeMessage);
         }
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the specified settings.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <param name="validateHandler">The validate method.</param>
 /// <returns></returns>
 public HttpCommand Get(HttpSettings settings, ValidateResultEventHandler validateHandler)
 {
     return(Create(settings, "GET", false, null, validateHandler));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Posts the specified settings.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <param name="postData">The post data.</param>
 /// <param name="validateHandler">The validate handler.</param>
 /// <returns></returns>
 public HttpCommand Post(HttpSettings settings, string postData, ValidateResultEventHandler validateHandler)
 {
     settings.ContentType = "application/x-www-form-urlencoded";
     return(Create(settings, "POST", true, postData, validateHandler));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientServiceRequestContext"/> class.
 /// </summary>
 /// <param name="actionMethod">The action method.</param>
 /// <param name="getQuery">The get query.</param>
 /// <param name="doWriteMessage">if set to <c>true</c> [do write message].</param>
 /// <param name="writeMessage">The write message.</param>
 /// <param name="contentTypeString">The content type string.</param>
 /// <param name="useNetworkCredentials">if set to <c>true</c> [use network credentials].</param>
 /// <param name="validateMethod">The validate method.</param>
 public ClientServiceRequestContext(string actionMethod, string getQuery, bool doWriteMessage, string writeMessage, string contentTypeString, bool useNetworkCredentials, ValidateResultEventHandler validateMethod)
     : this(actionMethod, getQuery, doWriteMessage, writeMessage)
 {
     contentType         = contentTypeString;
     isWindowsSecurity   = useNetworkCredentials;
     this.ValidateMethod = validateMethod;
 }