Amazon.CognitoSync.SyncManager.Internal.DatasetUtils.ValidateRecordKey C# (CSharp) Метод

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
        public static string ValidateRecordKey(string key)
        {
            if (string.IsNullOrEmpty(key) || Encoding.UTF8.GetByteCount(key) > 128)
            {
                throw new ArgumentException("Invalid record key");
            }
            return key;
        }