Class EbicsContactFolder

Namespace
Subsembly.EBICS
Assembly
Subsembly.EBICS.Core.dll

Simple file system based management of persistent EbicsContact objects.

public class EbicsContactFolder : EbicsContactFolderBase, IEbicsContactFolder, IEbicsRemoteContactFolder
Inheritance
EbicsContactFolder
Implements
Inherited Members
Extension Methods

Remarks

This class manages persistent EbicsContact objects by storing them in a given directory. Each EbicsContact object is stored in its own XML file. Thus the list of all contacts available is determined by scanning the files of the given directory.

The filename for storing contact files is made up by using the given contact name plus a .xml suffix. Also, when loading contact files, if the contact does not have a ContactName attribute then its ContactName will be derived from its filename by removing the .xml suffix.

Constructors

EbicsContactFolder(string, string)

Creates a new instance of EbicsContactFolder for a particular file system folder.

public EbicsContactFolder(string sContactsPath, string sSuffix = null)

Parameters

sContactsPath string

Directory where all the contact XML files are stored. Must not be null.

sSuffix string

Optional suffix that shall be used for the stored contact files. If null, then the suffix .xml will be used. If this is an empty string, then no suffix will be appended.

Remarks

Ideally the indicated directory shall be dedicated for the sole purpose of storing EbicsContact objects managed by this class, and shall not contain any other files.

Exceptions

ArgumentNullException

The parameter sContactsPath was null.

See Also

Properties

ContactsPath

Provides the file system path where the contacts are stored.

public string ContactsPath { get; }

Property Value

string

Default

Returns a reference to the system default folder for EBICS contacts.

public static EbicsContactFolder Default { get; }

Property Value

EbicsContactFolder

Remarks

If the folder is not explicitly set through ContactFolderPath, then a default path in the current users ApplicationData folder is used.

Suffix

Provides the file name suffix applied to the stored contacts.

public string Suffix { get; }

Property Value

string

Methods

Find(string)

public EbicsContact Find(string sContactName)

Parameters

sContactName string

Returns

EbicsContact

OnAdd(EbicsContact)

protected override void OnAdd(EbicsContact aContact)

Parameters

aContact EbicsContact

Exceptions

InvalidOperationException

OnLoadAllContacts()

protected override EbicsContact[] OnLoadAllContacts()

Returns

EbicsContact[]

OnRemove(EbicsContact)

protected override void OnRemove(EbicsContact aContact)

Parameters

aContact EbicsContact

OnUpdate(EbicsContact)

protected override void OnUpdate(EbicsContact aContact)

Parameters

aContact EbicsContact