Show / Hide Table of Contents

Class ILState

An instance for building functions.

Inheritance
System.Object
ILState
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: SpiceSharpBehavioral.Builders
Assembly: SpiceSharpBehavioral.dll
Syntax
public class ILState

Constructors

ILState(FunctionBuilder)

Initializes a new instance of the ILState class.

Declaration
public ILState(FunctionBuilder parent)
Parameters
Type Name Description
FunctionBuilder parent

Properties

Builder

Gets the builder.

Declaration
public FunctionBuilder Builder { get; }
Property Value
Type Description
FunctionBuilder

The builder.

Generator

Gets the IL generator.

Declaration
public ILGenerator Generator { get; }
Property Value
Type Description
System.Reflection.Emit.ILGenerator

The IL generator.

Methods

Call(Func<Double, Double, Double>, IReadOnlyList<Node>)

Calls the specified function.

Declaration
public void Call(Func<double, double, double> function, IReadOnlyList<Node> args)
Parameters
Type Name Description
System.Func<System.Double, System.Double, System.Double> function

The function.

System.Collections.Generic.IReadOnlyList<Node> args

The arguments.

Exceptions
Type Condition
ArgumentMismatchException

Thrown if there aren't two arguments.

Call(Func<Double, Double>, IReadOnlyList<Node>)

Calls the specified function.

Declaration
public void Call(Func<double, double> function, IReadOnlyList<Node> args)
Parameters
Type Name Description
System.Func<System.Double, System.Double> function

The function.

System.Collections.Generic.IReadOnlyList<Node> args

The arguments.

Exceptions
Type Condition
ArgumentMismatchException

Thrown if there isn't one argument.

Call(Func<Double>)

Calls the specified function.

Declaration
public void Call(Func<double> function)
Parameters
Type Name Description
System.Func<System.Double> function

The function.

Call(Object, MethodInfo, IReadOnlyList<Node>)

Calls the specified method where all arguments are doubles.

Declaration
public void Call(object target, MethodInfo method, IReadOnlyList<Node> args)
Parameters
Type Name Description
System.Object target

The target.

System.Reflection.MethodInfo method

The method.

System.Collections.Generic.IReadOnlyList<Node> args

The arguments.

Exceptions
Type Condition
ArgumentMismatchException

CreateFunction()

Creates the function.

Declaration
public Func<double> CreateFunction()
Returns
Type Description
System.Func<System.Double>

The function.

Push(Node)

Pushes an expression on the stack.

Declaration
public void Push(Node node)
Parameters
Type Name Description
Node node

The node.

Push(Double)

Pushes the specified value.

Declaration
public void Push(double value)
Parameters
Type Name Description
System.Double value

The value.

Push(Int32)

Pushes the specified index.

Declaration
public void Push(int index)
Parameters
Type Name Description
System.Int32 index

The index.

PushCheck(OpCode)

Pushes a check.

Declaration
public void PushCheck(OpCode opCode)
Parameters
Type Name Description
System.Reflection.Emit.OpCode opCode

The operator code.

Exceptions
Type Condition
System.Exception

Thrown if the operator code is invalid.

Back to top Generated by DocFX