NServiceBus.MsmqScopeOptions.GetMaxTimeout C# (CSharp) Method

GetMaxTimeout() static private method

static private GetMaxTimeout ( ) : System.TimeSpan
return System.TimeSpan
        static TimeSpan GetMaxTimeout()
        {
            //default is always 10 minutes
            var maxTimeout = TimeSpan.FromMinutes(10);

            var systemTransactionsGroup = ConfigurationManager.OpenMachineConfiguration()
                .GetSectionGroup("system.transactions");

            var machineSettings = systemTransactionsGroup?.Sections.Get("machineSettings") as MachineSettingsSection;

            if (machineSettings != null)
            {
                maxTimeout = machineSettings.MaxTimeout;
            }

            return maxTimeout;
        }
    }