Move Protos to Shared library

This commit is contained in:
2021-06-07 20:11:44 +02:00
parent c37e8d3fb4
commit 08a954f836
7 changed files with 40 additions and 28 deletions

View File

@@ -9,4 +9,7 @@
<PackageReference Include="Avalonia.Desktop" Version="0.10.3" />
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Akari.Prototype.Shared\Akari.Prototype.Shared.csproj" />
</ItemGroup>
</Project>

View File

@@ -1,13 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Protobuf Include="Protos\akari.proto" GrpcServices="Server" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CliFx" Version="2.0.4" />
<PackageReference Include="Grpc.AspNetCore" Version="2.34.0" />
@@ -15,4 +11,8 @@
<PackageReference Include="Spectre.Console" Version="0.39.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Akari.Prototype.Shared\Akari.Prototype.Shared.csproj" />
</ItemGroup>
</Project>

View File

@@ -1,21 +0,0 @@
syntax = "proto3";
option csharp_namespace = "Akari.Prototype.Server";
package greet;
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply);
}
// The request message containing the user's name.
message HelloRequest {
string name = 1;
}
// The response message containing the greetings.
message HelloReply {
string message = 1;
}

View File

@@ -1,6 +1,6 @@
using Akari.Prototype.Protos;
using Akari.Prototype.Server.Services;
using Akari.Prototype.Server.Utils;
using Akari.Prototype.Shared.Protos;
using Google.Protobuf;
using Grpc.Core;
using Microsoft.Extensions.Logging;

View File

@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.17.2" />
<PackageReference Include="Grpc.Core.Api" Version="2.38.0" />
<PackageReference Include="Grpc.Tools" Version="2.38.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Protos\" />
</ItemGroup>
<ItemGroup>
<Protobuf Include="**/*.proto" />
</ItemGroup>
</Project>

View File

@@ -1,6 +1,6 @@
syntax = "proto3";
option csharp_namespace = "Akari.Prototype.Protos";
option csharp_namespace = "Akari.Prototype.Shared.Protos";
package akari;

View File

@@ -7,6 +7,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akari.Prototype.Server", "A
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akari.Prototype.Client", "Akari.Prototype.Client\Akari.Prototype.Client.csproj", "{3CEA1E09-B799-42B5-A258-A5E549FEC0ED}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akari.Prototype.Shared", "Akari.Prototype.Shared\Akari.Prototype.Shared.csproj", "{F0555B06-E172-490C-BF5D-AFA8D837358B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +23,10 @@ Global
{3CEA1E09-B799-42B5-A258-A5E549FEC0ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3CEA1E09-B799-42B5-A258-A5E549FEC0ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3CEA1E09-B799-42B5-A258-A5E549FEC0ED}.Release|Any CPU.Build.0 = Release|Any CPU
{F0555B06-E172-490C-BF5D-AFA8D837358B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0555B06-E172-490C-BF5D-AFA8D837358B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0555B06-E172-490C-BF5D-AFA8D837358B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0555B06-E172-490C-BF5D-AFA8D837358B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE