Ejemplo n.º 1
0
        public static JavadocInfo CreateInfo(XElement element, XmldocStyle style)
        {
            if (element == null)
            {
                return(null);
            }

            string javadoc = element.Element("javadoc")?.Value;

            var    desc                        = GetMemberDescription(element);
            string declaringJniType            = desc.DeclaringJniType;
            string declaringMemberName         = desc.DeclaringMemberName;
            var    declaringMemberJniSignature = desc.DeclaringMemberJniSignature;

            XElement[] extra = GetExtra(element, style, declaringJniType, declaringMemberName, declaringMemberJniSignature);

            if (string.IsNullOrEmpty(javadoc) && extra == null)
            {
                return(null);
            }

            var info = new JavadocInfo()
            {
                ExtraRemarks      = extra,
                Javadoc           = javadoc,
                MemberDescription = declaringMemberName == null
                                        ? declaringJniType
                                        : $"{declaringJniType}.{declaringMemberName}.{declaringMemberJniSignature}",
                XmldocStyle = style,
            };

            return(info);
        }
Ejemplo n.º 2
0
        public static JavadocInfo CreateInfo(XElement element, XmldocStyle style, bool appendCopyrightExtra = true)
        {
            if (element == null)
            {
                return(null);
            }

            string javadoc = element.Element("javadoc")?.Value;

            var    desc                       = GetMemberDescription(element);
            string declaringJniType           = desc.DeclaringJniType;
            string declaringMemberName        = desc.DeclaringMemberName;
            var    declaringMemberParamString = desc.DeclaringMemberParameterString;

            var extras = GetExtra(element, style, declaringJniType, declaringMemberName, declaringMemberParamString, appendCopyrightExtra);

            XElement[] extra     = extras.Extras;
            XElement[] copyright = extras.Copyright;

            if (string.IsNullOrEmpty(javadoc) && extra == null)
            {
                return(null);
            }

            var info = new JavadocInfo()
            {
                ExtraRemarks      = extra,
                Copyright         = copyright,
                Javadoc           = javadoc,
                MemberDescription = declaringMemberName == null
                                        ? declaringJniType
                                        : $"{declaringJniType}.{declaringMemberName}{declaringMemberParamString}",
                XmldocStyle = style,
            };

            return(info);
        }