Alarm.ExtentionMethods.AddAlarm C# (CSharp) Метод

AddAlarm() публичный статический Метод

public static AddAlarm ( this client, Alarm alarm ) : Alarm
client this
alarm Alarm
Результат Alarm
        public static Alarm AddAlarm(this Client client, Alarm alarm)
        {
            IXPFile file = new IXPFile();
            file.NetworkFunction = "com.projectgame.clock.alarm.registeralarm";
            file.PutInfo("name", alarm.Name);
            file.PutInfo("hours", "" + alarm.Hours);
            file.PutInfo("minutes", "" + alarm.Minutes);
            file.PutInfo("seconds", "" + alarm.Seconds);
            file.PutInfo("mon", alarm.Mon ? "TRUE" : "FALSE");
            file.PutInfo("tue", alarm.Tue ? "TRUE" : "FALSE");
            file.PutInfo("wed", alarm.Wed ? "TRUE" : "FALSE");
            file.PutInfo("thu", alarm.Thu ? "TRUE" : "FALSE");
            file.PutInfo("fri", alarm.Fri ? "TRUE" : "FALSE");
            file.PutInfo("sat", alarm.Sat ? "TRUE" : "FALSE");
            file.PutInfo("sun", alarm.Sun ? "TRUE" : "FALSE");
            file.PutInfo("enabled", alarm.Enabled ? "TRUE" : "FALSE");
            int id = int.Parse(client.SimpleRequest(file));
            alarm.ID = id;
            return alarm;
        }