GetPropertyDescriptorCollection() private method

Retrieves an array of properties that the given component instance provides. This may differ from the set of properties the class provides. If the component is sited, the site may add or remove additional properties. The returned array of properties will be filtered by the given set of attributes.
private GetPropertyDescriptorCollection ( Attribute attributes ) : PropertyDescriptorCollection
attributes Attribute
return PropertyDescriptorCollection
Exemplo n.º 1
0
        PropertyDescriptorCollection System.ComponentModel.ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors) {
            DataSet dataSet = DataSet;
            if (dataSet == null)
                throw ExceptionBuilder.CanNotUseDataViewManager();

            if (listAccessors == null || listAccessors.Length == 0) {
                return((ICustomTypeDescriptor)(new DataViewManagerListItemTypeDescriptor(this))).GetProperties();
            }
            else {
                DataTable table = dataSet.FindTable(null, listAccessors, 0);
                if (table != null) {
                    return table.GetPropertyDescriptorCollection(null);
                }
            }
            return new PropertyDescriptorCollection(null);
        }
Exemplo n.º 2
0
        PropertyDescriptorCollection ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors)
        {
            System.Data.DataSet dataSet = this.DataSet;
            if (dataSet == null)
            {
                throw ExceptionBuilder.CanNotUseDataViewManager();
            }
            if ((listAccessors == null) || (listAccessors.Length == 0))
            {
                return(((ICustomTypeDescriptor) new DataViewManagerListItemTypeDescriptor(this)).GetProperties());
            }
            DataTable table = dataSet.FindTable(null, listAccessors, 0);

            if (table != null)
            {
                return(table.GetPropertyDescriptorCollection(null));
            }
            return(new PropertyDescriptorCollection(null));
        }