[This is preliminary documentation and is subject to change.]
C# |
public struct MetaReference : IReference
All Members | Constructors | Methods | Properties | Fields | |
Icon | Member | Description |
---|---|---|
MetaReference(array<String>[]()[][]) | Creates a new MetaReference from one or more name sections
| |
MetaReference(String) | Creates a new MetaReference from a string containing concatenated
name sections. | |
Class | Returns the ObjectClass to which the referred to
object belongs. | |
Database | Gets the Database which holds the object referred
to by this MetaReference. | |
DeReference(Persistent) | Dereferences this MetaReference and produces the referenced
object. | |
DeReferenceNames(String) | A convenience method which creates a temporary MetaReference from
name sections and immediately dereferences it. | |
Equals(Object) |
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.) | |
Finalize()()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) | |
GetHashCode()()()() |
Returns the hash code for this instance.
(Inherited from ValueType.) | |
GetType()()()() |
Gets the Type of the current instance.
(Inherited from Object.) | |
IsForeign | Gets a value determining whether this MetaReference refers to an
object in a foreign domain. | |
IsPersisted | Gets a value determining whether the object referred to has been
persisted to a Database. | |
IsProvisional | Gets a value determining whether the object referred to is still
provisional - has not been persisted to a Database. | |
MemberwiseClone()()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) | |
ObjectNumber | Gets the object number of the object referred to by this
MetaReference. | |
OwningDomain | Gets the Domain to which the object referred to by
this MetaReference belongs. | |
ReadFromMessage(Message) | Creates a new MetaReference from data read from a Message. | |
SaveToMessage(Message) | Saves this MetaReference to a Message. | |
Separator | Contains the separator used between name sections when the
MetaReference is converted to a string. Equal to "/". | |
SeparatorChar | Contains the separator character used between name sections when
the MetaReference is converted to a string. Equal to '/'. | |
ToReference()()()() | Converts this MetaReference into a Reference.
| |
ToString()()()() | Creates a string representation of the MetaReference. (Overrides ValueType.ToString()()()().) |
MetaReferences are IReferences to objects which use a set of strings to index a path down the containment hierarchy to a the particular referenced object. To have a MetaReference to an object, that object must be derived from Persistent and must implement IMetaReferable
Each string in the MetaReference is used to index down one level in the containment hierarchy. This is performed by each IMetaReferable class's implementation of the DeReferenceSection method, and it is up to each class to determine how to do this. The class uses the ToMetaReference method to create the strings, in collaboration with the other IMetaReferable classes in the hierarchy, in order that this dereferencing can take place.
Usually, each string will be a name which will index a collection. for example Package uses its string to index its PersistentClasses collection. So dereferencing is achieved by each IMetaReferable instance in the hierarchical descent using the string to index and return the next one down.
This means that when creating a MetaReference, an IMetaReferable instance must use a set of strings which will reach it through the containment hierarchy above it. So the MetaReference scheme is achieved by a collaboration of the IMetaReferable classes in the hierarchy.
When dereferencing MetaReferences referring to objects within environments, the * character in place of a domain name always refers to the local domain, and the * character in place of an environment name always refers to the current environment.