From 845ac6ff536aacf146744da6f41fe1d909b8f6fe Mon Sep 17 00:00:00 2001 From: Nikolay Pianikov Date: Sat, 20 Apr 2024 10:32:43 +0300 Subject: [PATCH] Improved Resolve methods performance --- src/Pure.DI.Core/Core/Code/ApiMembersBuilder.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Pure.DI.Core/Core/Code/ApiMembersBuilder.cs b/src/Pure.DI.Core/Core/Code/ApiMembersBuilder.cs index 0d28617e9..0fff7373b 100644 --- a/src/Pure.DI.Core/Core/Code/ApiMembersBuilder.cs +++ b/src/Pure.DI.Core/Core/Code/ApiMembersBuilder.cs @@ -30,6 +30,7 @@ public CompositionCode Build(CompositionCode composition) } buildTools.AddPureHeader(apiCode); + apiCode.AppendLine($"[{Names.MethodImplAttribute}(({Names.MethodImplOptions})0x100)]"); apiCode.AppendLine($"{hints.ResolveMethodModifiers} T {hints.ResolveMethodName}()"); apiCode.AppendLine("{"); using (apiCode.Indent()) @@ -53,6 +54,7 @@ public CompositionCode Build(CompositionCode composition) } buildTools.AddPureHeader(apiCode); + apiCode.AppendLine($"[{Names.MethodImplAttribute}(({Names.MethodImplOptions})0x100)]"); apiCode.AppendLine($"{hints.ResolveByTagMethodModifiers} T {hints.ResolveByTagMethodName}(object? tag)"); apiCode.AppendLine("{"); using (apiCode.Indent())