Skip to content

Commit 56f457d

Browse files
committed
Merge remote-tracking branch 'upstream/master' into refactor/first-pass
# Conflicts: # .vscode/settings.json
2 parents f3701df + 926600d commit 56f457d

File tree

17 files changed

+280
-86
lines changed

17 files changed

+280
-86
lines changed

.vscode/settings.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

investigations/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Visual Studio - C#
2+
**/obj
3+
**/bin
4+
*.user
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.29424.173
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetGrpcService", "DotNetGrpcService\DotNetGrpcService.csproj", "{51C71ABB-1D35-4543-898C-0D34EFF832FA}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{51C71ABB-1D35-4543-898C-0D34EFF832FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{51C71ABB-1D35-4543-898C-0D34EFF832FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{51C71ABB-1D35-4543-898C-0D34EFF832FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{51C71ABB-1D35-4543-898C-0D34EFF832FA}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {BB4EB881-58FA-4A49-838A-0F0824C47920}
24+
EndGlobalSection
25+
EndGlobal

investigations/DotNetGrpcClient/DotNetGrpcClient.csproj renamed to investigations/DotNetGrpc/DotNetGrpcClient/DotNetGrpcClient.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
55
<TargetFramework>netcoreapp3.0</TargetFramework>
6+
67
</PropertyGroup>
7-
88
<ItemGroup>
99
<PackageReference Include="Google.Protobuf" Version="3.10.0" />
1010
<PackageReference Include="Grpc.Net.Client" Version="2.23.2" />
@@ -16,4 +16,5 @@
1616
<ItemGroup>
1717
<Protobuf Include="Protos\greet.proto" GrpcServices="Client" />
1818
</ItemGroup>
19+
1920
</Project>

investigations/DotNetGrpcClient/Program.cs renamed to investigations/DotNetGrpc/DotNetGrpcClient/Program.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
using DotNetGrpcService;
55
using Grpc.Net.Client;
66

7-
namespace GrpcGreeterClient
7+
namespace DotNetGrpcClient
88
{
9-
class Program
9+
class Program
1010
{
1111
static async Task Main(string[] args)
1212
{
@@ -18,9 +18,6 @@ static async Task Main(string[] args)
1818
Console.WriteLine("Calling Python Endpoint...");
1919
await CallEndpoint("http://localhost:50051", true);
2020

21-
22-
Console.WriteLine("Press any key to exit...");
23-
Console.ReadKey();
2421
}
2522

2623
static GrpcChannel GetChannel(string grpcEndpointAddress, bool isInsecure = false)
@@ -35,8 +32,8 @@ static async Task CallEndpoint(string grpcEndpointAddress, bool isInsecure = fal
3532
var client = new Greeter.GreeterClient(channel);
3633

3734
var reply = await client.SayHelloAsync(
38-
new HelloRequest { Name = "GreeterClient" });
39-
Console.WriteLine("Greeting: " + reply.Message);
35+
new HelloRequest { Name = "GreeterClient-DotNet" });
36+
Console.WriteLine($"Response: {reply.Message}");
4037
}
4138
}
42-
}
39+
}

investigations/DotNetGrpcService/Protos/greet.proto renamed to investigations/DotNetGrpc/DotNetGrpcClient/Protos/greet.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ message HelloRequest {
1818
// The response message containing the greetings.
1919
message HelloReply {
2020
string message = 1;
21-
}
21+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.0</TargetFramework>
5+
</PropertyGroup>
6+
7+
<ItemGroup>
8+
<Protobuf Include="Protos\greet.proto" GrpcServices="Server" />
9+
</ItemGroup>
10+
11+
<ItemGroup>
12+
<PackageReference Include="Grpc.AspNetCore" Version="2.23.1" />
13+
</ItemGroup>
14+
15+
</Project>
File renamed without changes.
File renamed without changes.

investigations/DotNetGrpcService/Services/GreeterService.cs renamed to investigations/DotNetGrpc/DotNetGrpcService/Services/GreeterService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContex
1919
{
2020
return Task.FromResult(new HelloReply
2121
{
22-
Message = "Hello " + request.Name
22+
Message = $"Hello {request.Name} from .NET gRPC Server"
2323
});
2424
}
2525
}

0 commit comments

Comments
 (0)