Commit b46fed03 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

[WinRT] Fixed GetMethod in WinRT.

parent 016d601e
Subproject commit 7a399dfb907bca3288018c462c54fe2dd637baf6
Subproject commit d310fed28bda8c6c59a0d9fd5893e1a0d8dbde7f
......@@ -169,7 +169,7 @@ namespace NLua.Extensions
/// Extends the System.Type-type to search for a given extended MethodeName.
/// </summary>
/// <param name="MethodeName">Name of the Methode</param>
/// <returns>the found Methode or null</returns>
/// <returns>the found Method or null</returns>
public static MethodInfo GetExtensionMethod (this Type t, string name, IEnumerable<Assembly> assemblies = null)
{
var mi = from methode in t.GetExtensionMethods (assemblies)
......@@ -254,6 +254,7 @@ namespace NLua.Extensions
}
#if NETFX_CORE
// Missing Reflection methods from WinRT
public const BindingFlags Default = BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance;
......
......@@ -649,12 +649,12 @@ namespace NLua
} else if (!implicitStatic) {
#if NETFX_CORE
var typeInfo = member as TypeInfo;
if (!typeInfo.IsPublic && !typeInfo.IsNotPublic) {
if (typeInfo != null && !typeInfo.IsPublic && !typeInfo.IsNotPublic) {
#else
if (member.MemberType == MemberTypes.NestedType) {
#endif
// kevinh - added support for finding nested types
// kevinh - added support for finding nested types-
// cache us
if (cachedMember == null)
SetMemberCache (memberCache, objType, methodName, member);
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1E72B073-2154-4329-BC8D-94F19F91C945}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLua.WP8</RootNamespace>
<AssemblyName>NLua.WP8</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformVersion>8.1</TargetPlatformVersion>
<MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<ProjectReference Include="..\KeraLua\src\WP8\KeraLua.WP8.csproj">
<Project>{1f139ccb-195b-402d-8776-7a15a3e05886}</Project>
<Name>KeraLua.WP8</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="CheckType.cs" />
<Compile Include="Config\NLuaConfig.cs" />
<Compile Include="Event\DebugHookEventArgs.cs" />
<Compile Include="Event\EventCodes.cs" />
<Compile Include="Event\EventMasks.cs" />
<Compile Include="Event\HookExceptionEventArgs.cs" />
<Compile Include="Exceptions\LuaException.cs" />
<Compile Include="Exceptions\LuaScriptException.cs" />
<Compile Include="Extensions\GeneralExtensions.cs" />
<Compile Include="GenerateEventAssembly\ClassGenerator.cs" />
<Compile Include="GenerateEventAssembly\CodeGeneration.cs" />
<Compile Include="GenerateEventAssembly\DelegateGenerator.cs" />
<Compile Include="GenerateEventAssembly\ILuaGeneratedType.cs" />
<Compile Include="GenerateEventAssembly\LuaClassType.cs" />
<Compile Include="Lua.cs" />
<Compile Include="LuaBase.cs" />
<Compile Include="LuaFunction.cs" />
<Compile Include="LuaGlobalAttribute.cs" />
<Compile Include="LuaHideAttribute.cs" />
<Compile Include="LuaLib\GCOptions.cs" />
<Compile Include="LuaLib\LuaEnums.cs" />
<Compile Include="LuaLib\LuaIndexes.cs" />
<Compile Include="LuaLib\LuaLib.cs" />
<Compile Include="LuaLib\LuaTypes.cs" />
<Compile Include="LuaLib\References.cs" />
<Compile Include="LuaRegistrationHelper.cs" />
<Compile Include="LuaTable.cs" />
<Compile Include="LuaUserData.cs" />
<Compile Include="Metatables.cs" />
<Compile Include="Method\EventHandlerContainer.cs" />
<Compile Include="Method\LuaClassHelper.cs" />
<Compile Include="Method\LuaDelegate.cs" />
<Compile Include="Method\LuaEventHandler.cs" />
<Compile Include="Method\LuaMethodWrapper.cs" />
<Compile Include="Method\MethodArgs.cs" />
<Compile Include="Method\MethodCache.cs" />
<Compile Include="Method\RegisterEventHandler.cs" />
<Compile Include="ObjectTranslator.cs" />
<Compile Include="ObjectTranslatorPool.cs" />
<Compile Include="Platform\BindFlags.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ProxyType.cs" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0' ">
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == '' ">
<TargetPlatformIdentifier>WindowsPhoneApp</TargetPlatformIdentifier>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{1E72B073-2154-4329-BC8D-94F19F91C945}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLua</RootNamespace>
<AssemblyName>NLua.WP8</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformVersion>8.1</TargetPlatformVersion>
<MinimumVisualStudioVersion>12</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{76F1466A-8B6D-4E39-A767-685A06062A39};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<ProjectReference Include="..\KeraLua\src\WP8\KeraLua.WP8.csproj">
<Project>{1f139ccb-195b-402d-8776-7a15a3e05886}</Project>
<Name>KeraLua.WP8</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="CheckType.cs" />
<Compile Include="Config\NLuaConfig.cs" />
<Compile Include="Event\DebugHookEventArgs.cs" />
<Compile Include="Event\EventCodes.cs" />
<Compile Include="Event\EventMasks.cs" />
<Compile Include="Event\HookExceptionEventArgs.cs" />
<Compile Include="Exceptions\LuaException.cs" />
<Compile Include="Exceptions\LuaScriptException.cs" />
<Compile Include="Extensions\GeneralExtensions.cs" />
<Compile Include="GenerateEventAssembly\ClassGenerator.cs" />
<Compile Include="GenerateEventAssembly\CodeGeneration.cs" />
<Compile Include="GenerateEventAssembly\DelegateGenerator.cs" />
<Compile Include="GenerateEventAssembly\ILuaGeneratedType.cs" />
<Compile Include="GenerateEventAssembly\LuaClassType.cs" />
<Compile Include="Lua.cs" />
<Compile Include="LuaBase.cs" />
<Compile Include="LuaFunction.cs" />
<Compile Include="LuaGlobalAttribute.cs" />
<Compile Include="LuaHideAttribute.cs" />
<Compile Include="LuaLib\GCOptions.cs" />
<Compile Include="LuaLib\LuaEnums.cs" />
<Compile Include="LuaLib\LuaIndexes.cs" />
<Compile Include="LuaLib\LuaLib.cs" />
<Compile Include="LuaLib\LuaTypes.cs" />
<Compile Include="LuaLib\References.cs" />
<Compile Include="LuaRegistrationHelper.cs" />
<Compile Include="LuaTable.cs" />
<Compile Include="LuaUserData.cs" />
<Compile Include="Metatables.cs" />
<Compile Include="Method\EventHandlerContainer.cs" />
<Compile Include="Method\LuaClassHelper.cs" />
<Compile Include="Method\LuaDelegate.cs" />
<Compile Include="Method\LuaEventHandler.cs" />
<Compile Include="Method\LuaMethodWrapper.cs" />
<Compile Include="Method\MethodArgs.cs" />
<Compile Include="Method\MethodCache.cs" />
<Compile Include="Method\RegisterEventHandler.cs" />
<Compile Include="ObjectTranslator.cs" />
<Compile Include="ObjectTranslatorPool.cs" />
<Compile Include="Platform\BindFlags.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ProxyType.cs" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0' ">
<VisualStudioVersion>12.0</VisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(TargetPlatformIdentifier)' == '' ">
<TargetPlatformIdentifier>WindowsPhoneApp</TargetPlatformIdentifier>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
-->
</Project>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment