GemBox.Presentation
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    MediaBookmarkCollection Class

    Namespace:
    GemBox.Presentation.Media
    Assembly:
    GemBox.Presentation.dll

    Represents a collection of bookmarks in the media.

    • C#
    • VB.NET
    public sealed class MediaBookmarkCollection : Collection<MediaBookmark>, IList, ICollection, IList<MediaBookmark>, ICollection<MediaBookmark>, IEnumerable<MediaBookmark>, IEnumerable
    Public NotInheritable Class MediaBookmarkCollection
        Inherits Collection(Of MediaBookmark)
        Implements IList, ICollection, IList(Of MediaBookmark), ICollection(Of MediaBookmark), IEnumerable(Of MediaBookmark), IEnumerable
    Inheritance:
    System.Object
    Collection
    Collection<MediaBookmark>
    MediaBookmarkCollection
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IList<MediaBookmark>
    System.Collections.Generic.ICollection<MediaBookmark>
    System.Collections.Generic.IEnumerable<MediaBookmark>
    System.Collections.IEnumerable
    Remarks

    All bookmarks in this collection must have unique names and time offsets. Collection is sorted based on bookmark's time offsets.

    Properties

    Count

    Gets the number of MediaBookmarks contained in the collection.

    • C#
    • VB.NET
    public int Count { get; }
    Public ReadOnly Property Count As Integer
    Property Value
    System.Int32

    The number of MediaBookmarks contained in the collection.

    Item[TimeOffset]

    Gets the bookmark name at the specified time offset.

    Returns null if there is no bookmark at the specified time offset.

    • C#
    • VB.NET
    public string this[TimeOffset time] { get; }
    Public ReadOnly Property Item(time As TimeOffset) As String
    Parameters
    time
    TimeOffset

    The time offset.

    Property Value
    System.String

    The bookmark name at the specified time offset.

    Item[Int32]

    Gets the MediaBookmark at the specified index.

    • C#
    • VB.NET
    public MediaBookmark this[int index] { get; }
    Public ReadOnly Property Item(index As Integer) As MediaBookmark
    Parameters
    index
    System.Int32

    The zero-based index of the MediaBookmark to get or set.

    Property Value
    MediaBookmark

    The MediaBookmark at the specified index.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than zero or index is equal to or greater than Count.

    Methods

    Add(TimeOffset)

    Adds a new implicitly named bookmark or gets the existing bookmark at the specified time offset.

    • C#
    • VB.NET
    public MediaBookmark Add(TimeOffset time)
    Public Function Add(time As TimeOffset) As MediaBookmark
    Parameters
    time
    TimeOffset

    The time offset.

    Returns
    MediaBookmark

    A newly added implicitly named bookmark or the existing bookmark at the specified time offset.

    Add(String, TimeOffset)

    Adds a new bookmark or gets the existing equally named bookmark at the specified time offset.

    • C#
    • VB.NET
    public MediaBookmark Add(string name, TimeOffset time)
    Public Function Add(name As String, time As TimeOffset) As MediaBookmark
    Parameters
    name
    System.String

    The bookmark name.

    time
    TimeOffset

    The time offset.

    Returns
    MediaBookmark
    Exceptions
    System.ArgumentException

    Bookmark with the different name already exist at the specified time offset. or Bookmark with the same name already exist at the different time offset.

    Clear()

    Removes all MediaBookmarks from the collection.

    • C#
    • VB.NET
    public void Clear()
    Public Sub Clear

    Contains(MediaBookmark)

    Determines whether a MediaBookmark is in the collection.

    • C#
    • VB.NET
    public bool Contains(MediaBookmark item)
    Public Function Contains(item As MediaBookmark) As Boolean
    Parameters
    item
    MediaBookmark

    The MediaBookmark to locate in the collection.

    Returns
    System.Boolean

    true if item is found in the collection; otherwise, false.

    Exceptions
    System.ArgumentNullException

    item is null.

    Contains(String)

    Determines whether a bookmark with the specified name is contained in the media bookmarks.

    • C#
    • VB.NET
    public bool Contains(string name)
    Public Function Contains(name As String) As Boolean
    Parameters
    name
    System.String

    The bookmark name.

    Returns
    System.Boolean

    true if bookmark with the specified name is found in the media bookmarks; otherwise, false.

    GetEnumerator()

    Returns an enumerator that iterates through the MediaBookmarkCollection.

    • C#
    • VB.NET
    public IEnumerator<MediaBookmark> GetEnumerator()
    Public Function GetEnumerator As IEnumerator(Of MediaBookmark)
    Returns
    System.Collections.Generic.IEnumerator<MediaBookmark>

    An System.Collections.Generic.IEnumerator<T> for the collection.

    IndexOf(MediaBookmark)

    Searches for the specified MediaBookmark and returns the zero-based index of the first occurrence within the entire collection.

    • C#
    • VB.NET
    public int IndexOf(MediaBookmark item)
    Public Function IndexOf(item As MediaBookmark) As Integer
    Parameters
    item
    MediaBookmark

    The MediaBookmark to locate in the collection.

    Returns
    System.Int32

    The zero-based index of the first occurrence of item within the entire collection, if found; otherwise, -1.

    Remove(MediaBookmark)

    Removes the first occurrence of a specific MediaBookmark from the collection.

    • C#
    • VB.NET
    public bool Remove(MediaBookmark item)
    Public Function Remove(item As MediaBookmark) As Boolean
    Parameters
    item
    MediaBookmark

    The MediaBookmark to remove from the collection.

    Returns
    System.Boolean

    true if item is successfully removed; otherwise, false. This method also returns false if item was not found in the original collection.

    Remove(TimeOffset)

    Removes a MediaBookmark with the specified time offset from the collection.

    • C#
    • VB.NET
    public bool Remove(TimeOffset time)
    Public Function Remove(time As TimeOffset) As Boolean
    Parameters
    time
    TimeOffset

    The time offset of the MediaBookmark to remove from the collection.

    Returns
    System.Boolean

    true if MediaBookmark with the specified time offset is successfully removed; otherwise, false. This method also returns false if MediaBookmark with the specified time offset was not found in the original collection.

    Remove(String)

    Removes a MediaBookmark with the specified name from the collection.

    • C#
    • VB.NET
    public bool Remove(string name)
    Public Function Remove(name As String) As Boolean
    Parameters
    name
    System.String

    The name of the MediaBookmark to remove from the collection.

    Returns
    System.Boolean

    true if MediaBookmark with the specified name is successfully removed; otherwise, false. This method also returns false if MediaBookmark with the specified name was not found in the original collection.

    RemoveAt(Int32)

    Removes the MediaBookmark at the specified index of the collection.

    • C#
    • VB.NET
    public void RemoveAt(int index)
    Public Sub RemoveAt(index As Integer)
    Parameters
    index
    System.Int32

    The zero-based index of the MediaBookmark to remove.

    Exceptions
    System.ArgumentOutOfRangeException

    index is less than zero or index is equal to or greater than Count.

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.