Skip to content

Commit

Permalink
chore: cache MapperAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyMakkison committed Jul 14, 2023
1 parent 38332a6 commit 7cbc55f
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 7cbc55f

Please sign in to comment.