C# Class PayPal.Util.SDKUtil

显示文件 Open project: paypal/PayPal-NET-SDK Class Usage Examples

Public Methods

Method Description
EscapeInvalidXmlCharsRegex ( bool boolContent ) : string

Escapes invalid XML characters using & escapes

EscapeInvalidXmlCharsRegex ( double doubleContent ) : string

Escapes invalid XML characters using & escapes

EscapeInvalidXmlCharsRegex ( float floatContent ) : string

Escapes invalid XML characters using & escapes

EscapeInvalidXmlCharsRegex ( int intContent ) : string

Escapes invalid XML characters using & escapes

EscapeInvalidXmlCharsRegex ( string textContent ) : string

Escapes invalid XML characters using & escapes

FormatURIPath ( string pattern, string>.Dictionary pathParameters ) : string

Formats the URI path for REST calls. Replaces any occurrences of the form {name} in pattern with the corresponding value of key name in the passed Dictionary

FormatURIPath ( string pattern, string>.Dictionary pathParameters, string>.Dictionary queryParameters ) : string

Formats the URI path for REST calls. Replaces any occurrences of the form {name} in pattern with the corresponding value of key name in the passed Dictionary. Query parameters are appended to the end of the URI path

FormatURIPath ( string pattern, Object parameters ) : string

Formats the URI path for REST calls.

GetAssemblyVersionForType ( Type type ) : string

Gets the version number of the parent assembly for the specified object type.

IsNet45OrLaterDetected ( ) : bool

Checks if .NET 4.5 or later is detected on the system.

Private Methods

Method Description
GetHighestInstalledNetVersion ( ) : System.Version

Gets the highest installed version of the .NET framework found on the system.

GetTokenFromApprovalUrl ( List links ) : string
RemoveNullsFromQueryString ( string formatString ) : string

Removes null entries from a given query string.

SplitParameters ( string pattern, string>.Dictionary parameters ) : Object[]

Split the URI and form a Object array using the query string and values in the provided map. The return object array is populated only if the map contains valid value for the query name. The object array contains null values if there is no value found in the map

Method Details

EscapeInvalidXmlCharsRegex() public static method

Escapes invalid XML characters using & escapes
public static EscapeInvalidXmlCharsRegex ( bool boolContent ) : string
boolContent bool Boolean content to escape
return string

EscapeInvalidXmlCharsRegex() public static method

Escapes invalid XML characters using & escapes
public static EscapeInvalidXmlCharsRegex ( double doubleContent ) : string
doubleContent double Double content to escape
return string

EscapeInvalidXmlCharsRegex() public static method

Escapes invalid XML characters using & escapes
public static EscapeInvalidXmlCharsRegex ( float floatContent ) : string
floatContent float Float content to escape
return string

EscapeInvalidXmlCharsRegex() public static method

Escapes invalid XML characters using & escapes
public static EscapeInvalidXmlCharsRegex ( int intContent ) : string
intContent int Integer content to escape
return string

EscapeInvalidXmlCharsRegex() public static method

Escapes invalid XML characters using & escapes
public static EscapeInvalidXmlCharsRegex ( string textContent ) : string
textContent string Text content to escape
return string

FormatURIPath() public static method

Formats the URI path for REST calls. Replaces any occurrences of the form {name} in pattern with the corresponding value of key name in the passed Dictionary
public static FormatURIPath ( string pattern, string>.Dictionary pathParameters ) : string
pattern string URI pattern with named place holders
pathParameters string>.Dictionary Dictionary
return string

FormatURIPath() public static method

Formats the URI path for REST calls. Replaces any occurrences of the form {name} in pattern with the corresponding value of key name in the passed Dictionary. Query parameters are appended to the end of the URI path
public static FormatURIPath ( string pattern, string>.Dictionary pathParameters, string>.Dictionary queryParameters ) : string
pattern string URI pattern with named place holders
pathParameters string>.Dictionary Dictionary of Path parameters
queryParameters string>.Dictionary Dictionary for Query parameters
return string

FormatURIPath() public static method

Formats the URI path for REST calls.
public static FormatURIPath ( string pattern, Object parameters ) : string
pattern string URI path with placeholders that can be replaced with string's Format method
parameters Object Parameters holding actual values for placeholders; They can be wrapper objects for specific query strings like QueryParameters, CreateFromAuthorizationCodeParameters, CreateFromRefreshTokenParameters, UserinfoParameters parameters or a simple Dictionary
return string

GetAssemblyVersionForType() public static method

Gets the version number of the parent assembly for the specified object type.
public static GetAssemblyVersionForType ( Type type ) : string
type System.Type The object type to use in determining which assembly version should be returned.
return string

IsNet45OrLaterDetected() public static method

Checks if .NET 4.5 or later is detected on the system.
public static IsNet45OrLaterDetected ( ) : bool
return bool