コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: LogModuleModel.cs プロジェクト: garysharp/Disco
 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()
     };
 }