Get Metadata without Lazy<>

Dec 30, 2009 at 2:54 PM

Is it possible to get the Metadata from a module without using the Lazy<>? The reason I don't want to use Lazy<> is because I want the modules to instantiate right away rather than when they are first used.

Here is what I am doing now, but what if I want to not use Lazy<>? What do I use?

 

[ImportMany]
public Lazy<ILogger, ILoggerMetadata>[] Loggers { get; set; }

Dec 31, 2009 at 9:04 AM

did you consider to avoid the metadata and add the metadata information into your ILogger?