Пример #1
0
        private void PrepareQueue()
        {
            RequestGenerator RG              = new RequestGenerator(Generators);
            List <string>    RequestListGET  = RG.GenerateRequestList(URL);
            List <string>    RequestListPOST = RG.GenerateRequestList(URL);

            if (RequestListGET.Count > 0)
            {
                requestAnzahl = RequestListGET.Count;
            }
            else
            {
                requestAnzahl = RequestListPOST.Count;
            }

            foreach (string _URL in RequestListGET)
            {
                if (post.Length == 0)
                {
                    CreateWebrequest webRequest = new CreateWebrequest();
                    webRequest.URL = _URL;
                    Work.Enqueue(webRequest);
                }
                else
                {
                    foreach (string _POST in RequestListPOST)
                    {
                        CreateWebrequest webRequest = new CreateWebrequest();
                        webRequest.URL  = _URL;
                        webRequest.POST = _POST;
                        Work.Enqueue(webRequest);
                    }
                }
            }
        }
Пример #2
0
        private void PrepareQueue()
        {
            RequestGenerator RG = new RequestGenerator(Generators);
            List<string> RequestListGET = RG.GenerateRequestList(URL);
            List<string> RequestListPOST = RG.GenerateRequestList(URL);

            if (RequestListGET.Count > 0)
                requestAnzahl = RequestListGET.Count;
            else
                requestAnzahl = RequestListPOST.Count;

            foreach (string _URL in RequestListGET)
            {
                if (post.Length == 0)
                {
                    CreateWebrequest webRequest = new CreateWebrequest();
                    webRequest.URL = _URL;
                    Work.Enqueue(webRequest);
                }
                else
                {
                    foreach (string _POST in RequestListPOST)
                    {
                        CreateWebrequest webRequest = new CreateWebrequest();
                        webRequest.URL = _URL;
                        webRequest.POST = _POST;
                        Work.Enqueue(webRequest);
                    }
                }
            }
        }