Interface IFinContactFolder
Provides an abstract interface for storing a collection of FinContact instances.
Inherited Members
Namespace: Subsembly.FinTS
Assembly: Subsembly.FinTS.Core.dll
Syntax
public interface IFinContactFolder : IEnumerable
Remarks
The FinContact class provides the capability of storing itself through any IFinContactFolder implementation which may be provided by the application. Thus an application can completely control the storage of contact data. For simple applications a default implementation FinContactFolder is provided that stores the contacts as individual XML files in the file system.
The content of a IFinContactFolder must be enumerable. However there is no guarantee that every enumeration returns the contacts in the same order.
An implementation of IFinContactFolder must use the various persistency methods of the FinContact class in order to serialise and deserialise the object data for storage. No assumptions about the serialised data must be made.
Methods
Add(FinContact)
Stores the given FinContact in this folder.
Declaration
void Add(FinContact aContact)
Parameters
Type | Name | Description |
---|---|---|
FinContact | 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 FinContact instance is identical (same object reference) to a previously added instance or a previously enumerated instance, then an exception is thrown.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter |
System.InvalidOperationException | The very same FinContact instance was already added to this folder. |
Remove(FinContact)
Deletes the given FinContact which is stored in this folder.
Declaration
void Remove(FinContact aContact)
Parameters
Type | Name | Description |
---|---|---|
FinContact | aContact | FinContact instance that has previously been added through Add(FinContact) or that was returned through enumeration of the folder contents. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter |
System.InvalidOperationException | The given FinContact instance does not originate from this folder, or was already removed. |
Update(FinContact)
Updates the stored data of the given FinContact.
Declaration
void Update(FinContact aContact)
Parameters
Type | Name | Description |
---|---|---|
FinContact | aContact | FinContact instance that has previously been added through Add(FinContact) or that was returned through enumeration of the folder contents. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The parameter |
System.InvalidOperationException | The given FinContact instance does not originate from this folder. |