public BoolWithMessage ExportCatalog(string savePath) { try { UpdateAsset(SelectedAsset); // ensure the currently selected asset is updated before writing to file AssetCatalog catalog = new AssetCatalog() { Name = CatalogName, Assets = AssetList.Select(a => a.Asset).ToList() }; string fileContents = JsonConvert.SerializeObject(catalog, Formatting.Indented); File.WriteAllText(savePath, fileContents); return(BoolWithMessage.True()); } catch (Exception e) { return(BoolWithMessage.False($"Failed to export catalog: {e.Message}")); } }