Skip to content

Commit 3e4d5d8

Browse files
committed
fixes build
1 parent 831da19 commit 3e4d5d8

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

src/Soenneker.Gen.EnumValues/EnumValueSourceGenerator.Emission.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,19 +311,25 @@ private static void AppendConstantsAllAndList(StringBuilder source, in EnumSourc
311311
.AppendLine("> __list = __values;");
312312
source.AppendLine();
313313
AppendXmlSummary(source, " ", "Gets a span of all defined instances.");
314-
source.AppendLine(
315-
" [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]");
316314
source.Append(" public static global::System.ReadOnlySpan<")
317315
.Append(ctx.EnumTypeName)
318-
.AppendLine("> Values => __values;");
316+
.AppendLine("> Values");
317+
source.AppendLine(" {");
318+
source.AppendLine(
319+
" [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]");
320+
source.AppendLine(" get => __values;");
321+
source.AppendLine(" }");
319322
source.AppendLine();
320323

321324
AppendXmlSummary(source, " ", "Gets a read-only list of all defined instances.");
322-
source.AppendLine(
323-
" [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]");
324325
source.Append(" public static global::System.Collections.Generic.IReadOnlyList<")
325326
.Append(ctx.EnumTypeName)
326-
.AppendLine("> List => __list;");
327+
.AppendLine("> List");
328+
source.AppendLine(" {");
329+
source.AppendLine(
330+
" [global::System.Runtime.CompilerServices.MethodImpl(global::System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)]");
331+
source.AppendLine(" get => __list;");
332+
source.AppendLine(" }");
327333
source.AppendLine();
328334
}
329335

test/Soenneker.Gen.EnumValues.Tests/Benchmarks/BenchmarkRunner.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,31 @@ public BenchmarkRunner(ITestOutputHelper outputHelper) : base(outputHelper)
1313
{
1414
}
1515

16-
[LocalFact]
16+
//[LocalFact]
1717
public async ValueTask EnumValuesListBenchmark()
1818
{
1919
Summary summary = BenchmarkDotNet.Running.BenchmarkRunner.Run<EnumValuesListBenchmark>(DefaultConf);
2020

2121
await summary.OutputSummaryToLog(OutputHelper, CancellationToken);
2222
}
2323

24-
[LocalFact]
24+
// [LocalFact]
2525
public async ValueTask TryFromNameBenchmark()
2626
{
2727
Summary summary = BenchmarkDotNet.Running.BenchmarkRunner.Run<TryFromNameBenchmark>(DefaultConf);
2828

2929
await summary.OutputSummaryToLog(OutputHelper, CancellationToken);
3030
}
3131

32-
[LocalFact]
32+
// [LocalFact]
3333
public async ValueTask TryFromValueBenchmark()
3434
{
3535
Summary summary = BenchmarkDotNet.Running.BenchmarkRunner.Run<TryFromValueBenchmark>(DefaultConf);
3636

3737
await summary.OutputSummaryToLog(OutputHelper, CancellationToken);
3838
}
3939

40-
[LocalFact]
40+
//[LocalFact]
4141
public async ValueTask SerializationBenchmark()
4242
{
4343
Summary summary = BenchmarkDotNet.Running.BenchmarkRunner.Run<SerializationBenchmark>(DefaultConf);

0 commit comments

Comments
 (0)