Ejemplo n.º 1
0
 void TranslateModifiers(MethodBase method, AbstractUnresolvedMember m)
 {
     if (m.DeclaringTypeDefinition.Kind == TypeKind.Interface) {
         // interface members don't have modifiers, but we want to handle them as "public abstract"
         m.Accessibility = Accessibility.Public;
         m.IsAbstract = true;
     } else {
         m.Accessibility = GetAccessibility(method.Attributes);
         if (method.IsAbstract) {
             m.IsAbstract = true;
             m.IsOverride = !method.Attributes.HasFlag (MethodAttributes.NewSlot);
         } else if (method.IsFinal) {
             if (!method.Attributes.HasFlag (MethodAttributes.NewSlot)) {
                 m.IsSealed = true;
                 m.IsOverride = true;
             }
         } else if (method.IsVirtual) {
             if (method.Attributes.HasFlag (MethodAttributes.NewSlot))
                 m.IsVirtual = true;
             else
                 m.IsOverride = true;
         }
         m.IsStatic = method.IsStatic;
     }
 }
Ejemplo n.º 2
0
 void FinishReadMember(AbstractUnresolvedMember member, MemberInfo ikvmDefinition)
 {
     member.ApplyInterningProvider(interningProvider);
     member.Freeze();
     RegisterCecilObject(member, ikvmDefinition);
 }