public static List <ExceptionPolicyData> GetPolicies()
        {
            List <ExceptionPolicyData> allPolicies = new List <ExceptionPolicyData>();
            //read the config details from file or other source (db) to find the error handling section

            ////find the configuration source section
            //ConfigurationSourceSection section = ConfigurationSourceSection.GetConfigurationSourceSection();

            ////find the selected source where our config sections are stored
            //string selectedSource = section.SelectedSource;
            //NameTypeConfigurationElementCollection<ConfigurationSourceElement> sources = section.Sources;

            //ConfigurationSourceElement element = sources.Get(selectedSource);

            //if (element is SqlConfigurationSourceElement)
            //{
            //    SqlConfigurationSourceElement sqlElement = element as SqlConfigurationSourceElement;

            //    SqlConfigurationSource configurationSource =
            //        new SqlConfigurationSource(sqlElement.ConnectionString, sqlElement.GetStoredProcedure, sqlElement.SetStoredProcedure,
            //                                   sqlElement.RefreshStoredProcedure, sqlElement.RemoveStoredProcedure);

            //find all the exception policies
            NamedElementCollection <ExceptionPolicyData> policies =
                ((ExceptionHandlingSettings)ConfigurationSourceFactory.Create().GetSection("exceptionHandling")).ExceptionPolicies;

            //find just the one specified
            if (policies != null)
            {
                policies.ForEach(delegate(ExceptionPolicyData currentPolicy)
                {
                    allPolicies.Add(currentPolicy);
                }
                                 );
            }
            //}

            allPolicies.Sort(new UniversalComparer <ExceptionPolicyData>("Name"));
            return(allPolicies);
        }
 public CategoryTraceSourceCollectionNode Build()
 {
     node = new CategoryTraceSourceCollectionNode();
     traceSources.ForEach(new Action <TraceSourceData>(CreateTraceSourceNode));
     return(node);
 }