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

◆ InternalParamIsDefined()

static bool System.Attribute.InternalParamIsDefined ( ParameterInfo param,
Type type,
bool inherit )
inlinestaticprivateinherited

Definition at line 244 of file Attribute.cs.

245 {
246 if (param.IsDefined(type, inherit: false))
247 {
248 return true;
249 }
250 if ((object)param.Member.DeclaringType == null || !inherit)
251 {
252 return false;
253 }
255 {
256 object[] customAttributes = parentDefinition.GetCustomAttributes(type, inherit: false);
257 for (int i = 0; i < customAttributes.Length; i++)
258 {
259 Type type2 = customAttributes[i].GetType();
261 if (customAttributes[i] is Attribute && attributeUsageAttribute.Inherited)
262 {
263 return true;
264 }
265 }
266 }
267 return false;
268 }
static AttributeUsageAttribute InternalGetAttributeUsage(Type type)
Definition Attribute.cs:319
static PropertyInfo GetParentDefinition(PropertyInfo property, Type[] propertyParameters)
Definition Attribute.cs:71

References System.Attribute.GetParentDefinition(), System.Attribute.InternalGetAttributeUsage(), and System.type.

Referenced by System.Attribute.IsDefined().