예제 #1
0
        public static Kanal GetKanalByTworca(TwitchTV root, Tworca tworca)
        {
            var kanaly = from gra in root.Gra
                         from kanal in gra.Kanal
                         where kanal.ID == tworca.Login
                         select kanal;

            return(kanaly.FirstOrDefault());
        }
예제 #2
0
        public static void AddTworca(TwitchTV root)
        {
            Console.WriteLine("Podaj kolejno login, nazwa, link, #subów, œr. obejrzeñ: ");
            Tworca tw = new Tworca();

            tw.Login           = Console.ReadLine();
            tw.Nazwa           = Console.ReadLine();
            tw.Link            = Console.ReadLine();
            tw.Subskrybenci    = Console.ReadLine();
            tw.SredniaObejrzen = Console.ReadLine();

            root.Tworcy.Tworca.Add(tw);
        }