Search Results for

    Show / Hide Table of Contents

    Class NovaRazorObject

    A proxy for a Noxum.Nova.Data.NovaObject or Noxum.Nova.Data.Cache.CachedObject to be used in Razor Views

    Inheritance
    object
    NovaRazorObject
    NovaRazorObject<T>
    Implements
    IReadOnlyCollection<NovaRazorValue>
    IEnumerable<NovaRazorValue>
    IEnumerable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Noxum.Nova.Razor.Model
    Assembly: Noxum.Nova.Razor.Model.dll
    Syntax
    public class NovaRazorObject : IReadOnlyCollection<NovaRazorValue>, IEnumerable<NovaRazorValue>, IEnumerable

    Properties

    ApiIdentifier

    Api Identifier of the wrapped nova object.

    Declaration
    public string ApiIdentifier { get; }
    Property Value
    Type Description
    string

    Count

    Gets the number of elements in the collection.

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

    The number of elements in the collection.

    Guid

    Guid of the wrapped nova object.

    Declaration
    public Guid Guid { get; }
    Property Value
    Type Description
    Guid

    Id

    Id of the wrapped nova object.

    Declaration
    public ObjId Id { get; }
    Property Value
    Type Description
    ObjId

    IsBinaryProxy

    Test is this object is of a binary proxy type

    Declaration
    public bool IsBinaryProxy { get; }
    Property Value
    Type Description
    bool

    The binary proxy flag of the object's object type

    Props

    Get the object's values as a dynamic object.

    Declaration
    public dynamic Props { get; }
    Property Value
    Type Description
    dynamic

    Type

    Get the object's object type

    Declaration
    public NovaRazorObjectType Type { get; }
    Property Value
    Type Description
    NovaRazorObjectType

    Methods

    ConditionIsTrueAsync(string, bool)

    Checks if a condition is true for the object.

    Declaration
    public Task<bool> ConditionIsTrueAsync(string condition, bool inherited = false)
    Parameters
    Type Name Description
    string condition

    The api identifier of the condition.

    bool inherited

    If true, the condition is checked against the inherited values of the object.

    Returns
    Type Description
    Task<bool>

    True if the condition is met.

    Exceptions
    Type Condition
    ArgumentException

    If the condition is null or it could not be found.

    ConditionsAreTrueAsync(IEnumerable<string>, bool)

    Checks if one or more conditions are true for the object.

    Declaration
    public Task<bool> ConditionsAreTrueAsync(IEnumerable<string> conditions, bool inherited = false)
    Parameters
    Type Name Description
    IEnumerable<string> conditions

    The api identifiers of the conditions.

    bool inherited

    If true, the condition is checked against the inherited values of the object.

    Returns
    Type Description
    Task<bool>

    True if all the conditions are met.

    Exceptions
    Type Condition
    ArgumentException

    If the list of conditions is null or a condition could not be found.

    CreateHyperRefAsync()

    Create a hyperlink to this object.

    Declaration
    public Task<NovaRazorHyperLink> CreateHyperRefAsync()
    Returns
    Type Description
    Task<NovaRazorHyperLink>

    GetChildKeys(CachedTreeDefinition)

    Get all ScopedAttributeKeys that will potentially produce child objects for this object, the specified tree definition and the current request's scope and language sets.

    Declaration
    public IReadOnlyList<ScopedAttributeKey> GetChildKeys(CachedTreeDefinition treeDefinition)
    Parameters
    Type Name Description
    CachedTreeDefinition treeDefinition

    The tree definition defining the potential parent relations

    Returns
    Type Description
    IReadOnlyList<ScopedAttributeKey>

    A list of ScopedAttributeKeys, potentially empty

    GetChildKeys(ObjId)

    Get all ScopedAttributeKeys that will potentially produce child objects for this object, the specified tree definition and the current request's scope and language sets.

    Declaration
    public IReadOnlyList<ScopedAttributeKey> GetChildKeys(ObjId treeDefinitionId)
    Parameters
    Type Name Description
    ObjId treeDefinitionId

    The tree definition defining the potential parent relations

    Returns
    Type Description
    IReadOnlyList<ScopedAttributeKey>

    A list of ScopedAttributeKeys, potentially empty

    GetChildKeys(string)

    Get all ScopedAttributeKeys that will potentially produce child objects for this object, the specified tree definition and the current request's scope and language sets.

    Declaration
    public IReadOnlyList<ScopedAttributeKey> GetChildKeys(string treeDefinitionApiIdentifier)
    Parameters
    Type Name Description
    string treeDefinitionApiIdentifier

    The API identifier of the tree definition defining the potential parent relations

    Returns
    Type Description
    IReadOnlyList<ScopedAttributeKey>

    A list of ScopedAttributeKeys, potentially empty

    GetDisplayIconUrlAsync()

    Get the display Icon as an URL

    Declaration
    public virtual Task<string> GetDisplayIconUrlAsync()
    Returns
    Type Description
    Task<string>

    An Uri for the display icon or null if an icon is not available

    GetDisplayNameAsync(ObjId)

    Get the object's display name.

    Declaration
    public virtual Task<string> GetDisplayNameAsync(ObjId langId = default)
    Parameters
    Type Name Description
    ObjId langId

    The language ID. If Zero (0), the current output language is used.

    Returns
    Type Description
    Task<string>

    The display name including fallbacks

    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Declaration
    public IEnumerator<NovaRazorValue> GetEnumerator()
    Returns
    Type Description
    IEnumerator<NovaRazorValue>

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

    GetExternalBinaryThumbnailUrlAsync()

    Get the external binary thumbnail URL

    Declaration
    public Task<string> GetExternalBinaryThumbnailUrlAsync()
    Returns
    Type Description
    Task<string>

    An Uri for the external binary thumbnail or null if this is not a BPO or has no thumbnail

    GetExternalBinaryUrlAsync()

    Get the external binary URL

    Declaration
    public Task<string> GetExternalBinaryUrlAsync()
    Returns
    Type Description
    Task<string>

    An Uri for the external binary or null if this is not a BPO or does not refer to an external binary

    GetUsageByAttributeAsync(ObjId, ObjId, ObjId)

    Get all objects that refer to this object by a scoped attribute value

    Declaration
    public Task<IReadOnlyList<NovaRazorObject>> GetUsageByAttributeAsync(ObjId attrId, ObjId variantId = default, ObjId langId = default)
    Parameters
    Type Name Description
    ObjId attrId
    ObjId variantId
    ObjId langId
    Returns
    Type Description
    Task<IReadOnlyList<NovaRazorObject>>

    A sorted list of NovaRazorObjects that may possibly be empty

    GetUsageByAttributeAsync(ScopedAttributeKey)

    Get all objects that refer to this object by a scoped attribute value

    Declaration
    public Task<IReadOnlyList<NovaRazorObject>> GetUsageByAttributeAsync(ScopedAttributeKey key)
    Parameters
    Type Name Description
    ScopedAttributeKey key

    The scoped attribute used for referring

    Returns
    Type Description
    Task<IReadOnlyList<NovaRazorObject>>

    A sorted list of NovaRazorObjects that may possibly be empty

    GetUsageByAttributeAsync(NovaRazorAttribute, NovaRazorObject, NovaRazorLanguage)

    Get all objects that refer to this object by a scoped attribute value

    Declaration
    public Task<IReadOnlyList<NovaRazorObject>> GetUsageByAttributeAsync(NovaRazorAttribute attr, NovaRazorObject variant = null, NovaRazorLanguage lang = null)
    Parameters
    Type Name Description
    NovaRazorAttribute attr
    NovaRazorObject variant
    NovaRazorLanguage lang
    Returns
    Type Description
    Task<IReadOnlyList<NovaRazorObject>>

    A sorted list of NovaRazorObjects that may possibly be empty

    GetUsageByAttributeAsync(string, string, string)

    Get all objects that refer to this object by a scoped attribute value

    Declaration
    public Task<IReadOnlyList<NovaRazorObject>> GetUsageByAttributeAsync(string attrId, string variantId = null, string langId = null)
    Parameters
    Type Name Description
    string attrId
    string variantId
    string langId
    Returns
    Type Description
    Task<IReadOnlyList<NovaRazorObject>>

    A sorted list of NovaRazorObjects that may possibly be empty

    GetValue(ObjId, ObjId, ObjId)

    Get values for a scoped attribute

    Declaration
    public NovaRazorValue GetValue(ObjId attrId, ObjId variantId = default, ObjId langId = default)
    Parameters
    Type Name Description
    ObjId attrId
    ObjId variantId
    ObjId langId
    Returns
    Type Description
    NovaRazorValue

    A list of values or null if the object does not have any values for this scoped attribute

    Exceptions
    Type Condition
    NovaException

    If the key's variant or language setting does not conform to the attribute definition

    GetValue(ScopedAttributeKey)

    Get values for a scoped attribute

    Declaration
    public NovaRazorValue GetValue(ScopedAttributeKey key)
    Parameters
    Type Name Description
    ScopedAttributeKey key
    Returns
    Type Description
    NovaRazorValue

    A list of values, or an empty list if the object does not have any values for this scoped attribute

    Exceptions
    Type Condition
    NovaException

    If the key's variant or language setting does not conform to the attribute definition

    GetValue(NovaRazorAttribute, NovaRazorObject, NovaRazorLanguage)

    Get values for a scoped attribute

    Declaration
    public NovaRazorValue GetValue(NovaRazorAttribute attr, NovaRazorObject variant = null, NovaRazorLanguage lang = null)
    Parameters
    Type Name Description
    NovaRazorAttribute attr
    NovaRazorObject variant
    NovaRazorLanguage lang
    Returns
    Type Description
    NovaRazorValue

    A list of values or null if the object does not have any values for this scoped attribute

    Exceptions
    Type Condition
    NovaException

    If the key's variant or language setting does not conform to the attribute definition

    GetValue(string, string, string)

    Get values for a scoped attribute

    Declaration
    public NovaRazorValue GetValue(string attrId, string variantId = null, string langId = null)
    Parameters
    Type Name Description
    string attrId
    string variantId
    string langId
    Returns
    Type Description
    NovaRazorValue

    A list of values or null if the object does not have any values for this scoped attribute

    Exceptions
    Type Condition
    NovaException

    If the key's variant or language setting does not conform to the attribute definition

    GetVirtualValueAsync(ObjId, ObjId, ObjId)

    Calculated the virtual value list for a specific attribute-variant-key triple.

    Declaration
    public Task<NovaRazorValue> GetVirtualValueAsync(ObjId attrId, ObjId variantId = default, ObjId langId = default)
    Parameters
    Type Name Description
    ObjId attrId

    The nova attribute id

    ObjId variantId

    A nova variant id. If missing, 0 will be assumed.

    ObjId langId

    A nova language id. If null, 0 will be assumed.

    Returns
    Type Description
    Task<NovaRazorValue>

    The value list, or null if no values exist

    Exceptions
    Type Condition
    NovaException

    If the key's variant or language setting does not conform to the attribute definition

    GetVirtualValueAsync(ScopedAttributeKey)

    Calculated the virtual value list for a specific attribute-variant-key triple.

    Declaration
    public Task<NovaRazorValue> GetVirtualValueAsync(ScopedAttributeKey key)
    Parameters
    Type Name Description
    ScopedAttributeKey key

    Specifies the attribute-variant-language triple for the value(s) to be queried.

    Returns
    Type Description
    Task<NovaRazorValue>

    The value list, or null if no values exist in the current scope set.

    Exceptions
    Type Condition
    NovaException

    If the key's variant or language setting does not conform to the attribute definition

    GetVirtualValueAsync(NovaRazorAttribute, NovaRazorObject, NovaRazorLanguage)

    Calculated the virtual value list for a specific attribute-variant-key triple.

    Declaration
    public Task<NovaRazorValue> GetVirtualValueAsync(NovaRazorAttribute attr, NovaRazorObject variant = null, NovaRazorLanguage lang = null)
    Parameters
    Type Name Description
    NovaRazorAttribute attr

    The nova attribute id

    NovaRazorObject variant

    A nova variant id. If missing, 0 will be assumed as variant id

    NovaRazorLanguage lang

    A nova language id. If null, 0 will be assumed as language id.

    Returns
    Type Description
    Task<NovaRazorValue>

    The value list, or null if no values exist

    Exceptions
    Type Condition
    NovaException

    If the key's variant or language setting does not conform to the attribute definition

    GetVirtualValueAsync(string, string, string)

    Calculated the virtual value list for a specific attribute-variant-key triple.

    Declaration
    public Task<NovaRazorValue> GetVirtualValueAsync(string attrId, string variantId = null, string langId = null)
    Parameters
    Type Name Description
    string attrId

    The nova attribute ApiIdentifier

    string variantId

    A nova variant ApiIdentifier. If missing, 0 will be assumed as variant id

    string langId

    A nova language ApiIdentifier. If null, 0 will be assumed as language id.

    Returns
    Type Description
    Task<NovaRazorValue>

    The value list, or null if no values exist

    Exceptions
    Type Condition
    NovaException

    If the key's variant or language setting does not conform to the attribute definition

    ToString()

    Returns a string that represents the current object.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object.

    Overrides
    object.ToString()

    Implements

    IReadOnlyCollection<T>
    IEnumerable<T>
    IEnumerable
    In this article
    Back to top Version 6.1.0.7rc