C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
Used to keep track of the recursive random generation process for objects and their attributes. When an object or its properties are being randomly generated, the recursion context indicates what the parent object (if any) is. When a property to generate has additional nested properties that must also be randomized, the recursion context will point back to the original root object. More...
Public Member Functions | |
RecursionContext (Type objectType) | |
RecursionContext (Type objectType, int depth) | |
RecursionContext (Type objectType, RecursionContext prior) | |
bool | HasParent (Func< RecursionContext, bool > condition=null) |
Test whether this RecursionContext has a parent. If a condition is given, returns true only if the parent matches the condition. | |
void | LogIndented (string log) |
Outputs the log with all newlines indented by an additional amount for every level of recursion. | |
bool | MatchesCondition (Func< RecursionContext, bool > condition) |
Test whether this RecursionContext or any prior matches the condition. | |
override string | ToString () |
Protected Member Functions | |
RecursionContext (Type objectType, int depth, RecursionContext prior) | |
Properties | |
int | Depth [get] |
The number of times we have recursed so far. | |
RecursionContext | Prior [get] |
The previous recursion context. | |
Type | Type [get] |
The type of resource being generated. | |
Used to keep track of the recursive random generation process for objects and their attributes. When an object or its properties are being randomly generated, the recursion context indicates what the parent object (if any) is. When a property to generate has additional nested properties that must also be randomized, the recursion context will point back to the original root object.
Currently, this is primarily required to tell the difference between a Nested layer being generated as a root object, or as an embedded layer definition within a layer_view.
This is also used to track how deeply the routine has recursed so far and change random generation behaviour to reduce the chance of recursing further.
Definition at line 118 of file Reflection.cs.
|
inlineprotected |
Definition at line 127 of file Reflection.cs.
|
inline |
Definition at line 134 of file Reflection.cs.
|
inline |
Definition at line 136 of file Reflection.cs.
|
inline |
Definition at line 138 of file Reflection.cs.
|
inline |
Test whether this RecursionContext has a parent. If a condition is given, returns true only if the parent matches the condition.
Definition at line 147 of file Reflection.cs.
Outputs the log with all newlines indented by an additional amount for every level of recursion.
Definition at line 156 of file Reflection.cs.
bool AnalyzeReTesting.Utilities.Reflection.RecursionContext.MatchesCondition | ( | Func< RecursionContext, bool > | condition | ) |
Test whether this RecursionContext or any prior matches the condition.
|
get |
The number of times we have recursed so far.
Definition at line 123 of file Reflection.cs.
|
get |
The previous recursion context.
Definition at line 125 of file Reflection.cs.
|
get |
The type of resource being generated.
Definition at line 121 of file Reflection.cs.