private string CreateUriFormat(UriFormatAttribute uriFormatter)
        {
            string uriFormat = uriFormatter.UriFormat.RemovePreAndPostSlash().EscapeRegexChars();

            if (string.IsNullOrWhiteSpace(_urlPrefix))
            {
                return "/" + uriFormat;
            }

            _urlToMatch = $"{_urlPrefix}/{uriFormat}";

            return _urlToMatch;
        }
Exemplo n.º 2
0
        private string CreateUriFormat(UriFormatAttribute uriFormatter)
        {
            string uriFormat = uriFormatter.UriFormat.RemovePreAndPostSlash();

            if (string.IsNullOrWhiteSpace(_urlPrefix))
            {
                return "/" + uriFormat;
            }

            return $"{_urlPrefix}/{uriFormat}";
        }