コード例 #1
0
        public ControlFactoryElement LookupByKey(string key)
        {
            ControlFactoryElement retval = base.BaseGet(key) as ControlFactoryElement;

            if (retval == null)
            {
                throw new ArgumentException("key");
            }
            return(retval);
        }
コード例 #2
0
        protected override object GetElementKey(ConfigurationElement element)
        {
            ControlFactoryElement elem = element as ControlFactoryElement;

            if (elem == null)
            {
                throw new ArgumentException("Argument must be non-null and of type ControlFactoryElement", "element");
            }
            return(elem.Key == null ? string.Empty : elem.Key);
        }
コード例 #3
0
 public void Remove(ControlFactoryElement element)
 {
     this.BaseRemove(this.GetElementKey(element));
 }
コード例 #4
0
 public void Add(ControlFactoryElement element)
 {
     this.BaseAdd(element);
 }