Exemple #1
0
 void InvalidCombination(TypeMember member, TypeMemberModifiers mod1, TypeMemberModifiers mod2)
 {
     if (!member.IsModifierSet(mod1) || !member.IsModifierSet(mod2))
     {
         return;
     }
     Error(
         CompilerErrorFactory.InvalidCombinationOfModifiers(
             member,
             member.FullName,
             string.Format("{0}, {1}", mod1.ToString().ToLower(), mod2.ToString().ToLower())));
 }
Exemple #2
0
 void WriteModifiers(TypeMember member)
 {
     WriteIndented();
     if (member.IsPartial)
     {
         WriteKeyword("partial ");
     }
     if (member.IsPublic)
     {
         WriteKeyword("public ");
     }
     else if (member.IsProtected)
     {
         WriteKeyword("protected ");
     }
     else if (member.IsPrivate)
     {
         WriteKeyword("private ");
     }
     else if (member.IsInternal)
     {
         WriteKeyword("internal ");
     }
     if (member.IsStatic)
     {
         WriteKeyword("static ");
     }
     else if (member.IsModifierSet(TypeMemberModifiers.Override))
     {
         WriteKeyword("override ");
     }
     else if (member.IsModifierSet(TypeMemberModifiers.Virtual))
     {
         WriteKeyword("virtual ");
     }
     else if (member.IsModifierSet(TypeMemberModifiers.Abstract))
     {
         WriteKeyword("abstract ");
     }
     if (member.IsFinal)
     {
         WriteKeyword("final ");
     }
     if (member.IsTransient)
     {
         WriteKeyword("transient ");
     }
 }