@joebigelow / wix-1 / commits / aec6e9a4

Integrate into latest v4. Still needs TupleDefinitions and Messages.

Integrate into latest v4. Still needs TupleDefinitions and Messages.

Sean Hall committed Dec 16, 2018 at 17:21 UTC aec6e9a4b21accd2e8aeb2cb36ad1cdc8f308f79
35 files changed +1494 -933
Iis.wixext.sln new
+57
@@ -0,0 +1,57 @@
1 +
2 +Microsoft Visual Studio Solution File, Format Version 12.00
3 +# Visual Studio 15
4 +VisualStudioVersion = 15.0.28010.2016
5 +MinimumVisualStudioVersion = 10.0.40219.1
6 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iisca", "src\ca\iisca.vcxproj", "{CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}"
7 +EndProject
8 +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "iis", "src\wixlib\iis.wixproj", "{92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}"
9 +EndProject
10 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Iis.wixext", "src\wixext\WixToolset.Iis.wixext.csproj", "{612029FB-B5D4-4D7E-B794-A0E202BFE493}"
11 +EndProject
12 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Iis", "src\test\WixToolsetTest.Iis\WixToolsetTest.Iis.csproj", "{E62712D7-31A1-49E4-B1F4-0084FAD14193}"
13 +EndProject
14 +Global
15 + GlobalSection(SolutionConfigurationPlatforms) = preSolution
16 + Debug|Any CPU = Debug|Any CPU
17 + Debug|x86 = Debug|x86
18 + Release|Any CPU = Release|Any CPU
19 + Release|x86 = Release|x86
20 + EndGlobalSection
21 + GlobalSection(ProjectConfigurationPlatforms) = postSolution
22 + {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Debug|Any CPU.ActiveCfg = Debug|Win32
23 + {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Debug|x86.ActiveCfg = Debug|Win32
24 + {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Debug|x86.Build.0 = Debug|Win32
25 + {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Release|Any CPU.ActiveCfg = Release|Win32
26 + {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Release|x86.ActiveCfg = Release|Win32
27 + {CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}.Release|x86.Build.0 = Release|Win32
28 + {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Debug|Any CPU.ActiveCfg = Debug|x86
29 + {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Debug|x86.ActiveCfg = Debug|x86
30 + {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Debug|x86.Build.0 = Debug|x86
31 + {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Release|Any CPU.ActiveCfg = Release|x86
32 + {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Release|x86.ActiveCfg = Release|x86
33 + {92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}.Release|x86.Build.0 = Release|x86
34 + {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
35 + {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Debug|Any CPU.Build.0 = Debug|Any CPU
36 + {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Debug|x86.ActiveCfg = Debug|Any CPU
37 + {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Debug|x86.Build.0 = Debug|Any CPU
38 + {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Release|Any CPU.ActiveCfg = Release|Any CPU
39 + {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Release|Any CPU.Build.0 = Release|Any CPU
40 + {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Release|x86.ActiveCfg = Release|Any CPU
41 + {612029FB-B5D4-4D7E-B794-A0E202BFE493}.Release|x86.Build.0 = Release|Any CPU
42 + {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43 + {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Debug|Any CPU.Build.0 = Debug|Any CPU
44 + {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Debug|x86.ActiveCfg = Debug|Any CPU
45 + {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Debug|x86.Build.0 = Debug|Any CPU
46 + {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Release|Any CPU.ActiveCfg = Release|Any CPU
47 + {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Release|Any CPU.Build.0 = Release|Any CPU
48 + {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Release|x86.ActiveCfg = Release|Any CPU
49 + {E62712D7-31A1-49E4-B1F4-0084FAD14193}.Release|x86.Build.0 = Release|Any CPU
50 + EndGlobalSection
51 + GlobalSection(SolutionProperties) = preSolution
52 + HideSolutionNode = FALSE
53 + EndGlobalSection
54 + GlobalSection(ExtensibilityGlobals) = postSolution
55 + SolutionGuid = {89256463-14A3-4968-8688-F75EC230B021}
56 + EndGlobalSection
57 +EndGlobal
appveyor.cmd new
+13
@@ -0,0 +1,13 @@
1 +@setlocal
2 +@pushd %~dp0
3 +
4 +nuget restore
5 +
6 +msbuild -p:Configuration=Release -t:Restore
7 +
8 +rem msbuild -p:Configuration=Release src\test\WixToolsetTest.Iis\WixToolsetTest.Iis.csproj
9 +
10 +msbuild -p:Configuration=Release -t:Pack src\wixext\WixToolset.Iis.wixext.csproj
11 +
12 +@popd
13 +@endlocal
\ No newline at end of file
appveyor.yml new
+29
@@ -0,0 +1,29 @@
1 +image: Visual Studio 2017
2 +
3 +version: 0.0.0.{build}
4 +configuration: Release
5 +
6 +environment:
7 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
8 + DOTNET_CLI_TELEMETRY_OPTOUT: 1
9 + NUGET_XMLDOC_MODE: skip
10 +
11 +build_script:
12 + - appveyor.cmd
13 +
14 +pull_requests:
15 + do_not_increment_build_number: true
16 +
17 +nuget:
18 + disable_publish_on_pr: true
19 +
20 +skip_tags: true
21 +
22 +artifacts:
23 +- path: build\Release\**\*.nupkg
24 + name: nuget
25 +
26 +notifications:
27 +- provider: Slack
28 + incoming_webhook:
29 + secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA=
nuget.config new
+16
@@ -0,0 +1,16 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<configuration>
3 + <packageSources>
4 + <clear />
5 + <add key="wixtoolset-data" value="https://ci.appveyor.com/nuget/wixtoolset-data" />
6 + <add key="wixtoolset-extensibility" value="https://ci.appveyor.com/nuget/wixtoolset-extensibility" />
7 + <add key="wixtoolset-core" value="https://ci.appveyor.com/nuget/wixtoolset-core" />
8 + <add key="wixtoolset-core-native" value="https://ci.appveyor.com/nuget/wixtoolset-core-native" />
9 + <add key="wixtoolset-dtf" value="https://ci.appveyor.com/nuget/wixtoolset-dtf" />
10 + <add key="wixtoolset-dutil" value="https://ci.appveyor.com/nuget/wixtoolset-dutil" />
11 + <add key="wixtoolset-wcautil" value="https://ci.appveyor.com/nuget/wixtoolset-wcautil" />
12 + <add key="wixtoolset-tools" value="https://ci.appveyor.com/nuget/wixtoolset-tools" />
13 + <add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
14 + <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
15 + </packageSources>
16 +</configuration>
\ No newline at end of file
src/Cpp.Build.props new
+100
@@ -0,0 +1,100 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project>
5 + <PropertyGroup>
6 + <Platform Condition=" '$(Platform)' == '' OR '$(Platform)' == 'AnyCPU' ">Win32</Platform>
7 + <IntDir>$(BaseIntermediateOutputPath)$(Configuration)\$(Platform)\</IntDir>
8 + <OutDir>$(OutputPath)$(Platform)\</OutDir>
9 + </PropertyGroup>
10 +
11 + <ItemDefinitionGroup>
12 + <ClCompile>
13 + <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
14 + <WarningLevel>Level4</WarningLevel>
15 + <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
16 + <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
17 + <PrecompiledHeader>Use</PrecompiledHeader>
18 + <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
19 + <CallingConvention>StdCall</CallingConvention>
20 + <TreatWarningAsError>true</TreatWarningAsError>
21 + <ExceptionHandling>false</ExceptionHandling>
22 + <AdditionalOptions>-YlprecompDefine</AdditionalOptions>
23 + <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
24 + <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) &gt; 4 ">true</MultiProcessorCompilation>
25 + </ClCompile>
26 + <ResourceCompile>
27 + <PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
28 + <AdditionalIncludeDirectories>$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
29 + </ResourceCompile>
30 + <Lib>
31 + <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
32 + </Lib>
33 + <Link>
34 + <SubSystem>$(ProjectSubSystem)</SubSystem>
35 + <ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile>
36 + <NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint>
37 + <GenerateDebugInformation>true</GenerateDebugInformation>
38 + <AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
39 + <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
40 + <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions>
41 + </Link>
42 + </ItemDefinitionGroup>
43 +
44 + <ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'">
45 + <ClCompile>
46 + <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
47 + </ClCompile>
48 + </ItemDefinitionGroup>
49 + <ItemDefinitionGroup Condition=" '$(Platform)'=='arm' ">
50 + <ClCompile>
51 + <CallingConvention>CDecl</CallingConvention>
52 + </ClCompile>
53 + </ItemDefinitionGroup>
54 + <ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' ">
55 + <ClCompile>
56 + <DebugInformationFormat>OldStyle</DebugInformationFormat>
57 + <OmitDefaultLibName>true</OmitDefaultLibName>
58 + <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
59 + </ClCompile>
60 + </ItemDefinitionGroup>
61 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' ">
62 + <ClCompile>
63 + <Optimization>Disabled</Optimization>
64 + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
65 + <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
66 + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
67 + </ClCompile>
68 + </ItemDefinitionGroup>
69 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
70 + <ClCompile>
71 + <BasicRuntimeChecks></BasicRuntimeChecks>
72 + <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
73 + </ClCompile>
74 + </ItemDefinitionGroup>
75 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
76 + <ClCompile>
77 + <Optimization>MinSpace</Optimization>
78 + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
79 + <FunctionLevelLinking>true</FunctionLevelLinking>
80 + <IntrinsicFunctions>true</IntrinsicFunctions>
81 + <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
82 + </ClCompile>
83 + <Link>
84 + <EnableCOMDATFolding>true</EnableCOMDATFolding>
85 + <OptimizeReferences>true</OptimizeReferences>
86 + </Link>
87 + </ItemDefinitionGroup>
88 + <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
89 + <ClCompile>
90 + <BasicRuntimeChecks></BasicRuntimeChecks>
91 + <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
92 + </ClCompile>
93 + </ItemDefinitionGroup>
94 + <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
95 + <Link>
96 + <KeyFile>$(LinkKeyFile)</KeyFile>
97 + <DelaySign>$(LinkDelaySign)</DelaySign>
98 + </Link>
99 + </ItemDefinitionGroup>
100 +</Project>
src/Directory.Build.props new
+29
@@ -0,0 +1,29 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +<!--
4 + Do NOT modify this file. Update the canonical version in Home\src\Directory.Build.props
5 + then update all of the repos.
6 +-->
7 +<Project>
8 + <PropertyGroup>
9 + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
10 + <EnableSourceLink Condition=" '$(NCrunch)' == '1' ">false</EnableSourceLink>
11 +
12 + <ProjectName Condition=" '$(ProjectName)' == '' ">$(MSBuildProjectName)</ProjectName>
13 + <BaseOutputPath>$(MSBuildThisFileDirectory)..\build\</BaseOutputPath>
14 + <BaseIntermediateOutputPath>$(BaseOutputPath)obj\$(ProjectName)\</BaseIntermediateOutputPath>
15 + <OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
16 +
17 + <Authors>WiX Toolset Team</Authors>
18 + <Company>WiX Toolset</Company>
19 + <Copyright>Copyright (c) .NET Foundation and contributors. All rights reserved.</Copyright>
20 + <Product>WiX Toolset</Product>
21 + </PropertyGroup>
22 +
23 + <PropertyGroup>
24 + <WixToolsetRootFolder>$(MSBuildThisFileDirectory)..\..\</WixToolsetRootFolder>
25 + </PropertyGroup>
26 +
27 + <Import Project="Cpp.Build.props" Condition=" '$(MSBuildProjectExtension)'=='.vcxproj' " />
28 + <Import Project="Custom.Build.props" Condition=" Exists('Custom.Build.props') " />
29 +</Project>
src/FindLocalWix.props new
+8
@@ -0,0 +1,8 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 + <PropertyGroup>
6 + <WixTargetsPath Condition=" '$(Configuration)' == 'Debug' And Exists('$(MSBuildThisFileDirectory)..\..\Tools\README.md') ">$(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets</WixTargetsPath>
7 + </PropertyGroup>
8 +</Project>
src/ca/dllmain.cpp new
+26
@@ -0,0 +1,26 @@
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 +#include "precomp.h"
4 +
5 +/********************************************************************
6 +DllMain - standard entry point for all WiX custom actions
7 +
8 +********************************************************************/
9 +extern "C" BOOL WINAPI DllMain(
10 + IN HINSTANCE hInst,
11 + IN ULONG ulReason,
12 + IN LPVOID)
13 +{
14 + switch(ulReason)
15 + {
16 + case DLL_PROCESS_ATTACH:
17 + WcaGlobalInitialize(hInst);
18 + break;
19 +
20 + case DLL_PROCESS_DETACH:
21 + WcaGlobalFinalize();
22 + break;
23 + }
24 +
25 + return TRUE;
26 +}
src/ca/iisca.cpp new
+3
@@ -0,0 +1,3 @@
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 +#include "precomp.h"
src/ca/iisca.def new
+7
@@ -0,0 +1,7 @@
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 +
4 +LIBRARY "iisca"
5 +
6 +EXPORTS
7 +
src/ca/iisca.vcxproj new
+70
@@ -0,0 +1,70 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 + <Import Project="..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props')" />
6 + <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" />
7 +
8 + <ItemGroup Label="ProjectConfigurations">
9 + <ProjectConfiguration Include="Debug|Win32">
10 + <Configuration>Debug</Configuration>
11 + <Platform>Win32</Platform>
12 + </ProjectConfiguration>
13 + <ProjectConfiguration Include="Release|Win32">
14 + <Configuration>Release</Configuration>
15 + <Platform>Win32</Platform>
16 + </ProjectConfiguration>
17 + </ItemGroup>
18 +
19 + <PropertyGroup Label="Globals">
20 + <ProjectGuid>{CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}</ProjectGuid>
21 + <ConfigurationType>DynamicLibrary</ConfigurationType>
22 + <TargetName>iisca</TargetName>
23 + <PlatformToolset>v141</PlatformToolset>
24 + <CharacterSet>Unicode</CharacterSet>
25 + <ProjectModuleDefinitionFile>iisca.def</ProjectModuleDefinitionFile>
26 + <Description>WiX Toolset Iis CustomAction</Description>
27 + <WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
28 + </PropertyGroup>
29 +
30 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
31 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
32 +
33 + <ImportGroup Label="ExtensionSettings">
34 + </ImportGroup>
35 +
36 + <ImportGroup Label="Shared">
37 + <Import Project="..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets" Condition="Exists('..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets')" />
38 + </ImportGroup>
39 +
40 + <PropertyGroup>
41 + <ProjectAdditionalLinkLibraries>msi.lib</ProjectAdditionalLinkLibraries>
42 + </PropertyGroup>
43 +
44 + <ItemGroup>
45 + <ClCompile Include="dllmain.cpp">
46 + <PrecompiledHeader>Create</PrecompiledHeader>
47 + </ClCompile>
48 + <ClCompile Include="iisca.cpp" />
49 + </ItemGroup>
50 +
51 + <ItemGroup>
52 + <ClInclude Include="precomp.h" />
53 + </ItemGroup>
54 +
55 + <ItemGroup>
56 + <None Include="packages.config" />
57 + <None Include="iisca.def" />
58 + </ItemGroup>
59 +
60 + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
61 +
62 + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
63 + <PropertyGroup>
64 + <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
65 + </PropertyGroup>
66 + <Error Condition="!Exists('..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.VisualStudio.Setup.Configuration.Native.1.14.114\build\native\Microsoft.VisualStudio.Setup.Configuration.Native.targets'))" />
67 + <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.6\build\WixToolset.DUtil.props'))" />
68 + <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props'))" />
69 + </Target>
70 +</Project>
src/ca/packages.config new
+6
@@ -0,0 +1,6 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<packages>
3 + <package id="Microsoft.VisualStudio.Setup.Configuration.Native" version="1.14.114" targetFramework="native" developmentDependency="true" />
4 + <package id="WixToolset.DUtil" version="4.0.6" targetFramework="native" />
5 + <package id="WixToolset.WcaUtil" version="4.0.2" targetFramework="native" />
6 +</packages>
\ No newline at end of file
src/ca/precomp.h new
+13
@@ -0,0 +1,13 @@
1 +#pragma once
2 +// 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.
3 +
4 +
5 +#include <windows.h>
6 +#include <msiquery.h>
7 +
8 +#define MAXUINT USHRT_MAX
9 +#include <Setup.Configuration.h>
10 +
11 +#include "wcautil.h"
12 +#include "fileutil.h"
13 +#include "strutil.h"
src/test/WixToolsetTest.Iis/IisExtensionFixture.cs new
+32
@@ -0,0 +1,32 @@
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 WixToolsetTest.Iis
4 +{
5 + using System.Linq;
6 + using WixBuildTools.TestSupport;
7 + using WixToolset.Core.TestPackage;
8 + using WixToolset.Iis;
9 + using Xunit;
10 +
11 + public class IisExtensionFixture
12 + {
13 + [Fact]
14 + public void CanBuildUsingFileShare()
15 + {
16 + var folder = TestData.Get(@"TestData\UsingIis");
17 + var build = new Builder(folder, typeof(IisExtensionFactory), new[] { folder });
18 +
19 + var results = build.BuildAndQuery(Build, "IIsWebAddress");
20 + Assert.Equal(new[]
21 + {
22 + "IIsWebAddress:",
23 + }, results.OrderBy(s => s).ToArray());
24 + }
25 +
26 + private static void Build(string[] args)
27 + {
28 + var result = WixRunner.Execute(args)
29 + .AssertSuccess();
30 + }
31 + }
32 +}
src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.en-us.wxl new
+11
@@ -0,0 +1,11 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +
3 +<!--
4 +This file contains the declaration of all the localizable strings.
5 +-->
6 +<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
7 +
8 + <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String>
9 + <String Id="FeatureTitle">MsiPackage</String>
10 +
11 +</WixLocalization>
src/test/WixToolsetTest.Iis/TestData/UsingIis/Package.wxs new
+22
@@ -0,0 +1,22 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 + <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
4 + <Package InstallerVersion="200" Compressed="no" InstallScope="perMachine" />
5 +
6 + <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
7 + <MediaTemplate />
8 +
9 + <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
10 + <ComponentGroupRef Id="ProductComponents" />
11 + </Feature>
12 +
13 + </Product>
14 +
15 + <Fragment>
16 + <Directory Id="TARGETDIR" Name="SourceDir">
17 + <Directory Id="ProgramFilesFolder">
18 + <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
19 + </Directory>
20 + </Directory>
21 + </Fragment>
22 +</Wix>
src/test/WixToolsetTest.Iis/TestData/UsingIis/PackageComponents.wxs new
+15
@@ -0,0 +1,15 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 + xmlns:iis="http://wixtoolset.org/schemas/v4/wxs/iis">
4 + <Fragment>
5 + <Property Id="PORT" Value="3062" />
6 + <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
7 + <Component>
8 + <File Source="example.txt" />
9 + <iis:WebSite Id="Test" Description="Test web server" Directory="TestWebSiteProductDirectory" AutoStart="yes" DirProperties="ReadAndExecute" ConfigureIfExists="no" >
10 + <iis:WebAddress Id="TestAddress" Port="[PORT]" Secure="no" />
11 + </iis:WebSite>
12 + </Component>
13 + </ComponentGroup>
14 + </Fragment>
15 +</Wix>
src/test/WixToolsetTest.Iis/TestData/UsingIis/example.txt new
+1
@@ -0,0 +1 @@
1 +This is example.txt.
\ No newline at end of file
src/test/WixToolsetTest.Iis/WixToolsetTest.Iis.csproj new
+42
@@ -0,0 +1,42 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project Sdk="Microsoft.NET.Sdk">
5 + <PropertyGroup>
6 + <TargetFramework>netcoreapp2.1</TargetFramework>
7 + <IsPackable>false</IsPackable>
8 + </PropertyGroup>
9 +
10 + <PropertyGroup>
11 + <NoWarn>NU1701</NoWarn>
12 + </PropertyGroup>
13 +
14 + <ItemGroup>
15 + <Content Include="TestData\UsingIis\example.txt" CopyToOutputDirectory="PreserveNewest" />
16 + <Content Include="TestData\UsingIis\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
17 + <Content Include="TestData\UsingIis\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
18 + <Content Include="TestData\UsingIis\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
19 + </ItemGroup>
20 +
21 + <ItemGroup>
22 + <ProjectReference Include="..\..\wixext\WixToolset.Iis.wixext.csproj" />
23 + </ItemGroup>
24 +
25 + <ItemGroup>
26 + <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Core\README.md') " PrivateAssets="all" />
27 + <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
28 + <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core\WixToolset.Core.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
29 + <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core.Burn\WixToolset.Core.Burn.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
30 + <ProjectReference Include="$(WixToolsetRootFolder)\Core\src\WixToolset.Core.WindowsInstaller\WixToolset.Core.WindowsInstaller.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Core\README.md') " />
31 + </ItemGroup>
32 +
33 + <ItemGroup>
34 + <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
35 + </ItemGroup>
36 +
37 + <ItemGroup>
38 + <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
39 + <PackageReference Include="xunit" Version="2.4.0" />
40 + <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
41 + </ItemGroup>
42 +</Project>
src/wixext/IIsCompiler.cs
+611 -630
@@ -1,6 +1,6 @@
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.Extensions
3 +namespace WixToolset.Iis
4 {
5 using System;
6 using System.Collections.Generic;
@@ -12,15 +12,9 @@ namespace WixToolset.Extensions
12 /// <summary>
13 /// The compiler for the WiX Toolset Internet Information Services Extension.
14 /// </summary>
15 - public sealed class IIsCompiler : CompilerExtension
15 + public sealed class IIsCompiler : BaseCompilerExtension
16 {
17 - /// <summary>
18 - /// Instantiate a new IIsCompiler.
19 - /// </summary>
20 - public IIsCompiler()
21 - {
22 - this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/iis";
23 - }
17 + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/iis";
18
19 /// <summary>
20 /// Types of objects that custom HTTP Headers can be applied to.
@@ -65,7 +59,7 @@ namespace WixToolset.Extensions
59 /// <param name="parentElement">Parent element of element to process.</param>
60 /// <param name="element">Element to process.</param>
61 /// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
68 - public override void ParseElement(XElement parentElement, XElement element, IDictionary<string, string> context)
62 + public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary<string, string> context)
63 {
64 switch (parentElement.Name.LocalName)
65 {
@@ -76,31 +70,31 @@ namespace WixToolset.Extensions
70 switch (element.Name.LocalName)
71 {
72 case "Certificate":
79 - this.ParseCertificateElement(element, componentId);
73 + this.ParseCertificateElement(intermediate, section, element, componentId);
74 break;
75 case "WebAppPool":
82 - this.ParseWebAppPoolElement(element, componentId);
76 + this.ParseWebAppPoolElement(intermediate, section, element, componentId);
77 break;
78 case "WebDir":
85 - this.ParseWebDirElement(element, componentId, null);
79 + this.ParseWebDirElement(intermediate, section, element, componentId, null);
80 break;
81 case "WebFilter":
88 - this.ParseWebFilterElement(element, componentId, null);
82 + this.ParseWebFilterElement(intermediate, section, element, componentId, null);
83 break;
84 case "WebProperty":
91 - this.ParseWebPropertyElement(element, componentId);
85 + this.ParseWebPropertyElement(intermediate, section, element, componentId);
86 break;
87 case "WebServiceExtension":
94 - this.ParseWebServiceExtensionElement(element, componentId);
88 + this.ParseWebServiceExtensionElement(intermediate, section, element, componentId);
89 break;
90 case "WebSite":
97 - this.ParseWebSiteElement(element, componentId);
91 + this.ParseWebSiteElement(intermediate, section, element, componentId);
92 break;
93 case "WebVirtualDir":
100 - this.ParseWebVirtualDirElement(element, componentId, null, null);
94 + this.ParseWebVirtualDirElement(intermediate, section, element, componentId, null, null);
95 break;
96 default:
103 - this.Core.UnexpectedElement(parentElement, element);
97 + this.ParseHelper.UnexpectedElement(parentElement, element);
98 break;
99 }
100 break;
@@ -110,27 +104,27 @@ namespace WixToolset.Extensions
104 switch (element.Name.LocalName)
105 {
106 case "WebApplication":
113 - this.ParseWebApplicationElement(element);
107 + this.ParseWebApplicationElement(intermediate, section, element);
108 break;
109 case "WebAppPool":
116 - this.ParseWebAppPoolElement(element, null);
110 + this.ParseWebAppPoolElement(intermediate, section, element, null);
111 break;
112 case "WebDirProperties":
119 - this.ParseWebDirPropertiesElement(element);
113 + this.ParseWebDirPropertiesElement(intermediate, section, element);
114 break;
115 case "WebLog":
122 - this.ParseWebLogElement(element);
116 + this.ParseWebLogElement(intermediate, section, element);
117 break;
118 case "WebSite":
125 - this.ParseWebSiteElement(element, null);
119 + this.ParseWebSiteElement(intermediate, section, element, null);
120 break;
121 default:
128 - this.Core.UnexpectedElement(parentElement, element);
122 + this.ParseHelper.UnexpectedElement(parentElement, element);
123 break;
124 }
125 break;
126 default:
133 - this.Core.UnexpectedElement(parentElement, element);
127 + this.ParseHelper.UnexpectedElement(parentElement, element);
128 break;
129 }
130 }
@@ -138,12 +132,12 @@ namespace WixToolset.Extensions
132 /// <summary>
133 /// Parses a certificate element.
134 /// </summary>
141 - /// <param name="node">Element to parse.</param>
135 + /// <param name="element">Element to parse.</param>
136 /// <param name="componentId">Identifier for parent component.</param>
143 - private void ParseCertificateElement(XElement node, string componentId)
137 + private void ParseCertificateElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId)
138 {
145 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
146 - string id = null;
139 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
140 + Identifier id = null;
141 int attributes = 0;
142 string binaryKey = null;
143 string certificatePath = null;
@@ -152,28 +146,28 @@ namespace WixToolset.Extensions
146 int storeLocation = 0;
147 string storeName = null;
148
155 - foreach (XAttribute attrib in node.Attributes())
149 + foreach (XAttribute attrib in element.Attributes())
150 {
151 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
152 {
153 switch (attrib.Name.LocalName)
154 {
155 case "Id":
162 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
156 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
157 break;
158 case "BinaryKey":
159 attributes |= 2; // SCA_CERT_ATTRIBUTE_BINARYDATA
166 - binaryKey = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
167 - this.Core.CreateSimpleReference(sourceLineNumbers, "Binary", binaryKey);
160 + binaryKey = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
161 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Binary", binaryKey);
162 break;
163 case "CertificatePath":
170 - certificatePath = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
164 + certificatePath = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
165 break;
166 case "Name":
173 - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
167 + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
168 break;
169 case "Overwrite":
176 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
170 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
171 {
172 attributes |= 4; // SCA_CERT_ATTRIBUTE_OVERWRITE
173 }
@@ -183,10 +177,10 @@ namespace WixToolset.Extensions
177 }
178 break;
179 case "PFXPassword":
186 - pfxPassword = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
180 + pfxPassword = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
181 break;
182 case "Request":
189 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
183 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
184 {
185 attributes |= 1; // SCA_CERT_ATTRIBUTE_REQUEST
186 }
@@ -196,7 +190,7 @@ namespace WixToolset.Extensions
190 }
191 break;
192 case "StoreLocation":
199 - string storeLocationValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
193 + string storeLocationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
194 if (0 < storeLocationValue.Length)
195 {
196 switch (storeLocationValue)
@@ -209,13 +203,13 @@ namespace WixToolset.Extensions
203 break;
204 default:
205 storeLocation = -1;
212 - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "StoreLocation", storeLocationValue, "currentUser", "localMachine"));
206 + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "StoreLocation", storeLocationValue, "currentUser", "localMachine"));
207 break;
208 }
209 }
210 break;
211 case "StoreName":
218 - string storeNameValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
212 + string storeNameValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
213 if (0 < storeNameValue.Length)
214 {
215 switch (storeNameValue)
@@ -243,232 +237,230 @@ namespace WixToolset.Extensions
237 storeName = "TrustedPublisher";
238 break;
239 default:
246 - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "StoreName", storeNameValue, "ca", "my", "request", "root", "otherPeople", "trustedPeople", "trustedPublisher"));
240 + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "StoreName", storeNameValue, "ca", "my", "request", "root", "otherPeople", "trustedPeople", "trustedPublisher"));
241 break;
242 }
243 }
244 break;
245 default:
252 - this.Core.UnexpectedAttribute(node, attrib);
246 + this.ParseHelper.UnexpectedAttribute(element, attrib);
247 break;
248 }
249 }
250 else
251 {
258 - this.Core.ParseExtensionAttribute(node, attrib);
252 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
253 }
254 }
255
256
257 if (null == id)
258 {
265 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
259 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
260 }
261
262 if (null == name)
263 {
270 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
264 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
265 }
266
267 if (0 == storeLocation)
268 {
275 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "StoreLocation"));
269 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "StoreLocation"));
270 }
271
272 if (null == storeName)
273 {
280 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "StoreName"));
274 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "StoreName"));
275 }
276
277 if (null != binaryKey && null != certificatePath)
278 {
285 - this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "BinaryKey", "CertificatePath", certificatePath));
279 + this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "BinaryKey", "CertificatePath", certificatePath));
280 }
281 else if (null == binaryKey && null == certificatePath)
282 {
289 - this.Core.OnMessage(WixErrors.ExpectedAttributes(sourceLineNumbers, node.Name.LocalName, "BinaryKey", "CertificatePath"));
283 + this.Messaging.Write(ErrorMessages.ExpectedAttributes(sourceLineNumbers, element.Name.LocalName, "BinaryKey", "CertificatePath"));
284 }
285
292 - this.Core.ParseForExtensionElements(node);
286 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
287
288 // Reference InstallCertificates and UninstallCertificates since nothing will happen without them
295 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "InstallCertificates");
296 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "UninstallCertificates");
297 - this.Core.EnsureTable(sourceLineNumbers, "CertificateHash"); // Certificate CustomActions require the CertificateHash table
298 -
299 - if (!this.Core.EncounteredError)
300 - {
301 - Row row = this.Core.CreateRow(sourceLineNumbers, "Certificate");
302 - row[0] = id;
303 - row[1] = componentId;
304 - row[2] = name;
305 - row[3] = storeLocation;
306 - row[4] = storeName;
307 - row[5] = attributes;
308 - row[6] = binaryKey;
309 - row[7] = certificatePath;
310 - row[8] = pfxPassword;
289 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "InstallCertificates");
290 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "UninstallCertificates");
291 + this.ParseHelper.EnsureTable(section, sourceLineNumbers, "CertificateHash"); // Certificate CustomActions require the CertificateHash table
292 +
293 + if (!this.Messaging.EncounteredError)
294 + {
295 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "Certificate", id);
296 + row.Set(1, componentId);
297 + row.Set(2, name);
298 + row.Set(3, storeLocation);
299 + row.Set(4, storeName);
300 + row.Set(5, attributes);
301 + row.Set(6, binaryKey);
302 + row.Set(7, certificatePath);
303 + row.Set(8, pfxPassword);
304 }
305 }
306
307 /// <summary>
308 /// Parses a CertificateRef extension element.
309 /// </summary>
317 - /// <param name="node">Element to parse.</param>
310 + /// <param name="element">Element to parse.</param>
311 /// <param name="webId">Identifier for parent web site.</param>
319 - private void ParseCertificateRefElement(XElement node, string webId)
312 + private void ParseCertificateRefElement(Intermediate intermediate, IntermediateSection section, XElement element, string webId)
313 {
321 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
322 - string id = null;
314 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
315 + Identifier id = null;
316
324 - foreach (XAttribute attrib in node.Attributes())
317 + foreach (XAttribute attrib in element.Attributes())
318 {
319 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
320 {
321 switch (attrib.Name.LocalName)
322 {
323 case "Id":
331 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
332 - this.Core.CreateSimpleReference(sourceLineNumbers, "Certificate", id);
324 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
325 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Certificate", id.Id);
326 break;
327 default:
335 - this.Core.UnexpectedAttribute(node, attrib);
328 + this.ParseHelper.UnexpectedAttribute(element, attrib);
329 break;
330 }
331 }
332 else
333 {
341 - this.Core.ParseExtensionAttribute(node, attrib);
334 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
335 }
336 }
337
338 if (null == id)
339 {
347 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
340 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
341 }
342
350 - this.Core.ParseForExtensionElements(node);
343 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
344
352 - if (!this.Core.EncounteredError)
345 + if (!this.Messaging.EncounteredError)
346 {
354 - this.Core.CreateSimpleReference(sourceLineNumbers, "Certificate", id);
347 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Certificate", id.Id);
348
356 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebSiteCertificates");
357 - row[0] = webId;
358 - row[1] = id;
349 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebSiteCertificates");
350 + row.Set(0, webId);
351 + row.Set(1, id.Id);
352 }
353 }
354
355 /// <summary>
356 /// Parses a mime map element.
357 /// </summary>
365 - /// <param name="node">Element to parse.</param>
358 + /// <param name="element">Element to parse.</param>
359 /// <param name="parentId">Identifier for parent symbol.</param>
360 /// <param name="parentType">Type that parentId refers to.</param>
368 - private void ParseMimeMapElement(XElement node, string parentId, MimeMapParentType parentType)
361 + private void ParseMimeMapElement(Intermediate intermediate, IntermediateSection section, XElement element, string parentId, MimeMapParentType parentType)
362 {
370 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
371 - string id = null;
363 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
364 + Identifier id = null;
365 string extension = null;
366 string type = null;
367
375 - foreach (XAttribute attrib in node.Attributes())
368 + foreach (XAttribute attrib in element.Attributes())
369 {
370 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
371 {
372 switch (attrib.Name.LocalName)
373 {
374 case "Id":
382 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
375 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
376 break;
377 case "Extension":
385 - extension = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
378 + extension = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
379 break;
380 case "Type":
388 - type = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
381 + type = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
382 break;
383 default:
391 - this.Core.UnexpectedAttribute(node, attrib);
384 + this.ParseHelper.UnexpectedAttribute(element, attrib);
385 break;
386 }
387 }
388 else
389 {
397 - this.Core.ParseExtensionAttribute(node, attrib);
390 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
391 }
392 }
393
394 if (null == id)
395 {
403 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
396 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
397 }
398
399 if (null == extension)
400 {
408 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Extension"));
401 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Extension"));
402 }
403 else if (0 < extension.Length)
404 {
405 if (!extension.StartsWith(".", StringComparison.Ordinal))
406 {
414 - this.Core.OnMessage(IIsErrors.MimeMapExtensionMissingPeriod(sourceLineNumbers, node.Name.LocalName, "Extension", extension));
407 + this.Messaging.Write(IIsErrors.MimeMapExtensionMissingPeriod(sourceLineNumbers, element.Name.LocalName, "Extension", extension));
408 }
409 }
410
411 if (null == type)
412 {
420 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type"));
413 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Type"));
414 }
415
423 - this.Core.ParseForExtensionElements(node);
416 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
417
425 - if (!this.Core.EncounteredError)
418 + if (!this.Messaging.EncounteredError)
419 {
427 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsMimeMap");
428 - row[0] = id;
429 - row[1] = (int)parentType;
430 - row[2] = parentId;
431 - row[3] = type;
432 - row[4] = extension;
420 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsMimeMap", id);
421 + row.Set(1, (int)parentType);
422 + row.Set(2, parentId);
423 + row.Set(3, type);
424 + row.Set(4, extension);
425 }
426 }
427
428 /// <summary>
429 /// Parses a recycle time element.
430 /// </summary>
439 - /// <param name="node">Element to parse.</param>
431 + /// <param name="element">Element to parse.</param>
432 /// <returns>Recycle time value.</returns>
441 - private string ParseRecycleTimeElement(XElement node)
433 + private string ParseRecycleTimeElement(Intermediate intermediate, IntermediateSection section, XElement element)
434 {
443 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
435 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
436 string value = null;
437
446 - foreach (XAttribute attrib in node.Attributes())
438 + foreach (XAttribute attrib in element.Attributes())
439 {
440 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
441 {
442 switch (attrib.Name.LocalName)
443 {
444 case "Value":
453 - value = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
445 + value = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
446 break;
447 default:
456 - this.Core.UnexpectedAttribute(node, attrib);
448 + this.ParseHelper.UnexpectedAttribute(element, attrib);
449 break;
450 }
451 }
452 else
453 {
462 - this.Core.ParseExtensionAttribute(node, attrib);
454 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
455 }
456 }
457
458 if (null == value)
459 {
468 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value"));
460 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Value"));
461 }
462
471 - this.Core.ParseForExtensionElements(node);
463 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
464
465 return value;
466 }
@@ -476,85 +468,84 @@ namespace WixToolset.Extensions
468 /// <summary>
469 /// Parses a web address element.
470 /// </summary>
479 - /// <param name="node">Element to parse.</param>
471 + /// <param name="element">Element to parse.</param>
472 /// <param name="parentWeb">Identifier of parent web site.</param>
473 /// <returns>Identifier for web address.</returns>
482 - private string ParseWebAddressElement(XElement node, string parentWeb)
474 + private string ParseWebAddressElement(Intermediate intermediate, IntermediateSection section, XElement element, string parentWeb)
475 {
484 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
485 - string id = null;
476 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
477 + Identifier id = null;
478 string header = null;
479 string ip = null;
480 string port = null;
481 bool secure = false;
482
491 - foreach (XAttribute attrib in node.Attributes())
483 + foreach (XAttribute attrib in element.Attributes())
484 {
485 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
486 {
487 switch (attrib.Name.LocalName)
488 {
489 case "Id":
498 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
490 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
491 break;
492 case "Header":
501 - header = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
493 + header = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
494 break;
495 case "IP":
504 - ip = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
496 + ip = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
497 break;
498 case "Port":
507 - port = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
499 + port = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
500 break;
501 case "Secure":
510 - secure = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
502 + secure = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
503 break;
504 default:
513 - this.Core.UnexpectedAttribute(node, attrib);
505 + this.ParseHelper.UnexpectedAttribute(element, attrib);
506 break;
507 }
508 }
509 else
510 {
519 - this.Core.ParseExtensionAttribute(node, attrib);
511 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
512 }
513 }
514
515 if (null == id)
516 {
525 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
517 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
518 }
519
520 if (null == port)
521 {
530 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Port"));
522 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Port"));
523 }
524
533 - this.Core.ParseForExtensionElements(node);
525 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
526
535 - if (!this.Core.EncounteredError)
527 + if (!this.Messaging.EncounteredError)
528 {
537 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebAddress");
538 - row[0] = id;
539 - row[1] = parentWeb;
540 - row[2] = ip;
541 - row[3] = port;
542 - row[4] = header;
543 - row[5] = secure ? 1 : 0;
529 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebAddress", id);
530 + row.Set(1, parentWeb);
531 + row.Set(2, ip);
532 + row.Set(3, port);
533 + row.Set(4, header);
534 + row.Set(5, secure ? 1 : 0);
535 }
536
546 - return id;
537 + return id?.Id;
538 }
539
540 /// <summary>
541 /// Parses a web application element.
542 /// </summary>
552 - /// <param name="node">Element to parse.</param>
543 + /// <param name="element">Element to parse.</param>
544 /// <returns>Identifier for web application.</returns>
554 - private string ParseWebApplicationElement(XElement node)
545 + private string ParseWebApplicationElement(Intermediate intermediate, IntermediateSection section, XElement element)
546 {
556 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
557 - string id = null;
547 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
548 + Identifier id = null;
549 YesNoDefaultType allowSessions = YesNoDefaultType.Default;
550 string appPool = null;
551 YesNoDefaultType buffer = YesNoDefaultType.Default;
@@ -567,26 +558,26 @@ namespace WixToolset.Extensions
558 int sessionTimeout = CompilerConstants.IntegerNotSet;
559 YesNoDefaultType serverDebugging = YesNoDefaultType.Default;
560
570 - foreach (XAttribute attrib in node.Attributes())
561 + foreach (XAttribute attrib in element.Attributes())
562 {
563 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
564 {
565 switch (attrib.Name.LocalName)
566 {
567 case "Id":
577 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
568 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
569 break;
570 case "AllowSessions":
580 - allowSessions = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
571 + allowSessions = this.ParseHelper.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
572 break;
573 case "Buffer":
583 - buffer = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
574 + buffer = this.ParseHelper.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
575 break;
576 case "ClientDebugging":
586 - clientDebugging = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
577 + clientDebugging = this.ParseHelper.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
578 break;
579 case "DefaultScript":
589 - defaultScript = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
580 + defaultScript = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
581 if (0 < defaultScript.Length)
582 {
583 switch (defaultScript)
@@ -596,13 +587,13 @@ namespace WixToolset.Extensions
587 // these are valid values
588 break;
589 default:
599 - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, defaultScript, "JScript", "VBScript"));
590 + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, defaultScript, "JScript", "VBScript"));
591 break;
592 }
593 }
594 break;
595 case "Isolation":
605 - string isolationValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
596 + string isolationValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
597 if (0 < isolationValue.Length)
598 {
599 switch (isolationValue)
@@ -617,143 +608,142 @@ namespace WixToolset.Extensions
608 isolation = 1;
609 break;
610 default:
620 - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, isolationValue, "low", "medium", "high"));
611 + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, isolationValue, "low", "medium", "high"));
612 break;
613 }
614 }
615 break;
616 case "Name":
626 - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
617 + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
618 break;
619 case "ParentPaths":
629 - parentPaths = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
620 + parentPaths = this.ParseHelper.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
621 break;
622 case "ScriptTimeout":
632 - scriptTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
623 + scriptTimeout = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
624 break;
625 case "ServerDebugging":
635 - serverDebugging = this.Core.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
626 + serverDebugging = this.ParseHelper.GetAttributeYesNoDefaultValue(sourceLineNumbers, attrib);
627 break;
628 case "SessionTimeout":
638 - sessionTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
629 + sessionTimeout = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
630 break;
631 case "WebAppPool":
641 - appPool = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
642 - this.Core.CreateSimpleReference(sourceLineNumbers, "IIsAppPool", appPool);
632 + appPool = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
633 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsAppPool", appPool);
634 break;
635 default:
645 - this.Core.UnexpectedAttribute(node, attrib);
636 + this.ParseHelper.UnexpectedAttribute(element, attrib);
637 break;
638 }
639 }
640 else
641 {
651 - this.Core.ParseExtensionAttribute(node, attrib);
642 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
643 }
644 }
645
646 if (null == id)
647 {
657 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
648 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
649 }
650
651 if (null == name)
652 {
662 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
653 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
654 }
655 else if (-1 != name.IndexOf("\\", StringComparison.Ordinal))
656 {
666 - this.Core.OnMessage(IIsErrors.IllegalCharacterInAttributeValue(sourceLineNumbers, node.Name.LocalName, "Name", name, '\\'));
657 + this.Messaging.Write(IIsErrors.IllegalCharacterInAttributeValue(sourceLineNumbers, element.Name.LocalName, "Name", name, '\\'));
658 }
659
669 - foreach (XElement child in node.Elements())
660 + foreach (XElement child in element.Elements())
661 {
662 if (this.Namespace == child.Name.Namespace)
663 {
673 - SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
664 + SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child);
665 switch (child.Name.LocalName)
666 {
667 case "WebApplicationExtension":
677 - this.ParseWebApplicationExtensionElement(child, id);
668 + this.ParseWebApplicationExtensionElement(intermediate, section, child, id?.Id);
669 break;
670 default:
680 - this.Core.UnexpectedElement(node, child);
671 + this.ParseHelper.UnexpectedElement(element, child);
672 break;
673 }
674 }
675 else
676 {
686 - this.Core.ParseExtensionElement(node, child);
677 + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
678 }
679 }
680
690 - if (!this.Core.EncounteredError)
681 + if (!this.Messaging.EncounteredError)
682 {
692 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebApplication");
693 - row[0] = id;
694 - row[1] = name;
695 - row[2] = isolation;
683 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebApplication", id);
684 + row.Set(1, name);
685 + row.Set(2, isolation);
686 if (YesNoDefaultType.Default != allowSessions)
687 {
698 - row[3] = YesNoDefaultType.Yes == allowSessions ? 1 : 0;
688 + row.Set(3, YesNoDefaultType.Yes == allowSessions ? 1 : 0);
689 }
690
691 if (CompilerConstants.IntegerNotSet != sessionTimeout)
692 {
703 - row[4] = sessionTimeout;
693 + row.Set(4, sessionTimeout);
694 }
695
696 if (YesNoDefaultType.Default != buffer)
697 {
708 - row[5] = YesNoDefaultType.Yes == buffer ? 1 : 0;
698 + row.Set(5, YesNoDefaultType.Yes == buffer ? 1 : 0);
699 }
700
701 if (YesNoDefaultType.Default != parentPaths)
702 {
713 - row[6] = YesNoDefaultType.Yes == parentPaths ? 1 : 0;
703 + row.Set(6, YesNoDefaultType.Yes == parentPaths ? 1 : 0);
704 }
715 - row[7] = defaultScript;
705 + row.Set(7, defaultScript);
706 if (CompilerConstants.IntegerNotSet != scriptTimeout)
707 {
718 - row[8] = scriptTimeout;
708 + row.Set(8, scriptTimeout);
709 }
710
711 if (YesNoDefaultType.Default != serverDebugging)
712 {
723 - row[9] = YesNoDefaultType.Yes == serverDebugging ? 1 : 0;
713 + row.Set(9, YesNoDefaultType.Yes == serverDebugging ? 1 : 0);
714 }
715
716 if (YesNoDefaultType.Default != clientDebugging)
717 {
728 - row[10] = YesNoDefaultType.Yes == clientDebugging ? 1 : 0;
718 + row.Set(10, YesNoDefaultType.Yes == clientDebugging ? 1 : 0);
719 }
730 - row[11] = appPool;
720 + row.Set(11, appPool);
721 }
722
733 - return id;
723 + return id?.Id;
724 }
725
726 /// <summary>
727 /// Parses a web application extension element.
728 /// </summary>
739 - /// <param name="node">Element to parse.</param>
729 + /// <param name="element">Element to parse.</param>
730 /// <param name="application">Identifier for parent web application.</param>
741 - private void ParseWebApplicationExtensionElement(XElement node, string application)
731 + private void ParseWebApplicationExtensionElement(Intermediate intermediate, IntermediateSection section, XElement element, string application)
732 {
743 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
733 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
734 int attributes = 0;
735 string executable = null;
736 string extension = null;
737 string verbs = null;
738
749 - foreach (XAttribute attrib in node.Attributes())
739 + foreach (XAttribute attrib in element.Attributes())
740 {
741 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
742 {
743 switch (attrib.Name.LocalName)
744 {
745 case "CheckPath":
756 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
746 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
747 {
748 attributes |= 4;
749 }
@@ -763,13 +753,13 @@ namespace WixToolset.Extensions
753 }
754 break;
755 case "Executable":
766 - executable = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
756 + executable = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
757 break;
758 case "Extension":
769 - extension = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
759 + extension = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
760 break;
761 case "Script":
772 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
762 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
763 {
764 attributes |= 1;
765 }
@@ -779,31 +769,31 @@ namespace WixToolset.Extensions
769 }
770 break;
771 case "Verbs":
782 - verbs = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
772 + verbs = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
773 break;
774 default:
785 - this.Core.UnexpectedAttribute(node, attrib);
775 + this.ParseHelper.UnexpectedAttribute(element, attrib);
776 break;
777 }
778 }
779 else
780 {
791 - this.Core.ParseExtensionAttribute(node, attrib);
781 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
782 }
783 }
784
795 - this.Core.ParseForExtensionElements(node);
785 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
786
797 - if (!this.Core.EncounteredError)
787 + if (!this.Messaging.EncounteredError)
788 {
799 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebApplicationExtension");
800 - row[0] = application;
801 - row[1] = extension;
802 - row[2] = verbs;
803 - row[3] = executable;
789 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebApplicationExtension");
790 + row.Set(0, application);
791 + row.Set(1, extension);
792 + row.Set(2, verbs);
793 + row.Set(3, executable);
794 if (0 < attributes)
795 {
806 - row[4] = attributes;
796 + row.Set(4, attributes);
797 }
798 }
799 }
@@ -811,12 +801,12 @@ namespace WixToolset.Extensions
801 /// <summary>
802 /// Parses web application pool element.
803 /// </summary>
814 - /// <param name="node">Element to parse.</param>
804 + /// <param name="element">Element to parse.</param>
805 /// <param name="componentId">Optional identifier of parent component.</param>
816 - private void ParseWebAppPoolElement(XElement node, string componentId)
806 + private void ParseWebAppPoolElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId)
807 {
818 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
819 - string id = null;
808 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
809 + Identifier id = null;
810 int attributes = 0;
811 int cpuAction = CompilerConstants.IntegerNotSet;
812 string cpuMon = null;
@@ -835,22 +825,22 @@ namespace WixToolset.Extensions
825 string user = null;
826 int virtualMemory = CompilerConstants.IntegerNotSet;
827
838 - foreach (XAttribute attrib in node.Attributes())
828 + foreach (XAttribute attrib in element.Attributes())
829 {
830 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
831 {
832 switch (attrib.Name.LocalName)
833 {
834 case "Id":
845 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
835 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
836 break;
837 case "CpuAction":
838 if (null == componentId)
839 {
850 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
840 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
841 }
842
853 - string cpuActionValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
843 + string cpuActionValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
844 if (0 < cpuActionValue.Length)
845 {
846 switch (cpuActionValue)
@@ -862,7 +852,7 @@ namespace WixToolset.Extensions
852 cpuAction = 0;
853 break;
854 default:
865 - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, cpuActionValue, "shutdown", "none"));
855 + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, cpuActionValue, "shutdown", "none"));
856 break;
857 }
858 }
@@ -870,10 +860,10 @@ namespace WixToolset.Extensions
860 case "Identity":
861 if (null == componentId)
862 {
873 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
863 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
864 }
865
876 - string identityValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
866 + string identityValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
867 if (0 < identityValue.Length)
868 {
869 switch (identityValue)
@@ -894,7 +884,7 @@ namespace WixToolset.Extensions
884 attributes |= 0x10;
885 break;
886 default:
897 - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, identityValue, "networkService", "localService", "localSystem", "other", "applicationPoolIdentity"));
887 + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, identityValue, "networkService", "localService", "localSystem", "other", "applicationPoolIdentity"));
888 break;
889 }
890 }
@@ -902,18 +892,18 @@ namespace WixToolset.Extensions
892 case "IdleTimeout":
893 if (null == componentId)
894 {
905 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
895 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
896 }
897
908 - idleTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
898 + idleTimeout = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
899 break;
900 case "ManagedPipelineMode":
901 if (null == componentId)
902 {
913 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
903 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
904 }
905
916 - managedPipelineMode = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
906 + managedPipelineMode = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
907
908
909 if (!String.IsNullOrEmpty(managedPipelineMode))
@@ -933,9 +923,9 @@ namespace WixToolset.Extensions
923 case "Integrated":
924 break;
925 default:
936 - if (!this.Core.ContainsProperty(managedPipelineMode))
926 + if (!this.ParseHelper.ContainsProperty(managedPipelineMode))
927 {
938 - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, managedPipelineMode, "Classic", "Integrated"));
928 + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName, managedPipelineMode, "Classic", "Integrated"));
929 }
930 break;
931 }
@@ -945,116 +935,116 @@ namespace WixToolset.Extensions
935 case "ManagedRuntimeVersion":
936 if (null == componentId)
937 {
948 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
938 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
939 }
940
951 - managedRuntimeVersion = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
941 + managedRuntimeVersion = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
942 break;
943 case "MaxCpuUsage":
944 if (null == componentId)
945 {
956 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
946 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
947 }
948
959 - maxCpuUsage = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 100);
949 + maxCpuUsage = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 100);
950 break;
951 case "MaxWorkerProcesses":
952 if (null == componentId)
953 {
964 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
954 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
955 }
956
967 - maxWorkerProcs = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
957 + maxWorkerProcs = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
958 break;
959 case "Name":
970 - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
960 + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
961 break;
962 case "PrivateMemory":
963 if (null == componentId)
964 {
975 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
965 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
966 }
967
978 - privateMemory = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 4294967);
968 + privateMemory = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 4294967);
969 break;
970 case "QueueLimit":
971 if (null == componentId)
972 {
983 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
973 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
974 }
975
986 - queueLimit = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
976 + queueLimit = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
977 break;
978 case "RecycleMinutes":
979 if (null == componentId)
980 {
991 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
981 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
982 }
983
994 - recycleMinutes = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
984 + recycleMinutes = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
985 break;
986 case "RecycleRequests":
987 if (null == componentId)
988 {
999 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
989 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
990 }
991
1002 - recycleRequests = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
992 + recycleRequests = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
993 break;
994 case "RefreshCpu":
995 if (null == componentId)
996 {
1007 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
997 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
998 }
999
1010 - refreshCpu = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1000 + refreshCpu = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1001 break;
1002 case "User":
1003 if (null == componentId)
1004 {
1015 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
1005 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1006 }
1007
1018 - user = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1019 - this.Core.CreateSimpleReference(sourceLineNumbers, "User", user);
1008 + user = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1009 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", user);
1010 break;
1011 case "VirtualMemory":
1012 if (null == componentId)
1013 {
1024 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
1014 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
1015 }
1016
1027 - virtualMemory = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 4294967);
1017 + virtualMemory = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, 4294967);
1018 break;
1019 default:
1030 - this.Core.UnexpectedAttribute(node, attrib);
1020 + this.ParseHelper.UnexpectedAttribute(element, attrib);
1021 break;
1022 }
1023 }
1024 else
1025 {
1036 - this.Core.ParseExtensionAttribute(node, attrib);
1026 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1027 }
1028 }
1029
1030 if (null == id)
1031 {
1042 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1032 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1033 }
1034
1035 if (null == name)
1036 {
1047 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
1037 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
1038 }
1039
1040 if (null == user && 8 == (attributes & 0x1F))
1041 {
1052 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "User", "Identity", "other"));
1042 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "User", "Identity", "other"));
1043 }
1044
1045 if (null != user && 8 != (attributes & 0x1F))
1046 {
1057 - this.Core.OnMessage(WixErrors.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, node.Name.LocalName, "User", user, "Identity", "other"));
1047 + this.Messaging.Write(ErrorMessages.IllegalAttributeValueWithoutOtherAttribute(sourceLineNumbers, element.Name.LocalName, "User", user, "Identity", "other"));
1048 }
1049
1050 cpuMon = maxCpuUsage.ToString(CultureInfo.InvariantCulture.NumberFormat);
@@ -1067,7 +1057,7 @@ namespace WixToolset.Extensions
1057 }
1058 }
1059
1070 - foreach (XElement child in node.Elements())
1060 + foreach (XElement child in element.Elements())
1061 {
1062 if (this.Namespace == child.Name.Namespace)
1063 {
@@ -1076,228 +1066,226 @@ namespace WixToolset.Extensions
1066 case "RecycleTime":
1067 if (null == componentId)
1068 {
1079 - SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
1080 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, node.Name.LocalName));
1069 + SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child);
1070 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, element.Name.LocalName));
1071 }
1072
1073 if (null == recycleTimes)
1074 {
1085 - recycleTimes = this.ParseRecycleTimeElement(child);
1075 + recycleTimes = this.ParseRecycleTimeElement(intermediate, section, child);
1076 }
1077 else
1078 {
1089 - recycleTimes = String.Concat(recycleTimes, ",", this.ParseRecycleTimeElement(child));
1079 + recycleTimes = String.Concat(recycleTimes, ",", this.ParseRecycleTimeElement(intermediate, section, child));
1080 }
1081 break;
1082 default:
1093 - this.Core.UnexpectedElement(node, child);
1083 + this.ParseHelper.UnexpectedElement(element, child);
1084 break;
1085 }
1086 }
1087 else
1088 {
1099 - this.Core.ParseExtensionElement(node, child);
1089 + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
1090 }
1091 }
1092
1093 if (null != componentId)
1094 {
1095 // Reference ConfigureIIs since nothing will happen without it
1106 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
1096 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
1097 }
1098
1109 - if (!this.Core.EncounteredError)
1099 + if (!this.Messaging.EncounteredError)
1100 {
1111 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsAppPool");
1112 - row[0] = id;
1113 - row[1] = name;
1114 - row[2] = componentId;
1115 - row[3] = attributes;
1116 - row[4] = user;
1101 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsAppPool", id);
1102 + row.Set(1, name);
1103 + row.Set(2, componentId);
1104 + row.Set(3, attributes);
1105 + row.Set(4, user);
1106 if (CompilerConstants.IntegerNotSet != recycleMinutes)
1107 {
1119 - row[5] = recycleMinutes;
1108 + row.Set(5, recycleMinutes);
1109 }
1110
1111 if (CompilerConstants.IntegerNotSet != recycleRequests)
1112 {
1124 - row[6] = recycleRequests;
1113 + row.Set(6, recycleRequests);
1114 }
1126 - row[7] = recycleTimes;
1115 + row.Set(7, recycleTimes);
1116 if (CompilerConstants.IntegerNotSet != idleTimeout)
1117 {
1129 - row[8] = idleTimeout;
1118 + row.Set(8, idleTimeout);
1119 }
1120
1121 if (CompilerConstants.IntegerNotSet != queueLimit)
1122 {
1134 - row[9] = queueLimit;
1123 + row.Set(9, queueLimit);
1124 }
1136 - row[10] = cpuMon;
1125 + row.Set(10, cpuMon);
1126 if (CompilerConstants.IntegerNotSet != maxWorkerProcs)
1127 {
1139 - row[11] = maxWorkerProcs;
1128 + row.Set(11, maxWorkerProcs);
1129 }
1130
1131 if (CompilerConstants.IntegerNotSet != virtualMemory)
1132 {
1144 - row[12] = virtualMemory;
1133 + row.Set(12, virtualMemory);
1134 }
1135
1136 if (CompilerConstants.IntegerNotSet != privateMemory)
1137 {
1149 - row[13] = privateMemory;
1138 + row.Set(13, privateMemory);
1139 }
1151 - row[14] = managedRuntimeVersion;
1152 - row[15] = managedPipelineMode;
1140 + row.Set(14, managedRuntimeVersion);
1141 + row.Set(15, managedPipelineMode);
1142 }
1143 }
1144
1145 /// <summary>
1146 /// Parses a web directory element.
1147 /// </summary>
1159 - /// <param name="node">Element to parse.</param>
1148 + /// <param name="element">Element to parse.</param>
1149 /// <param name="componentId">Identifier for parent component.</param>
1150 /// <param name="parentWeb">Optional identifier for parent web site.</param>
1162 - private void ParseWebDirElement(XElement node, string componentId, string parentWeb)
1151 + private void ParseWebDirElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string parentWeb)
1152 {
1164 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1165 - string id = null;
1153 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1154 + Identifier id = null;
1155 string dirProperties = null;
1156 string path = null;
1157 string application = null;
1158
1170 - foreach (XAttribute attrib in node.Attributes())
1159 + foreach (XAttribute attrib in element.Attributes())
1160 {
1161 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1162 {
1163 switch (attrib.Name.LocalName)
1164 {
1165 case "Id":
1177 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1166 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1167 break;
1168 case "DirProperties":
1180 - dirProperties = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1169 + dirProperties = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1170 break;
1171 case "Path":
1183 - path = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1172 + path = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1173 break;
1174 case "WebApplication":
1186 - application = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1175 + application = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1176 break;
1177 case "WebSite":
1178 if (null != parentWeb)
1179 {
1191 - this.Core.OnMessage(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, node.Name.LocalName));
1180 + this.Messaging.Write(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, element.Name.LocalName));
1181 }
1182
1194 - parentWeb = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1195 - this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebSite", parentWeb);
1183 + parentWeb = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1184 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebSite", parentWeb);
1185 break;
1186 default:
1198 - this.Core.UnexpectedAttribute(node, attrib);
1187 + this.ParseHelper.UnexpectedAttribute(element, attrib);
1188 break;
1189 }
1190 }
1191 else
1192 {
1204 - this.Core.ParseExtensionAttribute(node, attrib);
1193 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1194 }
1195 }
1196
1197 if (null == id)
1198 {
1210 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1199 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1200 }
1201
1202 if (null == path)
1203 {
1215 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Path"));
1204 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Path"));
1205 }
1206
1207 if (null == parentWeb)
1208 {
1220 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "WebSite"));
1209 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "WebSite"));
1210 }
1211
1223 - foreach (XElement child in node.Elements())
1212 + foreach (XElement child in element.Elements())
1213 {
1214 if (this.Namespace == child.Name.Namespace)
1215 {
1227 - SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
1216 + SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child);
1217 switch (child.Name.LocalName)
1218 {
1219 case "WebApplication":
1220 if (null != application)
1221 {
1233 - this.Core.OnMessage(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, node.Name.LocalName));
1222 + this.Messaging.Write(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, element.Name.LocalName));
1223 }
1224
1236 - application = this.ParseWebApplicationElement(child);
1225 + application = this.ParseWebApplicationElement(intermediate, section, child);
1226 break;
1227 case "WebDirProperties":
1228 if (null == componentId)
1229 {
1241 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
1230 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
1231 }
1232
1244 - string childWebDirProperties = this.ParseWebDirPropertiesElement(child);
1233 + string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child);
1234 if (null == dirProperties)
1235 {
1236 dirProperties = childWebDirProperties;
1237 }
1238 else
1239 {
1251 - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, child.Name.LocalName, "DirProperties", child.Name.LocalName));
1240 + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, child.Name.LocalName, "DirProperties", child.Name.LocalName));
1241 }
1242 break;
1243 default:
1255 - this.Core.UnexpectedElement(node, child);
1244 + this.ParseHelper.UnexpectedElement(element, child);
1245 break;
1246 }
1247 }
1248 else
1249 {
1261 - this.Core.ParseExtensionElement(node, child);
1250 + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
1251 }
1252 }
1253
1254 if (null == dirProperties)
1255 {
1267 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "DirProperties"));
1256 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "DirProperties"));
1257 }
1258
1259 if (null != application)
1260 {
1272 - this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebApplication", application);
1261 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebApplication", application);
1262 }
1263
1275 - this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebDirProperties", dirProperties);
1264 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebDirProperties", dirProperties);
1265
1266 // Reference ConfigureIIs since nothing will happen without it
1278 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
1267 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
1268
1280 - if (!this.Core.EncounteredError)
1269 + if (!this.Messaging.EncounteredError)
1270 {
1282 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebDir");
1283 - row[0] = id;
1284 - row[1] = componentId;
1285 - row[2] = parentWeb;
1286 - row[3] = path;
1287 - row[4] = dirProperties;
1288 - row[5] = application;
1271 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebDir", id);
1272 + row.Set(1, componentId);
1273 + row.Set(2, parentWeb);
1274 + row.Set(3, path);
1275 + row.Set(4, dirProperties);
1276 + row.Set(5, application);
1277 }
1278 }
1279
1280 /// <summary>
1281 /// Parses a web directory properties element.
1282 /// </summary>
1295 - /// <param name="node">Element to parse.</param>
1283 + /// <param name="element">Element to parse.</param>
1284 /// <returns>The identifier for this WebDirProperties.</returns>
1297 - private string ParseWebDirPropertiesElement(XElement node)
1285 + private string ParseWebDirPropertiesElement(Intermediate intermediate, IntermediateSection section, XElement element)
1286 {
1299 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1300 - string id = null;
1287 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1288 + Identifier id = null;
1289 int access = 0;
1290 bool accessSet = false;
1291 int accessSSLFlags = 0;
@@ -1316,53 +1304,53 @@ namespace WixToolset.Extensions
1304 YesNoType logVisits = YesNoType.NotSet;
1305 YesNoType notCustomError = YesNoType.NotSet;
1306
1319 - foreach (XAttribute attrib in node.Attributes())
1307 + foreach (XAttribute attrib in element.Attributes())
1308 {
1309 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1310 {
1311 switch (attrib.Name.LocalName)
1312 {
1313 case "Id":
1326 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1314 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1315 break;
1316 case "AnonymousUser":
1329 - anonymousUser = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1330 - this.Core.CreateSimpleReference(sourceLineNumbers, "User", anonymousUser);
1317 + anonymousUser = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1318 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "User", anonymousUser);
1319 break;
1320 case "AspDetailedError":
1333 - aspDetailedError = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1321 + aspDetailedError = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1322 break;
1323 case "AuthenticationProviders":
1336 - authenticationProviders = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1324 + authenticationProviders = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1325 break;
1326 case "CacheControlCustom":
1339 - cacheControlCustom = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1327 + cacheControlCustom = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1328 break;
1329 case "CacheControlMaxAge":
1342 - cacheControlMaxAge = this.Core.GetAttributeLongValue(sourceLineNumbers, attrib, 0, uint.MaxValue); // 4294967295 (uint.MaxValue) represents unlimited
1330 + cacheControlMaxAge = this.ParseHelper.GetAttributeLongValue(sourceLineNumbers, attrib, 0, uint.MaxValue); // 4294967295 (uint.MaxValue) represents unlimited
1331 break;
1332 case "ClearCustomError":
1345 - notCustomError = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1333 + notCustomError = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1334 break;
1335 case "DefaultDocuments":
1348 - defaultDocuments = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1336 + defaultDocuments = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1337 break;
1338 case "HttpExpires":
1351 - httpExpires = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1339 + httpExpires = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1340 break;
1341 case "IIsControlledPassword":
1354 - iisControlledPassword = YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1342 + iisControlledPassword = YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1343 break;
1344 case "Index":
1357 - index = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1345 + index = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1346 break;
1347 case "LogVisits":
1360 - logVisits = this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1348 + logVisits = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
1349 break;
1350
1351 // Access attributes
1352 case "Execute":
1365 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1353 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1354 {
1355 access |= 4;
1356 }
@@ -1373,7 +1361,7 @@ namespace WixToolset.Extensions
1361 accessSet = true;
1362 break;
1363 case "Read":
1376 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1364 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1365 {
1366 access |= 1;
1367 }
@@ -1384,7 +1372,7 @@ namespace WixToolset.Extensions
1372 accessSet = true;
1373 break;
1374 case "Script":
1387 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1375 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1376 {
1377 access |= 512;
1378 }
@@ -1395,7 +1383,7 @@ namespace WixToolset.Extensions
1383 accessSet = true;
1384 break;
1385 case "Write":
1398 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1386 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1387 {
1388 access |= 2;
1389 }
@@ -1408,7 +1396,7 @@ namespace WixToolset.Extensions
1396
1397 // AccessSSL Attributes
1398 case "AccessSSL":
1411 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1399 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1400 {
1401 accessSSLFlags |= 8;
1402 }
@@ -1419,7 +1407,7 @@ namespace WixToolset.Extensions
1407 accessSSLFlagsSet = true;
1408 break;
1409 case "AccessSSL128":
1422 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1410 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1411 {
1412 accessSSLFlags |= 256;
1413 }
@@ -1430,7 +1418,7 @@ namespace WixToolset.Extensions
1418 accessSSLFlagsSet = true;
1419 break;
1420 case "AccessSSLMapCert":
1433 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1421 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1422 {
1423 accessSSLFlags |= 128;
1424 }
@@ -1441,7 +1429,7 @@ namespace WixToolset.Extensions
1429 accessSSLFlagsSet = true;
1430 break;
1431 case "AccessSSLNegotiateCert":
1444 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1432 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1433 {
1434 accessSSLFlags |= 32;
1435 }
@@ -1452,7 +1440,7 @@ namespace WixToolset.Extensions
1440 accessSSLFlagsSet = true;
1441 break;
1442 case "AccessSSLRequireCert":
1455 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1443 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1444 {
1445 accessSSLFlags |= 64;
1446 }
@@ -1465,7 +1453,7 @@ namespace WixToolset.Extensions
1453
1454 // Authorization attributes
1455 case "AnonymousAccess":
1468 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1456 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1457 {
1458 authorization |= 1;
1459 }
@@ -1476,7 +1464,7 @@ namespace WixToolset.Extensions
1464 authorizationSet = true;
1465 break;
1466 case "BasicAuthentication":
1479 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1467 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1468 {
1469 authorization |= 2;
1470 }
@@ -1487,7 +1475,7 @@ namespace WixToolset.Extensions
1475 authorizationSet = true;
1476 break;
1477 case "DigestAuthentication":
1490 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1478 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1479 {
1480 authorization |= 16;
1481 }
@@ -1498,7 +1486,7 @@ namespace WixToolset.Extensions
1486 authorizationSet = true;
1487 break;
1488 case "PassportAuthentication":
1501 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1489 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1490 {
1491 authorization |= 64;
1492 }
@@ -1509,7 +1497,7 @@ namespace WixToolset.Extensions
1497 authorizationSet = true;
1498 break;
1499 case "WindowsAuthentication":
1512 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1500 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1501 {
1502 authorization |= 4;
1503 }
@@ -1520,187 +1508,186 @@ namespace WixToolset.Extensions
1508 authorizationSet = true;
1509 break;
1510 default:
1523 - this.Core.UnexpectedAttribute(node, attrib);
1511 + this.ParseHelper.UnexpectedAttribute(element, attrib);
1512 break;
1513 }
1514 }
1515 else
1516 {
1529 - this.Core.ParseExtensionAttribute(node, attrib);
1517 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1518 }
1519 }
1520
1521 if (null == id)
1522 {
1535 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1523 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1524 }
1525
1538 - this.Core.ParseForExtensionElements(node);
1526 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
1527
1540 - if (!this.Core.EncounteredError)
1528 + if (!this.Messaging.EncounteredError)
1529 {
1542 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebDirProperties");
1543 - row[0] = id;
1530 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebDirProperties", id);
1531 if (accessSet)
1532 {
1546 - row[1] = access;
1533 + row.Set(1, access);
1534 }
1535
1536 if (authorizationSet)
1537 {
1551 - row[2] = authorization;
1538 + row.Set(2, authorization);
1539 }
1553 - row[3] = anonymousUser;
1554 - row[4] = iisControlledPassword ? 1 : 0;
1540 + row.Set(3, anonymousUser);
1541 + row.Set(4, iisControlledPassword ? 1 : 0);
1542 if (YesNoType.NotSet != logVisits)
1543 {
1557 - row[5] = YesNoType.Yes == logVisits ? 1 : 0;
1544 + row.Set(5, YesNoType.Yes == logVisits ? 1 : 0);
1545 }
1546
1547 if (YesNoType.NotSet != index)
1548 {
1562 - row[6] = YesNoType.Yes == index ? 1 : 0;
1549 + row.Set(6, YesNoType.Yes == index ? 1 : 0);
1550 }
1564 - row[7] = defaultDocuments;
1551 + row.Set(7, defaultDocuments);
1552 if (YesNoType.NotSet != aspDetailedError)
1553 {
1567 - row[8] = YesNoType.Yes == aspDetailedError ? 1 : 0;
1554 + row.Set(8, YesNoType.Yes == aspDetailedError ? 1 : 0);
1555 }
1569 - row[9] = httpExpires;
1556 + row.Set(9, httpExpires);
1557 if (CompilerConstants.LongNotSet != cacheControlMaxAge)
1558 {
1572 - row[10] = unchecked((int)cacheControlMaxAge);
1559 + row.Set(10, unchecked((int)cacheControlMaxAge));
1560 }
1574 - row[11] = cacheControlCustom;
1561 + row.Set(11, cacheControlCustom);
1562 if (YesNoType.NotSet != notCustomError)
1563 {
1577 - row[12] = YesNoType.Yes == notCustomError ? 1 : 0;
1564 + row.Set(12, YesNoType.Yes == notCustomError ? 1 : 0);
1565 }
1566
1567 if (accessSSLFlagsSet)
1568 {
1582 - row[13] = accessSSLFlags;
1569 + row.Set(13, accessSSLFlags);
1570 }
1571
1572 if (null != authenticationProviders)
1573 {
1587 - row[14] = authenticationProviders;
1574 + row.Set(14, authenticationProviders);
1575 }
1576 }
1577
1591 - return id;
1578 + return id?.Id;
1579 }
1580
1581 /// <summary>
1582 /// Parses a web error element.
1583 /// </summary>
1597 - /// <param name="node">Element to parse.</param>
1584 + /// <param name="element">Element to parse.</param>
1585 /// <param name="parentType">Type of the parent.</param>
1586 /// <param name="parent">Id of the parent.</param>
1600 - private void ParseWebErrorElement(XElement node, WebErrorParentType parentType, string parent)
1587 + private void ParseWebErrorElement(Intermediate intermediate, IntermediateSection section, XElement element, WebErrorParentType parentType, string parent)
1588 {
1602 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1589 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1590 int errorCode = CompilerConstants.IntegerNotSet;
1591 string file = null;
1592 string url = null;
1593 int subCode = CompilerConstants.IntegerNotSet;
1594
1608 - foreach (XAttribute attrib in node.Attributes())
1595 + foreach (XAttribute attrib in element.Attributes())
1596 {
1597 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1598 {
1599 switch (attrib.Name.LocalName)
1600 {
1601 case "ErrorCode":
1615 - errorCode = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 400, 599);
1602 + errorCode = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 400, 599);
1603 break;
1604 case "File":
1618 - file = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1605 + file = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1606 break;
1607 case "SubCode":
1621 - subCode = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1608 + subCode = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1609 break;
1610 case "URL":
1624 - url = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1611 + url = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1612 break;
1613 default:
1627 - this.Core.UnexpectedAttribute(node, attrib);
1614 + this.ParseHelper.UnexpectedAttribute(element, attrib);
1615 break;
1616 }
1617 }
1618 else
1619 {
1633 - this.Core.ParseExtensionAttribute(node, attrib);
1620 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1621 }
1622 }
1623
1624 if (CompilerConstants.IntegerNotSet == errorCode)
1625 {
1639 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ErrorCode"));
1626 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "ErrorCode"));
1627 errorCode = CompilerConstants.IllegalInteger;
1628 }
1629
1630 if (CompilerConstants.IntegerNotSet == subCode)
1631 {
1645 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "SubCode"));
1632 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "SubCode"));
1633 subCode = CompilerConstants.IllegalInteger;
1634 }
1635
1636 if (String.IsNullOrEmpty(file) && String.IsNullOrEmpty(url))
1637 {
1651 - this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "File", "URL"));
1638 + this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "File", "URL"));
1639 }
1640
1654 - this.Core.ParseForExtensionElements(node);
1641 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
1642
1643 // Reference ConfigureIIs since nothing will happen without it
1657 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
1644 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
1645
1659 - if (!this.Core.EncounteredError)
1646 + if (!this.Messaging.EncounteredError)
1647 {
1661 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebError");
1662 - row[0] = errorCode;
1663 - row[1] = subCode;
1664 - row[2] = (int)parentType;
1665 - row[3] = parent;
1666 - row[4] = file;
1667 - row[5] = url;
1648 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebError");
1649 + row.Set(0, errorCode);
1650 + row.Set(1, subCode);
1651 + row.Set(2, (int)parentType);
1652 + row.Set(3, parent);
1653 + row.Set(4, file);
1654 + row.Set(5, url);
1655 }
1656 }
1657
1658 /// <summary>
1659 /// Parses a web filter element.
1660 /// </summary>
1674 - /// <param name="node">Element to parse.</param>
1661 + /// <param name="element">Element to parse.</param>
1662 /// <param name="componentId">Identifier of parent component.</param>
1663 /// <param name="parentWeb">Optional identifier of parent web site.</param>
1677 - private void ParseWebFilterElement(XElement node, string componentId, string parentWeb)
1664 + private void ParseWebFilterElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string parentWeb)
1665 {
1679 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1680 - string id = null;
1666 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1667 + Identifier id = null;
1668 string description = null;
1669 int flags = 0;
1670 int loadOrder = CompilerConstants.IntegerNotSet;
1671 string name = null;
1672 string path = null;
1673
1687 - foreach (XAttribute attrib in node.Attributes())
1674 + foreach (XAttribute attrib in element.Attributes())
1675 {
1676 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1677 {
1678 switch (attrib.Name.LocalName)
1679 {
1680 case "Id":
1694 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1681 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1682 break;
1683 case "Description":
1697 - description = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1684 + description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1685 break;
1686 case "Flags":
1700 - flags = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1687 + flags = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue);
1688 break;
1689 case "LoadOrder":
1703 - string loadOrderValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1690 + string loadOrderValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1691 if (0 < loadOrderValue.Length)
1692 {
1693 switch (loadOrderValue)
@@ -1712,70 +1699,69 @@ namespace WixToolset.Extensions
1699 loadOrder = -1;
1700 break;
1701 default:
1715 - loadOrder = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
1702 + loadOrder = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
1703 break;
1704 }
1705 }
1706 break;
1707 case "Name":
1721 - name = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1708 + name = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1709 break;
1710 case "Path":
1724 - path = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1711 + path = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1712 break;
1713 case "WebSite":
1714 if (null != parentWeb)
1715 {
1729 - this.Core.OnMessage(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, node.Name.LocalName));
1716 + this.Messaging.Write(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, element.Name.LocalName));
1717 }
1718
1732 - parentWeb = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1733 - this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebSite", parentWeb);
1719 + parentWeb = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1720 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebSite", parentWeb);
1721 break;
1722 default:
1736 - this.Core.UnexpectedAttribute(node, attrib);
1723 + this.ParseHelper.UnexpectedAttribute(element, attrib);
1724 break;
1725 }
1726 }
1727 else
1728 {
1742 - this.Core.ParseExtensionAttribute(node, attrib);
1729 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1730 }
1731 }
1732
1733 if (null == id)
1734 {
1748 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1735 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1736 }
1737
1738 if (null == name)
1739 {
1753 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
1740 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
1741 }
1742
1743 if (null == path)
1744 {
1758 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Path"));
1745 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Path"));
1746 }
1747
1761 - this.Core.ParseForExtensionElements(node);
1748 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
1749
1750 // Reference ConfigureIIs since nothing will happen without it
1764 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
1765 -
1766 - if (!this.Core.EncounteredError)
1767 - {
1768 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsFilter");
1769 - row[0] = id;
1770 - row[1] = name;
1771 - row[2] = componentId;
1772 - row[3] = path;
1773 - row[4] = parentWeb;
1774 - row[5] = description;
1775 - row[6] = flags;
1751 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
1752 +
1753 + if (!this.Messaging.EncounteredError)
1754 + {
1755 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsFilter", id);
1756 + row.Set(1, name);
1757 + row.Set(2, componentId);
1758 + row.Set(3, path);
1759 + row.Set(4, parentWeb);
1760 + row.Set(5, description);
1761 + row.Set(6, flags);
1762 if (CompilerConstants.IntegerNotSet != loadOrder)
1763 {
1778 - row[7] = loadOrder;
1764 + row.Set(7, loadOrder);
1765 }
1766 }
1767 }
@@ -1783,24 +1769,24 @@ namespace WixToolset.Extensions
1769 /// <summary>
1770 /// Parses web log element.
1771 /// </summary>
1786 - /// <param name="node">Node to be parsed.</param>
1787 - private void ParseWebLogElement(XElement node)
1772 + /// <param name="element">Node to be parsed.</param>
1773 + private void ParseWebLogElement(Intermediate intermediate, IntermediateSection section, XElement element)
1774 {
1789 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1790 - string id = null;
1775 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1776 + Identifier id = null;
1777 string type = null;
1778
1793 - foreach (XAttribute attrib in node.Attributes())
1779 + foreach (XAttribute attrib in element.Attributes())
1780 {
1781 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1782 {
1783 switch (attrib.Name.LocalName)
1784 {
1785 case "Id":
1800 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1786 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1787 break;
1788 case "Type":
1803 - string typeValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1789 + string typeValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1790 if (0 < typeValue.Length)
1791 {
1792 switch (typeValue)
@@ -1821,84 +1807,83 @@ namespace WixToolset.Extensions
1807 type = "W3C Extended Log File Format";
1808 break;
1809 default:
1824 - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Type", typeValue, "IIS", "NCSA", "none", "ODBC", "W3C"));
1810 + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "Type", typeValue, "IIS", "NCSA", "none", "ODBC", "W3C"));
1811 break;
1812 }
1813 }
1814 break;
1815 default:
1830 - this.Core.UnexpectedAttribute(node, attrib);
1816 + this.ParseHelper.UnexpectedAttribute(element, attrib);
1817 break;
1818 }
1819 }
1820 else
1821 {
1836 - this.Core.ParseExtensionAttribute(node, attrib);
1822 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1823 }
1824 }
1825
1826 if (null == id)
1827 {
1842 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1828 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1829 }
1830
1831 if (null == type)
1832 {
1847 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Type"));
1833 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Type"));
1834 }
1835
1850 - this.Core.ParseForExtensionElements(node);
1836 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
1837
1852 - if (!this.Core.EncounteredError)
1838 + if (!this.Messaging.EncounteredError)
1839 {
1854 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebLog");
1855 - row[0] = id;
1856 - row[1] = type;
1840 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebLog", id);
1841 + row.Set(1, type);
1842 }
1843 }
1844
1845 /// <summary>
1846 /// Parses a web property element.
1847 /// </summary>
1863 - /// <param name="node">Element to parse.</param>
1848 + /// <param name="element">Element to parse.</param>
1849 /// <param name="componentId">Identifier for parent component.</param>
1865 - private void ParseWebPropertyElement(XElement node, string componentId)
1850 + private void ParseWebPropertyElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId)
1851 {
1867 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1868 - string id = null;
1852 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1853 + Identifier id = null;
1854 string value = null;
1855
1871 - foreach (XAttribute attrib in node.Attributes())
1856 + foreach (XAttribute attrib in element.Attributes())
1857 {
1858 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1859 {
1860 switch (attrib.Name.LocalName)
1861 {
1862 case "Id":
1878 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1863 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1864 break;
1865 case "Value":
1881 - value = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1866 + value = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1867 break;
1868 default:
1884 - this.Core.UnexpectedAttribute(node, attrib);
1869 + this.ParseHelper.UnexpectedAttribute(element, attrib);
1870 break;
1871 }
1872 }
1873 else
1874 {
1890 - this.Core.ParseExtensionAttribute(node, attrib);
1875 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1876 }
1877 }
1878
1894 - switch (id)
1879 + switch (id?.Id)
1880 {
1881 case "ETagChangeNumber":
1882 case "MaxGlobalBandwidth":
1883 // Must specify a value for these
1884 if (null == value)
1885 {
1901 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Value", "Id", id));
1886 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Value", "Id", id.Id));
1887 }
1888 break;
1889 case "IIs5IsolationMode":
@@ -1906,54 +1891,53 @@ namespace WixToolset.Extensions
1891 // Can't specify a value for these
1892 if (null != value)
1893 {
1909 - this.Core.OnMessage(WixErrors.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "Value", "Id", id));
1894 + this.Messaging.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, element.Name.LocalName, "Value", "Id", id.Id));
1895 }
1896 break;
1897 default:
1913 - this.Core.OnMessage(WixErrors.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Id", id, "ETagChangeNumber", "IIs5IsolationMode", "LogInUTF8", "MaxGlobalBandwidth"));
1898 + this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, element.Name.LocalName, "Id", id?.Id, "ETagChangeNumber", "IIs5IsolationMode", "LogInUTF8", "MaxGlobalBandwidth"));
1899 break;
1900 }
1901
1917 - this.Core.ParseForExtensionElements(node);
1902 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
1903
1904 // Reference ConfigureIIs since nothing will happen without it
1920 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
1905 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
1906
1922 - if (!this.Core.EncounteredError)
1907 + if (!this.Messaging.EncounteredError)
1908 {
1924 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsProperty");
1925 - row[0] = id;
1926 - row[1] = componentId;
1927 - row[2] = 0;
1928 - row[3] = value;
1909 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsProperty", id);
1910 + row.Set(1, componentId);
1911 + row.Set(2, 0);
1912 + row.Set(3, value);
1913 }
1914 }
1915
1916 /// <summary>
1917 /// Parses a web service extension element.
1918 /// </summary>
1935 - /// <param name="node">Element to parse.</param>
1919 + /// <param name="element">Element to parse.</param>
1920 /// <param name="componentId">Identifier for parent component.</param>
1937 - private void ParseWebServiceExtensionElement(XElement node, string componentId)
1921 + private void ParseWebServiceExtensionElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId)
1922 {
1939 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
1940 - string id = null;
1923 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
1924 + Identifier id = null;
1925 int attributes = 0;
1926 string description = null;
1927 string file = null;
1928 string group = null;
1929
1946 - foreach (XAttribute attrib in node.Attributes())
1930 + foreach (XAttribute attrib in element.Attributes())
1931 {
1932 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
1933 {
1934 switch (attrib.Name.LocalName)
1935 {
1936 case "Id":
1953 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
1937 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
1938 break;
1939 case "Allow":
1956 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1940 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1941 {
1942 attributes |= 1;
1943 }
@@ -1963,16 +1947,16 @@ namespace WixToolset.Extensions
1947 }
1948 break;
1949 case "Description":
1966 - description = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1950 + description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1951 break;
1952 case "File":
1969 - file = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1953 + file = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1954 break;
1955 case "Group":
1972 - group = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
1956 + group = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
1957 break;
1958 case "UIDeletable":
1975 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1959 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
1960 {
1961 attributes |= 2;
1962 }
@@ -1982,52 +1966,51 @@ namespace WixToolset.Extensions
1966 }
1967 break;
1968 default:
1985 - this.Core.UnexpectedAttribute(node, attrib);
1969 + this.ParseHelper.UnexpectedAttribute(element, attrib);
1970 break;
1971 }
1972 }
1973 else
1974 {
1991 - this.Core.ParseExtensionAttribute(node, attrib);
1975 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
1976 }
1977 }
1978
1979 if (null == id)
1980 {
1997 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
1981 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
1982 }
1983
1984 if (null == file)
1985 {
2002 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "File"));
1986 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "File"));
1987 }
1988
2005 - this.Core.ParseForExtensionElements(node);
1989 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
1990
1991 // Reference ConfigureIIs since nothing will happen without it
2008 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
1992 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
1993
2010 - if (!this.Core.EncounteredError)
1994 + if (!this.Messaging.EncounteredError)
1995 {
2012 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebServiceExtension");
2013 - row[0] = id;
2014 - row[1] = componentId;
2015 - row[2] = file;
2016 - row[3] = description;
2017 - row[4] = group;
2018 - row[5] = attributes;
1996 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebServiceExtension", id);
1997 + row.Set(1, componentId);
1998 + row.Set(2, file);
1999 + row.Set(3, description);
2000 + row.Set(4, group);
2001 + row.Set(5, attributes);
2002 }
2003 }
2004
2005 /// <summary>
2006 /// Parses a web site element.
2007 /// </summary>
2025 - /// <param name="node">Element to parse.</param>
2008 + /// <param name="element">Element to parse.</param>
2009 /// <param name="componentId">Optional identifier of parent component.</param>
2027 - private void ParseWebSiteElement(XElement node, string componentId)
2010 + private void ParseWebSiteElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId)
2011 {
2029 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
2030 - string id = null;
2012 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
2013 + Identifier id = null;
2014 string application = null;
2015 int attributes = 0;
2016 int connectionTimeout = CompilerConstants.IntegerNotSet;
@@ -2040,22 +2023,22 @@ namespace WixToolset.Extensions
2023 int sequence = CompilerConstants.IntegerNotSet;
2024 int state = CompilerConstants.IntegerNotSet;
2025
2043 - foreach (XAttribute attrib in node.Attributes())
2026 + foreach (XAttribute attrib in element.Attributes())
2027 {
2028 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
2029 {
2030 switch (attrib.Name.LocalName)
2031 {
2032 case "Id":
2050 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2033 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
2034 break;
2035 case "AutoStart":
2036 if (null == componentId)
2037 {
2055 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2038 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2039 }
2040
2058 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2041 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2042 {
2043 state = 2;
2044 }
@@ -2067,10 +2050,10 @@ namespace WixToolset.Extensions
2050 case "ConfigureIfExists":
2051 if (null == componentId)
2052 {
2070 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2053 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2054 }
2055
2073 - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2056 + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2057 {
2058 attributes &= ~2;
2059 }
@@ -2080,41 +2063,41 @@ namespace WixToolset.Extensions
2063 }
2064 break;
2065 case "ConnectionTimeout":
2083 - connectionTimeout = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
2066 + connectionTimeout = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue);
2067 break;
2068 case "Description":
2086 - description = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2069 + description = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2070 break;
2071 case "Directory":
2089 - directory = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2090 - this.Core.CreateSimpleReference(sourceLineNumbers, "Directory", directory);
2072 + directory = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2073 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Directory", directory);
2074 break;
2075 case "DirProperties":
2076 if (null == componentId)
2077 {
2095 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2078 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2079 }
2080
2098 - dirProperties = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2081 + dirProperties = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2082 break;
2083 case "SiteId":
2101 - siteId = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2084 + siteId = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2085 if ("*" == siteId)
2086 {
2087 siteId = "-1";
2088 }
2089 break;
2090 case "Sequence":
2108 - sequence = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
2091 + sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 1, short.MaxValue);
2092 break;
2093 case "StartOnInstall":
2094 if (null == componentId)
2095 {
2113 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2096 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2097 }
2098
2099 // when state is set to 2 it implies 1, so don't set it to 1
2117 - if (2 != state && YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2100 + if (2 != state && YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib))
2101 {
2102 state = 1;
2103 }
@@ -2126,71 +2109,71 @@ namespace WixToolset.Extensions
2109 case "WebApplication":
2110 if (null == componentId)
2111 {
2129 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2112 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2113 }
2114
2132 - application = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2115 + application = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2116 break;
2117 case "WebLog":
2118 if (null == componentId)
2119 {
2137 - this.Core.OnMessage(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName));
2120 + this.Messaging.Write(IIsErrors.IllegalAttributeWithoutComponent(sourceLineNumbers, element.Name.LocalName, attrib.Name.LocalName));
2121 }
2122
2140 - log = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2141 - this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebLog", log);
2123 + log = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2124 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebLog", log);
2125 break;
2126 default:
2144 - this.Core.UnexpectedAttribute(node, attrib);
2127 + this.ParseHelper.UnexpectedAttribute(element, attrib);
2128 break;
2129 }
2130 }
2131 else
2132 {
2150 - this.Core.ParseExtensionAttribute(node, attrib);
2133 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
2134 }
2135 }
2136
2137 if (null == id)
2138 {
2156 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2139 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
2140 }
2141
2142 if (null == description)
2143 {
2161 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Description"));
2144 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Description"));
2145 }
2146
2147 if (null == directory && null != componentId)
2148 {
2166 - this.Core.OnMessage(IIsErrors.RequiredAttributeUnderComponent(sourceLineNumbers, node.Name.LocalName, "Directory"));
2149 + this.Messaging.Write(IIsErrors.RequiredAttributeUnderComponent(sourceLineNumbers, element.Name.LocalName, "Directory"));
2150 }
2151
2169 - foreach (XElement child in node.Elements())
2152 + foreach (XElement child in element.Elements())
2153 {
2154 if (this.Namespace == child.Name.Namespace)
2155 {
2173 - SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
2156 + SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child);
2157 switch (child.Name.LocalName)
2158 {
2159 case "CertificateRef":
2160 if (null == componentId)
2161 {
2179 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2162 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2163 }
2164
2182 - this.ParseCertificateRefElement(child, id);
2165 + this.ParseCertificateRefElement(intermediate, section, child, id?.Id);
2166 break;
2167 case "HttpHeader":
2168 if (null == componentId)
2169 {
2187 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2170 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2171 }
2172
2190 - this.ParseHttpHeaderElement(child, HttpHeaderParentType.WebSite, id);
2173 + this.ParseHttpHeaderElement(intermediate, section, child, HttpHeaderParentType.WebSite, id?.Id);
2174 break;
2175 case "WebAddress":
2193 - string address = this.ParseWebAddressElement(child, id);
2176 + string address = this.ParseWebAddressElement(intermediate, section, child, id?.Id);
2177 if (null == keyAddress)
2178 {
2179 keyAddress = address;
@@ -2199,279 +2182,278 @@ namespace WixToolset.Extensions
2182 case "WebApplication":
2183 if (null == componentId)
2184 {
2202 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2185 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2186 }
2187
2188 if (null != application)
2189 {
2207 - this.Core.OnMessage(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, node.Name.LocalName));
2190 + this.Messaging.Write(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, element.Name.LocalName));
2191 }
2192
2210 - application = this.ParseWebApplicationElement(child);
2193 + application = this.ParseWebApplicationElement(intermediate, section, child);
2194 break;
2195 case "WebDir":
2196 if (null == componentId)
2197 {
2215 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2198 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2199 }
2200
2218 - this.ParseWebDirElement(child, componentId, id);
2201 + this.ParseWebDirElement(intermediate, section, child, componentId, id?.Id);
2202 break;
2203 case "WebDirProperties":
2204 if (null == componentId)
2205 {
2223 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2206 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2207 }
2208
2226 - string childWebDirProperties = this.ParseWebDirPropertiesElement(child);
2209 + string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child);
2210 if (null == dirProperties)
2211 {
2212 dirProperties = childWebDirProperties;
2213 }
2214 else
2215 {
2233 - this.Core.OnMessage(WixErrors.IllegalParentAttributeWhenNested(sourceLineNumbers, "WebSite", "DirProperties", child.Name.LocalName));
2216 + this.Messaging.Write(ErrorMessages.IllegalParentAttributeWhenNested(sourceLineNumbers, "WebSite", "DirProperties", child.Name.LocalName));
2217 }
2218 break;
2219 case "WebError":
2220 if (null == componentId)
2221 {
2239 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2222 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2223 }
2224
2242 - this.ParseWebErrorElement(child, WebErrorParentType.WebSite, id);
2225 + this.ParseWebErrorElement(intermediate, section, child, WebErrorParentType.WebSite, id?.Id);
2226 break;
2227 case "WebFilter":
2228 if (null == componentId)
2229 {
2247 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2230 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2231 }
2232
2250 - this.ParseWebFilterElement(child, componentId, id);
2233 + this.ParseWebFilterElement(intermediate, section, child, componentId, id?.Id);
2234 break;
2235 case "WebVirtualDir":
2236 if (null == componentId)
2237 {
2255 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2238 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2239 }
2240
2258 - this.ParseWebVirtualDirElement(child, componentId, id, null);
2241 + this.ParseWebVirtualDirElement(intermediate, section, child, componentId, id?.Id, null);
2242 break;
2243 case "MimeMap":
2261 - this.ParseMimeMapElement(child, id, MimeMapParentType.WebSite);
2244 + this.ParseMimeMapElement(intermediate, section, child, id?.Id, MimeMapParentType.WebSite);
2245 break;
2246 default:
2264 - this.Core.UnexpectedElement(node, child);
2247 + this.ParseHelper.UnexpectedElement(element, child);
2248 break;
2249 }
2250 }
2251 else
2252 {
2270 - this.Core.ParseExtensionElement(node, child);
2253 + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
2254 }
2255 }
2256
2257
2258 if (null == keyAddress)
2259 {
2277 - this.Core.OnMessage(WixErrors.ExpectedElement(sourceLineNumbers, node.Name.LocalName, "WebAddress"));
2260 + this.Messaging.Write(ErrorMessages.ExpectedElement(sourceLineNumbers, element.Name.LocalName, "WebAddress"));
2261 }
2262
2263 if (null != application)
2264 {
2282 - this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebApplication", application);
2265 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebApplication", application);
2266 }
2267
2268 if (null != dirProperties)
2269 {
2287 - this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebDirProperties", dirProperties);
2270 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebDirProperties", dirProperties);
2271 }
2272
2273 if (null != componentId)
2274 {
2275 // Reference ConfigureIIs since nothing will happen without it
2293 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
2276 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
2277 }
2278
2296 - if (!this.Core.EncounteredError)
2279 + if (!this.Messaging.EncounteredError)
2280 {
2298 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebSite");
2299 - row[0] = id;
2300 - row[1] = componentId;
2301 - row[2] = description;
2281 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebSite", id);
2282 + row.Set(1, componentId);
2283 + row.Set(2, description);
2284 if (CompilerConstants.IntegerNotSet != connectionTimeout)
2285 {
2304 - row[3] = connectionTimeout;
2286 + row.Set(3, connectionTimeout);
2287 }
2306 - row[4] = directory;
2288 + row.Set(4, directory);
2289 if (CompilerConstants.IntegerNotSet != state)
2290 {
2309 - row[5] = state;
2291 + row.Set(5, state);
2292 }
2293
2294 if (0 != attributes)
2295 {
2314 - row[6] = attributes;
2296 + row.Set(6, attributes);
2297 }
2316 - row[7] = keyAddress;
2317 - row[8] = dirProperties;
2318 - row[9] = application;
2298 + row.Set(7, keyAddress);
2299 + row.Set(8, dirProperties);
2300 + row.Set(9, application);
2301 if (CompilerConstants.IntegerNotSet != sequence)
2302 {
2321 - row[10] = sequence;
2303 + row.Set(10, sequence);
2304 }
2323 - row[11] = log;
2324 - row[12] = siteId;
2305 + row.Set(11, log);
2306 + row.Set(12, siteId);
2307 }
2308 }
2309
2310 /// <summary>
2311 /// Parses a HTTP Header element.
2312 /// </summary>
2331 - /// <param name="node">Element to parse.</param>
2313 + /// <param name="element">Element to parse.</param>
2314 /// <param name="parentType">Type of the parent.</param>
2315 /// <param name="parent">Id of the parent.</param>
2334 - private void ParseHttpHeaderElement(XElement node, HttpHeaderParentType parentType, string parent)
2316 + private void ParseHttpHeaderElement(Intermediate intermediate, IntermediateSection section, XElement element, HttpHeaderParentType parentType, string parent)
2317 {
2336 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
2318 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
2319 Identifier id = null;
2320 string headerName = null;
2321 string headerValue = null;
2322
2341 - foreach (XAttribute attrib in node.Attributes())
2323 + foreach (XAttribute attrib in element.Attributes())
2324 {
2325 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
2326 {
2327 switch (attrib.Name.LocalName)
2328 {
2329 case "Id":
2348 - id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
2330 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
2331 break;
2332 case "Name":
2351 - headerName = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2333 + headerName = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2334 break;
2335 case "Value":
2354 - headerValue = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2336 + headerValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2337 break;
2338 default:
2357 - this.Core.UnexpectedAttribute(node, attrib);
2339 + this.ParseHelper.UnexpectedAttribute(element, attrib);
2340 break;
2341 }
2342 }
2343 else
2344 {
2363 - this.Core.ParseExtensionAttribute(node, attrib);
2345 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
2346 }
2347 }
2348
2349 if (null == headerName)
2350 {
2369 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Name"));
2351 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name"));
2352 }
2353 else if (null == id)
2354 {
2373 - id = this.Core.CreateIdentifierFromFilename(headerName);
2355 + id = this.ParseHelper.CreateIdentifierFromFilename(headerName);
2356 }
2357
2376 - this.Core.ParseForExtensionElements(node);
2358 + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element);
2359
2360 // Reference ConfigureIIs since nothing will happen without it
2379 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
2380 -
2381 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsHttpHeader", id);
2382 - row[1] = (int)parentType;
2383 - row[2] = parent;
2384 - row[3] = headerName;
2385 - row[4] = headerValue;
2386 - row[5] = 0;
2387 - row[6] = null;
2361 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
2362 +
2363 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsHttpHeader", id);
2364 + row.Set(1, (int)parentType);
2365 + row.Set(2, parent);
2366 + row.Set(3, headerName);
2367 + row.Set(4, headerValue);
2368 + row.Set(5, 0);
2369 + //row.Set(6, null);
2370 }
2371
2372 /// <summary>
2373 /// Parses a virtual directory element.
2374 /// </summary>
2393 - /// <param name="node">Element to parse.</param>
2375 + /// <param name="element">Element to parse.</param>
2376 /// <param name="componentId">Identifier of parent component.</param>
2377 /// <param name="parentWeb">Identifier of parent web site.</param>
2378 /// <param name="parentAlias">Alias of the parent web site.</param>
2397 - private void ParseWebVirtualDirElement(XElement node, string componentId, string parentWeb, string parentAlias)
2379 + private void ParseWebVirtualDirElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string parentWeb, string parentAlias)
2380 {
2399 - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
2400 - string id = null;
2381 + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element);
2382 + Identifier id = null;
2383 string alias = null;
2384 string application = null;
2385 string directory = null;
2386 string dirProperties = null;
2387
2406 - foreach (XAttribute attrib in node.Attributes())
2388 + foreach (XAttribute attrib in element.Attributes())
2389 {
2390 if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace)
2391 {
2392 switch (attrib.Name.LocalName)
2393 {
2394 case "Id":
2413 - id = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2395 + id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib);
2396 break;
2397 case "Alias":
2416 - alias = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2398 + alias = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2399 break;
2400 case "Directory":
2419 - directory = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2420 - this.Core.CreateSimpleReference(sourceLineNumbers, "Directory", directory);
2401 + directory = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2402 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Directory", directory);
2403 break;
2404 case "DirProperties":
2423 - dirProperties = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2405 + dirProperties = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2406 break;
2407 case "WebApplication":
2426 - application = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
2408 + application = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2409 break;
2410 case "WebSite":
2411 if (null != parentWeb)
2412 {
2431 - this.Core.OnMessage(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, node.Name.LocalName));
2413 + this.Messaging.Write(IIsErrors.WebSiteAttributeUnderWebSite(sourceLineNumbers, element.Name.LocalName));
2414 }
2415
2434 - parentWeb = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2435 - this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebSite", parentWeb);
2416 + parentWeb = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
2417 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebSite", parentWeb);
2418 break;
2419 default:
2438 - this.Core.UnexpectedAttribute(node, attrib);
2420 + this.ParseHelper.UnexpectedAttribute(element, attrib);
2421 break;
2422 }
2423 }
2424 else
2425 {
2444 - this.Core.ParseExtensionAttribute(node, attrib);
2426 + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, element, attrib);
2427 }
2428 }
2429
2430 if (null == id)
2431 {
2450 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Id"));
2432 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id"));
2433 }
2434
2435 if (null == alias)
2436 {
2455 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Alias"));
2437 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Alias"));
2438 }
2439 else if (-1 != alias.IndexOf("\\", StringComparison.Ordinal))
2440 {
2459 - this.Core.OnMessage(IIsErrors.IllegalCharacterInAttributeValue(sourceLineNumbers, node.Name.LocalName, "Alias", alias, '\\'));
2441 + this.Messaging.Write(IIsErrors.IllegalCharacterInAttributeValue(sourceLineNumbers, element.Name.LocalName, "Alias", alias, '\\'));
2442 }
2443
2444 if (null == directory)
2445 {
2464 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "Directory"));
2446 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Directory"));
2447 }
2448
2449 if (null == parentWeb)
2450 {
2469 - this.Core.OnMessage(WixErrors.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "WebSite"));
2451 + this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "WebSite"));
2452 }
2453
2454 if (null == componentId)
2455 {
2474 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(sourceLineNumbers, node.Name.LocalName));
2456 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(sourceLineNumbers, element.Name.LocalName));
2457 }
2458
2459 if (null != parentAlias)
@@ -2479,84 +2461,83 @@ namespace WixToolset.Extensions
2461 alias = String.Concat(parentAlias, "/", alias);
2462 }
2463
2482 - foreach (XElement child in node.Elements())
2464 + foreach (XElement child in element.Elements())
2465 {
2466 if (this.Namespace == child.Name.Namespace)
2467 {
2486 - SourceLineNumber childSourceLineNumbers = Preprocessor.GetSourceLineNumbers(child);
2468 + SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child);
2469 switch (child.Name.LocalName)
2470 {
2471 case "WebApplication":
2472 if (null != application)
2473 {
2492 - this.Core.OnMessage(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, node.Name.LocalName));
2474 + this.Messaging.Write(IIsErrors.WebApplicationAlreadySpecified(childSourceLineNumbers, element.Name.LocalName));
2475 }
2476
2495 - application = this.ParseWebApplicationElement(child);
2477 + application = this.ParseWebApplicationElement(intermediate, section, child);
2478 break;
2479 case "WebDirProperties":
2480 if (null == componentId)
2481 {
2500 - this.Core.OnMessage(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2482 + this.Messaging.Write(IIsErrors.IllegalElementWithoutComponent(childSourceLineNumbers, child.Name.LocalName));
2483 }
2484
2503 - string childWebDirProperties = this.ParseWebDirPropertiesElement(child);
2485 + string childWebDirProperties = this.ParseWebDirPropertiesElement(intermediate, section, child);
2486 if (null == dirProperties)
2487 {
2488 dirProperties = childWebDirProperties;
2489 }
2490 else
2491 {
2510 - this.Core.OnMessage(WixErrors.IllegalAttributeWhenNested(sourceLineNumbers, child.Name.LocalName, "DirProperties", child.Name.LocalName));
2492 + this.Messaging.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, child.Name.LocalName, "DirProperties", child.Name.LocalName));
2493 }
2494 break;
2495
2496 case "WebError":
2515 - this.ParseWebErrorElement(child, WebErrorParentType.WebVirtualDir, id);
2497 + this.ParseWebErrorElement(intermediate, section, child, WebErrorParentType.WebVirtualDir, id?.Id);
2498 break;
2499 case "WebVirtualDir":
2518 - this.ParseWebVirtualDirElement(child, componentId, parentWeb, alias);
2500 + this.ParseWebVirtualDirElement(intermediate, section, child, componentId, parentWeb, alias);
2501 break;
2502 case "HttpHeader":
2521 - this.ParseHttpHeaderElement(child, HttpHeaderParentType.WebVirtualDir, id);
2503 + this.ParseHttpHeaderElement(intermediate, section, child, HttpHeaderParentType.WebVirtualDir, id?.Id);
2504 break;
2505 case "MimeMap":
2524 - this.ParseMimeMapElement(child, id, MimeMapParentType.WebVirtualDir);
2506 + this.ParseMimeMapElement(intermediate, section, child, id?.Id, MimeMapParentType.WebVirtualDir);
2507 break;
2508 default:
2527 - this.Core.UnexpectedElement(node, child);
2509 + this.ParseHelper.UnexpectedElement(element, child);
2510 break;
2511 }
2512 }
2513 else
2514 {
2533 - this.Core.ParseExtensionElement(node, child);
2515 + this.ParseHelper.ParseExtensionElement(this.Context.Extensions, intermediate, section, element, child);
2516 }
2517 }
2518
2519 if (null != dirProperties)
2520 {
2539 - this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebDirProperties", dirProperties);
2521 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebDirProperties", dirProperties);
2522 }
2523
2524 if (null != application)
2525 {
2544 - this.Core.CreateSimpleReference(sourceLineNumbers, "IIsWebApplication", application);
2526 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "IIsWebApplication", application);
2527 }
2528
2529 // Reference ConfigureIIs since nothing will happen without it
2548 - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "ConfigureIIs");
2549 -
2550 - if (!this.Core.EncounteredError)
2551 - {
2552 - Row row = this.Core.CreateRow(sourceLineNumbers, "IIsWebVirtualDir");
2553 - row[0] = id;
2554 - row[1] = componentId;
2555 - row[2] = parentWeb;
2556 - row[3] = alias;
2557 - row[4] = directory;
2558 - row[5] = dirProperties;
2559 - row[6] = application;
2530 + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "ConfigureIIs");
2531 +
2532 + if (!this.Messaging.EncounteredError)
2533 + {
2534 + var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "IIsWebVirtualDir", id);
2535 + row.Set(1, componentId);
2536 + row.Set(2, parentWeb);
2537 + row.Set(3, alias);
2538 + row.Set(4, directory);
2539 + row.Set(5, dirProperties);
2540 + row.Set(6, application);
2541 }
2542 }
2543 }
src/wixext/IIsDecompiler.cs
+3 -1
@@ -1,7 +1,8 @@
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.Extensions
3 +namespace WixToolset.Iis
4 {
5 +#if TODO_CONSIDER_DECOMPILER
6 using System;
7 using System.Collections;
8 using System.Globalization;
@@ -1544,4 +1545,5 @@ namespace WixToolset.Extensions
1545 }
1546 }
1547 }
1548 +#endif
1549 }
src/wixext/IIsExtensionData.cs
+8 -42
@@ -1,64 +1,30 @@
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.Extensions
3 +namespace WixToolset.Iis
4 {
5 - using System;
6 - using System.Reflection;
5 using WixToolset.Data;
6 using WixToolset.Extensibility;
7
8 /// <summary>
9 /// The WiX Toolset Internet Information Services Extension.
10 /// </summary>
13 - public sealed class IIsExtensionData : ExtensionData
11 + public sealed class IIsExtensionData : BaseExtensionData
12 {
13 /// <summary>
14 /// Gets the default culture.
15 /// </summary>
16 /// <value>The default culture.</value>
19 - public override string DefaultCulture
20 - {
21 - get { return "en-us"; }
22 - }
23 -
24 - /// <summary>
25 - /// Gets the optional table definitions for this extension.
26 - /// </summary>
27 - /// <value>The optional table definitions for this extension.</value>
28 - public override TableDefinitionCollection TableDefinitions
29 - {
30 - get
31 - {
32 - return IIsExtensionData.GetExtensionTableDefinitions();
33 - }
34 - }
35 -
36 - /// <summary>
37 - /// Gets the library associated with this extension.
38 - /// </summary>
39 - /// <param name="tableDefinitions">The table definitions to use while loading the library.</param>
40 - /// <returns>The loaded library.</returns>
41 - public override Library GetLibrary(TableDefinitionCollection tableDefinitions)
42 - {
43 - return IIsExtensionData.GetExtensionLibrary(tableDefinitions);
44 - }
17 + public override string DefaultCulture => "en-US";
18
46 - /// <summary>
47 - /// Internal mechanism to access the extension's table definitions.
48 - /// </summary>
49 - /// <returns>Extension's table definitions.</returns>
50 - internal static TableDefinitionCollection GetExtensionTableDefinitions()
19 + public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition)
20 {
52 - return ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml");
21 + tupleDefinition = null;
22 + return tupleDefinition != null;
23 }
24
55 - /// <summary>
56 - /// Internal mechanism to access the extension's library.
57 - /// </summary>
58 - /// <returns>Extension's library.</returns>
59 - internal static Library GetExtensionLibrary(TableDefinitionCollection tableDefinitions)
25 + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions)
26 {
61 - return ExtensionData.LoadLibraryHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.iis.wixlib", tableDefinitions);
27 + return Intermediate.Load(typeof(IIsExtensionData).Assembly, "WixToolset.Iis.iis.wixlib", tupleDefinitions);
28 }
29 }
30 }
src/wixext/IisErrors.cs new
+70
@@ -0,0 +1,70 @@
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.Iis
4 +{
5 + using System;
6 + using WixToolset.Data;
7 +
8 + public static class IIsErrors
9 + {
10 + public static Message MimeMapExtensionMissingPeriod(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
11 + {
12 + throw new NotImplementedException();
13 + }
14 +
15 + public static Message IllegalAttributeWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
16 + {
17 + throw new NotImplementedException();
18 + }
19 +
20 + public static Message IllegalElementWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName)
21 + {
22 + throw new NotImplementedException();
23 + }
24 +
25 + public static Message OneOfAttributesRequiredUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3, string attributeName4)
26 + {
27 + throw new NotImplementedException();
28 + }
29 +
30 + public static Message WebSiteAttributeUnderWebSite(SourceLineNumber sourceLineNumbers, string elementName)
31 + {
32 + throw new NotImplementedException();
33 + }
34 +
35 + public static Message WebApplicationAlreadySpecified(SourceLineNumber sourceLineNumbers, string elementName)
36 + {
37 + throw new NotImplementedException();
38 + }
39 +
40 + public static Message IllegalCharacterInAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, char illegalCharacter)
41 + {
42 + throw new NotImplementedException();
43 + }
44 +
45 + public static Message DeprecatedBinaryChildElement(SourceLineNumber sourceLineNumbers, string elementName)
46 + {
47 + throw new NotImplementedException();
48 + }
49 +
50 + public static Message WebSiteNotFound(string webSiteDescription)
51 + {
52 + throw new NotImplementedException();
53 + }
54 +
55 + public static Message InsufficientPermissionHarvestWebSite()
56 + {
57 + throw new NotImplementedException();
58 + }
59 +
60 + public static Message CannotHarvestWebSite()
61 + {
62 + throw new NotImplementedException();
63 + }
64 +
65 + public static Message RequiredAttributeUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
66 + {
67 + throw new NotImplementedException();
68 + }
69 + }
70 +}
\ No newline at end of file
src/wixext/IisExtensionFactory.cs new
+18
@@ -0,0 +1,18 @@
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.Iis
4 +{
5 + using System;
6 + using System.Collections.Generic;
7 + using WixToolset.Extensibility;
8 +
9 + public class IisExtensionFactory : BaseExtensionFactory
10 + {
11 + protected override IEnumerable<Type> ExtensionTypes => new[]
12 + {
13 + typeof(IIsCompiler),
14 + typeof(IIsExtensionData),
15 + typeof(IisWindowsInstallerBackendBinderExtension),
16 + };
17 + }
18 +}
src/wixext/IisWindowsInstallerBackendBinderExtension.cs new
+26
@@ -0,0 +1,26 @@
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.Iis
4 +{
5 + using System.Linq;
6 + using System.Xml;
7 + using WixToolset.Data.WindowsInstaller;
8 + using WixToolset.Extensibility;
9 +
10 + public class IisWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension
11 + {
12 + private static readonly TableDefinition[] Tables = LoadTables();
13 +
14 + protected override TableDefinition[] TableDefinitionsForTuples => Tables;
15 +
16 + private static TableDefinition[] LoadTables()
17 + {
18 + using (var resourceStream = typeof(IisWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.Iis.tables.xml"))
19 + using (var reader = XmlReader.Create(resourceStream))
20 + {
21 + var tables = TableDefinitionCollection.Load(reader);
22 + return tables.ToArray();
23 + }
24 + }
25 + }
26 +}
src/wixext/WixToolset.Iis.wixext.csproj new
+36
@@ -0,0 +1,36 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project Sdk="Microsoft.NET.Sdk">
5 + <PropertyGroup>
6 + <TargetFramework>netstandard2.0</TargetFramework>
7 + <RootNamespace>WixToolset.Iis</RootNamespace>
8 + <Description>WiX Toolset Iis Extension</Description>
9 + <Title>WiX Toolset Iis Extension</Title>
10 + <IsTool>true</IsTool>
11 + <ContentTargetFolders>build</ContentTargetFolders>
12 + </PropertyGroup>
13 +
14 + <ItemGroup>
15 + <Content Include="$(MSBuildThisFileName).targets" />
16 + <Content Include="iis.xsd" PackagePath="tools" />
17 + <EmbeddedResource Include="tables.xml" />
18 + <EmbeddedResource Include="$(OutputPath)..\iis.wixlib" />
19 + </ItemGroup>
20 +
21 + <ItemGroup>
22 + <ProjectReference Include="$(WixToolsetRootFolder)\Data\src\WixToolset.Data\WixToolset.Data.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Data\README.md') " />
23 + <PackageReference Include="WixToolset.Data" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Data\README.md') " PrivateAssets="all" />
24 +
25 + <ProjectReference Include="$(WixToolsetRootFolder)\Extensibility\src\WixToolset.Extensibility\WixToolset.Extensibility.csproj" Condition=" '$(Configuration)' == 'Debug' And Exists('$(WixToolsetRootFolder)\Extensibility\README.md') " />
26 + <PackageReference Include="WixToolset.Extensibility" Version="4.0.*" Condition=" '$(Configuration)' == 'Release' Or !Exists('$(WixToolsetRootFolder)\Extensibility\README.md') " PrivateAssets="all" />
27 + </ItemGroup>
28 +
29 + <ItemGroup>
30 + <ProjectReference Include="..\wixlib\iis.wixproj" ReferenceOutputAssembly="false" Condition=" '$(NCrunch)'=='' " />
31 + </ItemGroup>
32 +
33 + <ItemGroup>
34 + <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="all" />
35 + </ItemGroup>
36 +</Project>
src/wixext/WixToolset.Iis.wixext.targets new
+11
@@ -0,0 +1,11 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
5 + <PropertyGroup>
6 + <WixToolsetIisWixextPath Condition=" '$(WixToolsetIisWixextPath)' == '' ">$(MSBuildThisFileDirectory)..\tools\WixToolset.Iis.wixext.dll</WixToolsetIisWixextPath>
7 + </PropertyGroup>
8 + <ItemGroup>
9 + <WixExtension Include="$(WixToolsetIisWixextPath)" />
10 + </ItemGroup>
11 +</Project>
src/wixext/messages.cs deleted
-237
@@ -1,237 +0,0 @@
1 -//------------------------------------------------------------------------------
2 -// <auto-generated>
3 -// This code was generated by a tool.
4 -// Runtime Version:4.0.30319.42000
5 -//
6 -// Changes to this file may cause incorrect behavior and will be lost if
7 -// the code is regenerated.
8 -// </auto-generated>
9 -//------------------------------------------------------------------------------
10 -
11 -namespace WixToolset.Extensions
12 -{
13 - using System;
14 - using System.Reflection;
15 - using System.Resources;
16 - using WixToolset.Data;
17 -
18 -
19 - public class IIsErrorEventArgs : MessageEventArgs
20 - {
21 -
22 - private static ResourceManager resourceManager = new ResourceManager("WixToolset.Extensions.Data.Messages", Assembly.GetExecutingAssembly());
23 -
24 - public IIsErrorEventArgs(SourceLineNumber sourceLineNumbers, int id, string resourceName, params object[] messageArgs) :
25 - base(sourceLineNumbers, id, resourceName, messageArgs)
26 - {
27 - base.ResourceManager = resourceManager;
28 - }
29 - }
30 -
31 - public sealed class IIsErrors
32 - {
33 -
34 - private IIsErrors()
35 - {
36 - }
37 -
38 - public static MessageEventArgs MimeMapExtensionMissingPeriod(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string attributeValue)
39 - {
40 - return new IIsErrorEventArgs(sourceLineNumbers, 5150, "IIsErrors_MimeMapExtensionMissingPeriod_1", elementName, attributeName, attributeValue);
41 - }
42 -
43 - public static MessageEventArgs IllegalAttributeWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
44 - {
45 - return new IIsErrorEventArgs(sourceLineNumbers, 5151, "IIsErrors_IllegalAttributeWithoutComponent_1", elementName, attributeName);
46 - }
47 -
48 - public static MessageEventArgs IllegalElementWithoutComponent(SourceLineNumber sourceLineNumbers, string elementName)
49 - {
50 - return new IIsErrorEventArgs(sourceLineNumbers, 5152, "IIsErrors_IllegalElementWithoutComponent_1", elementName);
51 - }
52 -
53 - public static MessageEventArgs OneOfAttributesRequiredUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName1, string attributeName2, string attributeName3, string attributeName4)
54 - {
55 - return new IIsErrorEventArgs(sourceLineNumbers, 5153, "IIsErrors_OneOfAttributesRequiredUnderComponent_1", elementName, attributeName1, attributeName2, attributeName3, attributeName4);
56 - }
57 -
58 - public static MessageEventArgs WebSiteAttributeUnderWebSite(SourceLineNumber sourceLineNumbers, string elementName)
59 - {
60 - return new IIsErrorEventArgs(sourceLineNumbers, 5154, "IIsErrors_WebSiteAttributeUnderWebSite_1", elementName);
61 - }
62 -
63 - public static MessageEventArgs WebApplicationAlreadySpecified(SourceLineNumber sourceLineNumbers, string elementName)
64 - {
65 - return new IIsErrorEventArgs(sourceLineNumbers, 5155, "IIsErrors_WebApplicationAlreadySpecified_1", elementName);
66 - }
67 -
68 - public static MessageEventArgs IllegalCharacterInAttributeValue(SourceLineNumber sourceLineNumbers, string elementName, string attributeName, string value, char illegalCharacter)
69 - {
70 - return new IIsErrorEventArgs(sourceLineNumbers, 5156, "IIsErrors_IllegalCharacterInAttributeValue_1", elementName, attributeName, value, illegalCharacter);
71 - }
72 -
73 - public static MessageEventArgs DeprecatedBinaryChildElement(SourceLineNumber sourceLineNumbers, string elementName)
74 - {
75 - return new IIsErrorEventArgs(sourceLineNumbers, 5157, "IIsErrors_DeprecatedBinaryChildElement_1", elementName);
76 - }
77 -
78 - public static MessageEventArgs WebSiteNotFound(string webSiteDescription)
79 - {
80 - return new IIsErrorEventArgs(null, 5158, "IIsErrors_WebSiteNotFound_1", webSiteDescription);
81 - }
82 -
83 - public static MessageEventArgs InsufficientPermissionHarvestWebSite()
84 - {
85 - return new IIsErrorEventArgs(null, 5159, "IIsErrors_InsufficientPermissionHarvestWebSite_1");
86 - }
87 -
88 - public static MessageEventArgs CannotHarvestWebSite()
89 - {
90 - return new IIsErrorEventArgs(null, 5160, "IIsErrors_CannotHarvestWebSite_1");
91 - }
92 -
93 - public static MessageEventArgs RequiredAttributeUnderComponent(SourceLineNumber sourceLineNumbers, string elementName, string attributeName)
94 - {
95 - return new IIsErrorEventArgs(sourceLineNumbers, 5161, "IIsErrors_RequiredAttributeUnderComponent_1", elementName, attributeName);
96 - }
97 - }
98 -
99 - public class IIsWarningEventArgs : MessageEventArgs
100 - {
101 -
102 - private static ResourceManager resourceManager = new ResourceManager("WixToolset.Extensions.Data.Messages", Assembly.GetExecutingAssembly());
103 -
104 - public IIsWarningEventArgs(SourceLineNumber sourceLineNumbers, int id, string resourceName, params object[] messageArgs) :
105 - base(sourceLineNumbers, id, resourceName, messageArgs)
106 - {
107 - base.ResourceManager = resourceManager;
108 - }
109 - }
110 -
111 - public sealed class IIsWarnings
112 - {
113 -
114 - private IIsWarnings()
115 - {
116 - }
117 -
118 - public static MessageEventArgs EncounteredNullDirectoryForWebSite(string directory)
119 - {
120 - return new IIsWarningEventArgs(null, 5400, "IIsWarnings_EncounteredNullDirectoryForWebSite_1", directory);
121 - }
122 - }
123 -
124 - public class IIsVerboseEventArgs : MessageEventArgs
125 - {
126 -
127 - private static ResourceManager resourceManager = new ResourceManager("WixToolset.Extensions.Data.Messages", Assembly.GetExecutingAssembly());
128 -
129 - public IIsVerboseEventArgs(SourceLineNumber sourceLineNumbers, int id, string resourceName, params object[] messageArgs) :
130 - base(sourceLineNumbers, id, resourceName, messageArgs)
131 - {
132 - base.ResourceManager = resourceManager;
133 - }
134 - }
135 -
136 - public sealed class IIsVerboses
137 - {
138 -
139 - private IIsVerboses()
140 - {
141 - }
142 - }
143 -}
144 -
145 -/*
146 -<?xml version='1.0' encoding='utf-8'?>
147 -<!-- 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. -->
148 -
149 -
150 -<Messages Namespace="WixToolset.Extensions" Resources="Data.Messages" xmlns="http://schemas.microsoft.com/genmsgs/2004/07/messages">
151 - <Class Name="IIsErrors" ContainerName="IIsErrorEventArgs" BaseContainerName="MessageEventArgs">
152 - <Message Id="MimeMapExtensionMissingPeriod" Number="5150">
153 - <Instance>The {0}/@{1} attribute's value, '{2}', is not a valid mime map extension. It must begin with a period.
154 - <Parameter Type="System.String" Name="elementName" />
155 - <Parameter Type="System.String" Name="attributeName" />
156 - <Parameter Type="System.String" Name="attributeValue" />
157 - </Instance>
158 - </Message>
159 - <Message Id="IllegalAttributeWithoutComponent" Number="5151">
160 - <Instance>The {0}/@{1} attribute cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.
161 - <Parameter Type="System.String" Name="elementName" />
162 - <Parameter Type="System.String" Name="attributeName" />
163 - </Instance>
164 - </Message>
165 - <Message Id="IllegalElementWithoutComponent" Number="5152">
166 - <Instance>The {0} element cannot be specified unless the element has a Component as an ancestor. A {0} that does not have a Component ancestor is not installed.
167 - <Parameter Type="System.String" Name="elementName" />
168 - </Instance>
169 - </Message>
170 - <Message Id="OneOfAttributesRequiredUnderComponent" Number="5153">
171 - <Instance>When nested under a Component, the {0} element must have one of the following attributes specified: {1}, {2}, {3} or {4}.
172 - <Parameter Type="System.String" Name="elementName" />
173 - <Parameter Type="System.String" Name="attributeName1" />
174 - <Parameter Type="System.String" Name="attributeName2" />
175 - <Parameter Type="System.String" Name="attributeName3" />
176 - <Parameter Type="System.String" Name="attributeName4" />
177 - </Instance>
178 - </Message>
179 - <Message Id="WebSiteAttributeUnderWebSite" Number="5154">
180 - <Instance>The {0}/@WebSite attribute cannot be specified when the {0} element is nested under a WebSite element.
181 - <Parameter Type="System.String" Name="elementName" />
182 - </Instance>
183 - </Message>
184 - <Message Id="WebApplicationAlreadySpecified" Number="5155">
185 - <Instance>The {0} element can have at most a single WebApplication specified. This can be either through the WebApplication attribute, or through a nested WebApplication element, but not both.
186 - <Parameter Type="System.String" Name="elementName" />
187 - </Instance>
188 - </Message>
189 - <Message Id="IllegalCharacterInAttributeValue" Number="5156">
190 - <Instance>
191 - The {0}/@{1} attribute's value, '{2}', is invalid. It cannot contain the character '{3}'.
192 - <Parameter Type="System.String" Name="elementName" />
193 - <Parameter Type="System.String" Name="attributeName" />
194 - <Parameter Type="System.String" Name="value" />
195 - <Parameter Type="System.Char" Name="illegalCharacter" />
196 - </Instance>
197 - </Message>
198 - <Message Id="DeprecatedBinaryChildElement" Number="5157">
199 - <Instance>The {0} element contains a deprecated child Binary element. Please move the Binary element under a Fragment, Module, or Product element and set the {0}/@BinaryKey attribute to the value of the Binary/@Id attribute.
200 - <Parameter Type="System.String" Name="elementName" />
201 - </Instance>
202 - </Message>
203 - <Message Id="WebSiteNotFound" Number="5158" SourceLineNumbers="no">
204 - <Instance>
205 - The web site '{0}' could not be found. Please check that the web site exists, and that it is spelled correctly (please note, you must use the correct case).
206 - <Parameter Type="System.String" Name="webSiteDescription" />
207 - </Instance>
208 - </Message>
209 - <Message Id="InsufficientPermissionHarvestWebSite" Number="5159" SourceLineNumbers="no">
210 - <Instance>
211 - Not enough permissions to harvest website. On Windows Vista, you must run Heat elevated.
212 - </Instance>
213 - </Message>
214 - <Message Id="CannotHarvestWebSite" Number="5160" SourceLineNumbers="no">
215 - <Instance>
216 - Cannot harvest website. On Windows Vista, you must install IIS 6 Management Compatibility.
217 - </Instance>
218 - </Message>
219 - <Message Id="RequiredAttributeUnderComponent" Number="5161">
220 - <Instance>The {0}/@{1} attribute must be specified when the element has a Component as an ancestor.
221 - <Parameter Type="System.String" Name="elementName" />
222 - <Parameter Type="System.String" Name="attributeName" />
223 - </Instance>
224 - </Message>
225 - </Class>
226 - <Class Name="IIsWarnings" ContainerName="IIsWarningEventArgs" BaseContainerName="MessageEventArgs">
227 - <Message Id="EncounteredNullDirectoryForWebSite" Number="5400" SourceLineNumbers="no">
228 - <Instance>
229 - Could not harvest website directory: {0}. Please update the output with the appropriate directory ID before using.
230 - <Parameter Type="System.String" Name="directory" />
231 - </Instance>
232 - </Message>
233 - </Class>
234 - <Class Name="IIsVerboses" ContainerName="IIsVerboseEventArgs" BaseContainerName="MessageEventArgs">
235 - </Class>
236 -</Messages>
237 -*/
\ No newline at end of file
src/wixlib/IIsExtension_Platform.wxi
+22 -23
@@ -22,18 +22,18 @@
22 <ProgressText Action="WriteIIS7ConfigChanges$(var.DeferredSuffix)">!(loc.WriteIIS7ConfigChanges)</ProgressText>
23 </UI>
24
25 - <CustomAction Id="ConfigureIIs$(var.Suffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="ConfigureIIs" Execute="immediate" Return="check" SuppressModularization="yes" />
26 - <CustomAction Id="ConfigureIIsExec$(var.DeferredSuffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="ConfigureIIsExec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
27 - <CustomAction Id="StartMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="StartMetabaseTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
28 - <CustomAction Id="RollbackMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="RollbackMetabaseTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
29 - <CustomAction Id="CommitMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="CommitMetabaseTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
30 - <CustomAction Id="WriteMetabaseChanges$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="WriteMetabaseChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
25 + <CustomAction Id="ConfigureIIs$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIs" Execute="immediate" Return="check" SuppressModularization="yes" />
26 + <CustomAction Id="ConfigureIIsExec$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIsExec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
27 + <CustomAction Id="StartMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="StartMetabaseTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
28 + <CustomAction Id="RollbackMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="RollbackMetabaseTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
29 + <CustomAction Id="CommitMetabaseTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="CommitMetabaseTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
30 + <CustomAction Id="WriteMetabaseChanges$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="WriteMetabaseChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
31
32 - <CustomAction Id="ConfigureIIs7Exec$(var.DeferredSuffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="ConfigureIIs7Exec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
33 - <CustomAction Id="StartIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="StartIIS7ConfigTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
34 - <CustomAction Id="RollbackIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="RollbackIIS7ConfigTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
35 - <CustomAction Id="CommitIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="CommitIIS7ConfigTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
36 - <CustomAction Id="WriteIIS7ConfigChanges$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="WriteIIS7ConfigChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
32 + <CustomAction Id="ConfigureIIs7Exec$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="ConfigureIIs7Exec" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
33 + <CustomAction Id="StartIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="StartIIS7ConfigTransaction" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
34 + <CustomAction Id="RollbackIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="RollbackIIS7ConfigTransaction" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
35 + <CustomAction Id="CommitIIS7ConfigTransaction$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="CommitIIS7ConfigTransaction" Impersonate="no" Execute="commit" Return="check" HideTarget="yes" SuppressModularization="yes" />
36 + <CustomAction Id="WriteIIS7ConfigChanges$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="WriteIIS7ConfigChanges" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
37
38 <InstallExecuteSequence>
39 <Custom Action="ConfigureIIs$(var.Suffix)" Before="RegisterUser" Overridable="yes">NOT SKIPCONFIGUREIIS AND VersionNT &gt; 400</Custom>
@@ -41,23 +41,22 @@
41 </Fragment>
42
43 <Fragment>
44 - <Binary Id="IIsSchedule$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))scasched.dll" />
45 - <Binary Id="IIsExecute$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))scaexec.dll" />
44 + <Binary Id="IisCA$(var.Suffix)" SourceFile="!(bindpath.$(var.platform))iisca.dll" />
45 </Fragment>
46
47 <Fragment>
49 - <CustomAction Id="InstallCertificates$(var.Suffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="InstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
50 - <CustomAction Id="UninstallCertificates$(var.Suffix)" BinaryKey="IIsSchedule$(var.Suffix)" DllEntry="UninstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
48 + <CustomAction Id="InstallCertificates$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="InstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
49 + <CustomAction Id="UninstallCertificates$(var.Suffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="UninstallCertificates" Execute="immediate" Return="check" SuppressModularization="yes" />
50
52 - <CustomAction Id="AddUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
53 - <CustomAction Id="AddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
54 - <CustomAction Id="DeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
55 - <CustomAction Id="DeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
51 + <CustomAction Id="AddUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
52 + <CustomAction Id="AddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
53 + <CustomAction Id="DeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
54 + <CustomAction Id="DeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="deferred" Return="check" HideTarget="yes" SuppressModularization="yes" />
55
57 - <CustomAction Id="RollbackAddUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
58 - <CustomAction Id="RollbackAddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
59 - <CustomAction Id="RollbackDeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
60 - <CustomAction Id="RollbackDeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IIsExecute$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
56 + <CustomAction Id="RollbackAddUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
57 + <CustomAction Id="RollbackAddMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="DeleteMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
58 + <CustomAction Id="RollbackDeleteUserCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddUserCertificate" Impersonate="yes" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" TerminalServerAware="yes" />
59 + <CustomAction Id="RollbackDeleteMachineCertificate$(var.DeferredSuffix)" BinaryKey="IisCA$(var.Suffix)" DllEntry="AddMachineCertificate" Impersonate="no" Execute="rollback" Return="check" HideTarget="yes" SuppressModularization="yes" />
60
61 <InstallExecuteSequence>
62 <Custom Action="UninstallCertificates$(var.Suffix)" Before="RemoveFiles" Overridable="yes">VersionNT &gt; 400</Custom>
src/wixlib/caSuffix.wxi new
+28
@@ -0,0 +1,28 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +
4 +<Include xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 + <?ifndef platform ?>
6 + <?error Required value "platform" not defined in include caSuffix.wxi ?>
7 + <?endif ?>
8 +
9 + <?ifdef Suffix ?>
10 + <?undef Suffix ?>
11 + <?undef DeferredSuffix ?>
12 + <?endif ?>
13 +
14 + <?if $(var.platform)="x86" ?>
15 + <?define Suffix="" ?>
16 + <?define DeferredSuffix="" ?>
17 + <?endif ?>
18 +
19 + <?if $(var.platform)="x64" ?>
20 + <?define Suffix="_x64" ?>
21 + <?define DeferredSuffix="_64" ?>
22 + <?endif ?>
23 +
24 + <?if $(var.platform)="arm" ?>
25 + <?define Suffix="_ARM" ?>
26 + <?define DeferredSuffix="_ARM" ?>
27 + <?endif ?>
28 +</Include>
src/wixlib/caerr.wxi new
+96
@@ -0,0 +1,96 @@
1 +<Include>
2 + <?define msierrSecureObjectsFailedCreateSD = 25520?>
3 + <?define msierrSecureObjectsFailedSet = 25521?>
4 + <?define msierrSecureObjectsUnknownType = 25522?>
5 + <?define msierrXmlFileFailedRead = 25530?>
6 + <?define msierrXmlFileFailedOpen = 25531?>
7 + <?define msierrXmlFileFailedSelect = 25532?>
8 + <?define msierrXmlFileFailedSave = 25533?>
9 + <?define msierrXmlConfigFailedRead = 25540?>
10 + <?define msierrXmlConfigFailedOpen = 25541?>
11 + <?define msierrXmlConfigFailedSelect = 25542?>
12 + <?define msierrXmlConfigFailedSave = 25543?>
13 + <?define msierrFirewallCannotConnect = 25580?>
14 + <?define msierrIISCannotConnect = 26001?>
15 + <?define msierrIISFailedReadWebSite = 26002?>
16 + <?define msierrIISFailedReadWebDirs = 26003?>
17 + <?define msierrIISFailedReadVDirs = 26004?>
18 + <?define msierrIISFailedReadFilters = 26005?>
19 + <?define msierrIISFailedReadAppPool = 26006?>
20 + <?define msierrIISFailedReadMimeMap = 26007?>
21 + <?define msierrIISFailedReadProp = 26008?>
22 + <?define msierrIISFailedReadWebSvcExt = 26009?>
23 + <?define msierrIISFailedReadWebError = 26010?>
24 + <?define msierrIISFailedReadHttpHeader = 26011?>
25 + <?define msierrIISFailedSchedTransaction = 26031?>
26 + <?define msierrIISFailedSchedInstallWebs = 26032?>
27 + <?define msierrIISFailedSchedInstallWebDirs = 26033?>
28 + <?define msierrIISFailedSchedInstallVDirs = 26034?>
29 + <?define msierrIISFailedSchedInstallFilters = 26035?>
30 + <?define msierrIISFailedSchedInstallAppPool = 26036?>
31 + <?define msierrIISFailedSchedInstallProp = 26037?>
32 + <?define msierrIISFailedSchedInstallWebSvcExt = 26038?>
33 + <?define msierrIISFailedSchedUninstallWebs = 26051?>
34 + <?define msierrIISFailedSchedUninstallWebDirs = 26052?>
35 + <?define msierrIISFailedSchedUninstallVDirs = 26053?>
36 + <?define msierrIISFailedSchedUninstallFilters = 26054?>
37 + <?define msierrIISFailedSchedUninstallAppPool = 26055?>
38 + <?define msierrIISFailedSchedUninstallProp = 26056?>
39 + <?define msierrIISFailedSchedUninstallWebSvcExt = 26057?>
40 + <?define msierrIISFailedStartTransaction = 26101?>
41 + <?define msierrIISFailedOpenKey = 26102?>
42 + <?define msierrIISFailedCreateKey = 26103?>
43 + <?define msierrIISFailedWriteData = 26104?>
44 + <?define msierrIISFailedCreateApp = 26105?>
45 + <?define msierrIISFailedDeleteKey = 26106?>
46 + <?define msierrIISFailedDeleteApp = 26107?>
47 + <?define msierrIISFailedDeleteValue = 26108?>
48 + <?define msierrIISFailedCommitInUse = 26109?>
49 + <?define msierrSQLFailedCreateDatabase = 26201?>
50 + <?define msierrSQLFailedDropDatabase = 26202?>
51 + <?define msierrSQLFailedConnectDatabase = 26203?>
52 + <?define msierrSQLFailedExecString = 26204?>
53 + <?define msierrSQLDatabaseAlreadyExists = 26205?>
54 + <?define msierrPERFMONFailedRegisterDLL = 26251?>
55 + <?define msierrPERFMONFailedUnregisterDLL = 26252?>
56 + <?define msierrInstallPerfCounterData = 26253?>
57 + <?define msierrUninstallPerfCounterData = 26254?>
58 + <?define msierrSMBFailedCreate = 26301?>
59 + <?define msierrSMBFailedDrop = 26302?>
60 + <?define msierrCERTFailedOpen = 26351?>
61 + <?define msierrCERTFailedAdd = 26352?>
62 + <?define msierrUSRFailedUserCreate = 26401?>
63 + <?define msierrUSRFailedUserCreatePswd = 26402?>
64 + <?define msierrUSRFailedUserGroupAdd = 26403?>
65 + <?define msierrUSRFailedUserCreateExists = 26404?>
66 + <?define msierrUSRFailedGrantLogonAsService = 26405?>
67 + <?define msierrDependencyMissingDependencies = 26451?>
68 + <?define msierrDependencyHasDependents = 26452?>
69 + <?define msierrDotNetRuntimeRequired = 27000?>
70 + <?define msierrComPlusCannotConnect = 28001?>
71 + <?define msierrComPlusPartitionReadFailed = 28002?>
72 + <?define msierrComPlusPartitionRoleReadFailed = 28003?>
73 + <?define msierrComPlusUserInPartitionRoleReadFailed = 28004?>
74 + <?define msierrComPlusPartitionUserReadFailed = 28005?>
75 + <?define msierrComPlusApplicationReadFailed = 28006?>
76 + <?define msierrComPlusApplicationRoleReadFailed = 28007?>
77 + <?define msierrComPlusUserInApplicationRoleReadFailed = 28008?>
78 + <?define msierrComPlusAssembliesReadFailed = 28009?>
79 + <?define msierrComPlusSubscriptionReadFailed = 28010?>
80 + <?define msierrComPlusPartitionDependency = 28011?>
81 + <?define msierrComPlusPartitionNotFound = 28012?>
82 + <?define msierrComPlusPartitionIdConflict = 28013?>
83 + <?define msierrComPlusPartitionNameConflict = 28014?>
84 + <?define msierrComPlusApplicationDependency = 28015?>
85 + <?define msierrComPlusApplicationNotFound = 28016?>
86 + <?define msierrComPlusApplicationIdConflict = 28017?>
87 + <?define msierrComPlusApplicationNameConflict = 28018?>
88 + <?define msierrComPlusApplicationRoleDependency = 28019?>
89 + <?define msierrComPlusApplicationRoleNotFound = 28020?>
90 + <?define msierrComPlusApplicationRoleConflict = 28021?>
91 + <?define msierrComPlusAssemblyDependency = 28022?>
92 + <?define msierrComPlusSubscriptionIdConflict = 28023?>
93 + <?define msierrComPlusSubscriptionNameConflict = 28024?>
94 + <?define msierrComPlusFailedLookupNames = 28025?>
95 + <?define msierrMsmqCannotConnect = 28101?>
96 +</Include>
\ No newline at end of file
src/wixlib/iis.v3.ncrunchproject new
+5
@@ -0,0 +1,5 @@
1 +<ProjectConfiguration>
2 + <Settings>
3 + <IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
4 + </Settings>
5 +</ProjectConfiguration>
\ No newline at end of file
src/wixlib/iis.wixproj new
+44
@@ -0,0 +1,44 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- 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. -->
3 +<Project DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0">
4 + <Import Project="..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props" Condition="Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" />
5 + <Import Project="..\FindLocalWix.props" />
6 + <PropertyGroup>
7 + <ProjectGuid>{92FE99D2-355D-4F52-A7C1-10EECB4A5BB1}</ProjectGuid>
8 + <OutputName>iis</OutputName>
9 + <OutputType>Library</OutputType>
10 + <BindFiles>true</BindFiles>
11 + <Pedantic>true</Pedantic>
12 + <Cultures>en-us</Cultures>
13 + </PropertyGroup>
14 + <ItemGroup>
15 + <Compile Include="IIsExtension.wxs" />
16 + <Compile Include="IIsExtension_x86.wxs" />
17 + <EmbeddedResource Include="en-us.wxl" />
18 + <EmbeddedResource Include="ja-jp.wxl" />
19 + <EmbeddedResource Include="pt-br.wxl" />
20 + </ItemGroup>
21 + <ItemGroup>
22 + <None Include="IIsExtension_Platform.wxi" />
23 + <None Include="packages.config" />
24 + </ItemGroup>
25 + <ItemGroup>
26 + <ProjectReference Include="..\ca\iisca.vcxproj">
27 + <Name>iisca</Name>
28 + <Project>{CB3FB8C4-14BF-4EA6-9F01-7FB258E5AEF3}</Project>
29 + </ProjectReference>
30 + </ItemGroup>
31 + <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' AND Exists('$(WixTargetsPath)') " />
32 + <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " />
33 + <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
34 + <Error Text="WiX Toolset build tools (v4.0 or later) must be installed to build this project. To download the WiX Toolset, go to http://wixtoolset.org/releases/." />
35 + </Target>
36 + <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
37 + <PropertyGroup>
38 + <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
39 + </PropertyGroup>
40 + <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets'))" />
41 + <Error Condition="!Exists('..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.MSBuild.4.0.0-build-0005\build\WixToolset.MSBuild.props'))" />
42 + </Target>
43 + <Import Project="..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.2.1.65\build\Nerdbank.GitVersioning.targets')" />
44 +</Project>
\ No newline at end of file
src/wixlib/packages.config new
+5
@@ -0,0 +1,5 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<packages>
3 + <package id="Nerdbank.GitVersioning" version="2.1.65" developmentDependency="true" targetFramework="net40" />
4 + <package id="WixToolset.MSBuild" version="4.0.0-build-0005" developmentDependency="true" targetFramework="net40" />
5 +</packages>
\ No newline at end of file
version.json new
+11
@@ -0,0 +1,11 @@
1 +{
2 + "version": "4.0",
3 + "publicReleaseRefSpec": [
4 + "^refs/heads/master$"
5 + ],
6 + "cloudBuild": {
7 + "buildNumber": {
8 + "enabled": true
9 + }
10 + }
11 +}