MyXmlNodeList extensionMethods = new MyXmlNodeList ();
+ HashSet<string> forwardedTypes = new HashSet<string> ();
+
public override void Run (IEnumerable<string> args)
{
show_exceptions = DebugOutput;
this.assemblies = assemblies.Select (a => LoadAssembly (a)).ToList ();
+ // Store types that have been forwarded to avoid duplicate generation
+ GatherForwardedTypes ();
+
docEnum = docEnum ?? new DocumentationEnumerator ();
// PERFORM THE UPDATES
}
}
+ void GatherForwardedTypes ()
+ {
+ foreach (var asm in assemblies)
+ foreach (var type in asm.MainModule.ExportedTypes.Where (t => t.IsForwarder).Select (t => t.FullName))
+ forwardedTypes.Add (type);
+ }
+
static ExceptionLocations ParseExceptionLocations (string s)
{
ExceptionLocations loc = ExceptionLocations.Member;
index_assemblies.RemoveAll ();
- HashSet<string> goodfiles = new HashSet<string> ();
+ HashSet<string> goodfiles = new HashSet<string> (StringComparer.OrdinalIgnoreCase);
foreach (AssemblyDefinition assm in assemblies) {
AddIndexAssembly (assm, index_assemblies);
{
foreach (TypeDefinition type in docEnum.GetDocumentationTypes (assembly, null)) {
string typename = GetTypeFileName(type);
- if (!IsPublic (type) || typename.IndexOfAny (InvalidFilenameChars) >= 0)
+ if (!IsPublic (type) || typename.IndexOfAny (InvalidFilenameChars) >= 0 || forwardedTypes.Contains (type.FullName))
continue;
string reltypepath = DoUpdateType (type, source, dest);
{
TypeDefinition decl = type;
while (decl != null) {
- if (!(decl.IsPublic || decl.IsNestedPublic)) {
+ if (!(decl.IsPublic || decl.IsNestedPublic ||
+ decl.IsNestedFamily || decl.IsNestedFamily || decl.IsNestedFamilyOrAssembly)) {
return false;
}
decl = (TypeDefinition) decl.DeclaringType;
(from i in values.Keys
where (c & i) != 0
select typename + "." + values [i])
- .ToArray ());
+ .DefaultIfEmpty (v.ToString ()).ToArray ());
}
return "(" + GetDocTypeFullName (valueType) + ") " + v.ToString ();
}