diff options
| author | Rob Mensching <rob@firegiant.com> | 2017-08-20 14:22:07 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2017-08-20 14:25:49 -0700 |
| commit | 3e1c5e3fa80a2498f7d6aac5c0f8ca9e3bd7c66c (patch) | |
| tree | bbe907a4c5ebf7aa5e3f02141f6e3abd31cb7b5c /src/WixToolset.Extensibility/DecompilerExtension.cs | |
| parent | 6dee3b45cb679786bd49a5db8fde9006d283b3e2 (diff) | |
| download | wix-3e1c5e3fa80a2498f7d6aac5c0f8ca9e3bd7c66c.tar.gz wix-3e1c5e3fa80a2498f7d6aac5c0f8ca9e3bd7c66c.tar.bz2 wix-3e1c5e3fa80a2498f7d6aac5c0f8ca9e3bd7c66c.zip | |
Move to .NET Core 2.0
Diffstat (limited to 'src/WixToolset.Extensibility/DecompilerExtension.cs')
| -rw-r--r-- | src/WixToolset.Extensibility/DecompilerExtension.cs | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/WixToolset.Extensibility/DecompilerExtension.cs b/src/WixToolset.Extensibility/DecompilerExtension.cs new file mode 100644 index 00000000..00277639 --- /dev/null +++ b/src/WixToolset.Extensibility/DecompilerExtension.cs | |||
| @@ -0,0 +1,59 @@ | |||
| 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 | |||
| 7 | /// <summary> | ||
| 8 | /// Base class for creating a decompiler extension. | ||
| 9 | /// </summary> | ||
| 10 | public abstract class DecompilerExtension : IDecompilerExtension | ||
| 11 | { | ||
| 12 | /// <summary> | ||
| 13 | /// Gets or sets the decompiler core for the extension. | ||
| 14 | /// </summary> | ||
| 15 | /// <value>The decompiler core for the extension.</value> | ||
| 16 | public IDecompilerCore Core { get; set; } | ||
| 17 | |||
| 18 | /// <summary> | ||
| 19 | /// Gets the table definitions this extension decompiles. | ||
| 20 | /// </summary> | ||
| 21 | /// <value>Table definitions this extension decompiles.</value> | ||
| 22 | public virtual TableDefinitionCollection TableDefinitions { get; protected set; } | ||
| 23 | |||
| 24 | /// <summary> | ||
| 25 | /// Gets the library that this decompiler wants removed from the decomipiled output. | ||
| 26 | /// </summary> | ||
| 27 | /// <param name="tableDefinitions">The table definitions to use while loading the library.</param> | ||
| 28 | /// <returns>The library for this extension or null if there is no library to be removed.</returns> | ||
| 29 | public virtual Library GetLibraryToRemove(TableDefinitionCollection tableDefinitions) | ||
| 30 | { | ||
| 31 | return null; | ||
| 32 | } | ||
| 33 | |||
| 34 | /// <summary> | ||
| 35 | /// Called at the beginning of the decompilation of a database. | ||
| 36 | /// </summary> | ||
| 37 | /// <param name="tables">The collection of all tables.</param> | ||
| 38 | public virtual void Initialize(TableIndexedCollection tables) | ||
| 39 | { | ||
| 40 | } | ||
| 41 | |||
| 42 | /// <summary> | ||
| 43 | /// Decompiles an extension table. | ||
| 44 | /// </summary> | ||
| 45 | /// <param name="table">The table to decompile.</param> | ||
| 46 | public virtual void DecompileTable(Table table) | ||
| 47 | { | ||
| 48 | this.Core.UnexpectedTable(table); | ||
| 49 | } | ||
| 50 | |||
| 51 | /// <summary> | ||
| 52 | /// Finalize decompilation. | ||
| 53 | /// </summary> | ||
| 54 | /// <param name="tables">The collection of all tables.</param> | ||
| 55 | public virtual void Finish(TableIndexedCollection tables) | ||
| 56 | { | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
