how to access type Visibility

Apr 2, 2014 at 4:30 PM
Hi everybody,

I am using CCI to analyze and visualize assemblies.
(you can take a look at two demo screen casts at
http://www.sharpmetrics.net/index.php/visualisierung/staedtemetapher/beispiel-sharpcity
, web page is currently only in german, sorry)
I have already releases a simple tool to create Famix models with can be imported into the MOOSE platform and CodeCity - this tool can be downloaded from my page).

But currently I am struggling to extract the visibililty information from the analyzed types.
If I have an Microsoft.Cci.MutableCodeModel.NestedTypeDefinition I have access to the visibility, but If I have an I have only the IsPublic property.
Can anybody give me a clue how to access the visibility of a type.

Thank you very much
Thomas
Coordinator
Jul 5, 2015 at 9:27 PM
The visibility of a type is dependent on whether it is nested in another type or not. Hence ITypeDefinition does not tell you anything about visibility. INestedTypeDefinition and INamespaceTypeDefinition have the necessary information. If you want a unified view, try using TypeHelper.TypeVisibilityAsTypeMemberVisibility.