Пример #1
0
 public LogicSchemaBuilder(LanguageSchema languageSchema)
 {
     _languageSchema = languageSchema;
 }
Пример #2
0
        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);
                }
            }
        }