private static CircuitBreakerState MapNotificationToCircuitBreakerState(NotifyOfCircuitStateRequest request) { CircuitBreakerState updateRequest = new CircuitBreakerState(request.CircuitBreakerId, request.MachineName, request.Pid, request.Status, request.RequestMessageSequenceNumber); updateRequest.UpdateablePropertyBag = new Dictionary <string, string>(request.UpdateablePropertyBag); updateRequest.InformationalPropertyBag = new Dictionary <string, string>(request.InformationalPropertyBag); return(updateRequest); }
public NotifyOfCircuitStateResponse NotifyOfCircuitState(NotifyOfCircuitStateRequest request) { if (request == null) { throw new ArgumentNullException("request"); } var updateRequest = MapNotificationToCircuitBreakerState(request); var updateResponse = _circuitBreakers.ProcessCircuitStateMessage(updateRequest); var notifyOfCircuitStateResponse = MapCircuitBreakerStateToResponse(updateResponse); if (CircuitBreakerStateNotified != null) { CircuitBreakerStateNotified(request, new CircuitBreakerStateNotifiedEventArgs(request)); } return(notifyOfCircuitStateResponse); }
public NotifyOfCircuitStateResponse NotifyOfCircuitState(NotifyOfCircuitStateRequest request) { return(Channel.NotifyOfCircuitState(request)); }