IColumnMappingCollection 인터페이스

정의

DataColumnMapping 개체의 컬렉션을 포함하며, .NET 데이터 공급자가 공통적으로 사용하는 DataColumnMappingCollection에 의해 구현됩니다.

public interface class IColumnMappingCollection : System::Collections::IList
public interface IColumnMappingCollection : System.Collections.IList
type IColumnMappingCollection = interface
    interface ICollection
    interface IEnumerable
    interface IList
type IColumnMappingCollection = interface
    interface IList
    interface ICollection
    interface IEnumerable
Public Interface IColumnMappingCollection
Implements IList
파생
구현

예제

다음 예제에서는 파생 클래스 DataTableMapping의 instance 컬렉션에 대한 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 클래스를 만듭니다.

속성

Count

ICollection에 포함된 요소 수를 가져옵니다.

(다음에서 상속됨 ICollection)
IsFixedSize

IList의 크기가 고정되어 있는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 IList)
IsReadOnly

IList가 읽기 전용인지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 IList)
IsSynchronized

ICollection에 대한 액세스가 동기화되어 스레드로부터 안전하게 보호되는지를 나타내는 값을 가져옵니다.

(다음에서 상속됨 ICollection)
Item[Int32]

지정한 인덱스에 있는 요소를 가져오거나 설정합니다.

(다음에서 상속됨 IList)
Item[String]

지정된 SourceColumn 이름을 가진 IColumnMapping 개체를 가져오거나 설정합니다.

SyncRoot

ICollection에 대한 액세스를 동기화하는 데 사용할 수 있는 개체를 가져옵니다.

(다음에서 상속됨 ICollection)

메서드

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)

지정된 DataSet 열 이름을 가진 ColumnMapping 개체를 가져옵니다.

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 개체를 컬렉션에서 제거합니다.

확장 메서드

Cast<TResult>(IEnumerable)

IEnumerable의 요소를 지정된 형식으로 캐스팅합니다.

OfType<TResult>(IEnumerable)

지정된 형식에 따라 IEnumerable의 요소를 필터링합니다.

AsParallel(IEnumerable)

쿼리를 병렬화할 수 있도록 합니다.

AsQueryable(IEnumerable)

IEnumerableIQueryable로 변환합니다.

적용 대상