protected PipelineElement GetPipelineConfigurationElement(string pipelineName) { Contract.Requires(pipelineName != string.Empty); PipelineFrameworkConfigurationSection section = (PipelineFrameworkConfigurationSection)(ConfigurationManager.GetSection("pipelineFramework")); PipelineElement pipelineElement = section.Pipelines.GetByName(pipelineName); if (pipelineElement == null) { throw new ConfigurationErrorsException( string.Format("Pipeline '{0}' is missing from the pipelineFramework configuration section.", pipelineName)); } return(pipelineElement); }
private static ProviderFeatureElement GetProviderFeatureElement(string providerFeature) { PipelineFrameworkConfigurationSection config = (PipelineFrameworkConfigurationSection)ConfigurationManager.GetSection("pipelineFramework"); ProviderFeatureElement feature = config.Providers.GetByName(providerFeature); if (feature == null) { throw new ConfigurationErrorsException( string.Format("The provider feature '{0}' is missing from the pipeline framework's provider section.", providerFeature)); } if (feature.Count == 0) { throw new ConfigurationErrorsException( string.Format("The provider feature '{0}' has no providers defined.", providerFeature)); } return(feature); }