/** * Write method will create a LogItem Object based on the parameters and then * send the object to Write(LogItem item) method. */ public void Write(string sender, string msg) { LogItem newItem = new LogItem(sender, msg); Write(newItem); }
/** * Puts every Item object in a list so that its easier for us to later on print the * proccess of the program. The method is equipped with a lock method so that Items can * be added to the list one by one. */ public void Write(LogItem item) { lock (_lock) { _entries.Add(item); } }