CsQuery.CQ.CreateNew C# (CSharp) Метод

CreateNew() защищенный Метод

Bind this instance to a new DomFragment created from HTML in a specific HTML tag context.
protected CreateNew ( CQ target, System.Stream html, Encoding encoding, HtmlParsingMode parsingMode, HtmlParsingOptions parsingOptions, DocType docType ) : void
target CQ /// The target. ///
html System.Stream /// The HTML. ///
encoding System.Text.Encoding /// The character set encoding. ///
parsingMode HtmlParsingMode /// The HTML parsing mode. ///
parsingOptions HtmlParsingOptions /// (optional) options for controlling the parsing. ///
docType DocType /// (optional) type of the document. ///
Результат void
        protected void CreateNew(CQ target,
          Stream html,
          Encoding encoding,
          HtmlParsingMode parsingMode,
          HtmlParsingOptions parsingOptions,
          DocType docType)
        {

            target.Document = DomDocHelper.Create(html, encoding, parsingMode, parsingOptions, docType);

            //  enumerate ChildNodes when creating a new fragment to be sure the selection set only
            //  reflects the original document. 

            target.SetSelection(Document.ChildNodes.ToList(), SelectionSetOrder.Ascending);
        }