Show / Hide Table of Contents

Class MockComputation

Mocks a computation

Inheritance
object
Computation
MockComputation
Implements
IPersistor
ITraceEntry
Inherited Members
Computation.TransformationRule
Computation.TransformationContext
Computation.Context
Computation.InputArguments
Computation.CreateInputArray()
Computation.ThrowDelayedException()
Computation.MarkRequire(Computation, bool, ITransformationRuleDependency)
Computation.OutputInitialized
Computation.Computed
Computation.DelayOutputAtLeast(byte)
Computation.DelayTransformationAtLeast(byte)
Computation.OnOutputInitialized(EventArgs)
Computation.IsDelayed
Computation.OnComputed(EventArgs)
Computation.InitializeOutput(object)
Computation.SetBaseComputation(Computation)
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NMF.Transformations.Tests
Assembly: NMF.Transformations.dll
Syntax
public class MockComputation : Computation, IPersistor, ITraceEntry

Constructors

| Edit this page View Source

MockComputation(object[], GeneralTransformationRule, IComputationContext)

Creates a new mocked computation

Declaration
public MockComputation(object[] input, GeneralTransformationRule rule, IComputationContext context)
Parameters
Type Name Description
object[] input

The input for the mocked computation

GeneralTransformationRule rule

The transformation rule for the mocked computation

IComputationContext context

The transformation context

| Edit this page View Source

MockComputation(object[], GeneralTransformationRule, IComputationContext, object)

Creates a new mocked computation

Declaration
public MockComputation(object[] input, GeneralTransformationRule rule, IComputationContext context, object output)
Parameters
Type Name Description
object[] input

The input for the mocked computation

GeneralTransformationRule rule

The transformation rule for the mocked computation

IComputationContext context

The transformation context

object output

The output for the transformation

| Edit this page View Source

MockComputation(object[], GeneralTransformationRule, ITransformationContext)

Creates a new mocked computation

Declaration
public MockComputation(object[] input, GeneralTransformationRule rule, ITransformationContext context)
Parameters
Type Name Description
object[] input

The input for the mocked computation

GeneralTransformationRule rule

The transformation rule for the mocked computation

ITransformationContext context

The transformation context

| Edit this page View Source

MockComputation(object[], GeneralTransformationRule, ITransformationContext, object)

Creates a new mocked computation

Declaration
public MockComputation(object[] input, GeneralTransformationRule rule, ITransformationContext context, object output)
Parameters
Type Name Description
object[] input

The input for the mocked computation

GeneralTransformationRule rule

The transformation rule for the mocked computation

ITransformationContext context

The transformation context

object output

The output for the transformation

Properties

| Edit this page View Source

OnCreateOutput

Gets or sets a function that should be called when the computation is asked to create its output

Declaration
public Func<object> OnCreateOutput { get; set; }
Property Value
Type Description
Func<object>
| Edit this page View Source

OnTransform

Gets or sets an action that should be called when the computation is asked to perform its Transform task

Declaration
public Action OnTransform { get; set; }
Property Value
Type Description
Action
| Edit this page View Source

Output

Gets or sets the output of the MockComputation

Declaration
public object Output { get; set; }
Property Value
Type Description
object
Remarks

Unlike the version of the Computation base class, this version ignores the output delay and thus does not throw an exception when accessed when the computation is delayed

| Edit this page View Source

OutputCore

Gets or sets the output internal

Declaration
protected override object OutputCore { get; set; }
Property Value
Type Description
object
Overrides
Computation.OutputCore

Methods

| Edit this page View Source

CreateOutput(IEnumerable)

Creates the output for the given transformation

Declaration
public override object CreateOutput(IEnumerable context)
Parameters
Type Name Description
IEnumerable context
Returns
Type Description
object

The output

Overrides
Computation.CreateOutput(IEnumerable)
| Edit this page View Source

GetInput(int)

Gets the input at the i-th position

Declaration
public override object GetInput(int index)
Parameters
Type Name Description
int index

The index of the desired input parameter

Returns
Type Description
object

The input parameter with the i-th position

Overrides
Computation.GetInput(int)
| Edit this page View Source

Transform()

Performs the Transform operation

Declaration
public override void Transform()
Overrides
Computation.Transform()

Implements

IPersistor
ITraceEntry

Extension Methods

TraceEntryExtensions.CreateInputArray(ITraceEntry)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX