static void Main(string[] args) { IDatabase db = null; if (false && File.Exists(persistedDbPath)) { db = MemoryDatabase.OpenDatabase(persistedDbPath); } else { db = MemoryDatabase.CreateNewDatabase("root"); } DatabaseManager manager = new DatabaseManager(); manager.Mount("/", db); manager.Mount("/Volumes/Host", new HostDatabase(".", new KeyValuePair <string, ILoadableFactory>("appxml", new XmlLoadableFactory()), new KeyValuePair <string, ILoadableFactory>("libxml", new XmlLoadableFactory()), new KeyValuePair <string, ILoadableFactory>("xml", new XmlLoadableFactory()), new KeyValuePair <string, ILoadableFactory>("ipkg", new XmlLoadableFactory()) )); KernelStartup.Execute(manager, args); // persist the database MemoryDatabase.PersistToStream(persistedDbPath, db as MemoryDatabase); Environment.Exit(0); }