| 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 Example.Extension |
| 4 | { |
| 5 | using System.Linq; |
| 6 | using WixToolset.Extensibility; |
| 7 | using WixToolset.Extensibility.Data; |
| 8 | |
| 9 | internal class ExampleOptimizerExtension : BaseOptimizerExtension |
| 10 | { |
| 11 | public override void PostOptimize(IOptimizeContext context) |
| 12 | { |
| 13 | foreach (var intermediate in context.Intermediates) |
| 14 | { |
| 15 | foreach (var symbol in intermediate.Sections.SelectMany(s=>s.Symbols).OfType<ExampleSymbol>()) |
| 16 | { |
| 17 | symbol.Value = $"{symbol.Value} <optimized>"; |
| 18 | } |
| 19 | } |
| 20 | } |
| 21 | } |
| 22 | } |