diff options
| author | Rob Mensching <rob@firegiant.com> | 2018-11-02 23:14:13 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@robmensching.com> | 2018-11-02 23:47:02 -0700 |
| commit | 13ea8f9e17f0bae1158b4a0f3c37e995e9816027 (patch) | |
| tree | b4ca163e7b285a543a4c86cf4bfbd592d710b529 | |
| parent | e6e1f9293ee1a2f19b84bd61c5a341ee29dca1c1 (diff) | |
| download | wix-13ea8f9e17f0bae1158b4a0f3c37e995e9816027.tar.gz wix-13ea8f9e17f0bae1158b4a0f3c37e995e9816027.tar.bz2 wix-13ea8f9e17f0bae1158b4a0f3c37e995e9816027.zip | |
Add BaseLinkerExtension
Fixes wixtoolset/issues#5895
| -rw-r--r-- | src/WixToolset.Extensibility/BaseLinkerExtension.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/WixToolset.Extensibility/BaseLinkerExtension.cs b/src/WixToolset.Extensibility/BaseLinkerExtension.cs new file mode 100644 index 00000000..91aefc2f --- /dev/null +++ b/src/WixToolset.Extensibility/BaseLinkerExtension.cs | |||
| @@ -0,0 +1,41 @@ | |||
| 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 | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.Extensibility.Data; | ||
| 7 | using WixToolset.Extensibility.Services; | ||
| 8 | |||
| 9 | /// <summary> | ||
| 10 | /// Base class for creating a linker extension. | ||
| 11 | /// </summary> | ||
| 12 | public abstract class BaseLinkerExtension : ILinkerExtension | ||
| 13 | { | ||
| 14 | /// <summary> | ||
| 15 | /// Context for use by the extension. | ||
| 16 | /// </summary> | ||
| 17 | protected ILinkContext Context { get; private set; } | ||
| 18 | |||
| 19 | /// <summary> | ||
| 20 | /// Messaging for use by the extension. | ||
| 21 | /// </summary> | ||
| 22 | protected IMessaging Messaging { get; private set; } | ||
| 23 | |||
| 24 | /// <summary> | ||
| 25 | /// Called at the beginning of the linking. | ||
| 26 | /// </summary> | ||
| 27 | public virtual void PreLink(ILinkContext context) | ||
| 28 | { | ||
| 29 | this.Context = context; | ||
| 30 | |||
| 31 | this.Messaging = context.ServiceProvider.GetService<IMessaging>(); | ||
| 32 | } | ||
| 33 | |||
| 34 | /// <summary> | ||
| 35 | /// Called at the end of the linking. | ||
| 36 | /// </summary> | ||
| 37 | public virtual void PostLink(Intermediate intermediate) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | } | ||
| 41 | } | ||
