public GlobalSecondaryIndexes(List <IndexDefinition> definitions) { indexes = new ConcurrentSortedDictionary <string, GlobalSecondaryIndex>(); foreach (var indexDefinition in definitions) { indexes.TryAdd(indexDefinition.Name, new GlobalSecondaryIndex(indexDefinition)); } }
public JToken Put(string sortKey, JToken item) { if (data.TryGetValue(sortKey, out var value)) { return(data.TryUpdate(sortKey, item) ? item : value); } return(data.TryAdd(sortKey, item) ? item : null); }