https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/master/master/examples/avrospecific/user.cs中的示例文件一样
。您可以使用以下方式在全球安装它:
Apache.Avro.Tools
使用此操作,您可以从Avro架构文件中生成C#类。例如:
dotnet tool install --global Apache.Avro.Tools --version 1.12.0
Where
avrogen -s <schema-file> <output-directory>
<schema-file>
avro架构文件的完整路径,以及希望保存生成的C#类的目录。如果要具有输出的平坦结构,则可以使用其他参数。