Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // inherit AlertServiceBase
- public class AlertServiceImpl : AlertService.AlertServiceBase
- {
- // write customize logic for the method
- public override Task<AlertResponse> SendAlert(AlertRequest request, ServerCallContext context)
- {
- // print out want we recieved from request
- Console.WriteLine($"[Alert Request], {request.DateTime}, Uid = {request.Uid}, Message = {request.MsgValue}.");
- // do something .... and response
- var response = new AlertResponse()
- {
- Ack = request.Uid,
- ReturnCode = ReturCodeEnum.Checking.ToString(),
- };
- return Task.FromResult(response);
- }
- }
- public enum ReturCodeEnum
- {
- Release,
- Checking,
- Reboot,
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement