Changed IApplicationEvents to IApplicationEventHandler.

Removed all reflection calls to BindingFlags.NonPublic which was mostly used by DynamicNode, this will
not work in medium trust.
This commit is contained in:
Shannon Deminick
2012-08-22 05:21:02 +06:00
parent 72ac3532d2
commit bee73cce12
14 changed files with 107 additions and 96 deletions

View File

@@ -22,7 +22,7 @@ namespace Umbraco.Core.Dynamics
from type in assembly.GetTypes()
where (type.IsDefined(typeof(ExtensionAttribute), false)
&& type.IsSealed && !type.IsGenericType && !type.IsNested)
from method in type.GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic)
from method in type.GetMethods(BindingFlags.Static | BindingFlags.Public)
// this filters extension methods
where method.IsDefined(typeof(ExtensionAttribute), false)
select method
@@ -31,7 +31,7 @@ namespace Umbraco.Core.Dynamics
//search an explicit type (e.g. Enumerable, where most of the Linq methods are defined)
//if (explicitTypeToSearch != null)
//{
candidates = candidates.Concat(typeof(IEnumerable).GetMethods(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic));
candidates = candidates.Concat(typeof(IEnumerable).GetMethods(BindingFlags.Static | BindingFlags.Public));
//}
//filter by name