TimelineMarkerCollection 클래스

정의

인덱스에서 개별적으로 액세스할 수 있는 TimelineMarker 개체의 컬렉션을 나타냅니다. TimelineMarkerCollection은 컬렉션에 포함된 각 TimelineMarker 항목의 시간 값에 따라 순서가 결정되는 순서가 지정된 목록입니다. 컬렉션 API에 미치는 영향에 대한 자세한 내용은 비고를 참조하세요.

public ref class TimelineMarkerCollection sealed : IIterable<TimelineMarker ^>, IVector<TimelineMarker ^>
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TimelineMarkerCollection final : IIterable<TimelineMarker>, IVector<TimelineMarker>
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class TimelineMarkerCollection final : IIterable<TimelineMarker>, IVector<TimelineMarker>
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TimelineMarkerCollection : IEnumerable<TimelineMarker>, IList<TimelineMarker>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class TimelineMarkerCollection : IEnumerable<TimelineMarker>, IList<TimelineMarker>
Public NotInheritable Class TimelineMarkerCollection
Implements IEnumerable(Of TimelineMarker), IList(Of TimelineMarker)
상속
Object Platform::Object IInspectable TimelineMarkerCollection
특성
구현

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v1.0에서 도입되었습니다.)

설명

TimelineMarkerCollection에 대한 컬렉션 API

TimelineMarkerCollection은 컬렉션에 포함된 각 TimelineMarker 항목의 시간 값에 따라 순서가 결정되는 순서가 지정된 목록입니다. TimelineMarkerCollection에 대한 컬렉션 API는 컬렉션에 추가된 각 새 항목을 내부적으로 처리하고 컬렉션의 모든 TimelineMarker 항목에 대한 모든 시간 값의 업데이트된 순서에 해당하는 인덱스 위치에 추가합니다.

TimelineMarkerCollection이 항상 시간 기반 순서를 유지하도록 하려는 의도는 컬렉션을 열거/반복하면 재생 중인 미디어 자산의 위치MarkerReached 이벤트가 발생하는 순서에 해당하는 순서로 TimelineMarker 값을 제공합니다. 그렇지 않으면 컬렉션이 시간 순서가 지정되지 않은 경우 사용하기 전에 컬렉션을 시간별로 정렬해야 했습니다.

  • Append(C++의 경우)를 호출하는 경우 추가하는 TimelineMarker시간 값에 따라 정렬된 목록의 시작, 중간 또는 끝에 항목이 추가될 수 있습니다.
  • InsertAt(C++의 경우)를 호출하면 인덱스 매개 변수가 무시됩니다. TimelineMarker 항목은 시간 값별로 컬렉션의 순서를 유지하는 인덱스 위치에 추가됩니다.
  • GetAt 메서드(C++의 경우)를 사용하여 값을 읽는 경우 항목이 내부 논리에 의해 추가된 방법에 따라 인덱스가 올바릅니다. 그러나 해당 논리를 직접 제어하지 않았기 때문에 일반적으로 IndexOf (C++의 경우)를 사용하여 순서가 지정된 목록에서 특정 TimelineMarker 를 찾는 것이 좋습니다.
  • SetAt 메서드(C++의 경우)를 사용하여 값을 설정하는 경우 이전에 해당 인덱스에서 있었던 값을 삭제하지만 컬렉션은 시간 값 순서를 유지하기 위해 자체 순서를 다시 지정하므로 추가한 새 TimelineMarker가 설정하던 인덱스가 아닐 수 있습니다. 어떤 항목이 삭제되는지 확실하지 않기 때문에 이는 아마도 잘못된 생각일 수 있습니다. 인덱서를 사용하여 값을 설정하지 않는 것이 좋습니다.
  • RemoveAt 는 지정된 인덱싱된 항목을 제거하지만 컬렉션 인덱스가 나머지 시간 값에 대해 이동하면 가능한 중복 항목을 제거하지 않습니다. RemoveAt를 사용하지 않는 것이 좋습니다.

C# 또는 Microsoft Visual Basic에서 컬렉션 열거

TimelineMarkerCollection은 열거 가능하므로 C#의 foreach 와 같은 언어별 구문을 사용하여 컬렉션의 항목을 열거할 수 있습니다. 컴파일러는 형식 캐스팅을 수행하며 명시적으로 로 캐스팅 IEnumerable<TimelineMarker> 할 필요가 없습니다. GetEnumerator를 호출하려는 경우와 같이 명시적으로 캐스팅해야 하는 경우 TimelineMarker 제약 조건을 사용하여 IEnumerable<T>로 캐스팅합니다.

생성자

TimelineMarkerCollection()

TimelineMarkerCollection 클래스의 새 instance 초기화합니다.

속성

Size

컬렉션의 크기(개수)를 가져옵니다.

메서드

Append(TimelineMarker)

컬렉션에 새 항목을 추가합니다.

Clear()

컬렉션에서 모든 항목을 제거합니다.

First()

컬렉션의 항목에 대한 반복기를 반환합니다.

GetAt(UInt32)

지정된 인덱스 에 있는 항목을 반환합니다.

GetMany(UInt32, TimelineMarker[])

반복기를 통해 단일 패스에서 여러 요소를 검색합니다.

GetView()

컬렉션에 변경할 수 없는 보기를 가져옵니다.

IndexOf(TimelineMarker, UInt32)

지정된 항목의 인덱스를 검색합니다.

InsertAt(UInt32, TimelineMarker)

지정된 항목을 삽입합니다.

RemoveAt(UInt32)

지정된 인덱스에서 항목을 제거합니다.

RemoveAtEnd()

컬렉션의 마지막 항목을 제거합니다.

ReplaceAll(TimelineMarker[])

처음에 컬렉션을 지운 다음 제공된 배열을 새 항목으로 삽입합니다.

SetAt(UInt32, TimelineMarker)

지정된 인덱스 값을 지정된 TimelineMarker 값으로 설정합니다.

적용 대상

추가 정보