aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2017-12-22 15:47:26 -0800
committerRob Mensching <rob@firegiant.com>2017-12-22 15:47:26 -0800
commit027d1ac927aa6b0ee0c934b1f6b540d2a1667df2 (patch)
tree51eb07ffc2044ea55e03e8c384ba5ec0849d958b
parent5287c9ce70877b6b1e96d3253a395101fe30de8f (diff)
downloadwix-027d1ac927aa6b0ee0c934b1f6b540d2a1667df2.tar.gz
wix-027d1ac927aa6b0ee0c934b1f6b540d2a1667df2.tar.bz2
wix-027d1ac927aa6b0ee0c934b1f6b540d2a1667df2.zip
Bring back binder extensions and missing layout base extension
-rw-r--r--src/WixToolset.Extensibility/BaseBinderExtension.cs32
-rw-r--r--src/WixToolset.Extensibility/BaseLayoutExtension.cs30
-rw-r--r--src/WixToolset.Extensibility/IBindContext.cs12
-rw-r--r--src/WixToolset.Extensibility/IBindExtension.cs22
-rw-r--r--src/WixToolset.Extensibility/ILayoutExtension.cs6
-rw-r--r--src/WixToolset.Extensibility/ResolveResult.cs4
6 files changed, 92 insertions, 14 deletions
diff --git a/src/WixToolset.Extensibility/BaseBinderExtension.cs b/src/WixToolset.Extensibility/BaseBinderExtension.cs
new file mode 100644
index 00000000..e5e38793
--- /dev/null
+++ b/src/WixToolset.Extensibility/BaseBinderExtension.cs
@@ -0,0 +1,32 @@
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
3namespace WixToolset.Extensibility
4{
5 using WixToolset.Data.Bind;
6
7 /// <summary>
8 /// Base class for creating a resolver extension.
9 /// </summary>
10 public abstract class BaseBinderExtension : IBinderExtension
11 {
12 /// <summary>
13 /// Context for use by the extension.
14 /// </summary>
15 protected IBindContext Context { get; private set; }
16
17 /// <summary>
18 /// Called at the beginning of bind.
19 /// </summary>
20 public virtual void PreBind(IBindContext context)
21 {
22 this.Context = context;
23 }
24
25 /// <summary>
26 /// Called at the end of bind.
27 /// </summary>
28 public virtual void PostBind(BindResult result)
29 {
30 }
31 }
32}
diff --git a/src/WixToolset.Extensibility/BaseLayoutExtension.cs b/src/WixToolset.Extensibility/BaseLayoutExtension.cs
new file mode 100644
index 00000000..6dfe7f2c
--- /dev/null
+++ b/src/WixToolset.Extensibility/BaseLayoutExtension.cs
@@ -0,0 +1,30 @@
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
3namespace WixToolset.Extensibility
4{
5 /// <summary>
6 /// Base class for creating a resolver extension.
7 /// </summary>
8 public abstract class BaseLayoutExtension : ILayoutExtension
9 {
10 /// <summary>
11 /// Context for use by the extension.
12 /// </summary>
13 protected ILayoutContext Context { get; private set; }
14
15 /// <summary>
16 /// Called at the beginning of layout.
17 /// </summary>
18 public virtual void PreLayout(ILayoutContext context)
19 {
20 this.Context = context;
21 }
22
23 /// <summary>
24 /// Called at the end of ayout.
25 /// </summary>
26 public virtual void PostLayout()
27 {
28 }
29 }
30}
diff --git a/src/WixToolset.Extensibility/IBindContext.cs b/src/WixToolset.Extensibility/IBindContext.cs
index 1cb1c558..59509ecf 100644
--- a/src/WixToolset.Extensibility/IBindContext.cs
+++ b/src/WixToolset.Extensibility/IBindContext.cs
@@ -19,12 +19,14 @@ namespace WixToolset.Extensibility
19 19
20 int Codepage { get; set; } 20 int Codepage { get; set; }
21 21
22 CompressionLevel DefaultCompressionLevel { get; set; } 22 CompressionLevel? DefaultCompressionLevel { get; set; }
23 23
24 IEnumerable<IDelayedField> DelayedFields { get; set; } 24 IEnumerable<IDelayedField> DelayedFields { get; set; }
25 25
26 IEnumerable<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; } 26 IEnumerable<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; }
27 27
28 IEnumerable<IBinderExtension> Extensions { get; set; }
29
28 IEnumerable<IFileSystemExtension> FileSystemExtensions { get; set; } 30 IEnumerable<IFileSystemExtension> FileSystemExtensions { get; set; }
29 31
30 IEnumerable<string> Ices { get; set; } 32 IEnumerable<string> Ices { get; set; }
@@ -40,13 +42,5 @@ namespace WixToolset.Extensibility
40 IEnumerable<string> SuppressIces { get; set; } 42 IEnumerable<string> SuppressIces { get; set; }
41 43
42 bool SuppressValidation { get; set; } 44 bool SuppressValidation { get; set; }
43
44 string ContentsFile { get; set; }
45
46 string OutputsFile { get; set; }
47
48 string BuiltOutputsFile { get; set; }
49
50 string WixprojectFile { get; set; }
51 } 45 }
52} 46}
diff --git a/src/WixToolset.Extensibility/IBindExtension.cs b/src/WixToolset.Extensibility/IBindExtension.cs
new file mode 100644
index 00000000..c9830a35
--- /dev/null
+++ b/src/WixToolset.Extensibility/IBindExtension.cs
@@ -0,0 +1,22 @@
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
3namespace WixToolset.Extensibility
4{
5 using WixToolset.Data.Bind;
6
7 /// <summary>
8 /// Interface all binder extensions implement.
9 /// </summary>
10 public interface IBinderExtension
11 {
12 /// <summary>
13 /// Called before binding occurs.
14 /// </summary>
15 void PreBind(IBindContext context);
16
17 /// <summary>
18 /// Called after all binding occurs.
19 /// </summary>
20 void PostBind(BindResult result);
21 }
22}
diff --git a/src/WixToolset.Extensibility/ILayoutExtension.cs b/src/WixToolset.Extensibility/ILayoutExtension.cs
index b1de5bd2..525c5053 100644
--- a/src/WixToolset.Extensibility/ILayoutExtension.cs
+++ b/src/WixToolset.Extensibility/ILayoutExtension.cs
@@ -3,17 +3,17 @@
3namespace WixToolset.Extensibility 3namespace WixToolset.Extensibility
4{ 4{
5 /// <summary> 5 /// <summary>
6 /// Interface all resolver extensions implement. 6 /// Interface all layout extensions implement.
7 /// </summary> 7 /// </summary>
8 public interface ILayoutExtension 8 public interface ILayoutExtension
9 { 9 {
10 /// <summary> 10 /// <summary>
11 /// Called before resolving occurs. 11 /// Called before layout occurs.
12 /// </summary> 12 /// </summary>
13 void PreLayout(ILayoutContext context); 13 void PreLayout(ILayoutContext context);
14 14
15 /// <summary> 15 /// <summary>
16 /// Called after all resolving occurs. 16 /// Called after all layout occurs.
17 /// </summary> 17 /// </summary>
18 void PostLayout(); 18 void PostLayout();
19 } 19 }
diff --git a/src/WixToolset.Extensibility/ResolveResult.cs b/src/WixToolset.Extensibility/ResolveResult.cs
index 14073ab0..53f12fe9 100644
--- a/src/WixToolset.Extensibility/ResolveResult.cs
+++ b/src/WixToolset.Extensibility/ResolveResult.cs
@@ -9,10 +9,10 @@ namespace WixToolset.Extensibility
9 { 9 {
10 public int Codepage { get; set; } 10 public int Codepage { get; set; }
11 11
12 public IEnumerable<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; }
13
14 public IEnumerable<IDelayedField> DelayedFields { get; set; } 12 public IEnumerable<IDelayedField> DelayedFields { get; set; }
15 13
14 public IEnumerable<IExpectedExtractFile> ExpectedEmbeddedFiles { get; set; }
15
16 public Intermediate IntermediateRepresentation { get; set; } 16 public Intermediate IntermediateRepresentation { get; set; }
17 } 17 }
18} \ No newline at end of file 18} \ No newline at end of file