Пример #1
0
        public void Subscribe(string journalName, int id)
        {
            BaseJournal journal = journals.Find(j => j.Name == journalName.Trim().ToLowerInvariant());

            Subscriber.Subscriber subscriber = subscribers.Find(s => s.Id == id);
            journal.Subscribe(subscriber);
        }
Пример #2
0
        public void CreateCharacter(string name, string family, string birthdate, GenderType genderType)
        {
            Subscriber.Subscriber subscriber = new Subscriber.Subscriber()
            {
                personalInformation = new PersonalInformation()
                {
                    Name      = name,
                    Family    = family,
                    BirthDate = birthdate,
                    Gender    = genderType
                }
            };

            subscribers.Add(subscriber);
            subscriber.Id = subscribers.IndexOf(subscriber);

            Console.WriteLine($"Character {subscriber.Id} has been created");
            Console.WriteLine(subscriber.ToString());
        }