コード例 #1
0
        private void Populate(StreamReader reader)
        {
            while (!reader.EndOfStream)
            {
                var line = reader.ReadLine();
                var hash = (int)Utils.GetJoaat(line.ToLower());

                if (hash != 0 && !IsKnownHash(hash))
                {
                    hashes.Add(hash, line.ToUpper());
                }
            }
        }
コード例 #2
0
        private void Populate(StreamReader reader)
        {
            while (!reader.EndOfStream)
            {
                string line = reader.ReadLine();
                if (line.Contains(" // "))
                {
                    string[] split = line.Split(new string[] { " // " }, StringSplitOptions.RemoveEmptyEntries);
                    if (split.Length != 2)
                    {
                        continue;
                    }

                    int hash = split[0].StartsWith("0x") ? Convert.ToInt32(split[0], 16) : (int)Utils.GetJoaat(split[0]);
                    if (hash != 0 && !entries.ContainsKey(hash))
                    {
                        entries.Add(hash, ToLiteral(split[1]));
                    }
                }
            }
        }