System.PrivateUri.Tests.TestUriParser.GetComponents C# (CSharp) Method

GetComponents() public method

public GetComponents ( Uri uri, UriComponents components, UriFormat format ) : string
uri Uri
components UriComponents
format UriFormat
return string
        public new string GetComponents(Uri uri, UriComponents components, UriFormat format) => base.GetComponents(uri, components, format);
        public new void InitializeAndValidate(Uri uri, out UriFormatException parsingError) => base.InitializeAndValidate(uri, out parsingError);

Usage Example

Example #1
0
        public static void GetComponents_BadUriFormat()
        {
            Uri           http   = new Uri(FullHttpUri);
            TestUriParser parser = new TestUriParser();

            Assert.Throws <ArgumentOutOfRangeException>(() => parser.GetComponents(http, UriComponents.Host, (UriFormat)int.MinValue));
        }
All Usage Examples Of System.PrivateUri.Tests.TestUriParser::GetComponents