/// <summary> /// Initializes new instance of the <see cref="ModuleLoader"/> class. /// </summary> /// <param name="rootContainer">Container that will be used as a root container. /// Module's sub-containers will be created based on this container. Must not be <c>null</c>.</param> /// <param name="guiThreadProvider">Used to execute OnLoad method on module's bootstraper. Must not be <c>null</c>.</param> /// <exception cref="ArgumentNullException">When <paramref name="rootContainer"/> or <paramref name="guiThreadProvider"/> is <c>null</c></exception> public ModuleLoader(IWindsorContainer rootContainer, IGuiThreadProvider guiThreadProvider) { if (rootContainer == null) throw new ArgumentNullException("rootContainer"); if (guiThreadProvider == null) throw new ArgumentNullException("guiThreadProvider"); _rootContainer = rootContainer; _guiThreadProvider = guiThreadProvider; }
/// <summary> /// Creates ticket for specified action /// </summary> /// <param name="action"></param> /// <param name="deliveryMethod"></param> ///<param name="guiThreadProvider">implementation of gui thread</param> public EventAggregatorTicket(Action <T> action, DeliveryMethod deliveryMethod, IGuiThreadProvider guiThreadProvider) { _guiThreadProvider = guiThreadProvider; Action = action; DeliveryMethod = deliveryMethod; ActionType = typeof(T); }
/// <summary> /// Initializes new instance of the <see cref="ModuleLoader"/> class. /// </summary> /// <param name="rootContainer">Container that will be used as a root container. /// Module's sub-containers will be created based on this container. Must not be <c>null</c>.</param> /// <param name="guiThreadProvider">Used to execute OnLoad method on module's bootstraper. Must not be <c>null</c>.</param> /// <exception cref="ArgumentNullException">When <paramref name="rootContainer"/> or <paramref name="guiThreadProvider"/> is <c>null</c></exception> public ModuleLoader(IWindsorContainer rootContainer, IGuiThreadProvider guiThreadProvider) { if (rootContainer == null) throw new ArgumentNullException("rootContainer"); if (guiThreadProvider == null) throw new ArgumentNullException("guiThreadProvider"); _rootContainer = rootContainer; _guiThreadProvider = guiThreadProvider; _assemblies = new Dictionary<string, Assembly>(); AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; AppDomain.CurrentDomain.AssemblyResolve += OnAssemblyResolve; }
/// <summary> /// Initializes new instance of the <see cref="ModuleLoader"/> class. /// </summary> /// <param name="rootContainer">Container that will be used as a root container. /// Module's sub-containers will be created based on this container. Must not be <c>null</c>.</param> /// <param name="guiThreadProvider">Used to execute OnLoad method on module's bootstraper. Must not be <c>null</c>.</param> /// <exception cref="ArgumentNullException">When <paramref name="rootContainer"/> or <paramref name="guiThreadProvider"/> is <c>null</c></exception> public ModuleLoader(IWindsorContainer rootContainer, IGuiThreadProvider guiThreadProvider) { if (rootContainer == null) { throw new ArgumentNullException("rootContainer"); } if (guiThreadProvider == null) { throw new ArgumentNullException("guiThreadProvider"); } _rootContainer = rootContainer; _guiThreadProvider = guiThreadProvider; _assemblies = new Dictionary <string, Assembly>(); AppDomain.CurrentDomain.AssemblyLoad += OnAssemblyLoad; AppDomain.CurrentDomain.AssemblyResolve += OnAssemblyResolve; }
private void GuiThreadChanged(WpfGuiChangedMessage wpfGuiChangedMessage) { _guiThreadProvider = wpfGuiChangedMessage.NewGuiThreadProvider; Unsubscribe(_ticket); _ticket = Subscribe <WpfGuiChangedMessage>(GuiThreadChangedInvalid); }
///<summary> /// Initializes <see cref="EventAggregator"/> with provided <see cref="guiThreadProvider"/>. ///</summary> public EventAggregator(IGuiThreadProvider guiThreadProvider) { _guiThreadProvider = guiThreadProvider; _ticket = Subscribe <WpfGuiChangedMessage>(GuiThreadChanged); }
/// <summary> /// Provides <see cref="guiThreadProvider"/> /// </summary> /// <param name="guiThreadProvider">gui thread</param> public WpfGuiChangedMessage(IGuiThreadProvider guiThreadProvider) { NewGuiThreadProvider = guiThreadProvider; }