Exemplo n.º 1
0
        public static ImporterServiceFactory GetInstance()
        {
            if (ImporterService == null)
            {
                ImporterService = new ImporterServiceFactory();
            }

            return(ImporterService);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var importerService = ImporterServiceFactory.GetInstance();

            var importerFactory = importerService.GetImporterFactory();

            var prospect = importerFactory.GetNewProspect();

            var prospectStrat = importerFactory.GetProspectStrategy();

            var prospectImporter = importerFactory.GetProspectImporter();


            prospectImporter.UseStrategy(prospectStrat);
            prospectImporter.Import(prospect);
        }