Presentation is loading. Please wait.

Presentation is loading. Please wait.

DEV415. You are in a dark room with no signs of life. You still have your torch and $356. You can go North (N) or South (S). Your choice? _.

Similar presentations


Presentation on theme: "DEV415. You are in a dark room with no signs of life. You still have your torch and $356. You can go North (N) or South (S). Your choice? _."— Presentation transcript:

1 DEV415

2

3

4

5 You are in a dark room with no signs of life. You still have your torch and $356. You can go North (N) or South (S). Your choice? _

6

7

8

9

10

11

12

13

14

15

16

17

18

19 async void ServeCustomer(Customer customer) { var order = TakeOrder(customer); try { var pizza = await GetSomeoneToMakeThePizza(order); GivePizzaToCustomer(customer, pizza); using (var employee = GetNewEmployee()) { await WaitForCustomerToFinishEating(); employee.CleanUpCustomerRubbish(); } catch (PizzaMakingException ex) { }

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34 Head to... aka.ms/te

35

36

37 void CallYield() { int callIndex = 0; Console.WriteLine(“ Call - 1"); foreach (var number in GetNumbers()) { Console.WriteLine(" Call: " + callIndex++); } IEnumerable GetNumbers() { Console.WriteLine("Before 1"); yield return 1; Console.WriteLine("Before 2"); yield return 2; Console.WriteLine("Yield finished"); } Call - 1 Before 1 Call: 0 Before 2 Call: 1 Yield finished Call: 2


Download ppt "DEV415. You are in a dark room with no signs of life. You still have your torch and $356. You can go North (N) or South (S). Your choice? _."

Similar presentations


Ads by Google