public static object ToRawValue(this object defaultValueOrLiteral) { Enum e = defaultValueOrLiteral as Enum; if (e != null) { return(RuntimeAugments.GetEnumValue(e)); } return(defaultValueOrLiteral); }