Typically, to change your code to use an interface type instead of a class type you just need to remove the 'Class' suffix and compile the code! Another way to find what the applicable interface is - look at the definition of the class type. The class usually derives from one or more interfaces. Look at the definition of each interface - one of them will have CoClass attribute and this is the interface that you are looking for.
The case with EnvDTE/VSLangProj is a little bit different. I believe there should be a recommendation coming from the VSIP team encouraging to use Type Embedding. Unfortunately, some constants in the EnvDTE/VSLangProj assemblies cannot be embedded. For these you will need manually embed the values of the constant into your project.Since those are constant fields in the abstract classes and should never change - this is a safe thing to do.
Reference
Subscribe to:
Post Comments (Atom)
Azure Storage Account Types
Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...
-
Why we need asynchronous tasks? Execute a time consuming operations in parallel to the CLR thread which execute the request If you have ...
-
Demo: I was thinking a way to show images before actually uploading them to server. I would say to preview images using javascript. Obv...
No comments:
Post a Comment