public void Define(Job job)
 {
     if (string.IsNullOrEmpty(job?.Title))
     {
         throw new ArgumentException("no, no asi no eh no");
     }
     jobs.Add(job);
 }
Beispiel #2
0
        private static Job CaptureJob()
        {
            Console.Write("Introduzca el nombre del puesto: ");
            string title = Console.ReadLine();
            var job = new Job(title);
            Console.WriteLine();

            Console.Write("Introduzca los skills, separados por coma: ");
            string allSkills = Console.ReadLine();
            Skill[] skills = allSkills.Split(',').Select(name => new Skill(name)).ToArray();

            foreach (var skill in skills)
            {
                job.AddSkill(skill);
            }

            return job;
        }