コード例 #1
0
 /// <summary>
 /// Generates a new <see cref="AlphaNumericKey"/> value for a given input string.. Contains only uppercase 0-9A-Z and - characters, the rest is stripped according to given options.
 /// </summary>
 /// <param name="value">The string value to generate the key from</param>
 /// <param name="options">additional options </param>
 /// <returns>an uppercase string that only contains the allowed characters</returns>
 /// <exception cref="ArgumentException">When a string is null or empty</exception>
 /// <exception cref="ArgumentException">When a string is empty after removing the disallowed characters</exception>
 public AlphaNumericKey(string value, AlphaNumericKeyGenOptions options)
 {
     _value = CreateAlphaNumericKeyString(value, options);
 }
コード例 #2
0
        public static char CreateAlphaNumericPartitionKey(this string value, AlphaNumericKeyGenOptions options = AlphaNumericKeyGenOptions.None)
        {
            var strippedString = CreateAlphaNumericKey(value, options);

            return(PartitionForAlphaNumericKey(strippedString));
        }