-
Notifications
You must be signed in to change notification settings - Fork 91
Closed
Description
Hi BenMorris,
we ran into a problem when trying to validate our nested internal types, which we first filtered for ResideInNamespaceMatching.
After examining the NetArchTest code, we found the extension method TypeDefinitionExtensions.GetNamespace, which only checks IsNestedPrivate or IsNestedPublic. For testing, we changed our class from internal to private and it worked.
public static string GetNamespace(this TypeDefinition typeDefinition)
{
if (typeDefinition.IsNestedPrivate || typeDefinition.IsNestedPublic)
{
return typeDefinition.DeclaringType.FullName;
}
return typeDefinition.Namespace;
}Metadata
Metadata
Assignees
Labels
No labels