24 lines
457 B
C#
24 lines
457 B
C#
|
using Grpc.Core;
|
||
|
|
||
|
namespace GrcpServices;
|
||
|
|
||
|
// <snippet_GreeterBase>
|
||
|
public abstract partial class GreeterBase
|
||
|
{
|
||
|
public virtual Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context)
|
||
|
{
|
||
|
throw new RpcException(new Status(StatusCode.Unimplemented, ""));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public class HelloRequest
|
||
|
{
|
||
|
public string Name { get; set; }
|
||
|
}
|
||
|
|
||
|
public class HelloReply
|
||
|
{
|
||
|
public string Message { get; set; }
|
||
|
}
|
||
|
// </snippet_GreeterBase>
|