예제 #1
0
        private static void import(CatfishDbContext Db)
        {
            Console.InputEncoding = Encoding.UTF8;
            XElement file = XElement.Load(Console.OpenStandardInput());

            IngestionService srv = new IngestionService(Db);

            srv.Import(file);

            Db.SaveChanges();
        }
예제 #2
0
        private static void export(CatfishDbContext Db)
        {
            IngestionService srv    = new IngestionService(Db);
            Stream           stream = Console.OpenStandardOutput();

            srv.Export(stream);

            StreamWriter standardOutput = new StreamWriter(stream);

            standardOutput.AutoFlush = true;
            Console.SetOut(standardOutput);
        }
예제 #3
0
        private static void import(CatfishDbContext Db)
        {
#if DEBUG
            Console.Error.WriteLine("Starting ingestion import...");
#endif

            Console.InputEncoding = Encoding.UTF8;

            IngestionService srv = new IngestionService(Db);
            srv.Import(Console.OpenStandardInput(), 4);

            Db.SaveChanges();
        }