GetDomain() public method

public GetDomain ( string url ) : string
url string
return string
Esempio n. 1
0
 public void ShouldExtractDomainNameTest(string url, string expected)
 {
     var logger = new FakeLogger();
     var extractor = new DomainNameExtractor(logger);
     string result = extractor.GetDomain(url);
     Assert.Equal(expected, result);
 }
Esempio n. 2
0
        public static string GetDomain()
        {
            if(FrapidHttpContext.GetCurrent() == null)
            {
                return string.Empty;
            }

            string url = FrapidHttpContext.GetCurrent().Request.Url.Authority;
            var extractor = new DomainNameExtractor(Log.Logger);
            return extractor.GetDomain(url);
        }
Esempio n. 3
0
 private static string GetDomainName(Uri url)
 {
     var extractor = new DomainNameExtractor(Log.Logger);
     return extractor.GetDomain(url.Authority);
 }