public static DocResolver GetResolver(Assembly assembly) { DocResolver resolver; if (!_resolvers.TryGetValue(assembly, out resolver)) { resolver = _resolvers[assembly] = new DocResolver(); resolver.Load(assembly); } return(resolver); }
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; } } }
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); } }
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); } }