Пример #1
0
 /// <summary>
 /// Sets the Identifier's declaration
 /// </summary>
 /// <param name="node">A VariableDeclaration, Parameter, ForeachStatement, CatchDeclaration, MethodDeclaration and DelegateDeclaration</param>
 /// <param name="reference">The Identifier</param>
 public void DeclarationFiller(ROSLYNCS.CSharpSyntaxNode node, ROSLYNCS.Syntax.IdentifierNameSyntax reference)
 {
     if (reference != null)
     {
         if (node.Kind() != ROSLYNCS.SyntaxKind.VariableDeclarator &&
             node.Kind() != ROSLYNCS.SyntaxKind.Parameter &&
             node.Kind() != ROSLYNCS.SyntaxKind.ForEachStatement &&
             node.Kind() != ROSLYNCS.SyntaxKind.CatchDeclaration &&
             node.Kind() != ROSLYNCS.SyntaxKind.MethodDeclaration &&
             node.Kind() != ROSLYNCS.SyntaxKind.DelegateDeclaration)
         {
             WriteMsg.WriteLine("Warning: Invalid node kind ({0}) given to CrossEdGeFiller.DeclarationFiller()", WriteMsg.MsgLevel.Warning, node.Kind());
             return;
         }
         var declaration = GetOrCreateNode <CSHARP.Nodes.Base.Positioned>(node);
         GetOrCreateNode <CSHARP.Nodes.Expression.IdentifierNameSyntax>(reference).setDeclaration(declaration);
     }
 }
Пример #2
0
 public void AccessorCallFiller(ROSLYNCS.Syntax.AccessorDeclarationSyntax node, ROSLYNCS.Syntax.IdentifierNameSyntax reference)
 {
     if (reference != null)
     {
         var accessorDeclaration = GetOrCreateNode <CSHARP.Nodes.Structure.AccessorDeclarationSyntax>(node);
         GetOrCreateNode <CSHARP.Nodes.Expression.IdentifierNameSyntax>(reference).addAccessorCall(accessorDeclaration);
     }
 }