diff options
author | Rob Mensching <rob@firegiant.com> | 2021-04-19 16:12:28 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-04-19 16:37:03 -0700 |
commit | 7f4c41fc2c6ce55f8f1b87a5516573d99a9beec0 (patch) | |
tree | bf62fa354b7ebbf6eb25cc5af1f6bbbb7ce80fe6 /src/test | |
parent | bb40dc8a911ec0679016cbbf7132ea813ea1a3ad (diff) | |
download | wix-7f4c41fc2c6ce55f8f1b87a5516573d99a9beec0.tar.gz wix-7f4c41fc2c6ce55f8f1b87a5516573d99a9beec0.tar.bz2 wix-7f4c41fc2c6ce55f8f1b87a5516573d99a9beec0.zip |
Prefer IReadOnlyCollection<> or IReadOnlyList<> over IEnumerable<>
Closes wixtoolset/issues#6422
Diffstat (limited to 'src/test')
3 files changed, 5 insertions, 4 deletions
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 | |||
12 | { | 12 | { |
13 | private string exampleValueFromCommandLine; | 13 | private string exampleValueFromCommandLine; |
14 | 14 | ||
15 | public IEnumerable<ExtensionCommandLineSwitch> CommandLineSwitches => throw new NotImplementedException(); | 15 | public IReadOnlyCollection<ExtensionCommandLineSwitch> CommandLineSwitches => throw new NotImplementedException(); |
16 | 16 | ||
17 | public ExamplePreprocessorExtensionAndCommandLine() | 17 | public ExamplePreprocessorExtensionAndCommandLine() |
18 | { | 18 | { |
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 | |||
9 | 9 | ||
10 | internal class ExampleWindowsInstallerBackendExtension : BaseWindowsInstallerBackendBinderExtension | 10 | internal class ExampleWindowsInstallerBackendExtension : BaseWindowsInstallerBackendBinderExtension |
11 | { | 11 | { |
12 | public override IEnumerable<TableDefinition> TableDefinitions => ExampleTableDefinitions.All; | 12 | public override IReadOnlyCollection<TableDefinition> TableDefinitions => ExampleTableDefinitions.All; |
13 | 13 | ||
14 | public override bool TryProcessSymbol(IntermediateSection section, IntermediateSymbol symbol, WindowsInstallerData output, TableDefinitionCollection tableDefinitions) | 14 | public override bool TryProcessSymbol(IntermediateSection section, IntermediateSymbol symbol, WindowsInstallerData output, TableDefinitionCollection tableDefinitions) |
15 | { | 15 | { |
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 @@ | |||
3 | 3 | ||
4 | namespace WixToolsetTest.CoreIntegration | 4 | namespace WixToolsetTest.CoreIntegration |
5 | { | 5 | { |
6 | using System; | ||
6 | using System.IO; | 7 | using System.IO; |
7 | using System.Linq; | 8 | using System.Linq; |
8 | using WixBuildTools.TestSupport; | 9 | using WixBuildTools.TestSupport; |
@@ -29,8 +30,8 @@ namespace WixToolsetTest.CoreIntegration | |||
29 | 30 | ||
30 | var creator = serviceProvider.GetService<ISymbolDefinitionCreator>(); | 31 | var creator = serviceProvider.GetService<ISymbolDefinitionCreator>(); |
31 | var context = serviceProvider.GetService<ILinkContext>(); | 32 | var context = serviceProvider.GetService<ILinkContext>(); |
32 | context.Extensions = Enumerable.Empty<WixToolset.Extensibility.ILinkerExtension>(); | 33 | context.Extensions = Array.Empty<WixToolset.Extensibility.ILinkerExtension>(); |
33 | context.ExtensionData = Enumerable.Empty<WixToolset.Extensibility.IExtensionData>(); | 34 | context.ExtensionData = Array.Empty<WixToolset.Extensibility.IExtensionData>(); |
34 | context.Intermediates = new[] { intermediate1, intermediate2 }; | 35 | context.Intermediates = new[] { intermediate1, intermediate2 }; |
35 | context.SymbolDefinitionCreator = creator; | 36 | context.SymbolDefinitionCreator = creator; |
36 | 37 | ||