public void Add(Exception e, MessageType.Type type, Type from) { actionlist.Add(new LogMessageModel { date = dataHelper.GetTimeNow(), type = type.ToString(), message = e.Message + " Error in" + from.Name }); Debug.WriteLine(e.Message + "Error in " + from.Name); }
public void Add(string message, MessageType.Type type, Type from) { actionlist.Add(new LogMessageModel { date = dataHelper.GetTimeNow(), type = type.ToString(), message = message }); Debug.WriteLine(message); }
public List <string> Execute(string messageId, string messageBody, MessageType.Type messageType) { List <string> errors; List <string> message = new List <string>(); foreach (var CalPlugin in CalPlugins) { if ((string)CalPlugin.Metadata["MessageMetaData"] == messageType.ToString()) { errors = CalPlugin.Value.RunValidation(messageBody); if (errors.Any()) { MessageBox.Show(string.Join(System.Environment.NewLine, errors), "Validation Error", MessageBoxButton.OK, MessageBoxImage.Warning); break; } message = CalPlugin.Value.ProcessMessage(messageId, messageBody); break; } } return(message); }