예제 #1
0
파일: Program.cs 프로젝트: kuskmen/Random
        static void Main(string[] args)
        {
            SingleBet singleBet = new SingleBet();
            ComboBet  comboBet  = new ComboBet();

            singleBet.PlaceBet();
            comboBet.PlaceBet();
        }
예제 #2
0
        static void Main(string[] args)
        {
            DbController dc = new DbController();

            SingleBet sb = new SingleBet();
            ComboBet  cb = new ComboBet();

            // subscribe
            sb.BetPlaced += dc.OnBetPlaced;
            cb.BetPlaced += dc.OnBetPlaced;

            sb.PlaceBet();
            cb.PlaceBet();

            // unsubscribe
            sb.BetPlaced -= dc.OnBetPlaced;
            cb.BetPlaced -= dc.OnBetPlaced;
        }