I am using System.AddIn to add new component to my application. Application successfully pick the newly added add in.
Currently if I want to add new addin then I need to create new project of class library type and then I need to code for that addin.
is it possible to add multiple addin to same class library so every time I need not to add new project?
If possible then how I find appropriate token at the time of loading the add in.
Thanks in advance...
It's definitely possible to have multiple add-ins in one assembly. Every class that is marked with
[System.AddIn.AddInAttribute]
and extends the contract that you specify when doing aFindAddIns
will resolve to a separateAddInToken
.In order to filter the set of tokens that are discovered, have a look at
System.AddIn.Pipeline.QualificationDataAttribute
. This attribute lets you add name/value metadata to your add-in types that you can then access fromAddInToken
.