YamlDotNet.ReflectionExtensions.GetPublicProperties C# (CSharp) Method

GetPublicProperties() public static method

public static GetPublicProperties ( this type ) : IEnumerable
type this
return IEnumerable
        public static IEnumerable<PropertyInfo> GetPublicProperties(this Type type)
        {
            var instancePublic = new Func<PropertyInfo, bool>(
                p => !p.GetMethod.IsStatic && p.GetMethod.IsPublic);
            return type.IsInterface()
                ? (new Type[] { type })
                    .Concat(type.GetInterfaces())
                    .SelectMany(i => i.GetRuntimeProperties().Where(instancePublic))
                : type.GetRuntimeProperties().Where(instancePublic);
        }