public void Add(CRUDControllerIdentifier key, AbstractCRUDController crudController) { if (!Contains(key)) { innerList.Add(new CRUDControllerListEntry(key, crudController)); } }
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); } }
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(); }
public CRUDControllerListEntry(CRUDControllerIdentifier key, AbstractCRUDController value) { this.key = key; this.value = value; }
public CRUDControllerIdentifier(AbstractCRUDController controller) : this(controller.BusinessLogic.GetType(), controller.CRUDFormType, controller.CRUDFormTitle) { }