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

Create() публичный статический Метод

Create a new CQ from an HTML fragment, and use quickSet to create attributes (and/or css)
public static Create ( string html, object quickSet ) : CQ
html string /// A string of HTML. ///
quickSet object /// an object containing CSS properties and attributes to be applied to the resulting fragment. ///
Результат CQ
        public static CQ Create(string html, object quickSet)
        {
            CQ csq = CQ.Create(html);
            return csq.AttrSet(quickSet, true);
        }

Same methods

CQ::Create ( ) : CQ
CQ::Create ( IDomObject element ) : CQ
CQ::Create ( IEnumerable elements ) : CQ
CQ::Create ( System.Stream html ) : CQ
CQ::Create ( System.Stream html, Encoding encoding ) : CQ
CQ::Create ( System.Stream html, Encoding encoding = null, HtmlParsingMode parsingMode = HtmlParsingMode.Auto, HtmlParsingOptions parsingOptions = HtmlParsingOptions.Default, DocType docType = DocType.Default ) : CQ
CQ::Create ( System.Text.TextReader html ) : CQ
CQ::Create ( System.Text.TextReader html, HtmlParsingMode parsingMode = HtmlParsingMode.Auto, HtmlParsingOptions parsingOptions = HtmlParsingOptions.Default, DocType docType = DocType.Default ) : CQ
CQ::Create ( char html ) : CQ
CQ::Create ( string html ) : CQ
CQ::Create ( string html, HtmlParsingMode parsingMode = HtmlParsingMode.Auto, HtmlParsingOptions parsingOptions = HtmlParsingOptions.Default, DocType docType = DocType.Default ) : CQ

Usage Example

Пример #1
0
        /// <summary>
        /// Runs a set of HTML creation selectors and returns result as a single enumerable.
        /// </summary>
        ///
        /// <param name="content">
        /// A sequence of strings that are each valid HTML
        /// </param>
        ///
        /// <returns>
        /// A new sequence containing all the elements from all the selectors.
        /// </returns>

        protected IEnumerable <IDomObject> MergeContent(IEnumerable <string> content)
        {
            List <IDomObject> allContent = new List <IDomObject>();

            foreach (var item in content)
            {
                allContent.AddRange(CQ.Create(item));
            }
            return(allContent);
        }
All Usage Examples Of CsQuery.CQ::Create