diff --git a/src/Acornima/RegExpValue.cs b/src/Acornima/RegExpValue.cs index 2cb83f0..e5efb8e 100644 --- a/src/Acornima/RegExpValue.cs +++ b/src/Acornima/RegExpValue.cs @@ -14,7 +14,8 @@ public static RegExpValue From(string pattern, string flags) flags ?? ThrowArgumentNullException(nameof(flags))); } - public RegExpValue(string pattern, string flags) + [MethodImpl(MethodImplOptions.AggressiveInlining)] + internal RegExpValue(string pattern, string flags) { _pattern = pattern; _flags = flags; diff --git a/src/Acornima/TemplateValue.cs b/src/Acornima/TemplateValue.cs index ccb9017..952cc4d 100644 --- a/src/Acornima/TemplateValue.cs +++ b/src/Acornima/TemplateValue.cs @@ -12,6 +12,7 @@ public static TemplateValue From(string? cooked, string raw) return new TemplateValue(cooked, raw ?? ThrowArgumentNullException(nameof(raw))); } + [MethodImpl(MethodImplOptions.AggressiveInlining)] internal TemplateValue(string? cooked, string raw) { Cooked = cooked;