Пример #1
0
        public void web_reg_find(WebRegFindArgs args)
        {
            var del = new ResponseDelegate(ResponseEventFactory.WebRegFind);

            responseEvents.Add(new RegisterEvent()
            {
                DelegateEvent = del, EventArgs = args
            });
        }
Пример #2
0
        public void web_reg_find(params object[] attrs)
        {
            Dictionary <string, string> attributes = getAttributes(attrs);
            WebRegFindArgs args = new WebRegFindArgs();

            args.Log = this.Log;
            if (attributes.ContainsKey("search"))
            {
                string search = attributes["search"].ToLower();
                if (search == "body")
                {
                    args.Search = SearchIn.Body;
                }
                else if (search == "headers")
                {
                    args.Search = SearchIn.Headers;
                }
            }

            if (attributes.ContainsKey("fail"))
            {
                string search = attributes["fail"].ToLower();
                if (search == "found")
                {
                    args.Fail = FailIf.Found;
                }
            }

            if (attributes.ContainsKey("text"))
            {
                args.Text = attributes["text"];
            }
            else
            {
                Log.Warring("web_reg_find Missing parameter [Text] web_reg_find not register");
                return;
            }

            functionCore.web_reg_find(args);
            Log.Log("Registering web_reg_find was successful");
        }