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