Beispiel #1
0
        public static RequestPacket CreateStringPacket(string uid, string url, IWebPageReader reader, RequestPacketOwners owner,
                                                       IUiResponseHandler analisisModuleResponseUI = null, IResponseHandler offlineModuleResponse = null, IResponseHandler onlineModuleResponse = null)
        {
            var r = new RequestPacket()
            {
                RequestType = RequestPacketRequestTypes.Str, Uid = uid, Url = url, WebpageReader = reader, Owner = owner
            };

            if (analisisModuleResponseUI != null)
            {
                r.AnalisisModuleResponseUI = analisisModuleResponseUI;
            }
            if (offlineModuleResponse != null)
            {
                r.OfflineModuleResponse = offlineModuleResponse;
            }
            if (onlineModuleResponse != null)
            {
                r.OnlineModuleResponse = onlineModuleResponse;
            }

            Android.Util.Log.Debug("RequestPacket", $"Created {++MyGlobal.requestPacketCount}");

            return(r);
        }
 public void RequestStringData(string uid, IWebPageReader webpageReader, IUiResponseHandler responseHandler)
 {
     pendingRequest.Enqueue(
         RequestPacket.CreateStringPacket(uid, webpageReader, RequestPacketOwners.AnalysisModule, responseHandler));
 }
Beispiel #3
0
 public static RequestPacket CreateStringPacket(string uid, IWebPageReader reader, RequestPacketOwners owner,
                                                IUiResponseHandler analisisModuleResponseUI = null, IResponseHandler offlineModuleResponse = null, IResponseHandler onlineModuleResponse = null)
 => CreateStringPacket(uid, reader.Url, reader, owner, analisisModuleResponseUI, offlineModuleResponse, onlineModuleResponse);