Utility class to help with checking values
More...
|
static T | NonNull< T > (T value, string paramName) |
| Checks that the passed in value is not null. If it is null, a ArgumentNullException is thrown with a message specifying that the parameter can't be null. More...
|
|
static string | NonEmpty (string value, string paramName) |
| Checks if the passed in value is an empty string. The string gets trimmed. If it is empty, an ArgumentException gets thrown with an appropriate error message. More...
|
|
static string | NonEmpty (string value, String paramName, bool trim) |
| Checks if the passed in value is an empty string. if trim is true, the string gets trimmed.If it is empty, an ArgumentException gets thrown with an appropriate error message. More...
|
|
static string | NonEmpty (string value, string customMessage, params Object[] messageParams) |
| Checks if the passed in value is an empty String. If it is empty an ArgumentException is thrown with the passed in custom message.The params are applied to the customMessage according to String.Format More...
|
|
static string | NonEmpty (string value, bool trim, string customMessage, params Object[] messageParams) |
| Checks if the passed in value is an empty String. If it is empty an ArgumentException is thrown with the passed in custom message. The params are applied to the customMessage according to String.Format More...
|
|
Utility class to help with checking values
◆ NonEmpty() [1/4]
static string AeroGear.Mobile.Core.Utils.SanityCheck.NonEmpty |
( |
string |
value, |
|
|
string |
paramName |
|
) |
| |
|
static |
Checks if the passed in value is an empty string. The string gets trimmed. If it is empty, an ArgumentException gets thrown with an appropriate error message.
- Returns
- The received value.
- Parameters
-
value | String to be checked. |
paramName | Parameter name to be used in the error message. |
◆ NonEmpty() [2/4]
static string AeroGear.Mobile.Core.Utils.SanityCheck.NonEmpty |
( |
string |
value, |
|
|
String |
paramName, |
|
|
bool |
trim |
|
) |
| |
|
static |
Checks if the passed in value is an empty string. if trim is true, the string gets trimmed.If it is empty, an ArgumentException gets thrown with an appropriate error message.
- Returns
- The received value.
- Parameters
-
value | String to be checked. |
paramName | Parameter name to be used in the error message. |
trim | whether the string must be trimmed or not. |
◆ NonEmpty() [3/4]
static string AeroGear.Mobile.Core.Utils.SanityCheck.NonEmpty |
( |
string |
value, |
|
|
string |
customMessage, |
|
|
params Object [] |
messageParams |
|
) |
| |
|
static |
Checks if the passed in value is an empty String. If it is empty an ArgumentException is thrown with the passed in custom message.The params are applied to the customMessage according to String.Format
- Returns
- The received value.
- Parameters
-
value | String to be checked. |
customMessage | Custom message to be put into the exception. |
messageParams | Parameters to be applied to the custom message. |
◆ NonEmpty() [4/4]
static string AeroGear.Mobile.Core.Utils.SanityCheck.NonEmpty |
( |
string |
value, |
|
|
bool |
trim, |
|
|
string |
customMessage, |
|
|
params Object [] |
messageParams |
|
) |
| |
|
static |
Checks if the passed in value is an empty String. If it is empty an ArgumentException is thrown with the passed in custom message. The params are applied to the customMessage according to String.Format
- Returns
- The received value.
- Parameters
-
value | String to be checked. |
trim | Whether the string must be trimmed or not. |
customMessage | Custom message to be put into the exception. |
messageParams | Parameters to be applied to the custom message. |
◆ NonNull< T >()
static T AeroGear.Mobile.Core.Utils.SanityCheck.NonNull< T > |
( |
T |
value, |
|
|
string |
paramName |
|
) |
| |
|
static |
Checks that the passed in value is not null. If it is null, a ArgumentNullException is thrown with a message specifying that the parameter can't be null.
- Returns
- The received value.
- Parameters
-
value | String to be checked. |
paramName | Parameter name to be used in the error message. |
- Template Parameters
-
The documentation for this class was generated from the following file: