예제 #1
0
 public AlarmaContext(IAlarma _estado)
 {
     Estado = _estado ?? throw new ArgumentNullException(nameof(_estado));
     this.CambiandoEstadoAlarma(Estado);
 }
예제 #2
0
 public void CambiandoEstadoAlarma(IAlarma _estado)
 {
     Console.WriteLine($"Cambiando Estado a {_estado.GetType().Name}.");
     this.Estado = _estado;
 }