public void SetupKeynoteDatabaseBrowserData(ExternalResourceBrowserData browserData) { try { string folderPath = browserData.FolderPath; string versionFolder = "RVT" + versionNumber; if (folderPath == "/") { browserData.AddSubFolder("RVT2014"); browserData.AddSubFolder("RVT2015"); browserData.AddSubFolder("RVT2016"); } else if (folderPath.EndsWith("/" + versionFolder)) { Dictionary <string, string> referenceMap = new Dictionary <string, string>(); referenceMap.Add("VersionNumber", versionNumber); referenceMap.Add("ProjectName", "Test"); browserData.AddResource("Test Keynote.txt", KeynoteDatabase.GetCurrentVersion(), referenceMap); Dictionary <string, string> referenceMap2 = new Dictionary <string, string>(); referenceMap2.Add("VersionNumber", versionNumber); referenceMap2.Add("ProjectName", "LocalDB"); browserData.AddResource("KeynoteDB_local.txt", KeynoteDatabase.GetCurrentVersion(), referenceMap2); Dictionary <string, string> referenceMap3 = new Dictionary <string, string>(); referenceMap3.Add("VersionNumber", versionNumber); referenceMap3.Add("ProjectName", "CloudDB"); browserData.AddResource("KeynoteDB_cloud.txt", KeynoteDatabase.GetCurrentVersion(), referenceMap3); } } catch (Exception ex) { string message = ex.Message; } }
private string GetCurrentAvailableResourceVersion(ExternalResourceReference extResRef) { string databaseVersion = ""; try { IDictionary <string, string> refMap = extResRef.GetReferenceInformation(); if (refMap.ContainsKey("VersionNumber")) { return(KeynoteDatabase.GetCurrentVersion()); } } catch (Exception ex) { string message = ex.Message; } return(databaseVersion); }