Class Relation
Relations define interactions between objects. Relations are defined
using object patterns. This is a contract for an interaction.
No action/behaviour is defined here.
The name of the relation is considered to be unique, especially when checking for Relation equality
Assembly: Xareus.Relations.dll
Syntax
[Serializable]
[DataContract(Name = "Relation", Namespace = "http://www.insa-rennes.fr/Xareus.Relations")]
public class Relation : IRelation
Constructors
Relation()
Relation class constructor
Declaration
Relation(string, HashSet<ObjectPattern>)
Declaration
public Relation(string name, HashSet<ObjectPattern> objectPatterns)
Parameters
Properties
Name
The unique name of the relation
Declaration
[DataMember]
public string Name { get; set; }
Property Value
ObjectPatterns
The object patterns defining this relation
Declaration
[DataMember]
public HashSet<ObjectPattern> ObjectPatterns { get; set; }
Property Value
Methods
Deserialize(string)
Declaration
public static Relation Deserialize(string xml)
Parameters
Type |
Name |
Description |
string |
xml |
|
Returns
Deserialize(string, out Relation)
Declaration
public static bool Deserialize(string xml, out Relation obj)
Parameters
Returns
Deserialize(string, out Relation, out Exception)
Deserializes workflow markup into an Relation object
Declaration
public static bool Deserialize(string xml, out Relation obj, out Exception exception)
Parameters
Type |
Name |
Description |
string |
xml |
string workflow markup to deserialize
|
Relation |
obj |
Output Relation object
|
Exception |
exception |
output Exception value if deserialize failed
|
Returns
Type |
Description |
bool |
true if this XmlSerializer can deserialize the object; otherwise, false
|
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
LoadFromFile(string)
Declaration
public static Relation LoadFromFile(string fileName)
Parameters
Type |
Name |
Description |
string |
fileName |
|
Returns
LoadFromFile(string, out Relation)
Declaration
public static bool LoadFromFile(string fileName, out Relation obj)
Parameters
Returns
LoadFromFile(string, out Relation, out Exception)
Deserializes XML markup from file into an Relation object
Declaration
public static bool LoadFromFile(string fileName, out Relation obj, out Exception exception)
Parameters
Type |
Name |
Description |
string |
fileName |
string xml file to load and deserialize
|
Relation |
obj |
Output Relation object
|
Exception |
exception |
output Exception value if deserialize failed
|
Returns
Type |
Description |
bool |
true if this XmlSerializer can deserialize the object; otherwise, false
|
SaveToFile(string)
Declaration
public virtual void SaveToFile(string fileName)
Parameters
Type |
Name |
Description |
string |
fileName |
|
SaveToFile(string, out Exception)
Serializes current Relation 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 Relation object into an XML document
Declaration
public virtual string Serialize()
Returns
Type |
Description |
string |
string XML value
|
ToString()
Declaration
public override string ToString()
Returns
Overrides
Implements