Exemplo n.º 1
0
        public void LazyImportMany()
        {
            var provider = new ImportDefinitionProvider();
            var import   = provider.ImportsFor(typeof(ClassWithLazyImportMany)).Single();

            Assert.AreEqual(typeof(IService), import.ContractType);
            Assert.AreEqual(ImportCardinality.Many, import.Cardinality);
        }
 IEnumerable <ImportDefinition> ImportsOf(object value)
 {
     return(_importDefinitionProvider.ImportsFor(value.GetType()));
 }