private static PropertyDescriptorCollection CreateColumnPropertyDescriptorCollection(Array source) { var elementType = source.GetType().GetElementType(); var n = source.GetLength(0); var descriptors = new Array2DIndexPropertyDescriptor[n]; for (int i = 0; i < n; i++) { descriptors[i] = new Array2DIndexPropertyDescriptor(elementType, i); } return new PropertyDescriptorCollection(descriptors); }
private static PropertyDescriptorCollection CreateRowPropertyDescriptorCollection(Array source) { var elementType = source.GetType().GetElementType(); var n = source.GetLength(1); var descriptors = new Array2DIndexPropertyDescriptor[n]; for (int i = 0; i < n; i++) { descriptors[i] = new Array2DIndexPropertyDescriptor(elementType, i); } // ReSharper disable once CoVariantArrayConversion return new PropertyDescriptorCollection(descriptors); }
private static PropertyDescriptorCollection CreateColumnPropertyDescriptorCollection(Array source) { var elementType = source.GetType().GetElementType(); var n = source.GetLength(0); var descriptors = new Array2DIndexPropertyDescriptor[n]; for (int i = 0; i < n; i++) { descriptors[i] = new Array2DIndexPropertyDescriptor(elementType, i); } return(new PropertyDescriptorCollection(descriptors)); }
private static PropertyDescriptorCollection CreateRowPropertyDescriptorCollection(Array source) { var elementType = source.GetType().GetElementType(); var n = source.GetLength(1); var descriptors = new Array2DIndexPropertyDescriptor[n]; for (int i = 0; i < n; i++) { descriptors[i] = new Array2DIndexPropertyDescriptor(elementType, i); } // ReSharper disable once CoVariantArrayConversion return(new PropertyDescriptorCollection(descriptors)); }
internal static Array2DRowView CreateForColumn(Array2DView source, int columnIndex) { var propertyDescriptors = Array2DIndexPropertyDescriptor.GetColumnPropertyDescriptorCollection(source); return(new Array2DRowView(source, columnIndex, propertyDescriptors)); }
internal static Array2DRowView CreateForRow(Array2DView source, int rowIndex) { var propertyDescriptors = Array2DIndexPropertyDescriptor.GetRowPropertyDescriptorCollection(source); return(new Array2DRowView(source, rowIndex, propertyDescriptors)); }