Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ InitDefaultMatchTimeout()

static TimeSpan System.Text.RegularExpressions.Regex.InitDefaultMatchTimeout ( )
inlinestaticprivate

Definition at line 761 of file Regex.cs.

762 {
763 AppDomain currentDomain = AppDomain.CurrentDomain;
764 object data = currentDomain.GetData("REGEX_DEFAULT_MATCH_TIMEOUT");
765 if (data == null)
766 {
768 }
769 if (data is TimeSpan timeSpan)
770 {
771 try
772 {
774 return timeSpan;
775 }
776 catch (ArgumentOutOfRangeException)
777 {
778 throw new ArgumentOutOfRangeException(System.SR.Format(System.SR.IllegalDefaultRegexMatchTimeoutInAppDomain, "REGEX_DEFAULT_MATCH_TIMEOUT", timeSpan));
779 }
780 }
781 throw new InvalidCastException(System.SR.Format(System.SR.IllegalDefaultRegexMatchTimeoutInAppDomain, "REGEX_DEFAULT_MATCH_TIMEOUT", data));
782 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string IllegalDefaultRegexMatchTimeoutInAppDomain
Definition SR.cs:34
Definition SR.cs:7
static readonly TimeSpan InfiniteMatchTimeout
Definition Regex.cs:37
static void ValidateMatchTimeout(TimeSpan matchTimeout)
Definition Regex.cs:169

References System.AppDomain.CurrentDomain, System.Runtime.Serialization.Dictionary, System.SR.Format(), System.SR.IllegalDefaultRegexMatchTimeoutInAppDomain, System.Text.RegularExpressions.Regex.InfiniteMatchTimeout, and System.Text.RegularExpressions.Regex.ValidateMatchTimeout().