Event arguments for DownloadRequestBeginTransactionEventHandler delegate.
Inheritance: System.ComponentModel.CancelEventArgs
 //http://code.google.com/p/csexwb2/issues/detail?id=77
 //Fired to indicate when a request for a resource is about to be initiated
 void WebBrower_ProtocolHandlerBeginTransaction(object sender, ProtocolHandlerBeginTransactionEventArgs e)
 {
     HttpRequestUrls.Add(e.URL);
     if (this.FilterRequest && this.FilterAction.Count > 0)
     {
         foreach (KeyValuePair<string, Func<string,string, bool>> keyValuePair in FilterAction)
         {
             if (keyValuePair.Value(keyValuePair.Key, e.URL))
             {
                 e.Cancel = true;
             }
         }
     }
     //Debug.Print(">>>>>>ProtocolHandlerBeginTransaction=> " + e.URL);
     //+ "\r\nRequestHeaders >>\r\n" + e.RequestHeaders);
 }
Beispiel #2
0
 void m_csexwbCOMLib_ManagedAppBeginningTransaction(string sURL, string sRequestHeaders, ref string sAdditionalHeaders, ref bool Cancel)
 {
     if (ProtocolHandlerBeginTransaction != null)
     {
         ProtocolHandlerBeginTransactionEventArgs args = new ProtocolHandlerBeginTransactionEventArgs(sURL, sRequestHeaders);
         ProtocolHandlerBeginTransaction(this, args);
         if (!string.IsNullOrEmpty(args.AdditionalHeadersToAdd))
             sAdditionalHeaders = args.AdditionalHeadersToAdd;
         Cancel = args.Cancel;
     }
 }