/// <summary> /// Adds a new inverse relationship to the database. /// </summary> public static void AddInverseRelationship(string ownerUniqueId, ObjectRelationship relationship) { s_inverseRelationshipsLock.EnterWriteLock(); try { List <ObjectRelationship> relationships; if (!s_inverseRelationships.TryGetValue(ownerUniqueId, out relationships)) { relationships = new List <ObjectRelationship>(); s_inverseRelationships.Add(ownerUniqueId, relationships); } relationships.Add(relationship); } finally { s_inverseRelationshipsLock.ExitWriteLock(); } }
/// <summary> /// Adds a new relationship to this object. /// </summary> public void AddRelationship(ObjectRelationship relationship) { ObjectDatabase.AddRelationship(UniqueId, relationship); }