Example #1
0
        public void WriteMemberDeclaration(ITypeDefinitionMember member)
        {
            IMethodDefinition method = member as IMethodDefinition;
            if (method != null)
            {
                WriteMethodDefinition(method);
                return;
            }

            IPropertyDefinition property = member as IPropertyDefinition;
            if (property != null)
            {
                WritePropertyDefinition(property);
                return;
            }

            IEventDefinition evnt = member as IEventDefinition;
            if (evnt != null)
            {
                WriteEventDefinition(evnt);
                return;
            }

            IFieldDefinition field = member as IFieldDefinition;
            if (field != null)
            {
                WriteFieldDefinition(field);
                return;
            }

            _writer.Write("Unknown member definitions type {0}", member.ToString());
        }
Example #2
0
        private IncludeStatus GetIncludeStatus(ITypeDefinitionMember member)
        {
            ThinMember modelMember;

            if (!_rootMembers.TryGetValue(member, out modelMember))
            {
                if (_depot.ContainsMember(member))
                {
                    // Special case ImplRoot
                    // TODO: Visitor should set status instead.
                    if (_closureStatus == IncludeStatus.ApiRoot && !Util.IsMemberExternallyVisible(member))
                    {
                        return(IncludeStatus.ImplRoot);
                    }

                    return(_closureStatus);
                }

                throw new Exception("could not find IncludeStatus for member " + member.ToString());
            }

            return(modelMember.IncludeStatus);
        }
Example #3
0
        private IncludeStatus GetIncludeStatus(ITypeDefinitionMember member)
        {
            ThinMember modelMember;
            if (!_rootMembers.TryGetValue(member, out modelMember))
            {
                if (_depot.ContainsMember(member))
                {
                    // Special case ImplRoot
                    // TODO: Visitor should set status instead.
                    if (_closureStatus == IncludeStatus.ApiRoot && !Util.IsMemberExternallyVisible(member))
                    {
                        return IncludeStatus.ImplRoot;
                    }

                    return _closureStatus;
                }

                throw new Exception("could not find IncludeStatus for member " + member.ToString());
            }

            return modelMember.IncludeStatus;
        }