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