HealthMonitoring.SelfHost.Controllers.EndpointsController.PostEndpointsHealth C# (CSharp) Method

PostEndpointsHealth() private method

private PostEndpointsHealth ( DateTimeOffset clientCurrentTime = null ) : IHttpActionResult
clientCurrentTime DateTimeOffset
return IHttpActionResult
        public IHttpActionResult PostEndpointsHealth(DateTimeOffset? clientCurrentTime = null, [FromBody]params EndpointHealthUpdate[] healthUpdate)
        {
            RequestContext.Authorize(SecurityRole.Monitor);
            healthUpdate.ValidateModel();

            var clockDifference = GetServerToClientTimeDifference(clientCurrentTime);

            foreach (var update in healthUpdate)
                _endpointRegistry.UpdateHealth(update.EndpointId, update.ToEndpointHealth(clockDifference));
            return Ok();
        }