Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            IGeoCellEquatible tge = obj as IGeoCellEquatible;

            if (tge != null)
            {
                return(tge.Equals(this));
            }
            else
            {
                return(base.Equals(obj));
            }
        }
Ejemplo n.º 2
0
        public async Task <T> GetAsync(ICellRequest nodes)
        {
            IGeoCellEquatible ine = nodes as IGeoCellEquatible;

            if (ine == null)
            {
                ine = converter.Covert(nodes);
            }

            var lazyResult = cache.GetOrAdd(ine, new AsyncLazy <T>(async() =>
            {
                T newResult = await component.GetAsync(nodes);
                return(newResult);
            }));

            var result = await lazyResult.GetValueAsync();

            return(result);
        }