diff options
| author | Rob Mensching <rob@firegiant.com> | 2021-05-11 07:36:37 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2021-05-11 07:36:37 -0700 |
| commit | 3f583916719eeef598d10a5d4e14ef14f008243b (patch) | |
| tree | 3d528e0ddb5c0550954217c97059d2f19cd6152a /src/dtf/WixToolsetTests.Dtf.Compression/OptionStreamContext.cs | |
| parent | 2e5ab696b8b4666d551b2a0532b95fb7fe6dbe03 (diff) | |
| download | wix-3f583916719eeef598d10a5d4e14ef14f008243b.tar.gz wix-3f583916719eeef598d10a5d4e14ef14f008243b.tar.bz2 wix-3f583916719eeef598d10a5d4e14ef14f008243b.zip | |
Merge Dtf
Diffstat (limited to 'src/dtf/WixToolsetTests.Dtf.Compression/OptionStreamContext.cs')
| -rw-r--r-- | src/dtf/WixToolsetTests.Dtf.Compression/OptionStreamContext.cs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/dtf/WixToolsetTests.Dtf.Compression/OptionStreamContext.cs b/src/dtf/WixToolsetTests.Dtf.Compression/OptionStreamContext.cs new file mode 100644 index 00000000..98354d97 --- /dev/null +++ b/src/dtf/WixToolsetTests.Dtf.Compression/OptionStreamContext.cs | |||
| @@ -0,0 +1,42 @@ | |||
| 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 | using System; | ||
| 4 | using System.Collections.Generic; | ||
| 5 | using WixToolset.Dtf.Compression; | ||
| 6 | |||
| 7 | namespace WixToolset.Dtf.Test | ||
| 8 | { | ||
| 9 | public class OptionStreamContext : ArchiveFileStreamContext | ||
| 10 | { | ||
| 11 | private PackOptionHandler packOptionHandler; | ||
| 12 | |||
| 13 | public OptionStreamContext(IList<string> archiveFiles, string directory, IDictionary<string, string> files) | ||
| 14 | : base(archiveFiles, directory, files) | ||
| 15 | { | ||
| 16 | } | ||
| 17 | |||
| 18 | public delegate object PackOptionHandler(string optionName, object[] parameters); | ||
| 19 | |||
| 20 | public PackOptionHandler OptionHandler | ||
| 21 | { | ||
| 22 | get | ||
| 23 | { | ||
| 24 | return this.packOptionHandler; | ||
| 25 | } | ||
| 26 | set | ||
| 27 | { | ||
| 28 | this.packOptionHandler = value; | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
| 32 | public override object GetOption(string optionName, object[] parameters) | ||
| 33 | { | ||
| 34 | if (this.OptionHandler == null) | ||
| 35 | { | ||
| 36 | return null; | ||
| 37 | } | ||
| 38 | |||
| 39 | return this.OptionHandler(optionName, parameters); | ||
| 40 | } | ||
| 41 | } | ||
| 42 | } | ||
