public virtual void RaiseChatLogItemReceived(ChatLogItem chatLogItem) { var raised = new ChatLogItemEvent(this, chatLogItem); EventHandler <ChatLogItemEvent> handler = this.ChatLogItemReceived; handler?.Invoke(this, raised); }
private static void OnChatLogItemReceived(object sender, ChatLogItemEvent chatLogItemEvent) { // delegate event from chat log, not required to subsribe // this updates 100 times a second and only sends a line when it gets a new one if (sender == null) { return; } ChatLogItem chatLogEntry = chatLogItemEvent.ChatLogItem; Logging.Log(Logger, new LogItem(chatLogItemEvent.ChatLogItem.Code)); Logging.Log(Logger, new LogItem(chatLogItemEvent.ChatLogItem.Bytes.ToString())); Logging.Log(Logger, new LogItem(chatLogItemEvent.ChatLogItem.Combined)); Logging.Log(Logger, new LogItem(chatLogItemEvent.ChatLogItem.Line)); Logging.Log(Logger, new LogItem(chatLogItemEvent.ChatLogItem.Raw)); Logging.Log(Logger, new LogItem(chatLogItemEvent.ChatLogItem.TimeStamp.ToString("o"))); try { LogPublisher.Process(chatLogEntry); } catch (Exception ex) { Logging.Log(Logger, new LogItem(ex, true)); } }
private static void OnChatLogItemReceived(object sender, ChatLogItemEvent chatLogItemEvent) { // delegate event from chat log, not required to subsribe // this updates 100 times a second and only sends a line when it gets a new one if (sender == null) { return; } ChatLogItem chatLogItem = chatLogItemEvent.ChatLogItem; try { LogPublisher.Process(chatLogItem); } catch (Exception ex) { Logging.Log(Logger, new LogItem(ex, true)); } }