private string GetActionDescription(ProbeApproval action) { string str = string.Empty; switch (action) { case ProbeApproval.Allow: str = "Approving {0}"; break; case ProbeApproval.AllowAndDiscover: str = "Approving {0} with auto-discovery"; break; case ProbeApproval.Deny: str = "Denying {0}"; break; } if (Probe != null) { return(string.Format(str, $"probe '{Probe.Name}'")); } return(string.Format(str, $"probe ID '{Id}'")); }
public ApproveProbeParameters(Either <Probe, int> probeOrId, ProbeApproval action) : base(probeOrId.ToPrtgObject()) { this[Parameter.Action] = action; }
internal async Task ApproveProbeInternalAsync(int probeId, ProbeApproval action, CancellationToken token) => await RequestEngine.ExecuteRequestAsync(new ApproveProbeParameters(probeId, action)).ConfigureAwait(false);
internal void ApproveProbeInternal(int probeId, ProbeApproval action) => RequestEngine.ExecuteRequest(new ApproveProbeParameters(probeId, action));
internal void ApproveProbeInternal(Either <Probe, int> probeOrId, ProbeApproval action) => RequestEngine.ExecuteRequest(new ApproveProbeParameters(probeOrId, action));
public ApproveProbeParameters(int probeId, ProbeApproval action) : base(probeId) { this[Parameter.Action] = action; }