source_generator.cs
C#•マスター
Explorer
C40
C++40
C#
初級10
中級10
上級10
エキスパート5
マスター5
async_enumerable.cs
channel_pipeline.cs
source_generator.cs
span_memory.cs
pattern_switch.cs
Dart40
Go40
Java40
JavaScript40
Kotlin40
Objective-C40
Perl40
PHP40
Python40
R40
Ruby40
Rust40
Shell40
Swift40
TypeScript40
source_generator.cs
Click to focus
1
2
3
4
5
6
7
8
9
10
[Generator]↵
public class JsonGenerator : ISourceGenerator {↵
public void Execute(GeneratorExecutionContext context) {↵
var source = @"↵
public partial class " + className + @" {↵
public string ToJson() => JsonSerializer.Serialize(this);↵
}";↵
context.AddSource($"{className}.g.cs", source);↵
}↵
}
0WPM•0%•0:00•0/333(0%)|Ln 1, Col 1
UTF-8•C#