/// <summary> /// Adds new or gets an existig latch. /// </summary> /// <param name="objectType"></param> /// <param name="fullObjectPath"></param> /// <returns></returns> public Latch AddOrGet(ObjectType objectType, string logicalSchemaPath) { string lookupKey = Utility.FileSystemPathToKey(logicalSchemaPath); if (Catalog.ContainsKey(lookupKey)) { return(Catalog[lookupKey]); } else { Latch latch = new Latch(logicalSchemaPath) { ObjectType = objectType }; Catalog.Add(lookupKey, latch); return(latch); } }
public LatchKey(Latch latch, Transaction transaction, LatchMode mode) { Latch = latch; Transaction = transaction; Mode = mode; }