Browse Source

Merge pull request #184 from genielabs/case-resolve

Case resolve
Sébastien Ros 10 years ago
parent
commit
8f48efe861
2 changed files with 5 additions and 5 deletions
  1. 2 2
      Jint/Jint.csproj
  2. 3 3
      Jint/Runtime/Interop/ObjectWrapper.cs

+ 2 - 2
Jint/Jint.csproj

@@ -148,7 +148,7 @@
     <Compile Include="Parser\Ast\WhileStatement.cs" />
     <Compile Include="Parser\Ast\WithStatement.cs" />
     <Compile Include="Parser\Comment.cs" />
-    <Compile Include="Parser\JavaScriptParser.cs" />
+    <Compile Include="Parser\JavascriptParser.cs" />
     <Compile Include="Parser\Loc.cs" />
     <Compile Include="Parser\Messages.cs" />
     <Compile Include="Parser\ParserException.cs" />
@@ -212,4 +212,4 @@
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
+</Project>

+ 3 - 3
Jint/Runtime/Interop/ObjectWrapper.cs

@@ -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();