Class ParallelBindingContext
The binding context for a Parallel.
Implements
Inherited Members
Namespace: SpiceSharp.Components.ParallelComponents
Assembly: SpiceSharp.dll
Syntax
public class ParallelBindingContext : BindingContext, IBindingContext
Constructors
ParallelBindingContext(IEntity, ParallelSimulation, IBehaviorContainer)
Initializes a new instance of the ParallelBindingContext class.
Declaration
public ParallelBindingContext(IEntity entity, ParallelSimulation simulation, IBehaviorContainer behaviors)
Parameters
| Type | Name | Description |
|---|---|---|
| IEntity | entity | The entity. |
| ParallelSimulation | simulation | The simulation for which behaviors are created. |
| IBehaviorContainer | behaviors | The behaviors created by the entity. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
Properties
LocalBehaviors
Gets the current simulation entity behaviors.
Declaration
public IBehaviorContainerCollection LocalBehaviors { get; }
Property Value
| Type | Description |
|---|---|
| IBehaviorContainerCollection |
Methods
AddLocalState<TState>(TState)
Sets the state of the local simulation to another one.
Declaration
public void AddLocalState<TState>(TState state) where TState : ISimulationState
Parameters
| Type | Name | Description |
|---|---|---|
| TState | state | The state. |
Type Parameters
| Name | Description |
|---|---|
| TState | The type of the state. |
GetBehaviors<B>()
Gets the behaviors from the local simulation.
Declaration
public BehaviorList<B> GetBehaviors<B>() where B : IBehavior
Returns
| Type | Description |
|---|---|
| BehaviorList<B> | The list of behaviors. |
Type Parameters
| Name | Description |
|---|---|
| B | The behavior type. |