private static Settings GetMockSettingsWithAlreadyBuiltApps() { var settings = new MockSettings(); var storageData = new XmlData("BuiltApps"); storageData.AddAttribute("StoragePath", storageData.Name); settings.SetValue(storageData.Name, storageData); var appsStorage = new AppsStorage(settings); appsStorage.AddApp(new WindowsAppInfo("Rebuildable app", Guid.NewGuid(), DateTime.Now) { SolutionFilePath = "A.sln" }); appsStorage.AddApp(new WindowsAppInfo("Non-Rebuildable app ", Guid.NewGuid(), DateTime.Now)); return settings; }
private static Settings GetMockSettingsWithAlreadyBuiltApps() { var settings = new MockSettings(); var storageData = new XmlData("BuiltApps"); storageData.AddAttribute("StoragePath", storageData.Name); settings.SetValue(storageData.Name, storageData); var appsStorage = new AppsStorage(settings); appsStorage.AddApp(new WindowsAppInfo("Rebuildable app", Guid.NewGuid(), DateTime.Now) { SolutionFilePath = "A.sln" }); appsStorage.AddApp(new WindowsAppInfo("Non-Rebuildable app ", Guid.NewGuid(), DateTime.Now)); return(settings); }
public void AddApp(AppInfo appInfo, byte[] appData = null) { if (appInfo == null) { throw new NoAppInfoSpecified(); } appsStorage.AddApp(appInfo); RaisePropertyChangedOfBuiltApps(); if (appData != null) { SaveBuiltApp(appInfo, appData); } }