HtmlKit.HtmlWriter.ValidateAttributeName C# (CSharp) Method

ValidateAttributeName() static private method

static private ValidateAttributeName ( string name ) : void
name string
return void
		static void ValidateAttributeName (string name)
		{
			if (name == null)
				throw new ArgumentNullException ("name");

			if (name.Length == 0)
				throw new ArgumentException ("The attribute name cannot be empty.", "name");

			if (!HtmlUtils.IsValidTokenName (name))
				throw new ArgumentException ("Invalid attribute name.", "name");
		}