(this T tc, BindingFlags bindingFlags, Action
- /// Include all properties to resulting typing
+ /// Include all properties to resulting typing
///
/// Configuration builder
/// Configuration to be applied to each property
/// Fluent
- public static T WithAllProperties(this T tc, Action configuration = null) where T : ITypeConfigurationBuilder
+ public static T WithAllProperties(this T tc, Action configuration = null)
+ where T : ITypeConfigurationBuilder
{
var prop = tc.Type.GetProperties(TypeExtensions.MembersFlags);
return tc.WithProperties(prop, configuration);
}
///
- /// Include all public properties to resulting typing
+ /// Include all public properties to resulting typing
///
/// Configuration builder
/// Configuration to be applied to each property
/// Fluent
- public static T WithPublicProperties(this T tc, Action configuration = null) where T : ITypeConfigurationBuilder
+ public static T WithPublicProperties(this T tc, Action configuration = null)
+ where T : ITypeConfigurationBuilder
{
var prop = tc.Type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
return tc.WithProperties(prop, configuration);
}
+
#endregion
#region Fields
+
///
- /// Include specified field to resulting typing
+ /// Include specified field to resulting typing
///
/// Configuration builder
/// Field to include
/// Fluent
- public static PropertyExportConfiguration WithField(this TypeConfigurationBuilder tc, Expression> field)
+ public static PropertyExportConfiguration WithField(this TypeConfigurationBuilder tc,
+ Expression> field)
{
var prop = LambdaHelpers.ParseFieldLambda(field);
ITypeConfigurationBuilder tcb = tc;
- return (PropertyExportConfiguration)tcb.MembersConfiguration.GetOrCreate(prop, () => new PropertyExportConfiguration());
+ return
+ (PropertyExportConfiguration)
+ tcb.MembersConfiguration.GetOrCreate(prop, () => new PropertyExportConfiguration());
}
///
- /// Include specified property to resulting typing
+ /// Include specified property to resulting typing
///
/// Configuration builder
/// Property to include
/// Configuration to be applied to selected property
/// Fluent
- public static InterfaceConfigurationBuilder WithField(this InterfaceConfigurationBuilder tc, Expression> property, Action configuration)
+ public static InterfaceConfigurationBuilder WithField(this InterfaceConfigurationBuilder tc,
+ Expression> property, Action configuration)
{
- ApplyMembersConfiguration(tc, new[] { LambdaHelpers.ParseFieldLambda(property) }, configuration);
+ ApplyMembersConfiguration(tc, new[] {LambdaHelpers.ParseFieldLambda(property)}, configuration);
return tc;
}
///
- /// Include specified property to resulting typing
+ /// Include specified property to resulting typing
///
/// Configuration builder
/// Property to include
/// Configuration to be applied to selected property
/// Fluent
- public static ClassConfigurationBuilder WithField(this ClassConfigurationBuilder tc, Expression> property, Action configuration)
+ public static ClassConfigurationBuilder WithField(this ClassConfigurationBuilder tc,
+ Expression> property, Action configuration)
{
- return tc.WithFields(new[] { LambdaHelpers.ParseFieldLambda(property) }, configuration);
+ return tc.WithFields(new[] {LambdaHelpers.ParseFieldLambda(property)}, configuration);
}
///
- /// Include specified fields to resulting typing
+ /// Include specified fields to resulting typing
///
/// Configuration builder
/// Fields to include
/// Configuration to be applied to each field
/// Fluent
- public static T WithFields(this T tc, IEnumerable fields, Action configuration = null) where T : ITypeConfigurationBuilder
+ public static T WithFields(this T tc, IEnumerable fields,
+ Action configuration = null) where T : ITypeConfigurationBuilder
{
return ApplyMembersConfiguration(tc, fields, configuration);
}
///
- /// Include specified fields to resulting typing
+ /// Include specified fields to resulting typing
///
/// Configuration builder
/// Predicate function that should mathc for fields to include
/// Configuration to be applied to each field
/// Fluent
- public static T WithFields(this T tc, Func predicate, Action configuration = null) where T : ITypeConfigurationBuilder
+ public static T WithFields(this T tc, Func predicate,
+ Action configuration = null) where T : ITypeConfigurationBuilder
{
var prop = tc.Type.GetFields(TypeExtensions.MembersFlags).Where(predicate);
return tc.WithFields(prop, configuration);
}
///
- /// Include all fields to resulting typing
+ /// Include all fields to resulting typing
///
/// Configuration builder
/// Configuration to be applied to each field
/// Fluent
- public static T WithAllFields(this T tc, Action configuration = null) where T : ITypeConfigurationBuilder
+ public static T WithAllFields(this T tc, Action configuration = null)
+ where T : ITypeConfigurationBuilder
{
var prop = tc.Type.GetFields(TypeExtensions.MembersFlags);
return tc.WithFields(prop, configuration);
}
///
- /// Include all public fields to resulting typing
+ /// Include all public fields to resulting typing
///
/// Configuration builder
/// Configuration to be applied to each field
/// Fluent
- public static T WithPublicFields(this T tc, Action configuration = null) where T : ITypeConfigurationBuilder
+ public static T WithPublicFields(this T tc, Action configuration = null)
+ where T : ITypeConfigurationBuilder
{
var prop = tc.Type.GetFields(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
return tc.WithFields(prop, configuration);
}
///
- /// Include specified fields to resulting typing
+ /// Include specified fields to resulting typing
///
/// Configuration builder
/// BindingFlags describing fields to include
/// Configuration to be applied to each field
/// Fluent
- public static T WithFields(this T tc, BindingFlags bindingFlags, Action configuration = null) where T : ITypeConfigurationBuilder
+ public static T WithFields(this T tc, BindingFlags bindingFlags,
+ Action configuration = null) where T : ITypeConfigurationBuilder
{
var prop = tc.Type.GetFields(bindingFlags);
return tc.WithFields(prop, configuration);
}
+
#endregion
#region Methods
+
///
- /// Include specified method to resulting typing.
- /// User to mock up method parameters or specify configuration for perticular method parameter
+ /// Include specified method to resulting typing.
+ /// User to mock up method parameters or specify configuration for perticular method
+ /// parameter
///
/// Configuration builder
/// Method to include
/// Fluent
- public static MethodExportConfiguration WithMethod(this TypeConfigurationBuilder tc, Expression> method)
+ public static MethodExportConfiguration WithMethod(this TypeConfigurationBuilder tc,
+ Expression> method)
{
var prop = LambdaHelpers.ParseMethodLambda(method);
ITypeConfigurationBuilder tcb = tc;
- var methodConf = (MethodExportConfiguration)tcb.MembersConfiguration.GetOrCreate(prop, () => new MethodExportConfiguration());
+ var methodConf =
+ (MethodExportConfiguration)
+ tcb.MembersConfiguration.GetOrCreate(prop, () => new MethodExportConfiguration());
ExtractParameters(tcb, method);
return methodConf;
}
///
- /// Include specified method to resulting typing.
- /// User to mock up method parameters or specify configuration for perticular method parameter
+ /// Include specified method to resulting typing.
+ /// User to mock up method parameters or specify configuration for perticular method
+ /// parameter
///
/// Configuration builder
/// Method to include
/// configuration to be applied to method
/// Fluent
- public static InterfaceConfigurationBuilder WithMethod(this InterfaceConfigurationBuilder tc, Expression> method, Action configuration)
+ public static InterfaceConfigurationBuilder WithMethod(this InterfaceConfigurationBuilder tc,
+ Expression> method, Action configuration)
{
- tc.WithMethods(new[] { LambdaHelpers.ParseMethodLambda(method) }, configuration);
+ tc.WithMethods(new[] {LambdaHelpers.ParseMethodLambda(method)}, configuration);
ITypeConfigurationBuilder tcb = tc;
ExtractParameters(tcb, method);
return tc;
}
///
- /// Include specified method to resulting typing.
- /// User to mock up method parameters or specify configuration for perticular method parameter
+ /// Include specified method to resulting typing.
+ /// User to mock up method parameters or specify configuration for perticular method
+ /// parameter
///
/// Configuration builder
/// Method to include
/// Configuration to be applied to method
/// Fluent
- public static ClassConfigurationBuilder WithMethod(this ClassConfigurationBuilder tc, Expression> method, Action configuration)
+ public static ClassConfigurationBuilder WithMethod(this ClassConfigurationBuilder tc,
+ Expression> method, Action configuration)
{
- tc.WithMethods(new[] { LambdaHelpers.ParseMethodLambda(method) }, configuration);
+ tc.WithMethods(new[] {LambdaHelpers.ParseMethodLambda(method)}, configuration);
ITypeConfigurationBuilder tcb = tc;
ExtractParameters(tcb, method);
return tc;
}
///
- /// Include specified method to resulting typing.
- /// User to mock up method parameters or specify configuration for perticular method parameter
+ /// Include specified method to resulting typing.
+ /// User to mock up method parameters or specify configuration for perticular method
+ /// parameter
///
/// Configuration builder
/// Method to include
/// Fluent
- public static MethodExportConfiguration WithMethod(this TypeConfigurationBuilder tc, Expression> method)
+ public static MethodExportConfiguration WithMethod(this TypeConfigurationBuilder tc,
+ Expression> method)
{
var prop = LambdaHelpers.ParseMethodLambda(method);
ITypeConfigurationBuilder tcb = tc;
- var methodConf = (MethodExportConfiguration)tcb.MembersConfiguration.GetOrCreate(prop, () => new MethodExportConfiguration());
+ var methodConf =
+ (MethodExportConfiguration)
+ tcb.MembersConfiguration.GetOrCreate(prop, () => new MethodExportConfiguration());
ExtractParameters(tcb, method);
return methodConf;
}
///
- /// Include specified method to resulting typing.
- /// User to mock up method parameters or specify configuration for perticular method parameter
+ /// Include specified method to resulting typing.
+ /// User to mock up method parameters or specify configuration for perticular method
+ /// parameter
///
/// Configuration builder
/// Method to include
/// Configuration to be applied to method
/// Fluent
- public static InterfaceConfigurationBuilder WithMethod(this InterfaceConfigurationBuilder tc, Expression> method, Action configuration)
+ public static InterfaceConfigurationBuilder WithMethod(this InterfaceConfigurationBuilder