internal int IndexOf(DataColumn column)
 {
     for (int i = 0; i < this.count; i++)
     {
         if (this.errorList[i].column == column)
         {
             return i;
         }
     }
     if (this.count >= this.errorList.Length)
     {
         ColumnError[] destinationArray = new ColumnError[Math.Min(this.count * 2, column.Table.Columns.Count)];
         Array.Copy(this.errorList, 0, destinationArray, 0, this.count);
         this.errorList = destinationArray;
     }
     return this.count;
 }
 internal int IndexOf(DataColumn column)
 {
     for (int i = 0; i < this.count; i++)
     {
         if (this.errorList[i].column == column)
         {
             return(i);
         }
     }
     if (this.count >= this.errorList.Length)
     {
         ColumnError[] destinationArray = new ColumnError[Math.Min(this.count * 2, column.Table.Columns.Count)];
         Array.Copy(this.errorList, 0, destinationArray, 0, this.count);
         this.errorList = destinationArray;
     }
     return(this.count);
 }
        internal int IndexOf(DataColumn column)
        {
            // try to find the column
            for (int i = 0; i < count; i++)
            {
                if (errorList[i].column == column)
                {
                    return(i);
                }
            }

            if (count >= errorList.Length)
            {
                int           newCapacity = Math.Min(count * 2, column.Table.Columns.Count);
                ColumnError[] biggerList  = new ColumnError[newCapacity];
                System.Array.Copy(errorList, 0, biggerList, 0, count);
                errorList = biggerList;
            }
            return(count);
        }
Exemple #4
0
        internal int IndexOf(DataColumn column)
        {
            // try to find the column
            for (int i = 0; i < _count; i++)
            {
                if (_errorList[i]._column == column)
                {
                    return(i);
                }
            }

            if (_count >= _errorList.Length)
            {
                int newCapacity = Math.Min(_count * 2, column.Table.Columns.Count);
                var biggerList  = new ColumnError[newCapacity];
                Array.Copy(_errorList, 0, biggerList, 0, _count);
                _errorList = biggerList;
            }
            return(_count);
        }
        internal int IndexOf (DataColumn column) {
            // try to find the column
            for (int i = 0; i < count; i++) {
                if (errorList[i].column == column) {
                    return i;
                }
            }

            if (count >= errorList.Length) {
                int newCapacity = Math.Min(count*2, column.Table.Columns.Count);
                ColumnError[] biggerList = new ColumnError[newCapacity];
                System.Array.Copy(errorList, 0, biggerList, 0, count);
                errorList = biggerList;
            }
            return count;
        }
Exemple #6
0
        internal int IndexOf(DataColumn column)
        {
            // try to find the column
            for (int i = 0; i < _count; i++)
            {
                if (_errorList[i]._column == column)
                {
                    return i;
                }
            }

            if (_count >= _errorList.Length)
            {
                int newCapacity = Math.Min(_count * 2, column.Table.Columns.Count);
                var biggerList = new ColumnError[newCapacity];
                Array.Copy(_errorList, 0, biggerList, 0, _count);
                _errorList = biggerList;
            }
            return _count;
        }
Exemple #7
0
 public void ProcessError(object sender, ColumnErrorEventArgs e)
 {
     ColumnError?.Invoke(sender, e);
 }