Пример #1
0
        public List <string> Parents(string hash, int precision = 1)
        {
            var result = new List <string>();

            while (hash.Length > precision)
            {
                hash = hasher.GetParent(hash);
                result.Add(hash);
            }

            return(result);
        }
Пример #2
0
        public void Should_Give_Parent()
        {
            var hasher = new Geohasher();

            Assert.Equal("u33db", hasher.GetParent("u33dbc"));
        }