internal static bool SaveChanges(CustomFormatterSetting setting,
                                         ConfigurationElement sourceElement)
        {
            CustomFormatterData element = (CustomFormatterData)sourceElement;

            element.TypeName = setting.FormatterType;
            CustomDataWmiMapperHelper.UpdateAttributes(setting.Attributes, element.Attributes);
            return(true);
        }
        internal static bool SaveChanges(CustomTraceListenerSetting setting,
                                         ConfigurationElement sourceElement)
        {
            BasicCustomTraceListenerData element = (BasicCustomTraceListenerData)sourceElement;

            element.TypeName = setting.ListenerType;
            CustomDataWmiMapperHelper.UpdateAttributes(setting.Attributes, element.Attributes);
            if (element is CustomTraceListenerData)
            {
                ((CustomTraceListenerData)element).Formatter = setting.Formatter;
            }
            element.InitData           = setting.InitData;
            element.TraceOutputOptions = ParseHelper.ParseEnum <TraceOptions>(setting.TraceOutputOptions, false);
            SourceLevels filter;

            if (ParseHelper.TryParseEnum(setting.Filter, out filter))
            {
                element.Filter = filter;
            }
            return(true);
        }