Amazon.CognitoSync.SyncManager.Internal.DatasetUtils.ValidateRecordKey C# (CSharp) Méthode

ValidateRecordKey() public static méthode

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