Пример #1
0
        public HtmlElementAdapter Create( HtmlElement element )
        {
            // does not work :(
            //if ( Document != element.Document )
            //{
            //    throw new InvalidOperationException( "Given element does not belong to this document" );
            //}

            if ( !myElementAdapters.ContainsKey( element ) )
            {
                myElementAdapters[ element ] = new HtmlElementAdapter( this, element );
            }

            return myElementAdapters[ element ];
        }
Пример #2
0
        public HtmlElementAdapter Create(HtmlElement element)
        {
            // does not work :(
            //if ( Document != element.Document )
            //{
            //    throw new InvalidOperationException( "Given element does not belong to this document" );
            //}

            if (!myElementAdapters.ContainsKey(element))
            {
                myElementAdapters[element] = new HtmlElementAdapter(this, element);
            }

            return(myElementAdapters[element]);
        }