Esempio n. 1
0
        public static DevicePlacetype CreateInstanceFromDataAngineModel(device_placetype d)
        {
            if (null == d)
            {
                return(null);
            }
            DevicePlacetype de = new DevicePlacetype();

            de.ID   = d.id;
            de.Name = d.name;
            return(de);
        }
Esempio n. 2
0
        public static DevicePlacetype CreateInstanceFromJSON(string json)
        {
            DevicePlacetype msg = null;

            try
            {
                msg = (DevicePlacetype)JsonConvert.DeserializeObject(json, typeof(DevicePlacetype));
            }
            catch (Exception e)
            {
                Console.WriteLine(e.StackTrace + e.Message);
            }
            return(msg);
        }
Esempio n. 3
0
 public static DevicePlacetype[] CreateInstanceFromDataAngineModel(device_placetype[] ds)
 {
     if (null == ds)
     {
         return(null);
     }
     DevicePlacetype[] des = new DevicePlacetype[ds.Length];
     for (int i = 0; i < ds.Length; i++)
     {
         DevicePlacetype de = new DevicePlacetype();
         de.ID   = ds[i].id;
         de.Name = ds[i].name;
         des[i]  = de;
     }
     return(des);
 }