Beispiel #1
0
 private AdminServicePayload TakeOnline()
 {
     if (_takeOnlineHandler == null)
     {
         return(new AdminServicePayload().AsTakeOnlineResponse(TakeOnlineResponseOption.Failure));
     }
     else
     {
         Task.Run(() => _takeOnlineHandler());
         _serviceStatus = BeaconServiceStatusOption.Online;
         return(new AdminServicePayload().AsTakeOnlineResponse(TakeOnlineResponseOption.Success));
     }
 }
Beispiel #2
0
 public static AdminServicePayload AsSetServiceStatus(this AdminServicePayload payload, BeaconServiceStatusOption status)
 {
     payload.Data = MessageSerializer.ObjectToByteArray(status);
     return(payload);
 }