Class EbicsContactFolder
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
sContactsPathstringDirectory where all the contact XML files are stored. Must not be
null.sSuffixstringOptional suffix that shall be used for the stored contact files. If
null, then the suffix.xmlwill 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
Default
Returns a reference to the system default folder for EBICS contacts.
public static EbicsContactFolder Default { get; }
Property Value
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
Methods
Find(string)
public EbicsContact Find(string sContactName)
Parameters
sContactNamestring
Returns
OnAdd(EbicsContact)
protected override void OnAdd(EbicsContact aContact)
Parameters
aContactEbicsContact
Exceptions
OnLoadAllContacts()
protected override EbicsContact[] OnLoadAllContacts()
Returns
OnRemove(EbicsContact)
protected override void OnRemove(EbicsContact aContact)
Parameters
aContactEbicsContact
OnUpdate(EbicsContact)
protected override void OnUpdate(EbicsContact aContact)
Parameters
aContactEbicsContact