• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Diagnostics.AbstractHostDiagnosticUpdateSource类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Microsoft.CodeAnalysis.Diagnostics.AbstractHostDiagnosticUpdateSource的典型用法代码示例。如果您正苦于以下问题:C# AbstractHostDiagnosticUpdateSource类的具体用法?C# AbstractHostDiagnosticUpdateSource怎么用?C# AbstractHostDiagnosticUpdateSource使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AbstractHostDiagnosticUpdateSource类属于Microsoft.CodeAnalysis.Diagnostics命名空间,在下文中一共展示了AbstractHostDiagnosticUpdateSource类的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: TestDiagnosticAnalyzerService

 private TestDiagnosticAnalyzerService(HostAnalyzerManager hostAnalyzerManager, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource, Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException)
     : base(hostAnalyzerManager, hostDiagnosticUpdateSource)
 {
     _onAnalyzerException = onAnalyzerException;
 }
开发者ID:noahstein,项目名称:roslyn,代码行数:5,代码来源:TestDiagnosticAnalyzerService.cs


示例17: TestDiagnosticAnalyzerService

 internal TestDiagnosticAnalyzerService(ImmutableArray<AnalyzerReference> workspaceAnalyzers, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource = null, Action<Exception, DiagnosticAnalyzer, Diagnostic> onAnalyzerException = null)
     : base(workspaceAnalyzers, hostDiagnosticUpdateSource)
 {
     _onAnalyzerException = onAnalyzerException;
 }
开发者ID:GloryChou,项目名称:roslyn,代码行数:5,代码来源:TestDiagnosticAnalyzerService.cs



注:本文中的Microsoft.CodeAnalysis.Diagnostics.AbstractHostDiagnosticUpdateSource类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Diagnostics.AnalysisScope类代码示例发布时间:2022-05-26
下一篇:
C# Completion.CompletionTriggerInfo类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap