Confuser.Core/DnlibUtils.cs
/// <summary>
///     Determines whether the specified type is visible outside the containing assembly.
/// </summary>
/// <param name="typeDef">The type.</param>
/// <param name="exeNonPublic">Visibility of executable modules.</param>
/// <returns><c>true</c> if the specified type is visible outside the containing assembly; otherwise, <c>false</c>.</returns>
// Token: 0x0600014B RID: 331 RVA: 0x0000B768 File Offset: 0x00009968
Determines whether the specified type is visible outside the containing assembly.
Determines whether the specified type is visible outside the containing assembly .
public static bool IsVisibleOutside(this TypeDef typeDef, bool exeNonPublic = true)
		{
			if (exeNonPublic && (typeDef.Module.Kind == ModuleKind.Windows || typeDef.Module.Kind == ModuleKind.Console))
			{
				return false;
			}
			while (typeDef.DeclaringType != null)
			{
				if (!typeDef.IsNestedPublic && !typeDef.IsNestedFamily && !typeDef.IsNestedFamilyOrAssembly)
				{
					return false;
				}
				typeDef = typeDef.DeclaringType;
				if (typeDef == null)
				{
					throw new UnreachableException();
				}
			}
			return typeDef.IsPublic;
		}
public static bool IsVisibleOutside ( this TypeDef typeDef , bool exeNonPublic = true ) { if ( exeNonPublic && ( typeDef . Module . Kind == ModuleKind . Windows || typeDef . Module . Kind == ModuleKind . Console ) ) { return false ; } while ( typeDef . DeclaringType != null ) { if ( ! typeDef . IsNestedPublic && ! typeDef . IsNestedFamily && ! typeDef . IsNestedFamilyOrAssembly ) { return false ; } typeDef = typeDef . DeclaringType ; if ( typeDef == null ) { throw new UnreachableException ( ) ; } } return typeDef . IsPublic ; }
Determines whether the specified type is visible outside the containing assembly.
Determines whether the specified type is visible outside the containing assembly .
None
TypeDef
this
exeNonPublic
bool
Visibility of executable modules.
Visibility of executable modules .
typeDef
None