Evaluate() private method

private Evaluate ( RavenJToken root, bool errorWhenNoMatch ) : RavenJToken
root RavenJToken
errorWhenNoMatch bool
return RavenJToken
Exemplo n.º 1
0
 /// <summary>
 /// Selects the token that matches the object path.
 /// </summary>
 /// <param name="path">
 /// The object path from the current <see cref="RavenJToken"/> to the <see cref="RavenJToken"/>
 /// to be returned. This must be a string of property names or array indexes separated
 /// by periods, such as <code>Tables[0].DefaultView[0].Price</code> in C# or
 /// <code>Tables(0).DefaultView(0).Price</code> in Visual Basic.
 /// </param>
 /// <param name="errorWhenNoMatch">A flag to indicate whether an error should be thrown if no token is found.</param>
 /// <returns>The <see cref="RavenJToken"/> that matches the object path.</returns>
 public RavenJToken SelectToken(RavenJPath path, bool errorWhenNoMatch)
 {
     return(path.Evaluate(this, errorWhenNoMatch));
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Selects the token that matches the object path.
 /// </summary>
 /// <param name="path">
 ///     The object path from the current <see cref="RavenJToken" /> to the <see cref="RavenJToken" />
 ///     to be returned. This must be a string of property names or array indexes separated
 ///     by periods, such as <code>Tables[0].DefaultView[0].Price</code> in C# or
 ///     <code>Tables(0).DefaultView(0).Price</code> in Visual Basic.
 /// </param>
 /// <param name="errorWhenNoMatch">A flag to indicate whether an error should be thrown if no token is found.</param>
 /// <param name="createSnapshots">A flag to indicate whether token snapshots should be created.</param>
 /// <returns>The <see cref="RavenJToken" /> that matches the object path.</returns>
 public RavenJToken SelectToken(RavenJPath path, bool errorWhenNoMatch, bool createSnapshots = false)
 {
     return(path.Evaluate(this, errorWhenNoMatch, createSnapshots));
 }
Exemplo n.º 3
0
        /// <summary>
        /// Selects the token that matches the object path.
        /// </summary>
        /// <param name="path">
        /// The object path from the current <see cref="RavenJToken"/> to the <see cref="RavenJToken"/>
        /// to be returned. This must be a string of property names or array indexes separated
        /// by periods, such as <code>Tables[0].DefaultView[0].Price</code> in C# or
        /// <code>Tables(0).DefaultView(0).Price</code> in Visual Basic.
        /// </param>
        /// <param name="errorWhenNoMatch">A flag to indicate whether an error should be thrown if no token is found.</param>
        /// <returns>The <see cref="RavenJToken"/> that matches the object path.</returns>
        public RavenJToken SelectToken(string path, bool errorWhenNoMatch)
        {
            var p = new RavenJPath(path);

            return(p.Evaluate(this, errorWhenNoMatch));
        }
Exemplo n.º 4
0
        /// <summary>
        ///     Selects the token that matches the object path.
        /// </summary>
        /// <param name="path">
        ///     The object path from the current <see cref="RavenJToken" /> to the <see cref="RavenJToken" />
        ///     to be returned. This must be a string of property names or array indexes separated
        ///     by periods, such as <code>Tables[0].DefaultView[0].Price</code> in C# or
        ///     <code>Tables(0).DefaultView(0).Price</code> in Visual Basic.
        /// </param>
        /// <param name="errorWhenNoMatch">A flag to indicate whether an error should be thrown if no token is found.</param>
        /// <param name="createSnapshots">A flag to indicate whether token snapshots should be created.</param>
        /// <returns>The <see cref="RavenJToken" /> that matches the object path.</returns>
        public RavenJToken SelectToken(string path, bool errorWhenNoMatch, bool createSnapshots = false)
        {
            var p = new RavenJPath(path);

            return(p.Evaluate(this, errorWhenNoMatch, createSnapshots));
        }