示例#1
0
        private void SetProcessorAppInstanceDefaults()
        {
            /// <summary>
            /// loads default processor app type default name and version
            /// from and configuration and saves them for later use

            ConfigurationSettings settingsFile =
                this.Context.CodePackageActivationContext.GetConfigurationPackageObject("Config").Settings;

            ConfigurationSection ProcessorServiceDefaults = settingsFile.Sections["ProcessorDefaults"];

            ProcessorManagementServiceConfig newConfig = new ProcessorManagementServiceConfig(
                ProcessorServiceDefaults.Parameters["AppTypeName"].Value,
                ProcessorServiceDefaults.Parameters["AppTypeVersion"].Value,
                ProcessorServiceDefaults.Parameters["ServiceTypeName"].Value,
                ProcessorServiceDefaults.Parameters["AppInstanceNamePrefix"].Value);

            this.Config = newConfig;
        }
        private void SetProcessorAppInstanceDefaults()
        {
            /// <summary>
            /// loads default processor app type default name and version
            /// from and configuration and saves them for later use 

            ConfigurationSettings settingsFile =
                this.ServiceInitializationParameters.CodePackageActivationContext.GetConfigurationPackageObject("Config").Settings;

            ConfigurationSection ProcessorServiceDefaults = settingsFile.Sections["ProcessorDefaults"];

            ProcessorManagementServiceConfig newConfig = new ProcessorManagementServiceConfig(
                ProcessorServiceDefaults.Parameters["AppTypeName"].Value,
                ProcessorServiceDefaults.Parameters["AppTypeVersion"].Value,
                ProcessorServiceDefaults.Parameters["ServiceTypeName"].Value,
                ProcessorServiceDefaults.Parameters["AppInstanceNamePrefix"].Value);

            this.Config = newConfig;
        }