MEF Constructor Parameters with Multiple Constructors
Posted
by InterWAS
on Stack Overflow
See other posts from Stack Overflow
or by InterWAS
Published on 2010-05-31T02:55:10Z
Indexed on
2010/05/31
3:02 UTC
Read the original article
Hit count: 1125
Hi, i starting to use MEF, and i have a class with multiple constructors, like this:
[Export(typeof(ifoo))]
class foo : ifoo {
void foo() { ... }
[ImportingConstructor]
void foo(object par1) { ... }
}
Everthing works fine, except that the 2nd constructor is never called, i am using catalog.ComposeExportedValue() when composing, what's wrong?
© Stack Overflow or respective owner