Пример #1
0
 static public int constructor(IntPtr l)
 {
     try {
         int        argc = LuaDLL.lua_gettop(l);
         ObjIntDict o;
         if (argc == 1)
         {
             o = new ObjIntDict();
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc == 2)
         {
             System.Collections.Generic.IDictionary <System.Object, System.Int32> a1;
             checkType(l, 2, out a1);
             o = new ObjIntDict(a1);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #2
0
 static public int Clear(IntPtr l)
 {
     try {
         ObjIntDict self = (ObjIntDict)checkSelf(l);
         self.Clear();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #3
0
 static public int get_Values(IntPtr l)
 {
     try {
         ObjIntDict self = (ObjIntDict)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.Values);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #4
0
 static public int OnDeserialization(IntPtr l)
 {
     try {
         ObjIntDict    self = (ObjIntDict)checkSelf(l);
         System.Object a1;
         checkType(l, 2, out a1);
         self.OnDeserialization(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #5
0
 static public int ContainsValue(IntPtr l)
 {
     try {
         ObjIntDict   self = (ObjIntDict)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         var ret = self.ContainsValue(a1);
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #6
0
 static public int getItem(IntPtr l)
 {
     try {
         ObjIntDict    self = (ObjIntDict)checkSelf(l);
         System.Object v;
         checkType(l, 2, out v);
         var ret = self[v];
         pushValue(l, true);
         pushValue(l, ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #7
0
 static public int Add(IntPtr l)
 {
     try {
         ObjIntDict    self = (ObjIntDict)checkSelf(l);
         System.Object a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         checkType(l, 3, out a2);
         self.Add(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #8
0
 static public int setItem(IntPtr l)
 {
     try {
         ObjIntDict    self = (ObjIntDict)checkSelf(l);
         System.Object v;
         checkType(l, 2, out v);
         int c;
         checkType(l, 3, out c);
         self[v] = c;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #9
0
 static public int GetObjectData(IntPtr l)
 {
     try {
         ObjIntDict self = (ObjIntDict)checkSelf(l);
         System.Runtime.Serialization.SerializationInfo a1;
         checkType(l, 2, out a1);
         System.Runtime.Serialization.StreamingContext a2;
         checkValueType(l, 3, out a2);
         self.GetObjectData(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #10
0
 static public int TryGetValue(IntPtr l)
 {
     try {
         ObjIntDict    self = (ObjIntDict)checkSelf(l);
         System.Object a1;
         checkType(l, 2, out a1);
         System.Int32 a2;
         var          ret = self.TryGetValue(a1, out a2);
         pushValue(l, true);
         pushValue(l, ret);
         pushValue(l, a2);
         return(3);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }