Share via


ObservableCollectionListSource<T> 클래스

정의

ObservableCollection<T> 명시적 구현 IListSource을 확장하고 추가합니다.

public class ObservableCollectionListSource<T> : System.Collections.ObjectModel.ObservableCollection<T>, System.ComponentModel.IListSource where T : class
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BindingList raises ListChanged events with PropertyDescriptors. PropertyDescriptors require unreferenced code.")]
public class ObservableCollectionListSource<T> : System.Collections.ObjectModel.ObservableCollection<T>, System.ComponentModel.IListSource where T : class
type ObservableCollectionListSource<'T (requires 'T : null)> = class
    inherit ObservableCollection<'T (requires 'T : null)>
    interface IListSource
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BindingList raises ListChanged events with PropertyDescriptors. PropertyDescriptors require unreferenced code.")>]
type ObservableCollectionListSource<'T (requires 'T : null)> = class
    inherit ObservableCollection<'T (requires 'T : null)>
    interface IListSource
Public Class ObservableCollectionListSource(Of T)
Inherits ObservableCollection(Of T)
Implements IListSource

형식 매개 변수

T

컬렉션에 있는 요소의 형식입니다.

상속
ObservableCollectionListSource<T>
특성
구현

설명

메서드 GetList() 는 ObservableCollection과 동기화 상태를 유지하는 구현을 반환 IBindingList 하기 위해 구현됩니다.

이 클래스는 Windows Forms 데이터 바인딩에 사용할 엔터티의 탐색 속성을 구현하는 데 사용할 수 있습니다. WPF 데이터 바인딩의 경우 이 클래스의 instance 아니라 ObservableCollection을 사용합니다.

자세한 내용 및 예제 는 EF Core에서 추적된 엔터티의 로컬 보기를 참조하세요.

생성자

ObservableCollectionListSource<T>()

ObservableCollectionListSource<T> 클래스의 새 인스턴스를 초기화합니다.

ObservableCollectionListSource<T>(IEnumerable<T>)

지정된 컬렉션에서 복사한 요소가 포함된 ObservableCollectionListSource<T> 클래스의 새 인스턴스를 초기화합니다.

ObservableCollectionListSource<T>(List<T>)

지정된 목록에서 복사한 요소가 들어 있는 ObservableCollectionListSource<T> 클래스의 새 인스턴스를 초기화합니다.

명시적 인터페이스 구현

IListSource.ContainsListCollection

포함된 컬렉션이 없으므로 항상 false입니다.

IListSource.GetList()

ObservableCollection<T>IBindingList 동기화된 상태로 유지되는 구현을 반환합니다. 반환된 목록은 이 메서드를 호출할 때마다 동일한 목록이 반환되도록 이 개체에 캐시됩니다.

확장 메서드

ToBindingList<T>(ObservableCollection<T>)

지정된 ObservableCollection<T>BindingList<T> 동기화 상태를 유지하는 구현을 반환합니다.

적용 대상