Пример #1
0
        LoggingView GetMasterLoggingView()
        {
            var loggingView      = new LoggingView();
            var loggingViewModel = new LoggingViewModel(Dispatcher, new LoggerFacade(Logger.Instance, "Master Logging View"));

            loggingView.DataContext = loggingViewModel;
            return(loggingView);
        }
Пример #2
0
        LoggingView GetLoggingView()
        {
            var loggingView = new LoggingView();

            // Option 1: Pass in LoggerFacade with Group Id
            var loggingViewModel = new LoggingViewModel(Dispatcher, new LoggerFacade {
                GroupId = LoggerFacade.GetNewGroupId()
            });

            // Option 2: Pass Group Id in via Property Setter
            //if (loggingViewModel is IHaveLoggerGroup)
            //    (loggingViewModel as IHaveLoggerGroup).LogGroupId = LoggerFacade.GetNewGroupId();

            loggingView.DataContext = loggingViewModel;

            return(loggingView);
        }