언어

ObservableCollectionListSource<T> 클래스

정의

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

[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BindingList raises ListChanged events with PropertyDescriptors. PropertyDescriptors require unreferenced code.")]
[System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })]
public class ObservableCollectionListSource<T> : System.Collections.ObjectModel.ObservableCollection<T>, System.ComponentModel.IListSource where T : class
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
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BindingList raises ListChanged events with PropertyDescriptors. PropertyDescriptors require unreferenced code.")>]
[<System.Runtime.CompilerServices.Nullable(new System.Byte[] { 0, 1 })>]
type ObservableCollectionListSource<'T (requires 'T : null)> = class
    inherit ObservableCollection<'T (requires 'T : null)>
    interface IListSource
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 데이터 바인딩의 경우 이 클래스의 인스턴스가 아닌 ObservableCollection을 사용합니다.

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

생성자

속성 Description
ObservableCollectionListSource<T>()

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

ObservableCollectionListSource<T>(IEnumerable<T>)

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

ObservableCollectionListSource<T>(List<T>)

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

명시적 인터페이스 구현

속성 Description
IListSource.ContainsListCollection

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

IListSource.GetList()

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

확장명 메서드

속성 Description
ToBindingList<T>(ObservableCollection<T>)

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

적용 대상