Example #1
0
        public static DocResolver GetResolver(Assembly assembly)
        {
            DocResolver resolver;

            if (!_resolvers.TryGetValue(assembly, out resolver))
            {
                resolver = _resolvers[assembly] = new DocResolver();
                resolver.Load(assembly);
            }
            return(resolver);
        }
Example #2
0
 public void AppendEnumJSDoc(Type type, object value)
 {
     if (bindingManager.prefs.doc)
     {
         var resolver = DocResolver.GetResolver(type.Assembly);
         var doc      = resolver.GetFieldDocBody(type.FullName + "." + Enum.GetName(type, value));
         if (doc != null)
         {
             AppendJSDoc(doc);
             return;
         }
     }
 }
Example #3
0
        public void AppendJSDoc(FieldInfo fieldInfo)
        {
            if (bindingManager.prefs.doc)
            {
                var doc = DocResolver.GetDocBody(fieldInfo);
                if (doc != null)
                {
                    AppendJSDoc(doc);
                    return;
                }
            }
            var jsdoc = fieldInfo.GetCustomAttribute(typeof(JSDocAttribute), false) as JSDocAttribute;

            if (jsdoc != null)
            {
                AppendJSDoc(jsdoc.lines);
            }
        }
Example #4
0
        public void AppendJSDoc <T>(T methodInfo)
            where T : MethodBase
        {
            if (bindingManager.prefs.doc)
            {
                var doc = DocResolver.GetDocBody(methodInfo);
                if (doc != null)
                {
                    AppendJSDoc(doc);
                    return;
                }
            }
            var jsdoc = methodInfo.GetCustomAttribute(typeof(JSDocAttribute), false) as JSDocAttribute;

            if (jsdoc != null)
            {
                AppendJSDoc(jsdoc.lines);
            }
        }