GetEntries() public abstract method

public abstract GetEntries ( ulong hash ) : IEnumerable
hash ulong
return IEnumerable
Ejemplo n.º 1
0
        public bool GetEncodingEntry(ulong hash, out EncodingEntry enc)
        {
            var rootInfos = RootHandler.GetEntries(hash);

            if (rootInfos.Any())
            {
                return(EncodingHandler.GetEntry(rootInfos.First().MD5, out enc));
            }

            if ((CASCConfig.LoadFlags & LoadFlags.Install) != 0)
            {
                var installInfos = Install.GetEntries().Where(e => Hasher.ComputeHash(e.Name) == hash && e.Tags.Any(t => t.Type == 1 && t.Name == RootHandler.Locale.ToString()));
                if (installInfos.Any())
                {
                    return(EncodingHandler.GetEntry(installInfos.First().MD5, out enc));
                }

                installInfos = Install.GetEntries().Where(e => Hasher.ComputeHash(e.Name) == hash);
                if (installInfos.Any())
                {
                    return(EncodingHandler.GetEntry(installInfos.First().MD5, out enc));
                }
            }

            enc = default(EncodingEntry);
            return(false);
        }
Ejemplo n.º 2
0
        public EncodingEntry GetEncodingEntry(ulong hash)
        {
            var rootInfos = RootHandler.GetEntries(hash);

            if (rootInfos.Any())
            {
                return(EncodingHandler.GetEntry(rootInfos.First().MD5));
            }

            if ((CASCConfig.LoadFlags & LoadFlags.Install) != 0)
            {
                var installInfos = Install.GetEntries().Where(e => Hasher.ComputeHash(e.Name) == hash);
                if (installInfos.Any())
                {
                    return(EncodingHandler.GetEntry(installInfos.First().MD5));
                }
            }

            return(null);
        }