internal ExpectedAttributeValue ConvertToExpectedAttributeValue() { AttributeValue attributeValue = ConvertToAttributeValue(); ExpectedAttributeValue expectedAttribute = new ExpectedAttributeValue(); if (attributeValue == null) { expectedAttribute.Exists = false; } else { expectedAttribute.Exists = true; expectedAttribute.Value = attributeValue; } return expectedAttribute; }
internal override ExpectedAttributeValue ConvertToExpectedAttributeValue() { ExpectedAttributeValue expectedAttribute = new ExpectedAttributeValue(); if (!string.IsNullOrEmpty(this.Value)) { expectedAttribute.Exists = true; expectedAttribute.Value = new AttributeValue(); if (SaveAsNumeric) { expectedAttribute.Value.N = Value; } else { expectedAttribute.Value.S = Value; } } else { expectedAttribute.Exists = false; } return expectedAttribute; }
internal override ExpectedAttributeValue ConvertToExpectedAttributeValue() { ExpectedAttributeValue expectedAttribute = new ExpectedAttributeValue(); if ((Entries != null) && (Entries.Count != 0)) { expectedAttribute.Exists = true; expectedAttribute.Value = new AttributeValue(); List<string> values = new List<string>(); foreach (var entry in Entries) { values.Add(entry.Value); } if (SaveAsNumeric) { expectedAttribute.Value.NS = values; } else { expectedAttribute.Value.SS = values; } } else { expectedAttribute.Exists = false; } return expectedAttribute; }