Commit 50da4861 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

[WinRT] Added Windows Store build (WIP).

parent 25726c61
......@@ -159,9 +159,9 @@ namespace NLua
return extractValues [extractKey];
} else if (typeof(Delegate).IsAssignableFrom (paramType) && luatype == LuaTypes.Function)
return new ExtractValue (new DelegateGenerator (translator, paramType).ExtractGenerated);
else if (paramType.IsInterface && luatype == LuaTypes.Table)
else if (paramType.IsInterface() && luatype == LuaTypes.Table)
return new ExtractValue (new ClassGenerator (translator, paramType).ExtractGenerated);
else if ((paramType.IsInterface || paramType.IsClass) && luatype == LuaTypes.Nil) {
else if ((paramType.IsInterface() || paramType.IsClass()) && luatype == LuaTypes.Nil) {
// kevinh - allow nil to be silently converted to null - extractNetObject will return null when the item ain't found
return extractNetObject;
} else if (LuaLib.LuaType (luaState, stackPos) == LuaTypes.Table) {
......
/*
* This file is part of NLua.
*
* Copyright (c) 2014 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using System;
#if !SILVERLIGHT
using System.Runtime.Serialization;
#endif
namespace NLua.Exceptions
{
/// <summary>
/// Exceptions thrown by the Lua runtime
/// </summary>
#if !SILVERLIGHT
[Serializable]
#endif
public class LuaException : Exception
{
public LuaException ()
{
}
public LuaException (string message) : base(message)
{
}
public LuaException (string message, Exception innerException) : base(message, innerException)
{
}
#if !SILVERLIGHT
protected LuaException (SerializationInfo info, StreamingContext context) : base(info, context)
{
}
#endif
}
/*
* This file is part of NLua.
*
* Copyright (c) 2014 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using System;
#if !SILVERLIGHT && !NETFX_CORE
using System.Runtime.Serialization;
#endif
namespace NLua.Exceptions
{
/// <summary>
/// Exceptions thrown by the Lua runtime
/// </summary>
#if !SILVERLIGHT && !NETFX_CORE
[Serializable]
#endif
public class LuaException : Exception
{
public LuaException ()
{
}
public LuaException (string message) : base(message)
{
}
public LuaException (string message, Exception innerException) : base(message, innerException)
{
}
#if !SILVERLIGHT && !NETFX_CORE
protected LuaException (SerializationInfo info, StreamingContext context) : base(info, context)
{
}
#endif
}
}
\ No newline at end of file
/*
* This file is part of NLua.
*
* Copyright (c) 2014 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using System;
namespace NLua.Exceptions
{
/// <summary>
/// Exceptions thrown by the Lua runtime because of errors in the script
/// </summary>
///
#if !SILVERLIGHT
[Serializable]
#endif
public class LuaScriptException : LuaException
{
/// <summary>
/// Returns true if the exception has occured as the result of a .NET exception in user code
/// </summary>
public bool IsNetException { get; private set; }
private readonly string source;
/// <summary>
/// The position in the script where the exception was triggered.
/// </summary>
#if SILVERLIGHT
public string Source { get { return source; } }
#else
public override string Source { get { return source; } }
#endif
/// <summary>
/// Creates a new Lua-only exception.
/// </summary>
/// <param name="message">The message that describes the error.</param>
/// <param name="source">The position in the script where the exception was triggered.</param>
public LuaScriptException (string message, string source) : base(message)
{
this.source = source;
}
/// <summary>
/// Creates a new .NET wrapping exception.
/// </summary>
/// <param name="innerException">The .NET exception triggered by user-code.</param>
/// <param name="source">The position in the script where the exception was triggered.</param>
public LuaScriptException (Exception innerException, string source)
: base("A .NET exception occured in user-code", innerException)
{
this.source = source;
this.IsNetException = true;
}
public override string ToString ()
{
// Prepend the error source
return GetType ().FullName + ": " + source + Message;
}
}
/*
* This file is part of NLua.
*
* Copyright (c) 2014 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using System;
namespace NLua.Exceptions
{
/// <summary>
/// Exceptions thrown by the Lua runtime because of errors in the script
/// </summary>
///
#if !SILVERLIGHT && !NETFX_CORE
[Serializable]
#endif
public class LuaScriptException : LuaException
{
/// <summary>
/// Returns true if the exception has occured as the result of a .NET exception in user code
/// </summary>
public bool IsNetException { get; private set; }
private readonly string source;
/// <summary>
/// The position in the script where the exception was triggered.
/// </summary>
#if SILVERLIGHT
public string Source { get { return source; } }
#else
public override string Source { get { return source; } }
#endif
/// <summary>
/// Creates a new Lua-only exception.
/// </summary>
/// <param name="message">The message that describes the error.</param>
/// <param name="source">The position in the script where the exception was triggered.</param>
public LuaScriptException (string message, string source) : base(message)
{
this.source = source;
}
/// <summary>
/// Creates a new .NET wrapping exception.
/// </summary>
/// <param name="innerException">The .NET exception triggered by user-code.</param>
/// <param name="source">The position in the script where the exception was triggered.</param>
public LuaScriptException (Exception innerException, string source)
: base("A .NET exception occured in user-code", innerException)
{
this.source = source;
this.IsNetException = true;
}
public override string ToString ()
{
// Prepend the error source
return GetType ().FullName + ": " + source + Message;
}
}
}
\ No newline at end of file
......@@ -62,13 +62,18 @@ namespace NLua.Extensions
{
public static bool HasMethod (this Type t, string name)
{
#if NETFX_CORE
var op = t.GetPublicMethods (name);
return op.Any ();
#else
var op = t.GetMethods (BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
return op.Any (m => m.Name == name);
return op.Any (m => m.Name == name);
#endif
}
public static bool HasAdditionOpertator (this Type t)
{
if (t.IsPrimitive)
if (t.IsPrimitive ())
return true;
return t.HasMethod ("op_Addition");
......@@ -76,7 +81,7 @@ namespace NLua.Extensions
public static bool HasSubtractionOpertator (this Type t)
{
if (t.IsPrimitive)
if (t.IsPrimitive ())
return true;
return t.HasMethod ("op_Subtraction");
......@@ -84,7 +89,7 @@ namespace NLua.Extensions
public static bool HasMultiplyOpertator (this Type t)
{
if (t.IsPrimitive)
if (t.IsPrimitive ())
return true;
return t.HasMethod ("op_Multiply");
......@@ -92,7 +97,7 @@ namespace NLua.Extensions
public static bool HasDivisionOpertator (this Type t)
{
if (t.IsPrimitive)
if (t.IsPrimitive ())
return true;
return t.HasMethod ("op_Division");
......@@ -100,7 +105,7 @@ namespace NLua.Extensions
public static bool HasModulusOpertator (this Type t)
{
if (t.IsPrimitive)
if (t.IsPrimitive ())
return true;
return t.HasMethod ("op_Modulus");
......@@ -108,23 +113,23 @@ namespace NLua.Extensions
public static bool HasUnaryNegationOpertator (this Type t)
{
if (t.IsPrimitive)
if (t.IsPrimitive ())
return true;
// Unary - will always have only one version.
var op = t.GetMethod ("op_UnaryNegation",BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
var op = t.GetPublicMethods ("op_UnaryNegation");
return op != null;
}
public static bool HasEqualityOpertator (this Type t)
{
if (t.IsPrimitive)
if (t.IsPrimitive ())
return true;
return t.HasMethod ("op_Equality");
}
public static bool HasLessThanOpertator (this Type t)
{
if (t.IsPrimitive)
if (t.IsPrimitive ())
return true;
return t.HasMethod ("op_LessThan");
......@@ -132,7 +137,7 @@ namespace NLua.Extensions
public static bool HasLessThanOrEqualOpertator (this Type t)
{
if (t.IsPrimitive)
if (t.IsPrimitive ())
return true;
return t.HasMethod ("op_LessThanOrEqual");
}
......@@ -146,18 +151,18 @@ namespace NLua.Extensions
{
List<Type> types = new List<Type> ();
types.AddRange (type.Assembly.GetTypes ().Where (t => t.IsPublic));
types.AddRange (type.GetAssembly().GetTypes ().Where (t => t.IsPublic ()));
if (assemblies != null) {
foreach (Assembly item in assemblies) {
if (item == type.Assembly)
if (item == type.GetAssembly ())
continue;
types.AddRange (item.GetTypes ().Where (t => t.IsPublic));
types.AddRange (item.GetTypes ().Where (t => t.IsPublic ()));
}
}
var query = from extensionType in types
where extensionType.IsSealed && !extensionType.IsGenericType && !extensionType.IsNested
where extensionType.IsSealed() && !extensionType.IsGenericType() && !extensionType.IsNested
from method in extensionType.GetMethods (BindingFlags.Static | BindingFlags.Public)
where method.IsDefined (typeof (ExtensionAttribute), false)
where method.GetParameters () [0].ParameterType == type
......@@ -180,6 +185,249 @@ namespace NLua.Extensions
else
return mi.First<MethodInfo> ();
}
public static bool IsPrimitive (this Type t)
{
#if NETFX_CORE
return t.GetTypeInfo ().IsPrimitive;
#else
return t.IsPrimitive;
#endif
}
public static bool IsClass (this Type t)
{
#if NETFX_CORE
return t.GetTypeInfo ().IsClass;
#else
return t.IsClass;
#endif
}
public static bool IsEnum (this Type t)
{
#if NETFX_CORE
return t.GetTypeInfo ().IsEnum;
#else
return t.IsEnum;
#endif
}
public static bool IsPublic (this Type t)
{
#if NETFX_CORE
return t.GetTypeInfo ().IsPublic;
#else
return t.IsPublic;
#endif
}
public static bool IsSealed (this Type t)
{
#if NETFX_CORE
return t.GetTypeInfo ().IsSealed;
#else
return t.IsSealed;
#endif
}
public static bool IsGenericType (this Type t)
{
#if NETFX_CORE
return t.GetTypeInfo ().IsGenericType;
#else
return t.IsGenericType;
#endif
}
public static bool IsInterface (this Type t)
{
#if NETFX_CORE
return t.GetTypeInfo ().IsInterface;
#else
return t.IsInterface;
#endif
}
public static Assembly GetAssembly (this Type t)
{
#if NETFX_CORE
return t.GetTypeInfo ().Assembly;
#else
return t.Assembly;
#endif
}
public static IEnumerable<MethodInfo> GetStaticPublicMethods (this Type t, string name)
{
#if NETFX_CORE
return GetAllDeclaredMethodsRecursively (t, name).Where (m => m.IsStatic);
#else
return t.GetMethods (BindingFlags.Public | BindingFlags.Static);
#endif
}
public static IEnumerable<MethodInfo> GetStaticPublicMethods (this Type t)
{
#if NETFX_CORE
return GetAllDeclaredMethodsRecursively (t).Where (m => m.IsStatic);
#else
return t.GetMethods (BindingFlags.Public | BindingFlags.Static);
#endif
}
public static IEnumerable<MethodInfo> GetInstancePublicMethods (this Type t, string name)
{
#if NETFX_CORE
return GetAllDeclaredMethodsRecursively (t, name).Where (m => !m.IsStatic);
#else
return t.GetMethods (BindingFlags.Public | BindingFlags.Instance);
#endif
}
public static IEnumerable<MethodInfo> GetInstancePublicMethods (this Type t)
{
#if NETFX_CORE
return GetAllDeclaredMethodsRecursively (t).Where (m => !m.IsStatic);
#else
return t.GetMethods (BindingFlags.Public | BindingFlags.Instance);
#endif
}
public static IEnumerable<MethodInfo> GetPublicMethods (this Type t)
{
#if NETFX_CORE
return GetAllDeclaredMethodsRecursively (t);
#else
return t.GetMethods (BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static);
#endif
}
public static IEnumerable<MethodInfo> GetPublicMethods (this Type t, string name)
{
#if NETFX_CORE
return GetAllDeclaredMethodsRecursively (t, name);
#else
return t.GetMethods (BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static).Where ( m => m.Name == name);
#endif
}
public static MethodInfo GetPublicMethod (this Type t, string name)
{
return GetPublicMethods (t, name).First ();
}
static bool Match (IEnumerable<ParameterInfo> parameters, Type[] signature)
{
if (parameters.Count () != signature.Count ())
return false;
int i = 0;
foreach (var parameter in parameters) {
if (parameters.GetType () != signature [i])
return false;
i++;
}
return true;
}
public static MethodInfo GetPublicMethod (this Type t, string name, Type[] signature)
{
#if NETFX_CORE
var methods = t.GetPublicMethods (name);
return methods.Where (m => Match (m.GetParameters (), signature)).FirstOrDefault ();
#else
return t.GetMethod (name, BindingFlags.Public | BindingFlags.Static |
BindingFlags.Instance , null, signature, null);
#endif
}
static IEnumerable<MethodInfo> GetAllDeclaredMethodsRecursively (Type t, string name)
{
var methods = t.GetTypeInfo ().GetDeclaredMethods (name);
if (t == typeof (object))
return methods;
var baseType = t.GetTypeInfo ().BaseType;
return methods.Concat (GetAllDeclaredMethodsRecursively (baseType, name));
}
static IEnumerable<MemberInfo> GetAllDeclaredMembersRecursively (Type t)
{
var members = t.GetTypeInfo ().DeclaredMembers;
if (t == typeof (object))
return members;
var baseType = t.GetTypeInfo ().BaseType;
return members.Concat (GetAllDeclaredMembersRecursively (baseType));
}
static IEnumerable<MethodInfo> GetAllDeclaredMethodsRecursively (Type t)
{
var methods = t.GetTypeInfo ().DeclaredMethods;
if (t == typeof (object))
return methods;
var baseType = t.GetTypeInfo ().BaseType;
return methods.Concat (GetAllDeclaredMethodsRecursively (baseType));
}
static FieldInfo GetDeclaredFieldRecursively (Type t, string name)
{
var field = t.GetTypeInfo ().GetDeclaredField (name);
if (field != null || t == typeof (object))
return field;
var baseType = t.GetTypeInfo ().BaseType;
return GetDeclaredFieldRecursively (baseType, name);
}
static IEnumerable<FieldInfo> GetAllDeclaredFieldsRecursively (Type t)
{
var fields = t.GetTypeInfo ().DeclaredFields;
if (t == typeof (object))
return fields;
var baseType = t.GetTypeInfo ().BaseType;
return fields.Concat (GetAllDeclaredFieldsRecursively (baseType));
}
public static IEnumerable<FieldInfo> GetPublicFields (this Type t)
{
#if NETFX_CORE
return GetAllDeclaredFieldsRecursively (t);
#else
return t.GetFields ();
#endif
}
public static FieldInfo GetPublicField (this Type t, string name)
{
#if NETFX_CORE
return GetDeclaredFieldRecursively (t, name);
#else
return t.GetField (name);
#endif
}
#if NETFX_CORE
static IEnumerable<Type> GetTypes (this Assembly assembly)
{
return assembly.ExportedTypes;
}
public static bool IsAssignableFrom (this Type t, Type t2)
{
return t.GetTypeInfo ().IsAssignableFrom (t2.GetTypeInfo ());
}
static IEnumerable<MethodInfo> GetMethods (this Type t, BindingFlags flags)
{
return null;
}
#endif
}
static class StringExtensions
......
This diff is collapsed.
......@@ -596,7 +596,7 @@ end
globals.Add (path + "(");
}
// If the type is a class or an interface and recursion hasn't been running too long, list the members
else if ((type.IsClass || type.IsInterface) && type != typeof(string) && recursionCounter < 2) {
else if ((type.IsClass () || type.IsInterface ()) && type != typeof(string) && recursionCounter < 2) {
#region Methods
foreach (var method in type.GetMethods(BindingFlags.Public | BindingFlags.Instance)) {
string name = method.Name;
......@@ -967,6 +967,11 @@ end
#if USE_KOPILUA
static void DebugHookCallback (LuaState luaState, LuaDebug debug)
{
#elif NETFX_CORE
static void DebugHookCallback (LuaState luaState, long luaDebug)
{
IntPtr ptr = new IntPtr (luaDebug);
LuaDebug debug = System.Runtime.InteropServices.Marshal.PtrToStructure <LuaDebug> (ptr);
#else
static void DebugHookCallback (LuaState luaState, IntPtr luaDebug)
{
......
/*
* This file is part of NLua.
*
* Copyright (c) 2014 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2009 Joshua Simmons <simmons.44@gmail.com>
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using System;
using System.IO;
using System.Runtime.InteropServices;
#if !SILVERLIGHT
using System.Runtime.Serialization.Formatters.Binary;
#endif
using NLua.Extensions;
namespace NLua
{
public enum LuaTypes : int
{
None = -1,
Nil = 0,
Boolean = 1,
LightUserdata = 2,
Number = 3,
String = 4,
Table = 5,
Function = 6,
UserData = 7,
Thread = 8
}
/*
* This file is part of NLua.
*
* Copyright (c) 2014 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2009 Joshua Simmons <simmons.44@gmail.com>
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using System;
using System.IO;
using System.Runtime.InteropServices;
#if !SILVERLIGHT && !NETFX_CORE
using System.Runtime.Serialization.Formatters.Binary;
#endif
using NLua.Extensions;
namespace NLua
{
public enum LuaTypes : int
{
None = -1,
Nil = 0,
Boolean = 1,
LightUserdata = 2,
Number = 3,
String = 4,
Table = 5,
Function = 6,
UserData = 7,
Thread = 8
}
}
\ No newline at end of file
/*
* This file is part of NLua.
*
* Copyright (c) 2014 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using System;
using System.Reflection;
using System.Diagnostics.CodeAnalysis;
using NLua.Extensions;
#if SILVERLIGHT
using System.Linq;
#endif
namespace NLua
{
public static class LuaRegistrationHelper
{
#region Tagged instance methods
/// <summary>
/// Registers all public instance methods in an object tagged with <see cref="LuaGlobalAttribute"/> as Lua global functions
/// </summary>
/// <param name="lua">The Lua VM to add the methods to</param>
/// <param name="o">The object to get the methods from</param>
public static void TaggedInstanceMethods (Lua lua, object o)
{
#region Sanity checks
if (lua == null)
throw new ArgumentNullException ("lua");
if (o == null)
throw new ArgumentNullException ("o");
#endregion
foreach (var method in o.GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public)) {
foreach (LuaGlobalAttribute attribute in method.GetCustomAttributes(typeof(LuaGlobalAttribute), true)) {
if (string.IsNullOrEmpty (attribute.Name))
lua.RegisterFunction (method.Name, o, method); // CLR name
else
lua.RegisterFunction (attribute.Name, o, method); // Custom name
}
}
}
#endregion
#region Tagged static methods
/// <summary>
/// Registers all public static methods in a class tagged with <see cref="LuaGlobalAttribute"/> as Lua global functions
/// </summary>
/// <param name="lua">The Lua VM to add the methods to</param>
/// <param name="type">The class type to get the methods from</param>
public static void TaggedStaticMethods (Lua lua, Type type)
{
#region Sanity checks
if (lua == null)
throw new ArgumentNullException ("lua");
if (type == null)
throw new ArgumentNullException ("type");
if (!type.IsClass)
throw new ArgumentException ("The type must be a class!", "type");
#endregion
foreach (var method in type.GetMethods(BindingFlags.Static | BindingFlags.Public)) {
foreach (LuaGlobalAttribute attribute in method.GetCustomAttributes(typeof(LuaGlobalAttribute), false)) {
if (string.IsNullOrEmpty (attribute.Name))
lua.RegisterFunction (method.Name, null, method); // CLR name
else
lua.RegisterFunction (attribute.Name, null, method); // Custom name
}
}
}
#endregion
#region Enumeration
/// <summary>
/// Registers an enumeration's values for usage as a Lua variable table
/// </summary>
/// <typeparam name="T">The enum type to register</typeparam>
/// <param name="lua">The Lua VM to add the enum to</param>
[SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "The type parameter is used to select an enum type")]
public static void Enumeration<T> (Lua lua)
{
#region Sanity checks
if (lua == null)
throw new ArgumentNullException ("lua");
#endregion
var type = typeof(T);
if (!type.IsEnum)
throw new ArgumentException ("The type must be an enumeration!");
#if SILVERLIGHT
string[] names = type.GetFields().Where(x => x.IsLiteral).Select(field => field.Name).ToArray();
var values = type.GetFields().Where(x => x.IsLiteral).Select(field => (T)field.GetValue(null)).ToArray();
#else
string[] names = Enum.GetNames (type);
var values = (T[])Enum.GetValues (type);
#endif
lua.NewTable (type.Name);
for (int i = 0; i < names.Length; i++) {
string path = type.Name + "." + names [i];
lua [path] = values [i];
}
}
#endregion
}
/*
* This file is part of NLua.
*
* Copyright (c) 2014 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
using System;
using System.Reflection;
using System.Diagnostics.CodeAnalysis;
using NLua.Extensions;
#if SILVERLIGHT
using System.Linq;
#endif
namespace NLua
{
public static class LuaRegistrationHelper
{
#region Tagged instance methods
/// <summary>
/// Registers all public instance methods in an object tagged with <see cref="LuaGlobalAttribute"/> as Lua global functions
/// </summary>
/// <param name="lua">The Lua VM to add the methods to</param>
/// <param name="o">The object to get the methods from</param>
public static void TaggedInstanceMethods (Lua lua, object o)
{
#region Sanity checks
if (lua == null)
throw new ArgumentNullException ("lua");
if (o == null)
throw new ArgumentNullException ("o");
#endregion
foreach (var method in o.GetType().GetMethods(BindingFlags.Instance | BindingFlags.Public)) {
foreach (LuaGlobalAttribute attribute in method.GetCustomAttributes(typeof(LuaGlobalAttribute), true)) {
if (string.IsNullOrEmpty (attribute.Name))
lua.RegisterFunction (method.Name, o, method); // CLR name
else
lua.RegisterFunction (attribute.Name, o, method); // Custom name
}
}
}
#endregion
#region Tagged static methods
/// <summary>
/// Registers all public static methods in a class tagged with <see cref="LuaGlobalAttribute"/> as Lua global functions
/// </summary>
/// <param name="lua">The Lua VM to add the methods to</param>
/// <param name="type">The class type to get the methods from</param>
public static void TaggedStaticMethods (Lua lua, Type type)
{
#region Sanity checks
if (lua == null)
throw new ArgumentNullException ("lua");
if (type == null)
throw new ArgumentNullException ("type");
if (!type.IsClass ())
throw new ArgumentException ("The type must be a class!", "type");
#endregion
foreach (var method in type.GetMethods (BindingFlags.Static | BindingFlags.Public)) {
foreach (LuaGlobalAttribute attribute in method.GetCustomAttributes (typeof(LuaGlobalAttribute), false)) {
if (string.IsNullOrEmpty (attribute.Name))
lua.RegisterFunction (method.Name, null, method); // CLR name
else
lua.RegisterFunction (attribute.Name, null, method); // Custom name
}
}
}
#endregion
#region Enumeration
/// <summary>
/// Registers an enumeration's values for usage as a Lua variable table
/// </summary>
/// <typeparam name="T">The enum type to register</typeparam>
/// <param name="lua">The Lua VM to add the enum to</param>
[SuppressMessage("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter", Justification = "The type parameter is used to select an enum type")]
public static void Enumeration<T> (Lua lua)
{
#region Sanity checks
if (lua == null)
throw new ArgumentNullException ("lua");
#endregion
var type = typeof(T);
if (!type.IsEnum ())
throw new ArgumentException ("The type must be an enumeration!");
#if SILVERLIGHT
string[] names = type.GetFields().Where(x => x.IsLiteral).Select(field => field.Name).ToArray();
var values = type.GetFields().Where(x => x.IsLiteral).Select(field => (T)field.GetValue(null)).ToArray();
#else
string[] names = Enum.GetNames (type);
var values = (T[])Enum.GetValues (type);
#endif
lua.NewTable (type.Name);
for (int i = 0; i < names.Length; i++) {
string path = type.Name + "." + names [i];
lua [path] = values [i];
}
}
#endregion
}
}
\ No newline at end of file
......@@ -326,7 +326,7 @@ namespace NLua
{
int depth = LuaLib.LuaGetTop (luaState);
#if WINDOWS_PHONE
#if WINDOWS_PHONE || NETFX_CORE
Debug.WriteLine("lua stack depth: {0}", depth);
#elif UNITY_3D
UnityEngine.Debug.Log(string.Format("lua stack depth: {0}", depth));
......@@ -345,7 +345,7 @@ namespace NLua
strrep = obj.ToString ();
}
#if WINDOWS_PHONE
#if WINDOWS_PHONE || NETFX_CORE
Debug.WriteLine("{0}: ({1}) {2}", i, typestr, strrep);
#elif UNITY_3D
UnityEngine.Debug.Log(string.Format("{0}: ({1}) {2}", i, typestr, strrep));
......@@ -400,14 +400,19 @@ namespace NLua
// Try to access by array if the type is right and index is an int (lua numbers always come across as double)
if (objType.IsArray && index is double) {
int intIndex = (int)((double)index);
#if NETFX_CORE
Type type = objType;
#else
Type type = objType.UnderlyingSystemType;
#endif
if (objType.UnderlyingSystemType == typeof(float[])) {
if (type == typeof(float[])) {
float[] arr = ((float[])obj);
translator.Push (luaState, arr [intIndex]);
} else if (objType.UnderlyingSystemType == typeof(double[])) {
} else if (type == typeof(double[])) {
double[] arr = ((double[])obj);
translator.Push (luaState, arr [intIndex]);
} else if (objType.UnderlyingSystemType == typeof(int[])) {
} else if (type == typeof(int[])) {
int[] arr = ((int[])obj);
translator.Push (luaState, arr [intIndex]);
} else {
......@@ -612,7 +617,11 @@ namespace NLua
// If we can't find the getter in our class, recurse up to the base class and see
// if they can help.
if (objType.UnderlyingSystemType != typeof(object))
#if NETFX_CORE
return GetMember (luaState, new ProxyType(objType.UnderlyingSystemType.GetTypeInfo().BaseType), obj, methodName, bindingType);
#else
return GetMember (luaState, new ProxyType(objType.UnderlyingSystemType.BaseType), obj, methodName, bindingType);
#endif
else
LuaLib.LuaPushNil (luaState);
} catch (TargetInvocationException e) { // Convert this exception into a Lua error
......@@ -932,7 +941,7 @@ namespace NLua
return 1;
}
else
return GetMember (luaState, klass, null, methodName, BindingFlags.FlattenHierarchy | BindingFlags.Static);
return GetMember (luaState, klass, null, methodName, BindingFlags.Static);
}
}
......@@ -960,7 +969,7 @@ namespace NLua
} else
target = (ProxyType)obj;
return SetMember (luaState, target, null, BindingFlags.FlattenHierarchy | BindingFlags.Static);
return SetMember (luaState, target, null, BindingFlags.Static);
}
/*
......
......@@ -204,7 +204,11 @@ namespace NLua.Method
string candidateName = null;
foreach (var member in _Members) {
#if NETFX_CORE
candidateName = member.DeclaringType.Name + "." + member.Name;
#else
candidateName = member.ReflectedType.Name + "." + member.Name;
#endif
var m = (MethodInfo)member;
bool isMethod = _Translator.MatchParameters (luaState, m, ref _LastCalledMethod);
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<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>10.0.20506</ProductVersion>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}</ProjectGuid>
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<ProjectGuid>{1E72B073-2154-4329-BC8D-94F19F91C945}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLua.WP8</RootNamespace>
<AssemblyName>NLua.WP8</AssemblyName>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<SilverlightApplication>false</SilverlightApplication>
<ValidateXaml>true</ValidateXaml>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<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;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<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;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<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>
<Optimize>false</Optimize>
<OutputPath>Bin\x86\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<Optimize>true</Optimize>
<OutputPath>Bin\x86\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
<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>
<Optimize>false</Optimize>
<OutputPath>Bin\ARM\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
<DebugType>pdbonly</DebugType>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_PHONE_APP</DefineConstants>
<Optimize>true</Optimize>
<OutputPath>Bin\ARM\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<NoWarn>;2008</NoWarn>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<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" />
......@@ -122,23 +125,17 @@
<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" />
<Compile Include="Platform\CLSCompliantAttribute.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\KeraLua\external\lua\wp8_build\lua\lua52\lua52.vcxproj">
<Project>{ABD36435-56AD-4940-B51A-10AEECA46C01}</Project>
<Name>lua52</Name>
</ProjectReference>
<ProjectReference Include="..\KeraLua\src\WP8\KeraLua.WP8.csproj">
<Project>{2C343545-0778-49BB-9665-1FA656013466}</Project>
<Name>KeraLua.WP8</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions />
<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">
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}</ProjectGuid>
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>NLua.WPSL8</RootNamespace>
<AssemblyName>NLua.WPSL8</AssemblyName>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
<SilverlightVersion>
</SilverlightVersion>
<SilverlightApplication>false</SilverlightApplication>
<ValidateXaml>true</ValidateXaml>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<TargetFrameworkProfile />
<DefaultLanguage>en-US</DefaultLanguage>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<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;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\x86\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\x86\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\ARM\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\ARM\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget />
</PropertyGroup>
<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="Properties\AssemblyInfo.cs" />
<Compile Include="ProxyType.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\KeraLua\external\lua\wpsl8_build\lua\lua52\lua52.vcxproj">
<Project>{ABD36435-56AD-4940-B51A-10AEECA46C01}</Project>
<Name>lua52</Name>
</ProjectReference>
<ProjectReference Include="..\KeraLua\src\WP8\KeraLua.WPSL8.csproj">
<Project>{2C343545-0778-49BB-9665-1FA656013466}</Project>
<Name>KeraLua.WPSL8</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions />
<!-- 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
......@@ -276,14 +276,18 @@ namespace NLua
Exception exception = null;
try {
#if NETFX_CORE
assembly = Assembly.Load (new AssemblyName (assemblyName));
#else
assembly = Assembly.Load (assemblyName);
#endif
} catch (BadImageFormatException) {
// The assemblyName was invalid. It is most likely a path.
} catch (FileNotFoundException e) {
exception = e;
}
#if !SILVERLIGHT
#if !SILVERLIGHT && !NETFX_CORE
if (assembly == null) {
try {
assembly = Assembly.Load (AssemblyName.GetAssemblyName (assemblyName));
......@@ -502,7 +506,7 @@ namespace NLua
try {
var method = klass.GetMethod (methodName, BindingFlags.Public | BindingFlags.Static |
BindingFlags.Instance | BindingFlags.FlattenHierarchy, signature);
BindingFlags.Instance, signature);
PushFunction (luaState, new LuaNativeFunction ((new LuaMethodWrapper (this, target, klass, method)).invokeFunction));
} catch (Exception e) {
ThrowError (luaState, e);
......@@ -583,7 +587,11 @@ namespace NLua
}
// Object already in the list of Lua objects? Push the stored reference.
#if NETFX_CORE
bool found = (!o.GetType().GetTypeInfo().IsValueType) && objectsBackMap.TryGetValue (o, out index);
#else
bool found = (!o.GetType().IsValueType) && objectsBackMap.TryGetValue (o, out index);
#endif
if (found) {
LuaLib.LuaLGetMetatable (luaState, "luaNet_objects");
......@@ -740,7 +748,11 @@ namespace NLua
private void CollectObject (object o, int udata)
{
objects.Remove (udata);
#if NETFX_CORE
if (!o.GetType ().GetTypeInfo ().IsValueType)
#else
if (!o.GetType ().IsValueType)
#endif
objectsBackMap.Remove (o);
}
......@@ -749,8 +761,13 @@ namespace NLua
// New object: inserts it in the list
int index = nextObj++;
objects [index] = obj;
#if NETFX_CORE
if (!obj.GetType ().GetTypeInfo().IsValueType)
#else
if (!obj.GetType().IsValueType)
objectsBackMap [obj] = index;
#endif
objectsBackMap [obj] = index;
return index;
}
......@@ -896,7 +913,7 @@ namespace NLua
{
if (o is ILuaGeneratedType) {
// Make sure we are _really_ ILuaGenerated
var typ = o.GetType ();
var typ = o.GetType ().GetTypeInfo ();
return typ.GetInterface ("ILuaGeneratedType", true) != null;
}
return false;
......@@ -996,7 +1013,7 @@ namespace NLua
int EnumFromIntInternal (LuaState luaState)
{
Type t = TypeOf (luaState, 1);
if (t == null || !t.IsEnum)
if (t == null || !t.IsEnum ())
return PushError (luaState, "Not an Enum.");
object res = null;
......
using System;
namespace System.Reflection
{
public enum BindingFlags
{
Instance = 4,
Static = 8,
Public = 16,
}
}
File mode changed from 100644 to 100755

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLua.WP8", "Core\NLua\NLua.WP8.csproj", "{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}"
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua52", "Core\KeraLua\external\lua\wp8_build\lua\lua52\lua52.vcxproj", "{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeraLua.WP8", "Core\KeraLua\src\WP8\KeraLua.WP8.csproj", "{2C343545-0778-49BB-9665-1FA656013466}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeraLua.WP8", "Core\KeraLua\src\WP8\KeraLua.WP8.csproj", "{1F139CCB-195B-402D-8776-7A15A3E05886}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua52", "Core\KeraLua\external\lua\wp8_build\lua\lua52\lua52.vcxproj", "{ABD36435-56AD-4940-B51A-10AEECA46C01}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLuaTest.WP8", "NLuaTest.WP8\NLuaTest.WP8.csproj", "{0AF57940-43F8-492B-9684-0369259C990B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLua.WP8", "Core\NLua\NLua.WP8.csproj", "{1E72B073-2154-4329-BC8D-94F19F91C945}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
......@@ -23,90 +23,64 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|ARM.ActiveCfg = Debug|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|ARM.Build.0 = Debug|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Mixed Platforms.Build.0 = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Win32.ActiveCfg = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Win32.Build.0 = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|x86.ActiveCfg = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|x86.Build.0 = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Any CPU.Build.0 = Release|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|ARM.ActiveCfg = Release|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|ARM.Build.0 = Release|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Mixed Platforms.ActiveCfg = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Mixed Platforms.Build.0 = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Win32.ActiveCfg = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Win32.Build.0 = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|x86.ActiveCfg = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|x86.Build.0 = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Debug|ARM.ActiveCfg = Debug|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Debug|ARM.Build.0 = Debug|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Mixed Platforms.Build.0 = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Win32.ActiveCfg = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Win32.Build.0 = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|x86.ActiveCfg = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|x86.Build.0 = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Release|Any CPU.Build.0 = Release|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Release|ARM.ActiveCfg = Release|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Release|ARM.Build.0 = Release|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Release|Mixed Platforms.ActiveCfg = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Mixed Platforms.Build.0 = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Win32.ActiveCfg = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Win32.Build.0 = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|x86.ActiveCfg = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|x86.Build.0 = Release|x86
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Any CPU.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|ARM.ActiveCfg = Debug|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|ARM.Build.0 = Debug|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Win32.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Win32.Build.0 = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|x86.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|x86.Build.0 = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Any CPU.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|ARM.ActiveCfg = Release|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|ARM.Build.0 = Release|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Mixed Platforms.Build.0 = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Win32.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Win32.Build.0 = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|x86.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|x86.Build.0 = Release|Win32
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Any CPU.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|ARM.ActiveCfg = Debug|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|ARM.Build.0 = Debug|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|ARM.Deploy.0 = Debug|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Mixed Platforms.Build.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Win32.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Win32.Build.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Win32.Deploy.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|x86.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|x86.Build.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|x86.Deploy.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Any CPU.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|ARM.ActiveCfg = Release|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Release|ARM.Build.0 = Release|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Release|ARM.Deploy.0 = Release|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Mixed Platforms.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Mixed Platforms.Build.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Mixed Platforms.Deploy.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Win32.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Win32.Build.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Win32.Deploy.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|x86.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|x86.Build.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|x86.Deploy.0 = Release|x86
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Debug|Any CPU.ActiveCfg = Debug|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Debug|ARM.ActiveCfg = Debug|ARM
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Debug|ARM.Build.0 = Debug|ARM
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Debug|Win32.ActiveCfg = Debug|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Debug|Win32.Build.0 = Debug|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Debug|x86.ActiveCfg = Debug|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Debug|x86.Build.0 = Debug|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Release|Any CPU.ActiveCfg = Release|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Release|ARM.ActiveCfg = Release|ARM
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Release|ARM.Build.0 = Release|ARM
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Release|Mixed Platforms.Build.0 = Release|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Release|Win32.ActiveCfg = Release|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Release|Win32.Build.0 = Release|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Release|x86.ActiveCfg = Release|Win32
{51334677-A80F-40F7-8CFE-5DA0A92AC0C6}.Release|x86.Build.0 = Release|Win32
{1F139CCB-195B-402D-8776-7A15A3E05886}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1F139CCB-195B-402D-8776-7A15A3E05886}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1F139CCB-195B-402D-8776-7A15A3E05886}.Debug|ARM.ActiveCfg = Debug|ARM
{1F139CCB-195B-402D-8776-7A15A3E05886}.Debug|ARM.Build.0 = Debug|ARM
{1F139CCB-195B-402D-8776-7A15A3E05886}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{1F139CCB-195B-402D-8776-7A15A3E05886}.Debug|Mixed Platforms.Build.0 = Debug|x86
{1F139CCB-195B-402D-8776-7A15A3E05886}.Debug|Win32.ActiveCfg = Debug|x86
{1F139CCB-195B-402D-8776-7A15A3E05886}.Debug|Win32.Build.0 = Debug|x86
{1F139CCB-195B-402D-8776-7A15A3E05886}.Debug|x86.ActiveCfg = Debug|x86
{1F139CCB-195B-402D-8776-7A15A3E05886}.Debug|x86.Build.0 = Debug|x86
{1F139CCB-195B-402D-8776-7A15A3E05886}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1F139CCB-195B-402D-8776-7A15A3E05886}.Release|Any CPU.Build.0 = Release|Any CPU
{1F139CCB-195B-402D-8776-7A15A3E05886}.Release|ARM.ActiveCfg = Release|ARM
{1F139CCB-195B-402D-8776-7A15A3E05886}.Release|ARM.Build.0 = Release|ARM
{1F139CCB-195B-402D-8776-7A15A3E05886}.Release|Mixed Platforms.ActiveCfg = Release|x86
{1F139CCB-195B-402D-8776-7A15A3E05886}.Release|Mixed Platforms.Build.0 = Release|x86
{1F139CCB-195B-402D-8776-7A15A3E05886}.Release|Win32.ActiveCfg = Release|x86
{1F139CCB-195B-402D-8776-7A15A3E05886}.Release|Win32.Build.0 = Release|x86
{1F139CCB-195B-402D-8776-7A15A3E05886}.Release|x86.ActiveCfg = Release|x86
{1F139CCB-195B-402D-8776-7A15A3E05886}.Release|x86.Build.0 = Release|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E72B073-2154-4329-BC8D-94F19F91C945}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E72B073-2154-4329-BC8D-94F19F91C945}.Debug|ARM.ActiveCfg = Debug|ARM
{1E72B073-2154-4329-BC8D-94F19F91C945}.Debug|ARM.Build.0 = Debug|ARM
{1E72B073-2154-4329-BC8D-94F19F91C945}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Debug|Mixed Platforms.Build.0 = Debug|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Debug|Win32.ActiveCfg = Debug|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Debug|Win32.Build.0 = Debug|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Debug|x86.ActiveCfg = Debug|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Debug|x86.Build.0 = Debug|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E72B073-2154-4329-BC8D-94F19F91C945}.Release|Any CPU.Build.0 = Release|Any CPU
{1E72B073-2154-4329-BC8D-94F19F91C945}.Release|ARM.ActiveCfg = Release|ARM
{1E72B073-2154-4329-BC8D-94F19F91C945}.Release|ARM.Build.0 = Release|ARM
{1E72B073-2154-4329-BC8D-94F19F91C945}.Release|Mixed Platforms.ActiveCfg = Release|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Release|Mixed Platforms.Build.0 = Release|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Release|Win32.ActiveCfg = Release|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Release|Win32.Build.0 = Release|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Release|x86.ActiveCfg = Release|x86
{1E72B073-2154-4329-BC8D-94F19F91C945}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30723.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLua.WPSL8", "Core\NLua\NLua.WPSL8.csproj", "{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeraLua.WPSL8", "Core\KeraLua\src\WP8\KeraLua.WPSL8.csproj", "{2C343545-0778-49BB-9665-1FA656013466}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lua52", "Core\KeraLua\external\lua\wpsl8_build\lua\lua52\lua52.vcxproj", "{ABD36435-56AD-4940-B51A-10AEECA46C01}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NLuaTest.WPSL8", "NLuaTest.WPSL8\NLuaTest.WPSL8.csproj", "{0AF57940-43F8-492B-9684-0369259C990B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|ARM.ActiveCfg = Debug|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|ARM.Build.0 = Debug|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Mixed Platforms.Build.0 = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Win32.ActiveCfg = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|Win32.Build.0 = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|x64.ActiveCfg = Debug|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|x86.ActiveCfg = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Debug|x86.Build.0 = Debug|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Any CPU.Build.0 = Release|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|ARM.ActiveCfg = Release|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|ARM.Build.0 = Release|ARM
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Mixed Platforms.ActiveCfg = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Mixed Platforms.Build.0 = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Win32.ActiveCfg = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|Win32.Build.0 = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|x64.ActiveCfg = Release|Any CPU
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|x86.ActiveCfg = Release|x86
{9F7E0FFB-FC0E-485B-A1E8-FE04A94E40E7}.Release|x86.Build.0 = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Debug|ARM.ActiveCfg = Debug|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Debug|ARM.Build.0 = Debug|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Mixed Platforms.Build.0 = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Win32.ActiveCfg = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|Win32.Build.0 = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|x64.ActiveCfg = Debug|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Debug|x86.ActiveCfg = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Debug|x86.Build.0 = Debug|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Release|Any CPU.Build.0 = Release|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Release|ARM.ActiveCfg = Release|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Release|ARM.Build.0 = Release|ARM
{2C343545-0778-49BB-9665-1FA656013466}.Release|Mixed Platforms.ActiveCfg = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Mixed Platforms.Build.0 = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Win32.ActiveCfg = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|Win32.Build.0 = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|x64.ActiveCfg = Release|Any CPU
{2C343545-0778-49BB-9665-1FA656013466}.Release|x86.ActiveCfg = Release|x86
{2C343545-0778-49BB-9665-1FA656013466}.Release|x86.Build.0 = Release|x86
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Any CPU.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|ARM.ActiveCfg = Debug|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|ARM.Build.0 = Debug|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Win32.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|Win32.Build.0 = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|x64.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|x86.ActiveCfg = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Debug|x86.Build.0 = Debug|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Any CPU.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|ARM.ActiveCfg = Release|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|ARM.Build.0 = Release|ARM
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Mixed Platforms.Build.0 = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Win32.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|Win32.Build.0 = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|x64.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|x86.ActiveCfg = Release|Win32
{ABD36435-56AD-4940-B51A-10AEECA46C01}.Release|x86.Build.0 = Release|Win32
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Any CPU.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|ARM.ActiveCfg = Debug|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|ARM.Build.0 = Debug|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|ARM.Deploy.0 = Debug|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Mixed Platforms.Build.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Win32.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Win32.Build.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|Win32.Deploy.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|x64.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|x86.ActiveCfg = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|x86.Build.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Debug|x86.Deploy.0 = Debug|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Any CPU.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|ARM.ActiveCfg = Release|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Release|ARM.Build.0 = Release|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Release|ARM.Deploy.0 = Release|ARM
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Mixed Platforms.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Mixed Platforms.Build.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Mixed Platforms.Deploy.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Win32.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Win32.Build.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|Win32.Deploy.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|x64.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|x86.ActiveCfg = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|x86.Build.0 = Release|x86
{0AF57940-43F8-492B-9684-0369259C990B}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
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