PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 4ms 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
 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
10using System.ComponentModel;
11using System.Configuration.Install;
12using System.Reflection;
13
14namespace Web.Management.PHP.Setup
15{
16
17    [RunInstaller(true)]
18    public class SetupAction : Installer
19    {
20
21        public override void Install(System.Collections.IDictionary stateSaver)
22        {
23            base.Install(stateSaver);
24
25            Assembly assembly = Assembly.GetExecutingAssembly();
26            AssemblyName assemblyName = assembly.GetName();
27            string assemblyFullName = assemblyName.FullName;
28            string clientAssemblyFullName = assemblyFullName.Replace(assemblyName.Name, "Web.Management.PHP");
29
30            InstallUtil.AddUIModuleProvider("PHP", "Web.Management.PHP.PHPProvider, " + clientAssemblyFullName);
31        }
32
33        public override void Uninstall(System.Collections.IDictionary savedState)
34        {
35            base.Uninstall(savedState);
36
37            InstallUtil.RemoveUIModuleProvider("PHP");
38        }
39    }
40}