IColumnMappingCollection 인터페이스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
DataColumnMapping 개체의 컬렉션을 포함하며 .NET 데이터 공급자가 공통적으로 사용하는 개체에 의해 DataColumnMappingCollection구현됩니다.
public interface class IColumnMappingCollection : System::Collections::IList
public interface IColumnMappingCollection : System.Collections.IList
type IColumnMappingCollection = interface
interface IList
interface ICollection
interface IEnumerable
type IColumnMappingCollection = interface
interface ICollection
interface IEnumerable
interface IList
Public Interface IColumnMappingCollection
Implements IList
- 파생
- 구현
예제
다음 예제에서는 파생 클래스 DataTableMapping의 인스턴스를 컬렉션에 대한 Add 여러 DataColumnMapping 개체에 ColumnMappings 사용한 다음 매핑된 원본 테이블 목록을 표시합니다. 이 예제에서는 DataTableMapping 이미 만들어진 것으로 가정합니다.
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
설명
이 IColumnMappingCollection 인터페이스를 사용하면 상속 클래스가 ColumnMapping 컬렉션을 구현할 수 있습니다. 자세한 내용은 DataAdapter DataTable 및 DataColumn 매핑을 참조하세요.
애플리케이션은 인터페이스의 인스턴스를 IColumnMappingCollection 직접 만들지 않지만 상속되는 클래스의 인스턴스를 만듭니다 IColumnMappingCollection.
상속 IColumnMappingCollection 되는 클래스는 상속된 모든 멤버를 구현해야 하며, 일반적으로 공급자별 기능을 추가하기 위해 추가 멤버를 정의해야 합니다. 예를 들어 인터페이스는 IColumnMappingCollection 메서드를 RemoveAt 정의합니다. 이 클래스는 DataTableMappingCollection 이 메서드를 상속하고 두 개의 추가 오버로드를 정의합니다 RemoveAt.
구현자 참고
인터페이스에서 상속하는 IColumnMappingCollection 경우 다음 생성자를 구현해야 합니다.
| 항목 | 설명 |
|---|---|
| ColumnMappingCollection() | 빈 ColumnMappingCollection 클래스를 만듭니다. |
속성
| Name | Description |
|---|---|
| Count |
에 포함된 ICollection요소 수를 가져옵니다. (다음에서 상속됨 ICollection) |
| IsFixedSize |
고정 크기가 있는지 여부를 IList 나타내는 값을 가져옵니다. (다음에서 상속됨 IList) |
| IsReadOnly |
IList 읽기 전용인지 여부를 나타내는 값을 가져옵니다. (다음에서 상속됨 IList) |
| IsSynchronized |
ICollection 대한 액세스가 동기화되는지 여부를 나타내는 값을 가져옵니다(스레드로부터 안전). (다음에서 상속됨 ICollection) |
| Item[Int32] |
지정된 인덱스에서 요소를 가져오거나 설정합니다. (다음에서 상속됨 IList) |
| Item[String] |
지정된 |
| SyncRoot |
ICollection대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다. (다음에서 상속됨 ICollection) |
메서드
| Name | Description |
|---|---|
| Add(Object) |
에 항목을 IList추가합니다. (다음에서 상속됨 IList) |
| Add(String, String) |
원본 열 및 DataSet 열 이름을 사용하여 ColumnMapping 컬렉션에 ColumnMapping 개체를 추가합니다. |
| Clear() |
에서 모든 항목을 IList제거합니다. (다음에서 상속됨 IList) |
| Contains(Object) |
특정 값이 IList 포함되어 있는지 여부를 확인합니다. (다음에서 상속됨 IList) |
| Contains(String) |
지정된 원본 열 이름을 가진 개체가 DataColumnMappingCollection 포함되어 DataColumnMapping 있는지 여부를 나타내는 값을 가져옵니다. |
| CopyTo(Array, Int32) |
특정 ICollection 인덱스에서 시작하여 Array 요소를 Array복사합니다. (다음에서 상속됨 ICollection) |
| GetByDataSetColumn(String) |
지정한 열 이름을 가진 ColumnMapping 개체를 DataSet 가져옵니다. |
| GetEnumerator() |
컬렉션을 반복하는 열거자를 반환합니다. (다음에서 상속됨 IEnumerable) |
| IndexOf(Object) |
에서 특정 항목의 인덱스를 IList결정합니다. (다음에서 상속됨 IList) |
| IndexOf(String) |
지정된 원본 열 이름을 가진 개체의 DataColumnMapping 위치를 가져옵니다. 이름은 대/소문자를 구분합니다. |
| Insert(Int32, Object) |
지정된 인덱스에 항목을 IList 삽입합니다. (다음에서 상속됨 IList) |
| Remove(Object) |
에서 특정 개체의 첫 번째 항목을 제거합니다 IList. (다음에서 상속됨 IList) |
| RemoveAt(Int32) |
지정된 인덱스의 IList 항목을 제거합니다. (다음에서 상속됨 IList) |
| RemoveAt(String) |
컬렉션에서 IColumnMapping 지정된 SourceColumn 이름의 개체를 제거합니다. |
확장명 메서드
| Name | Description |
|---|---|
| AsParallel(IEnumerable) |
쿼리의 병렬 처리를 사용하도록 설정합니다. |
| AsQueryable(IEnumerable) |
IEnumerable IQueryable변환합니다. |
| Cast<TResult>(IEnumerable) |
IEnumerable 요소를 지정된 형식으로 캐스팅합니다. |
| OfType<TResult>(IEnumerable) |
지정된 형식에 따라 IEnumerable 요소를 필터링합니다. |