Search Results for

    Show / Hide Table of Contents
    View Source

    Class TemporaryFileToXmlImportService

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Services.ImportExport
    Assembly: Umbraco.Core.dll
    Syntax
    public class TemporaryFileToXmlImportService : ITemporaryFileToXmlImportService

    Constructors

    View Source

    TemporaryFileToXmlImportService(ITemporaryFileService, IPackageDataInstallation, ICoreScopeProvider)

    Declaration
    public TemporaryFileToXmlImportService(ITemporaryFileService temporaryFileService, IPackageDataInstallation packageDataInstallation, ICoreScopeProvider coreScopeProvider)
    Parameters
    Type Name Description
    ITemporaryFileService temporaryFileService
    IPackageDataInstallation packageDataInstallation
    ICoreScopeProvider coreScopeProvider

    Methods

    View Source

    AnalyzeAsync(Guid)

    Reads the file trough the use of LoadXElementFromTemporaryFileAsync(Guid) and returns basic information regarding the entity that would be imported if this file was processed by or .

    Declaration
    public async Task<Attempt<EntityXmlAnalysis, TemporaryFileXmlImportOperationStatus>> AnalyzeAsync(Guid temporaryFileId)
    Parameters
    Type Name Description
    Guid temporaryFileId
    Returns
    Type Description
    Task<Attempt<EntityXmlAnalysis, TemporaryFileXmlImportOperationStatus>>
    Remarks

    As this method does not persist anything, no scope is created and the temporary file is not cleaned up, see remark in LoadXElementFromTemporaryFileAsync(Guid).

    View Source

    CleanupFileIfScopeCompletes(Guid)

    Declaration
    public void CleanupFileIfScopeCompletes(Guid temporaryFileId)
    Parameters
    Type Name Description
    Guid temporaryFileId
    View Source

    GetEntityType(XElement)

    Declaration
    public Attempt<UmbracoEntityTypes> GetEntityType(XElement entityElement)
    Parameters
    Type Name Description
    System.Xml.Linq.XElement entityElement
    Returns
    Type Description
    Attempt<UmbracoEntityTypes>
    View Source

    LoadXElementFromTemporaryFileAsync(Guid)

    Declaration
    public async Task<Attempt<XElement, TemporaryFileXmlImportOperationStatus>> LoadXElementFromTemporaryFileAsync(Guid temporaryFileId)
    Parameters
    Type Name Description
    Guid temporaryFileId
    Returns
    Type Description
    Task<Attempt<System.Xml.Linq.XElement, TemporaryFileXmlImportOperationStatus>>
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • TemporaryFileToXmlImportService(ITemporaryFileService, IPackageDataInstallation, ICoreScopeProvider)
    • Methods
      • AnalyzeAsync(Guid)
      • CleanupFileIfScopeCompletes(Guid)
      • GetEntityType(XElement)
      • LoadXElementFromTemporaryFileAsync(Guid)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX