Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IDictionaryItemService

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IDictionaryItemService

    Methods

    View Source

    CountChildrenAsync(Guid)

    Declaration
    Task<int> CountChildrenAsync(Guid parentId)
    Parameters
    Type Name Description
    Guid parentId
    Returns
    Type Description
    Task<System.Int32>
    View Source

    CountRootAsync()

    Declaration
    Task<int> CountRootAsync()
    Returns
    Type Description
    Task<System.Int32>
    View Source

    CreateAsync(IDictionaryItem, Guid)

    Creates and saves a new dictionary item and assigns translations to all applicable languages if specified

    Declaration
    Task<Attempt<IDictionaryItem, DictionaryItemOperationStatus>> CreateAsync(IDictionaryItem dictionaryItem, Guid userKey)
    Parameters
    Type Name Description
    IDictionaryItem dictionaryItem

    IDictionaryItem to create

    Guid userKey

    Key of the user saving the dictionary item

    Returns
    Type Description
    Task<Attempt<IDictionaryItem, DictionaryItemOperationStatus>>
    View Source

    DeleteAsync(Guid, Guid)

    Deletes a IDictionaryItem object and its related translations as well as its children.

    Declaration
    Task<Attempt<IDictionaryItem, DictionaryItemOperationStatus>> DeleteAsync(Guid id, Guid userKey)
    Parameters
    Type Name Description
    Guid id

    The ID of the IDictionaryItem to delete

    Guid userKey

    Key of the user deleting the dictionary item

    Returns
    Type Description
    Task<Attempt<IDictionaryItem, DictionaryItemOperationStatus>>
    View Source

    ExistsAsync(String)

    Checks if a IDictionaryItem with given key exists

    Declaration
    Task<bool> ExistsAsync(string key)
    Parameters
    Type Name Description
    System.String key

    Key of the IDictionaryItem

    Returns
    Type Description
    Task<System.Boolean>

    True if a IDictionaryItem exists, otherwise false

    View Source

    GetAsync(Guid)

    Gets a IDictionaryItem by its id

    Declaration
    Task<IDictionaryItem> GetAsync(Guid id)
    Parameters
    Type Name Description
    Guid id

    Id of the IDictionaryItem

    Returns
    Type Description
    Task<IDictionaryItem> IDictionaryItem
    View Source

    GetAsync(String)

    Gets a IDictionaryItem by by its key

    Declaration
    Task<IDictionaryItem> GetAsync(string key)
    Parameters
    Type Name Description
    System.String key

    Key of the IDictionaryItem

    Returns
    Type Description
    Task<IDictionaryItem> IDictionaryItem
    View Source

    GetAtRootAsync()

    Gets the root/top IDictionaryItem objects

    Declaration
    Task<IEnumerable<IDictionaryItem>> GetAtRootAsync()
    Returns
    Type Description
    Task<IEnumerable<IDictionaryItem>>

    An enumerable list of IDictionaryItem objects

    View Source

    GetChildrenAsync(Guid)

    Gets a list of children for a IDictionaryItem

    Declaration
    Task<IEnumerable<IDictionaryItem>> GetChildrenAsync(Guid parentId)
    Parameters
    Type Name Description
    Guid parentId

    Id of the parent

    Returns
    Type Description
    Task<IEnumerable<IDictionaryItem>>

    An enumerable list of IDictionaryItem objects

    View Source

    GetDescendantsAsync(Nullable<Guid>, String)

    Gets a list of descendants for a IDictionaryItem

    Declaration
    Task<IEnumerable<IDictionaryItem>> GetDescendantsAsync(Guid? parentId, string filter = null)
    Parameters
    Type Name Description
    System.Nullable<Guid> parentId

    Id of the parent, null will return all dictionary items

    System.String filter

    An optional filter, which will limit the results to only those dictionary items whose key starts with the filter value.

    Returns
    Type Description
    Task<IEnumerable<IDictionaryItem>>

    An enumerable list of IDictionaryItem objects

    View Source

    GetManyAsync(Guid[])

    Gets a collection of IDictionaryItem by their ids

    Declaration
    Task<IEnumerable<IDictionaryItem>> GetManyAsync(params Guid[] ids)
    Parameters
    Type Name Description
    Guid[] ids

    Ids of the IDictionaryItem

    Returns
    Type Description
    Task<IEnumerable<IDictionaryItem>>

    A collection of IDictionaryItem

    View Source

    GetManyAsync(String[])

    Gets a collection of IDictionaryItem by their keys

    Declaration
    Task<IEnumerable<IDictionaryItem>> GetManyAsync(params string[] keys)
    Parameters
    Type Name Description
    System.String[] keys

    Keys of the IDictionaryItem

    Returns
    Type Description
    Task<IEnumerable<IDictionaryItem>>

    A collection of IDictionaryItem

    View Source

    GetPagedAsync(Nullable<Guid>, Int32, Int32)

    Gets the dictionary items in a paged manner. Currently implements the paging in memory on the itenkey property because the underlying repository does not support paging yet

    Declaration
    Task<PagedModel<IDictionaryItem>> GetPagedAsync(Guid? parentId, int skip, int take)
    Parameters
    Type Name Description
    System.Nullable<Guid> parentId
    System.Int32 skip
    System.Int32 take
    Returns
    Type Description
    Task<PagedModel<IDictionaryItem>>
    View Source

    MoveAsync(IDictionaryItem, Nullable<Guid>, Guid)

    Moves a IDictionaryItem object

    Declaration
    Task<Attempt<IDictionaryItem, DictionaryItemOperationStatus>> MoveAsync(IDictionaryItem dictionaryItem, Guid? parentId, Guid userKey)
    Parameters
    Type Name Description
    IDictionaryItem dictionaryItem

    IDictionaryItem to move

    System.Nullable<Guid> parentId

    Id of the new IDictionaryItem parent, null if the item should be moved to the root

    Guid userKey

    Key of the user moving the dictionary item

    Returns
    Type Description
    Task<Attempt<IDictionaryItem, DictionaryItemOperationStatus>>
    View Source

    UpdateAsync(IDictionaryItem, Guid)

    Updates an existing IDictionaryItem object

    Declaration
    Task<Attempt<IDictionaryItem, DictionaryItemOperationStatus>> UpdateAsync(IDictionaryItem dictionaryItem, Guid userKey)
    Parameters
    Type Name Description
    IDictionaryItem dictionaryItem

    IDictionaryItem to update

    Guid userKey

    Key of the user saving the dictionary item

    Returns
    Type Description
    Task<Attempt<IDictionaryItem, DictionaryItemOperationStatus>>
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • CountChildrenAsync(Guid)
      • CountRootAsync()
      • CreateAsync(IDictionaryItem, Guid)
      • DeleteAsync(Guid, Guid)
      • ExistsAsync(String)
      • GetAsync(Guid)
      • GetAsync(String)
      • GetAtRootAsync()
      • GetChildrenAsync(Guid)
      • GetDescendantsAsync(Nullable<Guid>, String)
      • GetManyAsync(Guid[])
      • GetManyAsync(String[])
      • GetPagedAsync(Nullable<Guid>, Int32, Int32)
      • MoveAsync(IDictionaryItem, Nullable<Guid>, Guid)
      • UpdateAsync(IDictionaryItem, Guid)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX