Home
Manage Your Code
Snippet: SOEInterfaceInstaller (C#)
Title: SOEInterfaceInstaller Language: C#
Description: Registers the assembly containing the interface definition of the service offered by the Server Object Extension Views: 522
Author: Vish Uma Date Added: 3/10/2008
Copy Code  
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Configuration.Install;
5using System.Runtime.InteropServices;
6
7
8namespace DTS.ArcGIS.Server.SOE.LineUtilService
9{
10    [ComVisible(false)]
11    [RunInstaller(true)]
12    public partial class SOEInterfaceInstaller : Installer
13    {
14        public SOEInterfaceInstaller()
15        {
16            InitializeComponent();
17        }
18
19        public override void Install(System.Collections.IDictionary stateSaver)
20        {
21            base.Install(stateSaver);
22            RegistrationServices regSrv = new RegistrationServices();
23            regSrv.RegisterAssembly(base.GetType().Assembly,
24              AssemblyRegistrationFlags.SetCodeBase);
25        }
26
27        public override void Uninstall(System.Collections.IDictionary savedState)
28        {
29            base.Uninstall(savedState);
30            RegistrationServices regSrv = new RegistrationServices();
31            regSrv.UnregisterAssembly(base.GetType().Assembly);
32        }
33
34    }
35}