public void RevertIfMatchedInCollectionObjects(DatabaseEntity oTriggeringRefresh, out bool shouldClose) { shouldClose = false; var matchingObject = DatabaseObjects.SingleOrDefault(o => o.Equals(oTriggeringRefresh)) as IRevertable; //matched object in our collection if (matchingObject != null) { if (matchingObject.Exists()) { matchingObject.RevertToDatabaseState(); } else { shouldClose = true;//object doesn't exist anymore so close control } } }
public IFilter GetFilterIfAny() { return((IFilter)DatabaseObjects.SingleOrDefault(o => o is IFilter)); }
private IContainer GetContainerIfAny() { return((IContainer)DatabaseObjects.SingleOrDefault(o => o is IContainer)); }
public Catalogue GetSingleCatalogueModeCatalogue() { return((Catalogue)DatabaseObjects.SingleOrDefault()); }