Пример #1
0
        private static VaultIndexFile FromFile(String fullPath)
        {
            VaultIndexFile vaultIndexFile = new VaultIndexFile();

            vaultIndexFile._fullPath = fullPath;
            if (System.IO.File.Exists(vaultIndexFile._fullPath))
            {
                String  vaultIndexData = System.IO.File.ReadAllText(fullPath);
                JObject vaultIndexJSON = JObject.Parse(vaultIndexData);
                JArray  vaults         = vaultIndexJSON["Vaults"].Value <JArray>();
                foreach (JObject curVaultIndex in vaults)
                {
                    VaultIndex curIndex = VaultIndex.FromJSON(curVaultIndex);
                    vaultIndexFile._vaults.Add(curIndex);
                }
            }
            return(vaultIndexFile);
        }
Пример #2
0
 public static void Invalidate()
 {
     _indexFile = null;
 }