annotate Implab/Components/App.cs @ 223:27ea7f07e2e4 default

Слияние
author cin
date Tue, 22 Aug 2017 09:35:54 +0300
parents b933ec88446e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
1 using System;
240aa6994018 component model refactoring
cin
parents:
diff changeset
2 using System.Collections.Generic;
240aa6994018 component model refactoring
cin
parents:
diff changeset
3
240aa6994018 component model refactoring
cin
parents:
diff changeset
4 namespace Implab.Components {
240aa6994018 component model refactoring
cin
parents:
diff changeset
5 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
6 /// Global application components and services.
240aa6994018 component model refactoring
cin
parents:
diff changeset
7 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
8 public static class App {
240aa6994018 component model refactoring
cin
parents:
diff changeset
9 readonly static ComponentContainer<object> _root = new ComponentContainer<object>();
240aa6994018 component model refactoring
cin
parents:
diff changeset
10
153
cin
parents: 152
diff changeset
11 /// <summary>
cin
parents: 152
diff changeset
12 /// The container for application level components.
cin
parents: 152
diff changeset
13 /// </summary>
cin
parents: 152
diff changeset
14 /// <remarks>Pools of disposable objects can be placed here and they will be automatically
cin
parents: 152
diff changeset
15 /// disposed when application domain is unloaded.</remarks>
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
16 public static ICollection<object> RootContainer {
240aa6994018 component model refactoring
cin
parents:
diff changeset
17 get { return _root; }
240aa6994018 component model refactoring
cin
parents:
diff changeset
18 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
19
240aa6994018 component model refactoring
cin
parents:
diff changeset
20 static App() {
153
cin
parents: 152
diff changeset
21 AppDomain.CurrentDomain.DomainUnload += (sender, e) => _root.Dispose();
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
22 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
23 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
24 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
25