You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 9, 2025. It is now read-only.
The generated implementation of AbcOrDefGeneratedRegex() similarly caches a singleton Regex instance, so no additional caching is needed to consume code.
… but right below that you're providing a screenshot that's manually caching the generated RegEx() result in user code:
What's true? — Do we need to cache the result in a static readonly variable or can we call RegEx() repeatedly without penalty to runtime execution time?
In section Source generation, the documentation states:
… but right below that you're providing a screenshot that's manually caching the generated
RegEx()
result in user code:What's true? — Do we need to cache the result in a
static readonly
variable or can we callRegEx()
repeatedly without penalty to runtime execution time?https://learn.microsoft.com/en-us/dotnet/standard/base-types/regular-expression-source-generators#source-generation
The text was updated successfully, but these errors were encountered: