Click or drag to resize

SecurityKey(SecureString) Constructor

Constructs a SecurityKey object using the string security key held by the SecureString passed in, or throws a FormatException if the string is clearly invalid.

Namespace: DegreeDays.Api
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public SecurityKey(
	SecureString stringSecurityKey
)

Parameters

stringSecurityKey  SecureString
A SecureString object holding a Degree Days.net API security key.
Exceptions
ExceptionCondition
ArgumentNullExceptionstringSecurityKey is null.
FormatExceptionstringSecurityKey cannot reasonably be parsed as a Degree Days.net API security key (see these remarks for a description of the correct format).
Remarks

This constructor is somewhat tolerant of imperfect user input. It will try to intelligently handle upper-case letters, white space, and missing or non-hyphen block separators. If you're storing or displaying a string key that a user has entered, make sure to use the string returned by ToStringKey, as that will be the corrected key in its canonical form.

See Also