C# Class Grasp.GraspRuntime

A context in which a set of variables are bound to values
Show file Open project: bwatts/Grasp Class Usage Examples

Public Methods

Method Description
ApplyCalculations ( ) : void

Applies the calculations defined by Schema to this runtime

GetVariableValue ( Variable variable ) : object

Gets the value of the specified variable

GraspRuntime ( GraspSchema schema, ICalculator calculator, IEnumerable bindings ) : System

Initializes a runtime with the specified schema, calculator, and bindings

SetVariableValue ( Variable variable, object value ) : void

Sets the value of the specified variable

Private Methods

Method Description
TryGetBinding ( Variable variable ) : VariableBinding

Method Details

ApplyCalculations() public method

Applies the calculations defined by Schema to this runtime
public ApplyCalculations ( ) : void
return void

GetVariableValue() public method

Gets the value of the specified variable
Thrown if the specified variable is not bound
public GetVariableValue ( Variable variable ) : object
variable Variable The variable for which to get the value
return object

GraspRuntime() public method

Initializes a runtime with the specified schema, calculator, and bindings
public GraspRuntime ( GraspSchema schema, ICalculator calculator, IEnumerable bindings ) : System
schema GraspSchema The schema which defines the variables and calculations in effect for this runtime
calculator ICalculator The calculator which applies the specified schema's calculations to this runtime
bindings IEnumerable The initial states of the variables in this runtime
return System

SetVariableValue() public method

Sets the value of the specified variable
public SetVariableValue ( Variable variable, object value ) : void
variable Variable The variable for which to set the specified value
value object The new value of the specified variable
return void