private static IEnumerable<Type> GetMappingTypesTaggedWith(Engine engine) { return Assembly.GetExecutingAssembly().GetTypes() .Where(x => x.GetInterfaces().Contains(typeof (IMapping)) && Attribute.IsDefined(x, typeof (ApplyToAttribute)) && engine.ApplyTo(x)).ToList(); }