Exemple #1
0
        public static System.Type[] GetValidTypes(
            System.Type baseType,
            ITypeDiscoveryService typeResolutionService)
        {
            List <System.Type> typeList   = new List <System.Type>();
            ICollection        collection = typeResolutionService == null?GridViewHelper.GetTypes(baseType) : typeResolutionService.GetTypes(baseType, false);

            typeList.Add(typeof(GridViewTextBoxColumn));
            foreach (System.Type type in (IEnumerable)collection)
            {
                if (type.GetCustomAttributes(typeof(ObsoleteAttribute), true).Length <= 0 && (object)type != (object)typeof(GridViewTextBoxColumn) && (object)type != (object)baseType)
                {
                    typeList.Add(type);
                }
            }
            return(typeList.ToArray());
        }