Class EbicsExtensionMethods
Convenience extension methods for the EbicsContact in Windows environments.
Inheritance
Inherited Members
Namespace: Subsembly.EBICS
Assembly: Subsembly.EBICS.Win32.dll
Syntax
public static class EbicsExtensionMethods
Methods
AuthenticateSecurityMedium(EbicsContact, IWin32Window)
Interactively creates and authenticates the security medium configured for the given contact.
Declaration
public static IEbicsSecurityMedium AuthenticateSecurityMedium(this EbicsContact aContact, IWin32Window aOwnerWindow)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | |
System.Windows.Forms.IWin32Window | aOwnerWindow |
Returns
Type | Description |
---|---|
IEbicsSecurityMedium | If the security medium was successfully created and authenticated, then it is
returned. It is the responsibility of the caller to finally
Release() the security medium, if it is no longer
needed. If authentication fails, then |
InternalizeKeyFile(EbicsContact, IWin32Window)
Copies the keys from a key file based security medium to a new EbicsSecurityMediumVoid instance that is then associated with this contact.
Declaration
public static void InternalizeKeyFile(this EbicsContact aContact, IWin32Window aOwnerWindow)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | |
System.Windows.Forms.IWin32Window | aOwnerWindow |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | This contact is not using a security medium of type File. |
Send(EbicsContact, IWin32Window, EbicsOrder)
Send an EBICS order, authenticated by this contact.
Declaration
public static EbicsErrorClass Send(this EbicsContact aContact, IWin32Window aOwnerWindow, EbicsOrder aOrder)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | |
System.Windows.Forms.IWin32Window | aOwnerWindow | |
EbicsOrder | aOrder | Completely initialized order to be sent. This must not be |
Returns
Type | Description |
---|---|
EbicsErrorClass | Returns the worse error class from the technical and business return codes (if any). If the transaction failed completely without ever receiving a return code, then an exception is thrown. If the security medium could not be authenticated, e.g. the password entry dialog was cancelled by the user, then the special value SecurityMediumError is returned. |
Remarks
This method will create the IEbicsSecurityMedium instance required for this contact and authenticate it. If authentication is successful, then the order will be authenticated and sent.
This method also automatically signs any upload orders that require a signature, unless they are already signed.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The EbicsOrder argument was |
System.ArgumentException | The given EbicsOrder was incomplete. |
Sign(EbicsContact, IWin32Window, EbicsOrder)
Add a signature (EU) to the given order.
Declaration
public static bool Sign(this EbicsContact aContact, IWin32Window aOwnerWindow, EbicsOrder aOrder)
Parameters
Type | Name | Description |
---|---|---|
EbicsContact | aContact | |
System.Windows.Forms.IWin32Window | aOwnerWindow | |
EbicsOrder | aOrder | The order to be signed. This must be completely set up and must contain some OrderData. |
Returns
Type | Description |
---|---|
System.Boolean | If successful, then |
Remarks
This method will create the IEbicsSecurityMedium instance required for this contact and authenticate it. If authentication is successful, then the order data will be signed.
Note that after signing an order it cannot be modified again.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | A required parameter was |
System.ArgumentException | The given order was not set up completely. |