Exemplo n.º 1
0
        private TimedEntry <VersionedConfig> ReadData()
        {
            VersionedConfig vc;

            try
            {
                //as all infrastructure is sync
                var gitItem = _git.GetFile(_gitQuery).ConfigureAwait(false).GetAwaiter().GetResult();
                vc = new VersionedConfig(gitItem);
            }
            catch (Exception ex)
            {
                return(TimedEntry.Create(VersionConfig.Fail(ex), _invalidTtl));
            }
            return(TimedEntry.Create(vc, _ttl));
        }