Home > Net >  On the issue of the Export of MEF, solve!
On the issue of the Export of MEF, solve!

Time:04-08

 
Public class Test
{
[the Import (" Refresh1111 ")]
Public IAsyncCommand Refresh1111Command {get; Internal set; }

[the Import (" Refresh2222 ")]
Public IAsyncCommand Refresh2222Command {get; Internal set; }
}


[Export (" Refresh1111 typeof (IAsyncCommand)]
[Export (" Refresh2222 typeof (IAsyncCommand)]
Public class RefreshTest
{
XXXXXX
}



Can't define multiple (Export)?

CodePudding user response:

[ImportMany]
Do you want to lazy, of course, depends on you

CodePudding user response:

Oh, wrong and you are to define multiple export, could theoretically
  •  Tags:  
  • C#