Class FinScript

Namespace
Subsembly.FinTS.Forms
Assembly
Subsembly.FinTS.Win32.dll

Base class for asynchronous execution of Online Banking activities.

public abstract class FinScript
Inheritance
FinScript
Derived
Inherited Members

Remarks

In the context of the Subsembly.FinTS.Online namespace, all Online Banking activities are implemented as scripts deriving from the FinScript base class. The FinScript base class provides the mechanism for starting an Online Banking activity on a backgroud thread and maintaining the FinDocketForm window implementation for user feedback on the foreground UI thread.

In order to implement a particular Online Banking activity, a script class must be derived from FinScript which overrides the OnRunScript(FinBanking) member function. Within the overridden OnRunScript(FinBanking) member function the FinBanking class is usually called in order to conduct the Online Banking activity. All user feedback and interaction must be done through the attached FinDocketForm instance.

Properties

AutoCloseDocket

If set the docket will be closed automatically and without user interaction at the end of the script.

public static bool AutoCloseDocket { get; set; }

Property Value

bool

Remarks

This property must be set before the script is actually started. Setting this property influences only subsequent script runs.

Docket

protected IFinDocket Docket { get; }

Property Value

IFinDocket

Result

The final result when this script was executed.

public FinDialogResult Result { get; }

Property Value

FinDialogResult

Trace

Returns a copy of the tracing collected so far. This is null if no tracing output is available.

public string Trace { get; }

Property Value

string

Remarks

The Trace holds all details of the HBCI/FinTS dialog.

Methods

ClearTrace()

Erases all the current and captured trace content.

public void ClearTrace()

OnRunScript(FinBanking)

Must be overridden by a derived class in order to implement the actual Online Banking activity. This is already invoked on the background worker thread.

protected abstract FinDialogResult OnRunScript(FinBanking aBanking)

Parameters

aBanking FinBanking

A completely initialized new FinBanking instance. This was set up with the default FinCredentialManager configured to use the default FinDocketForm, FinCredentialForm, FinTanProcForm, and FinBankingPinStore. Hence there will be a default progress Form and all PIN/TAN handling will be done through the default Forms.

Returns

FinDialogResult

A final FinDialogResult. Must not be null.

StartScript(IWin32Window, string, FinContact)

Asynchronously starts the derived Online Banking script.

public void StartScript(IWin32Window aParentWindow, string sDocketHeading, FinContact aContact)

Parameters

aParentWindow IWin32Window

Optional window handle to parent window that starts this script. If given, then this window will be disabled for the duration of the script execution.

sDocketHeading string

Heading to be displayed above the list view in the Docket while this Online Banking script executes.

aContact FinContact

Mandatory FinContact instance that will be used to create a new FinBanking instance.

Exceptions

ArgumentNullException

The parameter sDocketHeading or aContact was null.