NServiceBus.InstanceMappingFileSettings.RefreshInterval C# (CSharp) Method

RefreshInterval() public method

Specifies the interval between data refresh attempts. The default value is 30 seconds.
public RefreshInterval ( System.TimeSpan refreshInterval ) : InstanceMappingFileSettings
refreshInterval System.TimeSpan Refresh interval. Valid values must be between 1 second and less than 1 day.
return InstanceMappingFileSettings
        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;
        }