diff --git a/src/Microsoft.AspNet.Razor.Runtime.Precompilation/CodeAnalysisAttributeUtilities.cs b/src/Microsoft.AspNet.Razor.Runtime.Precompilation/CodeAnalysisAttributeUtilities.cs
index 36e0b672b1..80cb142361 100644
--- a/src/Microsoft.AspNet.Razor.Runtime.Precompilation/CodeAnalysisAttributeUtilities.cs
+++ b/src/Microsoft.AspNet.Razor.Runtime.Precompilation/CodeAnalysisAttributeUtilities.cs
@@ -28,33 +28,29 @@ namespace Microsoft.AspNet.Razor.Runtime.Precompilation
///
/// The type.
/// The to find attributes on.
- /// The .
///
- public static IEnumerable GetCustomAttributes(
- [NotNull] ISymbol symbol,
- [NotNull] CodeAnalysisSymbolLookupCache symbolLookup)
+ public static IEnumerable GetCustomAttributes([NotNull] ISymbol symbol)
where TAttribute : Attribute
{
var attributes = symbol.GetAttributes();
if (attributes.Length > 0)
{
- var attributeSymbol = symbolLookup.GetSymbol(typeof(TAttribute).GetTypeInfo());
return attributes
- .Where(attribute => attribute.AttributeClass == attributeSymbol)
- .Select(attribute => CreateAttribute(attribute, symbolLookup))
+ .Where(attribute => CodeAnalysisSymbolBasedTypeInfo.IsType(
+ attribute.AttributeClass,
+ typeof(TAttribute).GetTypeInfo()))
+ .Select(attribute => CreateAttribute(attribute))
.ToArray();
}
return Enumerable.Empty();
}
- private static TAttribute CreateAttribute(
- AttributeData attributeData,
- CodeAnalysisSymbolLookupCache symbolLookup)
+ private static TAttribute CreateAttribute(AttributeData attributeData)
where TAttribute : Attribute
{
TAttribute attribute;
- var matchInfo = MatchConstructor(typeof(TAttribute), attributeData.ConstructorArguments, symbolLookup);
+ var matchInfo = MatchConstructor(typeof(TAttribute), attributeData.ConstructorArguments);
Func