Validating partition and row keys in Azure Table Storage
Microsoft Azure Table storage is a very flexible No-Sql store for structured data. Each entity in the table is uniquely identified by a partition key and a row key. A good choice of these is beyond the scope of this post. However, it can be useful to check that entity you want to add to the table has valid partition and row keys. Here's a simple class that encapsulates those rules: /// <summary> /// Encapsulates knowledge about valid values for keys in Microsoft Azure table storage. /// </summary> /// <remarks> /// Rules are found here http://msdn.microsoft.com/library/azure/dd179338.aspx /// </remarks> internal static class KeyValidator { /// <summary> /// Determines whether the specified key is valid. /// </summary> /// <param name="keyValue">The key.</param> /// <param name="errors">Any errors in the value supplied.</param> /// <returns><c>tru...