Share via


MediaStreamSamplePropertySet 类

定义

包含 MediaStreamSample 的属性。

public ref class MediaStreamSamplePropertySet sealed : IIterable<IKeyValuePair<Platform::Guid, Platform::Object ^> ^>, IMap<Platform::Guid, Platform::Object ^>
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.HasVariant]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class MediaStreamSamplePropertySet final : IIterable<IKeyValuePair<winrt::guid, IInspectable const&>>, IMap<winrt::guid, IInspectable const&>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.HasVariant]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class MediaStreamSamplePropertySet : IDictionary<Guid,object>, IEnumerable<KeyValuePair<Guid,object>>
Public NotInheritable Class MediaStreamSamplePropertySet
Implements IDictionary(Of Guid, Object), IEnumerable(Of KeyValuePair(Of Guid, Object))
继承
Object Platform::Object IInspectable MediaStreamSamplePropertySet
属性
实现
IDictionary<Guid,Object> IMap<Platform::Guid,Platform::Object> IMap<winrt::guid,IInspectable> IIterable<IKeyValuePair<K,V>> IEnumerable<KeyValuePair<K,V>> IEnumerable<KeyValuePair<Guid,Object>> IIterable<IKeyValuePair<Platform::Guid,Platform::Object>> IIterable<IKeyValuePair<winrt::guid,IInspectable>>

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

注解

有关在通用 Windows 应用中使用媒体流源的示例,请参阅 MediaStreamSource 示例

枚举 C# 或 Microsoft Visual Basic 中的集合

可以在 C# 或 Microsoft Visual Basic 中循环访问 MediaStreamSamplePropertySet 对象。 在许多情况下,例如使用 foreach 语法,编译器会为你执行此强制转换,你无需显式强制转换为 IEnumerable 。 如果需要显式强制转换(例如,如果要调用 GetEnumerator),请将集合对象强制转换为 IEnumerable<T> ,其中 KeyValuePairGuidObject 作为约束。

属性

Size

获取属性集中包含的项数。

方法

Clear()

从属性集中删除所有项。

First()

返回一个迭代器,用于枚举属性集中的项。

GetView()

获取属性集的不可变视图。

HasKey(Guid)

指示属性集中是否存在指定的键。

Insert(Guid, Object)

将指定的键和值添加到属性集。

Lookup(Guid)

检索指定键的值。

Remove(Guid)

从属性集中删除项。

适用于

另请参阅