Пример #1
0
        public ComponentInfo(Type componentType, ITypeHandler typeHandler)
        {
            if (componentType == null)
            {
                throw new ArgumentNullException("componentType");
            }
            if (typeHandler == null)
            {
                throw new ArgumentNullException("typeHandler");
            }

            ComponentType    = componentType;
            this.typeHandler = typeHandler;

            properties = typeHandler.GetProperties(componentType);
            if (properties.Length == 0)
            {
                propertyNames = emptyPropertyNames;
            }
            else
            {
                propertyNames = new string[properties.Length];
                for (int i = 0; i < properties.Length; i++)
                {
                    propertyNames[i] = properties[i].Name;
                }
            }
        }
Пример #2
0
        public ComponentInfo(Type componentType, ITypeHandler typeHandler)
        {
            if (componentType == null) throw new ArgumentNullException("componentType");
            if (typeHandler == null) throw new ArgumentNullException("typeHandler");

            ComponentType = componentType;
            this.typeHandler = typeHandler;

            properties = typeHandler.GetProperties(componentType);
            if (properties.Length == 0)
            {
                propertyNames = emptyPropertyNames;
            }
            else
            {
                propertyNames = new string[properties.Length];
                for (int i = 0; i < properties.Length; i++)
                    propertyNames[i] = properties[i].Name;
            }
        }