/// <summary> /// Retrieves configuration builder for particular enumeration value /// </summary> /// <typeparam name="T">Enumeration type</typeparam> /// <param name="conf">Configuration builder</param> /// <param name="value">Enum value</param> /// <returns>Configuration builder</returns> public static EnumValueExportConfiguration Value <T>(this EnumConfigurationBuilder <T> conf, T value) where T : struct { var n = Enum.GetName(typeof(T), value); var field = typeof(T)._GetField(n); var c = new EnumValueExportConfiguration(field, conf._blueprint); return(c); }
/// <summary> /// Retrieves configuration builder for particular enumeration value /// </summary> /// <typeparam name="T">Enumeration type</typeparam> /// <param name="conf">Configuration builder</param> /// <param name="value">Enum value</param> /// <returns>Configuration builder</returns> public static EnumValueExportConfiguration Value <T>(this EnumConfigurationBuilder <T> conf, T value) where T : struct { var n = Enum.GetName(typeof(T), value); var field = typeof(T)._GetField(n); IEnumConfigurationBuidler ecb = conf; var c = ecb.ValueExportConfigurations.GetOrCreate(field, () => new EnumValueExportConfiguration(field)); return(c); }