示例#1
0
        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;
        }
示例#2
0
        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;
        }
示例#3
0
        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;
        }