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

◆ GetCustomAttributes() [3/4]

static void System.Reflection.PseudoCustomAttribute.GetCustomAttributes ( RuntimeParameterInfo parameter,
RuntimeType caType,
ref RuntimeType::ListBuilder< Attribute > pcas )
inlinestaticpackage

Definition at line 110 of file PseudoCustomAttribute.cs.

111 {
112 bool flag = caType == typeof(object) || caType == typeof(Attribute);
113 if (!flag && !s_pca.Contains(caType))
114 {
115 return;
116 }
117 if ((flag || caType == typeof(InAttribute)) && parameter.IsIn)
118 {
119 pcas.Add(new InAttribute());
120 }
121 if ((flag || caType == typeof(OutAttribute)) && parameter.IsOut)
122 {
123 pcas.Add(new OutAttribute());
124 }
125 if ((flag || caType == typeof(OptionalAttribute)) && parameter.IsOptional)
126 {
128 }
129 if (flag || caType == typeof(MarshalAsAttribute))
130 {
132 if (marshalAsCustomAttribute != null)
133 {
135 }
136 }
137 }
void Add(TKey key, TValue value)
static MarshalAsAttribute GetMarshalAsCustomAttribute(RuntimeParameterInfo parameter)
static readonly HashSet< RuntimeType > s_pca

References System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Reflection.PseudoCustomAttribute.GetMarshalAsCustomAttribute(), and System.Reflection.PseudoCustomAttribute.s_pca.