Esempio n. 1
0
 /// <summary>
 /// Load the summary from the given file.
 /// </summary>
 public virtual void LoadSummary(SummaryFile summaryFile)
 {
     Summary = summaryFile.GetSummary(XmlMemberName);
     JavaName = summaryFile.GetSummary(XmlMemberName, "java-name", null);
     if (JavaName != null)
         JavaName = JavaName.Trim().Replace('/', '.');
 }
Esempio n. 2
0
 /// <summary>
 /// Load the summary from the given file.
 /// </summary>
 public override void LoadSummary(SummaryFile summaryFile)
 {
     base.LoadSummary(summaryFile);
     Events.ForEach(x => x.LoadSummary(summaryFile));
     Fields.ForEach(x => x.LoadSummary(summaryFile));
     Methods.ForEach(x => x.LoadSummary(summaryFile));
     Properties.ForEach(x => x.LoadSummary(summaryFile));
     GenericParameters.ForEach(x => x.LoadSummary(summaryFile));
 }
 /// <summary>
 /// Load all documentation for the given assembly
 /// </summary>
 private void Load(string assemblyPath)
 {
     var assembly = AssemblyDefinition.ReadAssembly(assemblyPath);
     var summary = new SummaryFile(Path.ChangeExtension(assemblyPath, ".xml"));
     // Load all types
     foreach (var type in assembly.MainModule.Types)
     {
         LoadType(type, null, summary);
     }
     // Load all "empty" namespaces
     AddEmptyNamespaces();
     // Connect parent-children
     AttachChildNamespaces();
 }
Esempio n. 4
0
 /// <summary>
 /// Load the summary from the given file.
 /// </summary>
 public override void LoadSummary(SummaryFile summaryFile)
 {
     base.LoadSummary(summaryFile);
     foreach (var type in Types) 
         type.LoadSummary(summaryFile);
 }
Esempio n. 5
0
 /// <summary>
 /// Load the summary from the given file.
 /// </summary>
 public override void LoadSummary(SummaryFile summaryFile)
 {
     base.LoadSummary(summaryFile);
     Parameters.ForEach(x => x.LoadSummary(summaryFile));
     GenericParameters.ForEach(x => x.LoadSummary(summaryFile));
 }
 /// <summary>
 /// Load the summary from the given file.
 /// </summary>
 public override void LoadSummary(SummaryFile summaryFile)
 {
     Summary = summaryFile.GetSummary(owner.XmlMemberName, "typeparam", x => x.GetAttribute("name") == Name);
 }
        /// <summary>
        /// Load type documentation for the given type and all its members
        /// </summary>
        private void LoadType(TypeDefinition type, TypeDocumentation declaringType, SummaryFile summary)
        {
            // Exclude non-visible types
            if (type.IsNotPublic || type.IsNestedAssembly || type.IsNestedPrivate || type.IsNestedFamilyAndAssembly)
                return;

            // Generate documentation
            var doc = new TypeDocumentation(type, declaringType);

            foreach (var nestedType in type.NestedTypes)
            {
                LoadType(nestedType, doc, summary);
            }
            doc.Events.AddRange(type.Events.Where(IsVisible).OrderBy(Descriptor.Create).Select(x => new EventDocumentation(x, doc)));
            doc.Fields.AddRange(type.Fields.Where(IsVisible).OrderBy(Descriptor.Create).Select(x => new FieldDocumentation(x, doc)));
            doc.Methods.AddRange(type.Methods.Where(IsVisibleAndNormal).OrderBy(x => Descriptor.Create(x, true)).Select(x => new MethodDocumentation(x, doc)));
            doc.Properties.AddRange(type.Properties.Where(IsVisible).OrderBy(x => Descriptor.Create(x, true)).Select(x => new PropertyDocumentation(x, doc)));

            doc.LoadSummary(summary);
            Add(doc);
        }