Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IEntityTypeContainerService<TTreeEntity>

    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IEntityTypeContainerService<TTreeEntity>
        where TTreeEntity : ITreeEntity
    Type Parameters
    Name Description
    TTreeEntity

    Methods

    View Source

    CreateAsync(Nullable<Guid>, String, Nullable<Guid>, Guid)

    Creates a new container

    Declaration
    Task<Attempt<EntityContainer, EntityContainerOperationStatus>> CreateAsync(Guid? key, string name, Guid? parentKey, Guid userKey)
    Parameters
    Type Name Description
    System.Nullable<Guid> key

    The key to assign to the newly created container (if null is specified, a random key will be assigned).

    System.String name

    The name of the created container.

    System.Nullable<Guid> parentKey

    The ID of the parent container to create the new container under.

    Guid userKey

    Key of the user issuing the creation.

    Returns
    Type Description
    Task<Attempt<EntityContainer, EntityContainerOperationStatus>>
    Remarks

    If parent key is supplied as null, the container will be created at the tree root.

    View Source

    DeleteAsync(Guid, Guid)

    Deletes a container

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

    The ID of the container to delete.

    Guid userKey

    Key of the user issuing the deletion.

    Returns
    Type Description
    Task<Attempt<EntityContainer, EntityContainerOperationStatus>>
    View Source

    GetAllAsync()

    Gets all containers

    Declaration
    Task<IEnumerable<EntityContainer>> GetAllAsync()
    Returns
    Type Description
    Task<IEnumerable<EntityContainer>>
    View Source

    GetAsync(Guid)

    Gets a container

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

    The ID of the container to get.

    Returns
    Type Description
    Task<EntityContainer>
    View Source

    GetAsync(String, Int32)

    Gets containers by name and level

    Declaration
    Task<IEnumerable<EntityContainer>> GetAsync(string name, int level)
    Parameters
    Type Name Description
    System.String name

    The name of the containers to get.

    System.Int32 level

    The level in the tree of the containers to get.

    Returns
    Type Description
    Task<IEnumerable<EntityContainer>>
    View Source

    GetParentAsync(TTreeEntity)

    Gets the parent container of an entity

    Declaration
    Task<EntityContainer> GetParentAsync(TTreeEntity entity)
    Parameters
    Type Name Description
    TTreeEntity entity

    The entity whose parent container to get.

    Returns
    Type Description
    Task<EntityContainer>
    View Source

    GetParentAsync(EntityContainer)

    Gets the parent container of a container

    Declaration
    Task<EntityContainer> GetParentAsync(EntityContainer container)
    Parameters
    Type Name Description
    EntityContainer container

    The container whose parent container to get.

    Returns
    Type Description
    Task<EntityContainer>
    View Source

    UpdateAsync(Guid, String, Guid)

    Updates an existing container

    Declaration
    Task<Attempt<EntityContainer, EntityContainerOperationStatus>> UpdateAsync(Guid key, string name, Guid userKey)
    Parameters
    Type Name Description
    Guid key

    The key of the container to update.

    System.String name

    The name to assign to the container.

    Guid userKey

    Key of the user issuing the update.

    Returns
    Type Description
    Task<Attempt<EntityContainer, EntityContainerOperationStatus>>
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • CreateAsync(Nullable<Guid>, String, Nullable<Guid>, Guid)
      • DeleteAsync(Guid, Guid)
      • GetAllAsync()
      • GetAsync(Guid)
      • GetAsync(String, Int32)
      • GetParentAsync(TTreeEntity)
      • GetParentAsync(EntityContainer)
      • UpdateAsync(Guid, String, Guid)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX