Esempio n. 1
0
        static void Main(string[] args)
        {
            DRFactory factory = new DRFactory();

            DestributedRepository[] repos =
            {
                factory.createRepository(), factory.createRepository(), factory.createRepository(),
                factory.createRepository(), factory.createRepository(), factory.createRepository()
            };

            repos[0].setData("some data");

            foreach (DestributedRepository repo in repos)
            {
                System.Console.WriteLine(repo.getData());
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            DRFactory factory = new DRFactory();

            DestributedRepository[] repos = {
                factory.createRepository(), factory.createRepository(), factory.createRepository(),
                factory.createRepository(), factory.createRepository(), factory.createRepository()
            };

            repos[0].setData("some data");

            foreach (DestributedRepository repo in repos)
            {
                System.Console.WriteLine(repo.getData());
            }
        }