コード例 #1
0
ファイル: AutoBuilder.cs プロジェクト: getsetcode/NAuto
        /// <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));
 }