internal ClassAccessorWithMonoCecil(IHasClassMemberVisibilityModifier parentVisibility, AccessorWithMonoCecil accessor)
        {
            this.accessor = accessor;
            ClassMemberVisibilityModifier classVisibility = accessor.MethodDefinition.ClassVisibility();

            if (parentVisibility.Visibility == classVisibility)
            {
                visibility = ClassAccessorVisibilityModifier.None;
            }
            else
            {
                switch (classVisibility)
                {
                case ClassMemberVisibilityModifier.Internal:
                    visibility = ClassAccessorVisibilityModifier.Internal;
                    break;

                case ClassMemberVisibilityModifier.ProtectedInternal:
                    visibility = ClassAccessorVisibilityModifier.ProtectedInternal;
                    break;

                case ClassMemberVisibilityModifier.Protected:
                    visibility = ClassAccessorVisibilityModifier.Protected;
                    break;

                case ClassMemberVisibilityModifier.Private:
                    visibility = ClassAccessorVisibilityModifier.Private;
                    break;
                }
            }
        }
        internal StructAccessorWithMonoCecil(IHasStructMemberVisibilityModifier parentVisibility, AccessorWithMonoCecil accessor)
        {
            this.accessor = accessor;
            StructMemberVisibilityModifier structVisibility = accessor.MethodDefinition.StructVisibility();

            if (parentVisibility.Visibility == structVisibility)
            {
                visibility = StructAccessorVisibilityModifier.None;
            }
            else
            {
                switch (structVisibility)
                {
                case StructMemberVisibilityModifier.Internal:
                    visibility = StructAccessorVisibilityModifier.Internal;
                    break;

                case StructMemberVisibilityModifier.Private:
                    visibility = StructAccessorVisibilityModifier.Private;
                    break;
                }
            }
        }
Ejemplo n.º 3
0
 internal AbstractAccessorWithMonoCecil(IHasAbstractMemberVisibilityModifier parentVisibility, AccessorWithMonoCecil accessor)
 {
     this.accessor = accessor;
 }