Class TraceExtensions
- Namespace
- NMF.Transformations
- Assembly
- NMF.Transformations.dll
This helper class provides additional methods for tracing purposes
public static class TraceExtensions
- Inheritance
-
TraceExtensions
- Inherited Members
Methods
FindAllIn<TOut>(ITransformationTrace, TransformationRuleBase<TOut>)
Traces all computations with any inputs that math the given filters with the specified transformation rule
public static IEnumerable<TOut> FindAllIn<TOut>(this ITransformationTrace trace, TransformationRuleBase<TOut> rule) where TOut : class
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TOut>The transformation rule
Returns
- IEnumerable<TOut>
A collection with all computations made under these circumstances
Type Parameters
TOut
FindAllIn<TIn, TOut>(ITransformationTrace, TransformationRuleBase<TIn, TOut>)
Traces all computations with any inputs that math the given filters with the specified transformation rule
public static IEnumerable<TOut> FindAllIn<TIn, TOut>(this ITransformationTrace trace, TransformationRuleBase<TIn, TOut> rule)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TIn, TOut>The transformation rule
Returns
- IEnumerable<TOut>
A collection with all computations made under these circumstances
Type Parameters
TIn
TOut
FindAllIn<TIn1, TIn2, TOut>(ITransformationTrace, TransformationRuleBase<TIn1, TIn2, TOut>)
Traces all computations with any inputs that math the given filters with the specified transformation rule
public static IEnumerable<TOut> FindAllIn<TIn1, TIn2, TOut>(this ITransformationTrace trace, TransformationRuleBase<TIn1, TIn2, TOut> rule)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TIn1, TIn2, TOut>The transformation rule
Returns
- IEnumerable<TOut>
A collection with all computations made under these circumstances
Type Parameters
TIn1
TIn2
TOut
FindAll<TOut>(ITransformationTrace, Type[])
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<TOut> FindAll<TOut>(this ITransformationTrace trace, Type[] inputTypes)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
inputTypes
Type[]The input types of the trace request
Returns
- IEnumerable<TOut>
All outputs of computations
Type Parameters
TOut
The output that is returned by the transformation rule
FindAll<TIn, TOut>(ITransformationTrace)
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<TOut> FindAll<TIn, TOut>(this ITransformationTrace trace)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
Returns
- IEnumerable<TOut>
All outputs of computations
Type Parameters
TIn
The input parameter type of the transformation rule
TOut
The output that is returned by the transformation rule
FindAll<TIn1, TIn2, TOut>(ITransformationTrace)
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<TOut> FindAll<TIn1, TIn2, TOut>(this ITransformationTrace trace)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
Returns
- IEnumerable<TOut>
All outputs of computations
Type Parameters
TIn1
The first input parameter type of the transformation rule
TIn2
The second input parameter type of the transformation rule
TOut
The output that is returned by the transformation rule
FindInWhere<TOut>(ITransformationTrace, TransformationRuleBase<TOut>, Predicate<TOut>)
Finds all outputs of computations of from the specified source type to the specified target type that match the given filter
public static IEnumerable<TOut> FindInWhere<TOut>(this ITransformationTrace trace, TransformationRuleBase<TOut> rule, Predicate<TOut> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TOut>The transformation rule the object was transformed with
filter
Predicate<TOut>The filter that should be applied to the transformation outputs
Returns
- IEnumerable<TOut>
A collection with all suitable outputs
Type Parameters
TOut
The output type of the transformation rule
FindInWhere<TIn, TOut>(ITransformationTrace, TransformationRuleBase<TIn, TOut>, Predicate<TOut>)
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<TOut> FindInWhere<TIn, TOut>(this ITransformationTrace trace, TransformationRuleBase<TIn, TOut> rule, Predicate<TOut> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
filter
Predicate<TOut>The filter that should filter the inputs
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TIn
The input type parameter of the transformation rule
TOut
The output that is returned by the transformation rule
FindInWhere<TIn1, TIn2, TOut>(ITransformationTrace, TransformationRuleBase<TIn1, TIn2, TOut>, Predicate<TOut>)
Finds all outputs of computations of the given transformation that match the given filter
public static IEnumerable<TOut> FindInWhere<TIn1, TIn2, TOut>(this ITransformationTrace trace, TransformationRuleBase<TIn1, TIn2, TOut> rule, Predicate<TOut> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TIn1, TIn2, TOut>The transformation rule the object was transformed with
filter
Predicate<TOut>The filter that should be applied to the transformation outputs
Returns
- IEnumerable<TOut>
A collection with all suitable outputs
Type Parameters
TIn1
The type of the first transformation argument
TIn2
The type of the second transformation argument
TOut
The output type of the transformation rule
FindWhere<TOut>(ITransformationTrace, Type[], Predicate<TOut>)
Finds all outputs of computations of from the specified source type to the specified target type that match the given filter
public static IEnumerable<TOut> FindWhere<TOut>(this ITransformationTrace trace, Type[] inputTypes, Predicate<TOut> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
inputTypes
Type[]The input types for the transformation rule
filter
Predicate<TOut>The filter that should be applied to the transformation outputs
Returns
- IEnumerable<TOut>
A collection with all suitable outputs
Type Parameters
TOut
The output type of the transformation rule
FindWhere<TIn, TOut>(ITransformationTrace, Predicate<TOut>)
Finds all outputs of computations of from the specified source typpe to the specified target type that match the given filter
public static IEnumerable<TOut> FindWhere<TIn, TOut>(this ITransformationTrace trace, Predicate<TOut> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
filter
Predicate<TOut>The filter that should be applied to the transformation outputs
Returns
- IEnumerable<TOut>
A collection with all suitable outputs
Type Parameters
TIn
The input type of the transformation rule
TOut
The output type of the transformation rule
FindWhere<TIn1, TIn2, TOut>(ITransformationTrace, Predicate<TOut>)
Finds all outputs of computations of from the specified source type to the specified target type that match the given filter
public static IEnumerable<TOut> FindWhere<TIn1, TIn2, TOut>(this ITransformationTrace trace, Predicate<TOut> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
filter
Predicate<TOut>The filter that should be applied to the transformation outputs
Returns
- IEnumerable<TOut>
A collection with all suitable outputs
Type Parameters
TIn1
The type of the first transformation argument
TIn2
The type of the second transformation argument
TOut
The output type of the transformation rule
GetOrCreateUserItem<TValue>(ITransformationContext, object, Func<TValue>)
Gets or creates the user item with the specified key
public static TValue GetOrCreateUserItem<TValue>(this ITransformationContext context, object key, Func<TValue> valueCreator = null)
Parameters
context
ITransformationContextThe transformation context
key
objectThe key for the user item
valueCreator
Func<TValue>A method that creates the default value if the user item does not yet exist or null, if no user item should be created
Returns
- TValue
The user item with the specified key
Type Parameters
TValue
The type of the user item
ResolveIn(ITransformationTrace, GeneralTransformationRule, object[])
Trace the output of the computation that transformed the given input with the given transformation type
public static object ResolveIn(this ITransformationTrace trace, GeneralTransformationRule rule, object[] input)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
GeneralTransformationRuleThe rule that transformed the argument
input
object[]The input arguments
Returns
- object
The output of the computation with the specified input argument or null, if there is none such
ResolveInWhere(ITransformationTrace, GeneralTransformationRule, Predicate<ITraceEntry>)
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<object> ResolveInWhere(this ITransformationTrace trace, GeneralTransformationRule rule, Predicate<ITraceEntry> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
GeneralTransformationRuleThe transformation rule that was used to transform the outputs
filter
Predicate<ITraceEntry>The filter that should filter the inputs
Returns
- IEnumerable<object>
All outputs of computations with suitable input arguments or null, if there are none
ResolveInWhere<TOut>(ITransformationTrace, TransformationRuleBase<TOut>, Predicate<object[]>)
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<TOut> ResolveInWhere<TOut>(this ITransformationTrace trace, TransformationRuleBase<TOut> rule, Predicate<object[]> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TOut>The transformation rule the object was transformed with
filter
Predicate<object[]>The filter that should filter the inputs
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TOut
The output that is returned by the transformation rule
ResolveInWhere<TIn, TOut>(ITransformationTrace, TransformationRuleBase<TIn, TOut>, Predicate<TIn>)
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<TOut> ResolveInWhere<TIn, TOut>(this ITransformationTrace trace, TransformationRuleBase<TIn, TOut> rule, Predicate<TIn> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
filter
Predicate<TIn>The filter that should filter the inputs
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TIn
The input type that is looked for
TOut
The output that is returned by the transformation rule
ResolveInWhere<TIn1, TIn2, TOut>(ITransformationTrace, TransformationRuleBase<TIn1, TIn2, TOut>, Func<TIn1, TIn2, bool>)
Traces all computations with any inputs that math the given filters with the specified transformation rule
public static IEnumerable<TOut> ResolveInWhere<TIn1, TIn2, TOut>(this ITransformationTrace trace, TransformationRuleBase<TIn1, TIn2, TOut> rule, Func<TIn1, TIn2, bool> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TIn1, TIn2, TOut>The transformation rule
filter
Func<TIn1, TIn2, bool>A filter that is to be applied on the inputs
Returns
- IEnumerable<TOut>
A collection with all computations made under these circumstances
Type Parameters
TIn1
TIn2
TOut
ResolveIn<TOut>(ITransformationTrace, TransformationRuleBase<TOut>, object[])
Trace the output of the computation that transformed the given input with the given transformation type
public static TOut ResolveIn<TOut>(this ITransformationTrace trace, TransformationRuleBase<TOut> rule, object[] input)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TOut>The transformation rule the object was transformed with
input
object[]The input arguments
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TOut
The output that is returned by the transformation rule
ResolveIn<TIn, TOut>(ITransformationTrace, TransformationRuleBase<TIn, TOut>, TIn)
Trace the output of the computation that transformed the given input with the given transformation type
public static TOut ResolveIn<TIn, TOut>(this ITransformationTrace trace, TransformationRuleBase<TIn, TOut> rule, TIn input)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
input
TInThe input argument
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TIn
The input type that is looked for
TOut
The output that is returned by the transformation rule
ResolveIn<TIn1, TIn2, TOut>(ITransformationTrace, TransformationRuleBase<TIn1, TIn2, TOut>, TIn1, TIn2)
Trace the output of the computation that transformed the given input with the given transformation type
public static TOut ResolveIn<TIn1, TIn2, TOut>(this ITransformationTrace trace, TransformationRuleBase<TIn1, TIn2, TOut> rule, TIn1 input1, TIn2 input2)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TIn1, TIn2, TOut>The transformation rule the object was transformed with
input1
TIn1The first input argument
input2
TIn2The second input argument
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TIn1
The first input type that is looked for
TIn2
The second input type that is looked for
TOut
The output that is returned by the transformation rule
ResolveManyIn<TIn, TOut>(ITransformationTrace, TransformationRuleBase<TIn, TOut>, IEnumerable<TIn>)
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<TOut> ResolveManyIn<TIn, TOut>(this ITransformationTrace trace, TransformationRuleBase<TIn, TOut> rule, IEnumerable<TIn> list)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
list
IEnumerable<TIn>A list of allowed input arguments
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TIn
The input type that is looked for
TOut
The output that is returned by the transformation rule
ResolveManyIn<TIn, TOut>(ITransformationTrace, TransformationRuleBase<TIn, TOut>, TIn)
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<TOut> ResolveManyIn<TIn, TOut>(this ITransformationTrace trace, TransformationRuleBase<TIn, TOut> rule, TIn input)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
input
TInThe input to resolve multiple outputs
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TIn
The input type that is looked for
TOut
The output that is returned by the transformation rule
ResolveManyIn<TIn, TOut>(ITransformationTrace, TransformationRuleBase<TIn, TOut>, params TIn[])
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<TOut> ResolveManyIn<TIn, TOut>(this ITransformationTrace trace, TransformationRuleBase<TIn, TOut> rule, params TIn[] list)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
TransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
list
TIn[]A list of allowed input arguments
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TIn
The input type that is looked for
TOut
The output that is returned by the transformation rule
ResolveMany<TIn, TOut>(ITransformationTrace, IEnumerable<TIn>)
Trace the output of the computation that transformed any input that matches the filter into the desired type
public static IEnumerable<TOut> ResolveMany<TIn, TOut>(this ITransformationTrace trace, IEnumerable<TIn> list)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
list
IEnumerable<TIn>A list of allowed input arguments
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TIn
The input type that is looked for
TOut
The desired output type
ResolveMany<TIn, TOut>(ITransformationTrace, TIn)
Trace the output of the computation that transformed any input that matches the filter into the desired type
public static IEnumerable<TOut> ResolveMany<TIn, TOut>(this ITransformationTrace trace, TIn input)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
input
TInAn input argument to look up multiple results
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TIn
The input type that is looked for
TOut
The desired output type
ResolveMany<TIn, TOut>(ITransformationTrace, params TIn[])
Trace the output of the computation that transformed any input that matches the filter into the desired type
public static IEnumerable<TOut> ResolveMany<TIn, TOut>(this ITransformationTrace trace, params TIn[] list)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
list
TIn[]A list of allowed input arguments
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TIn
The input type that is looked for
TOut
The desired output type
ResolveWhere<TOut>(ITransformationTrace, Type[], Predicate<object[]>)
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<TOut> ResolveWhere<TOut>(this ITransformationTrace trace, Type[] inputTypes, Predicate<object[]> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
inputTypes
Type[]The types of the input arguments that are expected to be matched
filter
Predicate<object[]>The filter that should filter the inputs
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TOut
The output that is returned by the transformation rule
ResolveWhere<TIn, TOut>(ITransformationTrace, Predicate<TIn>)
Trace the output of the computation that transformed any input that matches the filter into the desired type
public static IEnumerable<TOut> ResolveWhere<TIn, TOut>(this ITransformationTrace trace, Predicate<TIn> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
filter
Predicate<TIn>The filter that should filter the inputs
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TIn
The input type that is looked for
TOut
The desired output type
ResolveWhere<TIn1, TIn2, TOut>(ITransformationTrace, Func<TIn1, TIn2, bool>)
Trace the output of the computation that transformed any input that matches the filter with the given transformation type
public static IEnumerable<TOut> ResolveWhere<TIn1, TIn2, TOut>(this ITransformationTrace trace, Func<TIn1, TIn2, bool> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
filter
Func<TIn1, TIn2, bool>The filter that should filter the inputs
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TIn1
TIn2
TOut
Resolve<TOut>(ITransformationTrace, object[])
Trace the output of the computation that transformed the given input with the given transformation type
public static TOut Resolve<TOut>(this ITransformationTrace trace, object[] input)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
input
object[]The input arguments
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TOut
The output that is returned by the transformation rule
Resolve<TIn, TOut>(ITransformationTrace, TIn)
Trace the output of the computation that transformed the given input into a desired output
public static TOut Resolve<TIn, TOut>(this ITransformationTrace trace, TIn input)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
input
TInThe input argument
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TIn
The input type that is looked for
TOut
The desired output type
Resolve<TIn1, TIn2, TOut>(ITransformationTrace, TIn1, TIn2)
Trace the output of the computation that transformed the given input with the given transformation type
public static TOut Resolve<TIn1, TIn2, TOut>(this ITransformationTrace trace, TIn1 input1, TIn2 input2)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
input1
TIn1The first input argument
input2
TIn2The second input argument
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TIn1
The first input type that is looked for
TIn2
The second input type that is looked for
TOut
The output that is returned by the transformation rule
TraceInWhere(ITransformationTrace, GeneralTransformationRule, Predicate<object[]>)
Traces all computations with any inputs that math the given filters with the specified transformation rule
public static IEnumerable<ITraceEntry> TraceInWhere(this ITransformationTrace trace, GeneralTransformationRule rule, Predicate<object[]> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
GeneralTransformationRuleThe transformation rule
filter
Predicate<object[]>The predicate of the inputs that are looked for
Returns
- IEnumerable<ITraceEntry>
A collection with all computations made under these circumstances
TraceInWhere<TIn>(ITransformationTrace, GeneralTransformationRule<TIn>, Predicate<TIn>)
Traces all computations with any inputs that math the given filters with the specified transformation rule
public static IEnumerable<ITraceEntry> TraceInWhere<TIn>(this ITransformationTrace trace, GeneralTransformationRule<TIn> rule, Predicate<TIn> filter) where TIn : class
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
GeneralTransformationRule<TIn>The transformation rule
filter
Predicate<TIn>The predicate of the inputs that are looked for
Returns
- IEnumerable<ITraceEntry>
A collection with all computations made under these circumstances
Type Parameters
TIn
The input argument type of the transformation
TraceInWhere<TIn1, TIn2>(ITransformationTrace, GeneralTransformationRule<TIn1, TIn2>, Func<TIn1, TIn2, bool>)
Traces all computations with any inputs that math the given filters with the specified transformation rule
public static IEnumerable<ITraceEntry> TraceInWhere<TIn1, TIn2>(this ITransformationTrace trace, GeneralTransformationRule<TIn1, TIn2> rule, Func<TIn1, TIn2, bool> filter)
Parameters
trace
ITransformationTraceThe trace component that is used as basis
rule
GeneralTransformationRule<TIn1, TIn2>The transformation rule
filter
Func<TIn1, TIn2, bool>The predicate of the inputs that are looked for
Returns
- IEnumerable<ITraceEntry>
A collection with all computations made under these circumstances
Type Parameters
TIn1
The first input argument type of the transformation
TIn2
The first input argument type of the transformation