当前位置: 首页>>代码示例>>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;未经允许,请勿转载。