static void Main(string[] args) { string fil = "B:\\Data\\test.zip"; FileStream s = File.Open(fil, FileMode.OpenOrCreate, FileAccess.ReadWrite); CsvDb tmp = CsvDb.Create(s); CreateTable(tmp, "mytab1"); CreateTable(tmp, "my tabs\\my tab2.off"); tmp.Flush(); tmp.Dispose(); }
private Guid CreateCsvFile(Dictionary <CompoundIdentity, Tuple <int, Site> > siteDict, Dictionary <CompoundIdentity, Tuple <int, SamplingEvent> > eventDict, Dictionary <CompoundIdentity, Tuple <int, WaterQualityDeployment> > deploymentDict, List <Tuple <int, WaterQualityMeasurement> > measurementList, Dictionary <CompoundIdentity, Organization> orgDict, Dictionary <CompoundIdentity, FieldTrip> fieldTripDict, Dictionary <CompoundIdentity, FieldActivity> fieldActivityDict, Dictionary <CompoundIdentity, Project> projectDict) { IFileStoreProvider provider = FileStoreManager.Instance.GetProvider(); //Setting up temp file FilestoreFile deployFile = provider.MakeTemp(DateTime.UtcNow.AddHours(4)); CsvDb csv = CsvDb.Create(deployFile); CreateSampleEventCsv(csv, eventDict, orgDict, fieldTripDict, fieldActivityDict, projectDict); CreateMeasurementsCsv(csv, siteDict, eventDict, deploymentDict, measurementList); CreateSitesCsv(csv, siteDict); csv.Flush(); csv.Dispose(); deployFile.Close(); return(deployFile.FileId); }