Ejemplo n.º 1
0
 public bool OnResourceResponse(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IRequest request, IResponse response)
 {
     if (request.Url.Contains(".ts"))
     {
         var content_length = int.Parse(response.ResponseHeaders["Content-Length"]);
         var filter         = FilterManager.GetFileter(request.Identifier.ToString()) as TestFilter;
         filter.SetContentLength(content_length);
     }
     return(false);
 }
Ejemplo n.º 2
0
 public void OnResourceLoadComplete(IWebBrowser chromiumWebBrowser, IBrowser browser, IFrame frame, IRequest request, IResponse response, UrlRequestStatus status, long receivedContentLength)
 {
     foreach (var single in downloadLst)
     {
         if (request.Url.Contains(single))
         {
             var filter = FilterManager.GetFileter(request.Identifier.ToString()) as TestFilter;
             NotifyMsg?.Invoke(single, filter.dataAll.ToArray());
             FilterManager.RemoveFileter(request.Identifier.ToString());
             break;
         }
     }
 }