C# Class SIL.FieldWorks.FDO.Infrastructure.Impl.CmObjectId

A CmObjectId is basically a GUID. However, GUID is a struct, and hence, every Guid variable takes 16 bytes. CmObjectIds can be shared. Also, being our own class, we can implement some common methods with CmObject. CmObjectId also implements (secretly and very incompletely) ICmObjectOrSurrogate. This allows them to occur in the main dictionary of the IdentityMap.
Inheritance: ICmObjectId, ICmObjectOrIdInternal, ICmObjectOrSurrogate
Afficher le fichier Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Свойство Type Description
Create ICmObjectId
FromGuid ICmObjectId
ICmObjectOrIdInternal int

Méthodes publiques

Méthode Description
Equals ( CmObjectId id ) : bool

object ids are equal if their guids are.

Equals ( object obj ) : bool

object ids are equal if their guids are.

GetHashCode ( ) : int

consistent with equality.

GetObject ( ICmObjectRepository repo ) : ICmObject
ToXMLString ( bool owning, System writer ) : void

Add to the writer the standard XML representation of a reference to this object, marked to indicate whether it is an owned or referenced object.

Méthodes protégées

Méthode Description
CmObjectId ( System.Guid guid ) : System

The goal is a private constructor which ensures the only way to get one is something that ensures we get the canonical one. Has to be protected to allow CmObjectIdWithHvo. Do NOT subclass this as some sort of trick to be able to create one.

GetHvoUsing ( IdentityMap map ) : int

Private Methods

Méthode Description
Create ( System.Guid guid ) : ICmObjectId
FromGuid ( System.Guid guid, IdentityMap map ) : ICmObjectId
ICmObjectOrIdInternal ( IdentityMap map ) : int

Method Details

CmObjectId() protected méthode

The goal is a private constructor which ensures the only way to get one is something that ensures we get the canonical one. Has to be protected to allow CmObjectIdWithHvo. Do NOT subclass this as some sort of trick to be able to create one.
protected CmObjectId ( System.Guid guid ) : System
guid System.Guid
Résultat System

Equals() public méthode

object ids are equal if their guids are.
public Equals ( CmObjectId id ) : bool
id CmObjectId
Résultat bool

Equals() public méthode

object ids are equal if their guids are.
public Equals ( object obj ) : bool
obj object
Résultat bool

GetHashCode() public méthode

consistent with equality.
public GetHashCode ( ) : int
Résultat int

GetHvoUsing() protected méthode

protected GetHvoUsing ( IdentityMap map ) : int
map IdentityMap
Résultat int

GetObject() public méthode

public GetObject ( ICmObjectRepository repo ) : ICmObject
repo ICmObjectRepository
Résultat ICmObject

ToXMLString() public méthode

Add to the writer the standard XML representation of a reference to this object, marked to indicate whether it is an owned or referenced object.
public ToXMLString ( bool owning, System writer ) : void
owning bool
writer System
Résultat void