/// <summary>
        ///     Include specified property to resulting typing
        /// </summary>
        /// <param name="tc">Configuration builder</param>
        /// <param name="property">Property to include</param>
        /// <returns>Fluent</returns>
        public static PropertyExportBuilder WithProperty <T, TData>(this ITypedExportBuilder <T> tc,
                                                                    Expression <Func <T, TData> > property)
        {
            var prop = LambdaHelpers.ParsePropertyLambda(property);
            ClassOrInterfaceExportBuilder tcb = tc as ClassOrInterfaceExportBuilder;

            return(new PropertyExportBuilder(tcb.Blueprint, prop));
        }
        /// <summary>
        ///     Include specified property to resulting typing
        /// </summary>
        /// <param name="tc">Configuration builder</param>
        /// <param name="property">Property to include</param>
        /// <returns>Fluent</returns>
        public static PropertyExportConfigurationBuilder WithProperty <T, TData>(this TypeConfigurationBuilder <T> tc,
                                                                                 Expression <Func <T, TData> > property)
        {
            var prop = LambdaHelpers.ParsePropertyLambda(property);
            ITypeConfigurationBuilder tcb = tc;

            return(new PropertyExportConfigurationBuilder(prop, tc._blueprint));
        }
        /// <summary>
        ///     Include specified property to resulting typing
        /// </summary>
        /// <param name="tc">Configuration builder</param>
        /// <param name="property">Property to include</param>
        /// <returns>Fluent</returns>
        public static PropertyExportConfiguration WithProperty <T, TData>(this TypeConfigurationBuilder <T> tc,
                                                                          Expression <Func <T, TData> > property)
        {
            var prop = LambdaHelpers.ParsePropertyLambda(property);
            ITypeConfigurationBuilder tcb = tc;

            return
                ((PropertyExportConfiguration)
                 tcb.MembersConfiguration.GetOrCreate(prop, () => new PropertyExportConfiguration()));
        }
 /// <summary>
 ///     Include specified property to resulting typing
 /// </summary>
 /// <param name="tc">Configuration builder</param>
 /// <param name="property">Property to include</param>
 /// <param name="configuration">Configuration to be applied to selected property</param>
 /// <returns>Fluent</returns>
 public static ClassConfigurationBuilder <T> WithProperty <T, TData>(this ClassConfigurationBuilder <T> tc,
                                                                     Expression <Func <T, TData> > property, Action <PropertyExportConfiguration> configuration)
 {
     return(tc.WithProperties(new[] { LambdaHelpers.ParsePropertyLambda(property) }, configuration));
 }
Ejemplo n.º 5
0
 /// <summary>
 ///     Include specified property to resulting typing
 /// </summary>
 /// <param name="property">Property to include</param>
 /// <param name="configuration">Configuration to be applied to selected property</param>
 /// <returns>Fluent</returns>
 public ClassExportBuilder <T> WithProperty <TData>(Expression <Func <T, TData> > property, Action <PropertyExportBuilder> configuration)
 {
     WithProperties(new[] { LambdaHelpers.ParsePropertyLambda(property) }, configuration);
     return(this);
 }