public MainForm() { InitializeComponent(); components = new NestedContainer(this); var uiThread = new SynchronizationContextScheduler(SynchronizationContext.Current); var subscriptions = new CompositeDisposable( RxMessageBrokerMinimod.Default.Register<Log>(m => { Debug.WriteLine(m.Message); var addedIndex = lbxEvents.Items.Add(m.Message); lbxEvents.SelectedIndex = addedIndex; }, uiThread), RxMessageBrokerMinimod.Default.Register<CurrentFile>(m => { lblCurrentFile.Text = m.FileName; lblLength.Text = m.Length.ToString(); }, uiThread)); components.Add(new Disposer(_ => subscriptions.Dispose())); }
internal Site(IComponent component, NestedContainer container, string?name) { Component = component; Container = container; _name = name; }
public virtual object GetService (Type service) { object serviceInstance = null; if (typeof (IDictionaryService) == service) serviceInstance = (IDictionaryService) this; if (typeof (INestedContainer) == service) { if (_nestedContainer == null) _nestedContainer = new DesignModeNestedContainer (_component, null); serviceInstance = _nestedContainer; } // Avoid returning the site specific IServiceContainer if (serviceInstance == null && service != typeof (IServiceContainer) && _siteSpecificServices != null) serviceInstance = _siteSpecificServices.GetService (service); if (serviceInstance == null) serviceInstance = _serviceProvider.GetService (service); return serviceInstance; }
internal Site(IComponent component, NestedContainer container, string name) { this.component = component; this.container = container; this.name = name; }
public Site(IComponent component, NestedContainer container, string name) { _component = component; _nestedContainer = container; _siteName = name; }
internal Site(IComponent component, NestedContainer container, string name) { _component = component; _container = container; _name = name; }
public Site (IComponent component, NestedContainer container, string name) { _component = component; _nestedContainer = container; _siteName = name; }