C# 클래스 OpenStack.Net.UriUtility

Provides static utility methods for encoding and decoding text within RFC 3986 URIs.
파일 보기 프로젝트 열기: crowdy/OpenStack-ConoHa

공개 메소드들

메소드 설명
AddQueryParameter ( Uri uri, string parameter, string value ) : Uri

Add a query parameter with the specified name and value to a URI.

This method always adds a new query parameter to the end of the query string, even if the URI already contains one or more query parameters with the specified parameter name.

If necessary, characters in the parameter name are percent-encoded to conform to the requirements of a varname defined by RFC 6570.

RemoveQueryParameter ( Uri uri, string parameter ) : Uri

Remove all query parameters matching a particular parameter name from a URI.

This method handles percent-encoded octets as UTF-8 encoded characters in both the parameter argument and the query string.

SetQueryParameter ( Uri uri, string parameter, string value ) : Uri

Sets a URI query parameter to a specific value, adding or replacing the existing value as appropriate.

This method is a convenience method for calling RemoveQueryParameter followed by AddQueryParameter.

UriDecode ( string text ) : string

Decodes the text of a URI by unescaping any percent-encoded character sequences and then evaluating the result using the default Encoding.UTF8 encoding.

This method calls UriDecode(string, Encoding) using the default Encoding.UTF8 encoding.

UriDecode ( string text, System.Text.Encoding encoding ) : string

Decodes the text of a URI by unescaping any percent-encoded character sequences and then evaluating the result using the specified encoding.

UriEncode ( string text, UriPart uriPart ) : string

Encodes text for inclusion in a URI using the Encoding.UTF8 encoding.

This method calls UriEncode(string, UriPart, Encoding) using the default Encoding.UTF8 encoding.

UriEncode ( string text, UriPart uriPart, System.Text.Encoding encoding ) : string

Encodes text for inclusion in a URI.

비공개 메소드들

메소드 설명
UriEncodeAny ( string text, System.Text.Encoding encoding ) : string
UriEncodeAnyUrl ( string text, System.Text.Encoding encoding ) : string
UriEncodeFragment ( string text, System.Text.Encoding encoding ) : string
UriEncodeHost ( string text, System.Text.Encoding encoding ) : string
UriEncodePath ( string text, System.Text.Encoding encoding ) : string
UriEncodePathSegment ( string text, System.Text.Encoding encoding ) : string
UriEncodeQuery ( string text, System.Text.Encoding encoding ) : string
UriEncodeQueryValue ( string text, System.Text.Encoding encoding ) : string
UriUtility ( ) : System

메소드 상세

AddQueryParameter() 공개 정적인 메소드

Add a query parameter with the specified name and value to a URI.

This method always adds a new query parameter to the end of the query string, even if the URI already contains one or more query parameters with the specified parameter name.

If necessary, characters in the parameter name are percent-encoded to conform to the requirements of a varname defined by RFC 6570.

/// If is . /// -or- /// If is . /// -or- /// If is . /// If is empty.
public static AddQueryParameter ( Uri uri, string parameter, string value ) : Uri
uri System.Uri The URI to add a query parameter to.
parameter string The name of the query parameter to add.
value string The value of the query parameter.
리턴 System.Uri

RemoveQueryParameter() 공개 정적인 메소드

Remove all query parameters matching a particular parameter name from a URI.

This method handles percent-encoded octets as UTF-8 encoded characters in both the parameter argument and the query string.

/// If is . /// -or- /// If is . /// If is empty.
public static RemoveQueryParameter ( Uri uri, string parameter ) : Uri
uri System.Uri The URI.
parameter string The name of the parameter to remove.
리턴 System.Uri

SetQueryParameter() 공개 정적인 메소드

Sets a URI query parameter to a specific value, adding or replacing the existing value as appropriate.

This method is a convenience method for calling RemoveQueryParameter followed by AddQueryParameter.

/// If is . /// -or- /// If is . /// -or- /// If is . /// If is empty.
public static SetQueryParameter ( Uri uri, string parameter, string value ) : Uri
uri System.Uri The URI to add a query parameter to.
parameter string The name of the query parameter to add or update.
value string The value of the query parameter.
리턴 System.Uri

UriDecode() 공개 정적인 메소드

Decodes the text of a URI by unescaping any percent-encoded character sequences and then evaluating the result using the default Encoding.UTF8 encoding.

This method calls UriDecode(string, Encoding) using the default Encoding.UTF8 encoding.

If is .
public static UriDecode ( string text ) : string
text string The encoded URI.
리턴 string

UriDecode() 공개 정적인 메소드

Decodes the text of a URI by unescaping any percent-encoded character sequences and then evaluating the result using the specified encoding.
If is .
public static UriDecode ( string text, System.Text.Encoding encoding ) : string
text string The encoded URI.
encoding System.Text.Encoding The encoding to use for Unicode characters in the URI. If this value is , the encoding will be used.
리턴 string

UriEncode() 공개 정적인 메소드

Encodes text for inclusion in a URI using the Encoding.UTF8 encoding.

This method calls UriEncode(string, UriPart, Encoding) using the default Encoding.UTF8 encoding.

If is . If is not a valid .
public static UriEncode ( string text, UriPart uriPart ) : string
text string The text to encode for inclusion in a URI.
uriPart UriPart A value indicating where in the URI the specified text will be included.
리턴 string

UriEncode() 공개 정적인 메소드

Encodes text for inclusion in a URI.
If is . If is not a valid .
public static UriEncode ( string text, UriPart uriPart, System.Text.Encoding encoding ) : string
text string The text to encode for inclusion in a URI.
uriPart UriPart A value indicating where in the URI the specified text will be included.
encoding System.Text.Encoding The encoding to use for Unicode characters in the URI. If this value is , the encoding will be used.
리턴 string