MediaStreamSamplePropertySet MediaStreamSamplePropertySet MediaStreamSamplePropertySet MediaStreamSamplePropertySet Class

Contains properties for the MediaStreamSample.

Syntax

Declaration

public sealed class MediaStreamSamplePropertySetpublic sealed class MediaStreamSamplePropertySetPublic NotInheritable Class MediaStreamSamplePropertySet

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 summary

Gets the number of items contained in the property set.

Methods summary

Removes all items from the property set.

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

Gets an immutable view of the property set.

Indicates if the specified key exists in the property set.

Adds the specified key and value to the property set.

Retrieves the value for the specified key.

Removes an item from the property set.

Properties

  • Size
    Size
    Size
    Size

    Gets the number of items contained in the property set.

    public uint Size { get; }public uint Size { get; }Public ReadOnly Property Size As uint

    Property Value

    • uint
      uint
      uint
      uint

      The number of items in the property set.

Methods

  • Clear()
    Clear()
    Clear()
    Clear()

    Removes all items from the property set.

    public void Clear()public void Clear()Public Function Clear() As void
  • First()
    First()
    First()
    First()

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

    public IIterator<Guid, object>> First()public IIterator<Guid, object>> First()Public Function First() As IIterator( Of Guid, object )

    Returns

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

  • GetView()
    GetView()
    GetView()
    GetView()

    Gets an immutable view of the property set.

    public IMapView<Guid, object> GetView()public IMapView<Guid, object> GetView()Public Function GetView() As IMapView( Of Guid, object )

    Returns

    • The immutable view.

  • HasKey(System.Guid)
    HasKey(System.Guid)
    HasKey(System.Guid)
    HasKey(System.Guid)

    Indicates if the specified key exists in the property set.

    public bool HasKey(System.Guid key)public bool HasKey(System.Guid key)Public Function HasKey(key As System.Guid) As bool

    Parameters

    • key
      System.Guid
      System.Guid
      System.Guid
      System.Guid

      The key to check.

    Returns

    • bool
      bool
      bool
      bool

      true if the key exists; otherwise, false.

  • Insert(System.Guid,System.Object)
    Insert(System.Guid,System.Object)
    Insert(System.Guid,System.Object)
    Insert(System.Guid,System.Object)

    Adds the specified key and value to the property set.

    public bool Insert(System.Guid key,System.Object value)public bool Insert(System.Guid key,System.Object value)Public Function Insert(key As System.Guid,value As System.Object) As bool

    Parameters

    • key
      System.Guid
      System.Guid
      System.Guid
      System.Guid

      The key to add.

    • value
      System.Object
      System.Object
      System.Object
      System.Object

      The value of the key.

    Returns

    • bool
      bool
      bool
      bool

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

  • Lookup(System.Guid)
    Lookup(System.Guid)
    Lookup(System.Guid)
    Lookup(System.Guid)

    Retrieves the value for the specified key.

    public object Lookup(System.Guid key)public object Lookup(System.Guid key)Public Function Lookup(key As System.Guid) As object

    Parameters

    • key
      System.Guid
      System.Guid
      System.Guid
      System.Guid

      The key to retrieve the value for.

    Returns

    • object
      object
      object
      object

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

  • Remove(System.Guid)
    Remove(System.Guid)
    Remove(System.Guid)
    Remove(System.Guid)

    Removes an item from the property set.

    public void Remove(System.Guid key)public void Remove(System.Guid key)Public Function Remove(key As System.Guid) As void

    Parameters

    • key
      System.Guid
      System.Guid
      System.Guid
      System.Guid

      The key to remove.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.HasVariantAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Media.Core.dll