Example #1
0
        public virtual PropertyDescriptorCollection GetProperties()
        {
            PropertyDescriptorCollection sourceProperties = TypeDescriptor.GetProperties(this.GetType());

            NewPropertyDescriptor[] propertyDescriptors = new NewPropertyDescriptor[sourceProperties.Count];

            int i = 0;

            foreach (PropertyDescriptor sourceDescriptor in sourceProperties)
            {
                NewPropertyDescriptor destDescriptor = new NewPropertyDescriptor(sourceDescriptor, resourceManager);
                AttributeCollection   attributes     = sourceDescriptor.Attributes;
                propertyDescriptors[i++] = destDescriptor;
            }
            PropertyDescriptorCollection destProperties = new PropertyDescriptorCollection(propertyDescriptors);

            return(destProperties);
        }
        public virtual PropertyDescriptorCollection GetProperties()
        {
            PropertyDescriptorCollection sourceProperties = TypeDescriptor.GetProperties(this.GetType());
            NewPropertyDescriptor[] propertyDescriptors = new NewPropertyDescriptor[sourceProperties.Count];

            int i = 0;
            foreach (PropertyDescriptor sourceDescriptor in sourceProperties)
            {
                NewPropertyDescriptor destDescriptor = new NewPropertyDescriptor(sourceDescriptor, resourceManager);
                AttributeCollection attributes = sourceDescriptor.Attributes;
                propertyDescriptors[i++] = destDescriptor;
            }
            PropertyDescriptorCollection destProperties = new PropertyDescriptorCollection(propertyDescriptors);
            return destProperties;
        }