コード例 #1
0
        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
                }
            }
        }
コード例 #2
0
 public IFilter GetFilterIfAny()
 {
     return((IFilter)DatabaseObjects.SingleOrDefault(o => o is IFilter));
 }
コード例 #3
0
 private IContainer GetContainerIfAny()
 {
     return((IContainer)DatabaseObjects.SingleOrDefault(o => o is IContainer));
 }
コード例 #4
0
 public Catalogue GetSingleCatalogueModeCatalogue()
 {
     return((Catalogue)DatabaseObjects.SingleOrDefault());
 }