internal static void BroadcastLog(LogBase logModule, LogEventType eventType, DateTime Timestamp, params object[] Arguments) { var message = LogLiveEvent.Create(logModule, eventType, Timestamp, Arguments); var connectionManager = GlobalHost.ConnectionManager; var context = connectionManager.GetHubContext<LogNotificationsHub>(); var targets = new List<string> { AllLoggingNotification, NotificationsModulePrefix + logModule.ModuleName }; context.Clients.Groups(targets).receiveLog(message); }
public static LogModuleModel FromLogModule(LogBase LogModule) { return new LogModuleModel() { Id = LogModule.ModuleId, Name = LogModule.ModuleName, Description = LogModule.ModuleDescription, EventTypes = LogModule.EventTypes.Values.Select(et => LogEventTypeModel.FromLogEventType(et)).ToList() }; }