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

C# SyntaxAnnotation类代码示例

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

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



SyntaxAnnotation类属于命名空间,在下文中一共展示了SyntaxAnnotation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: CreateAsync

 public static async Task<InsertionPoint> CreateAsync(SemanticDocument document, SyntaxNode node, CancellationToken cancellationToken)
 {
     var root = document.Root;
     var annotation = new SyntaxAnnotation();
     var newRoot = root.AddAnnotations(SpecializedCollections.SingletonEnumerable(Tuple.Create(node, annotation)));
     return new InsertionPoint(await document.WithSyntaxRootAsync(newRoot, cancellationToken).ConfigureAwait(false), annotation);
 }
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:InsertionPoint.cs


示例2: AnnotationResolver

            private SyntaxToken AnnotationResolver(
                SyntaxNode node,
                TriviaLocation location,
                SyntaxAnnotation annotation,
                SyntaxNode callsite,
                MethodDeclarationSyntax method)
            {
                var token = node.GetAnnotatedNodesAndTokens(annotation).FirstOrDefault().AsToken();
                if (token.RawKind != 0)
                {
                    return token;
                }

                switch (location)
                {
                    case TriviaLocation.BeforeBeginningOfSpan:
                        return callsite.GetFirstToken(includeZeroWidth: true).GetPreviousToken(includeZeroWidth: true);
                    case TriviaLocation.AfterEndOfSpan:
                        return callsite.GetLastToken(includeZeroWidth: true).GetNextToken(includeZeroWidth: true);
                    case TriviaLocation.AfterBeginningOfSpan:
                        return method.Body.OpenBraceToken.GetNextToken(includeZeroWidth: true);
                    case TriviaLocation.BeforeEndOfSpan:
                        return method.Body.CloseBraceToken.GetPreviousToken(includeZeroWidth: true);
                }

                return Contract.FailWithReturn<SyntaxToken>("can't happen");
            }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:27,代码来源:CSharpMethodExtractor.TriviaResult.cs


示例3: GenerateTypeSyntax

		public static TypeSyntax GenerateTypeSyntax(this ITypeSymbol typeSymbol, SyntaxAnnotation simplifierAnnotation = null)
		{
			var typeSyntax = (TypeSyntax)generateTypeSyntaxMethod.Invoke(null, new object[] { typeSymbol });
			if (simplifierAnnotation != null)
				return typeSyntax.WithAdditionalAnnotations(simplifierAnnotation);
			return typeSyntax;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:TypeExtensions.cs


示例4: CanRemoveTypeFromParameter

        private static bool CanRemoveTypeFromParameter(
            SyntaxNode node,
            SemanticModel semanticModel,
            CancellationToken cancellationToken)
        {
            // We reduce any the parameters that are contained inside ParameterList
            if (node != null && node.IsParentKind(SyntaxKind.ParameterList) && node.Parent.IsParentKind(SyntaxKind.ParenthesizedLambdaExpression))
            {
                var parameterSyntax = (ParameterSyntax)node;
                if (parameterSyntax.Type != null)
                {
                    var annotation = new SyntaxAnnotation();
                    var newParameterSyntax = parameterSyntax.WithType(null).WithAdditionalAnnotations(annotation);

                    var oldLambda = node.FirstAncestorOrSelf<ParenthesizedLambdaExpressionSyntax>();
                    var newLambda = oldLambda.ReplaceNode(parameterSyntax, newParameterSyntax);
                    var speculationAnalyzer = new SpeculationAnalyzer(oldLambda, newLambda, semanticModel, cancellationToken);
                    newParameterSyntax = (ParameterSyntax)speculationAnalyzer.ReplacedExpression.GetAnnotatedNodesAndTokens(annotation).First();

                    var oldSymbol = semanticModel.GetDeclaredSymbol(parameterSyntax, cancellationToken);
                    var newSymbol = speculationAnalyzer.SpeculativeSemanticModel.GetDeclaredSymbol(newParameterSyntax, cancellationToken);
                    if (oldSymbol != null &&
                        newSymbol != null &&
                        oldSymbol.Type == newSymbol.Type)
                    {
                        return !speculationAnalyzer.ReplacementChangesSemantics();
                    }
                }
            }

            return false;
        }
开发者ID:SoumikMukherjeeDOTNET,项目名称:roslyn,代码行数:32,代码来源:CSharpMiscellaneousReducer.cs


示例5: SimplifyASTForMethod

        /// <summary>
        /// This is jus a test to check the ability to preprocess the AST
        /// </summary>
        /// <param name="methodNode"></param>
        /// <param name="semanticModel"></param>
        /// <returns></returns>
        public static IMethodSymbol SimplifyASTForMethod(ref SyntaxNode methodNode, ref SemanticModel semanticModel)
        {
            var oldMethod = semanticModel.GetDeclaredSymbol(methodNode) as IMethodSymbol;

            var newMethodNode = MethodSimpifier.Test(methodNode);

            var annotation = new SyntaxAnnotation("Hi");

            newMethodNode = newMethodNode.WithAdditionalAnnotations(annotation);

            var root = methodNode.SyntaxTree.GetRoot();
            var newRoot = root.ReplaceNode(methodNode, newMethodNode);

            var oldCompilation = semanticModel.Compilation;

            var newCompilation = oldCompilation.ReplaceSyntaxTree(root.SyntaxTree, newRoot.SyntaxTree);
            var newSemanticModel = newCompilation.GetSemanticModel(newRoot.SyntaxTree);

            var recoveredMethodNode = newRoot.GetAnnotatedNodes(annotation).Single();

            var method = newSemanticModel.GetDeclaredSymbol(recoveredMethodNode) as IMethodSymbol;

            methodNode = recoveredMethodNode;
            semanticModel = newSemanticModel;

            return method;
        }
开发者ID:TubaKayaDev,项目名称:Call-Graph-Builder-DotNet,代码行数:33,代码来源:MethodSimpifier.cs


示例6: TryGetSimplifiedTypeNameInCaseContext

        protected override bool TryGetSimplifiedTypeNameInCaseContext(Document document, string fullyQualifiedTypeName, string firstEnumMemberName, int startPosition, int endPosition, CancellationToken cancellationToken, out string simplifiedTypeName)
        {
            simplifiedTypeName = string.Empty;
            var typeAnnotation = new SyntaxAnnotation();

            var str = "case " + fullyQualifiedTypeName + "." + firstEnumMemberName + ":" + Environment.NewLine + " break;";
            var textChange = new TextChange(new TextSpan(startPosition, endPosition - startPosition), str);
            var typeSpanToAnnotate = new TextSpan(startPosition + "case ".Length, fullyQualifiedTypeName.Length);

            var textWithCaseAdded = document.GetTextAsync(cancellationToken).WaitAndGetResult(cancellationToken).WithChanges(textChange);
            var documentWithCaseAdded = document.WithText(textWithCaseAdded);

            var syntaxRoot = documentWithCaseAdded.GetSyntaxRootSynchronously(cancellationToken);
            var nodeToReplace = syntaxRoot.DescendantNodes().FirstOrDefault(n => n.Span == typeSpanToAnnotate);

            if (nodeToReplace == null)
            {
                return false;
            }

            var updatedRoot = syntaxRoot.ReplaceNode(nodeToReplace, nodeToReplace.WithAdditionalAnnotations(typeAnnotation, Simplifier.Annotation));
            var documentWithAnnotations = documentWithCaseAdded.WithSyntaxRoot(updatedRoot);

            var simplifiedDocument = Simplifier.ReduceAsync(documentWithAnnotations, cancellationToken: cancellationToken).Result;
            simplifiedTypeName = simplifiedDocument.GetSyntaxRootSynchronously(cancellationToken).GetAnnotatedNodesAndTokens(typeAnnotation).Single().ToString();
            return true;
        }
开发者ID:GuilhermeSa,项目名称:roslyn,代码行数:27,代码来源:SnippetFunctionGenerateSwitchCases.cs


示例7: ComputeRefactoringsAsync

        public override async Task ComputeRefactoringsAsync(CodeRefactoringContext context)
        {
            var document = context.Document;
            if (document.Project.Solution.Workspace.Kind == WorkspaceKind.MiscellaneousFiles)
                return;
            var span = context.Span;
            if (!span.IsEmpty)
                return;
            var cancellationToken = context.CancellationToken;
            if (cancellationToken.IsCancellationRequested)
                return;
            var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
            if (model.IsFromGeneratedCode(cancellationToken))
                return;
            var root = await model.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);

            SyntaxToken token = root.FindToken(span.Start);
            if (!token.IsKind(SyntaxKind.IdentifierToken))
                return;
            var property = token.Parent as PropertyDeclarationSyntax;
            if (property == null || !property.Identifier.Span.Contains(span))
                return;
            if (IsEmptyComputedProperty(property))
            {
                context.RegisterRefactoring(
                    CodeActionFactory.Create(
                        token.Span,
                        DiagnosticSeverity.Info,
                        GettextCatalog.GetString("Convert to auto-property"),
                        t2 =>
                        {
                            var newRoot = root.ReplaceNode(property, CreateNewProperty(property).WithAdditionalAnnotations(Formatter.Annotation).WithLeadingTrivia(property.GetLeadingTrivia()));
                            return Task.FromResult(document.WithSyntaxRoot(newRoot));
                        }
                    )
                );
                return;
            }
            var field = GetBackingField(model, property);
            if (!IsValidField(field, property.Parent as TypeDeclarationSyntax))
                return;

            //variable declarator->declaration->field declaration
            var backingFieldNode = root.FindNode(field.Locations.First().SourceSpan).Ancestors().OfType<FieldDeclarationSyntax>().First();


            var propertyAnnotation = new SyntaxAnnotation();
            var fieldAnnotation = new SyntaxAnnotation();

            //annotate our property node and our field node
            root = root.ReplaceNode((SyntaxNode)property, property.WithAdditionalAnnotations(propertyAnnotation));
            root = root.ReplaceNode((SyntaxNode)root.FindNode(backingFieldNode.Span), backingFieldNode.WithAdditionalAnnotations(fieldAnnotation));

            context.RegisterRefactoring(
                CodeActionFactory.Create(token.Span, DiagnosticSeverity.Info, GettextCatalog.GetString("Convert to auto-property"),
                    PerformAction(document, model, root, field.Name, CreateNewProperty(property), propertyAnnotation, fieldAnnotation))
            );
        }
开发者ID:alecor191,项目名称:RefactoringEssentials,代码行数:58,代码来源:ReplacePropertyWithBackingFieldWithAutoPropertyCodeRefactoringProvider.cs


示例8: WithTwoChildren

 internal WithTwoChildren(DiagnosticInfo[] diagnostics, SyntaxAnnotation[] annotations, GreenNode child0, GreenNode child1)
     : base(diagnostics, annotations)
 {
     this.SlotCount = 2;
     this.AdjustFlagsAndWidth(child0);
     _child0 = child0;
     this.AdjustFlagsAndWidth(child1);
     _child1 = child1;
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:9,代码来源:SyntaxList.WithTwoChildren.cs


示例9: RemoveInitializer

        public static SyntaxNode RemoveInitializer(SyntaxNode root, ConstructorDeclarationSyntax constructor)
        {
            var annotation = new SyntaxAnnotation();
            var ctor = constructor;
            var newRoot = root;
            newRoot = newRoot.ReplaceNode(ctor, ctor.WithAdditionalAnnotations(annotation));
            ctor = (ConstructorDeclarationSyntax)newRoot.GetAnnotatedNodes(annotation).First();
            var initializer = ctor.Initializer;

            if (RedundantInheritanceListCodeFixProvider.HasLineEnding(constructor.ParameterList))
            {
                newRoot = newRoot.RemoveNode(initializer, SyntaxRemoveOptions.KeepNoTrivia);
                ctor = (ConstructorDeclarationSyntax)newRoot.GetAnnotatedNodes(annotation).First();

                if (ctor.Body != null &&
                    ctor.Body.HasLeadingTrivia)
                {
                    var lastTrivia = ctor.Body.GetLeadingTrivia().Last();
                    newRoot = lastTrivia.IsKind(SyntaxKind.EndOfLineTrivia)
                        ? newRoot.ReplaceNode(
                            ctor.Body,
                            ctor.Body.WithoutLeadingTrivia())
                        : newRoot.ReplaceNode(
                            ctor.Body,
                            ctor.Body.WithLeadingTrivia(lastTrivia));
                }
            }
            else
            {
                var trailingTrivia = SyntaxFactory.TriviaList();
                if (initializer.HasTrailingTrivia)
                {
                    trailingTrivia = initializer.GetTrailingTrivia();
                }
                newRoot = newRoot.RemoveNode(initializer, SyntaxRemoveOptions.KeepNoTrivia);
                ctor = (ConstructorDeclarationSyntax)newRoot.GetAnnotatedNodes(annotation).First();

                if (ctor.Body != null &&
                    ctor.Body.HasLeadingTrivia)
                {
                    var lastTrivia = ctor.Body.GetLeadingTrivia().Last();
                    newRoot = newRoot.ReplaceNode(
                        ctor.Body,
                        ctor.Body.WithLeadingTrivia(trailingTrivia.Add(lastTrivia)));
                }
                else
                {
                    if (initializer.HasTrailingTrivia)
                    {
                        newRoot = newRoot.ReplaceNode(ctor, ctor.WithTrailingTrivia(trailingTrivia));
                    }
                }
            }

            ctor = (ConstructorDeclarationSyntax)newRoot.GetAnnotatedNodes(annotation).First();
            return newRoot.ReplaceNode(ctor, ctor.WithoutAnnotations(annotation));
        }
开发者ID:jakobehn,项目名称:sonarlint-vs,代码行数:57,代码来源:DefaultBaseConstructorCallCodeFixProvider.cs


示例10: GetSolutionWithUpdatedOriginalType

 internal abstract Solution GetSolutionWithUpdatedOriginalType(
     Solution solutionWithFormattedInterfaceDocument,
     INamedTypeSymbol extractedInterfaceSymbol,
     IEnumerable<ISymbol> includedMembers,
     Dictionary<ISymbol, SyntaxAnnotation> symbolToDeclarationAnnotationMap,
     List<DocumentId> documentIds,
     SyntaxAnnotation typeNodeAnnotation,
     DocumentId documentIdWithTypeNode,
     CancellationToken cancellationToken);
开发者ID:GloryChou,项目名称:roslyn,代码行数:9,代码来源:AbstractExtractInterfaceService.cs


示例11: InsertionPoint

        private InsertionPoint(SemanticDocument document, SyntaxAnnotation annotation)
        {
            //Contract.ThrowIfNull(document);
            //Contract.ThrowIfNull(annotation);

            this.SemanticDocument = document;
            _annotation = annotation;
            _context = CreateLazyContextNode();
        }
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:9,代码来源:InsertionPoint.cs


示例12: SyntaxIdentifierWithTrailingTrivia

 internal SyntaxIdentifierWithTrailingTrivia(string text, GreenNode trailing, DiagnosticInfo[] diagnostics, SyntaxAnnotation[] annotations)
     : base(text, diagnostics, annotations)
 {
     if (trailing != null)
     {
         this.AdjustFlagsAndWidth(trailing);
         _trailing = trailing;
     }
 }
开发者ID:XieShuquan,项目名称:roslyn,代码行数:9,代码来源:SyntaxToken.SyntaxIdentifierWithTrailingTrivia.cs


示例13: CreateExtractMethodResult

        private ExtractMethodResult CreateExtractMethodResult(
            OperationStatus status, SemanticDocument semanticDocument,
            SyntaxAnnotation invocationAnnotation, SyntaxAnnotation methodAnnotation)
        {
            var newRoot = semanticDocument.Root;
            var annotatedTokens = newRoot.GetAnnotatedNodesAndTokens(invocationAnnotation);
            var methodDefinition = newRoot.GetAnnotatedNodesAndTokens(methodAnnotation).FirstOrDefault().AsNode();

            return new SimpleExtractMethodResult(status, semanticDocument.Document, GetMethodNameAtInvocation(annotatedTokens), methodDefinition);
        }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:10,代码来源:MethodExtractor.cs


示例14: CodeCleaners_Annotation

        public void CodeCleaners_Annotation()
        {
            var document = CreateDocument("class C { }", LanguageNames.CSharp);
            var annotation = new SyntaxAnnotation();
            document = document.WithSyntaxRoot(document.GetSyntaxRootAsync().Result.WithAdditionalAnnotations(annotation));

            var cleanDocument = CodeCleaner.CleanupAsync(document, annotation).Result;

            Assert.Equal(document, cleanDocument);
        }
开发者ID:EkardNT,项目名称:Roslyn,代码行数:10,代码来源:CodeCleanupTests.cs


示例15: VisitPropertyDeclaration

        public override SyntaxNode VisitPropertyDeclaration(PropertyDeclarationSyntax property)
        {
            if (span.IntersectsWith(property.Span) && CodeGeneration.IsExpandableProperty(property, document))
            {
                var annotation = new SyntaxAnnotation();
                annotations.Add(annotation);

                return property.WithAdditionalAnnotations(annotation);
            }

            return base.VisitPropertyDeclaration(property);
        }
开发者ID:2j2e,项目名称:presentations,代码行数:12,代码来源:PropertyAnnotater.cs


示例16: CaseCorrectAsync

 public static Task<Document> CaseCorrectAsync(Document document, SyntaxAnnotation annotation, CancellationToken cancellationToken)
 {
     try
     {
         return (Task<Document>)caseCorrectAsyncMethod.Invoke(null, new object[] { document, annotation, cancellationToken });
     }
     catch (TargetInvocationException ex)
     {
         ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
         return null;
     }
 }
开发者ID:pgrefviau,项目名称:RefactoringEssentials,代码行数:12,代码来源:CaseCorrector.cs


示例17: StatementResult

 public StatementResult(
     OperationStatus status,
     TextSpan originalSpan,
     TextSpan finalSpan,
     OptionSet options,
     bool selectionInExpression,
     SemanticDocument document,
     SyntaxAnnotation firstTokenAnnotation,
     SyntaxAnnotation lastTokenAnnotation) :
     base(status, originalSpan, finalSpan, options, selectionInExpression, document, firstTokenAnnotation, lastTokenAnnotation)
 {
 }
开发者ID:RoryVL,项目名称:roslyn,代码行数:12,代码来源:CSharpSelectionResult.StatementResult.cs


示例18: HandleThisExpression

        private static void HandleThisExpression(SyntaxNodeAnalysisContext context)
        {
            if (!context.Node.Parent.IsKind(SyntaxKind.SimpleMemberAccessExpression))
            {
                return;
            }

            var memberAccessExpression = (MemberAccessExpressionSyntax)context.Node.Parent;
            var originalSymbolInfo = context.SemanticModel.GetSymbolInfo(memberAccessExpression, context.CancellationToken);
            if (originalSymbolInfo.Symbol == null)
            {
                return;
            }

            SyntaxNode speculationRoot;
            var annotation = new SyntaxAnnotation();
            SemanticModel speculativeModel;

            StatementSyntax statement = context.Node.FirstAncestorOrSelf<StatementSyntax>();
            if (statement != null)
            {
                var modifiedStatement = statement.ReplaceNode(memberAccessExpression, memberAccessExpression.Name.WithAdditionalAnnotations(annotation));
                speculationRoot = modifiedStatement;
                if (!context.SemanticModel.TryGetSpeculativeSemanticModel(statement.SpanStart, modifiedStatement, out speculativeModel))
                {
                    return;
                }
            }
            else
            {
                ArrowExpressionClauseSyntax arrowExpressionClause = context.Node.FirstAncestorOrSelf<ArrowExpressionClauseSyntax>();
                if (arrowExpressionClause == null)
                {
                    return;
                }

                var modifiedArrowExpressionClause = arrowExpressionClause.ReplaceNode(memberAccessExpression, memberAccessExpression.Name.WithAdditionalAnnotations(annotation));
                speculationRoot = modifiedArrowExpressionClause;
                if (!context.SemanticModel.TryGetSpeculativeSemanticModel(arrowExpressionClause.SpanStart, modifiedArrowExpressionClause, out speculativeModel))
                {
                    return;
                }
            }

            SyntaxNode mappedNode = speculationRoot.GetAnnotatedNodes(annotation).Single();
            var newSymbolInfo = speculativeModel.GetSymbolInfo(mappedNode, context.CancellationToken);
            if (!Equals(originalSymbolInfo.Symbol, newSymbolInfo.Symbol))
            {
                return;
            }

            context.ReportDiagnostic(Diagnostic.Create(Descriptor, context.Node.GetLocation()));
        }
开发者ID:EdwinEngelen,项目名称:StyleCopAnalyzers,代码行数:53,代码来源:SX1101DoNotPrefixLocalMembersWithThis.cs


示例19: Expander

 public Expander(
     SemanticModel semanticModel,
     Func<SyntaxNode, bool> expandInsideNode,
     bool expandParameter,
     CancellationToken cancellationToken,
     SyntaxAnnotation annotationForReplacedAliasIdentifier = null)
 {
     _semanticModel = semanticModel;
     _expandInsideNode = expandInsideNode;
     _expandParameter = expandParameter;
     _cancellationToken = cancellationToken;
     _annotationForReplacedAliasIdentifier = annotationForReplacedAliasIdentifier;
 }
开发者ID:RoryVL,项目名称:roslyn,代码行数:13,代码来源:CSharpSimplificationService.Expander.cs


示例20: RemoveDeclaration

        private static SyntaxNode RemoveDeclaration(SyntaxNode root, BaseListSyntax baseList,
            int redundantIndex)
        {
            var newBaseList = baseList
                .RemoveNode(baseList.Types[redundantIndex], SyntaxRemoveOptions.KeepNoTrivia)
                .WithAdditionalAnnotations(Formatter.Annotation);

            if (newBaseList.Types.Count != 0)
            {
                return root.ReplaceNode(baseList, newBaseList);
            }

            var baseTypeHadLineEnding = HasLineEnding(baseList.Types[redundantIndex]);
            var colonHadLineEnding = HasLineEnding(baseList.ColonToken);
            var typeNameHadLineEnding = HasLineEnding(((BaseTypeDeclarationSyntax)baseList.Parent).Identifier);

            var annotation = new SyntaxAnnotation();
            var newRoot = root.ReplaceNode(
                baseList.Parent,
                baseList.Parent.WithAdditionalAnnotations(annotation));
            var declaration = (BaseTypeDeclarationSyntax)newRoot.GetAnnotatedNodes(annotation).First();

            newRoot = newRoot.RemoveNode(declaration.BaseList, SyntaxRemoveOptions.KeepNoTrivia);
            declaration = (BaseTypeDeclarationSyntax)newRoot.GetAnnotatedNodes(annotation).First();

            var needsNewLine = !typeNameHadLineEnding &&
                (colonHadLineEnding || baseTypeHadLineEnding);

            if (needsNewLine)
            {
                var trivia = SyntaxFactory.TriviaList();
                if (declaration.Identifier.HasTrailingTrivia)
                {
                    trivia = declaration.Identifier.TrailingTrivia;
                }

                trivia = colonHadLineEnding
                    ? trivia.Add(baseList.ColonToken.TrailingTrivia.Last())
                    : trivia.AddRange(baseList.Types[redundantIndex].GetTrailingTrivia());

                newRoot = newRoot.ReplaceToken(
                        declaration.Identifier,
                        declaration.Identifier
                            .WithTrailingTrivia(trivia));
            }

            declaration = (BaseTypeDeclarationSyntax)newRoot.GetAnnotatedNodes(annotation).First();
            return newRoot.ReplaceNode(
                declaration,
                declaration.WithoutAnnotations(annotation));
        }
开发者ID:jakobehn,项目名称:sonarlint-vs,代码行数:51,代码来源:RedundantInheritanceListCodeFixProvider.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# SyntaxContext类代码示例发布时间:2022-05-24
下一篇:
C# SyndicationResourceLoadSettings类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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