Skip to content

Commit

Permalink
chore: cache MapperAttribute (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyMakkison authored Jul 16, 2023
1 parent def10cf commit 3244a52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Riok.Mapperly/MapperGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ CancellationToken cancellationToken
#if DEBUG_SOURCE_GENERATOR
DebuggerUtil.AttachDebugger();
#endif
var mapperAttributeSymbol = compilation.GetTypeByMetadataName(MapperAttributeName);
var wellKnownTypes = new WellKnownTypes(compilation);
var mapperAttributeSymbol = wellKnownTypes.TryGet(MapperAttributeName);
if (mapperAttributeSymbol == null)
return MapperResults.Empty;

var wellKnownTypes = new WellKnownTypes(compilation);
var symbolAccessor = new SymbolAccessor(wellKnownTypes);
var uniqueNameBuilder = new UniqueNameBuilder();

Expand Down

0 comments on commit 3244a52

Please sign in to comment.