/// <summary>
        /// Remove the subinterface bound to source.
        /// </summary>
        /// <param name="source">The class that provided the interface to remove.</param>
        public void removeSubInterface(T source)
        {
            EditInterface subInterface;

            if (interfaceDictionary.TryGetValue(source, out subInterface))
            {
                editInterface.removeSubInterface(subInterface);
                interfaceDictionary.Remove(source);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Safe version of removeSubInterface. Will check for the calling object to be null first.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="editInterface"></param>
 /// <param name="key"></param>
 public static void safeRemoveSubInterface <T>(this EditInterface editInterface, T key)
     where T : class
 {
     if (editInterface != null)
     {
         editInterface.removeSubInterface <T>(key);
     }
 }