IEnumerator IEnumerable.GetEnumerator() { var items = new DataViewManagerListItemTypeDescriptor[1]; ((ICollection)this).CopyTo(items, 0); return(items.GetEnumerator()); }
public override object GetValue (object component) { DataViewManagerListItemTypeDescriptor desc = component as DataViewManagerListItemTypeDescriptor; if (desc == null) return null; return new DataView (table, desc.DataViewManager); }
internal DataViewManager(DataSet dataSet, bool locked) { GC.SuppressFinalize(this); this.dataSet = dataSet; if (this.dataSet != null) { this.dataSet.Tables.CollectionChanged += new CollectionChangeEventHandler(TableCollectionChanged); this.dataSet.Relations.CollectionChanged += new CollectionChangeEventHandler(RelationCollectionChanged); } this.locked = locked; this.item = new DataViewManagerListItemTypeDescriptor(this); this.dataViewSettingsCollection = new DataViewSettingCollection(this); }
object IList.this [int index] { get { if (descriptor == null) { descriptor = new DataViewManagerListItemTypeDescriptor(this); } return(descriptor); } set { throw new ArgumentException("Not modifiable"); } }
PropertyDescriptorCollection ITypedList.GetItemProperties(PropertyDescriptor[] listAccessors) { if (dataSet == null) { throw new DataException("dataset is null"); } if (listAccessors == null || listAccessors.Length == 0) { ICustomTypeDescriptor desc = new DataViewManagerListItemTypeDescriptor(this); return(desc.GetProperties()); } throw new NotImplementedException(); }
object IList.this [int index] { get { #if NOT_PFX if (descriptor == null) { descriptor = new DataViewManagerListItemTypeDescriptor(this); } return(descriptor); #endif // TODO: implement something adequate // throw new NotImplementedException(); return(null); } set { throw new ArgumentException("Not modifiable"); } }
PropertyDescriptorCollection ITypedList.GetItemProperties (PropertyDescriptor[] listAccessors) { if (dataSet == null) throw new DataException ("dataset is null"); if (listAccessors == null || listAccessors.Length == 0) { ICustomTypeDescriptor desc = new DataViewManagerListItemTypeDescriptor (this); return desc.GetProperties (); } throw new NotImplementedException (); }
IEnumerator IEnumerable.GetEnumerator () { DataViewManagerListItemTypeDescriptor[] array = new DataViewManagerListItemTypeDescriptor[((ICollection)this).Count]; ((ICollection)this).CopyTo (array, 0); return array.GetEnumerator (); }
object IList.this [int index] { get { if (descriptor == null) descriptor = new DataViewManagerListItemTypeDescriptor (this); return descriptor; } set { throw new ArgumentException ("Not modifiable"); } }
public override object GetValue(object component) { DataViewManagerListItemTypeDescriptor dataViewManagerListItem = (DataViewManagerListItemTypeDescriptor)component; return(dataViewManagerListItem.GetDataView(Table)); }
IEnumerator IEnumerable.GetEnumerator() { DataViewManagerListItemTypeDescriptor[] array = new DataViewManagerListItemTypeDescriptor[((ICollection)this).Count]; ((ICollection)this).CopyTo(array, 0); return(array.GetEnumerator()); }
IEnumerator IEnumerable.GetEnumerator() { var items = new DataViewManagerListItemTypeDescriptor[1]; ((ICollection)this).CopyTo(items, 0); return items.GetEnumerator(); }