using System.Collections; using System.Collections.Generic; using System.Text.RegularExpressions; namespace Rokojori { public class HtmlElementNodeName:HtmlElementSelector { public static readonly HtmlElementNodeName html = CreateNodeName( "html" ); public static readonly HtmlElementNodeName head = CreateNodeName( "head" ); public static readonly HtmlElementNodeName body = CreateNodeName( "body" ); public static readonly HtmlElementNodeName br = CreateNodeName( "br" ); public static readonly HtmlElementNodeName a = CreateNodeName( "a" ); public static readonly HtmlElementNodeName style = CreateNodeName( "style" ); public static readonly HtmlElementNodeName script = CreateNodeName( "script" ); string _nodeName; public string selector => _nodeName; public static HtmlElementNodeName CreateNodeName( string type ) { var elementNodeType = new HtmlElementNodeName(); elementNodeType._nodeName = type; return elementNodeType; } public HtmlElementNode Create( HtmlDocument document ) { return new HtmlElementNode( document, _nodeName ); } public bool Selects( HtmlElementNode elementNode ) { return elementNode.nodeName == _nodeName; } } }