Search Results for

    Show / Hide Table of Contents

    Class MediaReferenceListBase<T>

    Summary description for MediaReferenceListBase.

    Inheritance
    System.Object
    MediaReferenceListBase<T>
    MediaReferenceList<T>
    Implements
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable
    IReadOnlyItem<MediaReferenceListBase<T>>
    System.ICloneable
    Namespace: ImageVault.EPiServer.Common
    Assembly: ImageVault.EPiServer.Common.dll
    Syntax
    public class MediaReferenceListBase<T> : Object, IReadOnlyItem<MediaReferenceListBase<T>> where T : MediaReferenceBase, new()
    Type Parameters
    Name Description
    T

    Constructors

    MediaReferenceListBase()

    Initializes a new instance of the MediaReferenceList<T> class.

    Declaration
    public MediaReferenceListBase()

    MediaReferenceListBase(IEnumerable<T>)

    Initializes a new instance of the MediaReferenceList<T> class.

    Declaration
    public MediaReferenceListBase(IEnumerable<T> items)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<T> items

    MediaReferenceListBase(String, Boolean)

    Initializes a new instance of the MediaReferenceListBase<T> class.

    Declaration
    public MediaReferenceListBase(string value, bool modified = false)
    Parameters
    Type Name Description
    System.String value

    a serialized value of the list

    System.Boolean modified

    If the list should be marked as modified after adding the values to the list or not. Default is false.

    Properties

    Count

    Gets the Count of the MediaReferenceList

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    IsModified

    Get/Sets the IsModified of the MediaReference

    Declaration
    public bool IsModified { get; set; }
    Property Value
    Type Description
    System.Boolean

    IsReadOnly

    Gets the IsReadOnly of the MediaReference

    Declaration
    public bool IsReadOnly { get; }
    Property Value
    Type Description
    System.Boolean

    Item[Int32]

    Get/Sets the T item identified by the given arguments of the MediaReferenceList

    Declaration
    public T this[int index] { get; set; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    T

    Methods

    Add(T)

    Declaration
    public void Add(T item)
    Parameters
    Type Name Description
    T item

    Clear()

    Declaration
    public void Clear()

    Clone()

    Creates a new object that is a copy of the current instance.

    Declaration
    public MediaReferenceListBase<T> Clone()
    Returns
    Type Description
    MediaReferenceListBase<T>

    A new object that is a copy of this instance.

    Contains(T)

    Returns a value indicating whether the specified T is contained in the MediaReferenceListBase<T>.

    Declaration
    public bool Contains(T item)
    Parameters
    Type Name Description
    T item

    The T to locate in the MediaReferenceListBase<T>.

    Returns
    Type Description
    System.Boolean

    true if the T parameter is a member of the MediaReferenceListBase<T>; otherwise, false.

    CopyTo(T[], Int32)

    Declaration
    public void CopyTo(T[] array, int arrayIndex)
    Parameters
    Type Name Description
    T[] array
    System.Int32 arrayIndex

    Equals(Object)

    Determines whether the specified System.Object is equal to the current MediaReferenceList<T>.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The System.Object to compare with the current MediaReferenceListBase<T>.

    Returns
    Type Description
    System.Boolean

    true if the specified System.Object is equal to the current MediaReferenceList<T>; otherwise, false.

    GetEnumerator()

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<T>

    GetHashCode()

    Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    A hash code for the current MediaReferenceListBase<T>.

    IndexOf(T)

    Declaration
    public int IndexOf(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    System.Int32

    Insert(Int32, T)

    Declaration
    public void Insert(int index, T item)
    Parameters
    Type Name Description
    System.Int32 index
    T item

    MakeReadOnly()

    Makes the instance readonly.

    Declaration
    public void MakeReadOnly()

    Remove(T)

    Declaration
    public bool Remove(T item)
    Parameters
    Type Name Description
    T item
    Returns
    Type Description
    System.Boolean

    RemoveAt(Int32)

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index

    ThrowIfReadyOnly()

    Throws an exception if the instance is readonly

    Declaration
    protected void ThrowIfReadyOnly()
    Exceptions
    Type Condition
    System.NotSupportedException

    If the MediaReference is read-only.

    ToString()

    Returns a System.String that represents the current MediaReferenceListBase<T>.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    A System.String that represents the current MediaReferenceListBase<T>.

    Explicit Interface Implementations

    IReadOnlyItem<MediaReferenceListBase<T>>.CreateWritableClone()

    Creates a new object that is a copy of the current instance.

    Declaration
    MediaReferenceListBase<T> IReadOnlyItem<MediaReferenceListBase<T>>.CreateWritableClone()
    Returns
    Type Description
    MediaReferenceListBase<T>

    A new object that is a copy of this instance.

    Remarks

    This clone is writeable even if the original is readonly. It is also marked as not modified

    Implements

    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    IReadOnlyItem<T>
    System.ICloneable
    In This Article
    Back to top (c) Meriworks 2002-2022