From 98107498d84db86f42ca6c63d22f642d9997366d Mon Sep 17 00:00:00 2001 From: Hazel Megan Date: Wed, 9 Feb 2022 14:13:06 +0000 Subject: [PATCH] Make sure that all CustomAnalyzers are correctly converted into processors especially any using the "ANYOF:" prefix for #503 --- .../RapidXaml.Analysis/XamlAnalysis/RapidXamlDocument.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/VSIX/RapidXaml.Analysis/XamlAnalysis/RapidXamlDocument.cs b/VSIX/RapidXaml.Analysis/XamlAnalysis/RapidXamlDocument.cs index 0eb9272a..95eb93c3 100644 --- a/VSIX/RapidXaml.Analysis/XamlAnalysis/RapidXamlDocument.cs +++ b/VSIX/RapidXaml.Analysis/XamlAnalysis/RapidXamlDocument.cs @@ -189,13 +189,8 @@ public static XamlElementProcessor GetEveryElementProcessor(ProjectType projectT customProcessors.Add(new CustomAnalysis.SliderAnalyzer(vsAbstraction, logger)); customProcessors.Add(new CustomAnalysis.StepperAnalyzer(vsAbstraction, logger)); - for (int i = 0; i < customProcessors.Count; i++) - { - ICustomAnalyzer customProcessor = customProcessors[i]; - processors.Add( - (customProcessor.TargetType(), - new CustomProcessorWrapper(customProcessor, projType, projectFilePath, logger, vsAbstraction))); - } + // Make sure that all custom analyzers are correctly used as processors + processors.AddRange(WrapCustomProcessors(customProcessors, projType, projectFilePath, logger, vsAbstraction)); } return processors;