Class EbicsContactFolder
Simple file system based management of persistent EbicsContact objects.
Inherited Members
Namespace: Subsembly.EBICS
Assembly: Subsembly.EBICS.Core.dll
Syntax
public class EbicsContactFolder : EbicsContactFolderBase, IEbicsContactFolder, IEbicsRemoteContactFolder
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.
Declaration
public EbicsContactFolder(string sContactsPath, string sSuffix = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | sContactsPath | Directory where all the contact XML files are stored. Must not be |
System.String | sSuffix | Optional suffix that shall be used for the stored contact files. If |
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
Type | Condition |
---|---|
System.ArgumentNullException | The parameter sContactsPath was |
See Also
Properties
ContactsPath
Provides the file system path where the contacts are stored.
Declaration
public string ContactsPath { get; }
Property Value
Type | Description |
---|---|
System.String |
Default
Returns a reference to the system default folder for EBICS contacts.
Declaration
public static EbicsContactFolder Default { get; }
Property Value
Type | Description |
---|---|
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.
Declaration
public string Suffix { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
Find(String)
Declaration
public EbicsContact Find(string sContactName)
Parameters
Type | Name | Description |
---|---|---|
System.String | sContactName |
Returns
Type | Description |
---|---|
EbicsContact |
OnAdd(EbicsContact)
Declaration
protected override void OnAdd(EbicsContact aContact)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact |
Overrides
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException |
OnLoadAllContacts()
Declaration
protected override EbicsContact[] OnLoadAllContacts()
Returns
Type | Description |
---|---|
EbicsContact[] |
Overrides
OnRemove(EbicsContact)
Declaration
protected override void OnRemove(EbicsContact aContact)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact |
Overrides
OnUpdate(EbicsContact)
Declaration
protected override void OnUpdate(EbicsContact aContact)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact |