AcTools.DataAnalyzer.HashStorage.FromFile C# (CSharp) Метод

FromFile() публичный статический Метод

public static FromFile ( ) : HashStorage
Результат HashStorage
        public static HashStorage FromFile(params string[] filenames) {
            return new HashStorage(filenames);
        }

Usage Example

Пример #1
0
        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;
            }
        }