private DiagnosticData CreateDiagnostic(ProjectId projectId, AnalyzerDependencyConflict conflict)
        {
            string message = string.Format(
                ServicesVSResources.WRN_AnalyzerDependencyConflictMessage,
                conflict.AnalyzerFilePath1,
                conflict.AnalyzerFilePath2,
                conflict.Identity.ToString());

            DiagnosticData data = new DiagnosticData(
                IDEDiagnosticIds.AnalyzerDependencyConflictId,
                ServicesVSResources.ErrorCategory,
                message,
                ServicesVSResources.WRN_AnalyzerDependencyConflictMessage,
                severity: DiagnosticSeverity.Warning,
                defaultSeverity: DiagnosticSeverity.Warning,
                isEnabledByDefault: true,
                warningLevel: 0,
                customTags: ImmutableArray <string> .Empty,
                properties: ImmutableDictionary <string, string> .Empty,
                workspace: _workspace,
                projectId: projectId,
                title: ServicesVSResources.WRN_AnalyzerDependencyConflictTitle);

            return(data);
        }
        private DiagnosticData CreateDiagnostic(ProjectId projectId, AnalyzerDependencyConflict conflict)
        {
            string id       = ServicesVSResources.WRN_AnalyzerDependencyConflictId;
            string category = ServicesVSResources.ErrorCategory;
            string message  = string.Format(
                ServicesVSResources.WRN_AnalyzerDependencyConflictMessage,
                conflict.DependencyFilePath1,
                Path.GetFileNameWithoutExtension(conflict.AnalyzerFilePath1),
                conflict.DependencyFilePath2,
                Path.GetFileNameWithoutExtension(conflict.AnalyzerFilePath2));

            DiagnosticData data = new DiagnosticData(
                id,
                category,
                message,
                ServicesVSResources.WRN_AnalyzerDependencyConflictMessage,
                severity: DiagnosticSeverity.Warning,
                defaultSeverity: DiagnosticSeverity.Warning,
                isEnabledByDefault: true,
                warningLevel: 0,
                customTags: ImmutableArray <string> .Empty,
                workspace: _workspace,
                projectId: projectId);

            return(data);
        }
        private DiagnosticData CreateDiagnostic(ProjectId projectId, AnalyzerDependencyConflict conflict)
        {
            string id = ServicesVSResources.WRN_AnalyzerDependencyConflictId;
            string category = ServicesVSResources.ErrorCategory;
            string message = string.Format(
                ServicesVSResources.WRN_AnalyzerDependencyConflictMessage,
                conflict.DependencyFilePath1,
                Path.GetFileNameWithoutExtension(conflict.AnalyzerFilePath1),
                conflict.DependencyFilePath2,
                Path.GetFileNameWithoutExtension(conflict.AnalyzerFilePath2));

            DiagnosticData data = new DiagnosticData(
                id,
                category,
                message,
                ServicesVSResources.WRN_AnalyzerDependencyConflictMessage,
                severity: DiagnosticSeverity.Warning,
                defaultSeverity: DiagnosticSeverity.Warning,
                isEnabledByDefault: true,
                warningLevel: 0,
                customTags: ImmutableArray<string>.Empty,
                workspace: _workspace,
                projectId: projectId);

            return data;
        }
Пример #4
0
 private static void LogConflict(AnalyzerDependencyConflict conflict)
 {
     Logger.Log(
         FunctionId.AnalyzerDependencyCheckingService_LogConflict,
         KeyValueLogMessage.Create(m =>
     {
         m["Identity"]  = conflict.Identity.ToString();
         m["Analyzer1"] = conflict.AnalyzerFilePath1;
         m["Analyzer2"] = conflict.AnalyzerFilePath2;
     }));
 }
 private void LogConflict(AnalyzerDependencyConflict conflict)
 {
     Logger.Log(
         FunctionId.AnalyzerDependencyCheckingService_CheckForConflictsAsync,
         KeyValueLogMessage.Create(m =>
     {
         m["Dependency1"] = Path.GetFileName(conflict.DependencyFilePath1);
         m["Dependency2"] = Path.GetFileName(conflict.DependencyFilePath2);
         m["Analyzer1"]   = Path.GetFileName(conflict.AnalyzerFilePath1);
         m["Analyzer2"]   = Path.GetFileName(conflict.AnalyzerFilePath2);
     }));
 }
 private void LogConflict(AnalyzerDependencyConflict conflict)
 {
     Logger.Log(
         FunctionId.AnalyzerDependencyCheckingService_CheckForConflictsAsync,
         KeyValueLogMessage.Create(m =>
         {
             m["Dependency1"] = Path.GetFileName(conflict.DependencyFilePath1);
             m["Dependency2"] = Path.GetFileName(conflict.DependencyFilePath2);
             m["Analyzer1"] = Path.GetFileName(conflict.AnalyzerFilePath1);
             m["Analyzer2"] = Path.GetFileName(conflict.AnalyzerFilePath2);
         }));
 }
 private void LogConflict(AnalyzerDependencyConflict conflict)
 {
     Logger.Log(
         FunctionId.AnalyzerDependencyCheckingService_LogConflict,
         KeyValueLogMessage.Create(m =>
         {
             m["Identity"] = conflict.Identity.ToString();
             m["Analyzer1"] = conflict.AnalyzerFilePath1;
             m["Analyzer2"] = conflict.AnalyzerFilePath2;
         }));
 }
        private DiagnosticData CreateDiagnostic(ProjectId projectId, AnalyzerDependencyConflict conflict)
        {
            string message = string.Format(
                ServicesVSResources.WRN_AnalyzerDependencyConflictMessage,
                conflict.AnalyzerFilePath1,
                conflict.AnalyzerFilePath2,
                conflict.Identity.ToString());

            DiagnosticData data = new DiagnosticData(
                IDEDiagnosticIds.AnalyzerDependencyConflictId,
                FeaturesResources.ErrorCategory,
                message,
                ServicesVSResources.WRN_AnalyzerDependencyConflictMessage,
                severity: DiagnosticSeverity.Warning,
                defaultSeverity: DiagnosticSeverity.Warning,
                isEnabledByDefault: true,
                warningLevel: 0,
                customTags: ImmutableArray<string>.Empty,
                properties: ImmutableDictionary<string, string>.Empty,
                workspace: _workspace,
                projectId: projectId,
                title: ServicesVSResources.WRN_AnalyzerDependencyConflictTitle);

            return data;
        }