From dbde9e7104b907bbbaea17e21247d8cafc8b3a4c Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 14 Oct 2017 16:12:07 -0700 Subject: Massive refactoring to introduce the concept of IBackend --- src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs') diff --git a/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs b/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs index 4ffe9e82..15365c2a 100644 --- a/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs +++ b/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs @@ -1,23 +1,22 @@ // 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. -namespace WixToolset.Bind +namespace WixToolset.Core.Bind { using System; using System.Collections.Generic; using System.Globalization; - using System.Linq; - using System.Text; using WixToolset.Data; + using WixToolset.Extensibility; /// /// Resolves the fields which had variables that needed to be resolved after the file information /// was loaded. /// - internal class ResolveDelayedFieldsCommand : ICommand + public class ResolveDelayedFieldsCommand : ICommand { public OutputType OutputType { private get; set;} - public IEnumerable DelayedFields { private get; set;} + public IEnumerable DelayedFields { private get; set;} public IDictionary VariableCache { private get; set; } @@ -29,9 +28,9 @@ namespace WixToolset.Bind /// The modularization guid (used in case of a merge module). public void Execute() { - List deferredFields = new List(); + var deferredFields = new List(); - foreach (DelayedField delayedField in this.DelayedFields) + foreach (IDelayedField delayedField in this.DelayedFields) { try { @@ -43,7 +42,7 @@ namespace WixToolset.Bind string value = WixVariableResolver.ResolveDelayedVariables(propertyRow.SourceLineNumbers, (string)delayedField.Field.Data, this.VariableCache); // update the variable cache with the new value - string key = String.Concat("property.", BindDatabaseCommand.Demodularize(this.OutputType, this.ModularizationGuid, (string)propertyRow[0])); + string key = String.Concat("property.", Common.Demodularize(this.OutputType, this.ModularizationGuid, (string)propertyRow[0])); this.VariableCache[key] = value; // update the field data -- cgit v1.2.3-55-g6feb