System.Data.Common.DataColumnMappingCollection.ValidateType(object)

Here are the examples of the csharp api class System.Data.Common.DataColumnMappingCollection.ValidateType(object) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

5 Examples 7

1. Example

Project: referencesource
Source File: DataColumnMappingCollection.cs
public int IndexOf (object value) {
            if (null != value) {
                ValidateType(value);
                for (int i = 0; i < Count; ++i) {
                    if (items[i] == value) {
                        return i;
                    }
                }
            }
            return -1;
        }

2. Example

Project: referencesource
Source File: DataColumnMappingCollection.cs
public int Add(object value) {
            ValidateType(value);
            Add((DataColumnMapping) value);
            return Count-1;
        }

3. Example

Project: referencesource
Source File: DataColumnMappingCollection.cs
private void AddEnumerableRange(IEnumerable values, bool doClone) {
            if (null == values) {
                throw ADP.ArgumentNull("values");
            }
            foreach(object value in values) {
                ValidateType(value);
            }
            if (doClone) {
                foreach(ICloneable value in values) {
                    AddWithoutEvents(value.Clone() as DataColumnMapping);
                }
            }
            else {
                foreach(DataColumnMapping value in values) {
                    AddWithoutEvents(value);
                }
            }
        }

4. Example

Project: referencesource
Source File: DataColumnMappingCollection.cs
public void Insert(int index, Object value) {
            ValidateType(value);
            Insert(index, (DataColumnMapping) value);
        }

5. Example

Project: referencesource
Source File: DataColumnMappingCollection.cs
public void Remove(object value) {
            ValidateType(value);
            Remove((DataColumnMapping) value);
        }