UriBuilder 생성자

정의

UriBuilder 클래스의 새 인스턴스를 초기화합니다.

오버로드

UriBuilder()

UriBuilder 클래스의 새 인스턴스를 초기화합니다.

UriBuilder(String)

URI가 지정된 UriBuilder 클래스의 새 인스턴스를 초기화합니다.

UriBuilder(Uri)

지정된 UriBuilder 인스턴스를 사용하여 Uri 클래스의 새 인스턴스를 초기화합니다.

UriBuilder(String, String)

지정된 체계 및 호스트를 사용하여 UriBuilder 클래스의 새 인스턴스를 초기화합니다.

UriBuilder(String, String, Int32)

지정된 체계, 호스트 및 포트를 사용하여 UriBuilder 클래스의 새 인스턴스를 초기화합니다.

UriBuilder(String, String, Int32, String)

지정된 체계, 호스트, 포트 번호 및 경로를 사용하여 UriBuilder 클래스의 새 인스턴스를 초기화합니다.

UriBuilder(String, String, Int32, String, String)

지정된 체계, 호스트, 포트 번호, 경로 및 쿼리 문자열 또는 조각 식별자를 사용하여 클래스의 UriBuilder 새 instance 초기화합니다.

UriBuilder()

Source:
UriBuilder.cs
Source:
UriBuilder.cs
Source:
UriBuilder.cs

UriBuilder 클래스의 새 인스턴스를 초기화합니다.

public:
 UriBuilder();
public UriBuilder ();
Public Sub New ()

설명

매개 변수가 없는 생성자는 다음과 같이 속성이 초기화된 클래스의 UriBuilder 새 instance 만듭니다.

속성 초기 값
Fragment Empty
호스트 "loopback"
암호 Empty
경로 "/"
포트 -1
쿼리 Empty
구성표 "http"
UserName Empty

적용 대상

UriBuilder(String)

Source:
UriBuilder.cs
Source:
UriBuilder.cs
Source:
UriBuilder.cs

URI가 지정된 UriBuilder 클래스의 새 인스턴스를 초기화합니다.

public:
 UriBuilder(System::String ^ uri);
public UriBuilder (string uri);
new UriBuilder : string -> UriBuilder
Public Sub New (uri As String)

매개 변수

uri
String

URI 문자열입니다.

예외

uri이(가) null인 경우

uri는 길이가 0인 문자열이거나 공백만 포함합니다.

또는

구문 분석 루틴이 잘못된 형식의 체계를 발견한 경우

또는

파서가 "file" 체계를 사용하지 않는 URI에서 두 개 이상의 연속 슬래시를 발견한 경우

또는

uri 경로는 유효한 URI가 아닙니다.

참고: Windows 스토어 앱 또는 이식 가능한 클래스 라이브러리용 .NET에서 기본 클래스 예외 를 FormatException대신 catch합니다.

설명

이 생성자의 새 인스턴스를 초기화 합니다 UriBuilder 클래스를 Fragment, Host, Path, Port, Query, Scheme, 및 Uri 에지정된설정속성uri.

경우 uri 체계는 기본적으로는 체계를 지정 하지 않습니다 "http:".

적용 대상

UriBuilder(Uri)

Source:
UriBuilder.cs
Source:
UriBuilder.cs
Source:
UriBuilder.cs

지정된 UriBuilder 인스턴스를 사용하여 Uri 클래스의 새 인스턴스를 초기화합니다.

public:
 UriBuilder(Uri ^ uri);
public UriBuilder (Uri uri);
new UriBuilder : Uri -> UriBuilder
Public Sub New (uri As Uri)

매개 변수

uri
Uri

Uri 클래스의 인스턴스입니다.

예외

urinull입니다.

설명

이 생성자의 새 인스턴스를 초기화 합니다 UriBuilder 클래스를 Fragment, Host, Path, Port, Query, Scheme, 및 Uri 에지정된설정속성uri.

적용 대상

UriBuilder(String, String)

Source:
UriBuilder.cs
Source:
UriBuilder.cs
Source:
UriBuilder.cs

지정된 체계 및 호스트를 사용하여 UriBuilder 클래스의 새 인스턴스를 초기화합니다.

public:
 UriBuilder(System::String ^ schemeName, System::String ^ hostName);
public UriBuilder (string schemeName, string hostName);
public UriBuilder (string? schemeName, string? hostName);
new UriBuilder : string * string -> UriBuilder
Public Sub New (schemeName As String, hostName As String)

매개 변수

schemeName
String

인터넷 액세스 프로토콜입니다.

hostName
String

DNS 스타일의 도메인 이름 또는 IP 주소입니다.

예제

다음 예제는 UriBuilder URI를 포함 하는 인스턴스 http://www.contoso.com/합니다.

UriBuilder^ myUri = gcnew UriBuilder(  "http", "www.contoso.com" );
UriBuilder myUri = new UriBuilder("http","www.contoso.com");
let myUri = UriBuilder "http","www.contoso.com"
Dim myUri As New UriBuilder("http", "www.contoso.com")

설명

UriBuilder 인스턴스를 초기화할를 Scheme 속성이로 설정 schemeName 하며 Host 속성이로 설정 hostName합니다. Port 구성표를 사용할지에 대 한 기본 포트를 나타낼 때-1 값으로 초기화 됩니다 및 Path 속성이 슬래쉬 문자 (/)로 설정 되어 있습니다.

적용 대상

UriBuilder(String, String, Int32)

Source:
UriBuilder.cs
Source:
UriBuilder.cs
Source:
UriBuilder.cs

지정된 체계, 호스트 및 포트를 사용하여 UriBuilder 클래스의 새 인스턴스를 초기화합니다.

public:
 UriBuilder(System::String ^ scheme, System::String ^ host, int portNumber);
public UriBuilder (string scheme, string host, int portNumber);
public UriBuilder (string? scheme, string? host, int portNumber);
new UriBuilder : string * string * int -> UriBuilder
Public Sub New (scheme As String, host As String, portNumber As Integer)

매개 변수

scheme
String

인터넷 액세스 프로토콜입니다.

host
String

DNS 스타일의 도메인 이름 또는 IP 주소입니다.

portNumber
Int32

서비스의 IP 포트 번호입니다.

예외

portNumber가 -1보다 작거나 65,535보다 큽니다.

예제

다음 예제는 UriBuilder URI를 포함 하는 인스턴스 http://www.contoso.com:8080/합니다.

UriBuilder^ myUri = gcnew UriBuilder( "http", "www.contoso.com",8080 );
UriBuilder myUri = new UriBuilder("http","www.contoso.com",8080);
let myUri = UriBuilder("http","www.contoso.com", 8080)
Dim myUri As New UriBuilder("http", "www.contoso.com", 8080)

설명

UriBuilder 인스턴스를 초기화할 합니다 Scheme 속성이로 설정 schemeNameHost 속성이로 설정 hostName, 및 Port 속성이로 설정 portNumber합니다. Path 속성이 슬래쉬 문자 (/)로 설정 되어 있습니다.

portNumber -1 값으로 설정된 경우 이는 스키마의 기본 포트 값이 호스트에 연결하는 데 사용됨을 나타냅니다.

적용 대상

UriBuilder(String, String, Int32, String)

Source:
UriBuilder.cs
Source:
UriBuilder.cs
Source:
UriBuilder.cs

지정된 체계, 호스트, 포트 번호 및 경로를 사용하여 UriBuilder 클래스의 새 인스턴스를 초기화합니다.

public:
 UriBuilder(System::String ^ scheme, System::String ^ host, int port, System::String ^ pathValue);
public UriBuilder (string scheme, string host, int port, string pathValue);
public UriBuilder (string? scheme, string? host, int port, string? pathValue);
new UriBuilder : string * string * int * string -> UriBuilder
Public Sub New (scheme As String, host As String, port As Integer, pathValue As String)

매개 변수

scheme
String

인터넷 액세스 프로토콜입니다.

host
String

DNS 스타일의 도메인 이름 또는 IP 주소입니다.

port
Int32

서비스의 IP 포트 번호입니다.

pathValue
String

인터넷 리소스의 경로입니다.

예외

port가 -1보다 작거나 65,535보다 큽니다.

예제

다음 예제는 UriBuilder URI를 포함 하는 인스턴스 http://www.contoso.com:8080/index.htm합니다.

UriBuilder^ myUri = gcnew UriBuilder( "http","www.contoso.com",8080,"index.htm" );
UriBuilder myUri = new UriBuilder("http","www.contoso.com",8080,"index.htm");
let myUri = UriBuilder("http","www.contoso.com", 8080, "index.htm")
Dim myUri As New UriBuilder("http", "www.contoso.com", 8080, "index.htm")

설명

UriBuilder instance 속성이 로 Scheme 설정schemeName되고, 속성이 HosthostName설정되고, 속성이 PortportNumber설정되고, 속성이 Path 로 설정되어 pathValue초기화됩니다.

portNumber -1 값으로 설정된 경우 이는 스키마의 기본 포트 값이 호스트에 연결하는 데 사용됨을 나타냅니다.

적용 대상

UriBuilder(String, String, Int32, String, String)

Source:
UriBuilder.cs
Source:
UriBuilder.cs
Source:
UriBuilder.cs

지정된 체계, 호스트, 포트 번호, 경로 및 쿼리 문자열 또는 조각 식별자를 사용하여 클래스의 UriBuilder 새 instance 초기화합니다.

public:
 UriBuilder(System::String ^ scheme, System::String ^ host, int port, System::String ^ path, System::String ^ extraValue);
public UriBuilder (string scheme, string host, int port, string path, string extraValue);
public UriBuilder (string? scheme, string? host, int port, string? path, string? extraValue);
new UriBuilder : string * string * int * string * string -> UriBuilder
Public Sub New (scheme As String, host As String, port As Integer, path As String, extraValue As String)

매개 변수

scheme
String

인터넷 액세스 프로토콜입니다.

host
String

DNS 스타일의 도메인 이름 또는 IP 주소입니다.

port
Int32

서비스의 IP 포트 번호입니다.

path
String

인터넷 리소스의 경로입니다.

extraValue
String

쿼리 문자열 또는 단편 식별자입니다.

예외

extraValuenull, Empty, 번호 기호(#)로 시작하는 유효한 단편 식별자 또는 물음표(?)로 시작하는 유효한 쿼리 문자열이 아닌 경우

port가 -1보다 작거나 65,535보다 큽니다.

예제

다음 예제는 UriBuilder URI를 포함 하는 인스턴스 http://www.contoso.com:8080/index.htm#top합니다.

UriBuilder^ myUri = gcnew UriBuilder( "http","www.contoso.com",8080,"index.htm","#top" );
UriBuilder myUri = new UriBuilder("http","www.contoso.com",8080,"index.htm","#top");
let myUri = UriBuilder("http","www.contoso.com", 8080, "index.htm", "#top")
Dim myUri As New UriBuilder("http", "www.contoso.com", 8080, "index.htm", "#top")

설명

UriBuilder instance 속성이 로 Scheme 설정schemeName되고, 속성이 HosthostName설정되고, 속성이 PortportNumber설정되고, 속성이 Path 로 설정되어 pathValue초기화됩니다. 하는 경우 extraValue 숫자 기호를 사용 하 여 시작 (#), 한 다음 Fragment 로 설정 된 extraValue합니다. 경우 extraValue 한 다음 물음표 (?)를 사용 하 여 시작 Query 로 설정 된 extraValue합니다.

portNumber -1 값으로 설정된 경우 이는 스키마의 기본 포트 값이 호스트에 연결하는 데 사용됨을 나타냅니다.

적용 대상