Beispiel #1
0
 private void AnalyzeTypeArguments([CanBeNull] NodeArray <ITypeNode> typeArguments)
 {
     foreach (var t in typeArguments.AsStructEnumerable())
     {
         AnalyzeTypeReference(t);
     }
 }
Beispiel #2
0
 private void AnalyzeParameters(NodeArray <IParameterDeclaration> parameters)
 {
     foreach (var parameterDeclaration in parameters.AsStructEnumerable())
     {
         AddOrCreateReferencedSymbol(SymbolKind.ParameterDeclaration, parameterDeclaration.Name.GetName());
         AnalyzeTypeReference(parameterDeclaration.Type);
     }
 }
Beispiel #3
0
 private void AnalyzeTypeParameters(NodeArray <ITypeParameterDeclaration> typeParameters)
 {
     foreach (var t in typeParameters.AsStructEnumerable())
     {
         // Parameters are not part of the declaration fingerprint.
         AddOrCreateReferencedSymbol(SymbolKind.TypeParameter, t.Name.Text);
         AnalyzeTypeReference(t.Constraint);
     }
 }
Beispiel #4
0
        private void AnalyzeStatements([CanBeNull] NodeArray <IStatement> statements)
        {
            int i = 0;

            foreach (var statement in statements.AsStructEnumerable())
            {
                AnalyzeStatement(statement, i);
                i++;
            }
        }
Beispiel #5
0
        private void AnalyzeDeclarationStatements(NodeArray <IStatement> statements)
        {
            int idx = 0;

            foreach (var statement in statements.AsStructEnumerable())
            {
                AnalyzeDeclarationStatement(statement, idx);
                idx++;
            }
        }
Beispiel #6
0
        private void AnalyzeInterfaceMembers(NodeArray <ITypeElement> elements, bool registerPropertyNames)
        {
            foreach (var interfaceMember in elements.AsStructEnumerable())
            {
                var property = interfaceMember.As <IPropertySignature>();
                if (property != null)
                {
                    if (registerPropertyNames)
                    {
                        // Registering property name
                        bool             isOptional = property.QuestionToken.HasValue;
                        DeclarationFlags modifiers  = GetModifiers(property, isOptional);
                        AddOrCreateDeclarationSymbol(SymbolKind.InterfaceMemberDeclaration, property.Name.Text, modifiers);
                    }

                    // Registering property type
                    AnalyzeTypeReference(property.Type);

                    AnalyzeDecorators(interfaceMember);
                }

                var method = interfaceMember.As <IMethodSignature>();
                if (method != null)
                {
                    if (registerPropertyNames)
                    {
                        // Registering method name
                        var typeElement = method.TryCast <ITypeElement>();
                        if (typeElement != null)
                        {
                            bool             isOptional = typeElement.QuestionToken.HasValue;
                            DeclarationFlags modifiers  = GetModifiers(property, isOptional);
                            AddOrCreateDeclarationSymbol(SymbolKind.InterfaceMemberDeclaration, method.Name.Text, modifiers);
                        }
                    }

                    AnalyzeTypeParameters(method.TypeParameters);

                    AnalyzeDecorators(method);
                }
            }
        }