public void FromAttributes()
 {
     var builder = new TypeFeatureProviderBuilder();
     var collectionOfTypes = new Collection<Type> {typeof (TypeWithFeatures)};
     var provider = builder.FromAttributes(collectionOfTypes).Build();
     Assert.IsTrue(provider.ContentProperties.Any());
     Assert.IsTrue(provider.TypeConverters.Any());
 }
Example #2
0
        public void FromAttributes()
        {
            var builder           = new TypeFeatureProviderBuilder();
            var collectionOfTypes = new Collection <Type> {
                typeof(TypeWithFeatures)
            };
            var provider = builder.FromAttributes(collectionOfTypes).Build();

            Assert.IsTrue(provider.ContentProperties.Any());
            Assert.IsTrue(provider.TypeConverters.Any());
        }
        private static ITypeFeatureProvider GetFeatureProvider(IEnumerable <Assembly> assembliesToScan)
        {
            var builder = new TypeFeatureProviderBuilder().FromAttributes(assembliesToScan.AllExportedTypes());

            return(builder.Build());
        }