Example #1
0
        public static void Main(string [] args)
        {
            if (args.Length > 0)
            {
                foreach (String arg in args)
                {
                    Console.WriteLine("Exporting {0}", arg);
                    ConfigController         cfgController            = new ConfigController();
                    ExporterController       exporterController       = new ExporterController(cfgController);
                    ExportSettingsController exportSettingsController = new ExportSettingsController(exporterController);

                    String output;
                    Uri    ExecUri     = new Uri(System.Reflection.Assembly.GetEntryAssembly().GetName().CodeBase, UriKind.Absolute);
                    Uri    RelativeUri = new Uri(arg, UriKind.Relative);
                    Uri    MergedUri   = new Uri(ExecUri, RelativeUri);
                    Console.WriteLine(MergedUri);

                    cfgController            = new ConfigController();
                    exporterController       = new ExporterController(cfgController);
                    exportSettingsController = new ExportSettingsController(exporterController);

                    exportSettingsController.LoadSettings(MergedUri, out output);
                    exporterController.Export(out output);
                    Console.WriteLine(output);
                }
            }
            else
            {
                Application.Init();

                new MainClass(args);
            }
        }
Example #2
0
 private void initControllers()
 {
     cfgController            = new ConfigController();
     exporterController       = new ExporterController(cfgController);
     exportSettingsController = new ExportSettingsController(exporterController);
 }
 public ExportSettingsController(ExporterController exporter)
 {
     this.exporter = exporter;
     serializer    = new XmlSerializer(typeof(ExportSettings));
 }