Example #1
0
        protected override IEntityModel ExtractChildEntityModel(IEntityModel declaringEntity, IDictionary <string, object> attributes, PropertyInfo field)
        {
            var entityType = attributes.GetValueOrDefault("type") as Type;

            if (entityType == null)
            {
                entityType = field.ResolveGenericType(1).OrElseThrow(
                    () => new AxonConfigurationException($"Unable to resolve entity type of field {field.Name}. Please provide type explicitly in @AggregateMember annotation."));
            }

            return(declaringEntity.ModelOf(entityType));
        }
Example #2
0
 protected override IEntityModel ExtractChildEntityModel(IEntityModel declaringEntity, IDictionary <string, object> attributes, PropertyInfo field)
 {
     return(declaringEntity.ModelOf(field.PropertyType));
 }