From 7f4c41fc2c6ce55f8f1b87a5516573d99a9beec0 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 19 Apr 2021 16:12:28 -0700 Subject: Prefer IReadOnlyCollection<> or IReadOnlyList<> over IEnumerable<> Closes wixtoolset/issues#6422 --- .../Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs | 2 +- .../Example.Extension/ExampleWindowsInstallerBackendExtension.cs | 2 +- src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/test') diff --git a/src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs b/src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs index 49f68de5..7244798a 100644 --- a/src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs +++ b/src/test/Example.Extension/ExamplePreprocessorExtensionAndCommandLine.cs @@ -12,7 +12,7 @@ namespace Example.Extension { private string exampleValueFromCommandLine; - public IEnumerable CommandLineSwitches => throw new NotImplementedException(); + public IReadOnlyCollection CommandLineSwitches => throw new NotImplementedException(); public ExamplePreprocessorExtensionAndCommandLine() { diff --git a/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs b/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs index 87b7855c..afccc56f 100644 --- a/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs +++ b/src/test/Example.Extension/ExampleWindowsInstallerBackendExtension.cs @@ -9,7 +9,7 @@ namespace Example.Extension internal class ExampleWindowsInstallerBackendExtension : BaseWindowsInstallerBackendBinderExtension { - public override IEnumerable TableDefinitions => ExampleTableDefinitions.All; + public override IReadOnlyCollection TableDefinitions => ExampleTableDefinitions.All; public override bool TryProcessSymbol(IntermediateSection section, IntermediateSymbol symbol, WindowsInstallerData output, TableDefinitionCollection tableDefinitions) { diff --git a/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs b/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs index 676d7d87..cfe4d3f1 100644 --- a/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/LinkerFixture.cs @@ -3,6 +3,7 @@ namespace WixToolsetTest.CoreIntegration { + using System; using System.IO; using System.Linq; using WixBuildTools.TestSupport; @@ -29,8 +30,8 @@ namespace WixToolsetTest.CoreIntegration var creator = serviceProvider.GetService(); var context = serviceProvider.GetService(); - context.Extensions = Enumerable.Empty(); - context.ExtensionData = Enumerable.Empty(); + context.Extensions = Array.Empty(); + context.ExtensionData = Array.Empty(); context.Intermediates = new[] { intermediate1, intermediate2 }; context.SymbolDefinitionCreator = creator; -- cgit v1.2.3-55-g6feb