Exemplo 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());
            }
        }
Exemplo 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());
            }
        }