private IEnumerable <Feature> BuiltinFeatures() { yield return(new Feature { Descriptor = new FeatureDescriptor { Id = "SuperRocket.Framework", Extension = new ExtensionDescriptorEntry(new ExtensionDescriptor(), "SuperRocket.Framework", "Module", string.Empty) }, ExportedTypes = _serviceTypeHarvester.GetTypes(typeof(IDependency).Assembly) }); }
private IConvention[] GetConventions() { var conventions = _serviceTypeHarvester.GetTypes(typeof(EntityFrameworkDbContextFactory).Assembly).Where(t => typeof(IConvention).IsAssignableFrom(t)); var list = new List <IConvention>(); foreach (var convention in conventions) { var c = convention.GetConstructor(new Type[0]); if (c == null) { continue; } var item = c.Invoke(new object[0]) as IConvention; if (item == null) { continue; } list.Add(item); } return(list.ToArray()); }