Media​Stream​Sample​Property​Set Media​Stream​Sample​Property​Set Media​Stream​Sample​Property​Set Class

Definition

Contains properties for the MediaStreamSample.

public : sealed class MediaStreamSamplePropertySet : IIterable, IMappublic sealed class MediaStreamSamplePropertySet : IEnumerable, IDictionaryPublic NotInheritable Class MediaStreamSamplePropertySet Implements IEnumerable, IDictionary
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]

Gets or sets the element with the specified key.

This member is not implemented in C++TValue this[TKey key] { get; set; }Property Item(key As TKey) As TValue
Parameters
key
TKey TKey TKey

The key of the element to get or set.

Value
TValue TValue TValue

The element with the specified key.

Attributes
Exceptions

key is null.

The property is retrieved and key is not found.

The property is set and the System.Collections.Generic.IDictionary`2 is read-only.

Keys Keys Keys

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

This member is not implemented in C++ICollection<TKey> Keys { get; }ReadOnly Property Keys As ICollection(Of TKey)
Value

An System.Collections.Generic.ICollection`1 containing the keys of the object that implements System.Collections.Generic.IDictionary`2.

Attributes

Size Size Size

Gets the number of items contained in the property set.

public : unsigned short Size { get; }This member is not implemented in C#This member is not implemented in VB.Net
Value
unsigned short uint uint

The number of items in the property set.

Attributes

Values Values Values

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

This member is not implemented in C++ICollection<TValue> Values { get; }ReadOnly Property Values As ICollection(Of TValue)
Value

An System.Collections.Generic.ICollection`1 containing the values in the object that implements System.Collections.Generic.IDictionary`2.

Attributes

Methods

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.

This member is not implemented in C++void Add(TKey key, TValue value)Sub Add(key As TKey, value As TValue)
Parameters
key
TKey TKey TKey

The object to use as the key of the element to add.

value
TValue TValue TValue

The object to use as the value of the element to add.

Attributes
Exceptions

key is null.

An element with the same key already exists in the System.Collections.Generic.IDictionary`2.

The System.Collections.Generic.IDictionary`2 is read-only.

Clear() Clear() Clear()

Removes all items from the property set.

public : void Clear()This member is not implemented in C#This member is not implemented in VB.Net
Attributes

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

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

This member is not implemented in C++bool ContainsKey(TKey key)Function ContainsKey(key As TKey) As Boolean
Parameters
key
TKey TKey TKey

The key to locate in the System.Collections.Generic.IDictionary`2.

Returns

true if the System.Collections.Generic.IDictionary`2 contains an element with the key; otherwise, false.

Attributes
Exceptions

key is null.

First() First() First()

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

public : IIterator<IKeyValuePair<PlatForm::Guid, PlatForm::Object>> First()This member is not implemented in C#This member is not implemented in VB.Net
Returns
IIterator<IKeyValuePair<PlatForm::Guid, PlatForm::Object>> IIterator<KeyValuePair<Guid, object>> IIterator<KeyValuePair<Guid, object>>

The iterator. The current position of the iterator is index 0, or the end of the property set if the property set is empty.

Attributes

GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

This member is not implemented in C++IEnumerator<T> GetEnumerator()Function GetEnumerator As IEnumerator(Of T)
Returns

An enumerator that can be used to iterate through the collection.

Attributes

GetView() GetView() GetView()

Gets an immutable view of the property set.

public : IMapView<PlatForm::Guid, PlatForm::Object> GetView()This member is not implemented in C#This member is not implemented in VB.Net
Returns
IMapView<PlatForm::Guid, PlatForm::Object> IReadOnlyDictionary<Guid, object> IReadOnlyDictionary<Guid, object>

The immutable view.

Attributes

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

Indicates if the specified key exists in the property set.

public : PlatForm::Boolean HasKey(PlatForm::Guid key)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
key
PlatForm::Guid Guid Guid

The key to check.

Returns
PlatForm::Boolean bool bool

true if the key exists; otherwise, false.

Attributes

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

Adds the specified key and value to the property set.

public : PlatForm::Boolean Insert(PlatForm::Guid key, PlatForm::Object value)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
key
PlatForm::Guid Guid Guid

The key to add.

value
PlatForm::Object Object Object

The value of the key.

Returns
PlatForm::Boolean bool bool

True if the method replaces a value that already exists for the key; false if this is a new key.

Attributes

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

Retrieves the value for the specified key.

public : PlatForm::Object Lookup(PlatForm::Guid key)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
key
PlatForm::Guid Guid Guid

The key to retrieve the value for.

Returns
PlatForm::Object object object

The value, if an item with the specified key exists. Use the HasKey method to determine whether the key exists.

Attributes

Remove(TKey) Remove(TKey) Remove(TKey)

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

This member is not implemented in C++bool Remove(TKey key)Function Remove(key As TKey) As Boolean
Parameters
key
TKey TKey TKey

The key of the element to remove.

Returns

true if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the original System.Collections.Generic.IDictionary`2.

Attributes
Exceptions

key is null.

The System.Collections.Generic.IDictionary`2 is read-only.

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

Removes an item from the property set.

public : void Remove(PlatForm::Guid key)This member is not implemented in C#This member is not implemented in VB.Net
Parameters
key
PlatForm::Guid Guid Guid

The key to remove.

Attributes

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

Gets the value associated with the specified key.

This member is not implemented in C++bool TryGetValue(TKey key, out TValue value)Function TryGetValue(key As TKey, ByRef value As TValue) As Boolean
Parameters
key
TKey TKey TKey

The key whose value to get.

value
TValue TValue TValue

When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

Returns

true if the object that implements System.Collections.Generic.IDictionary`2 contains an element with the specified key; otherwise, false.

Attributes
Exceptions

key is null.

See Also