Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/api-doc-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc/Mono.Documentation/Updater/Frameworks')
-rw-r--r--mdoc/Mono.Documentation/Updater/Frameworks/AssemblySet.cs19
-rw-r--r--mdoc/Mono.Documentation/Updater/Frameworks/FrameworkEntry.cs43
-rw-r--r--mdoc/Mono.Documentation/Updater/Frameworks/FrameworkIndex.cs11
-rw-r--r--mdoc/Mono.Documentation/Updater/Frameworks/FrameworkTypeEntry.cs2
4 files changed, 7 insertions, 68 deletions
diff --git a/mdoc/Mono.Documentation/Updater/Frameworks/AssemblySet.cs b/mdoc/Mono.Documentation/Updater/Frameworks/AssemblySet.cs
index 496d5624..6affe4cd 100644
--- a/mdoc/Mono.Documentation/Updater/Frameworks/AssemblySet.cs
+++ b/mdoc/Mono.Documentation/Updater/Frameworks/AssemblySet.cs
@@ -10,7 +10,7 @@ namespace Mono.Documentation.Updater.Frameworks
/// <summary>
/// Represents a set of assemblies that we want to document
/// </summary>
- public class AssemblySet : IDisposable
+ class AssemblySet : IDisposable
{
static readonly BaseAssemblyResolver resolver = new Frameworks.MDocResolver ();
static IAssemblyResolver cachedResolver;
@@ -23,23 +23,6 @@ namespace Mono.Documentation.Updater.Frameworks
IEnumerable<string> importPaths;
public IEnumerable<DocumentationImporter> Importers { get; private set; }
- FrameworkEntry fx;
- public FrameworkEntry Framework
- {
- get => fx;
- set
- {
- fx = value;
- fx.AddAssemblySet (this);
- }
- }
-
- /// <summary>This is meant only for unit test access</summary>
- public IDictionary<string, bool> AssemblyMapsPath
- {
- get => assemblyPathsMap;
- }
-
public AssemblySet (IEnumerable<string> paths) : this ("Default", paths, new string[0]) { }
public AssemblySet (string name, IEnumerable<string> paths, IEnumerable<string> resolverSearchPaths, IEnumerable<string> imports = null, string version = null, string id = null)
diff --git a/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkEntry.cs b/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkEntry.cs
index 304fc22e..5c98db27 100644
--- a/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkEntry.cs
+++ b/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkEntry.cs
@@ -11,9 +11,7 @@ namespace Mono.Documentation.Updater.Frameworks
SortedSet<FrameworkTypeEntry> types = new SortedSet<FrameworkTypeEntry> ();
IList<FrameworkEntry> allframeworks;
- ISet<AssemblySet> allAssemblies = new SortedSet<AssemblySet> ();
-
- public int Index = 0;
+ public int index = 0;
public FrameworkEntry (IList<FrameworkEntry> frameworks)
{
@@ -21,50 +19,13 @@ namespace Mono.Documentation.Updater.Frameworks
if (allframeworks == null)
allframeworks = new List<FrameworkEntry> (0);
- Index = allframeworks.Count;
+ index = allframeworks.Count;
}
public string Name { get; set; }
public string Version { get; set; }
public string Id { get; set; }
- /// <summary>Gets a value indicating whether this <see cref="T:Mono.Documentation.Updater.Frameworks.FrameworkEntry"/> is last framework being processed.</summary>
- public bool IsLastFramework {
- get => Index == allframeworks.Count - 1;
- }
-
- public IEnumerable<FrameworkEntry> PreviousFrameworks {
- get => allframeworks.Where (f => f.Index < this.Index);
- }
-
- public ISet<AssemblySet> AllProcessedAssemblies { get => allAssemblies; }
-
- public void AddAssemblySet (AssemblySet assemblySet)
- {
- allAssemblies.Add (assemblySet);
- }
-
- /// <summary>Checks to see if this assembly is contained in previously processed frameworks</summary>
- public bool PreviousFXContainsAssembly(string name)
- {
- if (name.Contains (System.IO.Path.DirectorySeparatorChar))
- name = System.IO.Path.GetFileName (name);
-
- return PreviousFrameworks.Any (pf => pf.ContainsAssembly (name));
- }
-
- public bool ContainsAssembly(string name) {
- if (name.Contains (System.IO.Path.DirectorySeparatorChar))
- name = System.IO.Path.GetFileName (name);
-
- return allAssemblies.Any (a => a.Contains (name));
- }
-
- /// <summary>Gets a value indicating whether this <see cref="T:Mono.Documentation.Updater.Frameworks.FrameworkEntry"/> is first framework being processed.</summary>
- public bool IsFirstFramework {
- get => this.Index == 0;
- }
-
/// <summary>Only Use in Unit Tests</summary>
public string Replace="";
diff --git a/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkIndex.cs b/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkIndex.cs
index e9e19600..25ae158b 100644
--- a/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkIndex.cs
+++ b/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkIndex.cs
@@ -26,13 +26,10 @@ namespace Mono.Documentation.Updater.Frameworks
}
}
- public FrameworkEntry StartProcessingAssembly (AssemblySet set, AssemblyDefinition assembly, IEnumerable<DocumentationImporter> importers, string Id, string Version)
+ public FrameworkEntry StartProcessingAssembly (AssemblyDefinition assembly, IEnumerable<DocumentationImporter> importers, string Id, string Version)
{
- if (string.IsNullOrWhiteSpace (this.path))
- {
- set.Framework = FrameworkEntry.Empty;
- return FrameworkEntry.Empty;
- }
+ if (string.IsNullOrWhiteSpace (this.path))
+ return FrameworkEntry.Empty;
string assemblyPath = assembly.MainModule.FileName;
var frameworksDirectory = this.path.EndsWith ("frameworks.xml", StringComparison.OrdinalIgnoreCase)
@@ -48,8 +45,6 @@ namespace Mono.Documentation.Updater.Frameworks
entry = new FrameworkEntry (frameworks) { Name = shortPath, Importers = importers, Id = Id, Version = Version};
frameworks.Add (entry);
}
-
- set.Framework = entry;
return entry;
}
diff --git a/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkTypeEntry.cs b/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkTypeEntry.cs
index f95dda87..a6886c8c 100644
--- a/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkTypeEntry.cs
+++ b/mdoc/Mono.Documentation/Updater/Frameworks/FrameworkTypeEntry.cs
@@ -36,7 +36,7 @@ namespace Mono.Documentation.Updater.Frameworks
{
previouslyProcessedFXTypes = new Lazy<FrameworkTypeEntry[]> (
() => this.Framework.Frameworks
- .Where (f => f.Index < this.Framework.Index)
+ .Where (f => f.index < this.Framework.index)
.Select (f => f.FindTypeEntry (this))
.ToArray ()
);