public DynamoDBFlatConfig(DynamoDBOperationConfig operationConfig, DynamoDBContextConfig contextConfig) { if (operationConfig == null) { operationConfig = _emptyOperationConfig; } if (contextConfig == null) { contextConfig = _emptyContextConfig; } bool consistentRead = operationConfig.ConsistentRead ?? contextConfig.ConsistentRead ?? false; bool skipVersionCheck = operationConfig.SkipVersionCheck ?? contextConfig.SkipVersionCheck ?? false; bool ignoreNullValues = operationConfig.IgnoreNullValues ?? contextConfig.IgnoreNullValues ?? false; string overrideTableName = !string.IsNullOrEmpty(operationConfig.OverrideTableName) ? operationConfig.OverrideTableName : string.Empty; string tableNamePrefix = !string.IsNullOrEmpty(operationConfig.TableNamePrefix) ? operationConfig.TableNamePrefix : !string.IsNullOrEmpty(contextConfig.TableNamePrefix) ? contextConfig.TableNamePrefix : string.Empty; bool backwardQuery = operationConfig.BackwardQuery ?? false; string indexName = !string.IsNullOrEmpty(operationConfig.IndexName) ? operationConfig.IndexName : DefaultIndexName; List <ScanCondition> queryFilter = operationConfig.QueryFilter ?? new List <ScanCondition>(); ConditionalOperatorValues conditionalOperator = operationConfig.ConditionalOperator; ConsistentRead = consistentRead; SkipVersionCheck = skipVersionCheck; IgnoreNullValues = ignoreNullValues; OverrideTableName = overrideTableName; TableNamePrefix = tableNamePrefix; BackwardQuery = backwardQuery; IndexName = indexName; QueryFilter = queryFilter; ConditionalOperator = conditionalOperator; }
public static string Convert(ConditionalOperatorValues value) { switch (value) { case ConditionalOperatorValues.And: return("AND"); case ConditionalOperatorValues.Or: return("OR"); default: throw new ArgumentOutOfRangeException("value", "Invalid ConditionalOperatorValues value"); } }