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

◆ HandleCollector() [2/2]

System.Runtime.InteropServices.HandleCollector.HandleCollector ( string? name,
int initialThreshold,
int maximumThreshold )
inline

Definition at line 28 of file HandleCollector.cs.

29 {
30 if (initialThreshold < 0)
31 {
32 throw new ArgumentOutOfRangeException("initialThreshold", initialThreshold, System.SR.Arg_NeedNonNegNumRequired);
33 }
34 if (maximumThreshold < 0)
35 {
36 throw new ArgumentOutOfRangeException("maximumThreshold", maximumThreshold, System.SR.Arg_NeedNonNegNumRequired);
37 }
38 if (initialThreshold > maximumThreshold)
39 {
40 throw new ArgumentException(System.SR.Arg_InvalidThreshold, "initialThreshold");
41 }
42 Name = name ?? string.Empty;
43 InitialThreshold = initialThreshold;
44 MaximumThreshold = maximumThreshold;
45 _threshold = initialThreshold;
46 _handleCount = 0;
47 }
static string Arg_InvalidThreshold
Definition SR.cs:18
static string Arg_NeedNonNegNumRequired
Definition SR.cs:16
Definition SR.cs:7

References System.Runtime.InteropServices.HandleCollector._handleCount, System.Runtime.InteropServices.HandleCollector._threshold, System.SR.Arg_InvalidThreshold, System.SR.Arg_NeedNonNegNumRequired, System.Runtime.InteropServices.HandleCollector.InitialThreshold, System.Runtime.InteropServices.HandleCollector.MaximumThreshold, and System.Runtime.InteropServices.HandleCollector.Name.