Add-in activation
Host app calls System.AddIn.Hosting.AddInToken.Activate.
System.AddIn Activate, loads the Add-in.dll creating addin instance that implements the Add-In (entrypoint) interface.
Next, System.AddIn loads AddInSideAdapter.dll creating Add-In side Automation Adapter and passes it the AddIn instance to hold as the view.
Add-In side Automation Adapter implements the Automation (entrypoint) contract.
Next, System.AddIn creates a Host-side automation adapter and passes it the AddIn-side adapter instance to hold as the add-in-side contract.
Host-side Automation Adapter implements the Automation view.
Add-in initialization
Host app calls Automation initialize method of Host-side adapter (view), passing host object model (view) instance as parameter.
Host-side automation adapter converts host objectmodel view to objectmodel contract by creating instance of Object model host adapter contract.
Object model host adapter contract holds host Object model view instance.
Host-side adapter (view) calls AddIn side automation adapter (contract) initialize method, passing object model host adapter contract instance as parameter.
Add-in side automation adapter contract Initialize converts Objectmodel host adapter contract to add-in adapter view by creating instance of Object model addin adapter contract.
Object model AddIn adapter view holds host-side adapter object model contract.
AddIn side automation adapter calls Add-in (view) Initialize method, passing object model addIn adapter (view) instance.
Host Automation via method call
Add-in automates host by calling method on object model addin adapter (view).
Add-in side object model adapter (view) method calls host-side adapter object model contract instance method.
Host-side adapter object model contract method calls host app object model (view) method.
Host Automation via method call with parameter
Add-in automates host by calling method on object model addin adapter (view) with custom type parameter view.
Add-in side object model adapter (view) method converts custom type view to add-in side custom type contract parameter.
Add-in side object model adapter (view) method calls host-side adapter object model contract instance method with add-in side custom type contract parameter.
Host-side adapter object model contract method converts add-in side custom type contract parameter to host-side adapter view type parameter.
Host-side adapter object model contract method calls host app object model (view) method with host-side adapter view type parameter.
Posted
Jan 19 2009, 09:54 PM
by
Gary