/// <summary> /// Gets ConfigurationModelBuilder for type /// </summary> /// <typeparam name="TConfig">Configuration type</typeparam> /// <param name="expression">Path to config</param> /// <param name="displayName">Display name for the config</param> /// <param name="description">Description for the config</param> /// <returns>ConfigurationModelBuilder for type</returns> public ConfigurationModelBuilder <TConfig> Config <TConfig>(Expression <Func <TConfigurationSet, Config <TConfig> > > expression, string displayName, string description) { var model = definition.GetOrInitialize <TConfig>(ExpressionHelper.GetPropertyNameFromExpression(expression)); model.ConfigurationDisplayName = displayName; model.ConfigurationDescription = description; return(new ConfigurationModelBuilder <TConfig>(model)); }
/// <summary> /// Gets ConfigurationModelBuilder for type /// </summary> /// <typeparam name="TConfiguration">Configuration type</typeparam> /// <param name="expression">Path to config</param> /// <param name="displayName">Display name for the config</param> /// <param name="description">Description for the config</param> /// <returns>ConfigurationModelBuilder for type</returns> public ConfigurationModelBuilder <TConfiguration, TConfigurationSet> Config <TConfiguration>(Expression <Func <TConfigurationSet, Config <TConfiguration> > > expression, string displayName, string description) where TConfiguration : class, new() { var model = definition.GetOrInitialize(expression); model.ConfigurationDisplayName = displayName; model.ConfigurationDescription = description; return(new ConfigurationModelBuilder <TConfiguration, TConfigurationSet>(model)); }