Esempio n. 1
0
        private void testDllCopy(IGacDll iGacDll)
        {
            IISDeployment.kill_IIS_Process_W3wp();
            var tempDllLocation = iGacDll.fullPath + ".temp";

            if (File.Exists(iGacDll.fullPath) && false == File.Exists(tempDllLocation))
            {
                Files.MoveFile(iGacDll.fullPath, tempDllLocation);
                if (false == File.Exists(iGacDll.fullPath) && File.Exists(tempDllLocation))
                {
                    Files.MoveFile(tempDllLocation, iGacDll.fullPath);
                    if (File.Exists(iGacDll.fullPath) && false == File.Exists(tempDllLocation))
                    {
                        DI.log.debug("testDllCopy worked");
                    }
                    else
                    {
                        DI.log.error("in testDllCopy, restore failed");
                    }
                }
                else
                {
                    DI.log.error("in testDllCopy, move failed");
                }
            }
            else
            {
                DI.log.error("in testDllCopy, could not find gacDll or tempfile already exists");
            }
            if (File.Exists(iGacDll.fullPath) && File.Exists(tempDllLocation))
            {
                Files.deleteFile(tempDllLocation);
            }
        }
Esempio n. 2
0
 public void InstallPostSharpHook(IGacDll iGacDll, string typeToHook, string methodToHook)
 {
     if (false == PostSharpUtils.containsO2PostSharpHooks(iGacDll.fullPath))
     {
         IISDeployment.kill_IIS_Process_W3wp();
         BackupRestoreFiles.backup(iGacDll.fullPath);
         if (PostSharpExecution.InsertHooksAndRunPostSharpOnAssembly(iGacDll.fullPath, typeToHook, methodToHook))
         {
             DI.log.debug("PostSharp hooks installed on Gac Assembly: {0} (in {1})", iGacDll.name, iGacDll.fullPath);
         }
     }
     showGacAssemblyDetails(iGacDll, false);
     //throw new NotImplementedException();
 }
Esempio n. 3
0
 public void UnInstallPostSharpHook(IGacDll iGacDll)
 {
     if (false == BackupRestoreFiles.doesBackupExist(iGacDll.fullPath))
     {
         DI.log.error("Error in UnInstallPostSharpHook, could not find backup file for file: {0}", iGacDll.fullPath);
     }
     else
     {
         IISDeployment.kill_IIS_Process_W3wp();
         if (BackupRestoreFiles.restore(iGacDll.fullPath))
         {
             DI.log.debug("Gac Assembly uninstalled/restored: {0} (in {1})", iGacDll.name, iGacDll.fullPath);
         }
     }
     showGacAssemblyDetails(iGacDll, false);
     //throw new NotImplementedException();
 }
Esempio n. 4
0
 private void btDeployHostAssemblyToGac_Click(object sender, EventArgs e)
 {
     IISDeployment.deployToGac(true);
 }