예제 #1
0
        static async Task Main(string[] args)
        {
            List <Person> list;



            ConnectionOptions connectionOptions = new ConnectionOptions();

            ServiceLayer.ServiceLayer serviceLayer =
                new ServiceLayer.ServiceLayer(connectionOptions);
            //list = serviceLayer.GetPersonList();


            DirectoryOptions dirOptions   = new DirectoryOptions();
            XmlGenerator     xmlGenerator = new XmlGenerator(dirOptions);

            //xmlGenerator.ListToXml(list, dirOptions);


            //Monitoring.Update();


            list = await serviceLayer.GetPersonListAsync();


            xmlGenerator.ListToXml(list, dirOptions);


            Monitoring.Update();

            //Console.WriteLine("Hello World!");
        }
        public void GenerateXmlFile()
        {
            var access = new PersonRepository(configOptions.DataBaseOptions.ConnectionString);

            access.GetPerson();
            var xmlGenerator = new XmlGenerator <Person>();

            xmlGenerator.Generate(configOptions.StorageOptions.SourseFileName, access.People);
        }
예제 #3
0
        public void GetInformation()
        {
            OrderService orderService = new OrderService();
            List <RequiredInformation> information = new List <RequiredInformation>();

            information = orderService.GetInformation(connectionString);
            XmlGenerator xmlGenerator = new XmlGenerator();

            xmlGenerator.CreateXml(information);
            FileTransfer fileTransfer = new FileTransfer();

            fileTransfer.SendFile(dataOptions);
        }