From 131e0cf277a129ea5b97435dc638cc0adacac7f9 Mon Sep 17 00:00:00 2001 From: Doug Bunting <6431421+dougbu@users.noreply.github.com> Date: Sun, 29 Dec 2019 22:10:33 -0800 Subject: [PATCH] Respect `ICciFilter` when generating fields in value types - dotnet/arcade#2031 aka dotnet/arcade#2033 aka dotnet/arcade#4488 problem (6) - remove `IsVisibleOutsideAssembly()` use; was at best redundant --- src/Microsoft.Cci.Extensions/Writers/CSharp/CSharpWriter.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Cci.Extensions/Writers/CSharp/CSharpWriter.cs b/src/Microsoft.Cci.Extensions/Writers/CSharp/CSharpWriter.cs index 93b286e91c9..083959de3c7 100644 --- a/src/Microsoft.Cci.Extensions/Writers/CSharp/CSharpWriter.cs +++ b/src/Microsoft.Cci.Extensions/Writers/CSharp/CSharpWriter.cs @@ -181,11 +181,11 @@ public override void Visit(ITypeDefinition parentType, IEnumerable newFields = new List(); - var includedVisibleFields = fields.Where(f => f.IsVisibleOutsideAssembly()).Where(_cciFilter.Include); + var includedVisibleFields = fields.Where(f => _cciFilter.Include(f)); includedVisibleFields = includedVisibleFields.OrderBy(GetMemberKey, StringComparer.OrdinalIgnoreCase); var excludedFields = fields.Except(includedVisibleFields).Where(f => !f.IsStatic);