本文整理汇总了C#中IEventAggregator类的典型用法代码示例。如果您正苦于以下问题:C# IEventAggregator类的具体用法?C# IEventAggregator怎么用?C# IEventAggregator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IEventAggregator类属于命名空间,在下文中一共展示了IEventAggregator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Shell
public Shell(IUnityContainer container, IEventAggregator evtAggregator)
{
InitializeComponent();
container.RegisterInstance<Panel>("MainRegion", m_MainRegionPanel);
container.RegisterInstance<Panel>("SecondRegion", m_SecondRegionPanel);
evtAggregator.GetEvent<ProductSavedEvent>().Subscribe(OnProductSaved,ThreadOption.SubscriberAffinityThread);
}
示例2: GeoRegionMaintenanceViewModel
public GeoRegionMaintenanceViewModel(IModuleController moduleController, IDataRepository repository, IEventAggregator eventAggregator)
{
_moduleController = moduleController;
_repository = repository;
_eventAggregator = eventAggregator;
ShowView = _moduleController.ShowViewCommand;
NavigationDetails = _moduleController.NavigationDetails;
ChangeMetaPanel = new DelegateCommand<bool?>(ChangeMetaViewPanel);
ChangeGeoPanel = new DelegateCommand<bool?>(ChangeGeoViewPanel);
DeleteMetaRegionCommand = new DelegateCommand(DeleteMetaRegion);
EditMetaRegionCommand = new DelegateCommand(EditMetaRegion);
AddNewMetaRegionCommand = new DelegateCommand(AddNewMetaRegion);
DeleteMetaRegionMappingCommand = new DelegateCommand(DeleteMetaRegionMapping);
AddMetaRegionMappingCommand = new DelegateCommand(AddMetaRegionMapping);
DeleteGeoRegionCommand = new DelegateCommand(DeleteGeoRegion);
EditGeoRegionCommand = new DelegateCommand(EditGeoRegion);
CreateNewGeoRegionCommand = new DelegateCommand(CreateNewGeoRegion);
_metaRegions = new ObservableCollection<t033_meta_region>();
_metaRegionMappings = new ObservableCollection<t031_geo_code>();
_geoRegions = new ObservableCollection<GeoRegionViewModel>();
_moduleController.SwitchPanel(MaintenanceRegionNames.MetaRegionRegion, MaintenanceViewNames.MetaRegionView);
_moduleController.SwitchPanel(MaintenanceRegionNames.GeoRegionRegion, MaintenanceViewNames.GeoRegionView);
_moduleController.SwitchPanel(MaintenanceRegionNames.MetaRegionMappingRegion, MaintenanceViewNames.MetaRegionMappingView);
_eventAggregator.GetEvent<RefreshRegionsEvent>().Subscribe(InitializeData);
}
示例3: EntityListPageViewModel
public EntityListPageViewModel(IEntityRepository entityRepository, INavigationService navService, IEventAggregator eventAggregator) {
_entityRepository = entityRepository;
_navService = navService;
_eventAggregator = eventAggregator;
NavCommand = new DelegateCommand<Entity>(OnNavCommand);
EntityDetailNavCommand = new DelegateCommand(() => _navService.Navigate("EntityDetail", 0));
}
示例4: EditCollectionTemplateViewModel
public EditCollectionTemplateViewModel(IServer server, IEventAggregator events,
IDocumentTemplateProvider templateProvider)
{
this.server = server;
this.events = events;
this.templateProvider = templateProvider;
}
示例5: DebugWindowViewModel
public DebugWindowViewModel(IEventAggregator eventAggregator) {
_eventAggregator = eventAggregator;
DebugStrings = new ObservableCollection<string>();
_eventAggregator.GetEvent<SetDebugMessageEvent>().Subscribe(SetMessage);
SendCloseMessageCommand = new DelegateCommand(SendCloseMessage);
ExportListCommand = new DelegateCommand(ExportList);
}
示例6: PivotRunTimeCalculatorViewModel
public PivotRunTimeCalculatorViewModel(INavigationService navigationService, IEventAggregator eventAggregator, string title)
: base(navigationService, eventAggregator, title)
{
_navigationService = navigationService;
_eventAggregator = eventAggregator;
initializePivotRunTimeCalculatorViewModel();
}
示例7: ModuleInit
public ModuleInit(IRegionManager regionManager, IUnityContainer container, IEventAggregator eventAggregator, IModuleManager moduleManager)
{
this.regionManager = regionManager;
this.container = container;
this.eventAggregator = eventAggregator;
this.moduleManager = moduleManager;
}
示例8: SalesModule
public SalesModule(IEventAggregator eventAggregator, INavigationService navigationService, IUnityContainer container, IRegionManager regionManager)
{
_container = container;
_regionManager = regionManager;
_navigationService = navigationService;
_eventAggregator = eventAggregator;
}
示例9: ViewModelBase
public ViewModelBase(IPersonService personService, IDispatcher dispatcher, IEventAggregator aggregator, IDialogService dialogService)
{
if (personService == null)
{
throw new ArgumentNullException("personService");
}
if (dispatcher == null)
{
throw new ArgumentNullException("dispatcher");
}
if (aggregator == null)
{
throw new ArgumentNullException("aggregator");
}
if (dialogService == null)
{
throw new ArgumentNullException("dialogService");
}
this.personService = personService;
this.dispatcher = dispatcher;
this.aggregator = aggregator;
this.dialogService = dialogService;
isBusy = false;
}
示例10: MenuRegionController
public MenuRegionController(IUnityContainer container,
[Dependency(ShellRegionNames.MenuRegion)] IRegion menuRegion)
{
_container = container;
_eventAggregator = _container.Resolve<IEventAggregator>();
_menuRegion = menuRegion;
}
示例11: MainMenuViewModel
public MainMenuViewModel()
{
Groups = new BindableCollection<MenuGroup>();
if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
{
_running = IoC.Get<RunExperimentViewModel>();
_runThresholdTest = IoC.Get<RunThresholdTestViewModel>();
_permutations = IoC.Get<PermutationViewModel>();
_nbsmConfig = IoC.Get<NBSmConfigViewModel>();
_eventAggregator = IoC.Get<IEventAggregator>();
_navService = IoC.Get<INavigationService>();
_regionService = IoC.Get<IRegionService>();
_subjectService = IoC.Get<ISubjectDataService>();
_subjectFilterService = IoC.Get<ISubjectFilterService>();
_computeService = IoC.Get<IComputeService>();
var regionsVM = IoC.Get<RegionsViewModel>();
Groups.Add(new MenuGroup { Title = "Source", Items = { regionsVM, IoC.Get<SubjectsViewModel>(), IoC.Get<GroupsViewModel>() } });
Groups.Add(new MenuGroup { Title = "Config", Items = { _permutations, _nbsmConfig } });
Groups.Add(new MenuGroup { Title = "Compute", Items = { _runThresholdTest, _running } });
Groups.Add(new MenuGroup { Title = "Global", Items = { IoC.Get<GlobalStrengthViewModel>() } });
Groups.Add(new MenuGroup { Title = "Component", Items = { IoC.Get<IntermodalViewModel>(), IoC.Get<IntraSummaryViewModel>()/*, new MenuItem { Title = "Associations" },*/ } });
Groups.Add(new MenuGroup { Title = "Nodal", Items = { IoC.Get<NodalStrengthDataTypeViewModel>() } });
Groups.Add(new MenuGroup { Title = "Edge", Items = { IoC.Get<EdgeSignificanceViewModel>() } });
}
}
示例12: UpdaterModuleBootstraper
public UpdaterModuleBootstraper(IUpdater updater, RegionManager regionManager,IEventAggregator eventAggregator)
{
// use injected services from Nomad, instead of using IServiceLocator mechanism
_updater = updater;
_regionManager = regionManager;
_eventAggregator = eventAggregator;
}
示例13: WatchListViewModel
public WatchListViewModel(IWatchListService watchListService, IMarketFeedService marketFeedService, IRegionManager regionManager, IEventAggregator eventAggregator)
{
if (watchListService == null)
{
throw new ArgumentNullException("watchListService");
}
if (eventAggregator == null)
{
throw new ArgumentNullException("eventAggregator");
}
this.HeaderInfo = Resources.WatchListTitle;
this.WatchListItems = new ObservableCollection<WatchItem>();
this.marketFeedService = marketFeedService;
this.regionManager = regionManager;
this.watchList = watchListService.RetrieveWatchList();
this.watchList.CollectionChanged += delegate { this.PopulateWatchItemsList(this.watchList); };
this.PopulateWatchItemsList(this.watchList);
this.eventAggregator = eventAggregator;
this.eventAggregator.GetEvent<MarketPricesUpdatedEvent>().Subscribe(this.MarketPricesUpdated, ThreadOption.UIThread);
this.removeWatchCommand = new DelegateCommand<string>(this.RemoveWatch);
this.watchListItems.CollectionChanged += this.WatchListItems_CollectionChanged;
}
示例14: PasswordGeneratorViewModel
public PasswordGeneratorViewModel(IPasswordGenerator passwordGenerator, IEventAggregator events)
{
this.events = events;
this.passwordGenerator = passwordGenerator;
this.DisplayName = "Generator";
this.Length = 6;
}
示例15: DownloadService
public DownloadService(IProvideDownloadClient downloadClientProvider,
IEventAggregator eventAggregator, Logger logger)
{
_downloadClientProvider = downloadClientProvider;
_eventAggregator = eventAggregator;
_logger = logger;
}