コード例 #1
0
        public static void Display()
        {
            var structure = new Bank();

            structure.Add(new Person {
                Name = "Иван Алексеев", Number = "82184931"
            });
            structure.Add(new Company {
                Name = "Microsoft", RegNumber = "ewuir32141324", Number = "3424131445"
            });
            structure.Accept(new HtmlVisitor());
            structure.Accept(new XmlVisitor());
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: VDGone/TelerikAcademy-1
        public static void Main()
        {
            Bank bank = new Bank();
            Account jhonAccount = new Account("0000121", "Jhon Doe", 10000m);
            Account fooAccount = new Account("0000169", "Foo", 2000m);

            bank.AddAccount(jhonAccount);
            bank.AddAccount(fooAccount);

            jhonAccount.Accept(new DepositVisitor(400m));

            bank.Accept(new RemunerationAccountVisitor());
            bank.Accept(new WithDrawVisitor(100m));
            bank.Accept(new LogVisitor());
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: VladiTitov/Patterns
        static void Main(string[] args)
        {
            var structure = new Bank();

            structure.Add(new Person {
                Name = "Иван Алексеев", Number = "82184931"
            });
            structure.Add(new Company {
                Name = "Microsoft", RegNumber = "ewuir873540934", Number = "4573568223"
            });
            structure.Accept(new HtmlVisitor());
            structure.Accept(new XmlVisitor());

            Console.ReadLine();
        }