Beispiel #1
0
        public IAlarm NewAlarm(string type)
        {
            switch (type)
            {
            case "Digital":
                AlarmDigital alarmDigital = new AlarmDigital();
                return(alarmDigital);

            case "Analog":
                AlarmAnalog alarmAnalog = new AlarmAnalog();
                return(alarmAnalog);

            default:
                return(null);
            }
        }
		public IAlarm NewAlarm(string type)
		{
			switch (type)
			{
				case "Digital":
					AlarmDigital alarmDigital = new AlarmDigital();
					return alarmDigital;
				case "Analog":
					AlarmAnalog alarmAnalog = new AlarmAnalog();
					return alarmAnalog;
				default:
					return null;
			}
		}