示例#1
0
 protected void InitializeLogging(bool isNewGroup, string origin)
 {
     LoggerFacade = new LoggerFacade(Logger.Instance, origin);
     if (isNewGroup)
     {
         LoggerFacade.GroupId = LoggerFacade.GetNewGroupId();
     }
 }
示例#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);
        }