Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Use INamedTypeReference instead in order to also copy the nested class type forwards from the contract assembly #1032

Merged
merged 2 commits into from
Sep 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/GenFacades/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,10 @@ private static IReadOnlyDictionary<string, IEnumerable<string>> GenerateDocIdTab

private static IEnumerable<string> EnumerateDocIdsToForward(IAssembly contractAssembly)
{
// Make note that all type forwards (including nested) implement INamespaceAliasForType, so do
// not be tempted to filter using it, instead, we look at the aliased type to them.
// Use INamedTypeReference instead of INamespaceTypeReference in order to also include nested
// class type-forwards.
var typeForwardsToForward = contractAssembly.ExportedTypes.Select(alias => alias.AliasedType)
.OfType<INamespaceTypeReference>();
.OfType<INamedTypeReference>();

var typesToForward = contractAssembly.GetAllTypes().Where(t => TypeHelper.IsVisibleOutsideAssembly(t))
.OfType<INamespaceTypeDefinition>();
Expand Down