Interface IEbicsContactFolder
Provides an abstract interface for storing a collection of EbicsContact instances.
Namespace: Subsembly.EBICS
Assembly: Subsembly.EBICS.Core.dll
Syntax
public interface IEbicsContactFolder
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.
Declaration
void Add(EbicsContact aContact)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact |
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
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aContact was |
System.InvalidOperationException | The very same EbicsContact instance was already added to this folder. |
LoadAllContacts()
Returns all the contacts that are currently stored in this folder.
Declaration
EbicsContact[] LoadAllContacts()
Returns
Type | Description |
---|---|
EbicsContact[] |
Remove(EbicsContact)
Deletes the given EbicsContact which is stored in this folder.
Declaration
void Remove(EbicsContact aContact)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | EbicsContact instance that has previously been added through Add(EbicsContact) or that was returned through the base collection interface. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aContact was |
System.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.
Declaration
void Update(EbicsContact aContact)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | EbicsContact instance that has previously been added through Add(EbicsContact) or that was returned through the base collection interface. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter aContact was |
System.InvalidOperationException | The given EbicsContact instance does not originate from this folder. |