Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SwitchAttribute.cs
Go to the documentation of this file.
4
5namespace System.Diagnostics;
6
8public sealed class SwitchAttribute : Attribute
9{
10 private Type _type;
11
12 private string _name;
13
14 public string SwitchName
15 {
16 get
17 {
18 return _name;
19 }
20 [MemberNotNull("_name")]
21 set
22 {
23 if (value == null)
24 {
25 throw new ArgumentNullException("value");
26 }
27 if (value.Length == 0)
28 {
30 }
31 _name = value;
32 }
33 }
34
36 {
37 get
38 {
39 return _type;
40 }
41 [MemberNotNull("_type")]
42 set
43 {
44 if (value == null)
45 {
46 throw new ArgumentNullException("value");
47 }
48 _type = value;
49 }
50 }
51
52 public string? SwitchDescription { get; set; }
53
59
60 [RequiresUnreferencedCode("Types may be trimmed from the assembly.")]
62 {
63 if (assembly == null)
64 {
65 throw new ArgumentNullException("assembly");
66 }
68 object[] customAttributes = assembly.GetCustomAttributes(typeof(SwitchAttribute), inherit: false);
70 Type[] types = assembly.GetTypes();
71 foreach (Type type in types)
72 {
74 }
76 object[] array2 = array;
77 list.CopyTo(array2, 0);
78 return array;
79 }
80
94
100}
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
void AddRange(IEnumerable< KeyValuePair< TKey, TValue > > collection)
static void GetAllRecursive([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type type, List< object > switchAttribs)
static void GetAllRecursive(MemberInfo member, List< object > switchAttribs)
static SwitchAttribute[] GetAll(Assembly assembly)
SwitchAttribute(string switchName, Type switchType)
object[] GetCustomAttributes(bool inherit)
static string InvalidNullEmptyArgument
Definition SR.cs:34
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7