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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TIn, TOut>The transformation rule
Returns
- IEnumerable<TOut>
A collection with all computations made under these circumstances
Type Parameters
TInTOut
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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TIn1, TIn2, TOut>The transformation rule
Returns
- IEnumerable<TOut>
A collection with all computations made under these circumstances
Type Parameters
TIn1TIn2TOut
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
traceITransformationTraceThe trace component that is used as basis
inputTypesType[]The input types of the trace request
Returns
- IEnumerable<TOut>
All outputs of computations
Type Parameters
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
Returns
- IEnumerable<TOut>
All outputs of computations
Type Parameters
TInThe input parameter type of the transformation rule
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
Returns
- IEnumerable<TOut>
All outputs of computations
Type Parameters
TIn1The first input parameter type of the transformation rule
TIn2The second input parameter type of the transformation rule
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TOut>The transformation rule the object was transformed with
filterPredicate<TOut>The filter that should be applied to the transformation outputs
Returns
- IEnumerable<TOut>
A collection with all suitable outputs
Type Parameters
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
filterPredicate<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
TInThe input type parameter of the transformation rule
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TIn1, TIn2, TOut>The transformation rule the object was transformed with
filterPredicate<TOut>The filter that should be applied to the transformation outputs
Returns
- IEnumerable<TOut>
A collection with all suitable outputs
Type Parameters
TIn1The type of the first transformation argument
TIn2The type of the second transformation argument
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
inputTypesType[]The input types for the transformation rule
filterPredicate<TOut>The filter that should be applied to the transformation outputs
Returns
- IEnumerable<TOut>
A collection with all suitable outputs
Type Parameters
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
filterPredicate<TOut>The filter that should be applied to the transformation outputs
Returns
- IEnumerable<TOut>
A collection with all suitable outputs
Type Parameters
TInThe input type of the transformation rule
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
filterPredicate<TOut>The filter that should be applied to the transformation outputs
Returns
- IEnumerable<TOut>
A collection with all suitable outputs
Type Parameters
TIn1The type of the first transformation argument
TIn2The type of the second transformation argument
TOutThe 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
contextITransformationContextThe transformation context
keyobjectThe key for the user item
valueCreatorFunc<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
TValueThe 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
traceITransformationTraceThe trace component that is used as basis
ruleGeneralTransformationRuleThe rule that transformed the argument
inputobject[]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
traceITransformationTraceThe trace component that is used as basis
ruleGeneralTransformationRuleThe transformation rule that was used to transform the outputs
filterPredicate<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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TOut>The transformation rule the object was transformed with
filterPredicate<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
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
filterPredicate<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
TInThe input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TIn1, TIn2, TOut>The transformation rule
filterFunc<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
TIn1TIn2TOut
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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TOut>The transformation rule the object was transformed with
inputobject[]The input arguments
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
inputTInThe input argument
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TInThe input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TIn1, TIn2, TOut>The transformation rule the object was transformed with
input1TIn1The first input argument
input2TIn2The second input argument
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TIn1The first input type that is looked for
TIn2The second input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
listIEnumerable<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
TInThe input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
inputTInThe input to resolve multiple outputs
Returns
- IEnumerable<TOut>
All outputs of computations with suitable input arguments or null, if there are none
Type Parameters
TInThe input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
ruleTransformationRuleBase<TIn, TOut>The transformation rule the object was transformed with
listTIn[]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
TInThe input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
listIEnumerable<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
TInThe input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
inputTInAn 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
TInThe input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
listTIn[]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
TInThe input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
inputTypesType[]The types of the input arguments that are expected to be matched
filterPredicate<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
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
filterPredicate<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
TInThe input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
filterFunc<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
TIn1TIn2TOut
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
traceITransformationTraceThe trace component that is used as basis
inputobject[]The input arguments
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
inputTInThe input argument
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TInThe input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
input1TIn1The first input argument
input2TIn2The second input argument
Returns
- TOut
The output of the computation with the specified input argument or null, if there is none such
Type Parameters
TIn1The first input type that is looked for
TIn2The second input type that is looked for
TOutThe 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
traceITransformationTraceThe trace component that is used as basis
ruleGeneralTransformationRuleThe transformation rule
filterPredicate<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
traceITransformationTraceThe trace component that is used as basis
ruleGeneralTransformationRule<TIn>The transformation rule
filterPredicate<TIn>The predicate of the inputs that are looked for
Returns
- IEnumerable<ITraceEntry>
A collection with all computations made under these circumstances
Type Parameters
TInThe 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
traceITransformationTraceThe trace component that is used as basis
ruleGeneralTransformationRule<TIn1, TIn2>The transformation rule
filterFunc<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
TIn1The first input argument type of the transformation
TIn2The first input argument type of the transformation