Udostępnij za pośrednictwem


MediaStreamSamplePropertySet Class

Definition

Contains properties for the 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))
Inheritance
Object Platform::Object IInspectable MediaStreamSamplePropertySet
Attributes
Implements
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 requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

See the MediaStreamSource Sample for an example of using Media Stream Source in a Universal Windows app.

Enumerating the collection in C# or Microsoft Visual Basic

You can iterate through a MediaStreamSamplePropertySet object in C# or Microsoft Visual Basic. In many cases, such as using foreach syntax, the compiler does this casting for you and you won't need to cast to IEnumerable explicitly. If you do need to cast explicitly, for example if you want to call GetEnumerator, cast the collection object to IEnumerable<T> with a KeyValuePair of Guid and Object as the constraint.

Properties

Size

Gets the number of items contained in the property set.

Methods

Clear()

Removes all items from the property set.

First()

Returns an iterator to enumerate the items in the property set.

GetView()

Gets an immutable view of the property set.

HasKey(Guid)

Indicates if the specified key exists in the property set.

Insert(Guid, Object)

Adds the specified key and value to the property set.

Lookup(Guid)

Retrieves the value for the specified key.

Remove(Guid)

Removes an item from the property set.

Applies to

See also