Пример #1
0
 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);
     }
 }
Пример #2
0
        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);
        }
Пример #3
0
 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();
     }
 }
Пример #4
0
        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();
        }
Пример #5
0
 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));
 }
Пример #6
0
 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));
 }