PropertyDescriptorCollection ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors)
 {
     if (this._dataSource != null)
     {
         ICollection viewNames = this._dataSource.GetViewNames();
         if ((viewNames != null) && (viewNames.Count > 0))
         {
             string[] array = new string[viewNames.Count];
             viewNames.CopyTo(array, 0);
             PropertyDescriptor[] properties = new PropertyDescriptor[viewNames.Count];
             for (int i = 0; i < array.Length; i++)
             {
                 properties[i] = new ListSourceHelper.ListSourcePropertyDescriptor(array[i]);
             }
             return new PropertyDescriptorCollection(properties);
         }
     }
     return new PropertyDescriptorCollection(null);
 }
Esempio n. 2
0
 PropertyDescriptorCollection ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors)
 {
     if (this._dataSource != null)
     {
         ICollection viewNames = this._dataSource.GetViewNames();
         if ((viewNames != null) && (viewNames.Count > 0))
         {
             string[] array = new string[viewNames.Count];
             viewNames.CopyTo(array, 0);
             PropertyDescriptor[] properties = new PropertyDescriptor[viewNames.Count];
             for (int i = 0; i < array.Length; i++)
             {
                 properties[i] = new ListSourceHelper.ListSourcePropertyDescriptor(array[i]);
             }
             return(new PropertyDescriptorCollection(properties));
         }
     }
     return(new PropertyDescriptorCollection(null));
 }