private static RequestOptions GetRequestOptions(string partitionKey, TableRequestOptions options)
        {
            RequestOptions defaultRequestOptions = GetDefaultRequestOptions(partitionKey);

            if (options != null)
            {
                defaultRequestOptions.SessionToken     = options.SessionToken;
                defaultRequestOptions.ConsistencyLevel = CloudTableClient.ToDocDbConsistencyLevel(options.ConsistencyLevel);
            }
            return(defaultRequestOptions);
        }
Ejemplo n.º 2
0
 private static FeedOptions GetDefaultFeedOptions(TableRequestOptions options)
 {
     if (options != null && !TableExtensionSettings.EnableAppSettingsBasedOptions)
     {
         return(new FeedOptions
         {
             MaxItemCount = options.TableQueryMaxItemCount,
             EnableScanInQuery = options.TableQueryEnableScan,
             EnableCrossPartitionQuery = true,
             MaxDegreeOfParallelism = options.TableQueryMaxDegreeOfParallelism.Value,
             ResponseContinuationTokenLimitInKb = options.TableQueryContinuationTokenLimitInKb,
             ConsistencyLevel = CloudTableClient.ToDocDbConsistencyLevel(options.ConsistencyLevel)
         });
     }
     return(new FeedOptions
     {
         MaxItemCount = TableExtensionSettings.MaxItemCount,
         EnableScanInQuery = TableExtensionSettings.EnableScan,
         EnableCrossPartitionQuery = true,
         MaxDegreeOfParallelism = TableExtensionSettings.MaxDegreeOfParallelism,
         ResponseContinuationTokenLimitInKb = TableExtensionSettings.ContinuationTokenLimitInKb
     });
 }