I have a class with methods that report the current state of the process. I usually use a UIHandle.Writline where UIHandle is an interface with 2 methods.
UIHandle.WritLine(string StringInput)
Or
UIHandle.WritLine(List<string> StringInput)
Which is used this way:
UIHandle.WriteLine("Checking for error...");
UIHandle.WriteLine(CheckForMissing(newCollection)); //Where CheckForMissing returns a list of strings
I was wondering if there is a possibility that I was not aware of to trigger the methods through an event rather than the class such as:
TriggerTheResponseEvent("Checking for error...");
TriggerTheResponseEvent(CheckForMissing(newCollection));
I though it would be better to avoid interface as I currently use. And I could add a log file more easily...