예제 #1
0
 public void ExecutePropertyWriteActions(XElement element, ValueInfo info, MSBuildValueKind kind, ExpressionNode node)
 {
     if (Context.GetPropertyWriteActions(info.Name, out var actions))
     {
         var ctx = new PropertyWriteDiagnosticContext(this, element, info, kind, node);
         foreach (var(analyzer, action) in actions)
         {
             try {
                 if (!analyzer.Disabled)
                 {
                     action(ctx);
                 }
             } catch (Exception ex) {
                 Context.ReportAnalyzerError(analyzer, ex);
             }
         }
     }
 }
 public void ExecutePropertyWriteActions(MSBuildPropertyElement element)
 {
     if (Context.GetPropertyWriteActions(element.ElementName, out var actions))
     {
         var ctx = new PropertyWriteDiagnosticContext(this, element);
         foreach (var(analyzer, action) in actions)
         {
             try {
                 if (!analyzer.Disabled)
                 {
                     action(ctx);
                 }
             } catch (Exception ex) {
                 Context.ReportAnalyzerError(analyzer, ex);
             }
         }
     }
 }