Struct SepaRF

Namespace
Subsembly.Sepa
Assembly
Subsembly.Sepa.dll

Helper class for working with a Structured Creditor Reference, and other, similarily composed reference values.

public struct SepaRF
Inherited Members

Remarks

A SepaRF always consists of two upper case characters, followed by two check digits, followed by the actual reference value characters. For a Structured Creditor Reference, the reference always begins with upper case "RF".

Constructors

SepaRF(string)

public SepaRF(string sReference)

Parameters

sReference string

Fields

MAXLENGTH

The max length including prefix and checkdigits

public const int MAXLENGTH = 25

Field Value

int

MINLENGTH

The min length including prefix and checkdigits

public const int MINLENGTH = 5

Field Value

int

NullRF

Represents an unset SepaRF instance.

public static readonly SepaRF NullRF

Field Value

SepaRF

RF

The prefix that must be used with a Structured Creditor Reference.

public const string RF = "RF"

Field Value

string

Properties

IsNull

Indicates whether this SepaRF is the NullRF.

public bool IsNull { get; }

Property Value

bool

Reference

Provides the complete wrapped SepaRF in its electronic format.

public string Reference { get; }

Property Value

string

ReferenceValue

Provides the value of the reference without prefix and check digits.

public string ReferenceValue { get; }

Property Value

string

Methods

Capture(string)

public static string Capture(string sPaperReference)

Parameters

sPaperReference string

Returns

string

Equals(object)

Compares the electronic SepaRF representation for equivalence.

public override bool Equals(object obj)

Parameters

obj object

Right hand side to compare to.

Returns

bool

True if both are essentially the same SepaRF.

Format()

public string Format()

Returns

string

Format(string)

Nicely formats the given reference string input into groups of four characters.

public static string Format(string sReference)

Parameters

sReference string

Returns

string

GetHashCode()

Provides an hash code based on the electronic SepaRF representation of this SepaRF.

public override int GetHashCode()

Returns

int

Hashcode.

IsValid(string)

public static bool IsValid(string sReference)

Parameters

sReference string

Returns

bool

ToString()

Returns the electronic format of this SepaRF.

public override string ToString()

Returns

string

Electronic format of this SepaRF.

TryCapture(string)

Tries to Capture(string) a SepaRF. If no valid reference was captured, then NullRF is returned.

public static SepaRF TryCapture(string sPaperReference)

Parameters

sPaperReference string

Returns

SepaRF

Operators

operator ==(SepaRF, SepaRF)

Equality operator compares the electronic format of the SepaRF.

public static bool operator ==(SepaRF lhs, SepaRF rhs)

Parameters

lhs SepaRF
rhs SepaRF

Returns

bool

operator !=(SepaRF, SepaRF)

Inequality operator compares the electronic format of the SepaRF.

public static bool operator !=(SepaRF lhs, SepaRF rhs)

Parameters

lhs SepaRF
rhs SepaRF

Returns

bool