Example #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;
            }
        }
Example #2
0
 public void EnumerateFormatsTest()
 {
     var df = FileFormatFactory.Create(null).GetFileFormatDescriptions();
 }
 public void EnumerateFormatsTest()
 {
     var df = new FileFormatFactory().GetFileFormatDescriptions();
 }