Ejemplo n.º 1
0
        public string GetTypeDescription(Type type)
        {
            DocInfo.AddDocInfos(_docInfosByTypeName, type);
            string  memberName = $"{type.Namespace}.{type.Name}";
            DocInfo docInfo    = _docInfosByTypeName[type.AssemblyQualifiedName].FirstOrDefault(di => di.MemberType == ClassMemberType.Method && di.MemberName.Equals(memberName));

            if (docInfo != null)
            {
                return(docInfo.Summary);
            }
            return(string.Empty);
        }
Ejemplo n.º 2
0
        public string GetParameterDescription(ParameterInfo parameterInfo)
        {
            MemberInfo method = parameterInfo.Member;
            Type       type   = method.DeclaringType;

            DocInfo.AddDocInfos(_docInfosByTypeName, type);
            string  memberName = $"{type.Namespace}.{type.Name}.{method.Name}";
            DocInfo docInfo    = _docInfosByTypeName[method.DeclaringType.AssemblyQualifiedName].FirstOrDefault(di => di.MemberType == ClassMemberType.Method && di.MemberName.Equals(memberName));

            if (docInfo != null)
            {
                return(docInfo.Summary);
            }
            return(string.Empty);
        }