Esempio n. 1
0
        protected MemberContainer(TypeContainer parent, FullNamedExpression type, Modifiers mod, Modifiers allowed_mod, Modifiers def_mod, MemberName name, VSharpAttributes attrs, SymbolKind sym)
        {
            caching_flags   = Flags.Obsolete_Undetected;
            this.SymbolKind = sym;
            this.Parent     = parent;
            this.declaringTypeDefinition = parent;
            this.name = name.Name;
            if (parent != null)
            {
                this.UnresolvedFile = parent.UnresolvedFile;
            }
            this.type_expr = type;
            this.attribs   = attrs;
            member_name    = name;
            mod_flags      = mod;

            mod_flags = ModifiersExtensions.Check(allowed_mod, mod, def_mod, name.Location, Report);
            if (DeclaringTypeDefinition.Kind == TypeKind.Interface)
            {
                mod_flags |= Modifiers.PUBLIC | Modifiers.ABSTRACT;
            }


            if (attrs != null)
            {
                foreach (var a in attrs.Attrs)
                {
                    this.attributes.Add(a);
                }
            }

            this.returnType = type as ITypeReference;

            if (member_name.ExplicitInterface != null)
            {
                ApplyExplicit(null);
            }
        }