Search Results for

    Show / Hide Table of Contents

    Class ExportCSVResultHandler

    The result handler that takes an export data task (UNIQUE_TASK_ID) result and stores the file in the storage system for retrieval by anyone viewing the task

    Inheritance
    object
    ExportCSVResultHandler
    Implements
    ITaskResultHandler
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.API.Core.Tasks.Results
    Assembly: LemonEdge.API.dll
    Syntax
    [ServerTaskResult("6314045e-6b89-461c-863a-d772ea59c928", ServerTaskResultType.Server)]
    public class ExportCSVResultHandler : ITaskResultHandler

    Constructors

    ExportCSVResultHandler(IEntityDescriptorFactory, IStorageServiceFactory)

    Declaration
    public ExportCSVResultHandler(IEntityDescriptorFactory entityDescriptorFactory, IStorageServiceFactory storageServiceFactory)
    Parameters
    Type Name Description
    IEntityDescriptorFactory entityDescriptorFactory
    IStorageServiceFactory storageServiceFactory

    Methods

    ProcessRawResult(ITaskRunner, ServerTaskParameter, object)

    Takes the direct output of the export data task and converts it to a ExportCSVResult

    Declaration
    public Task<ServerTaskResult> ProcessRawResult(ITaskRunner runner, ServerTaskParameter parameter, object result)
    Parameters
    Type Name Description
    ITaskRunner runner

    The task runner this task has been running in

    ServerTaskParameter parameter

    The initial ExportCSVParameter parameter the task was run with

    object result

    The result returned from processing the task, which is a byte array holding the generated csv file

    Returns
    Type Description
    Task<ServerTaskResult>

    A ExportCSVResult holding the results of the export data task ( UNIQUE_TASK_ID)

    ProcessResult(long, ServerTaskParameter, ExportCSVResult, UserInfo, byte[])

    Provides the opportunity to handle the result. For this server implementation the file is written to storage IStorageService

    A client override of this behaviour could take the results and directly display them to the user instead of writing them to any storage

    Declaration
    public virtual Task ProcessResult(long accountID, ServerTaskParameter parameter, ExportCSVResult result, UserInfo user, byte[] compressedFile)
    Parameters
    Type Name Description
    long accountID

    The current account the task was running within

    ServerTaskParameter parameter

    The original ExportCSVParameter the task was initialized with

    ExportCSVResult result

    The result of the task process IServerTask.TaskResult

    UserInfo user

    The user the task was running under

    byte[] compressedFile

    The file results

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    Implements

    ITaskResultHandler

    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.