Search Results for

    Show / Hide Table of Contents

    Class FileService

    Implementation of the file service that handles file operations including upload, storage, and retrieval.

    Inheritance
    object
    FileService
    Implements
    IFileService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: OEMS.Core.Application.ApplicationServices
    Assembly: OEMS.Core.dll
    Syntax
    public class FileService : IFileService

    Constructors

    FileService(IFileRepository, IEventFileRepository, IProcessStepFileRepository)

    Initializes a new instance of the FileService class.

    Declaration
    public FileService(IFileRepository fileRepository, IEventFileRepository eventFileRepository, IProcessStepFileRepository processStepFileRepository)
    Parameters
    Type Name Description
    IFileRepository fileRepository

    Repository for file operations

    IEventFileRepository eventFileRepository

    Repository for event-file associations

    IProcessStepFileRepository processStepFileRepository

    Repository for process step-file associations

    Methods

    AttachExistingFileToProcessStepAsync(Guid, Guid, Guid)

    Attaches a file to a process step

    Declaration
    public Task AttachExistingFileToProcessStepAsync(Guid fileId, Guid processStepId, Guid uploaderId)
    Parameters
    Type Name Description
    Guid fileId

    file GUID

    Guid processStepId

    processstep GUID

    Guid uploaderId

    GUID of

    Returns
    Type Description
    Task

    DeleteFileFromEventAsync(Guid)

    Delets a file from an event

    Declaration
    public Task DeleteFileFromEventAsync(Guid fileId)
    Parameters
    Type Name Description
    Guid fileId

    file GUID

    Returns
    Type Description
    Task

    GetEventFilesForEventAsync(Guid)

    Gets all files associated with an event

    Declaration
    public Task<List<EventFileDto>> GetEventFilesForEventAsync(Guid eventId)
    Parameters
    Type Name Description
    Guid eventId

    event GUID

    Returns
    Type Description
    Task<List<EventFileDto>>

    List of type EventFileDto

    GetFileAsync(Guid)

    Gets a single file

    Declaration
    public Task<FileDownloadDto> GetFileAsync(Guid fileId)
    Parameters
    Type Name Description
    Guid fileId

    fileId GUID

    Returns
    Type Description
    Task<FileDownloadDto>

    An object of type FileDownloadDto

    GetLogoUrl(Guid)

    Retrieves the URL for accessing a logo file.

    Declaration
    public Task<string> GetLogoUrl(Guid fileId)
    Parameters
    Type Name Description
    Guid fileId

    The identifier of the logo file

    Returns
    Type Description
    Task<string>

    The URL to access the logo, or a default logo path if not found

    UploadFilesAsync(FileDto, Guid, Guid)

    Declaration
    public Task<File> UploadFilesAsync(FileDto dto, Guid eventId, Guid uploaderId)
    Parameters
    Type Name Description
    FileDto dto
    Guid eventId
    Guid uploaderId
    Returns
    Type Description
    Task<File>

    UploadOrganizationLogoAsync(FileDto)

    Uploads a logo for an organization

    Declaration
    public Task<File> UploadOrganizationLogoAsync(FileDto dto)
    Parameters
    Type Name Description
    FileDto dto
    Returns
    Type Description
    Task<File>

    UploadProcessStepFileAsync(FileDto, Guid, Guid)

    Uploads a file for a specific process step.

    Declaration
    public Task UploadProcessStepFileAsync(FileDto dto, Guid processStepId, Guid uploaderId)
    Parameters
    Type Name Description
    FileDto dto

    The file data transfer object containing file information.

    Guid processStepId

    The unique identifier of the process step.

    Guid uploaderId

    The unique identifier of the user uploading the file.

    Returns
    Type Description
    Task

    A task that represents the asynchronous operation.

    Implements

    IFileService
    In this article
    Back to top Generated by DocFX