public void RegisterLightSoftware(IList <string> data) { IHardware hardware = this.hardwares.FirstOrDefault(h => h.Name == data[0]); if (hardware == null) { } var isValid = ValidateSoftware(data); if (isValid) { ISoftware software = softwareFactory.CreateSoftware(data.Skip(1).ToList(), "Light"); hardware.AddSoftware(data[0], software); } }