internal string GetStringForEnumCompare(EnumMapping mapping, string memberName, bool useReflection) { if (!useReflection) { CodeIdentifier.CheckValidIdentifier(memberName); return(mapping.TypeDesc.CSharpName + ".@" + memberName); } string variable = this.GetStringForEnumMember(mapping.TypeDesc.CSharpName, memberName, useReflection); return(this.GetStringForEnumLongValue(variable, useReflection)); }
internal void WriteEnumCase(string fullTypeName, ConstantMapping c, bool useReflection) { this.writer.Write("case "); if (useReflection) { this.writer.Write(c.Value.ToString(CultureInfo.InvariantCulture)); } else { this.writer.Write(fullTypeName); this.writer.Write(".@"); CodeIdentifier.CheckValidIdentifier(c.Name); this.writer.Write(c.Name); } this.writer.Write(": "); }