Example #1
0
        /// <summary>
        /// Create an EditInterfaceManager that handles T objects.
        /// </summary>
        /// <typeparam name="T">The type the EditInterfaceManager handles.</typeparam>
        /// <param name="createEditInterface">The callback funciton to create EditInterfaces for T types.</param>
        /// <param name="items">The initial set of items to add, can be null.</param>
        public EditInterfaceManager <T> createEditInterfaceManager <T>(EditInterfaceManager <T> .CreateEditInterfaceDelegate createEditInterface, IEnumerable <T> items = null)
            where T : class
        {
            if (editInterfaceManagers == null)
            {
                editInterfaceManagers = new Dictionary <Type, object>();
            }
            var editInterfaceManager = new EditInterfaceManager <T>(this, createEditInterface, items);

            editInterfaceManagers.Add(typeof(T), editInterfaceManager);
            return(editInterfaceManager);
        }
Example #2
0
        /// <summary>
        /// Create an EditInterfaceManager that handles T objects.
        /// </summary>
        /// <typeparam name="T">The type the EditInterfaceManager handles.</typeparam>
        public EditInterfaceManager <T> createEditInterfaceManager <T>()
            where T : class
        {
            if (editInterfaceManagers == null)
            {
                editInterfaceManagers = new Dictionary <Type, object>();
            }
            var editInterfaceManager = new EditInterfaceManager <T>(this);

            editInterfaceManagers.Add(typeof(T), editInterfaceManager);
            return(editInterfaceManager);
        }