public static string GetName(this CssFontWeightType value) { switch (value) { case CssFontWeightType.Bold: return("bold"); case CssFontWeightType.Bolder: return("bolder"); case CssFontWeightType.Inherit: return("inherit"); case CssFontWeightType.Lighter: return("lighter"); case CssFontWeightType.Normal: return("normal"); default: throw new Exception("Unknown value: " + value); } }
public CssFontWeight(CssFontWeightType type) { value = type.GetName(); }