當前位置: 首頁>>代碼示例>>C#>>正文


C# Diagnostics.AbstractHostDiagnosticUpdateSource類代碼示例

本文整理匯總了C#中Microsoft.CodeAnalysis.Diagnostics.AbstractHostDiagnosticUpdateSource的典型用法代碼示例。如果您正苦於以下問題:C# AbstractHostDiagnosticUpdateSource類的具體用法?C# AbstractHostDiagnosticUpdateSource怎麽用?C# AbstractHostDiagnosticUpdateSource使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


AbstractHostDiagnosticUpdateSource類屬於Microsoft.CodeAnalysis.Diagnostics命名空間,在下文中一共展示了AbstractHostDiagnosticUpdateSource類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OutOfProcDiagnosticAnalyzerExecutor

 public OutOfProcDiagnosticAnalyzerExecutor(
     IDiagnosticAnalyzerService analyzerService,
     AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource)
 {
     _analyzerService = analyzerService;
     _hostDiagnosticUpdateSource = hostDiagnosticUpdateSource;
 }
開發者ID:tvsonar,項目名稱:roslyn,代碼行數:7,代碼來源:OutOfProcDiagnosticAnalyzerExecutor.cs

示例2: TestDiagnosticAnalyzerService

 internal TestDiagnosticAnalyzerService(
     AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource = null,
     Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null)
    : base(SpecializedCollections.EmptyEnumerable<HostDiagnosticAnalyzerPackage>(), null, hostDiagnosticUpdateSource, new MockDiagnosticUpdateSourceRegistrationService())
 {
     _onAnalyzerException = onAnalyzerException;
 }
開發者ID:CAPCHIK,項目名稱:roslyn,代碼行數:7,代碼來源:TestDiagnosticAnalyzerService.cs

示例3: BaseDiagnosticIncrementalAnalyzer

 protected BaseDiagnosticIncrementalAnalyzer(DiagnosticAnalyzerService owner, Workspace workspace, HostAnalyzerManager hostAnalyzerManager, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource)
 {
     this.Owner = owner;
     this.Workspace = workspace;
     this.HostAnalyzerManager = hostAnalyzerManager;
     this.HostDiagnosticUpdateSource = hostDiagnosticUpdateSource;
     this.DiagnosticLogAggregator = new DiagnosticLogAggregator(owner);
 }
開發者ID:SoumikMukherjeeDOTNET,項目名稱:roslyn,代碼行數:8,代碼來源:BaseDiagnosticIncrementalAnalyzer.cs

示例4: IncrementalAnalyzerDelegatee

            public IncrementalAnalyzerDelegatee(DiagnosticAnalyzerService owner, Workspace workspace, HostAnalyzerManager hostAnalyzerManager, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource)
                : base(owner, workspace, hostAnalyzerManager, hostDiagnosticUpdateSource)
            {
                var v1CorrelationId = LogAggregator.GetNextId();
                _engineV1 = new EngineV1.DiagnosticIncrementalAnalyzer(owner, v1CorrelationId, workspace, hostAnalyzerManager, hostDiagnosticUpdateSource);

                var v2CorrelationId = LogAggregator.GetNextId();
                _engineV2 = new EngineV2.DiagnosticIncrementalAnalyzer(owner, v2CorrelationId, workspace, hostAnalyzerManager, hostDiagnosticUpdateSource);
            }
開發者ID:ehsansajjad465,項目名稱:roslyn,代碼行數:9,代碼來源:DiagnosticAnalyzerService_IncrementalAnalyzer.cs

示例5: TestDiagnosticAnalyzerService

 private TestDiagnosticAnalyzerService(
     HostAnalyzerManager hostAnalyzerManager,
     AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource,
     Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException,
     IDiagnosticUpdateSourceRegistrationService registrationService = null)
     : base(hostAnalyzerManager, hostDiagnosticUpdateSource, registrationService ?? new MockDiagnosticUpdateSourceRegistrationService())
 {
     _onAnalyzerException = onAnalyzerException;
 }
開發者ID:nileshjagtap,項目名稱:roslyn,代碼行數:9,代碼來源:TestDiagnosticAnalyzerService.cs

示例6: OnAnalyzerExceptionForSupportedDiagnostics

        internal static void OnAnalyzerExceptionForSupportedDiagnostics(DiagnosticAnalyzer analyzer, Exception exception, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource)
        {
            if (exception is OperationCanceledException)
            {
                return;
            }

            var diagnostic = CreateAnalyzerExceptionDiagnostic(analyzer, exception);
            OnAnalyzerException_NoTelemetryLogging(exception, analyzer, diagnostic, hostDiagnosticUpdateSource, projectIdOpt: null);
        }
開發者ID:noahfalk,項目名稱:roslyn,代碼行數:10,代碼來源:AnalyzerHelper.cs

示例7: GetAnalyzerExecutorForSupportedDiagnostics

        internal static AnalyzerExecutor GetAnalyzerExecutorForSupportedDiagnostics(
            DiagnosticAnalyzer analyzer,
            AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource,
            Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            // Skip telemetry logging if the exception is thrown as we are computing supported diagnostics and
            // we can't determine if any descriptors support getting telemetry without having the descriptors.
            Action<Exception, DiagnosticAnalyzer, Diagnostic> defaultOnAnalyzerException = (ex, a, diagnostic) =>
                OnAnalyzerException_NoTelemetryLogging(ex, a, diagnostic, hostDiagnosticUpdateSource);

            return AnalyzerExecutor.CreateForSupportedDiagnostics(onAnalyzerException ?? defaultOnAnalyzerException, AnalyzerManager.Instance, cancellationToken: cancellationToken);
        }
開發者ID:GloryChou,項目名稱:roslyn,代碼行數:13,代碼來源:AnalyzerHelper.cs

示例8: OutOfProcDiagnosticAnalyzerExecutor

        public OutOfProcDiagnosticAnalyzerExecutor(
            IDiagnosticAnalyzerService analyzerService,
            AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource)
        {
            _analyzerService = analyzerService;
            _hostDiagnosticUpdateSource = hostDiagnosticUpdateSource;

            // currently option is a bit wierd since it is not part of snapshot and 
            // we can't load all options without loading all language specific dlls.
            // we have tracking issue for this.
            // https://github.com/dotnet/roslyn/issues/13643
            _lastOptionSetPerLanguage = new ConcurrentDictionary<string, ValueTuple<OptionSet, Asset>>();
        }
開發者ID:orthoxerox,項目名稱:roslyn,代碼行數:13,代碼來源:OutOfProcDiagnosticAnalyzerExecutor.cs

示例9: HostAnalyzerManager

        private HostAnalyzerManager(
            ImmutableArray<AnalyzerReference> hostAnalyzerReferences, ImmutableArray<HostDiagnosticAnalyzerPackage> hostAnalyzerPackages, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource)
        {
            _hostDiagnosticAnalyzerPackages = hostAnalyzerPackages;
            _hostDiagnosticUpdateSource = hostDiagnosticUpdateSource;

            _hostAnalyzerReferencesMap = hostAnalyzerReferences.IsDefault ? ImmutableDictionary<string, AnalyzerReference>.Empty : CreateAnalyzerReferencesMap(hostAnalyzerReferences);
            _hostDiagnosticAnalyzersPerLanguageMap = new ConcurrentDictionary<string, ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>>(concurrencyLevel: 2, capacity: 2);
            _lazyHostDiagnosticAnalyzersPerReferenceMap = new Lazy<ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>>(() => CreateDiagnosticAnalyzersPerReferenceMap(_hostAnalyzerReferencesMap), isThreadSafe: true);

            _compilerDiagnosticAnalyzerMap = ImmutableDictionary<string, DiagnosticAnalyzer>.Empty;
            _compilerDiagnosticAnalyzerDescriptorMap = ImmutableDictionary<DiagnosticAnalyzer, HashSet<string>>.Empty;
            _hostDiagnosticAnalzyerPackageNameMap = ImmutableDictionary<DiagnosticAnalyzer, string>.Empty;

            DiagnosticAnalyzerLogger.LogWorkspaceAnalyzers(hostAnalyzerReferences);
        }
開發者ID:ehsansajjad465,項目名稱:roslyn,代碼行數:16,代碼來源:HostAnalyzerManager.cs

示例10: OnAnalyzerException_NoTelemetryLogging

        internal static void OnAnalyzerException_NoTelemetryLogging(
            Exception ex,
            DiagnosticAnalyzer analyzer,
            Diagnostic diagnostic,
            AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource,
            ProjectId projectIdOpt)
        {
            if (diagnostic != null)
            {
                hostDiagnosticUpdateSource?.ReportAnalyzerDiagnostic(analyzer, diagnostic, hostDiagnosticUpdateSource?.Workspace, projectIdOpt);
            }

            if (IsBuiltInAnalyzer(analyzer))
            {
                FatalError.ReportWithoutCrashUnlessCanceled(ex);
            }
        }
開發者ID:nileshjagtap,項目名稱:roslyn,代碼行數:17,代碼來源:AnalyzerHelper.cs

示例11: CreateHostAnalyzerManager

 private static HostAnalyzerManager CreateHostAnalyzerManager(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzersMap, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource)
 {
     var analyzerReferences = ImmutableArray.Create<AnalyzerReference>(new TestAnalyzerReferenceByLanguage(analyzersMap));
     return CreateHostAnalyzerManager(analyzerReferences, hostDiagnosticUpdateSource);
 }
開發者ID:noahstein,項目名稱:roslyn,代碼行數:5,代碼來源:TestDiagnosticAnalyzerService.cs

示例12: HostAnalyzerManager

 public HostAnalyzerManager(ImmutableArray<AnalyzerReference> hostAnalyzerReferences, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource) :
     this(hostAnalyzerReferences, ImmutableArray<HostDiagnosticAnalyzerPackage>.Empty, hostDiagnosticUpdateSource)
 {
 }
開發者ID:hbarve1,項目名稱:roslyn,代碼行數:4,代碼來源:HostAnalyzerManager.cs

示例13: HostAnalyzerReferenceDiagnosticReporter

 public HostAnalyzerReferenceDiagnosticReporter(AbstractHostDiagnosticUpdateSource hostUpdateSource)
 {
     _hostUpdateSource = hostUpdateSource;
 }
開發者ID:hbarve1,項目名稱:roslyn,代碼行數:4,代碼來源:HostAnalyzerManager.cs

示例14: HostArgsId

 public HostArgsId(AbstractHostDiagnosticUpdateSource source, DiagnosticAnalyzer analyzer, ProjectId projectIdOpt) : base(analyzer)
 {
     _source = source;
     _projectIdOpt = projectIdOpt;
 }
開發者ID:SoumikMukherjeeDOTNET,項目名稱:roslyn,代碼行數:5,代碼來源:AbstractHostDiagnosticUpdateSource.cs

示例15: HostArgsId

 public HostArgsId(AbstractHostDiagnosticUpdateSource source, DiagnosticAnalyzer analyzer, ProjectId id) : base(analyzer)
 {
     this._source = source;
     this._projectId = id;
 }
開發者ID:ehsansajjad465,項目名稱:roslyn,代碼行數:5,代碼來源:AbstractHostDiagnosticUpdateSource.cs


注:本文中的Microsoft.CodeAnalysis.Diagnostics.AbstractHostDiagnosticUpdateSource類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。