Check() public static method

Checks the object @mod modifiers to be in @allowed. Returns the new mask. Side effect: reports any incorrect attributes.
public static Check ( Mono.CSharp.Modifiers allowed, Mono.CSharp.Modifiers mod, Mono.CSharp.Modifiers def_access, Mono.CSharp.Location l, Report Report ) : Mono.CSharp.Modifiers
allowed Mono.CSharp.Modifiers
mod Mono.CSharp.Modifiers
def_access Mono.CSharp.Modifiers
l Mono.CSharp.Location
Report Report
return Mono.CSharp.Modifiers
Esempio n. 1
0
File: enum.cs Progetto: sagood/mono
        public Enum(TypeContainer parent, FullNamedExpression type, Modifiers mod_flags, MemberName name, Attributes attrs)
            : base(parent, name, attrs, MemberKind.Enum)
        {
            underlying_type_expr = type;
            var accmods = IsTopLevel ? Modifiers.INTERNAL : Modifiers.PRIVATE;

            ModFlags = ModifiersExtensions.Check(AllowedModifiers, mod_flags, accmods, Location, Report);
            spec     = new EnumSpec(null, this, null, null, ModFlags);
        }
Esempio n. 2
0
        public Enum(NamespaceEntry ns, DeclSpace parent, TypeExpression type,
                    Modifiers mod_flags, MemberName name, Attributes attrs)
            : base(ns, parent, name, attrs, MemberKind.Enum)
        {
            base_type_expr = type;
            var accmods = IsTopLevel ? Modifiers.INTERNAL : Modifiers.PRIVATE;

            ModFlags = ModifiersExtensions.Check(AllowedModifiers, mod_flags, accmods, Location, Report);
            spec     = new EnumSpec(null, this, null, null, ModFlags);
        }
Esempio n. 3
0
        public Delegate(TypeContainer parent, FullNamedExpression type, Modifiers mod_flags, MemberName name, ParametersCompiled param_list,
                        Attributes attrs)
            : base(parent, name, attrs, MemberKind.Delegate)

        {
            this.ReturnType = type;
            ModFlags        = ModifiersExtensions.Check(AllowedModifiers, mod_flags,
                                                        IsTopLevel ? Modifiers.INTERNAL :
                                                        Modifiers.PRIVATE, name.Location, Report);
            parameters = param_list;
            spec       = new TypeSpec(Kind, null, this, null, ModFlags | Modifiers.SEALED);
        }