/
Support Statement: adding/removing Stub Framework Content

Support Statement: adding/removing Stub Framework Content

Q: How can I add or remove an item from the generated stub file.

A: Use a Post-Analyse Refactor/Migrate migstatus attribute to set +referenced  or -referenced. 

The id indicated in the migrate must correspond to the source API location of the symbol being referenced or dereferenced.  For enums, this is library scope even through the IDF may declare them at class scope. 

In order for a symbol to be authored, its parent must be referenced.  

Here is an example.  I want to author a stub for LibName.EnumName.EntryName in the generated code.   This can be done with the following refactor/migrate commands:

...
<Analyse/>

<Refactor>
   <Migrate id="LibName.ClassName" migStatus="+referenced"/>
   <Migrate id="LibName.EnumName" migStatus="+referenced"/>
   <Migrate id="LibName.EnumName.EntryName" migStatus="+referenced"/>
</Refactor>

Adds the following to the stub file for LibName:

   public class ClassName
   {
      public enum EnumName
      {
         EntryName= 9
      }

To remove a stub member, set migStatus="-referenced".


Related content

Using Stub Externals
Using Stub Externals
More like this
Support Statement: Stub Replacement
Support Statement: Stub Replacement
More like this
Using RefactorLibraries Files for COM API replacement
Using RefactorLibraries Files for COM API replacement
More like this
Support Statement: Generating a Global Stub Framework
Support Statement: Generating a Global Stub Framework
More like this
Support Statement: Dealing with multiple versions of the same class in IDF
Support Statement: Dealing with multiple versions of the same class in IDF
More like this
Support Statetment: ReplaceFile for Stubs
Support Statetment: ReplaceFile for Stubs
More like this