public GapEnumGenerator(EnumValueMode valueMode) { ValueMode = valueMode; }
public RegularEnumGenerator(bool constEnums, EnumValueMode valueMode) : base(valueMode) { ConstEnums = constEnums; }
public TypeEnumGenerator(EnumValueMode valueMode) : base(valueMode) { }
/// <summary> /// Obtains the string value for the given enum field (<paramref name="enumValue"/>). /// The value obtained depends on the <paramref name="mode"/> specified. /// </summary> /// <param name="mode">The mode used to generate the enum value, it can be the enum field value or the enum field name.</param> /// <param name="enumValue">The field/option of the enum that the values needs to be obtained from.</param> protected static string GetEnumValue(EnumValueMode mode, TsEnumValue enumValue) { return(mode == EnumValueMode.Number ? enumValue.Value : "\"" + enumValue.Name + "\""); }