Alarm.ExtentionMethods.GetAlarms C# (CSharp) Méthode

GetAlarms() public static méthode

public static GetAlarms ( this client ) : List
client this
Résultat List
        public static List<Alarm> GetAlarms(this Client client)
        {
            IXPFile file = new IXPFile();
            file.NetworkFunction = "com.projectgame.clock.alarm.getalarms";
            IXPFile response = client.IXPRequest(file);

            List<Alarm> alarms = new List<Alarm>();
            int count = int.Parse(response.GetInfoValue("alarm_count"));
            for(int i = 0; i < count; i++) {
                int id = int.Parse(response.GetInfoValue("alarm_" + i));
                alarms.Add(client.GetAlarm(id));
            }

            return alarms;
        }