diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-03-01 11:05:02 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@robmensching.com> | 2019-03-01 11:08:36 -0800 |
| commit | e9fea339e473e6dcc32e34e995429b41cabb6c22 (patch) | |
| tree | cad7210c4adcfa8f11b460eaadb1178c52d28e32 /src | |
| parent | 543ce1ac2e203ac0dc8fa3227bb2c40c12e6e17e (diff) | |
| download | wix-e9fea339e473e6dcc32e34e995429b41cabb6c22.tar.gz wix-e9fea339e473e6dcc32e34e995429b41cabb6c22.tar.bz2 wix-e9fea339e473e6dcc32e34e995429b41cabb6c22.zip | |
Expose only abstracts and enums from WixToolset.Extensibility
Diffstat (limited to 'src')
35 files changed, 150 insertions, 207 deletions
diff --git a/src/WixToolset.Extensibility/BaseBinderExtension.cs b/src/WixToolset.Extensibility/BaseBinderExtension.cs index d533b0cb..3869d1ed 100644 --- a/src/WixToolset.Extensibility/BaseBinderExtension.cs +++ b/src/WixToolset.Extensibility/BaseBinderExtension.cs | |||
| @@ -40,7 +40,7 @@ namespace WixToolset.Extensibility | |||
| 40 | /// <summary> | 40 | /// <summary> |
| 41 | /// Called at the end of bind. | 41 | /// Called at the end of bind. |
| 42 | /// </summary> | 42 | /// </summary> |
| 43 | public virtual void PostBind(BindResult result) | 43 | public virtual void PostBind(IBindResult result) |
| 44 | { | 44 | { |
| 45 | } | 45 | } |
| 46 | } | 46 | } |
diff --git a/src/WixToolset.Extensibility/BaseCompilerExtension.cs b/src/WixToolset.Extensibility/BaseCompilerExtension.cs index e1584bc3..51fbcd0b 100644 --- a/src/WixToolset.Extensibility/BaseCompilerExtension.cs +++ b/src/WixToolset.Extensibility/BaseCompilerExtension.cs | |||
| @@ -35,6 +35,11 @@ namespace WixToolset.Extensibility | |||
| 35 | public abstract XNamespace Namespace { get; } | 35 | public abstract XNamespace Namespace { get; } |
| 36 | 36 | ||
| 37 | /// <summary> | 37 | /// <summary> |
| 38 | /// Creates a component key path. | ||
| 39 | /// </summary> | ||
| 40 | protected IComponentKeyPath CreateComponentKeyPath() => this.Context.ServiceProvider.GetService<IComponentKeyPath>(); | ||
| 41 | |||
| 42 | /// <summary> | ||
| 38 | /// Called at the beginning of the compilation of a source file. | 43 | /// Called at the beginning of the compilation of a source file. |
| 39 | /// </summary> | 44 | /// </summary> |
| 40 | public virtual void PreCompile(ICompileContext context) | 45 | public virtual void PreCompile(ICompileContext context) |
| @@ -75,7 +80,7 @@ namespace WixToolset.Extensibility | |||
| 75 | /// <param name="element">Element to process.</param> | 80 | /// <param name="element">Element to process.</param> |
| 76 | /// <param name="keyPath">Explicit key path.</param> | 81 | /// <param name="keyPath">Explicit key path.</param> |
| 77 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> | 82 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> |
| 78 | public virtual ComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) | 83 | public virtual IComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context) |
| 79 | { | 84 | { |
| 80 | this.ParseElement(intermediate, section, parentElement, element, context); | 85 | this.ParseElement(intermediate, section, parentElement, element, context); |
| 81 | return null; | 86 | return null; |
diff --git a/src/WixToolset.Extensibility/BaseResolverExtension.cs b/src/WixToolset.Extensibility/BaseResolverExtension.cs index fcd2eed9..bf606d58 100644 --- a/src/WixToolset.Extensibility/BaseResolverExtension.cs +++ b/src/WixToolset.Extensibility/BaseResolverExtension.cs | |||
| @@ -22,6 +22,11 @@ namespace WixToolset.Extensibility | |||
| 22 | protected IMessaging Messaging { get; private set; } | 22 | protected IMessaging Messaging { get; private set; } |
| 23 | 23 | ||
| 24 | /// <summary> | 24 | /// <summary> |
| 25 | /// Creates a resolve file result. | ||
| 26 | /// </summary> | ||
| 27 | protected IResolveFileResult CreateResolveFileResult() => this.Context.ServiceProvider.GetService<IResolveFileResult>(); | ||
| 28 | |||
| 29 | /// <summary> | ||
| 25 | /// Called at the beginning of the resolving variables and files. | 30 | /// Called at the beginning of the resolving variables and files. |
| 26 | /// </summary> | 31 | /// </summary> |
| 27 | public virtual void PreResolve(IResolveContext context) | 32 | public virtual void PreResolve(IResolveContext context) |
| @@ -31,7 +36,7 @@ namespace WixToolset.Extensibility | |||
| 31 | this.Messaging = context.ServiceProvider.GetService<IMessaging>(); | 36 | this.Messaging = context.ServiceProvider.GetService<IMessaging>(); |
| 32 | } | 37 | } |
| 33 | 38 | ||
| 34 | public virtual ResolveFileResult ResolveFile(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage) | 39 | public virtual IResolveFileResult ResolveFile(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage) |
| 35 | { | 40 | { |
| 36 | return null; | 41 | return null; |
| 37 | } | 42 | } |
| @@ -39,7 +44,7 @@ namespace WixToolset.Extensibility | |||
| 39 | /// <summary> | 44 | /// <summary> |
| 40 | /// Called at the end of resolve. | 45 | /// Called at the end of resolve. |
| 41 | /// </summary> | 46 | /// </summary> |
| 42 | public virtual void PostResolve(ResolveResult result) | 47 | public virtual void PostResolve(IResolveResult result) |
| 43 | { | 48 | { |
| 44 | } | 49 | } |
| 45 | } | 50 | } |
diff --git a/src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs b/src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs index c5ee9d1b..f02875cd 100644 --- a/src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs +++ b/src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs | |||
| @@ -34,6 +34,11 @@ namespace WixToolset.Extensibility | |||
| 34 | /// </summary> | 34 | /// </summary> |
| 35 | protected virtual TableDefinition[] TableDefinitionsForTuples { get; } | 35 | protected virtual TableDefinition[] TableDefinitionsForTuples { get; } |
| 36 | 36 | ||
| 37 | /// <summary> | ||
| 38 | /// Creates a resolved cabinet result. | ||
| 39 | /// </summary> | ||
| 40 | protected IResolvedCabinet CreateResolvedCabinet() => this.Context.ServiceProvider.GetService<IResolvedCabinet>(); | ||
| 41 | |||
| 37 | public virtual void PreBackendBind(IBindContext context) | 42 | public virtual void PreBackendBind(IBindContext context) |
| 38 | { | 43 | { |
| 39 | this.Context = context; | 44 | this.Context = context; |
| @@ -43,7 +48,7 @@ namespace WixToolset.Extensibility | |||
| 43 | this.BackendHelper = context.ServiceProvider.GetService<IWindowsInstallerBackendHelper>(); | 48 | this.BackendHelper = context.ServiceProvider.GetService<IWindowsInstallerBackendHelper>(); |
| 44 | } | 49 | } |
| 45 | 50 | ||
| 46 | public virtual ResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable<BindFileWithPath> files) | 51 | public virtual IResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable<IBindFileWithPath> files) |
| 47 | { | 52 | { |
| 48 | return null; | 53 | return null; |
| 49 | } | 54 | } |
| @@ -63,7 +68,7 @@ namespace WixToolset.Extensibility | |||
| 63 | return false; | 68 | return false; |
| 64 | } | 69 | } |
| 65 | 70 | ||
| 66 | public virtual void PostBackendBind(BindResult result, Pdb pdb) | 71 | public virtual void PostBackendBind(IBindResult result, Pdb pdb) |
| 67 | { | 72 | { |
| 68 | } | 73 | } |
| 69 | } | 74 | } |
diff --git a/src/WixToolset.Extensibility/CompilerConstants.cs b/src/WixToolset.Extensibility/CompilerConstants.cs index 9f666b43..f26456fb 100644 --- a/src/WixToolset.Extensibility/CompilerConstants.cs +++ b/src/WixToolset.Extensibility/CompilerConstants.cs | |||
| @@ -7,7 +7,7 @@ namespace WixToolset.Extensibility | |||
| 7 | /// <summary> | 7 | /// <summary> |
| 8 | /// Constants used by compiler. | 8 | /// Constants used by compiler. |
| 9 | /// </summary> | 9 | /// </summary> |
| 10 | public class CompilerConstants | 10 | public static class CompilerConstants |
| 11 | { | 11 | { |
| 12 | public const int IntegerNotSet = int.MinValue; | 12 | public const int IntegerNotSet = int.MinValue; |
| 13 | public const int IllegalInteger = int.MinValue + 1; | 13 | public const int IllegalInteger = int.MinValue + 1; |
diff --git a/src/WixToolset.Extensibility/Data/BindPath.cs b/src/WixToolset.Extensibility/Data/BindPath.cs deleted file mode 100644 index 3b0b73bb..00000000 --- a/src/WixToolset.Extensibility/Data/BindPath.cs +++ /dev/null | |||
| @@ -1,59 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | |||
| 7 | /// <summary> | ||
| 8 | /// Bind path representation. | ||
| 9 | /// </summary> | ||
| 10 | public class BindPath | ||
| 11 | { | ||
| 12 | /// <summary> | ||
| 13 | /// Creates an unnamed bind path. | ||
| 14 | /// </summary> | ||
| 15 | /// <param name="path">Path for the bind path.</param> | ||
| 16 | public BindPath(string path) : this(String.Empty, path, BindStage.Normal) | ||
| 17 | { | ||
| 18 | } | ||
| 19 | |||
| 20 | /// <summary> | ||
| 21 | /// Creates a named bind path. | ||
| 22 | /// </summary> | ||
| 23 | /// <param name="name">Name of the bind path.</param> | ||
| 24 | /// <param name="path">Path for the bind path.</param> | ||
| 25 | /// <param name="stage">Stage for the bind path.</param> | ||
| 26 | public BindPath(string name, string path, BindStage stage = BindStage.Normal) | ||
| 27 | { | ||
| 28 | this.Name = name; | ||
| 29 | this.Path = path; | ||
| 30 | this.Stage = stage; | ||
| 31 | } | ||
| 32 | |||
| 33 | /// <summary> | ||
| 34 | /// Name of the bind path or String.Empty if the path is unnamed. | ||
| 35 | /// </summary> | ||
| 36 | public string Name { get; set; } | ||
| 37 | |||
| 38 | /// <summary> | ||
| 39 | /// Path for the bind path. | ||
| 40 | /// </summary> | ||
| 41 | public string Path { get; set; } | ||
| 42 | |||
| 43 | /// <summary> | ||
| 44 | /// Stage for the bind path. | ||
| 45 | /// </summary> | ||
| 46 | public BindStage Stage { get; set; } | ||
| 47 | |||
| 48 | /// <summary> | ||
| 49 | /// Parses a normal bind path from its string representation | ||
| 50 | /// </summary> | ||
| 51 | /// <param name="bindPath">String representation of bind path that looks like: [name=]path</param> | ||
| 52 | /// <returns>Parsed normal bind path.</returns> | ||
| 53 | public static BindPath Parse(string bindPath) | ||
| 54 | { | ||
| 55 | string[] namedPath = bindPath.Split(new char[] { '=' }, 2); | ||
| 56 | return (1 == namedPath.Length) ? new BindPath(namedPath[0]) : new BindPath(namedPath[0], namedPath[1]); | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
diff --git a/src/WixToolset.Extensibility/Data/BindResult.cs b/src/WixToolset.Extensibility/Data/BindResult.cs deleted file mode 100644 index e467d269..00000000 --- a/src/WixToolset.Extensibility/Data/BindResult.cs +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 4 | { | ||
| 5 | using System.Collections.Generic; | ||
| 6 | |||
| 7 | public class BindResult | ||
| 8 | { | ||
| 9 | public IEnumerable<IFileTransfer> FileTransfers { get; set; } | ||
| 10 | |||
| 11 | public IEnumerable<ITrackedFile> TrackedFiles { get; set; } | ||
| 12 | } | ||
| 13 | } | ||
diff --git a/src/WixToolset.Extensibility/Data/ComponentKeyPath.cs b/src/WixToolset.Extensibility/Data/ComponentKeyPathType.cs index 112f562c..58bbb0cf 100644 --- a/src/WixToolset.Extensibility/Data/ComponentKeyPath.cs +++ b/src/WixToolset.Extensibility/Data/ComponentKeyPathType.cs | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 2 | 2 | ||
| 3 | namespace WixToolset.Extensibility.Data | 3 | namespace WixToolset.Extensibility.Data |
| 4 | { | 4 | { |
| @@ -34,22 +34,4 @@ namespace WixToolset.Extensibility.Data | |||
| 34 | /// </summary> | 34 | /// </summary> |
| 35 | RegistryFormatted | 35 | RegistryFormatted |
| 36 | } | 36 | } |
| 37 | |||
| 38 | public class ComponentKeyPath | ||
| 39 | { | ||
| 40 | /// <summary> | ||
| 41 | /// Identifier of the resource to be a key path. | ||
| 42 | /// </summary> | ||
| 43 | public string Id { get; set; } | ||
| 44 | |||
| 45 | /// <summary> | ||
| 46 | /// Indicates whether the key path was explicitly set for this resource. | ||
| 47 | /// </summary> | ||
| 48 | public bool Explicit { get; set; } | ||
| 49 | |||
| 50 | /// <summary> | ||
| 51 | /// Type of resource to be the key path. | ||
| 52 | /// </summary> | ||
| 53 | public ComponentKeyPathType Type { get; set; } | ||
| 54 | } | ||
| 55 | } | 37 | } |
diff --git a/src/WixToolset.Extensibility/Data/IBindFileWithPath.cs b/src/WixToolset.Extensibility/Data/IBindFileWithPath.cs new file mode 100644 index 00000000..ec78a1a0 --- /dev/null +++ b/src/WixToolset.Extensibility/Data/IBindFileWithPath.cs | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 4 | { | ||
| 5 | public interface IBindFileWithPath | ||
| 6 | { | ||
| 7 | string Id { get; set; } | ||
| 8 | |||
| 9 | string Path { get; set; } | ||
| 10 | } | ||
| 11 | } | ||
diff --git a/src/WixToolset.Extensibility/Data/BindFileWithPath.cs b/src/WixToolset.Extensibility/Data/IBindPath.cs index d65ae1ba..5784a0e0 100644 --- a/src/WixToolset.Extensibility/Data/BindFileWithPath.cs +++ b/src/WixToolset.Extensibility/Data/IBindPath.cs | |||
| @@ -2,19 +2,21 @@ | |||
| 2 | 2 | ||
| 3 | namespace WixToolset.Extensibility.Data | 3 | namespace WixToolset.Extensibility.Data |
| 4 | { | 4 | { |
| 5 | /// <summary> | 5 | public interface IBindPath |
| 6 | /// Bind file with its path. | ||
| 7 | /// </summary> | ||
| 8 | public class BindFileWithPath | ||
| 9 | { | 6 | { |
| 10 | /// <summary> | 7 | /// <summary> |
| 11 | /// Gets or sets the identifier of the file with this path. | 8 | /// Name of the bind path or String.Empty if the path is unnamed. |
| 12 | /// </summary> | 9 | /// </summary> |
| 13 | public string Id { get; set; } | 10 | string Name { get; set; } |
| 14 | 11 | ||
| 15 | /// <summary> | 12 | /// <summary> |
| 16 | /// Gets or sets the file path. | 13 | /// Path for the bind path. |
| 17 | /// </summary> | 14 | /// </summary> |
| 18 | public string Path { get; set; } | 15 | string Path { get; set; } |
| 16 | |||
| 17 | /// <summary> | ||
| 18 | /// Stage for the bind path. | ||
| 19 | /// </summary> | ||
| 20 | BindStage Stage { get; set; } | ||
| 19 | } | 21 | } |
| 20 | } | 22 | } |
diff --git a/src/WixToolset.Extensibility/Data/IBindResult.cs b/src/WixToolset.Extensibility/Data/IBindResult.cs new file mode 100644 index 00000000..d35e7628 --- /dev/null +++ b/src/WixToolset.Extensibility/Data/IBindResult.cs | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 4 | { | ||
| 5 | using System.Collections.Generic; | ||
| 6 | |||
| 7 | public interface IBindResult | ||
| 8 | { | ||
| 9 | IEnumerable<IFileTransfer> FileTransfers { get; set; } | ||
| 10 | |||
| 11 | IEnumerable<ITrackedFile> TrackedFiles { get; set; } | ||
| 12 | } | ||
| 13 | } | ||
diff --git a/src/WixToolset.Extensibility/Data/IComponentKeyPath.cs b/src/WixToolset.Extensibility/Data/IComponentKeyPath.cs new file mode 100644 index 00000000..ba660b45 --- /dev/null +++ b/src/WixToolset.Extensibility/Data/IComponentKeyPath.cs | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 4 | { | ||
| 5 | public interface IComponentKeyPath | ||
| 6 | { | ||
| 7 | bool Explicit { get; set; } | ||
| 8 | |||
| 9 | string Id { get; set; } | ||
| 10 | |||
| 11 | ComponentKeyPathType Type { get; set; } | ||
| 12 | } | ||
| 13 | } | ||
diff --git a/src/WixToolset.Extensibility/Data/DecompileResult.cs b/src/WixToolset.Extensibility/Data/IDecompileResult.cs index 27706b2c..ea993cb2 100644 --- a/src/WixToolset.Extensibility/Data/DecompileResult.cs +++ b/src/WixToolset.Extensibility/Data/IDecompileResult.cs | |||
| @@ -5,10 +5,10 @@ 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 | public class DecompileResult | 8 | public interface IDecompileResult |
| 9 | { | 9 | { |
| 10 | public XDocument Document { get; set; } | 10 | XDocument Document { get; set; } |
| 11 | 11 | ||
| 12 | public IEnumerable<string> ExtractedFilePaths { get; set; } | 12 | IEnumerable<string> ExtractedFilePaths { get; set; } |
| 13 | } | 13 | } |
| 14 | } | 14 | } |
diff --git a/src/WixToolset.Extensibility/Data/ILibraryContext.cs b/src/WixToolset.Extensibility/Data/ILibraryContext.cs index 08b4ed26..9b65ebfd 100644 --- a/src/WixToolset.Extensibility/Data/ILibraryContext.cs +++ b/src/WixToolset.Extensibility/Data/ILibraryContext.cs | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 2 | 2 | ||
| 3 | namespace WixToolset.Extensibility.Data | 3 | namespace WixToolset.Extensibility.Data |
| 4 | { | 4 | { |
| @@ -12,7 +12,7 @@ namespace WixToolset.Extensibility.Data | |||
| 12 | 12 | ||
| 13 | bool BindFiles { get; set; } | 13 | bool BindFiles { get; set; } |
| 14 | 14 | ||
| 15 | IEnumerable<BindPath> BindPaths { get; set; } | 15 | IEnumerable<IBindPath> BindPaths { get; set; } |
| 16 | 16 | ||
| 17 | IEnumerable<ILibrarianExtension> Extensions { get; set; } | 17 | IEnumerable<ILibrarianExtension> Extensions { get; set; } |
| 18 | 18 | ||
diff --git a/src/WixToolset.Extensibility/Data/IResolveContext.cs b/src/WixToolset.Extensibility/Data/IResolveContext.cs index 0e12a534..68a50268 100644 --- a/src/WixToolset.Extensibility/Data/IResolveContext.cs +++ b/src/WixToolset.Extensibility/Data/IResolveContext.cs | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 2 | 2 | ||
| 3 | namespace WixToolset.Extensibility.Data | 3 | namespace WixToolset.Extensibility.Data |
| 4 | { | 4 | { |
| @@ -11,7 +11,7 @@ namespace WixToolset.Extensibility.Data | |||
| 11 | { | 11 | { |
| 12 | IServiceProvider ServiceProvider { get; } | 12 | IServiceProvider ServiceProvider { get; } |
| 13 | 13 | ||
| 14 | IEnumerable<BindPath> BindPaths { get; set; } | 14 | IEnumerable<IBindPath> BindPaths { get; set; } |
| 15 | 15 | ||
| 16 | IEnumerable<IResolverExtension> Extensions { get; set; } | 16 | IEnumerable<IResolverExtension> Extensions { get; set; } |
| 17 | 17 | ||
diff --git a/src/WixToolset.Extensibility/Data/IResolveFileResult.cs b/src/WixToolset.Extensibility/Data/IResolveFileResult.cs new file mode 100644 index 00000000..bf0af72e --- /dev/null +++ b/src/WixToolset.Extensibility/Data/IResolveFileResult.cs | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 4 | { | ||
| 5 | using System.Collections.Generic; | ||
| 6 | |||
| 7 | public interface IResolveFileResult | ||
| 8 | { | ||
| 9 | IEnumerable<string> CheckedPaths { get; set; } | ||
| 10 | |||
| 11 | string Path { get; set; } | ||
| 12 | } | ||
| 13 | } | ||
diff --git a/src/WixToolset.Extensibility/Data/IResolveResult.cs b/src/WixToolset.Extensibility/Data/IResolveResult.cs new file mode 100644 index 00000000..87b9c573 --- /dev/null +++ b/src/WixToolset.Extensibility/Data/IResolveResult.cs | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 4 | { | ||
| 5 | using System.Collections.Generic; | ||
| 6 | using WixToolset.Data; | ||
| 7 | |||
| 8 | public interface IResolveResult | ||
| 9 | { | ||
| 10 | int Codepage { get; set; } | ||
| 11 | |||
| 12 | IEnumerable<IDelayedField> DelayedFields { get; set; } | ||
| 13 | |||
| 14 | IEnumerable<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; } | ||
| 15 | |||
| 16 | Intermediate IntermediateRepresentation { get; set; } | ||
| 17 | } | ||
| 18 | } | ||
diff --git a/src/WixToolset.Extensibility/Data/IResolvedCabinet.cs b/src/WixToolset.Extensibility/Data/IResolvedCabinet.cs new file mode 100644 index 00000000..c94ff8db --- /dev/null +++ b/src/WixToolset.Extensibility/Data/IResolvedCabinet.cs | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 4 | { | ||
| 5 | public interface IResolvedCabinet | ||
| 6 | { | ||
| 7 | CabinetBuildOption BuildOption { get; set; } | ||
| 8 | |||
| 9 | string Path { get; set; } | ||
| 10 | } | ||
| 11 | } | ||
diff --git a/src/WixToolset.Extensibility/Data/ResolveFileResult.cs b/src/WixToolset.Extensibility/Data/ResolveFileResult.cs deleted file mode 100644 index 5ac7c426..00000000 --- a/src/WixToolset.Extensibility/Data/ResolveFileResult.cs +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 4 | { | ||
| 5 | using System.Collections.Generic; | ||
| 6 | |||
| 7 | public class ResolveFileResult | ||
| 8 | { | ||
| 9 | public string Path { get; set; } | ||
| 10 | |||
| 11 | public IEnumerable<string> CheckedPaths { get; set; } | ||
| 12 | } | ||
| 13 | } \ No newline at end of file | ||
diff --git a/src/WixToolset.Extensibility/Data/ResolveResult.cs b/src/WixToolset.Extensibility/Data/ResolveResult.cs deleted file mode 100644 index cdc9cfcc..00000000 --- a/src/WixToolset.Extensibility/Data/ResolveResult.cs +++ /dev/null | |||
| @@ -1,18 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 4 | { | ||
| 5 | using System.Collections.Generic; | ||
| 6 | using WixToolset.Data; | ||
| 7 | |||
| 8 | public class ResolveResult | ||
| 9 | { | ||
| 10 | public int Codepage { get; set; } | ||
| 11 | |||
| 12 | public IEnumerable<IDelayedField> DelayedFields { get; set; } | ||
| 13 | |||
| 14 | public IEnumerable<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; } | ||
| 15 | |||
| 16 | public Intermediate IntermediateRepresentation { get; set; } | ||
| 17 | } | ||
| 18 | } \ No newline at end of file | ||
diff --git a/src/WixToolset.Extensibility/Data/ResolvedCabinet.cs b/src/WixToolset.Extensibility/Data/ResolvedCabinet.cs deleted file mode 100644 index 047b7448..00000000 --- a/src/WixToolset.Extensibility/Data/ResolvedCabinet.cs +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Data | ||
| 4 | { | ||
| 5 | /// <summary> | ||
| 6 | /// Data returned from build file manager ResolveCabinet callback. | ||
| 7 | /// </summary> | ||
| 8 | public class ResolvedCabinet | ||
| 9 | { | ||
| 10 | /// <summary> | ||
| 11 | /// Gets or sets the build option for the resolved cabinet. | ||
| 12 | /// </summary> | ||
| 13 | public CabinetBuildOption BuildOption { get; set; } | ||
| 14 | |||
| 15 | /// <summary> | ||
| 16 | /// Gets or sets the path for the resolved cabinet. | ||
| 17 | /// </summary> | ||
| 18 | public string Path { get; set; } | ||
| 19 | } | ||
| 20 | } | ||
diff --git a/src/WixToolset.Extensibility/DecompilerConstants.cs b/src/WixToolset.Extensibility/DecompilerConstants.cs index 8cd6b19c..83393da9 100644 --- a/src/WixToolset.Extensibility/DecompilerConstants.cs +++ b/src/WixToolset.Extensibility/DecompilerConstants.cs | |||
| @@ -5,7 +5,7 @@ namespace WixToolset.Extensibility | |||
| 5 | /// <summary> | 5 | /// <summary> |
| 6 | /// Constants used by decompiler. | 6 | /// Constants used by decompiler. |
| 7 | /// </summary> | 7 | /// </summary> |
| 8 | public class DecompilerConstants | 8 | public static class DecompilerConstants |
| 9 | { | 9 | { |
| 10 | public const char PrimaryKeyDelimiter = '/'; | 10 | public const char PrimaryKeyDelimiter = '/'; |
| 11 | public const string PrimaryKeyDelimiterString = "/"; | 11 | public const string PrimaryKeyDelimiterString = "/"; |
diff --git a/src/WixToolset.Extensibility/IBackend.cs b/src/WixToolset.Extensibility/IBackend.cs index df693561..12a7e834 100644 --- a/src/WixToolset.Extensibility/IBackend.cs +++ b/src/WixToolset.Extensibility/IBackend.cs | |||
| @@ -7,9 +7,9 @@ namespace WixToolset.Extensibility | |||
| 7 | 7 | ||
| 8 | public interface IBackend | 8 | public interface IBackend |
| 9 | { | 9 | { |
| 10 | BindResult Bind(IBindContext context); | 10 | IBindResult Bind(IBindContext context); |
| 11 | 11 | ||
| 12 | DecompileResult Decompile(IDecompileContext context); | 12 | IDecompileResult Decompile(IDecompileContext context); |
| 13 | 13 | ||
| 14 | Intermediate Unbind(IUnbindContext context); | 14 | Intermediate Unbind(IUnbindContext context); |
| 15 | 15 | ||
diff --git a/src/WixToolset.Extensibility/IBinderExtension.cs b/src/WixToolset.Extensibility/IBinderExtension.cs index 2656e106..dba09845 100644 --- a/src/WixToolset.Extensibility/IBinderExtension.cs +++ b/src/WixToolset.Extensibility/IBinderExtension.cs | |||
| @@ -17,6 +17,6 @@ namespace WixToolset.Extensibility | |||
| 17 | /// <summary> | 17 | /// <summary> |
| 18 | /// Called after all binding occurs. | 18 | /// Called after all binding occurs. |
| 19 | /// </summary> | 19 | /// </summary> |
| 20 | void PostBind(BindResult result); | 20 | void PostBind(IBindResult result); |
| 21 | } | 21 | } |
| 22 | } | 22 | } |
diff --git a/src/WixToolset.Extensibility/IBurnBackendExtension.cs b/src/WixToolset.Extensibility/IBurnBackendExtension.cs index bcd0d5ee..acce700a 100644 --- a/src/WixToolset.Extensibility/IBurnBackendExtension.cs +++ b/src/WixToolset.Extensibility/IBurnBackendExtension.cs | |||
| @@ -20,6 +20,6 @@ namespace WixToolset.Extensibility | |||
| 20 | /// <summary> | 20 | /// <summary> |
| 21 | /// Called after all output changes occur and right before the output is bound into its final format. | 21 | /// Called after all output changes occur and right before the output is bound into its final format. |
| 22 | /// </summary> | 22 | /// </summary> |
| 23 | void PostBackendBind(BindResult result); | 23 | void PostBackendBind(IBindResult result); |
| 24 | } | 24 | } |
| 25 | } | 25 | } |
diff --git a/src/WixToolset.Extensibility/ICompilerExtension.cs b/src/WixToolset.Extensibility/ICompilerExtension.cs index b2dd6d04..f2fd8193 100644 --- a/src/WixToolset.Extensibility/ICompilerExtension.cs +++ b/src/WixToolset.Extensibility/ICompilerExtension.cs | |||
| @@ -45,7 +45,7 @@ namespace WixToolset.Extensibility | |||
| 45 | /// <param name="parentElement">Parent element of element to process.</param> | 45 | /// <param name="parentElement">Parent element of element to process.</param> |
| 46 | /// <param name="element">Element to process.</param> | 46 | /// <param name="element">Element to process.</param> |
| 47 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> | 47 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> |
| 48 | ComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context); | 48 | IComponentKeyPath ParsePossibleKeyPathElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context); |
| 49 | 49 | ||
| 50 | /// <summary> | 50 | /// <summary> |
| 51 | /// Called at the end of the compilation of a source file. | 51 | /// Called at the end of the compilation of a source file. |
diff --git a/src/WixToolset.Extensibility/IDecompilerExtension.cs b/src/WixToolset.Extensibility/IDecompilerExtension.cs index 9ea4290b..24ef3bff 100644 --- a/src/WixToolset.Extensibility/IDecompilerExtension.cs +++ b/src/WixToolset.Extensibility/IDecompilerExtension.cs | |||
| @@ -17,6 +17,6 @@ namespace WixToolset.Extensibility | |||
| 17 | /// <summary> | 17 | /// <summary> |
| 18 | /// Called after all decompiling occurs. | 18 | /// Called after all decompiling occurs. |
| 19 | /// </summary> | 19 | /// </summary> |
| 20 | void PostDecompile(DecompileResult result); | 20 | void PostDecompile(IDecompileResult result); |
| 21 | } | 21 | } |
| 22 | } | 22 | } |
diff --git a/src/WixToolset.Extensibility/ILibrarianExtension.cs b/src/WixToolset.Extensibility/ILibrarianExtension.cs index b9f707e1..719ffa34 100644 --- a/src/WixToolset.Extensibility/ILibrarianExtension.cs +++ b/src/WixToolset.Extensibility/ILibrarianExtension.cs | |||
| @@ -9,7 +9,7 @@ namespace WixToolset.Extensibility | |||
| 9 | { | 9 | { |
| 10 | void PreCombine(ILibraryContext context); | 10 | void PreCombine(ILibraryContext context); |
| 11 | 11 | ||
| 12 | ResolveFileResult ResolveFile(SourceLineNumber sourceLineNumber, IntermediateTupleDefinition tupleDefinition, string path); | 12 | IResolveFileResult ResolveFile(SourceLineNumber sourceLineNumber, IntermediateTupleDefinition tupleDefinition, string path); |
| 13 | 13 | ||
| 14 | void PostCombine(Intermediate library); | 14 | void PostCombine(Intermediate library); |
| 15 | } | 15 | } |
diff --git a/src/WixToolset.Extensibility/IResolverExtension.cs b/src/WixToolset.Extensibility/IResolverExtension.cs index 36ada8f0..c414b19e 100644 --- a/src/WixToolset.Extensibility/IResolverExtension.cs +++ b/src/WixToolset.Extensibility/IResolverExtension.cs | |||
| @@ -15,11 +15,11 @@ namespace WixToolset.Extensibility | |||
| 15 | /// </summary> | 15 | /// </summary> |
| 16 | void PreResolve(IResolveContext context); | 16 | void PreResolve(IResolveContext context); |
| 17 | 17 | ||
| 18 | ResolveFileResult ResolveFile(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage); | 18 | IResolveFileResult ResolveFile(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage); |
| 19 | 19 | ||
| 20 | /// <summary> | 20 | /// <summary> |
| 21 | /// Called after all resolving occurs. | 21 | /// Called after all resolving occurs. |
| 22 | /// </summary> | 22 | /// </summary> |
| 23 | void PostResolve(ResolveResult result); | 23 | void PostResolve(IResolveResult result); |
| 24 | } | 24 | } |
| 25 | } | 25 | } |
diff --git a/src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs b/src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs index 5f34d3e1..f3b97845 100644 --- a/src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs +++ b/src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs | |||
| @@ -18,7 +18,7 @@ namespace WixToolset.Extensibility | |||
| 18 | /// </summary> | 18 | /// </summary> |
| 19 | void PreBackendBind(IBindContext context); | 19 | void PreBackendBind(IBindContext context); |
| 20 | 20 | ||
| 21 | ResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable<BindFileWithPath> files); | 21 | IResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable<IBindFileWithPath> files); |
| 22 | 22 | ||
| 23 | string ResolveMedia(MediaTuple mediaRow, string mediaLayoutDirectory, string layoutDirectory); | 23 | string ResolveMedia(MediaTuple mediaRow, string mediaLayoutDirectory, string layoutDirectory); |
| 24 | 24 | ||
| @@ -27,6 +27,6 @@ namespace WixToolset.Extensibility | |||
| 27 | /// <summary> | 27 | /// <summary> |
| 28 | /// Called after all output changes occur and right before the output is bound into its final format. | 28 | /// Called after all output changes occur and right before the output is bound into its final format. |
| 29 | /// </summary> | 29 | /// </summary> |
| 30 | void PostBackendBind(BindResult result, Pdb wixpdb); | 30 | void PostBackendBind(IBindResult result, Pdb wixpdb); |
| 31 | } | 31 | } |
| 32 | } | 32 | } |
diff --git a/src/WixToolset.Extensibility/IWindowsInstallerBackendDecompilerExtension.cs b/src/WixToolset.Extensibility/IWindowsInstallerBackendDecompilerExtension.cs index 05899c1f..f858610b 100644 --- a/src/WixToolset.Extensibility/IWindowsInstallerBackendDecompilerExtension.cs +++ b/src/WixToolset.Extensibility/IWindowsInstallerBackendDecompilerExtension.cs | |||
| @@ -38,6 +38,6 @@ namespace WixToolset.Extensibility | |||
| 38 | /// <summary> | 38 | /// <summary> |
| 39 | /// Called after all output changes occur and right before the output is bound into its final format. | 39 | /// Called after all output changes occur and right before the output is bound into its final format. |
| 40 | /// </summary> | 40 | /// </summary> |
| 41 | void PostBackendDecompile(DecompileResult result); | 41 | void PostBackendDecompile(IDecompileResult result); |
| 42 | } | 42 | } |
| 43 | } | 43 | } |
diff --git a/src/WixToolset.Extensibility/Services/IParseHelper.cs b/src/WixToolset.Extensibility/Services/IParseHelper.cs index 49218d4f..36caf192 100644 --- a/src/WixToolset.Extensibility/Services/IParseHelper.cs +++ b/src/WixToolset.Extensibility/Services/IParseHelper.cs | |||
| @@ -326,7 +326,7 @@ namespace WixToolset.Extensibility.Services | |||
| 326 | /// <param name="parentElement">Element containing element to be parsed.</param> | 326 | /// <param name="parentElement">Element containing element to be parsed.</param> |
| 327 | /// <param name="element">Element to be parsed.</param> | 327 | /// <param name="element">Element to be parsed.</param> |
| 328 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> | 328 | /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param> |
| 329 | ComponentKeyPath ParsePossibleKeyPathExtensionElement(IEnumerable<ICompilerExtension> extensions, Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context); | 329 | IComponentKeyPath ParsePossibleKeyPathExtensionElement(IEnumerable<ICompilerExtension> extensions, Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context); |
| 330 | 330 | ||
| 331 | /// <summary> | 331 | /// <summary> |
| 332 | /// Process all children of the element looking for extensions and erroring on the unexpected. | 332 | /// Process all children of the element looking for extensions and erroring on the unexpected. |
diff --git a/src/WixToolset.Extensibility/Services/IVariableResolution.cs b/src/WixToolset.Extensibility/Services/IVariableResolution.cs new file mode 100644 index 00000000..efed0b1f --- /dev/null +++ b/src/WixToolset.Extensibility/Services/IVariableResolution.cs | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Services | ||
| 4 | { | ||
| 5 | public interface IVariableResolution | ||
| 6 | { | ||
| 7 | bool DelayedResolve { get; set; } | ||
| 8 | |||
| 9 | bool IsDefault { get; set; } | ||
| 10 | |||
| 11 | bool UpdatedValue { get; set; } | ||
| 12 | |||
| 13 | string Value { get; set; } | ||
| 14 | } | ||
| 15 | } | ||
diff --git a/src/WixToolset.Extensibility/Services/IVariableResolver.cs b/src/WixToolset.Extensibility/Services/IVariableResolver.cs index ce11aa81..794d6478 100644 --- a/src/WixToolset.Extensibility/Services/IVariableResolver.cs +++ b/src/WixToolset.Extensibility/Services/IVariableResolver.cs | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 2 | 2 | ||
| 3 | namespace WixToolset.Extensibility.Services | 3 | namespace WixToolset.Extensibility.Services |
| 4 | { | 4 | { |
| @@ -33,7 +33,7 @@ namespace WixToolset.Extensibility.Services | |||
| 33 | /// <param name="value">The value to resolve.</param> | 33 | /// <param name="value">The value to resolve.</param> |
| 34 | /// <param name="localizationOnly">true to only resolve localization variables; false otherwise.</param> | 34 | /// <param name="localizationOnly">true to only resolve localization variables; false otherwise.</param> |
| 35 | /// <returns>The resolved result.</returns> | 35 | /// <returns>The resolved result.</returns> |
| 36 | VariableResolution ResolveVariables(SourceLineNumber sourceLineNumbers, string value, bool localizationOnly); | 36 | IVariableResolution ResolveVariables(SourceLineNumber sourceLineNumbers, string value, bool localizationOnly); |
| 37 | 37 | ||
| 38 | /// <summary> | 38 | /// <summary> |
| 39 | /// Try to find localization information for dialog and (optional) control. | 39 | /// Try to find localization information for dialog and (optional) control. |
diff --git a/src/WixToolset.Extensibility/Services/VariableResolution.cs b/src/WixToolset.Extensibility/Services/VariableResolution.cs deleted file mode 100644 index 2974e84f..00000000 --- a/src/WixToolset.Extensibility/Services/VariableResolution.cs +++ /dev/null | |||
| @@ -1,27 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.Extensibility.Services | ||
| 4 | { | ||
| 5 | public class VariableResolution | ||
| 6 | { | ||
| 7 | /// <summary> | ||
| 8 | /// Indicates whether the variable should be delay resolved. | ||
| 9 | /// </summary> | ||
| 10 | public bool DelayedResolve { get; set; } | ||
| 11 | |||
| 12 | /// <summary> | ||
| 13 | /// Indicates whether the value is the default value of the variable. | ||
| 14 | /// </summary> | ||
| 15 | public bool IsDefault { get; set; } | ||
| 16 | |||
| 17 | /// <summary> | ||
| 18 | /// Indicates whether the value changed. | ||
| 19 | /// </summary> | ||
| 20 | public bool UpdatedValue { get; set; } | ||
| 21 | |||
| 22 | /// <summary> | ||
| 23 | /// Resolved value. | ||
| 24 | /// </summary> | ||
| 25 | public string Value { get; set; } | ||
| 26 | } | ||
| 27 | } \ No newline at end of file | ||
