static StackObject *LogFormat_18(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 4);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Object[] @args = (System.Object[]) typeof(System.Object[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.String @format = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            UnityEngine.LogType @logType = (UnityEngine.LogType) typeof(UnityEngine.LogType).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            UnityEngine.ILogger instance_of_this_method = (UnityEngine.ILogger) typeof(UnityEngine.ILogger).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.LogFormat(@logType, @format, @args);

            return(__ret);
        }
示例#2
0
 static public int IsLogTypeAllowed(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
         UnityEngine.LogType a1;
         a1 = (UnityEngine.LogType)LuaDLL.luaL_checkinteger(l, 2);
         var ret = self.IsLogTypeAllowed(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
        static StackObject *LogError_17(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 4);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Object @context = (UnityEngine.Object) typeof(UnityEngine.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Object @message = (System.Object) typeof(System.Object).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            System.String @tag = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            UnityEngine.ILogger instance_of_this_method = (UnityEngine.ILogger) typeof(UnityEngine.ILogger).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.LogError(@tag, @message, @context);

            return(__ret);
        }
示例#4
0
 static public int get_filterLogType(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.filterLogType);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
示例#5
0
 static public int set_logEnabled(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.logEnabled = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
        public static Action <LogData, string> CreateWSSharpProxyLoggerOutput(UnityEngine.ILogger logger)
        {
            const string tag = "WebSocket";

            return((data, s) =>
            {
                switch (data.Level)
                {
                case LogLevel.Trace:
                case LogLevel.Debug:
                case LogLevel.Info:
                    logger.Log(tag, data.Message);
                    break;

                case LogLevel.Warn:
                    logger.LogWarning(tag, data.Message);
                    break;

                case LogLevel.Error:
                case LogLevel.Fatal:
                    logger.LogError(tag, data.Message);
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            });
        }
示例#7
0
 static public int LogError(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 3)
         {
             UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
             System.String       a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             self.LogError(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 4)
         {
             UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
             System.String       a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             UnityEngine.Object a3;
             checkType(l, 4, out a3);
             self.LogError(a1, a2, a3);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function LogError to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
 static public int get_logEnabled(IntPtr l)
 {
     try {
         UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.logEnabled);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_filterLogType(IntPtr l)
 {
     try {
         UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.filterLogType);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#10
0
        static int _g_get_filterLogType(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.ILogger __cl_gen_to_be_invoked = (UnityEngine.ILogger)translator.FastGetCSObj(L, 1);
                translator.Push(L, __cl_gen_to_be_invoked.filterLogType);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
示例#11
0
        static int _s_set_logEnabled(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                UnityEngine.ILogger __cl_gen_to_be_invoked = (UnityEngine.ILogger)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.logEnabled = LuaAPI.lua_toboolean(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
        static StackObject *get_filterLogType_4(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.ILogger instance_of_this_method = (UnityEngine.ILogger) typeof(UnityEngine.ILogger).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.filterLogType;

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
 static public int LogException(IntPtr l)
 {
     try {
         UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
         System.Exception    a1;
         checkType(l, 2, out a1);
         self.LogException(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_logEnabled(IntPtr l)
 {
     try {
         UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.logEnabled = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_filterLogType(IntPtr l)
 {
     try {
         UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
         UnityEngine.LogType v;
         checkEnum(l, 2, out v);
         self.filterLogType = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int IsLogTypeAllowed(IntPtr l)
 {
     try {
         UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
         UnityEngine.LogType a1;
         checkEnum(l, 2, out a1);
         var ret = self.IsLogTypeAllowed(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
        static StackObject *get_logEnabled_2(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.ILogger instance_of_this_method = (UnityEngine.ILogger) typeof(UnityEngine.ILogger).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.logEnabled;

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value      = result_of_this_method ? 1 : 0;
            return(__ret + 1);
        }
        static StackObject *set_logEnabled_3(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Boolean @value = ptr_of_this_method->Value == 1;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.ILogger instance_of_this_method = (UnityEngine.ILogger) typeof(UnityEngine.ILogger).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.logEnabled = value;

            return(__ret);
        }
 static public int LogFormat(IntPtr l)
 {
     try {
         UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
         UnityEngine.LogType a1;
         checkEnum(l, 2, out a1);
         System.String a2;
         checkType(l, 3, out a2);
         System.Object[] a3;
         checkParams(l, 4, out a3);
         self.LogFormat(a1, a2, a3);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
        static StackObject *LogException_19(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Exception @exception = (System.Exception) typeof(System.Exception).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.ILogger instance_of_this_method = (UnityEngine.ILogger) typeof(UnityEngine.ILogger).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.LogException(@exception);

            return(__ret);
        }
        static StackObject *get_logHandler_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.ILogger instance_of_this_method = (UnityEngine.ILogger) typeof(UnityEngine.ILogger).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.logHandler;

            object obj_result_of_this_method = result_of_this_method;

            if (obj_result_of_this_method is CrossBindingAdaptorType)
            {
                return(ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance));
            }
            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
示例#22
0
        static int _m_LogError(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.ILogger __cl_gen_to_be_invoked = (UnityEngine.ILogger)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3))
                {
                    string tag     = LuaAPI.lua_tostring(L, 2);
                    object message = translator.GetObject(L, 3, typeof(object));

                    __cl_gen_to_be_invoked.LogError(tag, message);



                    return(0);
                }
                if (__gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && translator.Assignable <object>(L, 3) && translator.Assignable <UnityEngine.Object>(L, 4))
                {
                    string             tag     = LuaAPI.lua_tostring(L, 2);
                    object             message = translator.GetObject(L, 3, typeof(object));
                    UnityEngine.Object context = (UnityEngine.Object)translator.GetObject(L, 4, typeof(UnityEngine.Object));

                    __cl_gen_to_be_invoked.LogError(tag, message, context);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.ILogger.LogError!"));
        }
示例#23
0
        static int _m_LogException(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.ILogger __cl_gen_to_be_invoked = (UnityEngine.ILogger)translator.FastGetCSObj(L, 1);


            try {
                {
                    System.Exception exception = (System.Exception)translator.GetObject(L, 2, typeof(System.Exception));

                    __cl_gen_to_be_invoked.LogException(exception);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
示例#24
0
        static int _m_IsLogTypeAllowed(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.ILogger __cl_gen_to_be_invoked = (UnityEngine.ILogger)translator.FastGetCSObj(L, 1);


            try {
                {
                    UnityEngine.LogType logType; translator.Get(L, 2, out logType);

                    bool __cl_gen_ret = __cl_gen_to_be_invoked.IsLogTypeAllowed(logType);
                    LuaAPI.lua_pushboolean(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
示例#25
0
        static int _m_LogFormat(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.ILogger __cl_gen_to_be_invoked = (UnityEngine.ILogger)translator.FastGetCSObj(L, 1);


            try {
                {
                    UnityEngine.LogType logType; translator.Get(L, 2, out logType);
                    string   format = LuaAPI.lua_tostring(L, 3);
                    object[] args   = translator.GetParams <object>(L, 4);

                    __cl_gen_to_be_invoked.LogFormat(logType, format, args);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
示例#26
0
 static public int LogFormat(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
         UnityEngine.LogType a1;
         a1 = (UnityEngine.LogType)LuaDLL.luaL_checkinteger(l, 2);
         System.String a2;
         checkType(l, 3, out a2);
         System.Object[] a3;
         checkParams(l, 4, out a3);
         self.LogFormat(a1, a2, a3);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
 static public int LogError(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 3)
         {
             UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
             System.String       a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             self.LogError(a1, a2);
             pushValue(l, true);
             return(1);
         }
         else if (argc == 4)
         {
             UnityEngine.ILogger self = (UnityEngine.ILogger)checkSelf(l);
             System.String       a1;
             checkType(l, 2, out a1);
             System.Object a2;
             checkType(l, 3, out a2);
             UnityEngine.Object a3;
             checkType(l, 4, out a3);
             self.LogError(a1, a2, a3);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function LogError to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#28
0
 public LoaggerWrapper(UnityEngine.ILogger logger)
 {
     this.logger = logger;
 }
示例#29
0
 public static Domain.UseCase.ILogger ToUseCaseLogger(this UnityEngine.ILogger logger)
 {
     return(new LoaggerWrapper(logger));
 }
示例#30
0
 public LogHandler()
 {
     _strBuilder = new StringBuilder();
     _uLogger    = UnityEngine.Debug.unityLogger;
 }