/// <summary> /// Determines if request settings provider has items and is implemented. /// </summary> /// <param name="provider"></param> /// <returns></returns> protected virtual bool ProviderHasItems(IRequestSettingsProvider provider) { try { return(provider?.Items is object); } catch (NotImplementedException) { return(false); } }
/// <summary> /// DI Constructor /// </summary> /// <param name="requestSettingsProviderFactory"></param> public TimedTaskManager(Func <IRequestSettingsProvider> requestSettingsProviderFactory) { RequestSettingsProvider = requestSettingsProviderFactory() ?? throw new ArgumentNullException(nameof(requestSettingsProviderFactory)); }