Usage from C#
Prerequisites
To use the library from C# you'll need to add reference to FSharp.Core
package to your project. You can grab it from NuGet.
Usage
To check the sort code / account number pair you'll need:
You can obtain newest version of both files from VocaLink.
Once you got the files, you need to create an instance of Validator
class and initialize it by loading the data into memory using the LoadData
method:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: |
|
You can find the details of the method in the reference docs.
To validate the sort code and account number pair use the ValidateAccount
method:
1: 2: 3: 4: 5: 6: 7: 8: 9: |
|
For more information about the API and types used by the library please check the reference docs.
Notes
Loading the data using the LoadData
method modifies the state of the Validator
class instance and should be considered thread unsafe.
Validating the data using the ValidateAccount
method doesn't modify the state and can be considered thread safe.