Show / Hide Table of Contents

Class ImportAgent

Proxy class for the Import Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Inheritance
object
ImportAgent
Implements
IImportAgent
IAgent
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.CRM.Services
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public class ImportAgent : IImportAgent, IAgent

Constructors

ImportAgent(IImportLineImplementation, IImportErpDataImplementation, ISoRequestItemsAccessor)

Proxy class for the Import Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public ImportAgent(IImportLineImplementation importLineImplementation, IImportErpDataImplementation importErpDataImplementation, ISoRequestItemsAccessor accessor)
Parameters
Type Name Description
IImportLineImplementation importLineImplementation
IImportErpDataImplementation importErpDataImplementation
ISoRequestItemsAccessor accessor

ImportAgent(IImportLineImplementation, IImportErpDataImplementation, ISoRequestItemsAccessor, IDebugUser, IServiceCallsRepository, IScriptingConfiguration, IOnlineConfiguration)

Proxy class for the Import Agent Used when communicating remote using WebServices. Avoid using directly. Use the AgentFactory to create the proxy instead.

Declaration
public ImportAgent(IImportLineImplementation importLineImplementation, IImportErpDataImplementation importErpDataImplementation, ISoRequestItemsAccessor accessor, IDebugUser debugUser, IServiceCallsRepository serviceCallsRepository, ConfigFile.IScriptingConfiguration scriptingConfiguration, ConfigFile.IOnlineConfiguration onlineConfiguration)
Parameters
Type Name Description
IImportLineImplementation importLineImplementation
IImportErpDataImplementation importErpDataImplementation
ISoRequestItemsAccessor accessor
IDebugUser debugUser
IServiceCallsRepository serviceCallsRepository
IScriptingConfiguration scriptingConfiguration
IOnlineConfiguration onlineConfiguration

Methods

CreateDefaultImportLineAsync(int, CancellationToken)

Create a new empty import row with x count of values

Declaration
public Task<ImportLine> CreateDefaultImportLineAsync(int countColumns, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int countColumns

The count of values that will can be filled out

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ImportLine>

A new ImportLine

CreateErpImportDataAsync(ArchiveRestrictionInfo[], string[], int, ErpActorType, CancellationToken)

Populates the ImportLines and columnDefs basedfrom erp system

Declaration
public Task<ImportErpData> CreateErpImportDataAsync(ArchiveRestrictionInfo[] restriction, string[] columns, int connectionId, ErpActorType erpActorType, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ArchiveRestrictionInfo[] restriction

Archive restrictions.

string[] columns

Columns.

int connectionId

Connection id for Erp system

ErpActorType erpActorType

Erp Actor type

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ImportErpData>

The ImportLines and ColumnDefs

PreviewImportAsync(ImportLine[], string[], string, string, CancellationToken)

Preview the import

Declaration
public Task<ImportLine[]> PreviewImportAsync(ImportLine[] importLines, string[] columnDefinition, string culture, string context, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ImportLine[] importLines

The rows that will be manipulated and according to Import rules

string[] columnDefinition

An array of the columndefinitions, like firstname, lastname, ...

string culture

The current culture used in the import. Used to match language specific strings

string context

Optional context for the import.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<ImportLine[]>

An array of the the rows that can be imported, manipulated according to Import rules given

SaveImportAsync(ImportLine[], string[], bool, string, string, CancellationToken)

Do the actual import

Declaration
public Task<int[]> SaveImportAsync(ImportLine[] importLines, string[] columnDefinition, bool createSelection, string culture, string context, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ImportLine[] importLines

The rows that will be imported

string[] columnDefinition

An array of the columndefinitions, like firstname, lastname, ...

bool createSelection

true if a selection of the imported entities shall be made

string culture

The current culture used in the import. Used to match language specific strings

string context

Optional context for the import.

CancellationToken cancellationToken

This operation cannot be cancelled; the cancellationToken parameter is ignored

Returns
Type Description
Task<int[]>

First part: the id of the selection created after the import, 0 if no selection is created. Second part: The number of rows actually imported

Implements

IImportAgent
IAgent
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top