MediaStreamSamplePropertySet MediaStreamSamplePropertySet MediaStreamSamplePropertySet MediaStreamSamplePropertySet MediaStreamSamplePropertySet Class

Definition

Contains properties for the MediaStreamSample.

public : sealed class MediaStreamSamplePropertySet : IIterable<IKeyValuePair<Platform::Guid, Platform::Object>>, IMap<Platform::Guid, Platform::Object>
struct winrt::Windows::Media::Core::MediaStreamSamplePropertySet : IIterable<IKeyValuePair<Platform::Guid, Platform::Object>>, IMap<Platform::Guid, Platform::Object>
public sealed class MediaStreamSamplePropertySet : IEnumerable<KeyValuePair<Guid, Object>>, IDictionary<Guid, Object>
Public NotInheritable Class MediaStreamSamplePropertySet Implements IEnumerable<KeyValuePair<Guid, Object>>, IDictionary<Guid, Object>
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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

Item[TKey] Item[TKey] Item[TKey] Item[TKey] Item[TKey]

Gets or sets the element with the specified key.

Keys Keys Keys Keys Keys

Gets an System.Collections.Generic.ICollection`1 containing the keys of the System.Collections.Generic.IDictionary`2.

Size Size Size Size Size

Gets the number of items contained in the property set.

Values Values Values Values Values

Gets an System.Collections.Generic.ICollection`1 containing the values in the System.Collections.Generic.IDictionary`2.

Methods

Add(TKey, TValue) Add(TKey, TValue) Add(TKey, TValue) Add(TKey, TValue) Add(TKey, TValue)

Adds an element with the provided key and value to the System.Collections.Generic.IDictionary`2.

Clear() Clear() Clear() Clear() Clear()

Removes all items from the property set.

ContainsKey(TKey) ContainsKey(TKey) ContainsKey(TKey) ContainsKey(TKey) ContainsKey(TKey)

Determines whether the System.Collections.Generic.IDictionary`2 contains an element with the specified key.

First() First() First() First() First()

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

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

GetView() GetView() GetView() GetView() GetView()

Gets an immutable view of the property set.

HasKey(Guid) HasKey(Guid) HasKey(Guid) HasKey(Guid) HasKey(Guid)

Indicates if the specified key exists in the property set.

Insert(Guid, Object) Insert(Guid, Object) Insert(Guid, Object) Insert(Guid, Object) Insert(Guid, Object)

Adds the specified key and value to the property set.

Lookup(Guid) Lookup(Guid) Lookup(Guid) Lookup(Guid) Lookup(Guid)

Retrieves the value for the specified key.

Remove(T) Remove(T) Remove(T) Remove(T) Remove(T)

Removes the element with the specified key from the System.Collections.Generic.IDictionary`2.

Remove(Guid) Remove(Guid) Remove(Guid) Remove(Guid) Remove(Guid)

Removes an item from the property set.

TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue)

Gets the value associated with the specified key.

See Also