public static SystemContext PackageSystemContext(string targetFilePath) { SystemContext context = new SystemContext(); // Add the system data files. string systemConfigFilePath = _PrepSystemConfig(); context.AddFile(new NewContextFile(systemConfigFilePath, Path.GetFileName(VixenSystem.SystemConfig.LoadedFilePath))); string moduleStoreFilePath = _PrepModuleStore(); context.AddFile(new NewContextFile(moduleStoreFilePath, Path.GetFileName(VixenSystem.ModuleStore.LoadedFilePath))); // Add all binaries under the "Modules" directory. foreach (string moduleFilePath in Directory.GetFiles(Modules.Directory, "*.*", SearchOption.AllDirectories)) { context.AddFile(moduleFilePath); } return context; }
public static SystemContext PackageSystemContext(string targetFilePath) { SystemContext context = new SystemContext(); // Add the system data files. string systemConfigFilePath = _PrepSystemConfig(); context.AddFile(new NewContextFile(systemConfigFilePath, Path.GetFileName(VixenSystem.SystemConfig.LoadedFilePath))); string moduleStoreFilePath = _PrepModuleStore(); context.AddFile(new NewContextFile(moduleStoreFilePath, Path.GetFileName(VixenSystem.ModuleStore.LoadedFilePath))); // Add all binaries under the "Modules" directory. foreach (string moduleFilePath in Directory.GetFiles(Modules.Directory, "*.*", SearchOption.AllDirectories)) { context.AddFile(moduleFilePath); } return(context); }
public XmlSystemContextFilePolicy(SystemContext context, XElement content) { _context = context; _content = content; }
public void SaveSystemContextFile(SystemContext systemContext, string filePath) { IObjectPersistor<SystemContext> persistor = PersistorFactory.Instance.CreateSystemContextPersistor(); persistor.SaveToFile(systemContext, filePath); }