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) throguh 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.Core.Descriptors
    Assembly: 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
    System.Boolean

    GetImportOrder(EntityImportColDefinition)

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

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

    GetValue(String)

    Returns the value of the specified property

    Declaration
    object GetValue(string propName)
    Parameters
    Type Name Description
    System.String propName
    Returns
    Type Description
    System.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
    System.Collections.Generic.Dictionary<System.String, System.Guid> importedContextItemCache
    Returns
    Type Description
    System.Threading.Tasks.Task

    OnContextChange(IEntityUpdater, IBaseEntity, (Boolean Loaded, Boolean SetToNull, Boolean Ignore, Object Value)[], Func<String, Int32>)

    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
    System.ValueTuple<System.Boolean, System.Boolean, System.Boolean, System.Object>[] currentValues
    System.Func<System.String, System.Int32> getCurrentValueIndexFromHeaderName
    Returns
    Type Description
    System.Threading.Tasks.Task

    SetValue(String, Object)

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

    Declaration
    Task<bool> SetValue(string propName, object propValue)
    Parameters
    Type Name Description
    System.String propName
    System.Object propValue
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonTree Software Ltd. All rights reserved.