public LoggerViewModel(IUnityContainer container, AbstractWorkspace workspace) { _workspace = workspace; _container = container; Name = "Logger"; Title = "Logger"; ContentId = "Logger"; _model = new LoggerModel(); Model = _model; IsVisible = false; _view = new LoggerView(); _view.DataContext = _model; View = _view; _aggregator = _container.Resolve <IEventAggregator>(); _aggregator.GetEvent <LogEvent>().Subscribe(AddLog); }
public LoggerViewModel(IUnityContainer container, AbstractWorkspace workspace) { _workspace = workspace; _container = container; Name = "Logger"; Title = "Logger"; ContentId = "Logger"; _model = new LoggerModel(); Model = _model; IsVisible = false; _view = new LoggerView(); _view.DataContext = _model; View = _view; _aggregator = _container.Resolve<IEventAggregator>(); _aggregator.GetEvent<LogEvent>().Subscribe(AddLog); }