Example #1
0
        public async Task <string> GetUrlAsync(Guid id, Uri current, UrlProviderMode mode)
        {
            if (!current.IsAbsoluteUri)
            {
                throw new ArgumentException("Current url must be absolute.", "current");
            }

            // will not use cache if previewing
            var route = await _contentCache.GetRouteByIdAsync(false, id);

            if (route == null)
            {
                return(null);
            }

            return(route);
        }