public RulesWrapper(string acRoot, string rules, string storageLocation, string[] donorIds) { _acRoot = acRoot; _rules = TagFile.FromData(rules).Select(RulesEntry.Create).ToArray(); _rulesKeys = _rules.Select(x => x.Id).ToArray(); _storageLocation = storageLocation; _donorIds = donorIds; _paramsHashCode = acRoot.GetHashCode() ^ _rules.GetEnumerableHashCode() ^ donorIds.GetEnumerableHashCode(); try { _hashStorage = File.Exists(storageLocation) ? HashStorage.FromFile(_rulesKeys, storageLocation) : new HashStorage(_rulesKeys); } catch (HashStorageObsoleteException) { _hashStorage = null; } catch (Exception e) { AcToolsLogging.Write(e); _hashStorage = null; } }