public void Execute(IDataCommand dataCommand) { ILight light = dataCommand.GetDevice() as ILight; if (light != null) { light.IncrementLight(); } }
public void IncrementLight() { ILight tv = GetTv(); if (tv != null) { tv.IncrementLight(); } }