Click here to Skip to main content
15,896,269 members
Articles / Code generation

Semi generated crawler

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
22 Jun 2012CPOL4 min read 21.6K   599   10  
Leverage Visual studio Web Test Framework for your crawling needs...
using LightWebTestFramework.Rules;
using System;
namespace LightWebTestFramework
{
	public class ValidationEventArgs : EventArgs
	{
		private WebTest m_webTest;
		private WebTestRequest m_request;
		private WebTestResponse m_response;
		private ValidationLevel m_validationLevel;
		private RuleResult m_ruleResult;
		private TimeSpan m_totalDuration;
		public WebTest WebTest
		{
			get
			{
				return this.m_webTest;
			}
		}
		public string Message
		{
			get
			{
				return this.m_ruleResult.Message;
			}
			set
			{
				this.m_ruleResult.Message = value;
			}
		}
		public bool IsValid
		{
			get
			{
				return this.m_ruleResult.Success;
			}
			set
			{
				this.m_ruleResult.Success = value;
			}
		}
		public ValidationLevel ValidationLevel
		{
			get
			{
				return this.m_validationLevel;
			}
		}
		public WebTestRequest Request
		{
			get
			{
				return this.m_request;
			}
		}
		public TimeSpan RequestDuration
		{
			get
			{
				return this.m_totalDuration;
			}
		}
		public WebTestResponse Response
		{
			get
			{
				return this.m_response;
			}
		}
		internal RuleResult RuleResult
		{
			get
			{
				return this.m_ruleResult;
			}
		}
		internal ValidationEventArgs(WebTest webTest, WebTestRequest request, WebTestResponse response, ValidationLevel validationLevel, TimeSpan duration) : this(webTest, request, response, validationLevel)
		{
			this.m_totalDuration = duration;
		}
		internal ValidationEventArgs(WebTest webTest, WebTestRequest request, WebTestResponse response, ValidationLevel validationLevel)
		{
			this.m_webTest = webTest;
			this.m_request = request;
			this.m_response = response;
			this.m_validationLevel = validationLevel;
			this.m_ruleResult = new RuleResult();
			this.m_ruleResult.RuleType = Resources.ValidationRuleType;
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer Freelance
France France
I am currently the CTO of Metaco, we are leveraging the Bitcoin Blockchain for delivering financial services.

I also developed a tool to make IaaS on Azure more easy to use IaaS Management Studio.

If you want to contact me, go this way Smile | :)

Comments and Discussions