began Protobuf integration
This commit is contained in:
parent
2c094bab3b
commit
890166ebce
@ -14,5 +14,14 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DTLib.Web" Version="1.3.0"/>
|
||||
<PackageReference Include="Google.Protobuf" Version="3.30.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="obj\Protobuf\*.g.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
|
||||
<Exec Command="sh -c "mkdir -p obj/Protobuf && protoc Protobuf/*.proto --csharp_out=obj/Protobuf --csharp_opt=file_extension=.g.cs"" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
20
ParadoxSaveParser.WebAPI/Protobuf/ParsedData.proto
Normal file
20
ParadoxSaveParser.WebAPI/Protobuf/ParsedData.proto
Normal file
@ -0,0 +1,20 @@
|
||||
syntax = "proto3";
|
||||
option csharp_namespace = "ParadoxSaveParser.WebAPI.MyProtobuf";
|
||||
|
||||
message Item {
|
||||
oneof value {
|
||||
int64 i64 = 1;
|
||||
double f64 = 2;
|
||||
string str = 3;
|
||||
ItemList list = 4;
|
||||
ItemListMap map = 5;
|
||||
}
|
||||
}
|
||||
|
||||
message ItemList {
|
||||
repeated Item items = 1;
|
||||
}
|
||||
|
||||
message ItemListMap {
|
||||
map<string, ItemList> items_map = 1;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user