0.9 미리보기 1
버전을 릴리스 하였습니다.
이제 @이광석 님의 라이브러리에 소스 생성기로 기여할 수 있을 정도가 된 것 같습니다.
PacketByte Support
의 경우 일반 class
를 대상으로 해야 하므로 System.Text.Json
과 유사한 전략을 사용해야 합니다.
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(WeatherForecast))]
internal partial class SourceGenerationContext : JsonSerializerContext
{
}
JsonSerializable(typeof(WeatherForecast))
특성을 주어서 SourceGenerationContext
에WeatherForecast
를 직렬화/역직렬화 하는 코드를 자동 생성하는 식입니다.