public PartBuilder<T> ImportProperty<TContract>( Expression<Func<T, object>> propertyFilter, Action<ImportBuilder> importConfiguration) { Requires.NotNull(propertyFilter, "propertyFilter"); var adapter = new PropertyExpressionAdapter(propertyFilter, importConfiguration, null); base.ImportProperties<TContract>(adapter.VerifyPropertyInfo, adapter.ConfigureImport); return this; }
public PartBuilder<T> ExportProperty( Expression<Func<T, object>> propertyFilter, Action<ExportBuilder> exportConfiguration) { Requires.NotNull(propertyFilter, "propertyFilter"); var adapter = new PropertyExpressionAdapter(propertyFilter, null, exportConfiguration); base.ExportProperties(adapter.VerifyPropertyInfo, adapter.ConfigureExport); return this; }
/// <summary> /// Select a property on the part to import. /// </summary> /// <param name="propertySelector">Expression selecting the property.</param> /// <param name="importConfiguration">Action configuring the imported property.</param> /// <returns>A part builder allowing further configuration of the part.</returns> public PartConventionBuilder <T> ImportProperty( Expression <Func <T, object> > propertySelector, Action <ImportConventionBuilder> importConfiguration) { Requires.NotNull(propertySelector, "propertySelector"); var adapter = new PropertyExpressionAdapter(propertySelector, importConfiguration, null); base.ImportProperties(adapter.VerifyPropertyInfo, adapter.ConfigureImport); return(this); }
/// <summary> /// Select a property to export from the part. /// </summary> /// <typeparam name="TContract">Contract type to export.</typeparam> /// <param name="propertySelector">Expression to select the matching property.</param> /// <param name="exportConfiguration">Action to configure selected properties.</param> /// <returns>A part builder allowing further configuration of the part.</returns> public PartConventionBuilder <T> ExportProperty <TContract>( Expression <Func <T, object> > propertySelector, Action <ExportConventionBuilder> exportConfiguration) { Requires.NotNull(propertySelector, "propertySelector"); var adapter = new PropertyExpressionAdapter(propertySelector, null, exportConfiguration); base.ExportProperties <TContract>(adapter.VerifyPropertyInfo, adapter.ConfigureExport); return(this); }
public PartBuilder <T> ImportProperty <TContract>(Expression <Func <T, object> > propertyFilter, Action <ImportBuilder> importConfiguration) { if (propertyFilter == null) { throw new ArgumentNullException(nameof(propertyFilter)); } var adapter = new PropertyExpressionAdapter(propertyFilter, importConfiguration, null); ImportProperties <TContract>(adapter.VerifyPropertyInfo, adapter.ConfigureImport); return(this); }
/// <summary> /// Select a property on the part to import. /// </summary> /// <param name="propertySelector">Expression selecting the property.</param> /// <param name="importConfiguration">Action configuring the imported property.</param> /// <returns>A part builder allowing further configuration of the part.</returns> public PartConventionBuilder <T> ImportProperty( Expression <Func <T, object> > propertySelector, Action <ImportConventionBuilder> importConfiguration) { if (propertySelector == null) { throw new ArgumentNullException(nameof(propertySelector)); } var adapter = new PropertyExpressionAdapter(propertySelector, importConfiguration, null); base.ImportProperties(adapter.VerifyPropertyInfo, adapter.ConfigureImport); return(this); }
/// <summary> /// Select a property to export from the part. /// </summary> /// <typeparam name="TContract">Contract type to export.</typeparam> /// <param name="propertySelector">Expression to select the matching property.</param> /// <param name="exportConfiguration">Action to configure selected properties.</param> /// <returns>A part builder allowing further configuration of the part.</returns> public PartConventionBuilder <T> ExportProperty <TContract>( Expression <Func <T, object> > propertySelector, Action <ExportConventionBuilder> exportConfiguration) { if (propertySelector == null) { throw new ArgumentNullException(nameof(propertySelector)); } var adapter = new PropertyExpressionAdapter(propertySelector, null, exportConfiguration); base.ExportProperties <TContract>(adapter.VerifyPropertyInfo, adapter.ConfigureExport); return(this); }
public PartBuilder <T> ExportProperty( Expression <Func <T, object> > propertyFilter, Action <ExportBuilder> exportConfiguration) { if (propertyFilter == null) { throw new ArgumentNullException(nameof(propertyFilter)); } var adapter = new PropertyExpressionAdapter(propertyFilter, null, exportConfiguration); ExportProperties(adapter.VerifyPropertyInfo, adapter.ConfigureExport); return(this); }