示例#1
0
        private object FindValueOrNull(string name, StringComparison comparison)
        {
            if (UnwrappedContents == null || !UnwrappedContents.HasValues)
            {
                return(null);
            }

            var found = UnwrappedContents.Properties()
                        .FirstOrDefault(
                p => string.Equals(p.Name, name, comparison));

            return(DynamicJacket.WrapOrUnwrap(found?.Value));
        }
示例#2
0
 /// <summary>
 /// Access the items in this object - but only if the underlying object is an array.
 /// </summary>
 /// <param name="index">array index</param>
 /// <returns>the item or an error if not found</returns>
 public override object this[int index] => DynamicJacket.WrapOrUnwrap(UnwrappedContents[index]);