Search Results for

    Show / Hide Table of Contents
    View Source

    Class PartialViewService

    Inheritance
    System.Object
    RepositoryService
    FileServiceBase<IPartialViewRepository, IPartialView>
    FileServiceOperationBase<IPartialViewRepository, IPartialView, PartialViewOperationStatus>
    Namespace: Umbraco.Cms.Core.Services
    Assembly: Umbraco.Core.dll
    Syntax
    public class PartialViewService : FileServiceOperationBase<IPartialViewRepository, IPartialView, PartialViewOperationStatus>, IService, IPartialViewService, IBasicFileService<IPartialView>

    Constructors

    View Source

    PartialViewService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IPartialViewRepository, ILogger<StylesheetService>, IUserIdKeyResolver, IAuditRepository, PartialViewSnippetCollection)

    Declaration
    public PartialViewService(ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IPartialViewRepository repository, ILogger<StylesheetService> logger, IUserIdKeyResolver userIdKeyResolver, IAuditRepository auditRepository, PartialViewSnippetCollection snippetCollection)
    Parameters
    Type Name Description
    ICoreScopeProvider provider
    ILoggerFactory loggerFactory
    IEventMessagesFactory eventMessagesFactory
    IPartialViewRepository repository
    ILogger<StylesheetService> logger
    IUserIdKeyResolver userIdKeyResolver
    IAuditRepository auditRepository
    PartialViewSnippetCollection snippetCollection

    Properties

    View Source

    AllowedFileExtensions

    Declaration
    protected override string[] AllowedFileExtensions { get; }
    Property Value
    Type Description
    System.String[]
    View Source

    AlreadyExists

    Declaration
    protected override PartialViewOperationStatus AlreadyExists { get; }
    Property Value
    Type Description
    PartialViewOperationStatus
    View Source

    CancelledByNotification

    Declaration
    protected override PartialViewOperationStatus CancelledByNotification { get; }
    Property Value
    Type Description
    PartialViewOperationStatus
    View Source

    EntityType

    Declaration
    protected override string EntityType { get; }
    Property Value
    Type Description
    System.String
    View Source

    InvalidFileExtension

    Declaration
    protected override PartialViewOperationStatus InvalidFileExtension { get; }
    Property Value
    Type Description
    PartialViewOperationStatus
    View Source

    InvalidName

    Declaration
    protected override PartialViewOperationStatus InvalidName { get; }
    Property Value
    Type Description
    PartialViewOperationStatus
    View Source

    NotFound

    Declaration
    protected override PartialViewOperationStatus NotFound { get; }
    Property Value
    Type Description
    PartialViewOperationStatus
    View Source

    ParentNotFound

    Declaration
    protected override PartialViewOperationStatus ParentNotFound { get; }
    Property Value
    Type Description
    PartialViewOperationStatus
    View Source

    PathTooLong

    Declaration
    protected override PartialViewOperationStatus PathTooLong { get; }
    Property Value
    Type Description
    PartialViewOperationStatus
    View Source

    Success

    Declaration
    protected override PartialViewOperationStatus Success { get; }
    Property Value
    Type Description
    PartialViewOperationStatus

    Methods

    View Source

    CreateAsync(PartialViewCreateModel, Guid)

    Creates a new partial view.

    Declaration
    public async Task<Attempt<IPartialView, PartialViewOperationStatus>> CreateAsync(PartialViewCreateModel createModel, Guid userKey)
    Parameters
    Type Name Description
    PartialViewCreateModel createModel

    PartialViewCreateModel containing the information about the partial view being created.

    Guid userKey

    The key of the user performing the operation.

    Returns
    Type Description
    Task<Attempt<IPartialView, PartialViewOperationStatus>>

    An attempt indicating if the operation was a success as well as a more detailed PartialViewOperationStatus.

    View Source

    CreateEntity(String, String)

    Declaration
    protected override IPartialView CreateEntity(string path, string content)
    Parameters
    Type Name Description
    System.String path
    System.String content
    Returns
    Type Description
    IPartialView
    View Source

    DeleteAsync(String, Guid)

    Deletes a partial view.

    Declaration
    public async Task<PartialViewOperationStatus> DeleteAsync(string path, Guid userKey)
    Parameters
    Type Name Description
    System.String path

    The path of the partial view to delete.

    Guid userKey

    The key of the user performing the operation.

    Returns
    Type Description
    Task<PartialViewOperationStatus>

    An operation status.

    View Source

    DeletedNotification(IPartialView, EventMessages)

    Declaration
    protected override PartialViewDeletedNotification DeletedNotification(IPartialView target, EventMessages messages)
    Parameters
    Type Name Description
    IPartialView target
    EventMessages messages
    Returns
    Type Description
    PartialViewDeletedNotification
    View Source

    DeletingNotification(IPartialView, EventMessages)

    Declaration
    protected override PartialViewDeletingNotification DeletingNotification(IPartialView target, EventMessages messages)
    Parameters
    Type Name Description
    IPartialView target
    EventMessages messages
    Returns
    Type Description
    PartialViewDeletingNotification
    View Source

    GetSnippetAsync(String)

    Gets a partial view snippet by ID, returns null if not found.

    Declaration
    public async Task<PartialViewSnippet> GetSnippetAsync(string id)
    Parameters
    Type Name Description
    System.String id

    The name of the snippet to get.

    Returns
    Type Description
    Task<PartialViewSnippet>

    The partial view snippet, null if not found.

    View Source

    GetSnippetsAsync(Int32, Int32)

    Gets all the available partial view snippets.

    Declaration
    public async Task<PagedModel<PartialViewSnippetSlim>> GetSnippetsAsync(int skip, int take)
    Parameters
    Type Name Description
    System.Int32 skip

    Amount to skip.

    System.Int32 take

    Amount to take.

    Returns
    Type Description
    Task<PagedModel<PartialViewSnippetSlim>>
    View Source

    RenameAsync(String, PartialViewRenameModel, Guid)

    Renames a partial view.

    Declaration
    public async Task<Attempt<IPartialView, PartialViewOperationStatus>> RenameAsync(string path, PartialViewRenameModel renameModel, Guid userKey)
    Parameters
    Type Name Description
    System.String path

    The path of the partial view to rename.

    PartialViewRenameModel renameModel

    A PartialViewRenameModel with the changes.

    Guid userKey

    The key of the user performing the operation.

    Returns
    Type Description
    Task<Attempt<IPartialView, PartialViewOperationStatus>>

    An attempt indicating if the operation was a success as well as a more detailed PartialViewOperationStatus.

    View Source

    SavedNotification(IPartialView, EventMessages)

    Declaration
    protected override PartialViewSavedNotification SavedNotification(IPartialView target, EventMessages messages)
    Parameters
    Type Name Description
    IPartialView target
    EventMessages messages
    Returns
    Type Description
    PartialViewSavedNotification
    View Source

    SavingNotification(IPartialView, EventMessages)

    Declaration
    protected override PartialViewSavingNotification SavingNotification(IPartialView target, EventMessages messages)
    Parameters
    Type Name Description
    IPartialView target
    EventMessages messages
    Returns
    Type Description
    PartialViewSavingNotification
    View Source

    UpdateAsync(String, PartialViewUpdateModel, Guid)

    Updates an existing partial view.

    Declaration
    public async Task<Attempt<IPartialView, PartialViewOperationStatus>> UpdateAsync(string path, PartialViewUpdateModel updateModel, Guid userKey)
    Parameters
    Type Name Description
    System.String path

    The path of the partial view to update.

    PartialViewUpdateModel updateModel

    A PartialViewUpdateModel with the changes.

    Guid userKey

    The key of the user performing the operation.

    Returns
    Type Description
    Task<Attempt<IPartialView, PartialViewOperationStatus>>

    An attempt indicating if the operation was a success as well as a more detailed PartialViewOperationStatus.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • PartialViewService(ICoreScopeProvider, ILoggerFactory, IEventMessagesFactory, IPartialViewRepository, ILogger<StylesheetService>, IUserIdKeyResolver, IAuditRepository, PartialViewSnippetCollection)
    • Properties
      • AllowedFileExtensions
      • AlreadyExists
      • CancelledByNotification
      • EntityType
      • InvalidFileExtension
      • InvalidName
      • NotFound
      • ParentNotFound
      • PathTooLong
      • Success
    • Methods
      • CreateAsync(PartialViewCreateModel, Guid)
      • CreateEntity(String, String)
      • DeleteAsync(String, Guid)
      • DeletedNotification(IPartialView, EventMessages)
      • DeletingNotification(IPartialView, EventMessages)
      • GetSnippetAsync(String)
      • GetSnippetsAsync(Int32, Int32)
      • RenameAsync(String, PartialViewRenameModel, Guid)
      • SavedNotification(IPartialView, EventMessages)
      • SavingNotification(IPartialView, EventMessages)
      • UpdateAsync(String, PartialViewUpdateModel, Guid)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX