private static FeedOptions SetPartitionKey <U>(U partitionKey, FeedOptions feedOptions) { feedOptions = feedOptions.ShallowCopy() ?? new FeedOptions(); object pk = Implementation.CosmosDbRepository.IndirectlySupportedIndexTypes.Contains(partitionKey.GetType()) ? (object)partitionKey.ToString() : partitionKey; feedOptions.PartitionKey = new PartitionKey(pk); return(feedOptions); }
private static FeedOptions SetCrossPartition(FeedOptions feedOptions) { feedOptions = feedOptions.ShallowCopy() ?? new FeedOptions(); feedOptions.EnableCrossPartitionQuery = true; return(feedOptions); }