Class PathEvaluationContext
A model which represents the context of evaluating a part of a path expression.
Inheritance
System.Object
PathEvaluationContext
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ZptSharp.Expressions.PathExpressions
Assembly: ZptSharp.dll
Syntax
public sealed class PathEvaluationContext
Properties
| Improve this Doc View SourceCurrentObject
Gets or sets the current object (the result of the previous traversal). This will be null if IsRoot is true.
Declaration
public object CurrentObject { get; }
Property Value
Type | Description |
---|---|
System.Object | The current object. |
ExpressionContext
Gets the expression context associated with this evaluation context.
Declaration
public ExpressionContext ExpressionContext { get; }
Property Value
Type | Description |
---|---|
ExpressionContext | The expression context. |
IsRoot
Gets a value indicating whether this PathEvaluationContext is the root context in a traversal. If this is true then the CurrentObject will be null.
Declaration
public bool IsRoot { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
| Improve this Doc View SourceCreateChild(Object)
Creates a child context, based upon the current instance but with a different CurrentObject.
Declaration
public PathEvaluationContext CreateChild(object currentObject)
Parameters
Type | Name | Description |
---|---|---|
System.Object | currentObject | The new 'current' object for the created context. |
Returns
Type | Description |
---|---|
PathEvaluationContext | The child context. |
CreateRoot(ExpressionContext)
Creates a new root context instance.
Declaration
public static PathEvaluationContext CreateRoot(ExpressionContext expressionContext)
Parameters
Type | Name | Description |
---|---|---|
ExpressionContext | expressionContext | The expression context. |
Returns
Type | Description |
---|---|
PathEvaluationContext | The root path evaluation context. |