/// <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);
     }
 }
Beispiel #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));
 }
Beispiel #3
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('/', '.');
     }
 }
Beispiel #4
0
        static void Main(string[] args)
        {
            string sourceFolder = @"c:\lixo\myfolder\out";
            string sourcePatch  = @"c:\lixo\myfolder\File1.csv";
            string destinyPath  = @"c:\lixo\myfolder\out\summary.csv";

            SummaryFile file = new SummaryFile(sourceFolder, sourcePatch, destinyPath);

            file.CreateDir(file.NamePath);

            file.CreateSummaryFile(file.NameOriginalFile, file.NameNewFile);
        }
Beispiel #5
0
        /// <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();
        }
Beispiel #6
0
        /// <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);
        }
 /// <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, "param", x => x.GetAttribute("name") == Name);
 }