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