public static CounterMap ForChannel(string channel, ProcessStatus status, int count = 1) { var result = new CounterMap(); switch (status) { case ProcessStatus.Attempt when SupportPending: result.Increment(ChannelAttmept(channel), count); break; case ProcessStatus.Skipped: result.Increment(ChannelSkipped(channel), count); break; case ProcessStatus.Handled: result.Increment(ChannelHandled(channel), count); break; case ProcessStatus.Failed: result.Increment(ChannelFailed(channel), count); break; } return(result); }
public static CounterMap ForNotification(ProcessStatus status, int count = 1) { var result = new CounterMap(); switch (status) { case ProcessStatus.Attempt when SupportPending: result.Increment(NotificationsAttempt, count); break; case ProcessStatus.Handled: result.Increment(NotificationsHandled, count); break; case ProcessStatus.Failed: result.Increment(NotificationsFailed, count); break; } return(result); }