Changing t.GetAllProperties back to original t.GetProperties to avoid the use of binding flags, which is no longer necessary after having refactored the querying.

This commit is contained in:
Morten Christensen
2012-12-29 18:17:16 -01:00
parent 8999db6362
commit bcccc37f93

View File

@@ -1795,10 +1795,7 @@ namespace Umbraco.Core.Persistence
bool ExplicitColumns = t.GetCustomAttributes(typeof(ExplicitColumnsAttribute), true).Length > 0; bool ExplicitColumns = t.GetCustomAttributes(typeof(ExplicitColumnsAttribute), true).Length > 0;
Columns = new Dictionary<string, PocoColumn>(StringComparer.OrdinalIgnoreCase); Columns = new Dictionary<string, PocoColumn>(StringComparer.OrdinalIgnoreCase);
//MCH NOTE: Changing bindingflags and using GetAllProperties() to include internal foreach (var pi in t.GetProperties())
//properties as well as work for interfaces by flattening the hierarchy.
var properties = t.GetAllProperties();
foreach (var pi in properties)
{ {
// Work out if properties is to be included // Work out if properties is to be included
var ColAttrs = pi.GetCustomAttributes(typeof(ColumnAttribute), true); var ColAttrs = pi.GetCustomAttributes(typeof(ColumnAttribute), true);