Search Results for

    Show / Hide Table of Contents
    View Source

    Class IndexedArrayItem<TContent>

    Represents an item in an array that stores its own index and the total count.

    Inheritance
    System.Object
    Namespace: Umbraco.Core.Models.PublishedContent
    Assembly: Umbraco.Core.dll
    Syntax
    public class IndexedArrayItem<TContent>
    Type Parameters
    Name Description
    TContent

    The type of the content.

    Constructors

    View Source

    IndexedArrayItem(TContent, Int32)

    Initializes a new instance of the IndexedArrayItem<TContent> class.

    Declaration
    public IndexedArrayItem(TContent content, int index)
    Parameters
    Type Name Description
    TContent content

    The content.

    System.Int32 index

    The index.

    Properties

    View Source

    Content

    Gets the content.

    Declaration
    public TContent Content { get; }
    Property Value
    Type Description
    TContent

    The content.

    View Source

    Index

    Gets the index.

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

    The index.

    View Source

    TotalCount

    Gets the total count.

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

    The total count.

    Methods

    View Source

    IsEven()

    Determines whether this item is at an even index.

    Declaration
    public bool IsEven()
    Returns
    Type Description
    System.Boolean

    true if this item is at an even index; otherwise, false.

    View Source

    IsEven(String)

    If this item is at an even index, the HTML encoded valueIfTrue will be returned; otherwise, System.String.Empty.

    Declaration
    public HtmlString IsEven(string valueIfTrue)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsEven(String, String)

    If this item is at an even index, the HTML encoded valueIfTrue will be returned; otherwise, valueIfFalse.

    Declaration
    public HtmlString IsEven(string valueIfTrue, string valueIfFalse)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    System.String valueIfFalse

    The value if false.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsFirst()

    Determines whether this item is the first.

    Declaration
    public bool IsFirst()
    Returns
    Type Description
    System.Boolean

    true if this item is the first; otherwise, false.

    View Source

    IsFirst(String)

    If this item is the first, the HTML encoded valueIfTrue will be returned; otherwise, System.String.Empty.

    Declaration
    public HtmlString IsFirst(string valueIfTrue)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsFirst(String, String)

    If this item is the first, the HTML encoded valueIfTrue will be returned; otherwise, valueIfFalse.

    Declaration
    public HtmlString IsFirst(string valueIfTrue, string valueIfFalse)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    System.String valueIfFalse

    The value if false.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsIndex(Int32)

    Determines whether this item is at the specified index.

    Declaration
    public bool IsIndex(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    Returns
    Type Description
    System.Boolean

    true if this item is at the specified index; otherwise, false.

    View Source

    IsIndex(Int32, String)

    If this item is at the specified index, the HTML encoded valueIfTrue will be returned; otherwise, System.String.Empty.

    Declaration
    public HtmlString IsIndex(int index, string valueIfTrue)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    System.String valueIfTrue

    The value if true.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsIndex(Int32, String, String)

    If this item is at the specified index, the HTML encoded valueIfTrue will be returned; otherwise, valueIfFalse.

    Declaration
    public HtmlString IsIndex(int index, string valueIfTrue, string valueIfFalse)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    System.String valueIfTrue

    The value if true.

    System.String valueIfFalse

    The value if false.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsLast()

    Determines whether this item is the last.

    Declaration
    public bool IsLast()
    Returns
    Type Description
    System.Boolean

    true if this item is the last; otherwise, false.

    View Source

    IsLast(String)

    If this item is the last, the HTML encoded valueIfTrue will be returned; otherwise, System.String.Empty.

    Declaration
    public HtmlString IsLast(string valueIfTrue)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsLast(String, String)

    If this item is the last, the HTML encoded valueIfTrue will be returned; otherwise, valueIfFalse.

    Declaration
    public HtmlString IsLast(string valueIfTrue, string valueIfFalse)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    System.String valueIfFalse

    The value if false.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsModZero(Int32)

    Determines whether this item is at an index that can be divided by the specified modulus.

    Declaration
    public bool IsModZero(int modulus)
    Parameters
    Type Name Description
    System.Int32 modulus

    The modulus.

    Returns
    Type Description
    System.Boolean

    true if this item is at an index that can be divided by the specified modulus; otherwise, false.

    View Source

    IsModZero(Int32, String)

    If this item is at an index that can be divided by the specified modulus, the HTML encoded valueIfTrue will be returned; otherwise, System.String.Empty.

    Declaration
    public HtmlString IsModZero(int modulus, string valueIfTrue)
    Parameters
    Type Name Description
    System.Int32 modulus

    The modulus.

    System.String valueIfTrue

    The value if true.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsModZero(Int32, String, String)

    If this item is at an index that can be divided by the specified modulus, the HTML encoded valueIfTrue will be returned; otherwise, valueIfFalse.

    Declaration
    public HtmlString IsModZero(int modulus, string valueIfTrue, string valueIfFalse)
    Parameters
    Type Name Description
    System.Int32 modulus

    The modulus.

    System.String valueIfTrue

    The value if true.

    System.String valueIfFalse

    The value if false.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsNotFirst()

    Determines whether this item is not the first.

    Declaration
    public bool IsNotFirst()
    Returns
    Type Description
    System.Boolean

    true if this item is not the first; otherwise, false.

    View Source

    IsNotFirst(String)

    If this item is not the first, the HTML encoded valueIfTrue will be returned; otherwise, System.String.Empty.

    Declaration
    public HtmlString IsNotFirst(string valueIfTrue)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsNotFirst(String, String)

    If this item is not the first, the HTML encoded valueIfTrue will be returned; otherwise, valueIfFalse.

    Declaration
    public HtmlString IsNotFirst(string valueIfTrue, string valueIfFalse)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    System.String valueIfFalse

    The value if false.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsNotIndex(Int32)

    Determines whether this item is not at the specified index.

    Declaration
    public bool IsNotIndex(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    Returns
    Type Description
    System.Boolean

    true if this item is not at the specified index; otherwise, false.

    View Source

    IsNotIndex(Int32, String)

    If this item is not at the specified index, the HTML encoded valueIfTrue will be returned; otherwise, System.String.Empty.

    Declaration
    public HtmlString IsNotIndex(int index, string valueIfTrue)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    System.String valueIfTrue

    The value if true.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsNotIndex(Int32, String, String)

    If this item is at the specified index, the HTML encoded valueIfTrue will be returned; otherwise, valueIfFalse.

    Declaration
    public HtmlString IsNotIndex(int index, string valueIfTrue, string valueIfFalse)
    Parameters
    Type Name Description
    System.Int32 index

    The index.

    System.String valueIfTrue

    The value if true.

    System.String valueIfFalse

    The value if false.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsNotLast()

    Determines whether this item is not the last.

    Declaration
    public bool IsNotLast()
    Returns
    Type Description
    System.Boolean

    true if this item is not the last; otherwise, false.

    View Source

    IsNotLast(String)

    If this item is not the last, the HTML encoded valueIfTrue will be returned; otherwise, System.String.Empty.

    Declaration
    public HtmlString IsNotLast(string valueIfTrue)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsNotLast(String, String)

    If this item is not the last, the HTML encoded valueIfTrue will be returned; otherwise, valueIfFalse.

    Declaration
    public HtmlString IsNotLast(string valueIfTrue, string valueIfFalse)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    System.String valueIfFalse

    The value if false.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsNotModZero(Int32)

    Determines whether this item is not at an index that can be divided by the specified modulus.

    Declaration
    public bool IsNotModZero(int modulus)
    Parameters
    Type Name Description
    System.Int32 modulus

    The modulus.

    Returns
    Type Description
    System.Boolean

    true if this item is not at an index that can be divided by the specified modulus; otherwise, false.

    View Source

    IsNotModZero(Int32, String)

    If this item is not at an index that can be divided by the specified modulus, the HTML encoded valueIfTrue will be returned; otherwise, System.String.Empty.

    Declaration
    public HtmlString IsNotModZero(int modulus, string valueIfTrue)
    Parameters
    Type Name Description
    System.Int32 modulus

    The modulus.

    System.String valueIfTrue

    The value if true.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsNotModZero(Int32, String, String)

    If this item is not at an index that can be divided by the specified modulus, the HTML encoded valueIfTrue will be returned; otherwise, valueIfFalse.

    Declaration
    public HtmlString IsNotModZero(int modulus, string valueIfTrue, string valueIfFalse)
    Parameters
    Type Name Description
    System.Int32 modulus

    The modulus.

    System.String valueIfTrue

    The value if true.

    System.String valueIfFalse

    The value if false.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsOdd()

    Determines whether this item is at an odd index.

    Declaration
    public bool IsOdd()
    Returns
    Type Description
    System.Boolean

    true if this item is at an odd index; otherwise, false.

    View Source

    IsOdd(String)

    If this item is at an odd index, the HTML encoded valueIfTrue will be returned; otherwise, System.String.Empty.

    Declaration
    public HtmlString IsOdd(string valueIfTrue)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    View Source

    IsOdd(String, String)

    If this item is at an odd index, the HTML encoded valueIfTrue will be returned; otherwise, valueIfFalse.

    Declaration
    public HtmlString IsOdd(string valueIfTrue, string valueIfFalse)
    Parameters
    Type Name Description
    System.String valueIfTrue

    The value if true.

    System.String valueIfFalse

    The value if false.

    Returns
    Type Description
    System.Web.HtmlString

    The HTML encoded value.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • IndexedArrayItem(TContent, Int32)
    • Properties
      • Content
      • Index
      • TotalCount
    • Methods
      • IsEven()
      • IsEven(String)
      • IsEven(String, String)
      • IsFirst()
      • IsFirst(String)
      • IsFirst(String, String)
      • IsIndex(Int32)
      • IsIndex(Int32, String)
      • IsIndex(Int32, String, String)
      • IsLast()
      • IsLast(String)
      • IsLast(String, String)
      • IsModZero(Int32)
      • IsModZero(Int32, String)
      • IsModZero(Int32, String, String)
      • IsNotFirst()
      • IsNotFirst(String)
      • IsNotFirst(String, String)
      • IsNotIndex(Int32)
      • IsNotIndex(Int32, String)
      • IsNotIndex(Int32, String, String)
      • IsNotLast()
      • IsNotLast(String)
      • IsNotLast(String, String)
      • IsNotModZero(Int32)
      • IsNotModZero(Int32, String)
      • IsNotModZero(Int32, String, String)
      • IsOdd()
      • IsOdd(String)
      • IsOdd(String, String)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX