public static TableOperation Retrieve <TElement>(string partitionKey, string rowkey, List <string> selectColumns = null) where TElement : ITableEntity { CommonUtility.AssertNotNull("partitionKey", partitionKey); CommonUtility.AssertNotNull("rowkey", rowkey); // Create and return the table operation. return(new TableOperation(null /* entity */, TableOperationType.Retrieve) { RetrievePartitionKey = partitionKey, RetrieveRowKey = rowkey, SelectColumns = selectColumns, RetrieveResolver = (pk, rk, ts, prop, etag) => EntityUtilities.ResolveEntityByType <TElement>( pk, rk, ts, prop, etag), PropertyResolverType = typeof(TElement) }); }
public void Retrieve <TElement>(string partitionKey, string rowKey, List <string> selectedColumns = null) where TElement : ITableEntity { CommonUtility.AssertNotNull("partitionKey", partitionKey); CommonUtility.AssertNotNull("rowkey", rowKey); // Add the table operation. this.Add(new TableOperation(null /* entity */, TableOperationType.Retrieve) { RetrievePartitionKey = partitionKey, RetrieveRowKey = rowKey, SelectColumns = selectedColumns, RetrieveResolver = (pk, rk, ts, prop, etag) => EntityUtilities.ResolveEntityByType <TElement>(pk, rk, ts, prop, etag) }); }