/// <summary> /// Empty constructor /// </summary> /// <param name="name">Documented element name</param> /// <param name="docResolver">Documentation resolver</param> /// <param name="typeResolver">Type resolver</param> internal DocElement(string name, DocResolver docResolver, IResolver typeResolver) { Name = name; Documentation = new DocumentationContent(new Dictionary <TagType, IReadOnlyCollection <ITag> >()); Members = new Lazy <IReadOnlyDictionary <string, IDocMember> >(() => RetrieveMembers(docResolver, typeResolver), LazyThreadSafetyMode.PublicationOnly); }
/// <summary> /// Default constructor /// </summary> /// <param name="name">Documented element name</param> /// <param name="source">Documentation source</param> /// <param name="docResolver">Documentation resolver</param> /// <param name="typeResolver">Type resolver</param> public DocElement(string name, XElement source, DocResolver docResolver, IResolver typeResolver) { if (source is null) { throw new ArgumentNullException(nameof(source)); } Name = name; Documentation = new DocumentationContent(source); Members = new Lazy <IReadOnlyDictionary <string, IDocMember> >(() => RetrieveMembers(docResolver, typeResolver), LazyThreadSafetyMode.PublicationOnly); }