public void TestGetsDependencies()
        {
            //--Arrange
            ReflectingRegistrationSource.CodebaseNamespacePrefix = nameof(Lippert);

            //--Act
            var dependencies = ReflectingRegistrationSource.GetCodebaseDependencies()
                               .ToDictionary(x => (Type)x.Key, x => x.AsEnumerable());

            //--Assert
            CollectionAssert.AreEquivalent(new Type[] { typeof(Core.Data.Contracts.IValuedColumnMap) }, dependencies[typeof(Core.Data.ValuedColumnMap)]);
        }
Пример #2
0
 public static List <ITableMapBuilder> GetTableMapBuilders() =>
 ReflectingRegistrationSource.GetCodebaseTypesAssignableTo <ITableMapBuilder>()
 .Where(t => t.IsClass && !t.IsAbstract && !t.ContainsGenericParameters)
 .Select(t => (ITableMapBuilder)Activator.CreateInstance(t))
 .ToList();
Пример #3
0
 public static Dictionary <Type, ITableMap> GetTableMaps() =>
 ReflectingRegistrationSource.GetCodebaseTypesAssignableTo <ITableMap>()
 .Where(t => t.IsClass && !t.IsAbstract && !t.ContainsGenericParameters)
 .Select(t => (ITableMap)Activator.CreateInstance(t))
 .ToDictionary(x => x.ModelType);