/// <summary> /// Get the XML comment from the class represented by the given type /// </summary> /// <param name="type">Type whom we want the xml comment</param> /// <returns>Xml comment from the type</returns> public static TypeComment GetXmlComment(this Type type) { if (type == null) { throw new ArgumentNullException("type"); } AssemblyCommentsCollection comments = new AssembliesCommentsRepository().Get(type.Assembly); return(comments[type]); }
/// <summary> /// Retrieves a comments collection for a given assembly /// </summary> /// <param name="assembly">Assembly which we want the comments from</param> /// <returns>Comments collection</returns> private AssemblyCommentsCollection GetCommentsCollection(Assembly assembly) { AssembliesCommentsRepository repository = new AssembliesCommentsRepository(); return(repository.Get(assembly)); }