public IEnumerable GetProperties()

in src/Microsoft.Atlas.CommandLine/AnyMembersTypeInspector.cs [18:52]


        public IEnumerable<IPropertyDescriptor> GetProperties(Type type, object container)
        {
            var anyPropertyInfo = GetAnyMembersPropertyInfo(type);

            if (anyPropertyInfo == null)
            {
                foreach (var propertyDescriptor in _inner.GetProperties(type, container))
                {
                    var thing = propertyDescriptor.Read(container);

                    yield return propertyDescriptor;
                }
            }
            else
            {
                foreach (var propertyDescriptor in _inner.GetProperties(type, container))
                {
                    if (!string.Equals(propertyDescriptor.Name, anyPropertyInfo.Name, StringComparison.OrdinalIgnoreCase))
                    {
                        var thing = propertyDescriptor.Read(container);

                        yield return propertyDescriptor;
                    }
                }

                var any = anyPropertyInfo.GetValue(container) as IDictionary;
                if (any != null)
                {
                    foreach (var name in any.Keys)
                    {
                        yield return new AnyMembersPropertyDescriptor(anyPropertyInfo, Convert.ToString(name));
                    }
                }
            }
        }