Change TagHelperDescriptorFactory IsValidProperty => IsAccessibleProperty.

This commit is contained in:
N. Taylor Mullen 2015-04-14 12:22:10 -07:00
parent c9c8e802a7
commit 96dc7ea6c5
1 changed files with 2 additions and 2 deletions

View File

@ -203,7 +203,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers
private static IEnumerable<TagHelperAttributeDescriptor> GetAttributeDescriptors(Type type)
{
var properties = type.GetRuntimeProperties().Where(IsValidProperty);
var properties = type.GetRuntimeProperties().Where(IsAccessibleProperty);
var attributeDescriptors = properties.Select(ToAttributeDescriptor);
return attributeDescriptors;
@ -219,7 +219,7 @@ namespace Microsoft.AspNet.Razor.Runtime.TagHelpers
return new TagHelperAttributeDescriptor(attributeName, property.Name, property.PropertyType.FullName);
}
private static bool IsValidProperty(PropertyInfo property)
private static bool IsAccessibleProperty(PropertyInfo property)
{
return property.GetMethod != null &&
property.GetMethod.IsPublic &&