Search Results for

    Show / Hide Table of Contents

    Interface IFileHandler

    An interface designed to interact with files selections by the user in the local file system

    Inherited Members
    IWindow.CloseWindow()
    IWindow.ShowDialog()
    IWindow.Show()
    IWindow.SetOwner(IWindow)
    IWindow.Controller
    Namespace: LemonEdge.Client.Core.Messages
    Assembly: LemonEdge.ClientCore.dll
    Syntax
    public interface IFileHandler : IWindow

    Methods

    GetOpenFilePath(string, bool, IEnumerable<(string FileFormatName, string FileExtension)>)

    Returns a file for opening selected by the user

    Declaration
    Task<(bool FileSelected, IEnumerable<string> FilePaths)> GetOpenFilePath(string title, bool allowMultiple, IEnumerable<(string FileFormatName, string FileExtension)> fileFormats)
    Parameters
    Type Name Description
    string title

    The title name for the reason for the file opening selection

    bool allowMultiple

    Indicates if multiple files should be allowed to be selected

    IEnumerable<(string FileFormatName, string FileExtension)> fileFormats

    Indicates a valid list of file formats that can be opened

    Returns
    Type Description
    Task<(bool DirectorySelected, IEnumerable<string> DirectoryPaths)>

    A task holding a tuple indicating if a file was selected, and if so a list of the selected files

    GetSaveFilePath(string, IEnumerable<(string FileFormatName, string FileExtension)>, string)

    Returns a file for saving selected by the user

    Declaration
    Task<(bool FileSelected, string FilePath)> GetSaveFilePath(string title, IEnumerable<(string FileFormatName, string FileExtension)> fileFormats, string defaultFileName)
    Parameters
    Type Name Description
    string title

    The title name for the reason for the file saving selection

    IEnumerable<(string FileFormatName, string FileExtension)> fileFormats

    Indicates a valid list of file formats that can be saved to

    string defaultFileName

    The default file name to save to

    Returns
    Type Description
    Task<(bool IsValid, string ValidationFailureMessage)>

    A task holding a tuple indicating if a file was selected, and if so the path to that selected file

    SaveFile(string, byte[])

    Declaration
    Task SaveFile(string filePath, byte[] data)
    Parameters
    Type Name Description
    string filePath
    byte[] data
    Returns
    Type Description
    Task

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.