Class TypeWithScenario
A Xareus Type that embed a scenario.
Implements IContext to allow the scenario to store and retrieve objects.
Implements IRealizationManager to allow (Any)RelationSensor and RelationEffector to read/write Relations.
Implements ITypeDescriptorContext for type conversion
Inheritance
TypeWithScenario
Assembly: Xareus.Relations.Scenarios.Unity.dll
Syntax
[RequireComponent(typeof(XUObject))]
[RequireComponent(typeof(ScenarioRunner))]
public class TypeWithScenario : XUType, IObjectType, IContext, IRealizationManager
Fields
ScenarioRunner
The component that will run the scenario.
Declaration
public ScenarioRunner ScenarioRunner
Field Value
Properties
Container
Declaration
public IContainer Container { get; }
Property Value
Engine
Declaration
public Scenario Engine { get; }
Property Value
Environment
Direct access to the global Environment.
Declaration
[ExternalContextEntry("Environment")]
public static Environment Environment { get; }
Property Value
Instance
Declaration
public object Instance { get; }
Property Value
PropertyDescriptor
Declaration
public PropertyDescriptor PropertyDescriptor { get; }
Property Value
RelationEngine
Direct access to the RelationEngine.
Declaration
[ExternalContextEntry("RelationEngine")]
public IEngine RelationEngine { get; }
Property Value
Types
Direct access to other Types.
Declaration
public IEnumerable<XUType> Types { get; }
Property Value
XuObjectId
Declaration
[ExternalContextEntry("XUObject")]
protected string XuObjectId { get; }
Property Value
Methods
AddExecutedRealization(Realization)
Declaration
public void AddExecutedRealization(Realization realization)
Parameters
Awake()
Declaration
protected virtual void Awake()
Clear()
Declaration
CreateScenarioLoadingParameters()
Create the scenario loading parameters
Declaration
protected virtual ScenarioLoadingParameters CreateScenarioLoadingParameters()
Returns
EnqueueRealizationToExecute(Realization)
Declaration
public void EnqueueRealizationToExecute(Realization realization)
Parameters
GetExecutedRealizations(IRelation, HashSet<IObject>, DateTime, DateTime)
Declaration
public IEnumerable<Realization> GetExecutedRealizations(IRelation relation, HashSet<IObject> objects, DateTime start, DateTime end)
Parameters
Returns
GetNextRealizationToExecute()
Declaration
public Realization GetNextRealizationToExecute()
Returns
GetPaths()
Declaration
public IEnumerable<string> GetPaths()
Returns
GetService(Type)
Declaration
public object GetService(Type serviceType)
Parameters
Type |
Name |
Description |
Type |
serviceType |
|
Returns
GetValue(string)
Declaration
public object GetValue(string path)
Parameters
Type |
Name |
Description |
string |
path |
|
Returns
GetValueOrDefault(string, object)
Declaration
public object GetValueOrDefault(string path, object defaultValue = null)
Parameters
Returns
HasPath(string)
Declaration
public bool HasPath(string path)
Parameters
Type |
Name |
Description |
string |
path |
|
Returns
OnComponentChanged()
Declaration
public void OnComponentChanged()
OnComponentChanging()
Declaration
public bool OnComponentChanging()
Returns
SetValue(string, object)
Declaration
public void SetValue(string path, object value)
Parameters
Union(string, IContext)
Declaration
public void Union(string path, IContext other)
Parameters
Union(IContext, bool)
Declaration
public void Union(IContext other, bool overrideDuplicates = true)
Parameters
Type |
Name |
Description |
IContext |
other |
|
bool |
overrideDuplicates |
|
Implements