I'm using the excellent OpenIso8583Net to send/receive ISO messages. However, since every organization has its own definition and customization, I want to be able to customoize the format with as little touch to the projects' source as possible to be able to upgrade to new versions more easily.
So here are three customizations I am facing right now:
- How can I make
Bitmap
to useAsciiFormatter
instead ofBinaryFormatter
? since bitmap is a private field ofAMessage
class, I cannot access it even if I directly derive a new custom class fromAMessage
. And the constructor usesBinaryFormatter
by default. Currently, I have modified Bitmap.cs parameterless constructor to useAsciiFormatter
. - Same story goes for variable length formatter. It uses
AsciiFormatter
by default. But I'd like it to useBcdFormatter
. I have Modified this part to useBcdFormatter
by default in VariableLengthFormatter.
I'd appreciate if anyone shows me a better way to handle these customizations by extending, not modifying. - Suppose I want to display fields in a log file. An example would be what I have displayed at Generating MAC by encrypting data in the
Fields
section. Right now, I have to makeTemplate
property public and use the following snippet: for (var i = 2; i
How can I access the fields without making the Template
public? I want to access the Display
method of fields in my main program for logging purposes.