Interface IEbicsContactFolder

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

Provides an abstract interface for storing a collection of EbicsContact instances.

public interface IEbicsContactFolder
Extension Methods

Remarks

The EbicsContact class provides the capability of maintaining itself through any IEbicsContactFolder implementation which is provided by the application. Thus an application can completely control the storage of contact data. For simple applications a default implementation EbicsContactFolder is provided that stores the contacts as individual XML files in the file system.

The content of a IEbicsContactFolder must be enumerable through its base interface IEnumerable. There is no guarantee that every enumeration returns the contacts in the same order.

An implementation of IEbicsContactFolder must use the various persistency methods of the EbicsContact class in order to serialise and deserialise the object data for storage. No assumptions about the serialised data must be made.

Methods

Add(EbicsContact)

Stores the given EbicsContact in this folder.

void Add(EbicsContact aContact)

Parameters

aContact EbicsContact

Remarks

This method needs not and shall not check for duplicates. Even if all contact attributes are equal to another contact already stored in this folder, this method will store another equal copy. If, however, the given EbicsContact instance is identical (same object reference) to a previously added instance or a previously returned instance, then an exception is thrown.

Exceptions

ArgumentNullException

The parameter aContact was null.

InvalidOperationException

The very same EbicsContact instance was already added to this folder.

LoadAllContacts()

Returns all the contacts that are currently stored in this folder.

EbicsContact[] LoadAllContacts()

Returns

EbicsContact[]

Remove(EbicsContact)

Deletes the given EbicsContact which is stored in this folder.

void Remove(EbicsContact aContact)

Parameters

aContact EbicsContact

EbicsContact instance that has previously been added through Add(EbicsContact) or that was returned through the base collection interface.

Exceptions

ArgumentNullException

The parameter aContact was null.

InvalidOperationException

The given EbicsContact instance does not originate from this folder, or was already removed.

Update(EbicsContact)

Updates the stored data of the given EbicsContact.

void Update(EbicsContact aContact)

Parameters

aContact EbicsContact

EbicsContact instance that has previously been added through Add(EbicsContact) or that was returned through the base collection interface.

Exceptions

ArgumentNullException

The parameter aContact was null.

InvalidOperationException

The given EbicsContact instance does not originate from this folder.