AddInteger() public method

public AddInteger ( int val ) : void
val int
return void
Esempio n. 1
0
 private static void SetPlist(PBXProject proj, PlistElementArray node, ArrayList arg)
 {
     if (arg != null)
     {
         foreach (object i in arg)
         {
             object val   = i;
             var    vType = i.GetType();
             if (vType == typeof(string))
             {
                 node.AddString((string)val);
             }
             else if (vType == typeof(bool))
             {
                 node.AddBoolean((bool)val);
             }
             else if (vType == typeof(double))
             {
                 int v = int.Parse(val.ToString());
                 node.AddInteger(v);
             }
             else if (vType == typeof(ArrayList))
             {
                 var t     = node.AddArray();
                 var array = val as ArrayList;
                 SetPlist(proj, t, array);
             }
             else if (vType == typeof(Hashtable))
             {
                 var t     = node.AddDict();
                 var table = val as Hashtable;
                 SetPlist(proj, t, table);
             }
         }
     }
 }