Class SdkGuard
このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。
Inheritance
Namespace: Stylelabs.M.Sdk.Utilities
Assembly: Stylelabs.M.Sdk.dll
Syntax
Methods
GreaterThan(String, Int64, Int64)
Checks if the specified long is greater than a given minimum. Otherwise if the specified long is lower or equal to given minimum, fail.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument |
The name of the argument. |
| System.Int64 | value |
The value of the argument. |
| System.Int64 | minimum |
The minimum. |
NotNegative(String, Int64)
Checks if the specified long is negative.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument |
The name of the argument. |
| System.Int64 | value |
The value of the argument. |
NotNull(String, Object)
Checks if the specified value is null.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument |
The name of the argument. |
| System.Object | value |
The value of the argument. |
NotNullEach<T>(String, T)
Checks if the specified collection is null or contains null values.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument |
The name of the argument. |
| T | value |
The value of the argument. |
Type Parameters
| Name | Description |
|---|---|
| T |
Type of the collection. |
NotNullMaxOneId(String, IEnumerable<Int64>)
The ids cannot be null.
It can be empty, but it cannot contain more than 1 value.
The value must be a strictly positive id, if it exists.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | parameterName |
Name of the parameter. |
| IEnumerable<System.Int64> | ids |
Collection to check. |
NotNullOrEmptyCollection<T>(String, T)
Checks if the specified collection is null or empty.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument |
The name of the argument. |
| T | value |
The value of the argument. |
Type Parameters
| Name | Description |
|---|---|
| T |
Type of the collection. |
NotNullOrInvariantCulture(String, CultureInfo)
Checks if the specified culture is null or invariant culture.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument |
The name of the argument. |
| CultureInfo | culture |
The culture. |
NotNullOrInvariantCultureEach(String, IEnumerable<CultureInfo>)
Checks if the specified culture is null or invariant culture.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument |
The name of the argument. |
| IEnumerable<CultureInfo> | cultures |
The cultures. |
NotNullOrWhiteSpace(String, String)
Checks if the specified value
is null, an empty string or white space string.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument |
The name of the argument. |
| System.String | value |
The value of the argument. |
NotNullOrWhiteSpaceEach(String, IEnumerable<String>)
Checks if the specified collection is null or contains null or white space strings.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument |
The name of the argument. |
| IEnumerable<System.String> | value |
The value of the argument. |
StrictlyPositive(String, Int32)
Checks if the specified number is strictly positive, i.e. greater than zero.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument |
The name of the argument. |
| System.Int32 | value |
The value of the argument. |
StrictlyPositive(String, TimeSpan)
Checks if the specified time span is strictly positive, i.e. greater than zero.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | argument |
The name of the argument. |
| TimeSpan | value |
The value of the argument. |
ValidId(String, Nullable<Int64>)
If the id is not null, it must be strictly positive.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | parameterName |
Name of the parameter. |
| System.Nullable<System.Int64> | id |
Id to check |
ValidIds(String, IEnumerable<Int64>)
The ids cannot be null, and every id must be strictly positive.
Declaration
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | parameterName |
Name of the parameter. |
| IEnumerable<System.Int64> | ids |
Ids to check |