public static int bar(AbsClass obj) { var v = (obj as SubClass); Contract.Assert(v != null); return(v.y + v.z); }
public static int foo(AbsClass obj) { var v = (obj as TestClass); Contract.Assert(v != null); return(v.y + v.x); }
public void WriteConsole(AbsClass inter, AbsClass inter2) { if (inter == null) { return; } if (inter2 == null) { return; } if (inter is Class3) { Console.Write(""); } if (inter is Class4) { Console.Write(""); } if (inter is Class1) { Console.Write(""); } if (inter is Class7) { Console.Write(""); } }
static public int get_x(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 AbsClass self = (AbsClass)checkSelf(l); pushValue(l, true); pushValue(l, self.x); 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_x(IntPtr l) { try { AbsClass self = (AbsClass)checkSelf(l); pushValue(l, true); pushValue(l, self.x); return(2); } catch (Exception e) { return(error(l, e)); } }
static public int set_x(IntPtr l) { try { AbsClass self = (AbsClass)checkSelf(l); System.Int32 v; checkType(l, 2, out v); self.x = v; pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }