Inheritance: Container, INestedContainer, IContainer, IDisposable
Exemple #1
0
        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()));
        }
Exemple #2
0
 internal Site(IComponent component, NestedContainer container, string?name)
 {
     Component = component;
     Container = container;
     _name     = name;
 }
Exemple #3
0
		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;
		}
Exemple #4
0
 internal Site(IComponent component, NestedContainer container, string name)
 {
     this.component = component;
     this.container = container;
     this.name      = name;
 }
Exemple #5
0
 public Site(IComponent component, NestedContainer container, string name)
 {
     _component       = component;
     _nestedContainer = container;
     _siteName        = name;
 }
 internal Site(IComponent component, NestedContainer container, string name) {
     this.component = component;
     this.container = container;
     this.name = name;
 }
Exemple #7
0
 internal Site(IComponent component, NestedContainer container, string name)
 {
     _component = component;
     _container = container;
     _name = name;
 }
Exemple #8
0
			public Site (IComponent component, NestedContainer container, string name)
			{
				_component = component;
				_nestedContainer = container;
				_siteName = name;
			}