Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AutoBuilder{TModel}"/> class.
        /// </summary>
        /// <param name="propertyPopulationService">The property population service.</param>
        /// <param name="configuration">The configuration.</param>
        public AutoBuilder(IPropertyPopulationService propertyPopulationService, AutoBuilderConfiguration configuration)
        {
            this.propertyPopulationService = propertyPopulationService;
            this.configuration             = configuration;

            this.Actions     = new List <Action>();
            this.hasInstance = false;
        }
Пример #2
0
 public object GetConventionResult(string propertyName, Type type, AutoBuilderConfiguration configuration)
 {
     return(this.First(x => x.IsMatch(propertyName, type)).Result(configuration));
 }