diff Implab/Components/App.cs @ 152:240aa6994018 v2

component model refactoring
author cin
date Thu, 11 Feb 2016 01:56:27 +0300
parents
children b933ec88446e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Implab/Components/App.cs	Thu Feb 11 01:56:27 2016 +0300
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+
+namespace Implab.Components {
+    /// <summary>
+    /// Global application components and services.
+    /// </summary>
+    public static class App {
+        readonly static ComponentContainer<object> _root = new ComponentContainer<object>();
+
+        public static ICollection<object> RootContainer {
+            get { return _root; }
+        }
+
+        static App() {
+            AppDomain.CurrentDomain.ProcessExit += (sender, e) => _root.Dispose();
+        }
+    }
+}
+