Exemple #1
0
        public ComponentInstance this[ComponentDescriptor componentDescriptor]
        {
            get
            {
                foreach (ComponentInstance ComponentInstance in this.innerList)
                {
                    if (ComponentInstance.Descriptor == componentDescriptor)
                    {
                        return(ComponentInstance);
                    }
                }

                ComponentInstance NewComponentInstance = componentDescriptor.CreateComponentInstance();
                this.innerList.Add(NewComponentInstance);
                this.InvokeComponentInstanceAdded(NewComponentInstance);
                return(NewComponentInstance);
            }
        }