System.Data.Common.DataTableMappingCollection.IndexOf(string)

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

6 Examples 7

1. Example

View license
public bool Contains(string value) {
            return (-1 != IndexOf(value));
        }

2. Example

View license
private int RangeCheck(string sourceTable) {
            int index = IndexOf(sourceTable);
            if (index < 0) {
                throw ADP.TablesSourceIndex(sourceTable);
            }
            return index;
        }

3. Example

View license
internal void ValidateSourceTable(int index, string value) {
            int pindex = IndexOf(value);
            if ((-1 != pindex) && (index != pindex)) { // must be non-null and unique
                throw ADP.TablesUniqueSourceTable(value);
            }
        }

4. Example

View license
[ EditorBrowsableAttribute(EditorBrowsableState.Advanced) ] // MDAC 69508
        static public Data/n ..... /n //View Source file for more details /n }

5. Example

View license
private void Validate(int index, DataTableMapping value) {
            if (null == value) {
                throw ADP.TablesAddNullAttempt("value");
            }
            if (null != value.Parent) {
                if (this != value.Parent) {
                    throw ADP.TablesIsNotParent(this);
                }
                else if (index != IndexOf(value)) {
                    throw ADP.TablesIsParent(this);
                }
            }
            String name = value.SourceTable;
            if (ADP.IsEmpty(name)) {
                index = 1;
                do {
                    name = ADP.SourceTable + index.ToString(System.Globalization.CultureInfo.InvariantCulture);
                    index++;
                } while (-1 != IndexOf(name));
                value.SourceTable = name;
            }
            else {
                ValidateSourceTable(index, name);
            }
        }

6. Example

Project: referencesource
Source File: DbDataAdapter.cs
View license
public int Update(DataSet dataSet, string srcTable) { // V1.0.3300
            IntPtr hscp;
        /n ..... /n //View Source file for more details /n }