Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Regex TagValidation — [GeneratedRegex] Source Generator

Aperta
#147 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Refactoring
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
performance

Direzione di ricerca

Open HistogramBase.cs and inspect the TagValidation declaration and its uses. Confirm the project targets .NET 8, then apply the stated GeneratedRegex pattern and run the existing test suite. Done means tag validation still works while using the source-generator form instead of the compiled Regex construction.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

agent enhancement

File: HistogramBase.cs

private static readonly Regex TagValidation = new Regex("[, \\r\\n]", RegexOptions.Compiled);

On .NET 8 this should use the [GeneratedRegex] source generator, which produces fully AOT-safe, allocation-free regex matching with no startup compilation cost:

[GeneratedRegex("[, \\r\\n]")]
private static partial Regex TagValidation();

Minor on its own, but it's the right modern pattern and eliminates the compiled-regex warm-up allocation.

Lingua principale
C#
Stelle
185
Fork
31
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di HdrHistogram/HdrHistogram.NET

Tutte le issue di HdrHistogram/HdrHistogram.NET

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.