DataColumnMappingCollection Class

 

Contains a collection of DataColumnMapping objects.

Namespace:   System.Data.Common
Assembly:  System.Data (in System.Data.dll)

System.Object
  System.MarshalByRefObject
    System.Data.Common.DataColumnMappingCollection

public sealed class DataColumnMappingCollection : MarshalByRefObject, 
	IColumnMappingCollection, IList, ICollection, IEnumerable

NameDescription
System_CAPS_pubmethodDataColumnMappingCollection()

Creates an empty DataColumnMappingCollection.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of DataColumnMapping objects in the collection.

System_CAPS_pubpropertyItem[Int32]

Gets or sets the DataColumnMapping object at the specified index.

System_CAPS_pubpropertyItem[String]

Gets or sets the DataColumnMapping object with the specified source column name.

NameDescription
System_CAPS_pubmethodAdd(Object)

Adds a DataColumnMapping object to the collection.

System_CAPS_pubmethodAdd(String, String)

Adds a DataColumnMapping object to the collection when given a source column name and a DataSet column name.

System_CAPS_pubmethodAddRange(Array)

Copies the elements of the specified Array to the end of the collection.

System_CAPS_pubmethodAddRange(DataColumnMapping[])

Copies the elements of the specified DataColumnMapping array to the end of the collection.

System_CAPS_pubmethodClear()

Removes all DataColumnMapping objects from the collection.

System_CAPS_pubmethodContains(Object)

Gets a value indicating whether a DataColumnMapping object with the given Object exists in the collection.

System_CAPS_pubmethodContains(String)

Gets a value indicating whether a DataColumnMapping object with the given source column name exists in the collection.

System_CAPS_pubmethodCopyTo(Array, Int32)

Copies the elements of the DataColumnMappingCollection to the specified array.

System_CAPS_pubmethodCopyTo(DataColumnMapping[], Int32)

Copies the elements of the DataColumnMappingCollection to the specified DataColumnMapping array.

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetByDataSetColumn(String)

Gets the DataColumnMapping object with the specified DataSet column name.

System_CAPS_pubmethodSystem_CAPS_staticGetColumnMappingBySchemaAction(DataColumnMappingCollection, String, MissingMappingAction)

Gets a DataColumnMapping for the specified DataColumnMappingCollection, source column name, and MissingMappingAction.

System_CAPS_pubmethodSystem_CAPS_staticGetDataColumn(DataColumnMappingCollection, String, Type, DataTable, MissingMappingAction, MissingSchemaAction)

A static method that returns a DataColumn object without instantiating a DataColumnMappingCollection object.

System_CAPS_pubmethodGetEnumerator()

Gets an enumerator that can iterate through the collection.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIndexOf(Object)

Gets the location of the specified Object that is a DataColumnMapping within the collection.

System_CAPS_pubmethodIndexOf(String)

Gets the location of the DataColumnMapping with the specified source column name.

System_CAPS_pubmethodIndexOfDataSetColumn(String)

Gets the location of the specified DataColumnMapping with the given DataSet column name.

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodInsert(Int32, DataColumnMapping)

Inserts a DataColumnMapping object into the DataColumnMappingCollection at the specified index.

System_CAPS_pubmethodInsert(Int32, Object)

Inserts a DataColumnMapping object into the DataColumnMappingCollection at the specified index.

System_CAPS_pubmethodRemove(DataColumnMapping)

Removes the specified DataColumnMapping from the collection.

System_CAPS_pubmethodRemove(Object)

Removes the Object that is a DataColumnMapping from the collection.

System_CAPS_pubmethodRemoveAt(Int32)

Removes the DataColumnMapping object with the specified index from the collection.

System_CAPS_pubmethodRemoveAt(String)

Removes the DataColumnMapping object with the specified source column name from the collection.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIColumnMappingCollection.Add(String, String)

Adds a DataColumnMapping object to the DataColumnMappingCollection by using the source column and DataSet column names.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIColumnMappingCollection.GetByDataSetColumn(String)

Gets the DataColumnMapping object that has the specified DataSet column name.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.IsSynchronized

Gets a value that indicates whether access to the ICollection is synchronized (thread safe).

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection.SyncRoot

Gets an object that can be used to synchronize access to the ICollection.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIList.IsFixedSize

Gets a value that indicates whether the IList has a fixed size.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIList.IsReadOnly

Gets a value that indicates whether the IList is read-only.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIList.Item[Int32]

Gets or sets the element at the specified index.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIColumnMappingCollection.Item[String]

Gets or sets the IColumnMapping object with the specified SourceColumn name.

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

The following example uses a DataTableMapping to Add several DataColumnMapping objects to its ColumnMappings collection, and then displays a list of those mapped source columns. This example assumes that a DataTableMapping has already been created.


public void ShowColumnMappings() 
{
    // ...
    // create tableMapping
    // ...
    tableMapping.ColumnMappings.Add("Category Name","DataCategory");
    tableMapping.ColumnMappings.Add("Description","DataDescription");
    tableMapping.ColumnMappings.Add("Picture","DataPicture");
    Console.WriteLine("Column Mappings");
    for(int i=0;i < tableMapping.ColumnMappings.Count;i++) 
    {
        Console.WriteLine("  {0} {1}", i,
            tableMapping.ColumnMappings[i].ToString());
    }
}

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: