diff options
Diffstat (limited to 'src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs')
-rw-r--r-- | src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs | 35 |
1 files changed, 29 insertions, 6 deletions
diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs b/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs index 1a678b0d..fa4f50ba 100644 --- a/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs +++ b/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs | |||
@@ -22,11 +22,14 @@ namespace WixToolset.Core.ExtensibilityServices | |||
22 | { | 22 | { |
23 | this.ServiceProvider = serviceProvider; | 23 | this.ServiceProvider = serviceProvider; |
24 | 24 | ||
25 | this.BundleValidator = serviceProvider.GetService<IBundleValidator>(); | ||
25 | this.Messaging = serviceProvider.GetService<IMessaging>(); | 26 | this.Messaging = serviceProvider.GetService<IMessaging>(); |
26 | } | 27 | } |
27 | 28 | ||
28 | private IServiceProvider ServiceProvider { get; } | 29 | private IServiceProvider ServiceProvider { get; } |
29 | 30 | ||
31 | private IBundleValidator BundleValidator { get; } | ||
32 | |||
30 | private IMessaging Messaging { get; } | 33 | private IMessaging Messaging { get; } |
31 | 34 | ||
32 | private ISymbolDefinitionCreator Creator { get; set; } | 35 | private ISymbolDefinitionCreator Creator { get; set; } |
@@ -239,11 +242,14 @@ namespace WixToolset.Core.ExtensibilityServices | |||
239 | 242 | ||
240 | public void CreateWixSearchSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bundleExtensionId) | 243 | public void CreateWixSearchSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bundleExtensionId) |
241 | { | 244 | { |
242 | // TODO: verify variable is not a standard bundle variable | ||
243 | if (variable == null) | 245 | if (variable == null) |
244 | { | 246 | { |
245 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, elementName, "Variable")); | 247 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, elementName, "Variable")); |
246 | } | 248 | } |
249 | else | ||
250 | { | ||
251 | this.BundleValidator.ValidateBundleVariableName(sourceLineNumbers, elementName, "Variable", variable); | ||
252 | } | ||
247 | 253 | ||
248 | section.AddSymbol(new WixSearchSymbol(sourceLineNumbers, id) | 254 | section.AddSymbol(new WixSearchSymbol(sourceLineNumbers, id) |
249 | { | 255 | { |
@@ -623,11 +629,6 @@ namespace WixToolset.Core.ExtensibilityServices | |||
623 | } | 629 | } |
624 | } | 630 | } |
625 | 631 | ||
626 | public string GetCanonicalRelativePath(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string relativePath) | ||
627 | { | ||
628 | return Common.GetCanonicalRelativePath(sourceLineNumbers, elementName, attributeName, relativePath, this.Messaging); | ||
629 | } | ||
630 | |||
631 | public SourceLineNumber GetSourceLineNumbers(XElement element) | 632 | public SourceLineNumber GetSourceLineNumbers(XElement element) |
632 | { | 633 | { |
633 | return Preprocessor.GetSourceLineNumbers(element); | 634 | return Preprocessor.GetSourceLineNumbers(element); |
@@ -858,5 +859,27 @@ namespace WixToolset.Core.ExtensibilityServices | |||
858 | 859 | ||
859 | return extension != null; | 860 | return extension != null; |
860 | } | 861 | } |
862 | |||
863 | #region IBundleValidator | ||
864 | public string GetCanonicalRelativePath(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string relativePath) | ||
865 | { | ||
866 | return this.BundleValidator.GetCanonicalRelativePath(sourceLineNumbers, elementName, attributeName, relativePath); | ||
867 | } | ||
868 | |||
869 | public bool ValidateBundleMsiPropertyName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string propertyName) | ||
870 | { | ||
871 | return this.BundleValidator.ValidateBundleMsiPropertyName(sourceLineNumbers, elementName, attributeName, propertyName); | ||
872 | } | ||
873 | |||
874 | public bool ValidateBundleVariableName(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string variableName) | ||
875 | { | ||
876 | return this.BundleValidator.ValidateBundleVariableName(sourceLineNumbers, elementName, attributeName, variableName); | ||
877 | } | ||
878 | |||
879 | public bool ValidateBundleCondition(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string condition, BundleConditionPhase phase) | ||
880 | { | ||
881 | return this.BundleValidator.ValidateBundleCondition(sourceLineNumbers, elementName, attributeName, condition, phase); | ||
882 | } | ||
883 | #endregion | ||
861 | } | 884 | } |
862 | } | 885 | } |