Ejemplo n.º 1
0
 public int Add(INoble noble)
 {
     if (noble.ID == 0)
     {
         noble.ID = lastNobleId++;
     }
     nobles.Add(noble.ID, noble);
     return(noble.ID);
 }
Ejemplo n.º 2
0
        public int Execute()
        {
            IInstitute institute = instituteRepository.Get(instituteId);

            if (institute != null)
            {
                INoble noble = domainFactory.CreateNoble(title, institute.ID);
                nobleRepository.Add(noble);
                noble.AddObserver(nobleObserver);
                nobleId = noble.ID;
                return(0);
            }
            return(1);
        }
Ejemplo n.º 3
0
 public void Notify(INoble noble)
 {
     Console.WriteLine(noble.ID + ". " + noble.Title + " skill: " + noble.Skill + ", works published: " + noble.WorksPublished + "\n");
 }