コード例 #1
0
        /// <summary>
        /// Selects all elements except the element passed as a parameter.
        /// </summary>
        ///
        /// <param name="element">
        /// The element to exclude.
        /// </param>
        ///
        /// <returns>
        /// A new CQ object.
        /// </returns>
        ///
        /// <url>
        /// http://api.jquery.com/not/
        /// </url>

        public CQ Not(IDomObject element)
        {
            return(Not(Objects.Enumerate(element)));
        }
コード例 #2
0
        /// <summary>
        /// Wrap an HTML structure around each element in the set of matched elements.
        /// </summary>
        ///
        /// <param name="element">
        /// An element which is the structure to wrap around the selection set.
        /// </param>
        ///
        /// <returns>
        /// The current CQ object.
        /// </returns>
        ///
        /// <url>
        /// http://api.jquery.com/wrap/
        /// </url>

        public CQ Wrap(IDomObject element)
        {
            return(Wrap(Objects.Enumerate(element)));
        }
コード例 #3
0
        /// <summary>
        /// Insert the element, specified by the parameter, before each element in the set of matched
        /// elements.
        /// </summary>
        ///
        /// <param name="element">
        /// The element to insert.
        /// </param>
        ///
        /// <returns>
        /// The current CQ object.
        /// </returns>
        ///
        /// <url>
        /// http://api.jquery.com/before/
        /// </url>

        public CQ Before(IDomObject element)
        {
            return(Before(Objects.Enumerate(element)));
        }
コード例 #4
0
 public static object Extend(bool deep, object target, params object[] sources)
 {
     return(Objects.Extend(null, deep, target, sources));
 }
コード例 #5
0
        /// <summary>
        /// Wrap an HTML structure around the content of each element in the set of matched elements.
        /// </summary>
        ///
        /// <param name="wrapper">
        /// A sequence of elements that is the structure to wrap around the content of the selection set.
        /// There may be multiple elements but there should be only one innermost element in the sequence.
        /// </param>
        ///
        /// <returns>
        /// The current CQ object.
        /// </returns>
        ///
        /// <url>
        /// http://api.jquery.com/wrapinner/
        /// </url>

        public CQ WrapInner(IDomObject wrapper)
        {
            return(WrapInner(Objects.Enumerate(wrapper)));
        }
コード例 #6
0
        /// <summary>
        /// Add an element to the set of matched elements.
        /// </summary>
        ///
        /// <param name="element">
        /// The element to add.
        /// </param>
        ///
        /// <returns>
        /// A new CQ object.
        /// </returns>
        ///
        /// <url>
        /// http://api.jquery.com/add/
        /// </url>

        public CQ Add(IDomObject element)
        {
            return(Add(Objects.Enumerate(element)));
        }
コード例 #7
0
ファイル: Val.cs プロジェクト: mburgman101/CsQuery
        /// <summary>
        /// Get the current value of the first element in the set of matched elements, and try to convert
        /// to the specified type.
        /// </summary>
        ///
        /// <typeparam name="T">
        /// The type to which the value should be converted.
        /// </typeparam>
        ///
        /// <returns>
        /// A value or object of type T.
        /// </returns>
        ///
        /// <url>
        /// http://api.jquery.com/val/#val1
        /// </url>

        public T Val <T>()
        {
            string val = Val();

            return(Objects.Convert <T>(val));
        }
コード例 #8
0
ファイル: CQ.cs プロジェクト: malkassem/CsQuery
        /// <summary>
        /// Sets the selection set for this object to a single element..
        /// </summary>
        ///
        /// <param name="element">
        /// The element to add.
        /// </param>
        /// <param name="outputOrder">
        /// The default output order. If omitted, Ascending (DOM) order is the default.
        /// </param>
        ///
        /// <returns>
        /// The current CQ object
        /// </returns>

        protected CQ SetSelection(IDomObject element,
                                  SelectionSetOrder outputOrder = SelectionSetOrder.Ascending)
        {
            SelectionSet = new SelectionSet <IDomObject>(Objects.Enumerate(element), outputOrder, outputOrder);
            return(this);
        }
コード例 #9
0
ファイル: Filter.cs プロジェクト: mburgman101/CsQuery
        /// <summary>
        /// Reduce the set of matched elements to those that matching the element passed by parameter.
        /// </summary>
        ///
        /// <param name="element">
        /// The element to match.
        /// </param>
        ///
        /// <returns>
        /// A new CQ object.
        /// </returns>
        ///
        /// <url>
        /// http://api.jquery.com/filter/
        /// </url>

        public CQ Filter(IDomObject element)
        {
            return(Filter(Objects.Enumerate(element)));
        }
コード例 #10
0
 /// <summary>
 /// Get the ancestors of each element in the current set of matched elements, up to but not
 /// including the element matched by the selector.
 /// </summary>
 ///
 /// <param name="element">
 /// The element.
 /// </param>
 /// <param name="filter">
 /// (optional) a selector which limits the elements returned.
 /// </param>
 ///
 /// <returns>
 /// A new CQ object.
 /// </returns>
 ///
 /// <url>
 /// http://api.jquery.com/parentsUntil/
 /// </url>
 ///
 public CQ ParentsUntil(IDomElement element, string filter = null)
 {
     return(ParentsUntil(Objects.Enumerate(element), filter));
 }
コード例 #11
0
        /// <summary>
        /// Replace the target element with the set of matched elements.
        /// </summary>
        ///
        /// <param name="target">
        /// An element.
        /// </param>
        ///
        /// <returns>
        /// The current CQ object.
        /// </returns>
        ///
        /// <url>
        /// http://api.jquery.com/replaceAll/
        /// </url>

        public CQ ReplaceAll(IDomObject target)
        {
            return(ReplaceAll(Objects.Enumerate(target)));
        }
コード例 #12
0
ファイル: JsObject.cs プロジェクト: mburgman101/CsQuery
 public IEnumerable <T> Enumerate <T>()
 {
     return(Objects.EnumerateProperties <T>(this));
 }
コード例 #13
0
ファイル: Extend.cs プロジェクト: jeiea/osuDownloader
        /// <summary>
        /// Map properties of inputObjects to target. If target is an expando object, it will be updated.
        /// If not, a new one will be created including the properties of target and inputObjects.
        /// </summary>
        ///
        /// <param name="target">
        /// The target of the mapping, or null to create a new target.
        /// </param>
        /// <param name="sources">
        /// One or more objects that are the source of the mapping.
        /// </param>
        ///
        /// <returns>
        /// The target object itself, if non-null, or a new dynamic object, if the target is null.
        /// </returns>

        public static object Extend(object target, params object[] sources)
        {
            return(Objects.Extend(false, target, sources));
        }
コード例 #14
0
        /// <summary>
        /// Reduce the set of matched elements to those that have the element passed as a descendant.
        /// </summary>
        ///
        /// <param name="element">
        /// The element to match.
        /// </param>
        ///
        /// <returns>
        /// A new CQ object.
        /// </returns>
        ///
        /// <url>
        /// http://api.jquery.com/has/
        /// </url>

        public CQ Has(IDomObject element)
        {
            return(Has(Objects.Enumerate(element)));
        }