C# Класс Apache.NMS.Util.URISupport

Class to provide support for Uri query parameters which uses .Net reflection to identify and set properties.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ParseComposite void
SplitComponents String[]

Открытые методы

Метод Описание
CheckParenthesis ( String str ) : bool
CreateCompatibleUri ( string uriString ) : Uri

Given a string that could be a Composite Uri that uses syntax not compatible with the .NET Uri class such as an ActiveMQ failover Uri formatted as "failover://(tcp://localhost:61616)", the initial '://' must be changed to ':(' so that the Uri class doesn't attempt to parse the '(tcp:' as the Uri's Authority as that is not a valid host name.

CreateQueryString ( StringDictionary options ) : String
CreateRemainingUri ( Uri originalUri, StringDictionary parameters ) : Uri
CreateUriWithQuery ( Uri uri, string query ) : Uri
ExtractProperties ( StringDictionary props, string prefix ) : StringDictionary
GetProperties ( StringDictionary props, string prefix ) : StringDictionary
ParseComposite ( Uri uri ) : CompositeData
ParseParameters ( Uri uri ) : StringDictionary
ParseQuery ( String query ) : StringDictionary

Parse a Uri query string of the form ?x=y&z=0 into a map of name/value pairs.

RemoveQuery ( Uri original ) : Uri
SetProperties ( object target, StringDictionary map ) : void

Sets the public properties of a target object using a string map. This method uses .Net reflection to identify public properties of the target object matching the keys from the passed map.

SetProperties ( object target, StringDictionary map, string prefix ) : void

Sets the public properties of a target object using a string map. This method uses .Net reflection to identify public properties of the target object matching the keys from the passed map.

StripPrefix ( String value, String prefix ) : String
UrlDecode ( String s ) : String
UrlEncode ( String s ) : String

Приватные методы

Метод Описание
ParseComposite ( Uri uri, CompositeData rc, String ssp ) : void

SplitComponents ( String componentString ) : String[]

Описание методов

CheckParenthesis() публичный статический Метод

public static CheckParenthesis ( String str ) : bool
str String
Результат bool

CreateCompatibleUri() публичный статический Метод

Given a string that could be a Composite Uri that uses syntax not compatible with the .NET Uri class such as an ActiveMQ failover Uri formatted as "failover://(tcp://localhost:61616)", the initial '://' must be changed to ':(' so that the Uri class doesn't attempt to parse the '(tcp:' as the Uri's Authority as that is not a valid host name.
public static CreateCompatibleUri ( string uriString ) : Uri
uriString string /// A string that could be a Composite Uri that uses syntax not compatible /// with the .NET Uri class ///
Результат System.Uri

CreateQueryString() публичный статический Метод

public static CreateQueryString ( StringDictionary options ) : String
options System.Collections.Specialized.StringDictionary
Результат String

CreateRemainingUri() публичный статический Метод

public static CreateRemainingUri ( Uri originalUri, StringDictionary parameters ) : Uri
originalUri System.Uri
parameters System.Collections.Specialized.StringDictionary
Результат System.Uri

CreateUriWithQuery() публичный статический Метод

public static CreateUriWithQuery ( Uri uri, string query ) : Uri
uri System.Uri
query string
Результат System.Uri

ExtractProperties() публичный статический Метод

public static ExtractProperties ( StringDictionary props, string prefix ) : StringDictionary
props System.Collections.Specialized.StringDictionary
prefix string
Результат System.Collections.Specialized.StringDictionary

GetProperties() публичный статический Метод

public static GetProperties ( StringDictionary props, string prefix ) : StringDictionary
props System.Collections.Specialized.StringDictionary
prefix string
Результат System.Collections.Specialized.StringDictionary

ParseComposite() публичный статический Метод

public static ParseComposite ( Uri uri ) : CompositeData
uri System.Uri
Результат CompositeData

ParseParameters() публичный статический Метод

public static ParseParameters ( Uri uri ) : StringDictionary
uri System.Uri
Результат System.Collections.Specialized.StringDictionary

ParseQuery() публичный статический Метод

Parse a Uri query string of the form ?x=y&z=0 into a map of name/value pairs.
public static ParseQuery ( String query ) : StringDictionary
query String The query string to parse. This string should not contain /// Uri escape characters.
Результат System.Collections.Specialized.StringDictionary

RemoveQuery() публичный статический Метод

public static RemoveQuery ( Uri original ) : Uri
original System.Uri
Результат System.Uri

SetProperties() публичный статический Метод

Sets the public properties of a target object using a string map. This method uses .Net reflection to identify public properties of the target object matching the keys from the passed map.
public static SetProperties ( object target, StringDictionary map ) : void
target object The object whose properties will be set.
map System.Collections.Specialized.StringDictionary Map of key/value pairs.
Результат void

SetProperties() публичный статический Метод

Sets the public properties of a target object using a string map. This method uses .Net reflection to identify public properties of the target object matching the keys from the passed map.
public static SetProperties ( object target, StringDictionary map, string prefix ) : void
target object The object whose properties will be set.
map System.Collections.Specialized.StringDictionary Map of key/value pairs.
prefix string Key value prefix. This is prepended to the property name /// before searching for a matching key value.
Результат void

StripPrefix() публичный статический Метод

public static StripPrefix ( String value, String prefix ) : String
value String
prefix String
Результат String

UrlDecode() публичный статический Метод

public static UrlDecode ( String s ) : String
s String
Результат String

UrlEncode() публичный статический Метод

public static UrlEncode ( String s ) : String
s String
Результат String