diff options
author | Rob Mensching <rob@firegiant.com> | 2021-04-19 16:09:46 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2021-04-19 16:32:04 -0700 |
commit | a4c7643523a3fc79c2a79292d22487196ea388fb (patch) | |
tree | 3d541a4fa958fb4ffefb46f31b5eeeb5febd1ca0 /src | |
parent | 4041669e1f3b3f094579e4f3368e6f57f46d7177 (diff) | |
download | wix-a4c7643523a3fc79c2a79292d22487196ea388fb.tar.gz wix-a4c7643523a3fc79c2a79292d22487196ea388fb.tar.bz2 wix-a4c7643523a3fc79c2a79292d22487196ea388fb.zip |
Prefer IReadOnlyCollection<> or IReadOnlyList<> over IEnumerable<>
Part of wixtoolset/issues#6422
Diffstat (limited to 'src')
22 files changed, 148 insertions, 48 deletions
diff --git a/src/WixToolset.Extensibility/BaseBurnBackendBinderExtension.cs b/src/WixToolset.Extensibility/BaseBurnBackendBinderExtension.cs index 3afc8678..da570af0 100644 --- a/src/WixToolset.Extensibility/BaseBurnBackendBinderExtension.cs +++ b/src/WixToolset.Extensibility/BaseBurnBackendBinderExtension.cs | |||
@@ -33,7 +33,7 @@ namespace WixToolset.Extensibility | |||
33 | /// <summary> | 33 | /// <summary> |
34 | /// Optional symbol definitions. | 34 | /// Optional symbol definitions. |
35 | /// </summary> | 35 | /// </summary> |
36 | protected virtual IEnumerable<IntermediateSymbolDefinition> SymbolDefinitions => Enumerable.Empty<IntermediateSymbolDefinition>(); | 36 | protected virtual IReadOnlyCollection<IntermediateSymbolDefinition> SymbolDefinitions => Array.Empty<IntermediateSymbolDefinition>(); |
37 | 37 | ||
38 | /// <summary> | 38 | /// <summary> |
39 | /// See <see cref="IBurnBackendBinderExtension.PreBackendBind(IBindContext)"/> | 39 | /// See <see cref="IBurnBackendBinderExtension.PreBackendBind(IBindContext)"/> |
diff --git a/src/WixToolset.Extensibility/BaseExtensionCommandLine.cs b/src/WixToolset.Extensibility/BaseExtensionCommandLine.cs index 8a336e1b..c716ac7e 100644 --- a/src/WixToolset.Extensibility/BaseExtensionCommandLine.cs +++ b/src/WixToolset.Extensibility/BaseExtensionCommandLine.cs | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace WixToolset.Extensibility | 3 | namespace WixToolset.Extensibility |
4 | { | 4 | { |
5 | using System; | ||
5 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
6 | using System.Linq; | ||
7 | using WixToolset.Extensibility.Data; | 7 | using WixToolset.Extensibility.Data; |
8 | using WixToolset.Extensibility.Services; | 8 | using WixToolset.Extensibility.Services; |
9 | 9 | ||
@@ -15,7 +15,7 @@ namespace WixToolset.Extensibility | |||
15 | /// <summary> | 15 | /// <summary> |
16 | /// See <see cref="IExtensionCommandLine.CommandLineSwitches" /> | 16 | /// See <see cref="IExtensionCommandLine.CommandLineSwitches" /> |
17 | /// </summary> | 17 | /// </summary> |
18 | public virtual IEnumerable<ExtensionCommandLineSwitch> CommandLineSwitches => Enumerable.Empty<ExtensionCommandLineSwitch>(); | 18 | public virtual IReadOnlyCollection<ExtensionCommandLineSwitch> CommandLineSwitches => Array.Empty<ExtensionCommandLineSwitch>(); |
19 | 19 | ||
20 | /// <summary> | 20 | /// <summary> |
21 | /// See <see cref="IExtensionCommandLine.PostParse" /> | 21 | /// See <see cref="IExtensionCommandLine.PostParse" /> |
diff --git a/src/WixToolset.Extensibility/BaseExtensionFactory.cs b/src/WixToolset.Extensibility/BaseExtensionFactory.cs index 2e21b51b..8b6dc566 100644 --- a/src/WixToolset.Extensibility/BaseExtensionFactory.cs +++ b/src/WixToolset.Extensibility/BaseExtensionFactory.cs | |||
@@ -15,7 +15,7 @@ namespace WixToolset.Extensibility | |||
15 | /// <summary> | 15 | /// <summary> |
16 | /// The extension types of the WiX extension. | 16 | /// The extension types of the WiX extension. |
17 | /// </summary> | 17 | /// </summary> |
18 | protected abstract IEnumerable<Type> ExtensionTypes { get; } | 18 | protected abstract IReadOnlyCollection<Type> ExtensionTypes { get; } |
19 | 19 | ||
20 | /// <summary> | 20 | /// <summary> |
21 | /// See <see cref="IExtensionFactory.TryCreateExtension(Type, out object)"/> | 21 | /// See <see cref="IExtensionFactory.TryCreateExtension(Type, out object)"/> |
diff --git a/src/WixToolset.Extensibility/BaseLibrarianExtension.cs b/src/WixToolset.Extensibility/BaseLibrarianExtension.cs index 1f231ba6..cbc9e4ba 100644 --- a/src/WixToolset.Extensibility/BaseLibrarianExtension.cs +++ b/src/WixToolset.Extensibility/BaseLibrarianExtension.cs | |||
@@ -59,7 +59,7 @@ namespace WixToolset.Extensibility | |||
59 | /// <param name="path">Optional resolved path to file.</param> | 59 | /// <param name="path">Optional resolved path to file.</param> |
60 | /// <param name="checkedPaths">Optional collection of paths checked for the file.</param> | 60 | /// <param name="checkedPaths">Optional collection of paths checked for the file.</param> |
61 | /// <returns>Resolved file result.</returns> | 61 | /// <returns>Resolved file result.</returns> |
62 | protected IResolveFileResult CreateResolveFileResult(string path = null, IEnumerable<string> checkedPaths = null) | 62 | protected IResolveFileResult CreateResolveFileResult(string path = null, IReadOnlyCollection<string> checkedPaths = null) |
63 | { | 63 | { |
64 | var result = this.Context.ServiceProvider.GetService<IResolveFileResult>(); | 64 | var result = this.Context.ServiceProvider.GetService<IResolveFileResult>(); |
65 | result.Path = path; | 65 | result.Path = path; |
diff --git a/src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs b/src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs index 93d8a1df..ffff186b 100644 --- a/src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs +++ b/src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | namespace WixToolset.Extensibility | 3 | namespace WixToolset.Extensibility |
4 | { | 4 | { |
5 | using System; | ||
5 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
6 | using System.Linq; | 7 | using System.Linq; |
7 | using WixToolset.Data; | 8 | using WixToolset.Data; |
@@ -33,7 +34,7 @@ namespace WixToolset.Extensibility | |||
33 | /// <summary> | 34 | /// <summary> |
34 | /// Optional table definitions. | 35 | /// Optional table definitions. |
35 | /// </summary> | 36 | /// </summary> |
36 | public virtual IEnumerable<TableDefinition> TableDefinitions => Enumerable.Empty<TableDefinition>(); | 37 | public virtual IReadOnlyCollection<TableDefinition> TableDefinitions => Array.Empty<TableDefinition>(); |
37 | 38 | ||
38 | /// <summary> | 39 | /// <summary> |
39 | /// Creates a resolved cabinet result. | 40 | /// Creates a resolved cabinet result. |
diff --git a/src/WixToolset.Extensibility/Data/IBindContext.cs b/src/WixToolset.Extensibility/Data/IBindContext.cs index f1977c01..d0c65683 100644 --- a/src/WixToolset.Extensibility/Data/IBindContext.cs +++ b/src/WixToolset.Extensibility/Data/IBindContext.cs | |||
@@ -35,27 +35,27 @@ namespace WixToolset.Extensibility.Data | |||
35 | /// <summary> | 35 | /// <summary> |
36 | /// Delayed fields that need to be resolved again. | 36 | /// Delayed fields that need to be resolved again. |
37 | /// </summary> | 37 | /// </summary> |
38 | IEnumerable<IDelayedField> DelayedFields { get; set; } | 38 | IReadOnlyCollection<IDelayedField> DelayedFields { get; set; } |
39 | 39 | ||
40 | /// <summary> | 40 | /// <summary> |
41 | /// Embedded files to extract. | 41 | /// Embedded files to extract. |
42 | /// </summary> | 42 | /// </summary> |
43 | IEnumerable<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; } | 43 | IReadOnlyCollection<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; } |
44 | 44 | ||
45 | /// <summary> | 45 | /// <summary> |
46 | /// Binder extensions. | 46 | /// Binder extensions. |
47 | /// </summary> | 47 | /// </summary> |
48 | IEnumerable<IBinderExtension> Extensions { get; set; } | 48 | IReadOnlyCollection<IBinderExtension> Extensions { get; set; } |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |
51 | /// File system extensions. | 51 | /// File system extensions. |
52 | /// </summary> | 52 | /// </summary> |
53 | IEnumerable<IFileSystemExtension> FileSystemExtensions { get; set; } | 53 | IReadOnlyCollection<IFileSystemExtension> FileSystemExtensions { get; set; } |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Set of ICEs to execute. | 56 | /// Set of ICEs to execute. |
57 | /// </summary> | 57 | /// </summary> |
58 | IEnumerable<string> Ices { get; set; } | 58 | IReadOnlyCollection<string> Ices { get; set; } |
59 | 59 | ||
60 | /// <summary> | 60 | /// <summary> |
61 | /// Intermedaite folder. | 61 | /// Intermedaite folder. |
@@ -100,7 +100,7 @@ namespace WixToolset.Extensibility.Data | |||
100 | /// <summary> | 100 | /// <summary> |
101 | /// Set of ICEs to skip. | 101 | /// Set of ICEs to skip. |
102 | /// </summary> | 102 | /// </summary> |
103 | IEnumerable<string> SuppressIces { get; set; } | 103 | IReadOnlyCollection<string> SuppressIces { get; set; } |
104 | 104 | ||
105 | /// <summary> | 105 | /// <summary> |
106 | /// Skip all ICEs. | 106 | /// Skip all ICEs. |
diff --git a/src/WixToolset.Extensibility/Data/IBindResult.cs b/src/WixToolset.Extensibility/Data/IBindResult.cs index 1654f24d..7fc52bd7 100644 --- a/src/WixToolset.Extensibility/Data/IBindResult.cs +++ b/src/WixToolset.Extensibility/Data/IBindResult.cs | |||
@@ -6,13 +6,24 @@ namespace WixToolset.Extensibility.Data | |||
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
7 | using WixToolset.Data; | 7 | using WixToolset.Data; |
8 | 8 | ||
9 | #pragma warning disable 1591 // TODO: add documentation | 9 | /// <summary> |
10 | /// Result of bind operation. | ||
11 | /// </summary> | ||
10 | public interface IBindResult : IDisposable | 12 | public interface IBindResult : IDisposable |
11 | { | 13 | { |
12 | IEnumerable<IFileTransfer> FileTransfers { get; set; } | 14 | /// <summary> |
15 | /// Collection of file transfers to complete. | ||
16 | /// </summary> | ||
17 | IReadOnlyCollection<IFileTransfer> FileTransfers { get; set; } | ||
13 | 18 | ||
14 | IEnumerable<ITrackedFile> TrackedFiles { get; set; } | 19 | /// <summary> |
20 | /// Collection of files tracked during binding. | ||
21 | /// </summary> | ||
22 | IReadOnlyCollection<ITrackedFile> TrackedFiles { get; set; } | ||
15 | 23 | ||
24 | /// <summary> | ||
25 | /// Ouput of binding. | ||
26 | /// </summary> | ||
16 | WixOutput Wixout { get; set; } | 27 | WixOutput Wixout { get; set; } |
17 | } | 28 | } |
18 | } | 29 | } |
diff --git a/src/WixToolset.Extensibility/Data/ICompileContext.cs b/src/WixToolset.Extensibility/Data/ICompileContext.cs index a86fee1a..2ee8f2a1 100644 --- a/src/WixToolset.Extensibility/Data/ICompileContext.cs +++ b/src/WixToolset.Extensibility/Data/ICompileContext.cs | |||
@@ -26,7 +26,7 @@ namespace WixToolset.Extensibility.Data | |||
26 | /// <summary> | 26 | /// <summary> |
27 | /// Set of extensions provided to the compiler. | 27 | /// Set of extensions provided to the compiler. |
28 | /// </summary> | 28 | /// </summary> |
29 | IEnumerable<ICompilerExtension> Extensions { get; set; } | 29 | IReadOnlyCollection<ICompilerExtension> Extensions { get; set; } |
30 | 30 | ||
31 | /// <summary> | 31 | /// <summary> |
32 | /// Gets or sets the platform which the compiler will use when defaulting 64-bit attributes and elements. | 32 | /// Gets or sets the platform which the compiler will use when defaulting 64-bit attributes and elements. |
diff --git a/src/WixToolset.Extensibility/Data/IDecompileContext.cs b/src/WixToolset.Extensibility/Data/IDecompileContext.cs index 63ed27d5..fe7d0465 100644 --- a/src/WixToolset.Extensibility/Data/IDecompileContext.cs +++ b/src/WixToolset.Extensibility/Data/IDecompileContext.cs | |||
@@ -16,7 +16,7 @@ namespace WixToolset.Extensibility.Data | |||
16 | 16 | ||
17 | OutputType DecompileType { get; set; } | 17 | OutputType DecompileType { get; set; } |
18 | 18 | ||
19 | IEnumerable<IDecompilerExtension> Extensions { get; set; } | 19 | IReadOnlyCollection<IDecompilerExtension> Extensions { get; set; } |
20 | 20 | ||
21 | string ExtractFolder { get; set; } | 21 | string ExtractFolder { get; set; } |
22 | 22 | ||
diff --git a/src/WixToolset.Extensibility/Data/IDecompileResult.cs b/src/WixToolset.Extensibility/Data/IDecompileResult.cs index ad4d0841..cffd0976 100644 --- a/src/WixToolset.Extensibility/Data/IDecompileResult.cs +++ b/src/WixToolset.Extensibility/Data/IDecompileResult.cs | |||
@@ -11,7 +11,7 @@ namespace WixToolset.Extensibility.Data | |||
11 | { | 11 | { |
12 | XDocument Document { get; set; } | 12 | XDocument Document { get; set; } |
13 | 13 | ||
14 | IEnumerable<string> ExtractedFilePaths { get; set; } | 14 | IReadOnlyCollection<string> ExtractedFilePaths { get; set; } |
15 | 15 | ||
16 | Platform? Platform { get; set; } | 16 | Platform? Platform { get; set; } |
17 | } | 17 | } |
diff --git a/src/WixToolset.Extensibility/Data/ILayoutContext.cs b/src/WixToolset.Extensibility/Data/ILayoutContext.cs index 3d49b877..b11b4d13 100644 --- a/src/WixToolset.Extensibility/Data/ILayoutContext.cs +++ b/src/WixToolset.Extensibility/Data/ILayoutContext.cs | |||
@@ -19,17 +19,17 @@ namespace WixToolset.Extensibility.Data | |||
19 | /// <summary> | 19 | /// <summary> |
20 | /// Extensions for use during layout. | 20 | /// Extensions for use during layout. |
21 | /// </summary> | 21 | /// </summary> |
22 | IEnumerable<ILayoutExtension> Extensions { get; set; } | 22 | IReadOnlyCollection<ILayoutExtension> Extensions { get; set; } |
23 | 23 | ||
24 | /// <summary> | 24 | /// <summary> |
25 | /// Set of tracked of files created during processing to be cleaned up. | 25 | /// Set of tracked of files created during processing to be cleaned up. |
26 | /// </summary> | 26 | /// </summary> |
27 | IEnumerable<ITrackedFile> TrackedFiles { get; set; } | 27 | IReadOnlyCollection<ITrackedFile> TrackedFiles { get; set; } |
28 | 28 | ||
29 | /// <summary> | 29 | /// <summary> |
30 | /// Set of files to transfer. | 30 | /// Set of files to transfer. |
31 | /// </summary> | 31 | /// </summary> |
32 | IEnumerable<IFileTransfer> FileTransfers { get; set; } | 32 | IReadOnlyCollection<IFileTransfer> FileTransfers { get; set; } |
33 | 33 | ||
34 | /// <summary> | 34 | /// <summary> |
35 | /// File to capture list of content files. | 35 | /// File to capture list of content files. |
diff --git a/src/WixToolset.Extensibility/Data/ILibraryContext.cs b/src/WixToolset.Extensibility/Data/ILibraryContext.cs index d6359ffc..208b6f73 100644 --- a/src/WixToolset.Extensibility/Data/ILibraryContext.cs +++ b/src/WixToolset.Extensibility/Data/ILibraryContext.cs | |||
@@ -7,23 +7,49 @@ namespace WixToolset.Extensibility.Data | |||
7 | using System.Threading; | 7 | using System.Threading; |
8 | using WixToolset.Data; | 8 | using WixToolset.Data; |
9 | 9 | ||
10 | #pragma warning disable 1591 // TODO: add documentation | 10 | /// <summary> |
11 | /// Context provided during library creation operations. | ||
12 | /// </summary> | ||
11 | public interface ILibraryContext | 13 | public interface ILibraryContext |
12 | { | 14 | { |
15 | /// <summary> | ||
16 | /// Service provider. | ||
17 | /// </summary> | ||
13 | IServiceProvider ServiceProvider { get; } | 18 | IServiceProvider ServiceProvider { get; } |
14 | 19 | ||
20 | /// <summary> | ||
21 | /// Indicates whether files should be bound into the library. | ||
22 | /// </summary> | ||
15 | bool BindFiles { get; set; } | 23 | bool BindFiles { get; set; } |
16 | 24 | ||
17 | IEnumerable<IBindPath> BindPaths { get; set; } | 25 | /// <summary> |
26 | /// Collection of bindpaths used to bind files. | ||
27 | /// </summary> | ||
28 | IReadOnlyCollection<IBindPath> BindPaths { get; set; } | ||
18 | 29 | ||
19 | IEnumerable<ILibrarianExtension> Extensions { get; set; } | 30 | /// <summary> |
31 | /// Collection of extensions used during creation of library. | ||
32 | /// </summary> | ||
33 | IReadOnlyCollection<ILibrarianExtension> Extensions { get; set; } | ||
20 | 34 | ||
35 | /// <summary> | ||
36 | /// Identifier of the library. | ||
37 | /// </summary> | ||
21 | string LibraryId { get; set; } | 38 | string LibraryId { get; set; } |
22 | 39 | ||
23 | IEnumerable<Localization> Localizations { get; set; } | 40 | /// <summary> |
41 | /// Collection of localization files to use in the library. | ||
42 | /// </summary> | ||
43 | IReadOnlyCollection<Localization> Localizations { get; set; } | ||
24 | 44 | ||
25 | IEnumerable<Intermediate> Intermediates { get; set; } | 45 | /// <summary> |
46 | /// Collection of intermediates to include in the library. | ||
47 | /// </summary> | ||
48 | IReadOnlyCollection<Intermediate> Intermediates { get; set; } | ||
26 | 49 | ||
50 | /// <summary> | ||
51 | /// Cancellation token. | ||
52 | /// </summary> | ||
27 | CancellationToken CancellationToken { get; set; } | 53 | CancellationToken CancellationToken { get; set; } |
28 | } | 54 | } |
29 | } | 55 | } |
diff --git a/src/WixToolset.Extensibility/Data/ILinkContext.cs b/src/WixToolset.Extensibility/Data/ILinkContext.cs index 7524d18c..d56866f7 100644 --- a/src/WixToolset.Extensibility/Data/ILinkContext.cs +++ b/src/WixToolset.Extensibility/Data/ILinkContext.cs | |||
@@ -7,21 +7,44 @@ namespace WixToolset.Extensibility.Data | |||
7 | using System.Threading; | 7 | using System.Threading; |
8 | using WixToolset.Data; | 8 | using WixToolset.Data; |
9 | 9 | ||
10 | #pragma warning disable 1591 // TODO: add documentation | 10 | /// <summary> |
11 | /// Context provided during linking. | ||
12 | /// </summary> | ||
11 | public interface ILinkContext | 13 | public interface ILinkContext |
12 | { | 14 | { |
15 | /// <summary> | ||
16 | /// Service provider. | ||
17 | /// </summary> | ||
13 | IServiceProvider ServiceProvider { get; } | 18 | IServiceProvider ServiceProvider { get; } |
14 | 19 | ||
15 | IEnumerable<ILinkerExtension> Extensions { get; set; } | 20 | /// <summary> |
21 | /// Collection of extensions to use during linking. | ||
22 | /// </summary> | ||
23 | IReadOnlyCollection<ILinkerExtension> Extensions { get; set; } | ||
16 | 24 | ||
17 | IEnumerable<IExtensionData> ExtensionData { get; set; } | 25 | /// <summary> |
26 | /// Collection of extension data to use during linking. | ||
27 | /// </summary> | ||
28 | IReadOnlyCollection<IExtensionData> ExtensionData { get; set; } | ||
18 | 29 | ||
30 | /// <summary> | ||
31 | /// Expected output type. | ||
32 | /// </summary> | ||
19 | OutputType ExpectedOutputType { get; set; } | 33 | OutputType ExpectedOutputType { get; set; } |
20 | 34 | ||
21 | IEnumerable<Intermediate> Intermediates { get; set; } | 35 | /// <summary> |
36 | /// Collection of intermediates to link. | ||
37 | /// </summary> | ||
38 | IReadOnlyCollection<Intermediate> Intermediates { get; set; } | ||
22 | 39 | ||
40 | /// <summary> | ||
41 | /// Symbol definition creator used to load extension data. | ||
42 | /// </summary> | ||
23 | ISymbolDefinitionCreator SymbolDefinitionCreator { get; set; } | 43 | ISymbolDefinitionCreator SymbolDefinitionCreator { get; set; } |
24 | 44 | ||
45 | /// <summary> | ||
46 | /// Cancellation token. | ||
47 | /// </summary> | ||
25 | CancellationToken CancellationToken { get; set; } | 48 | CancellationToken CancellationToken { get; set; } |
26 | } | 49 | } |
27 | } | 50 | } |
diff --git a/src/WixToolset.Extensibility/Data/IPreprocessContext.cs b/src/WixToolset.Extensibility/Data/IPreprocessContext.cs index c6bdfe3a..69057c33 100644 --- a/src/WixToolset.Extensibility/Data/IPreprocessContext.cs +++ b/src/WixToolset.Extensibility/Data/IPreprocessContext.cs | |||
@@ -7,14 +7,25 @@ namespace WixToolset.Extensibility.Data | |||
7 | using System.Threading; | 7 | using System.Threading; |
8 | using WixToolset.Data; | 8 | using WixToolset.Data; |
9 | 9 | ||
10 | #pragma warning disable 1591 // TODO: add documentation | 10 | /// <summary> |
11 | /// Preprocessor context. | ||
12 | /// </summary> | ||
11 | public interface IPreprocessContext | 13 | public interface IPreprocessContext |
12 | { | 14 | { |
15 | /// <summary> | ||
16 | /// Service provider. | ||
17 | /// </summary> | ||
13 | IServiceProvider ServiceProvider { get; } | 18 | IServiceProvider ServiceProvider { get; } |
14 | 19 | ||
15 | IEnumerable<IPreprocessorExtension> Extensions { get; set; } | 20 | /// <summary> |
21 | /// Collection of extensions to use during preprocessing. | ||
22 | /// </summary> | ||
23 | IReadOnlyCollection<IPreprocessorExtension> Extensions { get; set; } | ||
16 | 24 | ||
17 | IEnumerable<string> IncludeSearchPaths { get; set; } | 25 | /// <summary> |
26 | /// Collection of search paths to find include files. | ||
27 | /// </summary> | ||
28 | IReadOnlyCollection<string> IncludeSearchPaths { get; set; } | ||
18 | 29 | ||
19 | /// <summary> | 30 | /// <summary> |
20 | /// Gets the platform which the compiler will use when defaulting 64-bit attributes and elements. | 31 | /// Gets the platform which the compiler will use when defaulting 64-bit attributes and elements. |
@@ -22,12 +33,24 @@ namespace WixToolset.Extensibility.Data | |||
22 | /// <value>The platform which the compiler will use when defaulting 64-bit attributes and elements.</value> | 33 | /// <value>The platform which the compiler will use when defaulting 64-bit attributes and elements.</value> |
23 | Platform Platform { get; set; } | 34 | Platform Platform { get; set; } |
24 | 35 | ||
36 | /// <summary> | ||
37 | /// Path to the source file being preprocessed. | ||
38 | /// </summary> | ||
25 | string SourcePath { get; set; } | 39 | string SourcePath { get; set; } |
26 | 40 | ||
41 | /// <summary> | ||
42 | /// Collection of name/value pairs used as preprocessor variables. | ||
43 | /// </summary> | ||
27 | IDictionary<string, string> Variables { get; set; } | 44 | IDictionary<string, string> Variables { get; set; } |
28 | 45 | ||
46 | /// <summary> | ||
47 | /// Current source line number of the preprocessor. | ||
48 | /// </summary> | ||
29 | SourceLineNumber CurrentSourceLineNumber { get; set; } | 49 | SourceLineNumber CurrentSourceLineNumber { get; set; } |
30 | 50 | ||
51 | /// <summary> | ||
52 | /// Cancellation token. | ||
53 | /// </summary> | ||
31 | CancellationToken CancellationToken { get; set; } | 54 | CancellationToken CancellationToken { get; set; } |
32 | } | 55 | } |
33 | } | 56 | } |
diff --git a/src/WixToolset.Extensibility/Data/IPreprocessResult.cs b/src/WixToolset.Extensibility/Data/IPreprocessResult.cs index d46c8147..af224c1e 100644 --- a/src/WixToolset.Extensibility/Data/IPreprocessResult.cs +++ b/src/WixToolset.Extensibility/Data/IPreprocessResult.cs | |||
@@ -5,11 +5,19 @@ namespace WixToolset.Extensibility.Data | |||
5 | using System.Collections.Generic; | 5 | using System.Collections.Generic; |
6 | using System.Xml.Linq; | 6 | using System.Xml.Linq; |
7 | 7 | ||
8 | #pragma warning disable 1591 // TODO: add documentation | 8 | /// <summary> |
9 | /// Result of preprocessing. | ||
10 | /// </summary> | ||
9 | public interface IPreprocessResult | 11 | public interface IPreprocessResult |
10 | { | 12 | { |
13 | /// <summary> | ||
14 | /// Document result of preprocessor. | ||
15 | /// </summary> | ||
11 | XDocument Document { get; set; } | 16 | XDocument Document { get; set; } |
12 | 17 | ||
13 | IEnumerable<IIncludedFile> IncludedFiles { get; set; } | 18 | /// <summary> |
19 | /// Collection of files included during preprocessing. | ||
20 | /// </summary> | ||
21 | IReadOnlyCollection<IIncludedFile> IncludedFiles { get; set; } | ||
14 | } | 22 | } |
15 | } | 23 | } |
diff --git a/src/WixToolset.Extensibility/Data/IResolveContext.cs b/src/WixToolset.Extensibility/Data/IResolveContext.cs index 6ab5b545..63159ccb 100644 --- a/src/WixToolset.Extensibility/Data/IResolveContext.cs +++ b/src/WixToolset.Extensibility/Data/IResolveContext.cs | |||
@@ -20,22 +20,22 @@ namespace WixToolset.Extensibility.Data | |||
20 | /// <summary> | 20 | /// <summary> |
21 | /// Bind paths used during resolution. | 21 | /// Bind paths used during resolution. |
22 | /// </summary> | 22 | /// </summary> |
23 | IEnumerable<IBindPath> BindPaths { get; set; } | 23 | IReadOnlyCollection<IBindPath> BindPaths { get; set; } |
24 | 24 | ||
25 | /// <summary> | 25 | /// <summary> |
26 | /// Resolve extensions. | 26 | /// Resolve extensions. |
27 | /// </summary> | 27 | /// </summary> |
28 | IEnumerable<IResolverExtension> Extensions { get; set; } | 28 | IReadOnlyCollection<IResolverExtension> Extensions { get; set; } |
29 | 29 | ||
30 | /// <summary> | 30 | /// <summary> |
31 | /// Extension data. | 31 | /// Extension data. |
32 | /// </summary> | 32 | /// </summary> |
33 | IEnumerable<IExtensionData> ExtensionData { get; set; } | 33 | IReadOnlyCollection<IExtensionData> ExtensionData { get; set; } |
34 | 34 | ||
35 | /// <summary> | 35 | /// <summary> |
36 | /// List of cultures to filter the localizations. | 36 | /// List of cultures to filter the localizations. |
37 | /// </summary> | 37 | /// </summary> |
38 | IEnumerable<string> FilterCultures { get; set; } | 38 | IReadOnlyCollection<string> FilterCultures { get; set; } |
39 | 39 | ||
40 | /// <summary> | 40 | /// <summary> |
41 | /// Intermediate folder. | 41 | /// Intermediate folder. |
@@ -50,7 +50,7 @@ namespace WixToolset.Extensibility.Data | |||
50 | /// <summary> | 50 | /// <summary> |
51 | /// Localizations used to resolve. | 51 | /// Localizations used to resolve. |
52 | /// </summary> | 52 | /// </summary> |
53 | IEnumerable<Localization> Localizations { get; set; } | 53 | IReadOnlyCollection<Localization> Localizations { get; set; } |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Indicates whether to allow localization and bind variables to remain unresolved. | 56 | /// Indicates whether to allow localization and bind variables to remain unresolved. |
diff --git a/src/WixToolset.Extensibility/Data/IResolveFileResult.cs b/src/WixToolset.Extensibility/Data/IResolveFileResult.cs index c8dca81a..2f0df96c 100644 --- a/src/WixToolset.Extensibility/Data/IResolveFileResult.cs +++ b/src/WixToolset.Extensibility/Data/IResolveFileResult.cs | |||
@@ -4,11 +4,19 @@ namespace WixToolset.Extensibility.Data | |||
4 | { | 4 | { |
5 | using System.Collections.Generic; | 5 | using System.Collections.Generic; |
6 | 6 | ||
7 | #pragma warning disable 1591 // TODO: add documentation | 7 | /// <summary> |
8 | /// Result of resolving a file. | ||
9 | /// </summary> | ||
8 | public interface IResolveFileResult | 10 | public interface IResolveFileResult |
9 | { | 11 | { |
10 | IEnumerable<string> CheckedPaths { get; set; } | 12 | /// <summary> |
13 | /// Collection of paths checked to find file. | ||
14 | /// </summary> | ||
15 | IReadOnlyCollection<string> CheckedPaths { get; set; } | ||
11 | 16 | ||
17 | /// <summary> | ||
18 | /// Path to found file, if found. | ||
19 | /// </summary> | ||
12 | string Path { get; set; } | 20 | string Path { get; set; } |
13 | } | 21 | } |
14 | } | 22 | } |
diff --git a/src/WixToolset.Extensibility/Data/IResolveResult.cs b/src/WixToolset.Extensibility/Data/IResolveResult.cs index abffb415..0c5e0ccf 100644 --- a/src/WixToolset.Extensibility/Data/IResolveResult.cs +++ b/src/WixToolset.Extensibility/Data/IResolveResult.cs | |||
@@ -28,12 +28,12 @@ namespace WixToolset.Extensibility.Data | |||
28 | /// <summary> | 28 | /// <summary> |
29 | /// Fields still requiring resolution. | 29 | /// Fields still requiring resolution. |
30 | /// </summary> | 30 | /// </summary> |
31 | IEnumerable<IDelayedField> DelayedFields { get; set; } | 31 | IReadOnlyCollection<IDelayedField> DelayedFields { get; set; } |
32 | 32 | ||
33 | /// <summary> | 33 | /// <summary> |
34 | /// Files to extract from embedded .wixlibs. | 34 | /// Files to extract from embedded .wixlibs. |
35 | /// </summary> | 35 | /// </summary> |
36 | IEnumerable<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; } | 36 | IReadOnlyCollection<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; } |
37 | 37 | ||
38 | /// <summary> | 38 | /// <summary> |
39 | /// Resolved intermediate. | 39 | /// Resolved intermediate. |
diff --git a/src/WixToolset.Extensibility/IExtensionCommandLine.cs b/src/WixToolset.Extensibility/IExtensionCommandLine.cs index 2c7d0a7e..f7b19955 100644 --- a/src/WixToolset.Extensibility/IExtensionCommandLine.cs +++ b/src/WixToolset.Extensibility/IExtensionCommandLine.cs | |||
@@ -15,7 +15,7 @@ namespace WixToolset.Extensibility | |||
15 | /// Gets the supported command line types for this extension. | 15 | /// Gets the supported command line types for this extension. |
16 | /// </summary> | 16 | /// </summary> |
17 | /// <value>The supported command line types for this extension.</value> | 17 | /// <value>The supported command line types for this extension.</value> |
18 | IEnumerable<ExtensionCommandLineSwitch> CommandLineSwitches { get; } | 18 | IReadOnlyCollection<ExtensionCommandLineSwitch> CommandLineSwitches { get; } |
19 | 19 | ||
20 | /// <summary> | 20 | /// <summary> |
21 | /// Called before the command-line is parsed. | 21 | /// Called before the command-line is parsed. |
diff --git a/src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs b/src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs index 12a38b9a..067745c2 100644 --- a/src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs +++ b/src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs | |||
@@ -16,7 +16,7 @@ namespace WixToolset.Extensibility | |||
16 | /// <summary> | 16 | /// <summary> |
17 | /// Table definitions provided by the extension. | 17 | /// Table definitions provided by the extension. |
18 | /// </summary> | 18 | /// </summary> |
19 | IEnumerable<TableDefinition> TableDefinitions { get; } | 19 | IReadOnlyCollection<TableDefinition> TableDefinitions { get; } |
20 | 20 | ||
21 | /// <summary> | 21 | /// <summary> |
22 | /// Called before binding occurs. | 22 | /// Called before binding occurs. |
diff --git a/src/WixToolset.Extensibility/Services/IBackendHelper.cs b/src/WixToolset.Extensibility/Services/IBackendHelper.cs index ce3ddc89..5c4d9a68 100644 --- a/src/WixToolset.Extensibility/Services/IBackendHelper.cs +++ b/src/WixToolset.Extensibility/Services/IBackendHelper.cs | |||
@@ -72,7 +72,7 @@ namespace WixToolset.Extensibility.Services | |||
72 | /// </summary> | 72 | /// </summary> |
73 | /// <param name="embeddedFiles">Embedded files to extract.</param> | 73 | /// <param name="embeddedFiles">Embedded files to extract.</param> |
74 | /// <returns><c>ITrackedFile</c> for each embedded file extracted.</returns> | 74 | /// <returns><c>ITrackedFile</c> for each embedded file extracted.</returns> |
75 | IEnumerable<ITrackedFile> ExtractEmbeddedFiles(IEnumerable<IExpectedExtractFile> embeddedFiles); | 75 | IReadOnlyList<ITrackedFile> ExtractEmbeddedFiles(IEnumerable<IExpectedExtractFile> embeddedFiles); |
76 | 76 | ||
77 | /// <summary> | 77 | /// <summary> |
78 | /// Generate an identifier by hashing data from the row. | 78 | /// Generate an identifier by hashing data from the row. |
diff --git a/src/WixToolset.Extensibility/Services/IExtensionManager.cs b/src/WixToolset.Extensibility/Services/IExtensionManager.cs index a8087941..8e49c38d 100644 --- a/src/WixToolset.Extensibility/Services/IExtensionManager.cs +++ b/src/WixToolset.Extensibility/Services/IExtensionManager.cs | |||
@@ -37,6 +37,6 @@ namespace WixToolset.Extensibility.Services | |||
37 | /// </summary> | 37 | /// </summary> |
38 | /// <typeparam name="T">Type of extension to get.</typeparam> | 38 | /// <typeparam name="T">Type of extension to get.</typeparam> |
39 | /// <returns>Extensions of the specified type.</returns> | 39 | /// <returns>Extensions of the specified type.</returns> |
40 | IEnumerable<T> GetServices<T>() where T : class; | 40 | IReadOnlyCollection<T> GetServices<T>() where T : class; |
41 | } | 41 | } |
42 | } | 42 | } |