Class Engine
This class is the entry point of the package. It mainly computes all the
possible realizations based on the registered relations and a set of
objects.
Assembly: Xareus.Relations.dll
Syntax
[Serializable]
[DataContract(Name = "Engine", Namespace = "http://www.insa-rennes.fr/Xareus.Relations:C#")]
public class Engine : IEngine, IDisposable
Constructors
Engine()
Declaration
Properties
Objects
Declaration
[DataMember]
public HashSet<IObject> Objects { get; set; }
Property Value
ObjectsNameObjectsMap
Map of the objects registered in the engine, indexed by their name
Declaration
public Dictionary<string, IObject> ObjectsNameObjectsMap { get; }
Property Value
RegisteredObjects
Declaration
public IEnumerable<IObject> RegisteredObjects { get; }
Property Value
RegisteredRelations
Declaration
public IEnumerable<IRelation> RegisteredRelations { get; }
Property Value
Relations
Declaration
[DataMember]
public HashSet<IRelation> Relations { get; set; }
Property Value
RelationsNameRelationsMap
Map of the relations registered in the engine, indexed by their name
Declaration
public Dictionary<string, IRelation> RelationsNameRelationsMap { get; }
Property Value
Methods
AddObject(IObject)
Declaration
public void AddObject(IObject @object)
Parameters
Type |
Name |
Description |
IObject |
object |
|
AddRelation(IRelation)
Declaration
public void AddRelation(IRelation relation)
Parameters
CheckType(IObject, TypeSearch)
Declaration
protected static bool CheckType(IObject obj, TypeSearch type)
Parameters
Returns
Deserialize(string)
Declaration
public static Engine Deserialize(string xml)
Parameters
Type |
Name |
Description |
string |
xml |
|
Returns
Deserialize(string, out Engine)
Declaration
public static bool Deserialize(string xml, out Engine obj)
Parameters
Returns
Deserialize(string, out Engine, out Exception)
Deserializes workflow markup into an Engine object
Declaration
public static bool Deserialize(string xml, out Engine obj, out Exception exception)
Parameters
Type |
Name |
Description |
string |
xml |
string workflow markup to deserialize
|
Engine |
obj |
Output Engine object
|
Exception |
exception |
output Exception value if deserialize failed
|
Returns
Type |
Description |
bool |
true if this XmlSerializer can deserialize the object; otherwise, false
|
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
Dispose(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
bool |
disposing |
|
GetObject(string)
Declaration
public IObject GetObject(string objectName)
Parameters
Type |
Name |
Description |
string |
objectName |
|
Returns
GetObjects(ObjectQueryParameters, bool)
Declaration
public IEnumerable<IObject> GetObjects(ObjectQueryParameters queryParameters, bool checkRegistered = true)
Parameters
Returns
GetRealizations()
Declaration
public IEnumerable<Realization> GetRealizations()
Returns
GetRealizations(RealizationQueryParameters, bool)
Declaration
public IEnumerable<Realization> GetRealizations(RealizationQueryParameters queryParameters, bool checkRegistered = true)
Parameters
Returns
GetRelation(string)
Declaration
public IRelation GetRelation(string relationName)
Parameters
Type |
Name |
Description |
string |
relationName |
|
Returns
HasObject(string)
Declaration
public bool HasObject(string objectName)
Parameters
Type |
Name |
Description |
string |
objectName |
|
Returns
HasRelation(string)
Declaration
public bool HasRelation(string relationName)
Parameters
Type |
Name |
Description |
string |
relationName |
|
Returns
LoadFromFile(string)
Declaration
public static Engine LoadFromFile(string fileName)
Parameters
Type |
Name |
Description |
string |
fileName |
|
Returns
LoadFromFile(string, out Engine)
Declaration
public static bool LoadFromFile(string fileName, out Engine obj)
Parameters
Returns
LoadFromFile(string, out Engine, out Exception)
Deserializes XML markup from file into an Engine object
Declaration
public static bool LoadFromFile(string fileName, out Engine obj, out Exception exception)
Parameters
Type |
Name |
Description |
string |
fileName |
string xml file to load and deserialize
|
Engine |
obj |
Output Engine object
|
Exception |
exception |
output Exception value if deserialize failed
|
Returns
Type |
Description |
bool |
true if this XmlSerializer can deserialize the object; otherwise, false
|
RemoveObject(IObject)
Declaration
public void RemoveObject(IObject @object)
Parameters
Type |
Name |
Description |
IObject |
object |
|
RemoveRelation(IRelation)
Declaration
public void RemoveRelation(IRelation relation)
Parameters
SaveToFile(string)
Declaration
public virtual void SaveToFile(string fileName)
Parameters
Type |
Name |
Description |
string |
fileName |
|
SaveToFile(string, out Exception)
Serializes current Engine object into file
Declaration
public virtual bool SaveToFile(string fileName, out Exception exception)
Parameters
Type |
Name |
Description |
string |
fileName |
full path of output XML file
|
Exception |
exception |
output Exception value if failed
|
Returns
Type |
Description |
bool |
true if can serialize and save into file; otherwise, false
|
Serialize()
Serializes current Engine object into an XML document
Declaration
public virtual string Serialize()
Returns
Type |
Description |
string |
string XML value
|
Implements