PageRenderTime 54ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/beta-1.0.2/Setup/PHPManagerSetupHelper/SetupAction.cs

#
C# | 40 lines | 24 code | 8 blank | 8 comment | 0 complexity | 79a456b18edcfe53a7b09e957f31b7f7 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. //-----------------------------------------------------------------------
  2. // <copyright>
  3. // Copyright (C) Ruslan Yakushev for the PHP Manager for IIS project.
  4. //
  5. // This file is subject to the terms and conditions of the Microsoft Public License (MS-PL).
  6. // See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL for more details.
  7. // </copyright>
  8. //-----------------------------------------------------------------------
  9. using System.ComponentModel;
  10. using System.Configuration.Install;
  11. using System.Reflection;
  12. namespace Web.Management.PHP.Setup
  13. {
  14. [RunInstaller(true)]
  15. public class SetupAction : Installer
  16. {
  17. public override void Install(System.Collections.IDictionary stateSaver)
  18. {
  19. base.Install(stateSaver);
  20. Assembly assembly = Assembly.GetExecutingAssembly();
  21. AssemblyName assemblyName = assembly.GetName();
  22. string assemblyFullName = assemblyName.FullName;
  23. string clientAssemblyFullName = assemblyFullName.Replace(assemblyName.Name, "Web.Management.PHP");
  24. InstallUtil.AddUIModuleProvider("PHP", "Web.Management.PHP.PHPProvider, " + clientAssemblyFullName);
  25. }
  26. public override void Uninstall(System.Collections.IDictionary savedState)
  27. {
  28. base.Uninstall(savedState);
  29. InstallUtil.RemoveUIModuleProvider("PHP");
  30. }
  31. }
  32. }