CheckValidIdentifier() статический приватный Метод

static private CheckValidIdentifier ( string ident ) : void
ident string
Результат void
Пример #1
0
        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));
        }
Пример #2
0
 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(": ");
 }