public void SetUp () { ins = new Installer (); state = new Hashtable (); sub1 = new MyInstaller (); sub2 = new MyInstaller (); BfInstEvt = new CallInfo (); AfInstEvt = new CallInfo (); CommittingEvt = new CallInfo (); CommittedEvt = new CallInfo (); BfRbackEvt = new CallInfo (); AfRbackEvt = new CallInfo (); BfUninsEvt = new CallInfo (); AfUninsEvt = new CallInfo ();; ins.Installers.Add (sub1); ins.Installers.Add (sub2); ins.BeforeInstall += new InstallEventHandler (onBeforeInstall); ins.AfterInstall += new InstallEventHandler (onAfterInstall); ins.Committing += new InstallEventHandler (onCommitting); ins.Committed += new InstallEventHandler (onCommitted); ins.BeforeRollback += new InstallEventHandler (onBeforeRollback); ins.AfterRollback += new InstallEventHandler (onAfterRollback); ins.BeforeUninstall += new InstallEventHandler (onBeforeUninstall); ins.AfterUninstall += new InstallEventHandler (onAfterUninstall); }
private void button1_Click(object sender, EventArgs e) { MyInstaller installer = new MyInstaller(); installer.InstallApplication(@"C:\Users\rafael.DESKTOP-D898I0K\Documents\GitHub\Bases-de-datos-B\ProyectoBasesDeDatosDistribuidas\bin\Release\ProyectoBasesDeDatosDistribuidas.application"); MessageBox.Show("Installer object created."); }
public void SetUp () { ins = new TransactedInstaller (); state = new Hashtable (); sub1 = new SucceedInstaller (); sub2 = new FailureInstaller (); sub3 = new SucceedInstaller (); BfInstEvt = new CallInfo (); AfInstEvt = new CallInfo (); CommittingEvt = new CallInfo (); CommittedEvt = new CallInfo (); BfRbackEvt = new CallInfo (); AfRbackEvt = new CallInfo (); BfUninsEvt = new CallInfo (); AfUninsEvt = new CallInfo (); ins.Installers.Add (sub1); string [] cmdLine = new string [] { "/logToConsole=false" }; ins.Context = new InstallContext ("", cmdLine); // no log file ins.BeforeInstall += new InstallEventHandler (onBeforeInstall); ins.AfterInstall += new InstallEventHandler (onAfterInstall); ins.Committing += new InstallEventHandler (onCommitting); ins.Committed += new InstallEventHandler (onCommitted); ins.BeforeRollback += new InstallEventHandler (onBeforeRollback); ins.AfterRollback += new InstallEventHandler (onAfterRollback); ins.BeforeUninstall += new InstallEventHandler (onBeforeUninstall); ins.AfterUninstall += new InstallEventHandler (onAfterUninstall); }
private void _installerBGWorker_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker bgWorker = sender as BackgroundWorker; // 开始执行安装方法 _installer = new MyInstaller(); _installer.Install(bgWorker, _installPackager); }
protected override void Context() { base.Context(); Sut = new MyInstaller { GetLoggerImplementation = () => LoggerImplementation.Null }; }
protected override void Context() { base.Context(); Sut = new MyInstaller(); }
protected override void Context() { base.Context(); Sut = new MyInstaller { GetLoggerImplementation = () => LoggerImplementation.Null }; }