Пример #1
0
 /// <summary>
 /// Specify a builder for the value of a property on the build result.<br/>
 /// Usage: <code>builder.For( x => x.MyProperty, otherFluentBuilder );</code>
 /// </summary>
 /// <example></example>
 /// <typeparam name="TPropertyType">The type of the property to set. This is inferred.</typeparam>
 /// <param name="propertyExpression">Lambda expression identifying the property to set.</param>
 /// <param name="propertyValueBuilder">The builder to use to build the property's value.</param>
 /// <returns></returns>
 public DynamicFluentBuilder <T> For <TPropertyType>(Expression <Func <T, TPropertyType> > propertyExpression, FluentBuilder <TPropertyType> propertyValueBuilder)
     where TPropertyType : class, new()
 {
     return(With(propertyExpression, propertyValueBuilder));
 }
Пример #2
0
 /// <summary>
 /// Specify a builder for the value of a property on the build result.<br/>
 /// Usage: <code>builder.With( x => x.MyProperty, otherFluentBuilder );</code>
 /// </summary>
 /// <example></example>
 /// <typeparam name="TPropertyType">The type of the property to set. This is inferred.</typeparam>
 /// <param name="propertyExpression">Lambda expression identifying the property to set.</param>
 /// <param name="propertyValueBuilder">The builder to use to build the property's value.</param>
 /// <returns></returns>
 public DynamicFluentBuilder <T> With <TPropertyType>(Expression <Func <T, TPropertyType> > propertyExpression, FluentBuilder <TPropertyType> propertyValueBuilder)
     where TPropertyType : class, new()
 {
     SetProperty(propertyExpression, propertyValueBuilder);
     return(this);
 }