Class AttachmentsLoader
Exchange attachment loader
Inherited Members
Namespace: PayrollEngine.Client.Exchange
Assembly: PayrollEngine.Client.Core.dll
Syntax
public class AttachmentsLoader : Visitor
Constructors
AttachmentsLoader(Exchange, IScriptParser, bool)
Initializes a new instance of the AttachmentsLoader class
Declaration
public AttachmentsLoader(Exchange exchange, IScriptParser scriptParser, bool resetFileName = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Exchange | exchange | The exchange model |
| IScriptParser | scriptParser | The script parser |
| bool | resetFileName | Reset the file name |
Remarks
Content is loaded from the working folder
Methods
Read()
Read attachments
Declaration
public void Read()
ReadAsync()
Read attachments
Declaration
public virtual Task ReadAsync()
Returns
| Type | Description |
|---|---|
| Task |
ReadTextFile(string)
Reads a text file as string
Declaration
protected string ReadTextFile(string fileName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | fileName | Name of the file |
Returns
| Type | Description |
|---|---|
| string | The file content as string |
SetupCaseAsync(IExchangeTenant, IRegulationSet, ICaseSet, ICase)
Case setup
Declaration
protected virtual Task SetupCaseAsync(IExchangeTenant tenant, IRegulationSet regulation, ICaseSet caseSet, ICase targetCase)
Parameters
| Type | Name | Description |
|---|---|---|
| IExchangeTenant | tenant | The exchange tenant |
| IRegulationSet | regulation | The regulation |
| ICaseSet | caseSet | The case |
| ICase | targetCase | The target case |
Returns
| Type | Description |
|---|---|
| Task |
SetupCaseRelationAsync(IExchangeTenant, IRegulationSet, ICaseRelation, ICaseRelation)
Case relation setup
Declaration
protected virtual Task SetupCaseRelationAsync(IExchangeTenant tenant, IRegulationSet regulation, ICaseRelation caseRelation, ICaseRelation targetCaseRelation)
Parameters
| Type | Name | Description |
|---|---|---|
| IExchangeTenant | tenant | The exchange tenant |
| IRegulationSet | regulation | The regulation |
| ICaseRelation | caseRelation | The case relation |
| ICaseRelation | targetCaseRelation | The target case relation |
Returns
| Type | Description |
|---|---|
| Task |
SetupCollectorAsync(IExchangeTenant, IRegulationSet, ICollector, ICollector)
Case relation setup
Declaration
protected virtual Task SetupCollectorAsync(IExchangeTenant tenant, IRegulationSet regulation, ICollector collector, ICollector targetCollector)
Parameters
| Type | Name | Description |
|---|---|---|
| IExchangeTenant | tenant | The exchange tenant |
| IRegulationSet | regulation | The regulation |
| ICollector | collector | The collector |
| ICollector | targetCollector | The target collector |
Returns
| Type | Description |
|---|---|
| Task |
SetupPayrunAsync(IExchangeTenant, IPayrun, IPayrun)
Payrun setup
Declaration
protected virtual Task SetupPayrunAsync(IExchangeTenant tenant, IPayrun payrun, IPayrun targetPayrun)
Parameters
| Type | Name | Description |
|---|---|---|
| IExchangeTenant | tenant | The exchange tenant |
| IPayrun | payrun | The payrun |
| IPayrun | targetPayrun | The target payrun |
Returns
| Type | Description |
|---|---|
| Task |
SetupReportAsync(IExchangeTenant, IRegulationSet, IReportSet, IReportSet)
Report setup
Declaration
protected virtual Task SetupReportAsync(IExchangeTenant tenant, IRegulationSet regulation, IReportSet report, IReportSet targetReport)
Parameters
| Type | Name | Description |
|---|---|---|
| IExchangeTenant | tenant | The exchange tenant |
| IRegulationSet | regulation | The regulation |
| IReportSet | report | The report |
| IReportSet | targetReport | The target report |
Returns
| Type | Description |
|---|---|
| Task |
SetupReportTemplateAsync(IExchangeTenant, IRegulationSet, IReportSet, IReportTemplate, IReportTemplate)
Report template setup
Declaration
protected virtual Task SetupReportTemplateAsync(IExchangeTenant tenant, IRegulationSet regulation, IReportSet report, IReportTemplate template, IReportTemplate targetTemplate)
Parameters
| Type | Name | Description |
|---|---|---|
| IExchangeTenant | tenant | The exchange tenant |
| IRegulationSet | regulation | The regulation |
| IReportSet | report | The report |
| IReportTemplate | template | The report template |
| IReportTemplate | targetTemplate | The target report template |
Returns
| Type | Description |
|---|---|
| Task |
SetupScriptAsync(IExchangeTenant, IRegulationSet, IScript, IScript)
Script setup
Declaration
protected virtual Task SetupScriptAsync(IExchangeTenant tenant, IRegulationSet regulation, IScript script, IScript targetScript)
Parameters
| Type | Name | Description |
|---|---|---|
| IExchangeTenant | tenant | The exchange tenant |
| IRegulationSet | regulation | The regulation |
| IScript | script | The script |
| IScript | targetScript | The target script |
Returns
| Type | Description |
|---|---|
| Task |
SetupWageTypeAsync(IExchangeTenant, IRegulationSet, IWageType, IWageType)
Wage type setup
Declaration
protected virtual Task SetupWageTypeAsync(IExchangeTenant tenant, IRegulationSet regulation, IWageType wageType, IWageType targetWageType)
Parameters
| Type | Name | Description |
|---|---|---|
| IExchangeTenant | tenant | The exchange tenant |
| IRegulationSet | regulation | The regulation |
| IWageType | wageType | The wage type |
| IWageType | targetWageType | The target wage type |
Returns
| Type | Description |
|---|---|
| Task |