예제 #1
0
 public void Add(CRUDControllerIdentifier key, AbstractCRUDController crudController)
 {
     if (!Contains(key))
     {
         innerList.Add(new CRUDControllerListEntry(key, crudController));
     }
 }
예제 #2
0
 public AbstractCRUDController this[CRUDControllerIdentifier key] {
     get {
         AbstractCRUDController result = null;
         for (int i = 0; (i < innerList.Count) && (result == null); i++)
         {
             if (((CRUDControllerListEntry)innerList[i]).Key.Equals(key))
             {
                 result = ((CRUDControllerListEntry)innerList[i]).Value;
             }
         }
         return(result);
     }
 }
예제 #3
0
        public void UnloadCRUDController(AbstractCRUDController crudController)
        {
            CRUDControllerIdentifier key = null;

            if (crudController is CRUDController)
            {
                key = new CRUDControllerIdentifier(crudController as CRUDController);
            }
            else
            {
                key = new CRUDControllerIdentifier(crudController);
            }

            if (crudControllerList.Contains(key))
            {
                crudControllerList.Remove(key);
            }
            crudController.Dispose();
        }
예제 #4
0
 public CRUDControllerListEntry(CRUDControllerIdentifier key, AbstractCRUDController value)
 {
     this.key   = key;
     this.value = value;
 }
예제 #5
0
 public CRUDControllerIdentifier(AbstractCRUDController controller) : this(controller.BusinessLogic.GetType(), controller.CRUDFormType, controller.CRUDFormTitle)
 {
 }