public int Add(string key, Type type)
        {
            if (key == null)
            {
                throw new ArgumentNullException("key");
            }
            if (type == null)
            {
                throw new ArgumentNullException("type");
            }
            if (!type.IsSubclassOf(typeof(SchemaImporterExtension)))
            {
                throw new ArgumentException("The type argument must be subclass of SchemaImporterExtension.");
            }

            SchemaImporterExtension e = (SchemaImporterExtension)Activator.CreateInstance(type);

            if (named_items.ContainsKey(key))
            {
                throw new InvalidOperationException(String.Format("A SchemaImporterExtension keyed by '{0}' already exists.", key));
            }
            int ret = Add(e);

            named_items.Add(key, e);
            return(ret);
        }
 public int Add(SchemaImporterExtension extension)
 {
     if (extension == null)
     {
         throw new ArgumentNullException("extension");
     }
     return(List.Add(extension));
 }
 public void Insert(int index, SchemaImporterExtension extension)
 {
     if (extension == null)
     {
         throw new ArgumentNullException("extension");
     }
     List.Insert(index, extension);
 }
        public void Remove(SchemaImporterExtension extension)
        {
            int idx = IndexOf(extension);

            if (idx >= 0)
            {
                List.RemoveAt(idx);
            }
        }
 public bool Contains(SchemaImporterExtension extension)
 {
     if (extension == null)
     {
         throw new ArgumentNullException("extension");
     }
     foreach (SchemaImporterExtension e in List)
     {
         if (extension.Equals(e))
         {
             return(true);
         }
     }
     return(false);
 }
        public void Remove(string name)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (!named_items.ContainsKey(name))
            {
                return;
            }
            SchemaImporterExtension e = named_items [name];

            Remove(e);
            named_items.Remove(name);
        }
        public int IndexOf(SchemaImporterExtension extension)
        {
            if (extension == null)
            {
                throw new ArgumentNullException("extension");
            }
            int i = 0;

            foreach (SchemaImporterExtension e in List)
            {
                if (extension.Equals(e))
                {
                    return(i);
                }
                i++;
            }
            return(-1);
        }