Return other contract in Method

Apr 6, 2009 at 3:32 PM

Hi,

i'd like to return one contract in a function of an other contract. Is this possible??

My first contract definition looks like:

<AddInContract()> _
Public Interface IPlugin
Inherits IContract
Function getWorkingInterface() As String
End Interface

The other one:

<AddInContract()> _
Public Interface IMyContract
Inherits IContract
Function getPluginID() As String
Function getPlugin() As IPlugin
End Interface


When I start the build process I get the following error:

Error 1 'Contracts.HostSideAdapters.IMyContractToViewHostAdapter' does not implement interface member 'Contracts.HostViews.IMy.getPlugin()'. 'Contracts.HostSideAdapters.IMyContractToViewHostAdapter.getPlugin()' cannot implement 'Contracts.HostViews.IMy.getPlugin()' because it does not have the matching return type of 'Contracts.HostViews.IPlugin'. D:\ProjekteVS2008\MAFTest\HostSideAdapters\Generated Files\IMyContractToViewHostAdapter.g.cs 15 18 HostSideAdapters


Error 2 'Contracts.AddInSideAdapters.IMyContractToViewAddInAdapter' does not implement interface member 'Contracts.AddInViews.IMy.getPlugin()'. 'Contracts.AddInSideAdapters.IMyContractToViewAddInAdapter.getPlugin()' cannot implement 'Contracts.AddInViews.IMy.getPlugin()' because it does not have the matching return type of 'Contracts.AddInViews.IPlugin'. D:\ProjekteVS2008\MAFTest\AddInSideAdapters\Generated Files\IMyContractToViewAddInAdapter.g.cs 14 18 AddInSideAdapters


Thanks for your help.