public ClientTracerApiProxySmartWrapper(IClientTracerApiProxy apiProxy) { Proxy = apiProxy; GetDateNow = DateHelper.Instance.GetDateNow; //todo config CheckSmart = CheckIfNotOkAndExpired.Create(TimeSpan.FromSeconds(3)); }
private static void ResetForWrapper(IClientTracerApiProxy apiProxy, TimeSpan?checkApiStatusInterval, Func <DateTime> getDateNow) { var clientTracerApiProxySmartWrapper = ApiProxyContext.Current as ClientTracerApiProxySmartWrapper; if (clientTracerApiProxySmartWrapper == null) { throw new InvalidOperationException("this reset method is for ClientTracerApiProxySmartWrapper instance, but Current is not instance of it!"); } clientTracerApiProxySmartWrapper.Reset(apiProxy, checkApiStatusInterval, getDateNow); }
public void Reset(IClientTracerApiProxy apiProxy, TimeSpan?checkApiStatusInterval = null, Func <DateTime> getDateNow = null) { Proxy = apiProxy ?? throw new ArgumentNullException(nameof(apiProxy)); if (checkApiStatusInterval != null) { CheckSmart = CheckIfNotOkAndExpired.Create(checkApiStatusInterval); } if (getDateNow != null) { GetDateNow = getDateNow; } }
public CallApiFormCtrl(ClientSpanRepos clientSpanRepository, IClientTracerApiProxy apiProxy) { _clientSpanRepository = clientSpanRepository; _apiProxy = apiProxy; }