Exemplo n.º 1
0
        /// <inheritdoc/>
        public IEnumerable <FeedUri> ListAll()
        {
            if (!Directory.Exists(DirectoryPath))
            {
                return(Enumerable.Empty <FeedUri>());
            }

            // ReSharper disable once AssignNullToNotNullAttribute
            return(Directory.GetFiles(DirectoryPath)
                   .TrySelect <string, FeedUri, UriFormatException>(x => FeedUri.Unescape(Path.GetFileName(x))));
        }
Exemplo n.º 2
0
 public void Unescape()
 => FeedUri.Unescape("http%3a%2f%2fexample.com%2Ftest1.xml").Should().Be(FeedTest.Test1Uri);