DataColumnMappingCollection Класс
Определение
Содержит коллекцию объектов DataColumnMapping.Contains a collection of DataColumnMapping objects.
public ref class DataColumnMappingCollection sealed : MarshalByRefObject, System::Collections::IList, System::Data::IColumnMappingCollection
public ref class DataColumnMappingCollection sealed : MarshalByRefObject, System::Data::IColumnMappingCollection
public sealed class DataColumnMappingCollection : MarshalByRefObject, System.Collections.IList, System.Data.IColumnMappingCollection
public sealed class DataColumnMappingCollection : MarshalByRefObject, System.Data.IColumnMappingCollection
type DataColumnMappingCollection = class
inherit MarshalByRefObject
interface ICollection
interface IEnumerable
interface IList
interface IColumnMappingCollection
type DataColumnMappingCollection = class
inherit MarshalByRefObject
interface IColumnMappingCollection
interface IList
interface ICollection
interface IEnumerable
Public NotInheritable Class DataColumnMappingCollection
Inherits MarshalByRefObject
Implements IColumnMappingCollection, IList
Public NotInheritable Class DataColumnMappingCollection
Inherits MarshalByRefObject
Implements IColumnMappingCollection
- Наследование
- Реализации
Примеры
В следующем примере в DataTableMapping коллекцию используется для Add нескольких DataColumnMapping объектов ColumnMappings , а затем отображается список сопоставленных исходных столбцов.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. В этом примере предполагается, что объект DataTableMapping уже создан.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());
}
}
Public Sub ShowColumnMappings()
' ...
' create tableMapping
' ...
tableMapping.ColumnMappings.Add( _
"Category Name", "DataCategory")
tableMapping.ColumnMappings.Add( _
"Description", "DataDescription")
tableMapping.ColumnMappings.Add( _
"Picture", "DataPicture")
Console.WriteLine("Column Mappings:")
Dim i As Integer
For i = 0 To tableMapping.ColumnMappings.Count - 1
Console.WriteLine(" {0} {1}", i, _
tableMapping.ColumnMappings(i).ToString())
Next i
End Sub
Конструкторы
DataColumnMappingCollection() |
Создает пустой словарь DataColumnMappingCollection.Creates an empty DataColumnMappingCollection. |
Свойства
Count |
Возвращает количество объектов DataColumnMapping в коллекции.Gets the number of DataColumnMapping objects in the collection. |
Item[Int32] |
Возвращает или задает объект DataColumnMapping по указанному индексу.Gets or sets the DataColumnMapping object at the specified index. |
Item[String] |
Возвращает или задает объект DataColumnMapping с указанным именем исходного столбца.Gets or sets the DataColumnMapping object with the specified source column name. |
Методы
Add(Object) |
Добавляет объект DataColumnMapping в коллекцию.Adds a DataColumnMapping object to the collection. |
Add(String, String) |
Добавляет объект DataColumnMapping в коллекцию на основе заданного имени исходного столбца и имени столбца DataSet.Adds a DataColumnMapping object to the collection when given a source column name and a DataSet column name. |
AddRange(Array) |
Копирует элементы указанного объекта Array в конец коллекции.Copies the elements of the specified Array to the end of the collection. |
AddRange(DataColumnMapping[]) |
Копирует элементы указанного массива DataColumnMapping в конец коллекции.Copies the elements of the specified DataColumnMapping array to the end of the collection. |
Clear() |
Удаляет все объекты DataColumnMapping из коллекции.Removes all DataColumnMapping objects from the collection. |
Contains(Object) |
Возвращает значение, указывающее, существует ли объект DataColumnMapping с данным объектом Object в коллекции.Gets a value indicating whether a DataColumnMapping object with the given Object exists in the collection. |
Contains(String) |
Возвращает значение, указывающее, существует ли объект DataColumnMapping с данным именем исходного столбца в коллекции.Gets a value indicating whether a DataColumnMapping object with the given source column name exists in the collection. |
CopyTo(Array, Int32) |
Копирует элементы DataColumnMappingCollection в указанный массив.Copies the elements of the DataColumnMappingCollection to the specified array. |
CopyTo(DataColumnMapping[], Int32) |
Копирует элементы объекта DataColumnMappingCollection в указанный массив DataColumnMapping.Copies the elements of the DataColumnMappingCollection to the specified DataColumnMapping array. |
CreateObjRef(Type) |
Создает объект, который содержит всю необходимую информацию для создания прокси-сервера, используемого для взаимодействия с удаленным объектом.Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Унаследовано от MarshalByRefObject) |
Equals(Object) |
Определяет, равен ли указанный объект текущему объекту.Determines whether the specified object is equal to the current object. (Унаследовано от Object) |
GetByDataSetColumn(String) |
Возвращает объект DataColumnMapping с указанным именем столбца DataSet.Gets the DataColumnMapping object with the specified DataSet column name. |
GetColumnMappingBySchemaAction(DataColumnMappingCollection, String, MissingMappingAction) |
Возвращает объект DataColumnMapping для указанного DataColumnMappingCollection, имени исходного столбца и MissingMappingAction.Gets a DataColumnMapping for the specified DataColumnMappingCollection, source column name, and MissingMappingAction. |
GetDataColumn(DataColumnMappingCollection, String, Type, DataTable, MissingMappingAction, MissingSchemaAction) |
Статический метод, который возвращает объект DataColumn, не создавая экземпляр объекта DataColumnMappingCollection.A static method that returns a DataColumn object without instantiating a DataColumnMappingCollection object. |
GetEnumerator() |
Возвращает перечислитель, который может выполнять итерацию элементов коллекции.Gets an enumerator that can iterate through the collection. |
GetHashCode() |
Служит хэш-функцией по умолчанию.Serves as the default hash function. (Унаследовано от Object) |
GetLifetimeService() |
Извлекает объект обслуживания во время существования, который управляет политикой времени существования данного экземпляра.Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Унаследовано от MarshalByRefObject) |
GetType() |
Возвращает объект Type для текущего экземпляра.Gets the Type of the current instance. (Унаследовано от Object) |
IndexOf(Object) |
Возвращает расположение указанного объекта Object, который является объектом DataColumnMapping в коллекции.Gets the location of the specified Object that is a DataColumnMapping within the collection. |
IndexOf(String) |
Возвращает местоположение объекта DataColumnMapping с указанным именем исходного столбца.Gets the location of the DataColumnMapping with the specified source column name. |
IndexOfDataSetColumn(String) |
Возвращает местоположение указанного объекта DataColumnMapping с заданным именем столбца DataSet.Gets the location of the specified DataColumnMapping with the given DataSet column name. |
InitializeLifetimeService() |
Получает объект службы времени существования для управления политикой времени существования для этого экземпляра.Obtains a lifetime service object to control the lifetime policy for this instance. (Унаследовано от MarshalByRefObject) |
Insert(Int32, DataColumnMapping) |
Вставляет объект DataColumnMapping в коллекцию DataColumnMappingCollection по указанному индексу.Inserts a DataColumnMapping object into the DataColumnMappingCollection at the specified index. |
Insert(Int32, Object) |
Вставляет объект DataColumnMapping в коллекцию DataColumnMappingCollection по указанному индексу.Inserts a DataColumnMapping object into the DataColumnMappingCollection at the specified index. |
MemberwiseClone() |
Создает неполную копию текущего объекта Object.Creates a shallow copy of the current Object. (Унаследовано от Object) |
MemberwiseClone(Boolean) |
Создает неполную копию текущего объекта MarshalByRefObject.Creates a shallow copy of the current MarshalByRefObject object. (Унаследовано от MarshalByRefObject) |
Remove(DataColumnMapping) |
Удаляет указанный объект DataColumnMapping из коллекции.Removes the specified DataColumnMapping from the collection. |
Remove(Object) |
Удаляет из коллекции объект Object, который является объектом DataColumnMapping.Removes the Object that is a DataColumnMapping from the collection. |
RemoveAt(Int32) |
Удаляет объект DataColumnMapping с указанным индексом из коллекции.Removes the DataColumnMapping object with the specified index from the collection. |
RemoveAt(String) |
Удаляет из коллекции объект DataColumnMapping с указанным именем исходного столбца.Removes the DataColumnMapping object with the specified source column name from the collection. |
ToString() |
Возвращает строку, представляющую текущий объект.Returns a string that represents the current object. (Унаследовано от Object) |
Явные реализации интерфейса
ICollection.IsSynchronized |
Возвращает значение, указывающее, является ли доступ к ICollection синхронизированным (потокобезопасным).Gets a value that indicates whether access to the ICollection is synchronized (thread safe). |
ICollection.SyncRoot |
Получает объект, с помощью которого можно синхронизировать доступ к коллекции ICollection.Gets an object that can be used to synchronize access to the ICollection. |
IColumnMappingCollection.Add(String, String) |
Добавляет объект DataColumnMapping в коллекцию DataColumnMappingCollection с помощью имени исходного столбца и имени столбца DataSet.Adds a DataColumnMapping object to the DataColumnMappingCollection by using the source column and DataSet column names. |
IColumnMappingCollection.GetByDataSetColumn(String) |
Возвращает объект DataColumnMapping с заданным именем столбца DataSet.Gets the DataColumnMapping object that has the specified DataSet column name. |
IColumnMappingCollection.Item[String] |
Возвращает или задает объект IColumnMapping с указанным именем |
IList.IsFixedSize |
Получает значение, показывающее, имеет ли объект IList фиксированный размер.Gets a value that indicates whether the IList has a fixed size. |
IList.IsReadOnly |
Получает значение, указывающее, доступен ли объект IList только для чтения.Gets a value that indicates whether the IList is read-only. |
IList.Item[Int32] |
Возвращает или задает элемент по указанному индексу.Gets or sets the element at the specified index. |
Методы расширения
Cast<TResult>(IEnumerable) |
Приводит элементы объекта IEnumerable к заданному типу.Casts the elements of an IEnumerable to the specified type. |
OfType<TResult>(IEnumerable) |
Выполняет фильтрацию элементов объекта IEnumerable по заданному типу.Filters the elements of an IEnumerable based on a specified type. |
AsParallel(IEnumerable) |
Позволяет осуществлять параллельный запрос.Enables parallelization of a query. |
AsQueryable(IEnumerable) |
Преобразовывает коллекцию IEnumerable в объект IQueryable.Converts an IEnumerable to an IQueryable. |