public DataSynJobCommand(IDatabaseSource src, IDatabaseSource dst, DataSynDef datasyn, string outFile, List <IJobReportConfiguration> reports, DataSynGuiEnv guienv) { m_src = src; m_dst = dst; m_datasyn = datasyn; m_outFile = outFile; m_guienv = guienv; if (reports != null) { ReportConfigs.AddRange(reports); } }
private DataSynGuiEnv CreateGuiEnv(bool compare, DataSynDefItem item) { var res = new DataSynGuiEnv(); res.CompareOnly = compare; res.ItemEvent += new EventHandler <SynItemEventArgs>(res_ItemEvent); if (item != null) { res.SetFilter(item.Target.Table); } return(res); }
public Synchronizer(IDatabaseSource src, IDatabaseSource dst, IProgressInfo progress, DataSynDef datasyn, DataSynReportEnv repenv, string outFile, DataSynGuiEnv guienv) { m_source = src; m_target = dst; m_progress = progress; m_datasyn = datasyn; m_outFile = outFile; m_srcSada = m_source.Dialect.CreateDataSynAdapter(); m_dstSada = m_target.Dialect.CreateDataSynAdapter(); m_dstDDA = m_target.GetAnyDDA(); m_reportEnvObj = repenv; m_reportEnv = repenv; m_guienv = guienv; if (m_reportEnv == null) { m_reportEnv = new DummyDataSynReportEnv(); } }
public static void Synchronize(IDatabaseSource src, IDatabaseSource dst, IProgressInfo progress, DataSynDef datasyn, DataSynReportEnv repenv, string outFile, DataSynGuiEnv guienv) { Synchronizer syn = new Synchronizer(src, dst, progress, datasyn, repenv, outFile, guienv); syn.Progress = progress; syn.Run(); }
public static Job CreateJob(IDatabaseSource src, IDatabaseSource dst, DataSynDef datasyn, string outFile, List <IJobReportConfiguration> reports, JobProperties jobProps, DataSynGuiEnv guienv) { //UsageStats.Usage("datasyn_job", "src", src.ToString(), "dst", dst.ToString()); return(Job.FromCommand(new DataSynJobCommand(src, dst, datasyn, outFile, reports, guienv), jobProps)); }
private Job CreateJob(string outFile, List <IJobReportConfiguration> reports, DataSynGuiEnv guienv) { return(DataSynJob.CreateJob(m_source.CloneSource(), m_target.CloneSource(), m_datasyn, outFile, reports, null, guienv)); }