Interface IBehaviorResolver
Describes a strategy for resolving behaviors.
Namespace: SpiceSharp.Entities
Assembly: SpiceSharp.dll
Syntax
public interface IBehaviorResolver
Methods
Clear()
Clears any strategies.
Declaration
void Clear()
RegisterAfter(Type, Type)
Registers a behavior factory for the specified target behavior after any previously defined factories.
Declaration
IBehaviorResolver RegisterAfter(Type behavior, Type behaviorImplementation)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | behavior | The behavior. |
| System.Type | behaviorImplementation | The behavior implementation. |
Returns
| Type | Description |
|---|---|
| IBehaviorResolver | The IBehaviorResolver for chaining. |
RegisterBefore(Type, Type)
Registers a behavior factory for the specified target behavior before any previously defined factories.
Declaration
IBehaviorResolver RegisterBefore(Type behavior, Type behaviorImplementation)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | behavior | The behavior. |
| System.Type | behaviorImplementation | The behavior implementation. |
Returns
| Type | Description |
|---|---|
| IBehaviorResolver | The IBehaviorResolver for chaining. |
Resolve(ISimulation, IEntity, IBehaviorContainer)
Creates behaviors in the container for the specified simulation and entity.
Declaration
void Resolve(ISimulation simulation, IEntity entity, IBehaviorContainer container)
Parameters
| Type | Name | Description |
|---|---|---|
| ISimulation | simulation | The simulation. |
| IEntity | entity | The entity. |
| IBehaviorContainer | container | The behavior container. |