private static ConfigurationIntegerPropertyBuilder <TProperty> CreateForNullableInterger <TModel, TProperty>(this IModelWithProperties <TModel> source, LambdaExpression expression) where TProperty : struct, IComparable { return(new ConfigurationIntegerPropertyBuilder <TProperty>(source.GetOrAddPrimitivePropertyDefinition(expression, typeof(TProperty?), false))); }
/// <summary> /// Gets ConfigurationPropertyModelBuilder for enum value /// </summary> /// <typeparam name="TModel">Source model type</typeparam> /// <param name="source">model with property</param> /// <param name="expression">property selector</param> /// <returns>ConfigurationEnumPropertyBuilder for selected property</returns> public static ConfigurationEnumPropertyBuilder Property <TModel>(this IModelWithProperties <TModel> source, Expression <Func <TModel, Enum> > expression) => new ConfigurationEnumPropertyBuilder(source.GetOrAddPrimitivePropertyDefinition(expression, typeof(Enum)));
private static ConfigurationFloatPropertyBuilder <TProperty> CreateForFloat <TModel, TProperty>(this IModelWithProperties <TModel> source, LambdaExpression expression) where TProperty : IComparable { return(new ConfigurationFloatPropertyBuilder <TProperty>(source.GetOrAddPrimitivePropertyDefinition(expression, typeof(TProperty)))); }
/// <summary> /// Gets ConfigurationPropertyModelBuilder for a nullable date time value /// </summary> /// <typeparam name="TModel">Source model type</typeparam> /// <param name="source">model with property</param> /// <param name="expression">property selector</param> /// <returns>ConfigurationDateTimePropertyBuilder for selected property</returns> public static ConfigurationDateTimePropertyBuilder Property <TModel>(this IModelWithProperties <TModel> source, Expression <Func <TModel, DateTime?> > expression) => new ConfigurationDateTimePropertyBuilder(source.GetOrAddPrimitivePropertyDefinition(expression, typeof(DateTime?), false));