public InstanceMappingFileSettings RefreshInterval(TimeSpan refreshInterval)
{
if (refreshInterval < TimeSpan.FromSeconds(1))
{
throw new ArgumentOutOfRangeException(nameof(refreshInterval), "Value must be at least 1 second.");
}
if (refreshInterval > TimeSpan.FromDays(1))
{
throw new ArgumentOutOfRangeException(nameof(refreshInterval), "Value must be less than 1 day.");
}
Settings.Set(InstanceMappingFileFeature.CheckIntervalSettingsKey, refreshInterval);
return this;
}