private static void AnalyzeMethod(SymbolAnalysisContext context, XunitContext xunitContext)
        {
            var method = (IMethodSymbol)context.Symbol;

            var methodAllAttributes = method.GetAttributes();

            if (!methodAllAttributes.ContainsAttributeType(xunitContext.Core.TheoryAttributeType))
            {
                return;
            }

            var objectArrayType = TypeSymbolFactory.GetObjectArrayType(context.Compilation);

            var wellFormedInlineDataAttributes = methodAllAttributes
                                                 .Where(a => a.AttributeClass == xunitContext.Core.InlineDataAttributeType &&
                                                        HasAttributeDeclarationNoCompilationErrors(a, objectArrayType));

            AnalyzeInlineDataAttributesWithinTheory(context, wellFormedInlineDataAttributes);
        }
Пример #2
0
 public CompilationTypes(Compilation compilation)
 {
     Theory      = TypeSymbolFactory.GetTheoryType(compilation);
     InlineData  = TypeSymbolFactory.GetInlineDataType(compilation);
     ObjectArray = TypeSymbolFactory.GetObjectArrayType(compilation);
 }