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

◆ IsVisible

bool System.Type.IsVisible
getinherited

Definition at line 363 of file Type.cs.

364 {
365 get
366 {
367 if (this is RuntimeType type)
368 {
369 return RuntimeTypeHandle.IsVisible(type);
370 }
372 {
373 return true;
374 }
375 if (HasElementType)
376 {
377 return GetElementType().IsVisible;
378 }
379 Type type2 = this;
380 while (type2.IsNested)
381 {
382 if (!type2.IsNestedPublic)
383 {
384 return false;
385 }
386 type2 = type2.DeclaringType;
387 }
388 if (!type2.IsPublic)
389 {
390 return false;
391 }
393 {
394 Type[] genericArguments = GetGenericArguments();
395 foreach (Type type3 in genericArguments)
396 {
397 if (!type3.IsVisible)
398 {
399 return false;
400 }
401 }
402 }
403 return true;
404 }
405 }
Type? GetElementType()
virtual Type[] GetGenericArguments()
Definition Type.cs:500
virtual bool IsGenericParameter
Definition Type.cs:85
virtual bool IsGenericType
Definition Type.cs:111
bool IsVisible
Definition Type.cs:364
bool HasElementType
Definition Type.cs:143
virtual bool IsGenericTypeDefinition
Definition Type.cs:113

Referenced by System.ComponentModel.DataAnnotations.LocalizableString.GetLocalizableValue(), System.Runtime.Serialization.ClassDataContract.IsNonAttributedTypeValidForSerialization(), System.Runtime.Serialization.DataContract.IsTypeVisible(), System.Linq.Expressions.Compiler.ILGen.ShouldLdtoken(), and System.ComponentModel.DataAnnotations.CustomValidationAttribute.ValidateValidatorTypeParameter().