I have a sample program from Aforge library. It uses a kind of logging system (I assume it is like a StringBuilder or something…).
In the samples, here and there I see something like:
IImageProcessingLog _log = new ImageProcessingLog();
//some code
_log.AddMessage("Image size: " + _bitmap.Width + " x " + _bitmap.Height);
//more codes and usage of `_log`
Clearly this is some sort of string. Later I want to dump all this data into a TextBox. I tried to do _log.ToString() but it just returns the object name.
Any idea how can I use this log feature?
Thanks
The
ImageProcessingLogclass has a property calledMessages.Messagesis of typeList<string>. So, to get all logged messagessimply iterate the elements of the messages list.
Unfortunately the
IImageProcessingLoginterface does not have such a property.A possible workaround would be to create an adapter class/interface which wraps the
ImageProcessingLogclass.