@joebigelow / wix / commits / e9fea339

Expose only abstracts and enums from WixToolset.Extensibility

Rob Mensching committed Mar 1, 2019 at 11:05 UTC e9fea339e473e6dcc32e34e995429b41cabb6c22
35 files changed +150 -207
src/WixToolset.Extensibility/BaseBinderExtension.cs
+1 -1
@@ -40,7 +40,7 @@ namespace WixToolset.Extensibility
40 /// <summary>
41 /// Called at the end of bind.
42 /// </summary>
43 - public virtual void PostBind(BindResult result)
43 + public virtual void PostBind(IBindResult result)
44 {
45 }
46 }
src/WixToolset.Extensibility/BaseCompilerExtension.cs
+6 -1
@@ -34,6 +34,11 @@ namespace WixToolset.Extensibility
34 /// <value>Schema namespace supported by this extension.</value>
35 public abstract XNamespace Namespace { get; }
36
37 + /// <summary>
38 + /// Creates a component key path.
39 + /// </summary>
40 + protected IComponentKeyPath CreateComponentKeyPath() => this.Context.ServiceProvider.GetService<IComponentKeyPath>();
41 +
42 /// <summary>
43 /// Called at the beginning of the compilation of a source file.
44 /// </summary>
@@ -75,7 +80,7 @@ namespace WixToolset.Extensibility
80 /// <param name="element">Element to process.</param>
81 /// <param name="keyPath">Explicit key path.</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)
84 {
85 this.ParseElement(intermediate, section, parentElement, element, context);
86 return null;
src/WixToolset.Extensibility/BaseResolverExtension.cs
+7 -2
@@ -21,6 +21,11 @@ namespace WixToolset.Extensibility
21 /// </summary>
22 protected IMessaging Messaging { get; private set; }
23
24 + /// <summary>
25 + /// Creates a resolve file result.
26 + /// </summary>
27 + protected IResolveFileResult CreateResolveFileResult() => this.Context.ServiceProvider.GetService<IResolveFileResult>();
28 +
29 /// <summary>
30 /// Called at the beginning of the resolving variables and files.
31 /// </summary>
@@ -31,7 +36,7 @@ namespace WixToolset.Extensibility
36 this.Messaging = context.ServiceProvider.GetService<IMessaging>();
37 }
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)
40 {
41 return null;
42 }
@@ -39,7 +44,7 @@ namespace WixToolset.Extensibility
44 /// <summary>
45 /// Called at the end of resolve.
46 /// </summary>
42 - public virtual void PostResolve(ResolveResult result)
47 + public virtual void PostResolve(IResolveResult result)
48 {
49 }
50 }
src/WixToolset.Extensibility/BaseWindowsInstallerBackendBinderExtension.cs
+7 -2
@@ -34,6 +34,11 @@ namespace WixToolset.Extensibility
34 /// </summary>
35 protected virtual TableDefinition[] TableDefinitionsForTuples { get; }
36
37 + /// <summary>
38 + /// Creates a resolved cabinet result.
39 + /// </summary>
40 + protected IResolvedCabinet CreateResolvedCabinet() => this.Context.ServiceProvider.GetService<IResolvedCabinet>();
41 +
42 public virtual void PreBackendBind(IBindContext context)
43 {
44 this.Context = context;
@@ -43,7 +48,7 @@ namespace WixToolset.Extensibility
48 this.BackendHelper = context.ServiceProvider.GetService<IWindowsInstallerBackendHelper>();
49 }
50
46 - public virtual ResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable<BindFileWithPath> files)
51 + public virtual IResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable<IBindFileWithPath> files)
52 {
53 return null;
54 }
@@ -63,7 +68,7 @@ namespace WixToolset.Extensibility
68 return false;
69 }
70
66 - public virtual void PostBackendBind(BindResult result, Pdb pdb)
71 + public virtual void PostBackendBind(IBindResult result, Pdb pdb)
72 {
73 }
74 }
src/WixToolset.Extensibility/CompilerConstants.cs
+1 -1
@@ -7,7 +7,7 @@ namespace WixToolset.Extensibility
7 /// <summary>
8 /// Constants used by compiler.
9 /// </summary>
10 - public class CompilerConstants
10 + public static class CompilerConstants
11 {
12 public const int IntegerNotSet = int.MinValue;
13 public const int IllegalInteger = int.MinValue + 1;
src/WixToolset.Extensibility/Data/BindPath.cs deleted
-59
@@ -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 -}
src/WixToolset.Extensibility/Data/BindResult.cs deleted
-13
@@ -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 -}
src/WixToolset.Extensibility/Data/ComponentKeyPathType.cs renamed
+1 -19
@@ -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
3 namespace WixToolset.Extensibility.Data
4 {
@@ -34,22 +34,4 @@ namespace WixToolset.Extensibility.Data
34 /// </summary>
35 RegistryFormatted
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 - }
37 }
src/WixToolset.Extensibility/Data/IBindFileWithPath.cs new
+11
@@ -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 +}
src/WixToolset.Extensibility/Data/IBindPath.cs renamed
+10 -8
@@ -2,19 +2,21 @@
2
3 namespace WixToolset.Extensibility.Data
4 {
5 - /// <summary>
6 - /// Bind file with its path.
7 - /// </summary>
8 - public class BindFileWithPath
5 + public interface IBindPath
6 {
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.
9 /// </summary>
13 - public string Id { get; set; }
10 + string Name { get; set; }
11
12 /// <summary>
16 - /// Gets or sets the file path.
13 + /// Path for the bind path.
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; }
21 }
22 }
src/WixToolset.Extensibility/Data/IBindResult.cs new
+13
@@ -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 +}
src/WixToolset.Extensibility/Data/IComponentKeyPath.cs new
+13
@@ -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 +}
src/WixToolset.Extensibility/Data/IDecompileResult.cs renamed
+3 -3
@@ -5,10 +5,10 @@ namespace WixToolset.Extensibility.Data
5 using System.Collections.Generic;
6 using System.Xml.Linq;
7
8 - public class DecompileResult
8 + public interface IDecompileResult
9 {
10 - public XDocument Document { get; set; }
10 + XDocument Document { get; set; }
11
12 - public IEnumerable<string> ExtractedFilePaths { get; set; }
12 + IEnumerable<string> ExtractedFilePaths { get; set; }
13 }
14 }
src/WixToolset.Extensibility/Data/ILibraryContext.cs
+2 -2
@@ -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
3 namespace WixToolset.Extensibility.Data
4 {
@@ -12,7 +12,7 @@ namespace WixToolset.Extensibility.Data
12
13 bool BindFiles { get; set; }
14
15 - IEnumerable<BindPath> BindPaths { get; set; }
15 + IEnumerable<IBindPath> BindPaths { get; set; }
16
17 IEnumerable<ILibrarianExtension> Extensions { get; set; }
18
src/WixToolset.Extensibility/Data/IResolveContext.cs
+2 -2
@@ -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
3 namespace WixToolset.Extensibility.Data
4 {
@@ -11,7 +11,7 @@ namespace WixToolset.Extensibility.Data
11 {
12 IServiceProvider ServiceProvider { get; }
13
14 - IEnumerable<BindPath> BindPaths { get; set; }
14 + IEnumerable<IBindPath> BindPaths { get; set; }
15
16 IEnumerable<IResolverExtension> Extensions { get; set; }
17
src/WixToolset.Extensibility/Data/IResolveFileResult.cs new
+13
@@ -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 +}
src/WixToolset.Extensibility/Data/IResolveResult.cs new
+18
@@ -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 +}
src/WixToolset.Extensibility/Data/IResolvedCabinet.cs new
+11
@@ -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 +}
src/WixToolset.Extensibility/Data/ResolveFileResult.cs deleted
-13
@@ -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
src/WixToolset.Extensibility/Data/ResolveResult.cs deleted
-18
@@ -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
src/WixToolset.Extensibility/Data/ResolvedCabinet.cs deleted
-20
@@ -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 -}
src/WixToolset.Extensibility/DecompilerConstants.cs
+1 -1
@@ -5,7 +5,7 @@ namespace WixToolset.Extensibility
5 /// <summary>
6 /// Constants used by decompiler.
7 /// </summary>
8 - public class DecompilerConstants
8 + public static class DecompilerConstants
9 {
10 public const char PrimaryKeyDelimiter = '/';
11 public const string PrimaryKeyDelimiterString = "/";
src/WixToolset.Extensibility/IBackend.cs
+2 -2
@@ -7,9 +7,9 @@ namespace WixToolset.Extensibility
7
8 public interface IBackend
9 {
10 - BindResult Bind(IBindContext context);
10 + IBindResult Bind(IBindContext context);
11
12 - DecompileResult Decompile(IDecompileContext context);
12 + IDecompileResult Decompile(IDecompileContext context);
13
14 Intermediate Unbind(IUnbindContext context);
15
src/WixToolset.Extensibility/IBinderExtension.cs
+1 -1
@@ -17,6 +17,6 @@ namespace WixToolset.Extensibility
17 /// <summary>
18 /// Called after all binding occurs.
19 /// </summary>
20 - void PostBind(BindResult result);
20 + void PostBind(IBindResult result);
21 }
22 }
src/WixToolset.Extensibility/IBurnBackendExtension.cs
+1 -1
@@ -20,6 +20,6 @@ namespace WixToolset.Extensibility
20 /// <summary>
21 /// Called after all output changes occur and right before the output is bound into its final format.
22 /// </summary>
23 - void PostBackendBind(BindResult result);
23 + void PostBackendBind(IBindResult result);
24 }
25 }
src/WixToolset.Extensibility/ICompilerExtension.cs
+1 -1
@@ -45,7 +45,7 @@ namespace WixToolset.Extensibility
45 /// <param name="parentElement">Parent element of 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>
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
50 /// <summary>
51 /// Called at the end of the compilation of a source file.
src/WixToolset.Extensibility/IDecompilerExtension.cs
+1 -1
@@ -17,6 +17,6 @@ namespace WixToolset.Extensibility
17 /// <summary>
18 /// Called after all decompiling occurs.
19 /// </summary>
20 - void PostDecompile(DecompileResult result);
20 + void PostDecompile(IDecompileResult result);
21 }
22 }
src/WixToolset.Extensibility/ILibrarianExtension.cs
+1 -1
@@ -9,7 +9,7 @@ namespace WixToolset.Extensibility
9 {
10 void PreCombine(ILibraryContext context);
11
12 - ResolveFileResult ResolveFile(SourceLineNumber sourceLineNumber, IntermediateTupleDefinition tupleDefinition, string path);
12 + IResolveFileResult ResolveFile(SourceLineNumber sourceLineNumber, IntermediateTupleDefinition tupleDefinition, string path);
13
14 void PostCombine(Intermediate library);
15 }
src/WixToolset.Extensibility/IResolverExtension.cs
+2 -2
@@ -15,11 +15,11 @@ namespace WixToolset.Extensibility
15 /// </summary>
16 void PreResolve(IResolveContext context);
17
18 - ResolveFileResult ResolveFile(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage);
18 + IResolveFileResult ResolveFile(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage);
19
20 /// <summary>
21 /// Called after all resolving occurs.
22 /// </summary>
23 - void PostResolve(ResolveResult result);
23 + void PostResolve(IResolveResult result);
24 }
25 }
src/WixToolset.Extensibility/IWindowsInstallerBackendBinderExtension.cs
+2 -2
@@ -18,7 +18,7 @@ namespace WixToolset.Extensibility
18 /// </summary>
19 void PreBackendBind(IBindContext context);
20
21 - ResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable<BindFileWithPath> files);
21 + IResolvedCabinet ResolveCabinet(string cabinetPath, IEnumerable<IBindFileWithPath> files);
22
23 string ResolveMedia(MediaTuple mediaRow, string mediaLayoutDirectory, string layoutDirectory);
24
@@ -27,6 +27,6 @@ namespace WixToolset.Extensibility
27 /// <summary>
28 /// Called after all output changes occur and right before the output is bound into its final format.
29 /// </summary>
30 - void PostBackendBind(BindResult result, Pdb wixpdb);
30 + void PostBackendBind(IBindResult result, Pdb wixpdb);
31 }
32 }
src/WixToolset.Extensibility/IWindowsInstallerBackendDecompilerExtension.cs
+1 -1
@@ -38,6 +38,6 @@ namespace WixToolset.Extensibility
38 /// <summary>
39 /// Called after all output changes occur and right before the output is bound into its final format.
40 /// </summary>
41 - void PostBackendDecompile(DecompileResult result);
41 + void PostBackendDecompile(IDecompileResult result);
42 }
43 }
src/WixToolset.Extensibility/Services/IParseHelper.cs
+1 -1
@@ -326,7 +326,7 @@ namespace WixToolset.Extensibility.Services
326 /// <param name="parentElement">Element containing 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>
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
331 /// <summary>
332 /// Process all children of the element looking for extensions and erroring on the unexpected.
src/WixToolset.Extensibility/Services/IVariableResolution.cs new
+15
@@ -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 +}
src/WixToolset.Extensibility/Services/IVariableResolver.cs
+2 -2
@@ -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
3 namespace WixToolset.Extensibility.Services
4 {
@@ -33,7 +33,7 @@ namespace WixToolset.Extensibility.Services
33 /// <param name="value">The value to resolve.</param>
34 /// <param name="localizationOnly">true to only resolve localization variables; false otherwise.</param>
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
38 /// <summary>
39 /// Try to find localization information for dialog and (optional) control.
src/WixToolset.Extensibility/Services/VariableResolution.cs deleted
-27
@@ -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