C# Класс Amazon.CognitoSync.SyncManager.Internal.DatasetUtils

A Utility class for all the dataset operations
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
DATASET_NAME_PATTERN string
UNKNOWN_IDENTITY_ID string

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

Метод Описание
ComputeRecordSize ( Record record ) : long

A helper function to compute record size which equals the sum of the UTF-8 string length of record key and value. 0 if record is null.

GetIdentityId ( CognitoAWSCredentials credentials ) : string

A helper function to get the identity id of the dataset from credentials provider. If the identity id is null, UNKNOWN_IDENTITY_ID will be returned.

TruncateToSeconds ( System.DateTime dateTime ) : System.DateTime

A helper function to truncate a DateTime object to whole seconds.

ValidateDatasetName ( string datasetName ) : string

Validates the dataset name.

ValidateRecordKey ( string key ) : string

Validates the record key. It must be non empty and its length must be no greater than 128. Otherwise {@link IllegalArgumentException} will be thrown.

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

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

A helper function to compute record size which equals the sum of the UTF-8 string length of record key and value. 0 if record is null.
public static ComputeRecordSize ( Record record ) : long
record Record Record.
Результат long

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

A helper function to get the identity id of the dataset from credentials provider. If the identity id is null, UNKNOWN_IDENTITY_ID will be returned.
public static GetIdentityId ( CognitoAWSCredentials credentials ) : string
credentials Amazon.CognitoIdentity.CognitoAWSCredentials The Cognito Credentials.
Результат string

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

A helper function to truncate a DateTime object to whole seconds.
public static TruncateToSeconds ( System.DateTime dateTime ) : System.DateTime
dateTime System.DateTime The DateTime to be truncated.
Результат System.DateTime

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

Validates the dataset name.
public static ValidateDatasetName ( string datasetName ) : string
datasetName string Dataset name.
Результат string

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

Validates the record key. It must be non empty and its length must be no greater than 128. Otherwise {@link IllegalArgumentException} will be thrown.
public static ValidateRecordKey ( string key ) : string
key string Key.
Результат string

Описание свойств

DATASET_NAME_PATTERN публичное статическое свойство

Valid dataset name pattern
public static string DATASET_NAME_PATTERN
Результат string

UNKNOWN_IDENTITY_ID публичное статическое свойство

Unknown identity id when the identity id is null
public static string UNKNOWN_IDENTITY_ID
Результат string