Example #1
0
        public override void Install(IDictionary savedState)
        {
            base.Install(savedState);

            RegistryKey AppKey    = InstrumentServerService.InstrumentalRegistryKey(true);
            string      Path      = Context.Parameters[PathArgument] ?? InstrumentServerService.DefaultBasePath();
            string      Config    = Context.Parameters[ConfigArgument] ?? InstrumentServerService.DefaultConfig();
            string      ScriptDir = Context.Parameters[ScriptsDirectoryArgument] ?? InstrumentServerService.DefaultScriptsDirectory();
            string      Hostname  = Context.Parameters[HostnameArgument] ?? InstrumentServerService.DefaultHostname();

            bool EnableScripts = InstrumentServerService.DefaultScriptsEnabled();

            if (Context.Parameters[ScriptsEnabledArgument] != null)
            {
                EnableScripts = Convert.ToBoolean(Context.Parameters[ScriptsEnabledArgument]);
            }

            AppKey.SetValue(InstrumentServerService.PathKey, Path);
            AppKey.SetValue(InstrumentServerService.ConfigKey, Config);
            AppKey.SetValue(InstrumentServerService.EnableScriptsKey, EnableScripts);
            AppKey.SetValue(InstrumentServerService.ScriptsDirectoryKey, ScriptDir);
            AppKey.SetValue(InstrumentServerService.HostnameKey, Hostname);
        }