public static MappingBuilder DiscoverIn <TAssemblyType>() { var discover = new Discover(); var mappings = discover.FindFrom <TAssemblyType>(); return(new MappingBuilder(mappings, typeof(TAssemblyType))); }
public void Discover_FromTypeInAssembly_FindFrom_ReturnsMappings() { var discover = new Discover(); var mappings = discover.FindFrom <DiscoverTests>(); mappings.FirstOrDefault(m => m is UserToUserViewMap).ShouldNotBeNull(); }
public MappingBuilder AndDiscoverIn <TAssemblyType>() { var assemblyType = typeof(TAssemblyType); if (_visitedAssemblyLocations.Contains(assemblyType.Assembly.Location)) { throw new ArgumentException($"Already added mappings in assembly {assemblyType.Assembly.FullName}."); } var discover = new Discover(); var mappings = discover.FindFrom <TAssemblyType>(); _mappings.AddRange(mappings); return(this); }