|
@@ -60,7 +60,7 @@ namespace Jint.Runtime.Interop
|
|
|
var type = Target.GetType();
|
|
|
|
|
|
// look for a property
|
|
|
- var property = type.GetProperties(BindingFlags.Instance | BindingFlags.Public)
|
|
|
+ var property = type.GetProperties(BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public)
|
|
|
.Where(p => EqualsIgnoreCasing(p.Name, propertyName))
|
|
|
.FirstOrDefault();
|
|
|
if (property != null)
|
|
@@ -71,7 +71,7 @@ namespace Jint.Runtime.Interop
|
|
|
}
|
|
|
|
|
|
// look for a field
|
|
|
- var field = type.GetFields(BindingFlags.Instance | BindingFlags.Public)
|
|
|
+ var field = type.GetFields(BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public)
|
|
|
.Where(f => EqualsIgnoreCasing(f.Name, propertyName))
|
|
|
.FirstOrDefault();
|
|
|
if (field != null)
|
|
@@ -82,7 +82,7 @@ namespace Jint.Runtime.Interop
|
|
|
}
|
|
|
|
|
|
// if no properties were found then look for a method
|
|
|
- var methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Public)
|
|
|
+ var methods = type.GetMethods(BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public)
|
|
|
.Where(m => EqualsIgnoreCasing(m.Name, propertyName))
|
|
|
.ToArray();
|
|
|
|