Include custom attributes in method and type metadata

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 1 year ago by Tobias Lingemann - Software Devolpment Engineer, Vector Informatik GmbH
Avatar

Hi,

we are currently using reflection to load metadata from assemblies, which has its limits. Therefore I am looking for ways to use Roslyn to get same infos and the IBinaryAssembly interface gives me most of the information that I need.

One thing that is missing though are the custom attributes. I see that you read the custom attributes to set various properties. What I would need is a collection of the qualified attribute names (e.g. as strings).

Since you already read the data, I suppose you could just save it in a collection and provide it via the interfaces.


Best regards, Tobias Lingemann.

Comments (1)

Posted 1 year ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tobias,

When we save .NET assembly reflection data, we store the minimal amount necessary to support various parsing and IntelliPrompt features.  For instance, we look for the specific presence of certain attributes like EditorBrowsableAttribute, etc. and only a persist a bit value if they are set.  This is done to minimize the memory necessary to hold all the reflection data, which can grow if there are a lot of referenced assemblies.  In an effort to be as effcient as possible, we unfortunately probably won't be storing data on additional custom attributes.  Your best bet would be to use reflection or Roslyn for that level of reflection detail.


Actipro Software Support

The latest build of this product (v24.1.3) was released 26 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.