-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
68 lines (52 loc) · 2.34 KB
/
Program.cs
File metadata and controls
68 lines (52 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using System;
using Balta.ContentContext;
using Balta.SharedContext;
using Balta.SubscriptionContext;
namespace Balta
{
class Program
{
static void Main(string[] args)
{
Console.Clear();
var articles = new List<Article>();
articles.Add(new Article("Artigo sobre OOP","orientacao-objetos"));
articles.Add(new Article("Artigo sobre C#","scharp"));
articles.Add(new Article("Artigo sobre .NET","dot-net"));
var courses = new List<Course>();
var courseOOP = new Course("Fundamentos OPP","fundamentos-oop");
var courseCsharp = new Course("Fundamentos C#","fundamentos-csharp");
var courseAspNet = new Course("Fundamentos ASP.NET","fundamentos-dot-net");
courses.Add(courseOOP);
courses.Add(courseCsharp);
courses.Add(courseAspNet);
var careers = new List<Career>();
var careerDotnet = new Career("Especialista .NET","especialista-dot-net");
//Fora de ordem propositalmente para testar OrderBy
var careerItem2 = new CareerItem(2,"Aprenda OOP","",null);
var careerItem = new CareerItem(1,"Comece por aqui","",courseCsharp);
var careerItem3 = new CareerItem(3,"Aprenda .NET","",courseAspNet);
careerDotnet.Items.Add(careerItem2);
careerDotnet.Items.Add(careerItem);
careerDotnet.Items.Add(careerItem3);
careers.Add(careerDotnet);
foreach(var career in careers)
{
Console.WriteLine(career.Title);
foreach(var item in career.Items.OrderBy(x=>x.Ordem))
{
Console.WriteLine($"{item.Ordem} - {item.Title}");
Console.WriteLine(item.Course?.Title);
Console.WriteLine(item.Course?.Level);
foreach(var notification in item.Notifications)
{
Console.WriteLine($"{notification.Property} - {notification.Message}");
}
}
var payPalSubscription = new PayPalSubscription();
var student = new Student();
student.Subscriptions.Add(payPalSubscription);
}
}
}
}