Jurassic.Library.HiddenClassSchema.EnumeratePropertyNamesAndValues C# (CSharp) Method

EnumeratePropertyNamesAndValues() public method

Enumerates the property names and values for this schema.
public EnumeratePropertyNamesAndValues ( object values ) : IEnumerable
values object The array containing the property values.
return IEnumerable
        public IEnumerable<PropertyNameAndValue> EnumeratePropertyNamesAndValues(object[] values)
        {
            if (this.properties == null)
                this.properties = CreatePropertiesDictionary();
            this.parent = null;     // Prevents the properties dictionary from being stolen while an enumeration is in progress.
            foreach (var pair in this.properties)
                yield return new PropertyNameAndValue(pair.Key, values[pair.Value.Index], pair.Value.Attributes);
        }