Exemplo n.º 1
0
        protected Guid ScheduleExportTableJob(string schemaName, string tableName, string path, QueueType queueType)
        {
            var queue = String.Format("Graywulf.Controller.Controller.{0}", queueType.ToString());

            using (var context = ContextManager.Instance.CreateContext(ConnectionMode.AutoOpen, TransactionMode.AutoCommit))
            {
                var user = SignInTestUser(context);

                var ef = new EntityFactory(context);
                var f = ef.LoadEntity<Federation>(Federation.AppSettings.FederationName);

                var format = new FileFormatFactory().GetFileFormatDescription("Jhu.Graywulf.Format.CsvFile");

                var source = new Jhu.Graywulf.Schema.Table()
                {
                    Dataset = user.GetUserDatabaseInstance(f.MyDBDatabaseVersion).GetDataset(),  // TODO: fix this
                    SchemaName = schemaName,
                    TableName = tableName
                };

                var etf = new ExportTableFactory(context);
                var ji = etf.ScheduleAsJob(
                    source,
                    path,
                    format,
                    queue,
                    "");

                ji.Save();

                return ji.Guid;
            }
        }
Exemplo n.º 2
0
 public void EnumerateFormatsTest()
 {
     var df = FileFormatFactory.Create(null).GetFileFormatDescriptions();
 }
Exemplo n.º 3
0
 public void EnumerateFormatsTest()
 {
     var df = new FileFormatFactory().GetFileFormatDescriptions();
 }