public LogicSchemaBuilder(LanguageSchema languageSchema) { _languageSchema = languageSchema; }
private IEnumerable <(AggregateInfo, AggregateViewInfo, Type)> FindProjectorTypesInAssembly(Assembly projectionAssembly, LanguageSchema languageSchema) { var projectorTypes = projectionAssembly.DefinedTypes.Where(x => x.IsSubclassOf(typeof(Projector))); foreach (var agg in languageSchema.Aggregates) { var aggProjectorTypes = projectorTypes.Where(x => x.BaseType.GenericTypeArguments.Contains(agg.Type)); foreach (var aggProjectorType in aggProjectorTypes) { yield return(agg, FindAggregateViewForProjector(aggProjectorType), aggProjectorType); } } }