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

◆ HttpRequestCachePolicy() [4/6]

System.Net.Cache.HttpRequestCachePolicy.HttpRequestCachePolicy ( HttpCacheAgeControl cacheAgeControl,
TimeSpan maxAge,
TimeSpan freshOrStale )
inline

Definition at line 65 of file HttpRequestCachePolicy.cs.

66 : this(HttpRequestCacheLevel.Default)
67 {
68 switch (cacheAgeControl)
69 {
70 case HttpCacheAgeControl.MinFresh:
71 _minFresh = freshOrStale;
72 break;
73 case HttpCacheAgeControl.MaxAge:
74 _maxAge = maxAge;
75 break;
76 case HttpCacheAgeControl.MaxStale:
77 _maxStale = freshOrStale;
78 break;
79 case HttpCacheAgeControl.MaxAgeAndMinFresh:
80 _maxAge = maxAge;
81 _minFresh = freshOrStale;
82 break;
83 case HttpCacheAgeControl.MaxAgeAndMaxStale:
84 _maxAge = maxAge;
85 _maxStale = freshOrStale;
86 break;
87 default:
88 throw new ArgumentException(System.SR.Format(System.SR.net_invalid_enum, "HttpCacheAgeControl"), "cacheAgeControl");
89 }
90 }
static string net_invalid_enum
Definition SR.cs:40
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7

References System.Net.Cache.HttpRequestCachePolicy._maxAge, System.Net.Cache.HttpRequestCachePolicy._maxStale, System.Net.Cache.HttpRequestCachePolicy._minFresh, System.SR.Format(), and System.SR.net_invalid_enum.