Search Results for

    Show / Hide Table of Contents

    Interface IEntityDescriptorImportExtender

    Represents a class that can be used for assisting with importing data into a specified entity type

    By default the system automatically handles importing an entity through the property names and values from a data source (such as a file) through our data integration and mapping tools.

    However you can extend this behaviour to be able to import from other property names that are not actually properties on the entity, or even to perform custom actions
    Namespace: LemonEdge.API.Descriptors
    Assembly: LemonEdge.API.dll
    Syntax
    public interface IEntityDescriptorImportExtender

    Methods

    AllowOpen(IBaseEntity)

    Indicates if this item should be allowed to be viewed by the user

    Declaration
    bool AllowOpen(IBaseEntity item)
    Parameters
    Type Name Description
    IBaseEntity item
    Returns
    Type Description
    bool

    GetImportOrder(EntityImportColDefinition)

    Indicates the order properties should be updated in. Required if properties need to be set before other properties can be updated.

    Declaration
    short GetImportOrder(EntityImportColDefinition col)
    Parameters
    Type Name Description
    EntityImportColDefinition col
    Returns
    Type Description
    short

    GetValue(string)

    Returns the value of the specified property

    Declaration
    object GetValue(string propName)
    Parameters
    Type Name Description
    string propName
    Returns
    Type Description
    object

    Init(IReadOnlyCache, UserInfo, Dictionary<string, Guid>)

    Called when extender is created to initialize with cached items

    Declaration
    Task Init(IReadOnlyCache cache, UserInfo user, Dictionary<string, Guid> importedContextItemCache)
    Parameters
    Type Name Description
    IReadOnlyCache cache
    UserInfo user
    Dictionary<string, Guid> importedContextItemCache
    Returns
    Type Description
    Task

    OnContextChange(IEntityUpdater, IBaseEntity, (bool Loaded, bool SetToNull, bool Ignore, object Value)[], Func<string, int>)

    Called whenever the item being imported is created/updated.

    Alternatively called whenever SetValue returns true, indicating some property of the imported item has changed requiring the context to be reloaded

    Declaration
    Task OnContextChange(IEntityUpdater updater, IBaseEntity item, (bool Loaded, bool SetToNull, bool Ignore, object Value)[] currentValues, Func<string, int> getCurrentValueIndexFromHeaderName)
    Parameters
    Type Name Description
    IEntityUpdater updater
    IBaseEntity item
    (bool Loaded, bool SetToNull, bool Ignore, object Value)[] currentValues
    Func<string, int> getCurrentValueIndexFromHeaderName
    Returns
    Type Description
    Task

    SetValue(string, object)

    Sets the specified property on the item. returns true if the context needs updating.

    Declaration
    Task<bool> SetValue(string propName, object propValue)
    Parameters
    Type Name Description
    string propName
    object propValue
    Returns
    Type Description
    Task<bool>

    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.