aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2021-05-11 07:45:24 -0700
committerRob Mensching <rob@firegiant.com>2021-05-11 07:45:24 -0700
commit68cc62fc46efac3375aef5694e9f645ac09b622f (patch)
treedc94de74569025fc20c534fd830f039a93bd176f
parent7ac5a6e39772aa0d31e538a6d2dcdcb087e2af88 (diff)
parent03d5c46cbbb94f73ac468709345fc6a0e50def8d (diff)
downloadwix-68cc62fc46efac3375aef5694e9f645ac09b622f.tar.gz
wix-68cc62fc46efac3375aef5694e9f645ac09b622f.tar.bz2
wix-68cc62fc46efac3375aef5694e9f645ac09b622f.zip
Merge Tools
-rw-r--r--src/samples/ThmViewerPackage/Package.wxs30
-rw-r--r--src/samples/ThmViewerPackage/ThmViewerPackage.wixproj35
-rw-r--r--src/samples/ThmViewerPackage/packages.config4
-rw-r--r--src/samples/thmviewer/Resources/LoremIpsum.rtfbin0 -> 4870 bytes
-rw-r--r--src/samples/thmviewer/Resources/thm.xml11
-rw-r--r--src/samples/thmviewer/display.cpp354
-rw-r--r--src/samples/thmviewer/load.cpp221
-rw-r--r--src/samples/thmviewer/packages.config8
-rw-r--r--src/samples/thmviewer/precomp.cpp3
-rw-r--r--src/samples/thmviewer/precomp.h70
-rw-r--r--src/samples/thmviewer/resource.h16
-rw-r--r--src/samples/thmviewer/thmviewer.cpp543
-rw-r--r--src/samples/thmviewer/thmviewer.manifest19
-rw-r--r--src/samples/thmviewer/thmviewer.rc12
-rw-r--r--src/samples/thmviewer/thmviewer.v3.ncrunchproject7
-rw-r--r--src/samples/thmviewer/thmviewer.vcxproj88
-rw-r--r--src/samples/thmviewer/thmviewer.vcxproj.filters56
-rw-r--r--src/wix/Directory.vcxproj.props111
-rw-r--r--src/wix/Directory.wixproj.props14
-rw-r--r--src/wix/README-Tools.md4
-rw-r--r--src/wix/Tools.sln105
-rw-r--r--src/wix/Tools.v3.ncrunchsolution6
-rw-r--r--src/wix/WixToolset.BuildTasks/AssemblyInfo.cs7
-rw-r--r--src/wix/WixToolset.BuildTasks/BuildException.cs26
-rw-r--r--src/wix/WixToolset.BuildTasks/Common.cs39
-rw-r--r--src/wix/WixToolset.BuildTasks/ConvertReferences.cs89
-rw-r--r--src/wix/WixToolset.BuildTasks/CreateItemAvoidingInference.cs46
-rw-r--r--src/wix/WixToolset.BuildTasks/CreateProjectReferenceDefineConstants.cs271
-rw-r--r--src/wix/WixToolset.BuildTasks/FileSearchHelperMethods.cs56
-rw-r--r--src/wix/WixToolset.BuildTasks/GenerateCompileWithObjectPath.cs145
-rw-r--r--src/wix/WixToolset.BuildTasks/GetCabList.cs81
-rw-r--r--src/wix/WixToolset.BuildTasks/GetLooseFileList.cs225
-rw-r--r--src/wix/WixToolset.BuildTasks/HeatDirectory.cs96
-rw-r--r--src/wix/WixToolset.BuildTasks/HeatFile.cs88
-rw-r--r--src/wix/WixToolset.BuildTasks/HeatProject.cs110
-rw-r--r--src/wix/WixToolset.BuildTasks/HeatTask.cs91
-rw-r--r--src/wix/WixToolset.BuildTasks/HeatTask_InProc.cs20
-rw-r--r--src/wix/WixToolset.BuildTasks/Insignia.cs120
-rw-r--r--src/wix/WixToolset.BuildTasks/MsbuildMessageListener.cs68
-rw-r--r--src/wix/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs128
-rw-r--r--src/wix/WixToolset.BuildTasks/RefreshGeneratedFile.cs114
-rw-r--r--src/wix/WixToolset.BuildTasks/ResolveWixReferences.cs212
-rw-r--r--src/wix/WixToolset.BuildTasks/ToolsetTask.cs153
-rw-r--r--src/wix/WixToolset.BuildTasks/ToolsetTask_InProc.cs79
-rw-r--r--src/wix/WixToolset.BuildTasks/WixAssignCulture.cs229
-rw-r--r--src/wix/WixToolset.BuildTasks/WixBuild.cs135
-rw-r--r--src/wix/WixToolset.BuildTasks/WixBuild_InProc.cs28
-rw-r--r--src/wix/WixToolset.BuildTasks/WixCommandLineBuilder.cs177
-rw-r--r--src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.csproj39
-rw-r--r--src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.net461.v3.ncrunchproject5
-rw-r--r--src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.netcoreapp2.1.v3.ncrunchproject5
-rw-r--r--src/wix/WixToolset.Sdk/Sdk/Sdk.props23
-rw-r--r--src/wix/WixToolset.Sdk/Sdk/Sdk.targets15
-rw-r--r--src/wix/WixToolset.Sdk/WixToolset.Sdk.csproj38
-rw-r--r--src/wix/WixToolset.Sdk/WixToolset.Sdk.nuspec18
-rw-r--r--src/wix/WixToolset.Sdk/WixToolset.Sdk.v3.ncrunchproject5
-rw-r--r--src/wix/WixToolset.Sdk/build/WixToolset.Sdk.props8
-rw-r--r--src/wix/WixToolset.Sdk/tools/wix.ca.targets123
-rw-r--r--src/wix/WixToolset.Sdk/tools/wix.harvest.targets515
-rw-r--r--src/wix/WixToolset.Sdk/tools/wix.signing.targets370
-rw-r--r--src/wix/WixToolset.Sdk/tools/wix.targets1083
-rw-r--r--src/wix/appveyor-Tools.cmd52
-rw-r--r--src/wix/appveyor-Tools.yml46
-rw-r--r--src/wix/dotnet-wix/DotnetToolSettings.xml6
-rw-r--r--src/wix/dotnet-wix/dotnet-wix.csproj28
-rw-r--r--src/wix/dotnet-wix/dotnet-wix.nuspec20
-rw-r--r--src/wix/dotnet-wix/dotnet-wix.v3.ncrunchproject5
-rw-r--r--src/wix/heat/AssemblyHarvester.cs41
-rw-r--r--src/wix/heat/Data/HarvesterErrors.cs205
-rw-r--r--src/wix/heat/Data/HarvesterVerboses.cs62
-rw-r--r--src/wix/heat/Data/HarvesterWarnings.cs79
-rw-r--r--src/wix/heat/Data/HeatCommandLineOption.cs31
-rw-r--r--src/wix/heat/Data/IHeatCommandLine.cs12
-rw-r--r--src/wix/heat/DirectoryHarvester.cs308
-rw-r--r--src/wix/heat/DllHarvester.cs106
-rw-r--r--src/wix/heat/Extensibility/BaseHarvesterExtension.cs26
-rw-r--r--src/wix/heat/Extensibility/BaseHeatExtension.cs55
-rw-r--r--src/wix/heat/Extensibility/BaseMutatorExtension.cs202
-rw-r--r--src/wix/heat/Extensibility/IHarvester.cs31
-rw-r--r--src/wix/heat/Extensibility/IHarvesterCore.cs51
-rw-r--r--src/wix/heat/Extensibility/IHarvesterExtension.cs14
-rw-r--r--src/wix/heat/Extensibility/IHeatCore.cs29
-rw-r--r--src/wix/heat/Extensibility/IHeatExtension.cs16
-rw-r--r--src/wix/heat/Extensibility/IMutator.cs44
-rw-r--r--src/wix/heat/Extensibility/IMutatorExtension.cs18
-rw-r--r--src/wix/heat/FileHarvester.cs156
-rw-r--r--src/wix/heat/Harvester.cs65
-rw-r--r--src/wix/heat/HarvesterCore.cs76
-rw-r--r--src/wix/heat/HeatCommand.cs275
-rw-r--r--src/wix/heat/HeatCommandLine.cs91
-rw-r--r--src/wix/heat/HeatCommandLineFactory.cs27
-rw-r--r--src/wix/heat/HeatCore.cs45
-rw-r--r--src/wix/heat/HelpCommand.cs97
-rw-r--r--src/wix/heat/IIsFinalizeHarvesterMutator.cs160
-rw-r--r--src/wix/heat/IIsHarvesterMutator.cs429
-rw-r--r--src/wix/heat/IIsHeatExtension.cs80
-rw-r--r--src/wix/heat/IIsWebSiteHarvester.cs439
-rw-r--r--src/wix/heat/Mutator.cs93
-rw-r--r--src/wix/heat/PayloadHarvester.cs129
-rw-r--r--src/wix/heat/PerformanceCategoryHarvester.cs207
-rw-r--r--src/wix/heat/Program.cs78
-rw-r--r--src/wix/heat/RegFileHarvester.cs438
-rw-r--r--src/wix/heat/RegistryHarvester.cs477
-rw-r--r--src/wix/heat/Serialize/CodeDomInterfaces.cs96
-rw-r--r--src/wix/heat/Serialize/CodeDomReader.cs162
-rw-r--r--src/wix/heat/Serialize/ElementCollection.cs618
-rw-r--r--src/wix/heat/Serialize/WixHarvesterStrings.Designer.cs153
-rw-r--r--src/wix/heat/Serialize/WixHarvesterStrings.resx150
-rw-r--r--src/wix/heat/Serialize/iis.cs5915
-rw-r--r--src/wix/heat/Serialize/util.cs11462
-rw-r--r--src/wix/heat/Serialize/vs.cs1574
-rw-r--r--src/wix/heat/Serialize/wix.cs57740
-rw-r--r--src/wix/heat/TypeLibraryHarvester.cs93
-rw-r--r--src/wix/heat/UtilFinalizeHarvesterMutator.cs1185
-rw-r--r--src/wix/heat/UtilHarvesterMutator.cs218
-rw-r--r--src/wix/heat/UtilHeatExtension.cs405
-rw-r--r--src/wix/heat/UtilMutator.cs633
-rw-r--r--src/wix/heat/UtilTransformMutator.cs77
-rw-r--r--src/wix/heat/VSHeatExtension.cs229
-rw-r--r--src/wix/heat/VSProjectHarvester.cs1455
-rw-r--r--src/wix/heat/app.config10
-rw-r--r--src/wix/heat/heat.csproj54
-rw-r--r--src/wix/heat/heat.exe.manifest20
-rw-r--r--src/wix/heat/heat.net461.v3.ncrunchproject5
-rw-r--r--src/wix/heat/heat.netcoreapp2.1.v3.ncrunchproject5
-rw-r--r--src/wix/nuget-Tools.config17
-rw-r--r--src/wix/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs67
-rw-r--r--src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj35
-rw-r--r--src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.v3.ncrunchproject8
-rw-r--r--src/wix/test/WixToolsetTest.Heat/HeatRunner.cs92
-rw-r--r--src/wix/test/WixToolsetTest.Heat/PayloadTests.cs66
-rw-r--r--src/wix/test/WixToolsetTest.Heat/TestData/.Data/Windows8.1-KB2937592-x86.msubin0 -> 309544 bytes
-rw-r--r--src/wix/test/WixToolsetTest.Heat/TestData/.Data/burn.exebin0 -> 463360 bytes
-rw-r--r--src/wix/test/WixToolsetTest.Heat/TestData/Payload/HarvestedExePackagePayload.wxs6
-rw-r--r--src/wix/test/WixToolsetTest.Heat/TestData/Payload/HarvestedMsuPackagePayload.wxs6
-rw-r--r--src/wix/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj28
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs442
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs375
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs98
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/README.md5
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj58
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json1
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt1
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs18
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj53
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs17
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj50
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs17
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj50
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs17
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs8
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj8
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs11
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj36
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/MergeMsiPackage.wixproj44
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs17
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs19
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/SimpleMergeModule.wixproj42
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/data/MergeModule.txt1
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj50
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl11
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl11
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs16
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/PackageComponents.wxs10
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/data/test.txt1
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MultiCulturalMsiPackage.sln31
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj46
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.en-us.wxl11
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs19
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/PackageComponents.wxs10
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/data/test.txt1
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/Bundle.wxs11
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj42
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleMsiPackage.sln39
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/Bundle.wxs11
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/UncompressedBundle.wixproj42
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj59
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.v3.ncrunchproject8
-rw-r--r--src/wix/wix/ConsoleMessageListener.cs90
-rw-r--r--src/wix/wix/Program.cs92
-rw-r--r--src/wix/wix/app.config8
-rw-r--r--src/wix/wix/wix.csproj39
-rw-r--r--src/wix/wix/wix.exe.manifest18
-rw-r--r--src/wix/wix/wix.net461.v3.ncrunchproject5
-rw-r--r--src/wix/wix/wix.netcoreapp2.1.v3.ncrunchproject5
185 files changed, 96304 insertions, 0 deletions
diff --git a/src/samples/ThmViewerPackage/Package.wxs b/src/samples/ThmViewerPackage/Package.wxs
new file mode 100644
index 00000000..cb2139cf
--- /dev/null
+++ b/src/samples/ThmViewerPackage/Package.wxs
@@ -0,0 +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<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Package Name="WiX Toolset Theme Viewer" Manufacturer="WiX Toolset" Language="1033" Version="!(bind.fileVersion.ThmViewerFile)" UpgradeCode="59c4b122-5167-445b-8fc4-09dcd4eced89" Compressed="yes" InstallerVersion="200">
4 <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
5 <MediaTemplate EmbedCab="yes" />
6
7 <Feature Id="Main">
8 <ComponentGroupRef Id="Components" />
9 </Feature>
10 </Package>
11
12 <Fragment>
13 <ComponentGroup Id="Components" Directory="INSTALLFOLDER" Subdirectory="bin">
14 <Component>
15 <File Id="ThmViewerFile" Source="thmviewer.exe" />
16 <Shortcut Name="!(bind.property.ProductName)" Directory="ShortcutFolder" Advertise="yes" />
17 </Component>
18 </ComponentGroup>
19 </Fragment>
20
21 <Fragment>
22 <StandardDirectory Id="ProgramFilesFolder">
23 <Directory Id="INSTALLFOLDER" Name="WiX Toolset v4.0" />
24 </StandardDirectory>
25 <StandardDirectory Id="ProgramMenuFolder">
26 <Directory Id="ShortcutFolder" Name="WiX Toolset" />
27 </StandardDirectory>
28 </Fragment>
29
30</Wix>
diff --git a/src/samples/ThmViewerPackage/ThmViewerPackage.wixproj b/src/samples/ThmViewerPackage/ThmViewerPackage.wixproj
new file mode 100644
index 00000000..23d24654
--- /dev/null
+++ b/src/samples/ThmViewerPackage/ThmViewerPackage.wixproj
@@ -0,0 +1,35 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
4
5 <PropertyGroup>
6 <ProjectGuid>59c4b122-5167-445b-8fc4-09dcd4eced89</ProjectGuid>
7 <OutputName>thmviewer</OutputName>
8 <OutputType>Package</OutputType>
9 </PropertyGroup>
10
11 <ItemGroup>
12 <Compile Include="Package.wxs" />
13 </ItemGroup>
14
15 <ItemGroup>
16 <None Include="packages.config" />
17 </ItemGroup>
18
19 <ItemGroup>
20 <ProjectReference Include="..\thmviewer\thmviewer.vcxproj">
21 <Name>thmviewer</Name>
22 <Project>{95228C13-97F5-484A-B4A2-ECF4618B0881}</Project>
23 </ProjectReference>
24 </ItemGroup>
25
26 <Import Project="$(WixTargetsPath)" />
27
28 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
29 <PropertyGroup>
30 <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>
31 </PropertyGroup>
32 <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" />
33 </Target>
34 <Import Project="..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" />
35</Project>
diff --git a/src/samples/ThmViewerPackage/packages.config b/src/samples/ThmViewerPackage/packages.config
new file mode 100644
index 00000000..7e55f706
--- /dev/null
+++ b/src/samples/ThmViewerPackage/packages.config
@@ -0,0 +1,4 @@
1<?xml version="1.0" encoding="utf-8"?>
2<packages>
3 <package id="Nerdbank.GitVersioning" version="3.3.37" developmentDependency="true" targetFramework="net40" />
4</packages> \ No newline at end of file
diff --git a/src/samples/thmviewer/Resources/LoremIpsum.rtf b/src/samples/thmviewer/Resources/LoremIpsum.rtf
new file mode 100644
index 00000000..1ab0e65b
--- /dev/null
+++ b/src/samples/thmviewer/Resources/LoremIpsum.rtf
Binary files differ
diff --git a/src/samples/thmviewer/Resources/thm.xml b/src/samples/thmviewer/Resources/thm.xml
new file mode 100644
index 00000000..6394f0f1
--- /dev/null
+++ b/src/samples/thmviewer/Resources/thm.xml
@@ -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
5<Theme>
6 <Font Id="0" Height="-48" Weight="700" Foreground="$windowtext">Consolas</Font>
7 <Font Id="1" Height="-12" Weight="700" Foreground="$windowtext" Background="$window">Consolas</Font>
8 <Window Width="220" Height="200" FontId="0" Caption="Theme Viewer">
9 <TreeView Name="Tree" X="0" Y="0" Width="0" Height="0" FontId="1" Visible="yes" FullRowSelect="yes" HasButtons="yes" AlwaysShowSelect="yes" HasLines="yes" LinesAtRoot="yes"/>
10 </Window>
11</Theme>
diff --git a/src/samples/thmviewer/display.cpp b/src/samples/thmviewer/display.cpp
new file mode 100644
index 00000000..52fa3cf8
--- /dev/null
+++ b/src/samples/thmviewer/display.cpp
@@ -0,0 +1,354 @@
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
5static const LPCWSTR THMVWR_WINDOW_CLASS_DISPLAY = L"ThmViewerDisplay";
6
7struct DISPLAY_THREAD_CONTEXT
8{
9 HWND hWnd;
10 HINSTANCE hInstance;
11
12 HANDLE hInit;
13};
14
15static DWORD WINAPI DisplayThreadProc(
16 __in LPVOID pvContext
17 );
18static LRESULT CALLBACK DisplayWndProc(
19 __in HWND hWnd,
20 __in UINT uMsg,
21 __in WPARAM wParam,
22 __in LPARAM lParam
23 );
24static BOOL DisplayOnCreate(
25 __in THEME* pTheme,
26 __in HWND hWnd
27 );
28
29
30extern "C" HRESULT DisplayStart(
31 __in HINSTANCE hInstance,
32 __in HWND hWnd,
33 __out HANDLE *phThread,
34 __out DWORD* pdwThreadId
35 )
36{
37 HRESULT hr = S_OK;
38 HANDLE rgHandles[2] = { };
39 DISPLAY_THREAD_CONTEXT context = { };
40
41 rgHandles[0] = ::CreateEventW(NULL, TRUE, FALSE, NULL);
42 ExitOnNullWithLastError(rgHandles[0], hr, "Failed to create load init event.");
43
44 context.hWnd = hWnd;
45 context.hInstance = hInstance;
46 context.hInit = rgHandles[0];
47
48 rgHandles[1] = ::CreateThread(NULL, 0, DisplayThreadProc, reinterpret_cast<LPVOID>(&context), 0, pdwThreadId);
49 ExitOnNullWithLastError(rgHandles[1], hr, "Failed to create display thread.");
50
51 ::WaitForMultipleObjects(countof(rgHandles), rgHandles, FALSE, INFINITE);
52
53 *phThread = rgHandles[1];
54 rgHandles[1] = NULL;
55
56LExit:
57 ReleaseHandle(rgHandles[1]);
58 ReleaseHandle(rgHandles[0]);
59 return hr;
60}
61
62static DWORD WINAPI DisplayThreadProc(
63 __in LPVOID pvContext
64 )
65{
66 HRESULT hr = S_OK;
67
68 DISPLAY_THREAD_CONTEXT* pContext = static_cast<DISPLAY_THREAD_CONTEXT*>(pvContext);
69 HINSTANCE hInstance = pContext->hInstance;
70 HWND hwndParent = pContext->hWnd;
71
72 // We can signal the initialization event as soon as we have copied the context
73 // values into local variables.
74 ::SetEvent(pContext->hInit);
75
76 BOOL fComInitialized = FALSE;
77
78 HANDLE_THEME* pCurrentHandle = NULL;
79 ATOM atomWc = 0;
80 WNDCLASSW wc = { }; // the following are constant for the display window class.
81 wc.lpfnWndProc = DisplayWndProc;
82 wc.hInstance = hInstance;
83 wc.lpszClassName = THMVWR_WINDOW_CLASS_DISPLAY;
84
85 HWND hWnd = NULL;
86 RECT rc = { };
87 int x = CW_USEDEFAULT;
88 int y = CW_USEDEFAULT;
89
90 BOOL fRedoMsg = FALSE;
91 BOOL fRet = FALSE;
92 MSG msg = { };
93
94 BOOL fCreateIfNecessary = FALSE;
95
96 hr = ::CoInitialize(NULL);
97 ExitOnFailure(hr, "Failed to initialize COM on display thread.");
98 fComInitialized = TRUE;
99
100 // As long as the parent window is alive and kicking, keep this thread going (with or without a theme to display ).
101 while (::IsWindow(hwndParent))
102 {
103 if (pCurrentHandle && fCreateIfNecessary)
104 {
105 THEME* pTheme = pCurrentHandle->pTheme;
106
107 if (CW_USEDEFAULT == x && CW_USEDEFAULT == y && ::GetWindowRect(hwndParent, &rc))
108 {
109 x = rc.left;
110 y = rc.bottom + 20;
111 }
112
113 hr = ThemeCreateParentWindow(pTheme, 0, wc.lpszClassName, pTheme->sczCaption, pTheme->dwStyle, x, y, hwndParent, hInstance, pCurrentHandle, THEME_WINDOW_INITIAL_POSITION_DEFAULT, &hWnd);
114 ExitOnFailure(hr, "Failed to create display window.");
115
116 fCreateIfNecessary = FALSE;
117 }
118
119 // message pump
120 while (fRedoMsg || 0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0)))
121 {
122 if (fRedoMsg)
123 {
124 fRedoMsg = FALSE;
125 }
126
127 if (-1 == fRet)
128 {
129 hr = E_UNEXPECTED;
130 ExitOnFailure(hr, "Unexpected return value from display message pump.");
131 }
132 else if (NULL == msg.hwnd) // Thread message.
133 {
134 if (WM_THMVWR_NEW_THEME == msg.message)
135 {
136 // If there is already a handle, release it.
137 if (pCurrentHandle)
138 {
139 DecrementHandleTheme(pCurrentHandle);
140 pCurrentHandle = NULL;
141 }
142
143 // If the window was created, remember its window location before we destroy
144 // it so so we can open the new window in the same place.
145 if (::IsWindow(hWnd))
146 {
147 ::GetWindowRect(hWnd, &rc);
148 x = rc.left;
149 y = rc.top;
150
151 ::DestroyWindow(hWnd);
152 }
153
154 // If the display window class was registered, unregister it so we can
155 // reuse the same window class name for the new theme.
156 if (atomWc)
157 {
158 if (!::UnregisterClassW(reinterpret_cast<LPCWSTR>(atomWc), hInstance))
159 {
160 DWORD er = ::GetLastError();
161 er = er;
162 }
163
164 atomWc = 0;
165 }
166
167 // If we were provided a new theme handle, create a new window class to
168 // support it.
169 pCurrentHandle = reinterpret_cast<HANDLE_THEME*>(msg.lParam);
170 if (pCurrentHandle)
171 {
172 wc.hIcon = reinterpret_cast<HICON>(pCurrentHandle->pTheme->hIcon);
173 wc.hCursor = ::LoadCursorW(NULL, (LPCWSTR)IDC_ARROW);
174 if (0 < pCurrentHandle->pTheme->cFonts)
175 {
176 wc.hbrBackground = pCurrentHandle->pTheme->rgFonts[pCurrentHandle->pTheme->dwFontId].hBackground;
177 }
178 atomWc = ::RegisterClassW(&wc);
179 if (!atomWc)
180 {
181 ExitWithLastError(hr, "Failed to register display window class.");
182 }
183 }
184 }
185 else if (WM_THMVWR_SHOWPAGE == msg.message)
186 {
187 if (pCurrentHandle && ::IsWindow(hWnd) && pCurrentHandle->pTheme->hwndParent == hWnd)
188 {
189 DWORD dwPageId = static_cast<DWORD>(msg.lParam);
190 int nCmdShow = static_cast<int>(msg.wParam);
191
192 // First show/hide the controls not associated with a page.
193 for (DWORD i = 0; i < pCurrentHandle->pTheme->cControls; ++i)
194 {
195 THEME_CONTROL* pControl = pCurrentHandle->pTheme->rgControls + i;
196 if (!pControl->wPageId)
197 {
198 ThemeShowControl(pCurrentHandle->pTheme, pControl->wId, nCmdShow);
199 }
200 }
201
202 // If a page id was provided also, show/hide those controls
203 if (dwPageId)
204 {
205 // Ignore error since we aren't using variables and it can only fail when using variables.
206 ThemeShowPage(pCurrentHandle->pTheme, dwPageId, nCmdShow);
207 }
208 }
209 else // display window isn't visible or it doesn't match the current handle.
210 {
211 // Keep the current message around to try again after we break out of this loop
212 // and create the window.
213 fRedoMsg = TRUE;
214 fCreateIfNecessary = TRUE;
215 break;
216 }
217 }
218 }
219 else if (!ThemeHandleKeyboardMessage(pCurrentHandle->pTheme, hwndParent, &msg)) // Window message.
220 {
221 ::TranslateMessage(&msg);
222 ::DispatchMessageW(&msg);
223 }
224 }
225 }
226
227LExit:
228 if (::IsWindow(hWnd))
229 {
230 ::DestroyWindow(hWnd);
231 }
232
233 if (atomWc)
234 {
235 if (!::UnregisterClassW(THMVWR_WINDOW_CLASS_DISPLAY, hInstance))
236 {
237 DWORD er = ::GetLastError();
238 er = er;
239 }
240 }
241
242 DecrementHandleTheme(pCurrentHandle);
243
244 if (fComInitialized)
245 {
246 ::CoUninitialize();
247 }
248
249 return hr;
250}
251
252static LRESULT CALLBACK DisplayWndProc(
253 __in HWND hWnd,
254 __in UINT uMsg,
255 __in WPARAM wParam,
256 __in LPARAM lParam
257 )
258{
259 static DWORD dwProgress = 0;
260 HANDLE_THEME* pHandleTheme = reinterpret_cast<HANDLE_THEME*>(::GetWindowLongPtrW(hWnd, GWLP_USERDATA));
261
262 switch (uMsg)
263 {
264 case WM_NCCREATE:
265 {
266 LPCREATESTRUCT lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);
267 pHandleTheme = reinterpret_cast<HANDLE_THEME*>(lpcs->lpCreateParams);
268 IncrementHandleTheme(pHandleTheme);
269 ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pHandleTheme));
270 }
271 break;
272
273 case WM_CREATE:
274 if (!DisplayOnCreate(pHandleTheme->pTheme, hWnd))
275 {
276 return -1;
277 }
278 break;
279
280 case WM_TIMER:
281 if (!lParam && SUCCEEDED(ThemeSetProgressControl(pHandleTheme->pTheme, wParam, dwProgress)))
282 {
283 dwProgress += rand() % 10 + 1;
284 if (dwProgress > 100)
285 {
286 dwProgress = 0;
287 }
288
289 return 0;
290 }
291 break;
292
293 case WM_COMMAND:
294 {
295 WCHAR wzText[1024];
296 ::StringCchPrintfW(wzText, countof(wzText), L"Command %u\r\n", LOWORD(wParam));
297 OutputDebugStringW(wzText);
298 //::MessageBoxW(hWnd, wzText, L"Command fired", MB_OK);
299 }
300 break;
301
302 case WM_SYSCOMMAND:
303 {
304 WCHAR wzText[1024];
305 ::StringCchPrintfW(wzText, countof(wzText), L"SysCommand %u\r\n", LOWORD(wParam));
306 OutputDebugStringW(wzText);
307 //::MessageBoxW(hWnd, wzText, L"Command fired", MB_OK);
308 }
309 break;
310
311 case WM_DESTROY:
312 ThemeUnloadControls(pHandleTheme->pTheme);
313 ::PostQuitMessage(0);
314 break;
315
316 case WM_NCDESTROY:
317 DecrementHandleTheme(pHandleTheme);
318 ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, 0);
319 break;
320 }
321
322 return ThemeDefWindowProc(pHandleTheme ? pHandleTheme->pTheme : NULL, hWnd, uMsg, wParam, lParam);
323}
324
325static BOOL DisplayOnCreate(
326 __in THEME* pTheme,
327 __in HWND hWnd
328 )
329{
330 HRESULT hr = S_OK;
331
332 hr = ThemeLoadControls(pTheme, NULL, 0);
333 ExitOnFailure(hr, "Failed to load theme controls");
334
335 // Pre-populate some control types with data.
336 for (DWORD i = 0; i < pTheme->cControls; ++i)
337 {
338 THEME_CONTROL* pControl = pTheme->rgControls + i;
339 if (THEME_CONTROL_TYPE_RICHEDIT == pControl->type)
340 {
341 hr = ThemeLoadRichEditFromResource(pTheme, pControl->wId, MAKEINTRESOURCEA(THMVWR_RES_RICHEDIT_FILE), ::GetModuleHandleW(NULL));
342 ExitOnFailure(hr, "Failed to load richedit text.");
343 }
344 else if (THEME_CONTROL_TYPE_PROGRESSBAR == pControl->type)
345 {
346 DWORD dwId = ::SetTimer(hWnd, pControl->wId, 500, NULL);
347 dwId = dwId; // prevents warning in "ship" build.
348 Assert(dwId == pControl->wId);
349 }
350 }
351
352LExit:
353 return SUCCEEDED(hr);
354}
diff --git a/src/samples/thmviewer/load.cpp b/src/samples/thmviewer/load.cpp
new file mode 100644
index 00000000..0267402a
--- /dev/null
+++ b/src/samples/thmviewer/load.cpp
@@ -0,0 +1,221 @@
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
5struct LOAD_THREAD_CONTEXT
6{
7 HWND hWnd;
8 LPCWSTR wzThemePath;
9 LPCWSTR wzWxlPath;
10
11 HANDLE hInit;
12};
13
14static DWORD WINAPI LoadThreadProc(
15 __in LPVOID pvContext
16 );
17
18
19extern "C" HRESULT LoadStart(
20 __in_z LPCWSTR wzThemePath,
21 __in_z_opt LPCWSTR wzWxlPath,
22 __in HWND hWnd,
23 __out HANDLE* phThread
24 )
25{
26 HRESULT hr = S_OK;
27 HANDLE rgHandles[2] = { };
28 LOAD_THREAD_CONTEXT context = { };
29
30 rgHandles[0] = ::CreateEventW(NULL, TRUE, FALSE, NULL);
31 ExitOnNullWithLastError(rgHandles[0], hr, "Failed to create load init event.");
32
33 context.hWnd = hWnd;
34 context.wzThemePath = wzThemePath;
35 context.wzWxlPath = wzWxlPath;
36 context.hInit = rgHandles[0];
37
38 rgHandles[1] = ::CreateThread(NULL, 0, LoadThreadProc, &context, 0, NULL);
39 ExitOnNullWithLastError(rgHandles[1], hr, "Failed to create load thread.");
40
41 ::WaitForMultipleObjects(countof(rgHandles), rgHandles, FALSE, INFINITE);
42
43 *phThread = rgHandles[1];
44 rgHandles[1] = NULL;
45
46LExit:
47 ReleaseHandle(rgHandles[1]);
48 ReleaseHandle(rgHandles[0]);
49 return hr;
50}
51
52
53static DWORD WINAPI LoadThreadProc(
54 __in LPVOID pvContext
55 )
56{
57 HRESULT hr = S_OK;
58 WIX_LOCALIZATION* pWixLoc = NULL;
59 LPWSTR sczThemePath = NULL;
60 LPWSTR sczWxlPath = NULL;
61 BOOL fComInitialized = FALSE;
62 HANDLE hDirectory = INVALID_HANDLE_VALUE;
63 LPWSTR sczDirectory = NULL;
64 LPWSTR wzFileName = NULL;
65
66 THEME* pTheme = NULL;
67 HANDLE_THEME* pHandle = NULL;
68
69 LOAD_THREAD_CONTEXT* pContext = static_cast<LOAD_THREAD_CONTEXT*>(pvContext);
70 HWND hWnd = pContext->hWnd;
71
72 hr = StrAllocString(&sczThemePath, pContext->wzThemePath, 0);
73 ExitOnFailure(hr, "Failed to copy path to initial theme file.");
74
75 if (pContext->wzWxlPath)
76 {
77 hr = StrAllocString(&sczWxlPath, pContext->wzWxlPath, 0);
78 ExitOnFailure(hr, "Failed to copy .wxl path to initial file.");
79 }
80
81 // We can signal the initialization event as soon as we have copied the context
82 // values into local variables.
83 ::SetEvent(pContext->hInit);
84
85 hr = ::CoInitialize(NULL);
86 ExitOnFailure(hr, "Failed to initialize COM on load thread.");
87 fComInitialized = TRUE;
88
89 // Open a handle to the directory so we can put a notification on it.
90 hr = PathGetDirectory(sczThemePath, &sczDirectory);
91 ExitOnFailure(hr, "Failed to get path directory.");
92
93 wzFileName = PathFile(sczThemePath);
94
95 hDirectory = ::CreateFileW(sczDirectory, FILE_LIST_DIRECTORY, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, NULL);
96 if (INVALID_HANDLE_VALUE == hDirectory)
97 {
98 ExitWithLastError(hr, "Failed to open directory: %ls", sczDirectory);
99 }
100
101 BOOL fUpdated = FALSE;
102 do
103 {
104 // Get the last modified time on the file we're loading for verification that the
105 // file actually gets changed down below.
106 FILETIME ftModified = { };
107 FileGetTime(sczThemePath, NULL, NULL, &ftModified);
108
109 ::SendMessageW(hWnd, WM_THMVWR_THEME_LOAD_BEGIN, 0, 0);
110
111 // Try to load the theme file.
112 hr = ThemeLoadFromFile(sczThemePath, &pTheme);
113 if (FAILED(hr))
114 {
115 ::SendMessageW(hWnd, WM_THMVWR_THEME_LOAD_ERROR, 0, hr);
116 }
117 else
118 {
119 if (sczWxlPath)
120 {
121 hr = LocLoadFromFile(sczWxlPath, &pWixLoc);
122 ExitOnFailure(hr, "Failed to load loc file from path: %ls", sczWxlPath);
123
124 hr = ThemeLocalize(pTheme, pWixLoc);
125 ExitOnFailure(hr, "Failed to localize theme: %ls", sczWxlPath);
126 }
127
128 hr = AllocHandleTheme(pTheme, &pHandle);
129 ExitOnFailure(hr, "Failed to allocate handle to theme");
130
131 ::SendMessageW(hWnd, WM_THMVWR_NEW_THEME, 0, reinterpret_cast<LPARAM>(pHandle));
132 pHandle = NULL;
133 }
134
135 fUpdated = FALSE;
136 do
137 {
138 DWORD rgbNotifications[1024];
139 DWORD cbRead = 0;
140 if (!::ReadDirectoryChangesW(hDirectory, rgbNotifications, sizeof(rgbNotifications), FALSE, FILE_NOTIFY_CHANGE_LAST_WRITE, &cbRead, NULL, NULL))
141 {
142 ExitWithLastError(hr, "Failed while watching directory: %ls", sczDirectory);
143 }
144
145 // Wait for half a second to let all the file handles get closed to minimize access
146 // denied errors.
147 ::Sleep(500);
148
149 FILE_NOTIFY_INFORMATION* pNotification = reinterpret_cast<FILE_NOTIFY_INFORMATION*>(rgbNotifications);
150 while (pNotification)
151 {
152 // If our file was updated, check to see if the modified time really changed. The notifications
153 // are often trigger happy thinking the file changed two or three times in a row. Maybe it's AV
154 // software creating the problems but actually checking the modified date works well.
155 if (CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, NORM_IGNORECASE, pNotification->FileName, pNotification->FileNameLength / sizeof(WCHAR), wzFileName, -1))
156 {
157 FILETIME ft = { };
158 FileGetTime(sczThemePath, NULL, NULL, &ft);
159
160 fUpdated = (ftModified.dwHighDateTime < ft.dwHighDateTime) || (ftModified.dwHighDateTime == ft.dwHighDateTime && ftModified.dwLowDateTime < ft.dwLowDateTime);
161 break;
162 }
163
164 pNotification = pNotification->NextEntryOffset ? reinterpret_cast<FILE_NOTIFY_INFORMATION*>(reinterpret_cast<BYTE*>(pNotification) + pNotification->NextEntryOffset) : NULL;
165 }
166 } while (!fUpdated);
167 } while(fUpdated);
168
169LExit:
170 if (fComInitialized)
171 {
172 ::CoUninitialize();
173 }
174
175 LocFree(pWixLoc);
176 ReleaseFileHandle(hDirectory);
177 ReleaseStr(sczDirectory);
178 ReleaseStr(sczThemePath);
179 ReleaseStr(sczWxlPath);
180 return hr;
181}
182
183extern "C" HRESULT AllocHandleTheme(
184 __in THEME* pTheme,
185 __out HANDLE_THEME** ppHandle
186 )
187{
188 HRESULT hr = S_OK;
189 HANDLE_THEME* pHandle = NULL;
190
191 pHandle = static_cast<HANDLE_THEME*>(MemAlloc(sizeof(HANDLE_THEME), TRUE));
192 ExitOnNull(pHandle, hr, E_OUTOFMEMORY, "Failed to allocate theme handle.");
193
194 pHandle->cReferences = 1;
195 pHandle->pTheme = pTheme;
196
197 *ppHandle = pHandle;
198 pHandle = NULL;
199
200LExit:
201 ReleaseMem(pHandle);
202 return hr;
203}
204
205extern "C" void IncrementHandleTheme(
206 __in HANDLE_THEME* pHandle
207 )
208{
209 ::InterlockedIncrement(reinterpret_cast<LONG*>(&pHandle->cReferences));
210}
211
212extern "C" void DecrementHandleTheme(
213 __in HANDLE_THEME* pHandle
214 )
215{
216 if (pHandle && 0 == ::InterlockedDecrement(reinterpret_cast<LONG*>(&pHandle->cReferences)))
217 {
218 ThemeFree(pHandle->pTheme);
219 MemFree(pHandle);
220 }
221}
diff --git a/src/samples/thmviewer/packages.config b/src/samples/thmviewer/packages.config
new file mode 100644
index 00000000..a98c0c8e
--- /dev/null
+++ b/src/samples/thmviewer/packages.config
@@ -0,0 +1,8 @@
1<?xml version="1.0" encoding="utf-8"?>
2<packages>
3 <package id="Microsoft.Build.Tasks.Git" version="1.0.0" targetFramework="native" developmentDependency="true" />
4 <package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" />
5 <package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" />
6 <package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" />
7 <package id="WixToolset.DUtil" version="4.0.72" targetFramework="native" />
8</packages> \ No newline at end of file
diff --git a/src/samples/thmviewer/precomp.cpp b/src/samples/thmviewer/precomp.cpp
new file mode 100644
index 00000000..37664a1c
--- /dev/null
+++ b/src/samples/thmviewer/precomp.cpp
@@ -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"
diff --git a/src/samples/thmviewer/precomp.h b/src/samples/thmviewer/precomp.h
new file mode 100644
index 00000000..15d889fc
--- /dev/null
+++ b/src/samples/thmviewer/precomp.h
@@ -0,0 +1,70 @@
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#include <objbase.h>
8#include <shlobj.h>
9#include <shlwapi.h>
10#include <stdlib.h>
11#include <strsafe.h>
12
13#pragma warning(push)
14#pragma warning(disable:4458)
15#include <gdiplus.h>
16#pragma warning(pop)
17
18#include "dutil.h"
19#include "apputil.h"
20#include "memutil.h"
21#include "dirutil.h"
22#include "fileutil.h"
23#include "locutil.h"
24#include "logutil.h"
25#include "pathutil.h"
26#include "resrutil.h"
27#include "shelutil.h"
28#include "strutil.h"
29#include "thmutil.h"
30
31#include "resource.h"
32
33struct HANDLE_THEME
34{
35 DWORD cReferences;
36 THEME* pTheme;
37};
38
39enum WM_THMVWR
40{
41 WM_THMVWR_SHOWPAGE = WM_APP,
42 WM_THMVWR_PARSE_FILE,
43 WM_THMVWR_NEW_THEME,
44 WM_THMVWR_THEME_LOAD_ERROR,
45 WM_THMVWR_THEME_LOAD_BEGIN,
46};
47
48extern "C" HRESULT DisplayStart(
49 __in HINSTANCE hInstance,
50 __in HWND hWnd,
51 __out HANDLE *phThread,
52 __out DWORD* pdwThreadId
53 );
54extern "C" HRESULT LoadStart(
55 __in_z LPCWSTR wzThemePath,
56 __in_z LPCWSTR wzWxlPath,
57 __in HWND hWnd,
58 __out HANDLE* phThread
59 );
60
61extern "C" HRESULT AllocHandleTheme(
62 __in THEME* pTheme,
63 __out HANDLE_THEME** ppHandle
64 );
65extern "C" void IncrementHandleTheme(
66 __in HANDLE_THEME* pHandle
67 );
68extern "C" void DecrementHandleTheme(
69 __in HANDLE_THEME* pHandle
70 );
diff --git a/src/samples/thmviewer/resource.h b/src/samples/thmviewer/resource.h
new file mode 100644
index 00000000..4acc32cc
--- /dev/null
+++ b/src/samples/thmviewer/resource.h
@@ -0,0 +1,16 @@
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#define IDC_STATIC -1
4#define THMVWR_RES_THEME_FILE 1
5#define THMVWR_RES_RICHEDIT_FILE 2
6
7// Next default values for new objects
8//
9#ifdef APSTUDIO_INVOKED
10#ifndef APSTUDIO_READONLY_SYMBOLS
11#define _APS_NEXT_RESOURCE_VALUE 102
12#define _APS_NEXT_COMMAND_VALUE 40001
13#define _APS_NEXT_CONTROL_VALUE 1003
14#define _APS_NEXT_SYMED_VALUE 101
15#endif
16#endif
diff --git a/src/samples/thmviewer/thmviewer.cpp b/src/samples/thmviewer/thmviewer.cpp
new file mode 100644
index 00000000..f83182d3
--- /dev/null
+++ b/src/samples/thmviewer/thmviewer.cpp
@@ -0,0 +1,543 @@
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
5static const LPCWSTR THMVWR_WINDOW_CLASS_MAIN = L"ThmViewerMain";
6
7static THEME* vpTheme = NULL;
8static DWORD vdwDisplayThreadId = 0;
9static LPWSTR vsczThemeLoadErrors = NULL;
10
11enum THMVWR_CONTROL
12{
13 // Non-paged controls
14 THMVWR_CONTROL_TREE = THEME_FIRST_ASSIGN_CONTROL_ID,
15};
16
17static THEME_ASSIGN_CONTROL_ID vrgInitControls[] = {
18 { THMVWR_CONTROL_TREE, L"Tree" },
19};
20
21// Internal functions
22
23static HRESULT ProcessCommandLine(
24 __in_z_opt LPCWSTR wzCommandLine,
25 __out_z LPWSTR* psczThemeFile,
26 __out_z LPWSTR* psczWxlFile
27 );
28static HRESULT CreateTheme(
29 __in HINSTANCE hInstance,
30 __out THEME** ppTheme
31 );
32static HRESULT CreateMainWindowClass(
33 __in HINSTANCE hInstance,
34 __in THEME* pTheme,
35 __out ATOM* pAtom
36 );
37static LRESULT CALLBACK MainWndProc(
38 __in HWND hWnd,
39 __in UINT uMsg,
40 __in WPARAM wParam,
41 __in LPARAM lParam
42 );
43static void OnThemeLoadBegin(
44 __in_z_opt LPWSTR sczThemeLoadErrors
45 );
46static void OnThemeLoadError(
47 __in THEME* pTheme,
48 __in HRESULT hrFailure
49 );
50static void OnNewTheme(
51 __in THEME* pTheme,
52 __in HWND hWnd,
53 __in HANDLE_THEME* pHandle
54 );
55static void CALLBACK ThmviewerTraceError(
56 __in_z LPCSTR szFile,
57 __in int iLine,
58 __in REPORT_LEVEL rl,
59 __in UINT source,
60 __in HRESULT hrError,
61 __in_z __format_string LPCSTR szFormat,
62 __in va_list args
63 );
64
65
66int WINAPI wWinMain(
67 __in HINSTANCE hInstance,
68 __in_opt HINSTANCE /* hPrevInstance */,
69 __in_z LPWSTR lpCmdLine,
70 __in int /*nCmdShow*/
71 )
72{
73 ::HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
74
75 HRESULT hr = S_OK;
76 BOOL fComInitialized = FALSE;
77 LPWSTR sczThemeFile = NULL;
78 LPWSTR sczWxlFile = NULL;
79 ATOM atom = 0;
80 HWND hWnd = NULL;
81
82 HANDLE hDisplayThread = NULL;
83 HANDLE hLoadThread = NULL;
84
85 BOOL fRet = FALSE;
86 MSG msg = { };
87
88 hr = ::CoInitialize(NULL);
89 ExitOnFailure(hr, "Failed to initialize COM.");
90 fComInitialized = TRUE;
91
92 DutilInitialize(&ThmviewerTraceError);
93
94 hr = ProcessCommandLine(lpCmdLine, &sczThemeFile, &sczWxlFile);
95 ExitOnFailure(hr, "Failed to process command line.");
96
97 hr = CreateTheme(hInstance, &vpTheme);
98 ExitOnFailure(hr, "Failed to create theme.");
99
100 hr = CreateMainWindowClass(hInstance, vpTheme, &atom);
101 ExitOnFailure(hr, "Failed to create main window.");
102
103 hr = ThemeCreateParentWindow(vpTheme, 0, reinterpret_cast<LPCWSTR>(atom), vpTheme->sczCaption, vpTheme->dwStyle, CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, hInstance, NULL, THEME_WINDOW_INITIAL_POSITION_DEFAULT, &hWnd);
104 ExitOnFailure(hr, "Failed to create window.");
105
106 if (!sczThemeFile)
107 {
108 // Prompt for a path to the theme file.
109 OPENFILENAMEW ofn = { };
110 WCHAR wzFile[MAX_PATH] = { };
111
112 ofn.lStructSize = sizeof(ofn);
113 ofn.hwndOwner = hWnd;
114 ofn.lpstrFile = wzFile;
115 ofn.nMaxFile = countof(wzFile);
116 ofn.lpstrFilter = L"Theme Files (*.thm)\0*.thm\0XML Files (*.xml)\0*.xml\0All Files (*.*)\0*.*\0";
117 ofn.nFilterIndex = 1;
118 ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
119 ofn.lpstrTitle = vpTheme->sczCaption;
120
121 if (::GetOpenFileNameW(&ofn))
122 {
123 hr = StrAllocString(&sczThemeFile, wzFile, 0);
124 ExitOnFailure(hr, "Failed to copy opened file to theme file.");
125 }
126 else
127 {
128 ::MessageBoxW(hWnd, L"Must specify a path to theme file.", vpTheme->sczCaption, MB_OK | MB_ICONERROR);
129 ExitFunction1(hr = E_INVALIDARG);
130 }
131 }
132
133 hr = DisplayStart(hInstance, hWnd, &hDisplayThread, &vdwDisplayThreadId);
134 ExitOnFailure(hr, "Failed to start display.");
135
136 hr = LoadStart(sczThemeFile, sczWxlFile, hWnd, &hLoadThread);
137 ExitOnFailure(hr, "Failed to start load.");
138
139 // message pump
140 while (0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0)))
141 {
142 if (-1 == fRet)
143 {
144 hr = E_UNEXPECTED;
145 ExitOnFailure(hr, "Unexpected return value from message pump.");
146 }
147 else if (!ThemeHandleKeyboardMessage(vpTheme, msg.hwnd, &msg))
148 {
149 ::TranslateMessage(&msg);
150 ::DispatchMessageW(&msg);
151 }
152 }
153
154LExit:
155 if (::IsWindow(hWnd))
156 {
157 ::DestroyWindow(hWnd);
158 }
159
160 if (hDisplayThread)
161 {
162 ::PostThreadMessageW(vdwDisplayThreadId, WM_QUIT, 0, 0);
163 ::WaitForSingleObject(hDisplayThread, 10000);
164 ::CloseHandle(hDisplayThread);
165 }
166
167 // TODO: come up with a good way to kill the load thread, probably need to switch
168 // the ReadDirectoryW() to overlapped mode.
169 ReleaseHandle(hLoadThread);
170
171 if (atom && !::UnregisterClassW(reinterpret_cast<LPCWSTR>(atom), hInstance))
172 {
173 DWORD er = ::GetLastError();
174 er = er;
175 }
176
177 ThemeFree(vpTheme);
178 ThemeUninitialize();
179 DutilUninitialize();
180
181 // uninitialize COM
182 if (fComInitialized)
183 {
184 ::CoUninitialize();
185 }
186
187 ReleaseNullStr(vsczThemeLoadErrors);
188 ReleaseStr(sczThemeFile);
189 ReleaseStr(sczWxlFile);
190 return hr;
191}
192
193static void CALLBACK ThmviewerTraceError(
194 __in_z LPCSTR /*szFile*/,
195 __in int /*iLine*/,
196 __in REPORT_LEVEL /*rl*/,
197 __in UINT source,
198 __in HRESULT hrError,
199 __in_z __format_string LPCSTR szFormat,
200 __in va_list args
201 )
202{
203 HRESULT hr = S_OK;
204 LPSTR sczFormattedAnsi = NULL;
205 LPWSTR sczMessage = NULL;
206
207 if (DUTIL_SOURCE_THMUTIL != source)
208 {
209 ExitFunction();
210 }
211
212 hr = StrAnsiAllocFormattedArgs(&sczFormattedAnsi, szFormat, args);
213 ExitOnFailure(hr, "Failed to format error log string.");
214
215 hr = StrAllocFormatted(&sczMessage, L"Error 0x%08x: %S\r\n", hrError, sczFormattedAnsi);
216 ExitOnFailure(hr, "Failed to prepend error number to error log string.");
217
218 hr = StrAllocConcat(&vsczThemeLoadErrors, sczMessage, 0);
219 ExitOnFailure(hr, "Failed to append theme load error.");
220
221LExit:
222 ReleaseStr(sczFormattedAnsi);
223 ReleaseStr(sczMessage);
224}
225
226
227//
228// ProcessCommandLine - process the provided command line arguments.
229//
230static HRESULT ProcessCommandLine(
231 __in_z_opt LPCWSTR wzCommandLine,
232 __out_z LPWSTR* psczThemeFile,
233 __out_z LPWSTR* psczWxlFile
234 )
235{
236 HRESULT hr = S_OK;
237 int argc = 0;
238 LPWSTR* argv = NULL;
239
240 if (wzCommandLine && *wzCommandLine)
241 {
242 hr = AppParseCommandLine(wzCommandLine, &argc, &argv);
243 ExitOnFailure(hr, "Failed to parse command line.");
244
245 for (int i = 0; i < argc; ++i)
246 {
247 if (argv[i][0] == L'-' || argv[i][0] == L'/')
248 {
249 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"lang", -1))
250 {
251 if (i + 1 >= argc)
252 {
253 ExitOnRootFailure(hr = E_INVALIDARG, "Must specify a language.");
254 }
255
256 ++i;
257 }
258 }
259 else
260 {
261 LPCWSTR wzExtension = PathExtension(argv[i]);
262 if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, wzExtension, -1, L".wxl", -1))
263 {
264 hr = StrAllocString(psczWxlFile, argv[i], 0);
265 }
266 else
267 {
268 hr = StrAllocString(psczThemeFile, argv[i], 0);
269 }
270 ExitOnFailure(hr, "Failed to copy path to file.");
271 }
272 }
273 }
274
275LExit:
276 if (argv)
277 {
278 AppFreeCommandLineArgs(argv);
279 }
280
281 return hr;
282}
283
284static HRESULT CreateTheme(
285 __in HINSTANCE hInstance,
286 __out THEME** ppTheme
287 )
288{
289 HRESULT hr = S_OK;
290
291 hr = ThemeInitialize(hInstance);
292 ExitOnFailure(hr, "Failed to initialize theme manager.");
293
294 hr = ThemeLoadFromResource(hInstance, MAKEINTRESOURCEA(THMVWR_RES_THEME_FILE), ppTheme);
295 ExitOnFailure(hr, "Failed to load theme from thmviewer.thm.");
296
297LExit:
298 return hr;
299}
300
301static HRESULT CreateMainWindowClass(
302 __in HINSTANCE hInstance,
303 __in THEME* pTheme,
304 __out ATOM* pAtom
305 )
306{
307 HRESULT hr = S_OK;
308 ATOM atom = 0;
309 WNDCLASSW wc = { };
310
311 wc.lpfnWndProc = MainWndProc;
312 wc.hInstance = hInstance;
313 wc.hIcon = reinterpret_cast<HICON>(pTheme->hIcon);
314 wc.hCursor = ::LoadCursorW(NULL, (LPCWSTR)IDC_ARROW);
315 wc.hbrBackground = pTheme->rgFonts[pTheme->dwFontId].hBackground;
316 wc.lpszMenuName = NULL;
317 wc.lpszClassName = THMVWR_WINDOW_CLASS_MAIN;
318 atom = ::RegisterClassW(&wc);
319 if (!atom)
320 {
321 ExitWithLastError(hr, "Failed to register main windowclass .");
322 }
323
324 *pAtom = atom;
325
326LExit:
327 return hr;
328}
329
330static LRESULT CALLBACK MainWndProc(
331 __in HWND hWnd,
332 __in UINT uMsg,
333 __in WPARAM wParam,
334 __in LPARAM lParam
335 )
336{
337 HANDLE_THEME* pHandleTheme = reinterpret_cast<HANDLE_THEME*>(::GetWindowLongPtrW(hWnd, GWLP_USERDATA));
338
339 switch (uMsg)
340 {
341 case WM_NCCREATE:
342 {
343 //LPCREATESTRUCT lpcs = reinterpret_cast<LPCREATESTRUCT>(lParam);
344 //pBA = reinterpret_cast<CWixStandardBootstrapperApplication*>(lpcs->lpCreateParams);
345 //::SetWindowLongPtrW(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pBA));
346 }
347 break;
348
349 case WM_NCDESTROY:
350 DecrementHandleTheme(pHandleTheme);
351 ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, 0);
352 break;
353
354 case WM_CREATE:
355 {
356 HRESULT hr = ThemeLoadControls(vpTheme, vrgInitControls, countof(vrgInitControls));
357 if (FAILED(hr))
358 {
359 return -1;
360 }
361 }
362 break;
363
364 case WM_THMVWR_THEME_LOAD_BEGIN:
365 OnThemeLoadBegin(vsczThemeLoadErrors);
366 return 0;
367
368 case WM_THMVWR_THEME_LOAD_ERROR:
369 OnThemeLoadError(vpTheme, lParam);
370 return 0;
371
372 case WM_THMVWR_NEW_THEME:
373 OnNewTheme(vpTheme, hWnd, reinterpret_cast<HANDLE_THEME*>(lParam));
374 return 0;
375
376 case WM_DESTROY:
377 ::PostQuitMessage(0);
378 break;
379
380 case WM_NOTIFY:
381 {
382 NMHDR* pnmhdr = reinterpret_cast<NMHDR*>(lParam);
383 switch (pnmhdr->code)
384 {
385 case TVN_SELCHANGEDW:
386 {
387 NMTREEVIEWW* ptv = reinterpret_cast<NMTREEVIEWW*>(lParam);
388 ::PostThreadMessageW(vdwDisplayThreadId, WM_THMVWR_SHOWPAGE, SW_HIDE, ptv->itemOld.lParam);
389 ::PostThreadMessageW(vdwDisplayThreadId, WM_THMVWR_SHOWPAGE, SW_SHOW, ptv->itemNew.lParam);
390 }
391 break;
392
393 //case NM_DBLCLK:
394 // TVITEM item = { };
395 // item.mask = TVIF_PARAM;
396 // item.hItem = TreeView_GetSelection(pnmhdr->hwndFrom);
397 // TreeView_GetItem(pnmhdr->hwndFrom, &item);
398 // ::PostThreadMessageW(vdwDisplayThreadId, WM_THMVWR_SHOWPAGE, SW_SHOW, item.lParam);
399 // return 1;
400 }
401 }
402 break;
403 }
404
405 return ThemeDefWindowProc(vpTheme, hWnd, uMsg, wParam, lParam);
406}
407
408static void OnThemeLoadBegin(
409 __in_z_opt LPWSTR sczThemeLoadErrors
410 )
411{
412 ReleaseNullStr(sczThemeLoadErrors);
413}
414
415static void OnThemeLoadError(
416 __in THEME* pTheme,
417 __in HRESULT hrFailure
418 )
419{
420 HRESULT hr = S_OK;
421 LPWSTR sczMessage = NULL;
422 LPWSTR* psczErrors = NULL;
423 UINT cErrors = 0;
424 TVINSERTSTRUCTW tvi = { };
425
426 // Add the application node.
427 tvi.hParent = NULL;
428 tvi.hInsertAfter = TVI_ROOT;
429 tvi.item.mask = TVIF_TEXT | TVIF_PARAM;
430 tvi.item.lParam = 0;
431 tvi.item.pszText = L"Failed to load theme.";
432 tvi.hParent = reinterpret_cast<HTREEITEM>(ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_INSERTITEMW, 0, reinterpret_cast<LPARAM>(&tvi)));
433
434 if (!vsczThemeLoadErrors)
435 {
436 hr = StrAllocFormatted(&sczMessage, L"Error 0x%08x.", hrFailure);
437 ExitOnFailure(hr, "Failed to format error message.");
438
439 tvi.item.pszText = sczMessage;
440 ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_INSERTITEMW, 0, reinterpret_cast<LPARAM>(&tvi));
441
442 hr = StrAllocFromError(&sczMessage, hrFailure, NULL);
443 ExitOnFailure(hr, "Failed to format error message text.");
444
445 tvi.item.pszText = sczMessage;
446 ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_INSERTITEMW, 0, reinterpret_cast<LPARAM>(&tvi));
447 }
448 else
449 {
450 hr = StrSplitAllocArray(&psczErrors, &cErrors, vsczThemeLoadErrors, L"\r\n");
451 ExitOnFailure(hr, "Failed to split theme load errors.");
452
453 for (DWORD i = 0; i < cErrors; ++i)
454 {
455 tvi.item.pszText = psczErrors[i];
456 ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_INSERTITEMW, 0, reinterpret_cast<LPARAM>(&tvi));
457 }
458 }
459
460 ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_EXPAND, TVE_EXPAND, reinterpret_cast<LPARAM>(tvi.hParent));
461
462LExit:
463 ReleaseStr(sczMessage);
464 ReleaseMem(psczErrors);
465}
466
467
468static void OnNewTheme(
469 __in THEME* pTheme,
470 __in HWND hWnd,
471 __in HANDLE_THEME* pHandle
472 )
473{
474 HANDLE_THEME* pOldHandle = reinterpret_cast<HANDLE_THEME*>(::GetWindowLongPtrW(hWnd, GWLP_USERDATA));
475 THEME* pNewTheme = pHandle->pTheme;
476
477 WCHAR wzSelectedPage[MAX_PATH] = { };
478 HTREEITEM htiSelected = NULL;
479 TVINSERTSTRUCTW tvi = { };
480 TVITEMW item = { };
481
482 if (pOldHandle)
483 {
484 DecrementHandleTheme(pOldHandle);
485 pOldHandle = NULL;
486 }
487
488 // Pass the new theme handle to the display thread so it can get the display window prepared
489 // to show the new theme.
490 IncrementHandleTheme(pHandle);
491 ::PostThreadMessageW(vdwDisplayThreadId, WM_THMVWR_NEW_THEME, 0, reinterpret_cast<LPARAM>(pHandle));
492
493 ::SetWindowLongPtrW(hWnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(pHandle));
494
495 // Remember the currently selected item by name so we can try to automatically select it later.
496 // Otherwise, the user would see their window destroyed after every save of their theme file and
497 // have to click to get the window back.
498 item.mask = TVIF_TEXT;
499 item.pszText = wzSelectedPage;
500 item.cchTextMax = countof(wzSelectedPage);
501 item.hItem = reinterpret_cast<HTREEITEM>(ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_GETNEXTITEM, TVGN_CARET, NULL));
502 ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_GETITEM, 0, reinterpret_cast<LPARAM>(&item));
503
504 // Remove the previous items in the tree.
505 ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_DELETEITEM, 0, reinterpret_cast<LPARAM>(TVI_ROOT));
506
507 // Add the application node.
508 tvi.hParent = NULL;
509 tvi.hInsertAfter = TVI_ROOT;
510 tvi.item.mask = TVIF_TEXT | TVIF_PARAM;
511 tvi.item.lParam = 0;
512 tvi.item.pszText = pHandle && pHandle->pTheme && pHandle->pTheme->sczCaption ? pHandle->pTheme->sczCaption : L"Window";
513
514 // Add the pages.
515 tvi.hParent = reinterpret_cast<HTREEITEM>(ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_INSERTITEMW, 0, reinterpret_cast<LPARAM>(&tvi)));
516 tvi.hInsertAfter = TVI_SORT;
517 for (DWORD i = 0; i < pNewTheme->cPages; ++i)
518 {
519 THEME_PAGE* pPage = pNewTheme->rgPages + i;
520 if (pPage->sczName && *pPage->sczName)
521 {
522 tvi.item.pszText = pPage->sczName;
523 tvi.item.lParam = i + 1; //prgdwPageIds[i]; - TODO: do the right thing here by calling ThemeGetPageIds(), should not assume we know how the page ids will be calculated.
524
525 HTREEITEM hti = reinterpret_cast<HTREEITEM>(ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_INSERTITEMW, 0, reinterpret_cast<LPARAM>(&tvi)));
526 if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, pPage->sczName, -1, wzSelectedPage, -1))
527 {
528 htiSelected = hti;
529 }
530 }
531 }
532
533 if (*wzSelectedPage && CSTR_EQUAL == ::CompareStringW(LOCALE_NEUTRAL, 0, L"Application", -1, wzSelectedPage, -1))
534 {
535 htiSelected = tvi.hParent;
536 }
537
538 ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_EXPAND, TVE_EXPAND, reinterpret_cast<LPARAM>(tvi.hParent));
539 if (htiSelected)
540 {
541 ThemeSendControlMessage(pTheme, THMVWR_CONTROL_TREE, TVM_SELECTITEM, TVGN_CARET, reinterpret_cast<LPARAM>(htiSelected));
542 }
543}
diff --git a/src/samples/thmviewer/thmviewer.manifest b/src/samples/thmviewer/thmviewer.manifest
new file mode 100644
index 00000000..4663b61c
--- /dev/null
+++ b/src/samples/thmviewer/thmviewer.manifest
@@ -0,0 +1,19 @@
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
5<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
6 <assemblyIdentity name="thmviewer.exe" version="1.0.0.0" processorArchitecture="x86" type="win32"/>
7 <description>WiX Toolset Theme Viewer</description>
8 <dependency><dependentAssembly><assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" /></dependentAssembly></dependency>
9 <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"><application><supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/><supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/></application></compatibility>
10 <application xmlns="urn:schemas-microsoft-com:asm.v3">
11 <windowsSettings xmlns="urn:schemas-microsoft-com:asm.v3">
12 <!-- pre-Win10 1607 -->
13 <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
14 <!-- Win10 picks the first one it recognizes -->
15 <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor, System</dpiAwareness>
16 </windowsSettings>
17 </application>
18 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"><security><requestedPrivileges><requestedExecutionLevel level="asInvoker" uiAccess="false"/></requestedPrivileges></security></trustInfo>
19</assembly>
diff --git a/src/samples/thmviewer/thmviewer.rc b/src/samples/thmviewer/thmviewer.rc
new file mode 100644
index 00000000..dc6d7242
--- /dev/null
+++ b/src/samples/thmviewer/thmviewer.rc
@@ -0,0 +1,12 @@
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 <winver.h>
4#include <windows.h>
5#include "resource.h"
6
7//#define MANIFEST_RESOURCE_ID 1
8//MANIFEST_RESOURCE_ID RT_MANIFEST "thmviewer.manifest"
9
10LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
11THMVWR_RES_THEME_FILE RCDATA "Resources\\thm.xml"
12THMVWR_RES_RICHEDIT_FILE RCDATA "Resources\\LoremIpsum.rtf"
diff --git a/src/samples/thmviewer/thmviewer.v3.ncrunchproject b/src/samples/thmviewer/thmviewer.v3.ncrunchproject
new file mode 100644
index 00000000..3cffd6ce
--- /dev/null
+++ b/src/samples/thmviewer/thmviewer.v3.ncrunchproject
@@ -0,0 +1,7 @@
1<ProjectConfiguration>
2 <Settings>
3 <AdditionalFilesToIncludeForProject>
4 <Value>thmviewer.manifest</Value>
5 </AdditionalFilesToIncludeForProject>
6 </Settings>
7</ProjectConfiguration> \ No newline at end of file
diff --git a/src/samples/thmviewer/thmviewer.vcxproj b/src/samples/thmviewer/thmviewer.vcxproj
new file mode 100644
index 00000000..c02dc237
--- /dev/null
+++ b/src/samples/thmviewer/thmviewer.vcxproj
@@ -0,0 +1,88 @@
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\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" />
6 <Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" />
7 <Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" />
8 <Import Project="..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" />
9
10 <ItemGroup Label="ProjectConfigurations">
11 <ProjectConfiguration Include="Debug|Win32">
12 <Configuration>Debug</Configuration>
13 <Platform>Win32</Platform>
14 </ProjectConfiguration>
15 <ProjectConfiguration Include="Release|Win32">
16 <Configuration>Release</Configuration>
17 <Platform>Win32</Platform>
18 </ProjectConfiguration>
19 </ItemGroup>
20
21 <PropertyGroup Label="Globals">
22 <ProjectGuid>{95228C13-97F5-484A-B4A2-ECF4618B0881}</ProjectGuid>
23 <Keyword>Win32Proj</Keyword>
24 <ConfigurationType>Application</ConfigurationType>
25 <PlatformToolset>v142</PlatformToolset>
26 <CharacterSet>Unicode</CharacterSet>
27 <Description>WiX Toolset Theme Viewer</Description>
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 </ImportGroup>
38
39 <PropertyGroup>
40 <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib</ProjectAdditionalLinkLibraries>
41 </PropertyGroup>
42
43 <ItemGroup>
44 <ClCompile Include="display.cpp" />
45 <ClCompile Include="load.cpp" />
46 <ClCompile Include="precomp.cpp">
47 <PrecompiledHeader>Create</PrecompiledHeader>
48 </ClCompile>
49 <ClCompile Include="thmviewer.cpp" />
50 </ItemGroup>
51 <ItemGroup>
52 <ClInclude Include="precomp.h" />
53 <ClInclude Include="resource.h" />
54 </ItemGroup>
55 <ItemGroup>
56 <None Include="packages.config" />
57 <None Include="Resources\LoremIpsum.rtf" />
58 <None Include="Resources\thm.xml" />
59 </ItemGroup>
60 <ItemGroup>
61 <ResourceCompile Include="thmviewer.rc" />
62 </ItemGroup>
63 <ItemGroup>
64 <Manifest Include="thmviewer.manifest" />
65 </ItemGroup>
66
67 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
68 <ImportGroup Label="ExtensionTargets">
69 <Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.targets" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.targets')" />
70 <Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets')" />
71 <Import Project="..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" />
72 <Import Project="..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" />
73 </ImportGroup>
74
75 <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
76 <PropertyGroup>
77 <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>
78 </PropertyGroup>
79 <Error Condition="!Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props'))" />
80 <Error Condition="!Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.targets'))" />
81 <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props'))" />
82 <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.targets'))" />
83 <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props'))" />
84 <Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets'))" />
85 <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" />
86 <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.72\build\WixToolset.DUtil.props'))" />
87 </Target>
88</Project> \ No newline at end of file
diff --git a/src/samples/thmviewer/thmviewer.vcxproj.filters b/src/samples/thmviewer/thmviewer.vcxproj.filters
new file mode 100644
index 00000000..488d5510
--- /dev/null
+++ b/src/samples/thmviewer/thmviewer.vcxproj.filters
@@ -0,0 +1,56 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup>
4 <Filter Include="Source Files">
5 <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6 <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7 </Filter>
8 <Filter Include="Header Files">
9 <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10 <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
11 </Filter>
12 <Filter Include="Resource Files">
13 <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14 <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
15 </Filter>
16 </ItemGroup>
17 <ItemGroup>
18 <ClCompile Include="thmviewer.cpp">
19 <Filter>Source Files</Filter>
20 </ClCompile>
21 <ClCompile Include="display.cpp">
22 <Filter>Source Files</Filter>
23 </ClCompile>
24 <ClCompile Include="load.cpp">
25 <Filter>Source Files</Filter>
26 </ClCompile>
27 <ClCompile Include="precomp.cpp">
28 <Filter>Source Files</Filter>
29 </ClCompile>
30 </ItemGroup>
31 <ItemGroup>
32 <None Include="Resources\thm.xml">
33 <Filter>Resource Files</Filter>
34 </None>
35 <None Include="Resources\LoremIpsum.rtf">
36 <Filter>Resource Files</Filter>
37 </None>
38 <None Include="packages.config" />
39 </ItemGroup>
40 <ItemGroup>
41 <ClInclude Include="precomp.h">
42 <Filter>Header Files</Filter>
43 </ClInclude>
44 <ClInclude Include="resource.h">
45 <Filter>Header Files</Filter>
46 </ClInclude>
47 </ItemGroup>
48 <ItemGroup>
49 <ResourceCompile Include="thmviewer.rc">
50 <Filter>Resource Files</Filter>
51 </ResourceCompile>
52 </ItemGroup>
53 <ItemGroup>
54 <Manifest Include="thmviewer.manifest" />
55 </ItemGroup>
56</Project> \ No newline at end of file
diff --git a/src/wix/Directory.vcxproj.props b/src/wix/Directory.vcxproj.props
new file mode 100644
index 00000000..bcf26c57
--- /dev/null
+++ b/src/wix/Directory.vcxproj.props
@@ -0,0 +1,111 @@
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
10 <!-- NBGV properties -->
11 <AssemblyCompany>$(Company)</AssemblyCompany>
12 <AssemblyCopyright>$(Copyright)</AssemblyCopyright>
13
14 <RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
15 <NuGetTargetMoniker>native,Version=v0.0</NuGetTargetMoniker>
16 </PropertyGroup>
17
18 <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' AND '$(VisualStudioVersion)'>='15.0'">
19 <WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
20 </PropertyGroup>
21
22 <ItemDefinitionGroup>
23 <ClCompile>
24 <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
25 <WarningLevel>Level4</WarningLevel>
26 <AdditionalIncludeDirectories>$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
27 <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
28 <PrecompiledHeader>Use</PrecompiledHeader>
29 <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
30 <CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention>
31 <TreatWarningAsError>true</TreatWarningAsError>
32 <ExceptionHandling>false</ExceptionHandling>
33 <AdditionalOptions>-YlprecompDefine</AdditionalOptions>
34 <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
35 <MultiProcessorCompilation Condition=" $(NUMBER_OF_PROCESSORS) &gt; 4 ">true</MultiProcessorCompilation>
36 </ClCompile>
37 <ResourceCompile>
38 <PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
39 <AdditionalIncludeDirectories>$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
40 </ResourceCompile>
41 <Lib>
42 <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
43 </Lib>
44 <Link>
45 <SubSystem>$(ProjectSubSystem)</SubSystem>
46 <ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile>
47 <NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint>
48 <GenerateDebugInformation>true</GenerateDebugInformation>
49 <AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
50 <AdditionalLibraryDirectories>$(OutDir);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
51 <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions>
52 </Link>
53 </ItemDefinitionGroup>
54
55 <ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'">
56 <ClCompile>
57 <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
58 </ClCompile>
59 </ItemDefinitionGroup>
60 <ItemDefinitionGroup Condition=" '$(Platform)'=='arm' ">
61 <ClCompile>
62 <CallingConvention>CDecl</CallingConvention>
63 </ClCompile>
64 </ItemDefinitionGroup>
65 <ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' ">
66 <ClCompile>
67 <DebugInformationFormat>OldStyle</DebugInformationFormat>
68 <OmitDefaultLibName>true</OmitDefaultLibName>
69 <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
70 </ClCompile>
71 </ItemDefinitionGroup>
72 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' ">
73 <ClCompile>
74 <Optimization>Disabled</Optimization>
75 <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
76 <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
77 <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
78 </ClCompile>
79 </ItemDefinitionGroup>
80 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
81 <ClCompile>
82 <BasicRuntimeChecks></BasicRuntimeChecks>
83 <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
84 </ClCompile>
85 </ItemDefinitionGroup>
86 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
87 <ClCompile>
88 <Optimization>MinSpace</Optimization>
89 <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
90 <FunctionLevelLinking>true</FunctionLevelLinking>
91 <IntrinsicFunctions>true</IntrinsicFunctions>
92 <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
93 </ClCompile>
94 <Link>
95 <EnableCOMDATFolding>true</EnableCOMDATFolding>
96 <OptimizeReferences>true</OptimizeReferences>
97 </Link>
98 </ItemDefinitionGroup>
99 <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
100 <ClCompile>
101 <BasicRuntimeChecks></BasicRuntimeChecks>
102 <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
103 </ClCompile>
104 </ItemDefinitionGroup>
105 <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
106 <Link>
107 <KeyFile>$(LinkKeyFile)</KeyFile>
108 <DelaySign>$(LinkDelaySign)</DelaySign>
109 </Link>
110 </ItemDefinitionGroup>
111</Project>
diff --git a/src/wix/Directory.wixproj.props b/src/wix/Directory.wixproj.props
new file mode 100644
index 00000000..a0aaa658
--- /dev/null
+++ b/src/wix/Directory.wixproj.props
@@ -0,0 +1,14 @@
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 <DefineConstants>$(DefineConstants);CompanyName=$(Company)</DefineConstants>
7 </PropertyGroup>
8
9 <ItemGroup>
10 <BindInputPaths Include="$(OutputPath)Win32\" />
11 </ItemGroup>
12
13 <Import Project="$(OutputPath)\publish\WixToolset.Sdk\build\WixToolset.Sdk.props" />
14</Project>
diff --git a/src/wix/README-Tools.md b/src/wix/README-Tools.md
new file mode 100644
index 00000000..a806dbde
--- /dev/null
+++ b/src/wix/README-Tools.md
@@ -0,0 +1,4 @@
1# Tools
2
3Command line tools and MSBuild integration
4
diff --git a/src/wix/Tools.sln b/src/wix/Tools.sln
new file mode 100644
index 00000000..23f8a4d9
--- /dev/null
+++ b/src/wix/Tools.sln
@@ -0,0 +1,105 @@
1
2Microsoft Visual Studio Solution File, Format Version 12.00
3# Visual Studio Version 16
4VisualStudioVersion = 16.0.30011.22
5MinimumVisualStudioVersion = 15.0.26124.0
6Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BuildTasks", "src\test\WixToolsetTest.BuildTasks\WixToolsetTest.BuildTasks.csproj", "{4B0098A4-B581-4D04-BA1E-6DC2370A7D43}"
7EndProject
8Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wix", "src\wix\wix.csproj", "{DA5CA026-6165-48C4-BDA5-BB4B17D56A18}"
9EndProject
10Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.BuildTasks", "src\WixToolset.BuildTasks\WixToolset.BuildTasks.csproj", "{65141CE1-0BDD-41EF-8043-35B96C423CB6}"
11EndProject
12Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-wix", "src\dotnet-wix\dotnet-wix.csproj", "{938BCA04-610B-4B99-9CB7-02BF7397A972}"
13EndProject
14Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Sdk", "src\WixToolset.Sdk\WixToolset.Sdk.csproj", "{0DF5D4CF-8457-469D-8288-13775E984F70}"
15EndProject
16Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{449BE9B0-422F-4039-A030-BDD3E7D97878}"
17 ProjectSection(SolutionItems) = preProject
18 .editorconfig = .editorconfig
19 EndProjectSection
20EndProject
21Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thmviewer", "src\thmviewer\thmviewer.vcxproj", "{95228C13-97F5-484A-B4A2-ECF4618B0881}"
22EndProject
23Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "heat", "src\heat\heat.csproj", "{B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}"
24EndProject
25Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Sdk", "src\test\WixToolsetTest.Sdk\WixToolsetTest.Sdk.csproj", "{7B610B7B-C69D-4A4C-9D65-F304C44479E7}"
26EndProject
27Global
28 GlobalSection(SolutionConfigurationPlatforms) = preSolution
29 Debug|Any CPU = Debug|Any CPU
30 Debug|x86 = Debug|x86
31 Release|Any CPU = Release|Any CPU
32 Release|x86 = Release|x86
33 EndGlobalSection
34 GlobalSection(ProjectConfigurationPlatforms) = postSolution
35 {4B0098A4-B581-4D04-BA1E-6DC2370A7D43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36 {4B0098A4-B581-4D04-BA1E-6DC2370A7D43}.Debug|Any CPU.Build.0 = Debug|Any CPU
37 {4B0098A4-B581-4D04-BA1E-6DC2370A7D43}.Debug|x86.ActiveCfg = Debug|Any CPU
38 {4B0098A4-B581-4D04-BA1E-6DC2370A7D43}.Debug|x86.Build.0 = Debug|Any CPU
39 {4B0098A4-B581-4D04-BA1E-6DC2370A7D43}.Release|Any CPU.ActiveCfg = Release|Any CPU
40 {4B0098A4-B581-4D04-BA1E-6DC2370A7D43}.Release|Any CPU.Build.0 = Release|Any CPU
41 {4B0098A4-B581-4D04-BA1E-6DC2370A7D43}.Release|x86.ActiveCfg = Release|Any CPU
42 {4B0098A4-B581-4D04-BA1E-6DC2370A7D43}.Release|x86.Build.0 = Release|Any CPU
43 {DA5CA026-6165-48C4-BDA5-BB4B17D56A18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
44 {DA5CA026-6165-48C4-BDA5-BB4B17D56A18}.Debug|Any CPU.Build.0 = Debug|Any CPU
45 {DA5CA026-6165-48C4-BDA5-BB4B17D56A18}.Debug|x86.ActiveCfg = Debug|Any CPU
46 {DA5CA026-6165-48C4-BDA5-BB4B17D56A18}.Debug|x86.Build.0 = Debug|Any CPU
47 {DA5CA026-6165-48C4-BDA5-BB4B17D56A18}.Release|Any CPU.ActiveCfg = Release|Any CPU
48 {DA5CA026-6165-48C4-BDA5-BB4B17D56A18}.Release|Any CPU.Build.0 = Release|Any CPU
49 {DA5CA026-6165-48C4-BDA5-BB4B17D56A18}.Release|x86.ActiveCfg = Release|Any CPU
50 {DA5CA026-6165-48C4-BDA5-BB4B17D56A18}.Release|x86.Build.0 = Release|Any CPU
51 {65141CE1-0BDD-41EF-8043-35B96C423CB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
52 {65141CE1-0BDD-41EF-8043-35B96C423CB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
53 {65141CE1-0BDD-41EF-8043-35B96C423CB6}.Debug|x86.ActiveCfg = Debug|Any CPU
54 {65141CE1-0BDD-41EF-8043-35B96C423CB6}.Debug|x86.Build.0 = Debug|Any CPU
55 {65141CE1-0BDD-41EF-8043-35B96C423CB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
56 {65141CE1-0BDD-41EF-8043-35B96C423CB6}.Release|Any CPU.Build.0 = Release|Any CPU
57 {65141CE1-0BDD-41EF-8043-35B96C423CB6}.Release|x86.ActiveCfg = Release|Any CPU
58 {65141CE1-0BDD-41EF-8043-35B96C423CB6}.Release|x86.Build.0 = Release|Any CPU
59 {938BCA04-610B-4B99-9CB7-02BF7397A972}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
60 {938BCA04-610B-4B99-9CB7-02BF7397A972}.Debug|Any CPU.Build.0 = Debug|Any CPU
61 {938BCA04-610B-4B99-9CB7-02BF7397A972}.Debug|x86.ActiveCfg = Debug|Any CPU
62 {938BCA04-610B-4B99-9CB7-02BF7397A972}.Debug|x86.Build.0 = Debug|Any CPU
63 {938BCA04-610B-4B99-9CB7-02BF7397A972}.Release|Any CPU.ActiveCfg = Release|Any CPU
64 {938BCA04-610B-4B99-9CB7-02BF7397A972}.Release|Any CPU.Build.0 = Release|Any CPU
65 {938BCA04-610B-4B99-9CB7-02BF7397A972}.Release|x86.ActiveCfg = Release|Any CPU
66 {938BCA04-610B-4B99-9CB7-02BF7397A972}.Release|x86.Build.0 = Release|Any CPU
67 {0DF5D4CF-8457-469D-8288-13775E984F70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
68 {0DF5D4CF-8457-469D-8288-13775E984F70}.Debug|Any CPU.Build.0 = Debug|Any CPU
69 {0DF5D4CF-8457-469D-8288-13775E984F70}.Debug|x86.ActiveCfg = Debug|Any CPU
70 {0DF5D4CF-8457-469D-8288-13775E984F70}.Debug|x86.Build.0 = Debug|Any CPU
71 {0DF5D4CF-8457-469D-8288-13775E984F70}.Release|Any CPU.ActiveCfg = Release|Any CPU
72 {0DF5D4CF-8457-469D-8288-13775E984F70}.Release|Any CPU.Build.0 = Release|Any CPU
73 {0DF5D4CF-8457-469D-8288-13775E984F70}.Release|x86.ActiveCfg = Release|Any CPU
74 {0DF5D4CF-8457-469D-8288-13775E984F70}.Release|x86.Build.0 = Release|Any CPU
75 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Debug|Any CPU.ActiveCfg = Debug|Win32
76 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Debug|Any CPU.Build.0 = Debug|Win32
77 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Debug|x86.ActiveCfg = Debug|Win32
78 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Debug|x86.Build.0 = Debug|Win32
79 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|Any CPU.ActiveCfg = Release|Win32
80 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.ActiveCfg = Release|Win32
81 {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.Build.0 = Release|Win32
82 {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
83 {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
84 {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Debug|x86.ActiveCfg = Debug|Any CPU
85 {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Debug|x86.Build.0 = Debug|Any CPU
86 {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
87 {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Release|Any CPU.Build.0 = Release|Any CPU
88 {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Release|x86.ActiveCfg = Release|Any CPU
89 {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Release|x86.Build.0 = Release|Any CPU
90 {7B610B7B-C69D-4A4C-9D65-F304C44479E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
91 {7B610B7B-C69D-4A4C-9D65-F304C44479E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
92 {7B610B7B-C69D-4A4C-9D65-F304C44479E7}.Debug|x86.ActiveCfg = Debug|Any CPU
93 {7B610B7B-C69D-4A4C-9D65-F304C44479E7}.Debug|x86.Build.0 = Debug|Any CPU
94 {7B610B7B-C69D-4A4C-9D65-F304C44479E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
95 {7B610B7B-C69D-4A4C-9D65-F304C44479E7}.Release|Any CPU.Build.0 = Release|Any CPU
96 {7B610B7B-C69D-4A4C-9D65-F304C44479E7}.Release|x86.ActiveCfg = Release|Any CPU
97 {7B610B7B-C69D-4A4C-9D65-F304C44479E7}.Release|x86.Build.0 = Release|Any CPU
98 EndGlobalSection
99 GlobalSection(SolutionProperties) = preSolution
100 HideSolutionNode = FALSE
101 EndGlobalSection
102 GlobalSection(ExtensibilityGlobals) = postSolution
103 SolutionGuid = {AEB88B8C-8C84-4E97-9886-30CBDD32B34B}
104 EndGlobalSection
105EndGlobal
diff --git a/src/wix/Tools.v3.ncrunchsolution b/src/wix/Tools.v3.ncrunchsolution
new file mode 100644
index 00000000..10420ac9
--- /dev/null
+++ b/src/wix/Tools.v3.ncrunchsolution
@@ -0,0 +1,6 @@
1<SolutionConfiguration>
2 <Settings>
3 <AllowParallelTestExecution>True</AllowParallelTestExecution>
4 <SolutionConfigured>True</SolutionConfigured>
5 </Settings>
6</SolutionConfiguration> \ No newline at end of file
diff --git a/src/wix/WixToolset.BuildTasks/AssemblyInfo.cs b/src/wix/WixToolset.BuildTasks/AssemblyInfo.cs
new file mode 100644
index 00000000..ae52fce8
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/AssemblyInfo.cs
@@ -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
3using System.Reflection;
4using System.Runtime.InteropServices;
5
6[assembly: AssemblyCulture("")]
7[assembly: ComVisible(false)]
diff --git a/src/wix/WixToolset.BuildTasks/BuildException.cs b/src/wix/WixToolset.BuildTasks/BuildException.cs
new file mode 100644
index 00000000..953134ba
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/BuildException.cs
@@ -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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Globalization;
7
8 class BuildException : Exception
9 {
10 public BuildException()
11 {
12 }
13
14 public BuildException(string message) : base(message)
15 {
16 }
17
18 public BuildException(string message, Exception innerException) : base(message, innerException)
19 {
20 }
21
22 public BuildException(string format, params string[] args) : this(String.Format(CultureInfo.CurrentCulture, format, args))
23 {
24 }
25 }
26}
diff --git a/src/wix/WixToolset.BuildTasks/Common.cs b/src/wix/WixToolset.BuildTasks/Common.cs
new file mode 100644
index 00000000..c5b709c2
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/Common.cs
@@ -0,0 +1,39 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Text.RegularExpressions;
7
8 /// <summary>
9 /// Common WixTasks utility methods and types.
10 /// </summary>
11 public static class ToolsCommon
12 {
13 /// <summary>Metadata key name to turn off harvesting of project references.</summary>
14 public const string DoNotHarvest = "DoNotHarvest";
15
16 private static readonly Regex AddPrefix = new Regex(@"^[^a-zA-Z_]", RegexOptions.Compiled);
17 private static readonly Regex IllegalIdentifierCharacters = new Regex(@"[^A-Za-z0-9_\.]|\.{2,}", RegexOptions.Compiled); // non 'words' and assorted valid characters
18
19 /// <summary>
20 /// Return an identifier based on passed file/directory name
21 /// </summary>
22 /// <param name="name">File/directory name to generate identifer from</param>
23 /// <returns>A version of the name that is a legal identifier.</returns>
24 /// <remarks>This is duplicated from WiX's Common class.</remarks>
25 public static string GetIdentifierFromName(string name)
26 {
27 string result = IllegalIdentifierCharacters.Replace(name, "_"); // replace illegal characters with "_".
28
29 // MSI identifiers must begin with an alphabetic character or an
30 // underscore. Prefix all other values with an underscore.
31 if (AddPrefix.IsMatch(name))
32 {
33 result = String.Concat("_", result);
34 }
35
36 return result;
37 }
38 }
39}
diff --git a/src/wix/WixToolset.BuildTasks/ConvertReferences.cs b/src/wix/WixToolset.BuildTasks/ConvertReferences.cs
new file mode 100644
index 00000000..3fdc78d1
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/ConvertReferences.cs
@@ -0,0 +1,89 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Collections.Generic;
7 using Microsoft.Build.Framework;
8 using Microsoft.Build.Utilities;
9
10 /// <summary>
11 /// This task assigns Culture metadata to files based on the value of the Culture attribute on the
12 /// WixLocalization element inside the file.
13 /// </summary>
14 public class ConvertReferences : Task
15 {
16 private string projectOutputGroups;
17 private ITaskItem[] projectReferences;
18 private ITaskItem[] harvestItems;
19
20 /// <summary>
21 /// The total list of cabs in this database
22 /// </summary>
23 [Output]
24 public ITaskItem[] HarvestItems
25 {
26 get { return this.harvestItems; }
27 }
28
29 /// <summary>
30 /// The project output groups to harvest.
31 /// </summary>
32 [Required]
33 public string ProjectOutputGroups
34 {
35 get { return this.projectOutputGroups; }
36 set { this.projectOutputGroups = value; }
37 }
38
39 /// <summary>
40 /// All the project references in the project.
41 /// </summary>
42 [Required]
43 public ITaskItem[] ProjectReferences
44 {
45 get { return this.projectReferences; }
46 set { this.projectReferences = value; }
47 }
48
49 /// <summary>
50 /// Gets a complete list of external cabs referenced by the given installer database file.
51 /// </summary>
52 /// <returns>True upon completion of the task execution.</returns>
53 public override bool Execute()
54 {
55 List<ITaskItem> newItems = new List<ITaskItem>();
56
57 foreach(ITaskItem item in this.ProjectReferences)
58 {
59 Dictionary<string, string> newItemMetadeta = new Dictionary<string, string>();
60
61 if (!String.IsNullOrEmpty(item.GetMetadata(ToolsCommon.DoNotHarvest)))
62 {
63 continue;
64 }
65
66 string refTargetDir = item.GetMetadata("RefTargetDir");
67 if (!String.IsNullOrEmpty(refTargetDir))
68 {
69 newItemMetadeta.Add("DirectoryIds", refTargetDir);
70 }
71
72 string refName = item.GetMetadata("Name");
73 if (!String.IsNullOrEmpty(refName))
74 {
75 newItemMetadeta.Add("ProjectName", refName);
76 }
77
78 newItemMetadeta.Add("ProjectOutputGroups", this.ProjectOutputGroups);
79
80 ITaskItem newItem = new TaskItem(item.ItemSpec, newItemMetadeta);
81 newItems.Add(newItem);
82 }
83
84 this.harvestItems = newItems.ToArray();
85
86 return true;
87 }
88 }
89}
diff --git a/src/wix/WixToolset.BuildTasks/CreateItemAvoidingInference.cs b/src/wix/WixToolset.BuildTasks/CreateItemAvoidingInference.cs
new file mode 100644
index 00000000..3441bd85
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/CreateItemAvoidingInference.cs
@@ -0,0 +1,46 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Collections.Generic;
7 using Microsoft.Build.Framework;
8 using Microsoft.Build.Utilities;
9
10 /// <summary>
11 /// This task assigns Culture metadata to files based on the value of the Culture attribute on the
12 /// WixLocalization element inside the file.
13 /// </summary>
14 public class CreateItemAvoidingInference : Task
15 {
16 /// <summary>
17 /// The properties to converty to items.
18 /// </summary>
19 [Required]
20 public string InputProperties { get; set; }
21
22 /// <summary>
23 /// The output items.
24 /// </summary>
25 [Output]
26 public ITaskItem[] OuputItems { get; private set; }
27
28 /// <summary>
29 /// Gets a complete list of external cabs referenced by the given installer database file.
30 /// </summary>
31 /// <returns>True upon completion of the task execution.</returns>
32 public override bool Execute()
33 {
34 var newItems = new List<ITaskItem>();
35
36 foreach (var property in this.InputProperties.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries))
37 {
38 newItems.Add(new TaskItem(property));
39 }
40
41 this.OuputItems = newItems.ToArray();
42
43 return true;
44 }
45 }
46}
diff --git a/src/wix/WixToolset.BuildTasks/CreateProjectReferenceDefineConstants.cs b/src/wix/WixToolset.BuildTasks/CreateProjectReferenceDefineConstants.cs
new file mode 100644
index 00000000..7cda6b01
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/CreateProjectReferenceDefineConstants.cs
@@ -0,0 +1,271 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Collections.Generic;
7 using System.Globalization;
8 using System.IO;
9 using Microsoft.Build.Framework;
10 using Microsoft.Build.Utilities;
11
12 /// <summary>
13 /// An MSBuild task to create a list of preprocessor defines to be passed to candle from the
14 /// list of referenced projects.
15 /// </summary>
16 public sealed class CreateProjectReferenceDefineConstants : Task
17 {
18 private ITaskItem[] defineConstants;
19 private ITaskItem[] projectConfigurations;
20 private ITaskItem[] projectReferencePaths;
21
22 [Output]
23 public ITaskItem[] DefineConstants
24 {
25 get { return this.defineConstants; }
26 }
27
28 [Required]
29 public ITaskItem[] ProjectReferencePaths
30 {
31 get { return this.projectReferencePaths; }
32 set { this.projectReferencePaths = value; }
33 }
34
35 public ITaskItem[] ProjectConfigurations
36 {
37 get { return this.projectConfigurations; }
38 set { this.projectConfigurations = value; }
39 }
40
41 public override bool Execute()
42 {
43 List<ITaskItem> outputItems = new List<ITaskItem>();
44 Dictionary<string, string> defineConstants = new Dictionary<string, string>();
45
46 for (int i = 0; i < this.ProjectReferencePaths.Length; i++)
47 {
48 ITaskItem item = this.ProjectReferencePaths[i];
49
50 string configuration = item.GetMetadata("Configuration");
51 string fullConfiguration = item.GetMetadata("FullConfiguration");
52 string platform = item.GetMetadata("Platform");
53
54 string projectPath = CreateProjectReferenceDefineConstants.GetProjectPath(this.ProjectReferencePaths, i);
55 string projectDir = Path.GetDirectoryName(projectPath) + Path.DirectorySeparatorChar;
56 string projectExt = Path.GetExtension(projectPath);
57 string projectFileName = Path.GetFileName(projectPath);
58 string projectName = Path.GetFileNameWithoutExtension(projectPath);
59
60 string referenceName = CreateProjectReferenceDefineConstants.GetReferenceName(item, projectName);
61
62 string targetPath = item.GetMetadata("FullPath");
63 string targetDir = Path.GetDirectoryName(targetPath) + Path.DirectorySeparatorChar;
64 string targetExt = Path.GetExtension(targetPath);
65 string targetFileName = Path.GetFileName(targetPath);
66 string targetName = Path.GetFileNameWithoutExtension(targetPath);
67
68 // If there is no configuration metadata on the project reference task item,
69 // check for any additional configuration data provided in the optional task property.
70 if (String.IsNullOrEmpty(fullConfiguration))
71 {
72 fullConfiguration = this.FindProjectConfiguration(projectName);
73 if (!String.IsNullOrEmpty(fullConfiguration))
74 {
75 string[] typeAndPlatform = fullConfiguration.Split('|');
76 configuration = typeAndPlatform[0];
77 platform = (typeAndPlatform.Length > 1 ? typeAndPlatform[1] : String.Empty);
78 }
79 }
80
81 // write out the platform/configuration defines
82 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.Configuration", referenceName)] = configuration;
83 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.FullConfiguration", referenceName)] = fullConfiguration;
84 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.Platform", referenceName)] = platform;
85
86 // write out the ProjectX defines
87 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.ProjectDir", referenceName)] = projectDir;
88 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.ProjectExt", referenceName)] = projectExt;
89 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.ProjectFileName", referenceName)] = projectFileName;
90 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.ProjectName", referenceName)] = projectName;
91 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.ProjectPath", referenceName)] = projectPath;
92
93 // write out the TargetX defines
94 string targetDirDefine = String.Format(CultureInfo.InvariantCulture, "{0}.TargetDir", referenceName);
95 if (defineConstants.ContainsKey(targetDirDefine))
96 {
97 //if target dir was already defined, redefine it as the common root shared by multiple references from the same project
98 string commonDir = FindCommonRoot(targetDir, defineConstants[targetDirDefine]);
99 if (!String.IsNullOrEmpty(commonDir))
100 {
101 targetDir = commonDir;
102 }
103 }
104 defineConstants[targetDirDefine] = CreateProjectReferenceDefineConstants.EnsureEndsWithBackslash(targetDir);
105
106 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.TargetExt", referenceName)] = targetExt;
107 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.TargetFileName", referenceName)] = targetFileName;
108 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.TargetName", referenceName)] = targetName;
109
110 //if target path was already defined, append to it creating a list of multiple references from the same project
111 string targetPathDefine = String.Format(CultureInfo.InvariantCulture, "{0}.TargetPath", referenceName);
112 if (defineConstants.ContainsKey(targetPathDefine))
113 {
114 string oldTargetPath = defineConstants[targetPathDefine];
115 if (!targetPath.Equals(oldTargetPath, StringComparison.OrdinalIgnoreCase))
116 {
117 defineConstants[targetPathDefine] += ";" + targetPath;
118 }
119
120 //If there was only one targetpath we need to create its culture specific define
121 if (!oldTargetPath.Contains(";"))
122 {
123 string oldSubFolder = FindSubfolder(oldTargetPath, targetDir, targetFileName);
124 if (!String.IsNullOrEmpty(oldSubFolder))
125 {
126 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.{1}.TargetPath", referenceName, oldSubFolder.Replace('\\', '_'))] = oldTargetPath;
127 }
128 }
129
130 // Create a culture specific define
131 string subFolder = FindSubfolder(targetPath, targetDir, targetFileName);
132 if (!String.IsNullOrEmpty(subFolder))
133 {
134 defineConstants[String.Format(CultureInfo.InvariantCulture, "{0}.{1}.TargetPath", referenceName, subFolder.Replace('\\', '_'))] = targetPath;
135 }
136
137 }
138 else
139 {
140 defineConstants[targetPathDefine] = targetPath;
141 }
142 }
143
144 foreach (KeyValuePair<string, string> define in defineConstants)
145 {
146 outputItems.Add(new TaskItem(String.Format(CultureInfo.InvariantCulture, "{0}={1}", define.Key, define.Value)));
147 }
148
149 this.defineConstants = outputItems.ToArray();
150
151 return true;
152 }
153
154 public static string GetProjectPath(ITaskItem[] projectReferencePaths, int i)
155 {
156 return projectReferencePaths[i].GetMetadata("MSBuildSourceProjectFile");
157 }
158
159 public static string GetReferenceName(ITaskItem item, string projectName)
160 {
161 string referenceName = item.GetMetadata("Name");
162 if (String.IsNullOrEmpty(referenceName))
163 {
164 referenceName = projectName;
165 }
166
167 // We cannot have an equals sign in the variable name because it
168 // messes with the preprocessor definitions on the command line.
169 referenceName = referenceName.Replace('=', '_');
170
171 // We cannot have a double quote on the command line because it
172 // there is no way to escape it on the command line.
173 referenceName = referenceName.Replace('\"', '_');
174
175 // We cannot have parens in the variable name because the WiX
176 // preprocessor will not be able to parse it.
177 referenceName = referenceName.Replace('(', '_');
178 referenceName = referenceName.Replace(')', '_');
179
180 return referenceName;
181 }
182
183 /// <summary>
184 /// Look through the configuration data in the ProjectConfigurations property
185 /// to find the configuration for a project, if available.
186 /// </summary>
187 /// <param name="projectName">Name of the project that is being searched for.</param>
188 /// <returns>Full configuration spec, for example "Release|Win32".</returns>
189 private string FindProjectConfiguration(string projectName)
190 {
191 string configuration = String.Empty;
192
193 if (this.ProjectConfigurations != null)
194 {
195 foreach (ITaskItem configItem in this.ProjectConfigurations)
196 {
197 string configProject = configItem.ItemSpec;
198 if (configProject.Length > projectName.Length &&
199 configProject.StartsWith(projectName) &&
200 configProject[projectName.Length] == '=')
201 {
202 configuration = configProject.Substring(projectName.Length + 1);
203 break;
204 }
205 }
206 }
207
208 return configuration;
209 }
210
211 /// <summary>
212 /// Finds the common root between two paths
213 /// </summary>
214 /// <param name="path1"></param>
215 /// <param name="path2"></param>
216 /// <returns>common root on success, empty string on failure</returns>
217 private static string FindCommonRoot(string path1, string path2)
218 {
219 path1 = path1.TrimEnd(Path.DirectorySeparatorChar);
220 path2 = path2.TrimEnd(Path.DirectorySeparatorChar);
221
222 while (!String.IsNullOrEmpty(path1))
223 {
224 for (string searchPath = path2; !String.IsNullOrEmpty(searchPath); searchPath = Path.GetDirectoryName(searchPath))
225 {
226 if (path1.Equals(searchPath, StringComparison.OrdinalIgnoreCase))
227 {
228 return searchPath;
229 }
230 }
231
232 path1 = Path.GetDirectoryName(path1);
233 }
234
235 return path1;
236 }
237
238 /// <summary>
239 /// Finds the subfolder of a path, excluding a root and filename.
240 /// </summary>
241 /// <param name="path">Path to examine</param>
242 /// <param name="rootPath">Root that must be present </param>
243 /// <param name="fileName"></param>
244 /// <returns></returns>
245 private static string FindSubfolder(string path, string rootPath, string fileName)
246 {
247 if (Path.GetFileName(path).Equals(fileName, StringComparison.OrdinalIgnoreCase))
248 {
249 path = Path.GetDirectoryName(path);
250 }
251
252 if (path.StartsWith(rootPath, StringComparison.OrdinalIgnoreCase))
253 {
254 // cut out the root and return the subpath
255 return path.Substring(rootPath.Length).Trim(Path.DirectorySeparatorChar);
256 }
257
258 return String.Empty;
259 }
260
261 private static string EnsureEndsWithBackslash(string dir)
262 {
263 if (dir[dir.Length - 1] != Path.DirectorySeparatorChar)
264 {
265 dir += Path.DirectorySeparatorChar;
266 }
267
268 return dir;
269 }
270 }
271}
diff --git a/src/wix/WixToolset.BuildTasks/FileSearchHelperMethods.cs b/src/wix/WixToolset.BuildTasks/FileSearchHelperMethods.cs
new file mode 100644
index 00000000..397c9d7c
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/FileSearchHelperMethods.cs
@@ -0,0 +1,56 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.IO;
7
8 /// <summary>
9 /// Contains helper methods on searching for files
10 /// </summary>
11 public static class FileSearchHelperMethods
12 {
13 /// <summary>
14 /// Searches for the existence of a file in multiple directories.
15 /// Search is satisfied if default file path is valid and exists. If not,
16 /// file name is extracted from default path and combined with each of the directories
17 /// looking to see if it exists. If not found, input default path is returned.
18 /// </summary>
19 /// <param name="directories">Array of directories to look in, without filenames in them</param>
20 /// <param name="defaultFullPath">Default path - to use if not found</param>
21 /// <returns>File path if file found. Empty string if not found</returns>
22 public static string SearchFilePaths(string[] directories, string defaultFullPath)
23 {
24 if (String.IsNullOrEmpty(defaultFullPath))
25 {
26 return String.Empty;
27 }
28
29 if (File.Exists(defaultFullPath))
30 {
31 return defaultFullPath;
32 }
33
34 if (directories == null)
35 {
36 return string.Empty;
37 }
38
39 string fileName = Path.GetFileName(defaultFullPath);
40 foreach (string currentPath in directories)
41 {
42 if (String.IsNullOrEmpty(currentPath) || String.IsNullOrEmpty(currentPath.Trim()))
43 {
44 continue;
45 }
46
47 if (File.Exists(Path.Combine(currentPath, fileName)))
48 {
49 return Path.Combine(currentPath, fileName);
50 }
51 }
52
53 return String.Empty;
54 }
55 }
56}
diff --git a/src/wix/WixToolset.BuildTasks/GenerateCompileWithObjectPath.cs b/src/wix/WixToolset.BuildTasks/GenerateCompileWithObjectPath.cs
new file mode 100644
index 00000000..a5f76618
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/GenerateCompileWithObjectPath.cs
@@ -0,0 +1,145 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Diagnostics.CodeAnalysis;
7 using System.Globalization;
8 using System.IO;
9 using System.Security.Cryptography;
10 using System.Text;
11 using Microsoft.Build.Framework;
12 using Microsoft.Build.Utilities;
13
14 /// <summary>
15 /// This task generates metadata on the for compile output objects.
16 /// </summary>
17 public class GenerateCompileWithObjectPath : Task
18 {
19 /// <summary>
20 /// The list of files to generate outputs for.
21 /// </summary>
22 [Required]
23 public ITaskItem[] Compile
24 {
25 get;
26 set;
27 }
28
29 /// <summary>
30 /// The list of files with ObjectPath metadata.
31 /// </summary>
32 [Output]
33 public ITaskItem[] CompileWithObjectPath
34 {
35 get;
36 private set;
37 }
38
39 /// <summary>
40 /// The folder under which all ObjectPaths should reside.
41 /// </summary>
42 [Required]
43 public string IntermediateOutputPath
44 {
45 get;
46 set;
47 }
48
49 /// <summary>
50 /// Generate an identifier by hashing data from the row.
51 /// </summary>
52 /// <param name="prefix">Three letter or less prefix for generated row identifier.</param>
53 /// <param name="args">Information to hash.</param>
54 /// <returns>The generated identifier.</returns>
55 [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")]
56 public static string GenerateIdentifier(string prefix, params string[] args)
57 {
58 string stringData = String.Join("|", args);
59 byte[] data = Encoding.Unicode.GetBytes(stringData);
60
61 // hash the data
62 byte[] hash;
63
64 using (SHA1 sha1 = new SHA1CryptoServiceProvider())
65 {
66 hash = sha1.ComputeHash(data);
67 }
68
69 // build up the identifier
70 StringBuilder identifier = new StringBuilder(35, 35);
71 identifier.Append(prefix);
72
73 // hard coded to 16 as that is the most bytes that can be used to meet the length requirements. SHA1 is 20 bytes.
74 for (int i = 0; i < 16; i++)
75 {
76 identifier.Append(hash[i].ToString("X2", CultureInfo.InvariantCulture.NumberFormat));
77 }
78
79 return identifier.ToString();
80 }
81
82 /// <summary>
83 /// Gets the full path of the directory in which the file is found.
84 /// </summary>
85 /// <param name='file'>The file from which to extract the directory.</param>
86 /// <returns>The generated identifier.</returns>
87 private static string GetDirectory(ITaskItem file)
88 {
89 return file.GetMetadata("RootDir") + file.GetMetadata("Directory");
90 }
91
92 /// <summary>
93 /// Sets the object path to use for the file.
94 /// </summary>
95 /// <param name='file'>The file on which to set the ObjectPath metadata.</param>
96 /// <remarks>
97 /// For the same input path it will return the same ObjectPath. Case is not ignored, however that isn't a problem.
98 /// </remarks>
99 private void SetObjectPath(ITaskItem file)
100 {
101 // If the source file is in the project directory or in the intermediate directory, use the intermediate directory.
102 if (string.IsNullOrEmpty(file.GetMetadata("RelativeDir")) || string.Compare(file.GetMetadata("RelativeDir"), this.IntermediateOutputPath, StringComparison.OrdinalIgnoreCase) == 0)
103 {
104 file.SetMetadata("ObjectPath", this.IntermediateOutputPath);
105 }
106 // Otherwise use a subdirectory of the intermediate directory. The subfolder's name is based on the full path of the folder containing the source file.
107 else
108 {
109 file.SetMetadata("ObjectPath", Path.Combine(this.IntermediateOutputPath, GenerateIdentifier("pth", GetDirectory(file))) + Path.DirectorySeparatorChar);
110 }
111 }
112
113 /// <summary>
114 /// Gets a complete list of external cabs referenced by the given installer database file.
115 /// </summary>
116 /// <returns>True upon completion of the task execution.</returns>
117 public override bool Execute()
118 {
119 if (string.IsNullOrEmpty(this.IntermediateOutputPath))
120 {
121 this.Log.LogError("IntermediateOutputPath parameter is required and cannot be empty");
122 return false;
123 }
124
125 if (this.Compile == null || this.Compile.Length == 0)
126 {
127 return true;
128 }
129
130 this.CompileWithObjectPath = new ITaskItem[this.Compile.Length];
131 for (int i = 0; i < this.Compile.Length; ++i)
132 {
133 this.CompileWithObjectPath[i] = new TaskItem(this.Compile[i].ItemSpec, this.Compile[i].CloneCustomMetadata());
134
135 // Do not overwrite the ObjectPath metadata if it already was set.
136 if (string.IsNullOrEmpty(this.CompileWithObjectPath[i].GetMetadata("ObjectPath")))
137 {
138 this.SetObjectPath(this.CompileWithObjectPath[i]);
139 }
140 }
141
142 return true;
143 }
144 }
145}
diff --git a/src/wix/WixToolset.BuildTasks/GetCabList.cs b/src/wix/WixToolset.BuildTasks/GetCabList.cs
new file mode 100644
index 00000000..33fa5b37
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/GetCabList.cs
@@ -0,0 +1,81 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.IO;
7 using Microsoft.Build.Framework;
8 using Microsoft.Build.Utilities;
9 using WixToolset.Dtf.WindowsInstaller;
10
11 /// <summary>
12 /// This task assigns Culture metadata to files based on the value of the Culture attribute on the
13 /// WixLocalization element inside the file.
14 /// </summary>
15 public class GetCabList : Task
16 {
17 private ITaskItem database;
18 private ITaskItem[] cabList;
19
20 /// <summary>
21 /// The list of database files to find cabs in
22 /// </summary>
23 [Required]
24 public ITaskItem Database
25 {
26 get { return this.database; }
27 set { this.database = value; }
28 }
29
30 /// <summary>
31 /// The total list of cabs in this database
32 /// </summary>
33 [Output]
34 public ITaskItem[] CabList
35 {
36 get { return this.cabList; }
37 }
38
39 /// <summary>
40 /// Gets a complete list of external cabs referenced by the given installer database file.
41 /// </summary>
42 /// <returns>True upon completion of the task execution.</returns>
43 public override bool Execute()
44 {
45 string databaseFile = this.database.ItemSpec;
46 Object []args = { };
47 System.Collections.Generic.List<ITaskItem> cabNames = new System.Collections.Generic.List<ITaskItem>();
48
49 // If the file doesn't exist, no cabs to return, so exit now
50 if (!File.Exists(databaseFile))
51 {
52 return true;
53 }
54
55 using (Database database = new Database(databaseFile))
56 {
57 // If the media table doesn't exist, no cabs to return, so exit now
58 if (null == database.Tables["Media"])
59 {
60 return true;
61 }
62
63 System.Collections.IList records = database.ExecuteQuery("SELECT `Cabinet` FROM `Media`", args);
64
65 foreach (string cabName in records)
66 {
67 if (String.IsNullOrEmpty(cabName) || cabName.StartsWith("#", StringComparison.Ordinal))
68 {
69 continue;
70 }
71
72 cabNames.Add(new TaskItem(Path.Combine(Path.GetDirectoryName(databaseFile), cabName)));
73 }
74 }
75
76 this.cabList = cabNames.ToArray();
77
78 return true;
79 }
80 }
81}
diff --git a/src/wix/WixToolset.BuildTasks/GetLooseFileList.cs b/src/wix/WixToolset.BuildTasks/GetLooseFileList.cs
new file mode 100644
index 00000000..d1eb62c1
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/GetLooseFileList.cs
@@ -0,0 +1,225 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Collections.Generic;
7 using System.IO;
8 using Microsoft.Build.Framework;
9 using Microsoft.Build.Utilities;
10 using WixToolset.Dtf.WindowsInstaller;
11
12 /// <summary>
13 /// This task assigns Culture metadata to files based on the value of the Culture attribute on the
14 /// WixLocalization element inside the file.
15 /// </summary>
16 public class GetLooseFileList : Task
17 {
18 private ITaskItem database;
19 private ITaskItem[] looseFileList;
20
21 internal const int MsidbFileAttributesNoncompressed = 8192;
22 internal const int MsidbFileAttributesCompressed = 16384;
23
24 /// <summary>
25 /// The list of database files to find Loose Files in
26 /// </summary>
27 [Required]
28 public ITaskItem Database
29 {
30 get { return this.database; }
31 set { this.database = value; }
32 }
33
34 /// <summary>
35 /// The total list of Loose Files in this database
36 /// </summary>
37 [Output]
38 public ITaskItem[] LooseFileList
39 {
40 get { return this.looseFileList; }
41 }
42
43 /// <summary>
44 /// Takes the "defaultDir" column
45 /// </summary>
46 /// <returns>Returns the corresponding sourceDir.</returns>
47 public string SourceDirFromDefaultDir(string defaultDir)
48 {
49 string sourceDir;
50
51 string[] splitted = defaultDir.Split(':');
52
53 if (1 == splitted.Length)
54 {
55 sourceDir = splitted[0];
56 }
57 else
58 {
59 sourceDir = splitted[1];
60 }
61
62 splitted = sourceDir.Split('|');
63
64 if (1 == splitted.Length)
65 {
66 sourceDir = splitted[0];
67 }
68 else
69 {
70 sourceDir = splitted[1];
71 }
72
73 return sourceDir;
74 }
75
76 /// <summary>
77 /// Takes the "FileName" column
78 /// </summary>
79 /// <returns>Returns the corresponding source file name.</returns>
80 public string SourceFileFromFileName(string fileName)
81 {
82 string sourceFile;
83
84 string[] splitted = fileName.Split('|');
85
86 if (1 == splitted.Length)
87 {
88 sourceFile = splitted[0];
89 }
90 else
91 {
92 sourceFile = splitted[1];
93 }
94
95 return sourceFile;
96 }
97
98 /// <summary>
99 /// Gets a complete list of external Loose Files referenced by the given installer database file.
100 /// </summary>
101 /// <returns>True upon completion of the task execution.</returns>
102 public override bool Execute()
103 {
104 string databaseFile = this.database.ItemSpec;
105 Object []emptyArgs = { };
106 System.Collections.Generic.List<ITaskItem> looseFileNames = new System.Collections.Generic.List<ITaskItem>();
107 Dictionary<string, string> ComponentFullDirectory = new Dictionary<string, string>();
108 Dictionary<string, string> DirectoryIdDefaultDir = new Dictionary<string, string>();
109 Dictionary<string, string> DirectoryIdParent = new Dictionary<string, string>();
110 Dictionary<string, string> DirectoryIdFullSource = new Dictionary<string, string>();
111 int i;
112 string databaseDir = Path.GetDirectoryName(databaseFile);
113
114 // If the file doesn't exist, no Loose Files to return, so exit now
115 if (!File.Exists(databaseFile))
116 {
117 return true;
118 }
119
120 using (Database database = new Database(databaseFile))
121 {
122 bool compressed = false;
123 if (2 == (database.SummaryInfo.WordCount & 2))
124 {
125 compressed = true;
126 }
127
128 // If the media table doesn't exist, no Loose Files to return, so exit now
129 if (null == database.Tables["File"])
130 {
131 return true;
132 }
133
134 // Only setup all these helpful indexes if the database is marked as uncompressed. If it's marked as compressed, files are stored at the root,
135 // so none of these indexes will be used
136 if (!compressed)
137 {
138 if (null == database.Tables["Directory"] || null == database.Tables["Component"])
139 {
140 return true;
141 }
142
143 System.Collections.IList directoryRecords = database.ExecuteQuery("SELECT `Directory`,`Directory_Parent`,`DefaultDir` FROM `Directory`", emptyArgs);
144
145 // First setup a simple index from DirectoryId to DefaultDir
146 for (i = 0; i < directoryRecords.Count; i += 3)
147 {
148 string directoryId = (string)(directoryRecords[i]);
149 string directoryParent = (string)(directoryRecords[i + 1]);
150 string defaultDir = (string)(directoryRecords[i + 2]);
151
152 string sourceDir = this.SourceDirFromDefaultDir(defaultDir);
153
154 DirectoryIdDefaultDir[directoryId] = sourceDir;
155 DirectoryIdParent[directoryId] = directoryParent;
156 }
157
158 // Setup an index from directory Id to the full source path
159 for (i = 0; i < directoryRecords.Count; i += 3)
160 {
161 string directoryId = (string)(directoryRecords[i]);
162 string directoryParent = (string)(directoryRecords[i + 1]);
163 string defaultDir = (string)(directoryRecords[i + 2]);
164
165 string sourceDir = DirectoryIdDefaultDir[directoryId];
166
167 // The TARGETDIR case
168 if (String.IsNullOrEmpty(directoryParent))
169 {
170 DirectoryIdFullSource[directoryId] = databaseDir;
171 }
172 else
173 {
174 string tempDirectoryParent = directoryParent;
175
176 while (!String.IsNullOrEmpty(tempDirectoryParent) && !String.IsNullOrEmpty(DirectoryIdParent[tempDirectoryParent]))
177 {
178 sourceDir = Path.Combine(DirectoryIdDefaultDir[tempDirectoryParent], sourceDir);
179
180 tempDirectoryParent = DirectoryIdParent[tempDirectoryParent];
181 }
182
183 DirectoryIdFullSource[directoryId] = Path.Combine(databaseDir, sourceDir);
184 }
185 }
186
187 // Setup an index from component Id to full directory path
188 System.Collections.IList componentRecords = database.ExecuteQuery("SELECT `Component`,`Directory_` FROM `Component`", emptyArgs);
189
190 for (i = 0; i < componentRecords.Count; i += 2)
191 {
192 string componentId = (string)(componentRecords[i]);
193 string componentDir = (string)(componentRecords[i + 1]);
194
195 ComponentFullDirectory[componentId] = DirectoryIdFullSource[componentDir];
196 }
197 }
198
199 System.Collections.IList fileRecords = database.ExecuteQuery("SELECT `Component_`,`FileName`,`Attributes` FROM `File`", emptyArgs);
200
201 for (i = 0; i < fileRecords.Count; i += 3)
202 {
203 string componentId = (string)(fileRecords[i]);
204 string fileName = this.SourceFileFromFileName((string)(fileRecords[i + 1]));
205 int attributes = (int)(fileRecords[i + 2]);
206
207 // If the whole database is marked uncompressed, use the directory layout made above
208 if ((!compressed && MsidbFileAttributesCompressed != (attributes & MsidbFileAttributesCompressed)))
209 {
210 looseFileNames.Add(new TaskItem(Path.GetFullPath(Path.Combine(ComponentFullDirectory[componentId], fileName))));
211 }
212 // If the database is marked as compressed, put files at the root
213 else if (compressed && (MsidbFileAttributesNoncompressed == (attributes & MsidbFileAttributesNoncompressed)))
214 {
215 looseFileNames.Add(new TaskItem(Path.GetFullPath(Path.Combine(databaseDir, fileName))));
216 }
217 }
218 }
219
220 this.looseFileList = looseFileNames.ToArray();
221
222 return true;
223 }
224 }
225}
diff --git a/src/wix/WixToolset.BuildTasks/HeatDirectory.cs b/src/wix/WixToolset.BuildTasks/HeatDirectory.cs
new file mode 100644
index 00000000..79da303a
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/HeatDirectory.cs
@@ -0,0 +1,96 @@
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
3namespace WixToolset.BuildTasks
4{
5 using Microsoft.Build.Framework;
6
7 public sealed class HeatDirectory : HeatTask
8 {
9 private string directory;
10 private bool keepEmptyDirectories;
11 private bool suppressCom;
12 private bool suppressRootDirectory;
13 private bool suppressRegistry;
14 private string template;
15 private string componentGroupName;
16 private string directoryRefId;
17 private string preprocessorVariable;
18
19 public string ComponentGroupName
20 {
21 get { return this.componentGroupName; }
22 set { this.componentGroupName = value; }
23 }
24
25 [Required]
26 public string Directory
27 {
28 get { return this.directory; }
29 set { this.directory = value; }
30 }
31
32 public string DirectoryRefId
33 {
34 get { return this.directoryRefId; }
35 set { this.directoryRefId = value; }
36 }
37
38 public bool KeepEmptyDirectories
39 {
40 get { return this.keepEmptyDirectories; }
41 set { this.keepEmptyDirectories = value; }
42 }
43
44 public string PreprocessorVariable
45 {
46 get { return this.preprocessorVariable; }
47 set { this.preprocessorVariable = value; }
48 }
49
50 public bool SuppressCom
51 {
52 get { return this.suppressCom; }
53 set { this.suppressCom = value; }
54 }
55
56 public bool SuppressRootDirectory
57 {
58 get { return this.suppressRootDirectory; }
59 set { this.suppressRootDirectory = value; }
60 }
61
62 public bool SuppressRegistry
63 {
64 get { return this.suppressRegistry; }
65 set { this.suppressRegistry = value; }
66 }
67
68 public string Template
69 {
70 get { return this.template; }
71 set { this.template = value; }
72 }
73
74 protected override string OperationName
75 {
76 get { return "dir"; }
77 }
78
79 protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
80 {
81 commandLineBuilder.AppendSwitch(this.OperationName);
82 commandLineBuilder.AppendFileNameIfNotNull(this.Directory);
83
84 commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName);
85 commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId);
86 commandLineBuilder.AppendIfTrue("-ke", this.KeepEmptyDirectories);
87 commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom);
88 commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry);
89 commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory);
90 commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template);
91 commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable);
92
93 base.BuildCommandLine(commandLineBuilder);
94 }
95 }
96}
diff --git a/src/wix/WixToolset.BuildTasks/HeatFile.cs b/src/wix/WixToolset.BuildTasks/HeatFile.cs
new file mode 100644
index 00000000..57fe579d
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/HeatFile.cs
@@ -0,0 +1,88 @@
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
3namespace WixToolset.BuildTasks
4{
5 using Microsoft.Build.Framework;
6
7 public sealed class HeatFile : HeatTask
8 {
9 private string file;
10 private bool suppressCom;
11 private bool suppressRegistry;
12 private bool suppressRootDirectory;
13 private string template;
14 private string componentGroupName;
15 private string directoryRefId;
16 private string preprocessorVariable;
17
18 public string ComponentGroupName
19 {
20 get { return this.componentGroupName; }
21 set { this.componentGroupName = value; }
22 }
23
24 public string DirectoryRefId
25 {
26 get { return this.directoryRefId; }
27 set { this.directoryRefId = value; }
28 }
29
30 [Required]
31 public string File
32 {
33 get { return this.file; }
34 set { this.file = value; }
35 }
36
37 public string PreprocessorVariable
38 {
39 get { return this.preprocessorVariable; }
40 set { this.preprocessorVariable = value; }
41 }
42
43 public bool SuppressCom
44 {
45 get { return this.suppressCom; }
46 set { this.suppressCom = value; }
47 }
48
49 public bool SuppressRegistry
50 {
51 get { return this.suppressRegistry; }
52 set { this.suppressRegistry = value; }
53 }
54
55 public bool SuppressRootDirectory
56 {
57 get { return this.suppressRootDirectory; }
58 set { this.suppressRootDirectory = value; }
59 }
60
61 public string Template
62 {
63 get { return this.template; }
64 set { this.template = value; }
65 }
66
67 protected override string OperationName
68 {
69 get { return "file"; }
70 }
71
72 protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
73 {
74 commandLineBuilder.AppendSwitch(this.OperationName);
75 commandLineBuilder.AppendFileNameIfNotNull(this.File);
76
77 commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName);
78 commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId);
79 commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom);
80 commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory);
81 commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry);
82 commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template);
83 commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable);
84
85 base.BuildCommandLine(commandLineBuilder);
86 }
87 }
88}
diff --git a/src/wix/WixToolset.BuildTasks/HeatProject.cs b/src/wix/WixToolset.BuildTasks/HeatProject.cs
new file mode 100644
index 00000000..3833a754
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/HeatProject.cs
@@ -0,0 +1,110 @@
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
3namespace WixToolset.BuildTasks
4{
5 using Microsoft.Build.Framework;
6
7 public sealed class HeatProject : HeatTask
8 {
9 private string configuration;
10 private string directoryIds;
11 private string generateType;
12 private bool generateWixVariables;
13 private string platform;
14 private string project;
15 private string projectName;
16 private string[] projectOutputGroups;
17
18 public string Configuration
19 {
20 get { return this.configuration; }
21 set { this.configuration = value; }
22 }
23
24 public string DirectoryIds
25 {
26 get { return this.directoryIds; }
27 set { this.directoryIds = value; }
28 }
29
30 public bool GenerateWixVariables
31 {
32 get { return this.generateWixVariables; }
33 set { this.generateWixVariables = value; }
34 }
35
36 public string GenerateType
37 {
38 get { return this.generateType; }
39 set { this.generateType = value; }
40 }
41
42 public string MsbuildBinPath { get; set; }
43
44 public string Platform
45 {
46 get { return this.platform; }
47 set { this.platform = value; }
48 }
49
50 [Required]
51 public string Project
52 {
53 get { return this.project; }
54 set { this.project = value; }
55 }
56
57 public string ProjectName
58 {
59 get { return this.projectName; }
60 set { this.projectName = value; }
61 }
62
63 public string[] ProjectOutputGroups
64 {
65 get
66 {
67 return this.projectOutputGroups;
68 }
69 set
70 {
71 this.projectOutputGroups = value;
72
73 // If it's just one string and it contains semicolons, let's
74 // split it into separate items.
75 if (this.projectOutputGroups.Length == 1)
76 {
77 this.projectOutputGroups = this.projectOutputGroups[0].Split(new char[] { ';' });
78 }
79 }
80 }
81
82 public bool UseToolsVersion { get; set; }
83
84 protected override string OperationName
85 {
86 get { return "project"; }
87 }
88
89 protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
90 {
91 commandLineBuilder.AppendSwitch(this.OperationName);
92 commandLineBuilder.AppendFileNameIfNotNull(this.Project);
93
94 commandLineBuilder.AppendSwitchIfNotNull("-configuration ", this.Configuration);
95 commandLineBuilder.AppendSwitchIfNotNull("-directoryid ", this.DirectoryIds);
96 commandLineBuilder.AppendSwitchIfNotNull("-generate ", this.GenerateType);
97 commandLineBuilder.AppendSwitchIfNotNull("-msbuildbinpath ", this.MsbuildBinPath);
98 commandLineBuilder.AppendSwitchIfNotNull("-platform ", this.Platform);
99 commandLineBuilder.AppendArrayIfNotNull("-pog ", this.ProjectOutputGroups);
100 commandLineBuilder.AppendSwitchIfNotNull("-projectname ", this.ProjectName);
101 commandLineBuilder.AppendIfTrue("-wixvar", this.GenerateWixVariables);
102
103#if !NETCOREAPP
104 commandLineBuilder.AppendIfTrue("-usetoolsversion", this.UseToolsVersion);
105#endif
106
107 base.BuildCommandLine(commandLineBuilder);
108 }
109 }
110}
diff --git a/src/wix/WixToolset.BuildTasks/HeatTask.cs b/src/wix/WixToolset.BuildTasks/HeatTask.cs
new file mode 100644
index 00000000..18c08342
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/HeatTask.cs
@@ -0,0 +1,91 @@
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
3namespace WixToolset.BuildTasks
4{
5 using Microsoft.Build.Framework;
6
7 /// <summary>
8 /// A base MSBuild task to run the WiX harvester.
9 /// Specific harvester tasks should extend this class.
10 /// </summary>
11 public abstract partial class HeatTask : ToolsetTask
12 {
13 private bool autogenerageGuids;
14 private bool generateGuidsNow;
15 private ITaskItem outputFile;
16 private bool suppressFragments;
17 private bool suppressUniqueIds;
18 private string[] transforms;
19
20 public HeatTask()
21 {
22 this.RunAsSeparateProcess = true;
23 }
24
25 public bool AutogenerateGuids
26 {
27 get { return this.autogenerageGuids; }
28 set { this.autogenerageGuids = value; }
29 }
30
31 public bool GenerateGuidsNow
32 {
33 get { return this.generateGuidsNow; }
34 set { this.generateGuidsNow = value; }
35 }
36
37 [Required]
38 [Output]
39 public ITaskItem OutputFile
40 {
41 get { return this.outputFile; }
42 set { this.outputFile = value; }
43 }
44
45 public bool SuppressFragments
46 {
47 get { return this.suppressFragments; }
48 set { this.suppressFragments = value; }
49 }
50
51 public bool SuppressUniqueIds
52 {
53 get { return this.suppressUniqueIds; }
54 set { this.suppressUniqueIds = value; }
55 }
56
57 public string[] Transforms
58 {
59 get { return this.transforms; }
60 set { this.transforms = value; }
61 }
62
63 protected sealed override string ToolName => "heat.exe";
64
65 /// <summary>
66 /// Gets the name of the heat operation performed by the task.
67 /// </summary>
68 /// <remarks>This is the first parameter passed on the heat.exe command-line.</remarks>
69 /// <value>The name of the heat operation performed by the task.</value>
70 protected abstract string OperationName
71 {
72 get;
73 }
74
75 /// <summary>
76 /// Builds a command line from options in this task.
77 /// </summary>
78 protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
79 {
80 base.BuildCommandLine(commandLineBuilder);
81
82 commandLineBuilder.AppendIfTrue("-ag", this.AutogenerateGuids);
83 commandLineBuilder.AppendIfTrue("-gg", this.GenerateGuidsNow);
84 commandLineBuilder.AppendIfTrue("-sfrag", this.SuppressFragments);
85 commandLineBuilder.AppendIfTrue("-suid", this.SuppressUniqueIds);
86 commandLineBuilder.AppendArrayIfNotNull("-t ", this.Transforms);
87 commandLineBuilder.AppendTextIfNotNull(this.AdditionalOptions);
88 commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile);
89 }
90 }
91}
diff --git a/src/wix/WixToolset.BuildTasks/HeatTask_InProc.cs b/src/wix/WixToolset.BuildTasks/HeatTask_InProc.cs
new file mode 100644
index 00000000..48ee9e02
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/HeatTask_InProc.cs
@@ -0,0 +1,20 @@
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#if !NETCOREAPP
4namespace WixToolset.BuildTasks
5{
6 using System;
7 using System.Threading;
8 using System.Threading.Tasks;
9 using WixToolset.Extensibility.Services;
10
11 public partial class HeatTask
12 {
13 public override bool RunAsSeparateProcess { get => true; }
14
15 protected sealed override string TaskShortName => "HEAT";
16
17 protected sealed override Task<int> ExecuteCoreAsync(IWixToolsetCoreServiceProvider coreProvider, string commandLineString, CancellationToken cancellationToken) => throw new NotImplementedException();
18 }
19}
20#endif
diff --git a/src/wix/WixToolset.BuildTasks/Insignia.cs b/src/wix/WixToolset.BuildTasks/Insignia.cs
new file mode 100644
index 00000000..d89770db
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/Insignia.cs
@@ -0,0 +1,120 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Diagnostics;
7 using System.Globalization;
8 using System.IO;
9 using System.Text;
10
11 using Microsoft.Build.Framework;
12 using Microsoft.Build.Utilities;
13
14#if false
15 /// <summary>
16 /// An MSBuild task to run the WiX transform generator.
17 /// </summary>
18 public sealed class Insignia : WixToolTask
19 {
20 private const string InsigniaToolName = "insignia.exe";
21
22 /// <summary>
23 /// Gets or sets the path to the database to inscribe.
24 /// </summary>
25 public ITaskItem DatabaseFile { get; set; }
26
27 /// <summary>
28 /// Gets or sets the path to the bundle to inscribe.
29 /// </summary>
30 public ITaskItem BundleFile { get; set; }
31
32 /// <summary>
33 /// Gets or sets the path to the original bundle that contains the attached container.
34 /// </summary>
35 public ITaskItem OriginalBundleFile { get; set; }
36
37 /// <summary>
38 /// Gets or sets the path to output the inscribed result.
39 /// </summary>
40 [Required]
41 public ITaskItem OutputFile { get; set; }
42
43 /// <summary>
44 /// Gets or sets the output. Only set if insignia does work.
45 /// </summary>
46 [Output]
47 public ITaskItem Output { get; set; }
48
49 /// <summary>
50 /// Get the name of the executable.
51 /// </summary>
52 /// <remarks>The ToolName is used with the ToolPath to get the location of Insignia.exe.</remarks>
53 /// <value>The name of the executable.</value>
54 protected override string ToolName
55 {
56 get { return InsigniaToolName; }
57 }
58
59 /// <summary>
60 /// Get the path to the executable.
61 /// </summary>
62 /// <remarks>GetFullPathToTool is only called when the ToolPath property is not set (see the ToolName remarks above).</remarks>
63 /// <returns>The full path to the executable or simply Insignia.exe if it's expected to be in the system path.</returns>
64 protected override string GenerateFullPathToTool()
65 {
66 // If there's not a ToolPath specified, it has to be in the system path.
67 if (String.IsNullOrEmpty(this.ToolPath))
68 {
69 return InsigniaToolName;
70 }
71
72 return Path.Combine(Path.GetFullPath(this.ToolPath), InsigniaToolName);
73 }
74
75 /// <summary>
76 /// Builds a command line from options in this task.
77 /// </summary>
78 protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
79 {
80 base.BuildCommandLine(commandLineBuilder);
81
82 commandLineBuilder.AppendSwitchIfNotNull("-im ", this.DatabaseFile);
83 if (null != this.OriginalBundleFile)
84 {
85 commandLineBuilder.AppendSwitchIfNotNull("-ab ", this.BundleFile);
86 commandLineBuilder.AppendFileNameIfNotNull(this.OriginalBundleFile);
87 }
88 else
89 {
90 commandLineBuilder.AppendSwitchIfNotNull("-ib ", this.BundleFile);
91 }
92
93 commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile);
94 commandLineBuilder.AppendTextIfNotNull(this.AdditionalOptions);
95 }
96
97 /// <summary>
98 /// Executes a tool in-process by loading the tool assembly and invoking its entrypoint.
99 /// </summary>
100 /// <param name="pathToTool">Path to the tool to be executed; must be a managed executable.</param>
101 /// <param name="responseFileCommands">Commands to be written to a response file.</param>
102 /// <param name="commandLineCommands">Commands to be passed directly on the command-line.</param>
103 /// <returns>The tool exit code.</returns>
104 protected override int ExecuteTool(string pathToTool, string responseFileCommands, string commandLineCommands)
105 {
106 int returnCode = base.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands);
107 if (0 == returnCode) // successfully did work.
108 {
109 this.Output = this.OutputFile;
110 }
111 else if (-1 == returnCode) // no work done.
112 {
113 returnCode = 0;
114 }
115
116 return returnCode;
117 }
118 }
119#endif
120}
diff --git a/src/wix/WixToolset.BuildTasks/MsbuildMessageListener.cs b/src/wix/WixToolset.BuildTasks/MsbuildMessageListener.cs
new file mode 100644
index 00000000..f186d721
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/MsbuildMessageListener.cs
@@ -0,0 +1,68 @@
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#if !NETCOREAPP
4namespace WixToolset.BuildTasks
5{
6 using System;
7 using Microsoft.Build.Framework;
8 using Microsoft.Build.Utilities;
9 using WixToolset.Data;
10 using WixToolset.Extensibility;
11 using WixToolset.Extensibility.Services;
12
13 public sealed class MsbuildMessageListener : IMessageListener
14 {
15 public MsbuildMessageListener(TaskLoggingHelper logger, string shortName, string longName)
16 {
17 this.Logger = logger;
18 this.ShortAppName = shortName;
19 this.LongAppName = longName;
20 }
21
22 public string ShortAppName { get; }
23
24 public string LongAppName { get; }
25
26 private TaskLoggingHelper Logger { get; }
27
28 public void Write(Message message)
29 {
30 var code = this.ShortAppName + message.Id.ToString();
31 var file = message.SourceLineNumbers?.FileName ?? this.LongAppName;
32 var lineNumber = message.SourceLineNumbers?.LineNumber ?? 0;
33 switch (message.Level)
34 {
35 case MessageLevel.Error:
36 this.Logger.LogError(null, code, null, file, lineNumber, 0, 0, 0, message.ResourceNameOrFormat, message.MessageArgs);
37 break;
38
39 case MessageLevel.Verbose:
40 this.Logger.LogMessage(null, code, null, file, lineNumber, 0, 0, 0, MessageImportance.Low, message.ResourceNameOrFormat, message.MessageArgs);
41 break;
42
43 case MessageLevel.Warning:
44 this.Logger.LogWarning(null, code, null, file, lineNumber, 0, 0, 0, message.ResourceNameOrFormat, message.MessageArgs);
45 break;
46
47 default:
48 if (message.Id > 0)
49 {
50 this.Logger.LogMessage(null, code, null, file, lineNumber, 0, 0, 0, MessageImportance.Normal, message.ResourceNameOrFormat, message.MessageArgs);
51 }
52 else
53 {
54 this.Logger.LogMessage(MessageImportance.Normal, message.ResourceNameOrFormat, message.MessageArgs);
55 }
56 break;
57 }
58 }
59
60 public void Write(string message)
61 {
62 this.Logger.LogMessage(MessageImportance.Low, message);
63 }
64
65 public MessageLevel CalculateMessageLevel(IMessaging messaging, Message message, MessageLevel defaultMessageLevel) => defaultMessageLevel;
66 }
67}
68#endif
diff --git a/src/wix/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs b/src/wix/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs
new file mode 100644
index 00000000..7663e6df
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs
@@ -0,0 +1,128 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Collections;
7 using System.Globalization;
8 using System.IO;
9 using System.Xml;
10 using Microsoft.Build.Framework;
11 using Microsoft.Build.Utilities;
12
13 /// <summary>
14 /// This task refreshes the generated file for bundle projects.
15 /// </summary>
16 public class RefreshBundleGeneratedFile : Task
17 {
18 private ITaskItem[] generatedFiles;
19 private ITaskItem[] projectReferencePaths;
20
21 /// <summary>
22 /// The list of files to generate.
23 /// </summary>
24 [Required]
25 public ITaskItem[] GeneratedFiles
26 {
27 get { return this.generatedFiles; }
28 set { this.generatedFiles = value; }
29 }
30
31 /// <summary>
32 /// All the project references in the project.
33 /// </summary>
34 [Required]
35 public ITaskItem[] ProjectReferencePaths
36 {
37 get { return this.projectReferencePaths; }
38 set { this.projectReferencePaths = value; }
39 }
40
41 /// <summary>
42 /// Gets a complete list of external cabs referenced by the given installer database file.
43 /// </summary>
44 /// <returns>True upon completion of the task execution.</returns>
45 public override bool Execute()
46 {
47 ArrayList payloadGroupRefs = new ArrayList();
48 ArrayList packageGroupRefs = new ArrayList();
49 for (int i = 0; i < this.ProjectReferencePaths.Length; i++)
50 {
51 ITaskItem item = this.ProjectReferencePaths[i];
52
53 if (!String.IsNullOrEmpty(item.GetMetadata(ToolsCommon.DoNotHarvest)))
54 {
55 continue;
56 }
57
58 string projectPath = CreateProjectReferenceDefineConstants.GetProjectPath(this.ProjectReferencePaths, i);
59 string projectName = Path.GetFileNameWithoutExtension(projectPath);
60 string referenceName = ToolsCommon.GetIdentifierFromName(CreateProjectReferenceDefineConstants.GetReferenceName(item, projectName));
61
62 string[] pogs = item.GetMetadata("RefProjectOutputGroups").Split(';');
63 foreach (string pog in pogs)
64 {
65 if (!String.IsNullOrEmpty(pog))
66 {
67 // TODO: Add payload group references and package group references once heat is generating them
68 ////payloadGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog));
69 packageGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog));
70 }
71 }
72 }
73
74 XmlDocument doc = new XmlDocument();
75
76 XmlProcessingInstruction head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
77 doc.AppendChild(head);
78
79 XmlElement rootElement = doc.CreateElement("Wix");
80 rootElement.SetAttribute("xmlns", "http://wixtoolset.org/schemas/v4/wxs");
81 doc.AppendChild(rootElement);
82
83 XmlElement fragment = doc.CreateElement("Fragment");
84 rootElement.AppendChild(fragment);
85
86 XmlElement payloadGroup = doc.CreateElement("PayloadGroup");
87 payloadGroup.SetAttribute("Id", "Bundle.Generated.Payloads");
88 fragment.AppendChild(payloadGroup);
89
90 XmlElement packageGroup = doc.CreateElement("PackageGroup");
91 packageGroup.SetAttribute("Id", "Bundle.Generated.Packages");
92 fragment.AppendChild(packageGroup);
93
94 foreach (string payloadGroupRef in payloadGroupRefs)
95 {
96 XmlElement payloadGroupRefElement = doc.CreateElement("PayloadGroupRef");
97 payloadGroupRefElement.SetAttribute("Id", payloadGroupRef);
98 payloadGroup.AppendChild(payloadGroupRefElement);
99 }
100
101 foreach (string packageGroupRef in packageGroupRefs)
102 {
103 XmlElement packageGroupRefElement = doc.CreateElement("PackageGroupRef");
104 packageGroupRefElement.SetAttribute("Id", packageGroupRef);
105 packageGroup.AppendChild(packageGroupRefElement);
106 }
107
108 foreach (ITaskItem item in this.GeneratedFiles)
109 {
110 string fullPath = item.GetMetadata("FullPath");
111
112 payloadGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath) + ".Payloads");
113 packageGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath) + ".Packages");
114 try
115 {
116 doc.Save(fullPath);
117 }
118 catch (Exception e)
119 {
120 // e.Message will be something like: "Access to the path 'fullPath' is denied."
121 this.Log.LogMessage(MessageImportance.High, "Unable to save generated file to '{0}'. {1}", fullPath, e.Message);
122 }
123 }
124
125 return true;
126 }
127 }
128}
diff --git a/src/wix/WixToolset.BuildTasks/RefreshGeneratedFile.cs b/src/wix/WixToolset.BuildTasks/RefreshGeneratedFile.cs
new file mode 100644
index 00000000..c57e3f0f
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/RefreshGeneratedFile.cs
@@ -0,0 +1,114 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Collections;
7 using System.Globalization;
8 using System.IO;
9 using System.Xml;
10 using Microsoft.Build.Framework;
11 using Microsoft.Build.Utilities;
12
13 /// <summary>
14 /// This task refreshes the generated file that contains ComponentGroupRefs
15 /// to harvested output.
16 /// </summary>
17 public class RefreshGeneratedFile : Task
18 {
19 private ITaskItem[] generatedFiles;
20 private ITaskItem[] projectReferencePaths;
21
22 /// <summary>
23 /// The list of files to generate.
24 /// </summary>
25 [Required]
26 public ITaskItem[] GeneratedFiles
27 {
28 get { return this.generatedFiles; }
29 set { this.generatedFiles = value; }
30 }
31
32 /// <summary>
33 /// All the project references in the project.
34 /// </summary>
35 [Required]
36 public ITaskItem[] ProjectReferencePaths
37 {
38 get { return this.projectReferencePaths; }
39 set { this.projectReferencePaths = value; }
40 }
41
42 /// <summary>
43 /// Gets a complete list of external cabs referenced by the given installer database file.
44 /// </summary>
45 /// <returns>True upon completion of the task execution.</returns>
46 public override bool Execute()
47 {
48 ArrayList componentGroupRefs = new ArrayList();
49 for (int i = 0; i < this.ProjectReferencePaths.Length; i++)
50 {
51 ITaskItem item = this.ProjectReferencePaths[i];
52
53 if (!String.IsNullOrEmpty(item.GetMetadata(ToolsCommon.DoNotHarvest)))
54 {
55 continue;
56 }
57
58 string projectPath = CreateProjectReferenceDefineConstants.GetProjectPath(this.ProjectReferencePaths, i);
59 string projectName = Path.GetFileNameWithoutExtension(projectPath);
60 string referenceName = ToolsCommon.GetIdentifierFromName(CreateProjectReferenceDefineConstants.GetReferenceName(item, projectName));
61
62 string[] pogs = item.GetMetadata("RefProjectOutputGroups").Split(';');
63 foreach (string pog in pogs)
64 {
65 if (!String.IsNullOrEmpty(pog))
66 {
67 componentGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog));
68 }
69 }
70 }
71
72 XmlDocument doc = new XmlDocument();
73
74 XmlProcessingInstruction head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
75 doc.AppendChild(head);
76
77 XmlElement rootElement = doc.CreateElement("Wix");
78 rootElement.SetAttribute("xmlns", "http://wixtoolset.org/schemas/v4/wxs");
79 doc.AppendChild(rootElement);
80
81 XmlElement fragment = doc.CreateElement("Fragment");
82 rootElement.AppendChild(fragment);
83
84 XmlElement componentGroup = doc.CreateElement("ComponentGroup");
85 componentGroup.SetAttribute("Id", "Product.Generated");
86 fragment.AppendChild(componentGroup);
87
88 foreach (string componentGroupRef in componentGroupRefs)
89 {
90 XmlElement componentGroupRefElement = doc.CreateElement("ComponentGroupRef");
91 componentGroupRefElement.SetAttribute("Id", componentGroupRef);
92 componentGroup.AppendChild(componentGroupRefElement);
93 }
94
95 foreach (ITaskItem item in this.GeneratedFiles)
96 {
97 string fullPath = item.GetMetadata("FullPath");
98
99 componentGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath));
100 try
101 {
102 doc.Save(fullPath);
103 }
104 catch (Exception e)
105 {
106 // e.Message will be something like: "Access to the path 'fullPath' is denied."
107 this.Log.LogMessage(MessageImportance.High, "Unable to save generated file to '{0}'. {1}", fullPath, e.Message);
108 }
109 }
110
111 return true;
112 }
113 }
114}
diff --git a/src/wix/WixToolset.BuildTasks/ResolveWixReferences.cs b/src/wix/WixToolset.BuildTasks/ResolveWixReferences.cs
new file mode 100644
index 00000000..9b8cfe6f
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/ResolveWixReferences.cs
@@ -0,0 +1,212 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Collections.Generic;
7 using Microsoft.Build.Utilities;
8 using Microsoft.Build.Framework;
9 using System.IO;
10
11 /// <summary>
12 /// This task searches for paths to references using the order specified in SearchPaths.
13 /// </summary>
14 public class ResolveWixReferences : Task
15 {
16 /// <summary>
17 /// Token value used in SearchPaths to indicate that the item's HintPath metadata should
18 /// be searched as a full file path to resolve the reference.
19 /// Must match wix.targets, case sensitive.
20 /// </summary>
21 private const string HintPathToken = "{HintPathFromItem}";
22
23 /// <summary>
24 /// Token value used in SearchPaths to indicate that the item's Identity should
25 /// be searched as a full file path to resolve the reference.
26 /// Must match wix.targets, case sensitive.
27 /// </summary>
28 private const string RawFileNameToken = "{RawFileName}";
29
30 /// <summary>
31 /// The list of references to resolve.
32 /// </summary>
33 [Required]
34 public ITaskItem[] WixReferences
35 {
36 get;
37 set;
38 }
39
40 /// <summary>
41 /// The directories or special locations that are searched to find the files
42 /// on disk that represent the references. The order in which the search paths are listed
43 /// is important. For each reference, the list of paths is searched from left to right.
44 /// When a file that represents the reference is found, that search stops and the search
45 /// for the next reference starts.
46 ///
47 /// This parameter accepts the following types of values:
48 /// A directory path.
49 /// {HintPathFromItem}: Specifies that the task will examine the HintPath metadata
50 /// of the base item.
51 /// TODO : {CandidateAssemblyFiles}: Specifies that the task will examine the files
52 /// passed in through the CandidateAssemblyFiles parameter.
53 /// TODO : {Registry:_AssemblyFoldersBase_, _RuntimeVersion_, _AssemblyFoldersSuffix_}:
54 /// TODO : {AssemblyFolders}: Specifies the task will use the Visual Studio.NET 2003
55 /// finding-assemblies-from-registry scheme.
56 /// TODO : {GAC}: Specifies the task will search in the GAC.
57 /// {RawFileName}: Specifies the task will consider the Include value of the item to be
58 /// an exact path and file name.
59 /// </summary>
60 public string[] SearchPaths
61 {
62 get;
63 set;
64 }
65
66 /// <summary>
67 /// The filename extension(s) to be checked when searching.
68 /// </summary>
69 public string[] SearchFilenameExtensions
70 {
71 get;
72 set;
73 }
74
75 /// <summary>
76 /// Output items that contain the same metadata as input references and have been resolved to full paths.
77 /// </summary>
78 [Output]
79 public ITaskItem[] ResolvedWixReferences
80 {
81 get;
82 private set;
83 }
84
85 /// <summary>
86 /// Resolves reference paths by searching for referenced items using the specified SearchPaths.
87 /// </summary>
88 /// <returns>True on success, or throws an exception on failure.</returns>
89 public override bool Execute()
90 {
91 List<ITaskItem> resolvedReferences = new List<ITaskItem>();
92
93 foreach (ITaskItem reference in this.WixReferences)
94 {
95 ITaskItem resolvedReference = ResolveWixReferences.ResolveReference(reference, this.SearchPaths, this.SearchFilenameExtensions, this.Log);
96
97 this.Log.LogMessage(MessageImportance.Low, "Resolved path {0}", resolvedReference.ItemSpec);
98 resolvedReferences.Add(resolvedReference);
99 }
100
101 this.ResolvedWixReferences = resolvedReferences.ToArray();
102 return true;
103 }
104
105 /// <summary>
106 /// Resolves a single reference item by searcheing for referenced items using the specified SearchPaths.
107 /// This method is made public so the resolution logic can be reused by other tasks.
108 /// </summary>
109 /// <param name="reference">The referenced item.</param>
110 /// <param name="searchPaths">The paths to search.</param>
111 /// <param name="searchFilenameExtensions">Filename extensions to check.</param>
112 /// <param name="log">Logging helper.</param>
113 /// <returns>The resolved reference item, or the original reference if it could not be resolved.</returns>
114 public static ITaskItem ResolveReference(ITaskItem reference, string[] searchPaths, string[] searchFilenameExtensions, TaskLoggingHelper log)
115 {
116 if (reference == null)
117 {
118 throw new ArgumentNullException("reference");
119 }
120
121 if (searchPaths == null)
122 {
123 // Nothing to search, so just return the original reference item.
124 return reference;
125 }
126
127 if (searchFilenameExtensions == null)
128 {
129 searchFilenameExtensions = new string[] { };
130 }
131
132 // Copy all the metadata from the source
133 TaskItem resolvedReference = new TaskItem(reference);
134 log.LogMessage(MessageImportance.Low, "WixReference: {0}", reference.ItemSpec);
135
136 // Now find the resolved path based on our order of precedence
137 foreach (string searchPath in searchPaths)
138 {
139 log.LogMessage(MessageImportance.Low, "Trying {0}", searchPath);
140 if (searchPath.Equals(HintPathToken, StringComparison.Ordinal))
141 {
142 string path = reference.GetMetadata("HintPath");
143 log.LogMessage(MessageImportance.Low, "Trying path {0}", path);
144 if (File.Exists(path))
145 {
146 resolvedReference.ItemSpec = path;
147 break;
148 }
149 }
150 else if (searchPath.Equals(RawFileNameToken, StringComparison.Ordinal))
151 {
152 log.LogMessage(MessageImportance.Low, "Trying path {0}", resolvedReference.ItemSpec);
153 if (File.Exists(resolvedReference.ItemSpec))
154 {
155 break;
156 }
157
158 if (ResolveWixReferences.ResolveFilenameExtensions(resolvedReference,
159 resolvedReference.ItemSpec, searchFilenameExtensions, log))
160 {
161 break;
162 }
163 }
164 else
165 {
166 string path = Path.Combine(searchPath, Path.GetFileName(reference.ItemSpec));
167 log.LogMessage(MessageImportance.Low, "Trying path {0}", path);
168 if (File.Exists(path))
169 {
170 resolvedReference.ItemSpec = path;
171 break;
172 }
173
174 if (ResolveWixReferences.ResolveFilenameExtensions(resolvedReference,
175 path, searchFilenameExtensions, log))
176 {
177 break;
178 }
179 }
180 }
181
182 // Normalize the item path
183 resolvedReference.ItemSpec = resolvedReference.GetMetadata("FullPath");
184
185 return resolvedReference;
186 }
187
188 /// <summary>
189 /// Helper method for checking filename extensions when resolving references.
190 /// </summary>
191 /// <param name="reference">The reference being resolved.</param>
192 /// <param name="basePath">Full filename path without extension.</param>
193 /// <param name="filenameExtensions">Filename extensions to check.</param>
194 /// <param name="log">Logging helper.</param>
195 /// <returns>True if the item was resolved, else false.</returns>
196 private static bool ResolveFilenameExtensions(ITaskItem reference, string basePath, string[] filenameExtensions, TaskLoggingHelper log)
197 {
198 foreach (string filenameExtension in filenameExtensions)
199 {
200 string path = basePath + filenameExtension;
201 log.LogMessage(MessageImportance.Low, "Trying path {0}", path);
202 if (File.Exists(path))
203 {
204 reference.ItemSpec = path;
205 return true;
206 }
207 }
208
209 return false;
210 }
211 }
212}
diff --git a/src/wix/WixToolset.BuildTasks/ToolsetTask.cs b/src/wix/WixToolset.BuildTasks/ToolsetTask.cs
new file mode 100644
index 00000000..d48f2a20
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/ToolsetTask.cs
@@ -0,0 +1,153 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.IO;
7 using System.Runtime.InteropServices;
8 using Microsoft.Build.Utilities;
9
10 public abstract partial class ToolsetTask : ToolTask
11 {
12 private static readonly string ThisDllPath = new Uri(typeof(ToolsetTask).Assembly.CodeBase).AbsolutePath;
13
14 /// <summary>
15 /// Gets or sets additional options that are appended the the tool command-line.
16 /// </summary>
17 /// <remarks>
18 /// This allows the task to support extended options in the tool which are not
19 /// explicitly implemented as properties on the task.
20 /// </remarks>
21 public string AdditionalOptions { get; set; }
22
23 /// <summary>
24 /// Gets or sets whether to display the logo.
25 /// </summary>
26 public bool NoLogo { get; set; }
27
28 /// <summary>
29 /// Gets or sets a flag indicating whether the task
30 /// should be run as separate process or in-proc.
31 /// </summary>
32 public virtual bool RunAsSeparateProcess { get; set; }
33
34 /// <summary>
35 /// Gets or sets whether all warnings should be suppressed.
36 /// </summary>
37 public bool SuppressAllWarnings { get; set; }
38
39 /// <summary>
40 /// Gets or sets a list of specific warnings to be suppressed.
41 /// </summary>
42 public string[] SuppressSpecificWarnings { get; set; }
43
44 /// <summary>
45 /// Gets or sets whether all warnings should be treated as errors.
46 /// </summary>
47 public bool TreatWarningsAsErrors { get; set; }
48
49 /// <summary>
50 /// Gets or sets a list of specific warnings to treat as errors.
51 /// </summary>
52 public string[] TreatSpecificWarningsAsErrors { get; set; }
53
54 /// <summary>
55 /// Gets or sets whether to display verbose output.
56 /// </summary>
57 public bool VerboseOutput { get; set; }
58
59 private string DefaultToolFullPath => Path.Combine(Path.GetDirectoryName(ThisDllPath), this.ToolExe);
60
61 private string ToolFullPath
62 {
63 get
64 {
65 if (String.IsNullOrEmpty(this.ToolPath))
66 {
67 return this.DefaultToolFullPath;
68 }
69 return Path.Combine(this.ToolPath, this.ToolExe);
70 }
71 }
72
73 /// <summary>
74 /// Get the path to the executable.
75 /// </summary>
76 /// <remarks>
77 /// ToolTask only calls GenerateFullPathToTool when the ToolPath property is not set.
78 /// WiX never sets the ToolPath property, but the user can through $(WixToolDir).
79 /// If we return only a file name, ToolTask will search the system paths for it.
80 /// </remarks>
81 protected sealed override string GenerateFullPathToTool()
82 {
83#if !NETCOREAPP
84 if (!this.RunAsSeparateProcess)
85 {
86 // We need to return a path that exists, so if we're not actually going to run the tool then just return this dll path.
87 return ThisDllPath;
88 }
89 return this.DefaultToolFullPath;
90#else
91 if (IsSelfExecutable(this.DefaultToolFullPath, out var toolFullPath))
92 {
93 return toolFullPath;
94 }
95 return DotnetFullPath;
96#endif
97 }
98
99 protected sealed override string GenerateResponseFileCommands()
100 {
101 var commandLineBuilder = new WixCommandLineBuilder();
102 this.BuildCommandLine(commandLineBuilder);
103 return commandLineBuilder.ToString();
104 }
105
106 /// <summary>
107 /// Builds a command line from options in this and derivative tasks.
108 /// </summary>
109 /// <remarks>
110 /// Derivative classes should call BuildCommandLine() on the base class to ensure that common command line options are added to the command.
111 /// </remarks>
112 protected virtual void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
113 {
114 commandLineBuilder.AppendIfTrue("-nologo", this.NoLogo);
115 commandLineBuilder.AppendArrayIfNotNull("-sw", this.SuppressSpecificWarnings);
116 commandLineBuilder.AppendIfTrue("-sw", this.SuppressAllWarnings);
117 commandLineBuilder.AppendIfTrue("-v", this.VerboseOutput);
118 commandLineBuilder.AppendArrayIfNotNull("-wx", this.TreatSpecificWarningsAsErrors);
119 commandLineBuilder.AppendIfTrue("-wx", this.TreatWarningsAsErrors);
120 }
121
122#if NETCOREAPP
123 private static readonly string DotnetFullPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH") ?? "dotnet";
124
125 protected override string GenerateCommandLineCommands()
126 {
127 if (IsSelfExecutable(this.ToolFullPath, out var toolFullPath))
128 {
129 return null;
130 }
131 else
132 {
133 return $"exec \"{toolFullPath}\"";
134 }
135 }
136
137 private static bool IsSelfExecutable(string proposedToolFullPath, out string toolFullPath)
138 {
139 var toolFullPathWithoutExtension = Path.Combine(Path.GetDirectoryName(proposedToolFullPath), Path.GetFileNameWithoutExtension(proposedToolFullPath));
140 var exeExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : String.Empty;
141 var exeToolFullPath = $"{toolFullPathWithoutExtension}{exeExtension}";
142 if (File.Exists(exeToolFullPath))
143 {
144 toolFullPath = exeToolFullPath;
145 return true;
146 }
147
148 toolFullPath = $"{toolFullPathWithoutExtension}.dll";
149 return false;
150 }
151#endif
152 }
153}
diff --git a/src/wix/WixToolset.BuildTasks/ToolsetTask_InProc.cs b/src/wix/WixToolset.BuildTasks/ToolsetTask_InProc.cs
new file mode 100644
index 00000000..fcf4aea9
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/ToolsetTask_InProc.cs
@@ -0,0 +1,79 @@
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#if !NETCOREAPP
4namespace WixToolset.BuildTasks
5{
6 using System;
7 using System.Runtime.InteropServices;
8 using System.Threading;
9 using System.Threading.Tasks;
10 using Microsoft.Build.Framework;
11 using WixToolset.Core;
12 using WixToolset.Data;
13 using WixToolset.Extensibility;
14 using WixToolset.Extensibility.Services;
15
16 public partial class ToolsetTask
17 {
18 protected sealed override int ExecuteTool(string pathToTool, string responseFileCommands, string commandLineCommands)
19 {
20 if (this.RunAsSeparateProcess)
21 {
22 return base.ExecuteTool(pathToTool, responseFileCommands, commandLineCommands);
23 }
24
25 return this.ExecuteInProc($"{commandLineCommands} {responseFileCommands}");
26 }
27
28 private int ExecuteInProc(string commandLineString)
29 {
30 this.Log.LogMessage(MessageImportance.Normal, $"({this.ToolName}){commandLineString}");
31
32 var listener = new MsbuildMessageListener(this.Log, this.TaskShortName, this.BuildEngine.ProjectFileOfTaskNode);
33 var exitCode = -1;
34
35 try
36 {
37 var coreProvider = WixToolsetServiceProviderFactory.CreateServiceProvider();
38
39 var messaging = coreProvider.GetService<IMessaging>();
40 messaging.SetListener(listener);
41
42 exitCode = this.ExecuteCoreAsync(coreProvider, commandLineString, CancellationToken.None).GetAwaiter().GetResult();
43 }
44 catch (WixException e)
45 {
46 listener.Write(e.Error);
47 }
48 catch (Exception e)
49 {
50 this.Log.LogErrorFromException(e, showStackTrace: true, showDetail: true, null);
51
52 if (e is NullReferenceException || e is SEHException)
53 {
54 throw;
55 }
56 }
57
58 if (exitCode == 0 && this.Log.HasLoggedErrors)
59 {
60 exitCode = -1;
61 }
62 return exitCode;
63 }
64
65 protected sealed override void LogToolCommand(string message)
66 {
67 // Only log this if we're actually going to do it.
68 if (this.RunAsSeparateProcess)
69 {
70 base.LogToolCommand(message);
71 }
72 }
73
74 protected abstract Task<int> ExecuteCoreAsync(IWixToolsetCoreServiceProvider coreProvider, string commandLineString, CancellationToken cancellationToken);
75
76 protected abstract string TaskShortName { get; }
77 }
78}
79#endif
diff --git a/src/wix/WixToolset.BuildTasks/WixAssignCulture.cs b/src/wix/WixToolset.BuildTasks/WixAssignCulture.cs
new file mode 100644
index 00000000..a8baa62f
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/WixAssignCulture.cs
@@ -0,0 +1,229 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Collections.Generic;
7 using System.Diagnostics;
8 using System.IO;
9 using System.Xml;
10 using Microsoft.Build.Framework;
11 using Microsoft.Build.Utilities;
12
13 /// <summary>
14 /// This task assigns Culture metadata to files based on the value of the Culture attribute on the
15 /// WixLocalization element inside the file.
16 /// </summary>
17 public class WixAssignCulture : Task
18 {
19 private const string CultureAttributeName = "Culture";
20 private const string OutputFolderMetadataName = "OutputFolder";
21 private const string InvariantCultureIdentifier = "neutral";
22 private const string NullCultureIdentifier = "null";
23
24 /// <summary>
25 /// The list of cultures to build. Cultures are specified in the following form:
26 /// primary culture,first fallback culture, second fallback culture;...
27 /// Culture groups are seperated by semi-colons
28 /// Culture precedence within a culture group is evaluated from left to right where fallback cultures are
29 /// separated with commas.
30 /// The first (primary) culture in a culture group will be used as the output sub-folder.
31 /// </summary>
32 public string Cultures { get; set; }
33
34 /// <summary>
35 /// The list of files to apply culture information to.
36 /// </summary>
37 [Required]
38 public ITaskItem[] Files
39 {
40 get;
41 set;
42 }
43
44 /// <summary>
45 /// The files that had culture information applied
46 /// </summary>
47 [Output]
48 public ITaskItem[] CultureGroups
49 {
50 get;
51 private set;
52 }
53
54 /// <summary>
55 /// Applies culture information to the files specified by the Files property.
56 /// This task intentionally does not validate that strings are valid Cultures so that we can support
57 /// psuedo-loc.
58 /// </summary>
59 /// <returns>True upon completion of the task execution.</returns>
60 public override bool Execute()
61 {
62 // First, process the culture group list the user specified in the cultures property
63 List<CultureGroup> cultureGroups = new List<CultureGroup>();
64
65 if (!String.IsNullOrEmpty(this.Cultures))
66 {
67 // Get rid of extra quotes
68 this.Cultures = this.Cultures.Trim('\"');
69
70 foreach (string cultureGroupString in this.Cultures.Split(';'))
71 {
72 if (0 == cultureGroupString.Length)
73 {
74 // MSBuild v2.0.50727 cannnot handle "" items
75 // for the invariant culture we require the neutral keyword
76 continue;
77 }
78 CultureGroup cultureGroup = new CultureGroup(cultureGroupString);
79 cultureGroups.Add(cultureGroup);
80 }
81 }
82 else
83 {
84 // Only process the EmbeddedResource items if cultures was unspecified
85 foreach (ITaskItem file in this.Files)
86 {
87 // Ignore non-wxls
88 if (!String.Equals(file.GetMetadata("Extension"), ".wxl", StringComparison.OrdinalIgnoreCase))
89 {
90 Log.LogError("Unable to retrieve the culture for EmbeddedResource {0}. The file type is not supported.", file.ItemSpec);
91 return false;
92 }
93 XmlDocument wxlFile = new XmlDocument();
94
95 try
96 {
97 wxlFile.Load(file.ItemSpec);
98 }
99 catch (FileNotFoundException)
100 {
101 Log.LogError("Unable to retrieve the culture for EmbeddedResource {0}. The file was not found.", file.ItemSpec);
102 return false;
103 }
104 catch (Exception e)
105 {
106 Log.LogError("Unable to retrieve the culture for EmbeddedResource {0}: {1}", file.ItemSpec, e.Message);
107 return false;
108 }
109
110 // Take the culture value and try using it to create a culture.
111 XmlAttribute cultureAttr = wxlFile.DocumentElement.Attributes[WixAssignCulture.CultureAttributeName];
112 string wxlCulture = null == cultureAttr ? String.Empty : cultureAttr.Value;
113 if (0 == wxlCulture.Length)
114 {
115 // We use a keyword for the invariant culture because MSBuild v2.0.50727 cannnot handle "" items
116 wxlCulture = InvariantCultureIdentifier;
117 }
118
119 // We found the culture for the WXL, we now need to determine if it maps to a culture group specified
120 // in the Cultures property or if we need to create a new one.
121 Log.LogMessage(MessageImportance.Low, "Culture \"{0}\" from EmbeddedResource {1}.", wxlCulture, file.ItemSpec);
122
123 bool cultureGroupExists = false;
124 foreach (CultureGroup cultureGroup in cultureGroups)
125 {
126 foreach (string culture in cultureGroup.Cultures)
127 {
128 if (String.Equals(wxlCulture, culture, StringComparison.OrdinalIgnoreCase))
129 {
130 cultureGroupExists = true;
131 break;
132 }
133 }
134 }
135
136 // The WXL didn't match a culture group we already have so create a new one.
137 if (!cultureGroupExists)
138 {
139 cultureGroups.Add(new CultureGroup(wxlCulture));
140 }
141 }
142 }
143
144 // If we didn't create any culture groups the culture was unspecificed and no WXLs were included
145 // Build an unlocalized target in the output folder
146 if (cultureGroups.Count == 0)
147 {
148 cultureGroups.Add(new CultureGroup());
149 }
150
151 List<TaskItem> cultureGroupItems = new List<TaskItem>();
152
153 if (1 == cultureGroups.Count && 0 == this.Files.Length)
154 {
155 // Maintain old behavior, if only one culturegroup is specified and no WXL, output to the default folder
156 TaskItem cultureGroupItem = new TaskItem(cultureGroups[0].ToString());
157 cultureGroupItem.SetMetadata(OutputFolderMetadataName, CultureGroup.DefaultFolder);
158 cultureGroupItems.Add(cultureGroupItem);
159 }
160 else
161 {
162 foreach (CultureGroup cultureGroup in cultureGroups)
163 {
164 TaskItem cultureGroupItem = new TaskItem(cultureGroup.ToString());
165 cultureGroupItem.SetMetadata(OutputFolderMetadataName, cultureGroup.OutputFolder);
166 cultureGroupItems.Add(cultureGroupItem);
167 Log.LogMessage("Culture: {0}", cultureGroup.ToString());
168 }
169 }
170
171 this.CultureGroups = cultureGroupItems.ToArray();
172 return true;
173 }
174
175 private class CultureGroup
176 {
177 /// <summary>
178 /// TargetPath already has a '\', do not double it!
179 /// </summary>
180 public const string DefaultFolder = "";
181
182 /// <summary>
183 /// Initialize a null culture group
184 /// </summary>
185 public CultureGroup()
186 {
187 }
188
189 public CultureGroup(string cultureGroupString)
190 {
191 Debug.Assert(!String.IsNullOrEmpty(cultureGroupString));
192 foreach (string cultureString in cultureGroupString.Split(','))
193 {
194 this.Cultures.Add(cultureString);
195 }
196 }
197
198 public List<string> Cultures { get; } = new List<string>();
199
200 public string OutputFolder
201 {
202 get
203 {
204 string result = DefaultFolder;
205 if (this.Cultures.Count > 0 &&
206 !this.Cultures[0].Equals(InvariantCultureIdentifier, StringComparison.OrdinalIgnoreCase))
207 {
208 result = this.Cultures[0] + "\\";
209 }
210
211 return result;
212 }
213 }
214
215 public override string ToString()
216 {
217 if (this.Cultures.Count > 0)
218 {
219 return String.Join(";", this.Cultures);
220 }
221
222 // We use a keyword for a null culture because MSBuild cannnot handle "" items
223 // Null is different from neutral. For neutral we still want to do WXL
224 // filtering in Light.
225 return NullCultureIdentifier;
226 }
227 }
228 }
229}
diff --git a/src/wix/WixToolset.BuildTasks/WixBuild.cs b/src/wix/WixToolset.BuildTasks/WixBuild.cs
new file mode 100644
index 00000000..dbff7e81
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/WixBuild.cs
@@ -0,0 +1,135 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Collections.Generic;
7 using Microsoft.Build.Framework;
8
9 /// <summary>
10 /// An MSBuild task to run the WiX compiler.
11 /// </summary>
12 public sealed partial class WixBuild : ToolsetTask
13 {
14 public string[] Cultures { get; set; }
15
16 public string[] DefineConstants { get; set; }
17
18 public ITaskItem[] Extensions { get; set; }
19
20 public string ExtensionDirectory { get; set; }
21
22 public string[] IncludeSearchPaths { get; set; }
23
24 public string InstallerPlatform { get; set; }
25
26 [Required]
27 public ITaskItem IntermediateDirectory { get; set; }
28
29 public ITaskItem[] LocalizationFiles { get; set; }
30
31 public ITaskItem[] LibraryFiles { get; set; }
32
33 [Output]
34 [Required]
35 public ITaskItem OutputFile { get; set; }
36
37 public string OutputType { get; set; }
38
39 public ITaskItem PdbFile { get; set; }
40
41 public string PdbType { get; set; }
42
43 public bool Pedantic { get; set; }
44
45 [Required]
46 public ITaskItem[] SourceFiles { get; set; }
47
48 public string[] ReferencePaths { get; set; }
49
50
51 public ITaskItem[] BindInputPaths { get; set; }
52
53 public bool BindFiles { get; set; }
54
55 public ITaskItem BindContentsFile { get; set; }
56
57 public ITaskItem BindOutputsFile { get; set; }
58
59 public ITaskItem BindBuiltOutputsFile { get; set; }
60
61 public string CabinetCachePath { get; set; }
62
63 public int CabinetCreationThreadCount { get; set; }
64
65 public string DefaultCompressionLevel { get; set; }
66
67 [Output]
68 public ITaskItem UnreferencedSymbolsFile { get; set; }
69
70 public ITaskItem WixProjectFile { get; set; }
71 public string[] WixVariables { get; set; }
72
73 public bool SuppressValidation { get; set; }
74
75 public string[] SuppressIces { get; set; }
76
77 public string AdditionalCub { get; set; }
78
79 protected override string ToolName => "wix.exe";
80
81 protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
82 {
83 commandLineBuilder.AppendTextUnquoted("build");
84
85 commandLineBuilder.AppendSwitchIfNotNull("-platform ", this.InstallerPlatform);
86 commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile);
87 commandLineBuilder.AppendSwitchIfNotNull("-outputType ", this.OutputType);
88 commandLineBuilder.AppendSwitchIfNotNull("-pdb ", this.PdbFile);
89 commandLineBuilder.AppendSwitchIfNotNull("-pdbType ", this.PdbType);
90 commandLineBuilder.AppendArrayIfNotNull("-culture ", this.Cultures);
91 commandLineBuilder.AppendArrayIfNotNull("-d ", this.DefineConstants);
92 commandLineBuilder.AppendArrayIfNotNull("-I ", this.IncludeSearchPaths);
93 commandLineBuilder.AppendExtensions(this.Extensions, this.ExtensionDirectory, this.ReferencePaths);
94 commandLineBuilder.AppendIfTrue("-sval", this.SuppressValidation);
95 commandLineBuilder.AppendArrayIfNotNull("-sice ", this.SuppressIces);
96 commandLineBuilder.AppendSwitchIfNotNull("-usf ", this.UnreferencedSymbolsFile);
97 commandLineBuilder.AppendSwitchIfNotNull("-cc ", this.CabinetCachePath);
98 commandLineBuilder.AppendSwitchIfNotNull("-intermediatefolder ", this.IntermediateDirectory);
99 commandLineBuilder.AppendSwitchIfNotNull("-contentsfile ", this.BindContentsFile);
100 commandLineBuilder.AppendSwitchIfNotNull("-outputsfile ", this.BindOutputsFile);
101 commandLineBuilder.AppendSwitchIfNotNull("-builtoutputsfile ", this.BindBuiltOutputsFile);
102 commandLineBuilder.AppendSwitchIfNotNull("-defaultcompressionlevel ", this.DefaultCompressionLevel);
103
104 base.BuildCommandLine(commandLineBuilder);
105
106 commandLineBuilder.AppendIfTrue("-bindFiles", this.BindFiles);
107 commandLineBuilder.AppendArrayIfNotNull("-bindPath ", this.CalculateBindPathStrings());
108 commandLineBuilder.AppendArrayIfNotNull("-loc ", this.LocalizationFiles);
109 commandLineBuilder.AppendArrayIfNotNull("-lib ", this.LibraryFiles);
110 commandLineBuilder.AppendTextIfNotWhitespace(this.AdditionalOptions);
111 commandLineBuilder.AppendFileNamesIfNotNull(this.SourceFiles, " ");
112 }
113
114 private IEnumerable<string> CalculateBindPathStrings()
115 {
116 if (null != this.BindInputPaths)
117 {
118 foreach (var item in this.BindInputPaths)
119 {
120 var path = item.GetMetadata("FullPath");
121
122 var bindName = item.GetMetadata("BindName");
123 if (!String.IsNullOrEmpty(bindName))
124 {
125 yield return String.Concat(bindName, "=", path);
126 }
127 else
128 {
129 yield return path;
130 }
131 }
132 }
133 }
134 }
135}
diff --git a/src/wix/WixToolset.BuildTasks/WixBuild_InProc.cs b/src/wix/WixToolset.BuildTasks/WixBuild_InProc.cs
new file mode 100644
index 00000000..9cba0f62
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/WixBuild_InProc.cs
@@ -0,0 +1,28 @@
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#if !NETCOREAPP
4namespace WixToolset.BuildTasks
5{
6 using System;
7 using System.Threading;
8 using System.Threading.Tasks;
9 using WixToolset.Core.Burn;
10 using WixToolset.Core.WindowsInstaller;
11 using WixToolset.Extensibility.Services;
12
13 public partial class WixBuild
14 {
15 protected override string TaskShortName => "WIX";
16
17 protected override Task<int> ExecuteCoreAsync(IWixToolsetCoreServiceProvider coreProvider, string commandLineString, CancellationToken cancellationToken)
18 {
19 coreProvider.AddWindowsInstallerBackend()
20 .AddBundleBackend();
21
22 var commandLine = coreProvider.GetService<ICommandLine>();
23 var command = commandLine.CreateCommand(commandLineString);
24 return command?.ExecuteAsync(cancellationToken) ?? Task.FromResult(1);
25 }
26 }
27}
28#endif
diff --git a/src/wix/WixToolset.BuildTasks/WixCommandLineBuilder.cs b/src/wix/WixToolset.BuildTasks/WixCommandLineBuilder.cs
new file mode 100644
index 00000000..a979dbb0
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/WixCommandLineBuilder.cs
@@ -0,0 +1,177 @@
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
3namespace WixToolset.BuildTasks
4{
5 using System;
6 using System.Collections.Generic;
7 using System.Globalization;
8 using System.IO;
9
10 using Microsoft.Build.Framework;
11 using Microsoft.Build.Utilities;
12
13 /// <summary>
14 /// Helper class for appending the command line arguments.
15 /// </summary>
16 public class WixCommandLineBuilder : CommandLineBuilder
17 {
18 internal const int Unspecified = -1;
19
20 /// <summary>
21 /// Append a switch to the command line if the value has been specified.
22 /// </summary>
23 /// <param name="switchName">Switch to append.</param>
24 /// <param name="value">Value specified by the user.</param>
25 public void AppendIfSpecified(string switchName, int value)
26 {
27 if (value != Unspecified)
28 {
29 this.AppendSwitchIfNotNull(switchName, value.ToString(CultureInfo.InvariantCulture));
30 }
31 }
32
33 /// <summary>
34 /// Append a switch to the command line if the condition is true.
35 /// </summary>
36 /// <param name="switchName">Switch to append.</param>
37 /// <param name="condition">Condition specified by the user.</param>
38 public void AppendIfTrue(string switchName, bool condition)
39 {
40 if (condition)
41 {
42 this.AppendSwitch(switchName);
43 }
44 }
45
46 /// <summary>
47 /// Append a switch to the command line if any values in the array have been specified.
48 /// </summary>
49 /// <param name="switchName">Switch to append.</param>
50 /// <param name="values">Values specified by the user.</param>
51 public void AppendArrayIfNotNull(string switchName, IEnumerable<ITaskItem> values)
52 {
53 if (values != null)
54 {
55 foreach (ITaskItem value in values)
56 {
57 this.AppendSwitchIfNotNull(switchName, value);
58 }
59 }
60 }
61
62 /// <summary>
63 /// Append a switch to the command line if any values in the array have been specified.
64 /// </summary>
65 /// <param name="switchName">Switch to append.</param>
66 /// <param name="values">Values specified by the user.</param>
67 public void AppendArrayIfNotNull(string switchName, IEnumerable<string> values)
68 {
69 if (values != null)
70 {
71 foreach (string value in values)
72 {
73 this.AppendSwitchIfNotNull(switchName, value);
74 }
75 }
76 }
77
78 /// <summary>
79 /// Build the extensions argument. Each extension is searched in the current folder, user defined search
80 /// directories (ReferencePath), HintPath, and under Wix Extension Directory in that order.
81 /// The order of precedence is based off of that described in Microsoft.Common.Targets's SearchPaths
82 /// property for the ResolveAssemblyReferences task.
83 /// </summary>
84 /// <param name="extensions">The list of extensions to include.</param>
85 /// <param name="wixExtensionDirectory">Evaluated default folder for Wix Extensions</param>
86 /// <param name="referencePaths">User defined reference directories to search in</param>
87 public void AppendExtensions(ITaskItem[] extensions, string wixExtensionDirectory, string [] referencePaths)
88 {
89 if (extensions == null)
90 {
91 return;
92 }
93
94 foreach (ITaskItem extension in extensions)
95 {
96 string className = extension.GetMetadata("Class");
97
98 string fileName = Path.GetFileName(extension.ItemSpec);
99
100 if (String.IsNullOrEmpty(Path.GetExtension(fileName)))
101 {
102 fileName += ".dll";
103 }
104
105 // First try reference paths
106 var resolvedPath = FileSearchHelperMethods.SearchFilePaths(referencePaths, fileName);
107
108 if (String.IsNullOrEmpty(resolvedPath))
109 {
110 // Now try HintPath
111 resolvedPath = extension.GetMetadata("HintPath");
112
113 if (!File.Exists(resolvedPath))
114 {
115 // Now try the item itself
116 resolvedPath = extension.ItemSpec;
117
118 if (String.IsNullOrEmpty(Path.GetExtension(resolvedPath)))
119 {
120 resolvedPath += ".dll";
121 }
122
123 if (!File.Exists(resolvedPath))
124 {
125 if (!String.IsNullOrEmpty(wixExtensionDirectory))
126 {
127 // Now try the extension directory
128 resolvedPath = Path.Combine(wixExtensionDirectory, Path.GetFileName(resolvedPath));
129 }
130
131 if (!File.Exists(resolvedPath))
132 {
133 // Extension wasn't found, just set it to the extension name passed in
134 resolvedPath = extension.ItemSpec;
135 }
136 }
137 }
138 }
139
140 if (String.IsNullOrEmpty(className))
141 {
142 this.AppendSwitchIfNotNull("-ext ", resolvedPath);
143 }
144 else
145 {
146 this.AppendSwitchIfNotNull("-ext ", className + ", " + resolvedPath);
147 }
148 }
149 }
150
151 /// <summary>
152 /// Append arbitrary text to the command-line if specified.
153 /// </summary>
154 /// <param name="textToAppend">Text to append.</param>
155 public void AppendTextIfNotNull(string textToAppend)
156 {
157 if (!String.IsNullOrEmpty(textToAppend))
158 {
159 this.AppendSpaceIfNotEmpty();
160 this.AppendTextUnquoted(textToAppend);
161 }
162 }
163
164 /// <summary>
165 /// Append arbitrary text to the command-line if specified.
166 /// </summary>
167 /// <param name="textToAppend">Text to append.</param>
168 public void AppendTextIfNotWhitespace(string textToAppend)
169 {
170 if (!String.IsNullOrWhiteSpace(textToAppend))
171 {
172 this.AppendSpaceIfNotEmpty();
173 this.AppendTextUnquoted(textToAppend);
174 }
175 }
176 }
177}
diff --git a/src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.csproj b/src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.csproj
new file mode 100644
index 00000000..3a1c7f4c
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.csproj
@@ -0,0 +1,39 @@
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 <TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
7 <Description></Description>
8 <Title>WiX Toolset MSBuild Tasks</Title>
9 <DebugType>embedded</DebugType>
10 <PublishRepositoryUrl>true</PublishRepositoryUrl>
11 <RuntimeIdentifier Condition=" '$(RuntimeIdentifier)'=='' and '$(TargetFramework)'!='netcoreapp3.1' ">win-x86</RuntimeIdentifier>
12 <!-- https://github.com/Microsoft/msbuild/issues/2360 -->
13 <PlatformTarget>AnyCPU</PlatformTarget>
14 </PropertyGroup>
15
16 <ItemGroup>
17 <PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" />
18 </ItemGroup>
19
20 <ItemGroup Condition="'$(TargetFramework)'=='net461'">
21 <PackageReference Include="Microsoft.Build.Tasks.Core" Version="14.3" />
22 <PackageReference Include="WixToolset.Core" Version="4.0.*" />
23 <PackageReference Include="WixToolset.Core.Burn" Version="4.0.*" />
24 <PackageReference Include="WixToolset.Core.WindowsInstaller" Version="4.0.*" />
25 </ItemGroup>
26
27 <ItemGroup Condition="'$(TargetFramework)'=='net461' and '$(OS)' != 'Windows_NT'">
28 <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
29 </ItemGroup>
30
31 <ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.1' ">
32 <PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.7.179" />
33 </ItemGroup>
34
35 <ItemGroup>
36 <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
37 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
38 </ItemGroup>
39</Project>
diff --git a/src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.net461.v3.ncrunchproject b/src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.net461.v3.ncrunchproject
new file mode 100644
index 00000000..cf22dfa9
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.net461.v3.ncrunchproject
@@ -0,0 +1,5 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file
diff --git a/src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.netcoreapp2.1.v3.ncrunchproject b/src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.netcoreapp2.1.v3.ncrunchproject
new file mode 100644
index 00000000..cf22dfa9
--- /dev/null
+++ b/src/wix/WixToolset.BuildTasks/WixToolset.BuildTasks.netcoreapp2.1.v3.ncrunchproject
@@ -0,0 +1,5 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file
diff --git a/src/wix/WixToolset.Sdk/Sdk/Sdk.props b/src/wix/WixToolset.Sdk/Sdk/Sdk.props
new file mode 100644
index 00000000..c517a1cf
--- /dev/null
+++ b/src/wix/WixToolset.Sdk/Sdk/Sdk.props
@@ -0,0 +1,23 @@
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<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
4 <PropertyGroup>
5 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
6 </PropertyGroup>
7
8 <PropertyGroup>
9 <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\tools\wix.targets'))</WixTargetsPath>
10 </PropertyGroup>
11
12 <PropertyGroup>
13 <TargetFrameworkMoniker Condition=" '$(TargetFrameworkMoniker)' == '' ">.NETFramework,Version=v4.8</TargetFrameworkMoniker>
14 <EnableDefaultItems Condition=" '$(EnableDefaultItems)' == '' ">true</EnableDefaultItems>
15 <EnableDefaultCompileItems Condition=" '$(EnableDefaultCompileItems)' == '' ">true</EnableDefaultCompileItems>
16 <EnableDefaultEmbeddedResourceItems Condition=" '$(EnableDefaultEmbeddedResourceItems)' == '' ">true</EnableDefaultEmbeddedResourceItems>
17 </PropertyGroup>
18
19 <ItemGroup Condition=" '$(EnableDefaultItems)' == 'true' ">
20 <Compile Include="**/*.wxs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition=" '$(EnableDefaultCompileItems)' == 'true' " />
21 <EmbeddedResource Include="**/*.wxl" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" Condition=" '$(EnableDefaultEmbeddedResourceItems)' == 'true' " />
22 </ItemGroup>
23</Project>
diff --git a/src/wix/WixToolset.Sdk/Sdk/Sdk.targets b/src/wix/WixToolset.Sdk/Sdk/Sdk.targets
new file mode 100644
index 00000000..e21cf5c6
--- /dev/null
+++ b/src/wix/WixToolset.Sdk/Sdk/Sdk.targets
@@ -0,0 +1,15 @@
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<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
4 <PropertyGroup>
5 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
6 </PropertyGroup>
7
8 <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' and Exists('$(WixTargetsPath)')" />
9
10 <PropertyGroup>
11 <DefaultItemExcludes Condition=" '$(BaseOutputPath)' != '' ">$(DefaultItemExcludes);$(BaseOutputPath)**</DefaultItemExcludes>
12 <DefaultItemExcludes Condition=" '$(BaseIntermediateOutputPath)' != '' ">$(DefaultItemExcludes);$(BaseIntermediateOutputPath)**</DefaultItemExcludes>
13 <DefaultExcludesInProjectFolder>$(DefaultItemExcludesInProjectFolder);**/.*/**</DefaultExcludesInProjectFolder>
14 </PropertyGroup>
15</Project>
diff --git a/src/wix/WixToolset.Sdk/WixToolset.Sdk.csproj b/src/wix/WixToolset.Sdk/WixToolset.Sdk.csproj
new file mode 100644
index 00000000..2374bf86
--- /dev/null
+++ b/src/wix/WixToolset.Sdk/WixToolset.Sdk.csproj
@@ -0,0 +1,38 @@
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>netcoreapp3.1</TargetFramework>
7 <IncludeBuildOutput>false</IncludeBuildOutput>
8 <Description>WiX Toolset MSBuild integration</Description>
9 <NuspecFile>$(MSBuildThisFileName).nuspec</NuspecFile>
10 <NuspecBasePath>$(OutputPath)publish\WixToolset.Sdk\</NuspecBasePath>
11 <NuspecProperties>Id=$(MSBuildThisFileName);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description)</NuspecProperties>
12 </PropertyGroup>
13
14 <ItemGroup>
15 <Content Include="build\$(MSBuildThisFileName).props" CopyToOutputDirectory="PreserveNewest" />
16 <Content Include="tools\wix.ca.targets" CopyToOutputDirectory="PreserveNewest" />
17 <Content Include="tools\wix.harvest.targets" CopyToOutputDirectory="PreserveNewest" />
18 <Content Include="tools\wix.signing.targets" CopyToOutputDirectory="PreserveNewest" />
19 <Content Include="tools\wix.targets" CopyToOutputDirectory="PreserveNewest" />
20 <Content Include="Sdk\Sdk.props" CopyToOutputDirectory="PreserveNewest" />
21 <Content Include="Sdk\Sdk.targets" CopyToOutputDirectory="PreserveNewest" />
22 </ItemGroup>
23
24 <ItemGroup>
25 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
26 </ItemGroup>
27
28 <PropertyGroup>
29 <GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);SetNuspecVersion</GenerateNuspecDependsOn>
30 </PropertyGroup>
31 <Target Name="SetNuspecVersion">
32 <Error Text="Cannot pack $(MSBuildThisFileName) until all projects are published to: '$(NuspecBasePath)'. Run appveyor.cmd to publish projects properly." Condition=" !Exists('$(NuspecBasePath)') " />
33
34 <PropertyGroup>
35 <NuspecProperties>$(NuspecProperties);Version=$(Version);ProjectFolder=$(MSBuildThisFileDirectory)</NuspecProperties>
36 </PropertyGroup>
37 </Target>
38</Project>
diff --git a/src/wix/WixToolset.Sdk/WixToolset.Sdk.nuspec b/src/wix/WixToolset.Sdk/WixToolset.Sdk.nuspec
new file mode 100644
index 00000000..591b63a6
--- /dev/null
+++ b/src/wix/WixToolset.Sdk/WixToolset.Sdk.nuspec
@@ -0,0 +1,18 @@
1<?xml version="1.0" encoding="utf-8"?>
2<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3 <metadata>
4 <id>$id$</id>
5 <version>$version$</version>
6 <authors>$authors$</authors>
7 <owners>$authors$</owners>
8 <requireLicenseAcceptance>false</requireLicenseAcceptance>
9 <description>$description$</description>
10 <copyright>$copyright$</copyright>
11 </metadata>
12
13 <files>
14 <file src="build\**\*" target="build" />
15 <file src="Sdk\**\*" target="Sdk" />
16 <file src="tools\**\*" target="tools" />
17 </files>
18</package>
diff --git a/src/wix/WixToolset.Sdk/WixToolset.Sdk.v3.ncrunchproject b/src/wix/WixToolset.Sdk/WixToolset.Sdk.v3.ncrunchproject
new file mode 100644
index 00000000..cf22dfa9
--- /dev/null
+++ b/src/wix/WixToolset.Sdk/WixToolset.Sdk.v3.ncrunchproject
@@ -0,0 +1,5 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file
diff --git a/src/wix/WixToolset.Sdk/build/WixToolset.Sdk.props b/src/wix/WixToolset.Sdk/build/WixToolset.Sdk.props
new file mode 100644
index 00000000..b453361b
--- /dev/null
+++ b/src/wix/WixToolset.Sdk/build/WixToolset.Sdk.props
@@ -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" ToolsVersion="4.0">
5 <PropertyGroup>
6 <WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\tools\wix.targets'))</WixTargetsPath>
7 </PropertyGroup>
8</Project>
diff --git a/src/wix/WixToolset.Sdk/tools/wix.ca.targets b/src/wix/WixToolset.Sdk/tools/wix.ca.targets
new file mode 100644
index 00000000..4578c2d8
--- /dev/null
+++ b/src/wix/WixToolset.Sdk/tools/wix.ca.targets
@@ -0,0 +1,123 @@
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
5<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
6
7 <Import Project="$(CustomBeforeWixCATargets)" Condition=" '$(CustomBeforeWixCATargets)' != '' and Exists('$(CustomBeforeWixCATargets)')" />
8
9 <PropertyGroup>
10 <WixCATargetsImported>true</WixCATargetsImported>
11
12 <TargetCAFileName Condition=" '$(TargetCAFileName)' == '' ">$(TargetName).CA$(TargetExt)</TargetCAFileName>
13
14 <WixSdkPath Condition=" '$(WixSdkPath)' == '' ">$(MSBuildThisFileDirectory)</WixSdkPath>
15 <WixSdkX86Path Condition=" '$(WixSdkX86Path)' == '' ">$(WixSdkPath)x86\</WixSdkX86Path>
16 <WixSdkX64Path Condition=" '$(WixSdkX64Path)' == '' ">$(WixSdkPath)x64\</WixSdkX64Path>
17
18 <MakeSfxCA Condition=" '$(MakeSfxCA)' == '' ">$(WixSdkPath)MakeSfxCA.exe</MakeSfxCA>
19 <SfxCADll Condition=" '$(SfxCADll)' == '' and '$(Platform)' == 'x64' ">$(WixSdkX64Path)SfxCA.dll</SfxCADll>
20 <SfxCADll Condition=" '$(SfxCADll)' == '' ">$(WixSdkX86Path)SfxCA.dll</SfxCADll>
21 </PropertyGroup>
22
23 <!--
24 ==================================================================================================
25 PackCustomAction
26
27 Creates an MSI managed custom action package that includes the custom action assembly,
28 local assembly dependencies, and project content files.
29
30 [IN]
31 @(IntermediateAssembly) - Managed custom action assembly.
32 @(Content) - Project items of type Content will be included in the package.
33 $(CustomActionContents) - Optional space-delimited list of additional files to include.
34
35 [OUT]
36 $(IntermediateOutputPath)$(TargetCAFileName) - Managed custom action package with unmanaged stub.
37 ==================================================================================================
38 -->
39 <Target Name="PackCustomAction"
40 Inputs="@(IntermediateAssembly);@(Content);$(CustomActionContents)"
41 Outputs="$(IntermediateOutputPath)$(TargetCAFileName)">
42
43 <!-- Find all referenced items marked CopyLocal, but exclude non-binary files. -->
44 <ItemGroup>
45 <CustomActionReferenceContents Include="@(ReferenceCopyLocalPaths)"
46 Condition=" '%(Extension)' == '.dll' or '%(Extension)' == '.exe' " />
47 <CustomActionReferenceContents Include="@(ReferenceComWrappersToCopyLocal)"
48 Condition=" '%(Extension)' == '.dll' or '%(Extension)' == '.exe' " />
49
50 <!-- include PDBs for Debug only -->
51 <CustomActionReferenceContents Include="@(IntermediateAssembly->'%(RootDir)%(Directory)%(Filename).pdb')"
52 Condition=" Exists('%(RootDir)%(Directory)%(Filename).pdb') and '$(Configuration)' == 'Debug' " />
53 <CustomActionReferenceContents Include="@(ReferenceCopyLocalPaths)"
54 Condition=" '%(Extension)' == '.pdb' and '$(Configuration)' == 'Debug' " />
55 <CustomActionReferenceContents Include="@(ReferenceComWrappersToCopyLocal)"
56 Condition=" '%(Extension)' == '.pdb' and '$(Configuration)' == 'Debug' " />
57 </ItemGroup>
58
59 <!--
60 Items to include in the CA package:
61 - Reference assemblies marked CopyLocal
62 - Project items of type Content
63 - Additional items in the CustomActionContents property
64 -->
65 <PropertyGroup>
66 <CustomActionContents>@(CustomActionReferenceContents);@(Content->'%(FullPath)');$(CustomActionContents)</CustomActionContents>
67 </PropertyGroup>
68
69 <ItemGroup>
70 <IntermediateCAAssembly Include="@(IntermediateAssembly->'%(FullPath)')" />
71 <IntermediateCAPackage Include="@(IntermediateAssembly->'%(RootDir)%(Directory)$(TargetCAFileName)')" />
72 </ItemGroup>
73
74 <!-- Run the MakeSfxCA.exe CA packaging tool. -->
75 <Exec Command='"$(MakeSfxCA)" "@(IntermediateCAPackage)" "$(SfxCADll)" "@(IntermediateCAAssembly)" "$(CustomActionContents)"'
76 WorkingDirectory="$(ProjectDir)" />
77
78 <!-- Add modules to be copied to output dir. -->
79 <ItemGroup>
80 <AddModules Include="@(IntermediateCAPackage)" />
81 </ItemGroup>
82 </Target>
83
84 <!--
85 ==================================================================================================
86 CleanCustomAction
87
88 Cleans the .CA.dll binary created by the PackCustomAction target.
89
90 ==================================================================================================
91 -->
92 <Target Name="CleanCustomAction">
93 <Delete Files="$(IntermediateOutputPath)$(TargetCAFileName)"
94 TreatErrorsAsWarnings="true" />
95 </Target>
96
97 <!--
98 ==================================================================================================
99 AfterCompile (redefinition)
100
101 Calls the PackCustomAction target after compiling.
102 Overrides the empty AfterCompile target from Microsoft.Common.targets.
103
104 ==================================================================================================
105 -->
106 <Target Name="AfterCompile"
107 DependsOnTargets="PackCustomAction" />
108
109 <!--
110 ==================================================================================================
111 BeforeClean (redefinition)
112
113 Calls the CleanCustomAction target before cleaning.
114 Overrides the empty AfterCompile target from Microsoft.Common.targets.
115
116 ==================================================================================================
117 -->
118 <Target Name="BeforeClean"
119 DependsOnTargets="CleanCustomAction" />
120
121 <Import Project="$(CustomAfterWixCATargets)" Condition=" '$(CustomAfterWixCATargets)' != '' and Exists('$(CustomAfterWixCATargets)')" />
122
123</Project>
diff --git a/src/wix/WixToolset.Sdk/tools/wix.harvest.targets b/src/wix/WixToolset.Sdk/tools/wix.harvest.targets
new file mode 100644
index 00000000..f3ec760b
--- /dev/null
+++ b/src/wix/WixToolset.Sdk/tools/wix.harvest.targets
@@ -0,0 +1,515 @@
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
5<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 <!-- These properties can be overridden to support non-default installations. -->
7 <PropertyGroup>
8 <HeatToolDir Condition=" '$(HeatToolDir)' == '' ">$(WixToolDir)</HeatToolDir>
9 </PropertyGroup>
10
11 <!-- These tasks are extensions for harvesting WiX source code from other sources. -->
12 <UsingTask TaskName="HeatFile" AssemblyFile="$(WixTasksPath)" />
13 <UsingTask TaskName="HeatDirectory" AssemblyFile="$(WixTasksPath)" />
14 <UsingTask TaskName="HeatProject" AssemblyFile="$(WixTasksPath)" />
15
16 <UsingTask TaskName="RefreshGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
17 <UsingTask TaskName="RefreshBundleGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
18
19 <!-- Default Harvester properties-->
20 <PropertyGroup>
21 <HarvestNoLogo Condition=" '$(HarvestNoLogo)' == '' ">$(NoLogo)</HarvestNoLogo>
22 <HarvestSuppressAllWarnings Condition=" '$(HarvestSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</HarvestSuppressAllWarnings>
23 <HarvestSuppressSpecificWarnings Condition=" '$(HarvestSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</HarvestSuppressSpecificWarnings>
24 <HarvestTreatWarningsAsErrors Condition=" '$(HarvestTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</HarvestTreatWarningsAsErrors>
25 <HarvestTreatSpecificWarningsAsErrors Condition=" '$(HarvestTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</HarvestTreatSpecificWarningsAsErrors>
26 <HarvestVerboseOutput Condition=" '$(HarvestVerboseOutput)' == '' ">$(VerboseOutput)</HarvestVerboseOutput>
27 <HarvestAutogenerateGuids Condition=" '$(HarvestAutogenerateGuids)' == '' ">true</HarvestAutogenerateGuids>
28 <HarvestGenerateGuidsNow Condition=" '$(HarvestGenerateGuidsNow)' == '' ">false</HarvestGenerateGuidsNow>
29 <HarvestSuppressFragments Condition=" '$(HarvestSuppressFragments)' == '' ">true</HarvestSuppressFragments>
30 <HarvestSuppressUniqueIds Condition=" '$(HarvestSuppressUniqueIds)' == '' ">false</HarvestSuppressUniqueIds>
31 </PropertyGroup>
32
33 <!-- Default HarvestProjects properties -->
34 <PropertyGroup>
35 <!-- Project harvesting is defaulted to off until it works more consistently. -->
36 <EnableProjectHarvesting Condition=" '$(EnableProjectHarvesting)'=='' ">false</EnableProjectHarvesting>
37
38 <HarvestProjectsNoLogo Condition=" '$(HarvestProjectsNoLogo)' == '' ">$(HarvestNoLogo)</HarvestProjectsNoLogo>
39 <HarvestProjectsSuppressAllWarnings Condition=" '$(HarvestProjectsSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestProjectsSuppressAllWarnings>
40 <HarvestProjectsSuppressSpecificWarnings Condition=" '$(HarvestProjectsSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestProjectsSuppressSpecificWarnings>
41 <HarvestProjectsTreatWarningsAsErrors Condition=" '$(HarvestProjectsTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestProjectsTreatWarningsAsErrors>
42 <HarvestProjectsTreatSpecificWarningsAsErrors Condition=" '$(HarvestProjectsTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestProjectsTreatSpecificWarningsAsErrors>
43 <HarvestProjectsVerboseOutput Condition=" '$(HarvestProjectsVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestProjectsVerboseOutput>
44 <HarvestProjectsAutogenerateGuids Condition=" '$(HarvestProjectsAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestProjectsAutogenerateGuids>
45 <HarvestProjectsGenerateGuidsNow Condition=" '$(HarvestProjectsGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestProjectsGenerateGuidsNow>
46 <HarvestProjectsSuppressFragments Condition=" '$(HarvestProjectsSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestProjectsSuppressFragments>
47 <HarvestProjectsSuppressUniqueIds Condition=" '$(HarvestProjectsSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestProjectsSuppressUniqueIds>
48 <HarvestProjectsTransforms Condition=" '$(HarvestProjectsTransforms)' == '' ">$(HarvestTransforms)</HarvestProjectsTransforms>
49 <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' != 'Bundle' ">$(IntermediateOutputPath)Product.Generated.wxs</HarvestProjectsGeneratedFile>
50 <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' == 'Bundle' ">$(IntermediateOutputPath)Bundle.Generated.wxs</HarvestProjectsGeneratedFile>
51 <HarvestProjectsMsbuildBinPath Condition=" '$(HarvestProjectsMsbuildBinPath)' == '' ">$(MSBuildBinPath)</HarvestProjectsMsbuildBinPath>
52 </PropertyGroup>
53
54 <!-- Default HarvestDirectory properties -->
55 <PropertyGroup>
56 <HarvestDirectoryNoLogo Condition=" '$(HarvestDirectoryNoLogo)' == '' ">$(HarvestNoLogo)</HarvestDirectoryNoLogo>
57 <HarvestDirectorySuppressAllWarnings Condition=" '$(HarvestDirectorySuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestDirectorySuppressAllWarnings>
58 <HarvestDirectorySuppressSpecificWarnings Condition=" '$(HarvestDirectorySuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestDirectorySuppressSpecificWarnings>
59 <HarvestDirectoryTreatWarningsAsErrors Condition=" '$(HarvestDirectoryTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestDirectoryTreatWarningsAsErrors>
60 <HarvestDirectoryTreatSpecificWarningsAsErrors Condition=" '$(HarvestDirectoryTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestDirectoryTreatSpecificWarningsAsErrors>
61 <HarvestDirectoryVerboseOutput Condition=" '$(HarvestDirectoryVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestDirectoryVerboseOutput>
62 <HarvestDirectoryAutogenerateGuids Condition=" '$(HarvestDirectoryAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestDirectoryAutogenerateGuids>
63 <HarvestDirectoryGenerateGuidsNow Condition=" '$(HarvestDirectoryGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestDirectoryGenerateGuidsNow>
64 <HarvestDirectorySuppressFragments Condition=" '$(HarvestDirectorySuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestDirectorySuppressFragments>
65 <HarvestDirectorySuppressUniqueIds Condition=" '$(HarvestDirectorySuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestDirectorySuppressUniqueIds>
66 <HarvestDirectoryTransforms Condition=" '$(HarvestDirectoryTransforms)' == '' ">$(HarvestTransforms)</HarvestDirectoryTransforms>
67 </PropertyGroup>
68
69 <!-- Default HarvestFile properties -->
70 <PropertyGroup>
71 <HarvestFileNoLogo Condition=" '$(HarvestFileNoLogo)' == '' ">$(HarvestNoLogo)</HarvestFileNoLogo>
72 <HarvestFileSuppressAllWarnings Condition=" '$(HarvestFileSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestFileSuppressAllWarnings>
73 <HarvestFileSuppressSpecificWarnings Condition=" '$(HarvestFileSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestFileSuppressSpecificWarnings>
74 <HarvestFileTreatWarningsAsErrors Condition=" '$(HarvestFileTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestFileTreatWarningsAsErrors>
75 <HarvestFileTreatSpecificWarningsAsErrors Condition=" '$(HarvestFileTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestFileTreatSpecificWarningsAsErrors>
76 <HarvestFileVerboseOutput Condition=" '$(HarvestFileVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestFileVerboseOutput>
77 <HarvestFileAutogenerateGuids Condition=" '$(HarvestFileAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestFileAutogenerateGuids>
78 <HarvestFileGenerateGuidsNow Condition=" '$(HarvestFileGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestFileGenerateGuidsNow>
79 <HarvestFileSuppressFragments Condition=" '$(HarvestFileSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestFileSuppressFragments>
80 <HarvestFileSuppressUniqueIds Condition=" '$(HarvestFileSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestFileSuppressUniqueIds>
81 <HarvestFileTransforms Condition=" '$(HarvestFileTransforms)' == '' ">$(HarvestTransforms)</HarvestFileTransforms>
82 </PropertyGroup>
83
84 <!--
85 ==================================================================================================
86 Harvest
87 ==================================================================================================
88 -->
89 <PropertyGroup>
90 <HarvestDependsOn>
91 ConvertReferences;
92 ConvertBundleReferences;
93 HarvestProjects;
94 HarvestDirectory;
95 HarvestFile;
96 GenerateCode;
97 </HarvestDependsOn>
98 </PropertyGroup>
99 <Target
100 Name="Harvest"
101 DependsOnTargets="$(HarvestDependsOn)" />
102
103 <!--
104 ==================================================================================================
105 GenerateCode
106 ==================================================================================================
107 -->
108 <PropertyGroup>
109 <GenerateCodeDependsOn>
110 RefreshGeneratedFile;
111 RefreshBundleGeneratedFile
112 </GenerateCodeDependsOn>
113 </PropertyGroup>
114 <Target
115 Name="GenerateCode"
116 DependsOnTargets="$(GenerateCodeDependsOn)" />
117
118 <!--
119 ================================================================================================
120 ConvertReferences
121
122 Converts project references to HeatProject items to auto generate authoring.
123 ================================================================================================
124 -->
125 <Target
126 Name="ConvertReferences"
127 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module') ">
128
129 <ItemGroup>
130 <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' ">
131 <DirectoryIds>%(_MSBuildProjectReferenceExistent.RefTargetDir)</DirectoryIds>
132 <ProjectOutputGroups>Binaries;Symbols;Sources;Content;Satellites;Documents</ProjectOutputGroups>
133 <ProjectName>%(_MSBuildProjectReferenceExistent.Name)</ProjectName>
134 <HeatOutput>$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs</HeatOutput>
135 </_HeatProjectReference>
136 <HeatProject Include="@(_HeatProjectReference)" />
137 </ItemGroup>
138
139 <Error
140 Text="The following files are deprecated and should be removed from your project(s): @(Compile->'%(Identity)', ', ')"
141 Condition=" '%(Compile.GenerateComponentGroups)' != '' " />
142
143 <ItemGroup>
144 <!-- Unconditionally generate Compile items so they are always linked in. -->
145 <Compile Include="$(HarvestProjectsGeneratedFile)" />
146 <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" />
147 </ItemGroup>
148
149 </Target>
150
151 <!--
152 ================================================================================================
153 ConvertBundleReferences
154
155 Converts project references in Bundle projects to HeatProject items to auto generate authoring.
156 ================================================================================================
157 -->
158 <Target
159 Name="ConvertBundleReferences"
160 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Bundle') ">
161
162 <ItemGroup>
163 <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' ">
164 <ProjectOutputGroups>Binaries;Symbols;Sources;Content;Satellites;Documents</ProjectOutputGroups>
165 <GenerateType>payloadgroup</GenerateType>
166 <HeatOutput>$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs</HeatOutput>
167 </_HeatProjectReference>
168 <HeatProject Include="@(_HeatProjectReference)" />
169 </ItemGroup>
170
171 <Error
172 Text="The following files are deprecated and should be removed from your project(s): @(Compile->'%(Identity)', ', ')"
173 Condition=" '%(Compile.GenerateComponentGroups)' != '' " />
174
175 <ItemGroup>
176 <!-- Unconditionally generate Compile items so they are always linked in. -->
177 <Compile Include="$(HarvestProjectsGeneratedFile)" />
178 <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" />
179 </ItemGroup>
180
181 </Target>
182
183 <!--
184 ================================================================================================
185 CombineHarvestProjects
186
187 Combines HeatProject and HarvestProject items together and ensures each has HeatOutput metadata.
188 ================================================================================================
189 -->
190 <Target
191 Name="CombineHarvestProjects"
192 Condition=" '@(HeatProject)' != '' or '@(HarvestProject)' != '' ">
193
194 <!-- Add default HeatOutputs for those without one specified -->
195 <CreateItem Include="@(HeatProject)" Condition= " '%(HeatProject.HeatOutput)' == '' "
196 AdditionalMetadata="HeatOutput=$(IntermediateOutputPath)_%(HeatProject.Filename).wxs">
197 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
198 </CreateItem>
199 <CreateItem Include="@(HarvestProject)" Condition= " '%(HarvestProject.HeatOutput)' == '' "
200 AdditionalMetadata="HeatOutput=$(IntermediateOutputPath)_%(HarvestProject.Filename).wxs">
201 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
202 </CreateItem>
203
204
205 <CreateItem Include="@(HeatProject)" Condition= " '%(HeatProject.HeatOutput)' != '' ">
206 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
207 </CreateItem>
208 <CreateItem Include="@(HarvestProject)" Condition= " '%(HarvestProject.HeatOutput)' != '' ">
209 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
210 </CreateItem>
211
212 </Target>
213
214 <!--
215 ================================================================================================
216 HarvestProjects
217
218 Harvests outputs of other MSBuild projects files using the VS project extension to heat.exe.
219
220 [IN]
221 @(HarvestProject)
222 @(HeatProject)
223 - The list of projects to harvest. HeatProject is provided for backward compatibility.
224 You should use HarvestProject instead.
225
226 %(HarvestProject.Transforms)
227 %(HeatProject.Transforms)
228 - XSL transforms to apply to the harvested WiX.
229
230 %(HarvestProject.ProjectOutputGroups)
231 %(HeatProjects.ProjectOutputGroups)
232 - The project output groups to harvest
233
234 [OUT]
235 %(HeatOutput)
236 - The generated .wxs files which are added to the @(Compile) item list.
237 ================================================================================================
238 -->
239 <ItemDefinitionGroup>
240 <HeatProject>
241 <Transforms>$(HarvestProjectsTransforms)</Transforms>
242 <ProjectOutputGroups>$(HarvestProjectsProjectOutputGroups)</ProjectOutputGroups>
243 <DirectoryIds>$(HarvestProjectsDirectoryIds)</DirectoryIds>
244 </HeatProject>
245 <HarvestProject>
246 <Transforms>$(HarvestProjectsTransforms)</Transforms>
247 <ProjectOutputGroups>$(HarvestProjectsProjectOutputGroups)</ProjectOutputGroups>
248 <DirectoryIds>$(HarvestProjectsDirectoryIds)</DirectoryIds>
249 </HarvestProject>
250 </ItemDefinitionGroup>
251
252 <PropertyGroup>
253 <HarvestProjectsDependsOn>CombineHarvestProjects</HarvestProjectsDependsOn>
254 </PropertyGroup>
255 <Target Name="HarvestProjects"
256 DependsOnTargets="$(HarvestProjectsDependsOn)"
257 Inputs="@(_AllHeatProjects);%(_AllHeatProjects.Transforms);$(MSBuildAllProjects);$(ProjectPath)"
258 Outputs="@(_AllHeatProjects -> '%(HeatOutput)')"
259 Condition=" $(EnableProjectHarvesting) and ('@(HeatProject)' != '' or '@(HarvestProject)' != '') ">
260
261 <HeatProject
262 NoLogo="true"
263 SuppressAllWarnings="$(HarvestProjectsSuppressAllWarnings)"
264 SuppressSpecificWarnings="$(HarvestProjectsSuppressSpecificWarnings)"
265 TreatWarningsAsErrors="$(HarvestProjectsTreatWarningsAsErrors)"
266 TreatSpecificWarningsAsErrors="$(HarvestProjectsTreatSpecificWarningsAsErrors)"
267 VerboseOutput="$(HarvestProjectsVerboseOutput)"
268 AutogenerateGuids="$(HarvestProjectsAutogenerateGuids)"
269 GenerateGuidsNow="$(HarvestProjectsGenerateGuidsNow)"
270 OutputFile="%(_AllHeatProjects.HeatOutput)"
271 SuppressFragments="$(HarvestProjectsSuppressFragments)"
272 SuppressUniqueIds="$(HarvestProjectsSuppressUniqueIds)"
273 Transforms="%(_AllHeatProjects.Transforms)"
274 Project="%(_AllHeatProjects.FullPath)"
275 ProjectOutputGroups="%(_AllHeatProjects.ProjectOutputGroups)"
276 GenerateType="%(_AllHeatProjects.GenerateType)"
277 MsbuildBinPath="$(HarvestProjectsMsbuildBinPath)"
278 DirectoryIds="%(_AllHeatProjects.DirectoryIds)"
279 ProjectName="%(_AllHeatProjects.ProjectName)"
280 Configuration="%(_AllHeatProjects.Configuration)"
281 Platform="%(_AllHeatProjects.Platform)"
282 GenerateWixVariables="$(HarvestProjectsGenerateWixVariables)"
283 UseToolsVersion="$(HarvestProjectsUseToolsVersion)"
284 AdditionalOptions="$(HarvestProjectsAdditionalOptions)"
285 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
286 ToolExe="$(HeatToolExe)"
287 ToolPath="$(HeatToolDir)">
288
289 <Output TaskParameter="OutputFile" ItemName="Compile" />
290 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
291
292 </HeatProject>
293
294 </Target>
295
296 <!--
297 ================================================================================================
298 HarvestDirectory
299
300 Harvests directories using heat.exe.
301
302 [IN]
303 @(HarvestDirectory) - The list of directories to harvest.
304 %(HarvestDirectory.Transforms) - XSL transforms to apply to the harvested WiX.
305 %(HarvestDirectory.ComponentGroupName) - The name of the ComponentGroup to create.
306 %(HarvestDirectory.DirectoryRefId) - The ID of the directory to reference instead of TARGETDIR.
307 %(HarvestDirectory.KeepEmptyDirectories) - Whether to create Directory entries for empty directories.
308 %(HarvestDirectory.PreprocessorVariable) - Substitute SourceDir for another variable name (ex: var.Dir).
309 %(HarvestDirectory.SuppressCom) - Suppress COM elements.
310 %(HarvestDirectory.SuppressRootDirectory) - Suppress a Directory element for the root directory.
311 $(HarvestDirectory.SuppressRegistry) - Suppress registry harvesting.
312
313 [OUT]
314 $(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs
315 - The generated .wxs files which are added to the @(Compile) item list.
316 ================================================================================================
317 -->
318
319 <ItemDefinitionGroup>
320 <HarvestDirectory>
321 <Transforms>$(HarvestDirectoryTransforms)</Transforms>
322 <ComponentGroupName>$(HarvestDirectoryComponentGroupName)</ComponentGroupName>
323 <DirectoryRefId>$(HarvestDirectoryDirectoryRefId)</DirectoryRefId>
324 <KeepEmptyDirectories>$(HarvestDirectoryKeepEmptyDirectories)</KeepEmptyDirectories>
325 <PreprocessorVariable>$(HarvestDirectoryPreprocessorVariable)</PreprocessorVariable>
326 <SuppressCom>$(HarvestDirectorySuppressCom)</SuppressCom>
327 <SuppressRootDirectory>$(HarvestDirectorySuppressRootDirectory)</SuppressRootDirectory>
328 <SuppressRegistry>$(HarvestDirectorySuppressRegistry)</SuppressRegistry>
329 </HarvestDirectory>
330 </ItemDefinitionGroup>
331
332 <PropertyGroup>
333 <HarvestDirectoryDependsOn>
334 GetHarvestDirectoryContent
335 </HarvestDirectoryDependsOn>
336 </PropertyGroup>
337
338 <!-- Creates items to include content since wildcards will not work in Target/@Inputs. -->
339 <Target Name="GetHarvestDirectoryContent">
340 <CreateItem Include="@(HarvestDirectory->'%(FullPath)\**\*')">
341 <Output TaskParameter="Include" ItemName="_HarvestDirectoryContent" />
342 </CreateItem>
343 </Target>
344
345 <Target Name="HarvestDirectory"
346 DependsOnTargets="$(HarvestDirectoryDependsOn)"
347 Inputs="@(_HarvestDirectoryContent);%(HarvestDirectory.Transforms)"
348 Outputs="$(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs"
349 Condition=" '@(HarvestDirectory)' != '' ">
350
351 <HeatDirectory
352 NoLogo="true"
353 SuppressAllWarnings="$(HarvestDirectorySuppressAllWarnings)"
354 SuppressSpecificWarnings="$(HarvestDirectorySuppressSpecificWarnings)"
355 TreatWarningsAsErrors="$(HarvestDirectoryTreatWarningsAsErrors)"
356 TreatSpecificWarningsAsErrors="$(HarvestDirectoryTreatSpecificWarningsAsErrors)"
357 VerboseOutput="$(HarvestDirectoryVerboseOutput)"
358 AutogenerateGuids="$(HarvestDirectoryAutogenerateGuids)"
359 GenerateGuidsNow="$(HarvestDirectoryGenerateGuidsNow)"
360 OutputFile="$(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs"
361 SuppressFragments="$(HarvestDirectorySuppressFragments)"
362 SuppressUniqueIds="$(HarvestDirectorySuppressUniqueIds)"
363 Transforms="%(HarvestDirectory.Transforms)"
364 Directory="@(HarvestDirectory)"
365 ComponentGroupName="%(HarvestDirectory.ComponentGroupName)"
366 DirectoryRefId="%(HarvestDirectory.DirectoryRefId)"
367 KeepEmptyDirectories="%(HarvestDirectory.KeepEmptyDirectories)"
368 PreprocessorVariable="%(HarvestDirectory.PreprocessorVariable)"
369 SuppressCom="%(HarvestDirectory.SuppressCom)"
370 SuppressRootDirectory="%(HarvestDirectory.SuppressRootDirectory)"
371 SuppressRegistry="%(HarvestDirectory.SuppressRegistry)"
372 AdditionalOptions="$(HarvestDirectoryAdditionalOptions)"
373 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
374 ToolExe="$(HeatToolExe)"
375 ToolPath="$(HeatToolDir)">
376
377 <Output TaskParameter="OutputFile" ItemName="Compile" />
378 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
379
380 </HeatDirectory>
381
382 </Target>
383
384 <!--
385 ================================================================================================
386 HarvestFile
387
388 Harvests files of different types using heat.exe. This can harvest registry from
389 self-registering files, files with typelibs, and more.
390
391 [IN]
392 @(HarvestFile) - The list of files to harvest.
393 %(HarvestFile.Transforms) - XSL transforms to apply to the harvested WiX.
394 %(HarvestFile.ComponentGroupName) - The name of the ComponentGroup to create.
395 %(HarvestFile.DirectoryRefId) - The ID of the directory to reference instead of TARGETDIR.
396 %(HarvestFile.PreprocessorVariable) - Substitute SourceDir for another variable name (ex: var.Dir).
397 %(HarvestFile.SuppressCom) - Suppress COM elements.
398 %(HarvestFile.SuppressRootDirectory) - Suppress a Directory element for the root directory.
399 $(HarvestFile.SuppressRegistry) - Suppress registry harvesting.
400
401 [OUT]
402 $(IntermediateOutputPath)_%(HarvestFile.Filename)_file.wxs
403 - The generated .wxs files which are added to the @(Compile) item list.
404 ================================================================================================
405 -->
406
407 <ItemDefinitionGroup>
408 <HarvestFile>
409 <Transforms>$(HarvestFileTransforms)</Transforms>
410 <ComponentGroupName>$(HarvestFileComponentGroupName)</ComponentGroupName>
411 <DirectoryRefId>$(HarvestFileDirectoryRefId)</DirectoryRefId>
412 <PreprocessorVariable>$(HarvestFilePreprocessorVariable)</PreprocessorVariable>
413 <SuppressCom>$(HarvestFileSuppressCom)</SuppressCom>
414 <SuppressRegistry>$(HarvestFileSuppressRegistry)</SuppressRegistry>
415 <SuppressRootDirectory>$(HarvestFileSuppressRootDirectory)</SuppressRootDirectory>
416 </HarvestFile>
417 </ItemDefinitionGroup>
418
419 <PropertyGroup>
420 <HarvestFileDependsOn></HarvestFileDependsOn>
421 </PropertyGroup>
422 <Target Name="HarvestFile"
423 DependsOnTargets="$(HarvestFileDependsOn)"
424 Inputs="@(HarvestFile);%(HarvestFile.Transforms)"
425 Outputs="@(HarvestFile->'$(IntermediateOutputPath)_%(ComponentGroupName)_%(DirectoryRefId)_%(Filename)%(Extension)_file.wxs')"
426 Condition=" '@(HarvestFile)' != '' ">
427
428 <HeatFile
429 NoLogo="true"
430 SuppressAllWarnings="$(HarvestFileSuppressAllWarnings)"
431 SuppressSpecificWarnings="$(HarvestFileSuppressSpecificWarnings)"
432 TreatWarningsAsErrors="$(HarvestFileTreatWarningsAsErrors)"
433 TreatSpecificWarningsAsErrors="$(HarvestFileTreatSpecificWarningsAsErrors)"
434 VerboseOutput="$(HarvestFileVerboseOutput)"
435 AutogenerateGuids="$(HarvestFileAutogenerateGuids)"
436 GenerateGuidsNow="$(HarvestFileGenerateGuidsNow)"
437 OutputFile="$(IntermediateOutputPath)_%(HarvestFile.ComponentGroupName)_%(HarvestFile.DirectoryRefId)_%(HarvestFile.Filename)%(HarvestFile.Extension)_file.wxs"
438 SuppressFragments="$(HarvestFileSuppressFragments)"
439 SuppressUniqueIds="$(HarvestFileSuppressUniqueIds)"
440 Transforms="%(HarvestFile.Transforms)"
441 File="@(HarvestFile)"
442 ComponentGroupName="%(HarvestFile.ComponentGroupName)"
443 DirectoryRefId="%(HarvestFile.DirectoryRefId)"
444 PreprocessorVariable="%(HarvestFile.PreprocessorVariable)"
445 SuppressCom="%(HarvestFile.SuppressCom)"
446 SuppressRegistry="%(HarvestFile.SuppressRegistry)"
447 SuppressRootDirectory="%(HarvestFile.SuppressRootDirectory)"
448 AdditionalOptions="$(HarvestFileAdditionalOptions)"
449 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
450 ToolExe="$(HeatToolExe)"
451 ToolPath="$(HeatToolDir)">
452
453 <Output TaskParameter="OutputFile" ItemName="Compile" />
454 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
455
456 </HeatFile>
457
458 </Target>
459
460 <!--
461 ================================================================================================
462 RefreshGeneratedFile
463
464 Generates code based on metadata defined in project references.
465
466 [IN]
467 @(_MSBuildResolvedProjectReferencePaths) - The list of MSBuildable project references.
468
469 [OUT]
470 @(_GeneratedFiles) - The generated source file.
471 ================================================================================================
472 -->
473 <PropertyGroup>
474 <RefreshGeneratedFileDependsOn></RefreshGeneratedFileDependsOn>
475 </PropertyGroup>
476 <Target Name="RefreshGeneratedFile"
477 DependsOnTargets="$(RefreshGeneratedFileDependsOn)"
478 Inputs="@(_MSBuildResolvedProjectReferencePaths);@(Compile);$(ProjectPath)"
479 Outputs="@(_GeneratedFiles)"
480 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module') and '@(_GeneratedFiles)' != '' ">
481
482 <RefreshGeneratedFile
483 GeneratedFiles="@(_GeneratedFiles)"
484 ProjectReferencePaths="@(_MSBuildResolvedProjectReferencePaths)" />
485
486 </Target>
487
488 <!--
489 ================================================================================================
490 RefreshBundleGeneratedFile
491
492 Generates code for bundle projects based on metadata defined in project references.
493
494 [IN]
495 @(_MSBuildResolvedProjectReferencePaths) - The list of MSBuildable project references.
496
497 [OUT]
498 @(_GeneratedFiles) - The generated source file.
499 ================================================================================================
500 -->
501 <PropertyGroup>
502 <RefreshBundleGeneratedFileDependsOn></RefreshBundleGeneratedFileDependsOn>
503 </PropertyGroup>
504 <Target Name="RefreshBundleGeneratedFile"
505 DependsOnTargets="$(RefreshBundleGeneratedFileDependsOn)"
506 Inputs="@(_MSBuildResolvedProjectReferencePaths);@(Compile);$(ProjectPath)"
507 Outputs="@(_GeneratedFiles)"
508 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Bundle' and '@(_GeneratedFiles)' != '') ">
509
510 <RefreshBundleGeneratedFile
511 GeneratedFiles="@(_GeneratedFiles)"
512 ProjectReferencePaths="@(_MSBuildResolvedProjectReferencePaths)" />
513 </Target>
514
515</Project>
diff --git a/src/wix/WixToolset.Sdk/tools/wix.signing.targets b/src/wix/WixToolset.Sdk/tools/wix.signing.targets
new file mode 100644
index 00000000..7c25175f
--- /dev/null
+++ b/src/wix/WixToolset.Sdk/tools/wix.signing.targets
@@ -0,0 +1,370 @@
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 <SignedFileName Condition=" '$(SignedFileName)' == '' ">$(MSBuildProjectFile).Signed.txt</SignedFileName>
7 <SignedFilePath>$(IntermediateOutputPath)$(SignedFileName)</SignedFilePath>
8 </PropertyGroup>
9
10 <UsingTask TaskName="Insignia" AssemblyFile="$(WixTasksPath)" />
11 <UsingTask TaskName="GetCabList" AssemblyFile="$(WixTasksPath)" />
12 <UsingTask TaskName="GetLooseFileList" AssemblyFile="$(WixTasksPath)" />
13
14 <!-- Default Inscribe properties. -->
15 <PropertyGroup>
16 <InscribeNoLogo Condition=" '$(InscribeNoLogo)' == '' ">$(NoLogo)</InscribeNoLogo>
17 <InscribeSuppressAllWarnings Condition=" '$(InscribeSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</InscribeSuppressAllWarnings>
18 <InscribeSuppressSpecificWarnings Condition=" '$(InscribeSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</InscribeSuppressSpecificWarnings>
19 <InscribeTreatWarningsAsErrors Condition=" '$(InscribeTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</InscribeTreatWarningsAsErrors>
20 <InscribeTreatSpecificWarningsAsErrors Condition=" '$(InscribeTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</InscribeTreatSpecificWarningsAsErrors>
21 <InscribeVerboseOutput Condition=" '$(InscribeVerboseOutput)' == '' ">$(VerboseOutput)</InscribeVerboseOutput>
22 </PropertyGroup>
23
24 <!--
25 ==================================================================================================
26 Signing
27 ==================================================================================================
28 -->
29 <PropertyGroup>
30 <InternalSignDependsOn Condition=" '$(OutputType)' == 'Module' ">
31 GetMsmsToSign;
32 InternalSignMsm;
33 </InternalSignDependsOn>
34 <InternalSignDependsOn Condition=" '$(OutputType)' == 'Package' ">
35 GetCabsToSign;
36 GetMsiToSign;
37 InternalSignCabs;
38 InscribeMsi;
39 InternalSignMsi;
40 </InternalSignDependsOn>
41 <InternalSignDependsOn Condition=" '$(OutputType)' == 'Bundle' ">
42 GetContainersToSign;
43 InternalSignContainers;
44 InscribeBundleEngine;
45 InternalSignBundleEngine;
46 InscribeBundle;
47 InternalSignBundle;
48 </InternalSignDependsOn>
49
50 <SigningDependsOn>
51 WixBuild;
52 CalculateSignTargetFiles;
53 BeforeSigning;
54 $(InternalSignDependsOn);
55 AfterSigning
56 </SigningDependsOn>
57 </PropertyGroup>
58 <Target
59 Name="Signing"
60 DependsOnTargets="$(SigningDependsOn)"
61 Inputs="$(TargetPath)"
62 Outputs="$(SignedFilePath)"
63 Condition=" '$(SignOutput)' == 'true' ">
64
65 <ItemGroup>
66 <FileWrites Include="$(SignedFilePath)" />
67 </ItemGroup>
68
69 <WriteLinesToFile
70 File="$(SignedFilePath)"
71 Lines="^$(MSBuildProjectFullPath);@(SignMsm);@(SignCabs);@(SignMsi);@(SignContainers);@(SignBundleEngine);@(SignBundle)"
72 Overwrite="true" />
73 </Target>
74
75 <!-- Internal targets so correct signing targets are called. -->
76 <Target
77 Name="CalculateSignTargetFiles">
78 <ItemGroup>
79 <SignTargetPath Include="$(TargetPath)" />
80 </ItemGroup>
81 </Target>
82
83 <Target
84 Name="GetMsmsToSign"
85 Inputs="@(SignTargetPath)"
86 Outputs="$(SignedFilePath)">
87
88 <ItemGroup>
89 <SignMsm Include="@(SignTargetPath)" />
90 </ItemGroup>
91 </Target>
92
93 <Target
94 Name="InternalSignMsm"
95 DependsOnTargets="SignMsm"
96 Condition=" '@(SignMsm)' != '' " />
97
98 <Target
99 Name="GetCabsToSign"
100 Inputs="@(SignTargetPath)"
101 Outputs="$(SignedFilePath)">
102 <GetCabList Database="%(SignTargetPath.FullPath)">
103 <Output TaskParameter="CabList" ItemName="SignCabs" />
104 <Output TaskParameter="CabList" ItemName="FileWrites" />
105 </GetCabList>
106 </Target>
107
108 <Target
109 Name="InternalSignCabs"
110 DependsOnTargets="SignCabs"
111 Condition=" '@(SignCabs)' != '' " />
112
113 <Target
114 Name="GetMsiToSign"
115 Inputs="@(SignTargetPath)"
116 Outputs="$(SignedFilePath)">
117 <CreateItemAvoidingInference InputProperties="@(SignTargetPath)">
118 <Output TaskParameter="OuputItems" ItemName="SignMsi" />
119 <Output TaskParameter="OuputItems" ItemName="FileWrites" />
120 </CreateItemAvoidingInference>
121 </Target>
122
123 <Target
124 Name="InternalSignMsi"
125 DependsOnTargets="SignMsi"
126 Inputs="@(SignTargetPath)"
127 Outputs="$(SignedFilePath)"
128 Condition=" '@(SignMsi)' != '' " />
129
130 <Target
131 Name="GetContainersToSign"
132 Inputs="@(SignTargetPath)"
133 Outputs="$(SignedFilePath)">
134 <!-- TODO: implement signing detached containers -->
135 </Target>
136
137 <Target
138 Name="InternalSignContainers"
139 DependsOnTargets="SignContainers"
140 Condition=" '@(SignContainers)' != '' " />
141
142 <Target
143 Name="InternalSignBundleEngine"
144 DependsOnTargets="SignBundleEngine"
145 Condition=" '@(SignBundleEngine)' != '' " />
146
147 <Target
148 Name="InternalSignBundle"
149 DependsOnTargets="SignBundle"
150 Condition=" '@(SignBundle)' != '' " />
151
152 <!--
153 ================================================================================================
154 InscribeMsi
155
156 To be called after signing an MSI's cabs - inscribes an MSI with the digital signature of its
157 external cabs.
158
159 [IN/OUT]
160 @(SignTargetPath) - The database file to inscribe - database file will be modified in-place.
161
162 [OUT]
163 @(SignMsi) - The database file to sign.
164 ================================================================================================
165 -->
166 <PropertyGroup>
167 <InscribeMsiDependsOn>
168 </InscribeMsiDependsOn>
169 </PropertyGroup>
170 <Target
171 Name="InscribeMsi"
172 DependsOnTargets="$(InscribeMsiDependsOn)"
173 Inputs="@(SignTargetPath)"
174 Outputs="$(SignedFilePath)"
175 Condition=" '@(SignCabs)' != '' ">
176
177 <Insignia
178 DatabaseFile="%(SignTargetPath.FullPath)"
179 OutputFile="%(SignTargetPath.FullPath)"
180 ToolPath="$(WixToolPath)"
181 NoLogo="$(InscribeNoLogo)"
182 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
183 SuppressAllWarnings="$(InscribeSuppressAllWarnings)"
184 SuppressSpecificWarnings="$(InscribeSuppressSpecificWarnings)"
185 TreatWarningsAsErrors="$(InscribeTreatWarningsAsErrors)"
186 TreatSpecificWarningsAsErrors="$(InscribeTreatSpecificWarningsAsErrors)"
187 VerboseOutput="$(InscribeVerboseOutput)"
188 AdditionalOptions="$(InscribeAdditionalOptions)" />
189 </Target>
190
191 <!--
192 ================================================================================================
193 InscribeBundleEngine
194
195 To be called after signing a bundle's detached containers. Also removes attached container
196 so engine can be signed without attached container.
197
198 [IN]
199 @(SignTargetPath) - The bundle to inscribe.
200
201 [OUT]
202 @(SignBundleEngine) - The bundle engine file to be signed.
203 ================================================================================================
204 -->
205 <PropertyGroup>
206 <InscribeBundleEngineDependsOn>
207 </InscribeBundleEngineDependsOn>
208 </PropertyGroup>
209 <Target
210 Name="InscribeBundleEngine"
211 DependsOnTargets="$(InscribeBundleEngineDependsOn)"
212 Inputs="@(SignTargetPath)"
213 Outputs="$(SignedFilePath)">
214
215 <Insignia
216 BundleFile="@(SignTargetPath)"
217 OutputFile="$(IntermediateOutputPath)%(SignTargetPath.Filename)%(SignTargetPath.Extension)"
218 ToolPath="$(WixToolPath)"
219 NoLogo="$(InscribeNoLogo)"
220 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
221 SuppressAllWarnings="$(InscribeSuppressAllWarnings)"
222 SuppressSpecificWarnings="$(InscribeSuppressSpecificWarnings)"
223 TreatWarningsAsErrors="$(InscribeTreatWarningsAsErrors)"
224 TreatSpecificWarningsAsErrors="$(InscribeTreatSpecificWarningsAsErrors)"
225 VerboseOutput="$(InscribeVerboseOutput)"
226 AdditionalOptions="$(InscribeAdditionalOptions)">
227 <Output TaskParameter="Output" ItemName="SignBundleEngine" />
228 </Insignia>
229
230 <!-- Explicitly add output to FileWrites to ensure they are included even when the target is up to date. -->
231 <ItemGroup>
232 <FileWrites Include="$(IntermediateOutputPath)%(SignTargetPath.Filename)%(SignTargetPath.Extension)" />
233 </ItemGroup>
234 </Target>
235
236 <!--
237 ================================================================================================
238 InscribeBundle
239
240 To be called after signing the bundle engine to reattach the attached container.
241
242 [IN]
243 @(Inscribe) - The bundle to inscribe.
244
245 [OUT]
246 @(SignBundle) - The bundle engine file to be signed.
247 ================================================================================================
248 -->
249 <PropertyGroup>
250 <InscribeBundleDependsOn>
251 </InscribeBundleDependsOn>
252 </PropertyGroup>
253 <Target
254 Name="InscribeBundle"
255 DependsOnTargets="$(InscribeBundleDependsOn)"
256 Inputs="@(SignTargetPath)"
257 Outputs="$(SignedFilePath)">
258
259 <Insignia
260 BundleFile="@(SignBundleEngine)"
261 OriginalBundleFile="@(SignTargetPath)"
262 OutputFile="@(SignTargetPath)"
263 ToolPath="$(WixToolPath)"
264 NoLogo="$(InscribeNoLogo)"
265 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
266 SuppressAllWarnings="$(InscribeSuppressAllWarnings)"
267 SuppressSpecificWarnings="$(InscribeSuppressSpecificWarnings)"
268 TreatWarningsAsErrors="$(InscribeTreatWarningsAsErrors)"
269 TreatSpecificWarningsAsErrors="$(InscribeTreatSpecificWarningsAsErrors)"
270 VerboseOutput="$(InscribeVerboseOutput)"
271 AdditionalOptions="$(InscribeAdditionalOptions)">
272 <Output TaskParameter="Output" ItemName="SignBundle" />
273 <Output TaskParameter="Output" ItemName="FileWrites" />
274 </Insignia>
275 </Target>
276
277 <!--
278 ==================================================================================================
279 BeforeSigning
280
281 Redefine this target in your project in order to run tasks just before all signing tasks.
282 ==================================================================================================
283 -->
284 <Target Name="BeforeSigning" />
285
286 <!--
287 ==================================================================================================
288 SignMsm
289
290 Redefine this target in your project in order to sign merge modules.
291
292 [IN]
293 @(SignMsm) - merge module files to sign.
294 ==================================================================================================
295 -->
296 <Target Name="SignMsm" />
297
298 <!--
299 ==================================================================================================
300 SignCabs
301
302 Redefine this target in your project in order to sign the cabs of your database.
303
304 [IN]
305 @(SignCabs) - cabinet files to sign.
306 ==================================================================================================
307 -->
308 <Target Name="SignCabs" />
309
310 <!--
311 ==================================================================================================
312 SignMsi
313
314 Redefine this target in your project in order to sign your database, after it has been inscribed
315 with the signatures of your signed cabs.
316
317 [IN]
318 @(SignMsi) - database files to sign.
319 ==================================================================================================
320 -->
321 <Target Name="SignMsi" />
322
323 <!--
324 ==================================================================================================
325 SignContainers
326
327 Redefine this target in your project in order to sign your bundle's detached containers.
328
329 [IN]
330 @(SignContainers) - detached container files to sign.
331 ==================================================================================================
332 -->
333 <Target Name="SignContainers" />
334
335 <!--
336 ==================================================================================================
337 SignBundleEngine
338
339 Redefine this target in your project in order to sign your bundle, after it has been inscribed
340 with the signatures of your signed containers.
341
342 [IN]
343 @(SignBundleEngine) - bundle engine file to sign.
344 ==================================================================================================
345 -->
346 <Target Name="SignBundleEngine" />
347
348 <!--
349 ==================================================================================================
350 SignBundle
351
352 Redefine this target in your project in order to sign your bundle, after the attached container
353 is reattached.
354
355 [IN]
356 @(SignBundle) - bundle file to sign.
357 ==================================================================================================
358 -->
359 <Target Name="SignBundle" />
360
361 <!--
362 ==================================================================================================
363 AfterSigning
364
365 Redefine this target in your project in order to run tasks just after all signing tasks.
366 ==================================================================================================
367 -->
368 <Target Name="AfterSigning" />
369
370</Project>
diff --git a/src/wix/WixToolset.Sdk/tools/wix.targets b/src/wix/WixToolset.Sdk/tools/wix.targets
new file mode 100644
index 00000000..5044bf5e
--- /dev/null
+++ b/src/wix/WixToolset.Sdk/tools/wix.targets
@@ -0,0 +1,1083 @@
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" InitialTargets="_CheckRequiredProperties" DefaultTargets="Build">
5 <PropertyGroup>
6 <WixTargetsImported>true</WixTargetsImported>
7 </PropertyGroup>
8
9 <!--
10 //////////////////////////////////////////////////////////////////////////////////////////////////
11 //////////////////////////////////////////////////////////////////////////////////////////////////
12 Extension Points
13 //////////////////////////////////////////////////////////////////////////////////////////////////
14 //////////////////////////////////////////////////////////////////////////////////////////////////
15 -->
16
17 <!-- Allow a user-customized targets files to be used as part of the build. -->
18 <Import Project="$(CustomBeforeWixTargets)" Condition=" '$(CustomBeforeWixTargets)' != '' and Exists('$(CustomBeforeWixTargets)')" />
19
20 <!-- These properties can be overridden to support non-default installations. -->
21 <PropertyGroup>
22 <WixBinDir Condition=" '$(WixBinDir)' == '' and '$(MSBuildRuntimeType)' == 'Core' ">$(MSBuildThisFileDirectory)netcoreapp3.1\</WixBinDir>
23 <WixBinDir Condition=" '$(WixBinDir)' == '' ">$(MSBuildThisFileDirectory)net461\x86\</WixBinDir>
24 <WixBinDir64 Condition=" '$(WixBinDir64)' == '' and '$(MSBuildRuntimeType)' != 'Core' ">$(MSBuildThisFileDirectory)net461\x64\</WixBinDir64>
25 <WixTasksPath Condition=" '$(WixTasksPath)' == '' ">$(WixBinDir)WixToolset.BuildTasks.dll</WixTasksPath>
26 <WixTasksPath64 Condition=" '$(WixTasksPath64)' == '' and '$(WixBinDir64)' != '' ">$(WixBinDir64)WixToolset.BuildTasks.dll</WixTasksPath64>
27 </PropertyGroup>
28
29 <PropertyGroup>
30 <WixHarvestTargetsPath Condition=" '$(WixHarvestTargetsPath)' == '' ">$(MSBuildThisFileDirectory)wix.harvest.targets</WixHarvestTargetsPath>
31 <WixSigningTargetsPath Condition=" '$(WixSigningTargetsPath)' == '' ">$(MSBuildThisFileDirectory)wix.signing.targets</WixSigningTargetsPath>
32 </PropertyGroup>
33
34 <!-- This makes the project files a dependency of all targets so that things rebuild if they change -->
35 <PropertyGroup>
36 <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
37 <MSBuildAllProjects Condition="Exists('$(WixHarvestTargetsPath)')">$(MSBuildAllProjects);$(WixHarvestTargetsPath)</MSBuildAllProjects>
38 <MSBuildAllProjects Condition="Exists('$(WixSigningTargetsPath)')">$(MSBuildAllProjects);$(WixSigningTargetsPath)</MSBuildAllProjects>
39 <MSBuildAllProjects Condition="Exists('$(CustomBeforeWixTargets)')">$(MSBuildAllProjects);$(CustomBeforeWixTargets)</MSBuildAllProjects>
40 <MSBuildAllProjects Condition="Exists('$(CustomAfterWixTargets)')">$(MSBuildAllProjects);$(CustomAfterWixTargets)</MSBuildAllProjects>
41 </PropertyGroup>
42
43 <!--
44 //////////////////////////////////////////////////////////////////////////////////////////////////
45 //////////////////////////////////////////////////////////////////////////////////////////////////
46 Declarations for Microsoft.Common.targets
47 //////////////////////////////////////////////////////////////////////////////////////////////////
48 //////////////////////////////////////////////////////////////////////////////////////////////////
49 -->
50
51 <PropertyGroup>
52 <DefaultLanguageSourceExtension>.wxs</DefaultLanguageSourceExtension>
53 <Language>wix</Language>
54 <TargetRuntime>wix</TargetRuntime>
55
56 <!-- Use OutputName to set the AssemblyName for Microsoft.Common.targets -->
57 <OutputName Condition=" '$(OutputName)'=='' ">$(MSBuildProjectName)</OutputName>
58 <AssemblyName>$(OutputName)</AssemblyName>
59
60 <!-- Default OutputType to a known WiX Toolset type. -->
61 <OutputType Condition=" '$(OutputType)' == '' ">Package</OutputType>
62
63 <!-- Default WixPdbType to a known WiX Toolset type. -->
64 <WixPdbType Condition=" '$(WixPdbType)' == '' ">full</WixPdbType>
65 </PropertyGroup>
66
67 <!--
68 IDE Macros available from both integrated builds and from command line builds.
69 The following properties are 'macros' that are available via IDE for pre and post build steps.
70 All of them should be added to WixBuildMacroCollection to ensure that they are shown in the UI.
71 -->
72 <PropertyGroup Condition=" '$(TargetExt)' == '' ">
73 <TargetExt Condition=" '$(OutputType)' == 'Package' ">.msi</TargetExt>
74 <TargetExt Condition=" '$(OutputType)' == 'Module' ">.msm</TargetExt>
75 <TargetExt Condition=" '$(OutputType)' == 'PatchCreation' ">.pcp</TargetExt>
76 <TargetExt Condition=" '$(OutputType)' == 'Library' ">.wixlib</TargetExt>
77 <TargetExt Condition=" '$(OutputType)' == 'Bundle' ">.exe</TargetExt>
78 <TargetExt Condition=" '$(OutputType)' == 'IntermediatePostLink' ">.wixipl</TargetExt>
79 </PropertyGroup>
80
81 <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
82
83 <PropertyGroup>
84 <!-- Default pdb output path to the intermediate output directory -->
85 <PdbOutputDir Condition=" '$(PdbOutputDir)'=='' ">$(TargetDir)</PdbOutputDir>
86 <PdbOutputDir Condition=" !HasTrailingSlash('$(PdbOutputDir)') ">$(PdbOutputDir)\</PdbOutputDir>
87
88 <!-- Example, C:\MyProjects\MyProject\bin\debug\ -->
89 <TargetPdbDir Condition=" '$(PdbOutputDir)'!='' ">$([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(MSBuildProjectDirectory)`, `$(PdbOutputDir)`))`))</TargetPdbDir>
90
91 <!-- Example, MySetup.wixpdb" -->
92 <TargetPdbFileName Condition=" '$(TargetPdbFileName)' == '' ">$(TargetName).wixpdb</TargetPdbFileName>
93
94 <!-- Example, C:\MyProjects\MyProject\bin\debug\MyPackage.wixpdb -->
95 <TargetPdbPath Condition=" '$(TargetPdbPath)' == '' ">$(TargetPdbDir)$(TargetPdbFileName)</TargetPdbPath>
96 </PropertyGroup>
97
98 <!--
99 //////////////////////////////////////////////////////////////////////////////////////////////////
100 //////////////////////////////////////////////////////////////////////////////////////////////////
101 Property Declarations
102 //////////////////////////////////////////////////////////////////////////////////////////////////
103 //////////////////////////////////////////////////////////////////////////////////////////////////
104 -->
105
106 <!-- These tasks can be used as general-purpose build tasks. -->
107 <UsingTask TaskName="WixBuild" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
108 <UsingTask TaskName="WixBuild" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
109 <UsingTask TaskName="WixBuild" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
110
111 <!-- These tasks are specific to the build process defined in this file, and are not considered general-purpose build tasks. -->
112 <UsingTask TaskName="CreateItemAvoidingInference" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
113 <UsingTask TaskName="CreateItemAvoidingInference" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
114 <UsingTask TaskName="CreateItemAvoidingInference" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
115
116 <UsingTask TaskName="CreateProjectReferenceDefineConstants" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
117 <UsingTask TaskName="CreateProjectReferenceDefineConstants" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
118 <UsingTask TaskName="CreateProjectReferenceDefineConstants" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
119
120 <UsingTask TaskName="WixAssignCulture" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
121 <UsingTask TaskName="WixAssignCulture" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
122 <UsingTask TaskName="WixAssignCulture" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
123
124 <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
125 <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
126 <UsingTask TaskName="ResolveWixReferences" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
127
128 <UsingTask TaskName="ReplaceString" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
129 <UsingTask TaskName="ReplaceString" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
130 <UsingTask TaskName="ReplaceString" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
131
132 <UsingTask TaskName="GenerateCompileWithObjectPath" Condition=" '$(WixTasksPath64)' == '' " AssemblyFile="$(WixTasksPath)" />
133 <UsingTask TaskName="GenerateCompileWithObjectPath" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath)" Architecture="x86" />
134 <UsingTask TaskName="GenerateCompileWithObjectPath" Condition=" '$(WixTasksPath64)' != '' " AssemblyFile="$(WixTasksPath64)" Architecture="x64" />
135
136 <PropertyGroup>
137 <BindContentsFile Condition=" '$(BindContentsFile)' == '' ">$(MSBuildProjectFile).BindContentsFileList.txt</BindContentsFile>
138 <BindOutputsFile Condition=" '$(BindOutputsFile)' == '' ">$(MSBuildProjectFile).BindOutputsFileList.txt</BindOutputsFile>
139 <BindBuiltOutputsFile Condition=" '$(BindBuiltOutputsFile)' == '' ">$(MSBuildProjectFile).BindBuiltOutputsFileList.txt</BindBuiltOutputsFile>
140 </PropertyGroup>
141
142 <PropertyGroup>
143 <CabinetCachePath Condition=" '$(CabinetCachePath)'=='' and '$(ReuseCabinetCache)'=='true' ">$(IntermediateOutputPath)cabcache\</CabinetCachePath>
144 </PropertyGroup>
145
146 <PropertyGroup>
147 <WixExtDir Condition=" '$(WixExtDir)' == ''">$(WixBinDir)</WixExtDir>
148 </PropertyGroup>
149
150 <!--
151 //////////////////////////////////////////////////////////////////////////////////////////////////
152 //////////////////////////////////////////////////////////////////////////////////////////////////
153 Default Compiler, Linker, and Librarian Property Declarations
154 //////////////////////////////////////////////////////////////////////////////////////////////////
155 //////////////////////////////////////////////////////////////////////////////////////////////////
156 -->
157
158 <!-- If WixExtension was passed in via the command line, then convert it to an ItemGroup -->
159 <ItemGroup>
160 <WixExtension Include="$(WixExtension)" Condition=" '$(WixExtension)' != '' " />
161 </ItemGroup>
162
163 <!-- Defaut Compiler properties. -->
164 <PropertyGroup>
165 <CompilerNoLogo Condition=" '$(CompilerNoLogo)' == '' ">$(NoLogo)</CompilerNoLogo>
166 <CompilerSuppressAllWarnings Condition=" '$(CompilerSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</CompilerSuppressAllWarnings>
167 <CompilerSuppressSpecificWarnings Condition=" '$(CompilerSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</CompilerSuppressSpecificWarnings>
168 <CompilerTreatWarningsAsErrors Condition=" '$(CompilerTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</CompilerTreatWarningsAsErrors>
169 <CompilerTreatSpecificWarningsAsErrors Condition=" '$(CompilerTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</CompilerTreatSpecificWarningsAsErrors>
170 <CompilerVerboseOutput Condition=" '$(CompilerVerboseOutput)' == '' ">$(VerboseOutput)</CompilerVerboseOutput>
171 <!-- TODO: This probably doesn't work any longer since Platform won't be defined until Microsoft.Common.targets is included -->
172 <InstallerPlatform Condition=" '$(InstallerPlatform)' == '' and '$(Platform)' != 'AnyCPU' and '$(Platform)' != 'Any CPU' ">$(Platform)</InstallerPlatform>
173 </PropertyGroup>
174
175 <!-- Default Lib properties. -->
176 <PropertyGroup>
177 <LibNoLogo Condition=" '$(LibNoLogo)' == '' ">$(NoLogo)</LibNoLogo>
178 <LibBindFiles Condition=" '$(LibBindFiles)' == '' ">$(BindFiles)</LibBindFiles>
179 <LibPedantic Condition=" '$(LibPedantic)' == '' ">$(Pedantic)</LibPedantic>
180 <LibSuppressAllWarnings Condition=" '$(LibSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</LibSuppressAllWarnings>
181 <LibSuppressSpecificWarnings Condition=" '$(LibSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</LibSuppressSpecificWarnings>
182 <LibSuppressSchemaValidation Condition=" '$(LibSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</LibSuppressSchemaValidation>
183 <LibSuppressIntermediateFileVersionMatching Condition=" '$(LibSuppressIntermediateFileVersionMatching)' == '' ">$(SuppressIntermediateFileVersionMatching)</LibSuppressIntermediateFileVersionMatching>
184 <LibTreatWarningsAsErrors Condition=" '$(LibTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</LibTreatWarningsAsErrors>
185 <LibTreatSpecificWarningsAsErrors Condition=" '$(LibTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</LibTreatSpecificWarningsAsErrors>
186 <LibVerboseOutput Condition=" '$(LibVerboseOutput)' == '' ">$(VerboseOutput)</LibVerboseOutput>
187 </PropertyGroup>
188
189 <!-- Default Linker properties. -->
190 <PropertyGroup>
191 <LinkerNoLogo Condition=" '$(LinkerNoLogo)' == '' ">$(NoLogo)</LinkerNoLogo>
192 <LinkerBindFiles Condition=" '$(LinkerBindFiles)' == '' ">$(BindFiles)</LinkerBindFiles>
193 <LinkerPedantic Condition=" '$(LinkerPedantic)' == '' ">$(Pedantic)</LinkerPedantic>
194 <LinkerSuppressAllWarnings Condition=" '$(LinkerSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</LinkerSuppressAllWarnings>
195 <LinkerSuppressSpecificWarnings Condition=" '$(LinkerSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</LinkerSuppressSpecificWarnings>
196 <LinkerSuppressSchemaValidation Condition=" '$(LinkerSuppressSchemaValidation)' == '' ">$(SuppressSchemaValidation)</LinkerSuppressSchemaValidation>
197 <LinkerSuppressIntermediateFileVersionMatching Condition=" '$(LinkerSuppressIntermediateFileVersionMatching)' == '' ">$(SuppressIntermediateFileVersionMatching)</LinkerSuppressIntermediateFileVersionMatching>
198 <LinkerTreatWarningsAsErrors Condition=" '$(LinkerTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</LinkerTreatWarningsAsErrors>
199 <LinkerTreatSpecificWarningsAsErrors Condition=" '$(LinkerTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</LinkerTreatSpecificWarningsAsErrors>
200 <LinkerVerboseOutput Condition=" '$(LinkerVerboseOutput)' == '' ">$(VerboseOutput)</LinkerVerboseOutput>
201 </PropertyGroup>
202
203 <!-- If BindInputPaths (or LinkerBindInputPaths) was passed in via the command line, then convert it to an ItemGroup -->
204 <ItemGroup>
205 <BindInputPaths Include="$(BindInputPaths)" Condition=" '$(BindInputPaths)' != '' " />
206 <LinkerBindInputPaths Include="$(LinkerBindInputPaths)" Condition=" '$(LinkerBindInputPaths)' != '' " />
207 </ItemGroup>
208
209 <!-- Default Lit and Light "properties" -->
210 <ItemGroup>
211 <LinkerBindInputPaths Condition=" '@(LinkerBindInputPaths)' == '' " Include="@(BindInputPaths)" />
212 </ItemGroup>
213
214 <!--
215 //////////////////////////////////////////////////////////////////////////////////////////////////
216 //////////////////////////////////////////////////////////////////////////////////////////////////
217 Initial Targets
218 //////////////////////////////////////////////////////////////////////////////////////////////////
219 //////////////////////////////////////////////////////////////////////////////////////////////////
220 -->
221
222 <!--
223 ==================================================================================================
224 _CheckRequiredProperties
225
226 Checks properties that must be set in the main project file or on the command line before
227 using this .TARGETS file.
228
229 [IN]
230 $(OutputName) - The name of the MSI/MSM/wixlib to build (without the extension)
231 $(OutputType) - Possible values are 'Package', 'PatchCreation', 'Module', 'Library', 'Bundle', 'IntermediatePostLink'
232 ==================================================================================================
233 -->
234 <PropertyGroup>
235 <_PleaseSetThisInProjectFile>Please set this in the project file before the &lt;Import&gt; of the wix.targets file.</_PleaseSetThisInProjectFile>
236 <_OutputTypeDescription>Possible values are: 'Package', 'Module', 'Library', 'Bundle', 'IntermediatePostLink'. $(_PleaseSetThisInProjectFile)</_OutputTypeDescription>
237 </PropertyGroup>
238 <Target Name="_CheckRequiredProperties">
239
240 <Error
241 Code="WIX100"
242 Condition=" '$(OutputName)' == '' "
243 Text="The OutputName property is not set in project &quot;$(MSBuildProjectFile)&quot;. The OutputName defines the name of the output without a file extension. $(_PleaseSetThisInProjectFile)" />
244
245 <Error
246 Code="WIX101"
247 Condition=" '$(OutputType)' != 'Package' and '$(OutputType)' != 'PatchCreation' and '$(OutputType)' != 'Module' and '$(OutputType)' != 'Library' and '$(OutputType)' != 'Bundle' and '$(OutputType)' != 'IntermediatePostLink' "
248 Text="The OutputType property '$(OutputType)' is not valid in project &quot;$(MSBuildProjectFile)&quot;. $(_OutputTypeDescription)" />
249
250 <Error
251 Code="WIX102"
252 Condition=" '$(WixPdbType)' != 'none' and '$(WixPdbType)' != 'full' "
253 Text="The WixPdbType property '$(WixPdbType)' is not valid in project &quot;$(MSBuildProjectFile)&quot;. Supported values are: 'full', 'none'" />
254
255 </Target>
256
257 <!--
258 //////////////////////////////////////////////////////////////////////////////////////////////////
259 //////////////////////////////////////////////////////////////////////////////////////////////////
260 Build Targets
261 //////////////////////////////////////////////////////////////////////////////////////////////////
262 //////////////////////////////////////////////////////////////////////////////////////////////////
263 -->
264
265 <!--
266 ==================================================================================================
267 CoreBuild - OVERRIDE DependsOn
268
269 The core build step calls each of the build targets.
270
271 This is where we insert our targets into the build process.
272 ==================================================================================================
273 -->
274 <PropertyGroup>
275 <CoreBuildDependsOn>
276 BuildOnlySettings;
277 PrepareForBuild;
278 PreBuildEvent;
279
280 WixBuild;
281 Signing;
282
283 GetTargetPath;
284 PrepareForRun;
285 IncrementalClean;
286 PostBuildEvent
287 </CoreBuildDependsOn>
288 </PropertyGroup>
289
290
291 <!--
292 //////////////////////////////////////////////////////////////////////////////////////////////////
293 //////////////////////////////////////////////////////////////////////////////////////////////////
294 Resolve References Targets
295 //////////////////////////////////////////////////////////////////////////////////////////////////
296 //////////////////////////////////////////////////////////////////////////////////////////////////
297 -->
298
299 <!--
300 ==================================================================================================
301 ResolveReferences - OVERRIDE DependsOn
302
303 ==================================================================================================
304 -->
305 <PropertyGroup>
306 <ResolveReferencesDependsOn>
307 BeforeResolveReferences;
308 AssignProjectConfiguration;
309 ResolveProjectReferences;
310 ResolveWixLibraryReferences;
311 ResolveWixExtensionReferences;
312 AfterResolveReferences
313 </ResolveReferencesDependsOn>
314 </PropertyGroup>
315
316 <!--
317 ================================================================================================
318 ResolveProjectReferences
319
320 Builds all of the referenced projects to get their outputs.
321
322 [IN]
323 @(NonVCProjectReference) - The list of non-VC project references.
324
325 [OUT]
326 @(ProjectReferenceWithConfiguration) - The list of non-VC project references.
327 @(WixLibProjects) - Paths to any .wixlibs that were built by referenced projects.
328 ================================================================================================
329 -->
330 <Target
331 Name="ResolveProjectReferences"
332 DependsOnTargets="AssignProjectConfiguration;_SplitProjectReferencesByFileExistence"
333 Condition=" '@(ProjectReferenceWithConfiguration)' != '' ">
334
335 <!-- Issue a warning for each non-existent project. -->
336 <Warning
337 Text="The referenced project '%(_MSBuildProjectReferenceNonexistent.Identity)' does not exist."
338 Condition=" '@(_MSBuildProjectReferenceNonexistent)' != '' " />
339
340 <!--
341 When building this project from the IDE or when building a .sln from the command line or
342 when only building .wixlib project references, gather the referenced build outputs. The
343 code that builds the .sln will already have built the project, so there's no need to do
344 it again here and when building only .wixlib project references we'll use the results to
345 determine which projects to build.
346
347 The ContinueOnError setting is here so that, during project load, as much information as
348 possible will be passed to the compilers.
349 -->
350 <MSBuild
351 Projects="@(_MSBuildProjectReferenceExistent)"
352 Targets="%(_MSBuildProjectReferenceExistent.Targets);GetTargetPath"
353 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration);%(_MSBuildProjectReferenceExistent.SetPlatform)"
354 Condition="('$(BuildingSolutionFile)' == 'true' or '$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '@(_MSBuildProjectReferenceExistent)' != '' "
355 ContinueOnError="!$(BuildingProject)">
356
357 <Output TaskParameter="TargetOutputs" ItemName="_GatheredProjectReferencePaths" />
358 </MSBuild>
359
360 <!--
361 Determine which project references should be built. Note: we will not build any project references
362 if building in the IDE because it builds project references directly.
363
364 If BuildProjectReferences is 'true' (the default) then take all MSBuild project references that exist
365 on disk and add them to the list of things to build. This is the easy case.
366 -->
367 <CreateItem
368 Include="@(_MSBuildProjectReferenceExistent)"
369 Condition=" '$(BuildProjectReferences)' == 'true' and '$(BuildingInsideVisualStudio)' != 'true' ">
370
371 <Output TaskParameter="Include" ItemName="_ProjectReferencesToBuild" />
372 </CreateItem>
373
374 <!--
375 If BuildProjectReferences is 'wixlib' then build only the MSBuild project references that exist and
376 create a .wixlib file. That requires us to first filter the gathered project references down to only
377 those that build .wixlibs.
378 -->
379 <CreateItem
380 Include="@(_GatheredProjectReferencePaths)"
381 Condition=" '$(BuildProjectReferences)' == 'wixlib' and '%(Extension)' == '.wixlib' and '$(BuildingInsideVisualStudio)' != 'true' ">
382
383 <Output TaskParameter="Include" ItemName="_ReferencedWixLibPaths" />
384 </CreateItem>
385
386 <!--
387 The second step when building only 'wixlib' project references is to create the list of existing MSBuild
388 project references that do *not* build a .wixlib. These are the projects that will be skipped.
389 -->
390 <CreateItem
391 Include="@(_MSBuildProjectReferenceExistent->'%(FullPath)')"
392 Exclude="@(_ReferencedWixLibPaths->'%(MSBuildSourceProjectFile)')"
393 Condition=" '$(BuildProjectReferences)' == 'wixlib' and '$(BuildingInsideVisualStudio)' != 'true' ">
394
395 <Output TaskParameter="Include" ItemName="_ProjectReferencesToSkip" />
396 </CreateItem>
397
398 <!--
399 Finally, when building only 'wixlib' project references, the list of projects to build are naturally the
400 list of projects *not* being skipped.
401 -->
402 <CreateItem
403 Include="@(_MSBuildProjectReferenceExistent->'%(FullPath)')"
404 Exclude="@(_ProjectReferencesToSkip)"
405 Condition=" '$(BuildProjectReferences)' == 'wixlib' and '$(BuildingInsideVisualStudio)' != 'true' ">
406
407 <Output TaskParameter="Include" ItemName="_ProjectReferencesToBuild" />
408 </CreateItem>
409
410 <!-- Display a warning for all projects being skipped. -->
411 <Warning
412 Text="BuildProjectReferences set to '$(BuildProjectReferences)'. Skipping the non-Library project: %(_ProjectReferencesToSkip.Identity)"
413 Condition=" '@(_ProjectReferencesToSkip)' != '' " />
414
415 <Message
416 Importance="low"
417 Text="Project reference to build: %(_ProjectReferencesToBuild.Identity), properties: %(_ProjectReferencesToBuild.Properties)"
418 Condition=" '@(_ProjectReferencesToBuild)' != '' " />
419
420 <!--
421 Build referenced projects when building from the command line.
422
423 The $(ProjectReferenceBuildTargets) will normally be blank so that the project's default target
424 is used during a P2P reference. However if a custom build process requires that the referenced
425 project has a different target to build it can be specified.
426 -->
427 <MSBuild
428 Projects="@(_ProjectReferencesToBuild)"
429 Targets="$(ProjectReferenceBuildTargets)"
430 Properties="%(_ProjectReferencesToBuild.SetConfiguration);%(_ProjectReferencesToBuild.SetPlatform)"
431 Condition=" '@(_ProjectReferencesToBuild)' != '' ">
432
433 <Output TaskParameter="TargetOutputs" ItemName="_BuiltProjectReferencePaths" />
434 </MSBuild>
435
436 <!--
437 VC project references must build GetNativeTargetPath because neither GetTargetPath nor the return of the default build
438 target return the output for a native .vcxproj.
439 -->
440 <MSBuild
441 Projects="@(_MSBuildProjectReferenceExistent)"
442 Targets="GetNativeTargetPath"
443 Properties="%(_MSBuildProjectReferenceExistent.SetConfiguration);%(_MSBuildProjectReferenceExistent.SetPlatform)"
444 Condition=" '@(ProjectReferenceWithConfiguration)' != '' and '%(_MSBuildProjectReferenceExistent.Extension)' == '.vcxproj' ">
445
446 <Output TaskParameter="TargetOutputs" ItemName="_ResolvedProjectReferencePaths" />
447 <Output TaskParameter="TargetOutputs" ItemName="_MSBuildResolvedProjectReferencePaths" />
448 </MSBuild>
449
450 <!-- Assign the unique gathered and built project references to the resolved project
451 reference paths. -->
452 <RemoveDuplicates Inputs="@(_GatheredProjectReferencePaths);@(_BuiltProjectReferencePaths)">
453 <Output TaskParameter="Filtered" ItemName="_ResolvedProjectReferencePaths" />
454 <Output TaskParameter="Filtered" ItemName="_MSBuildResolvedProjectReferencePaths" />
455 </RemoveDuplicates>
456
457 <!-- Create list of all .wixlib project references. -->
458 <CreateItem
459 Include="@(_ResolvedProjectReferencePaths)"
460 Condition=" '%(Extension)' == '.wixlib' ">
461
462 <Output TaskParameter="Include" ItemName="WixLibProjects" />
463 </CreateItem>
464
465 <Message
466 Importance="low"
467 Text="Library from referenced projects: %(WixLibProjects.Identity)"
468 Condition=" '@(WixLibProjects)' != '' " />
469
470 </Target>
471
472 <!--
473 ================================================================================================
474 ResolveWixLibraryReferences
475
476 Resolve the library references to full paths.
477
478 [IN]
479 @(WixLibrary) - The list of .wixlib files.
480
481 [OUT]
482 @(_ResolvedWixLibraryPaths) - Item group with full paths to libraries
483 ================================================================================================
484 -->
485 <PropertyGroup>
486 <ResolveWixLibraryReferencesDependsOn></ResolveWixLibraryReferencesDependsOn>
487 </PropertyGroup>
488 <Target
489 Name="ResolveWixLibraryReferences"
490 DependsOnTargets="$(ResolveWixLibraryReferencesDependsOn)"
491 Condition=" '@(WixLibrary)' != ''">
492
493 <!--
494 The WixLibrarySearchPaths property is set to find assemblies in the following order:
495
496 (1) $(ReferencePaths) - the reference paths property, which comes from the .USER file.
497 (2) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
498 (3) Treat the reference's Include as if it were a real file name.
499 (4) Path specified by the WixExtDir property.
500 -->
501 <CreateProperty Condition=" '$(WixLibrarySearchPaths)' == '' " Value="
502 $(ReferencePaths);
503 {HintPathFromItem};
504 {RawFileName};
505 $(WixExtDir)
506 ">
507 <Output TaskParameter="Value" PropertyName="WixLibrarySearchPaths" />
508 </CreateProperty>
509
510 <ResolveWixReferences
511 WixReferences="@(WixLibrary)"
512 SearchPaths="$(WixLibrarySearchPaths)"
513 SearchFilenameExtensions=".wixlib">
514 <Output TaskParameter="ResolvedWixReferences" ItemName="_AllResolvedWixLibraryPaths" />
515 </ResolveWixReferences>
516
517 <!-- Remove duplicate library items that would cause build errors -->
518 <RemoveDuplicates Inputs="@(_AllResolvedWixLibraryPaths)">
519 <Output TaskParameter="Filtered" ItemName="_ResolvedWixLibraryPaths" />
520 </RemoveDuplicates>
521
522 </Target>
523
524 <!--
525 ==================================================================================================
526 ResolveWixExtensionReferences
527
528 Resolves WiX extension references to full paths. Any properties you use
529 to resolve paths to extensions must be defined before importing this
530 file or the extensions will be automatically resolved to $(WixExtDir).
531
532 [IN]
533 @(WixExtension) - WixExtension item group
534
535 [OUT]
536 @(_ResolvedWixExtensionPaths) - Item group with full paths to extensions
537 ==================================================================================================
538 -->
539 <PropertyGroup>
540 <ResolveWixExtensionReferencesDependsOn></ResolveWixExtensionReferencesDependsOn>
541 </PropertyGroup>
542 <Target
543 Name="ResolveWixExtensionReferences"
544 DependsOnTargets="$(ResolveWixExtensionReferencesDependsOn)"
545 Condition=" '@(WixExtension)' != ''">
546
547 <!--
548 The WixExtensionSearchPaths property is set to find assemblies in the following order:
549
550 (1) $(ReferencePaths) - the reference paths property, which comes from the .USER file.
551 (2) The hintpath from the referenced item itself, indicated by {HintPathFromItem}.
552 (3) Treat the reference's Include as if it were a real file name.
553 (4) Path specified by the WixExtDir property.
554 -->
555 <CreateProperty Condition=" '$(WixExtensionSearchPaths)' == '' " Value="
556 $(ReferencePaths);
557 {HintPathFromItem};
558 {RawFileName};
559 $(WixExtDir)
560 ">
561 <Output TaskParameter="Value" PropertyName="WixExtensionSearchPaths" />
562 </CreateProperty>
563
564 <ResolveWixReferences
565 WixReferences="@(WixExtension)"
566 SearchPaths="$(WixExtensionSearchPaths)"
567 SearchFilenameExtensions=".dll">
568 <Output TaskParameter="ResolvedWixReferences" ItemName="_AllResolvedWixExtensionPaths" />
569 </ResolveWixReferences>
570
571 <!-- Remove duplicate extension items that would cause build errors -->
572 <RemoveDuplicates Inputs="@(_AllResolvedWixExtensionPaths)">
573 <Output TaskParameter="Filtered" ItemName="_ResolvedWixExtensionPaths" />
574 </RemoveDuplicates>
575 </Target>
576
577 <!--
578 ================================================================================================
579 GetTargetPath - OVERRIDE DependsOn
580
581 This stand-alone target returns the name of the build product (i.e. MSI, MSM) that would be
582 produced if we built this project.
583 ================================================================================================
584 -->
585 <PropertyGroup>
586 <GetTargetPathDependsOn>AssignTargetPaths</GetTargetPathDependsOn>
587 </PropertyGroup>
588
589
590 <!--
591 //////////////////////////////////////////////////////////////////////////////////////////////////
592 //////////////////////////////////////////////////////////////////////////////////////////////////
593 WixBuild Targets
594 //////////////////////////////////////////////////////////////////////////////////////////////////
595 //////////////////////////////////////////////////////////////////////////////////////////////////
596 -->
597
598 <!--
599 ==================================================================================================
600 WixBuild
601 ==================================================================================================
602 -->
603 <PropertyGroup>
604 <WixBuildDependsOn>
605 ResolveReferences;
606 BeforeCompile;
607 _TimeStampBeforeCompile;
608
609 CalculateDefineConstants;
610 Harvest;
611
612 GenerateCompileWithObjectPath;
613
614 AssignTargetPaths;
615 ReadPreviousBindInputsAndBuiltOutputs;
616
617 CoreWixBuild;
618
619 UpdateLinkFileWrites;
620 _TimeStampAfterCompile;
621 AfterCompile
622 </WixBuildDependsOn>
623 </PropertyGroup>
624 <Target
625 Name="WixBuild"
626 DependsOnTargets="$(WixBuildDependsOn)" />
627
628 <Target
629 Name="CoreWixBuild"
630 Inputs="@(Compile);
631 @(Content);
632 @(EmbeddedResource);
633 @(WixObject);
634 @(_ResolvedProjectReferencePaths);
635 @(_ResolvedWixLibraryPaths);
636 @(_ResolvedWixExtensionPaths);
637 @(_BindInputs);
638 $(MSBuildAllProjects)"
639 Outputs="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile);@(_BindBuiltOutputs)"
640 Condition=" '@(Compile)' != '' ">
641
642 <PropertyGroup>
643 <!--<OutputFile>$([System.IO.Path]::GetFullPath($(TargetDir)%(CultureGroup.OutputFolder)$(TargetFileName)))</OutputFile>-->
644 <OutputFile>$([System.IO.Path]::GetFullPath($(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetFileName)))</OutputFile>
645 <!--<OutputFile>$([System.IO.Path]::GetFullPath($(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetName)$(TargetExt)))</OutputFile>-->
646 <PdbOutputFile>$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(TargetPdbFileName)</PdbOutputFile>
647 </PropertyGroup>
648
649 <WixBuild
650 SourceFiles="@(_CompileWithObjectPath)"
651 LibraryFiles="@(WixLibProjects);@(_ResolvedWixLibraryPaths)"
652 LocalizationFiles="@(EmbeddedResource)"
653
654 Cultures="%(CultureGroup.Identity)"
655
656 ExtensionDirectory="$(WixExtDir)"
657 Extensions="@(_ResolvedWixExtensionPaths)"
658
659 IntermediateDirectory="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)"
660
661 OutputFile="$(OutputFile)"
662 OutputType="$(OutputType)"
663 PdbFile="$(PdbOutputFile)"
664 PdbType="$(WixPdbType)"
665
666 AdditionalOptions="$(CompilerAdditionalOptions) $(LinkerAdditionalOptions)"
667 DefineConstants="$(DefineConstants);$(SolutionDefineConstants);$(ProjectDefineConstants);$(ProjectReferenceDefineConstants)"
668 IncludeSearchPaths="$(IncludeSearchPaths)"
669 InstallerPlatform="$(InstallerPlatform)"
670 NoLogo="true"
671 Pedantic="$(Pedantic)"
672 ReferencePaths="$(ReferencePaths)"
673
674 SuppressSpecificWarnings="$(CompilerSuppressSpecificWarnings);$(LinkerSuppressSpecificWarnings)"
675 TreatSpecificWarningsAsErrors="$(CompilerTreatSpecificWarningsAsErrors)"
676
677 BindInputPaths="@(LinkerBindInputPaths)"
678 BindFiles="$(LinkerBindFiles)"
679 BindContentsFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)"
680 BindOutputsFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)"
681 BindBuiltOutputsFile="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)"
682
683 CabinetCachePath="$(CabinetCachePath)"
684 CabinetCreationThreadCount="$(CabinetCreationThreadCount)"
685 DefaultCompressionLevel="$(DefaultCompressionLevel)"
686
687 UnreferencedSymbolsFile="$(UnreferencedSymbolsFile)"
688 WixProjectFile="$(ProjectPath)"
689 WixVariables="$(WixVariables)"
690
691 SuppressValidation="$(SuppressValidation)"
692 SuppressIces="$(SuppressIces)"
693 AdditionalCub="$(AdditionalCub)"
694
695 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
696 ToolExe="$(WixToolExe)"
697 ToolPath="$(WixToolDir)" />
698
699 <!--
700 SuppressAllWarnings="$(CompilerSuppressAllWarnings);$(LinkerSuppressAllWarnings)"
701 TreatWarningsAsErrors="$(CompilerTreatWarningsAsErrors);$(LinkerTreatWarningsAsErrors)"
702 VerboseOutput="$(CompilerVerboseOutput);$(LinkerVerboseOutput)"
703 -->
704 </Target>
705
706
707 <!--
708 ==================================================================================================
709 CalculateDefineConstants
710
711 Adds project references to the constants passed into the compiler.
712
713 [IN]
714 @(_ResolvedProjectReferencePaths) - paths to projects' outputs
715 $(VSProjectConfigurations) - map of project names to configurations, provided by VS when building in the IDE
716
717 [OUT]
718 $(ProjectReferenceDefineConstants) - the list of referenced project variables to be passed into the compiler
719 ==================================================================================================
720 -->
721 <PropertyGroup>
722 <CalculateDefineConstantsDependsOn>ResolveReferences</CalculateDefineConstantsDependsOn>
723 </PropertyGroup>
724 <Target
725 Name="CalculateDefineConstants"
726 DependsOnTargets="$(CalculateDefineConstantsDependsOn)"
727 Condition=" '@(_ResolvedProjectReferencePaths)' != '' ">
728
729 <PropertyGroup>
730 <ProjectDefineConstants>
731 Configuration=$(ConfigurationName);
732 OutDir=$(OutDir);
733 Platform=$(PlatformName);
734 ProjectDir=$(ProjectDir);
735 ProjectExt=$(ProjectExt);
736 ProjectFileName=$(ProjectFileName);
737 ProjectName=$(ProjectName);
738 ProjectPath=$(ProjectPath);
739 TargetDir=$(TargetDir);
740 TargetExt=$(TargetExt);
741 TargetFileName=$(TargetFileName);
742 TargetName=$(TargetName);
743 TargetPath=$(TargetPath);
744 </ProjectDefineConstants>
745 </PropertyGroup>
746
747 <PropertyGroup>
748 <SolutionDefineConstants Condition=" '$(DevEnvDir)'!='*Undefined*' ">$(SolutionDefineConstants);DevEnvDir=$(DevEnvDir)</SolutionDefineConstants>
749 <SolutionDefineConstants Condition=" '$(SolutionDir)'!='*Undefined*' ">$(SolutionDefineConstants);SolutionDir=$(SolutionDir)</SolutionDefineConstants>
750 <SolutionDefineConstants Condition=" '$(SolutionExt)'!='*Undefined*' ">$(SolutionDefineConstants);SolutionExt=$(SolutionExt)</SolutionDefineConstants>
751 <SolutionDefineConstants Condition=" '$(SolutionFileName)'!='*Undefined*' ">$(SolutionDefineConstants);SolutionFileName=$(SolutionFileName)</SolutionDefineConstants>
752 <SolutionDefineConstants Condition=" '$(SolutionName)'!='*Undefined*' ">$(SolutionDefineConstants);SolutionName=$(SolutionName)</SolutionDefineConstants>
753 <SolutionDefineConstants Condition=" '$(SolutionPath)'!='*Undefined*' ">$(SolutionDefineConstants);SolutionPath=$(SolutionPath)</SolutionDefineConstants>
754 </PropertyGroup>
755
756 <CreateProjectReferenceDefineConstants
757 ProjectReferencePaths="@(_ResolvedProjectReferencePaths)"
758 ProjectConfigurations="$(VSProjectConfigurations)">
759
760 <Output TaskParameter="DefineConstants" PropertyName="ProjectReferenceDefineConstants" />
761 </CreateProjectReferenceDefineConstants>
762
763 <ItemGroup>
764 <LinkerBindInputPaths Include="%(_ResolvedProjectReferencePaths.RootDir)%(_ResolvedProjectReferencePaths.Directory)" />
765 </ItemGroup>
766 </Target>
767
768 <!--
769 ================================================================================================
770 GenerateCompileWithObjectPath
771
772 Generates metadata on the for compile output objects.
773
774 ================================================================================================
775 -->
776 <PropertyGroup>
777 <GenerateCompileWithObjectPathDependsOn></GenerateCompileWithObjectPathDependsOn>
778 </PropertyGroup>
779 <Target
780 Name="GenerateCompileWithObjectPath"
781 Condition=" '@(Compile)' != '' ">
782
783 <GenerateCompileWithObjectPath
784 Compile="@(Compile)"
785 IntermediateOutputPath="$(IntermediateOutputPath)">
786 <Output TaskParameter="CompileWithObjectPath" ItemName="_CompileWithObjectPath" />
787 </GenerateCompileWithObjectPath>
788 </Target>
789
790 <!--
791 ================================================================================================
792 AssignTargetPaths - OVERRIDE Target
793
794 Determines the final list of culture groups to build based on either the Cultures property or
795 those specified in .wxl files.
796
797 Culture groups specified in the Cultures property must be specified as a semi-colon
798 delimited list of groups, with comma-delimited cultures within a group.
799 For example:
800 <Cultures>en-US,en;en-GB,en</Cultures>
801 This will build 2 targets, outputing to en-US and en-GB sub-folders. Light will first look
802 for strings in the first culture (en-US or en-GB) then the second (en).
803
804 Cultures of .wxl files will be used when the Culture property is not set. The culture of a
805 .wxl file is determined by the Culture attribute in the WixLocalization element in the file
806
807 Sets the OutputFolder metadata on each culture group. In most cases this is the same as the
808 first culture in the culture group. When the Culture's property is unspecified and no .wxl
809 files are provided this is the same as the output directory. When the Culture's property
810 specifies a single culture group and no .wxl files are provided this is the same as the output
811 directory.
812
813 Updates the TargetPath and TargetPdbPath properties to be used in subsequent targets.
814
815 [IN]
816 @(EmbeddedResource) - The list of wxl files to use for localization.
817 $(Cultures) - The list of culture groups to build.
818
819 [OUT]
820 @(CultureGroup) - The list of culture group strings with OutputFolder metadata
821 $(TargetPath) - Property list of target link output MSIs/MSMs
822 $(TargetPdbPath) - Property list of target output pdbs
823
824 ================================================================================================
825 -->
826 <Target
827 Name="AssignTargetPaths"
828 Condition=" '$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module' ">
829
830 <WixAssignCulture Cultures="$(Cultures)" Files="@(EmbeddedResource)">
831 <Output TaskParameter="CultureGroups" ItemName="CultureGroup" />
832 </WixAssignCulture>
833
834 <!-- Expand the culture groups then put them back into the appropriate property -->
835 <ItemGroup>
836 <_CulturedTargetPath Include="$(TargetDir)%(CultureGroup.OutputFolder)$(TargetFileName)" />
837 <_CulturedTargetPdbPath Include="$(TargetPdbDir)%(CultureGroup.OutputFolder)$(TargetPdbFileName)" />
838 </ItemGroup>
839
840 <PropertyGroup>
841 <TargetPath>@(_CulturedTargetPath)</TargetPath>
842 <TargetPdbPath>@(_CulturedTargetPdbPath)</TargetPdbPath>
843 </PropertyGroup>
844 </Target>
845
846 <!--
847 ================================================================================================
848 ReadPreviousBindInputsAndBuiltOutputs
849
850 Reads a previous build's Bind contents and built outputs file into @(_BindInputs) and
851 @(_BindBuiltOutputs) respectively.
852
853 Note: Only the *built* outputs are used because using files copied to output folder
854 can cause perpetual incremental build.
855
856 Imagine the case where you have: Msi.wixproj -> Lib.wixproj -> Exe.csproj. The
857 Exe.csproj cannot be both an input to Lib.wixproj and an output of Msi.wixproj
858 (as an uncompressed file) because the Lib.wixproj will always newer than the
859 Exe.csproj.
860
861 [IN]
862
863 [OUT]
864 @(_BindInputs) - the content files required to bind (i.e. the Binary/@SourceFile and File/@Source files).
865 @(_BindBuiltOutputs) - the previously built .msi, .msm, .pcp, .exe .wixpdb, .cabs, etc.
866 Does not include content copied to output folder.
867 ================================================================================================
868 -->
869 <Target
870 Name="ReadPreviousBindInputsAndBuiltOutputs">
871
872 <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)">
873 <Output TaskParameter="Lines" ItemName="_BindInputs" />
874 </ReadLinesFromFile>
875
876 <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)">
877 <Output TaskParameter="Lines" ItemName="_BindBuiltOutputs" />
878 </ReadLinesFromFile>
879
880 <Message Importance="low" Text="Previous bind inputs: @(_BindInputs)" />
881 <Message Importance="low" Text="Previous bind outputs: @(_BindBuiltOutputs)" />
882 </Target>
883
884 <!--
885 ================================================================================================
886 UpdateLinkFileWrites
887
888 Reads the bind outputs file(s) output generated during WixBuild to correctly set the @(FileWrites)
889 item. Most targets have it easy because they can do a static mapping from inputs to the outputs.
890 However, the WixBuild target outputs are determined after a rather complex calculation we call
891 linking and binding!
892
893 This target runs independently after Link to ensure that @(FileWrites) is updated even if the
894 "WixBuild" task fails.
895
896 [IN]
897 Path to bind outputs file(s).
898
899 [OUT]
900 @(FileWrites) updated with outputs from bind.
901 ================================================================================================
902 -->
903 <Target
904 Name="UpdateLinkFileWrites">
905
906 <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)">
907 <Output TaskParameter="Lines" ItemName="FileWrites"/>
908 </ReadLinesFromFile>
909
910 <ItemGroup>
911 <FileWrites Include="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)" Condition=" Exists('$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindContentsFile)') " />
912 <FileWrites Include="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)" Condition=" Exists('$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindOutputsFile)') " />
913 <FileWrites Include="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)" Condition=" Exists('$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)') " />
914 </ItemGroup>
915
916 <Message Importance="low" Text="Build files after link: @(FileWrites)" />
917 </Target>
918
919 <!--
920 //////////////////////////////////////////////////////////////////////////////////////////////////
921 //////////////////////////////////////////////////////////////////////////////////////////////////
922 AllProjectOutputGroups Section
923 //////////////////////////////////////////////////////////////////////////////////////////////////
924 //////////////////////////////////////////////////////////////////////////////////////////////////
925 -->
926
927 <!--
928 ==================================================================================================
929 AllProjectOutputGroups - OVERRIDE Target
930
931 ==================================================================================================
932 -->
933 <Target
934 Name="AllProjectOutputGroups"
935 DependsOnTargets="
936 BuiltProjectOutputGroup;
937 DebugSymbolsProjectOutputGroup;
938 SourceFilesProjectOutputGroup;
939 ContentFilesProjectOutputGroup" />
940
941 <!--
942 This is the key output for the BuiltProjectOutputGroup and is meant to be read directly from the IDE.
943 Reading an item is faster than invoking a target.
944 -->
945 <ItemGroup>
946 <BuiltProjectOutputGroupKeyOutput Include="$(TargetPath)">
947 <IsKeyOutput>true</IsKeyOutput>
948 <FinalOutputPath>$(TargetPath)</FinalOutputPath>
949 <TargetPath>$(TargetFileName)</TargetPath>
950 </BuiltProjectOutputGroupKeyOutput>
951 </ItemGroup>
952
953 <!--
954 ==================================================================================================
955 BuiltProjectOutputGroup - OVERRIDE Target
956 ==================================================================================================
957 -->
958 <PropertyGroup>
959 <BuiltProjectOutputGroupDependsOn>PrepareForBuild;AssignTargetPaths</BuiltProjectOutputGroupDependsOn>
960 </PropertyGroup>
961 <Target
962 Name="BuiltProjectOutputGroup"
963 Outputs="@(BuiltProjectOutputGroupOutput)"
964 DependsOnTargets="$(BuiltProjectOutputGroupDependsOn)">
965
966 <!-- Don't add BuiltProjectOutputGroupKeyOutput - to avoid duplicates, we only want to get the updated list of TargetPaths from the TargetPath property below -->
967
968 <!-- Try to read the outputs from the bind outputs text file since that's the output list straight from linker. -->
969 <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)">
970 <Output TaskParameter="Lines" ItemName="_BuiltProjectOutputGroupOutputIntermediate"/>
971 </ReadLinesFromFile>
972
973 <!-- If we didn't get anything from the bind outputs text file, default to the target path. -->
974 <ItemGroup Condition=" '@(_BuiltProjectOutputGroupOutputIntermediate)'=='' ">
975 <_BuiltProjectOutputGroupOutputIntermediate Include="$(TargetPath)" />
976 </ItemGroup>
977
978 <!-- Convert intermediate items into final items; this way we can get the full path for each item -->
979 <ItemGroup>
980 <BuiltProjectOutputGroupOutput Include="@(_BuiltProjectOutputGroupOutputIntermediate->'%(FullPath)')">
981 <!-- For compatibility with 2.0 -->
982 <OriginalItemSpec Condition="'%(_BuiltProjectOutputGroupOutputIntermediate.OriginalItemSpec)' == ''">%(_BuiltProjectOutputGroupOutputIntermediate.FullPath)</OriginalItemSpec>
983 </BuiltProjectOutputGroupOutput>
984 </ItemGroup>
985 </Target>
986
987 <!--
988 ==================================================================================================
989 DebugSymbolsProjectOutputGroup
990
991 Populates the Debug Symbols project output group.
992 ==================================================================================================
993 -->
994 <PropertyGroup>
995 <DebugSymbolsProjectOutputGroupDependsOn>AssignTargetPaths</DebugSymbolsProjectOutputGroupDependsOn>
996 </PropertyGroup>
997 <Target
998 Name="DebugSymbolsProjectOutputGroup"
999 Outputs="@(DebugSymbolsProjectOutputGroupOutput)"
1000 DependsOnTargets="$(DebugSymbolsProjectOutputGroupDependsOn)">
1001
1002 <!-- Include build output pdb(s). Different than predefined itemgroup since AssignTargetPaths target may change -->
1003 <ItemGroup>
1004 <DebugSymbolsProjectOutputGroupOutput Include="$(TargetPdbPath)" Condition=" '$(SuppressPdbOutput)' != 'true' "/>
1005 </ItemGroup>
1006 </Target>
1007
1008
1009 <!--
1010 ==================================================================================================
1011 CopyFilesToOutputDirectory - OVERRIDE Target
1012
1013 Copy all build outputs, satellites and other necessary files to the final directory.
1014 ============================================================
1015 -->
1016 <Target
1017 Name="CopyFilesToOutputDirectory">
1018
1019 <PropertyGroup>
1020 <!-- By default we're using hard links to copy to the output directory, disabling this could slow the build significantly -->
1021 <CreateHardLinksForCopyFilesToOutputDirectoryIfPossible Condition=" '$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)' == '' ">true</CreateHardLinksForCopyFilesToOutputDirectoryIfPossible>
1022 </PropertyGroup>
1023
1024 <PropertyGroup>
1025 <CopyBuildOutputToOutputDirectory Condition="'$(CopyBuildOutputToOutputDirectory)'==''">true</CopyBuildOutputToOutputDirectory>
1026 <CopyOutputSymbolsToOutputDirectory Condition="'$(CopyOutputSymbolsToOutputDirectory)'==''">true</CopyOutputSymbolsToOutputDirectory>
1027 <FullIntermediateOutputPath>$([System.IO.Path]::GetFullPath($(IntermediateOutputPath)))</FullIntermediateOutputPath>
1028 </PropertyGroup>
1029
1030 <!-- Copy the bound files. -->
1031 <ReadLinesFromFile File="$(IntermediateOutputPath)%(CultureGroup.OutputFolder)$(BindBuiltOutputsFile)">
1032 <Output TaskParameter="Lines" ItemName="_FullPathToCopy"/>
1033 </ReadLinesFromFile>
1034
1035 <ItemGroup>
1036 <_FullPathToCopy Include="$(OutputFile)" Condition=" '@(_FullPathToCopy)'=='' " />
1037 <_RelativePath Include="$([MSBuild]::MakeRelative($(FullIntermediateOutputPath), %(_FullPathToCopy.Identity)))" />
1038 </ItemGroup>
1039
1040 <Copy
1041 SourceFiles="@(_RelativePath->'$(IntermediateOutputPath)%(Identity)')"
1042 DestinationFiles="@(_RelativePath->'$(OutDir)%(Identity)')"
1043 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
1044 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
1045 Retries="$(CopyRetryCount)"
1046 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
1047 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
1048 Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)' != 'true'"
1049 >
1050
1051 <Output TaskParameter="DestinationFiles" ItemName="MainAssembly"/>
1052 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
1053
1054 </Copy>
1055
1056 <Message Importance="High" Text="$(MSBuildProjectName) -&gt; $(TargetPath)" Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)'!='true'" />
1057 <!--<Message Importance="High" Text="$(MSBuildProjectName) -&gt; @(MainAssembly->'%(FullPath)')" Condition="'$(CopyBuildOutputToOutputDirectory)' == 'true' and '$(SkipCopyBuildProduct)'!='true'" />-->
1058
1059 <!-- Copy the debug information file (.pdb), if any
1060 <Copy
1061 SourceFiles="@(_DebugSymbolsIntermediatePath)"
1062 DestinationFiles="@(_DebugSymbolsOutputPath)"
1063 SkipUnchangedFiles="$(SkipCopyUnchangedFiles)"
1064 OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
1065 Retries="$(CopyRetryCount)"
1066 RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
1067 UseHardlinksIfPossible="$(CreateHardLinksForCopyFilesToOutputDirectoryIfPossible)"
1068 Condition="'$(_DebugSymbolsProduced)'=='true' and '$(SkipCopyingSymbolsToOutputDirectory)' != 'true' and '$(CopyOutputSymbolsToOutputDirectory)'=='true'">
1069
1070 <Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
1071
1072 </Copy>
1073 -->
1074 </Target>
1075
1076
1077 <Import Project="$(WixHarvestTargetsPath)" Condition=" '$(WixHarvestTargetsPath)' != '' and Exists('$(WixHarvestTargetsPath)')" />
1078 <Import Project="$(WixSigningTargetsPath)" Condition=" '$(WixSigningTargetsPath)' != '' and Exists('$(WixSigningTargetsPath)')" />
1079
1080 <!-- Extension point: Define CustomAfterWixTargets to a .targets file that you want to include after this file. -->
1081 <Import Project="$(CustomAfterWixTargets)" Condition=" '$(CustomAfterWixTargets)' != '' and Exists('$(CustomAfterWixTargets)')" />
1082
1083</Project>
diff --git a/src/wix/appveyor-Tools.cmd b/src/wix/appveyor-Tools.cmd
new file mode 100644
index 00000000..504b2e9d
--- /dev/null
+++ b/src/wix/appveyor-Tools.cmd
@@ -0,0 +1,52 @@
1@setlocal
2@pushd %~dp0
3@set _C=Release
4@if /i "%1"=="debug" set _C=Debug
5@set _P=%~dp0build\%_C%\publish
6@set _RCO=/S /R:1 /W:1 /NP /XO /NS /NC /NFL /NDL /NJH /NJS
7
8:: Restore
9nuget restore || exit /b
10
11:: Build
12msbuild -p:Configuration=%_C% || exit /b
13
14:: Test
15dotnet test -c %_C% --no-build src\test\WixToolsetTest.BuildTasks || exit /b
16
17dotnet publish -c %_C% -o %_P%\dotnet-wix\ -f netcoreapp3.1 src\wix || exit /b
18
19dotnet publish -c %_C% -o %_P%\WixToolset.Sdk\separate\net461\x86\buildtasks\ -f net461 -r win-x86 src\WixToolset.BuildTasks || exit /b
20dotnet publish -c %_C% -o %_P%\WixToolset.Sdk\separate\net461\x86\heat\ -f net461 -r win-x86 src\heat || exit /b
21dotnet publish -c %_C% -o %_P%\WixToolset.Sdk\separate\net461\x86\wix\ -f net461 -r win-x86 src\wix || exit /b
22robocopy %_P%\WixToolset.Sdk\separate\net461\x86\buildtasks %_P%\WixToolset.Sdk\tools\net461\x86 %_RCO% /XF Microsoft.Build.*.dll
23robocopy %_P%\WixToolset.Sdk\separate\net461\x86\heat %_P%\WixToolset.Sdk\tools\net461\x86 %_RCO%
24robocopy %_P%\WixToolset.Sdk\separate\net461\x86\wix %_P%\WixToolset.Sdk\tools\net461\x86 %_RCO%
25
26dotnet publish -c %_C% -o %_P%\WixToolset.Sdk\separate\net461\x64\buildtasks\ -f net461 -r win-x64 src\WixToolset.BuildTasks || exit /b
27dotnet publish -c %_C% -o %_P%\WixToolset.Sdk\separate\net461\x64\heat\ -f net461 -r win-x64 src\heat || exit /b
28dotnet publish -c %_C% -o %_P%\WixToolset.Sdk\separate\net461\x64\wix\ -f net461 -r win-x64 src\wix || exit /b
29robocopy %_P%\WixToolset.Sdk\separate\net461\x64\buildtasks %_P%\WixToolset.Sdk\tools\net461\x64 %_RCO% /XF Microsoft.Build.*.dll
30robocopy %_P%\WixToolset.Sdk\separate\net461\x64\heat %_P%\WixToolset.Sdk\tools\net461\x64 %_RCO%
31robocopy %_P%\WixToolset.Sdk\separate\net461\x64\wix %_P%\WixToolset.Sdk\tools\net461\x64 %_RCO%
32
33dotnet publish -c %_C% -p:UseAppHost=false -o %_P%\WixToolset.Sdk\separate\netcoreapp3.1\buildtasks\ -f netcoreapp3.1 src\WixToolset.BuildTasks || exit /b
34dotnet publish -c %_C% -p:UseAppHost=false -o %_P%\WixToolset.Sdk\separate\netcoreapp3.1\heat\ -f netcoreapp3.1 src\heat || exit /b
35dotnet publish -c %_C% -p:UseAppHost=false -o %_P%\WixToolset.Sdk\separate\netcoreapp3.1\wix\ -f netcoreapp3.1 src\wix || exit /b
36robocopy %_P%\WixToolset.Sdk\separate\netcoreapp3.1\buildtasks %_P%\WixToolset.Sdk\tools\netcoreapp3.1 %_RCO% /XF Microsoft.Build.*.dll
37robocopy %_P%\WixToolset.Sdk\separate\netcoreapp3.1\heat %_P%\WixToolset.Sdk\tools\netcoreapp3.1 %_RCO%
38robocopy %_P%\WixToolset.Sdk\separate\netcoreapp3.1\wix %_P%\WixToolset.Sdk\tools\netcoreapp3.1 %_RCO%
39
40dotnet publish -c %_C% -o %_P%\WixToolset.Sdk\ src\WixToolset.Sdk || exit /b
41dotnet publish -c %_C% -o %_P%\WixToolset.Sdk\broken\net461\ -f net461 -r linux-x64 src\wix || exit /b
42
43dotnet test -c %_C% src\test\WixToolsetTest.Sdk || exit /b
44
45:: Pack
46dotnet pack -c %_C% src\dotnet-wix || exit /b
47dotnet pack -c %_C% src\WixToolset.Sdk || exit /b
48
49msbuild -p:Configuration=%_C% .\src\ThmViewerPackage\ThmViewerPackage.wixproj || exit /b
50
51@popd
52@endlocal
diff --git a/src/wix/appveyor-Tools.yml b/src/wix/appveyor-Tools.yml
new file mode 100644
index 00000000..8fea070e
--- /dev/null
+++ b/src/wix/appveyor-Tools.yml
@@ -0,0 +1,46 @@
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# Do NOT modify this file. Update the canonical version in Home\repo-template\src\appveyor.yml
4# then update all of the repos.
5
6branches:
7 only:
8 - master
9 - develop
10
11image: Visual Studio 2019
12
13version: 0.0.0.{build}
14configuration: Release
15
16environment:
17 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
18 DOTNET_CLI_TELEMETRY_OPTOUT: 1
19 NUGET_XMLDOC_MODE: skip
20
21build_script:
22 - appveyor.cmd
23
24test: off
25
26pull_requests:
27 do_not_increment_build_number: true
28
29nuget:
30 disable_publish_on_pr: true
31
32skip_branch_with_pr: true
33skip_tags: true
34
35artifacts:
36- path: build\Release\**\*.msi
37 name: msi
38- path: build\Release\**\*.nupkg
39 name: nuget
40- path: build\Release\**\*.snupkg
41 name: snupkg
42
43notifications:
44- provider: Slack
45 incoming_webhook:
46 secure: p5xuu+4x2JHfwGDMDe5KcG1k7gZxqYc4jWVwvyNZv5cvkubPD2waJs5yXMAXZNN7Z63/3PWHb7q4KoY/99AjauYa1nZ4c5qYqRPFRBKTHfA=
diff --git a/src/wix/dotnet-wix/DotnetToolSettings.xml b/src/wix/dotnet-wix/DotnetToolSettings.xml
new file mode 100644
index 00000000..a7a87fb2
--- /dev/null
+++ b/src/wix/dotnet-wix/DotnetToolSettings.xml
@@ -0,0 +1,6 @@
1<?xml version="1.0" encoding="utf-8"?>
2<DotNetCliTool Version="1">
3 <Commands>
4 <Command Name="wix" EntryPoint="wix.dll" Runner="dotnet" />
5 </Commands>
6</DotNetCliTool> \ No newline at end of file
diff --git a/src/wix/dotnet-wix/dotnet-wix.csproj b/src/wix/dotnet-wix/dotnet-wix.csproj
new file mode 100644
index 00000000..710ab5cd
--- /dev/null
+++ b/src/wix/dotnet-wix/dotnet-wix.csproj
@@ -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<Project Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
6 <TargetFramework>netcoreapp3.1</TargetFramework>
7 <IncludeBuildOutput>false</IncludeBuildOutput>
8 <Description>WiX Toolset Command-line interface</Description>
9 <NuspecFile>$(MSBuildThisFileName).nuspec</NuspecFile>
10 <NuspecBasePath>$(OutputPath)publish\dotnet-wix\</NuspecBasePath>
11 <NuspecProperties>Id=$(MSBuildThisFileName);Authors=$(Authors);Copyright=$(Copyright);Description=$(Description)</NuspecProperties>
12 </PropertyGroup>
13
14 <ItemGroup>
15 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
16 </ItemGroup>
17
18 <PropertyGroup>
19 <GenerateNuspecDependsOn>$(GenerateNuspecDependsOn);SetNuspecVersion</GenerateNuspecDependsOn>
20 </PropertyGroup>
21 <Target Name="SetNuspecVersion">
22 <Error Text="Cannot pack $(MSBuildThisFileName) until all projects are published to: '$(NuspecBasePath)'. Run appveyor.cmd to publish projects properly." Condition=" !Exists('$(NuspecBasePath)') " />
23
24 <PropertyGroup>
25 <NuspecProperties>$(NuspecProperties);Version=$(Version);ProjectFolder=$(MSBuildThisFileDirectory)</NuspecProperties>
26 </PropertyGroup>
27 </Target>
28</Project>
diff --git a/src/wix/dotnet-wix/dotnet-wix.nuspec b/src/wix/dotnet-wix/dotnet-wix.nuspec
new file mode 100644
index 00000000..66d42c75
--- /dev/null
+++ b/src/wix/dotnet-wix/dotnet-wix.nuspec
@@ -0,0 +1,20 @@
1<?xml version="1.0" encoding="utf-8"?>
2<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3 <metadata>
4 <id>$id$</id>
5 <version>$version$</version>
6 <authors>$authors$</authors>
7 <owners>$authors$</owners>
8 <requireLicenseAcceptance>false</requireLicenseAcceptance>
9 <description>$description$</description>
10 <copyright>$copyright$</copyright>
11 <packageTypes>
12 <packageType name="DotnetTool" />
13 </packageTypes>
14 </metadata>
15
16 <files>
17 <file src="$projectFolder$DotnetToolSettings.xml" target="tools\netcoreapp3.1\any" />
18 <file src="**" target="tools\netcoreapp3.1\any" />
19 </files>
20</package>
diff --git a/src/wix/dotnet-wix/dotnet-wix.v3.ncrunchproject b/src/wix/dotnet-wix/dotnet-wix.v3.ncrunchproject
new file mode 100644
index 00000000..cf22dfa9
--- /dev/null
+++ b/src/wix/dotnet-wix/dotnet-wix.v3.ncrunchproject
@@ -0,0 +1,5 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file
diff --git a/src/wix/heat/AssemblyHarvester.cs b/src/wix/heat/AssemblyHarvester.cs
new file mode 100644
index 00000000..be61f275
--- /dev/null
+++ b/src/wix/heat/AssemblyHarvester.cs
@@ -0,0 +1,41 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Reflection;
7 using System.Runtime.InteropServices;
8 using Wix = WixToolset.Harvesters.Serialize;
9
10 /// <summary>
11 /// Harvest WiX authoring from an assembly file.
12 /// </summary>
13 internal class AssemblyHarvester
14 {
15 /// <summary>
16 /// Harvest the registry values written by RegisterAssembly.
17 /// </summary>
18 /// <param name="path">The file to harvest registry values from.</param>
19 /// <returns>The harvested registry values.</returns>
20 public Wix.RegistryValue[] HarvestRegistryValues(string path)
21 {
22#if NETCOREAPP
23 throw new PlatformNotSupportedException();
24#else
25 RegistrationServices regSvcs = new RegistrationServices();
26 Assembly assembly = Assembly.LoadFrom(path);
27
28 // must call this before overriding registry hives to prevent binding failures
29 // on exported types during RegisterAssembly
30 assembly.GetExportedTypes();
31
32 using (RegistryHarvester registryHarvester = new RegistryHarvester(true))
33 {
34 regSvcs.RegisterAssembly(assembly, AssemblyRegistrationFlags.SetCodeBase);
35
36 return registryHarvester.HarvestRegistry();
37 }
38#endif
39 }
40 }
41}
diff --git a/src/wix/heat/Data/HarvesterErrors.cs b/src/wix/heat/Data/HarvesterErrors.cs
new file mode 100644
index 00000000..a8a3055a
--- /dev/null
+++ b/src/wix/heat/Data/HarvesterErrors.cs
@@ -0,0 +1,205 @@
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
3namespace WixToolset.Harvesters.Data
4{
5 using System;
6 using System.Resources;
7 using WixToolset.Data;
8
9#pragma warning disable 1591 // TODO: add documentation
10 public static class HarvesterErrors
11 {
12 public static Message ArgumentRequiresValue(string argument)
13 {
14 return Message(null, Ids.ArgumentRequiresValue, "The argument '{0}' does not have a value specified and it is required.", argument);
15 }
16
17 public static Message BuildErrorDuringHarvesting(string buildError)
18 {
19 return Message(null, Ids.BuildErrorDuringHarvesting, "Build error during harvesting: {0}", buildError);
20 }
21
22 public static Message BuildFailed()
23 {
24 return Message(null, Ids.BuildFailed, "Build failed.");
25 }
26
27 public static Message CannotBuildProject(string projectFile, string innerExceptionMessage)
28 {
29 return Message(null, Ids.CannotBuildProject, "Failed to build project {0}: {1}", projectFile, innerExceptionMessage);
30 }
31
32 public static Message CannotHarvestWebSite()
33 {
34 return Message(null, Ids.CannotHarvestWebSite, "Cannot harvest website. On Windows Vista, you must install IIS 6 Management Compatibility.");
35 }
36
37 public static Message CannotLoadMSBuildAssembly(string innerExceptionMessage)
38 {
39 return Message(null, Ids.CannotLoadMSBuildAssembly, "Failed to load MSBuild assembly: {0}", innerExceptionMessage);
40 }
41
42 public static Message CannotLoadMSBuildEngine(string innerExceptionMessage)
43 {
44 return Message(null, Ids.CannotLoadMSBuildEngine, "Failed to load MSBuild engine: {0}", innerExceptionMessage);
45 }
46
47 public static Message CannotLoadMSBuildWrapperAssembly(string innerExceptionMessage)
48 {
49 return Message(null, Ids.CannotLoadMSBuildWrapperAssembly, "Failed to load MSBuild wrapper assembly: {0}", innerExceptionMessage);
50 }
51
52 public static Message CannotLoadMSBuildWrapperObject(string innerExceptionMessage)
53 {
54 return Message(null, Ids.CannotLoadMSBuildWrapperObject, "Failed to load MSBuild wrapper object: {0}", innerExceptionMessage);
55 }
56
57 public static Message CannotLoadMSBuildWrapperType(string innerExceptionMessage)
58 {
59 return Message(null, Ids.CannotLoadMSBuildWrapperType, "Failed to load MSBuild wrapper type: {0}", innerExceptionMessage);
60 }
61
62 public static Message CannotLoadProject(string projectFile, string innerExceptionMessage)
63 {
64 return Message(null, Ids.CannotLoadProject, "Failed to load project {0}: {1}", projectFile, innerExceptionMessage);
65 }
66
67 public static Message DirectoryAttributeAccessorBadType(string attributeName)
68 {
69 return Message(null, Ids.DirectoryAttributeAccessorBadType, "DirectoryAttributeAccessor tried to access an invalid element type for attribute '{0'}.", attributeName);
70 }
71
72 public static Message DirectoryNotFound(string directory)
73 {
74 return Message(null, Ids.DirectoryNotFound, "The directory '{0}' could not be found.", directory);
75 }
76
77 public static Message EmptyDirectory(string directory)
78 {
79 return Message(null, Ids.EmptyDirectory, "The directory '{0}' did not contain any files or sub-directories and since empty directories are not being kept, there was nothing to harvest.", directory);
80 }
81
82 public static Message ErrorTransformingHarvestedWiX(string transform, string message)
83 {
84 return Message(null, Ids.ErrorTransformingHarvestedWiX, "Error applying transform {0} to harvested WiX: {1}", transform, message);
85 }
86
87 public static Message FileNotFound(string file)
88 {
89 return Message(null, Ids.FileNotFound, "The file '{0}' cannot be found.", file);
90 }
91
92 public static Message InsufficientPermissionHarvestWebSite()
93 {
94 return Message(null, Ids.InsufficientPermissionHarvestWebSite, "Not enough permissions to harvest website. On Windows Vista, you must run Heat elevated.");
95 }
96
97 public static Message InvalidDirectoryId(string generateType)
98 {
99 return Message(null, Ids.InvalidDirectoryId, "Invalid directory ID: {0}. Check that it doesn't start with a hyphen or slash.", generateType);
100 }
101
102 public static Message InvalidDirectoryOutputType(string generateType)
103 {
104 return Message(null, Ids.InvalidOutputType, "Invalid generated type: {0}. Must be one of: components, payloadgroup.", generateType);
105 }
106
107 public static Message InvalidOutputGroup(string outputGroup)
108 {
109 return Message(null, Ids.InvalidOutputGroup, "Invalid project output group: {0}.", outputGroup);
110 }
111
112 public static Message InvalidProjectOutputType(string generateType)
113 {
114 return Message(null, Ids.InvalidOutputType, "Invalid generated type: {0}. Must be one of: components, container, payloadgroup, packagegroup.", generateType);
115 }
116
117 public static Message InvalidProjectName(string generateType)
118 {
119 return Message(null, Ids.InvalidProjectName, "Invalid project name: {0}. Check that it doesn't start with a hyphen or slash.", generateType);
120 }
121
122 public static Message MissingProjectOutputGroup(string projectFile, string outputGroup)
123 {
124 return Message(null, Ids.MissingProjectOutputGroup, "Missing project output group '{1}' in project {0}.", projectFile, outputGroup);
125 }
126
127 public static Message MsbuildBinPathRequired(string version)
128 {
129 return Message(null, Ids.MsbuildBinPathRequired, "MSBuildBinPath required for ToolsVersion '{0}'", version);
130 }
131
132 public static Message NoOutputGroupSpecified()
133 {
134 return Message(null, Ids.NoOutputGroupSpecified, "No project output group specified.");
135 }
136
137 public static Message PerformanceCategoryNotFound(string key)
138 {
139 return Message(null, Ids.PerformanceCategoryNotFound, "Performance category '{0}' not found.", key);
140 }
141
142 public static Message SpacesNotAllowedInArgumentValue(string arg, string value)
143 {
144 return Message(null, Ids.SpacesNotAllowedInArgumentValue, "The switch '{0}' does not allow the spaces from the value. Please remove the spaces in from the value: {1}", arg, value);
145 }
146
147 public static Message UnableToOpenRegistryKey(string key)
148 {
149 return Message(null, Ids.UnableToOpenRegistryKey, "Unable to open registry key '{0}'.", key);
150 }
151
152 public static Message UnsupportedPerformanceCounterType(string key)
153 {
154 return Message(null, Ids.UnsupportedPerformanceCounterType, "Unsupported performance counter type '{0}'.", key);
155 }
156
157 public static Message WebSiteNotFound(string webSiteDescription)
158 {
159 return Message(null, Ids.WebSiteNotFound, "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).", webSiteDescription);
160 }
161
162 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
163 {
164 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args);
165 }
166
167 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
168 {
169 return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args);
170 }
171
172 public enum Ids
173 {
174 DirectoryNotFound = 5052,
175 EmptyDirectory = 5053,
176 ErrorTransformingHarvestedWiX = 5055,
177 UnableToOpenRegistryKey = 5056,
178 SpacesNotAllowedInArgumentValue = 5057,
179 ArgumentRequiresValue = 5058,
180 FileNotFound = 5059,
181 PerformanceCategoryNotFound = 5060,
182 UnsupportedPerformanceCounterType = 5061,
183 WebSiteNotFound = 5158,
184 InsufficientPermissionHarvestWebSite = 5159,
185 CannotHarvestWebSite = 5160,
186 InvalidOutputGroup = 5301,
187 NoOutputGroupSpecified = 5302,
188 CannotLoadMSBuildAssembly = 5303,
189 CannotLoadMSBuildEngine = 5304,
190 CannotLoadProject = 5305,
191 CannotBuildProject = 5306,
192 BuildFailed = 5307,
193 MissingProjectOutputGroup = 5308,
194 DirectoryAttributeAccessorBadType = 5309,
195 InvalidOutputType = 5310,
196 InvalidDirectoryId = 5311,
197 InvalidProjectName = 5312,
198 BuildErrorDuringHarvesting = 5313,
199 CannotLoadMSBuildWrapperAssembly = 5314,
200 CannotLoadMSBuildWrapperType = 5315,
201 CannotLoadMSBuildWrapperObject = 5316,
202 MsbuildBinPathRequired = 5317,
203 }
204 }
205}
diff --git a/src/wix/heat/Data/HarvesterVerboses.cs b/src/wix/heat/Data/HarvesterVerboses.cs
new file mode 100644
index 00000000..72de2351
--- /dev/null
+++ b/src/wix/heat/Data/HarvesterVerboses.cs
@@ -0,0 +1,62 @@
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
3namespace WixToolset.Harvesters.Data
4{
5 using System;
6 using System.Resources;
7 using WixToolset.Data;
8
9#pragma warning disable 1591 // TODO: add documentation
10 public static class HarvesterVerboses
11 {
12 public static Message FoundToolsVersion(string toolsVersion)
13 {
14 return Message(null, Ids.FoundToolsVersion, "Found ToolsVersion {0} inside project file.", toolsVersion);
15 }
16
17 public static Message HarvestingAssembly(string fileName)
18 {
19 return Message(null, Ids.HarvestingAssembly, "Trying to harvest {0} as an assembly.", fileName);
20 }
21
22 public static Message HarvestingSelfReg(string fileName)
23 {
24 return Message(null, Ids.HarvestingSelfReg, "Trying to harvest self-registration information from native DLL {0}.", fileName);
25 }
26
27 public static Message HarvestingTypeLib(string fileName)
28 {
29 return Message(null, Ids.HarvestingTypeLib, "Trying to harvest type-library information from native DLL {0}.", fileName);
30 }
31
32 public static Message LoadingProjectWithBinPath(string msbuildBinPath)
33 {
34 return Message(null, Ids.LoadingProjectWithBinPath, "Loading project using MSBuild bin path {0}.", msbuildBinPath);
35 }
36
37 public static Message LoadingProjectWithVersion(string msbuildVersion)
38 {
39 return Message(null, Ids.LoadingProjectWithVersion, "Loading project using MSBuild version {0}.", msbuildVersion);
40 }
41
42 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
43 {
44 return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, format, args);
45 }
46
47 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
48 {
49 return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, resourceManager, resourceName, args);
50 }
51
52 public enum Ids
53 {
54 HarvestingAssembly = 5100,
55 HarvestingSelfReg = 5101,
56 HarvestingTypeLib = 5102,
57 LoadingProjectWithVersion = 5378,
58 FoundToolsVersion = 5379,
59 LoadingProjectWithBinPath = 5380,
60 }
61 }
62}
diff --git a/src/wix/heat/Data/HarvesterWarnings.cs b/src/wix/heat/Data/HarvesterWarnings.cs
new file mode 100644
index 00000000..80ee5c31
--- /dev/null
+++ b/src/wix/heat/Data/HarvesterWarnings.cs
@@ -0,0 +1,79 @@
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
3namespace WixToolset.Harvesters.Data
4{
5 using System;
6 using System.Resources;
7 using WixToolset.Data;
8
9#pragma warning disable 1591 // TODO: add documentation
10 public static class HarvesterWarnings
11 {
12 public static Message AssemblyHarvestFailed(string file, string message)
13 {
14 return Message(null, Ids.AssemblyHarvestFailed, "Could not harvest data from a file that was expected to be an assembly: {0}. If this file is not an assembly you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the failure: {1}", file, message);
15 }
16
17 public static Message DuplicateDllRegistryEntry(string registryKey, string componentId)
18 {
19 return Message(null, Ids.DuplicateDllRegistryEntry, "Ignoring the registry key '{0}', it has already been added to the component '{1}'.", registryKey, componentId);
20 }
21
22 public static Message DuplicateDllRegistryEntry(string registryKey, string registryKeyValue, string componentId)
23 {
24 return Message(null, Ids.DuplicateDllRegistryEntry, "Ignoring the registry key '{0}', it has already been added to the component '{2}'. The registry key value '{1}' will not be harvested.", registryKey, registryKeyValue, componentId);
25 }
26
27 public static Message EncounteredNullDirectoryForWebSite(string directory)
28 {
29 return Message(null, Ids.EncounteredNullDirectoryForWebSite, "Could not harvest website directory: {0}. Please update the output with the appropriate directory ID before using.", directory);
30 }
31
32 public static Message NoLogger(string exceptionMessage)
33 {
34 return Message(null, Ids.NoLogger, "Failed to set loggers: {0}", exceptionMessage);
35 }
36
37 public static Message NoProjectConfiguration(string exceptionMessage)
38 {
39 return Message(null, Ids.NoProjectConfiguration, "Failed to set project configuration and platform: {0}", exceptionMessage);
40 }
41
42 public static Message SelfRegHarvestFailed(string file, string message)
43 {
44 return Message(null, Ids.SelfRegHarvestFailed, "Could not harvest data from a file that was expected to be a SelfReg DLL: {0}. If this file does not support SelfReg you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the failure: {1}", file, message);
45 }
46
47 public static Message TypeLibLoadFailed(string file, string message)
48 {
49 return Message(null, Ids.TypeLibLoadFailed, "Could not load file that was expected to be a type library based off of file extension: {0}. If this file is not a type library you can ignore this warning. Otherwise, this error detail may be helpful to diagnose the load failure: {1}", file, message);
50 }
51
52 public static Message UnsupportedRegistryType(string registryValue, int regFileLineNumber, string unsupportedType)
53 {
54 return Message(null, Ids.UnsupportedRegistryType, "Ignoring the registry value '{0}' found on line {1}, because it is of a type unsupported by Windows Installer ({2}).", registryValue, regFileLineNumber, unsupportedType);
55 }
56
57 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args)
58 {
59 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args);
60 }
61
62 private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args)
63 {
64 return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args);
65 }
66
67 public enum Ids
68 {
69 SelfRegHarvestFailed = 5150,
70 AssemblyHarvestFailed = 5151,
71 TypeLibLoadFailed = 5152,
72 DuplicateDllRegistryEntry = 5156,
73 UnsupportedRegistryType = 5157,
74 NoProjectConfiguration = 5398,
75 NoLogger = 5399,
76 EncounteredNullDirectoryForWebSite = 5400,
77 }
78 }
79}
diff --git a/src/wix/heat/Data/HeatCommandLineOption.cs b/src/wix/heat/Data/HeatCommandLineOption.cs
new file mode 100644
index 00000000..5815abf0
--- /dev/null
+++ b/src/wix/heat/Data/HeatCommandLineOption.cs
@@ -0,0 +1,31 @@
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
3namespace WixToolset.Harvesters.Data
4{
5 /// <summary>
6 /// A command line option.
7 /// </summary>
8 public struct HeatCommandLineOption
9 {
10 /// <summary>
11 /// The option name used on the command line.
12 /// </summary>
13 public string Option;
14
15 /// <summary>
16 /// Description shown in Help command.
17 /// </summary>
18 public string Description;
19
20 /// <summary>
21 /// Instantiates a new CommandLineOption.
22 /// </summary>
23 /// <param name="option">The option name.</param>
24 /// <param name="description">The description of the option.</param>
25 public HeatCommandLineOption(string option, string description)
26 {
27 this.Option = option;
28 this.Description = description;
29 }
30 }
31}
diff --git a/src/wix/heat/Data/IHeatCommandLine.cs b/src/wix/heat/Data/IHeatCommandLine.cs
new file mode 100644
index 00000000..9198468d
--- /dev/null
+++ b/src/wix/heat/Data/IHeatCommandLine.cs
@@ -0,0 +1,12 @@
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
3namespace WixToolset.Harvesters.Data
4{
5 using WixToolset.Extensibility.Data;
6
7#pragma warning disable 1591 // TODO: add documentation
8 public interface IHeatCommandLine
9 {
10 ICommandLineCommand ParseStandardCommandLine(ICommandLineArguments arguments);
11 }
12}
diff --git a/src/wix/heat/DirectoryHarvester.cs b/src/wix/heat/DirectoryHarvester.cs
new file mode 100644
index 00000000..090d67ab
--- /dev/null
+++ b/src/wix/heat/DirectoryHarvester.cs
@@ -0,0 +1,308 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.IO;
7 using WixToolset.Data;
8 using WixToolset.Harvesters.Data;
9 using WixToolset.Harvesters.Extensibility;
10 using Wix = WixToolset.Harvesters.Serialize;
11
12 /// <summary>
13 /// Harvest WiX authoring for a directory from the file system.
14 /// </summary>
15 internal class DirectoryHarvester : BaseHarvesterExtension
16 {
17 private FileHarvester fileHarvester;
18
19 private const string ComponentPrefix = "cmp";
20 private const string DirectoryPrefix = "dir";
21 private const string FilePrefix = "fil";
22
23 /// <summary>
24 /// Instantiate a new DirectoryHarvester.
25 /// </summary>
26 public DirectoryHarvester()
27 {
28 this.fileHarvester = new FileHarvester();
29 this.SetUniqueIdentifiers = true;
30 }
31
32 /// <summary>
33 /// Gets or sets what type of elements are to be generated.
34 /// </summary>
35 /// <value>The type of elements being generated.</value>
36 public GenerateType GenerateType { get; set; }
37
38 /// <summary>
39 /// Gets or sets the option to keep empty directories.
40 /// </summary>
41 /// <value>The option to keep empty directories.</value>
42 public bool KeepEmptyDirectories { get; set; }
43
44 /// <summary>
45 /// Gets or sets the rooted DirectoryRef Id if the user has supplied it.
46 /// </summary>
47 /// <value>The DirectoryRef Id to use as the root.</value>
48 public string RootedDirectoryRef { get; set; }
49
50 /// <summary>
51 /// Gets of sets the option to set unique identifiers.
52 /// </summary>
53 /// <value>The option to set unique identifiers.</value>
54 public bool SetUniqueIdentifiers { get; set; }
55
56 /// <summary>
57 /// Gets or sets the option to suppress including the root directory as an element.
58 /// </summary>
59 /// <value>The option to suppress including the root directory as an element.</value>
60 public bool SuppressRootDirectory { get; set; }
61
62 /// <summary>
63 /// Harvest a directory.
64 /// </summary>
65 /// <param name="argument">The path of the directory.</param>
66 /// <returns>The harvested directory.</returns>
67 public override Wix.Fragment[] Harvest(string argument)
68 {
69 if (null == argument)
70 {
71 throw new ArgumentNullException("argument");
72 }
73
74 Wix.IParentElement harvestParent = this.HarvestDirectory(argument, true, this.GenerateType);
75 Wix.ISchemaElement harvestElement;
76
77 if (this.GenerateType == GenerateType.PayloadGroup)
78 {
79 Wix.PayloadGroup payloadGroup = (Wix.PayloadGroup)harvestParent;
80 payloadGroup.Id = this.RootedDirectoryRef;
81 harvestElement = payloadGroup;
82 }
83 else
84 {
85 Wix.Directory directory = (Wix.Directory)harvestParent;
86
87 Wix.DirectoryRef directoryRef = new Wix.DirectoryRef();
88 directoryRef.Id = this.RootedDirectoryRef;
89
90 if (this.SuppressRootDirectory)
91 {
92 foreach (Wix.ISchemaElement element in directory.Children)
93 {
94 directoryRef.AddChild(element);
95 }
96 }
97 else
98 {
99 directoryRef.AddChild(directory);
100 }
101 harvestElement = directoryRef;
102 }
103
104 Wix.Fragment fragment = new Wix.Fragment();
105 fragment.AddChild(harvestElement);
106
107 return new Wix.Fragment[] { fragment };
108 }
109
110 /// <summary>
111 /// Harvest a directory.
112 /// </summary>
113 /// <param name="path">The path of the directory.</param>
114 /// <param name="harvestChildren">The option to harvest child directories and files.</param>
115 /// <returns>The harvested directory.</returns>
116 public Wix.Directory HarvestDirectory(string path, bool harvestChildren)
117 {
118 if (null == path)
119 {
120 throw new ArgumentNullException("path");
121 }
122
123 return (Wix.Directory)this.HarvestDirectory(path, harvestChildren, GenerateType.Components);
124 }
125
126 /// <summary>
127 /// Harvest a directory.
128 /// </summary>
129 /// <param name="path">The path of the directory.</param>
130 /// <param name="harvestChildren">The option to harvest child directories and files.</param>
131 /// <param name="generateType">The type to generate.</param>
132 /// <returns>The harvested directory.</returns>
133 private Wix.IParentElement HarvestDirectory(string path, bool harvestChildren, GenerateType generateType)
134 {
135 if (File.Exists(path))
136 {
137 throw new WixException(ErrorMessages.ExpectedDirectoryGotFile("dir", path));
138 }
139
140 if (null == this.RootedDirectoryRef)
141 {
142 this.RootedDirectoryRef = "TARGETDIR";
143 }
144
145 // use absolute paths
146 path = Path.GetFullPath(path);
147
148 // Remove any trailing separator to ensure Path.GetFileName() will return the directory name.
149 path = path.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
150
151 Wix.IParentElement harvestParent;
152 if (generateType == GenerateType.PayloadGroup)
153 {
154 harvestParent = new Wix.PayloadGroup();
155 }
156 else
157 {
158 Wix.Directory directory = new Wix.Directory();
159 directory.Name = Path.GetFileName(path);
160 directory.FileSource = path;
161
162 if (this.SetUniqueIdentifiers)
163 {
164 if (this.SuppressRootDirectory)
165 {
166 directory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, this.RootedDirectoryRef);
167 }
168 else
169 {
170 directory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, this.RootedDirectoryRef, directory.Name);
171 }
172 }
173 harvestParent = directory;
174 }
175
176 if (harvestChildren)
177 {
178 try
179 {
180 int fileCount = this.HarvestDirectory(path, "SourceDir\\", harvestParent, generateType);
181
182 if (generateType != GenerateType.PayloadGroup)
183 {
184 // its an error to not harvest anything with the option to keep empty directories off
185 if (0 == fileCount && !this.KeepEmptyDirectories)
186 {
187 throw new WixException(HarvesterErrors.EmptyDirectory(path));
188 }
189 }
190 }
191 catch (DirectoryNotFoundException)
192 {
193 throw new WixException(HarvesterErrors.DirectoryNotFound(path));
194 }
195 }
196
197 return harvestParent;
198 }
199
200 /// <summary>
201 /// Harvest a directory.
202 /// </summary>
203 /// <param name="path">The path of the directory.</param>
204 /// <param name="relativePath">The relative path that will be used when harvesting.</param>
205 /// <param name="harvestParent">The directory for this path.</param>
206 /// <param name="generateType"></param>
207 /// <returns>The number of files harvested.</returns>
208 private int HarvestDirectory(string path, string relativePath, Wix.IParentElement harvestParent, GenerateType generateType)
209 {
210 int fileCount = 0;
211 Wix.Directory directory = generateType != GenerateType.PayloadGroup ? (Wix.Directory)harvestParent : null;
212
213 // harvest the child directories
214 foreach (string childDirectoryPath in Directory.GetDirectories(path))
215 {
216 var childDirectoryName = Path.GetFileName(childDirectoryPath);
217 Wix.IParentElement newParent;
218 Wix.Directory childDirectory = null;
219
220 if (generateType == GenerateType.PayloadGroup)
221 {
222 newParent = harvestParent;
223 }
224 else
225 {
226 childDirectory = new Wix.Directory();
227 newParent = childDirectory;
228
229 childDirectory.Name = childDirectoryName;
230 childDirectory.FileSource = childDirectoryPath;
231
232 if (this.SetUniqueIdentifiers)
233 {
234 childDirectory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, directory.Id, childDirectory.Name);
235 }
236 }
237
238 int childFileCount = this.HarvestDirectory(childDirectoryPath, String.Concat(relativePath, childDirectoryName, "\\"), newParent, generateType);
239
240 if (generateType != GenerateType.PayloadGroup)
241 {
242 // keep the directory if it contained any files (or empty directories are being kept)
243 if (0 < childFileCount || this.KeepEmptyDirectories)
244 {
245 directory.AddChild(childDirectory);
246 }
247 }
248
249 fileCount += childFileCount;
250 }
251
252 // harvest the files
253 string[] files = Directory.GetFiles(path);
254 if (0 < files.Length)
255 {
256 foreach (string filePath in Directory.GetFiles(path))
257 {
258 string fileName = Path.GetFileName(filePath);
259 string source = String.Concat(relativePath, fileName);
260
261 Wix.ISchemaElement newChild;
262 if (generateType == GenerateType.PayloadGroup)
263 {
264 Wix.Payload payload = new Wix.Payload();
265 newChild = payload;
266
267 payload.SourceFile = source;
268 }
269 else
270 {
271 Wix.Component component = new Wix.Component();
272 newChild = component;
273
274 Wix.File file = this.fileHarvester.HarvestFile(filePath);
275 file.Source = source;
276
277 if (this.SetUniqueIdentifiers)
278 {
279 file.Id = this.Core.GenerateIdentifier(FilePrefix, directory.Id, fileName);
280 component.Id = this.Core.GenerateIdentifier(ComponentPrefix, directory.Id, file.Id);
281 }
282
283 component.AddChild(file);
284 }
285
286 harvestParent.AddChild(newChild);
287 }
288 }
289 else if (generateType != GenerateType.PayloadGroup && 0 == fileCount && this.KeepEmptyDirectories)
290 {
291 Wix.Component component = new Wix.Component();
292 component.KeyPath = Wix.YesNoType.yes;
293
294 if (this.SetUniqueIdentifiers)
295 {
296 component.Id = this.Core.GenerateIdentifier(ComponentPrefix, directory.Id);
297 }
298
299 Wix.CreateFolder createFolder = new Wix.CreateFolder();
300 component.AddChild(createFolder);
301
302 directory.AddChild(component);
303 }
304
305 return fileCount + files.Length;
306 }
307 }
308}
diff --git a/src/wix/heat/DllHarvester.cs b/src/wix/heat/DllHarvester.cs
new file mode 100644
index 00000000..723e44ee
--- /dev/null
+++ b/src/wix/heat/DllHarvester.cs
@@ -0,0 +1,106 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Reflection;
7 using System.Reflection.Emit;
8 using System.Runtime.InteropServices;
9 using Wix = WixToolset.Harvesters.Serialize;
10
11 /// <summary>
12 /// Harvest WiX authoring from a native DLL file.
13 /// </summary>
14 internal class DllHarvester
15 {
16 /// <summary>
17 /// Harvest the registry values written by calling DllRegisterServer on the specified file.
18 /// </summary>
19 /// <param name="file">The file to harvest registry values from.</param>
20 /// <returns>The harvested registry values.</returns>
21 public Wix.RegistryValue[] HarvestRegistryValues(string file)
22 {
23 // load the DLL
24 NativeMethods.LoadLibrary(file);
25
26 using (RegistryHarvester registryHarvester = new RegistryHarvester(true))
27 {
28 try
29 {
30 DynamicPInvoke(file, "DllRegisterServer", typeof(int), null, null);
31
32 return registryHarvester.HarvestRegistry();
33 }
34 catch (TargetInvocationException e)
35 {
36 e.Data["file"] = file;
37 throw;
38 }
39 }
40 }
41
42 /// <summary>
43 /// Dynamically PInvokes into a DLL.
44 /// </summary>
45 /// <param name="dll">Dynamic link library containing the entry point.</param>
46 /// <param name="entryPoint">Entry point into dynamic link library.</param>
47 /// <param name="returnType">Return type of entry point.</param>
48 /// <param name="parameterTypes">Type of parameters to entry point.</param>
49 /// <param name="parameterValues">Value of parameters to entry point.</param>
50 /// <returns>Value from invoked code.</returns>
51 private static object DynamicPInvoke(string dll, string entryPoint, Type returnType, Type[] parameterTypes, object[] parameterValues)
52 {
53#if NETCOREAPP
54 throw new PlatformNotSupportedException();
55#else
56 AssemblyName assemblyName = new AssemblyName();
57 assemblyName.Name = "wixTempAssembly";
58
59 AssemblyBuilder dynamicAssembly = AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run);
60 ModuleBuilder dynamicModule = dynamicAssembly.DefineDynamicModule("wixTempModule");
61
62 MethodBuilder dynamicMethod = dynamicModule.DefinePInvokeMethod(entryPoint, dll, MethodAttributes.Static | MethodAttributes.Public | MethodAttributes.PinvokeImpl, CallingConventions.Standard, returnType, parameterTypes, CallingConvention.Winapi, CharSet.Ansi);
63 dynamicModule.CreateGlobalFunctions();
64
65 MethodInfo methodInfo = dynamicModule.GetMethod(entryPoint);
66 return methodInfo.Invoke(null, parameterValues);
67#endif
68 }
69
70 /// <summary>
71 /// Native methods for loading libraries.
72 /// </summary>
73 private sealed class NativeMethods
74 {
75 private const UInt32 LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008;
76
77 /// <summary>
78 /// Load a DLL library.
79 /// </summary>
80 /// <param name="file">The file name of the executable module.</param>
81 /// <returns>If the function succeeds, the return value is a handle to the mapped executable module.</returns>
82 internal static IntPtr LoadLibrary(string file)
83 {
84 IntPtr dllHandle = LoadLibraryEx(file, IntPtr.Zero, NativeMethods.LOAD_WITH_ALTERED_SEARCH_PATH);
85
86 if (IntPtr.Zero == dllHandle)
87 {
88 int lastError = Marshal.GetLastWin32Error();
89 throw new Exception(String.Format("Unable to load file: {0}, error: {1}", file, lastError));
90 }
91
92 return dllHandle;
93 }
94
95 /// <summary>
96 /// Maps the specified executable module into the address space of the calling process.
97 /// </summary>
98 /// <param name="file">The file name of the executable module.</param>
99 /// <param name="fileHandle">This parameter is reserved for future use. It must be NULL.</param>
100 /// <param name="flags">Action to take when loading the module.</param>
101 /// <returns>If the function succeeds, the return value is a handle to the mapped executable module.</returns>
102 [DllImport("kernel32.dll", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode, SetLastError = true)]
103 private static extern IntPtr LoadLibraryEx(string file, IntPtr fileHandle, UInt32 flags);
104 }
105 }
106}
diff --git a/src/wix/heat/Extensibility/BaseHarvesterExtension.cs b/src/wix/heat/Extensibility/BaseHarvesterExtension.cs
new file mode 100644
index 00000000..02696d5b
--- /dev/null
+++ b/src/wix/heat/Extensibility/BaseHarvesterExtension.cs
@@ -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
3namespace WixToolset.Harvesters.Extensibility
4{
5 using Wix = WixToolset.Harvesters.Serialize;
6
7 /// <summary>
8 /// The base harvester extension. Any of these methods can be overridden to change
9 /// the behavior of the harvester.
10 /// </summary>
11 public abstract class BaseHarvesterExtension : IHarvesterExtension
12 {
13 /// <summary>
14 /// Gets or sets the harvester core for the extension.
15 /// </summary>
16 /// <value>The harvester core for the extension.</value>
17 public IHarvesterCore Core { get; set; }
18
19 /// <summary>
20 /// Harvest a WiX document.
21 /// </summary>
22 /// <param name="argument">The argument for harvesting.</param>
23 /// <returns>The harvested Fragments.</returns>
24 public abstract Wix.Fragment[] Harvest(string argument);
25 }
26}
diff --git a/src/wix/heat/Extensibility/BaseHeatExtension.cs b/src/wix/heat/Extensibility/BaseHeatExtension.cs
new file mode 100644
index 00000000..b76aaf62
--- /dev/null
+++ b/src/wix/heat/Extensibility/BaseHeatExtension.cs
@@ -0,0 +1,55 @@
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
3namespace WixToolset.Harvesters.Extensibility
4{
5 using System;
6 using WixToolset.Harvesters.Data;
7
8 /// <summary>
9 /// An extension for the WiX Toolset Harvester application.
10 /// </summary>
11 public abstract class BaseHeatExtension : IHeatExtension
12 {
13 /// <summary>
14 /// Gets or sets the heat core for the extension.
15 /// </summary>
16 /// <value>The heat core for the extension.</value>
17 public IHeatCore Core { get; set; }
18
19 /// <summary>
20 /// Gets the supported command line types for this extension.
21 /// </summary>
22 /// <value>The supported command line types for this extension.</value>
23 public virtual HeatCommandLineOption[] CommandLineTypes
24 {
25 get { return null; }
26 }
27
28 /// <summary>
29 /// Parse the command line options for this extension.
30 /// </summary>
31 /// <param name="type">The active harvester type.</param>
32 /// <param name="args">The option arguments.</param>
33 public virtual void ParseOptions(string type, string[] args)
34 {
35 }
36
37 /// <summary>
38 /// Determines if the index refers to an argument.
39 /// </summary>
40 /// <param name="args"></param>
41 /// <param name="index"></param>
42 /// <returns></returns>
43 public static bool IsValidArg(string[] args, int index)
44 {
45 if (args.Length <= index || String.IsNullOrEmpty(args[index]) || '/' == args[index][0] || '-' == args[index][0])
46 {
47 return false;
48 }
49 else
50 {
51 return true;
52 }
53 }
54 }
55}
diff --git a/src/wix/heat/Extensibility/BaseMutatorExtension.cs b/src/wix/heat/Extensibility/BaseMutatorExtension.cs
new file mode 100644
index 00000000..c36a8ed1
--- /dev/null
+++ b/src/wix/heat/Extensibility/BaseMutatorExtension.cs
@@ -0,0 +1,202 @@
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
3namespace WixToolset.Harvesters.Extensibility
4{
5 using System;
6 using System.Collections.Generic;
7 using System.Text;
8 using Wix = WixToolset.Harvesters.Serialize;
9
10 /// <summary>
11 /// The base mutator extension. Any of these methods can be overridden to change
12 /// the behavior of the mutator.
13 /// </summary>
14 public abstract class BaseMutatorExtension : IMutatorExtension
15 {
16 /// <summary>
17 /// Gets or sets the mutator core for the extension.
18 /// </summary>
19 /// <value>The mutator core for the extension.</value>
20 public IHarvesterCore Core { get; set; }
21
22 /// <summary>
23 /// Gets the sequence of the extension.
24 /// </summary>
25 /// <value>The sequence of the extension.</value>
26 public abstract int Sequence { get; }
27
28 /// <summary>
29 /// Mutate a WiX document.
30 /// </summary>
31 /// <param name="wix">The Wix document element.</param>
32 public virtual void Mutate(Wix.Wix wix)
33 {
34 }
35
36 /// <summary>
37 /// Mutate a WiX document as a string.
38 /// </summary>
39 /// <param name="wixString">The Wix document element as a string.</param>
40 /// <returns>The mutated Wix document as a string.</returns>
41 public virtual string Mutate(string wixString)
42 {
43 return wixString;
44 }
45
46 /// <summary>
47 /// Generate unique MSI identifiers.
48 /// </summary>
49 protected class IdentifierGenerator
50 {
51 /// <summary>
52 ///
53 /// </summary>
54 public const int MaxProductIdentifierLength = 72;
55
56 /// <summary>
57 ///
58 /// </summary>
59 public const int MaxModuleIdentifierLength = 35;
60
61 private string baseName;
62 private int maxLength;
63 private Dictionary<string, object> existingIdentifiers;
64 private Dictionary<string, object> possibleIdentifiers;
65 private IHarvesterCore harvesterCore;
66
67 /// <summary>
68 /// Instantiate a new IdentifierGenerator.
69 /// </summary>
70 /// <param name="baseName">The base resource name to use if a resource name contains no usable characters.</param>
71 /// <param name="harvesterCore"></param>
72 public IdentifierGenerator(string baseName, IHarvesterCore harvesterCore)
73 {
74 this.baseName = baseName;
75 this.maxLength = IdentifierGenerator.MaxProductIdentifierLength;
76 this.existingIdentifiers = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
77 this.possibleIdentifiers = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);
78 this.harvesterCore = harvesterCore;
79 }
80
81 /// <summary>
82 /// Gets or sets the maximum length for generated identifiers.
83 /// </summary>
84 /// <value>Maximum length for generated identifiers. (Default is 72.)</value>
85 public int MaxIdentifierLength
86 {
87 get { return this.maxLength; }
88 set { this.maxLength = value; }
89 }
90
91 /// <summary>
92 /// Index an existing identifier for collision detection.
93 /// </summary>
94 /// <param name="identifier">The identifier.</param>
95 public void IndexExistingIdentifier(string identifier)
96 {
97 if (null == identifier)
98 {
99 throw new ArgumentNullException("identifier");
100 }
101
102 this.existingIdentifiers[identifier] = null;
103 }
104
105 /// <summary>
106 /// Index a resource name for collision detection.
107 /// </summary>
108 /// <param name="name">The resource name.</param>
109 public void IndexName(string name)
110 {
111 if (null == name)
112 {
113 throw new ArgumentNullException("name");
114 }
115
116 string identifier = this.CreateIdentifier(name, 0);
117
118 if (this.possibleIdentifiers.ContainsKey(identifier))
119 {
120 this.possibleIdentifiers[identifier] = String.Empty;
121 }
122 else
123 {
124 this.possibleIdentifiers.Add(identifier, null);
125 }
126 }
127
128 /// <summary>
129 /// Get the identifier for the given resource name.
130 /// </summary>
131 /// <param name="name">The resource name.</param>
132 /// <returns>A legal MSI identifier.</returns>
133 public string GetIdentifier(string name)
134 {
135 if (null == name)
136 {
137 throw new ArgumentNullException("name");
138 }
139
140 for (int i = 0; i <= Int32.MaxValue; i++)
141 {
142 string identifier = this.CreateIdentifier(name, i);
143
144 if (this.existingIdentifiers.ContainsKey(identifier) || // already used
145 (0 == i && 0 != this.possibleIdentifiers.Count && null != this.possibleIdentifiers[identifier]) || // needs an index because its duplicated
146 (0 != i && this.possibleIdentifiers.ContainsKey(identifier))) // collides with another possible identifier
147 {
148 continue;
149 }
150 else // use this identifier
151 {
152 this.existingIdentifiers.Add(identifier, null);
153
154 return identifier;
155 }
156 }
157
158 throw new InvalidOperationException("Could not find a unique identifier for the given resource name.");
159 }
160
161 /// <summary>
162 /// Create a legal MSI identifier from a resource name and an index.
163 /// </summary>
164 /// <param name="name">The name of the resource for which an identifier should be created.</param>
165 /// <param name="index">An index to append to the end of the identifier to make it unique.</param>
166 /// <returns>A legal MSI identifier.</returns>
167 public string CreateIdentifier(string name, int index)
168 {
169 if (null == name)
170 {
171 throw new ArgumentNullException("name");
172 }
173
174 StringBuilder identifier = new StringBuilder();
175
176 // Convert the name to a standard MSI identifier
177 identifier.Append(this.harvesterCore.CreateIdentifierFromFilename(name));
178
179 // no legal identifier characters were found, use the base id instead
180 if (0 == identifier.Length)
181 {
182 identifier.Append(this.baseName);
183 }
184
185 // truncate the identifier if it's too long (reserve 3 characters for up to 99 collisions)
186 int adjustedMaxLength = this.MaxIdentifierLength - (index != 0 ? 3 : 0);
187 if (adjustedMaxLength < identifier.Length)
188 {
189 identifier.Length = adjustedMaxLength;
190 }
191
192 // if the index is not zero, then append it to the identifier name
193 if (0 != index)
194 {
195 identifier.AppendFormat("_{0}", index);
196 }
197
198 return identifier.ToString();
199 }
200 }
201 }
202}
diff --git a/src/wix/heat/Extensibility/IHarvester.cs b/src/wix/heat/Extensibility/IHarvester.cs
new file mode 100644
index 00000000..6d363b50
--- /dev/null
+++ b/src/wix/heat/Extensibility/IHarvester.cs
@@ -0,0 +1,31 @@
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
3namespace WixToolset.Harvesters.Extensibility
4{
5 using Wix = WixToolset.Harvesters.Serialize;
6
7 /// <summary>
8 /// Interface for the harvester.
9 /// </summary>
10 public interface IHarvester
11 {
12 /// <summary>
13 /// Gets or sets the harvester core for the extension.
14 /// </summary>
15 /// <value>The harvester core for the extension.</value>
16 IHarvesterCore Core { get; }
17
18 /// <summary>
19 /// Gets or sets the extension.
20 /// </summary>
21 /// <value>The extension.</value>
22 IHarvesterExtension Extension { get; set; }
23
24 /// <summary>
25 /// Harvest wix authoring.
26 /// </summary>
27 /// <param name="argument">The argument for harvesting.</param>
28 /// <returns>The harvested wix authoring.</returns>
29 Wix.Wix Harvest(string argument);
30 }
31}
diff --git a/src/wix/heat/Extensibility/IHarvesterCore.cs b/src/wix/heat/Extensibility/IHarvesterCore.cs
new file mode 100644
index 00000000..3c34b8a1
--- /dev/null
+++ b/src/wix/heat/Extensibility/IHarvesterCore.cs
@@ -0,0 +1,51 @@
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
3namespace WixToolset.Harvesters.Extensibility
4{
5 using WixToolset.Extensibility.Services;
6
7 /// <summary>
8 /// The WiX Toolset harvester core.
9 /// </summary>
10 public interface IHarvesterCore
11 {
12 /// <summary>
13 ///
14 /// </summary>
15 IMessaging Messaging { get; set; }
16
17 /// <summary>
18 /// Gets or sets the value of the extension argument passed to heat.
19 /// </summary>
20 /// <value>The extension argument.</value>
21 string ExtensionArgument { get; set; }
22
23 /// <summary>
24 /// Gets or sets the value of the root directory that is being harvested.
25 /// </summary>
26 /// <value>The root directory being harvested.</value>
27 string RootDirectory { get; set; }
28
29 /// <summary>
30 /// Create an identifier based on passed file name
31 /// </summary>
32 /// <param name="filename">File name to generate identifer from</param>
33 /// <returns></returns>
34 string CreateIdentifierFromFilename(string filename);
35
36 /// <summary>
37 /// Generate an identifier by hashing data from the row.
38 /// </summary>
39 /// <param name="prefix">Three letter or less prefix for generated row identifier.</param>
40 /// <param name="args">Information to hash.</param>
41 /// <returns>The generated identifier.</returns>
42 string GenerateIdentifier(string prefix, params string[] args);
43
44 /// <summary>
45 /// Resolves a file's path if the Wix.File.Source value starts with "SourceDir\".
46 /// </summary>
47 /// <param name="fileSource">The Wix.File.Source value with "SourceDir\".</param>
48 /// <returns>The full path of the file.</returns>
49 string ResolveFilePath(string fileSource);
50 }
51}
diff --git a/src/wix/heat/Extensibility/IHarvesterExtension.cs b/src/wix/heat/Extensibility/IHarvesterExtension.cs
new file mode 100644
index 00000000..5125ea32
--- /dev/null
+++ b/src/wix/heat/Extensibility/IHarvesterExtension.cs
@@ -0,0 +1,14 @@
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
3namespace WixToolset.Harvesters.Extensibility
4{
5 using Wix = WixToolset.Harvesters.Serialize;
6
7#pragma warning disable 1591 // TODO: add documentation
8 public interface IHarvesterExtension
9 {
10 IHarvesterCore Core { get; set; }
11
12 Wix.Fragment[] Harvest(string argument);
13 }
14}
diff --git a/src/wix/heat/Extensibility/IHeatCore.cs b/src/wix/heat/Extensibility/IHeatCore.cs
new file mode 100644
index 00000000..0aa01b62
--- /dev/null
+++ b/src/wix/heat/Extensibility/IHeatCore.cs
@@ -0,0 +1,29 @@
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
3namespace WixToolset.Harvesters.Extensibility
4{
5 using WixToolset.Extensibility.Services;
6
7 /// <summary>
8 /// The WiX Toolset Harvester application core.
9 /// </summary>
10 public interface IHeatCore
11 {
12 /// <summary>
13 /// Gets the harvester.
14 /// </summary>
15 /// <value>The harvester.</value>
16 IHarvester Harvester { get; }
17
18 /// <summary>
19 ///
20 /// </summary>
21 IMessaging Messaging { get; }
22
23 /// <summary>
24 /// Gets the mutator.
25 /// </summary>
26 /// <value>The mutator.</value>
27 IMutator Mutator { get; }
28 }
29}
diff --git a/src/wix/heat/Extensibility/IHeatExtension.cs b/src/wix/heat/Extensibility/IHeatExtension.cs
new file mode 100644
index 00000000..8a00da37
--- /dev/null
+++ b/src/wix/heat/Extensibility/IHeatExtension.cs
@@ -0,0 +1,16 @@
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
3namespace WixToolset.Harvesters.Extensibility
4{
5 using WixToolset.Harvesters.Data;
6
7#pragma warning disable 1591 // TODO: add documentation
8 public interface IHeatExtension
9 {
10 IHeatCore Core { get; set; }
11
12 HeatCommandLineOption[] CommandLineTypes { get; }
13
14 void ParseOptions(string type, string[] args);
15 }
16}
diff --git a/src/wix/heat/Extensibility/IMutator.cs b/src/wix/heat/Extensibility/IMutator.cs
new file mode 100644
index 00000000..c936339e
--- /dev/null
+++ b/src/wix/heat/Extensibility/IMutator.cs
@@ -0,0 +1,44 @@
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
3namespace WixToolset.Harvesters.Extensibility
4{
5 using Wix = WixToolset.Harvesters.Serialize;
6
7 /// <summary>
8 /// Interface for a mutator.
9 /// </summary>
10 public interface IMutator
11 {
12 /// <summary>
13 /// Gets or sets the harvester core for the extension.
14 /// </summary>
15 /// <value>The harvester core for the extension.</value>
16 IHarvesterCore Core { get; }
17
18 /// <summary>
19 /// Gets or sets the value of the extension argument passed to heat.
20 /// </summary>
21 /// <value>The extension argument.</value>
22 string ExtensionArgument { get; }
23
24 /// <summary>
25 /// Adds a mutator extension.
26 /// </summary>
27 /// <param name="mutatorExtension">The mutator extension to add.</param>
28 void AddExtension(IMutatorExtension mutatorExtension);
29
30 /// <summary>
31 /// Mutate a WiX document.
32 /// </summary>
33 /// <param name="wix">The Wix document element.</param>
34 /// <returns>true if mutation was successful</returns>
35 bool Mutate(Wix.Wix wix);
36
37 /// <summary>
38 /// Mutate a WiX document.
39 /// </summary>
40 /// <param name="wixString">The Wix document as a string.</param>
41 /// <returns>The mutated Wix document as a string if mutation was successful, else null.</returns>
42 string Mutate(string wixString);
43 }
44}
diff --git a/src/wix/heat/Extensibility/IMutatorExtension.cs b/src/wix/heat/Extensibility/IMutatorExtension.cs
new file mode 100644
index 00000000..b81f586e
--- /dev/null
+++ b/src/wix/heat/Extensibility/IMutatorExtension.cs
@@ -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
3namespace WixToolset.Harvesters.Extensibility
4{
5 using Wix = WixToolset.Harvesters.Serialize;
6
7#pragma warning disable 1591 // TODO: add documentation
8 public interface IMutatorExtension
9 {
10 IHarvesterCore Core { get; set; }
11
12 int Sequence { get; }
13
14 void Mutate(Wix.Wix wix);
15
16 string Mutate(string wixString);
17 }
18}
diff --git a/src/wix/heat/FileHarvester.cs b/src/wix/heat/FileHarvester.cs
new file mode 100644
index 00000000..8bb1a155
--- /dev/null
+++ b/src/wix/heat/FileHarvester.cs
@@ -0,0 +1,156 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.IO;
7 using WixToolset.Data;
8 using WixToolset.Harvesters.Data;
9 using WixToolset.Harvesters.Extensibility;
10 using Wix = WixToolset.Harvesters.Serialize;
11
12 /// <summary>
13 /// Harvest WiX authoring for a file from the file system.
14 /// </summary>
15 internal class FileHarvester : BaseHarvesterExtension
16 {
17 private string rootedDirectoryRef;
18 private bool setUniqueIdentifiers;
19 private bool suppressRootDirectory;
20
21 private static readonly string ComponentPrefix = "cmp";
22 private static readonly string DirectoryPrefix = "dir";
23 private static readonly string FilePrefix = "fil";
24
25 /// <summary>
26 /// Instantiate a new FileHarvester.
27 /// </summary>
28 public FileHarvester()
29 {
30 this.setUniqueIdentifiers = true;
31 this.suppressRootDirectory = false;
32 }
33
34 /// <summary>
35 /// Gets or sets the rooted DirectoryRef Id if the user has supplied it.
36 /// </summary>
37 /// <value>The DirectoryRef Id to use as the root.</value>
38 public string RootedDirectoryRef
39 {
40 get { return this.rootedDirectoryRef; }
41 set { this.rootedDirectoryRef = value; }
42 }
43
44 /// <summary>
45 /// Gets of sets the option to set unique identifiers.
46 /// </summary>
47 /// <value>The option to set unique identifiers.</value>
48 public bool SetUniqueIdentifiers
49 {
50 get { return this.setUniqueIdentifiers; }
51 set { this.setUniqueIdentifiers = value; }
52 }
53
54 /// <summary>
55 /// Gets or sets the option to suppress including the root directory as an element.
56 /// </summary>
57 /// <value>The option to suppress including the root directory as an element.</value>
58 public bool SuppressRootDirectory
59 {
60 get { return this.suppressRootDirectory; }
61 set { this.suppressRootDirectory = value; }
62 }
63
64 /// <summary>
65 /// Harvest a file.
66 /// </summary>
67 /// <param name="argument">The path of the file.</param>
68 /// <returns>A harvested file.</returns>
69 public override Wix.Fragment[] Harvest(string argument)
70 {
71 if (null == argument)
72 {
73 throw new ArgumentNullException("argument");
74 }
75
76 if (null == this.rootedDirectoryRef)
77 {
78 this.rootedDirectoryRef = "TARGETDIR";
79 }
80
81 string fullPath = Path.GetFullPath(argument);
82
83 Wix.DirectoryRef directoryRef = new Wix.DirectoryRef();
84 directoryRef.Id = this.rootedDirectoryRef;
85
86 Wix.File file = this.HarvestFile(fullPath);
87
88 if (!this.suppressRootDirectory)
89 {
90 file.Source = String.Concat("SourceDir\\", Path.GetFileName(Path.GetDirectoryName(fullPath)), "\\", Path.GetFileName(fullPath));
91 }
92
93 Wix.Component component = new Wix.Component();
94 component.AddChild(file);
95
96 Wix.Directory directory = new Wix.Directory();
97
98 if (this.suppressRootDirectory)
99 {
100 directoryRef.AddChild(component);
101 }
102 else
103 {
104 string directoryPath = Path.GetDirectoryName(Path.GetFullPath(argument));
105 directory.Name = Path.GetFileName(directoryPath);
106
107 if (this.setUniqueIdentifiers)
108 {
109 directory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, directoryRef.Id, directory.Name);
110 }
111 directory.AddChild(component);
112 directoryRef.AddChild(directory);
113 }
114
115 if (this.setUniqueIdentifiers)
116 {
117 file.Id = this.Core.GenerateIdentifier(FilePrefix, (this.suppressRootDirectory) ? directoryRef.Id : directory.Id, Path.GetFileName(file.Source));
118 component.Id = this.Core.GenerateIdentifier(ComponentPrefix, (this.suppressRootDirectory) ? directoryRef.Id : directory.Id, file.Id);
119 }
120
121 Wix.Fragment fragment = new Wix.Fragment();
122 fragment.AddChild(directoryRef);
123
124 return new Wix.Fragment[] { fragment };
125 }
126
127 /// <summary>
128 /// Harvest a file.
129 /// </summary>
130 /// <param name="path">The path of the file.</param>
131 /// <returns>A harvested file.</returns>
132 public Wix.File HarvestFile(string path)
133 {
134 if (null == path)
135 {
136 throw new ArgumentNullException("path");
137 }
138
139 if (!File.Exists(path))
140 {
141 throw new WixException(HarvesterErrors.FileNotFound(path));
142 }
143
144 Wix.File file = new Wix.File();
145
146 // use absolute paths
147 path = Path.GetFullPath(path);
148
149 file.KeyPath = Wix.YesNoType.yes;
150
151 file.Source = String.Concat("SourceDir\\", Path.GetFileName(path));
152
153 return file;
154 }
155 }
156}
diff --git a/src/wix/heat/Harvester.cs b/src/wix/heat/Harvester.cs
new file mode 100644
index 00000000..791c1cb2
--- /dev/null
+++ b/src/wix/heat/Harvester.cs
@@ -0,0 +1,65 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using WixToolset.Data;
7 using WixToolset.Harvesters.Extensibility;
8 using Wix = WixToolset.Harvesters.Serialize;
9
10 /// <summary>
11 /// The WiX Toolset harvester.
12 /// </summary>
13 internal class Harvester : IHarvester
14 {
15 private IHarvesterExtension harvesterExtension;
16
17 public IHarvesterCore Core { get; set; }
18
19 public IHarvesterExtension Extension
20 {
21 get
22 {
23 return this.harvesterExtension;
24 }
25 set
26 {
27 if (null != this.harvesterExtension)
28 {
29 throw new InvalidOperationException("Multiple harvester extensions specified.");
30 }
31
32 this.harvesterExtension = value;
33 }
34 }
35
36 public Wix.Wix Harvest(string argument)
37 {
38 if (null == argument)
39 {
40 throw new ArgumentNullException("argument");
41 }
42
43 if (null == this.harvesterExtension)
44 {
45 throw new WixException(ErrorMessages.HarvestTypeNotFound());
46 }
47
48 this.harvesterExtension.Core = this.Core;
49
50 Wix.Fragment[] fragments = this.harvesterExtension.Harvest(argument);
51 if (null == fragments || 0 == fragments.Length)
52 {
53 return null;
54 }
55
56 Wix.Wix wix = new Wix.Wix();
57 foreach (Wix.Fragment fragment in fragments)
58 {
59 wix.AddChild(fragment);
60 }
61
62 return wix;
63 }
64 }
65}
diff --git a/src/wix/heat/HarvesterCore.cs b/src/wix/heat/HarvesterCore.cs
new file mode 100644
index 00000000..92b34ab0
--- /dev/null
+++ b/src/wix/heat/HarvesterCore.cs
@@ -0,0 +1,76 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.IO;
7 using WixToolset.Extensibility.Services;
8 using WixToolset.Harvesters.Extensibility;
9
10 /// <summary>
11 /// The WiX Toolset harvester core.
12 /// </summary>
13 internal class HarvesterCore : IHarvesterCore
14 {
15 public IMessaging Messaging { get; set; }
16
17 public IParseHelper ParseHelper { get; set; }
18
19 /// <summary>
20 /// Gets or sets the value of the extension argument passed to heat.
21 /// </summary>
22 /// <value>The extension argument.</value>
23 public string ExtensionArgument { get; set; }
24
25 /// <summary>
26 /// Gets or sets the value of the root directory that is being harvested.
27 /// </summary>
28 /// <value>The root directory being harvested.</value>
29 public string RootDirectory { get; set; }
30
31 /// <summary>
32 /// Create an identifier based on passed file name
33 /// </summary>
34 /// <param name="filename">File name to generate identifer from</param>
35 /// <returns></returns>
36 public string CreateIdentifierFromFilename(string filename)
37 {
38 return this.ParseHelper.CreateIdentifierFromFilename(filename).Id;
39 }
40
41 /// <summary>
42 /// Generate an identifier by hashing data from the row.
43 /// </summary>
44 /// <param name="prefix">Three letter or less prefix for generated row identifier.</param>
45 /// <param name="args">Information to hash.</param>
46 /// <returns>The generated identifier.</returns>
47 public string GenerateIdentifier(string prefix, params string[] args)
48 {
49 return this.ParseHelper.CreateIdentifier(prefix, args).Id;
50 }
51
52 /// <summary>
53 /// Resolves a file's path if the Wix.File.Source value starts with "SourceDir\".
54 /// </summary>
55 /// <param name="fileSource">The Wix.File.Source value with "SourceDir\".</param>
56 /// <returns>The full path of the file.</returns>
57 public string ResolveFilePath(string fileSource)
58 {
59 if (fileSource.StartsWith("SourceDir\\", StringComparison.Ordinal))
60 {
61 string file = Path.GetFullPath(this.RootDirectory);
62 if (File.Exists(file))
63 {
64 return file;
65 }
66 else
67 {
68 fileSource = fileSource.Substring(10);
69 fileSource = Path.Combine(Path.GetFullPath(this.RootDirectory), fileSource);
70 }
71 }
72
73 return fileSource;
74 }
75 }
76}
diff --git a/src/wix/heat/HeatCommand.cs b/src/wix/heat/HeatCommand.cs
new file mode 100644
index 00000000..99f27521
--- /dev/null
+++ b/src/wix/heat/HeatCommand.cs
@@ -0,0 +1,275 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections.Generic;
7 using System.Globalization;
8 using System.IO;
9 using System.Runtime.InteropServices;
10 using System.Threading;
11 using System.Threading.Tasks;
12 using System.Xml;
13 using WixToolset.Data;
14 using WixToolset.Extensibility.Data;
15 using WixToolset.Extensibility.Services;
16 using WixToolset.Harvesters.Extensibility;
17 using Wix = WixToolset.Harvesters.Serialize;
18
19 internal class HeatCommand : ICommandLineCommand
20 {
21 public HeatCommand(string harvestType, IList<IHeatExtension> extensions, IServiceProvider serviceProvider)
22 {
23 this.Extensions = extensions;
24 this.Messaging = serviceProvider.GetService<IMessaging>();
25 this.ServiceProvider = serviceProvider;
26
27 this.ExtensionType = harvestType;
28 this.ExtensionOptions.Add(harvestType);
29 }
30
31 private string ExtensionArgument { get; set; }
32
33 private List<string> ExtensionOptions { get; } = new List<string>();
34
35 private string ExtensionType { get; }
36
37 private IList<IHeatExtension> Extensions { get; }
38
39 private int Indent { get; set; } = 4;
40
41 private IMessaging Messaging { get; }
42
43 private string OutputFile { get; set; }
44
45 private IServiceProvider ServiceProvider { get; }
46
47 public bool ShowLogo { get; private set; }
48
49 public bool StopParsing { get; private set; }
50
51 public Task<int> ExecuteAsync(CancellationToken cancellationToken)
52 {
53 var exitCode = this.Harvest();
54 return Task.FromResult(exitCode);
55 }
56
57 public bool TryParseArgument(ICommandLineParser parser, string arg)
58 {
59 if (this.ExtensionArgument == null)
60 {
61 this.ExtensionArgument = arg;
62 }
63 else if ('-' == arg[0] || '/' == arg[0])
64 {
65 string parameter = arg.Substring(1);
66 if ("nologo" == parameter)
67 {
68 this.ShowLogo = false;
69 }
70 else if ("o" == parameter || "out" == parameter)
71 {
72 this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg);
73
74 if (String.IsNullOrEmpty(this.OutputFile))
75 {
76 return false;
77 }
78 }
79 else if ("swall" == parameter)
80 {
81 this.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("swall", "sw"));
82 this.Messaging.SuppressAllWarnings = true;
83 }
84 else if (parameter.StartsWith("sw"))
85 {
86 string paramArg = parameter.Substring(2);
87 try
88 {
89 if (0 == paramArg.Length)
90 {
91 this.Messaging.SuppressAllWarnings = true;
92 }
93 else
94 {
95 int suppressWarning = Convert.ToInt32(paramArg, CultureInfo.InvariantCulture.NumberFormat);
96 if (0 >= suppressWarning)
97 {
98 this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg));
99 }
100
101 this.Messaging.SuppressWarningMessage(suppressWarning);
102 }
103 }
104 catch (FormatException)
105 {
106 this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg));
107 }
108 catch (OverflowException)
109 {
110 this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg));
111 }
112 }
113 else if ("wxall" == parameter)
114 {
115 this.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("wxall", "wx"));
116 this.Messaging.WarningsAsError = true;
117 }
118 else if (parameter.StartsWith("wx"))
119 {
120 string paramArg = parameter.Substring(2);
121 try
122 {
123 if (0 == paramArg.Length)
124 {
125 this.Messaging.WarningsAsError = true;
126 }
127 else
128 {
129 int elevateWarning = Convert.ToInt32(paramArg, CultureInfo.InvariantCulture.NumberFormat);
130 if (0 >= elevateWarning)
131 {
132 this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg));
133 }
134
135 this.Messaging.ElevateWarningMessage(elevateWarning);
136 }
137 }
138 catch (FormatException)
139 {
140 this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg));
141 }
142 catch (OverflowException)
143 {
144 this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg));
145 }
146 }
147 else if ("v" == parameter)
148 {
149 this.Messaging.ShowVerboseMessages = true;
150 }
151 else if ("indent" == parameter)
152 {
153 try
154 {
155 this.Indent = Int32.Parse(parser.GetNextArgumentOrError(arg), CultureInfo.InvariantCulture);
156 }
157 catch
158 {
159 throw new ArgumentException("Invalid numeric argument.", parameter);
160 }
161 }
162 }
163
164 this.ExtensionOptions.Add(arg);
165 return true;
166 }
167
168 private int Harvest()
169 {
170 try
171 {
172 if (String.IsNullOrEmpty(this.ExtensionArgument))
173 {
174 this.Messaging.Write(ErrorMessages.HarvestSourceNotSpecified());
175 }
176 else if (String.IsNullOrEmpty(this.OutputFile))
177 {
178 this.Messaging.Write(ErrorMessages.OutputTargetNotSpecified());
179 }
180
181 // exit if there was an error parsing the core command line
182 if (this.Messaging.EncounteredError)
183 {
184 return this.Messaging.LastErrorNumber;
185 }
186
187 if (this.ShowLogo)
188 {
189 HelpCommand.DisplayToolHeader();
190 }
191
192 var heatCore = new HeatCore(this.ServiceProvider, this.ExtensionArgument);
193
194 // parse the extension's command line arguments
195 var extensionOptionsArray = this.ExtensionOptions.ToArray();
196 foreach (var heatExtension in this.Extensions)
197 {
198 heatExtension.Core = heatCore;
199 heatExtension.ParseOptions(this.ExtensionType, extensionOptionsArray);
200 }
201
202 // exit if there was an error parsing the command line (otherwise the logo appears after error messages)
203 if (this.Messaging.EncounteredError)
204 {
205 return this.Messaging.LastErrorNumber;
206 }
207
208 // harvest the output
209 Wix.Wix wix = heatCore.Harvester.Harvest(this.ExtensionArgument);
210 if (null == wix)
211 {
212 return this.Messaging.LastErrorNumber;
213 }
214
215 // mutate the output
216 if (!heatCore.Mutator.Mutate(wix))
217 {
218 return this.Messaging.LastErrorNumber;
219 }
220
221 XmlWriterSettings xmlSettings = new XmlWriterSettings();
222 xmlSettings.Indent = true;
223 xmlSettings.IndentChars = new string(' ', this.Indent);
224 xmlSettings.OmitXmlDeclaration = true;
225
226 string wixString;
227 using (StringWriter stringWriter = new StringWriter())
228 {
229 using (XmlWriter xmlWriter = XmlWriter.Create(stringWriter, xmlSettings))
230 {
231 wix.OutputXml(xmlWriter);
232 }
233
234 wixString = stringWriter.ToString();
235 }
236
237 string mutatedWixString = heatCore.Mutator.Mutate(wixString);
238 if (String.IsNullOrEmpty(mutatedWixString))
239 {
240 return this.Messaging.LastErrorNumber;
241 }
242
243 Directory.CreateDirectory(Path.GetDirectoryName(this.OutputFile));
244
245 using (StreamWriter streamWriter = new StreamWriter(this.OutputFile, false, System.Text.Encoding.UTF8))
246 {
247 xmlSettings.OmitXmlDeclaration = false;
248 xmlSettings.Encoding = System.Text.Encoding.UTF8;
249 using (XmlWriter xmlWriter = XmlWriter.Create(streamWriter, xmlSettings))
250 {
251 xmlWriter.WriteStartDocument();
252 xmlWriter.Flush();
253 }
254
255 streamWriter.WriteLine();
256 streamWriter.Write(mutatedWixString);
257 }
258 }
259 catch (WixException we)
260 {
261 this.Messaging.Write(we.Error);
262 }
263 catch (Exception e)
264 {
265 this.Messaging.Write(ErrorMessages.UnexpectedException(e));
266 if (e is NullReferenceException || e is SEHException)
267 {
268 throw;
269 }
270 }
271
272 return this.Messaging.LastErrorNumber;
273 }
274 }
275}
diff --git a/src/wix/heat/HeatCommandLine.cs b/src/wix/heat/HeatCommandLine.cs
new file mode 100644
index 00000000..b11dda4e
--- /dev/null
+++ b/src/wix/heat/HeatCommandLine.cs
@@ -0,0 +1,91 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections.Generic;
7 using System.Linq;
8 using WixToolset.Data;
9 using WixToolset.Extensibility.Data;
10 using WixToolset.Extensibility.Services;
11 using WixToolset.Harvesters.Data;
12 using WixToolset.Harvesters.Extensibility;
13
14 internal class HeatCommandLine : IHeatCommandLine
15 {
16 private readonly List<IHeatExtension> extensions;
17 private readonly IMessaging messaging;
18 private readonly IServiceProvider serviceProvider;
19
20 public HeatCommandLine(IServiceProvider serviceProvider, IEnumerable<IHeatExtension> heatExtensions)
21 {
22 this.extensions = new List<IHeatExtension> { new IIsHeatExtension(), new UtilHeatExtension(serviceProvider), new VSHeatExtension() };
23 if (heatExtensions != null)
24 {
25 this.extensions.AddRange(heatExtensions);
26 }
27 this.messaging = serviceProvider.GetService<IMessaging>();
28 this.serviceProvider = serviceProvider;
29 }
30
31 public ICommandLineCommand ParseStandardCommandLine(ICommandLineArguments arguments)
32 {
33 ICommandLineCommand command = null;
34 var parser = arguments.Parse();
35
36 while (command?.StopParsing != true &&
37 String.IsNullOrEmpty(parser.ErrorArgument) &&
38 parser.TryGetNextSwitchOrArgument(out var arg))
39 {
40 if (String.IsNullOrWhiteSpace(arg)) // skip blank arguments.
41 {
42 continue;
43 }
44
45 // First argument must be the command or global switch (that creates a command).
46 if (command == null)
47 {
48 if (!this.TryParseUnknownCommandArg(arg, parser, out command))
49 {
50 parser.ReportErrorArgument(arg, ErrorMessages.HarvestTypeNotFound(arg));
51 }
52 }
53 else if (!command.TryParseArgument(parser, arg))
54 {
55 parser.ReportErrorArgument(arg);
56 }
57 }
58
59 return command ?? new HelpCommand(this.extensions);
60 }
61
62 public bool TryParseUnknownCommandArg(string arg, ICommandLineParser parser, out ICommandLineCommand command)
63 {
64 command = null;
65
66 if (parser.IsSwitch(arg))
67 {
68 var parameter = arg.Substring(1);
69 switch (parameter.ToLowerInvariant())
70 {
71 case "?":
72 case "h":
73 case "help":
74 command = new HelpCommand(this.extensions);
75 return true;
76 }
77 }
78
79 foreach (var heatExtension in this.extensions)
80 {
81 if (heatExtension.CommandLineTypes.Any(o => o.Option == arg))
82 {
83 command = new HeatCommand(arg, this.extensions, this.serviceProvider);
84 return true;
85 }
86 }
87
88 return false;
89 }
90 }
91}
diff --git a/src/wix/heat/HeatCommandLineFactory.cs b/src/wix/heat/HeatCommandLineFactory.cs
new file mode 100644
index 00000000..44291e48
--- /dev/null
+++ b/src/wix/heat/HeatCommandLineFactory.cs
@@ -0,0 +1,27 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections.Generic;
7 using WixToolset.Extensibility.Services;
8 using WixToolset.Harvesters.Data;
9 using WixToolset.Harvesters.Extensibility;
10
11 /// <summary>
12 /// Extension methods to use Harvesters services.
13 /// </summary>
14 public class HeatCommandLineFactory
15 {
16 /// <summary>
17 /// Creates <see cref="IHeatCommandLine"/> service.
18 /// </summary>
19 /// <param name="serviceProvider"></param>
20 /// <param name="heatExtensions"></param>
21 /// <returns></returns>
22 public static IHeatCommandLine CreateCommandLine(IServiceProvider serviceProvider, IEnumerable<IHeatExtension> heatExtensions = null)
23 {
24 return new HeatCommandLine(serviceProvider, heatExtensions);
25 }
26 }
27}
diff --git a/src/wix/heat/HeatCore.cs b/src/wix/heat/HeatCore.cs
new file mode 100644
index 00000000..578c4aab
--- /dev/null
+++ b/src/wix/heat/HeatCore.cs
@@ -0,0 +1,45 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using WixToolset.Extensibility.Services;
7 using WixToolset.Harvesters.Extensibility;
8
9 /// <summary>
10 /// The WiX Toolset Harvester application core.
11 /// </summary>
12 internal class HeatCore : IHeatCore
13 {
14 /// <summary>
15 /// Instantiates a new HeatCore.
16 /// </summary>
17 /// <param name="serviceProvider">The service provider.</param>
18 /// <param name="extensionArgument">The extension argument.</param>
19 public HeatCore(IServiceProvider serviceProvider, string extensionArgument)
20 {
21 this.Messaging = serviceProvider.GetService<IMessaging>();
22 var harvesterCore = new HarvesterCore
23 {
24 ExtensionArgument = extensionArgument,
25 Messaging = this.Messaging,
26 ParseHelper = serviceProvider.GetService<IParseHelper>(),
27 };
28
29 this.Harvester = new Harvester
30 {
31 Core = harvesterCore,
32 };
33 this.Mutator = new Mutator
34 {
35 Core = harvesterCore,
36 };
37 }
38
39 public IHarvester Harvester { get; }
40
41 public IMessaging Messaging { get; }
42
43 public IMutator Mutator { get; }
44 }
45}
diff --git a/src/wix/heat/HelpCommand.cs b/src/wix/heat/HelpCommand.cs
new file mode 100644
index 00000000..bd2bcc24
--- /dev/null
+++ b/src/wix/heat/HelpCommand.cs
@@ -0,0 +1,97 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections;
7 using System.Collections.Generic;
8 using System.Diagnostics;
9 using System.Threading;
10 using System.Threading.Tasks;
11 using WixToolset.Extensibility.Data;
12 using WixToolset.Extensibility.Services;
13 using WixToolset.Harvesters.Data;
14 using WixToolset.Harvesters.Extensibility;
15
16 internal class HelpCommand : ICommandLineCommand
17 {
18 const string HelpMessageOptionFormat = " {0,-7} {1}";
19
20 public HelpCommand(IList<IHeatExtension> extensions)
21 {
22 this.Extensions = extensions;
23 }
24
25 private IList<IHeatExtension> Extensions { get; }
26
27 public bool ShowLogo => false;
28
29 public bool StopParsing => true;
30
31 public Task<int> ExecuteAsync(CancellationToken cancellationToken)
32 {
33 var exitCode = this.DisplayHelp();
34 return Task.FromResult(exitCode);
35 }
36
37 public static void DisplayToolHeader()
38 {
39 var wixcopAssembly = typeof(HelpCommand).Assembly;
40 var fv = FileVersionInfo.GetVersionInfo(wixcopAssembly.Location);
41
42 Console.WriteLine("WiX Toolset Harvester version {0}", fv.FileVersion);
43 Console.WriteLine("Copyright (C) .NET Foundation and contributors. All rights reserved.");
44 Console.WriteLine();
45 }
46
47 public bool TryParseArgument(ICommandLineParser parser, string argument) => true;
48
49 private int DisplayHelp()
50 {
51 DisplayToolHeader();
52
53 // output the harvest types alphabetically
54 SortedList harvestOptions = new SortedList();
55 foreach (var heatExtension in this.Extensions)
56 {
57 foreach (HeatCommandLineOption commandLineOption in heatExtension.CommandLineTypes)
58 {
59 harvestOptions.Add(commandLineOption.Option, commandLineOption);
60 }
61 }
62
63 harvestOptions.Add("-nologo", new HeatCommandLineOption("-nologo", "skip printing heat logo information"));
64 harvestOptions.Add("-indent <N>", new HeatCommandLineOption("-indent <N>", "indentation multiple (overrides default of 4)"));
65 harvestOptions.Add("-o[ut]", new HeatCommandLineOption("-out", "specify output file (default: write to current directory)"));
66 harvestOptions.Add("-sw<N>", new HeatCommandLineOption("-sw<N>", "suppress all warnings or a specific message ID\r\n (example: -sw1011 -sw1012)"));
67 harvestOptions.Add("-swall", new HeatCommandLineOption("-swall", "suppress all warnings (deprecated)"));
68 harvestOptions.Add("-v", new HeatCommandLineOption("-v", "verbose output"));
69 harvestOptions.Add("-wx[N]", new HeatCommandLineOption("-wx[N]", "treat all warnings or a specific message ID as an error\r\n (example: -wx1011 -wx1012)"));
70 harvestOptions.Add("-wxall", new HeatCommandLineOption("-wxall", "treat all warnings as errors (deprecated)"));
71
72 foreach (HeatCommandLineOption commandLineOption in harvestOptions.Values)
73 {
74 if (!commandLineOption.Option.StartsWith("-"))
75 {
76 Console.WriteLine(HelpMessageOptionFormat, commandLineOption.Option, commandLineOption.Description);
77 }
78 }
79
80 Console.WriteLine();
81 Console.WriteLine("Options:");
82
83 foreach (HeatCommandLineOption commandLineOption in harvestOptions.Values)
84 {
85 if (commandLineOption.Option.StartsWith("-"))
86 {
87 Console.WriteLine(HelpMessageOptionFormat, commandLineOption.Option, commandLineOption.Description);
88 }
89 }
90
91 Console.WriteLine(HelpMessageOptionFormat, "-? | -help", "this help information");
92 Console.WriteLine("For more information see: https://wixtoolset.org/");
93
94 return 0;
95 }
96 }
97}
diff --git a/src/wix/heat/IIsFinalizeHarvesterMutator.cs b/src/wix/heat/IIsFinalizeHarvesterMutator.cs
new file mode 100644
index 00000000..17d3bef4
--- /dev/null
+++ b/src/wix/heat/IIsFinalizeHarvesterMutator.cs
@@ -0,0 +1,160 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections;
7 using System.Collections.Specialized;
8 using WixToolset.Harvesters.Data;
9 using WixToolset.Harvesters.Extensibility;
10 using Wix = WixToolset.Harvesters.Serialize;
11 using IIs = Serialize.IIs;
12
13 /// <summary>
14 /// The finalize harvester mutator for the WiX Toolset Internet Information Services Extension.
15 /// </summary>
16 internal class IIsFinalizeHarvesterMutator : BaseMutatorExtension
17 {
18 private Hashtable directoryPaths;
19 private Hashtable filePaths;
20 private ArrayList webFilters;
21 private ArrayList webSites;
22 private ArrayList webVirtualDirs;
23
24 /// <summary>
25 /// Instantiate a new IIsFinalizeHarvesterMutator.
26 /// </summary>
27 public IIsFinalizeHarvesterMutator()
28 {
29 this.directoryPaths = CollectionsUtil.CreateCaseInsensitiveHashtable();
30 this.filePaths = CollectionsUtil.CreateCaseInsensitiveHashtable();
31 this.webFilters = new ArrayList();
32 this.webSites = new ArrayList();
33 this.webVirtualDirs = new ArrayList();
34 }
35
36 /// <summary>
37 /// Gets the sequence of this mutator extension.
38 /// </summary>
39 /// <value>The sequence of this mutator extension.</value>
40 public override int Sequence
41 {
42 get { return 1900; }
43 }
44
45 /// <summary>
46 /// Mutate a WiX document.
47 /// </summary>
48 /// <param name="wix">The Wix document element.</param>
49 public override void Mutate(Wix.Wix wix)
50 {
51 this.directoryPaths.Clear();
52 this.filePaths.Clear();
53 this.webFilters.Clear();
54 this.webSites.Clear();
55 this.webVirtualDirs.Clear();
56
57 this.IndexElement(wix);
58
59 this.MutateWebFilters();
60 this.MutateWebSites();
61 this.MutateWebVirtualDirs();
62 }
63
64 /// <summary>
65 /// Index an element.
66 /// </summary>
67 /// <param name="element">The element to index.</param>
68 private void IndexElement(Wix.ISchemaElement element)
69 {
70 if (element is IIs.WebFilter)
71 {
72 this.webFilters.Add(element);
73 }
74 else if (element is IIs.WebSite)
75 {
76 this.webSites.Add(element);
77 }
78 else if (element is IIs.WebVirtualDir)
79 {
80 this.webVirtualDirs.Add(element);
81 }
82 else if (element is Wix.Directory)
83 {
84 Wix.Directory directory = (Wix.Directory)element;
85
86 if (null != directory.Id && null != directory.FileSource)
87 {
88 this.directoryPaths.Add(directory.FileSource, directory.Id);
89 }
90 }
91 else if (element is Wix.File)
92 {
93 Wix.File file = (Wix.File)element;
94
95 if (null != file.Id && null != file.Source)
96 {
97 this.filePaths[file.Source] = String.Concat("[#", file.Id, "]");
98 }
99 }
100
101 // index the child elements
102 if (element is Wix.IParentElement)
103 {
104 foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children)
105 {
106 this.IndexElement(childElement);
107 }
108 }
109 }
110
111 /// <summary>
112 /// Mutate the WebFilters.
113 /// </summary>
114 private void MutateWebFilters()
115 {
116 foreach (IIs.WebFilter webFilter in this.webFilters)
117 {
118 webFilter.Path = (string)this.filePaths[webFilter.Path];
119 }
120 }
121
122 /// <summary>
123 /// Mutate the WebSites.
124 /// </summary>
125 private void MutateWebSites()
126 {
127 foreach (IIs.WebSite webSite in this.webSites)
128 {
129 string path = (string)this.directoryPaths[webSite.Directory];
130 if (null == path)
131 {
132 this.Core.Messaging.Write(HarvesterWarnings.EncounteredNullDirectoryForWebSite(path));
133 }
134 else
135 {
136 webSite.Directory = path;
137 }
138 }
139 }
140
141 /// <summary>
142 /// Mutate the WebVirtualDirs.
143 /// </summary>
144 private void MutateWebVirtualDirs()
145 {
146 foreach (IIs.WebVirtualDir webVirtualDir in this.webVirtualDirs)
147 {
148 string path = (string)this.directoryPaths[webVirtualDir.Directory];
149 if (null == path)
150 {
151 this.Core.Messaging.Write(HarvesterWarnings.EncounteredNullDirectoryForWebSite(path));
152 }
153 else
154 {
155 webVirtualDir.Directory = path;
156 }
157 }
158 }
159 }
160}
diff --git a/src/wix/heat/IIsHarvesterMutator.cs b/src/wix/heat/IIsHarvesterMutator.cs
new file mode 100644
index 00000000..76d94b6a
--- /dev/null
+++ b/src/wix/heat/IIsHarvesterMutator.cs
@@ -0,0 +1,429 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections;
7 using System.Collections.Specialized;
8 using System.IO;
9 using WixToolset.Harvesters.Extensibility;
10 using IIs = Serialize.IIs;
11 using Wix = WixToolset.Harvesters.Serialize;
12
13 /// <summary>
14 /// The harvester mutator for the WiX Toolset Internet Information Services Extension.
15 /// </summary>
16 internal class IIsHarvesterMutator : BaseMutatorExtension
17 {
18 private ArrayList components;
19 private DirectoryHarvester directoryHarvester;
20 private Hashtable directoryPaths;
21 private FileHarvester fileHarvester;
22 private Wix.IParentElement rootElement;
23 private bool setUniqueIdentifiers;
24 private ArrayList webAddresses;
25 private ArrayList webDirs;
26 private ArrayList webDirProperties;
27 private ArrayList webFilters;
28 private ArrayList webSites;
29 private ArrayList webVirtualDirs;
30
31 /// <summary>
32 /// Instantiate a new IIsHarvesterMutator.
33 /// </summary>
34 public IIsHarvesterMutator()
35 {
36 this.components = new ArrayList();
37 this.directoryHarvester = new DirectoryHarvester();
38 this.directoryPaths = CollectionsUtil.CreateCaseInsensitiveHashtable();
39 this.fileHarvester = new FileHarvester();
40 this.webAddresses = new ArrayList();
41 this.webDirs = new ArrayList();
42 this.webDirProperties = new ArrayList();
43 this.webFilters = new ArrayList();
44 this.webSites = new ArrayList();
45 this.webVirtualDirs = new ArrayList();
46 }
47
48 /// <summary>
49 /// Gets the sequence of this mutator extension.
50 /// </summary>
51 /// <value>The sequence of this mutator extension.</value>
52 public override int Sequence
53 {
54 get { return 100; }
55 }
56
57 /// <summary>
58 /// Gets of sets the option to set unique identifiers.
59 /// </summary>
60 /// <value>The option to set unique identifiers.</value>
61 public bool SetUniqueIdentifiers
62 {
63 get { return this.setUniqueIdentifiers; }
64 set { this.setUniqueIdentifiers = value; }
65 }
66
67 /// <summary>
68 /// Mutate a WiX document.
69 /// </summary>
70 /// <param name="wix">The Wix document element.</param>
71 public override void Mutate(Wix.Wix wix)
72 {
73 this.components.Clear();
74 this.directoryPaths.Clear();
75 this.webAddresses.Clear();
76 this.webDirs.Clear();
77 this.webDirProperties.Clear();
78 this.webFilters.Clear();
79 this.webSites.Clear();
80 this.webVirtualDirs.Clear();
81 this.rootElement = null;
82
83 this.IndexElement(wix);
84
85 this.MutateWebAddresses();
86
87 this.MutateWebDirs();
88
89 this.MutateWebDirProperties();
90
91 this.MutateWebSites();
92
93 this.MutateWebVirtualDirs();
94
95 // this must come after the web virtual dirs in case they harvest a directory containing a web filter file
96 this.MutateWebFilters();
97
98 // this must come after the web site identifiers are created
99 this.MutateComponents();
100 }
101
102 /// <summary>
103 /// Harvest a new directory or return one that was previously harvested.
104 /// </summary>
105 /// <param name="path">The path of the directory.</param>
106 /// <param name="harvestChildren">The option to harvest the children of the directory.</param>
107 /// <returns>The harvested directory.</returns>
108 private Wix.Directory HarvestUniqueDirectory(string path, bool harvestChildren)
109 {
110 if (this.directoryPaths.Contains(path))
111 {
112 return (Wix.Directory)this.directoryPaths[path];
113 }
114 else
115 {
116 Wix.Directory directory = this.directoryHarvester.HarvestDirectory(path, harvestChildren);
117
118 this.rootElement.AddChild(directory);
119
120 // index this new directory and all of its children
121 this.IndexElement(directory);
122
123 return directory;
124 }
125 }
126
127 /// <summary>
128 /// Index an element.
129 /// </summary>
130 /// <param name="element">The element to index.</param>
131 private void IndexElement(Wix.ISchemaElement element)
132 {
133 if (element is IIs.WebAddress)
134 {
135 this.webAddresses.Add(element);
136 }
137 else if (element is IIs.WebDir)
138 {
139 this.webDirs.Add(element);
140 }
141 else if (element is IIs.WebDirProperties)
142 {
143 this.webDirProperties.Add(element);
144 }
145 else if (element is IIs.WebFilter)
146 {
147 this.webFilters.Add(element);
148 }
149 else if (element is IIs.WebSite)
150 {
151 this.webSites.Add(element);
152 }
153 else if (element is IIs.WebVirtualDir)
154 {
155 this.webVirtualDirs.Add(element);
156 }
157 else if (element is Wix.Component)
158 {
159 this.components.Add(element);
160 }
161 else if (element is Wix.Directory)
162 {
163 Wix.Directory directory = (Wix.Directory)element;
164
165 if (null != directory.FileSource)
166 {
167 this.directoryPaths.Add(directory.FileSource, directory);
168 }
169 }
170 else if (element is Wix.Fragment || element is Wix.Module || element is Wix.PatchCreation || element is Wix.Package)
171 {
172 this.rootElement = (Wix.IParentElement)element;
173 }
174
175 // index the child elements
176 if (element is Wix.IParentElement)
177 {
178 foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children)
179 {
180 this.IndexElement(childElement);
181 }
182 }
183 }
184
185 /// <summary>
186 /// Mutate the Component elements.
187 /// </summary>
188 private void MutateComponents()
189 {
190 if (this.setUniqueIdentifiers)
191 {
192 IdentifierGenerator identifierGenerator = new IdentifierGenerator("Component", this.Core);
193
194 // index all the existing identifiers
195 foreach (Wix.Component component in this.components)
196 {
197 if (null != component.Id)
198 {
199 identifierGenerator.IndexExistingIdentifier(component.Id);
200 }
201 }
202
203 // index all the web site identifiers
204 foreach (IIs.WebSite webSite in this.webSites)
205 {
206 if (webSite.ParentElement is Wix.Component)
207 {
208 identifierGenerator.IndexName(webSite.Id);
209 }
210 }
211
212 // create an identifier for each component based on its child web site identifier
213 foreach (IIs.WebSite webSite in this.webSites)
214 {
215 Wix.Component component = webSite.ParentElement as Wix.Component;
216
217 if (null != component)
218 {
219 component.Id = identifierGenerator.GetIdentifier(webSite.Id);
220 }
221 }
222 }
223 }
224
225 /// <summary>
226 /// Mutate the WebAddress elements.
227 /// </summary>
228 private void MutateWebAddresses()
229 {
230 if (this.setUniqueIdentifiers)
231 {
232 IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebAddress", this.Core);
233
234 // index all the existing identifiers and names
235 foreach (IIs.WebAddress webAddress in this.webAddresses)
236 {
237 if (null != webAddress.Id)
238 {
239 identifierGenerator.IndexExistingIdentifier(webAddress.Id);
240 }
241 else
242 {
243 identifierGenerator.IndexName(String.Concat(webAddress.IP, "_", webAddress.Port));
244 }
245 }
246
247 foreach (IIs.WebAddress webAddress in this.webAddresses)
248 {
249 if (null == webAddress.Id)
250 {
251 webAddress.Id = identifierGenerator.GetIdentifier(String.Concat(webAddress.IP, "_", webAddress.Port));
252 }
253 }
254 }
255 }
256
257 /// <summary>
258 /// Mutate the WebDir elements.
259 /// </summary>
260 private void MutateWebDirs()
261 {
262 if (this.setUniqueIdentifiers)
263 {
264 IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebDir", this.Core);
265
266 // index all the existing identifiers and names
267 foreach (IIs.WebDir webDir in this.webDirs)
268 {
269 if (null != webDir.Id)
270 {
271 identifierGenerator.IndexExistingIdentifier(webDir.Id);
272 }
273 else
274 {
275 identifierGenerator.IndexName(webDir.Path);
276 }
277 }
278
279 foreach (IIs.WebDir webDir in this.webDirs)
280 {
281 if (null == webDir.Id)
282 {
283 webDir.Id = identifierGenerator.GetIdentifier(webDir.Path);
284 }
285 }
286 }
287 }
288
289 /// <summary>
290 /// Mutate the WebDirProperties elements.
291 /// </summary>
292 private void MutateWebDirProperties()
293 {
294 if (this.setUniqueIdentifiers)
295 {
296 IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebDirProperties", this.Core);
297
298 // index all the existing identifiers and names
299 foreach (IIs.WebDirProperties webDirProperties in this.webDirProperties)
300 {
301 if (null != webDirProperties.Id)
302 {
303 identifierGenerator.IndexExistingIdentifier(webDirProperties.Id);
304 }
305 }
306
307 foreach (IIs.WebDirProperties webDirProperties in this.webDirProperties)
308 {
309 if (null == webDirProperties.Id)
310 {
311 webDirProperties.Id = identifierGenerator.GetIdentifier(String.Empty);
312 }
313 }
314 }
315 }
316
317 /// <summary>
318 /// Mutate the WebFilter elements.
319 /// </summary>
320 private void MutateWebFilters()
321 {
322 IdentifierGenerator identifierGenerator = null;
323
324 if (this.setUniqueIdentifiers)
325 {
326 identifierGenerator = new IdentifierGenerator("WebFilter", this.Core);
327
328 // index all the existing identifiers and names
329 foreach (IIs.WebFilter webFilter in this.webFilters)
330 {
331 if (null != webFilter.Id)
332 {
333 identifierGenerator.IndexExistingIdentifier(webFilter.Id);
334 }
335 else
336 {
337 identifierGenerator.IndexName(webFilter.Name);
338 }
339 }
340 }
341
342 foreach (IIs.WebFilter webFilter in this.webFilters)
343 {
344 if (this.setUniqueIdentifiers && null == webFilter.Id)
345 {
346 webFilter.Id = identifierGenerator.GetIdentifier(webFilter.Name);
347 }
348
349 // harvest the file for this WebFilter
350 Wix.Directory directory = this.HarvestUniqueDirectory(Path.GetDirectoryName(webFilter.Path), false);
351
352 Wix.Component component = new Wix.Component();
353 directory.AddChild(component);
354
355 Wix.File file = this.fileHarvester.HarvestFile(webFilter.Path);
356 component.AddChild(file);
357 }
358 }
359
360 /// <summary>
361 /// Mutate the WebSite elements.
362 /// </summary>
363 private void MutateWebSites()
364 {
365 if (this.setUniqueIdentifiers)
366 {
367 IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebSite", this.Core);
368
369 // index all the existing identifiers and names
370 foreach (IIs.WebSite webSite in this.webSites)
371 {
372 if (null != webSite.Id)
373 {
374 identifierGenerator.IndexExistingIdentifier(webSite.Id);
375 }
376 else
377 {
378 identifierGenerator.IndexName(webSite.Description);
379 }
380 }
381
382 foreach (IIs.WebSite webSite in this.webSites)
383 {
384 if (null == webSite.Id)
385 {
386 webSite.Id = identifierGenerator.GetIdentifier(webSite.Description);
387 }
388 }
389 }
390 }
391
392 /// <summary>
393 /// Mutate the WebVirtualDir elements.
394 /// </summary>
395 private void MutateWebVirtualDirs()
396 {
397 IdentifierGenerator identifierGenerator = null;
398
399 if (this.setUniqueIdentifiers)
400 {
401 identifierGenerator = new IdentifierGenerator("WebVirtualDir", this.Core);
402
403 // index all the existing identifiers and names
404 foreach (IIs.WebVirtualDir webVirtualDir in this.webVirtualDirs)
405 {
406 if (null != webVirtualDir.Id)
407 {
408 identifierGenerator.IndexExistingIdentifier(webVirtualDir.Id);
409 }
410 else
411 {
412 identifierGenerator.IndexName(webVirtualDir.Alias);
413 }
414 }
415 }
416
417 foreach (IIs.WebVirtualDir webVirtualDir in this.webVirtualDirs)
418 {
419 if (this.setUniqueIdentifiers && null == webVirtualDir.Id)
420 {
421 webVirtualDir.Id = identifierGenerator.GetIdentifier(webVirtualDir.Alias);
422 }
423
424 // harvest the directory for this WebVirtualDir
425 this.HarvestUniqueDirectory(webVirtualDir.Directory, true);
426 }
427 }
428 }
429}
diff --git a/src/wix/heat/IIsHeatExtension.cs b/src/wix/heat/IIsHeatExtension.cs
new file mode 100644
index 00000000..94e11a68
--- /dev/null
+++ b/src/wix/heat/IIsHeatExtension.cs
@@ -0,0 +1,80 @@
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
3namespace WixToolset.Harvesters
4{
5 using WixToolset.Harvesters.Data;
6 using WixToolset.Harvesters.Extensibility;
7
8 /// <summary>
9 /// An IIS harvesting extension for the WiX Toolset Harvester application.
10 /// </summary>
11 internal class IIsHeatExtension : BaseHeatExtension
12 {
13 /// <summary>
14 /// Gets the supported command line types for this extension.
15 /// </summary>
16 /// <value>The supported command line types for this extension.</value>
17 public override HeatCommandLineOption[] CommandLineTypes
18 {
19 get
20 {
21 return new HeatCommandLineOption[]
22 {
23 new HeatCommandLineOption("website", "harvest an IIS web site"),
24 };
25 }
26 }
27
28 /// <summary>
29 /// Parse the command line options for this extension.
30 /// </summary>
31 /// <param name="type">The active harvester type.</param>
32 /// <param name="args">The option arguments.</param>
33 public override void ParseOptions(string type, string[] args)
34 {
35 bool active = false;
36 IHarvesterExtension harvesterExtension = null;
37 IIsHarvesterMutator iisHarvesterMutator = new IIsHarvesterMutator();
38
39 // select the harvester
40 switch (type)
41 {
42 case "website":
43 harvesterExtension = new IIsWebSiteHarvester();
44 active = true;
45 break;
46 }
47
48 // set default settings
49 iisHarvesterMutator.SetUniqueIdentifiers = true;
50
51 // parse the options
52 foreach (string arg in args)
53 {
54 if (null == arg || 0 == arg.Length) // skip blank arguments
55 {
56 continue;
57 }
58
59 if ('-' == arg[0] || '/' == arg[0])
60 {
61 string parameter = arg.Substring(1);
62
63 if ("suid" == parameter)
64 {
65 iisHarvesterMutator.SetUniqueIdentifiers = false;
66 }
67 }
68 }
69
70 // set the appropriate harvester extension
71 if (active)
72 {
73 this.Core.Harvester.Extension = harvesterExtension;
74 this.Core.Mutator.AddExtension(iisHarvesterMutator);
75 this.Core.Mutator.AddExtension(new IIsFinalizeHarvesterMutator());
76 this.Core.Mutator.AddExtension(new UtilFinalizeHarvesterMutator());
77 }
78 }
79 }
80}
diff --git a/src/wix/heat/IIsWebSiteHarvester.cs b/src/wix/heat/IIsWebSiteHarvester.cs
new file mode 100644
index 00000000..86861b16
--- /dev/null
+++ b/src/wix/heat/IIsWebSiteHarvester.cs
@@ -0,0 +1,439 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.DirectoryServices;
7 using System.Globalization;
8 using System.Runtime.InteropServices;
9 using WixToolset.Data;
10 using WixToolset.Harvesters.Data;
11 using WixToolset.Harvesters.Extensibility;
12 using IIs = WixToolset.Harvesters.Serialize.IIs;
13 using Wix = WixToolset.Harvesters.Serialize;
14
15 /// <summary>
16 /// The web site harvester for the WiX Toolset Internet Information Services Extension.
17 /// </summary>
18 internal class IIsWebSiteHarvester : BaseHarvesterExtension
19 {
20 /// <summary>
21 /// Harvest a WiX document.
22 /// </summary>
23 /// <param name="argument">The argument for harvesting.</param>
24 /// <returns>The harvested Fragment.</returns>
25 public override Wix.Fragment[] Harvest(string argument)
26 {
27 DirectoryHarvester directoryHarvester = new DirectoryHarvester();
28 directoryHarvester.Core = this.Core;
29 directoryHarvester.KeepEmptyDirectories = true;
30
31 IIsWebSiteHarvester iisWebSiteHarvester = new IIsWebSiteHarvester();
32 iisWebSiteHarvester.Core = this.Core;
33
34 IIs.WebSite webSite = iisWebSiteHarvester.HarvestWebSite(argument);
35
36 Wix.Component component = new Wix.Component();
37 component.AddChild(new Wix.CreateFolder());
38 component.AddChild(webSite);
39
40 this.Core.RootDirectory = webSite.Directory;
41 Wix.Directory directory = directoryHarvester.HarvestDirectory(webSite.Directory, true);
42 directory.AddChild(component);
43
44 Wix.Fragment fragment = new Wix.Fragment();
45 fragment.AddChild(directory);
46
47 return new Wix.Fragment[] { fragment };
48 }
49
50 /// <summary>
51 /// Harvest a web site.
52 /// </summary>
53 /// <param name="name">The name of the web site.</param>
54 /// <returns>The harvested web site.</returns>
55 public IIs.WebSite HarvestWebSite(string name)
56 {
57 try
58 {
59 DirectoryEntry directoryEntry = new DirectoryEntry("IIS://localhost/W3SVC");
60
61 foreach (DirectoryEntry childEntry in directoryEntry.Children)
62 {
63 if ("IIsWebServer" == childEntry.SchemaClassName)
64 {
65 if (String.Equals((string)childEntry.Properties["ServerComment"].Value, name, StringComparison.OrdinalIgnoreCase))
66 {
67 return this.HarvestWebSite(childEntry);
68 }
69 }
70 }
71 }
72 catch (COMException ce)
73 {
74 // 0x8007005 - access denied
75 // If we don't have permission to harvest a website, it's likely because we're on
76 // Vista or higher and aren't an Admin.
77 if ((0x80070005 == unchecked((uint)ce.ErrorCode)))
78 {
79 throw new WixException(HarvesterErrors.InsufficientPermissionHarvestWebSite());
80 }
81 // 0x80005000 - unknown error
82 else if ((0x80005000 == unchecked((uint)ce.ErrorCode)))
83 {
84 throw new WixException(HarvesterErrors.CannotHarvestWebSite());
85 }
86 }
87
88 throw new WixException(HarvesterErrors.WebSiteNotFound(name));
89 }
90
91 /// <summary>
92 /// Harvest a web site.
93 /// </summary>
94 /// <param name="webSiteEntry">The web site directory entry.</param>
95 /// <returns>The harvested web site.</returns>
96 private IIs.WebSite HarvestWebSite(DirectoryEntry webSiteEntry)
97 {
98 IIs.WebSite webSite = new IIs.WebSite();
99
100 foreach (string propertyName in webSiteEntry.Properties.PropertyNames)
101 {
102 PropertyValueCollection property = webSiteEntry.Properties[propertyName];
103 PropertyValueCollection parentProperty = webSiteEntry.Parent.Properties[propertyName];
104
105 if (null == parentProperty.Value || parentProperty.Value.ToString() != property.Value.ToString())
106 {
107 switch (propertyName)
108 {
109 case "SecureBindings":
110 IIs.WebAddress secureWebAddress = this.HarvestBindings(propertyName, property);
111 if (null != secureWebAddress)
112 {
113 webSite.AddChild(secureWebAddress);
114 }
115 break;
116 case "ServerBindings":
117 IIs.WebAddress webAddress = this.HarvestBindings(propertyName, property);
118 if (null != webAddress)
119 {
120 webSite.AddChild(webAddress);
121 }
122 break;
123 case "ServerComment":
124 webSite.Description = (string)property.Value;
125 break;
126 }
127 }
128 }
129
130 foreach (DirectoryEntry childEntry in webSiteEntry.Children)
131 {
132 switch (childEntry.SchemaClassName)
133 {
134 case "IIsFilters":
135 string loadOrder = (string)childEntry.Properties["FilterLoadOrder"].Value;
136 if (loadOrder.Length > 0)
137 {
138 string[] filterNames = loadOrder.Split(",".ToCharArray());
139
140 for (int i = 0; i < filterNames.Length; i++)
141 {
142 using (DirectoryEntry webFilterEntry = new DirectoryEntry(String.Concat(childEntry.Path, '/', filterNames[i])))
143 {
144 IIs.WebFilter webFilter = this.HarvestWebFilter(webFilterEntry);
145
146 webFilter.LoadOrder = (i + 1).ToString(CultureInfo.InvariantCulture);
147
148 webSite.AddChild(webFilter);
149 }
150 }
151 }
152 break;
153 case "IIsWebDirectory":
154 this.HarvestWebDirectory(childEntry, webSite);
155 break;
156 case "IIsWebVirtualDir":
157 foreach (string propertyName in childEntry.Properties.PropertyNames)
158 {
159 PropertyValueCollection property = childEntry.Properties[propertyName];
160
161 switch (propertyName)
162 {
163 case "Path":
164 webSite.Directory = (string)property.Value;
165 break;
166 }
167 }
168
169 IIs.WebDirProperties webDirProps = this.HarvestWebDirProperties(childEntry);
170 if (null != webDirProps)
171 {
172 webSite.AddChild(webDirProps);
173 }
174
175 foreach (DirectoryEntry child2Entry in childEntry.Children)
176 {
177 switch (child2Entry.SchemaClassName)
178 {
179 case "IIsWebDirectory":
180 this.HarvestWebDirectory(child2Entry, webSite);
181 break;
182 case "IIsWebVirtualDir":
183 this.HarvestWebVirtualDir(child2Entry, webSite);
184 break;
185 }
186 }
187 break;
188 }
189 }
190
191 return webSite;
192 }
193
194 /// <summary>
195 /// Harvest bindings.
196 /// </summary>
197 /// <param name="propertyName">The property name of the bindings property.</param>
198 /// <param name="bindingsProperty">The bindings property.</param>
199 /// <returns>The harvested bindings.</returns>
200 private IIs.WebAddress HarvestBindings(string propertyName, PropertyValueCollection bindingsProperty)
201 {
202 if (1 == bindingsProperty.Count)
203 {
204 IIs.WebAddress webAddress = new IIs.WebAddress();
205
206 string[] bindings = ((string)bindingsProperty[0]).Split(":".ToCharArray());
207
208 if (0 < bindings[0].Length)
209 {
210 webAddress.IP = bindings[0];
211 }
212
213 if (0 < bindings[1].Length)
214 {
215 webAddress.Port = bindings[1];
216 }
217
218 if (0 < bindings[2].Length)
219 {
220 webAddress.Header = bindings[2];
221 }
222
223 if ("SecureBindings" == propertyName)
224 {
225 webAddress.Secure = IIs.YesNoType.yes;
226 }
227
228 return webAddress;
229 }
230
231 return null;
232 }
233
234 /// <summary>
235 /// Harvest a web directory.
236 /// </summary>
237 /// <param name="webDirectoryEntry">The web directory directory entry.</param>
238 /// <param name="webSite">The parent web site.</param>
239 private void HarvestWebDirectory(DirectoryEntry webDirectoryEntry, IIs.WebSite webSite)
240 {
241 foreach (DirectoryEntry childEntry in webDirectoryEntry.Children)
242 {
243 switch (childEntry.SchemaClassName)
244 {
245 case "IIsWebDirectory":
246 this.HarvestWebDirectory(childEntry, webSite);
247 break;
248 case "IIsWebVirtualDir":
249 this.HarvestWebVirtualDir(childEntry, webSite);
250 break;
251 }
252 }
253
254 IIs.WebDirProperties webDirProperties = this.HarvestWebDirProperties(webDirectoryEntry);
255
256 if (null != webDirProperties)
257 {
258 IIs.WebDir webDir = new IIs.WebDir();
259
260 int indexOfRoot = webDirectoryEntry.Path.IndexOf("ROOT/", StringComparison.OrdinalIgnoreCase);
261 webDir.Path = webDirectoryEntry.Path.Substring(indexOfRoot + 5);
262
263 webDir.AddChild(webDirProperties);
264
265 webSite.AddChild(webDir);
266 }
267 }
268
269 /// <summary>
270 /// Harvest a web filter.
271 /// </summary>
272 /// <param name="webFilterEntry">The web filter directory entry.</param>
273 /// <returns>The harvested web filter.</returns>
274 private IIs.WebFilter HarvestWebFilter(DirectoryEntry webFilterEntry)
275 {
276 IIs.WebFilter webFilter = new IIs.WebFilter();
277
278 webFilter.Name = webFilterEntry.Name;
279
280 foreach (string propertyName in webFilterEntry.Properties.PropertyNames)
281 {
282 PropertyValueCollection property = webFilterEntry.Properties[propertyName];
283
284 switch (propertyName)
285 {
286 case "FilterDescription":
287 webFilter.Description = (string)property.Value;
288 break;
289 case "FilterFlags":
290 webFilter.Flags = (int)property.Value;
291 break;
292 case "FilterPath":
293 webFilter.Path = (string)property.Value;
294 break;
295 }
296 }
297
298 return webFilter;
299 }
300
301 /// <summary>
302 /// Harvest a web directory's properties.
303 /// </summary>
304 /// <param name="directoryEntry">The web directory directory entry.</param>
305 /// <returns>The harvested web directory's properties.</returns>
306 private IIs.WebDirProperties HarvestWebDirProperties(DirectoryEntry directoryEntry)
307 {
308 bool foundProperties = false;
309 IIs.WebDirProperties webDirProperties = new IIs.WebDirProperties();
310
311 // Cannot read properties for "iisadmin" site.
312 if (String.Equals("iisadmin", directoryEntry.Name, StringComparison.OrdinalIgnoreCase) &&
313 String.Equals("ROOT", directoryEntry.Parent.Name, StringComparison.OrdinalIgnoreCase))
314 {
315 return null;
316 }
317
318 foreach (string propertyName in directoryEntry.Properties.PropertyNames)
319 {
320 PropertyValueCollection property = directoryEntry.Properties[propertyName];
321 PropertyValueCollection parentProperty = directoryEntry.Parent.Properties[propertyName];
322
323 if (null == parentProperty.Value || parentProperty.Value.ToString() != property.Value.ToString())
324 {
325 switch (propertyName)
326 {
327 case "AccessFlags":
328 int access = (int)property.Value;
329
330 if (0x1 == (access & 0x1))
331 {
332 webDirProperties.Read = IIs.YesNoType.yes;
333 }
334
335 if (0x2 == (access & 0x2))
336 {
337 webDirProperties.Write = IIs.YesNoType.yes;
338 }
339
340 if (0x4 == (access & 0x4))
341 {
342 webDirProperties.Execute = IIs.YesNoType.yes;
343 }
344
345 if (0x200 == (access & 0x200))
346 {
347 webDirProperties.Script = IIs.YesNoType.yes;
348 }
349
350 foundProperties = true;
351 break;
352 case "AuthFlags":
353 int authorization = (int)property.Value;
354
355 if (0x1 == (authorization & 0x1))
356 {
357 webDirProperties.AnonymousAccess = IIs.YesNoType.yes;
358 }
359
360 if (0x2 == (authorization & 0x2))
361 {
362 webDirProperties.BasicAuthentication = IIs.YesNoType.yes;
363 }
364
365 if (0x4 == (authorization & 0x4))
366 {
367 webDirProperties.WindowsAuthentication = IIs.YesNoType.yes;
368 }
369
370 if (0x10 == (authorization & 0x10))
371 {
372 webDirProperties.DigestAuthentication = IIs.YesNoType.yes;
373 }
374
375 if (0x40 == (authorization & 0x40))
376 {
377 webDirProperties.PassportAuthentication = IIs.YesNoType.yes;
378 }
379
380 foundProperties = true;
381 break;
382 }
383 }
384 }
385
386 return foundProperties ? webDirProperties : null;
387 }
388
389 /// <summary>
390 /// Harvest a web virtual directory.
391 /// </summary>
392 /// <param name="webVirtualDirEntry">The web virtual directory directory entry.</param>
393 /// <param name="webSite">The parent web site.</param>
394 private void HarvestWebVirtualDir(DirectoryEntry webVirtualDirEntry, IIs.WebSite webSite)
395 {
396 IIs.WebVirtualDir webVirtualDir = new IIs.WebVirtualDir();
397
398 foreach (string propertyName in webVirtualDirEntry.Properties.PropertyNames)
399 {
400 PropertyValueCollection property = webVirtualDirEntry.Properties[propertyName];
401 PropertyValueCollection parentProperty = webVirtualDirEntry.Parent.Properties[propertyName];
402
403 if (null == parentProperty.Value || parentProperty.Value.ToString() != property.Value.ToString())
404 {
405 switch (propertyName)
406 {
407 case "Path":
408 webVirtualDir.Directory = (string)property.Value;
409 break;
410 }
411 }
412 }
413
414 int indexOfRoot = webVirtualDirEntry.Path.IndexOf("ROOT/", StringComparison.OrdinalIgnoreCase);
415 webVirtualDir.Alias = webVirtualDirEntry.Path.Substring(indexOfRoot + 5);
416
417 IIs.WebDirProperties webDirProps = this.HarvestWebDirProperties(webVirtualDirEntry);
418 if (webDirProps != null)
419 {
420 webVirtualDir.AddChild(webDirProps);
421 }
422
423 foreach (DirectoryEntry childEntry in webVirtualDirEntry.Children)
424 {
425 switch (childEntry.SchemaClassName)
426 {
427 case "IIsWebDirectory":
428 this.HarvestWebDirectory(childEntry, webSite);
429 break;
430 case "IIsWebVirtualDir":
431 this.HarvestWebVirtualDir(childEntry, webSite);
432 break;
433 }
434 }
435
436 webSite.AddChild(webVirtualDir);
437 }
438 }
439}
diff --git a/src/wix/heat/Mutator.cs b/src/wix/heat/Mutator.cs
new file mode 100644
index 00000000..8c63882d
--- /dev/null
+++ b/src/wix/heat/Mutator.cs
@@ -0,0 +1,93 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections;
7 using WixToolset.Harvesters.Extensibility;
8 using Wix = WixToolset.Harvesters.Serialize;
9
10 /// <summary>
11 /// The WiX Toolset mutator.
12 /// </summary>
13 internal class Mutator : IMutator
14 {
15 private SortedList extensions;
16 private string extensionArgument;
17
18 /// <summary>
19 /// Instantiate a new mutator.
20 /// </summary>
21 public Mutator()
22 {
23 this.extensions = new SortedList();
24 }
25
26 public IHarvesterCore Core { get; set; }
27
28 public string ExtensionArgument
29 {
30 get { return this.extensionArgument; }
31 set { this.extensionArgument = value; }
32 }
33
34 public void AddExtension(IMutatorExtension mutatorExtension)
35 {
36 this.extensions.Add(mutatorExtension.Sequence, mutatorExtension);
37 }
38
39 public bool Mutate(Wix.Wix wix)
40 {
41 bool encounteredError = false;
42
43 try
44 {
45 foreach (IMutatorExtension mutatorExtension in this.extensions.Values)
46 {
47 if (null == mutatorExtension.Core)
48 {
49 mutatorExtension.Core = this.Core;
50 }
51
52 mutatorExtension.Mutate(wix);
53 }
54 }
55 finally
56 {
57 encounteredError = this.Core.Messaging.EncounteredError;
58 }
59
60 // return the Wix document element only if mutation completed successfully
61 return !encounteredError;
62 }
63
64 public string Mutate(string wixString)
65 {
66 bool encounteredError = false;
67
68 try
69 {
70 foreach (IMutatorExtension mutatorExtension in this.extensions.Values)
71 {
72 if (null == mutatorExtension.Core)
73 {
74 mutatorExtension.Core = this.Core;
75 }
76
77 wixString = mutatorExtension.Mutate(wixString);
78
79 if (String.IsNullOrEmpty(wixString) || this.Core.Messaging.EncounteredError)
80 {
81 break;
82 }
83 }
84 }
85 finally
86 {
87 encounteredError = this.Core.Messaging.EncounteredError;
88 }
89
90 return encounteredError ? null : wixString;
91 }
92 }
93}
diff --git a/src/wix/heat/PayloadHarvester.cs b/src/wix/heat/PayloadHarvester.cs
new file mode 100644
index 00000000..4bf625d1
--- /dev/null
+++ b/src/wix/heat/PayloadHarvester.cs
@@ -0,0 +1,129 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.IO;
7 using WixToolset.Core.Burn.Interfaces;
8 using WixToolset.Data;
9 using WixToolset.Data.Symbols;
10 using WixToolset.Harvesters.Data;
11 using WixToolset.Harvesters.Extensibility;
12 using Wix = WixToolset.Harvesters.Serialize;
13
14 /// <summary>
15 /// Harvest WiX authoring for a payload from the file system.
16 /// </summary>
17 internal class PayloadHarvester : BaseHarvesterExtension
18 {
19 private bool setUniqueIdentifiers;
20 private WixBundlePackageType packageType;
21
22 private IPayloadHarvester payloadHarvester;
23
24 /// <summary>
25 /// Instantiate a new PayloadHarvester.
26 /// </summary>
27 public PayloadHarvester(IPayloadHarvester payloadHarvester, WixBundlePackageType packageType)
28 {
29 this.payloadHarvester = payloadHarvester;
30
31 this.packageType = packageType;
32 this.setUniqueIdentifiers = true;
33 }
34
35 /// <summary>
36 /// Gets of sets the option to set unique identifiers.
37 /// </summary>
38 /// <value>The option to set unique identifiers.</value>
39 public bool SetUniqueIdentifiers
40 {
41 get { return this.setUniqueIdentifiers; }
42 set { this.setUniqueIdentifiers = value; }
43 }
44
45 /// <summary>
46 /// Harvest a payload.
47 /// </summary>
48 /// <param name="argument">The path of the payload.</param>
49 /// <returns>A harvested payload.</returns>
50 public override Wix.Fragment[] Harvest(string argument)
51 {
52 if (null == argument)
53 {
54 throw new ArgumentNullException("argument");
55 }
56
57 string fullPath = Path.GetFullPath(argument);
58
59 var remotePayload = this.HarvestRemotePayload(fullPath);
60
61 var fragment = new Wix.Fragment();
62 fragment.AddChild(remotePayload);
63
64 return new Wix.Fragment[] { fragment };
65 }
66
67 /// <summary>
68 /// Harvest a payload.
69 /// </summary>
70 /// <param name="path">The path of the payload.</param>
71 /// <returns>A harvested payload.</returns>
72 public Wix.RemotePayload HarvestRemotePayload(string path)
73 {
74 if (null == path)
75 {
76 throw new ArgumentNullException("path");
77 }
78
79 if (!File.Exists(path))
80 {
81 throw new WixException(HarvesterErrors.FileNotFound(path));
82 }
83
84 Wix.RemotePayload remotePayload;
85
86 switch (this.packageType)
87 {
88 case WixBundlePackageType.Exe:
89 remotePayload = new Wix.ExePackagePayload();
90 break;
91 case WixBundlePackageType.Msu:
92 remotePayload = new Wix.MsuPackagePayload();
93 break;
94 default:
95 throw new NotImplementedException();
96 }
97
98 var payloadSymbol = new WixBundlePayloadSymbol
99 {
100 SourceFile = new IntermediateFieldPathValue { Path = path },
101 };
102
103 this.payloadHarvester.HarvestStandardInformation(payloadSymbol);
104
105 if (payloadSymbol.FileSize.HasValue)
106 {
107 remotePayload.Size = payloadSymbol.FileSize.Value;
108 }
109 remotePayload.Hash = payloadSymbol.Hash;
110
111 if (!String.IsNullOrEmpty(payloadSymbol.Version))
112 {
113 remotePayload.Version = payloadSymbol.Version;
114 }
115
116 if (!String.IsNullOrEmpty(payloadSymbol.Description))
117 {
118 remotePayload.Description = payloadSymbol.Description;
119 }
120
121 if (!String.IsNullOrEmpty(payloadSymbol.DisplayName))
122 {
123 remotePayload.ProductName = payloadSymbol.DisplayName;
124 }
125
126 return remotePayload;
127 }
128 }
129}
diff --git a/src/wix/heat/PerformanceCategoryHarvester.cs b/src/wix/heat/PerformanceCategoryHarvester.cs
new file mode 100644
index 00000000..d9c46001
--- /dev/null
+++ b/src/wix/heat/PerformanceCategoryHarvester.cs
@@ -0,0 +1,207 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Linq;
7 using System.Diagnostics;
8 using WixToolset.Data;
9 using WixToolset.Harvesters.Data;
10 using WixToolset.Harvesters.Extensibility;
11 using Util = WixToolset.Harvesters.Serialize.Util;
12 using Wix = WixToolset.Harvesters.Serialize;
13
14 /// <summary>
15 /// Harvest WiX authoring for a file from the file system.
16 /// </summary>
17 internal class PerformanceCategoryHarvester : BaseHarvesterExtension
18 {
19 /// <summary>
20 /// Harvest a performance category.
21 /// </summary>
22 /// <param name="argument">The name of the performance category.</param>
23 /// <returns>A harvested performance category.</returns>
24 public override Wix.Fragment[] Harvest(string argument)
25 {
26 if (null == argument)
27 {
28 throw new ArgumentNullException("argument");
29 }
30
31 Util.PerformanceCategory perf = this.HarvestPerformanceCategory(argument);
32
33 Wix.Component component = new Wix.Component();
34 component.Id = this.Core.CreateIdentifierFromFilename(argument);
35 component.KeyPath = Wix.YesNoType.yes;
36 component.AddChild(perf);
37
38 Wix.Directory directory = new Wix.Directory();
39 directory.Id = "TARGETDIR";
40 //directory.Name = directory.Id;
41 directory.AddChild(component);
42
43 Wix.Fragment fragment = new Wix.Fragment();
44 fragment.AddChild(directory);
45
46 return new Wix.Fragment[] { fragment };
47 }
48
49 /// <summary>
50 /// Harvest a performance category.
51 /// </summary>
52 /// <param name="category">The name of the performance category.</param>
53 /// <returns>A harvested file.</returns>
54 public Util.PerformanceCategory HarvestPerformanceCategory(string category)
55 {
56 if (null == category)
57 {
58 throw new ArgumentNullException("category");
59 }
60
61 if (PerformanceCounterCategory.Exists(category))
62 {
63 Util.PerformanceCategory perfCategory = new Util.PerformanceCategory();
64
65 // Get the performance counter category and set the appropriate WiX attributes
66 PerformanceCounterCategory pcc = PerformanceCounterCategory.GetCategories().Single(c => string.Equals(c.CategoryName, category));
67 perfCategory.Id = this.Core.CreateIdentifierFromFilename(pcc.CategoryName);
68 perfCategory.Name = pcc.CategoryName;
69 perfCategory.Help = pcc.CategoryHelp;
70 if (PerformanceCounterCategoryType.MultiInstance == pcc.CategoryType)
71 {
72 perfCategory.MultiInstance = Util.YesNoType.yes;
73 }
74
75 // If it's multi-instance, check if there are any instances and get counters from there; else we get
76 // the counters straight up. For multi-instance, GetCounters() fails if there are any instances. If there
77 // are no instances, then GetCounters(instance) can't be called since there is no instance. Instances
78 // will exist for each counter even if only one of the counters was "intialized."
79 string[] instances = pcc.GetInstanceNames();
80 bool hasInstances = instances.Length > 0;
81 PerformanceCounter[] counters = hasInstances
82 ? pcc.GetCounters(instances.First())
83 : pcc.GetCounters();
84
85 foreach (PerformanceCounter counter in counters)
86 {
87 Util.PerformanceCounter perfCounter = new Util.PerformanceCounter();
88
89 // Get the performance counter and set the appropriate WiX attributes
90 perfCounter.Name = counter.CounterName;
91 perfCounter.Type = this.CounterTypeToWix(counter.CounterType);
92 perfCounter.Help = counter.CounterHelp;
93
94 perfCategory.AddChild(perfCounter);
95 }
96
97 return perfCategory;
98 }
99 else
100 {
101 throw new WixException(HarvesterErrors.PerformanceCategoryNotFound(category));
102 }
103 }
104
105 /// <summary>
106 /// Get the WiX performance counter type.
107 /// </summary>
108 /// <param name="pct">The performance counter value to get.</param>
109 /// <returns>The WiX performance counter type.</returns>
110 private Util.PerformanceCounterTypesType CounterTypeToWix(PerformanceCounterType pct)
111 {
112 Util.PerformanceCounterTypesType type;
113
114 switch (pct)
115 {
116 case PerformanceCounterType.AverageBase:
117 type = Util.PerformanceCounterTypesType.averageBase;
118 break;
119 case PerformanceCounterType.AverageCount64:
120 type = Util.PerformanceCounterTypesType.averageCount64;
121 break;
122 case PerformanceCounterType.AverageTimer32:
123 type = Util.PerformanceCounterTypesType.averageTimer32;
124 break;
125 case PerformanceCounterType.CounterDelta32:
126 type = Util.PerformanceCounterTypesType.counterDelta32;
127 break;
128 case PerformanceCounterType.CounterTimerInverse:
129 type = Util.PerformanceCounterTypesType.counterTimerInverse;
130 break;
131 case PerformanceCounterType.SampleFraction:
132 type = Util.PerformanceCounterTypesType.sampleFraction;
133 break;
134 case PerformanceCounterType.Timer100Ns:
135 type = Util.PerformanceCounterTypesType.timer100Ns;
136 break;
137 case PerformanceCounterType.CounterTimer:
138 type = Util.PerformanceCounterTypesType.counterTimer;
139 break;
140 case PerformanceCounterType.RawFraction:
141 type = Util.PerformanceCounterTypesType.rawFraction;
142 break;
143 case PerformanceCounterType.Timer100NsInverse:
144 type = Util.PerformanceCounterTypesType.timer100NsInverse;
145 break;
146 case PerformanceCounterType.CounterMultiTimer:
147 type = Util.PerformanceCounterTypesType.counterMultiTimer;
148 break;
149 case PerformanceCounterType.CounterMultiTimer100Ns:
150 type = Util.PerformanceCounterTypesType.counterMultiTimer100Ns;
151 break;
152 case PerformanceCounterType.CounterMultiTimerInverse:
153 type = Util.PerformanceCounterTypesType.counterMultiTimerInverse;
154 break;
155 case PerformanceCounterType.CounterMultiTimer100NsInverse:
156 type = Util.PerformanceCounterTypesType.counterMultiTimer100NsInverse;
157 break;
158 case PerformanceCounterType.ElapsedTime:
159 type = Util.PerformanceCounterTypesType.elapsedTime;
160 break;
161 case PerformanceCounterType.SampleBase:
162 type = Util.PerformanceCounterTypesType.sampleBase;
163 break;
164 case PerformanceCounterType.RawBase:
165 type = Util.PerformanceCounterTypesType.rawBase;
166 break;
167 case PerformanceCounterType.CounterMultiBase:
168 type = Util.PerformanceCounterTypesType.counterMultiBase;
169 break;
170 case PerformanceCounterType.RateOfCountsPerSecond64:
171 type = Util.PerformanceCounterTypesType.rateOfCountsPerSecond64;
172 break;
173 case PerformanceCounterType.RateOfCountsPerSecond32:
174 type = Util.PerformanceCounterTypesType.rateOfCountsPerSecond32;
175 break;
176 case PerformanceCounterType.CountPerTimeInterval64:
177 type = Util.PerformanceCounterTypesType.countPerTimeInterval64;
178 break;
179 case PerformanceCounterType.CountPerTimeInterval32:
180 type = Util.PerformanceCounterTypesType.countPerTimeInterval32;
181 break;
182 case PerformanceCounterType.SampleCounter:
183 type = Util.PerformanceCounterTypesType.sampleCounter;
184 break;
185 case PerformanceCounterType.CounterDelta64:
186 type = Util.PerformanceCounterTypesType.counterDelta64;
187 break;
188 case PerformanceCounterType.NumberOfItems64:
189 type = Util.PerformanceCounterTypesType.numberOfItems64;
190 break;
191 case PerformanceCounterType.NumberOfItems32:
192 type = Util.PerformanceCounterTypesType.numberOfItems32;
193 break;
194 case PerformanceCounterType.NumberOfItemsHEX64:
195 type = Util.PerformanceCounterTypesType.numberOfItemsHEX64;
196 break;
197 case PerformanceCounterType.NumberOfItemsHEX32:
198 type = Util.PerformanceCounterTypesType.numberOfItemsHEX32;
199 break;
200 default:
201 throw new WixException(HarvesterErrors.UnsupportedPerformanceCounterType(pct.ToString()));
202 }
203
204 return type;
205 }
206 }
207}
diff --git a/src/wix/heat/Program.cs b/src/wix/heat/Program.cs
new file mode 100644
index 00000000..d0bcf19f
--- /dev/null
+++ b/src/wix/heat/Program.cs
@@ -0,0 +1,78 @@
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
3namespace WixToolset.Tools.Heat
4{
5 using System;
6 using System.Runtime.InteropServices;
7 using System.Threading;
8 using System.Threading.Tasks;
9 using WixToolset.Core;
10 using WixToolset.Core.Burn;
11 using WixToolset.Data;
12 using WixToolset.Extensibility;
13 using WixToolset.Extensibility.Data;
14 using WixToolset.Extensibility.Services;
15 using WixToolset.Harvesters;
16 using WixToolset.Tools.Core;
17
18 /// <summary>
19 /// Wix Toolset Harvester.
20 /// </summary>
21 public sealed class Program
22 {
23 /// <summary>
24 /// The main entry point for the application.
25 /// </summary>
26 /// <param name="args">Commandline arguments for the application.</param>
27 /// <returns>Returns the application error code.</returns>
28 [MTAThread]
29 public static async Task<int> Main(string[] args)
30 {
31 var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider()
32 .AddBundleBackend();
33 var listener = new ConsoleMessageListener("HEAT", "heat.exe");
34
35 try
36 {
37 var program = new Program();
38 return await program.Run(serviceProvider, listener, args);
39 }
40 catch (WixException e)
41 {
42 listener.Write(e.Error);
43
44 return e.Error.Id;
45 }
46 catch (Exception e)
47 {
48 listener.Write(ErrorMessages.UnexpectedException(e));
49
50 if (e is NullReferenceException || e is SEHException)
51 {
52 throw;
53 }
54
55 return e.HResult;
56 }
57 }
58
59 /// <summary>
60 /// Run the application with the given arguments.
61 /// </summary>
62 /// <param name="serviceProvider">Service provider to use throughout this execution.</param>
63 /// <param name="args">The commandline arguments.</param>
64 /// <returns>Returns the application error code.</returns>
65 public Task<int> Run(IServiceProvider serviceProvider, IMessageListener listener, string[] args)
66 {
67 var messaging = serviceProvider.GetService<IMessaging>();
68 messaging.SetListener(listener);
69
70 var arguments = serviceProvider.GetService<ICommandLineArguments>();
71 arguments.Populate(args);
72
73 var commandLine = HeatCommandLineFactory.CreateCommandLine(serviceProvider);
74 var command = commandLine.ParseStandardCommandLine(arguments);
75 return command?.ExecuteAsync(CancellationToken.None) ?? Task.FromResult(1);
76 }
77 }
78}
diff --git a/src/wix/heat/RegFileHarvester.cs b/src/wix/heat/RegFileHarvester.cs
new file mode 100644
index 00000000..a3d181f2
--- /dev/null
+++ b/src/wix/heat/RegFileHarvester.cs
@@ -0,0 +1,438 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections;
7 using System.Globalization;
8 using System.IO;
9 using WixToolset.Data;
10 using WixToolset.Harvesters.Data;
11 using WixToolset.Harvesters.Extensibility;
12 using Wix = WixToolset.Harvesters.Serialize;
13
14 /// <summary>
15 /// Harvest WiX authoring for a reg file.
16 /// </summary>
17 internal class RegFileHarvester : BaseHarvesterExtension
18 {
19 private static readonly string ComponentPrefix = "cmp";
20
21 /// <summary>
22 /// Current line in the reg file being processed.
23 /// </summary>
24 private int currentLineNumber = 0;
25
26 /// <summary>
27 /// Flag indicating whether this is a unicode registry file.
28 /// </summary>
29 private bool unicodeRegistry;
30
31 /// <summary>
32 /// Harvest a file.
33 /// </summary>
34 /// <param name="argument">The path of the file.</param>
35 /// <returns>A harvested file.</returns>
36 public override Wix.Fragment[] Harvest(string argument)
37 {
38 if (null == argument)
39 {
40 throw new ArgumentNullException("argument");
41 }
42
43 // Harvest the keys from the registry file
44 Wix.Fragment fragment = this.HarvestRegFile(argument);
45
46 return new Wix.Fragment[] { fragment };
47 }
48
49 /// <summary>
50 /// Harvest a reg file.
51 /// </summary>
52 /// <param name="path">The path of the file.</param>
53 /// <returns>A harvested registy file.</returns>
54 public Wix.Fragment HarvestRegFile(string path)
55 {
56 if (null == path)
57 {
58 throw new ArgumentNullException("path");
59 }
60
61 if (!File.Exists(path))
62 {
63 throw new WixException(HarvesterErrors.FileNotFound(path));
64 }
65
66 Wix.Directory directory = new Wix.Directory();
67 directory.Id = "TARGETDIR";
68
69 // Use absolute paths
70 path = Path.GetFullPath(path);
71 FileInfo file = new FileInfo(path);
72
73 using (StreamReader sr = file.OpenText())
74 {
75 string line;
76 this.currentLineNumber = 0;
77
78 while (null != (line = this.GetNextLine(sr)))
79 {
80 if (line.StartsWith(@"Windows Registry Editor Version 5.00"))
81 {
82 this.unicodeRegistry = true;
83 }
84 else if (line.StartsWith(@"REGEDIT4"))
85 {
86 this.unicodeRegistry = false;
87 }
88 else if (line.StartsWith(@"[HKEY_CLASSES_ROOT\"))
89 {
90 this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKCR, line.Substring(19, line.Length - 20));
91 }
92 else if (line.StartsWith(@"[HKEY_CURRENT_USER\"))
93 {
94 this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKCU, line.Substring(19, line.Length - 20));
95 }
96 else if (line.StartsWith(@"[HKEY_LOCAL_MACHINE\"))
97 {
98 this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKLM, line.Substring(20, line.Length - 21));
99 }
100 else if (line.StartsWith(@"[HKEY_USERS\"))
101 {
102 this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKU, line.Substring(12, line.Length - 13));
103 }
104 }
105 }
106
107 Console.WriteLine("Processing complete");
108
109 Wix.Fragment fragment = new Wix.Fragment();
110 fragment.AddChild(directory);
111
112 return fragment;
113 }
114
115 /// <summary>
116 /// Converts the registry key to a WiX component element.
117 /// </summary>
118 /// <param name="sr">The registry file stream.</param>
119 /// <param name="directory">A WiX directory reference.</param>
120 /// <param name="root">The root key.</param>
121 /// <param name="line">The current line.</param>
122 private void ConvertKey(StreamReader sr, ref Wix.Directory directory, Wix.RegistryRootType root, string line)
123 {
124 Wix.Component component = new Wix.Component();
125
126 component.Id = this.Core.GenerateIdentifier(ComponentPrefix, line);
127 component.KeyPath = Wix.YesNoType.yes;
128
129 this.ConvertValues(sr, ref component, root, line);
130 directory.AddChild(component);
131 }
132
133 /// <summary>
134 /// Converts the registry values to WiX regisry key element.
135 /// </summary>
136 /// <param name="sr">The registry file stream.</param>
137 /// <param name="component">A WiX component reference.</param>
138 /// <param name="root">The root key.</param>
139 /// <param name="line">The current line.</param>
140 private void ConvertValues(StreamReader sr, ref Wix.Component component, Wix.RegistryRootType root, string line)
141 {
142 string name = null;
143 string value = null;
144 Wix.RegistryValue.TypeType type;
145 Wix.RegistryKey registryKey = new Wix.RegistryKey();
146
147 registryKey.Root = root;
148 registryKey.Key = line;
149
150 while (this.GetValue(sr, ref name, ref value, out type))
151 {
152 Wix.RegistryValue registryValue = new Wix.RegistryValue();
153 ArrayList charArray;
154
155 // Don't specifiy name for default attribute
156 if (!string.IsNullOrEmpty(name))
157 {
158 registryValue.Name = name;
159 }
160
161 registryValue.Type = type;
162
163 switch (type)
164 {
165 case Wix.RegistryValue.TypeType.binary:
166 registryValue.Value = value.Replace(",", string.Empty).ToUpper();
167 break;
168
169 case Wix.RegistryValue.TypeType.integer:
170 registryValue.Value = Int32.Parse(value, NumberStyles.HexNumber).ToString();
171 break;
172
173 case Wix.RegistryValue.TypeType.expandable:
174 charArray = this.ConvertCharList(value);
175 value = string.Empty;
176
177 // create the string, remove the terminating null
178 for (int i = 0; i < charArray.Count; i++)
179 {
180 if ('\0' != (char)charArray[i])
181 {
182 value += charArray[i];
183 }
184 }
185
186 registryValue.Value = value;
187 break;
188
189 case Wix.RegistryValue.TypeType.multiString:
190 charArray = this.ConvertCharList(value);
191 value = string.Empty;
192
193 // Convert the character array to a string so we can simply split it at the nulls, ignore the final null null.
194 for (int i = 0; i < (charArray.Count - 2); i++)
195 {
196 value += charArray[i];
197 }
198
199 // Although the value can use [~] the preffered way is to use MultiStringValue
200 string[] parts = value.Split("\0".ToCharArray());
201 foreach (string part in parts)
202 {
203 Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue();
204 multiStringValue.Content = part;
205 registryValue.AddChild(multiStringValue);
206 }
207
208 break;
209
210 case Wix.RegistryValue.TypeType.@string:
211 // Remove \\ and \"
212 value = value.ToString().Replace("\\\"", "\"");
213 value = value.ToString().Replace(@"\\", @"\");
214 // Escape [ and ]
215 value = value.ToString().Replace(@"[", @"[\[]");
216 value = value.ToString().Replace(@"]", @"[\]]");
217 // This undoes the duplicate escaping caused by the second replace
218 value = value.ToString().Replace(@"[\[[\]]", @"[\[]");
219 // Escape $
220 value = value.ToString().Replace(@"$", @"$$");
221
222 registryValue.Value = value;
223 break;
224
225 default:
226 throw new ApplicationException(String.Format("Did not recognize the type of reg value on line {0}", this.currentLineNumber));
227 }
228
229 registryKey.AddChild(registryValue);
230 }
231
232 // Make sure empty keys are created
233 if (null == value)
234 {
235 registryKey.ForceCreateOnInstall = Wix.YesNoType.yes;
236 }
237
238 component.AddChild(registryKey);
239 }
240
241 /// <summary>
242 /// Parse a value from a line.
243 /// </summary>
244 /// <param name="sr">Reader for the reg file.</param>
245 /// <param name="name">Name of the value.</param>
246 /// <param name="value">Value of the value.</param>
247 /// <param name="type">Type of the value.</param>
248 /// <returns>true if the value can be parsed, false otherwise.</returns>
249 private bool GetValue(StreamReader sr, ref string name, ref string value, out Wix.RegistryValue.TypeType type)
250 {
251 string line = this.GetNextLine(sr);
252
253 if (null == line || 0 == line.Length)
254 {
255 type = 0;
256 return false;
257 }
258
259 string[] parts;
260
261 if (line.StartsWith("@"))
262 {
263 // Special case for default value
264 parts = line.Trim().Split("=".ToCharArray(), 2);
265
266 name = null;
267 }
268 else
269 {
270 parts = line.Trim().Split("=".ToCharArray());
271
272 // It is valid to have an '=' in the name or the data. This is probably a string so the separator will be '"="'.
273 if (2 != parts.Length)
274 {
275 string[] stringSeparator = new string[] { "\"=\"" };
276 parts = line.Trim().Split(stringSeparator, StringSplitOptions.None);
277
278 if (2 != parts.Length)
279 {
280 // Line still no parsed correctly
281 throw new ApplicationException(String.Format("Cannot parse value: {0} at line {1}.", line, this.currentLineNumber));
282 }
283
284 // Put back quotes stripped by Split()
285 parts[0] += "\"";
286 parts[1] = "\"" + parts[1];
287 }
288
289 name = parts[0].Substring(1, parts[0].Length - 2);
290 }
291
292 if (parts[1].StartsWith("hex:"))
293 {
294 // binary
295 value = parts[1].Substring(4);
296 type = Wix.RegistryValue.TypeType.binary;
297 }
298 else if (parts[1].StartsWith("dword:"))
299 {
300 // dword
301 value = parts[1].Substring(6);
302 type = Wix.RegistryValue.TypeType.integer;
303 }
304 else if (parts[1].StartsWith("hex(2):"))
305 {
306 // expandable string
307 value = parts[1].Substring(7);
308 type = Wix.RegistryValue.TypeType.expandable;
309 }
310 else if (parts[1].StartsWith("hex(7):"))
311 {
312 // multi-string
313 value = parts[1].Substring(7);
314 type = Wix.RegistryValue.TypeType.multiString;
315 }
316 else if (parts[1].StartsWith("hex("))
317 {
318 // Give a better error when we find something that isn't supported
319 // by specifying the type that isn't supported.
320 string unsupportedType = "";
321
322 if (parts[1].StartsWith("hex(0")) { unsupportedType = "REG_NONE"; }
323 else if (parts[1].StartsWith("hex(6")) { unsupportedType = "REG_LINK"; }
324 else if (parts[1].StartsWith("hex(8")) { unsupportedType = "REG_RESOURCE_LIST"; }
325 else if (parts[1].StartsWith("hex(9")) { unsupportedType = "REG_FULL_RESOURCE_DESCRIPTOR"; }
326 else if (parts[1].StartsWith("hex(a")) { unsupportedType = "REG_RESOURCE_REQUIREMENTS_LIST"; }
327 else if (parts[1].StartsWith("hex(b")) { unsupportedType = "REG_QWORD"; }
328
329 // REG_NONE(0), REG_LINK(6), REG_RESOURCE_LIST(8), REG_FULL_RESOURCE_DESCRIPTOR(9), REG_RESOURCE_REQUIREMENTS_LIST(a), REG_QWORD(b)
330 this.Core.Messaging.Write(HarvesterWarnings.UnsupportedRegistryType(parts[0], this.currentLineNumber, unsupportedType));
331
332 type = 0;
333 return false;
334 }
335 else if (parts[1].StartsWith("\""))
336 {
337 // string
338 value = parts[1].Substring(1, parts[1].Length - 2);
339 type = Wix.RegistryValue.TypeType.@string;
340 }
341 else
342 {
343 // unsupported value
344 throw new ApplicationException(String.Format("Unsupported registry value {0} at line {1}.", line, this.currentLineNumber));
345 }
346
347 return true;
348 }
349
350 /// <summary>
351 /// Get the next line from the reg file input stream.
352 /// </summary>
353 /// <param name="sr">Reader for the reg file.</param>
354 /// <returns>The next line.</returns>
355 private string GetNextLine(StreamReader sr)
356 {
357 string line;
358 string totalLine = null;
359
360 while (null != (line = sr.ReadLine()))
361 {
362 bool stop = true;
363
364 this.currentLineNumber++;
365 line = line.Trim();
366 Console.Write("Processing line: {0}\r", this.currentLineNumber);
367
368 if (line.EndsWith("\\"))
369 {
370 stop = false;
371 line = line.Substring(0, line.Length - 1);
372 }
373
374 if (null == totalLine)
375 {
376 // first line
377 totalLine = line;
378 }
379 else
380 {
381 // other lines
382 totalLine += line;
383 }
384
385 // break if there is no more info for this line
386 if (stop)
387 {
388 break;
389 }
390 }
391
392 return totalLine;
393 }
394
395 /// <summary>
396 /// Convert a character list into the proper WiX format for either unicode or ansi lists.
397 /// </summary>
398 /// <param name="charList">List of characters.</param>
399 /// <returns>Array of characters.</returns>
400 private ArrayList ConvertCharList(string charList)
401 {
402 if (string.IsNullOrEmpty(charList))
403 {
404 return new ArrayList();
405 }
406
407 string[] strChars = charList.Split(",".ToCharArray());
408
409 ArrayList charArray = new ArrayList();
410
411 if (this.unicodeRegistry)
412 {
413 if (0 != strChars.Length % 2)
414 {
415 throw new ApplicationException(String.Format("Problem parsing Expandable string data at line {0}, its probably not Unicode.", this.currentLineNumber));
416 }
417
418 for (int i = 0; i < strChars.Length; i += 2)
419 {
420 string chars = strChars[i + 1] + strChars[i];
421 int unicodeInt = Int32.Parse(chars, NumberStyles.HexNumber);
422 char unicodeChar = (char)unicodeInt;
423 charArray.Add(unicodeChar);
424 }
425 }
426 else
427 {
428 for (int i = 0; i < strChars.Length; i++)
429 {
430 char charValue = (char)Int32.Parse(strChars[i], NumberStyles.HexNumber);
431 charArray.Add(charValue);
432 }
433 }
434
435 return charArray;
436 }
437 }
438}
diff --git a/src/wix/heat/RegistryHarvester.cs b/src/wix/heat/RegistryHarvester.cs
new file mode 100644
index 00000000..d416236c
--- /dev/null
+++ b/src/wix/heat/RegistryHarvester.cs
@@ -0,0 +1,477 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections;
7 using System.Diagnostics;
8 using System.Globalization;
9 using System.Runtime.InteropServices;
10 using System.Text;
11 using Microsoft.Win32;
12 using WixToolset.Data;
13 using WixToolset.Harvesters.Data;
14 using Wix = WixToolset.Harvesters.Serialize;
15
16 /// <summary>
17 /// Harvest WiX authoring from the registry.
18 /// </summary>
19 internal class RegistryHarvester : IDisposable
20 {
21 private const string HKCRPathInHKLM = @"Software\Classes";
22 private string remappedPath;
23 private static readonly int majorOSVersion = Environment.OSVersion.Version.Major;
24 private RegistryKey regKeyToOverride = Registry.LocalMachine;
25 private IntPtr regRootToOverride = NativeMethods.HkeyLocalMachine;
26
27 /// <summary>
28 /// Instantiate a new RegistryHarvester.
29 /// </summary>
30 /// <param name="remap">Set to true to remap the entire registry to a private location for this process.</param>
31 public RegistryHarvester(bool remap)
32 {
33 // Detect OS major version and set the hive to use when
34 // redirecting registry writes. We want to redirect registry
35 // writes to HKCU on Windows Vista and higher to avoid UAC
36 // problems, and to HKLM on downlevel OS's.
37 if (majorOSVersion >= 6)
38 {
39 this.regKeyToOverride = Registry.CurrentUser;
40 this.regRootToOverride = NativeMethods.HkeyCurrentUser;
41 }
42
43 // create a path in the registry for redirected keys which is process-specific
44 if (remap)
45 {
46 this.remappedPath = String.Concat(@"SOFTWARE\WiX\heat\", Process.GetCurrentProcess().Id.ToString(CultureInfo.InvariantCulture));
47
48 // remove the previous remapped key if it exists
49 this.RemoveRemappedKey();
50
51 // remap the registry roots supported by MSI
52 // note - order is important here - the hive being used to redirect
53 // to must be overridden last to avoid creating the other override
54 // hives in the wrong location in the registry. For example, if HKLM is
55 // the redirect destination, overriding it first will cause other hives
56 // to be overridden under HKLM\Software\WiX\heat\HKLM\Software\WiX\HKCR
57 // instead of under HKLM\Software\WiX\heat\HKCR
58 if (majorOSVersion < 6)
59 {
60 this.RemapRegistryKey(NativeMethods.HkeyClassesRoot, String.Concat(this.remappedPath, @"\\HKEY_CLASSES_ROOT"));
61 this.RemapRegistryKey(NativeMethods.HkeyCurrentUser, String.Concat(this.remappedPath, @"\\HKEY_CURRENT_USER"));
62 this.RemapRegistryKey(NativeMethods.HkeyUsers, String.Concat(this.remappedPath, @"\\HKEY_USERS"));
63 this.RemapRegistryKey(NativeMethods.HkeyLocalMachine, String.Concat(this.remappedPath, @"\\HKEY_LOCAL_MACHINE"));
64 }
65 else
66 {
67 this.RemapRegistryKey(NativeMethods.HkeyClassesRoot, String.Concat(this.remappedPath, @"\\HKEY_CLASSES_ROOT"));
68 this.RemapRegistryKey(NativeMethods.HkeyLocalMachine, String.Concat(this.remappedPath, @"\\HKEY_LOCAL_MACHINE"));
69 this.RemapRegistryKey(NativeMethods.HkeyUsers, String.Concat(this.remappedPath, @"\\HKEY_USERS"));
70 this.RemapRegistryKey(NativeMethods.HkeyCurrentUser, String.Concat(this.remappedPath, @"\\HKEY_CURRENT_USER"));
71
72 // Typelib registration on Windows Vista requires that the key
73 // HKLM\Software\Classes exist, so add it to the remapped root
74 Registry.LocalMachine.CreateSubKey(HKCRPathInHKLM);
75 }
76 }
77 }
78
79 /// <summary>
80 /// Close the RegistryHarvester and remove any remapped registry keys.
81 /// </summary>
82 public void Close()
83 {
84 // note - order is important here - we must quit overriding the hive
85 // being used to redirect first
86 if (majorOSVersion < 6)
87 {
88 NativeMethods.OverrideRegistryKey(NativeMethods.HkeyLocalMachine, IntPtr.Zero);
89 NativeMethods.OverrideRegistryKey(NativeMethods.HkeyClassesRoot, IntPtr.Zero);
90 NativeMethods.OverrideRegistryKey(NativeMethods.HkeyCurrentUser, IntPtr.Zero);
91 NativeMethods.OverrideRegistryKey(NativeMethods.HkeyUsers, IntPtr.Zero);
92 }
93 else
94 {
95 NativeMethods.OverrideRegistryKey(NativeMethods.HkeyCurrentUser, IntPtr.Zero);
96 NativeMethods.OverrideRegistryKey(NativeMethods.HkeyClassesRoot, IntPtr.Zero);
97 NativeMethods.OverrideRegistryKey(NativeMethods.HkeyLocalMachine, IntPtr.Zero);
98 NativeMethods.OverrideRegistryKey(NativeMethods.HkeyUsers, IntPtr.Zero);
99 }
100
101 this.RemoveRemappedKey();
102 }
103
104 /// <summary>
105 /// Dispose the RegistryHarvester.
106 /// </summary>
107 public void Dispose()
108 {
109 this.Close();
110 }
111
112 /// <summary>
113 /// Harvest all registry roots supported by Windows Installer.
114 /// </summary>
115 /// <returns>The registry keys and values in the registry.</returns>
116 public Wix.RegistryValue[] HarvestRegistry()
117 {
118 ArrayList registryValues = new ArrayList();
119
120 this.HarvestRegistryKey(Registry.ClassesRoot, registryValues);
121 this.HarvestRegistryKey(Registry.CurrentUser, registryValues);
122 this.HarvestRegistryKey(Registry.LocalMachine, registryValues);
123 this.HarvestRegistryKey(Registry.Users, registryValues);
124
125 return (Wix.RegistryValue[])registryValues.ToArray(typeof(Wix.RegistryValue));
126 }
127
128 /// <summary>
129 /// Harvest a registry key.
130 /// </summary>
131 /// <param name="path">The path of the registry key to harvest.</param>
132 /// <returns>The registry keys and values under the key.</returns>
133 public Wix.RegistryValue[] HarvestRegistryKey(string path)
134 {
135 RegistryKey registryKey = null;
136 ArrayList registryValues = new ArrayList();
137
138 string[] parts = GetPathParts(path);
139
140 try
141 {
142 switch (parts[0])
143 {
144 case "HKEY_CLASSES_ROOT":
145 registryKey = Registry.ClassesRoot;
146 break;
147 case "HKEY_CURRENT_USER":
148 registryKey = Registry.CurrentUser;
149 break;
150 case "HKEY_LOCAL_MACHINE":
151 registryKey = Registry.LocalMachine;
152 break;
153 case "HKEY_USERS":
154 registryKey = Registry.Users;
155 break;
156 default:
157 // TODO: put a better exception here
158 throw new Exception();
159 }
160
161 if (1 < parts.Length)
162 {
163 registryKey = registryKey.OpenSubKey(parts[1]);
164
165 if (null == registryKey)
166 {
167 throw new WixException(HarvesterErrors.UnableToOpenRegistryKey(parts[1]));
168 }
169 }
170
171 this.HarvestRegistryKey(registryKey, registryValues);
172 }
173 finally
174 {
175 if (null != registryKey)
176 {
177 registryKey.Close();
178 }
179 }
180
181 return (Wix.RegistryValue[])registryValues.ToArray(typeof(Wix.RegistryValue));
182 }
183
184 /// <summary>
185 /// Gets the parts of a registry key's path.
186 /// </summary>
187 /// <param name="path">The registry key path.</param>
188 /// <returns>The root and key parts of the registry key path.</returns>
189 private static string[] GetPathParts(string path)
190 {
191 return path.Split(@"\".ToCharArray(), 2);
192 }
193
194 /// <summary>
195 /// Harvest a registry key.
196 /// </summary>
197 /// <param name="registryKey">The registry key to harvest.</param>
198 /// <param name="registryValues">The collected registry values.</param>
199 private void HarvestRegistryKey(RegistryKey registryKey, ArrayList registryValues)
200 {
201 // harvest the sub-keys
202 foreach (string subKeyName in registryKey.GetSubKeyNames())
203 {
204 using (RegistryKey subKey = registryKey.OpenSubKey(subKeyName))
205 {
206 this.HarvestRegistryKey(subKey, registryValues);
207 }
208 }
209
210 string[] parts = GetPathParts(registryKey.Name);
211
212 Wix.RegistryRootType root;
213 switch (parts[0])
214 {
215 case "HKEY_CLASSES_ROOT":
216 root = Wix.RegistryRootType.HKCR;
217 break;
218 case "HKEY_CURRENT_USER":
219 root = Wix.RegistryRootType.HKCU;
220 break;
221 case "HKEY_LOCAL_MACHINE":
222 // HKLM\Software\Classes is equivalent to HKCR
223 if (1 < parts.Length && parts[1].StartsWith(HKCRPathInHKLM, StringComparison.OrdinalIgnoreCase))
224 {
225 root = Wix.RegistryRootType.HKCR;
226 parts[1] = parts[1].Remove(0, HKCRPathInHKLM.Length);
227
228 if (0 < parts[1].Length)
229 {
230 parts[1] = parts[1].TrimStart('\\');
231 }
232
233 if (String.IsNullOrEmpty(parts[1]))
234 {
235 parts = new [] { parts[0] };
236 }
237 }
238 else
239 {
240 root = Wix.RegistryRootType.HKLM;
241 }
242 break;
243 case "HKEY_USERS":
244 root = Wix.RegistryRootType.HKU;
245 break;
246 default:
247 // TODO: put a better exception here
248 throw new Exception();
249 }
250
251 // harvest the values
252 foreach (string valueName in registryKey.GetValueNames())
253 {
254 Wix.RegistryValue registryValue = new Wix.RegistryValue();
255
256 registryValue.Action = Wix.RegistryValue.ActionType.write;
257
258 registryValue.Root = root;
259
260 if (1 < parts.Length)
261 {
262 registryValue.Key = parts[1];
263 }
264
265 if (null != valueName && 0 < valueName.Length)
266 {
267 registryValue.Name = valueName;
268 }
269
270 object value = registryKey.GetValue(valueName);
271
272 if (value is byte[]) // binary
273 {
274 StringBuilder hexadecimalValue = new StringBuilder();
275
276 // convert the byte array to hexadecimal
277 foreach (byte byteValue in (byte[])value)
278 {
279 hexadecimalValue.Append(byteValue.ToString("X2", CultureInfo.InvariantCulture.NumberFormat));
280 }
281
282 registryValue.Type = Wix.RegistryValue.TypeType.binary;
283 registryValue.Value = hexadecimalValue.ToString();
284 }
285 else if (value is int) // integer
286 {
287 registryValue.Type = Wix.RegistryValue.TypeType.integer;
288 registryValue.Value = ((int)value).ToString(CultureInfo.InvariantCulture);
289 }
290 else if (value is string[]) // multi-string
291 {
292 registryValue.Type = Wix.RegistryValue.TypeType.multiString;
293
294 if (0 == ((string[])value).Length)
295 {
296 Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue();
297
298 multiStringValue.Content = String.Empty;
299
300 registryValue.AddChild(multiStringValue);
301 }
302 else
303 {
304 foreach (string multiStringValueContent in (string[])value)
305 {
306 Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue();
307
308 multiStringValue.Content = multiStringValueContent;
309
310 registryValue.AddChild(multiStringValue);
311 }
312 }
313 }
314 else if (value is string) // string, expandable (there is no way to differentiate a string and expandable value in .NET 1.1)
315 {
316 registryValue.Type = Wix.RegistryValue.TypeType.@string;
317 registryValue.Value = (string)value;
318 }
319 else
320 {
321 // TODO: put a better exception here
322 throw new Exception();
323 }
324
325 registryValues.Add(registryValue);
326 }
327
328 // If there were no subkeys and no values, we still need an element for this empty registry key.
329 // But specifically avoid SOFTWARE\Classes because it shouldn't be harvested as an empty key.
330 if (parts.Length > 1 && registryKey.SubKeyCount == 0 && registryKey.ValueCount == 0 &&
331 !String.Equals(parts[1], HKCRPathInHKLM, StringComparison.OrdinalIgnoreCase))
332 {
333 Wix.RegistryValue emptyRegistryKey = new Wix.RegistryValue();
334 emptyRegistryKey.Root = root;
335 emptyRegistryKey.Key = parts[1];
336 emptyRegistryKey.Type = Wix.RegistryValue.TypeType.@string;
337 emptyRegistryKey.Value = String.Empty;
338 emptyRegistryKey.Action = Wix.RegistryValue.ActionType.write;
339 registryValues.Add(emptyRegistryKey);
340 }
341 }
342
343 /// <summary>
344 /// Remap a registry key to an alternative location.
345 /// </summary>
346 /// <param name="registryKey">The registry key to remap.</param>
347 /// <param name="remappedPath">The path to remap the registry key to under HKLM.</param>
348 private void RemapRegistryKey(IntPtr registryKey, string remappedPath)
349 {
350 IntPtr remappedKey = IntPtr.Zero;
351
352 try
353 {
354 remappedKey = NativeMethods.OpenRegistryKey(this.regRootToOverride, remappedPath);
355
356 NativeMethods.OverrideRegistryKey(registryKey, remappedKey);
357 }
358 finally
359 {
360 if (IntPtr.Zero != remappedKey)
361 {
362 NativeMethods.CloseRegistryKey(remappedKey);
363 }
364 }
365 }
366
367 /// <summary>
368 /// Remove the remapped registry key.
369 /// </summary>
370 private void RemoveRemappedKey()
371 {
372 try
373 {
374 this.regKeyToOverride.DeleteSubKeyTree(this.remappedPath);
375 }
376 catch (ArgumentException)
377 {
378 // ignore the error where the key does not exist
379 }
380 }
381
382 /// <summary>
383 /// The native methods for re-mapping registry keys.
384 /// </summary>
385 private sealed class NativeMethods
386 {
387 internal static readonly IntPtr HkeyClassesRoot = (IntPtr)unchecked((Int32)0x80000000);
388 internal static readonly IntPtr HkeyCurrentUser = (IntPtr)unchecked((Int32)0x80000001);
389 internal static readonly IntPtr HkeyLocalMachine = (IntPtr)unchecked((Int32)0x80000002);
390 internal static readonly IntPtr HkeyUsers = (IntPtr)unchecked((Int32)0x80000003);
391
392 private const uint GenericRead = 0x80000000;
393 private const uint GenericWrite = 0x40000000;
394 private const uint GenericExecute = 0x20000000;
395 private const uint GenericAll = 0x10000000;
396 private const uint StandardRightsAll = 0x001F0000;
397
398 /// <summary>
399 /// Opens a registry key.
400 /// </summary>
401 /// <param name="key">Base key to open.</param>
402 /// <param name="path">Path to subkey to open.</param>
403 /// <returns>Handle to new key.</returns>
404 internal static IntPtr OpenRegistryKey(IntPtr key, string path)
405 {
406 IntPtr newKey = IntPtr.Zero;
407 uint disposition = 0;
408 uint sam = StandardRightsAll | GenericRead | GenericWrite | GenericExecute | GenericAll;
409
410 if (0 != RegCreateKeyEx(key, path, 0, null, 0, sam, 0, out newKey, out disposition))
411 {
412 throw new Exception();
413 }
414
415 return newKey;
416 }
417
418 /// <summary>
419 /// Closes a previously open registry key.
420 /// </summary>
421 /// <param name="key">Handle to key to close.</param>
422 internal static void CloseRegistryKey(IntPtr key)
423 {
424 if (0 != RegCloseKey(key))
425 {
426 throw new Exception();
427 }
428 }
429
430 /// <summary>
431 /// Override a registry key.
432 /// </summary>
433 /// <param name="key">Handle of the key to override.</param>
434 /// <param name="newKey">Handle to override key.</param>
435 internal static void OverrideRegistryKey(IntPtr key, IntPtr newKey)
436 {
437 if (0 != RegOverridePredefKey(key, newKey))
438 {
439 throw new Exception();
440 }
441 }
442
443 /// <summary>
444 /// Interop to RegCreateKeyW.
445 /// </summary>
446 /// <param name="key">Handle to base key.</param>
447 /// <param name="subkey">Subkey to create.</param>
448 /// <param name="reserved">Always 0</param>
449 /// <param name="className">Just pass null.</param>
450 /// <param name="options">Just pass 0.</param>
451 /// <param name="desiredSam">Rights to registry key.</param>
452 /// <param name="securityAttributes">Just pass null.</param>
453 /// <param name="openedKey">Opened key.</param>
454 /// <param name="disposition">Whether key was opened or created.</param>
455 /// <returns>Handle to registry key.</returns>
456 [DllImport("advapi32.dll", EntryPoint = "RegCreateKeyExW", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
457 private static extern int RegCreateKeyEx(IntPtr key, string subkey, uint reserved, string className, uint options, uint desiredSam, uint securityAttributes, out IntPtr openedKey, out uint disposition);
458
459 /// <summary>
460 /// Interop to RegCloseKey.
461 /// </summary>
462 /// <param name="key">Handle to key to close.</param>
463 /// <returns>0 if success.</returns>
464 [DllImport("advapi32.dll", EntryPoint = "RegCloseKey", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
465 private static extern int RegCloseKey(IntPtr key);
466
467 /// <summary>
468 /// Interop to RegOverridePredefKey.
469 /// </summary>
470 /// <param name="key">Handle to key to override.</param>
471 /// <param name="newKey">Handle to override key.</param>
472 /// <returns>0 if success.</returns>
473 [DllImport("advapi32.dll", EntryPoint = "RegOverridePredefKey", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
474 private static extern int RegOverridePredefKey(IntPtr key, IntPtr newKey);
475 }
476 }
477}
diff --git a/src/wix/heat/Serialize/CodeDomInterfaces.cs b/src/wix/heat/Serialize/CodeDomInterfaces.cs
new file mode 100644
index 00000000..bd674db6
--- /dev/null
+++ b/src/wix/heat/Serialize/CodeDomInterfaces.cs
@@ -0,0 +1,96 @@
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
3namespace WixToolset.Harvesters.Serialize
4{
5 using System;
6 using System.Collections;
7 using System.Xml;
8
9 /// <summary>
10 /// Interface for generated schema elements.
11 /// </summary>
12 public interface ISchemaElement
13 {
14 /// <summary>
15 /// Gets and sets the parent of this element. May be null.
16 /// </summary>
17 /// <value>An ISchemaElement that has this element as a child.</value>
18 ISchemaElement ParentElement
19 {
20 get;
21 set;
22 }
23
24 /// <summary>
25 /// Outputs xml representing this element, including the associated attributes
26 /// and any nested elements.
27 /// </summary>
28 /// <param name="writer">XmlWriter to be used when outputting the element.</param>
29 void OutputXml(XmlWriter writer);
30 }
31
32 /// <summary>
33 /// Interface for generated schema elements. Implemented by elements that have child
34 /// elements.
35 /// </summary>
36 public interface IParentElement
37 {
38 /// <summary>
39 /// Gets an enumerable collection of the children of this element.
40 /// </summary>
41 /// <value>An enumerable collection of the children of this element.</value>
42 IEnumerable Children
43 {
44 get;
45 }
46
47 /// <summary>
48 /// Gets an enumerable collection of the children of this element, filtered
49 /// by the passed in type.
50 /// </summary>
51 /// <param name="childType">The type of children to retrieve.</param>
52 IEnumerable this[Type childType]
53 {
54 get;
55 }
56
57 /// <summary>
58 /// Adds a child to this element.
59 /// </summary>
60 /// <param name="child">Child to add.</param>
61 void AddChild(ISchemaElement child);
62
63 /// <summary>
64 /// Removes a child from this element.
65 /// </summary>
66 /// <param name="child">Child to remove.</param>
67 void RemoveChild(ISchemaElement child);
68 }
69
70 /// <summary>
71 /// Interface for generated schema elements. Implemented by classes with attributes.
72 /// </summary>
73 public interface ISetAttributes
74 {
75 /// <summary>
76 /// Sets the attribute with the given name to the given value. The value here is
77 /// a string, and is converted to the strongly-typed version inside this method.
78 /// </summary>
79 /// <param name="name">The name of the attribute to set.</param>
80 /// <param name="value">The value to assign to the attribute.</param>
81 void SetAttribute(string name, string value);
82 }
83
84 /// <summary>
85 /// Interface for generated schema elements. Implemented by classes with children.
86 /// </summary>
87 public interface ICreateChildren
88 {
89 /// <summary>
90 /// Creates an instance of the child with the passed in name.
91 /// </summary>
92 /// <param name="childName">String matching the element name of the child when represented in XML.</param>
93 /// <returns>An instance of that child.</returns>
94 ISchemaElement CreateChild(string childName);
95 }
96}
diff --git a/src/wix/heat/Serialize/CodeDomReader.cs b/src/wix/heat/Serialize/CodeDomReader.cs
new file mode 100644
index 00000000..0741bf68
--- /dev/null
+++ b/src/wix/heat/Serialize/CodeDomReader.cs
@@ -0,0 +1,162 @@
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
3namespace WixToolset.Harvesters.Serialize
4{
5 using System;
6 using System.Diagnostics.CodeAnalysis;
7 using System.Globalization;
8 using System.Reflection;
9 using System.Xml;
10 using WixToolset.Harvesters.Extensibility.Serialize;
11
12 /// <summary>
13 /// Class used for reading XML files in to the CodeDom.
14 /// </summary>
15 public class CodeDomReader
16 {
17 private Assembly[] assemblies;
18
19 /// <summary>
20 /// Creates a new CodeDomReader, using the current assembly.
21 /// </summary>
22 public CodeDomReader()
23 {
24 this.assemblies = new Assembly[] { Assembly.GetExecutingAssembly() };
25 }
26
27 /// <summary>
28 /// Creates a new CodeDomReader, and takes in a list of assemblies in which to
29 /// look for elements.
30 /// </summary>
31 /// <param name="assemblies">Assemblies in which to look for types that correspond
32 /// to elements.</param>
33 public CodeDomReader(Assembly[] assemblies)
34 {
35 this.assemblies = assemblies;
36 }
37
38 /// <summary>
39 /// Loads an XML file into a strongly-typed code dom.
40 /// </summary>
41 /// <param name="filePath">File to load into the code dom.</param>
42 /// <returns>The strongly-typed object at the root of the tree.</returns>
43 [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")]
44 public ISchemaElement Load(string filePath)
45 {
46 XmlDocument document = new XmlDocument();
47 document.Load(filePath);
48 ISchemaElement schemaElement = null;
49
50 foreach (XmlNode node in document.ChildNodes)
51 {
52 XmlElement element = node as XmlElement;
53 if (element != null)
54 {
55 if (schemaElement != null)
56 {
57 throw new InvalidOperationException(WixHarvesterStrings.EXP_MultipleRootElementsFoundInFile);
58 }
59
60 schemaElement = this.CreateObjectFromElement(element);
61 this.ParseObjectFromElement(schemaElement, element);
62 }
63 }
64 return schemaElement;
65 }
66
67 /// <summary>
68 /// Sets an attribute on an ISchemaElement.
69 /// </summary>
70 /// <param name="schemaElement">Schema element to set attribute on.</param>
71 /// <param name="name">Name of the attribute to set.</param>
72 /// <param name="value">Value to set on the attribute.</param>
73 [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")]
74 private static void SetAttributeOnObject(ISchemaElement schemaElement, string name, string value)
75 {
76 ISetAttributes setAttributes = schemaElement as ISetAttributes;
77 if (setAttributes == null)
78 {
79 throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixHarvesterStrings.EXP_ISchemaElementDoesnotImplementISetAttribute, schemaElement.GetType().FullName));
80 }
81 else
82 {
83 setAttributes.SetAttribute(name, value);
84 }
85 }
86
87 /// <summary>
88 /// Parses an ISchemaElement from the XmlElement.
89 /// </summary>
90 /// <param name="schemaElement">ISchemaElement to fill in.</param>
91 /// <param name="element">XmlElement to parse from.</param>
92 [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")]
93 private void ParseObjectFromElement(ISchemaElement schemaElement, XmlElement element)
94 {
95 foreach (XmlAttribute attribute in element.Attributes)
96 {
97 SetAttributeOnObject(schemaElement, attribute.LocalName, attribute.Value);
98 }
99
100 foreach (XmlNode node in element.ChildNodes)
101 {
102 XmlElement childElement = node as XmlElement;
103 if (childElement != null)
104 {
105 ISchemaElement childSchemaElement = null;
106 ICreateChildren createChildren = schemaElement as ICreateChildren;
107 if (createChildren == null)
108 {
109 throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixHarvesterStrings.EXP_ISchemaElementDoesnotImplementICreateChildren, element.LocalName));
110 }
111 else
112 {
113 childSchemaElement = createChildren.CreateChild(childElement.LocalName);
114 }
115
116 if (childSchemaElement == null)
117 {
118 childSchemaElement = this.CreateObjectFromElement(childElement);
119 if (childSchemaElement == null)
120 {
121 throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixHarvesterStrings.EXP_XmlElementDoesnotHaveISchemaElement, childElement.LocalName));
122 }
123 }
124
125 this.ParseObjectFromElement(childSchemaElement, childElement);
126 IParentElement parentElement = (IParentElement)schemaElement;
127 parentElement.AddChild(childSchemaElement);
128 }
129 else
130 {
131 XmlText childText = node as XmlText;
132 if (childText != null)
133 {
134 SetAttributeOnObject(schemaElement, "Content", childText.Value);
135 }
136 }
137 }
138 }
139
140 /// <summary>
141 /// Creates an object from an XML element by digging through the assembly list.
142 /// </summary>
143 /// <param name="element">XML Element to create an ISchemaElement from.</param>
144 /// <returns>A constructed ISchemaElement.</returns>
145 private ISchemaElement CreateObjectFromElement(XmlElement element)
146 {
147 ISchemaElement schemaElement = null;
148 foreach (Assembly assembly in this.assemblies)
149 {
150 foreach (Type type in assembly.GetTypes())
151 {
152 if (type.FullName.EndsWith(element.LocalName, StringComparison.Ordinal)
153 && typeof(ISchemaElement).IsAssignableFrom(type))
154 {
155 schemaElement = (ISchemaElement)Activator.CreateInstance(type);
156 }
157 }
158 }
159 return schemaElement;
160 }
161 }
162}
diff --git a/src/wix/heat/Serialize/ElementCollection.cs b/src/wix/heat/Serialize/ElementCollection.cs
new file mode 100644
index 00000000..bacbafbd
--- /dev/null
+++ b/src/wix/heat/Serialize/ElementCollection.cs
@@ -0,0 +1,618 @@
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
3namespace WixToolset.Harvesters.Serialize
4{
5 using System;
6 using System.Collections;
7 using System.Globalization;
8 using WixToolset.Harvesters.Extensibility.Serialize;
9
10 /// <summary>
11 /// Collection used in the CodeDOM for the children of a given element. Provides type-checking
12 /// on the allowed children to ensure that only allowed types are added.
13 /// </summary>
14 public class ElementCollection : ICollection, IEnumerable
15 {
16 private CollectionType collectionType;
17 private int totalContainedItems;
18 private int containersUsed;
19 private ArrayList items;
20
21 /// <summary>
22 /// Creates a new element collection.
23 /// </summary>
24 /// <param name="collectionType">Type of the collection to create.</param>
25 public ElementCollection(CollectionType collectionType)
26 {
27 this.collectionType = collectionType;
28 this.items = new ArrayList();
29 }
30
31 /// <summary>
32 /// Enum representing types of XML collections.
33 /// </summary>
34 public enum CollectionType
35 {
36 /// <summary>
37 /// A choice type, corresponding to the XSD choice element.
38 /// </summary>
39 Choice,
40
41 /// <summary>
42 /// A sequence type, corresponding to the XSD sequence element.
43 /// </summary>
44 Sequence
45 }
46
47 /// <summary>
48 /// Gets the type of collection.
49 /// </summary>
50 /// <value>The type of collection.</value>
51 public CollectionType Type
52 {
53 get { return this.collectionType; }
54 }
55
56 /// <summary>
57 /// Gets the count of child elements in this collection (counts ISchemaElements, not nested collections).
58 /// </summary>
59 /// <value>The count of child elements in this collection (counts ISchemaElements, not nested collections).</value>
60 public int Count
61 {
62 get { return this.totalContainedItems; }
63 }
64
65 /// <summary>
66 /// Gets the flag specifying whether this collection is synchronized. Always returns false.
67 /// </summary>
68 /// <value>The flag specifying whether this collection is synchronized. Always returns false.</value>
69 public bool IsSynchronized
70 {
71 get { return false; }
72 }
73
74 /// <summary>
75 /// Gets an object external callers can synchronize on.
76 /// </summary>
77 /// <value>An object external callers can synchronize on.</value>
78 public object SyncRoot
79 {
80 get { return this; }
81 }
82
83 /// <summary>
84 /// Adds a child element to this collection.
85 /// </summary>
86 /// <param name="element">The element to add.</param>
87 /// <exception cref="ArgumentException">Thrown if the child is not of an allowed type.</exception>
88 public void AddElement(ISchemaElement element)
89 {
90 foreach (object obj in this.items)
91 {
92 bool containerUsed;
93
94 CollectionItem collectionItem = obj as CollectionItem;
95 if (collectionItem != null)
96 {
97 containerUsed = collectionItem.Elements.Count != 0;
98 if (collectionItem.ElementType.IsAssignableFrom(element.GetType()))
99 {
100 collectionItem.AddElement(element);
101
102 if (!containerUsed)
103 {
104 this.containersUsed++;
105 }
106
107 this.totalContainedItems++;
108 return;
109 }
110
111 continue;
112 }
113
114 ElementCollection collection = obj as ElementCollection;
115 if (collection != null)
116 {
117 containerUsed = collection.Count != 0;
118
119 try
120 {
121 collection.AddElement(element);
122
123 if (!containerUsed)
124 {
125 this.containersUsed++;
126 }
127
128 this.totalContainedItems++;
129 return;
130 }
131 catch (ArgumentException)
132 {
133 // Eat the exception and keep looking. We'll throw our own if we can't find its home.
134 }
135
136 continue;
137 }
138 }
139
140 throw new ArgumentException(String.Format(
141 CultureInfo.InvariantCulture,
142 WixHarvesterStrings.EXP_ElementOfTypeIsNotValidForThisCollection,
143 element.GetType().Name));
144 }
145
146 /// <summary>
147 /// Removes a child element from this collection.
148 /// </summary>
149 /// <param name="element">The element to remove.</param>
150 /// <exception cref="ArgumentException">Thrown if the element is not of an allowed type.</exception>
151 public void RemoveElement(ISchemaElement element)
152 {
153 foreach (object obj in this.items)
154 {
155 CollectionItem collectionItem = obj as CollectionItem;
156 if (collectionItem != null)
157 {
158 if (collectionItem.ElementType.IsAssignableFrom(element.GetType()))
159 {
160 if (collectionItem.Elements.Count == 0)
161 {
162 return;
163 }
164
165 collectionItem.RemoveElement(element);
166
167 if (collectionItem.Elements.Count == 0)
168 {
169 this.containersUsed--;
170 }
171
172 this.totalContainedItems--;
173 return;
174 }
175
176 continue;
177 }
178
179 ElementCollection collection = obj as ElementCollection;
180 if (collection != null)
181 {
182 if (collection.Count == 0)
183 {
184 continue;
185 }
186
187 try
188 {
189 collection.RemoveElement(element);
190
191 if (collection.Count == 0)
192 {
193 this.containersUsed--;
194 }
195
196 this.totalContainedItems--;
197 return;
198 }
199 catch (ArgumentException)
200 {
201 // Eat the exception and keep looking. We'll throw our own if we can't find its home.
202 }
203
204 continue;
205 }
206 }
207
208 throw new ArgumentException(String.Format(
209 CultureInfo.InvariantCulture,
210 WixHarvesterStrings.EXP_ElementOfTypeIsNotValidForThisCollection,
211 element.GetType().Name));
212 }
213
214 /// <summary>
215 /// Copies this collection to an array.
216 /// </summary>
217 /// <param name="array">Array to copy to.</param>
218 /// <param name="index">Offset into the array.</param>
219 public void CopyTo(Array array, int index)
220 {
221 int item = 0;
222 foreach (ISchemaElement element in this)
223 {
224 array.SetValue(element, (long)(item + index));
225 item++;
226 }
227 }
228
229 /// <summary>
230 /// Creates an enumerator for walking the elements in this collection.
231 /// </summary>
232 /// <returns>A newly created enumerator.</returns>
233 public IEnumerator GetEnumerator()
234 {
235 return new ElementCollectionEnumerator(this);
236 }
237
238 /// <summary>
239 /// Gets an enumerable collection of children of a given type.
240 /// </summary>
241 /// <param name="childType">Type of children to get.</param>
242 /// <returns>A collection of children.</returns>
243 /// <exception cref="ArgumentException">Thrown if the type isn't a valid child type.</exception>
244 public IEnumerable Filter(Type childType)
245 {
246 foreach (object container in this.items)
247 {
248 CollectionItem collectionItem = container as CollectionItem;
249 if (collectionItem != null)
250 {
251 if (collectionItem.ElementType.IsAssignableFrom(childType))
252 {
253 return collectionItem.Elements;
254 }
255
256 continue;
257 }
258
259 ElementCollection elementCollection = container as ElementCollection;
260 if (elementCollection != null)
261 {
262 IEnumerable nestedFilter = elementCollection.Filter(childType);
263 if (nestedFilter != null)
264 {
265 return nestedFilter;
266 }
267
268 continue;
269 }
270 }
271
272 throw new ArgumentException(String.Format(
273 CultureInfo.InvariantCulture,
274 WixHarvesterStrings.EXP_TypeIsNotValidForThisCollection,
275 childType.Name));
276 }
277
278 /// <summary>
279 /// Adds a type to this collection.
280 /// </summary>
281 /// <param name="collectionItem">CollectionItem representing the type to add.</param>
282 public void AddItem(CollectionItem collectionItem)
283 {
284 this.items.Add(collectionItem);
285 }
286
287 /// <summary>
288 /// Adds a nested collection to this collection.
289 /// </summary>
290 /// <param name="collection">ElementCollection to add.</param>
291 public void AddCollection(ElementCollection collection)
292 {
293 this.items.Add(collection);
294 }
295
296 /// <summary>
297 /// Class used to represent a given type in the child collection of an element. Abstract,
298 /// has subclasses for choice and sequence (which can do cardinality checks).
299 /// </summary>
300 public abstract class CollectionItem
301 {
302 private Type elementType;
303 private ArrayList elements;
304
305 /// <summary>
306 /// Creates a new CollectionItem for the given element type.
307 /// </summary>
308 /// <param name="elementType">Type of the element for this collection item.</param>
309 protected CollectionItem(Type elementType)
310 {
311 this.elementType = elementType;
312 this.elements = new ArrayList();
313 }
314
315 /// <summary>
316 /// Gets the type of this collection's items.
317 /// </summary>
318 /// <value>The type of this collection's items.</value>
319 public Type ElementType
320 {
321 get { return this.elementType; }
322 }
323
324 /// <summary>
325 /// Gets the elements of this collection.
326 /// </summary>
327 /// <value>The elements of this collection.</value>
328 public ArrayList Elements
329 {
330 get { return this.elements; }
331 }
332
333 /// <summary>
334 /// Adds an element to this collection. Must be of an assignable type to the collection's
335 /// type.
336 /// </summary>
337 /// <param name="element">The element to add.</param>
338 /// <exception cref="ArgumentException">Thrown if the type isn't assignable to the collection's type.</exception>
339 public void AddElement(ISchemaElement element)
340 {
341 if (!this.elementType.IsAssignableFrom(element.GetType()))
342 {
343 throw new ArgumentException(
344 String.Format(
345 CultureInfo.InvariantCulture,
346 WixHarvesterStrings.EXP_ElementIsSubclassOfDifferentType,
347 this.elementType.Name,
348 element.GetType().Name),
349 "element");
350 }
351
352 this.elements.Add(element);
353 }
354
355 /// <summary>
356 /// Removes an element from this collection.
357 /// </summary>
358 /// <param name="element">The element to remove.</param>
359 /// <exception cref="ArgumentException">Thrown if the element's type isn't assignable to the collection's type.</exception>
360 public void RemoveElement(ISchemaElement element)
361 {
362 if (!this.elementType.IsAssignableFrom(element.GetType()))
363 {
364 throw new ArgumentException(
365 String.Format(
366 CultureInfo.InvariantCulture,
367 WixHarvesterStrings.EXP_ElementIsSubclassOfDifferentType,
368 this.elementType.Name,
369 element.GetType().Name),
370 "element");
371 }
372
373 this.elements.Remove(element);
374 }
375 }
376
377 /// <summary>
378 /// Class representing a choice item. Doesn't do cardinality checks.
379 /// </summary>
380 public class ChoiceItem : CollectionItem
381 {
382 /// <summary>
383 /// Creates a new choice item.
384 /// </summary>
385 /// <param name="elementType">Type of the created item.</param>
386 public ChoiceItem(Type elementType)
387 : base(elementType)
388 {
389 }
390 }
391
392 /// <summary>
393 /// Class representing a sequence item. Can do cardinality checks, if required.
394 /// </summary>
395 public class SequenceItem : CollectionItem
396 {
397 /// <summary>
398 /// Creates a new sequence item.
399 /// </summary>
400 /// <param name="elementType">Type of the created item.</param>
401 public SequenceItem(Type elementType)
402 : base(elementType)
403 {
404 }
405 }
406
407 /// <summary>
408 /// Enumerator for the ElementCollection.
409 /// </summary>
410 private class ElementCollectionEnumerator : IEnumerator
411 {
412 private ElementCollection collection;
413 private Stack collectionStack;
414
415 /// <summary>
416 /// Creates a new ElementCollectionEnumerator.
417 /// </summary>
418 /// <param name="collection">The collection to create an enumerator for.</param>
419 public ElementCollectionEnumerator(ElementCollection collection)
420 {
421 this.collection = collection;
422 }
423
424 /// <summary>
425 /// Gets the current object from the enumerator.
426 /// </summary>
427 public object Current
428 {
429 get
430 {
431 if (this.collectionStack != null && this.collectionStack.Count > 0)
432 {
433 CollectionSymbol symbol = (CollectionSymbol)this.collectionStack.Peek();
434 object container = symbol.Collection.items[symbol.ContainerIndex];
435
436 CollectionItem collectionItem = container as CollectionItem;
437 if (collectionItem != null)
438 {
439 return collectionItem.Elements[symbol.ItemIndex];
440 }
441
442 throw new InvalidOperationException(String.Format(
443 CultureInfo.InvariantCulture,
444 WixHarvesterStrings.EXP_ElementMustBeChoiceItemOrSequenceItem,
445 container.GetType().Name));
446 }
447
448 return null;
449 }
450 }
451
452 /// <summary>
453 /// Resets the enumerator to the beginning.
454 /// </summary>
455 public void Reset()
456 {
457 if (this.collectionStack != null)
458 {
459 this.collectionStack.Clear();
460 this.collectionStack = null;
461 }
462 }
463
464 /// <summary>
465 /// Moves the enumerator to the next item.
466 /// </summary>
467 /// <returns>True if there is a next item, false otherwise.</returns>
468 public bool MoveNext()
469 {
470 if (this.collectionStack == null)
471 {
472 if (this.collection.Count == 0)
473 {
474 return false;
475 }
476
477 this.collectionStack = new Stack();
478 this.collectionStack.Push(new CollectionSymbol(this.collection));
479 }
480
481 CollectionSymbol symbol = (CollectionSymbol)this.collectionStack.Peek();
482
483 if (this.FindNext(symbol))
484 {
485 return true;
486 }
487
488 this.collectionStack.Pop();
489 if (this.collectionStack.Count == 0)
490 {
491 return false;
492 }
493
494 return this.MoveNext();
495 }
496
497 /// <summary>
498 /// Pushes a collection onto the stack.
499 /// </summary>
500 /// <param name="elementCollection">The collection to push.</param>
501 private void PushCollection(ElementCollection elementCollection)
502 {
503 if (elementCollection.Count <= 0)
504 {
505 throw new ArgumentException(String.Format(
506 CultureInfo.InvariantCulture,
507 WixHarvesterStrings.EXP_CollectionMustHaveAtLeastOneElement,
508 elementCollection.Count));
509 }
510
511 CollectionSymbol symbol = new CollectionSymbol(elementCollection);
512 this.collectionStack.Push(symbol);
513 this.FindNext(symbol);
514 }
515
516 /// <summary>
517 /// Finds the next item from a given symbol.
518 /// </summary>
519 /// <param name="symbol">The symbol to start looking from.</param>
520 /// <returns>True if a next element is found, false otherwise.</returns>
521 private bool FindNext(CollectionSymbol symbol)
522 {
523 object container = symbol.Collection.items[symbol.ContainerIndex];
524
525 CollectionItem collectionItem = container as CollectionItem;
526 if (collectionItem != null)
527 {
528 if (symbol.ItemIndex + 1 < collectionItem.Elements.Count)
529 {
530 symbol.ItemIndex++;
531 return true;
532 }
533 }
534
535 ElementCollection elementCollection = container as ElementCollection;
536 if (elementCollection != null && elementCollection.Count > 0 && symbol.ItemIndex == -1)
537 {
538 symbol.ItemIndex++;
539 this.PushCollection(elementCollection);
540 return true;
541 }
542
543 symbol.ItemIndex = 0;
544
545 for (int i = symbol.ContainerIndex + 1; i < symbol.Collection.items.Count; ++i)
546 {
547 object nestedContainer = symbol.Collection.items[i];
548
549 CollectionItem nestedCollectionItem = nestedContainer as CollectionItem;
550 if (nestedCollectionItem != null)
551 {
552 if (nestedCollectionItem.Elements.Count > 0)
553 {
554 symbol.ContainerIndex = i;
555 return true;
556 }
557 }
558
559 ElementCollection nestedElementCollection = nestedContainer as ElementCollection;
560 if (nestedElementCollection != null && nestedElementCollection.Count > 0)
561 {
562 symbol.ContainerIndex = i;
563 this.PushCollection(nestedElementCollection);
564 return true;
565 }
566 }
567
568 return false;
569 }
570
571 /// <summary>
572 /// Class representing a single point in the collection. Consists of an ElementCollection,
573 /// a container index, and an index into the container.
574 /// </summary>
575 private class CollectionSymbol
576 {
577 private ElementCollection collection;
578 private int containerIndex;
579 private int itemIndex = -1;
580
581 /// <summary>
582 /// Creates a new CollectionSymbol.
583 /// </summary>
584 /// <param name="collection">The collection for the symbol.</param>
585 public CollectionSymbol(ElementCollection collection)
586 {
587 this.collection = collection;
588 }
589
590 /// <summary>
591 /// Gets the collection for the symbol.
592 /// </summary>
593 public ElementCollection Collection
594 {
595 get { return this.collection; }
596 }
597
598 /// <summary>
599 /// Gets and sets the index of the container in the collection.
600 /// </summary>
601 public int ContainerIndex
602 {
603 get { return this.containerIndex; }
604 set { this.containerIndex = value; }
605 }
606
607 /// <summary>
608 /// Gets and sets the index of the item in the container.
609 /// </summary>
610 public int ItemIndex
611 {
612 get { return this.itemIndex; }
613 set { this.itemIndex = value; }
614 }
615 }
616 }
617 }
618}
diff --git a/src/wix/heat/Serialize/WixHarvesterStrings.Designer.cs b/src/wix/heat/Serialize/WixHarvesterStrings.Designer.cs
new file mode 100644
index 00000000..6504a67b
--- /dev/null
+++ b/src/wix/heat/Serialize/WixHarvesterStrings.Designer.cs
@@ -0,0 +1,153 @@
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
11namespace WixToolset.Harvesters.Extensibility.Serialize {
12 using System;
13
14
15 /// <summary>
16 /// A strongly-typed resource class, for looking up localized strings, etc.
17 /// </summary>
18 // This class was auto-generated by the StronglyTypedResourceBuilder
19 // class via a tool like ResGen or Visual Studio.
20 // To add or remove a member, edit your .ResX file then rerun ResGen
21 // with the /str option, or rebuild your VS project.
22 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 internal class WixHarvesterStrings {
26
27 private static global::System.Resources.ResourceManager resourceMan;
28
29 private static global::System.Globalization.CultureInfo resourceCulture;
30
31 [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 internal WixHarvesterStrings() {
33 }
34
35 /// <summary>
36 /// Returns the cached ResourceManager instance used by this class.
37 /// </summary>
38 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 internal static global::System.Resources.ResourceManager ResourceManager {
40 get {
41 if (object.ReferenceEquals(resourceMan, null)) {
42 global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WixToolset.Harvesters.Extensibility.Serialize.WixHarvesterStrings", typeof(WixHarvesterStrings).Assembly);
43 resourceMan = temp;
44 }
45 return resourceMan;
46 }
47 }
48
49 /// <summary>
50 /// Overrides the current thread's CurrentUICulture property for all
51 /// resource lookups using this strongly typed resource class.
52 /// </summary>
53 [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 internal static global::System.Globalization.CultureInfo Culture {
55 get {
56 return resourceCulture;
57 }
58 set {
59 resourceCulture = value;
60 }
61 }
62
63 /// <summary>
64 /// Looks up a localized string similar to Collection has {0} elements. Must have at least one..
65 /// </summary>
66 internal static string EXP_CollectionMustHaveAtLeastOneElement {
67 get {
68 return ResourceManager.GetString("EXP_CollectionMustHaveAtLeastOneElement", resourceCulture);
69 }
70 }
71
72 /// <summary>
73 /// Looks up a localized string similar to Element must be a subclass of {0}, but was of type {1}..
74 /// </summary>
75 internal static string EXP_ElementIsSubclassOfDifferentType {
76 get {
77 return ResourceManager.GetString("EXP_ElementIsSubclassOfDifferentType", resourceCulture);
78 }
79 }
80
81 /// <summary>
82 /// Looks up a localized string similar to Element of type {0} found in enumerator. Must be ChoiceItem or SequenceItem..
83 /// </summary>
84 internal static string EXP_ElementMustBeChoiceItemOrSequenceItem {
85 get {
86 return ResourceManager.GetString("EXP_ElementMustBeChoiceItemOrSequenceItem", resourceCulture);
87 }
88 }
89
90 /// <summary>
91 /// Looks up a localized string similar to Element of type {0} is not valid for this collection..
92 /// </summary>
93 internal static string EXP_ElementOfTypeIsNotValidForThisCollection {
94 get {
95 return ResourceManager.GetString("EXP_ElementOfTypeIsNotValidForThisCollection", resourceCulture);
96 }
97 }
98
99 /// <summary>
100 /// Looks up a localized string similar to ISchemaElement with name {0} does not implement ICreateChildren..
101 /// </summary>
102 internal static string EXP_ISchemaElementDoesnotImplementICreateChildren {
103 get {
104 return ResourceManager.GetString("EXP_ISchemaElementDoesnotImplementICreateChildren", resourceCulture);
105 }
106 }
107
108 /// <summary>
109 /// Looks up a localized string similar to ISchemaElement with name {0} does not implement ISetAttributes..
110 /// </summary>
111 internal static string EXP_ISchemaElementDoesnotImplementISetAttribute {
112 get {
113 return ResourceManager.GetString("EXP_ISchemaElementDoesnotImplementISetAttribute", resourceCulture);
114 }
115 }
116
117 /// <summary>
118 /// Looks up a localized string similar to A Merge table FileCompression column contains an invalid value &apos;{0}&apos;..
119 /// </summary>
120 internal static string EXP_MergeTableFileCompressionColumnContainsInvalidValue {
121 get {
122 return ResourceManager.GetString("EXP_MergeTableFileCompressionColumnContainsInvalidValue", resourceCulture);
123 }
124 }
125
126 /// <summary>
127 /// Looks up a localized string similar to Multiple root elements found in file..
128 /// </summary>
129 internal static string EXP_MultipleRootElementsFoundInFile {
130 get {
131 return ResourceManager.GetString("EXP_MultipleRootElementsFoundInFile", resourceCulture);
132 }
133 }
134
135 /// <summary>
136 /// Looks up a localized string similar to Type {0} is not valid for this collection..
137 /// </summary>
138 internal static string EXP_TypeIsNotValidForThisCollection {
139 get {
140 return ResourceManager.GetString("EXP_TypeIsNotValidForThisCollection", resourceCulture);
141 }
142 }
143
144 /// <summary>
145 /// Looks up a localized string similar to XmlElement with name {0} does not have a corresponding ISchemaElement..
146 /// </summary>
147 internal static string EXP_XmlElementDoesnotHaveISchemaElement {
148 get {
149 return ResourceManager.GetString("EXP_XmlElementDoesnotHaveISchemaElement", resourceCulture);
150 }
151 }
152 }
153}
diff --git a/src/wix/heat/Serialize/WixHarvesterStrings.resx b/src/wix/heat/Serialize/WixHarvesterStrings.resx
new file mode 100644
index 00000000..5894a190
--- /dev/null
+++ b/src/wix/heat/Serialize/WixHarvesterStrings.resx
@@ -0,0 +1,150 @@
1<?xml version="1.0" encoding="utf-8"?>
2<root>
3 <!--
4 Microsoft ResX Schema
5
6 Version 2.0
7
8 The primary goals of this format is to allow a simple XML format
9 that is mostly human readable. The generation and parsing of the
10 various data types are done through the TypeConverter classes
11 associated with the data types.
12
13 Example:
14
15 ... ado.net/XML headers & schema ...
16 <resheader name="resmimetype">text/microsoft-resx</resheader>
17 <resheader name="version">2.0</resheader>
18 <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19 <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20 <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21 <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22 <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23 <value>[base64 mime encoded serialized .NET Framework object]</value>
24 </data>
25 <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26 <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27 <comment>This is a comment</comment>
28 </data>
29
30 There are any number of "resheader" rows that contain simple
31 name/value pairs.
32
33 Each data row contains a name, and value. The row also contains a
34 type or mimetype. Type corresponds to a .NET class that support
35 text/value conversion through the TypeConverter architecture.
36 Classes that don't support this are serialized and stored with the
37 mimetype set.
38
39 The mimetype is used for serialized objects, and tells the
40 ResXResourceReader how to depersist the object. This is currently not
41 extensible. For a given mimetype the value must be set accordingly:
42
43 Note - application/x-microsoft.net.object.binary.base64 is the format
44 that the ResXResourceWriter will generate, however the reader can
45 read any of the formats listed below.
46
47 mimetype: application/x-microsoft.net.object.binary.base64
48 value : The object must be serialized with
49 : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50 : and then encoded with base64 encoding.
51
52 mimetype: application/x-microsoft.net.object.soap.base64
53 value : The object must be serialized with
54 : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55 : and then encoded with base64 encoding.
56
57 mimetype: application/x-microsoft.net.object.bytearray.base64
58 value : The object must be serialized into a byte array
59 : using a System.ComponentModel.TypeConverter
60 : and then encoded with base64 encoding.
61 -->
62 <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63 <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64 <xsd:element name="root" msdata:IsDataSet="true">
65 <xsd:complexType>
66 <xsd:choice maxOccurs="unbounded">
67 <xsd:element name="metadata">
68 <xsd:complexType>
69 <xsd:sequence>
70 <xsd:element name="value" type="xsd:string" minOccurs="0" />
71 </xsd:sequence>
72 <xsd:attribute name="name" use="required" type="xsd:string" />
73 <xsd:attribute name="type" type="xsd:string" />
74 <xsd:attribute name="mimetype" type="xsd:string" />
75 <xsd:attribute ref="xml:space" />
76 </xsd:complexType>
77 </xsd:element>
78 <xsd:element name="assembly">
79 <xsd:complexType>
80 <xsd:attribute name="alias" type="xsd:string" />
81 <xsd:attribute name="name" type="xsd:string" />
82 </xsd:complexType>
83 </xsd:element>
84 <xsd:element name="data">
85 <xsd:complexType>
86 <xsd:sequence>
87 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89 </xsd:sequence>
90 <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91 <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92 <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93 <xsd:attribute ref="xml:space" />
94 </xsd:complexType>
95 </xsd:element>
96 <xsd:element name="resheader">
97 <xsd:complexType>
98 <xsd:sequence>
99 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100 </xsd:sequence>
101 <xsd:attribute name="name" type="xsd:string" use="required" />
102 </xsd:complexType>
103 </xsd:element>
104 </xsd:choice>
105 </xsd:complexType>
106 </xsd:element>
107 </xsd:schema>
108 <resheader name="resmimetype">
109 <value>text/microsoft-resx</value>
110 </resheader>
111 <resheader name="version">
112 <value>2.0</value>
113 </resheader>
114 <resheader name="reader">
115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116 </resheader>
117 <resheader name="writer">
118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119 </resheader>
120 <data name="EXP_MergeTableFileCompressionColumnContainsInvalidValue" xml:space="preserve">
121 <value>A Merge table FileCompression column contains an invalid value '{0}'.</value>
122 </data>
123 <data name="EXP_MultipleRootElementsFoundInFile" xml:space="preserve">
124 <value>Multiple root elements found in file.</value>
125 </data>
126 <data name="EXP_ISchemaElementDoesnotImplementICreateChildren" xml:space="preserve">
127 <value>ISchemaElement with name {0} does not implement ICreateChildren.</value>
128 </data>
129 <data name="EXP_ISchemaElementDoesnotImplementISetAttribute" xml:space="preserve">
130 <value>ISchemaElement with name {0} does not implement ISetAttributes.</value>
131 </data>
132 <data name="EXP_XmlElementDoesnotHaveISchemaElement" xml:space="preserve">
133 <value>XmlElement with name {0} does not have a corresponding ISchemaElement.</value>
134 </data>
135 <data name="EXP_ElementOfTypeIsNotValidForThisCollection" xml:space="preserve">
136 <value>Element of type {0} is not valid for this collection.</value>
137 </data>
138 <data name="EXP_TypeIsNotValidForThisCollection" xml:space="preserve">
139 <value>Type {0} is not valid for this collection.</value>
140 </data>
141 <data name="EXP_CollectionMustHaveAtLeastOneElement" xml:space="preserve">
142 <value>Collection has {0} elements. Must have at least one.</value>
143 </data>
144 <data name="EXP_ElementIsSubclassOfDifferentType" xml:space="preserve">
145 <value>Element must be a subclass of {0}, but was of type {1}.</value>
146 </data>
147 <data name="EXP_ElementMustBeChoiceItemOrSequenceItem" xml:space="preserve">
148 <value>Element of type {0} found in enumerator. Must be ChoiceItem or SequenceItem.</value>
149 </data>
150</root> \ No newline at end of file
diff --git a/src/wix/heat/Serialize/iis.cs b/src/wix/heat/Serialize/iis.cs
new file mode 100644
index 00000000..3f2943f8
--- /dev/null
+++ b/src/wix/heat/Serialize/iis.cs
@@ -0,0 +1,5915 @@
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#pragma warning disable 1591
12namespace WixToolset.Harvesters.Serialize.IIs
13{
14 using System;
15 using System.CodeDom.Compiler;
16 using System.Collections;
17 using System.Diagnostics.CodeAnalysis;
18 using System.Globalization;
19 using System.Xml;
20 using WixToolset.Harvesters.Serialize;
21
22
23 /// <summary>
24 /// Values of this type will either be "yes" or "no".
25 /// </summary>
26 [GeneratedCode("XsdGen", "4.0.0.0")]
27 public enum YesNoType
28 {
29
30 IllegalValue = int.MaxValue,
31
32 NotSet = -1,
33
34 no,
35
36 yes,
37 }
38
39 [GeneratedCode("XsdGen", "4.0.0.0")]
40 public class Enums
41 {
42
43 /// <summary>
44 /// Parses a YesNoType from a string.
45 /// </summary>
46 public static YesNoType ParseYesNoType(string value)
47 {
48 YesNoType parsedValue;
49 Enums.TryParseYesNoType(value, out parsedValue);
50 return parsedValue;
51 }
52
53 /// <summary>
54 /// Tries to parse a YesNoType from a string.
55 /// </summary>
56 public static bool TryParseYesNoType(string value, out YesNoType parsedValue)
57 {
58 parsedValue = YesNoType.NotSet;
59 if (string.IsNullOrEmpty(value))
60 {
61 return false;
62 }
63 if (("no" == value))
64 {
65 parsedValue = YesNoType.no;
66 }
67 else
68 {
69 if (("yes" == value))
70 {
71 parsedValue = YesNoType.yes;
72 }
73 else
74 {
75 parsedValue = YesNoType.IllegalValue;
76 return false;
77 }
78 }
79 return true;
80 }
81
82 /// <summary>
83 /// Parses a YesNoDefaultType from a string.
84 /// </summary>
85 public static YesNoDefaultType ParseYesNoDefaultType(string value)
86 {
87 YesNoDefaultType parsedValue;
88 Enums.TryParseYesNoDefaultType(value, out parsedValue);
89 return parsedValue;
90 }
91
92 /// <summary>
93 /// Tries to parse a YesNoDefaultType from a string.
94 /// </summary>
95 public static bool TryParseYesNoDefaultType(string value, out YesNoDefaultType parsedValue)
96 {
97 parsedValue = YesNoDefaultType.NotSet;
98 if (string.IsNullOrEmpty(value))
99 {
100 return false;
101 }
102 if (("default" == value))
103 {
104 parsedValue = YesNoDefaultType.@default;
105 }
106 else
107 {
108 if (("no" == value))
109 {
110 parsedValue = YesNoDefaultType.no;
111 }
112 else
113 {
114 if (("yes" == value))
115 {
116 parsedValue = YesNoDefaultType.yes;
117 }
118 else
119 {
120 parsedValue = YesNoDefaultType.IllegalValue;
121 return false;
122 }
123 }
124 }
125 return true;
126 }
127 }
128
129 /// <summary>
130 /// Values of this type will either be "default", "yes", or "no".
131 /// </summary>
132 [GeneratedCode("XsdGen", "4.0.0.0")]
133 public enum YesNoDefaultType
134 {
135
136 IllegalValue = int.MaxValue,
137
138 NotSet = -1,
139
140 @default,
141
142 no,
143
144 yes,
145 }
146
147 /// <summary>
148 /// WebDirProperties used by one or more WebSites. Lists properties common to IIS web sites and vroots. Corresponding properties can be viewed through the IIS Manager snap-in. One property entry can be reused by multiple sites or vroots using the Id field as a reference, using WebVirtualDir.DirProperties, WebSite.DirProperties, or WebDir.DirProperties.
149 /// </summary>
150 [GeneratedCode("XsdGen", "4.0.0.0")]
151 public class WebDirProperties : ISchemaElement, ISetAttributes
152 {
153
154 private string idField;
155
156 private bool idFieldSet;
157
158 private YesNoType readField;
159
160 private bool readFieldSet;
161
162 private YesNoType writeField;
163
164 private bool writeFieldSet;
165
166 private YesNoType scriptField;
167
168 private bool scriptFieldSet;
169
170 private YesNoType executeField;
171
172 private bool executeFieldSet;
173
174 private YesNoType anonymousAccessField;
175
176 private bool anonymousAccessFieldSet;
177
178 private string anonymousUserField;
179
180 private bool anonymousUserFieldSet;
181
182 private YesNoType iIsControlledPasswordField;
183
184 private bool iIsControlledPasswordFieldSet;
185
186 private YesNoType windowsAuthenticationField;
187
188 private bool windowsAuthenticationFieldSet;
189
190 private YesNoType digestAuthenticationField;
191
192 private bool digestAuthenticationFieldSet;
193
194 private YesNoType basicAuthenticationField;
195
196 private bool basicAuthenticationFieldSet;
197
198 private YesNoType passportAuthenticationField;
199
200 private bool passportAuthenticationFieldSet;
201
202 private YesNoType logVisitsField;
203
204 private bool logVisitsFieldSet;
205
206 private YesNoType indexField;
207
208 private bool indexFieldSet;
209
210 private string defaultDocumentsField;
211
212 private bool defaultDocumentsFieldSet;
213
214 private YesNoType aspDetailedErrorField;
215
216 private bool aspDetailedErrorFieldSet;
217
218 private string httpExpiresField;
219
220 private bool httpExpiresFieldSet;
221
222 private long cacheControlMaxAgeField;
223
224 private bool cacheControlMaxAgeFieldSet;
225
226 private string cacheControlCustomField;
227
228 private bool cacheControlCustomFieldSet;
229
230 private YesNoType clearCustomErrorField;
231
232 private bool clearCustomErrorFieldSet;
233
234 private YesNoType accessSSLField;
235
236 private bool accessSSLFieldSet;
237
238 private YesNoType accessSSL128Field;
239
240 private bool accessSSL128FieldSet;
241
242 private YesNoType accessSSLMapCertField;
243
244 private bool accessSSLMapCertFieldSet;
245
246 private YesNoType accessSSLNegotiateCertField;
247
248 private bool accessSSLNegotiateCertFieldSet;
249
250 private YesNoType accessSSLRequireCertField;
251
252 private bool accessSSLRequireCertFieldSet;
253
254 private string authenticationProvidersField;
255
256 private bool authenticationProvidersFieldSet;
257
258 private ISchemaElement parentElement;
259
260 public string Id
261 {
262 get
263 {
264 return this.idField;
265 }
266 set
267 {
268 this.idFieldSet = true;
269 this.idField = value;
270 }
271 }
272
273 public YesNoType Read
274 {
275 get
276 {
277 return this.readField;
278 }
279 set
280 {
281 this.readFieldSet = true;
282 this.readField = value;
283 }
284 }
285
286 public YesNoType Write
287 {
288 get
289 {
290 return this.writeField;
291 }
292 set
293 {
294 this.writeFieldSet = true;
295 this.writeField = value;
296 }
297 }
298
299 public YesNoType Script
300 {
301 get
302 {
303 return this.scriptField;
304 }
305 set
306 {
307 this.scriptFieldSet = true;
308 this.scriptField = value;
309 }
310 }
311
312 public YesNoType Execute
313 {
314 get
315 {
316 return this.executeField;
317 }
318 set
319 {
320 this.executeFieldSet = true;
321 this.executeField = value;
322 }
323 }
324
325 /// <summary>
326 /// Sets the Enable Anonymous Access checkbox, which maps anonymous users to a Windows user account. When setting this to 'yes' you should also provide the user account using the AnonymousUser attribute, and determine what setting to use for the IIsControlledPassword attribute. Defaults to 'no.'
327 /// </summary>
328 public YesNoType AnonymousAccess
329 {
330 get
331 {
332 return this.anonymousAccessField;
333 }
334 set
335 {
336 this.anonymousAccessFieldSet = true;
337 this.anonymousAccessField = value;
338 }
339 }
340
341 /// <summary>
342 /// Reference to the Id attribute on the User element to be used as the anonymous user for the directory. See the User element for more information.
343 /// </summary>
344 public string AnonymousUser
345 {
346 get
347 {
348 return this.anonymousUserField;
349 }
350 set
351 {
352 this.anonymousUserFieldSet = true;
353 this.anonymousUserField = value;
354 }
355 }
356
357 /// <summary>
358 /// Sets whether IIS should control the password used for the Windows account specified in the AnonymousUser attribute. Defaults to 'no.'
359 /// </summary>
360 public YesNoType IIsControlledPassword
361 {
362 get
363 {
364 return this.iIsControlledPasswordField;
365 }
366 set
367 {
368 this.iIsControlledPasswordFieldSet = true;
369 this.iIsControlledPasswordField = value;
370 }
371 }
372
373 /// <summary>
374 /// Sets the Windows Authentication option, which enables integrated Windows authentication to be used on the site. Defaults to 'no.'
375 /// </summary>
376 public YesNoType WindowsAuthentication
377 {
378 get
379 {
380 return this.windowsAuthenticationField;
381 }
382 set
383 {
384 this.windowsAuthenticationFieldSet = true;
385 this.windowsAuthenticationField = value;
386 }
387 }
388
389 /// <summary>
390 /// Sets the Digest Authentication option, which allows using digest authentication with domain user accounts. Defaults to 'no.'
391 /// </summary>
392 public YesNoType DigestAuthentication
393 {
394 get
395 {
396 return this.digestAuthenticationField;
397 }
398 set
399 {
400 this.digestAuthenticationFieldSet = true;
401 this.digestAuthenticationField = value;
402 }
403 }
404
405 /// <summary>
406 /// Sets the Basic Authentication option, which allows clients to provide credentials in plaintext over the wire. Defaults to 'no.'
407 /// </summary>
408 public YesNoType BasicAuthentication
409 {
410 get
411 {
412 return this.basicAuthenticationField;
413 }
414 set
415 {
416 this.basicAuthenticationFieldSet = true;
417 this.basicAuthenticationField = value;
418 }
419 }
420
421 /// <summary>
422 /// Sets the Passport Authentication option, which allows clients to provide credentials via a .Net Passport account. Defaults to 'no.'
423 /// </summary>
424 public YesNoType PassportAuthentication
425 {
426 get
427 {
428 return this.passportAuthenticationField;
429 }
430 set
431 {
432 this.passportAuthenticationFieldSet = true;
433 this.passportAuthenticationField = value;
434 }
435 }
436
437 /// <summary>
438 /// Sets whether visits to this site should be logged. Defaults to 'no.'
439 /// </summary>
440 public YesNoType LogVisits
441 {
442 get
443 {
444 return this.logVisitsField;
445 }
446 set
447 {
448 this.logVisitsFieldSet = true;
449 this.logVisitsField = value;
450 }
451 }
452
453 /// <summary>
454 /// Sets the Index Resource option, which specifies whether this web directory should be indexed. Defaults to 'no.'
455 /// </summary>
456 public YesNoType Index
457 {
458 get
459 {
460 return this.indexField;
461 }
462 set
463 {
464 this.indexFieldSet = true;
465 this.indexField = value;
466 }
467 }
468
469 /// <summary>
470 /// The list of default documents to set for this web directory, in comma-delimited format.
471 /// </summary>
472 public string DefaultDocuments
473 {
474 get
475 {
476 return this.defaultDocumentsField;
477 }
478 set
479 {
480 this.defaultDocumentsFieldSet = true;
481 this.defaultDocumentsField = value;
482 }
483 }
484
485 /// <summary>
486 /// Sets the option for whether to send detailed ASP errors back to the client on script error. Default is 'no.'
487 /// </summary>
488 public YesNoType AspDetailedError
489 {
490 get
491 {
492 return this.aspDetailedErrorField;
493 }
494 set
495 {
496 this.aspDetailedErrorFieldSet = true;
497 this.aspDetailedErrorField = value;
498 }
499 }
500
501 /// <summary>
502 /// Value to set the HttpExpires attribute to for a Web Dir in the metabase.
503 /// </summary>
504 public string HttpExpires
505 {
506 get
507 {
508 return this.httpExpiresField;
509 }
510 set
511 {
512 this.httpExpiresFieldSet = true;
513 this.httpExpiresField = value;
514 }
515 }
516
517 /// <summary>
518 /// Integer value specifying the cache control maximum age value.
519 /// </summary>
520 public long CacheControlMaxAge
521 {
522 get
523 {
524 return this.cacheControlMaxAgeField;
525 }
526 set
527 {
528 this.cacheControlMaxAgeFieldSet = true;
529 this.cacheControlMaxAgeField = value;
530 }
531 }
532
533 /// <summary>
534 /// Custom HTTP 1.1 cache control directives.
535 /// </summary>
536 public string CacheControlCustom
537 {
538 get
539 {
540 return this.cacheControlCustomField;
541 }
542 set
543 {
544 this.cacheControlCustomFieldSet = true;
545 this.cacheControlCustomField = value;
546 }
547 }
548
549 /// <summary>
550 /// Specifies whether IIs will return custom errors for this directory.
551 /// </summary>
552 public YesNoType ClearCustomError
553 {
554 get
555 {
556 return this.clearCustomErrorField;
557 }
558 set
559 {
560 this.clearCustomErrorFieldSet = true;
561 this.clearCustomErrorField = value;
562 }
563 }
564
565 /// <summary>
566 /// A value of true indicates that file access requires SSL file permission processing, with or without a client certificate. This corresponds to AccessSSL flag for AccessSSLFlags IIS metabase property.
567 /// </summary>
568 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
569 public YesNoType AccessSSL
570 {
571 get
572 {
573 return this.accessSSLField;
574 }
575 set
576 {
577 this.accessSSLFieldSet = true;
578 this.accessSSLField = value;
579 }
580 }
581
582 /// <summary>
583 /// A value of true indicates that file access requires SSL file permission processing with a minimum key size of 128 bits, with or without a client certificate. This corresponds to AccessSSL128 flag for AccessSSLFlags IIS metabase property.
584 /// </summary>
585 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
586 public YesNoType AccessSSL128
587 {
588 get
589 {
590 return this.accessSSL128Field;
591 }
592 set
593 {
594 this.accessSSL128FieldSet = true;
595 this.accessSSL128Field = value;
596 }
597 }
598
599 /// <summary>
600 /// This corresponds to AccessSSLMapCert flag for AccessSSLFlags IIS metabase property.
601 /// </summary>
602 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
603 public YesNoType AccessSSLMapCert
604 {
605 get
606 {
607 return this.accessSSLMapCertField;
608 }
609 set
610 {
611 this.accessSSLMapCertFieldSet = true;
612 this.accessSSLMapCertField = value;
613 }
614 }
615
616 /// <summary>
617 /// This corresponds to AccessSSLNegotiateCert flag for AccessSSLFlags IIS metabase property.
618 /// </summary>
619 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
620 public YesNoType AccessSSLNegotiateCert
621 {
622 get
623 {
624 return this.accessSSLNegotiateCertField;
625 }
626 set
627 {
628 this.accessSSLNegotiateCertFieldSet = true;
629 this.accessSSLNegotiateCertField = value;
630 }
631 }
632
633 /// <summary>
634 /// This corresponds to AccessSSLRequireCert flag for AccessSSLFlags IIS metabase property.
635 /// </summary>
636 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
637 public YesNoType AccessSSLRequireCert
638 {
639 get
640 {
641 return this.accessSSLRequireCertField;
642 }
643 set
644 {
645 this.accessSSLRequireCertFieldSet = true;
646 this.accessSSLRequireCertField = value;
647 }
648 }
649
650 /// <summary>
651 /// Comma delimited list, in order of precedence, of Windows authentication providers that IIS will attempt to use: NTLM, Kerberos, Negotiate, and others.
652 /// </summary>
653 public string AuthenticationProviders
654 {
655 get
656 {
657 return this.authenticationProvidersField;
658 }
659 set
660 {
661 this.authenticationProvidersFieldSet = true;
662 this.authenticationProvidersField = value;
663 }
664 }
665
666 public virtual ISchemaElement ParentElement
667 {
668 get
669 {
670 return this.parentElement;
671 }
672 set
673 {
674 this.parentElement = value;
675 }
676 }
677
678 /// <summary>
679 /// Processes this element and all child elements into an XmlWriter.
680 /// </summary>
681 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
682 public virtual void OutputXml(XmlWriter writer)
683 {
684 if ((null == writer))
685 {
686 throw new ArgumentNullException("writer");
687 }
688 writer.WriteStartElement("WebDirProperties", "http://wixtoolset.org/schemas/v4/wxs/iis");
689 if (this.idFieldSet)
690 {
691 writer.WriteAttributeString("Id", this.idField);
692 }
693 if (this.readFieldSet)
694 {
695 if ((this.readField == YesNoType.no))
696 {
697 writer.WriteAttributeString("Read", "no");
698 }
699 if ((this.readField == YesNoType.yes))
700 {
701 writer.WriteAttributeString("Read", "yes");
702 }
703 }
704 if (this.writeFieldSet)
705 {
706 if ((this.writeField == YesNoType.no))
707 {
708 writer.WriteAttributeString("Write", "no");
709 }
710 if ((this.writeField == YesNoType.yes))
711 {
712 writer.WriteAttributeString("Write", "yes");
713 }
714 }
715 if (this.scriptFieldSet)
716 {
717 if ((this.scriptField == YesNoType.no))
718 {
719 writer.WriteAttributeString("Script", "no");
720 }
721 if ((this.scriptField == YesNoType.yes))
722 {
723 writer.WriteAttributeString("Script", "yes");
724 }
725 }
726 if (this.executeFieldSet)
727 {
728 if ((this.executeField == YesNoType.no))
729 {
730 writer.WriteAttributeString("Execute", "no");
731 }
732 if ((this.executeField == YesNoType.yes))
733 {
734 writer.WriteAttributeString("Execute", "yes");
735 }
736 }
737 if (this.anonymousAccessFieldSet)
738 {
739 if ((this.anonymousAccessField == YesNoType.no))
740 {
741 writer.WriteAttributeString("AnonymousAccess", "no");
742 }
743 if ((this.anonymousAccessField == YesNoType.yes))
744 {
745 writer.WriteAttributeString("AnonymousAccess", "yes");
746 }
747 }
748 if (this.anonymousUserFieldSet)
749 {
750 writer.WriteAttributeString("AnonymousUser", this.anonymousUserField);
751 }
752 if (this.iIsControlledPasswordFieldSet)
753 {
754 if ((this.iIsControlledPasswordField == YesNoType.no))
755 {
756 writer.WriteAttributeString("IIsControlledPassword", "no");
757 }
758 if ((this.iIsControlledPasswordField == YesNoType.yes))
759 {
760 writer.WriteAttributeString("IIsControlledPassword", "yes");
761 }
762 }
763 if (this.windowsAuthenticationFieldSet)
764 {
765 if ((this.windowsAuthenticationField == YesNoType.no))
766 {
767 writer.WriteAttributeString("WindowsAuthentication", "no");
768 }
769 if ((this.windowsAuthenticationField == YesNoType.yes))
770 {
771 writer.WriteAttributeString("WindowsAuthentication", "yes");
772 }
773 }
774 if (this.digestAuthenticationFieldSet)
775 {
776 if ((this.digestAuthenticationField == YesNoType.no))
777 {
778 writer.WriteAttributeString("DigestAuthentication", "no");
779 }
780 if ((this.digestAuthenticationField == YesNoType.yes))
781 {
782 writer.WriteAttributeString("DigestAuthentication", "yes");
783 }
784 }
785 if (this.basicAuthenticationFieldSet)
786 {
787 if ((this.basicAuthenticationField == YesNoType.no))
788 {
789 writer.WriteAttributeString("BasicAuthentication", "no");
790 }
791 if ((this.basicAuthenticationField == YesNoType.yes))
792 {
793 writer.WriteAttributeString("BasicAuthentication", "yes");
794 }
795 }
796 if (this.passportAuthenticationFieldSet)
797 {
798 if ((this.passportAuthenticationField == YesNoType.no))
799 {
800 writer.WriteAttributeString("PassportAuthentication", "no");
801 }
802 if ((this.passportAuthenticationField == YesNoType.yes))
803 {
804 writer.WriteAttributeString("PassportAuthentication", "yes");
805 }
806 }
807 if (this.logVisitsFieldSet)
808 {
809 if ((this.logVisitsField == YesNoType.no))
810 {
811 writer.WriteAttributeString("LogVisits", "no");
812 }
813 if ((this.logVisitsField == YesNoType.yes))
814 {
815 writer.WriteAttributeString("LogVisits", "yes");
816 }
817 }
818 if (this.indexFieldSet)
819 {
820 if ((this.indexField == YesNoType.no))
821 {
822 writer.WriteAttributeString("Index", "no");
823 }
824 if ((this.indexField == YesNoType.yes))
825 {
826 writer.WriteAttributeString("Index", "yes");
827 }
828 }
829 if (this.defaultDocumentsFieldSet)
830 {
831 writer.WriteAttributeString("DefaultDocuments", this.defaultDocumentsField);
832 }
833 if (this.aspDetailedErrorFieldSet)
834 {
835 if ((this.aspDetailedErrorField == YesNoType.no))
836 {
837 writer.WriteAttributeString("AspDetailedError", "no");
838 }
839 if ((this.aspDetailedErrorField == YesNoType.yes))
840 {
841 writer.WriteAttributeString("AspDetailedError", "yes");
842 }
843 }
844 if (this.httpExpiresFieldSet)
845 {
846 writer.WriteAttributeString("HttpExpires", this.httpExpiresField);
847 }
848 if (this.cacheControlMaxAgeFieldSet)
849 {
850 writer.WriteAttributeString("CacheControlMaxAge", this.cacheControlMaxAgeField.ToString(CultureInfo.InvariantCulture));
851 }
852 if (this.cacheControlCustomFieldSet)
853 {
854 writer.WriteAttributeString("CacheControlCustom", this.cacheControlCustomField);
855 }
856 if (this.clearCustomErrorFieldSet)
857 {
858 if ((this.clearCustomErrorField == YesNoType.no))
859 {
860 writer.WriteAttributeString("ClearCustomError", "no");
861 }
862 if ((this.clearCustomErrorField == YesNoType.yes))
863 {
864 writer.WriteAttributeString("ClearCustomError", "yes");
865 }
866 }
867 if (this.accessSSLFieldSet)
868 {
869 if ((this.accessSSLField == YesNoType.no))
870 {
871 writer.WriteAttributeString("AccessSSL", "no");
872 }
873 if ((this.accessSSLField == YesNoType.yes))
874 {
875 writer.WriteAttributeString("AccessSSL", "yes");
876 }
877 }
878 if (this.accessSSL128FieldSet)
879 {
880 if ((this.accessSSL128Field == YesNoType.no))
881 {
882 writer.WriteAttributeString("AccessSSL128", "no");
883 }
884 if ((this.accessSSL128Field == YesNoType.yes))
885 {
886 writer.WriteAttributeString("AccessSSL128", "yes");
887 }
888 }
889 if (this.accessSSLMapCertFieldSet)
890 {
891 if ((this.accessSSLMapCertField == YesNoType.no))
892 {
893 writer.WriteAttributeString("AccessSSLMapCert", "no");
894 }
895 if ((this.accessSSLMapCertField == YesNoType.yes))
896 {
897 writer.WriteAttributeString("AccessSSLMapCert", "yes");
898 }
899 }
900 if (this.accessSSLNegotiateCertFieldSet)
901 {
902 if ((this.accessSSLNegotiateCertField == YesNoType.no))
903 {
904 writer.WriteAttributeString("AccessSSLNegotiateCert", "no");
905 }
906 if ((this.accessSSLNegotiateCertField == YesNoType.yes))
907 {
908 writer.WriteAttributeString("AccessSSLNegotiateCert", "yes");
909 }
910 }
911 if (this.accessSSLRequireCertFieldSet)
912 {
913 if ((this.accessSSLRequireCertField == YesNoType.no))
914 {
915 writer.WriteAttributeString("AccessSSLRequireCert", "no");
916 }
917 if ((this.accessSSLRequireCertField == YesNoType.yes))
918 {
919 writer.WriteAttributeString("AccessSSLRequireCert", "yes");
920 }
921 }
922 if (this.authenticationProvidersFieldSet)
923 {
924 writer.WriteAttributeString("AuthenticationProviders", this.authenticationProvidersField);
925 }
926 writer.WriteEndElement();
927 }
928
929 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
930 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
931 void ISetAttributes.SetAttribute(string name, string value)
932 {
933 if (String.IsNullOrEmpty(name))
934 {
935 throw new ArgumentNullException("name");
936 }
937 if (("Id" == name))
938 {
939 this.idField = value;
940 this.idFieldSet = true;
941 }
942 if (("Read" == name))
943 {
944 this.readField = Enums.ParseYesNoType(value);
945 this.readFieldSet = true;
946 }
947 if (("Write" == name))
948 {
949 this.writeField = Enums.ParseYesNoType(value);
950 this.writeFieldSet = true;
951 }
952 if (("Script" == name))
953 {
954 this.scriptField = Enums.ParseYesNoType(value);
955 this.scriptFieldSet = true;
956 }
957 if (("Execute" == name))
958 {
959 this.executeField = Enums.ParseYesNoType(value);
960 this.executeFieldSet = true;
961 }
962 if (("AnonymousAccess" == name))
963 {
964 this.anonymousAccessField = Enums.ParseYesNoType(value);
965 this.anonymousAccessFieldSet = true;
966 }
967 if (("AnonymousUser" == name))
968 {
969 this.anonymousUserField = value;
970 this.anonymousUserFieldSet = true;
971 }
972 if (("IIsControlledPassword" == name))
973 {
974 this.iIsControlledPasswordField = Enums.ParseYesNoType(value);
975 this.iIsControlledPasswordFieldSet = true;
976 }
977 if (("WindowsAuthentication" == name))
978 {
979 this.windowsAuthenticationField = Enums.ParseYesNoType(value);
980 this.windowsAuthenticationFieldSet = true;
981 }
982 if (("DigestAuthentication" == name))
983 {
984 this.digestAuthenticationField = Enums.ParseYesNoType(value);
985 this.digestAuthenticationFieldSet = true;
986 }
987 if (("BasicAuthentication" == name))
988 {
989 this.basicAuthenticationField = Enums.ParseYesNoType(value);
990 this.basicAuthenticationFieldSet = true;
991 }
992 if (("PassportAuthentication" == name))
993 {
994 this.passportAuthenticationField = Enums.ParseYesNoType(value);
995 this.passportAuthenticationFieldSet = true;
996 }
997 if (("LogVisits" == name))
998 {
999 this.logVisitsField = Enums.ParseYesNoType(value);
1000 this.logVisitsFieldSet = true;
1001 }
1002 if (("Index" == name))
1003 {
1004 this.indexField = Enums.ParseYesNoType(value);
1005 this.indexFieldSet = true;
1006 }
1007 if (("DefaultDocuments" == name))
1008 {
1009 this.defaultDocumentsField = value;
1010 this.defaultDocumentsFieldSet = true;
1011 }
1012 if (("AspDetailedError" == name))
1013 {
1014 this.aspDetailedErrorField = Enums.ParseYesNoType(value);
1015 this.aspDetailedErrorFieldSet = true;
1016 }
1017 if (("HttpExpires" == name))
1018 {
1019 this.httpExpiresField = value;
1020 this.httpExpiresFieldSet = true;
1021 }
1022 if (("CacheControlMaxAge" == name))
1023 {
1024 this.cacheControlMaxAgeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1025 this.cacheControlMaxAgeFieldSet = true;
1026 }
1027 if (("CacheControlCustom" == name))
1028 {
1029 this.cacheControlCustomField = value;
1030 this.cacheControlCustomFieldSet = true;
1031 }
1032 if (("ClearCustomError" == name))
1033 {
1034 this.clearCustomErrorField = Enums.ParseYesNoType(value);
1035 this.clearCustomErrorFieldSet = true;
1036 }
1037 if (("AccessSSL" == name))
1038 {
1039 this.accessSSLField = Enums.ParseYesNoType(value);
1040 this.accessSSLFieldSet = true;
1041 }
1042 if (("AccessSSL128" == name))
1043 {
1044 this.accessSSL128Field = Enums.ParseYesNoType(value);
1045 this.accessSSL128FieldSet = true;
1046 }
1047 if (("AccessSSLMapCert" == name))
1048 {
1049 this.accessSSLMapCertField = Enums.ParseYesNoType(value);
1050 this.accessSSLMapCertFieldSet = true;
1051 }
1052 if (("AccessSSLNegotiateCert" == name))
1053 {
1054 this.accessSSLNegotiateCertField = Enums.ParseYesNoType(value);
1055 this.accessSSLNegotiateCertFieldSet = true;
1056 }
1057 if (("AccessSSLRequireCert" == name))
1058 {
1059 this.accessSSLRequireCertField = Enums.ParseYesNoType(value);
1060 this.accessSSLRequireCertFieldSet = true;
1061 }
1062 if (("AuthenticationProviders" == name))
1063 {
1064 this.authenticationProvidersField = value;
1065 this.authenticationProvidersFieldSet = true;
1066 }
1067 }
1068 }
1069
1070 /// <summary>
1071 /// Custom Web Errors used by WebSites and Virtual Directories.
1072 /// </summary>
1073 [GeneratedCode("XsdGen", "4.0.0.0")]
1074 public class WebError : ISchemaElement, ISetAttributes
1075 {
1076
1077 private int errorCodeField;
1078
1079 private bool errorCodeFieldSet;
1080
1081 private int subCodeField;
1082
1083 private bool subCodeFieldSet;
1084
1085 private string fileField;
1086
1087 private bool fileFieldSet;
1088
1089 private string uRLField;
1090
1091 private bool uRLFieldSet;
1092
1093 private ISchemaElement parentElement;
1094
1095 /// <summary>
1096 /// HTTP 1.1 error code.
1097 /// </summary>
1098 public int ErrorCode
1099 {
1100 get
1101 {
1102 return this.errorCodeField;
1103 }
1104 set
1105 {
1106 this.errorCodeFieldSet = true;
1107 this.errorCodeField = value;
1108 }
1109 }
1110
1111 /// <summary>
1112 /// Error sub code. Set to 0 to get the wild card "*".
1113 /// </summary>
1114 public int SubCode
1115 {
1116 get
1117 {
1118 return this.subCodeField;
1119 }
1120 set
1121 {
1122 this.subCodeFieldSet = true;
1123 this.subCodeField = value;
1124 }
1125 }
1126
1127 /// <summary>
1128 /// File to be sent to the client for this error code and sub code. This can be formatted. For example: [#FileId].
1129 /// </summary>
1130 public string File
1131 {
1132 get
1133 {
1134 return this.fileField;
1135 }
1136 set
1137 {
1138 this.fileFieldSet = true;
1139 this.fileField = value;
1140 }
1141 }
1142
1143 /// <summary>
1144 /// URL to be sent to the client for this error code and sub code. This can be formatted.
1145 /// </summary>
1146 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
1147 public string URL
1148 {
1149 get
1150 {
1151 return this.uRLField;
1152 }
1153 set
1154 {
1155 this.uRLFieldSet = true;
1156 this.uRLField = value;
1157 }
1158 }
1159
1160 public virtual ISchemaElement ParentElement
1161 {
1162 get
1163 {
1164 return this.parentElement;
1165 }
1166 set
1167 {
1168 this.parentElement = value;
1169 }
1170 }
1171
1172 /// <summary>
1173 /// Processes this element and all child elements into an XmlWriter.
1174 /// </summary>
1175 public virtual void OutputXml(XmlWriter writer)
1176 {
1177 if ((null == writer))
1178 {
1179 throw new ArgumentNullException("writer");
1180 }
1181 writer.WriteStartElement("WebError", "http://wixtoolset.org/schemas/v4/wxs/iis");
1182 if (this.errorCodeFieldSet)
1183 {
1184 writer.WriteAttributeString("ErrorCode", this.errorCodeField.ToString(CultureInfo.InvariantCulture));
1185 }
1186 if (this.subCodeFieldSet)
1187 {
1188 writer.WriteAttributeString("SubCode", this.subCodeField.ToString(CultureInfo.InvariantCulture));
1189 }
1190 if (this.fileFieldSet)
1191 {
1192 writer.WriteAttributeString("File", this.fileField);
1193 }
1194 if (this.uRLFieldSet)
1195 {
1196 writer.WriteAttributeString("URL", this.uRLField);
1197 }
1198 writer.WriteEndElement();
1199 }
1200
1201 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1202 void ISetAttributes.SetAttribute(string name, string value)
1203 {
1204 if (String.IsNullOrEmpty(name))
1205 {
1206 throw new ArgumentNullException("name");
1207 }
1208 if (("ErrorCode" == name))
1209 {
1210 this.errorCodeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1211 this.errorCodeFieldSet = true;
1212 }
1213 if (("SubCode" == name))
1214 {
1215 this.subCodeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1216 this.subCodeFieldSet = true;
1217 }
1218 if (("File" == name))
1219 {
1220 this.fileField = value;
1221 this.fileFieldSet = true;
1222 }
1223 if (("URL" == name))
1224 {
1225 this.uRLField = value;
1226 this.uRLFieldSet = true;
1227 }
1228 }
1229 }
1230
1231 /// <summary>
1232 /// Custom HTTP Header definition for IIS resources such as WebSite and WebVirtualDir.
1233 /// </summary>
1234 [GeneratedCode("XsdGen", "4.0.0.0")]
1235 public class HttpHeader : ISchemaElement, ISetAttributes
1236 {
1237
1238 private string idField;
1239
1240 private bool idFieldSet;
1241
1242 private string nameField;
1243
1244 private bool nameFieldSet;
1245
1246 private string valueField;
1247
1248 private bool valueFieldSet;
1249
1250 private ISchemaElement parentElement;
1251
1252 /// <summary>
1253 /// Primary key for custom HTTP Header entry. This will default to the Name attribute.
1254 /// </summary>
1255 public string Id
1256 {
1257 get
1258 {
1259 return this.idField;
1260 }
1261 set
1262 {
1263 this.idFieldSet = true;
1264 this.idField = value;
1265 }
1266 }
1267
1268 /// <summary>
1269 /// Name of the custom HTTP Header.
1270 /// </summary>
1271 public string Name
1272 {
1273 get
1274 {
1275 return this.nameField;
1276 }
1277 set
1278 {
1279 this.nameFieldSet = true;
1280 this.nameField = value;
1281 }
1282 }
1283
1284 /// <summary>
1285 /// Value for the custom HTTP Header. This attribute can contain a formatted string that is processed at install time to insert the values of properties using [PropertyName] syntax. Also supported are environment variables, file installation paths, and component installation directories; see
1286 /// </summary>
1287 public string Value
1288 {
1289 get
1290 {
1291 return this.valueField;
1292 }
1293 set
1294 {
1295 this.valueFieldSet = true;
1296 this.valueField = value;
1297 }
1298 }
1299
1300 public virtual ISchemaElement ParentElement
1301 {
1302 get
1303 {
1304 return this.parentElement;
1305 }
1306 set
1307 {
1308 this.parentElement = value;
1309 }
1310 }
1311
1312 /// <summary>
1313 /// Processes this element and all child elements into an XmlWriter.
1314 /// </summary>
1315 public virtual void OutputXml(XmlWriter writer)
1316 {
1317 if ((null == writer))
1318 {
1319 throw new ArgumentNullException("writer");
1320 }
1321 writer.WriteStartElement("HttpHeader", "http://wixtoolset.org/schemas/v4/wxs/iis");
1322 if (this.idFieldSet)
1323 {
1324 writer.WriteAttributeString("Id", this.idField);
1325 }
1326 if (this.nameFieldSet)
1327 {
1328 writer.WriteAttributeString("Name", this.nameField);
1329 }
1330 if (this.valueFieldSet)
1331 {
1332 writer.WriteAttributeString("Value", this.valueField);
1333 }
1334 writer.WriteEndElement();
1335 }
1336
1337 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1338 void ISetAttributes.SetAttribute(string name, string value)
1339 {
1340 if (String.IsNullOrEmpty(name))
1341 {
1342 throw new ArgumentNullException("name");
1343 }
1344 if (("Id" == name))
1345 {
1346 this.idField = value;
1347 this.idFieldSet = true;
1348 }
1349 if (("Name" == name))
1350 {
1351 this.nameField = value;
1352 this.nameFieldSet = true;
1353 }
1354 if (("Value" == name))
1355 {
1356 this.valueField = value;
1357 this.valueFieldSet = true;
1358 }
1359 }
1360 }
1361
1362 /// <summary>
1363 /// MimeMap definition for IIS resources.
1364 /// </summary>
1365 [GeneratedCode("XsdGen", "4.0.0.0")]
1366 public class MimeMap : ISchemaElement, ISetAttributes
1367 {
1368
1369 private string idField;
1370
1371 private bool idFieldSet;
1372
1373 private string typeField;
1374
1375 private bool typeFieldSet;
1376
1377 private string extensionField;
1378
1379 private bool extensionFieldSet;
1380
1381 private ISchemaElement parentElement;
1382
1383 /// <summary>
1384 /// Id for the MimeMap.
1385 /// </summary>
1386 public string Id
1387 {
1388 get
1389 {
1390 return this.idField;
1391 }
1392 set
1393 {
1394 this.idFieldSet = true;
1395 this.idField = value;
1396 }
1397 }
1398
1399 /// <summary>
1400 /// Mime-type covered by the MimeMap.
1401 /// </summary>
1402 public string Type
1403 {
1404 get
1405 {
1406 return this.typeField;
1407 }
1408 set
1409 {
1410 this.typeFieldSet = true;
1411 this.typeField = value;
1412 }
1413 }
1414
1415 /// <summary>
1416 /// Extension covered by the MimeMap. Must begin with a dot.
1417 /// </summary>
1418 public string Extension
1419 {
1420 get
1421 {
1422 return this.extensionField;
1423 }
1424 set
1425 {
1426 this.extensionFieldSet = true;
1427 this.extensionField = value;
1428 }
1429 }
1430
1431 public virtual ISchemaElement ParentElement
1432 {
1433 get
1434 {
1435 return this.parentElement;
1436 }
1437 set
1438 {
1439 this.parentElement = value;
1440 }
1441 }
1442
1443 /// <summary>
1444 /// Processes this element and all child elements into an XmlWriter.
1445 /// </summary>
1446 public virtual void OutputXml(XmlWriter writer)
1447 {
1448 if ((null == writer))
1449 {
1450 throw new ArgumentNullException("writer");
1451 }
1452 writer.WriteStartElement("MimeMap", "http://wixtoolset.org/schemas/v4/wxs/iis");
1453 if (this.idFieldSet)
1454 {
1455 writer.WriteAttributeString("Id", this.idField);
1456 }
1457 if (this.typeFieldSet)
1458 {
1459 writer.WriteAttributeString("Type", this.typeField);
1460 }
1461 if (this.extensionFieldSet)
1462 {
1463 writer.WriteAttributeString("Extension", this.extensionField);
1464 }
1465 writer.WriteEndElement();
1466 }
1467
1468 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1469 void ISetAttributes.SetAttribute(string name, string value)
1470 {
1471 if (String.IsNullOrEmpty(name))
1472 {
1473 throw new ArgumentNullException("name");
1474 }
1475 if (("Id" == name))
1476 {
1477 this.idField = value;
1478 this.idFieldSet = true;
1479 }
1480 if (("Type" == name))
1481 {
1482 this.typeField = value;
1483 this.typeFieldSet = true;
1484 }
1485 if (("Extension" == name))
1486 {
1487 this.extensionField = value;
1488 this.extensionFieldSet = true;
1489 }
1490 }
1491 }
1492
1493 /// <summary>
1494 /// IIs Filter for a Component
1495 /// </summary>
1496 [GeneratedCode("XsdGen", "4.0.0.0")]
1497 public class WebFilter : ISchemaElement, ISetAttributes
1498 {
1499
1500 private string idField;
1501
1502 private bool idFieldSet;
1503
1504 private string nameField;
1505
1506 private bool nameFieldSet;
1507
1508 private string pathField;
1509
1510 private bool pathFieldSet;
1511
1512 private string webSiteField;
1513
1514 private bool webSiteFieldSet;
1515
1516 private string descriptionField;
1517
1518 private bool descriptionFieldSet;
1519
1520 private int flagsField;
1521
1522 private bool flagsFieldSet;
1523
1524 private string loadOrderField;
1525
1526 private bool loadOrderFieldSet;
1527
1528 private ISchemaElement parentElement;
1529
1530 /// <summary>
1531 /// The unique Id for the web filter.
1532 /// </summary>
1533 public string Id
1534 {
1535 get
1536 {
1537 return this.idField;
1538 }
1539 set
1540 {
1541 this.idFieldSet = true;
1542 this.idField = value;
1543 }
1544 }
1545
1546 /// <summary>
1547 /// The name of the filter to be used in IIS.
1548 /// </summary>
1549 public string Name
1550 {
1551 get
1552 {
1553 return this.nameField;
1554 }
1555 set
1556 {
1557 this.nameFieldSet = true;
1558 this.nameField = value;
1559 }
1560 }
1561
1562 /// <summary>
1563 /// The path of the filter executable file.
1564 /// This should usually be a value like '[!FileId]', where 'FileId' is the file identifier
1565 /// of the filter executable file.
1566 /// </summary>
1567 public string Path
1568 {
1569 get
1570 {
1571 return this.pathField;
1572 }
1573 set
1574 {
1575 this.pathFieldSet = true;
1576 this.pathField = value;
1577 }
1578 }
1579
1580 /// <summary>
1581 /// Specifies the parent website for this filter (if there is one).
1582 /// If this is a global filter, then this attribute should not be specified.
1583 /// </summary>
1584 public string WebSite
1585 {
1586 get
1587 {
1588 return this.webSiteField;
1589 }
1590 set
1591 {
1592 this.webSiteFieldSet = true;
1593 this.webSiteField = value;
1594 }
1595 }
1596
1597 /// <summary>
1598 /// Description of the filter.
1599 /// </summary>
1600 public string Description
1601 {
1602 get
1603 {
1604 return this.descriptionField;
1605 }
1606 set
1607 {
1608 this.descriptionFieldSet = true;
1609 this.descriptionField = value;
1610 }
1611 }
1612
1613 /// <summary>
1614 /// Sets the MD_FILTER_FLAGS metabase key for the filter. This must be an integer. See MSDN 'FilterFlags' documentation for more details.
1615 /// </summary>
1616 public int Flags
1617 {
1618 get
1619 {
1620 return this.flagsField;
1621 }
1622 set
1623 {
1624 this.flagsFieldSet = true;
1625 this.flagsField = value;
1626 }
1627 }
1628
1629 /// <summary>
1630 /// The legal values are "first", "last", or a number.
1631 /// If a number is specified, it must be greater than 0.
1632 /// </summary>
1633 public string LoadOrder
1634 {
1635 get
1636 {
1637 return this.loadOrderField;
1638 }
1639 set
1640 {
1641 this.loadOrderFieldSet = true;
1642 this.loadOrderField = value;
1643 }
1644 }
1645
1646 public virtual ISchemaElement ParentElement
1647 {
1648 get
1649 {
1650 return this.parentElement;
1651 }
1652 set
1653 {
1654 this.parentElement = value;
1655 }
1656 }
1657
1658 /// <summary>
1659 /// Processes this element and all child elements into an XmlWriter.
1660 /// </summary>
1661 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
1662 public virtual void OutputXml(XmlWriter writer)
1663 {
1664 if ((null == writer))
1665 {
1666 throw new ArgumentNullException("writer");
1667 }
1668 writer.WriteStartElement("WebFilter", "http://wixtoolset.org/schemas/v4/wxs/iis");
1669 if (this.idFieldSet)
1670 {
1671 writer.WriteAttributeString("Id", this.idField);
1672 }
1673 if (this.nameFieldSet)
1674 {
1675 writer.WriteAttributeString("Name", this.nameField);
1676 }
1677 if (this.pathFieldSet)
1678 {
1679 writer.WriteAttributeString("Path", this.pathField);
1680 }
1681 if (this.webSiteFieldSet)
1682 {
1683 writer.WriteAttributeString("WebSite", this.webSiteField);
1684 }
1685 if (this.descriptionFieldSet)
1686 {
1687 writer.WriteAttributeString("Description", this.descriptionField);
1688 }
1689 if (this.flagsFieldSet)
1690 {
1691 writer.WriteAttributeString("Flags", this.flagsField.ToString(CultureInfo.InvariantCulture));
1692 }
1693 if (this.loadOrderFieldSet)
1694 {
1695 writer.WriteAttributeString("LoadOrder", this.loadOrderField);
1696 }
1697 writer.WriteEndElement();
1698 }
1699
1700 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1701 void ISetAttributes.SetAttribute(string name, string value)
1702 {
1703 if (String.IsNullOrEmpty(name))
1704 {
1705 throw new ArgumentNullException("name");
1706 }
1707 if (("Id" == name))
1708 {
1709 this.idField = value;
1710 this.idFieldSet = true;
1711 }
1712 if (("Name" == name))
1713 {
1714 this.nameField = value;
1715 this.nameFieldSet = true;
1716 }
1717 if (("Path" == name))
1718 {
1719 this.pathField = value;
1720 this.pathFieldSet = true;
1721 }
1722 if (("WebSite" == name))
1723 {
1724 this.webSiteField = value;
1725 this.webSiteFieldSet = true;
1726 }
1727 if (("Description" == name))
1728 {
1729 this.descriptionField = value;
1730 this.descriptionFieldSet = true;
1731 }
1732 if (("Flags" == name))
1733 {
1734 this.flagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1735 this.flagsFieldSet = true;
1736 }
1737 if (("LoadOrder" == name))
1738 {
1739 this.loadOrderField = value;
1740 this.loadOrderFieldSet = true;
1741 }
1742 }
1743 }
1744
1745 /// <summary>
1746 /// Extension for WebApplication
1747 /// </summary>
1748 [GeneratedCode("XsdGen", "4.0.0.0")]
1749 public class WebApplicationExtension : ISchemaElement, ISetAttributes
1750 {
1751
1752 private string executableField;
1753
1754 private bool executableFieldSet;
1755
1756 private string extensionField;
1757
1758 private bool extensionFieldSet;
1759
1760 private string verbsField;
1761
1762 private bool verbsFieldSet;
1763
1764 private YesNoType scriptField;
1765
1766 private bool scriptFieldSet;
1767
1768 private YesNoType checkPathField;
1769
1770 private bool checkPathFieldSet;
1771
1772 private ISchemaElement parentElement;
1773
1774 /// <summary>
1775 /// usually a Property that resolves to short file name path
1776 /// </summary>
1777 public string Executable
1778 {
1779 get
1780 {
1781 return this.executableField;
1782 }
1783 set
1784 {
1785 this.executableFieldSet = true;
1786 this.executableField = value;
1787 }
1788 }
1789
1790 /// <summary>
1791 /// Extension being registered. Do not prefix with a '.' (e.g. you should use "html", not ".html"). To register for all extensions, use Extension="*". To register a wildcard application map (which handles all requests, even those for directories or files with no extension) omit the Extension attribute completely.
1792 /// </summary>
1793 public string Extension
1794 {
1795 get
1796 {
1797 return this.extensionField;
1798 }
1799 set
1800 {
1801 this.extensionFieldSet = true;
1802 this.extensionField = value;
1803 }
1804 }
1805
1806 public string Verbs
1807 {
1808 get
1809 {
1810 return this.verbsField;
1811 }
1812 set
1813 {
1814 this.verbsFieldSet = true;
1815 this.verbsField = value;
1816 }
1817 }
1818
1819 public YesNoType Script
1820 {
1821 get
1822 {
1823 return this.scriptField;
1824 }
1825 set
1826 {
1827 this.scriptFieldSet = true;
1828 this.scriptField = value;
1829 }
1830 }
1831
1832 public YesNoType CheckPath
1833 {
1834 get
1835 {
1836 return this.checkPathField;
1837 }
1838 set
1839 {
1840 this.checkPathFieldSet = true;
1841 this.checkPathField = value;
1842 }
1843 }
1844
1845 public virtual ISchemaElement ParentElement
1846 {
1847 get
1848 {
1849 return this.parentElement;
1850 }
1851 set
1852 {
1853 this.parentElement = value;
1854 }
1855 }
1856
1857 /// <summary>
1858 /// Processes this element and all child elements into an XmlWriter.
1859 /// </summary>
1860 public virtual void OutputXml(XmlWriter writer)
1861 {
1862 if ((null == writer))
1863 {
1864 throw new ArgumentNullException("writer");
1865 }
1866 writer.WriteStartElement("WebApplicationExtension", "http://wixtoolset.org/schemas/v4/wxs/iis");
1867 if (this.executableFieldSet)
1868 {
1869 writer.WriteAttributeString("Executable", this.executableField);
1870 }
1871 if (this.extensionFieldSet)
1872 {
1873 writer.WriteAttributeString("Extension", this.extensionField);
1874 }
1875 if (this.verbsFieldSet)
1876 {
1877 writer.WriteAttributeString("Verbs", this.verbsField);
1878 }
1879 if (this.scriptFieldSet)
1880 {
1881 if ((this.scriptField == YesNoType.no))
1882 {
1883 writer.WriteAttributeString("Script", "no");
1884 }
1885 if ((this.scriptField == YesNoType.yes))
1886 {
1887 writer.WriteAttributeString("Script", "yes");
1888 }
1889 }
1890 if (this.checkPathFieldSet)
1891 {
1892 if ((this.checkPathField == YesNoType.no))
1893 {
1894 writer.WriteAttributeString("CheckPath", "no");
1895 }
1896 if ((this.checkPathField == YesNoType.yes))
1897 {
1898 writer.WriteAttributeString("CheckPath", "yes");
1899 }
1900 }
1901 writer.WriteEndElement();
1902 }
1903
1904 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1905 void ISetAttributes.SetAttribute(string name, string value)
1906 {
1907 if (String.IsNullOrEmpty(name))
1908 {
1909 throw new ArgumentNullException("name");
1910 }
1911 if (("Executable" == name))
1912 {
1913 this.executableField = value;
1914 this.executableFieldSet = true;
1915 }
1916 if (("Extension" == name))
1917 {
1918 this.extensionField = value;
1919 this.extensionFieldSet = true;
1920 }
1921 if (("Verbs" == name))
1922 {
1923 this.verbsField = value;
1924 this.verbsFieldSet = true;
1925 }
1926 if (("Script" == name))
1927 {
1928 this.scriptField = Enums.ParseYesNoType(value);
1929 this.scriptFieldSet = true;
1930 }
1931 if (("CheckPath" == name))
1932 {
1933 this.checkPathField = Enums.ParseYesNoType(value);
1934 this.checkPathFieldSet = true;
1935 }
1936 }
1937 }
1938
1939 /// <summary>
1940 /// IIS6 Application Pool
1941 /// </summary>
1942 [GeneratedCode("XsdGen", "4.0.0.0")]
1943 public class WebAppPool : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
1944 {
1945
1946 private ElementCollection children;
1947
1948 private string idField;
1949
1950 private bool idFieldSet;
1951
1952 private string nameField;
1953
1954 private bool nameFieldSet;
1955
1956 private string userField;
1957
1958 private bool userFieldSet;
1959
1960 private int recycleMinutesField;
1961
1962 private bool recycleMinutesFieldSet;
1963
1964 private int recycleRequestsField;
1965
1966 private bool recycleRequestsFieldSet;
1967
1968 private int virtualMemoryField;
1969
1970 private bool virtualMemoryFieldSet;
1971
1972 private int privateMemoryField;
1973
1974 private bool privateMemoryFieldSet;
1975
1976 private int idleTimeoutField;
1977
1978 private bool idleTimeoutFieldSet;
1979
1980 private int queueLimitField;
1981
1982 private bool queueLimitFieldSet;
1983
1984 private long maxCpuUsageField;
1985
1986 private bool maxCpuUsageFieldSet;
1987
1988 private int refreshCpuField;
1989
1990 private bool refreshCpuFieldSet;
1991
1992 private CpuActionType cpuActionField;
1993
1994 private bool cpuActionFieldSet;
1995
1996 private int maxWorkerProcessesField;
1997
1998 private bool maxWorkerProcessesFieldSet;
1999
2000 private IdentityType identityField;
2001
2002 private bool identityFieldSet;
2003
2004 private string managedPipelineModeField;
2005
2006 private bool managedPipelineModeFieldSet;
2007
2008 private string managedRuntimeVersionField;
2009
2010 private bool managedRuntimeVersionFieldSet;
2011
2012 private ISchemaElement parentElement;
2013
2014 public WebAppPool()
2015 {
2016 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
2017 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RecycleTime)));
2018 this.children = childCollection0;
2019 }
2020
2021 public virtual IEnumerable Children
2022 {
2023 get
2024 {
2025 return this.children;
2026 }
2027 }
2028
2029 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
2030 public virtual IEnumerable this[System.Type childType]
2031 {
2032 get
2033 {
2034 return this.children.Filter(childType);
2035 }
2036 }
2037
2038 /// <summary>
2039 /// Id of the AppPool.
2040 /// </summary>
2041 public string Id
2042 {
2043 get
2044 {
2045 return this.idField;
2046 }
2047 set
2048 {
2049 this.idFieldSet = true;
2050 this.idField = value;
2051 }
2052 }
2053
2054 /// <summary>
2055 /// Name of the AppPool to be shown in IIs.
2056 /// </summary>
2057 public string Name
2058 {
2059 get
2060 {
2061 return this.nameField;
2062 }
2063 set
2064 {
2065 this.nameFieldSet = true;
2066 this.nameField = value;
2067 }
2068 }
2069
2070 /// <summary>
2071 /// User account to run the AppPool as. To use this, you must set the Identity attribute to 'other'.
2072 /// </summary>
2073 public string User
2074 {
2075 get
2076 {
2077 return this.userField;
2078 }
2079 set
2080 {
2081 this.userFieldSet = true;
2082 this.userField = value;
2083 }
2084 }
2085
2086 /// <summary>
2087 /// How often, in minutes, you want the AppPool to be recycled.
2088 /// </summary>
2089 public int RecycleMinutes
2090 {
2091 get
2092 {
2093 return this.recycleMinutesField;
2094 }
2095 set
2096 {
2097 this.recycleMinutesFieldSet = true;
2098 this.recycleMinutesField = value;
2099 }
2100 }
2101
2102 /// <summary>
2103 /// How often, in requests, you want the AppPool to be recycled.
2104 /// </summary>
2105 public int RecycleRequests
2106 {
2107 get
2108 {
2109 return this.recycleRequestsField;
2110 }
2111 set
2112 {
2113 this.recycleRequestsFieldSet = true;
2114 this.recycleRequestsField = value;
2115 }
2116 }
2117
2118 /// <summary>
2119 /// Specifies the amount of virtual memory (in KB) that a worker process can use before the worker process recycles. The maximum value supported for this attribute is 4,294,967 KB.
2120 /// </summary>
2121 public int VirtualMemory
2122 {
2123 get
2124 {
2125 return this.virtualMemoryField;
2126 }
2127 set
2128 {
2129 this.virtualMemoryFieldSet = true;
2130 this.virtualMemoryField = value;
2131 }
2132 }
2133
2134 /// <summary>
2135 /// Specifies the amount of private memory (in KB) that a worker process can use before the worker process recycles. The maximum value supported for this attribute is 4,294,967 KB.
2136 /// </summary>
2137 public int PrivateMemory
2138 {
2139 get
2140 {
2141 return this.privateMemoryField;
2142 }
2143 set
2144 {
2145 this.privateMemoryFieldSet = true;
2146 this.privateMemoryField = value;
2147 }
2148 }
2149
2150 /// <summary>
2151 /// Shutdown worker process after being idle for (time in minutes).
2152 /// </summary>
2153 public int IdleTimeout
2154 {
2155 get
2156 {
2157 return this.idleTimeoutField;
2158 }
2159 set
2160 {
2161 this.idleTimeoutFieldSet = true;
2162 this.idleTimeoutField = value;
2163 }
2164 }
2165
2166 /// <summary>
2167 /// Limit the kernel request queue (number of requests).
2168 /// </summary>
2169 public int QueueLimit
2170 {
2171 get
2172 {
2173 return this.queueLimitField;
2174 }
2175 set
2176 {
2177 this.queueLimitFieldSet = true;
2178 this.queueLimitField = value;
2179 }
2180 }
2181
2182 /// <summary>
2183 /// Maximum CPU usage (percent).
2184 /// </summary>
2185 public long MaxCpuUsage
2186 {
2187 get
2188 {
2189 return this.maxCpuUsageField;
2190 }
2191 set
2192 {
2193 this.maxCpuUsageFieldSet = true;
2194 this.maxCpuUsageField = value;
2195 }
2196 }
2197
2198 /// <summary>
2199 /// Refresh CPU usage numbers (in minutes).
2200 /// </summary>
2201 public int RefreshCpu
2202 {
2203 get
2204 {
2205 return this.refreshCpuField;
2206 }
2207 set
2208 {
2209 this.refreshCpuFieldSet = true;
2210 this.refreshCpuField = value;
2211 }
2212 }
2213
2214 /// <summary>
2215 /// Action taken when CPU exceeds maximum CPU use (as defined with MaxCpuUsage and RefreshCpu).
2216 /// </summary>
2217 public CpuActionType CpuAction
2218 {
2219 get
2220 {
2221 return this.cpuActionField;
2222 }
2223 set
2224 {
2225 this.cpuActionFieldSet = true;
2226 this.cpuActionField = value;
2227 }
2228 }
2229
2230 /// <summary>
2231 /// Maximum number of worker processes.
2232 /// </summary>
2233 public int MaxWorkerProcesses
2234 {
2235 get
2236 {
2237 return this.maxWorkerProcessesField;
2238 }
2239 set
2240 {
2241 this.maxWorkerProcessesFieldSet = true;
2242 this.maxWorkerProcessesField = value;
2243 }
2244 }
2245
2246 /// <summary>
2247 /// Identity you want the AppPool to run under (applicationPoolIdentity is only available on IIS7). Use the 'other' value in conjunction with the User attribute to specify non-standard user.
2248 /// </summary>
2249 public IdentityType Identity
2250 {
2251 get
2252 {
2253 return this.identityField;
2254 }
2255 set
2256 {
2257 this.identityFieldSet = true;
2258 this.identityField = value;
2259 }
2260 }
2261
2262 /// <summary>
2263 /// Specifies the request-processing mode that is used to process requests for managed content. Only available on IIS7, ignored on IIS6.
2264 /// See
2265 /// </summary>
2266 public string ManagedPipelineMode
2267 {
2268 get
2269 {
2270 return this.managedPipelineModeField;
2271 }
2272 set
2273 {
2274 this.managedPipelineModeFieldSet = true;
2275 this.managedPipelineModeField = value;
2276 }
2277 }
2278
2279 /// <summary>
2280 /// Specifies the .NET Framework version to be used by the application pool. Only available on IIS7, ignored on IIS6.
2281 /// See
2282 /// </summary>
2283 public string ManagedRuntimeVersion
2284 {
2285 get
2286 {
2287 return this.managedRuntimeVersionField;
2288 }
2289 set
2290 {
2291 this.managedRuntimeVersionFieldSet = true;
2292 this.managedRuntimeVersionField = value;
2293 }
2294 }
2295
2296 public virtual ISchemaElement ParentElement
2297 {
2298 get
2299 {
2300 return this.parentElement;
2301 }
2302 set
2303 {
2304 this.parentElement = value;
2305 }
2306 }
2307
2308 public virtual void AddChild(ISchemaElement child)
2309 {
2310 if ((null == child))
2311 {
2312 throw new ArgumentNullException("child");
2313 }
2314 this.children.AddElement(child);
2315 child.ParentElement = this;
2316 }
2317
2318 public virtual void RemoveChild(ISchemaElement child)
2319 {
2320 if ((null == child))
2321 {
2322 throw new ArgumentNullException("child");
2323 }
2324 this.children.RemoveElement(child);
2325 child.ParentElement = null;
2326 }
2327
2328 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2329 ISchemaElement ICreateChildren.CreateChild(string childName)
2330 {
2331 if (String.IsNullOrEmpty(childName))
2332 {
2333 throw new ArgumentNullException("childName");
2334 }
2335 ISchemaElement childValue = null;
2336 if (("RecycleTime" == childName))
2337 {
2338 childValue = new RecycleTime();
2339 }
2340 if ((null == childValue))
2341 {
2342 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
2343 }
2344 return childValue;
2345 }
2346
2347 /// <summary>
2348 /// Parses a CpuActionType from a string.
2349 /// </summary>
2350 public static CpuActionType ParseCpuActionType(string value)
2351 {
2352 CpuActionType parsedValue;
2353 WebAppPool.TryParseCpuActionType(value, out parsedValue);
2354 return parsedValue;
2355 }
2356
2357 /// <summary>
2358 /// Tries to parse a CpuActionType from a string.
2359 /// </summary>
2360 public static bool TryParseCpuActionType(string value, out CpuActionType parsedValue)
2361 {
2362 parsedValue = CpuActionType.NotSet;
2363 if (string.IsNullOrEmpty(value))
2364 {
2365 return false;
2366 }
2367 if (("none" == value))
2368 {
2369 parsedValue = CpuActionType.none;
2370 }
2371 else
2372 {
2373 if (("shutdown" == value))
2374 {
2375 parsedValue = CpuActionType.shutdown;
2376 }
2377 else
2378 {
2379 parsedValue = CpuActionType.IllegalValue;
2380 return false;
2381 }
2382 }
2383 return true;
2384 }
2385
2386 /// <summary>
2387 /// Parses a IdentityType from a string.
2388 /// </summary>
2389 public static IdentityType ParseIdentityType(string value)
2390 {
2391 IdentityType parsedValue;
2392 WebAppPool.TryParseIdentityType(value, out parsedValue);
2393 return parsedValue;
2394 }
2395
2396 /// <summary>
2397 /// Tries to parse a IdentityType from a string.
2398 /// </summary>
2399 public static bool TryParseIdentityType(string value, out IdentityType parsedValue)
2400 {
2401 parsedValue = IdentityType.NotSet;
2402 if (string.IsNullOrEmpty(value))
2403 {
2404 return false;
2405 }
2406 if (("networkService" == value))
2407 {
2408 parsedValue = IdentityType.networkService;
2409 }
2410 else
2411 {
2412 if (("localService" == value))
2413 {
2414 parsedValue = IdentityType.localService;
2415 }
2416 else
2417 {
2418 if (("localSystem" == value))
2419 {
2420 parsedValue = IdentityType.localSystem;
2421 }
2422 else
2423 {
2424 if (("other" == value))
2425 {
2426 parsedValue = IdentityType.other;
2427 }
2428 else
2429 {
2430 if (("applicationPoolIdentity" == value))
2431 {
2432 parsedValue = IdentityType.applicationPoolIdentity;
2433 }
2434 else
2435 {
2436 parsedValue = IdentityType.IllegalValue;
2437 return false;
2438 }
2439 }
2440 }
2441 }
2442 }
2443 return true;
2444 }
2445
2446 /// <summary>
2447 /// Processes this element and all child elements into an XmlWriter.
2448 /// </summary>
2449 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
2450 public virtual void OutputXml(XmlWriter writer)
2451 {
2452 if ((null == writer))
2453 {
2454 throw new ArgumentNullException("writer");
2455 }
2456 writer.WriteStartElement("WebAppPool", "http://wixtoolset.org/schemas/v4/wxs/iis");
2457 if (this.idFieldSet)
2458 {
2459 writer.WriteAttributeString("Id", this.idField);
2460 }
2461 if (this.nameFieldSet)
2462 {
2463 writer.WriteAttributeString("Name", this.nameField);
2464 }
2465 if (this.userFieldSet)
2466 {
2467 writer.WriteAttributeString("User", this.userField);
2468 }
2469 if (this.recycleMinutesFieldSet)
2470 {
2471 writer.WriteAttributeString("RecycleMinutes", this.recycleMinutesField.ToString(CultureInfo.InvariantCulture));
2472 }
2473 if (this.recycleRequestsFieldSet)
2474 {
2475 writer.WriteAttributeString("RecycleRequests", this.recycleRequestsField.ToString(CultureInfo.InvariantCulture));
2476 }
2477 if (this.virtualMemoryFieldSet)
2478 {
2479 writer.WriteAttributeString("VirtualMemory", this.virtualMemoryField.ToString(CultureInfo.InvariantCulture));
2480 }
2481 if (this.privateMemoryFieldSet)
2482 {
2483 writer.WriteAttributeString("PrivateMemory", this.privateMemoryField.ToString(CultureInfo.InvariantCulture));
2484 }
2485 if (this.idleTimeoutFieldSet)
2486 {
2487 writer.WriteAttributeString("IdleTimeout", this.idleTimeoutField.ToString(CultureInfo.InvariantCulture));
2488 }
2489 if (this.queueLimitFieldSet)
2490 {
2491 writer.WriteAttributeString("QueueLimit", this.queueLimitField.ToString(CultureInfo.InvariantCulture));
2492 }
2493 if (this.maxCpuUsageFieldSet)
2494 {
2495 writer.WriteAttributeString("MaxCpuUsage", this.maxCpuUsageField.ToString(CultureInfo.InvariantCulture));
2496 }
2497 if (this.refreshCpuFieldSet)
2498 {
2499 writer.WriteAttributeString("RefreshCpu", this.refreshCpuField.ToString(CultureInfo.InvariantCulture));
2500 }
2501 if (this.cpuActionFieldSet)
2502 {
2503 if ((this.cpuActionField == CpuActionType.none))
2504 {
2505 writer.WriteAttributeString("CpuAction", "none");
2506 }
2507 if ((this.cpuActionField == CpuActionType.shutdown))
2508 {
2509 writer.WriteAttributeString("CpuAction", "shutdown");
2510 }
2511 }
2512 if (this.maxWorkerProcessesFieldSet)
2513 {
2514 writer.WriteAttributeString("MaxWorkerProcesses", this.maxWorkerProcessesField.ToString(CultureInfo.InvariantCulture));
2515 }
2516 if (this.identityFieldSet)
2517 {
2518 if ((this.identityField == IdentityType.networkService))
2519 {
2520 writer.WriteAttributeString("Identity", "networkService");
2521 }
2522 if ((this.identityField == IdentityType.localService))
2523 {
2524 writer.WriteAttributeString("Identity", "localService");
2525 }
2526 if ((this.identityField == IdentityType.localSystem))
2527 {
2528 writer.WriteAttributeString("Identity", "localSystem");
2529 }
2530 if ((this.identityField == IdentityType.other))
2531 {
2532 writer.WriteAttributeString("Identity", "other");
2533 }
2534 if ((this.identityField == IdentityType.applicationPoolIdentity))
2535 {
2536 writer.WriteAttributeString("Identity", "applicationPoolIdentity");
2537 }
2538 }
2539 if (this.managedPipelineModeFieldSet)
2540 {
2541 writer.WriteAttributeString("ManagedPipelineMode", this.managedPipelineModeField);
2542 }
2543 if (this.managedRuntimeVersionFieldSet)
2544 {
2545 writer.WriteAttributeString("ManagedRuntimeVersion", this.managedRuntimeVersionField);
2546 }
2547 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
2548 {
2549 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
2550 childElement.OutputXml(writer);
2551 }
2552 writer.WriteEndElement();
2553 }
2554
2555 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2556 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
2557 void ISetAttributes.SetAttribute(string name, string value)
2558 {
2559 if (String.IsNullOrEmpty(name))
2560 {
2561 throw new ArgumentNullException("name");
2562 }
2563 if (("Id" == name))
2564 {
2565 this.idField = value;
2566 this.idFieldSet = true;
2567 }
2568 if (("Name" == name))
2569 {
2570 this.nameField = value;
2571 this.nameFieldSet = true;
2572 }
2573 if (("User" == name))
2574 {
2575 this.userField = value;
2576 this.userFieldSet = true;
2577 }
2578 if (("RecycleMinutes" == name))
2579 {
2580 this.recycleMinutesField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
2581 this.recycleMinutesFieldSet = true;
2582 }
2583 if (("RecycleRequests" == name))
2584 {
2585 this.recycleRequestsField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
2586 this.recycleRequestsFieldSet = true;
2587 }
2588 if (("VirtualMemory" == name))
2589 {
2590 this.virtualMemoryField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
2591 this.virtualMemoryFieldSet = true;
2592 }
2593 if (("PrivateMemory" == name))
2594 {
2595 this.privateMemoryField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
2596 this.privateMemoryFieldSet = true;
2597 }
2598 if (("IdleTimeout" == name))
2599 {
2600 this.idleTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
2601 this.idleTimeoutFieldSet = true;
2602 }
2603 if (("QueueLimit" == name))
2604 {
2605 this.queueLimitField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
2606 this.queueLimitFieldSet = true;
2607 }
2608 if (("MaxCpuUsage" == name))
2609 {
2610 this.maxCpuUsageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
2611 this.maxCpuUsageFieldSet = true;
2612 }
2613 if (("RefreshCpu" == name))
2614 {
2615 this.refreshCpuField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
2616 this.refreshCpuFieldSet = true;
2617 }
2618 if (("CpuAction" == name))
2619 {
2620 this.cpuActionField = WebAppPool.ParseCpuActionType(value);
2621 this.cpuActionFieldSet = true;
2622 }
2623 if (("MaxWorkerProcesses" == name))
2624 {
2625 this.maxWorkerProcessesField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
2626 this.maxWorkerProcessesFieldSet = true;
2627 }
2628 if (("Identity" == name))
2629 {
2630 this.identityField = WebAppPool.ParseIdentityType(value);
2631 this.identityFieldSet = true;
2632 }
2633 if (("ManagedPipelineMode" == name))
2634 {
2635 this.managedPipelineModeField = value;
2636 this.managedPipelineModeFieldSet = true;
2637 }
2638 if (("ManagedRuntimeVersion" == name))
2639 {
2640 this.managedRuntimeVersionField = value;
2641 this.managedRuntimeVersionFieldSet = true;
2642 }
2643 }
2644
2645 [GeneratedCode("XsdGen", "4.0.0.0")]
2646 public enum CpuActionType
2647 {
2648
2649 IllegalValue = int.MaxValue,
2650
2651 NotSet = -1,
2652
2653 none,
2654
2655 shutdown,
2656 }
2657
2658 [GeneratedCode("XsdGen", "4.0.0.0")]
2659 public enum IdentityType
2660 {
2661
2662 IllegalValue = int.MaxValue,
2663
2664 NotSet = -1,
2665
2666 networkService,
2667
2668 localService,
2669
2670 localSystem,
2671
2672 other,
2673
2674 applicationPoolIdentity,
2675 }
2676 }
2677
2678 /// <summary>
2679 /// IIS6 Application Pool Recycle Times on 24 hour clock.
2680 /// </summary>
2681 [GeneratedCode("XsdGen", "4.0.0.0")]
2682 public class RecycleTime : ISchemaElement, ISetAttributes
2683 {
2684
2685 private string valueField;
2686
2687 private bool valueFieldSet;
2688
2689 private ISchemaElement parentElement;
2690
2691 public string Value
2692 {
2693 get
2694 {
2695 return this.valueField;
2696 }
2697 set
2698 {
2699 this.valueFieldSet = true;
2700 this.valueField = value;
2701 }
2702 }
2703
2704 public virtual ISchemaElement ParentElement
2705 {
2706 get
2707 {
2708 return this.parentElement;
2709 }
2710 set
2711 {
2712 this.parentElement = value;
2713 }
2714 }
2715
2716 /// <summary>
2717 /// Processes this element and all child elements into an XmlWriter.
2718 /// </summary>
2719 public virtual void OutputXml(XmlWriter writer)
2720 {
2721 if ((null == writer))
2722 {
2723 throw new ArgumentNullException("writer");
2724 }
2725 writer.WriteStartElement("RecycleTime", "http://wixtoolset.org/schemas/v4/wxs/iis");
2726 if (this.valueFieldSet)
2727 {
2728 writer.WriteAttributeString("Value", this.valueField);
2729 }
2730 writer.WriteEndElement();
2731 }
2732
2733 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2734 void ISetAttributes.SetAttribute(string name, string value)
2735 {
2736 if (String.IsNullOrEmpty(name))
2737 {
2738 throw new ArgumentNullException("name");
2739 }
2740 if (("Value" == name))
2741 {
2742 this.valueField = value;
2743 this.valueFieldSet = true;
2744 }
2745 }
2746 }
2747
2748 /// <summary>
2749 /// Used to install and uninstall certificates.
2750 /// </summary>
2751 [GeneratedCode("XsdGen", "4.0.0.0")]
2752 public class Certificate : ISchemaElement, ISetAttributes
2753 {
2754
2755 private string idField;
2756
2757 private bool idFieldSet;
2758
2759 private string nameField;
2760
2761 private bool nameFieldSet;
2762
2763 private StoreNameType storeNameField;
2764
2765 private bool storeNameFieldSet;
2766
2767 private StoreLocationType storeLocationField;
2768
2769 private bool storeLocationFieldSet;
2770
2771 private YesNoType overwriteField;
2772
2773 private bool overwriteFieldSet;
2774
2775 private YesNoType requestField;
2776
2777 private bool requestFieldSet;
2778
2779 private string binaryKeyField;
2780
2781 private bool binaryKeyFieldSet;
2782
2783 private string certificatePathField;
2784
2785 private bool certificatePathFieldSet;
2786
2787 private string pFXPasswordField;
2788
2789 private bool pFXPasswordFieldSet;
2790
2791 private ISchemaElement parentElement;
2792
2793 /// <summary>
2794 /// Unique identifier for this certificate in the installation package.
2795 /// </summary>
2796 public string Id
2797 {
2798 get
2799 {
2800 return this.idField;
2801 }
2802 set
2803 {
2804 this.idFieldSet = true;
2805 this.idField = value;
2806 }
2807 }
2808
2809 /// <summary>
2810 /// Name of the certificate that will be installed or uninstalled in the specified store.
2811 /// This attribute may be set via a formatted Property (e.g. [MyProperty]).
2812 /// </summary>
2813 public string Name
2814 {
2815 get
2816 {
2817 return this.nameField;
2818 }
2819 set
2820 {
2821 this.nameFieldSet = true;
2822 this.nameField = value;
2823 }
2824 }
2825
2826 public StoreNameType StoreName
2827 {
2828 get
2829 {
2830 return this.storeNameField;
2831 }
2832 set
2833 {
2834 this.storeNameFieldSet = true;
2835 this.storeNameField = value;
2836 }
2837 }
2838
2839 public StoreLocationType StoreLocation
2840 {
2841 get
2842 {
2843 return this.storeLocationField;
2844 }
2845 set
2846 {
2847 this.storeLocationFieldSet = true;
2848 this.storeLocationField = value;
2849 }
2850 }
2851
2852 public YesNoType Overwrite
2853 {
2854 get
2855 {
2856 return this.overwriteField;
2857 }
2858 set
2859 {
2860 this.overwriteFieldSet = true;
2861 this.overwriteField = value;
2862 }
2863 }
2864
2865 /// <summary>
2866 /// This attribute controls whether the CertificatePath attribute is a path to a certificate file (Request='no') or the
2867 /// certificate authority to request the certificate from (Request='yes').
2868 /// </summary>
2869 public YesNoType Request
2870 {
2871 get
2872 {
2873 return this.requestField;
2874 }
2875 set
2876 {
2877 this.requestFieldSet = true;
2878 this.requestField = value;
2879 }
2880 }
2881
2882 /// <summary>
2883 /// Reference to a Binary element that will store the certificate as a stream inside the package. This attribute cannot be specified with
2884 /// the CertificatePath attribute.
2885 /// </summary>
2886 public string BinaryKey
2887 {
2888 get
2889 {
2890 return this.binaryKeyField;
2891 }
2892 set
2893 {
2894 this.binaryKeyFieldSet = true;
2895 this.binaryKeyField = value;
2896 }
2897 }
2898
2899 /// <summary>
2900 /// If the Request attribute is "no" then this attribute is the path to the certificate file outside of the package.
2901 /// If the Request attribute is "yes" then this atribute is the certificate authority to request the certificate from.
2902 /// This attribute may be set via a formatted Property (e.g. [MyProperty]).
2903 /// </summary>
2904 public string CertificatePath
2905 {
2906 get
2907 {
2908 return this.certificatePathField;
2909 }
2910 set
2911 {
2912 this.certificatePathFieldSet = true;
2913 this.certificatePathField = value;
2914 }
2915 }
2916
2917 /// <summary>
2918 /// If the Binary stream or path to the file outside of the package is a password protected PFX file, the password for that
2919 /// PFX must be specified here. This attribute may be set via a formatted Property (e.g. [MyProperty]).
2920 /// </summary>
2921 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
2922 public string PFXPassword
2923 {
2924 get
2925 {
2926 return this.pFXPasswordField;
2927 }
2928 set
2929 {
2930 this.pFXPasswordFieldSet = true;
2931 this.pFXPasswordField = value;
2932 }
2933 }
2934
2935 public virtual ISchemaElement ParentElement
2936 {
2937 get
2938 {
2939 return this.parentElement;
2940 }
2941 set
2942 {
2943 this.parentElement = value;
2944 }
2945 }
2946
2947 /// <summary>
2948 /// Parses a StoreNameType from a string.
2949 /// </summary>
2950 public static StoreNameType ParseStoreNameType(string value)
2951 {
2952 StoreNameType parsedValue;
2953 Certificate.TryParseStoreNameType(value, out parsedValue);
2954 return parsedValue;
2955 }
2956
2957 /// <summary>
2958 /// Tries to parse a StoreNameType from a string.
2959 /// </summary>
2960 public static bool TryParseStoreNameType(string value, out StoreNameType parsedValue)
2961 {
2962 parsedValue = StoreNameType.NotSet;
2963 if (string.IsNullOrEmpty(value))
2964 {
2965 return false;
2966 }
2967 if (("ca" == value))
2968 {
2969 parsedValue = StoreNameType.ca;
2970 }
2971 else
2972 {
2973 if (("my" == value))
2974 {
2975 parsedValue = StoreNameType.my;
2976 }
2977 else
2978 {
2979 if (("personal" == value))
2980 {
2981 parsedValue = StoreNameType.personal;
2982 }
2983 else
2984 {
2985 if (("request" == value))
2986 {
2987 parsedValue = StoreNameType.request;
2988 }
2989 else
2990 {
2991 if (("root" == value))
2992 {
2993 parsedValue = StoreNameType.root;
2994 }
2995 else
2996 {
2997 if (("otherPeople" == value))
2998 {
2999 parsedValue = StoreNameType.otherPeople;
3000 }
3001 else
3002 {
3003 if (("trustedPeople" == value))
3004 {
3005 parsedValue = StoreNameType.trustedPeople;
3006 }
3007 else
3008 {
3009 if (("trustedPublisher" == value))
3010 {
3011 parsedValue = StoreNameType.trustedPublisher;
3012 }
3013 else
3014 {
3015 parsedValue = StoreNameType.IllegalValue;
3016 return false;
3017 }
3018 }
3019 }
3020 }
3021 }
3022 }
3023 }
3024 }
3025 return true;
3026 }
3027
3028 /// <summary>
3029 /// Parses a StoreLocationType from a string.
3030 /// </summary>
3031 public static StoreLocationType ParseStoreLocationType(string value)
3032 {
3033 StoreLocationType parsedValue;
3034 Certificate.TryParseStoreLocationType(value, out parsedValue);
3035 return parsedValue;
3036 }
3037
3038 /// <summary>
3039 /// Tries to parse a StoreLocationType from a string.
3040 /// </summary>
3041 public static bool TryParseStoreLocationType(string value, out StoreLocationType parsedValue)
3042 {
3043 parsedValue = StoreLocationType.NotSet;
3044 if (string.IsNullOrEmpty(value))
3045 {
3046 return false;
3047 }
3048 if (("currentUser" == value))
3049 {
3050 parsedValue = StoreLocationType.currentUser;
3051 }
3052 else
3053 {
3054 if (("localMachine" == value))
3055 {
3056 parsedValue = StoreLocationType.localMachine;
3057 }
3058 else
3059 {
3060 parsedValue = StoreLocationType.IllegalValue;
3061 return false;
3062 }
3063 }
3064 return true;
3065 }
3066
3067 /// <summary>
3068 /// Processes this element and all child elements into an XmlWriter.
3069 /// </summary>
3070 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
3071 public virtual void OutputXml(XmlWriter writer)
3072 {
3073 if ((null == writer))
3074 {
3075 throw new ArgumentNullException("writer");
3076 }
3077 writer.WriteStartElement("Certificate", "http://wixtoolset.org/schemas/v4/wxs/iis");
3078 if (this.idFieldSet)
3079 {
3080 writer.WriteAttributeString("Id", this.idField);
3081 }
3082 if (this.nameFieldSet)
3083 {
3084 writer.WriteAttributeString("Name", this.nameField);
3085 }
3086 if (this.storeNameFieldSet)
3087 {
3088 if ((this.storeNameField == StoreNameType.ca))
3089 {
3090 writer.WriteAttributeString("StoreName", "ca");
3091 }
3092 if ((this.storeNameField == StoreNameType.my))
3093 {
3094 writer.WriteAttributeString("StoreName", "my");
3095 }
3096 if ((this.storeNameField == StoreNameType.personal))
3097 {
3098 writer.WriteAttributeString("StoreName", "personal");
3099 }
3100 if ((this.storeNameField == StoreNameType.request))
3101 {
3102 writer.WriteAttributeString("StoreName", "request");
3103 }
3104 if ((this.storeNameField == StoreNameType.root))
3105 {
3106 writer.WriteAttributeString("StoreName", "root");
3107 }
3108 if ((this.storeNameField == StoreNameType.otherPeople))
3109 {
3110 writer.WriteAttributeString("StoreName", "otherPeople");
3111 }
3112 if ((this.storeNameField == StoreNameType.trustedPeople))
3113 {
3114 writer.WriteAttributeString("StoreName", "trustedPeople");
3115 }
3116 if ((this.storeNameField == StoreNameType.trustedPublisher))
3117 {
3118 writer.WriteAttributeString("StoreName", "trustedPublisher");
3119 }
3120 }
3121 if (this.storeLocationFieldSet)
3122 {
3123 if ((this.storeLocationField == StoreLocationType.currentUser))
3124 {
3125 writer.WriteAttributeString("StoreLocation", "currentUser");
3126 }
3127 if ((this.storeLocationField == StoreLocationType.localMachine))
3128 {
3129 writer.WriteAttributeString("StoreLocation", "localMachine");
3130 }
3131 }
3132 if (this.overwriteFieldSet)
3133 {
3134 if ((this.overwriteField == YesNoType.no))
3135 {
3136 writer.WriteAttributeString("Overwrite", "no");
3137 }
3138 if ((this.overwriteField == YesNoType.yes))
3139 {
3140 writer.WriteAttributeString("Overwrite", "yes");
3141 }
3142 }
3143 if (this.requestFieldSet)
3144 {
3145 if ((this.requestField == YesNoType.no))
3146 {
3147 writer.WriteAttributeString("Request", "no");
3148 }
3149 if ((this.requestField == YesNoType.yes))
3150 {
3151 writer.WriteAttributeString("Request", "yes");
3152 }
3153 }
3154 if (this.binaryKeyFieldSet)
3155 {
3156 writer.WriteAttributeString("BinaryKey", this.binaryKeyField);
3157 }
3158 if (this.certificatePathFieldSet)
3159 {
3160 writer.WriteAttributeString("CertificatePath", this.certificatePathField);
3161 }
3162 if (this.pFXPasswordFieldSet)
3163 {
3164 writer.WriteAttributeString("PFXPassword", this.pFXPasswordField);
3165 }
3166 writer.WriteEndElement();
3167 }
3168
3169 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3170 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
3171 void ISetAttributes.SetAttribute(string name, string value)
3172 {
3173 if (String.IsNullOrEmpty(name))
3174 {
3175 throw new ArgumentNullException("name");
3176 }
3177 if (("Id" == name))
3178 {
3179 this.idField = value;
3180 this.idFieldSet = true;
3181 }
3182 if (("Name" == name))
3183 {
3184 this.nameField = value;
3185 this.nameFieldSet = true;
3186 }
3187 if (("StoreName" == name))
3188 {
3189 this.storeNameField = Certificate.ParseStoreNameType(value);
3190 this.storeNameFieldSet = true;
3191 }
3192 if (("StoreLocation" == name))
3193 {
3194 this.storeLocationField = Certificate.ParseStoreLocationType(value);
3195 this.storeLocationFieldSet = true;
3196 }
3197 if (("Overwrite" == name))
3198 {
3199 this.overwriteField = Enums.ParseYesNoType(value);
3200 this.overwriteFieldSet = true;
3201 }
3202 if (("Request" == name))
3203 {
3204 this.requestField = Enums.ParseYesNoType(value);
3205 this.requestFieldSet = true;
3206 }
3207 if (("BinaryKey" == name))
3208 {
3209 this.binaryKeyField = value;
3210 this.binaryKeyFieldSet = true;
3211 }
3212 if (("CertificatePath" == name))
3213 {
3214 this.certificatePathField = value;
3215 this.certificatePathFieldSet = true;
3216 }
3217 if (("PFXPassword" == name))
3218 {
3219 this.pFXPasswordField = value;
3220 this.pFXPasswordFieldSet = true;
3221 }
3222 }
3223
3224 [GeneratedCode("XsdGen", "4.0.0.0")]
3225 public enum StoreNameType
3226 {
3227
3228 IllegalValue = int.MaxValue,
3229
3230 NotSet = -1,
3231
3232 /// <summary>
3233 /// Contains the certificates of certificate authorities that the user trusts to issue certificates to others. Certificates in these stores are normally supplied with the operating system or by the user's network administrator.
3234 /// </summary>
3235 ca,
3236
3237 /// <summary>
3238 /// Use the "personal" value instead.
3239 /// </summary>
3240 my,
3241
3242 /// <summary>
3243 /// Contains personal certificates. These certificates will usually have an associated private key. This store is often
3244 /// referred to as the "MY" certificate store.
3245 /// </summary>
3246 personal,
3247
3248 request,
3249
3250 /// <summary>
3251 /// Contains the certificates of certificate authorities that the user trusts to issue certificates to others. Certificates in these stores are normally supplied with the operating system or by the user's network administrator. Certificates in this store are typically self-signed.
3252 /// </summary>
3253 root,
3254
3255 /// <summary>
3256 /// Contains the certificates of those that the user normally sends enveloped messages to or receives signed messages from.
3257 /// See
3258 /// </summary>
3259 otherPeople,
3260
3261 /// <summary>
3262 /// Contains the certificates of those directly trusted people and resources.
3263 /// See
3264 /// </summary>
3265 trustedPeople,
3266
3267 /// <summary>
3268 /// Contains the certificates of those publishers who are trusted.
3269 /// See
3270 /// </summary>
3271 trustedPublisher,
3272 }
3273
3274 [GeneratedCode("XsdGen", "4.0.0.0")]
3275 public enum StoreLocationType
3276 {
3277
3278 IllegalValue = int.MaxValue,
3279
3280 NotSet = -1,
3281
3282 currentUser,
3283
3284 localMachine,
3285 }
3286 }
3287
3288 /// <summary>
3289 /// Associates a certificate with the parent WebSite. The Certificate element should be
3290 /// in the same Component as the parent WebSite.
3291 /// </summary>
3292 [GeneratedCode("XsdGen", "4.0.0.0")]
3293 public class CertificateRef : ISchemaElement, ISetAttributes
3294 {
3295
3296 private string idField;
3297
3298 private bool idFieldSet;
3299
3300 private ISchemaElement parentElement;
3301
3302 /// <summary>
3303 /// The identifier of the referenced Certificate.
3304 /// </summary>
3305 public string Id
3306 {
3307 get
3308 {
3309 return this.idField;
3310 }
3311 set
3312 {
3313 this.idFieldSet = true;
3314 this.idField = value;
3315 }
3316 }
3317
3318 public virtual ISchemaElement ParentElement
3319 {
3320 get
3321 {
3322 return this.parentElement;
3323 }
3324 set
3325 {
3326 this.parentElement = value;
3327 }
3328 }
3329
3330 /// <summary>
3331 /// Processes this element and all child elements into an XmlWriter.
3332 /// </summary>
3333 public virtual void OutputXml(XmlWriter writer)
3334 {
3335 if ((null == writer))
3336 {
3337 throw new ArgumentNullException("writer");
3338 }
3339 writer.WriteStartElement("CertificateRef", "http://wixtoolset.org/schemas/v4/wxs/iis");
3340 if (this.idFieldSet)
3341 {
3342 writer.WriteAttributeString("Id", this.idField);
3343 }
3344 writer.WriteEndElement();
3345 }
3346
3347 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3348 void ISetAttributes.SetAttribute(string name, string value)
3349 {
3350 if (String.IsNullOrEmpty(name))
3351 {
3352 throw new ArgumentNullException("name");
3353 }
3354 if (("Id" == name))
3355 {
3356 this.idField = value;
3357 this.idFieldSet = true;
3358 }
3359 }
3360 }
3361
3362 /// <summary>
3363 /// IIS Properties
3364 /// </summary>
3365 [GeneratedCode("XsdGen", "4.0.0.0")]
3366 public class WebProperty : ISchemaElement, ISetAttributes
3367 {
3368
3369 private IdType idField;
3370
3371 private bool idFieldSet;
3372
3373 private string valueField;
3374
3375 private bool valueFieldSet;
3376
3377 private ISchemaElement parentElement;
3378
3379 public IdType Id
3380 {
3381 get
3382 {
3383 return this.idField;
3384 }
3385 set
3386 {
3387 this.idFieldSet = true;
3388 this.idField = value;
3389 }
3390 }
3391
3392 /// <summary>
3393 /// The value to be used for the WebProperty specified in the Id attribute. See
3394 /// the remarks section for information on acceptable values for each Id.
3395 /// </summary>
3396 public string Value
3397 {
3398 get
3399 {
3400 return this.valueField;
3401 }
3402 set
3403 {
3404 this.valueFieldSet = true;
3405 this.valueField = value;
3406 }
3407 }
3408
3409 public virtual ISchemaElement ParentElement
3410 {
3411 get
3412 {
3413 return this.parentElement;
3414 }
3415 set
3416 {
3417 this.parentElement = value;
3418 }
3419 }
3420
3421 /// <summary>
3422 /// Parses a IdType from a string.
3423 /// </summary>
3424 public static IdType ParseIdType(string value)
3425 {
3426 IdType parsedValue;
3427 WebProperty.TryParseIdType(value, out parsedValue);
3428 return parsedValue;
3429 }
3430
3431 /// <summary>
3432 /// Tries to parse a IdType from a string.
3433 /// </summary>
3434 public static bool TryParseIdType(string value, out IdType parsedValue)
3435 {
3436 parsedValue = IdType.NotSet;
3437 if (string.IsNullOrEmpty(value))
3438 {
3439 return false;
3440 }
3441 if (("ETagChangeNumber" == value))
3442 {
3443 parsedValue = IdType.ETagChangeNumber;
3444 }
3445 else
3446 {
3447 if (("IIs5IsolationMode" == value))
3448 {
3449 parsedValue = IdType.IIs5IsolationMode;
3450 }
3451 else
3452 {
3453 if (("MaxGlobalBandwidth" == value))
3454 {
3455 parsedValue = IdType.MaxGlobalBandwidth;
3456 }
3457 else
3458 {
3459 if (("LogInUTF8" == value))
3460 {
3461 parsedValue = IdType.LogInUTF8;
3462 }
3463 else
3464 {
3465 parsedValue = IdType.IllegalValue;
3466 return false;
3467 }
3468 }
3469 }
3470 }
3471 return true;
3472 }
3473
3474 /// <summary>
3475 /// Processes this element and all child elements into an XmlWriter.
3476 /// </summary>
3477 public virtual void OutputXml(XmlWriter writer)
3478 {
3479 if ((null == writer))
3480 {
3481 throw new ArgumentNullException("writer");
3482 }
3483 writer.WriteStartElement("WebProperty", "http://wixtoolset.org/schemas/v4/wxs/iis");
3484 if (this.idFieldSet)
3485 {
3486 if ((this.idField == IdType.ETagChangeNumber))
3487 {
3488 writer.WriteAttributeString("Id", "ETagChangeNumber");
3489 }
3490 if ((this.idField == IdType.IIs5IsolationMode))
3491 {
3492 writer.WriteAttributeString("Id", "IIs5IsolationMode");
3493 }
3494 if ((this.idField == IdType.MaxGlobalBandwidth))
3495 {
3496 writer.WriteAttributeString("Id", "MaxGlobalBandwidth");
3497 }
3498 if ((this.idField == IdType.LogInUTF8))
3499 {
3500 writer.WriteAttributeString("Id", "LogInUTF8");
3501 }
3502 }
3503 if (this.valueFieldSet)
3504 {
3505 writer.WriteAttributeString("Value", this.valueField);
3506 }
3507 writer.WriteEndElement();
3508 }
3509
3510 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3511 void ISetAttributes.SetAttribute(string name, string value)
3512 {
3513 if (String.IsNullOrEmpty(name))
3514 {
3515 throw new ArgumentNullException("name");
3516 }
3517 if (("Id" == name))
3518 {
3519 this.idField = WebProperty.ParseIdType(value);
3520 this.idFieldSet = true;
3521 }
3522 if (("Value" == name))
3523 {
3524 this.valueField = value;
3525 this.valueFieldSet = true;
3526 }
3527 }
3528
3529 [GeneratedCode("XsdGen", "4.0.0.0")]
3530 public enum IdType
3531 {
3532
3533 IllegalValue = int.MaxValue,
3534
3535 NotSet = -1,
3536
3537 ETagChangeNumber,
3538
3539 IIs5IsolationMode,
3540
3541 MaxGlobalBandwidth,
3542
3543 LogInUTF8,
3544 }
3545 }
3546
3547 /// <summary>
3548 /// Defines properties for a web application. These properties can be used for more than one application defined in a web site or vroot, by defining this element in a common location and referring to it by setting the WebApplication attribute of the WebSite and WebVirtualDir elements.
3549 /// </summary>
3550 [GeneratedCode("XsdGen", "4.0.0.0")]
3551 public class WebApplication : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
3552 {
3553
3554 private ElementCollection children;
3555
3556 private string idField;
3557
3558 private bool idFieldSet;
3559
3560 private string nameField;
3561
3562 private bool nameFieldSet;
3563
3564 private IsolationType isolationField;
3565
3566 private bool isolationFieldSet;
3567
3568 private YesNoDefaultType allowSessionsField;
3569
3570 private bool allowSessionsFieldSet;
3571
3572 private int sessionTimeoutField;
3573
3574 private bool sessionTimeoutFieldSet;
3575
3576 private YesNoDefaultType bufferField;
3577
3578 private bool bufferFieldSet;
3579
3580 private YesNoDefaultType parentPathsField;
3581
3582 private bool parentPathsFieldSet;
3583
3584 private DefaultScriptType defaultScriptField;
3585
3586 private bool defaultScriptFieldSet;
3587
3588 private int scriptTimeoutField;
3589
3590 private bool scriptTimeoutFieldSet;
3591
3592 private YesNoDefaultType serverDebuggingField;
3593
3594 private bool serverDebuggingFieldSet;
3595
3596 private YesNoDefaultType clientDebuggingField;
3597
3598 private bool clientDebuggingFieldSet;
3599
3600 private string webAppPoolField;
3601
3602 private bool webAppPoolFieldSet;
3603
3604 private ISchemaElement parentElement;
3605
3606 public WebApplication()
3607 {
3608 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
3609 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(WebApplicationExtension)));
3610 this.children = childCollection0;
3611 }
3612
3613 public virtual IEnumerable Children
3614 {
3615 get
3616 {
3617 return this.children;
3618 }
3619 }
3620
3621 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
3622 public virtual IEnumerable this[System.Type childType]
3623 {
3624 get
3625 {
3626 return this.children.Filter(childType);
3627 }
3628 }
3629
3630 public string Id
3631 {
3632 get
3633 {
3634 return this.idField;
3635 }
3636 set
3637 {
3638 this.idFieldSet = true;
3639 this.idField = value;
3640 }
3641 }
3642
3643 /// <summary>
3644 /// Sets the name of this application.
3645 /// </summary>
3646 public string Name
3647 {
3648 get
3649 {
3650 return this.nameField;
3651 }
3652 set
3653 {
3654 this.nameFieldSet = true;
3655 this.nameField = value;
3656 }
3657 }
3658
3659 /// <summary>
3660 /// Sets the application isolation level for this application for pre-IIS 6 applications.
3661 /// </summary>
3662 public IsolationType Isolation
3663 {
3664 get
3665 {
3666 return this.isolationField;
3667 }
3668 set
3669 {
3670 this.isolationFieldSet = true;
3671 this.isolationField = value;
3672 }
3673 }
3674
3675 /// <summary>
3676 /// Sets the Enable Session State option. When enabled, you can set the session timeout using the SessionTimeout attribute.
3677 /// </summary>
3678 public YesNoDefaultType AllowSessions
3679 {
3680 get
3681 {
3682 return this.allowSessionsField;
3683 }
3684 set
3685 {
3686 this.allowSessionsFieldSet = true;
3687 this.allowSessionsField = value;
3688 }
3689 }
3690
3691 /// <summary>
3692 /// Sets the timeout value for sessions in minutes.
3693 /// </summary>
3694 public int SessionTimeout
3695 {
3696 get
3697 {
3698 return this.sessionTimeoutField;
3699 }
3700 set
3701 {
3702 this.sessionTimeoutFieldSet = true;
3703 this.sessionTimeoutField = value;
3704 }
3705 }
3706
3707 /// <summary>
3708 /// Sets the option that enables response buffering in the application, which allows ASP script to set response headers anywhere in the script.
3709 /// </summary>
3710 public YesNoDefaultType Buffer
3711 {
3712 get
3713 {
3714 return this.bufferField;
3715 }
3716 set
3717 {
3718 this.bufferFieldSet = true;
3719 this.bufferField = value;
3720 }
3721 }
3722
3723 /// <summary>
3724 /// Sets the parent paths option, which allows a client to use relative paths to reach parent directories from this application.
3725 /// </summary>
3726 public YesNoDefaultType ParentPaths
3727 {
3728 get
3729 {
3730 return this.parentPathsField;
3731 }
3732 set
3733 {
3734 this.parentPathsFieldSet = true;
3735 this.parentPathsField = value;
3736 }
3737 }
3738
3739 /// <summary>
3740 /// Sets the default script language for the site.
3741 /// </summary>
3742 public DefaultScriptType DefaultScript
3743 {
3744 get
3745 {
3746 return this.defaultScriptField;
3747 }
3748 set
3749 {
3750 this.defaultScriptFieldSet = true;
3751 this.defaultScriptField = value;
3752 }
3753 }
3754
3755 /// <summary>
3756 /// Sets the timeout value in seconds for executing ASP scripts.
3757 /// </summary>
3758 public int ScriptTimeout
3759 {
3760 get
3761 {
3762 return this.scriptTimeoutField;
3763 }
3764 set
3765 {
3766 this.scriptTimeoutFieldSet = true;
3767 this.scriptTimeoutField = value;
3768 }
3769 }
3770
3771 /// <summary>
3772 /// Enable ASP server-side script debugging.
3773 /// </summary>
3774 public YesNoDefaultType ServerDebugging
3775 {
3776 get
3777 {
3778 return this.serverDebuggingField;
3779 }
3780 set
3781 {
3782 this.serverDebuggingFieldSet = true;
3783 this.serverDebuggingField = value;
3784 }
3785 }
3786
3787 /// <summary>
3788 /// Enable ASP client-side script debugging.
3789 /// </summary>
3790 public YesNoDefaultType ClientDebugging
3791 {
3792 get
3793 {
3794 return this.clientDebuggingField;
3795 }
3796 set
3797 {
3798 this.clientDebuggingFieldSet = true;
3799 this.clientDebuggingField = value;
3800 }
3801 }
3802
3803 /// <summary>
3804 /// References the Id attribute of a WebAppPool element to use as the application pool for this application in IIS 6 applications.
3805 /// </summary>
3806 public string WebAppPool
3807 {
3808 get
3809 {
3810 return this.webAppPoolField;
3811 }
3812 set
3813 {
3814 this.webAppPoolFieldSet = true;
3815 this.webAppPoolField = value;
3816 }
3817 }
3818
3819 public virtual ISchemaElement ParentElement
3820 {
3821 get
3822 {
3823 return this.parentElement;
3824 }
3825 set
3826 {
3827 this.parentElement = value;
3828 }
3829 }
3830
3831 public virtual void AddChild(ISchemaElement child)
3832 {
3833 if ((null == child))
3834 {
3835 throw new ArgumentNullException("child");
3836 }
3837 this.children.AddElement(child);
3838 child.ParentElement = this;
3839 }
3840
3841 public virtual void RemoveChild(ISchemaElement child)
3842 {
3843 if ((null == child))
3844 {
3845 throw new ArgumentNullException("child");
3846 }
3847 this.children.RemoveElement(child);
3848 child.ParentElement = null;
3849 }
3850
3851 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3852 ISchemaElement ICreateChildren.CreateChild(string childName)
3853 {
3854 if (String.IsNullOrEmpty(childName))
3855 {
3856 throw new ArgumentNullException("childName");
3857 }
3858 ISchemaElement childValue = null;
3859 if (("WebApplicationExtension" == childName))
3860 {
3861 childValue = new WebApplicationExtension();
3862 }
3863 if ((null == childValue))
3864 {
3865 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
3866 }
3867 return childValue;
3868 }
3869
3870 /// <summary>
3871 /// Parses a IsolationType from a string.
3872 /// </summary>
3873 public static IsolationType ParseIsolationType(string value)
3874 {
3875 IsolationType parsedValue;
3876 WebApplication.TryParseIsolationType(value, out parsedValue);
3877 return parsedValue;
3878 }
3879
3880 /// <summary>
3881 /// Tries to parse a IsolationType from a string.
3882 /// </summary>
3883 public static bool TryParseIsolationType(string value, out IsolationType parsedValue)
3884 {
3885 parsedValue = IsolationType.NotSet;
3886 if (string.IsNullOrEmpty(value))
3887 {
3888 return false;
3889 }
3890 if (("low" == value))
3891 {
3892 parsedValue = IsolationType.low;
3893 }
3894 else
3895 {
3896 if (("medium" == value))
3897 {
3898 parsedValue = IsolationType.medium;
3899 }
3900 else
3901 {
3902 if (("high" == value))
3903 {
3904 parsedValue = IsolationType.high;
3905 }
3906 else
3907 {
3908 parsedValue = IsolationType.IllegalValue;
3909 return false;
3910 }
3911 }
3912 }
3913 return true;
3914 }
3915
3916 /// <summary>
3917 /// Parses a DefaultScriptType from a string.
3918 /// </summary>
3919 public static DefaultScriptType ParseDefaultScriptType(string value)
3920 {
3921 DefaultScriptType parsedValue;
3922 WebApplication.TryParseDefaultScriptType(value, out parsedValue);
3923 return parsedValue;
3924 }
3925
3926 /// <summary>
3927 /// Tries to parse a DefaultScriptType from a string.
3928 /// </summary>
3929 public static bool TryParseDefaultScriptType(string value, out DefaultScriptType parsedValue)
3930 {
3931 parsedValue = DefaultScriptType.NotSet;
3932 if (string.IsNullOrEmpty(value))
3933 {
3934 return false;
3935 }
3936 if (("VBScript" == value))
3937 {
3938 parsedValue = DefaultScriptType.VBScript;
3939 }
3940 else
3941 {
3942 if (("JScript" == value))
3943 {
3944 parsedValue = DefaultScriptType.JScript;
3945 }
3946 else
3947 {
3948 parsedValue = DefaultScriptType.IllegalValue;
3949 return false;
3950 }
3951 }
3952 return true;
3953 }
3954
3955 /// <summary>
3956 /// Processes this element and all child elements into an XmlWriter.
3957 /// </summary>
3958 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
3959 public virtual void OutputXml(XmlWriter writer)
3960 {
3961 if ((null == writer))
3962 {
3963 throw new ArgumentNullException("writer");
3964 }
3965 writer.WriteStartElement("WebApplication", "http://wixtoolset.org/schemas/v4/wxs/iis");
3966 if (this.idFieldSet)
3967 {
3968 writer.WriteAttributeString("Id", this.idField);
3969 }
3970 if (this.nameFieldSet)
3971 {
3972 writer.WriteAttributeString("Name", this.nameField);
3973 }
3974 if (this.isolationFieldSet)
3975 {
3976 if ((this.isolationField == IsolationType.low))
3977 {
3978 writer.WriteAttributeString("Isolation", "low");
3979 }
3980 if ((this.isolationField == IsolationType.medium))
3981 {
3982 writer.WriteAttributeString("Isolation", "medium");
3983 }
3984 if ((this.isolationField == IsolationType.high))
3985 {
3986 writer.WriteAttributeString("Isolation", "high");
3987 }
3988 }
3989 if (this.allowSessionsFieldSet)
3990 {
3991 if ((this.allowSessionsField == YesNoDefaultType.@default))
3992 {
3993 writer.WriteAttributeString("AllowSessions", "default");
3994 }
3995 if ((this.allowSessionsField == YesNoDefaultType.no))
3996 {
3997 writer.WriteAttributeString("AllowSessions", "no");
3998 }
3999 if ((this.allowSessionsField == YesNoDefaultType.yes))
4000 {
4001 writer.WriteAttributeString("AllowSessions", "yes");
4002 }
4003 }
4004 if (this.sessionTimeoutFieldSet)
4005 {
4006 writer.WriteAttributeString("SessionTimeout", this.sessionTimeoutField.ToString(CultureInfo.InvariantCulture));
4007 }
4008 if (this.bufferFieldSet)
4009 {
4010 if ((this.bufferField == YesNoDefaultType.@default))
4011 {
4012 writer.WriteAttributeString("Buffer", "default");
4013 }
4014 if ((this.bufferField == YesNoDefaultType.no))
4015 {
4016 writer.WriteAttributeString("Buffer", "no");
4017 }
4018 if ((this.bufferField == YesNoDefaultType.yes))
4019 {
4020 writer.WriteAttributeString("Buffer", "yes");
4021 }
4022 }
4023 if (this.parentPathsFieldSet)
4024 {
4025 if ((this.parentPathsField == YesNoDefaultType.@default))
4026 {
4027 writer.WriteAttributeString("ParentPaths", "default");
4028 }
4029 if ((this.parentPathsField == YesNoDefaultType.no))
4030 {
4031 writer.WriteAttributeString("ParentPaths", "no");
4032 }
4033 if ((this.parentPathsField == YesNoDefaultType.yes))
4034 {
4035 writer.WriteAttributeString("ParentPaths", "yes");
4036 }
4037 }
4038 if (this.defaultScriptFieldSet)
4039 {
4040 if ((this.defaultScriptField == DefaultScriptType.VBScript))
4041 {
4042 writer.WriteAttributeString("DefaultScript", "VBScript");
4043 }
4044 if ((this.defaultScriptField == DefaultScriptType.JScript))
4045 {
4046 writer.WriteAttributeString("DefaultScript", "JScript");
4047 }
4048 }
4049 if (this.scriptTimeoutFieldSet)
4050 {
4051 writer.WriteAttributeString("ScriptTimeout", this.scriptTimeoutField.ToString(CultureInfo.InvariantCulture));
4052 }
4053 if (this.serverDebuggingFieldSet)
4054 {
4055 if ((this.serverDebuggingField == YesNoDefaultType.@default))
4056 {
4057 writer.WriteAttributeString("ServerDebugging", "default");
4058 }
4059 if ((this.serverDebuggingField == YesNoDefaultType.no))
4060 {
4061 writer.WriteAttributeString("ServerDebugging", "no");
4062 }
4063 if ((this.serverDebuggingField == YesNoDefaultType.yes))
4064 {
4065 writer.WriteAttributeString("ServerDebugging", "yes");
4066 }
4067 }
4068 if (this.clientDebuggingFieldSet)
4069 {
4070 if ((this.clientDebuggingField == YesNoDefaultType.@default))
4071 {
4072 writer.WriteAttributeString("ClientDebugging", "default");
4073 }
4074 if ((this.clientDebuggingField == YesNoDefaultType.no))
4075 {
4076 writer.WriteAttributeString("ClientDebugging", "no");
4077 }
4078 if ((this.clientDebuggingField == YesNoDefaultType.yes))
4079 {
4080 writer.WriteAttributeString("ClientDebugging", "yes");
4081 }
4082 }
4083 if (this.webAppPoolFieldSet)
4084 {
4085 writer.WriteAttributeString("WebAppPool", this.webAppPoolField);
4086 }
4087 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
4088 {
4089 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
4090 childElement.OutputXml(writer);
4091 }
4092 writer.WriteEndElement();
4093 }
4094
4095 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4096 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
4097 void ISetAttributes.SetAttribute(string name, string value)
4098 {
4099 if (String.IsNullOrEmpty(name))
4100 {
4101 throw new ArgumentNullException("name");
4102 }
4103 if (("Id" == name))
4104 {
4105 this.idField = value;
4106 this.idFieldSet = true;
4107 }
4108 if (("Name" == name))
4109 {
4110 this.nameField = value;
4111 this.nameFieldSet = true;
4112 }
4113 if (("Isolation" == name))
4114 {
4115 this.isolationField = WebApplication.ParseIsolationType(value);
4116 this.isolationFieldSet = true;
4117 }
4118 if (("AllowSessions" == name))
4119 {
4120 this.allowSessionsField = Enums.ParseYesNoDefaultType(value);
4121 this.allowSessionsFieldSet = true;
4122 }
4123 if (("SessionTimeout" == name))
4124 {
4125 this.sessionTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
4126 this.sessionTimeoutFieldSet = true;
4127 }
4128 if (("Buffer" == name))
4129 {
4130 this.bufferField = Enums.ParseYesNoDefaultType(value);
4131 this.bufferFieldSet = true;
4132 }
4133 if (("ParentPaths" == name))
4134 {
4135 this.parentPathsField = Enums.ParseYesNoDefaultType(value);
4136 this.parentPathsFieldSet = true;
4137 }
4138 if (("DefaultScript" == name))
4139 {
4140 this.defaultScriptField = WebApplication.ParseDefaultScriptType(value);
4141 this.defaultScriptFieldSet = true;
4142 }
4143 if (("ScriptTimeout" == name))
4144 {
4145 this.scriptTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
4146 this.scriptTimeoutFieldSet = true;
4147 }
4148 if (("ServerDebugging" == name))
4149 {
4150 this.serverDebuggingField = Enums.ParseYesNoDefaultType(value);
4151 this.serverDebuggingFieldSet = true;
4152 }
4153 if (("ClientDebugging" == name))
4154 {
4155 this.clientDebuggingField = Enums.ParseYesNoDefaultType(value);
4156 this.clientDebuggingFieldSet = true;
4157 }
4158 if (("WebAppPool" == name))
4159 {
4160 this.webAppPoolField = value;
4161 this.webAppPoolFieldSet = true;
4162 }
4163 }
4164
4165 [GeneratedCode("XsdGen", "4.0.0.0")]
4166 public enum IsolationType
4167 {
4168
4169 IllegalValue = int.MaxValue,
4170
4171 NotSet = -1,
4172
4173 /// <summary>
4174 /// Means the application executes within the IIS process.
4175 /// </summary>
4176 low,
4177
4178 /// <summary>
4179 /// Executes pooled in a separate process.
4180 /// </summary>
4181 medium,
4182
4183 /// <summary>
4184 /// Means execution alone in a separate process.
4185 /// </summary>
4186 high,
4187 }
4188
4189 [GeneratedCode("XsdGen", "4.0.0.0")]
4190 public enum DefaultScriptType
4191 {
4192
4193 IllegalValue = int.MaxValue,
4194
4195 NotSet = -1,
4196
4197 VBScript,
4198
4199 JScript,
4200 }
4201 }
4202
4203 /// <summary>
4204 /// WebAddress for WebSite
4205 /// </summary>
4206 [GeneratedCode("XsdGen", "4.0.0.0")]
4207 public class WebAddress : ISchemaElement, ISetAttributes
4208 {
4209
4210 private string idField;
4211
4212 private bool idFieldSet;
4213
4214 private string iPField;
4215
4216 private bool iPFieldSet;
4217
4218 private string portField;
4219
4220 private bool portFieldSet;
4221
4222 private string headerField;
4223
4224 private bool headerFieldSet;
4225
4226 private YesNoType secureField;
4227
4228 private bool secureFieldSet;
4229
4230 private ISchemaElement parentElement;
4231
4232 public string Id
4233 {
4234 get
4235 {
4236 return this.idField;
4237 }
4238 set
4239 {
4240 this.idFieldSet = true;
4241 this.idField = value;
4242 }
4243 }
4244
4245 /// <summary>
4246 /// The IP address to locate an existing WebSite or create a new WebSite. When the WebAddress is part of a WebSite element
4247 /// used to locate an existing web site the following rules are used:
4248 /// </summary>
4249 public string IP
4250 {
4251 get
4252 {
4253 return this.iPField;
4254 }
4255 set
4256 {
4257 this.iPFieldSet = true;
4258 this.iPField = value;
4259 }
4260 }
4261
4262 public string Port
4263 {
4264 get
4265 {
4266 return this.portField;
4267 }
4268 set
4269 {
4270 this.portFieldSet = true;
4271 this.portField = value;
4272 }
4273 }
4274
4275 public string Header
4276 {
4277 get
4278 {
4279 return this.headerField;
4280 }
4281 set
4282 {
4283 this.headerFieldSet = true;
4284 this.headerField = value;
4285 }
4286 }
4287
4288 /// <summary>
4289 /// Determines if this address represents a secure binding. The default is 'no'.
4290 /// </summary>
4291 public YesNoType Secure
4292 {
4293 get
4294 {
4295 return this.secureField;
4296 }
4297 set
4298 {
4299 this.secureFieldSet = true;
4300 this.secureField = value;
4301 }
4302 }
4303
4304 public virtual ISchemaElement ParentElement
4305 {
4306 get
4307 {
4308 return this.parentElement;
4309 }
4310 set
4311 {
4312 this.parentElement = value;
4313 }
4314 }
4315
4316 /// <summary>
4317 /// Processes this element and all child elements into an XmlWriter.
4318 /// </summary>
4319 public virtual void OutputXml(XmlWriter writer)
4320 {
4321 if ((null == writer))
4322 {
4323 throw new ArgumentNullException("writer");
4324 }
4325 writer.WriteStartElement("WebAddress", "http://wixtoolset.org/schemas/v4/wxs/iis");
4326 if (this.idFieldSet)
4327 {
4328 writer.WriteAttributeString("Id", this.idField);
4329 }
4330 if (this.iPFieldSet)
4331 {
4332 writer.WriteAttributeString("IP", this.iPField);
4333 }
4334 if (this.portFieldSet)
4335 {
4336 writer.WriteAttributeString("Port", this.portField);
4337 }
4338 if (this.headerFieldSet)
4339 {
4340 writer.WriteAttributeString("Header", this.headerField);
4341 }
4342 if (this.secureFieldSet)
4343 {
4344 if ((this.secureField == YesNoType.no))
4345 {
4346 writer.WriteAttributeString("Secure", "no");
4347 }
4348 if ((this.secureField == YesNoType.yes))
4349 {
4350 writer.WriteAttributeString("Secure", "yes");
4351 }
4352 }
4353 writer.WriteEndElement();
4354 }
4355
4356 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4357 void ISetAttributes.SetAttribute(string name, string value)
4358 {
4359 if (String.IsNullOrEmpty(name))
4360 {
4361 throw new ArgumentNullException("name");
4362 }
4363 if (("Id" == name))
4364 {
4365 this.idField = value;
4366 this.idFieldSet = true;
4367 }
4368 if (("IP" == name))
4369 {
4370 this.iPField = value;
4371 this.iPFieldSet = true;
4372 }
4373 if (("Port" == name))
4374 {
4375 this.portField = value;
4376 this.portFieldSet = true;
4377 }
4378 if (("Header" == name))
4379 {
4380 this.headerField = value;
4381 this.headerFieldSet = true;
4382 }
4383 if (("Secure" == name))
4384 {
4385 this.secureField = Enums.ParseYesNoType(value);
4386 this.secureFieldSet = true;
4387 }
4388 }
4389 }
4390
4391 /// <summary>
4392 /// Defines an IIS virtual directory. When this element is a child of WebSite element, the virtual directory is defined within that web site. Otherwise this virtual directory must reference a WebSite element via the WebSite attribute
4393 /// </summary>
4394 [GeneratedCode("XsdGen", "4.0.0.0")]
4395 public class WebVirtualDir : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
4396 {
4397
4398 private ElementCollection children;
4399
4400 private string idField;
4401
4402 private bool idFieldSet;
4403
4404 private string webSiteField;
4405
4406 private bool webSiteFieldSet;
4407
4408 private string aliasField;
4409
4410 private bool aliasFieldSet;
4411
4412 private string directoryField;
4413
4414 private bool directoryFieldSet;
4415
4416 private string dirPropertiesField;
4417
4418 private bool dirPropertiesFieldSet;
4419
4420 private string webApplicationField;
4421
4422 private bool webApplicationFieldSet;
4423
4424 private ISchemaElement parentElement;
4425
4426 public WebVirtualDir()
4427 {
4428 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
4429 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication)));
4430 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties)));
4431 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebError)));
4432 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebVirtualDir)));
4433 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HttpHeader)));
4434 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MimeMap)));
4435 this.children = childCollection0;
4436 }
4437
4438 public virtual IEnumerable Children
4439 {
4440 get
4441 {
4442 return this.children;
4443 }
4444 }
4445
4446 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
4447 public virtual IEnumerable this[System.Type childType]
4448 {
4449 get
4450 {
4451 return this.children.Filter(childType);
4452 }
4453 }
4454
4455 public string Id
4456 {
4457 get
4458 {
4459 return this.idField;
4460 }
4461 set
4462 {
4463 this.idFieldSet = true;
4464 this.idField = value;
4465 }
4466 }
4467
4468 /// <summary>
4469 /// References the Id attribute for a WebSite in which this virtual directory belongs. Required when this element is not a child of WebSite element.
4470 /// </summary>
4471 public string WebSite
4472 {
4473 get
4474 {
4475 return this.webSiteField;
4476 }
4477 set
4478 {
4479 this.webSiteFieldSet = true;
4480 this.webSiteField = value;
4481 }
4482 }
4483
4484 /// <summary>
4485 /// Sets the application name, which is the URL relative path used to access this virtual directory
4486 /// </summary>
4487 public string Alias
4488 {
4489 get
4490 {
4491 return this.aliasField;
4492 }
4493 set
4494 {
4495 this.aliasFieldSet = true;
4496 this.aliasField = value;
4497 }
4498 }
4499
4500 /// <summary>
4501 /// References the Id attribute for a Directory element that points to the content for this virtual directory.
4502 /// </summary>
4503 public string Directory
4504 {
4505 get
4506 {
4507 return this.directoryField;
4508 }
4509 set
4510 {
4511 this.directoryFieldSet = true;
4512 this.directoryField = value;
4513 }
4514 }
4515
4516 /// <summary>
4517 /// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this virtual directory.
4518 /// This attribute may not be specified if a WebDirProperties element is directly nested in this element.
4519 /// </summary>
4520 public string DirProperties
4521 {
4522 get
4523 {
4524 return this.dirPropertiesField;
4525 }
4526 set
4527 {
4528 this.dirPropertiesFieldSet = true;
4529 this.dirPropertiesField = value;
4530 }
4531 }
4532
4533 /// <summary>
4534 /// References the Id attribute for a WebApplication element that specifies web application settings for this virtual directory. If a WebApplication child is not specified, the virtual directory does not host web applications.
4535 /// </summary>
4536 public string WebApplication
4537 {
4538 get
4539 {
4540 return this.webApplicationField;
4541 }
4542 set
4543 {
4544 this.webApplicationFieldSet = true;
4545 this.webApplicationField = value;
4546 }
4547 }
4548
4549 public virtual ISchemaElement ParentElement
4550 {
4551 get
4552 {
4553 return this.parentElement;
4554 }
4555 set
4556 {
4557 this.parentElement = value;
4558 }
4559 }
4560
4561 public virtual void AddChild(ISchemaElement child)
4562 {
4563 if ((null == child))
4564 {
4565 throw new ArgumentNullException("child");
4566 }
4567 this.children.AddElement(child);
4568 child.ParentElement = this;
4569 }
4570
4571 public virtual void RemoveChild(ISchemaElement child)
4572 {
4573 if ((null == child))
4574 {
4575 throw new ArgumentNullException("child");
4576 }
4577 this.children.RemoveElement(child);
4578 child.ParentElement = null;
4579 }
4580
4581 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4582 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
4583 ISchemaElement ICreateChildren.CreateChild(string childName)
4584 {
4585 if (String.IsNullOrEmpty(childName))
4586 {
4587 throw new ArgumentNullException("childName");
4588 }
4589 ISchemaElement childValue = null;
4590 if (("WebApplication" == childName))
4591 {
4592 childValue = new WebApplication();
4593 }
4594 if (("WebDirProperties" == childName))
4595 {
4596 childValue = new WebDirProperties();
4597 }
4598 if (("WebError" == childName))
4599 {
4600 childValue = new WebError();
4601 }
4602 if (("WebVirtualDir" == childName))
4603 {
4604 childValue = new WebVirtualDir();
4605 }
4606 if (("HttpHeader" == childName))
4607 {
4608 childValue = new HttpHeader();
4609 }
4610 if (("MimeMap" == childName))
4611 {
4612 childValue = new MimeMap();
4613 }
4614 if ((null == childValue))
4615 {
4616 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
4617 }
4618 return childValue;
4619 }
4620
4621 /// <summary>
4622 /// Processes this element and all child elements into an XmlWriter.
4623 /// </summary>
4624 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
4625 public virtual void OutputXml(XmlWriter writer)
4626 {
4627 if ((null == writer))
4628 {
4629 throw new ArgumentNullException("writer");
4630 }
4631 writer.WriteStartElement("WebVirtualDir", "http://wixtoolset.org/schemas/v4/wxs/iis");
4632 if (this.idFieldSet)
4633 {
4634 writer.WriteAttributeString("Id", this.idField);
4635 }
4636 if (this.webSiteFieldSet)
4637 {
4638 writer.WriteAttributeString("WebSite", this.webSiteField);
4639 }
4640 if (this.aliasFieldSet)
4641 {
4642 writer.WriteAttributeString("Alias", this.aliasField);
4643 }
4644 if (this.directoryFieldSet)
4645 {
4646 writer.WriteAttributeString("Directory", this.directoryField);
4647 }
4648 if (this.dirPropertiesFieldSet)
4649 {
4650 writer.WriteAttributeString("DirProperties", this.dirPropertiesField);
4651 }
4652 if (this.webApplicationFieldSet)
4653 {
4654 writer.WriteAttributeString("WebApplication", this.webApplicationField);
4655 }
4656 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
4657 {
4658 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
4659 childElement.OutputXml(writer);
4660 }
4661 writer.WriteEndElement();
4662 }
4663
4664 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4665 void ISetAttributes.SetAttribute(string name, string value)
4666 {
4667 if (String.IsNullOrEmpty(name))
4668 {
4669 throw new ArgumentNullException("name");
4670 }
4671 if (("Id" == name))
4672 {
4673 this.idField = value;
4674 this.idFieldSet = true;
4675 }
4676 if (("WebSite" == name))
4677 {
4678 this.webSiteField = value;
4679 this.webSiteFieldSet = true;
4680 }
4681 if (("Alias" == name))
4682 {
4683 this.aliasField = value;
4684 this.aliasFieldSet = true;
4685 }
4686 if (("Directory" == name))
4687 {
4688 this.directoryField = value;
4689 this.directoryFieldSet = true;
4690 }
4691 if (("DirProperties" == name))
4692 {
4693 this.dirPropertiesField = value;
4694 this.dirPropertiesFieldSet = true;
4695 }
4696 if (("WebApplication" == name))
4697 {
4698 this.webApplicationField = value;
4699 this.webApplicationFieldSet = true;
4700 }
4701 }
4702 }
4703
4704 /// <summary>
4705 /// Defines a subdirectory within an IIS web site. When this element is a child of WebSite, the web directory is defined within that web site. Otherwise the web directory must reference a WebSite element via the WebSite attribute.
4706 /// </summary>
4707 [GeneratedCode("XsdGen", "4.0.0.0")]
4708 public class WebDir : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
4709 {
4710
4711 private ElementCollection children;
4712
4713 private string idField;
4714
4715 private bool idFieldSet;
4716
4717 private string webSiteField;
4718
4719 private bool webSiteFieldSet;
4720
4721 private string pathField;
4722
4723 private bool pathFieldSet;
4724
4725 private string dirPropertiesField;
4726
4727 private bool dirPropertiesFieldSet;
4728
4729 private ISchemaElement parentElement;
4730
4731 public WebDir()
4732 {
4733 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
4734 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication)));
4735 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties)));
4736 this.children = childCollection0;
4737 }
4738
4739 public virtual IEnumerable Children
4740 {
4741 get
4742 {
4743 return this.children;
4744 }
4745 }
4746
4747 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
4748 public virtual IEnumerable this[System.Type childType]
4749 {
4750 get
4751 {
4752 return this.children.Filter(childType);
4753 }
4754 }
4755
4756 public string Id
4757 {
4758 get
4759 {
4760 return this.idField;
4761 }
4762 set
4763 {
4764 this.idFieldSet = true;
4765 this.idField = value;
4766 }
4767 }
4768
4769 /// <summary>
4770 /// References the Id attribute for a WebSite element in which this directory belongs. Required when this element is not a child of a WebSite element.
4771 /// </summary>
4772 public string WebSite
4773 {
4774 get
4775 {
4776 return this.webSiteField;
4777 }
4778 set
4779 {
4780 this.webSiteFieldSet = true;
4781 this.webSiteField = value;
4782 }
4783 }
4784
4785 /// <summary>
4786 /// Specifies the name of this web directory.
4787 /// </summary>
4788 public string Path
4789 {
4790 get
4791 {
4792 return this.pathField;
4793 }
4794 set
4795 {
4796 this.pathFieldSet = true;
4797 this.pathField = value;
4798 }
4799 }
4800
4801 /// <summary>
4802 /// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this web directory.
4803 /// This attribute may not be specified if a WebDirProperties element is directly nested in this element.
4804 /// </summary>
4805 public string DirProperties
4806 {
4807 get
4808 {
4809 return this.dirPropertiesField;
4810 }
4811 set
4812 {
4813 this.dirPropertiesFieldSet = true;
4814 this.dirPropertiesField = value;
4815 }
4816 }
4817
4818 public virtual ISchemaElement ParentElement
4819 {
4820 get
4821 {
4822 return this.parentElement;
4823 }
4824 set
4825 {
4826 this.parentElement = value;
4827 }
4828 }
4829
4830 public virtual void AddChild(ISchemaElement child)
4831 {
4832 if ((null == child))
4833 {
4834 throw new ArgumentNullException("child");
4835 }
4836 this.children.AddElement(child);
4837 child.ParentElement = this;
4838 }
4839
4840 public virtual void RemoveChild(ISchemaElement child)
4841 {
4842 if ((null == child))
4843 {
4844 throw new ArgumentNullException("child");
4845 }
4846 this.children.RemoveElement(child);
4847 child.ParentElement = null;
4848 }
4849
4850 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4851 ISchemaElement ICreateChildren.CreateChild(string childName)
4852 {
4853 if (String.IsNullOrEmpty(childName))
4854 {
4855 throw new ArgumentNullException("childName");
4856 }
4857 ISchemaElement childValue = null;
4858 if (("WebApplication" == childName))
4859 {
4860 childValue = new WebApplication();
4861 }
4862 if (("WebDirProperties" == childName))
4863 {
4864 childValue = new WebDirProperties();
4865 }
4866 if ((null == childValue))
4867 {
4868 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
4869 }
4870 return childValue;
4871 }
4872
4873 /// <summary>
4874 /// Processes this element and all child elements into an XmlWriter.
4875 /// </summary>
4876 public virtual void OutputXml(XmlWriter writer)
4877 {
4878 if ((null == writer))
4879 {
4880 throw new ArgumentNullException("writer");
4881 }
4882 writer.WriteStartElement("WebDir", "http://wixtoolset.org/schemas/v4/wxs/iis");
4883 if (this.idFieldSet)
4884 {
4885 writer.WriteAttributeString("Id", this.idField);
4886 }
4887 if (this.webSiteFieldSet)
4888 {
4889 writer.WriteAttributeString("WebSite", this.webSiteField);
4890 }
4891 if (this.pathFieldSet)
4892 {
4893 writer.WriteAttributeString("Path", this.pathField);
4894 }
4895 if (this.dirPropertiesFieldSet)
4896 {
4897 writer.WriteAttributeString("DirProperties", this.dirPropertiesField);
4898 }
4899 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
4900 {
4901 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
4902 childElement.OutputXml(writer);
4903 }
4904 writer.WriteEndElement();
4905 }
4906
4907 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4908 void ISetAttributes.SetAttribute(string name, string value)
4909 {
4910 if (String.IsNullOrEmpty(name))
4911 {
4912 throw new ArgumentNullException("name");
4913 }
4914 if (("Id" == name))
4915 {
4916 this.idField = value;
4917 this.idFieldSet = true;
4918 }
4919 if (("WebSite" == name))
4920 {
4921 this.webSiteField = value;
4922 this.webSiteFieldSet = true;
4923 }
4924 if (("Path" == name))
4925 {
4926 this.pathField = value;
4927 this.pathFieldSet = true;
4928 }
4929 if (("DirProperties" == name))
4930 {
4931 this.dirPropertiesField = value;
4932 this.dirPropertiesFieldSet = true;
4933 }
4934 }
4935 }
4936
4937 /// <summary>
4938 /// IIs Web Site
4939 /// </summary>
4940 [GeneratedCode("XsdGen", "4.0.0.0")]
4941 public class WebSite : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
4942 {
4943
4944 private ElementCollection children;
4945
4946 private string idField;
4947
4948 private bool idFieldSet;
4949
4950 private YesNoType autoStartField;
4951
4952 private bool autoStartFieldSet;
4953
4954 private YesNoType configureIfExistsField;
4955
4956 private bool configureIfExistsFieldSet;
4957
4958 private long connectionTimeoutField;
4959
4960 private bool connectionTimeoutFieldSet;
4961
4962 private string descriptionField;
4963
4964 private bool descriptionFieldSet;
4965
4966 private string directoryField;
4967
4968 private bool directoryFieldSet;
4969
4970 private string dirPropertiesField;
4971
4972 private bool dirPropertiesFieldSet;
4973
4974 private int sequenceField;
4975
4976 private bool sequenceFieldSet;
4977
4978 private string siteIdField;
4979
4980 private bool siteIdFieldSet;
4981
4982 private YesNoType startOnInstallField;
4983
4984 private bool startOnInstallFieldSet;
4985
4986 private string webApplicationField;
4987
4988 private bool webApplicationFieldSet;
4989
4990 private string webLogField;
4991
4992 private bool webLogFieldSet;
4993
4994 private ISchemaElement parentElement;
4995
4996 public WebSite()
4997 {
4998 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
4999 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebAddress)));
5000 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication)));
5001 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties)));
5002 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MimeMap)));
5003 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CertificateRef)));
5004 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HttpHeader)));
5005 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDir)));
5006 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebError)));
5007 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebFilter)));
5008 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebVirtualDir)));
5009 this.children = childCollection0;
5010 }
5011
5012 public virtual IEnumerable Children
5013 {
5014 get
5015 {
5016 return this.children;
5017 }
5018 }
5019
5020 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
5021 public virtual IEnumerable this[System.Type childType]
5022 {
5023 get
5024 {
5025 return this.children.Filter(childType);
5026 }
5027 }
5028
5029 /// <summary>
5030 /// Identifier for the WebSite. Used within the MSI package only.
5031 /// </summary>
5032 public string Id
5033 {
5034 get
5035 {
5036 return this.idField;
5037 }
5038 set
5039 {
5040 this.idFieldSet = true;
5041 this.idField = value;
5042 }
5043 }
5044
5045 /// <summary>
5046 /// Specifies whether to automatically start the web site.
5047 /// </summary>
5048 public YesNoType AutoStart
5049 {
5050 get
5051 {
5052 return this.autoStartField;
5053 }
5054 set
5055 {
5056 this.autoStartFieldSet = true;
5057 this.autoStartField = value;
5058 }
5059 }
5060
5061 /// <summary>
5062 /// Specifies whether to configure the web site if it already exists. Note: This will not affect uninstall behavior. If the web site exists on uninstall, it will be removed.
5063 /// </summary>
5064 public YesNoType ConfigureIfExists
5065 {
5066 get
5067 {
5068 return this.configureIfExistsField;
5069 }
5070 set
5071 {
5072 this.configureIfExistsFieldSet = true;
5073 this.configureIfExistsField = value;
5074 }
5075 }
5076
5077 /// <summary>
5078 /// Sets the timeout value for connections in seconds.
5079 /// </summary>
5080 public long ConnectionTimeout
5081 {
5082 get
5083 {
5084 return this.connectionTimeoutField;
5085 }
5086 set
5087 {
5088 this.connectionTimeoutFieldSet = true;
5089 this.connectionTimeoutField = value;
5090 }
5091 }
5092
5093 /// <summary>
5094 /// This is the name of the web site that will show up in the IIS management console.
5095 /// </summary>
5096 public string Description
5097 {
5098 get
5099 {
5100 return this.descriptionField;
5101 }
5102 set
5103 {
5104 this.descriptionFieldSet = true;
5105 this.descriptionField = value;
5106 }
5107 }
5108
5109 /// <summary>
5110 /// Root directory of the web site. Resolved to a directory in the Directory table at install time by the server custom actions.
5111 /// </summary>
5112 public string Directory
5113 {
5114 get
5115 {
5116 return this.directoryField;
5117 }
5118 set
5119 {
5120 this.directoryFieldSet = true;
5121 this.directoryField = value;
5122 }
5123 }
5124
5125 /// <summary>
5126 /// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this website root directory.
5127 /// This attribute may not be specified if a WebDirProperties element is directly nested in this element.
5128 /// </summary>
5129 public string DirProperties
5130 {
5131 get
5132 {
5133 return this.dirPropertiesField;
5134 }
5135 set
5136 {
5137 this.dirPropertiesFieldSet = true;
5138 this.dirPropertiesField = value;
5139 }
5140 }
5141
5142 /// <summary>
5143 /// Sequence that the web site is to be created in.
5144 /// </summary>
5145 public int Sequence
5146 {
5147 get
5148 {
5149 return this.sequenceField;
5150 }
5151 set
5152 {
5153 this.sequenceFieldSet = true;
5154 this.sequenceField = value;
5155 }
5156 }
5157
5158 /// <summary>
5159 /// Optional attribute to directly specify the site id of the WebSite. Use this to ensure all web
5160 /// sites in a web garden get the same site id. If a number is provided, the site id must be unique
5161 /// on all target machines. If "*" is used, the Description attribute will be hashed to create a unique
5162 /// value for the site id. This value must be a positive number or a "*" or a formatted value that resolves
5163 /// to "-1" (for the same behavior as "*") or a positive number or blank. If this attribute is absent then
5164 /// the web site will be located using the WebAddress element associated with the web site.
5165 /// </summary>
5166 public string SiteId
5167 {
5168 get
5169 {
5170 return this.siteIdField;
5171 }
5172 set
5173 {
5174 this.siteIdFieldSet = true;
5175 this.siteIdField = value;
5176 }
5177 }
5178
5179 /// <summary>
5180 /// Specifies whether to start the web site on install.
5181 /// </summary>
5182 public YesNoType StartOnInstall
5183 {
5184 get
5185 {
5186 return this.startOnInstallField;
5187 }
5188 set
5189 {
5190 this.startOnInstallFieldSet = true;
5191 this.startOnInstallField = value;
5192 }
5193 }
5194
5195 /// <summary>
5196 /// Reference to a WebApplication that is to be installed as part of this web site.
5197 /// </summary>
5198 public string WebApplication
5199 {
5200 get
5201 {
5202 return this.webApplicationField;
5203 }
5204 set
5205 {
5206 this.webApplicationFieldSet = true;
5207 this.webApplicationField = value;
5208 }
5209 }
5210
5211 /// <summary>
5212 /// Reference to WebLog definition.
5213 /// </summary>
5214 public string WebLog
5215 {
5216 get
5217 {
5218 return this.webLogField;
5219 }
5220 set
5221 {
5222 this.webLogFieldSet = true;
5223 this.webLogField = value;
5224 }
5225 }
5226
5227 public virtual ISchemaElement ParentElement
5228 {
5229 get
5230 {
5231 return this.parentElement;
5232 }
5233 set
5234 {
5235 this.parentElement = value;
5236 }
5237 }
5238
5239 public virtual void AddChild(ISchemaElement child)
5240 {
5241 if ((null == child))
5242 {
5243 throw new ArgumentNullException("child");
5244 }
5245 this.children.AddElement(child);
5246 child.ParentElement = this;
5247 }
5248
5249 public virtual void RemoveChild(ISchemaElement child)
5250 {
5251 if ((null == child))
5252 {
5253 throw new ArgumentNullException("child");
5254 }
5255 this.children.RemoveElement(child);
5256 child.ParentElement = null;
5257 }
5258
5259 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5260 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5261 ISchemaElement ICreateChildren.CreateChild(string childName)
5262 {
5263 if (String.IsNullOrEmpty(childName))
5264 {
5265 throw new ArgumentNullException("childName");
5266 }
5267 ISchemaElement childValue = null;
5268 if (("WebAddress" == childName))
5269 {
5270 childValue = new WebAddress();
5271 }
5272 if (("WebApplication" == childName))
5273 {
5274 childValue = new WebApplication();
5275 }
5276 if (("WebDirProperties" == childName))
5277 {
5278 childValue = new WebDirProperties();
5279 }
5280 if (("MimeMap" == childName))
5281 {
5282 childValue = new MimeMap();
5283 }
5284 if (("CertificateRef" == childName))
5285 {
5286 childValue = new CertificateRef();
5287 }
5288 if (("HttpHeader" == childName))
5289 {
5290 childValue = new HttpHeader();
5291 }
5292 if (("WebDir" == childName))
5293 {
5294 childValue = new WebDir();
5295 }
5296 if (("WebError" == childName))
5297 {
5298 childValue = new WebError();
5299 }
5300 if (("WebFilter" == childName))
5301 {
5302 childValue = new WebFilter();
5303 }
5304 if (("WebVirtualDir" == childName))
5305 {
5306 childValue = new WebVirtualDir();
5307 }
5308 if ((null == childValue))
5309 {
5310 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
5311 }
5312 return childValue;
5313 }
5314
5315 /// <summary>
5316 /// Processes this element and all child elements into an XmlWriter.
5317 /// </summary>
5318 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5319 public virtual void OutputXml(XmlWriter writer)
5320 {
5321 if ((null == writer))
5322 {
5323 throw new ArgumentNullException("writer");
5324 }
5325 writer.WriteStartElement("WebSite", "http://wixtoolset.org/schemas/v4/wxs/iis");
5326 if (this.idFieldSet)
5327 {
5328 writer.WriteAttributeString("Id", this.idField);
5329 }
5330 if (this.autoStartFieldSet)
5331 {
5332 if ((this.autoStartField == YesNoType.no))
5333 {
5334 writer.WriteAttributeString("AutoStart", "no");
5335 }
5336 if ((this.autoStartField == YesNoType.yes))
5337 {
5338 writer.WriteAttributeString("AutoStart", "yes");
5339 }
5340 }
5341 if (this.configureIfExistsFieldSet)
5342 {
5343 if ((this.configureIfExistsField == YesNoType.no))
5344 {
5345 writer.WriteAttributeString("ConfigureIfExists", "no");
5346 }
5347 if ((this.configureIfExistsField == YesNoType.yes))
5348 {
5349 writer.WriteAttributeString("ConfigureIfExists", "yes");
5350 }
5351 }
5352 if (this.connectionTimeoutFieldSet)
5353 {
5354 writer.WriteAttributeString("ConnectionTimeout", this.connectionTimeoutField.ToString(CultureInfo.InvariantCulture));
5355 }
5356 if (this.descriptionFieldSet)
5357 {
5358 writer.WriteAttributeString("Description", this.descriptionField);
5359 }
5360 if (this.directoryFieldSet)
5361 {
5362 writer.WriteAttributeString("Directory", this.directoryField);
5363 }
5364 if (this.dirPropertiesFieldSet)
5365 {
5366 writer.WriteAttributeString("DirProperties", this.dirPropertiesField);
5367 }
5368 if (this.sequenceFieldSet)
5369 {
5370 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
5371 }
5372 if (this.siteIdFieldSet)
5373 {
5374 writer.WriteAttributeString("SiteId", this.siteIdField);
5375 }
5376 if (this.startOnInstallFieldSet)
5377 {
5378 if ((this.startOnInstallField == YesNoType.no))
5379 {
5380 writer.WriteAttributeString("StartOnInstall", "no");
5381 }
5382 if ((this.startOnInstallField == YesNoType.yes))
5383 {
5384 writer.WriteAttributeString("StartOnInstall", "yes");
5385 }
5386 }
5387 if (this.webApplicationFieldSet)
5388 {
5389 writer.WriteAttributeString("WebApplication", this.webApplicationField);
5390 }
5391 if (this.webLogFieldSet)
5392 {
5393 writer.WriteAttributeString("WebLog", this.webLogField);
5394 }
5395 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
5396 {
5397 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
5398 childElement.OutputXml(writer);
5399 }
5400 writer.WriteEndElement();
5401 }
5402
5403 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5404 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5405 void ISetAttributes.SetAttribute(string name, string value)
5406 {
5407 if (String.IsNullOrEmpty(name))
5408 {
5409 throw new ArgumentNullException("name");
5410 }
5411 if (("Id" == name))
5412 {
5413 this.idField = value;
5414 this.idFieldSet = true;
5415 }
5416 if (("AutoStart" == name))
5417 {
5418 this.autoStartField = Enums.ParseYesNoType(value);
5419 this.autoStartFieldSet = true;
5420 }
5421 if (("ConfigureIfExists" == name))
5422 {
5423 this.configureIfExistsField = Enums.ParseYesNoType(value);
5424 this.configureIfExistsFieldSet = true;
5425 }
5426 if (("ConnectionTimeout" == name))
5427 {
5428 this.connectionTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
5429 this.connectionTimeoutFieldSet = true;
5430 }
5431 if (("Description" == name))
5432 {
5433 this.descriptionField = value;
5434 this.descriptionFieldSet = true;
5435 }
5436 if (("Directory" == name))
5437 {
5438 this.directoryField = value;
5439 this.directoryFieldSet = true;
5440 }
5441 if (("DirProperties" == name))
5442 {
5443 this.dirPropertiesField = value;
5444 this.dirPropertiesFieldSet = true;
5445 }
5446 if (("Sequence" == name))
5447 {
5448 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
5449 this.sequenceFieldSet = true;
5450 }
5451 if (("SiteId" == name))
5452 {
5453 this.siteIdField = value;
5454 this.siteIdFieldSet = true;
5455 }
5456 if (("StartOnInstall" == name))
5457 {
5458 this.startOnInstallField = Enums.ParseYesNoType(value);
5459 this.startOnInstallFieldSet = true;
5460 }
5461 if (("WebApplication" == name))
5462 {
5463 this.webApplicationField = value;
5464 this.webApplicationFieldSet = true;
5465 }
5466 if (("WebLog" == name))
5467 {
5468 this.webLogField = value;
5469 this.webLogFieldSet = true;
5470 }
5471 }
5472 }
5473
5474 /// <summary>
5475 /// WebLog definition.
5476 /// </summary>
5477 [GeneratedCode("XsdGen", "4.0.0.0")]
5478 public class WebLog : ISchemaElement, ISetAttributes
5479 {
5480
5481 private string idField;
5482
5483 private bool idFieldSet;
5484
5485 private TypeType typeField;
5486
5487 private bool typeFieldSet;
5488
5489 private ISchemaElement parentElement;
5490
5491 /// <summary>
5492 /// Identifier for the WebLog.
5493 /// </summary>
5494 public string Id
5495 {
5496 get
5497 {
5498 return this.idField;
5499 }
5500 set
5501 {
5502 this.idFieldSet = true;
5503 this.idField = value;
5504 }
5505 }
5506
5507 public TypeType Type
5508 {
5509 get
5510 {
5511 return this.typeField;
5512 }
5513 set
5514 {
5515 this.typeFieldSet = true;
5516 this.typeField = value;
5517 }
5518 }
5519
5520 public virtual ISchemaElement ParentElement
5521 {
5522 get
5523 {
5524 return this.parentElement;
5525 }
5526 set
5527 {
5528 this.parentElement = value;
5529 }
5530 }
5531
5532 /// <summary>
5533 /// Parses a TypeType from a string.
5534 /// </summary>
5535 public static TypeType ParseTypeType(string value)
5536 {
5537 TypeType parsedValue;
5538 WebLog.TryParseTypeType(value, out parsedValue);
5539 return parsedValue;
5540 }
5541
5542 /// <summary>
5543 /// Tries to parse a TypeType from a string.
5544 /// </summary>
5545 public static bool TryParseTypeType(string value, out TypeType parsedValue)
5546 {
5547 parsedValue = TypeType.NotSet;
5548 if (string.IsNullOrEmpty(value))
5549 {
5550 return false;
5551 }
5552 if (("IIS" == value))
5553 {
5554 parsedValue = TypeType.IIS;
5555 }
5556 else
5557 {
5558 if (("NCSA" == value))
5559 {
5560 parsedValue = TypeType.NCSA;
5561 }
5562 else
5563 {
5564 if (("none" == value))
5565 {
5566 parsedValue = TypeType.none;
5567 }
5568 else
5569 {
5570 if (("ODBC" == value))
5571 {
5572 parsedValue = TypeType.ODBC;
5573 }
5574 else
5575 {
5576 if (("W3C" == value))
5577 {
5578 parsedValue = TypeType.W3C;
5579 }
5580 else
5581 {
5582 parsedValue = TypeType.IllegalValue;
5583 return false;
5584 }
5585 }
5586 }
5587 }
5588 }
5589 return true;
5590 }
5591
5592 /// <summary>
5593 /// Processes this element and all child elements into an XmlWriter.
5594 /// </summary>
5595 public virtual void OutputXml(XmlWriter writer)
5596 {
5597 if ((null == writer))
5598 {
5599 throw new ArgumentNullException("writer");
5600 }
5601 writer.WriteStartElement("WebLog", "http://wixtoolset.org/schemas/v4/wxs/iis");
5602 if (this.idFieldSet)
5603 {
5604 writer.WriteAttributeString("Id", this.idField);
5605 }
5606 if (this.typeFieldSet)
5607 {
5608 if ((this.typeField == TypeType.IIS))
5609 {
5610 writer.WriteAttributeString("Type", "IIS");
5611 }
5612 if ((this.typeField == TypeType.NCSA))
5613 {
5614 writer.WriteAttributeString("Type", "NCSA");
5615 }
5616 if ((this.typeField == TypeType.none))
5617 {
5618 writer.WriteAttributeString("Type", "none");
5619 }
5620 if ((this.typeField == TypeType.ODBC))
5621 {
5622 writer.WriteAttributeString("Type", "ODBC");
5623 }
5624 if ((this.typeField == TypeType.W3C))
5625 {
5626 writer.WriteAttributeString("Type", "W3C");
5627 }
5628 }
5629 writer.WriteEndElement();
5630 }
5631
5632 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5633 void ISetAttributes.SetAttribute(string name, string value)
5634 {
5635 if (String.IsNullOrEmpty(name))
5636 {
5637 throw new ArgumentNullException("name");
5638 }
5639 if (("Id" == name))
5640 {
5641 this.idField = value;
5642 this.idFieldSet = true;
5643 }
5644 if (("Type" == name))
5645 {
5646 this.typeField = WebLog.ParseTypeType(value);
5647 this.typeFieldSet = true;
5648 }
5649 }
5650
5651 [GeneratedCode("XsdGen", "4.0.0.0")]
5652 public enum TypeType
5653 {
5654
5655 IllegalValue = int.MaxValue,
5656
5657 NotSet = -1,
5658
5659 /// <summary>
5660 /// Microsoft IIS Log File Format
5661 /// </summary>
5662 IIS,
5663
5664 /// <summary>
5665 /// NCSA Common Log File Format
5666 /// </summary>
5667 NCSA,
5668
5669 /// <summary>
5670 /// Disables logging.
5671 /// </summary>
5672 none,
5673
5674 /// <summary>
5675 /// ODBC Logging
5676 /// </summary>
5677 ODBC,
5678
5679 /// <summary>
5680 /// W3C Extended Log File Format
5681 /// </summary>
5682 W3C,
5683 }
5684 }
5685
5686 /// <summary>
5687 /// The WebServiceExtension property is used by the Web server to determine whether a Web service extension is permitted to run.
5688 /// </summary>
5689 [GeneratedCode("XsdGen", "4.0.0.0")]
5690 public class WebServiceExtension : ISchemaElement, ISetAttributes
5691 {
5692
5693 private string idField;
5694
5695 private bool idFieldSet;
5696
5697 private string fileField;
5698
5699 private bool fileFieldSet;
5700
5701 private string descriptionField;
5702
5703 private bool descriptionFieldSet;
5704
5705 private string groupField;
5706
5707 private bool groupFieldSet;
5708
5709 private YesNoType allowField;
5710
5711 private bool allowFieldSet;
5712
5713 private YesNoType uIDeletableField;
5714
5715 private bool uIDeletableFieldSet;
5716
5717 private ISchemaElement parentElement;
5718
5719 public string Id
5720 {
5721 get
5722 {
5723 return this.idField;
5724 }
5725 set
5726 {
5727 this.idFieldSet = true;
5728 this.idField = value;
5729 }
5730 }
5731
5732 /// <summary>
5733 /// Usually a Property that resolves to short file name path
5734 /// </summary>
5735 public string File
5736 {
5737 get
5738 {
5739 return this.fileField;
5740 }
5741 set
5742 {
5743 this.fileFieldSet = true;
5744 this.fileField = value;
5745 }
5746 }
5747
5748 /// <summary>
5749 /// Description of the extension.
5750 /// </summary>
5751 public string Description
5752 {
5753 get
5754 {
5755 return this.descriptionField;
5756 }
5757 set
5758 {
5759 this.descriptionFieldSet = true;
5760 this.descriptionField = value;
5761 }
5762 }
5763
5764 /// <summary>
5765 /// String used to identify groups of extensions.
5766 /// </summary>
5767 public string Group
5768 {
5769 get
5770 {
5771 return this.groupField;
5772 }
5773 set
5774 {
5775 this.groupFieldSet = true;
5776 this.groupField = value;
5777 }
5778 }
5779
5780 /// <summary>
5781 /// Indicates if the extension is allowed or denied.
5782 /// </summary>
5783 public YesNoType Allow
5784 {
5785 get
5786 {
5787 return this.allowField;
5788 }
5789 set
5790 {
5791 this.allowFieldSet = true;
5792 this.allowField = value;
5793 }
5794 }
5795
5796 /// <summary>
5797 /// Indicates if the UI is allowed to delete the extension from the list of not. Default: Not deletable.
5798 /// </summary>
5799 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
5800 public YesNoType UIDeletable
5801 {
5802 get
5803 {
5804 return this.uIDeletableField;
5805 }
5806 set
5807 {
5808 this.uIDeletableFieldSet = true;
5809 this.uIDeletableField = value;
5810 }
5811 }
5812
5813 public virtual ISchemaElement ParentElement
5814 {
5815 get
5816 {
5817 return this.parentElement;
5818 }
5819 set
5820 {
5821 this.parentElement = value;
5822 }
5823 }
5824
5825 /// <summary>
5826 /// Processes this element and all child elements into an XmlWriter.
5827 /// </summary>
5828 public virtual void OutputXml(XmlWriter writer)
5829 {
5830 if ((null == writer))
5831 {
5832 throw new ArgumentNullException("writer");
5833 }
5834 writer.WriteStartElement("WebServiceExtension", "http://wixtoolset.org/schemas/v4/wxs/iis");
5835 if (this.idFieldSet)
5836 {
5837 writer.WriteAttributeString("Id", this.idField);
5838 }
5839 if (this.fileFieldSet)
5840 {
5841 writer.WriteAttributeString("File", this.fileField);
5842 }
5843 if (this.descriptionFieldSet)
5844 {
5845 writer.WriteAttributeString("Description", this.descriptionField);
5846 }
5847 if (this.groupFieldSet)
5848 {
5849 writer.WriteAttributeString("Group", this.groupField);
5850 }
5851 if (this.allowFieldSet)
5852 {
5853 if ((this.allowField == YesNoType.no))
5854 {
5855 writer.WriteAttributeString("Allow", "no");
5856 }
5857 if ((this.allowField == YesNoType.yes))
5858 {
5859 writer.WriteAttributeString("Allow", "yes");
5860 }
5861 }
5862 if (this.uIDeletableFieldSet)
5863 {
5864 if ((this.uIDeletableField == YesNoType.no))
5865 {
5866 writer.WriteAttributeString("UIDeletable", "no");
5867 }
5868 if ((this.uIDeletableField == YesNoType.yes))
5869 {
5870 writer.WriteAttributeString("UIDeletable", "yes");
5871 }
5872 }
5873 writer.WriteEndElement();
5874 }
5875
5876 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5877 void ISetAttributes.SetAttribute(string name, string value)
5878 {
5879 if (String.IsNullOrEmpty(name))
5880 {
5881 throw new ArgumentNullException("name");
5882 }
5883 if (("Id" == name))
5884 {
5885 this.idField = value;
5886 this.idFieldSet = true;
5887 }
5888 if (("File" == name))
5889 {
5890 this.fileField = value;
5891 this.fileFieldSet = true;
5892 }
5893 if (("Description" == name))
5894 {
5895 this.descriptionField = value;
5896 this.descriptionFieldSet = true;
5897 }
5898 if (("Group" == name))
5899 {
5900 this.groupField = value;
5901 this.groupFieldSet = true;
5902 }
5903 if (("Allow" == name))
5904 {
5905 this.allowField = Enums.ParseYesNoType(value);
5906 this.allowFieldSet = true;
5907 }
5908 if (("UIDeletable" == name))
5909 {
5910 this.uIDeletableField = Enums.ParseYesNoType(value);
5911 this.uIDeletableFieldSet = true;
5912 }
5913 }
5914 }
5915}
diff --git a/src/wix/heat/Serialize/util.cs b/src/wix/heat/Serialize/util.cs
new file mode 100644
index 00000000..84f56eb0
--- /dev/null
+++ b/src/wix/heat/Serialize/util.cs
@@ -0,0 +1,11462 @@
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#pragma warning disable 1591
12namespace WixToolset.Harvesters.Serialize.Util
13{
14 using System;
15 using System.CodeDom.Compiler;
16 using System.Collections;
17 using System.Diagnostics.CodeAnalysis;
18 using System.Globalization;
19 using System.Xml;
20 using WixToolset.Harvesters.Serialize;
21
22
23 /// <summary>
24 /// Values of this type will either be "yes" or "no".
25 /// </summary>
26 [GeneratedCode("XsdGen", "4.0.0.0")]
27 public enum YesNoType
28 {
29
30 IllegalValue = int.MaxValue,
31
32 NotSet = -1,
33
34 no,
35
36 yes,
37 }
38
39 [GeneratedCode("XsdGen", "4.0.0.0")]
40 public class Enums
41 {
42
43 /// <summary>
44 /// Parses a YesNoType from a string.
45 /// </summary>
46 public static YesNoType ParseYesNoType(string value)
47 {
48 YesNoType parsedValue;
49 Enums.TryParseYesNoType(value, out parsedValue);
50 return parsedValue;
51 }
52
53 /// <summary>
54 /// Tries to parse a YesNoType from a string.
55 /// </summary>
56 public static bool TryParseYesNoType(string value, out YesNoType parsedValue)
57 {
58 parsedValue = YesNoType.NotSet;
59 if (string.IsNullOrEmpty(value))
60 {
61 return false;
62 }
63 if (("no" == value))
64 {
65 parsedValue = YesNoType.no;
66 }
67 else
68 {
69 if (("yes" == value))
70 {
71 parsedValue = YesNoType.yes;
72 }
73 else
74 {
75 parsedValue = YesNoType.IllegalValue;
76 return false;
77 }
78 }
79 return true;
80 }
81
82 /// <summary>
83 /// Parses a PerformanceCounterLanguageType from a string.
84 /// </summary>
85 public static PerformanceCounterLanguageType ParsePerformanceCounterLanguageType(string value)
86 {
87 PerformanceCounterLanguageType parsedValue;
88 Enums.TryParsePerformanceCounterLanguageType(value, out parsedValue);
89 return parsedValue;
90 }
91
92 /// <summary>
93 /// Tries to parse a PerformanceCounterLanguageType from a string.
94 /// </summary>
95 public static bool TryParsePerformanceCounterLanguageType(string value, out PerformanceCounterLanguageType parsedValue)
96 {
97 parsedValue = PerformanceCounterLanguageType.NotSet;
98 if (string.IsNullOrEmpty(value))
99 {
100 return false;
101 }
102 if (("afrikaans" == value))
103 {
104 parsedValue = PerformanceCounterLanguageType.afrikaans;
105 }
106 else
107 {
108 if (("albanian" == value))
109 {
110 parsedValue = PerformanceCounterLanguageType.albanian;
111 }
112 else
113 {
114 if (("arabic" == value))
115 {
116 parsedValue = PerformanceCounterLanguageType.arabic;
117 }
118 else
119 {
120 if (("armenian" == value))
121 {
122 parsedValue = PerformanceCounterLanguageType.armenian;
123 }
124 else
125 {
126 if (("assamese" == value))
127 {
128 parsedValue = PerformanceCounterLanguageType.assamese;
129 }
130 else
131 {
132 if (("azeri" == value))
133 {
134 parsedValue = PerformanceCounterLanguageType.azeri;
135 }
136 else
137 {
138 if (("basque" == value))
139 {
140 parsedValue = PerformanceCounterLanguageType.basque;
141 }
142 else
143 {
144 if (("belarusian" == value))
145 {
146 parsedValue = PerformanceCounterLanguageType.belarusian;
147 }
148 else
149 {
150 if (("bengali" == value))
151 {
152 parsedValue = PerformanceCounterLanguageType.bengali;
153 }
154 else
155 {
156 if (("bulgarian" == value))
157 {
158 parsedValue = PerformanceCounterLanguageType.bulgarian;
159 }
160 else
161 {
162 if (("catalan" == value))
163 {
164 parsedValue = PerformanceCounterLanguageType.catalan;
165 }
166 else
167 {
168 if (("chinese" == value))
169 {
170 parsedValue = PerformanceCounterLanguageType.chinese;
171 }
172 else
173 {
174 if (("croatian" == value))
175 {
176 parsedValue = PerformanceCounterLanguageType.croatian;
177 }
178 else
179 {
180 if (("czech" == value))
181 {
182 parsedValue = PerformanceCounterLanguageType.czech;
183 }
184 else
185 {
186 if (("danish" == value))
187 {
188 parsedValue = PerformanceCounterLanguageType.danish;
189 }
190 else
191 {
192 if (("divehi" == value))
193 {
194 parsedValue = PerformanceCounterLanguageType.divehi;
195 }
196 else
197 {
198 if (("dutch" == value))
199 {
200 parsedValue = PerformanceCounterLanguageType.dutch;
201 }
202 else
203 {
204 if (("english" == value))
205 {
206 parsedValue = PerformanceCounterLanguageType.english;
207 }
208 else
209 {
210 if (("estonian" == value))
211 {
212 parsedValue = PerformanceCounterLanguageType.estonian;
213 }
214 else
215 {
216 if (("faeroese" == value))
217 {
218 parsedValue = PerformanceCounterLanguageType.faeroese;
219 }
220 else
221 {
222 if (("farsi" == value))
223 {
224 parsedValue = PerformanceCounterLanguageType.farsi;
225 }
226 else
227 {
228 if (("finnish" == value))
229 {
230 parsedValue = PerformanceCounterLanguageType.finnish;
231 }
232 else
233 {
234 if (("french" == value))
235 {
236 parsedValue = PerformanceCounterLanguageType.french;
237 }
238 else
239 {
240 if (("galician" == value))
241 {
242 parsedValue = PerformanceCounterLanguageType.galician;
243 }
244 else
245 {
246 if (("georgian" == value))
247 {
248 parsedValue = PerformanceCounterLanguageType.georgian;
249 }
250 else
251 {
252 if (("german" == value))
253 {
254 parsedValue = PerformanceCounterLanguageType.german;
255 }
256 else
257 {
258 if (("greek" == value))
259 {
260 parsedValue = PerformanceCounterLanguageType.greek;
261 }
262 else
263 {
264 if (("gujarati" == value))
265 {
266 parsedValue = PerformanceCounterLanguageType.gujarati;
267 }
268 else
269 {
270 if (("hebrew" == value))
271 {
272 parsedValue = PerformanceCounterLanguageType.hebrew;
273 }
274 else
275 {
276 if (("hindi" == value))
277 {
278 parsedValue = PerformanceCounterLanguageType.hindi;
279 }
280 else
281 {
282 if (("hungarian" == value))
283 {
284 parsedValue = PerformanceCounterLanguageType.hungarian;
285 }
286 else
287 {
288 if (("icelandic" == value))
289 {
290 parsedValue = PerformanceCounterLanguageType.icelandic;
291 }
292 else
293 {
294 if (("indonesian" == value))
295 {
296 parsedValue = PerformanceCounterLanguageType.indonesian;
297 }
298 else
299 {
300 if (("italian" == value))
301 {
302 parsedValue = PerformanceCounterLanguageType.italian;
303 }
304 else
305 {
306 if (("japanese" == value))
307 {
308 parsedValue = PerformanceCounterLanguageType.japanese;
309 }
310 else
311 {
312 if (("kannada" == value))
313 {
314 parsedValue = PerformanceCounterLanguageType.kannada;
315 }
316 else
317 {
318 if (("kashmiri" == value))
319 {
320 parsedValue = PerformanceCounterLanguageType.kashmiri;
321 }
322 else
323 {
324 if (("kazak" == value))
325 {
326 parsedValue = PerformanceCounterLanguageType.kazak;
327 }
328 else
329 {
330 if (("konkani" == value))
331 {
332 parsedValue = PerformanceCounterLanguageType.konkani;
333 }
334 else
335 {
336 if (("korean" == value))
337 {
338 parsedValue = PerformanceCounterLanguageType.korean;
339 }
340 else
341 {
342 if (("kyrgyz" == value))
343 {
344 parsedValue = PerformanceCounterLanguageType.kyrgyz;
345 }
346 else
347 {
348 if (("latvian" == value))
349 {
350 parsedValue = PerformanceCounterLanguageType.latvian;
351 }
352 else
353 {
354 if (("lithuanian" == value))
355 {
356 parsedValue = PerformanceCounterLanguageType.lithuanian;
357 }
358 else
359 {
360 if (("macedonian" == value))
361 {
362 parsedValue = PerformanceCounterLanguageType.macedonian;
363 }
364 else
365 {
366 if (("malay" == value))
367 {
368 parsedValue = PerformanceCounterLanguageType.malay;
369 }
370 else
371 {
372 if (("malayalam" == value))
373 {
374 parsedValue = PerformanceCounterLanguageType.malayalam;
375 }
376 else
377 {
378 if (("manipuri" == value))
379 {
380 parsedValue = PerformanceCounterLanguageType.manipuri;
381 }
382 else
383 {
384 if (("marathi" == value))
385 {
386 parsedValue = PerformanceCounterLanguageType.marathi;
387 }
388 else
389 {
390 if (("mongolian" == value))
391 {
392 parsedValue = PerformanceCounterLanguageType.mongolian;
393 }
394 else
395 {
396 if (("nepali" == value))
397 {
398 parsedValue = PerformanceCounterLanguageType.nepali;
399 }
400 else
401 {
402 if (("norwegian" == value))
403 {
404 parsedValue = PerformanceCounterLanguageType.norwegian;
405 }
406 else
407 {
408 if (("oriya" == value))
409 {
410 parsedValue = PerformanceCounterLanguageType.oriya;
411 }
412 else
413 {
414 if (("polish" == value))
415 {
416 parsedValue = PerformanceCounterLanguageType.polish;
417 }
418 else
419 {
420 if (("portuguese" == value))
421 {
422 parsedValue = PerformanceCounterLanguageType.portuguese;
423 }
424 else
425 {
426 if (("punjabi" == value))
427 {
428 parsedValue = PerformanceCounterLanguageType.punjabi;
429 }
430 else
431 {
432 if (("romanian" == value))
433 {
434 parsedValue = PerformanceCounterLanguageType.romanian;
435 }
436 else
437 {
438 if (("russian" == value))
439 {
440 parsedValue = PerformanceCounterLanguageType.russian;
441 }
442 else
443 {
444 if (("sanskrit" == value))
445 {
446 parsedValue = PerformanceCounterLanguageType.sanskrit;
447 }
448 else
449 {
450 if (("serbian" == value))
451 {
452 parsedValue = PerformanceCounterLanguageType.serbian;
453 }
454 else
455 {
456 if (("sindhi" == value))
457 {
458 parsedValue = PerformanceCounterLanguageType.sindhi;
459 }
460 else
461 {
462 if (("slovak" == value))
463 {
464 parsedValue = PerformanceCounterLanguageType.slovak;
465 }
466 else
467 {
468 if (("slovenian" == value))
469 {
470 parsedValue = PerformanceCounterLanguageType.slovenian;
471 }
472 else
473 {
474 if (("spanish" == value))
475 {
476 parsedValue = PerformanceCounterLanguageType.spanish;
477 }
478 else
479 {
480 if (("swahili" == value))
481 {
482 parsedValue = PerformanceCounterLanguageType.swahili;
483 }
484 else
485 {
486 if (("swedish" == value))
487 {
488 parsedValue = PerformanceCounterLanguageType.swedish;
489 }
490 else
491 {
492 if (("syriac" == value))
493 {
494 parsedValue = PerformanceCounterLanguageType.syriac;
495 }
496 else
497 {
498 if (("tamil" == value))
499 {
500 parsedValue = PerformanceCounterLanguageType.tamil;
501 }
502 else
503 {
504 if (("tatar" == value))
505 {
506 parsedValue = PerformanceCounterLanguageType.tatar;
507 }
508 else
509 {
510 if (("telugu" == value))
511 {
512 parsedValue = PerformanceCounterLanguageType.telugu;
513 }
514 else
515 {
516 if (("thai" == value))
517 {
518 parsedValue = PerformanceCounterLanguageType.thai;
519 }
520 else
521 {
522 if (("turkish" == value))
523 {
524 parsedValue = PerformanceCounterLanguageType.turkish;
525 }
526 else
527 {
528 if (("ukrainian" == value))
529 {
530 parsedValue = PerformanceCounterLanguageType.ukrainian;
531 }
532 else
533 {
534 if (("urdu" == value))
535 {
536 parsedValue = PerformanceCounterLanguageType.urdu;
537 }
538 else
539 {
540 if (("uzbek" == value))
541 {
542 parsedValue = PerformanceCounterLanguageType.uzbek;
543 }
544 else
545 {
546 if (("vietnamese" == value))
547 {
548 parsedValue = PerformanceCounterLanguageType.vietnamese;
549 }
550 else
551 {
552 parsedValue = PerformanceCounterLanguageType.IllegalValue;
553 return false;
554 }
555 }
556 }
557 }
558 }
559 }
560 }
561 }
562 }
563 }
564 }
565 }
566 }
567 }
568 }
569 }
570 }
571 }
572 }
573 }
574 }
575 }
576 }
577 }
578 }
579 }
580 }
581 }
582 }
583 }
584 }
585 }
586 }
587 }
588 }
589 }
590 }
591 }
592 }
593 }
594 }
595 }
596 }
597 }
598 }
599 }
600 }
601 }
602 }
603 }
604 }
605 }
606 }
607 }
608 }
609 }
610 }
611 }
612 }
613 }
614 }
615 }
616 }
617 }
618 }
619 }
620 }
621 }
622 }
623 }
624 }
625 }
626 }
627 }
628 }
629 return true;
630 }
631
632 /// <summary>
633 /// Parses a PerformanceCounterTypesType from a string.
634 /// </summary>
635 public static PerformanceCounterTypesType ParsePerformanceCounterTypesType(string value)
636 {
637 PerformanceCounterTypesType parsedValue;
638 Enums.TryParsePerformanceCounterTypesType(value, out parsedValue);
639 return parsedValue;
640 }
641
642 /// <summary>
643 /// Tries to parse a PerformanceCounterTypesType from a string.
644 /// </summary>
645 public static bool TryParsePerformanceCounterTypesType(string value, out PerformanceCounterTypesType parsedValue)
646 {
647 parsedValue = PerformanceCounterTypesType.NotSet;
648 if (string.IsNullOrEmpty(value))
649 {
650 return false;
651 }
652 if (("averageBase" == value))
653 {
654 parsedValue = PerformanceCounterTypesType.averageBase;
655 }
656 else
657 {
658 if (("averageCount64" == value))
659 {
660 parsedValue = PerformanceCounterTypesType.averageCount64;
661 }
662 else
663 {
664 if (("averageTimer32" == value))
665 {
666 parsedValue = PerformanceCounterTypesType.averageTimer32;
667 }
668 else
669 {
670 if (("counterDelta32" == value))
671 {
672 parsedValue = PerformanceCounterTypesType.counterDelta32;
673 }
674 else
675 {
676 if (("counterTimerInverse" == value))
677 {
678 parsedValue = PerformanceCounterTypesType.counterTimerInverse;
679 }
680 else
681 {
682 if (("sampleFraction" == value))
683 {
684 parsedValue = PerformanceCounterTypesType.sampleFraction;
685 }
686 else
687 {
688 if (("timer100Ns" == value))
689 {
690 parsedValue = PerformanceCounterTypesType.timer100Ns;
691 }
692 else
693 {
694 if (("counterTimer" == value))
695 {
696 parsedValue = PerformanceCounterTypesType.counterTimer;
697 }
698 else
699 {
700 if (("rawFraction" == value))
701 {
702 parsedValue = PerformanceCounterTypesType.rawFraction;
703 }
704 else
705 {
706 if (("timer100NsInverse" == value))
707 {
708 parsedValue = PerformanceCounterTypesType.timer100NsInverse;
709 }
710 else
711 {
712 if (("counterMultiTimer" == value))
713 {
714 parsedValue = PerformanceCounterTypesType.counterMultiTimer;
715 }
716 else
717 {
718 if (("counterMultiTimer100Ns" == value))
719 {
720 parsedValue = PerformanceCounterTypesType.counterMultiTimer100Ns;
721 }
722 else
723 {
724 if (("counterMultiTimerInverse" == value))
725 {
726 parsedValue = PerformanceCounterTypesType.counterMultiTimerInverse;
727 }
728 else
729 {
730 if (("counterMultiTimer100NsInverse" == value))
731 {
732 parsedValue = PerformanceCounterTypesType.counterMultiTimer100NsInverse;
733 }
734 else
735 {
736 if (("elapsedTime" == value))
737 {
738 parsedValue = PerformanceCounterTypesType.elapsedTime;
739 }
740 else
741 {
742 if (("sampleBase" == value))
743 {
744 parsedValue = PerformanceCounterTypesType.sampleBase;
745 }
746 else
747 {
748 if (("rawBase" == value))
749 {
750 parsedValue = PerformanceCounterTypesType.rawBase;
751 }
752 else
753 {
754 if (("counterMultiBase" == value))
755 {
756 parsedValue = PerformanceCounterTypesType.counterMultiBase;
757 }
758 else
759 {
760 if (("rateOfCountsPerSecond64" == value))
761 {
762 parsedValue = PerformanceCounterTypesType.rateOfCountsPerSecond64;
763 }
764 else
765 {
766 if (("rateOfCountsPerSecond32" == value))
767 {
768 parsedValue = PerformanceCounterTypesType.rateOfCountsPerSecond32;
769 }
770 else
771 {
772 if (("countPerTimeInterval64" == value))
773 {
774 parsedValue = PerformanceCounterTypesType.countPerTimeInterval64;
775 }
776 else
777 {
778 if (("countPerTimeInterval32" == value))
779 {
780 parsedValue = PerformanceCounterTypesType.countPerTimeInterval32;
781 }
782 else
783 {
784 if (("sampleCounter" == value))
785 {
786 parsedValue = PerformanceCounterTypesType.sampleCounter;
787 }
788 else
789 {
790 if (("counterDelta64" == value))
791 {
792 parsedValue = PerformanceCounterTypesType.counterDelta64;
793 }
794 else
795 {
796 if (("numberOfItems64" == value))
797 {
798 parsedValue = PerformanceCounterTypesType.numberOfItems64;
799 }
800 else
801 {
802 if (("numberOfItems32" == value))
803 {
804 parsedValue = PerformanceCounterTypesType.numberOfItems32;
805 }
806 else
807 {
808 if (("numberOfItemsHEX64" == value))
809 {
810 parsedValue = PerformanceCounterTypesType.numberOfItemsHEX64;
811 }
812 else
813 {
814 if (("numberOfItemsHEX32" == value))
815 {
816 parsedValue = PerformanceCounterTypesType.numberOfItemsHEX32;
817 }
818 else
819 {
820 parsedValue = PerformanceCounterTypesType.IllegalValue;
821 return false;
822 }
823 }
824 }
825 }
826 }
827 }
828 }
829 }
830 }
831 }
832 }
833 }
834 }
835 }
836 }
837 }
838 }
839 }
840 }
841 }
842 }
843 }
844 }
845 }
846 }
847 }
848 }
849 }
850 return true;
851 }
852 }
853
854 /// <summary>
855 /// Enumeration of valid languages for performance counters.
856 /// </summary>
857 [GeneratedCode("XsdGen", "4.0.0.0")]
858 public enum PerformanceCounterLanguageType
859 {
860
861 IllegalValue = int.MaxValue,
862
863 NotSet = -1,
864
865 afrikaans,
866
867 albanian,
868
869 arabic,
870
871 armenian,
872
873 assamese,
874
875 azeri,
876
877 basque,
878
879 belarusian,
880
881 bengali,
882
883 bulgarian,
884
885 catalan,
886
887 chinese,
888
889 croatian,
890
891 czech,
892
893 danish,
894
895 divehi,
896
897 dutch,
898
899 english,
900
901 estonian,
902
903 faeroese,
904
905 farsi,
906
907 finnish,
908
909 french,
910
911 galician,
912
913 georgian,
914
915 german,
916
917 greek,
918
919 gujarati,
920
921 hebrew,
922
923 hindi,
924
925 hungarian,
926
927 icelandic,
928
929 indonesian,
930
931 italian,
932
933 japanese,
934
935 kannada,
936
937 kashmiri,
938
939 kazak,
940
941 konkani,
942
943 korean,
944
945 kyrgyz,
946
947 latvian,
948
949 lithuanian,
950
951 macedonian,
952
953 malay,
954
955 malayalam,
956
957 manipuri,
958
959 marathi,
960
961 mongolian,
962
963 nepali,
964
965 norwegian,
966
967 oriya,
968
969 polish,
970
971 portuguese,
972
973 punjabi,
974
975 romanian,
976
977 russian,
978
979 sanskrit,
980
981 serbian,
982
983 sindhi,
984
985 slovak,
986
987 slovenian,
988
989 spanish,
990
991 swahili,
992
993 swedish,
994
995 syriac,
996
997 tamil,
998
999 tatar,
1000
1001 telugu,
1002
1003 thai,
1004
1005 turkish,
1006
1007 ukrainian,
1008
1009 urdu,
1010
1011 uzbek,
1012
1013 vietnamese,
1014 }
1015
1016 /// <summary>
1017 /// Enumeration of valid types for performance counters.
1018 /// </summary>
1019 [GeneratedCode("XsdGen", "4.0.0.0")]
1020 public enum PerformanceCounterTypesType
1021 {
1022
1023 IllegalValue = int.MaxValue,
1024
1025 NotSet = -1,
1026
1027 averageBase,
1028
1029 averageCount64,
1030
1031 averageTimer32,
1032
1033 counterDelta32,
1034
1035 counterTimerInverse,
1036
1037 sampleFraction,
1038
1039 timer100Ns,
1040
1041 counterTimer,
1042
1043 rawFraction,
1044
1045 timer100NsInverse,
1046
1047 counterMultiTimer,
1048
1049 counterMultiTimer100Ns,
1050
1051 counterMultiTimerInverse,
1052
1053 counterMultiTimer100NsInverse,
1054
1055 elapsedTime,
1056
1057 sampleBase,
1058
1059 rawBase,
1060
1061 counterMultiBase,
1062
1063 rateOfCountsPerSecond64,
1064
1065 rateOfCountsPerSecond32,
1066
1067 countPerTimeInterval64,
1068
1069 countPerTimeInterval32,
1070
1071 sampleCounter,
1072
1073 counterDelta64,
1074
1075 numberOfItems64,
1076
1077 numberOfItems32,
1078
1079 numberOfItemsHEX64,
1080
1081 numberOfItemsHEX32,
1082 }
1083
1084 /// <summary>
1085 /// Closes applications or schedules a reboot if application cannot be closed.
1086 /// </summary>
1087 [GeneratedCode("XsdGen", "4.0.0.0")]
1088 public class CloseApplication : ISchemaElement, ISetAttributes
1089 {
1090
1091 private string idField;
1092
1093 private bool idFieldSet;
1094
1095 private string targetField;
1096
1097 private bool targetFieldSet;
1098
1099 private string descriptionField;
1100
1101 private bool descriptionFieldSet;
1102
1103 private int sequenceField;
1104
1105 private bool sequenceFieldSet;
1106
1107 private YesNoType closeMessageField;
1108
1109 private bool closeMessageFieldSet;
1110
1111 private YesNoType endSessionMessageField;
1112
1113 private bool endSessionMessageFieldSet;
1114
1115 private YesNoType elevatedCloseMessageField;
1116
1117 private bool elevatedCloseMessageFieldSet;
1118
1119 private YesNoType elevatedEndSessionMessageField;
1120
1121 private bool elevatedEndSessionMessageFieldSet;
1122
1123 private YesNoType rebootPromptField;
1124
1125 private bool rebootPromptFieldSet;
1126
1127 private YesNoType promptToContinueField;
1128
1129 private bool promptToContinueFieldSet;
1130
1131 private string propertyField;
1132
1133 private bool propertyFieldSet;
1134
1135 private int terminateProcessField;
1136
1137 private bool terminateProcessFieldSet;
1138
1139 private int timeoutField;
1140
1141 private bool timeoutFieldSet;
1142
1143 private string contentField;
1144
1145 private bool contentFieldSet;
1146
1147 private ISchemaElement parentElement;
1148
1149 /// <summary>
1150 /// Identifier for the close application (primary key). If the Id is not specified, one will be generated.
1151 /// </summary>
1152 public string Id
1153 {
1154 get
1155 {
1156 return this.idField;
1157 }
1158 set
1159 {
1160 this.idFieldSet = true;
1161 this.idField = value;
1162 }
1163 }
1164
1165 /// <summary>
1166 /// Name of the exectuable to be closed. This should only be the file name.
1167 /// </summary>
1168 public string Target
1169 {
1170 get
1171 {
1172 return this.targetField;
1173 }
1174 set
1175 {
1176 this.targetFieldSet = true;
1177 this.targetField = value;
1178 }
1179 }
1180
1181 /// <summary>
1182 /// Description to show if application is running and needs to be closed.
1183 /// </summary>
1184 public string Description
1185 {
1186 get
1187 {
1188 return this.descriptionField;
1189 }
1190 set
1191 {
1192 this.descriptionFieldSet = true;
1193 this.descriptionField = value;
1194 }
1195 }
1196
1197 /// <summary>
1198 /// Optionally orders the applications to be closed.
1199 /// </summary>
1200 public int Sequence
1201 {
1202 get
1203 {
1204 return this.sequenceField;
1205 }
1206 set
1207 {
1208 this.sequenceFieldSet = true;
1209 this.sequenceField = value;
1210 }
1211 }
1212
1213 /// <summary>
1214 /// Optionally sends a close message to the application. Default is no.
1215 /// </summary>
1216 public YesNoType CloseMessage
1217 {
1218 get
1219 {
1220 return this.closeMessageField;
1221 }
1222 set
1223 {
1224 this.closeMessageFieldSet = true;
1225 this.closeMessageField = value;
1226 }
1227 }
1228
1229 /// <summary>
1230 /// Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application. Default is "no".
1231 /// </summary>
1232 public YesNoType EndSessionMessage
1233 {
1234 get
1235 {
1236 return this.endSessionMessageField;
1237 }
1238 set
1239 {
1240 this.endSessionMessageFieldSet = true;
1241 this.endSessionMessageField = value;
1242 }
1243 }
1244
1245 /// <summary>
1246 /// Optionally sends a close message to the application from deffered action without impersonation. Default is no.
1247 /// </summary>
1248 public YesNoType ElevatedCloseMessage
1249 {
1250 get
1251 {
1252 return this.elevatedCloseMessageField;
1253 }
1254 set
1255 {
1256 this.elevatedCloseMessageFieldSet = true;
1257 this.elevatedCloseMessageField = value;
1258 }
1259 }
1260
1261 /// <summary>
1262 /// Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application from a deffered action without impersonation. Default is "no".
1263 /// </summary>
1264 public YesNoType ElevatedEndSessionMessage
1265 {
1266 get
1267 {
1268 return this.elevatedEndSessionMessageField;
1269 }
1270 set
1271 {
1272 this.elevatedEndSessionMessageFieldSet = true;
1273 this.elevatedEndSessionMessageField = value;
1274 }
1275 }
1276
1277 /// <summary>
1278 /// Optionally prompts for reboot if application is still running. The default is "yes". The TerminateProcess attribute must be "no" or not specified if this attribute is "yes".
1279 /// </summary>
1280 public YesNoType RebootPrompt
1281 {
1282 get
1283 {
1284 return this.rebootPromptField;
1285 }
1286 set
1287 {
1288 this.rebootPromptFieldSet = true;
1289 this.rebootPromptField = value;
1290 }
1291 }
1292
1293 /// <summary>
1294 /// When this attribute is set to "yes", the user will be prompted when the application is still running. The Description attribute must contain the message to
1295 /// display in the prompt. The prompt occurs before executing any of the other options and gives the options to "Abort", "Retry", or "Ignore". Abort will cancel
1296 /// the install. Retry will attempt the check again and if the application is still running, prompt again. "Ignore" will continue and execute any other options
1297 /// set on the CloseApplication element. The default is "no".
1298 /// </summary>
1299 public YesNoType PromptToContinue
1300 {
1301 get
1302 {
1303 return this.promptToContinueField;
1304 }
1305 set
1306 {
1307 this.promptToContinueFieldSet = true;
1308 this.promptToContinueField = value;
1309 }
1310 }
1311
1312 /// <summary>
1313 /// Property to be set if application is still running. Useful for launch conditions or to conditionalize custom UI to ask user to shut down apps.
1314 /// </summary>
1315 public string Property
1316 {
1317 get
1318 {
1319 return this.propertyField;
1320 }
1321 set
1322 {
1323 this.propertyFieldSet = true;
1324 this.propertyField = value;
1325 }
1326 }
1327
1328 /// <summary>
1329 /// Attempts to terminates process and return the specified exit code if application is still running after sending any requested close and/or end session messages.
1330 /// If this attribute is specified, the RebootPrompt attribute must be "no". The default is "no".
1331 /// </summary>
1332 public int TerminateProcess
1333 {
1334 get
1335 {
1336 return this.terminateProcessField;
1337 }
1338 set
1339 {
1340 this.terminateProcessFieldSet = true;
1341 this.terminateProcessField = value;
1342 }
1343 }
1344
1345 /// <summary>
1346 /// Optional time in seconds to wait for the application to exit after the close and/or end session messages. If the application is still running after the timeout then
1347 /// the RebootPrompt or TerminateProcess attributes will be considered. The default value is "5" seconds.
1348 /// </summary>
1349 public int Timeout
1350 {
1351 get
1352 {
1353 return this.timeoutField;
1354 }
1355 set
1356 {
1357 this.timeoutFieldSet = true;
1358 this.timeoutField = value;
1359 }
1360 }
1361
1362 /// <summary>
1363 /// Condition that determines if the application should be closed. Must be blank or evaluate to true
1364 /// for the application to be scheduled for closing.
1365 /// </summary>
1366 public string Content
1367 {
1368 get
1369 {
1370 return this.contentField;
1371 }
1372 set
1373 {
1374 this.contentFieldSet = true;
1375 this.contentField = value;
1376 }
1377 }
1378
1379 public virtual ISchemaElement ParentElement
1380 {
1381 get
1382 {
1383 return this.parentElement;
1384 }
1385 set
1386 {
1387 this.parentElement = value;
1388 }
1389 }
1390
1391 /// <summary>
1392 /// Processes this element and all child elements into an XmlWriter.
1393 /// </summary>
1394 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
1395 public virtual void OutputXml(XmlWriter writer)
1396 {
1397 if ((null == writer))
1398 {
1399 throw new ArgumentNullException("writer");
1400 }
1401 writer.WriteStartElement("CloseApplication", "http://wixtoolset.org/schemas/v4/wxs/util");
1402 if (this.idFieldSet)
1403 {
1404 writer.WriteAttributeString("Id", this.idField);
1405 }
1406 if (this.targetFieldSet)
1407 {
1408 writer.WriteAttributeString("Target", this.targetField);
1409 }
1410 if (this.descriptionFieldSet)
1411 {
1412 writer.WriteAttributeString("Description", this.descriptionField);
1413 }
1414 if (this.sequenceFieldSet)
1415 {
1416 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
1417 }
1418 if (this.closeMessageFieldSet)
1419 {
1420 if ((this.closeMessageField == YesNoType.no))
1421 {
1422 writer.WriteAttributeString("CloseMessage", "no");
1423 }
1424 if ((this.closeMessageField == YesNoType.yes))
1425 {
1426 writer.WriteAttributeString("CloseMessage", "yes");
1427 }
1428 }
1429 if (this.endSessionMessageFieldSet)
1430 {
1431 if ((this.endSessionMessageField == YesNoType.no))
1432 {
1433 writer.WriteAttributeString("EndSessionMessage", "no");
1434 }
1435 if ((this.endSessionMessageField == YesNoType.yes))
1436 {
1437 writer.WriteAttributeString("EndSessionMessage", "yes");
1438 }
1439 }
1440 if (this.elevatedCloseMessageFieldSet)
1441 {
1442 if ((this.elevatedCloseMessageField == YesNoType.no))
1443 {
1444 writer.WriteAttributeString("ElevatedCloseMessage", "no");
1445 }
1446 if ((this.elevatedCloseMessageField == YesNoType.yes))
1447 {
1448 writer.WriteAttributeString("ElevatedCloseMessage", "yes");
1449 }
1450 }
1451 if (this.elevatedEndSessionMessageFieldSet)
1452 {
1453 if ((this.elevatedEndSessionMessageField == YesNoType.no))
1454 {
1455 writer.WriteAttributeString("ElevatedEndSessionMessage", "no");
1456 }
1457 if ((this.elevatedEndSessionMessageField == YesNoType.yes))
1458 {
1459 writer.WriteAttributeString("ElevatedEndSessionMessage", "yes");
1460 }
1461 }
1462 if (this.rebootPromptFieldSet)
1463 {
1464 if ((this.rebootPromptField == YesNoType.no))
1465 {
1466 writer.WriteAttributeString("RebootPrompt", "no");
1467 }
1468 if ((this.rebootPromptField == YesNoType.yes))
1469 {
1470 writer.WriteAttributeString("RebootPrompt", "yes");
1471 }
1472 }
1473 if (this.promptToContinueFieldSet)
1474 {
1475 if ((this.promptToContinueField == YesNoType.no))
1476 {
1477 writer.WriteAttributeString("PromptToContinue", "no");
1478 }
1479 if ((this.promptToContinueField == YesNoType.yes))
1480 {
1481 writer.WriteAttributeString("PromptToContinue", "yes");
1482 }
1483 }
1484 if (this.propertyFieldSet)
1485 {
1486 writer.WriteAttributeString("Property", this.propertyField);
1487 }
1488 if (this.terminateProcessFieldSet)
1489 {
1490 writer.WriteAttributeString("TerminateProcess", this.terminateProcessField.ToString(CultureInfo.InvariantCulture));
1491 }
1492 if (this.timeoutFieldSet)
1493 {
1494 writer.WriteAttributeString("Timeout", this.timeoutField.ToString(CultureInfo.InvariantCulture));
1495 }
1496 if (this.contentFieldSet)
1497 {
1498 writer.WriteString(this.contentField);
1499 }
1500 writer.WriteEndElement();
1501 }
1502
1503 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1504 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
1505 void ISetAttributes.SetAttribute(string name, string value)
1506 {
1507 if (String.IsNullOrEmpty(name))
1508 {
1509 throw new ArgumentNullException("name");
1510 }
1511 if (("Id" == name))
1512 {
1513 this.idField = value;
1514 this.idFieldSet = true;
1515 }
1516 if (("Target" == name))
1517 {
1518 this.targetField = value;
1519 this.targetFieldSet = true;
1520 }
1521 if (("Description" == name))
1522 {
1523 this.descriptionField = value;
1524 this.descriptionFieldSet = true;
1525 }
1526 if (("Sequence" == name))
1527 {
1528 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1529 this.sequenceFieldSet = true;
1530 }
1531 if (("CloseMessage" == name))
1532 {
1533 this.closeMessageField = Enums.ParseYesNoType(value);
1534 this.closeMessageFieldSet = true;
1535 }
1536 if (("EndSessionMessage" == name))
1537 {
1538 this.endSessionMessageField = Enums.ParseYesNoType(value);
1539 this.endSessionMessageFieldSet = true;
1540 }
1541 if (("ElevatedCloseMessage" == name))
1542 {
1543 this.elevatedCloseMessageField = Enums.ParseYesNoType(value);
1544 this.elevatedCloseMessageFieldSet = true;
1545 }
1546 if (("ElevatedEndSessionMessage" == name))
1547 {
1548 this.elevatedEndSessionMessageField = Enums.ParseYesNoType(value);
1549 this.elevatedEndSessionMessageFieldSet = true;
1550 }
1551 if (("RebootPrompt" == name))
1552 {
1553 this.rebootPromptField = Enums.ParseYesNoType(value);
1554 this.rebootPromptFieldSet = true;
1555 }
1556 if (("PromptToContinue" == name))
1557 {
1558 this.promptToContinueField = Enums.ParseYesNoType(value);
1559 this.promptToContinueFieldSet = true;
1560 }
1561 if (("Property" == name))
1562 {
1563 this.propertyField = value;
1564 this.propertyFieldSet = true;
1565 }
1566 if (("TerminateProcess" == name))
1567 {
1568 this.terminateProcessField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1569 this.terminateProcessFieldSet = true;
1570 }
1571 if (("Timeout" == name))
1572 {
1573 this.timeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1574 this.timeoutFieldSet = true;
1575 }
1576 if (("Content" == name))
1577 {
1578 this.contentField = value;
1579 this.contentFieldSet = true;
1580 }
1581 }
1582 }
1583
1584 /// <summary>
1585 /// Describes a component search.
1586 /// </summary>
1587 [GeneratedCode("XsdGen", "4.0.0.0")]
1588 public class ComponentSearch : ISchemaElement, ISetAttributes
1589 {
1590
1591 private string idField;
1592
1593 private bool idFieldSet;
1594
1595 private string variableField;
1596
1597 private bool variableFieldSet;
1598
1599 private string conditionField;
1600
1601 private bool conditionFieldSet;
1602
1603 private string afterField;
1604
1605 private bool afterFieldSet;
1606
1607 private string guidField;
1608
1609 private bool guidFieldSet;
1610
1611 private string productCodeField;
1612
1613 private bool productCodeFieldSet;
1614
1615 private ResultType resultField;
1616
1617 private bool resultFieldSet;
1618
1619 private ISchemaElement parentElement;
1620
1621 /// <summary>
1622 /// Id of the search for ordering and dependency.
1623 /// </summary>
1624 public string Id
1625 {
1626 get
1627 {
1628 return this.idField;
1629 }
1630 set
1631 {
1632 this.idFieldSet = true;
1633 this.idField = value;
1634 }
1635 }
1636
1637 /// <summary>
1638 /// Name of the variable in which to place the result of the search.
1639 /// </summary>
1640 public string Variable
1641 {
1642 get
1643 {
1644 return this.variableField;
1645 }
1646 set
1647 {
1648 this.variableFieldSet = true;
1649 this.variableField = value;
1650 }
1651 }
1652
1653 /// <summary>
1654 /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all.
1655 /// </summary>
1656 public string Condition
1657 {
1658 get
1659 {
1660 return this.conditionField;
1661 }
1662 set
1663 {
1664 this.conditionFieldSet = true;
1665 this.conditionField = value;
1666 }
1667 }
1668
1669 /// <summary>
1670 /// Id of the search that this one should come after.
1671 /// </summary>
1672 public string After
1673 {
1674 get
1675 {
1676 return this.afterField;
1677 }
1678 set
1679 {
1680 this.afterFieldSet = true;
1681 this.afterField = value;
1682 }
1683 }
1684
1685 /// <summary>
1686 /// Component to search for.
1687 /// </summary>
1688 public string Guid
1689 {
1690 get
1691 {
1692 return this.guidField;
1693 }
1694 set
1695 {
1696 this.guidFieldSet = true;
1697 this.guidField = value;
1698 }
1699 }
1700
1701 /// <summary>
1702 /// Optional ProductCode to determine if the component is installed.
1703 /// </summary>
1704 public string ProductCode
1705 {
1706 get
1707 {
1708 return this.productCodeField;
1709 }
1710 set
1711 {
1712 this.productCodeFieldSet = true;
1713 this.productCodeField = value;
1714 }
1715 }
1716
1717 /// <summary>
1718 /// Rather than saving the matching key path into the variable, a ComponentSearch can save an attribute of the component instead.
1719 /// </summary>
1720 public ResultType Result
1721 {
1722 get
1723 {
1724 return this.resultField;
1725 }
1726 set
1727 {
1728 this.resultFieldSet = true;
1729 this.resultField = value;
1730 }
1731 }
1732
1733 public virtual ISchemaElement ParentElement
1734 {
1735 get
1736 {
1737 return this.parentElement;
1738 }
1739 set
1740 {
1741 this.parentElement = value;
1742 }
1743 }
1744
1745 /// <summary>
1746 /// Parses a ResultType from a string.
1747 /// </summary>
1748 public static ResultType ParseResultType(string value)
1749 {
1750 ResultType parsedValue;
1751 ComponentSearch.TryParseResultType(value, out parsedValue);
1752 return parsedValue;
1753 }
1754
1755 /// <summary>
1756 /// Tries to parse a ResultType from a string.
1757 /// </summary>
1758 public static bool TryParseResultType(string value, out ResultType parsedValue)
1759 {
1760 parsedValue = ResultType.NotSet;
1761 if (string.IsNullOrEmpty(value))
1762 {
1763 return false;
1764 }
1765 if (("directory" == value))
1766 {
1767 parsedValue = ResultType.directory;
1768 }
1769 else
1770 {
1771 if (("state" == value))
1772 {
1773 parsedValue = ResultType.state;
1774 }
1775 else
1776 {
1777 if (("keyPath" == value))
1778 {
1779 parsedValue = ResultType.keyPath;
1780 }
1781 else
1782 {
1783 parsedValue = ResultType.IllegalValue;
1784 return false;
1785 }
1786 }
1787 }
1788 return true;
1789 }
1790
1791 /// <summary>
1792 /// Processes this element and all child elements into an XmlWriter.
1793 /// </summary>
1794 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
1795 public virtual void OutputXml(XmlWriter writer)
1796 {
1797 if ((null == writer))
1798 {
1799 throw new ArgumentNullException("writer");
1800 }
1801 writer.WriteStartElement("ComponentSearch", "http://wixtoolset.org/schemas/v4/wxs/util");
1802 if (this.idFieldSet)
1803 {
1804 writer.WriteAttributeString("Id", this.idField);
1805 }
1806 if (this.variableFieldSet)
1807 {
1808 writer.WriteAttributeString("Variable", this.variableField);
1809 }
1810 if (this.conditionFieldSet)
1811 {
1812 writer.WriteAttributeString("Condition", this.conditionField);
1813 }
1814 if (this.afterFieldSet)
1815 {
1816 writer.WriteAttributeString("After", this.afterField);
1817 }
1818 if (this.guidFieldSet)
1819 {
1820 writer.WriteAttributeString("Guid", this.guidField);
1821 }
1822 if (this.productCodeFieldSet)
1823 {
1824 writer.WriteAttributeString("ProductCode", this.productCodeField);
1825 }
1826 if (this.resultFieldSet)
1827 {
1828 if ((this.resultField == ResultType.directory))
1829 {
1830 writer.WriteAttributeString("Result", "directory");
1831 }
1832 if ((this.resultField == ResultType.state))
1833 {
1834 writer.WriteAttributeString("Result", "state");
1835 }
1836 if ((this.resultField == ResultType.keyPath))
1837 {
1838 writer.WriteAttributeString("Result", "keyPath");
1839 }
1840 }
1841 writer.WriteEndElement();
1842 }
1843
1844 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1845 void ISetAttributes.SetAttribute(string name, string value)
1846 {
1847 if (String.IsNullOrEmpty(name))
1848 {
1849 throw new ArgumentNullException("name");
1850 }
1851 if (("Id" == name))
1852 {
1853 this.idField = value;
1854 this.idFieldSet = true;
1855 }
1856 if (("Variable" == name))
1857 {
1858 this.variableField = value;
1859 this.variableFieldSet = true;
1860 }
1861 if (("Condition" == name))
1862 {
1863 this.conditionField = value;
1864 this.conditionFieldSet = true;
1865 }
1866 if (("After" == name))
1867 {
1868 this.afterField = value;
1869 this.afterFieldSet = true;
1870 }
1871 if (("Guid" == name))
1872 {
1873 this.guidField = value;
1874 this.guidFieldSet = true;
1875 }
1876 if (("ProductCode" == name))
1877 {
1878 this.productCodeField = value;
1879 this.productCodeFieldSet = true;
1880 }
1881 if (("Result" == name))
1882 {
1883 this.resultField = ComponentSearch.ParseResultType(value);
1884 this.resultFieldSet = true;
1885 }
1886 }
1887
1888 [GeneratedCode("XsdGen", "4.0.0.0")]
1889 public enum ResultType
1890 {
1891
1892 IllegalValue = int.MaxValue,
1893
1894 NotSet = -1,
1895
1896 /// <summary>
1897 /// Saves the parent directory for the component's file key path; other types of key path are returned unmodified.
1898 /// </summary>
1899 directory,
1900
1901 /// <summary>
1902 /// Saves the state of the component: absent (2), locally installed (3), will run from source (4), or installed in default location (either local or from source) (5)
1903 /// </summary>
1904 state,
1905
1906 /// <summary>
1907 /// Saves the key path of the component if installed. This is the default.
1908 /// </summary>
1909 keyPath,
1910 }
1911 }
1912
1913 /// <summary>
1914 /// References a ComponentSearch.
1915 /// </summary>
1916 [GeneratedCode("XsdGen", "4.0.0.0")]
1917 public class ComponentSearchRef : ISchemaElement, ISetAttributes
1918 {
1919
1920 private string idField;
1921
1922 private bool idFieldSet;
1923
1924 private ISchemaElement parentElement;
1925
1926 public string Id
1927 {
1928 get
1929 {
1930 return this.idField;
1931 }
1932 set
1933 {
1934 this.idFieldSet = true;
1935 this.idField = value;
1936 }
1937 }
1938
1939 public virtual ISchemaElement ParentElement
1940 {
1941 get
1942 {
1943 return this.parentElement;
1944 }
1945 set
1946 {
1947 this.parentElement = value;
1948 }
1949 }
1950
1951 /// <summary>
1952 /// Processes this element and all child elements into an XmlWriter.
1953 /// </summary>
1954 public virtual void OutputXml(XmlWriter writer)
1955 {
1956 if ((null == writer))
1957 {
1958 throw new ArgumentNullException("writer");
1959 }
1960 writer.WriteStartElement("ComponentSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util");
1961 if (this.idFieldSet)
1962 {
1963 writer.WriteAttributeString("Id", this.idField);
1964 }
1965 writer.WriteEndElement();
1966 }
1967
1968 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1969 void ISetAttributes.SetAttribute(string name, string value)
1970 {
1971 if (String.IsNullOrEmpty(name))
1972 {
1973 throw new ArgumentNullException("name");
1974 }
1975 if (("Id" == name))
1976 {
1977 this.idField = value;
1978 this.idFieldSet = true;
1979 }
1980 }
1981 }
1982
1983 /// <summary>
1984 /// Describes a directory search.
1985 /// </summary>
1986 [GeneratedCode("XsdGen", "4.0.0.0")]
1987 public class DirectorySearch : ISchemaElement, ISetAttributes
1988 {
1989
1990 private string idField;
1991
1992 private bool idFieldSet;
1993
1994 private string variableField;
1995
1996 private bool variableFieldSet;
1997
1998 private string conditionField;
1999
2000 private bool conditionFieldSet;
2001
2002 private string afterField;
2003
2004 private bool afterFieldSet;
2005
2006 private string pathField;
2007
2008 private bool pathFieldSet;
2009
2010 private ResultType resultField;
2011
2012 private bool resultFieldSet;
2013
2014 private ISchemaElement parentElement;
2015
2016 /// <summary>
2017 /// Id of the search for ordering and dependency.
2018 /// </summary>
2019 public string Id
2020 {
2021 get
2022 {
2023 return this.idField;
2024 }
2025 set
2026 {
2027 this.idFieldSet = true;
2028 this.idField = value;
2029 }
2030 }
2031
2032 /// <summary>
2033 /// Name of the variable in which to place the result of the search.
2034 /// </summary>
2035 public string Variable
2036 {
2037 get
2038 {
2039 return this.variableField;
2040 }
2041 set
2042 {
2043 this.variableFieldSet = true;
2044 this.variableField = value;
2045 }
2046 }
2047
2048 /// <summary>
2049 /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all.
2050 /// </summary>
2051 public string Condition
2052 {
2053 get
2054 {
2055 return this.conditionField;
2056 }
2057 set
2058 {
2059 this.conditionFieldSet = true;
2060 this.conditionField = value;
2061 }
2062 }
2063
2064 /// <summary>
2065 /// Id of the search that this one should come after.
2066 /// </summary>
2067 public string After
2068 {
2069 get
2070 {
2071 return this.afterField;
2072 }
2073 set
2074 {
2075 this.afterFieldSet = true;
2076 this.afterField = value;
2077 }
2078 }
2079
2080 /// <summary>
2081 /// Directory path to search for.
2082 /// </summary>
2083 public string Path
2084 {
2085 get
2086 {
2087 return this.pathField;
2088 }
2089 set
2090 {
2091 this.pathFieldSet = true;
2092 this.pathField = value;
2093 }
2094 }
2095
2096 /// <summary>
2097 /// Rather than saving the matching directory path into the variable, a DirectorySearch can save an
2098 /// attribute of the matching directory instead.
2099 /// </summary>
2100 public ResultType Result
2101 {
2102 get
2103 {
2104 return this.resultField;
2105 }
2106 set
2107 {
2108 this.resultFieldSet = true;
2109 this.resultField = value;
2110 }
2111 }
2112
2113 public virtual ISchemaElement ParentElement
2114 {
2115 get
2116 {
2117 return this.parentElement;
2118 }
2119 set
2120 {
2121 this.parentElement = value;
2122 }
2123 }
2124
2125 /// <summary>
2126 /// Parses a ResultType from a string.
2127 /// </summary>
2128 public static ResultType ParseResultType(string value)
2129 {
2130 ResultType parsedValue;
2131 DirectorySearch.TryParseResultType(value, out parsedValue);
2132 return parsedValue;
2133 }
2134
2135 /// <summary>
2136 /// Tries to parse a ResultType from a string.
2137 /// </summary>
2138 public static bool TryParseResultType(string value, out ResultType parsedValue)
2139 {
2140 parsedValue = ResultType.NotSet;
2141 if (string.IsNullOrEmpty(value))
2142 {
2143 return false;
2144 }
2145 if (("exists" == value))
2146 {
2147 parsedValue = ResultType.exists;
2148 }
2149 else
2150 {
2151 parsedValue = ResultType.IllegalValue;
2152 return false;
2153 }
2154 return true;
2155 }
2156
2157 /// <summary>
2158 /// Processes this element and all child elements into an XmlWriter.
2159 /// </summary>
2160 public virtual void OutputXml(XmlWriter writer)
2161 {
2162 if ((null == writer))
2163 {
2164 throw new ArgumentNullException("writer");
2165 }
2166 writer.WriteStartElement("DirectorySearch", "http://wixtoolset.org/schemas/v4/wxs/util");
2167 if (this.idFieldSet)
2168 {
2169 writer.WriteAttributeString("Id", this.idField);
2170 }
2171 if (this.variableFieldSet)
2172 {
2173 writer.WriteAttributeString("Variable", this.variableField);
2174 }
2175 if (this.conditionFieldSet)
2176 {
2177 writer.WriteAttributeString("Condition", this.conditionField);
2178 }
2179 if (this.afterFieldSet)
2180 {
2181 writer.WriteAttributeString("After", this.afterField);
2182 }
2183 if (this.pathFieldSet)
2184 {
2185 writer.WriteAttributeString("Path", this.pathField);
2186 }
2187 if (this.resultFieldSet)
2188 {
2189 if ((this.resultField == ResultType.exists))
2190 {
2191 writer.WriteAttributeString("Result", "exists");
2192 }
2193 }
2194 writer.WriteEndElement();
2195 }
2196
2197 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2198 void ISetAttributes.SetAttribute(string name, string value)
2199 {
2200 if (String.IsNullOrEmpty(name))
2201 {
2202 throw new ArgumentNullException("name");
2203 }
2204 if (("Id" == name))
2205 {
2206 this.idField = value;
2207 this.idFieldSet = true;
2208 }
2209 if (("Variable" == name))
2210 {
2211 this.variableField = value;
2212 this.variableFieldSet = true;
2213 }
2214 if (("Condition" == name))
2215 {
2216 this.conditionField = value;
2217 this.conditionFieldSet = true;
2218 }
2219 if (("After" == name))
2220 {
2221 this.afterField = value;
2222 this.afterFieldSet = true;
2223 }
2224 if (("Path" == name))
2225 {
2226 this.pathField = value;
2227 this.pathFieldSet = true;
2228 }
2229 if (("Result" == name))
2230 {
2231 this.resultField = DirectorySearch.ParseResultType(value);
2232 this.resultFieldSet = true;
2233 }
2234 }
2235
2236 [GeneratedCode("XsdGen", "4.0.0.0")]
2237 public enum ResultType
2238 {
2239
2240 IllegalValue = int.MaxValue,
2241
2242 NotSet = -1,
2243
2244 /// <summary>
2245 /// Saves true if a matching directory is found; false otherwise.
2246 /// </summary>
2247 exists,
2248 }
2249 }
2250
2251 /// <summary>
2252 /// References a DirectorySearch.
2253 /// </summary>
2254 [GeneratedCode("XsdGen", "4.0.0.0")]
2255 public class DirectorySearchRef : ISchemaElement, ISetAttributes
2256 {
2257
2258 private string idField;
2259
2260 private bool idFieldSet;
2261
2262 private ISchemaElement parentElement;
2263
2264 public string Id
2265 {
2266 get
2267 {
2268 return this.idField;
2269 }
2270 set
2271 {
2272 this.idFieldSet = true;
2273 this.idField = value;
2274 }
2275 }
2276
2277 public virtual ISchemaElement ParentElement
2278 {
2279 get
2280 {
2281 return this.parentElement;
2282 }
2283 set
2284 {
2285 this.parentElement = value;
2286 }
2287 }
2288
2289 /// <summary>
2290 /// Processes this element and all child elements into an XmlWriter.
2291 /// </summary>
2292 public virtual void OutputXml(XmlWriter writer)
2293 {
2294 if ((null == writer))
2295 {
2296 throw new ArgumentNullException("writer");
2297 }
2298 writer.WriteStartElement("DirectorySearchRef", "http://wixtoolset.org/schemas/v4/wxs/util");
2299 if (this.idFieldSet)
2300 {
2301 writer.WriteAttributeString("Id", this.idField);
2302 }
2303 writer.WriteEndElement();
2304 }
2305
2306 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2307 void ISetAttributes.SetAttribute(string name, string value)
2308 {
2309 if (String.IsNullOrEmpty(name))
2310 {
2311 throw new ArgumentNullException("name");
2312 }
2313 if (("Id" == name))
2314 {
2315 this.idField = value;
2316 this.idFieldSet = true;
2317 }
2318 }
2319 }
2320
2321 /// <summary>
2322 /// Creates an event source.
2323 /// </summary>
2324 [GeneratedCode("XsdGen", "4.0.0.0")]
2325 public class EventSource : ISchemaElement, ISetAttributes
2326 {
2327
2328 private int categoryCountField;
2329
2330 private bool categoryCountFieldSet;
2331
2332 private string categoryMessageFileField;
2333
2334 private bool categoryMessageFileFieldSet;
2335
2336 private string eventMessageFileField;
2337
2338 private bool eventMessageFileFieldSet;
2339
2340 private YesNoType keyPathField;
2341
2342 private bool keyPathFieldSet;
2343
2344 private string logField;
2345
2346 private bool logFieldSet;
2347
2348 private string nameField;
2349
2350 private bool nameFieldSet;
2351
2352 private string parameterMessageFileField;
2353
2354 private bool parameterMessageFileFieldSet;
2355
2356 private YesNoType supportsErrorsField;
2357
2358 private bool supportsErrorsFieldSet;
2359
2360 private YesNoType supportsFailureAuditsField;
2361
2362 private bool supportsFailureAuditsFieldSet;
2363
2364 private YesNoType supportsInformationalsField;
2365
2366 private bool supportsInformationalsFieldSet;
2367
2368 private YesNoType supportsSuccessAuditsField;
2369
2370 private bool supportsSuccessAuditsFieldSet;
2371
2372 private YesNoType supportsWarningsField;
2373
2374 private bool supportsWarningsFieldSet;
2375
2376 private ISchemaElement parentElement;
2377
2378 /// <summary>
2379 /// The number of categories in CategoryMessageFile. CategoryMessageFile
2380 /// must be specified too.
2381 /// </summary>
2382 public int CategoryCount
2383 {
2384 get
2385 {
2386 return this.categoryCountField;
2387 }
2388 set
2389 {
2390 this.categoryCountFieldSet = true;
2391 this.categoryCountField = value;
2392 }
2393 }
2394
2395 /// <summary>
2396 /// Name of the category message file. CategoryCount must be specified too.
2397 /// Note that this is a formatted field, so you can use [#fileId] syntax to
2398 /// refer to a file being installed. It is also written as a REG_EXPAND_SZ
2399 /// string, so you can use %environment_variable% syntax to refer to a file
2400 /// already present on the user's machine.
2401 /// </summary>
2402 public string CategoryMessageFile
2403 {
2404 get
2405 {
2406 return this.categoryMessageFileField;
2407 }
2408 set
2409 {
2410 this.categoryMessageFileFieldSet = true;
2411 this.categoryMessageFileField = value;
2412 }
2413 }
2414
2415 /// <summary>
2416 /// Name of the event message file.
2417 /// Note that this is a formatted field, so you can use [#fileId] syntax to
2418 /// refer to a file being installed. It is also written as a REG_EXPAND_SZ
2419 /// string, so you can use %environment_variable% syntax to refer to a file
2420 /// already present on the user's machine.
2421 /// </summary>
2422 public string EventMessageFile
2423 {
2424 get
2425 {
2426 return this.eventMessageFileField;
2427 }
2428 set
2429 {
2430 this.eventMessageFileFieldSet = true;
2431 this.eventMessageFileField = value;
2432 }
2433 }
2434
2435 /// <summary>
2436 /// Marks the EventSource registry as the key path of the component it belongs to.
2437 /// </summary>
2438 public YesNoType KeyPath
2439 {
2440 get
2441 {
2442 return this.keyPathField;
2443 }
2444 set
2445 {
2446 this.keyPathFieldSet = true;
2447 this.keyPathField = value;
2448 }
2449 }
2450
2451 /// <summary>
2452 /// Name of the event source's log.
2453 /// </summary>
2454 public string Log
2455 {
2456 get
2457 {
2458 return this.logField;
2459 }
2460 set
2461 {
2462 this.logFieldSet = true;
2463 this.logField = value;
2464 }
2465 }
2466
2467 /// <summary>
2468 /// Name of the event source.
2469 /// </summary>
2470 public string Name
2471 {
2472 get
2473 {
2474 return this.nameField;
2475 }
2476 set
2477 {
2478 this.nameFieldSet = true;
2479 this.nameField = value;
2480 }
2481 }
2482
2483 /// <summary>
2484 /// Name of the parameter message file.
2485 /// Note that this is a formatted field, so you can use [#fileId] syntax to
2486 /// refer to a file being installed. It is also written as a REG_EXPAND_SZ
2487 /// string, so you can use %environment_variable% syntax to refer to a file
2488 /// already present on the user's machine.
2489 /// </summary>
2490 public string ParameterMessageFile
2491 {
2492 get
2493 {
2494 return this.parameterMessageFileField;
2495 }
2496 set
2497 {
2498 this.parameterMessageFileFieldSet = true;
2499 this.parameterMessageFileField = value;
2500 }
2501 }
2502
2503 /// <summary>
2504 /// Equivalent to EVENTLOG_ERROR_TYPE.
2505 /// </summary>
2506 public YesNoType SupportsErrors
2507 {
2508 get
2509 {
2510 return this.supportsErrorsField;
2511 }
2512 set
2513 {
2514 this.supportsErrorsFieldSet = true;
2515 this.supportsErrorsField = value;
2516 }
2517 }
2518
2519 /// <summary>
2520 /// Equivalent to EVENTLOG_AUDIT_FAILURE.
2521 /// </summary>
2522 public YesNoType SupportsFailureAudits
2523 {
2524 get
2525 {
2526 return this.supportsFailureAuditsField;
2527 }
2528 set
2529 {
2530 this.supportsFailureAuditsFieldSet = true;
2531 this.supportsFailureAuditsField = value;
2532 }
2533 }
2534
2535 /// <summary>
2536 /// Equivalent to EVENTLOG_INFORMATION_TYPE.
2537 /// </summary>
2538 public YesNoType SupportsInformationals
2539 {
2540 get
2541 {
2542 return this.supportsInformationalsField;
2543 }
2544 set
2545 {
2546 this.supportsInformationalsFieldSet = true;
2547 this.supportsInformationalsField = value;
2548 }
2549 }
2550
2551 /// <summary>
2552 /// Equivalent to EVENTLOG_AUDIT_SUCCESS.
2553 /// </summary>
2554 public YesNoType SupportsSuccessAudits
2555 {
2556 get
2557 {
2558 return this.supportsSuccessAuditsField;
2559 }
2560 set
2561 {
2562 this.supportsSuccessAuditsFieldSet = true;
2563 this.supportsSuccessAuditsField = value;
2564 }
2565 }
2566
2567 /// <summary>
2568 /// Equivalent to EVENTLOG_WARNING_TYPE.
2569 /// </summary>
2570 public YesNoType SupportsWarnings
2571 {
2572 get
2573 {
2574 return this.supportsWarningsField;
2575 }
2576 set
2577 {
2578 this.supportsWarningsFieldSet = true;
2579 this.supportsWarningsField = value;
2580 }
2581 }
2582
2583 public virtual ISchemaElement ParentElement
2584 {
2585 get
2586 {
2587 return this.parentElement;
2588 }
2589 set
2590 {
2591 this.parentElement = value;
2592 }
2593 }
2594
2595 /// <summary>
2596 /// Processes this element and all child elements into an XmlWriter.
2597 /// </summary>
2598 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
2599 public virtual void OutputXml(XmlWriter writer)
2600 {
2601 if ((null == writer))
2602 {
2603 throw new ArgumentNullException("writer");
2604 }
2605 writer.WriteStartElement("EventSource", "http://wixtoolset.org/schemas/v4/wxs/util");
2606 if (this.categoryCountFieldSet)
2607 {
2608 writer.WriteAttributeString("CategoryCount", this.categoryCountField.ToString(CultureInfo.InvariantCulture));
2609 }
2610 if (this.categoryMessageFileFieldSet)
2611 {
2612 writer.WriteAttributeString("CategoryMessageFile", this.categoryMessageFileField);
2613 }
2614 if (this.eventMessageFileFieldSet)
2615 {
2616 writer.WriteAttributeString("EventMessageFile", this.eventMessageFileField);
2617 }
2618 if (this.keyPathFieldSet)
2619 {
2620 if ((this.keyPathField == YesNoType.no))
2621 {
2622 writer.WriteAttributeString("KeyPath", "no");
2623 }
2624 if ((this.keyPathField == YesNoType.yes))
2625 {
2626 writer.WriteAttributeString("KeyPath", "yes");
2627 }
2628 }
2629 if (this.logFieldSet)
2630 {
2631 writer.WriteAttributeString("Log", this.logField);
2632 }
2633 if (this.nameFieldSet)
2634 {
2635 writer.WriteAttributeString("Name", this.nameField);
2636 }
2637 if (this.parameterMessageFileFieldSet)
2638 {
2639 writer.WriteAttributeString("ParameterMessageFile", this.parameterMessageFileField);
2640 }
2641 if (this.supportsErrorsFieldSet)
2642 {
2643 if ((this.supportsErrorsField == YesNoType.no))
2644 {
2645 writer.WriteAttributeString("SupportsErrors", "no");
2646 }
2647 if ((this.supportsErrorsField == YesNoType.yes))
2648 {
2649 writer.WriteAttributeString("SupportsErrors", "yes");
2650 }
2651 }
2652 if (this.supportsFailureAuditsFieldSet)
2653 {
2654 if ((this.supportsFailureAuditsField == YesNoType.no))
2655 {
2656 writer.WriteAttributeString("SupportsFailureAudits", "no");
2657 }
2658 if ((this.supportsFailureAuditsField == YesNoType.yes))
2659 {
2660 writer.WriteAttributeString("SupportsFailureAudits", "yes");
2661 }
2662 }
2663 if (this.supportsInformationalsFieldSet)
2664 {
2665 if ((this.supportsInformationalsField == YesNoType.no))
2666 {
2667 writer.WriteAttributeString("SupportsInformationals", "no");
2668 }
2669 if ((this.supportsInformationalsField == YesNoType.yes))
2670 {
2671 writer.WriteAttributeString("SupportsInformationals", "yes");
2672 }
2673 }
2674 if (this.supportsSuccessAuditsFieldSet)
2675 {
2676 if ((this.supportsSuccessAuditsField == YesNoType.no))
2677 {
2678 writer.WriteAttributeString("SupportsSuccessAudits", "no");
2679 }
2680 if ((this.supportsSuccessAuditsField == YesNoType.yes))
2681 {
2682 writer.WriteAttributeString("SupportsSuccessAudits", "yes");
2683 }
2684 }
2685 if (this.supportsWarningsFieldSet)
2686 {
2687 if ((this.supportsWarningsField == YesNoType.no))
2688 {
2689 writer.WriteAttributeString("SupportsWarnings", "no");
2690 }
2691 if ((this.supportsWarningsField == YesNoType.yes))
2692 {
2693 writer.WriteAttributeString("SupportsWarnings", "yes");
2694 }
2695 }
2696 writer.WriteEndElement();
2697 }
2698
2699 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2700 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
2701 void ISetAttributes.SetAttribute(string name, string value)
2702 {
2703 if (String.IsNullOrEmpty(name))
2704 {
2705 throw new ArgumentNullException("name");
2706 }
2707 if (("CategoryCount" == name))
2708 {
2709 this.categoryCountField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
2710 this.categoryCountFieldSet = true;
2711 }
2712 if (("CategoryMessageFile" == name))
2713 {
2714 this.categoryMessageFileField = value;
2715 this.categoryMessageFileFieldSet = true;
2716 }
2717 if (("EventMessageFile" == name))
2718 {
2719 this.eventMessageFileField = value;
2720 this.eventMessageFileFieldSet = true;
2721 }
2722 if (("KeyPath" == name))
2723 {
2724 this.keyPathField = Enums.ParseYesNoType(value);
2725 this.keyPathFieldSet = true;
2726 }
2727 if (("Log" == name))
2728 {
2729 this.logField = value;
2730 this.logFieldSet = true;
2731 }
2732 if (("Name" == name))
2733 {
2734 this.nameField = value;
2735 this.nameFieldSet = true;
2736 }
2737 if (("ParameterMessageFile" == name))
2738 {
2739 this.parameterMessageFileField = value;
2740 this.parameterMessageFileFieldSet = true;
2741 }
2742 if (("SupportsErrors" == name))
2743 {
2744 this.supportsErrorsField = Enums.ParseYesNoType(value);
2745 this.supportsErrorsFieldSet = true;
2746 }
2747 if (("SupportsFailureAudits" == name))
2748 {
2749 this.supportsFailureAuditsField = Enums.ParseYesNoType(value);
2750 this.supportsFailureAuditsFieldSet = true;
2751 }
2752 if (("SupportsInformationals" == name))
2753 {
2754 this.supportsInformationalsField = Enums.ParseYesNoType(value);
2755 this.supportsInformationalsFieldSet = true;
2756 }
2757 if (("SupportsSuccessAudits" == name))
2758 {
2759 this.supportsSuccessAuditsField = Enums.ParseYesNoType(value);
2760 this.supportsSuccessAuditsFieldSet = true;
2761 }
2762 if (("SupportsWarnings" == name))
2763 {
2764 this.supportsWarningsField = Enums.ParseYesNoType(value);
2765 this.supportsWarningsFieldSet = true;
2766 }
2767 }
2768 }
2769
2770 /// <summary>
2771 /// Describes a file search.
2772 /// </summary>
2773 [GeneratedCode("XsdGen", "4.0.0.0")]
2774 public class FileSearch : ISchemaElement, ISetAttributes
2775 {
2776
2777 private string idField;
2778
2779 private bool idFieldSet;
2780
2781 private string variableField;
2782
2783 private bool variableFieldSet;
2784
2785 private string conditionField;
2786
2787 private bool conditionFieldSet;
2788
2789 private string afterField;
2790
2791 private bool afterFieldSet;
2792
2793 private string pathField;
2794
2795 private bool pathFieldSet;
2796
2797 private ResultType resultField;
2798
2799 private bool resultFieldSet;
2800
2801 private ISchemaElement parentElement;
2802
2803 /// <summary>
2804 /// Id of the search for ordering and dependency.
2805 /// </summary>
2806 public string Id
2807 {
2808 get
2809 {
2810 return this.idField;
2811 }
2812 set
2813 {
2814 this.idFieldSet = true;
2815 this.idField = value;
2816 }
2817 }
2818
2819 /// <summary>
2820 /// Name of the variable in which to place the result of the search.
2821 /// </summary>
2822 public string Variable
2823 {
2824 get
2825 {
2826 return this.variableField;
2827 }
2828 set
2829 {
2830 this.variableFieldSet = true;
2831 this.variableField = value;
2832 }
2833 }
2834
2835 /// <summary>
2836 /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all.
2837 /// </summary>
2838 public string Condition
2839 {
2840 get
2841 {
2842 return this.conditionField;
2843 }
2844 set
2845 {
2846 this.conditionFieldSet = true;
2847 this.conditionField = value;
2848 }
2849 }
2850
2851 /// <summary>
2852 /// Id of the search that this one should come after.
2853 /// </summary>
2854 public string After
2855 {
2856 get
2857 {
2858 return this.afterField;
2859 }
2860 set
2861 {
2862 this.afterFieldSet = true;
2863 this.afterField = value;
2864 }
2865 }
2866
2867 /// <summary>
2868 /// File path to search for.
2869 /// </summary>
2870 public string Path
2871 {
2872 get
2873 {
2874 return this.pathField;
2875 }
2876 set
2877 {
2878 this.pathFieldSet = true;
2879 this.pathField = value;
2880 }
2881 }
2882
2883 /// <summary>
2884 /// Rather than saving the matching file path into the variable, a FileSearch can save an attribute of the matching file instead.
2885 /// </summary>
2886 public ResultType Result
2887 {
2888 get
2889 {
2890 return this.resultField;
2891 }
2892 set
2893 {
2894 this.resultFieldSet = true;
2895 this.resultField = value;
2896 }
2897 }
2898
2899 public virtual ISchemaElement ParentElement
2900 {
2901 get
2902 {
2903 return this.parentElement;
2904 }
2905 set
2906 {
2907 this.parentElement = value;
2908 }
2909 }
2910
2911 /// <summary>
2912 /// Parses a ResultType from a string.
2913 /// </summary>
2914 public static ResultType ParseResultType(string value)
2915 {
2916 ResultType parsedValue;
2917 FileSearch.TryParseResultType(value, out parsedValue);
2918 return parsedValue;
2919 }
2920
2921 /// <summary>
2922 /// Tries to parse a ResultType from a string.
2923 /// </summary>
2924 public static bool TryParseResultType(string value, out ResultType parsedValue)
2925 {
2926 parsedValue = ResultType.NotSet;
2927 if (string.IsNullOrEmpty(value))
2928 {
2929 return false;
2930 }
2931 if (("exists" == value))
2932 {
2933 parsedValue = ResultType.exists;
2934 }
2935 else
2936 {
2937 if (("version" == value))
2938 {
2939 parsedValue = ResultType.version;
2940 }
2941 else
2942 {
2943 parsedValue = ResultType.IllegalValue;
2944 return false;
2945 }
2946 }
2947 return true;
2948 }
2949
2950 /// <summary>
2951 /// Processes this element and all child elements into an XmlWriter.
2952 /// </summary>
2953 public virtual void OutputXml(XmlWriter writer)
2954 {
2955 if ((null == writer))
2956 {
2957 throw new ArgumentNullException("writer");
2958 }
2959 writer.WriteStartElement("FileSearch", "http://wixtoolset.org/schemas/v4/wxs/util");
2960 if (this.idFieldSet)
2961 {
2962 writer.WriteAttributeString("Id", this.idField);
2963 }
2964 if (this.variableFieldSet)
2965 {
2966 writer.WriteAttributeString("Variable", this.variableField);
2967 }
2968 if (this.conditionFieldSet)
2969 {
2970 writer.WriteAttributeString("Condition", this.conditionField);
2971 }
2972 if (this.afterFieldSet)
2973 {
2974 writer.WriteAttributeString("After", this.afterField);
2975 }
2976 if (this.pathFieldSet)
2977 {
2978 writer.WriteAttributeString("Path", this.pathField);
2979 }
2980 if (this.resultFieldSet)
2981 {
2982 if ((this.resultField == ResultType.exists))
2983 {
2984 writer.WriteAttributeString("Result", "exists");
2985 }
2986 if ((this.resultField == ResultType.version))
2987 {
2988 writer.WriteAttributeString("Result", "version");
2989 }
2990 }
2991 writer.WriteEndElement();
2992 }
2993
2994 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2995 void ISetAttributes.SetAttribute(string name, string value)
2996 {
2997 if (String.IsNullOrEmpty(name))
2998 {
2999 throw new ArgumentNullException("name");
3000 }
3001 if (("Id" == name))
3002 {
3003 this.idField = value;
3004 this.idFieldSet = true;
3005 }
3006 if (("Variable" == name))
3007 {
3008 this.variableField = value;
3009 this.variableFieldSet = true;
3010 }
3011 if (("Condition" == name))
3012 {
3013 this.conditionField = value;
3014 this.conditionFieldSet = true;
3015 }
3016 if (("After" == name))
3017 {
3018 this.afterField = value;
3019 this.afterFieldSet = true;
3020 }
3021 if (("Path" == name))
3022 {
3023 this.pathField = value;
3024 this.pathFieldSet = true;
3025 }
3026 if (("Result" == name))
3027 {
3028 this.resultField = FileSearch.ParseResultType(value);
3029 this.resultFieldSet = true;
3030 }
3031 }
3032
3033 [GeneratedCode("XsdGen", "4.0.0.0")]
3034 public enum ResultType
3035 {
3036
3037 IllegalValue = int.MaxValue,
3038
3039 NotSet = -1,
3040
3041 /// <summary>
3042 /// Saves true if a matching file is found; false otherwise.
3043 /// </summary>
3044 exists,
3045
3046 /// <summary>
3047 /// Saves the version information for files that have it (.exe, .dll); zero-version (0.0.0.0) otherwise.
3048 /// </summary>
3049 version,
3050 }
3051 }
3052
3053 /// <summary>
3054 /// References a FileSearch.
3055 /// </summary>
3056 [GeneratedCode("XsdGen", "4.0.0.0")]
3057 public class FileSearchRef : ISchemaElement, ISetAttributes
3058 {
3059
3060 private string idField;
3061
3062 private bool idFieldSet;
3063
3064 private ISchemaElement parentElement;
3065
3066 public string Id
3067 {
3068 get
3069 {
3070 return this.idField;
3071 }
3072 set
3073 {
3074 this.idFieldSet = true;
3075 this.idField = value;
3076 }
3077 }
3078
3079 public virtual ISchemaElement ParentElement
3080 {
3081 get
3082 {
3083 return this.parentElement;
3084 }
3085 set
3086 {
3087 this.parentElement = value;
3088 }
3089 }
3090
3091 /// <summary>
3092 /// Processes this element and all child elements into an XmlWriter.
3093 /// </summary>
3094 public virtual void OutputXml(XmlWriter writer)
3095 {
3096 if ((null == writer))
3097 {
3098 throw new ArgumentNullException("writer");
3099 }
3100 writer.WriteStartElement("FileSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util");
3101 if (this.idFieldSet)
3102 {
3103 writer.WriteAttributeString("Id", this.idField);
3104 }
3105 writer.WriteEndElement();
3106 }
3107
3108 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3109 void ISetAttributes.SetAttribute(string name, string value)
3110 {
3111 if (String.IsNullOrEmpty(name))
3112 {
3113 throw new ArgumentNullException("name");
3114 }
3115 if (("Id" == name))
3116 {
3117 this.idField = value;
3118 this.idFieldSet = true;
3119 }
3120 }
3121 }
3122
3123 /// <summary>
3124 /// Creates a file share out of the component's directory.
3125 /// </summary>
3126 [GeneratedCode("XsdGen", "4.0.0.0")]
3127 public class FileShare : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
3128 {
3129
3130 private ElementCollection children;
3131
3132 private string idField;
3133
3134 private bool idFieldSet;
3135
3136 private string nameField;
3137
3138 private bool nameFieldSet;
3139
3140 private string descriptionField;
3141
3142 private bool descriptionFieldSet;
3143
3144 private ISchemaElement parentElement;
3145
3146 public FileShare()
3147 {
3148 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
3149 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(FileSharePermission)));
3150 this.children = childCollection0;
3151 }
3152
3153 public virtual IEnumerable Children
3154 {
3155 get
3156 {
3157 return this.children;
3158 }
3159 }
3160
3161 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
3162 public virtual IEnumerable this[System.Type childType]
3163 {
3164 get
3165 {
3166 return this.children.Filter(childType);
3167 }
3168 }
3169
3170 /// <summary>
3171 /// Identifier for the file share (primary key).
3172 /// </summary>
3173 public string Id
3174 {
3175 get
3176 {
3177 return this.idField;
3178 }
3179 set
3180 {
3181 this.idFieldSet = true;
3182 this.idField = value;
3183 }
3184 }
3185
3186 /// <summary>
3187 /// Name of the file share.
3188 /// </summary>
3189 public string Name
3190 {
3191 get
3192 {
3193 return this.nameField;
3194 }
3195 set
3196 {
3197 this.nameFieldSet = true;
3198 this.nameField = value;
3199 }
3200 }
3201
3202 /// <summary>
3203 /// Description of the file share.
3204 /// </summary>
3205 public string Description
3206 {
3207 get
3208 {
3209 return this.descriptionField;
3210 }
3211 set
3212 {
3213 this.descriptionFieldSet = true;
3214 this.descriptionField = value;
3215 }
3216 }
3217
3218 public virtual ISchemaElement ParentElement
3219 {
3220 get
3221 {
3222 return this.parentElement;
3223 }
3224 set
3225 {
3226 this.parentElement = value;
3227 }
3228 }
3229
3230 public virtual void AddChild(ISchemaElement child)
3231 {
3232 if ((null == child))
3233 {
3234 throw new ArgumentNullException("child");
3235 }
3236 this.children.AddElement(child);
3237 child.ParentElement = this;
3238 }
3239
3240 public virtual void RemoveChild(ISchemaElement child)
3241 {
3242 if ((null == child))
3243 {
3244 throw new ArgumentNullException("child");
3245 }
3246 this.children.RemoveElement(child);
3247 child.ParentElement = null;
3248 }
3249
3250 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3251 ISchemaElement ICreateChildren.CreateChild(string childName)
3252 {
3253 if (String.IsNullOrEmpty(childName))
3254 {
3255 throw new ArgumentNullException("childName");
3256 }
3257 ISchemaElement childValue = null;
3258 if (("FileSharePermission" == childName))
3259 {
3260 childValue = new FileSharePermission();
3261 }
3262 if ((null == childValue))
3263 {
3264 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
3265 }
3266 return childValue;
3267 }
3268
3269 /// <summary>
3270 /// Processes this element and all child elements into an XmlWriter.
3271 /// </summary>
3272 public virtual void OutputXml(XmlWriter writer)
3273 {
3274 if ((null == writer))
3275 {
3276 throw new ArgumentNullException("writer");
3277 }
3278 writer.WriteStartElement("FileShare", "http://wixtoolset.org/schemas/v4/wxs/util");
3279 if (this.idFieldSet)
3280 {
3281 writer.WriteAttributeString("Id", this.idField);
3282 }
3283 if (this.nameFieldSet)
3284 {
3285 writer.WriteAttributeString("Name", this.nameField);
3286 }
3287 if (this.descriptionFieldSet)
3288 {
3289 writer.WriteAttributeString("Description", this.descriptionField);
3290 }
3291 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
3292 {
3293 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
3294 childElement.OutputXml(writer);
3295 }
3296 writer.WriteEndElement();
3297 }
3298
3299 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3300 void ISetAttributes.SetAttribute(string name, string value)
3301 {
3302 if (String.IsNullOrEmpty(name))
3303 {
3304 throw new ArgumentNullException("name");
3305 }
3306 if (("Id" == name))
3307 {
3308 this.idField = value;
3309 this.idFieldSet = true;
3310 }
3311 if (("Name" == name))
3312 {
3313 this.nameField = value;
3314 this.nameFieldSet = true;
3315 }
3316 if (("Description" == name))
3317 {
3318 this.descriptionField = value;
3319 this.descriptionFieldSet = true;
3320 }
3321 }
3322 }
3323
3324 /// <summary>
3325 /// Sets ACLs on a FileShare. This element has no Id attribute.
3326 /// The table and key are taken from the parent element.
3327 /// </summary>
3328 [GeneratedCode("XsdGen", "4.0.0.0")]
3329 public class FileSharePermission : ISchemaElement, ISetAttributes
3330 {
3331
3332 private string userField;
3333
3334 private bool userFieldSet;
3335
3336 private YesNoType readField;
3337
3338 private bool readFieldSet;
3339
3340 private YesNoType deleteField;
3341
3342 private bool deleteFieldSet;
3343
3344 private YesNoType readPermissionField;
3345
3346 private bool readPermissionFieldSet;
3347
3348 private YesNoType changePermissionField;
3349
3350 private bool changePermissionFieldSet;
3351
3352 private YesNoType takeOwnershipField;
3353
3354 private bool takeOwnershipFieldSet;
3355
3356 private YesNoType readAttributesField;
3357
3358 private bool readAttributesFieldSet;
3359
3360 private YesNoType writeAttributesField;
3361
3362 private bool writeAttributesFieldSet;
3363
3364 private YesNoType readExtendedAttributesField;
3365
3366 private bool readExtendedAttributesFieldSet;
3367
3368 private YesNoType writeExtendedAttributesField;
3369
3370 private bool writeExtendedAttributesFieldSet;
3371
3372 private YesNoType synchronizeField;
3373
3374 private bool synchronizeFieldSet;
3375
3376 private YesNoType createFileField;
3377
3378 private bool createFileFieldSet;
3379
3380 private YesNoType createChildField;
3381
3382 private bool createChildFieldSet;
3383
3384 private YesNoType deleteChildField;
3385
3386 private bool deleteChildFieldSet;
3387
3388 private YesNoType traverseField;
3389
3390 private bool traverseFieldSet;
3391
3392 private YesNoType genericAllField;
3393
3394 private bool genericAllFieldSet;
3395
3396 private YesNoType genericExecuteField;
3397
3398 private bool genericExecuteFieldSet;
3399
3400 private YesNoType genericWriteField;
3401
3402 private bool genericWriteFieldSet;
3403
3404 private YesNoType genericReadField;
3405
3406 private bool genericReadFieldSet;
3407
3408 private ISchemaElement parentElement;
3409
3410 public string User
3411 {
3412 get
3413 {
3414 return this.userField;
3415 }
3416 set
3417 {
3418 this.userFieldSet = true;
3419 this.userField = value;
3420 }
3421 }
3422
3423 public YesNoType Read
3424 {
3425 get
3426 {
3427 return this.readField;
3428 }
3429 set
3430 {
3431 this.readFieldSet = true;
3432 this.readField = value;
3433 }
3434 }
3435
3436 public YesNoType Delete
3437 {
3438 get
3439 {
3440 return this.deleteField;
3441 }
3442 set
3443 {
3444 this.deleteFieldSet = true;
3445 this.deleteField = value;
3446 }
3447 }
3448
3449 public YesNoType ReadPermission
3450 {
3451 get
3452 {
3453 return this.readPermissionField;
3454 }
3455 set
3456 {
3457 this.readPermissionFieldSet = true;
3458 this.readPermissionField = value;
3459 }
3460 }
3461
3462 public YesNoType ChangePermission
3463 {
3464 get
3465 {
3466 return this.changePermissionField;
3467 }
3468 set
3469 {
3470 this.changePermissionFieldSet = true;
3471 this.changePermissionField = value;
3472 }
3473 }
3474
3475 public YesNoType TakeOwnership
3476 {
3477 get
3478 {
3479 return this.takeOwnershipField;
3480 }
3481 set
3482 {
3483 this.takeOwnershipFieldSet = true;
3484 this.takeOwnershipField = value;
3485 }
3486 }
3487
3488 public YesNoType ReadAttributes
3489 {
3490 get
3491 {
3492 return this.readAttributesField;
3493 }
3494 set
3495 {
3496 this.readAttributesFieldSet = true;
3497 this.readAttributesField = value;
3498 }
3499 }
3500
3501 public YesNoType WriteAttributes
3502 {
3503 get
3504 {
3505 return this.writeAttributesField;
3506 }
3507 set
3508 {
3509 this.writeAttributesFieldSet = true;
3510 this.writeAttributesField = value;
3511 }
3512 }
3513
3514 public YesNoType ReadExtendedAttributes
3515 {
3516 get
3517 {
3518 return this.readExtendedAttributesField;
3519 }
3520 set
3521 {
3522 this.readExtendedAttributesFieldSet = true;
3523 this.readExtendedAttributesField = value;
3524 }
3525 }
3526
3527 public YesNoType WriteExtendedAttributes
3528 {
3529 get
3530 {
3531 return this.writeExtendedAttributesField;
3532 }
3533 set
3534 {
3535 this.writeExtendedAttributesFieldSet = true;
3536 this.writeExtendedAttributesField = value;
3537 }
3538 }
3539
3540 public YesNoType Synchronize
3541 {
3542 get
3543 {
3544 return this.synchronizeField;
3545 }
3546 set
3547 {
3548 this.synchronizeFieldSet = true;
3549 this.synchronizeField = value;
3550 }
3551 }
3552
3553 /// <summary>
3554 /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent.
3555 /// </summary>
3556 public YesNoType CreateFile
3557 {
3558 get
3559 {
3560 return this.createFileField;
3561 }
3562 set
3563 {
3564 this.createFileFieldSet = true;
3565 this.createFileField = value;
3566 }
3567 }
3568
3569 /// <summary>
3570 /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent.
3571 /// </summary>
3572 public YesNoType CreateChild
3573 {
3574 get
3575 {
3576 return this.createChildField;
3577 }
3578 set
3579 {
3580 this.createChildFieldSet = true;
3581 this.createChildField = value;
3582 }
3583 }
3584
3585 /// <summary>
3586 /// For a directory, the right to delete a directory and all the files it contains, including read-only files. Only valid under a 'CreateFolder' parent.
3587 /// </summary>
3588 public YesNoType DeleteChild
3589 {
3590 get
3591 {
3592 return this.deleteChildField;
3593 }
3594 set
3595 {
3596 this.deleteChildFieldSet = true;
3597 this.deleteChildField = value;
3598 }
3599 }
3600
3601 /// <summary>
3602 /// For a directory, the right to traverse the directory. By default, users are assigned the BYPASS_TRAVERSE_CHECKING privilege, which ignores the FILE_TRAVERSE access right. Only valid under a 'CreateFolder' parent.
3603 /// </summary>
3604 public YesNoType Traverse
3605 {
3606 get
3607 {
3608 return this.traverseField;
3609 }
3610 set
3611 {
3612 this.traverseFieldSet = true;
3613 this.traverseField = value;
3614 }
3615 }
3616
3617 public YesNoType GenericAll
3618 {
3619 get
3620 {
3621 return this.genericAllField;
3622 }
3623 set
3624 {
3625 this.genericAllFieldSet = true;
3626 this.genericAllField = value;
3627 }
3628 }
3629
3630 public YesNoType GenericExecute
3631 {
3632 get
3633 {
3634 return this.genericExecuteField;
3635 }
3636 set
3637 {
3638 this.genericExecuteFieldSet = true;
3639 this.genericExecuteField = value;
3640 }
3641 }
3642
3643 public YesNoType GenericWrite
3644 {
3645 get
3646 {
3647 return this.genericWriteField;
3648 }
3649 set
3650 {
3651 this.genericWriteFieldSet = true;
3652 this.genericWriteField = value;
3653 }
3654 }
3655
3656 /// <summary>
3657 /// specifying this will fail to grant read access
3658 /// </summary>
3659 public YesNoType GenericRead
3660 {
3661 get
3662 {
3663 return this.genericReadField;
3664 }
3665 set
3666 {
3667 this.genericReadFieldSet = true;
3668 this.genericReadField = value;
3669 }
3670 }
3671
3672 public virtual ISchemaElement ParentElement
3673 {
3674 get
3675 {
3676 return this.parentElement;
3677 }
3678 set
3679 {
3680 this.parentElement = value;
3681 }
3682 }
3683
3684 /// <summary>
3685 /// Processes this element and all child elements into an XmlWriter.
3686 /// </summary>
3687 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
3688 public virtual void OutputXml(XmlWriter writer)
3689 {
3690 if ((null == writer))
3691 {
3692 throw new ArgumentNullException("writer");
3693 }
3694 writer.WriteStartElement("FileSharePermission", "http://wixtoolset.org/schemas/v4/wxs/util");
3695 if (this.userFieldSet)
3696 {
3697 writer.WriteAttributeString("User", this.userField);
3698 }
3699 if (this.readFieldSet)
3700 {
3701 if ((this.readField == YesNoType.no))
3702 {
3703 writer.WriteAttributeString("Read", "no");
3704 }
3705 if ((this.readField == YesNoType.yes))
3706 {
3707 writer.WriteAttributeString("Read", "yes");
3708 }
3709 }
3710 if (this.deleteFieldSet)
3711 {
3712 if ((this.deleteField == YesNoType.no))
3713 {
3714 writer.WriteAttributeString("Delete", "no");
3715 }
3716 if ((this.deleteField == YesNoType.yes))
3717 {
3718 writer.WriteAttributeString("Delete", "yes");
3719 }
3720 }
3721 if (this.readPermissionFieldSet)
3722 {
3723 if ((this.readPermissionField == YesNoType.no))
3724 {
3725 writer.WriteAttributeString("ReadPermission", "no");
3726 }
3727 if ((this.readPermissionField == YesNoType.yes))
3728 {
3729 writer.WriteAttributeString("ReadPermission", "yes");
3730 }
3731 }
3732 if (this.changePermissionFieldSet)
3733 {
3734 if ((this.changePermissionField == YesNoType.no))
3735 {
3736 writer.WriteAttributeString("ChangePermission", "no");
3737 }
3738 if ((this.changePermissionField == YesNoType.yes))
3739 {
3740 writer.WriteAttributeString("ChangePermission", "yes");
3741 }
3742 }
3743 if (this.takeOwnershipFieldSet)
3744 {
3745 if ((this.takeOwnershipField == YesNoType.no))
3746 {
3747 writer.WriteAttributeString("TakeOwnership", "no");
3748 }
3749 if ((this.takeOwnershipField == YesNoType.yes))
3750 {
3751 writer.WriteAttributeString("TakeOwnership", "yes");
3752 }
3753 }
3754 if (this.readAttributesFieldSet)
3755 {
3756 if ((this.readAttributesField == YesNoType.no))
3757 {
3758 writer.WriteAttributeString("ReadAttributes", "no");
3759 }
3760 if ((this.readAttributesField == YesNoType.yes))
3761 {
3762 writer.WriteAttributeString("ReadAttributes", "yes");
3763 }
3764 }
3765 if (this.writeAttributesFieldSet)
3766 {
3767 if ((this.writeAttributesField == YesNoType.no))
3768 {
3769 writer.WriteAttributeString("WriteAttributes", "no");
3770 }
3771 if ((this.writeAttributesField == YesNoType.yes))
3772 {
3773 writer.WriteAttributeString("WriteAttributes", "yes");
3774 }
3775 }
3776 if (this.readExtendedAttributesFieldSet)
3777 {
3778 if ((this.readExtendedAttributesField == YesNoType.no))
3779 {
3780 writer.WriteAttributeString("ReadExtendedAttributes", "no");
3781 }
3782 if ((this.readExtendedAttributesField == YesNoType.yes))
3783 {
3784 writer.WriteAttributeString("ReadExtendedAttributes", "yes");
3785 }
3786 }
3787 if (this.writeExtendedAttributesFieldSet)
3788 {
3789 if ((this.writeExtendedAttributesField == YesNoType.no))
3790 {
3791 writer.WriteAttributeString("WriteExtendedAttributes", "no");
3792 }
3793 if ((this.writeExtendedAttributesField == YesNoType.yes))
3794 {
3795 writer.WriteAttributeString("WriteExtendedAttributes", "yes");
3796 }
3797 }
3798 if (this.synchronizeFieldSet)
3799 {
3800 if ((this.synchronizeField == YesNoType.no))
3801 {
3802 writer.WriteAttributeString("Synchronize", "no");
3803 }
3804 if ((this.synchronizeField == YesNoType.yes))
3805 {
3806 writer.WriteAttributeString("Synchronize", "yes");
3807 }
3808 }
3809 if (this.createFileFieldSet)
3810 {
3811 if ((this.createFileField == YesNoType.no))
3812 {
3813 writer.WriteAttributeString("CreateFile", "no");
3814 }
3815 if ((this.createFileField == YesNoType.yes))
3816 {
3817 writer.WriteAttributeString("CreateFile", "yes");
3818 }
3819 }
3820 if (this.createChildFieldSet)
3821 {
3822 if ((this.createChildField == YesNoType.no))
3823 {
3824 writer.WriteAttributeString("CreateChild", "no");
3825 }
3826 if ((this.createChildField == YesNoType.yes))
3827 {
3828 writer.WriteAttributeString("CreateChild", "yes");
3829 }
3830 }
3831 if (this.deleteChildFieldSet)
3832 {
3833 if ((this.deleteChildField == YesNoType.no))
3834 {
3835 writer.WriteAttributeString("DeleteChild", "no");
3836 }
3837 if ((this.deleteChildField == YesNoType.yes))
3838 {
3839 writer.WriteAttributeString("DeleteChild", "yes");
3840 }
3841 }
3842 if (this.traverseFieldSet)
3843 {
3844 if ((this.traverseField == YesNoType.no))
3845 {
3846 writer.WriteAttributeString("Traverse", "no");
3847 }
3848 if ((this.traverseField == YesNoType.yes))
3849 {
3850 writer.WriteAttributeString("Traverse", "yes");
3851 }
3852 }
3853 if (this.genericAllFieldSet)
3854 {
3855 if ((this.genericAllField == YesNoType.no))
3856 {
3857 writer.WriteAttributeString("GenericAll", "no");
3858 }
3859 if ((this.genericAllField == YesNoType.yes))
3860 {
3861 writer.WriteAttributeString("GenericAll", "yes");
3862 }
3863 }
3864 if (this.genericExecuteFieldSet)
3865 {
3866 if ((this.genericExecuteField == YesNoType.no))
3867 {
3868 writer.WriteAttributeString("GenericExecute", "no");
3869 }
3870 if ((this.genericExecuteField == YesNoType.yes))
3871 {
3872 writer.WriteAttributeString("GenericExecute", "yes");
3873 }
3874 }
3875 if (this.genericWriteFieldSet)
3876 {
3877 if ((this.genericWriteField == YesNoType.no))
3878 {
3879 writer.WriteAttributeString("GenericWrite", "no");
3880 }
3881 if ((this.genericWriteField == YesNoType.yes))
3882 {
3883 writer.WriteAttributeString("GenericWrite", "yes");
3884 }
3885 }
3886 if (this.genericReadFieldSet)
3887 {
3888 if ((this.genericReadField == YesNoType.no))
3889 {
3890 writer.WriteAttributeString("GenericRead", "no");
3891 }
3892 if ((this.genericReadField == YesNoType.yes))
3893 {
3894 writer.WriteAttributeString("GenericRead", "yes");
3895 }
3896 }
3897 writer.WriteEndElement();
3898 }
3899
3900 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3901 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
3902 void ISetAttributes.SetAttribute(string name, string value)
3903 {
3904 if (String.IsNullOrEmpty(name))
3905 {
3906 throw new ArgumentNullException("name");
3907 }
3908 if (("User" == name))
3909 {
3910 this.userField = value;
3911 this.userFieldSet = true;
3912 }
3913 if (("Read" == name))
3914 {
3915 this.readField = Enums.ParseYesNoType(value);
3916 this.readFieldSet = true;
3917 }
3918 if (("Delete" == name))
3919 {
3920 this.deleteField = Enums.ParseYesNoType(value);
3921 this.deleteFieldSet = true;
3922 }
3923 if (("ReadPermission" == name))
3924 {
3925 this.readPermissionField = Enums.ParseYesNoType(value);
3926 this.readPermissionFieldSet = true;
3927 }
3928 if (("ChangePermission" == name))
3929 {
3930 this.changePermissionField = Enums.ParseYesNoType(value);
3931 this.changePermissionFieldSet = true;
3932 }
3933 if (("TakeOwnership" == name))
3934 {
3935 this.takeOwnershipField = Enums.ParseYesNoType(value);
3936 this.takeOwnershipFieldSet = true;
3937 }
3938 if (("ReadAttributes" == name))
3939 {
3940 this.readAttributesField = Enums.ParseYesNoType(value);
3941 this.readAttributesFieldSet = true;
3942 }
3943 if (("WriteAttributes" == name))
3944 {
3945 this.writeAttributesField = Enums.ParseYesNoType(value);
3946 this.writeAttributesFieldSet = true;
3947 }
3948 if (("ReadExtendedAttributes" == name))
3949 {
3950 this.readExtendedAttributesField = Enums.ParseYesNoType(value);
3951 this.readExtendedAttributesFieldSet = true;
3952 }
3953 if (("WriteExtendedAttributes" == name))
3954 {
3955 this.writeExtendedAttributesField = Enums.ParseYesNoType(value);
3956 this.writeExtendedAttributesFieldSet = true;
3957 }
3958 if (("Synchronize" == name))
3959 {
3960 this.synchronizeField = Enums.ParseYesNoType(value);
3961 this.synchronizeFieldSet = true;
3962 }
3963 if (("CreateFile" == name))
3964 {
3965 this.createFileField = Enums.ParseYesNoType(value);
3966 this.createFileFieldSet = true;
3967 }
3968 if (("CreateChild" == name))
3969 {
3970 this.createChildField = Enums.ParseYesNoType(value);
3971 this.createChildFieldSet = true;
3972 }
3973 if (("DeleteChild" == name))
3974 {
3975 this.deleteChildField = Enums.ParseYesNoType(value);
3976 this.deleteChildFieldSet = true;
3977 }
3978 if (("Traverse" == name))
3979 {
3980 this.traverseField = Enums.ParseYesNoType(value);
3981 this.traverseFieldSet = true;
3982 }
3983 if (("GenericAll" == name))
3984 {
3985 this.genericAllField = Enums.ParseYesNoType(value);
3986 this.genericAllFieldSet = true;
3987 }
3988 if (("GenericExecute" == name))
3989 {
3990 this.genericExecuteField = Enums.ParseYesNoType(value);
3991 this.genericExecuteFieldSet = true;
3992 }
3993 if (("GenericWrite" == name))
3994 {
3995 this.genericWriteField = Enums.ParseYesNoType(value);
3996 this.genericWriteFieldSet = true;
3997 }
3998 if (("GenericRead" == name))
3999 {
4000 this.genericReadField = Enums.ParseYesNoType(value);
4001 this.genericReadFieldSet = true;
4002 }
4003 }
4004 }
4005
4006 /// <summary>
4007 /// Formats a file's contents at install time. The contents are formatted according to the rules of the
4008 /// </summary>
4009 [GeneratedCode("XsdGen", "4.0.0.0")]
4010 public class FormatFile : ISchemaElement, ISetAttributes
4011 {
4012
4013 private string binaryKeyField;
4014
4015 private bool binaryKeyFieldSet;
4016
4017 private ISchemaElement parentElement;
4018
4019 /// <summary>
4020 /// The id of a Binary row that contains a copy of the file. The file in the Binary table overwrites whatever
4021 /// file is installed by the parent component.
4022 /// </summary>
4023 public string BinaryKey
4024 {
4025 get
4026 {
4027 return this.binaryKeyField;
4028 }
4029 set
4030 {
4031 this.binaryKeyFieldSet = true;
4032 this.binaryKeyField = value;
4033 }
4034 }
4035
4036 public virtual ISchemaElement ParentElement
4037 {
4038 get
4039 {
4040 return this.parentElement;
4041 }
4042 set
4043 {
4044 this.parentElement = value;
4045 }
4046 }
4047
4048 /// <summary>
4049 /// Processes this element and all child elements into an XmlWriter.
4050 /// </summary>
4051 public virtual void OutputXml(XmlWriter writer)
4052 {
4053 if ((null == writer))
4054 {
4055 throw new ArgumentNullException("writer");
4056 }
4057 writer.WriteStartElement("FormatFile", "http://wixtoolset.org/schemas/v4/wxs/util");
4058 if (this.binaryKeyFieldSet)
4059 {
4060 writer.WriteAttributeString("BinaryKey", this.binaryKeyField);
4061 }
4062 writer.WriteEndElement();
4063 }
4064
4065 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4066 void ISetAttributes.SetAttribute(string name, string value)
4067 {
4068 if (String.IsNullOrEmpty(name))
4069 {
4070 throw new ArgumentNullException("name");
4071 }
4072 if (("BinaryKey" == name))
4073 {
4074 this.binaryKeyField = value;
4075 this.binaryKeyFieldSet = true;
4076 }
4077 }
4078 }
4079
4080 /// <summary>
4081 /// Finds user groups on the local machine or specified Active Directory domain. The local machine will be
4082 /// searched for the group first then fallback to looking in Active Directory. This element is not capable
4083 /// of creating new groups but can be used to add new or existing users to an existing group.
4084 /// </summary>
4085 [GeneratedCode("XsdGen", "4.0.0.0")]
4086 public class Group : ISchemaElement, ISetAttributes
4087 {
4088
4089 private string idField;
4090
4091 private bool idFieldSet;
4092
4093 private string nameField;
4094
4095 private bool nameFieldSet;
4096
4097 private string domainField;
4098
4099 private bool domainFieldSet;
4100
4101 private ISchemaElement parentElement;
4102
4103 /// <summary>
4104 /// Unique identifier in your installation package for this group.
4105 /// </summary>
4106 public string Id
4107 {
4108 get
4109 {
4110 return this.idField;
4111 }
4112 set
4113 {
4114 this.idFieldSet = true;
4115 this.idField = value;
4116 }
4117 }
4118
4119 /// <summary>
4120 /// A
4121 /// </summary>
4122 public string Name
4123 {
4124 get
4125 {
4126 return this.nameField;
4127 }
4128 set
4129 {
4130 this.nameFieldSet = true;
4131 this.nameField = value;
4132 }
4133 }
4134
4135 /// <summary>
4136 /// An optional
4137 /// </summary>
4138 public string Domain
4139 {
4140 get
4141 {
4142 return this.domainField;
4143 }
4144 set
4145 {
4146 this.domainFieldSet = true;
4147 this.domainField = value;
4148 }
4149 }
4150
4151 public virtual ISchemaElement ParentElement
4152 {
4153 get
4154 {
4155 return this.parentElement;
4156 }
4157 set
4158 {
4159 this.parentElement = value;
4160 }
4161 }
4162
4163 /// <summary>
4164 /// Processes this element and all child elements into an XmlWriter.
4165 /// </summary>
4166 public virtual void OutputXml(XmlWriter writer)
4167 {
4168 if ((null == writer))
4169 {
4170 throw new ArgumentNullException("writer");
4171 }
4172 writer.WriteStartElement("Group", "http://wixtoolset.org/schemas/v4/wxs/util");
4173 if (this.idFieldSet)
4174 {
4175 writer.WriteAttributeString("Id", this.idField);
4176 }
4177 if (this.nameFieldSet)
4178 {
4179 writer.WriteAttributeString("Name", this.nameField);
4180 }
4181 if (this.domainFieldSet)
4182 {
4183 writer.WriteAttributeString("Domain", this.domainField);
4184 }
4185 writer.WriteEndElement();
4186 }
4187
4188 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4189 void ISetAttributes.SetAttribute(string name, string value)
4190 {
4191 if (String.IsNullOrEmpty(name))
4192 {
4193 throw new ArgumentNullException("name");
4194 }
4195 if (("Id" == name))
4196 {
4197 this.idField = value;
4198 this.idFieldSet = true;
4199 }
4200 if (("Name" == name))
4201 {
4202 this.nameField = value;
4203 this.nameFieldSet = true;
4204 }
4205 if (("Domain" == name))
4206 {
4207 this.domainField = value;
4208 this.domainFieldSet = true;
4209 }
4210 }
4211 }
4212
4213 /// <summary>
4214 /// Used to join a user to a group
4215 /// </summary>
4216 [GeneratedCode("XsdGen", "4.0.0.0")]
4217 public class GroupRef : ISchemaElement, ISetAttributes
4218 {
4219
4220 private string idField;
4221
4222 private bool idFieldSet;
4223
4224 private ISchemaElement parentElement;
4225
4226 public string Id
4227 {
4228 get
4229 {
4230 return this.idField;
4231 }
4232 set
4233 {
4234 this.idFieldSet = true;
4235 this.idField = value;
4236 }
4237 }
4238
4239 public virtual ISchemaElement ParentElement
4240 {
4241 get
4242 {
4243 return this.parentElement;
4244 }
4245 set
4246 {
4247 this.parentElement = value;
4248 }
4249 }
4250
4251 /// <summary>
4252 /// Processes this element and all child elements into an XmlWriter.
4253 /// </summary>
4254 public virtual void OutputXml(XmlWriter writer)
4255 {
4256 if ((null == writer))
4257 {
4258 throw new ArgumentNullException("writer");
4259 }
4260 writer.WriteStartElement("GroupRef", "http://wixtoolset.org/schemas/v4/wxs/util");
4261 if (this.idFieldSet)
4262 {
4263 writer.WriteAttributeString("Id", this.idField);
4264 }
4265 writer.WriteEndElement();
4266 }
4267
4268 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4269 void ISetAttributes.SetAttribute(string name, string value)
4270 {
4271 if (String.IsNullOrEmpty(name))
4272 {
4273 throw new ArgumentNullException("name");
4274 }
4275 if (("Id" == name))
4276 {
4277 this.idField = value;
4278 this.idFieldSet = true;
4279 }
4280 }
4281 }
4282
4283 /// <summary>
4284 /// Creates a shortcut to a URL.
4285 /// </summary>
4286 [GeneratedCode("XsdGen", "4.0.0.0")]
4287 public class InternetShortcut : ISchemaElement, ISetAttributes
4288 {
4289
4290 private string idField;
4291
4292 private bool idFieldSet;
4293
4294 private string directoryField;
4295
4296 private bool directoryFieldSet;
4297
4298 private string nameField;
4299
4300 private bool nameFieldSet;
4301
4302 private string targetField;
4303
4304 private bool targetFieldSet;
4305
4306 private TypeType typeField;
4307
4308 private bool typeFieldSet;
4309
4310 private string iconFileField;
4311
4312 private bool iconFileFieldSet;
4313
4314 private int iconIndexField;
4315
4316 private bool iconIndexFieldSet;
4317
4318 private ISchemaElement parentElement;
4319
4320 /// <summary>
4321 /// Unique identifier in your installation package for this Internet shortcut.
4322 /// </summary>
4323 public string Id
4324 {
4325 get
4326 {
4327 return this.idField;
4328 }
4329 set
4330 {
4331 this.idFieldSet = true;
4332 this.idField = value;
4333 }
4334 }
4335
4336 /// <summary>
4337 /// Identifier reference to Directory element where shortcut is to be created. This attribute's value defaults to the parent Component directory.
4338 /// </summary>
4339 public string Directory
4340 {
4341 get
4342 {
4343 return this.directoryField;
4344 }
4345 set
4346 {
4347 this.directoryFieldSet = true;
4348 this.directoryField = value;
4349 }
4350 }
4351
4352 /// <summary>
4353 /// The name of the shortcut file, which is visible to the user. (The .lnk
4354 /// extension is added automatically and by default, is not shown to the user.)
4355 /// </summary>
4356 public string Name
4357 {
4358 get
4359 {
4360 return this.nameField;
4361 }
4362 set
4363 {
4364 this.nameFieldSet = true;
4365 this.nameField = value;
4366 }
4367 }
4368
4369 /// <summary>
4370 /// URL that should be opened when the user selects the shortcut. Windows
4371 /// opens the URL in the appropriate handler for the protocol specified
4372 /// in the URL. Note that this is a formatted field, so you can use
4373 /// [#fileId] syntax to refer to a file being installed (using the file:
4374 /// protocol).
4375 /// </summary>
4376 public string Target
4377 {
4378 get
4379 {
4380 return this.targetField;
4381 }
4382 set
4383 {
4384 this.targetFieldSet = true;
4385 this.targetField = value;
4386 }
4387 }
4388
4389 /// <summary>
4390 /// Which type of shortcut should be created.
4391 /// </summary>
4392 public TypeType Type
4393 {
4394 get
4395 {
4396 return this.typeField;
4397 }
4398 set
4399 {
4400 this.typeFieldSet = true;
4401 this.typeField = value;
4402 }
4403 }
4404
4405 /// <summary>
4406 /// Icon file that should be displayed. Note that this is a formatted field, so you can use
4407 /// [#fileId] syntax to refer to a file being installed (using the file:
4408 /// protocol).
4409 /// </summary>
4410 public string IconFile
4411 {
4412 get
4413 {
4414 return this.iconFileField;
4415 }
4416 set
4417 {
4418 this.iconFileFieldSet = true;
4419 this.iconFileField = value;
4420 }
4421 }
4422
4423 /// <summary>
4424 /// Index of the icon being referenced
4425 /// </summary>
4426 public int IconIndex
4427 {
4428 get
4429 {
4430 return this.iconIndexField;
4431 }
4432 set
4433 {
4434 this.iconIndexFieldSet = true;
4435 this.iconIndexField = value;
4436 }
4437 }
4438
4439 public virtual ISchemaElement ParentElement
4440 {
4441 get
4442 {
4443 return this.parentElement;
4444 }
4445 set
4446 {
4447 this.parentElement = value;
4448 }
4449 }
4450
4451 /// <summary>
4452 /// Parses a TypeType from a string.
4453 /// </summary>
4454 public static TypeType ParseTypeType(string value)
4455 {
4456 TypeType parsedValue;
4457 InternetShortcut.TryParseTypeType(value, out parsedValue);
4458 return parsedValue;
4459 }
4460
4461 /// <summary>
4462 /// Tries to parse a TypeType from a string.
4463 /// </summary>
4464 public static bool TryParseTypeType(string value, out TypeType parsedValue)
4465 {
4466 parsedValue = TypeType.NotSet;
4467 if (string.IsNullOrEmpty(value))
4468 {
4469 return false;
4470 }
4471 if (("url" == value))
4472 {
4473 parsedValue = TypeType.url;
4474 }
4475 else
4476 {
4477 if (("link" == value))
4478 {
4479 parsedValue = TypeType.link;
4480 }
4481 else
4482 {
4483 parsedValue = TypeType.IllegalValue;
4484 return false;
4485 }
4486 }
4487 return true;
4488 }
4489
4490 /// <summary>
4491 /// Processes this element and all child elements into an XmlWriter.
4492 /// </summary>
4493 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
4494 public virtual void OutputXml(XmlWriter writer)
4495 {
4496 if ((null == writer))
4497 {
4498 throw new ArgumentNullException("writer");
4499 }
4500 writer.WriteStartElement("InternetShortcut", "http://wixtoolset.org/schemas/v4/wxs/util");
4501 if (this.idFieldSet)
4502 {
4503 writer.WriteAttributeString("Id", this.idField);
4504 }
4505 if (this.directoryFieldSet)
4506 {
4507 writer.WriteAttributeString("Directory", this.directoryField);
4508 }
4509 if (this.nameFieldSet)
4510 {
4511 writer.WriteAttributeString("Name", this.nameField);
4512 }
4513 if (this.targetFieldSet)
4514 {
4515 writer.WriteAttributeString("Target", this.targetField);
4516 }
4517 if (this.typeFieldSet)
4518 {
4519 if ((this.typeField == TypeType.url))
4520 {
4521 writer.WriteAttributeString("Type", "url");
4522 }
4523 if ((this.typeField == TypeType.link))
4524 {
4525 writer.WriteAttributeString("Type", "link");
4526 }
4527 }
4528 if (this.iconFileFieldSet)
4529 {
4530 writer.WriteAttributeString("IconFile", this.iconFileField);
4531 }
4532 if (this.iconIndexFieldSet)
4533 {
4534 writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture));
4535 }
4536 writer.WriteEndElement();
4537 }
4538
4539 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4540 void ISetAttributes.SetAttribute(string name, string value)
4541 {
4542 if (String.IsNullOrEmpty(name))
4543 {
4544 throw new ArgumentNullException("name");
4545 }
4546 if (("Id" == name))
4547 {
4548 this.idField = value;
4549 this.idFieldSet = true;
4550 }
4551 if (("Directory" == name))
4552 {
4553 this.directoryField = value;
4554 this.directoryFieldSet = true;
4555 }
4556 if (("Name" == name))
4557 {
4558 this.nameField = value;
4559 this.nameFieldSet = true;
4560 }
4561 if (("Target" == name))
4562 {
4563 this.targetField = value;
4564 this.targetFieldSet = true;
4565 }
4566 if (("Type" == name))
4567 {
4568 this.typeField = InternetShortcut.ParseTypeType(value);
4569 this.typeFieldSet = true;
4570 }
4571 if (("IconFile" == name))
4572 {
4573 this.iconFileField = value;
4574 this.iconFileFieldSet = true;
4575 }
4576 if (("IconIndex" == name))
4577 {
4578 this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
4579 this.iconIndexFieldSet = true;
4580 }
4581 }
4582
4583 [GeneratedCode("XsdGen", "4.0.0.0")]
4584 public enum TypeType
4585 {
4586
4587 IllegalValue = int.MaxValue,
4588
4589 NotSet = -1,
4590
4591 /// <summary>
4592 /// Creates .url files using IUniformResourceLocatorW.
4593 /// </summary>
4594 url,
4595
4596 /// <summary>
4597 /// Creates .lnk files using IShellLinkW (default).
4598 /// </summary>
4599 link,
4600 }
4601 }
4602
4603 /// <summary>
4604 /// Used to create performance categories and configure performance counters.
4605 /// </summary>
4606 [GeneratedCode("XsdGen", "4.0.0.0")]
4607 public class PerformanceCategory : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
4608 {
4609
4610 private ElementCollection children;
4611
4612 private string idField;
4613
4614 private bool idFieldSet;
4615
4616 private string nameField;
4617
4618 private bool nameFieldSet;
4619
4620 private string helpField;
4621
4622 private bool helpFieldSet;
4623
4624 private YesNoType multiInstanceField;
4625
4626 private bool multiInstanceFieldSet;
4627
4628 private string libraryField;
4629
4630 private bool libraryFieldSet;
4631
4632 private string openField;
4633
4634 private bool openFieldSet;
4635
4636 private string closeField;
4637
4638 private bool closeFieldSet;
4639
4640 private string collectField;
4641
4642 private bool collectFieldSet;
4643
4644 private PerformanceCounterLanguageType defaultLanguageField;
4645
4646 private bool defaultLanguageFieldSet;
4647
4648 private ISchemaElement parentElement;
4649
4650 public PerformanceCategory()
4651 {
4652 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
4653 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PerformanceCounter)));
4654 this.children = childCollection0;
4655 }
4656
4657 public virtual IEnumerable Children
4658 {
4659 get
4660 {
4661 return this.children;
4662 }
4663 }
4664
4665 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
4666 public virtual IEnumerable this[System.Type childType]
4667 {
4668 get
4669 {
4670 return this.children.Filter(childType);
4671 }
4672 }
4673
4674 /// <summary>
4675 /// Unique identifier in your installation package for this performance counter category.
4676 /// </summary>
4677 public string Id
4678 {
4679 get
4680 {
4681 return this.idField;
4682 }
4683 set
4684 {
4685 this.idFieldSet = true;
4686 this.idField = value;
4687 }
4688 }
4689
4690 /// <summary>
4691 /// Name for the performance counter category. If this attribute is not provided the Id attribute is used as the name of the performance counter category.
4692 /// </summary>
4693 public string Name
4694 {
4695 get
4696 {
4697 return this.nameField;
4698 }
4699 set
4700 {
4701 this.nameFieldSet = true;
4702 this.nameField = value;
4703 }
4704 }
4705
4706 /// <summary>
4707 /// Optional help text for the performance counter category.
4708 /// </summary>
4709 public string Help
4710 {
4711 get
4712 {
4713 return this.helpField;
4714 }
4715 set
4716 {
4717 this.helpFieldSet = true;
4718 this.helpField = value;
4719 }
4720 }
4721
4722 /// <summary>
4723 /// Flag that specifies whether the performance counter category is multi or single instanced. Default is single instance.
4724 /// </summary>
4725 public YesNoType MultiInstance
4726 {
4727 get
4728 {
4729 return this.multiInstanceField;
4730 }
4731 set
4732 {
4733 this.multiInstanceFieldSet = true;
4734 this.multiInstanceField = value;
4735 }
4736 }
4737
4738 /// <summary>
4739 /// DLL that contains the performance counter. The default is "netfxperf.dll" which should be used for all managed code performance counters.
4740 /// </summary>
4741 public string Library
4742 {
4743 get
4744 {
4745 return this.libraryField;
4746 }
4747 set
4748 {
4749 this.libraryFieldSet = true;
4750 this.libraryField = value;
4751 }
4752 }
4753
4754 /// <summary>
4755 /// Function entry point in to the Library DLL called when opening the performance counter. The default is "OpenPerformanceData" which should be used for all managed code performance counters.
4756 /// </summary>
4757 public string Open
4758 {
4759 get
4760 {
4761 return this.openField;
4762 }
4763 set
4764 {
4765 this.openFieldSet = true;
4766 this.openField = value;
4767 }
4768 }
4769
4770 /// <summary>
4771 /// Function entry point in to the Library DLL called when closing the performance counter. The default is "ClosePerformanceData" which should be used for all managed code performance counters.
4772 /// </summary>
4773 public string Close
4774 {
4775 get
4776 {
4777 return this.closeField;
4778 }
4779 set
4780 {
4781 this.closeFieldSet = true;
4782 this.closeField = value;
4783 }
4784 }
4785
4786 /// <summary>
4787 /// Function entry point in to the Library DLL called when collecting data from the performance counter. The default is "CollectPerformanceData" which should be used for all managed code performance counters.
4788 /// </summary>
4789 public string Collect
4790 {
4791 get
4792 {
4793 return this.collectField;
4794 }
4795 set
4796 {
4797 this.collectFieldSet = true;
4798 this.collectField = value;
4799 }
4800 }
4801
4802 /// <summary>
4803 /// Default language for the performance category and contained counters' names and help text.
4804 /// </summary>
4805 public PerformanceCounterLanguageType DefaultLanguage
4806 {
4807 get
4808 {
4809 return this.defaultLanguageField;
4810 }
4811 set
4812 {
4813 this.defaultLanguageFieldSet = true;
4814 this.defaultLanguageField = value;
4815 }
4816 }
4817
4818 public virtual ISchemaElement ParentElement
4819 {
4820 get
4821 {
4822 return this.parentElement;
4823 }
4824 set
4825 {
4826 this.parentElement = value;
4827 }
4828 }
4829
4830 public virtual void AddChild(ISchemaElement child)
4831 {
4832 if ((null == child))
4833 {
4834 throw new ArgumentNullException("child");
4835 }
4836 this.children.AddElement(child);
4837 child.ParentElement = this;
4838 }
4839
4840 public virtual void RemoveChild(ISchemaElement child)
4841 {
4842 if ((null == child))
4843 {
4844 throw new ArgumentNullException("child");
4845 }
4846 this.children.RemoveElement(child);
4847 child.ParentElement = null;
4848 }
4849
4850 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4851 ISchemaElement ICreateChildren.CreateChild(string childName)
4852 {
4853 if (String.IsNullOrEmpty(childName))
4854 {
4855 throw new ArgumentNullException("childName");
4856 }
4857 ISchemaElement childValue = null;
4858 if (("PerformanceCounter" == childName))
4859 {
4860 childValue = new PerformanceCounter();
4861 }
4862 if ((null == childValue))
4863 {
4864 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
4865 }
4866 return childValue;
4867 }
4868
4869 /// <summary>
4870 /// Processes this element and all child elements into an XmlWriter.
4871 /// </summary>
4872 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
4873 public virtual void OutputXml(XmlWriter writer)
4874 {
4875 if ((null == writer))
4876 {
4877 throw new ArgumentNullException("writer");
4878 }
4879 writer.WriteStartElement("PerformanceCategory", "http://wixtoolset.org/schemas/v4/wxs/util");
4880 if (this.idFieldSet)
4881 {
4882 writer.WriteAttributeString("Id", this.idField);
4883 }
4884 if (this.nameFieldSet)
4885 {
4886 writer.WriteAttributeString("Name", this.nameField);
4887 }
4888 if (this.helpFieldSet)
4889 {
4890 writer.WriteAttributeString("Help", this.helpField);
4891 }
4892 if (this.multiInstanceFieldSet)
4893 {
4894 if ((this.multiInstanceField == YesNoType.no))
4895 {
4896 writer.WriteAttributeString("MultiInstance", "no");
4897 }
4898 if ((this.multiInstanceField == YesNoType.yes))
4899 {
4900 writer.WriteAttributeString("MultiInstance", "yes");
4901 }
4902 }
4903 if (this.libraryFieldSet)
4904 {
4905 writer.WriteAttributeString("Library", this.libraryField);
4906 }
4907 if (this.openFieldSet)
4908 {
4909 writer.WriteAttributeString("Open", this.openField);
4910 }
4911 if (this.closeFieldSet)
4912 {
4913 writer.WriteAttributeString("Close", this.closeField);
4914 }
4915 if (this.collectFieldSet)
4916 {
4917 writer.WriteAttributeString("Collect", this.collectField);
4918 }
4919 if (this.defaultLanguageFieldSet)
4920 {
4921 if ((this.defaultLanguageField == PerformanceCounterLanguageType.afrikaans))
4922 {
4923 writer.WriteAttributeString("DefaultLanguage", "afrikaans");
4924 }
4925 if ((this.defaultLanguageField == PerformanceCounterLanguageType.albanian))
4926 {
4927 writer.WriteAttributeString("DefaultLanguage", "albanian");
4928 }
4929 if ((this.defaultLanguageField == PerformanceCounterLanguageType.arabic))
4930 {
4931 writer.WriteAttributeString("DefaultLanguage", "arabic");
4932 }
4933 if ((this.defaultLanguageField == PerformanceCounterLanguageType.armenian))
4934 {
4935 writer.WriteAttributeString("DefaultLanguage", "armenian");
4936 }
4937 if ((this.defaultLanguageField == PerformanceCounterLanguageType.assamese))
4938 {
4939 writer.WriteAttributeString("DefaultLanguage", "assamese");
4940 }
4941 if ((this.defaultLanguageField == PerformanceCounterLanguageType.azeri))
4942 {
4943 writer.WriteAttributeString("DefaultLanguage", "azeri");
4944 }
4945 if ((this.defaultLanguageField == PerformanceCounterLanguageType.basque))
4946 {
4947 writer.WriteAttributeString("DefaultLanguage", "basque");
4948 }
4949 if ((this.defaultLanguageField == PerformanceCounterLanguageType.belarusian))
4950 {
4951 writer.WriteAttributeString("DefaultLanguage", "belarusian");
4952 }
4953 if ((this.defaultLanguageField == PerformanceCounterLanguageType.bengali))
4954 {
4955 writer.WriteAttributeString("DefaultLanguage", "bengali");
4956 }
4957 if ((this.defaultLanguageField == PerformanceCounterLanguageType.bulgarian))
4958 {
4959 writer.WriteAttributeString("DefaultLanguage", "bulgarian");
4960 }
4961 if ((this.defaultLanguageField == PerformanceCounterLanguageType.catalan))
4962 {
4963 writer.WriteAttributeString("DefaultLanguage", "catalan");
4964 }
4965 if ((this.defaultLanguageField == PerformanceCounterLanguageType.chinese))
4966 {
4967 writer.WriteAttributeString("DefaultLanguage", "chinese");
4968 }
4969 if ((this.defaultLanguageField == PerformanceCounterLanguageType.croatian))
4970 {
4971 writer.WriteAttributeString("DefaultLanguage", "croatian");
4972 }
4973 if ((this.defaultLanguageField == PerformanceCounterLanguageType.czech))
4974 {
4975 writer.WriteAttributeString("DefaultLanguage", "czech");
4976 }
4977 if ((this.defaultLanguageField == PerformanceCounterLanguageType.danish))
4978 {
4979 writer.WriteAttributeString("DefaultLanguage", "danish");
4980 }
4981 if ((this.defaultLanguageField == PerformanceCounterLanguageType.divehi))
4982 {
4983 writer.WriteAttributeString("DefaultLanguage", "divehi");
4984 }
4985 if ((this.defaultLanguageField == PerformanceCounterLanguageType.dutch))
4986 {
4987 writer.WriteAttributeString("DefaultLanguage", "dutch");
4988 }
4989 if ((this.defaultLanguageField == PerformanceCounterLanguageType.english))
4990 {
4991 writer.WriteAttributeString("DefaultLanguage", "english");
4992 }
4993 if ((this.defaultLanguageField == PerformanceCounterLanguageType.estonian))
4994 {
4995 writer.WriteAttributeString("DefaultLanguage", "estonian");
4996 }
4997 if ((this.defaultLanguageField == PerformanceCounterLanguageType.faeroese))
4998 {
4999 writer.WriteAttributeString("DefaultLanguage", "faeroese");
5000 }
5001 if ((this.defaultLanguageField == PerformanceCounterLanguageType.farsi))
5002 {
5003 writer.WriteAttributeString("DefaultLanguage", "farsi");
5004 }
5005 if ((this.defaultLanguageField == PerformanceCounterLanguageType.finnish))
5006 {
5007 writer.WriteAttributeString("DefaultLanguage", "finnish");
5008 }
5009 if ((this.defaultLanguageField == PerformanceCounterLanguageType.french))
5010 {
5011 writer.WriteAttributeString("DefaultLanguage", "french");
5012 }
5013 if ((this.defaultLanguageField == PerformanceCounterLanguageType.galician))
5014 {
5015 writer.WriteAttributeString("DefaultLanguage", "galician");
5016 }
5017 if ((this.defaultLanguageField == PerformanceCounterLanguageType.georgian))
5018 {
5019 writer.WriteAttributeString("DefaultLanguage", "georgian");
5020 }
5021 if ((this.defaultLanguageField == PerformanceCounterLanguageType.german))
5022 {
5023 writer.WriteAttributeString("DefaultLanguage", "german");
5024 }
5025 if ((this.defaultLanguageField == PerformanceCounterLanguageType.greek))
5026 {
5027 writer.WriteAttributeString("DefaultLanguage", "greek");
5028 }
5029 if ((this.defaultLanguageField == PerformanceCounterLanguageType.gujarati))
5030 {
5031 writer.WriteAttributeString("DefaultLanguage", "gujarati");
5032 }
5033 if ((this.defaultLanguageField == PerformanceCounterLanguageType.hebrew))
5034 {
5035 writer.WriteAttributeString("DefaultLanguage", "hebrew");
5036 }
5037 if ((this.defaultLanguageField == PerformanceCounterLanguageType.hindi))
5038 {
5039 writer.WriteAttributeString("DefaultLanguage", "hindi");
5040 }
5041 if ((this.defaultLanguageField == PerformanceCounterLanguageType.hungarian))
5042 {
5043 writer.WriteAttributeString("DefaultLanguage", "hungarian");
5044 }
5045 if ((this.defaultLanguageField == PerformanceCounterLanguageType.icelandic))
5046 {
5047 writer.WriteAttributeString("DefaultLanguage", "icelandic");
5048 }
5049 if ((this.defaultLanguageField == PerformanceCounterLanguageType.indonesian))
5050 {
5051 writer.WriteAttributeString("DefaultLanguage", "indonesian");
5052 }
5053 if ((this.defaultLanguageField == PerformanceCounterLanguageType.italian))
5054 {
5055 writer.WriteAttributeString("DefaultLanguage", "italian");
5056 }
5057 if ((this.defaultLanguageField == PerformanceCounterLanguageType.japanese))
5058 {
5059 writer.WriteAttributeString("DefaultLanguage", "japanese");
5060 }
5061 if ((this.defaultLanguageField == PerformanceCounterLanguageType.kannada))
5062 {
5063 writer.WriteAttributeString("DefaultLanguage", "kannada");
5064 }
5065 if ((this.defaultLanguageField == PerformanceCounterLanguageType.kashmiri))
5066 {
5067 writer.WriteAttributeString("DefaultLanguage", "kashmiri");
5068 }
5069 if ((this.defaultLanguageField == PerformanceCounterLanguageType.kazak))
5070 {
5071 writer.WriteAttributeString("DefaultLanguage", "kazak");
5072 }
5073 if ((this.defaultLanguageField == PerformanceCounterLanguageType.konkani))
5074 {
5075 writer.WriteAttributeString("DefaultLanguage", "konkani");
5076 }
5077 if ((this.defaultLanguageField == PerformanceCounterLanguageType.korean))
5078 {
5079 writer.WriteAttributeString("DefaultLanguage", "korean");
5080 }
5081 if ((this.defaultLanguageField == PerformanceCounterLanguageType.kyrgyz))
5082 {
5083 writer.WriteAttributeString("DefaultLanguage", "kyrgyz");
5084 }
5085 if ((this.defaultLanguageField == PerformanceCounterLanguageType.latvian))
5086 {
5087 writer.WriteAttributeString("DefaultLanguage", "latvian");
5088 }
5089 if ((this.defaultLanguageField == PerformanceCounterLanguageType.lithuanian))
5090 {
5091 writer.WriteAttributeString("DefaultLanguage", "lithuanian");
5092 }
5093 if ((this.defaultLanguageField == PerformanceCounterLanguageType.macedonian))
5094 {
5095 writer.WriteAttributeString("DefaultLanguage", "macedonian");
5096 }
5097 if ((this.defaultLanguageField == PerformanceCounterLanguageType.malay))
5098 {
5099 writer.WriteAttributeString("DefaultLanguage", "malay");
5100 }
5101 if ((this.defaultLanguageField == PerformanceCounterLanguageType.malayalam))
5102 {
5103 writer.WriteAttributeString("DefaultLanguage", "malayalam");
5104 }
5105 if ((this.defaultLanguageField == PerformanceCounterLanguageType.manipuri))
5106 {
5107 writer.WriteAttributeString("DefaultLanguage", "manipuri");
5108 }
5109 if ((this.defaultLanguageField == PerformanceCounterLanguageType.marathi))
5110 {
5111 writer.WriteAttributeString("DefaultLanguage", "marathi");
5112 }
5113 if ((this.defaultLanguageField == PerformanceCounterLanguageType.mongolian))
5114 {
5115 writer.WriteAttributeString("DefaultLanguage", "mongolian");
5116 }
5117 if ((this.defaultLanguageField == PerformanceCounterLanguageType.nepali))
5118 {
5119 writer.WriteAttributeString("DefaultLanguage", "nepali");
5120 }
5121 if ((this.defaultLanguageField == PerformanceCounterLanguageType.norwegian))
5122 {
5123 writer.WriteAttributeString("DefaultLanguage", "norwegian");
5124 }
5125 if ((this.defaultLanguageField == PerformanceCounterLanguageType.oriya))
5126 {
5127 writer.WriteAttributeString("DefaultLanguage", "oriya");
5128 }
5129 if ((this.defaultLanguageField == PerformanceCounterLanguageType.polish))
5130 {
5131 writer.WriteAttributeString("DefaultLanguage", "polish");
5132 }
5133 if ((this.defaultLanguageField == PerformanceCounterLanguageType.portuguese))
5134 {
5135 writer.WriteAttributeString("DefaultLanguage", "portuguese");
5136 }
5137 if ((this.defaultLanguageField == PerformanceCounterLanguageType.punjabi))
5138 {
5139 writer.WriteAttributeString("DefaultLanguage", "punjabi");
5140 }
5141 if ((this.defaultLanguageField == PerformanceCounterLanguageType.romanian))
5142 {
5143 writer.WriteAttributeString("DefaultLanguage", "romanian");
5144 }
5145 if ((this.defaultLanguageField == PerformanceCounterLanguageType.russian))
5146 {
5147 writer.WriteAttributeString("DefaultLanguage", "russian");
5148 }
5149 if ((this.defaultLanguageField == PerformanceCounterLanguageType.sanskrit))
5150 {
5151 writer.WriteAttributeString("DefaultLanguage", "sanskrit");
5152 }
5153 if ((this.defaultLanguageField == PerformanceCounterLanguageType.serbian))
5154 {
5155 writer.WriteAttributeString("DefaultLanguage", "serbian");
5156 }
5157 if ((this.defaultLanguageField == PerformanceCounterLanguageType.sindhi))
5158 {
5159 writer.WriteAttributeString("DefaultLanguage", "sindhi");
5160 }
5161 if ((this.defaultLanguageField == PerformanceCounterLanguageType.slovak))
5162 {
5163 writer.WriteAttributeString("DefaultLanguage", "slovak");
5164 }
5165 if ((this.defaultLanguageField == PerformanceCounterLanguageType.slovenian))
5166 {
5167 writer.WriteAttributeString("DefaultLanguage", "slovenian");
5168 }
5169 if ((this.defaultLanguageField == PerformanceCounterLanguageType.spanish))
5170 {
5171 writer.WriteAttributeString("DefaultLanguage", "spanish");
5172 }
5173 if ((this.defaultLanguageField == PerformanceCounterLanguageType.swahili))
5174 {
5175 writer.WriteAttributeString("DefaultLanguage", "swahili");
5176 }
5177 if ((this.defaultLanguageField == PerformanceCounterLanguageType.swedish))
5178 {
5179 writer.WriteAttributeString("DefaultLanguage", "swedish");
5180 }
5181 if ((this.defaultLanguageField == PerformanceCounterLanguageType.syriac))
5182 {
5183 writer.WriteAttributeString("DefaultLanguage", "syriac");
5184 }
5185 if ((this.defaultLanguageField == PerformanceCounterLanguageType.tamil))
5186 {
5187 writer.WriteAttributeString("DefaultLanguage", "tamil");
5188 }
5189 if ((this.defaultLanguageField == PerformanceCounterLanguageType.tatar))
5190 {
5191 writer.WriteAttributeString("DefaultLanguage", "tatar");
5192 }
5193 if ((this.defaultLanguageField == PerformanceCounterLanguageType.telugu))
5194 {
5195 writer.WriteAttributeString("DefaultLanguage", "telugu");
5196 }
5197 if ((this.defaultLanguageField == PerformanceCounterLanguageType.thai))
5198 {
5199 writer.WriteAttributeString("DefaultLanguage", "thai");
5200 }
5201 if ((this.defaultLanguageField == PerformanceCounterLanguageType.turkish))
5202 {
5203 writer.WriteAttributeString("DefaultLanguage", "turkish");
5204 }
5205 if ((this.defaultLanguageField == PerformanceCounterLanguageType.ukrainian))
5206 {
5207 writer.WriteAttributeString("DefaultLanguage", "ukrainian");
5208 }
5209 if ((this.defaultLanguageField == PerformanceCounterLanguageType.urdu))
5210 {
5211 writer.WriteAttributeString("DefaultLanguage", "urdu");
5212 }
5213 if ((this.defaultLanguageField == PerformanceCounterLanguageType.uzbek))
5214 {
5215 writer.WriteAttributeString("DefaultLanguage", "uzbek");
5216 }
5217 if ((this.defaultLanguageField == PerformanceCounterLanguageType.vietnamese))
5218 {
5219 writer.WriteAttributeString("DefaultLanguage", "vietnamese");
5220 }
5221 }
5222 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
5223 {
5224 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
5225 childElement.OutputXml(writer);
5226 }
5227 writer.WriteEndElement();
5228 }
5229
5230 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5231 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5232 void ISetAttributes.SetAttribute(string name, string value)
5233 {
5234 if (String.IsNullOrEmpty(name))
5235 {
5236 throw new ArgumentNullException("name");
5237 }
5238 if (("Id" == name))
5239 {
5240 this.idField = value;
5241 this.idFieldSet = true;
5242 }
5243 if (("Name" == name))
5244 {
5245 this.nameField = value;
5246 this.nameFieldSet = true;
5247 }
5248 if (("Help" == name))
5249 {
5250 this.helpField = value;
5251 this.helpFieldSet = true;
5252 }
5253 if (("MultiInstance" == name))
5254 {
5255 this.multiInstanceField = Enums.ParseYesNoType(value);
5256 this.multiInstanceFieldSet = true;
5257 }
5258 if (("Library" == name))
5259 {
5260 this.libraryField = value;
5261 this.libraryFieldSet = true;
5262 }
5263 if (("Open" == name))
5264 {
5265 this.openField = value;
5266 this.openFieldSet = true;
5267 }
5268 if (("Close" == name))
5269 {
5270 this.closeField = value;
5271 this.closeFieldSet = true;
5272 }
5273 if (("Collect" == name))
5274 {
5275 this.collectField = value;
5276 this.collectFieldSet = true;
5277 }
5278 if (("DefaultLanguage" == name))
5279 {
5280 this.defaultLanguageField = Enums.ParsePerformanceCounterLanguageType(value);
5281 this.defaultLanguageFieldSet = true;
5282 }
5283 }
5284 }
5285
5286 /// <summary>
5287 /// Creates a performance counter in a performance category.
5288 /// </summary>
5289 [GeneratedCode("XsdGen", "4.0.0.0")]
5290 public class PerformanceCounter : ISchemaElement, ISetAttributes
5291 {
5292
5293 private string nameField;
5294
5295 private bool nameFieldSet;
5296
5297 private string helpField;
5298
5299 private bool helpFieldSet;
5300
5301 private PerformanceCounterTypesType typeField;
5302
5303 private bool typeFieldSet;
5304
5305 private PerformanceCounterLanguageType languageField;
5306
5307 private bool languageFieldSet;
5308
5309 private ISchemaElement parentElement;
5310
5311 /// <summary>
5312 /// Name for the performance counter.
5313 /// </summary>
5314 public string Name
5315 {
5316 get
5317 {
5318 return this.nameField;
5319 }
5320 set
5321 {
5322 this.nameFieldSet = true;
5323 this.nameField = value;
5324 }
5325 }
5326
5327 /// <summary>
5328 /// Optional help text for the performance counter.
5329 /// </summary>
5330 public string Help
5331 {
5332 get
5333 {
5334 return this.helpField;
5335 }
5336 set
5337 {
5338 this.helpFieldSet = true;
5339 this.helpField = value;
5340 }
5341 }
5342
5343 /// <summary>
5344 /// Type of the performance counter.
5345 /// </summary>
5346 public PerformanceCounterTypesType Type
5347 {
5348 get
5349 {
5350 return this.typeField;
5351 }
5352 set
5353 {
5354 this.typeFieldSet = true;
5355 this.typeField = value;
5356 }
5357 }
5358
5359 /// <summary>
5360 /// Language for the peformance counter name and help. The default is to use the parent PerformanceCategory element's DefaultLanguage attribute.
5361 /// </summary>
5362 public PerformanceCounterLanguageType Language
5363 {
5364 get
5365 {
5366 return this.languageField;
5367 }
5368 set
5369 {
5370 this.languageFieldSet = true;
5371 this.languageField = value;
5372 }
5373 }
5374
5375 public virtual ISchemaElement ParentElement
5376 {
5377 get
5378 {
5379 return this.parentElement;
5380 }
5381 set
5382 {
5383 this.parentElement = value;
5384 }
5385 }
5386
5387 /// <summary>
5388 /// Processes this element and all child elements into an XmlWriter.
5389 /// </summary>
5390 public virtual void OutputXml(XmlWriter writer)
5391 {
5392 if ((null == writer))
5393 {
5394 throw new ArgumentNullException("writer");
5395 }
5396 writer.WriteStartElement("PerformanceCounter", "http://wixtoolset.org/schemas/v4/wxs/util");
5397 if (this.nameFieldSet)
5398 {
5399 writer.WriteAttributeString("Name", this.nameField);
5400 }
5401 if (this.helpFieldSet)
5402 {
5403 writer.WriteAttributeString("Help", this.helpField);
5404 }
5405 if (this.typeFieldSet)
5406 {
5407 if ((this.typeField == PerformanceCounterTypesType.averageBase))
5408 {
5409 writer.WriteAttributeString("Type", "averageBase");
5410 }
5411 if ((this.typeField == PerformanceCounterTypesType.averageCount64))
5412 {
5413 writer.WriteAttributeString("Type", "averageCount64");
5414 }
5415 if ((this.typeField == PerformanceCounterTypesType.averageTimer32))
5416 {
5417 writer.WriteAttributeString("Type", "averageTimer32");
5418 }
5419 if ((this.typeField == PerformanceCounterTypesType.counterDelta32))
5420 {
5421 writer.WriteAttributeString("Type", "counterDelta32");
5422 }
5423 if ((this.typeField == PerformanceCounterTypesType.counterTimerInverse))
5424 {
5425 writer.WriteAttributeString("Type", "counterTimerInverse");
5426 }
5427 if ((this.typeField == PerformanceCounterTypesType.sampleFraction))
5428 {
5429 writer.WriteAttributeString("Type", "sampleFraction");
5430 }
5431 if ((this.typeField == PerformanceCounterTypesType.timer100Ns))
5432 {
5433 writer.WriteAttributeString("Type", "timer100Ns");
5434 }
5435 if ((this.typeField == PerformanceCounterTypesType.counterTimer))
5436 {
5437 writer.WriteAttributeString("Type", "counterTimer");
5438 }
5439 if ((this.typeField == PerformanceCounterTypesType.rawFraction))
5440 {
5441 writer.WriteAttributeString("Type", "rawFraction");
5442 }
5443 if ((this.typeField == PerformanceCounterTypesType.timer100NsInverse))
5444 {
5445 writer.WriteAttributeString("Type", "timer100NsInverse");
5446 }
5447 if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer))
5448 {
5449 writer.WriteAttributeString("Type", "counterMultiTimer");
5450 }
5451 if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer100Ns))
5452 {
5453 writer.WriteAttributeString("Type", "counterMultiTimer100Ns");
5454 }
5455 if ((this.typeField == PerformanceCounterTypesType.counterMultiTimerInverse))
5456 {
5457 writer.WriteAttributeString("Type", "counterMultiTimerInverse");
5458 }
5459 if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer100NsInverse))
5460 {
5461 writer.WriteAttributeString("Type", "counterMultiTimer100NsInverse");
5462 }
5463 if ((this.typeField == PerformanceCounterTypesType.elapsedTime))
5464 {
5465 writer.WriteAttributeString("Type", "elapsedTime");
5466 }
5467 if ((this.typeField == PerformanceCounterTypesType.sampleBase))
5468 {
5469 writer.WriteAttributeString("Type", "sampleBase");
5470 }
5471 if ((this.typeField == PerformanceCounterTypesType.rawBase))
5472 {
5473 writer.WriteAttributeString("Type", "rawBase");
5474 }
5475 if ((this.typeField == PerformanceCounterTypesType.counterMultiBase))
5476 {
5477 writer.WriteAttributeString("Type", "counterMultiBase");
5478 }
5479 if ((this.typeField == PerformanceCounterTypesType.rateOfCountsPerSecond64))
5480 {
5481 writer.WriteAttributeString("Type", "rateOfCountsPerSecond64");
5482 }
5483 if ((this.typeField == PerformanceCounterTypesType.rateOfCountsPerSecond32))
5484 {
5485 writer.WriteAttributeString("Type", "rateOfCountsPerSecond32");
5486 }
5487 if ((this.typeField == PerformanceCounterTypesType.countPerTimeInterval64))
5488 {
5489 writer.WriteAttributeString("Type", "countPerTimeInterval64");
5490 }
5491 if ((this.typeField == PerformanceCounterTypesType.countPerTimeInterval32))
5492 {
5493 writer.WriteAttributeString("Type", "countPerTimeInterval32");
5494 }
5495 if ((this.typeField == PerformanceCounterTypesType.sampleCounter))
5496 {
5497 writer.WriteAttributeString("Type", "sampleCounter");
5498 }
5499 if ((this.typeField == PerformanceCounterTypesType.counterDelta64))
5500 {
5501 writer.WriteAttributeString("Type", "counterDelta64");
5502 }
5503 if ((this.typeField == PerformanceCounterTypesType.numberOfItems64))
5504 {
5505 writer.WriteAttributeString("Type", "numberOfItems64");
5506 }
5507 if ((this.typeField == PerformanceCounterTypesType.numberOfItems32))
5508 {
5509 writer.WriteAttributeString("Type", "numberOfItems32");
5510 }
5511 if ((this.typeField == PerformanceCounterTypesType.numberOfItemsHEX64))
5512 {
5513 writer.WriteAttributeString("Type", "numberOfItemsHEX64");
5514 }
5515 if ((this.typeField == PerformanceCounterTypesType.numberOfItemsHEX32))
5516 {
5517 writer.WriteAttributeString("Type", "numberOfItemsHEX32");
5518 }
5519 }
5520 if (this.languageFieldSet)
5521 {
5522 if ((this.languageField == PerformanceCounterLanguageType.afrikaans))
5523 {
5524 writer.WriteAttributeString("Language", "afrikaans");
5525 }
5526 if ((this.languageField == PerformanceCounterLanguageType.albanian))
5527 {
5528 writer.WriteAttributeString("Language", "albanian");
5529 }
5530 if ((this.languageField == PerformanceCounterLanguageType.arabic))
5531 {
5532 writer.WriteAttributeString("Language", "arabic");
5533 }
5534 if ((this.languageField == PerformanceCounterLanguageType.armenian))
5535 {
5536 writer.WriteAttributeString("Language", "armenian");
5537 }
5538 if ((this.languageField == PerformanceCounterLanguageType.assamese))
5539 {
5540 writer.WriteAttributeString("Language", "assamese");
5541 }
5542 if ((this.languageField == PerformanceCounterLanguageType.azeri))
5543 {
5544 writer.WriteAttributeString("Language", "azeri");
5545 }
5546 if ((this.languageField == PerformanceCounterLanguageType.basque))
5547 {
5548 writer.WriteAttributeString("Language", "basque");
5549 }
5550 if ((this.languageField == PerformanceCounterLanguageType.belarusian))
5551 {
5552 writer.WriteAttributeString("Language", "belarusian");
5553 }
5554 if ((this.languageField == PerformanceCounterLanguageType.bengali))
5555 {
5556 writer.WriteAttributeString("Language", "bengali");
5557 }
5558 if ((this.languageField == PerformanceCounterLanguageType.bulgarian))
5559 {
5560 writer.WriteAttributeString("Language", "bulgarian");
5561 }
5562 if ((this.languageField == PerformanceCounterLanguageType.catalan))
5563 {
5564 writer.WriteAttributeString("Language", "catalan");
5565 }
5566 if ((this.languageField == PerformanceCounterLanguageType.chinese))
5567 {
5568 writer.WriteAttributeString("Language", "chinese");
5569 }
5570 if ((this.languageField == PerformanceCounterLanguageType.croatian))
5571 {
5572 writer.WriteAttributeString("Language", "croatian");
5573 }
5574 if ((this.languageField == PerformanceCounterLanguageType.czech))
5575 {
5576 writer.WriteAttributeString("Language", "czech");
5577 }
5578 if ((this.languageField == PerformanceCounterLanguageType.danish))
5579 {
5580 writer.WriteAttributeString("Language", "danish");
5581 }
5582 if ((this.languageField == PerformanceCounterLanguageType.divehi))
5583 {
5584 writer.WriteAttributeString("Language", "divehi");
5585 }
5586 if ((this.languageField == PerformanceCounterLanguageType.dutch))
5587 {
5588 writer.WriteAttributeString("Language", "dutch");
5589 }
5590 if ((this.languageField == PerformanceCounterLanguageType.english))
5591 {
5592 writer.WriteAttributeString("Language", "english");
5593 }
5594 if ((this.languageField == PerformanceCounterLanguageType.estonian))
5595 {
5596 writer.WriteAttributeString("Language", "estonian");
5597 }
5598 if ((this.languageField == PerformanceCounterLanguageType.faeroese))
5599 {
5600 writer.WriteAttributeString("Language", "faeroese");
5601 }
5602 if ((this.languageField == PerformanceCounterLanguageType.farsi))
5603 {
5604 writer.WriteAttributeString("Language", "farsi");
5605 }
5606 if ((this.languageField == PerformanceCounterLanguageType.finnish))
5607 {
5608 writer.WriteAttributeString("Language", "finnish");
5609 }
5610 if ((this.languageField == PerformanceCounterLanguageType.french))
5611 {
5612 writer.WriteAttributeString("Language", "french");
5613 }
5614 if ((this.languageField == PerformanceCounterLanguageType.galician))
5615 {
5616 writer.WriteAttributeString("Language", "galician");
5617 }
5618 if ((this.languageField == PerformanceCounterLanguageType.georgian))
5619 {
5620 writer.WriteAttributeString("Language", "georgian");
5621 }
5622 if ((this.languageField == PerformanceCounterLanguageType.german))
5623 {
5624 writer.WriteAttributeString("Language", "german");
5625 }
5626 if ((this.languageField == PerformanceCounterLanguageType.greek))
5627 {
5628 writer.WriteAttributeString("Language", "greek");
5629 }
5630 if ((this.languageField == PerformanceCounterLanguageType.gujarati))
5631 {
5632 writer.WriteAttributeString("Language", "gujarati");
5633 }
5634 if ((this.languageField == PerformanceCounterLanguageType.hebrew))
5635 {
5636 writer.WriteAttributeString("Language", "hebrew");
5637 }
5638 if ((this.languageField == PerformanceCounterLanguageType.hindi))
5639 {
5640 writer.WriteAttributeString("Language", "hindi");
5641 }
5642 if ((this.languageField == PerformanceCounterLanguageType.hungarian))
5643 {
5644 writer.WriteAttributeString("Language", "hungarian");
5645 }
5646 if ((this.languageField == PerformanceCounterLanguageType.icelandic))
5647 {
5648 writer.WriteAttributeString("Language", "icelandic");
5649 }
5650 if ((this.languageField == PerformanceCounterLanguageType.indonesian))
5651 {
5652 writer.WriteAttributeString("Language", "indonesian");
5653 }
5654 if ((this.languageField == PerformanceCounterLanguageType.italian))
5655 {
5656 writer.WriteAttributeString("Language", "italian");
5657 }
5658 if ((this.languageField == PerformanceCounterLanguageType.japanese))
5659 {
5660 writer.WriteAttributeString("Language", "japanese");
5661 }
5662 if ((this.languageField == PerformanceCounterLanguageType.kannada))
5663 {
5664 writer.WriteAttributeString("Language", "kannada");
5665 }
5666 if ((this.languageField == PerformanceCounterLanguageType.kashmiri))
5667 {
5668 writer.WriteAttributeString("Language", "kashmiri");
5669 }
5670 if ((this.languageField == PerformanceCounterLanguageType.kazak))
5671 {
5672 writer.WriteAttributeString("Language", "kazak");
5673 }
5674 if ((this.languageField == PerformanceCounterLanguageType.konkani))
5675 {
5676 writer.WriteAttributeString("Language", "konkani");
5677 }
5678 if ((this.languageField == PerformanceCounterLanguageType.korean))
5679 {
5680 writer.WriteAttributeString("Language", "korean");
5681 }
5682 if ((this.languageField == PerformanceCounterLanguageType.kyrgyz))
5683 {
5684 writer.WriteAttributeString("Language", "kyrgyz");
5685 }
5686 if ((this.languageField == PerformanceCounterLanguageType.latvian))
5687 {
5688 writer.WriteAttributeString("Language", "latvian");
5689 }
5690 if ((this.languageField == PerformanceCounterLanguageType.lithuanian))
5691 {
5692 writer.WriteAttributeString("Language", "lithuanian");
5693 }
5694 if ((this.languageField == PerformanceCounterLanguageType.macedonian))
5695 {
5696 writer.WriteAttributeString("Language", "macedonian");
5697 }
5698 if ((this.languageField == PerformanceCounterLanguageType.malay))
5699 {
5700 writer.WriteAttributeString("Language", "malay");
5701 }
5702 if ((this.languageField == PerformanceCounterLanguageType.malayalam))
5703 {
5704 writer.WriteAttributeString("Language", "malayalam");
5705 }
5706 if ((this.languageField == PerformanceCounterLanguageType.manipuri))
5707 {
5708 writer.WriteAttributeString("Language", "manipuri");
5709 }
5710 if ((this.languageField == PerformanceCounterLanguageType.marathi))
5711 {
5712 writer.WriteAttributeString("Language", "marathi");
5713 }
5714 if ((this.languageField == PerformanceCounterLanguageType.mongolian))
5715 {
5716 writer.WriteAttributeString("Language", "mongolian");
5717 }
5718 if ((this.languageField == PerformanceCounterLanguageType.nepali))
5719 {
5720 writer.WriteAttributeString("Language", "nepali");
5721 }
5722 if ((this.languageField == PerformanceCounterLanguageType.norwegian))
5723 {
5724 writer.WriteAttributeString("Language", "norwegian");
5725 }
5726 if ((this.languageField == PerformanceCounterLanguageType.oriya))
5727 {
5728 writer.WriteAttributeString("Language", "oriya");
5729 }
5730 if ((this.languageField == PerformanceCounterLanguageType.polish))
5731 {
5732 writer.WriteAttributeString("Language", "polish");
5733 }
5734 if ((this.languageField == PerformanceCounterLanguageType.portuguese))
5735 {
5736 writer.WriteAttributeString("Language", "portuguese");
5737 }
5738 if ((this.languageField == PerformanceCounterLanguageType.punjabi))
5739 {
5740 writer.WriteAttributeString("Language", "punjabi");
5741 }
5742 if ((this.languageField == PerformanceCounterLanguageType.romanian))
5743 {
5744 writer.WriteAttributeString("Language", "romanian");
5745 }
5746 if ((this.languageField == PerformanceCounterLanguageType.russian))
5747 {
5748 writer.WriteAttributeString("Language", "russian");
5749 }
5750 if ((this.languageField == PerformanceCounterLanguageType.sanskrit))
5751 {
5752 writer.WriteAttributeString("Language", "sanskrit");
5753 }
5754 if ((this.languageField == PerformanceCounterLanguageType.serbian))
5755 {
5756 writer.WriteAttributeString("Language", "serbian");
5757 }
5758 if ((this.languageField == PerformanceCounterLanguageType.sindhi))
5759 {
5760 writer.WriteAttributeString("Language", "sindhi");
5761 }
5762 if ((this.languageField == PerformanceCounterLanguageType.slovak))
5763 {
5764 writer.WriteAttributeString("Language", "slovak");
5765 }
5766 if ((this.languageField == PerformanceCounterLanguageType.slovenian))
5767 {
5768 writer.WriteAttributeString("Language", "slovenian");
5769 }
5770 if ((this.languageField == PerformanceCounterLanguageType.spanish))
5771 {
5772 writer.WriteAttributeString("Language", "spanish");
5773 }
5774 if ((this.languageField == PerformanceCounterLanguageType.swahili))
5775 {
5776 writer.WriteAttributeString("Language", "swahili");
5777 }
5778 if ((this.languageField == PerformanceCounterLanguageType.swedish))
5779 {
5780 writer.WriteAttributeString("Language", "swedish");
5781 }
5782 if ((this.languageField == PerformanceCounterLanguageType.syriac))
5783 {
5784 writer.WriteAttributeString("Language", "syriac");
5785 }
5786 if ((this.languageField == PerformanceCounterLanguageType.tamil))
5787 {
5788 writer.WriteAttributeString("Language", "tamil");
5789 }
5790 if ((this.languageField == PerformanceCounterLanguageType.tatar))
5791 {
5792 writer.WriteAttributeString("Language", "tatar");
5793 }
5794 if ((this.languageField == PerformanceCounterLanguageType.telugu))
5795 {
5796 writer.WriteAttributeString("Language", "telugu");
5797 }
5798 if ((this.languageField == PerformanceCounterLanguageType.thai))
5799 {
5800 writer.WriteAttributeString("Language", "thai");
5801 }
5802 if ((this.languageField == PerformanceCounterLanguageType.turkish))
5803 {
5804 writer.WriteAttributeString("Language", "turkish");
5805 }
5806 if ((this.languageField == PerformanceCounterLanguageType.ukrainian))
5807 {
5808 writer.WriteAttributeString("Language", "ukrainian");
5809 }
5810 if ((this.languageField == PerformanceCounterLanguageType.urdu))
5811 {
5812 writer.WriteAttributeString("Language", "urdu");
5813 }
5814 if ((this.languageField == PerformanceCounterLanguageType.uzbek))
5815 {
5816 writer.WriteAttributeString("Language", "uzbek");
5817 }
5818 if ((this.languageField == PerformanceCounterLanguageType.vietnamese))
5819 {
5820 writer.WriteAttributeString("Language", "vietnamese");
5821 }
5822 }
5823 writer.WriteEndElement();
5824 }
5825
5826 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5827 void ISetAttributes.SetAttribute(string name, string value)
5828 {
5829 if (String.IsNullOrEmpty(name))
5830 {
5831 throw new ArgumentNullException("name");
5832 }
5833 if (("Name" == name))
5834 {
5835 this.nameField = value;
5836 this.nameFieldSet = true;
5837 }
5838 if (("Help" == name))
5839 {
5840 this.helpField = value;
5841 this.helpFieldSet = true;
5842 }
5843 if (("Type" == name))
5844 {
5845 this.typeField = Enums.ParsePerformanceCounterTypesType(value);
5846 this.typeFieldSet = true;
5847 }
5848 if (("Language" == name))
5849 {
5850 this.languageField = Enums.ParsePerformanceCounterLanguageType(value);
5851 this.languageFieldSet = true;
5852 }
5853 }
5854 }
5855
5856 /// <summary>
5857 /// Used to install Perfmon counters.
5858 /// </summary>
5859 [GeneratedCode("XsdGen", "4.0.0.0")]
5860 public class PerfCounter : ISchemaElement, ISetAttributes
5861 {
5862
5863 private string nameField;
5864
5865 private bool nameFieldSet;
5866
5867 private ISchemaElement parentElement;
5868
5869 public string Name
5870 {
5871 get
5872 {
5873 return this.nameField;
5874 }
5875 set
5876 {
5877 this.nameFieldSet = true;
5878 this.nameField = value;
5879 }
5880 }
5881
5882 public virtual ISchemaElement ParentElement
5883 {
5884 get
5885 {
5886 return this.parentElement;
5887 }
5888 set
5889 {
5890 this.parentElement = value;
5891 }
5892 }
5893
5894 /// <summary>
5895 /// Processes this element and all child elements into an XmlWriter.
5896 /// </summary>
5897 public virtual void OutputXml(XmlWriter writer)
5898 {
5899 if ((null == writer))
5900 {
5901 throw new ArgumentNullException("writer");
5902 }
5903 writer.WriteStartElement("PerfCounter", "http://wixtoolset.org/schemas/v4/wxs/util");
5904 if (this.nameFieldSet)
5905 {
5906 writer.WriteAttributeString("Name", this.nameField);
5907 }
5908 writer.WriteEndElement();
5909 }
5910
5911 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5912 void ISetAttributes.SetAttribute(string name, string value)
5913 {
5914 if (String.IsNullOrEmpty(name))
5915 {
5916 throw new ArgumentNullException("name");
5917 }
5918 if (("Name" == name))
5919 {
5920 this.nameField = value;
5921 this.nameFieldSet = true;
5922 }
5923 }
5924 }
5925
5926 /// <summary>
5927 /// Used to install Perfmon Counter Manifests.
5928 /// Note that this functionality cannot be used with major upgrades that are scheduled after the InstallExecute,
5929 /// InstallExecuteAgain, or InstallFinalize actions. For more information on major upgrade scheduling, see
5930 /// </summary>
5931 [GeneratedCode("XsdGen", "4.0.0.0")]
5932 public class PerfCounterManifest : ISchemaElement, ISetAttributes
5933 {
5934
5935 private string resourceFileDirectoryField;
5936
5937 private bool resourceFileDirectoryFieldSet;
5938
5939 private ISchemaElement parentElement;
5940
5941 /// <summary>
5942 /// The directory that holds the resource file of the providers in the perfmon counter manifest. Often the resource file path cannot be determined until setup time. Put the directory here and during perfmon manifest registrtion the path will be updated in the registry. If not specified, Perfmon will look for the resource file in the same directory of the perfmon counter manifest file.
5943 /// </summary>
5944 public string ResourceFileDirectory
5945 {
5946 get
5947 {
5948 return this.resourceFileDirectoryField;
5949 }
5950 set
5951 {
5952 this.resourceFileDirectoryFieldSet = true;
5953 this.resourceFileDirectoryField = value;
5954 }
5955 }
5956
5957 public virtual ISchemaElement ParentElement
5958 {
5959 get
5960 {
5961 return this.parentElement;
5962 }
5963 set
5964 {
5965 this.parentElement = value;
5966 }
5967 }
5968
5969 /// <summary>
5970 /// Processes this element and all child elements into an XmlWriter.
5971 /// </summary>
5972 public virtual void OutputXml(XmlWriter writer)
5973 {
5974 if ((null == writer))
5975 {
5976 throw new ArgumentNullException("writer");
5977 }
5978 writer.WriteStartElement("PerfCounterManifest", "http://wixtoolset.org/schemas/v4/wxs/util");
5979 if (this.resourceFileDirectoryFieldSet)
5980 {
5981 writer.WriteAttributeString("ResourceFileDirectory", this.resourceFileDirectoryField);
5982 }
5983 writer.WriteEndElement();
5984 }
5985
5986 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5987 void ISetAttributes.SetAttribute(string name, string value)
5988 {
5989 if (String.IsNullOrEmpty(name))
5990 {
5991 throw new ArgumentNullException("name");
5992 }
5993 if (("ResourceFileDirectory" == name))
5994 {
5995 this.resourceFileDirectoryField = value;
5996 this.resourceFileDirectoryFieldSet = true;
5997 }
5998 }
5999 }
6000
6001 /// <summary>
6002 /// Used to install Event Manifests.
6003 /// </summary>
6004 [GeneratedCode("XsdGen", "4.0.0.0")]
6005 public class EventManifest : ISchemaElement, ISetAttributes
6006 {
6007
6008 private string messageFileField;
6009
6010 private bool messageFileFieldSet;
6011
6012 private string parameterFileField;
6013
6014 private bool parameterFileFieldSet;
6015
6016 private string resourceFileField;
6017
6018 private bool resourceFileFieldSet;
6019
6020 private ISchemaElement parentElement;
6021
6022 /// <summary>
6023 /// The message file (including path) of all the providers in the event manifest. Often the message file path cannot be determined until setup time. Put your MessageFile here and the messageFileName attribute of the all the providers in the manifest will be updated with the path before it is registered.
6024 /// </summary>
6025 public string MessageFile
6026 {
6027 get
6028 {
6029 return this.messageFileField;
6030 }
6031 set
6032 {
6033 this.messageFileFieldSet = true;
6034 this.messageFileField = value;
6035 }
6036 }
6037
6038 /// <summary>
6039 /// The parameter file (including path) of all the providers in the event manifest. Often the parameter file path cannot be determined until setup time. Put your ParameterFile here and the parameterFileName attribute of the all the providers in the manifest will be updated with the path before it is registered.
6040 /// </summary>
6041 public string ParameterFile
6042 {
6043 get
6044 {
6045 return this.parameterFileField;
6046 }
6047 set
6048 {
6049 this.parameterFileFieldSet = true;
6050 this.parameterFileField = value;
6051 }
6052 }
6053
6054 /// <summary>
6055 /// The resource file (including path) of all the providers in the event manifest. Often the resource file path cannot be determined until setup time. Put your ResourceFile here and the resourceFileName attribute of the all the providers in the manifest will be updated with the path before it is registered.
6056 /// </summary>
6057 public string ResourceFile
6058 {
6059 get
6060 {
6061 return this.resourceFileField;
6062 }
6063 set
6064 {
6065 this.resourceFileFieldSet = true;
6066 this.resourceFileField = value;
6067 }
6068 }
6069
6070 public virtual ISchemaElement ParentElement
6071 {
6072 get
6073 {
6074 return this.parentElement;
6075 }
6076 set
6077 {
6078 this.parentElement = value;
6079 }
6080 }
6081
6082 /// <summary>
6083 /// Processes this element and all child elements into an XmlWriter.
6084 /// </summary>
6085 public virtual void OutputXml(XmlWriter writer)
6086 {
6087 if ((null == writer))
6088 {
6089 throw new ArgumentNullException("writer");
6090 }
6091 writer.WriteStartElement("EventManifest", "http://wixtoolset.org/schemas/v4/wxs/util");
6092 if (this.messageFileFieldSet)
6093 {
6094 writer.WriteAttributeString("MessageFile", this.messageFileField);
6095 }
6096 if (this.parameterFileFieldSet)
6097 {
6098 writer.WriteAttributeString("ParameterFile", this.parameterFileField);
6099 }
6100 if (this.resourceFileFieldSet)
6101 {
6102 writer.WriteAttributeString("ResourceFile", this.resourceFileField);
6103 }
6104 writer.WriteEndElement();
6105 }
6106
6107 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
6108 void ISetAttributes.SetAttribute(string name, string value)
6109 {
6110 if (String.IsNullOrEmpty(name))
6111 {
6112 throw new ArgumentNullException("name");
6113 }
6114 if (("MessageFile" == name))
6115 {
6116 this.messageFileField = value;
6117 this.messageFileFieldSet = true;
6118 }
6119 if (("ParameterFile" == name))
6120 {
6121 this.parameterFileField = value;
6122 this.parameterFileFieldSet = true;
6123 }
6124 if (("ResourceFile" == name))
6125 {
6126 this.resourceFileField = value;
6127 this.resourceFileFieldSet = true;
6128 }
6129 }
6130 }
6131
6132 /// <summary>
6133 /// Sets ACLs on File, Registry, CreateFolder, or ServiceInstall. When under a Registry element, this cannot be used
6134 /// if the Action attribute's value is remove or removeKeyOnInstall. This element has no Id attribute.
6135 /// The table and key are taken from the parent element.
6136 /// </summary>
6137 [GeneratedCode("XsdGen", "4.0.0.0")]
6138 public class PermissionEx : ISchemaElement, ISetAttributes
6139 {
6140
6141 private string domainField;
6142
6143 private bool domainFieldSet;
6144
6145 private string userField;
6146
6147 private bool userFieldSet;
6148
6149 private YesNoType readField;
6150
6151 private bool readFieldSet;
6152
6153 private YesNoType deleteField;
6154
6155 private bool deleteFieldSet;
6156
6157 private YesNoType readPermissionField;
6158
6159 private bool readPermissionFieldSet;
6160
6161 private YesNoType changePermissionField;
6162
6163 private bool changePermissionFieldSet;
6164
6165 private YesNoType takeOwnershipField;
6166
6167 private bool takeOwnershipFieldSet;
6168
6169 private YesNoType readAttributesField;
6170
6171 private bool readAttributesFieldSet;
6172
6173 private YesNoType writeAttributesField;
6174
6175 private bool writeAttributesFieldSet;
6176
6177 private YesNoType readExtendedAttributesField;
6178
6179 private bool readExtendedAttributesFieldSet;
6180
6181 private YesNoType writeExtendedAttributesField;
6182
6183 private bool writeExtendedAttributesFieldSet;
6184
6185 private YesNoType synchronizeField;
6186
6187 private bool synchronizeFieldSet;
6188
6189 private YesNoType createFileField;
6190
6191 private bool createFileFieldSet;
6192
6193 private YesNoType createChildField;
6194
6195 private bool createChildFieldSet;
6196
6197 private YesNoType deleteChildField;
6198
6199 private bool deleteChildFieldSet;
6200
6201 private YesNoType traverseField;
6202
6203 private bool traverseFieldSet;
6204
6205 private YesNoType appendField;
6206
6207 private bool appendFieldSet;
6208
6209 private YesNoType executeField;
6210
6211 private bool executeFieldSet;
6212
6213 private YesNoType writeField;
6214
6215 private bool writeFieldSet;
6216
6217 private YesNoType createSubkeysField;
6218
6219 private bool createSubkeysFieldSet;
6220
6221 private YesNoType enumerateSubkeysField;
6222
6223 private bool enumerateSubkeysFieldSet;
6224
6225 private YesNoType notifyField;
6226
6227 private bool notifyFieldSet;
6228
6229 private YesNoType createLinkField;
6230
6231 private bool createLinkFieldSet;
6232
6233 private YesNoType genericAllField;
6234
6235 private bool genericAllFieldSet;
6236
6237 private YesNoType genericExecuteField;
6238
6239 private bool genericExecuteFieldSet;
6240
6241 private YesNoType genericWriteField;
6242
6243 private bool genericWriteFieldSet;
6244
6245 private YesNoType genericReadField;
6246
6247 private bool genericReadFieldSet;
6248
6249 private YesNoType serviceQueryConfigField;
6250
6251 private bool serviceQueryConfigFieldSet;
6252
6253 private YesNoType serviceChangeConfigField;
6254
6255 private bool serviceChangeConfigFieldSet;
6256
6257 private YesNoType serviceQueryStatusField;
6258
6259 private bool serviceQueryStatusFieldSet;
6260
6261 private YesNoType serviceEnumerateDependentsField;
6262
6263 private bool serviceEnumerateDependentsFieldSet;
6264
6265 private YesNoType serviceStartField;
6266
6267 private bool serviceStartFieldSet;
6268
6269 private YesNoType serviceStopField;
6270
6271 private bool serviceStopFieldSet;
6272
6273 private YesNoType servicePauseContinueField;
6274
6275 private bool servicePauseContinueFieldSet;
6276
6277 private YesNoType serviceInterrogateField;
6278
6279 private bool serviceInterrogateFieldSet;
6280
6281 private YesNoType serviceUserDefinedControlField;
6282
6283 private bool serviceUserDefinedControlFieldSet;
6284
6285 private ISchemaElement parentElement;
6286
6287 public string Domain
6288 {
6289 get
6290 {
6291 return this.domainField;
6292 }
6293 set
6294 {
6295 this.domainFieldSet = true;
6296 this.domainField = value;
6297 }
6298 }
6299
6300 public string User
6301 {
6302 get
6303 {
6304 return this.userField;
6305 }
6306 set
6307 {
6308 this.userFieldSet = true;
6309 this.userField = value;
6310 }
6311 }
6312
6313 public YesNoType Read
6314 {
6315 get
6316 {
6317 return this.readField;
6318 }
6319 set
6320 {
6321 this.readFieldSet = true;
6322 this.readField = value;
6323 }
6324 }
6325
6326 public YesNoType Delete
6327 {
6328 get
6329 {
6330 return this.deleteField;
6331 }
6332 set
6333 {
6334 this.deleteFieldSet = true;
6335 this.deleteField = value;
6336 }
6337 }
6338
6339 public YesNoType ReadPermission
6340 {
6341 get
6342 {
6343 return this.readPermissionField;
6344 }
6345 set
6346 {
6347 this.readPermissionFieldSet = true;
6348 this.readPermissionField = value;
6349 }
6350 }
6351
6352 public YesNoType ChangePermission
6353 {
6354 get
6355 {
6356 return this.changePermissionField;
6357 }
6358 set
6359 {
6360 this.changePermissionFieldSet = true;
6361 this.changePermissionField = value;
6362 }
6363 }
6364
6365 public YesNoType TakeOwnership
6366 {
6367 get
6368 {
6369 return this.takeOwnershipField;
6370 }
6371 set
6372 {
6373 this.takeOwnershipFieldSet = true;
6374 this.takeOwnershipField = value;
6375 }
6376 }
6377
6378 public YesNoType ReadAttributes
6379 {
6380 get
6381 {
6382 return this.readAttributesField;
6383 }
6384 set
6385 {
6386 this.readAttributesFieldSet = true;
6387 this.readAttributesField = value;
6388 }
6389 }
6390
6391 public YesNoType WriteAttributes
6392 {
6393 get
6394 {
6395 return this.writeAttributesField;
6396 }
6397 set
6398 {
6399 this.writeAttributesFieldSet = true;
6400 this.writeAttributesField = value;
6401 }
6402 }
6403
6404 public YesNoType ReadExtendedAttributes
6405 {
6406 get
6407 {
6408 return this.readExtendedAttributesField;
6409 }
6410 set
6411 {
6412 this.readExtendedAttributesFieldSet = true;
6413 this.readExtendedAttributesField = value;
6414 }
6415 }
6416
6417 public YesNoType WriteExtendedAttributes
6418 {
6419 get
6420 {
6421 return this.writeExtendedAttributesField;
6422 }
6423 set
6424 {
6425 this.writeExtendedAttributesFieldSet = true;
6426 this.writeExtendedAttributesField = value;
6427 }
6428 }
6429
6430 public YesNoType Synchronize
6431 {
6432 get
6433 {
6434 return this.synchronizeField;
6435 }
6436 set
6437 {
6438 this.synchronizeFieldSet = true;
6439 this.synchronizeField = value;
6440 }
6441 }
6442
6443 /// <summary>
6444 /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent.
6445 /// </summary>
6446 public YesNoType CreateFile
6447 {
6448 get
6449 {
6450 return this.createFileField;
6451 }
6452 set
6453 {
6454 this.createFileFieldSet = true;
6455 this.createFileField = value;
6456 }
6457 }
6458
6459 /// <summary>
6460 /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent.
6461 /// </summary>
6462 public YesNoType CreateChild
6463 {
6464 get
6465 {
6466 return this.createChildField;
6467 }
6468 set
6469 {
6470 this.createChildFieldSet = true;
6471 this.createChildField = value;
6472 }
6473 }
6474
6475 /// <summary>
6476 /// For a directory, the right to delete a directory and all the files it contains, including read-only files. Only valid under a 'CreateFolder' parent.
6477 /// </summary>
6478 public YesNoType DeleteChild
6479 {
6480 get
6481 {
6482 return this.deleteChildField;
6483 }
6484 set
6485 {
6486 this.deleteChildFieldSet = true;
6487 this.deleteChildField = value;
6488 }
6489 }
6490
6491 /// <summary>
6492 /// For a directory, the right to traverse the directory. By default, users are assigned the BYPASS_TRAVERSE_CHECKING privilege, which ignores the FILE_TRAVERSE access right. Only valid under a 'CreateFolder' parent.
6493 /// </summary>
6494 public YesNoType Traverse
6495 {
6496 get
6497 {
6498 return this.traverseField;
6499 }
6500 set
6501 {
6502 this.traverseFieldSet = true;
6503 this.traverseField = value;
6504 }
6505 }
6506
6507 public YesNoType Append
6508 {
6509 get
6510 {
6511 return this.appendField;
6512 }
6513 set
6514 {
6515 this.appendFieldSet = true;
6516 this.appendField = value;
6517 }
6518 }
6519
6520 public YesNoType Execute
6521 {
6522 get
6523 {
6524 return this.executeField;
6525 }
6526 set
6527 {
6528 this.executeFieldSet = true;
6529 this.executeField = value;
6530 }
6531 }
6532
6533 public YesNoType Write
6534 {
6535 get
6536 {
6537 return this.writeField;
6538 }
6539 set
6540 {
6541 this.writeFieldSet = true;
6542 this.writeField = value;
6543 }
6544 }
6545
6546 public YesNoType CreateSubkeys
6547 {
6548 get
6549 {
6550 return this.createSubkeysField;
6551 }
6552 set
6553 {
6554 this.createSubkeysFieldSet = true;
6555 this.createSubkeysField = value;
6556 }
6557 }
6558
6559 public YesNoType EnumerateSubkeys
6560 {
6561 get
6562 {
6563 return this.enumerateSubkeysField;
6564 }
6565 set
6566 {
6567 this.enumerateSubkeysFieldSet = true;
6568 this.enumerateSubkeysField = value;
6569 }
6570 }
6571
6572 public YesNoType Notify
6573 {
6574 get
6575 {
6576 return this.notifyField;
6577 }
6578 set
6579 {
6580 this.notifyFieldSet = true;
6581 this.notifyField = value;
6582 }
6583 }
6584
6585 public YesNoType CreateLink
6586 {
6587 get
6588 {
6589 return this.createLinkField;
6590 }
6591 set
6592 {
6593 this.createLinkFieldSet = true;
6594 this.createLinkField = value;
6595 }
6596 }
6597
6598 public YesNoType GenericAll
6599 {
6600 get
6601 {
6602 return this.genericAllField;
6603 }
6604 set
6605 {
6606 this.genericAllFieldSet = true;
6607 this.genericAllField = value;
6608 }
6609 }
6610
6611 public YesNoType GenericExecute
6612 {
6613 get
6614 {
6615 return this.genericExecuteField;
6616 }
6617 set
6618 {
6619 this.genericExecuteFieldSet = true;
6620 this.genericExecuteField = value;
6621 }
6622 }
6623
6624 public YesNoType GenericWrite
6625 {
6626 get
6627 {
6628 return this.genericWriteField;
6629 }
6630 set
6631 {
6632 this.genericWriteFieldSet = true;
6633 this.genericWriteField = value;
6634 }
6635 }
6636
6637 /// <summary>
6638 /// specifying this will fail to grant read access
6639 /// </summary>
6640 public YesNoType GenericRead
6641 {
6642 get
6643 {
6644 return this.genericReadField;
6645 }
6646 set
6647 {
6648 this.genericReadFieldSet = true;
6649 this.genericReadField = value;
6650 }
6651 }
6652
6653 /// <summary>
6654 /// Required to call the QueryServiceConfig and QueryServiceConfig2 functions to query the service configuration. Only valid under a 'ServiceInstall' parent.
6655 /// </summary>
6656 public YesNoType ServiceQueryConfig
6657 {
6658 get
6659 {
6660 return this.serviceQueryConfigField;
6661 }
6662 set
6663 {
6664 this.serviceQueryConfigFieldSet = true;
6665 this.serviceQueryConfigField = value;
6666 }
6667 }
6668
6669 /// <summary>
6670 /// Required to call the ChangeServiceConfig or ChangeServiceConfig2 function to change the service configuration. Only valid under a 'ServiceInstall' parent.
6671 /// </summary>
6672 public YesNoType ServiceChangeConfig
6673 {
6674 get
6675 {
6676 return this.serviceChangeConfigField;
6677 }
6678 set
6679 {
6680 this.serviceChangeConfigFieldSet = true;
6681 this.serviceChangeConfigField = value;
6682 }
6683 }
6684
6685 /// <summary>
6686 /// Required to call the QueryServiceStatus function to ask the service control manager about the status of the service. Only valid under a 'ServiceInstall' parent.
6687 /// </summary>
6688 public YesNoType ServiceQueryStatus
6689 {
6690 get
6691 {
6692 return this.serviceQueryStatusField;
6693 }
6694 set
6695 {
6696 this.serviceQueryStatusFieldSet = true;
6697 this.serviceQueryStatusField = value;
6698 }
6699 }
6700
6701 /// <summary>
6702 /// Required to call the EnumDependentServices function to enumerate all the services dependent on the service. Only valid under a 'ServiceInstall' parent.
6703 /// </summary>
6704 public YesNoType ServiceEnumerateDependents
6705 {
6706 get
6707 {
6708 return this.serviceEnumerateDependentsField;
6709 }
6710 set
6711 {
6712 this.serviceEnumerateDependentsFieldSet = true;
6713 this.serviceEnumerateDependentsField = value;
6714 }
6715 }
6716
6717 /// <summary>
6718 /// Required to call the StartService function to start the service. Only valid under a 'ServiceInstall' parent.
6719 /// </summary>
6720 public YesNoType ServiceStart
6721 {
6722 get
6723 {
6724 return this.serviceStartField;
6725 }
6726 set
6727 {
6728 this.serviceStartFieldSet = true;
6729 this.serviceStartField = value;
6730 }
6731 }
6732
6733 /// <summary>
6734 /// Required to call the ControlService function to stop the service. Only valid under a 'ServiceInstall' parent.
6735 /// </summary>
6736 public YesNoType ServiceStop
6737 {
6738 get
6739 {
6740 return this.serviceStopField;
6741 }
6742 set
6743 {
6744 this.serviceStopFieldSet = true;
6745 this.serviceStopField = value;
6746 }
6747 }
6748
6749 /// <summary>
6750 /// Required to call the ControlService function to pause or continue the service. Only valid under a 'ServiceInstall' parent.
6751 /// </summary>
6752 public YesNoType ServicePauseContinue
6753 {
6754 get
6755 {
6756 return this.servicePauseContinueField;
6757 }
6758 set
6759 {
6760 this.servicePauseContinueFieldSet = true;
6761 this.servicePauseContinueField = value;
6762 }
6763 }
6764
6765 /// <summary>
6766 /// Required to call the ControlService function to ask the service to report its status immediately. Only valid under a 'ServiceInstall' parent.
6767 /// </summary>
6768 public YesNoType ServiceInterrogate
6769 {
6770 get
6771 {
6772 return this.serviceInterrogateField;
6773 }
6774 set
6775 {
6776 this.serviceInterrogateFieldSet = true;
6777 this.serviceInterrogateField = value;
6778 }
6779 }
6780
6781 /// <summary>
6782 /// Required to call the ControlService function to specify a user-defined control code. Only valid under a 'ServiceInstall' parent.
6783 /// </summary>
6784 public YesNoType ServiceUserDefinedControl
6785 {
6786 get
6787 {
6788 return this.serviceUserDefinedControlField;
6789 }
6790 set
6791 {
6792 this.serviceUserDefinedControlFieldSet = true;
6793 this.serviceUserDefinedControlField = value;
6794 }
6795 }
6796
6797 public virtual ISchemaElement ParentElement
6798 {
6799 get
6800 {
6801 return this.parentElement;
6802 }
6803 set
6804 {
6805 this.parentElement = value;
6806 }
6807 }
6808
6809 /// <summary>
6810 /// Processes this element and all child elements into an XmlWriter.
6811 /// </summary>
6812 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
6813 public virtual void OutputXml(XmlWriter writer)
6814 {
6815 if ((null == writer))
6816 {
6817 throw new ArgumentNullException("writer");
6818 }
6819 writer.WriteStartElement("PermissionEx", "http://wixtoolset.org/schemas/v4/wxs/util");
6820 if (this.domainFieldSet)
6821 {
6822 writer.WriteAttributeString("Domain", this.domainField);
6823 }
6824 if (this.userFieldSet)
6825 {
6826 writer.WriteAttributeString("User", this.userField);
6827 }
6828 if (this.readFieldSet)
6829 {
6830 if ((this.readField == YesNoType.no))
6831 {
6832 writer.WriteAttributeString("Read", "no");
6833 }
6834 if ((this.readField == YesNoType.yes))
6835 {
6836 writer.WriteAttributeString("Read", "yes");
6837 }
6838 }
6839 if (this.deleteFieldSet)
6840 {
6841 if ((this.deleteField == YesNoType.no))
6842 {
6843 writer.WriteAttributeString("Delete", "no");
6844 }
6845 if ((this.deleteField == YesNoType.yes))
6846 {
6847 writer.WriteAttributeString("Delete", "yes");
6848 }
6849 }
6850 if (this.readPermissionFieldSet)
6851 {
6852 if ((this.readPermissionField == YesNoType.no))
6853 {
6854 writer.WriteAttributeString("ReadPermission", "no");
6855 }
6856 if ((this.readPermissionField == YesNoType.yes))
6857 {
6858 writer.WriteAttributeString("ReadPermission", "yes");
6859 }
6860 }
6861 if (this.changePermissionFieldSet)
6862 {
6863 if ((this.changePermissionField == YesNoType.no))
6864 {
6865 writer.WriteAttributeString("ChangePermission", "no");
6866 }
6867 if ((this.changePermissionField == YesNoType.yes))
6868 {
6869 writer.WriteAttributeString("ChangePermission", "yes");
6870 }
6871 }
6872 if (this.takeOwnershipFieldSet)
6873 {
6874 if ((this.takeOwnershipField == YesNoType.no))
6875 {
6876 writer.WriteAttributeString("TakeOwnership", "no");
6877 }
6878 if ((this.takeOwnershipField == YesNoType.yes))
6879 {
6880 writer.WriteAttributeString("TakeOwnership", "yes");
6881 }
6882 }
6883 if (this.readAttributesFieldSet)
6884 {
6885 if ((this.readAttributesField == YesNoType.no))
6886 {
6887 writer.WriteAttributeString("ReadAttributes", "no");
6888 }
6889 if ((this.readAttributesField == YesNoType.yes))
6890 {
6891 writer.WriteAttributeString("ReadAttributes", "yes");
6892 }
6893 }
6894 if (this.writeAttributesFieldSet)
6895 {
6896 if ((this.writeAttributesField == YesNoType.no))
6897 {
6898 writer.WriteAttributeString("WriteAttributes", "no");
6899 }
6900 if ((this.writeAttributesField == YesNoType.yes))
6901 {
6902 writer.WriteAttributeString("WriteAttributes", "yes");
6903 }
6904 }
6905 if (this.readExtendedAttributesFieldSet)
6906 {
6907 if ((this.readExtendedAttributesField == YesNoType.no))
6908 {
6909 writer.WriteAttributeString("ReadExtendedAttributes", "no");
6910 }
6911 if ((this.readExtendedAttributesField == YesNoType.yes))
6912 {
6913 writer.WriteAttributeString("ReadExtendedAttributes", "yes");
6914 }
6915 }
6916 if (this.writeExtendedAttributesFieldSet)
6917 {
6918 if ((this.writeExtendedAttributesField == YesNoType.no))
6919 {
6920 writer.WriteAttributeString("WriteExtendedAttributes", "no");
6921 }
6922 if ((this.writeExtendedAttributesField == YesNoType.yes))
6923 {
6924 writer.WriteAttributeString("WriteExtendedAttributes", "yes");
6925 }
6926 }
6927 if (this.synchronizeFieldSet)
6928 {
6929 if ((this.synchronizeField == YesNoType.no))
6930 {
6931 writer.WriteAttributeString("Synchronize", "no");
6932 }
6933 if ((this.synchronizeField == YesNoType.yes))
6934 {
6935 writer.WriteAttributeString("Synchronize", "yes");
6936 }
6937 }
6938 if (this.createFileFieldSet)
6939 {
6940 if ((this.createFileField == YesNoType.no))
6941 {
6942 writer.WriteAttributeString("CreateFile", "no");
6943 }
6944 if ((this.createFileField == YesNoType.yes))
6945 {
6946 writer.WriteAttributeString("CreateFile", "yes");
6947 }
6948 }
6949 if (this.createChildFieldSet)
6950 {
6951 if ((this.createChildField == YesNoType.no))
6952 {
6953 writer.WriteAttributeString("CreateChild", "no");
6954 }
6955 if ((this.createChildField == YesNoType.yes))
6956 {
6957 writer.WriteAttributeString("CreateChild", "yes");
6958 }
6959 }
6960 if (this.deleteChildFieldSet)
6961 {
6962 if ((this.deleteChildField == YesNoType.no))
6963 {
6964 writer.WriteAttributeString("DeleteChild", "no");
6965 }
6966 if ((this.deleteChildField == YesNoType.yes))
6967 {
6968 writer.WriteAttributeString("DeleteChild", "yes");
6969 }
6970 }
6971 if (this.traverseFieldSet)
6972 {
6973 if ((this.traverseField == YesNoType.no))
6974 {
6975 writer.WriteAttributeString("Traverse", "no");
6976 }
6977 if ((this.traverseField == YesNoType.yes))
6978 {
6979 writer.WriteAttributeString("Traverse", "yes");
6980 }
6981 }
6982 if (this.appendFieldSet)
6983 {
6984 if ((this.appendField == YesNoType.no))
6985 {
6986 writer.WriteAttributeString("Append", "no");
6987 }
6988 if ((this.appendField == YesNoType.yes))
6989 {
6990 writer.WriteAttributeString("Append", "yes");
6991 }
6992 }
6993 if (this.executeFieldSet)
6994 {
6995 if ((this.executeField == YesNoType.no))
6996 {
6997 writer.WriteAttributeString("Execute", "no");
6998 }
6999 if ((this.executeField == YesNoType.yes))
7000 {
7001 writer.WriteAttributeString("Execute", "yes");
7002 }
7003 }
7004 if (this.writeFieldSet)
7005 {
7006 if ((this.writeField == YesNoType.no))
7007 {
7008 writer.WriteAttributeString("Write", "no");
7009 }
7010 if ((this.writeField == YesNoType.yes))
7011 {
7012 writer.WriteAttributeString("Write", "yes");
7013 }
7014 }
7015 if (this.createSubkeysFieldSet)
7016 {
7017 if ((this.createSubkeysField == YesNoType.no))
7018 {
7019 writer.WriteAttributeString("CreateSubkeys", "no");
7020 }
7021 if ((this.createSubkeysField == YesNoType.yes))
7022 {
7023 writer.WriteAttributeString("CreateSubkeys", "yes");
7024 }
7025 }
7026 if (this.enumerateSubkeysFieldSet)
7027 {
7028 if ((this.enumerateSubkeysField == YesNoType.no))
7029 {
7030 writer.WriteAttributeString("EnumerateSubkeys", "no");
7031 }
7032 if ((this.enumerateSubkeysField == YesNoType.yes))
7033 {
7034 writer.WriteAttributeString("EnumerateSubkeys", "yes");
7035 }
7036 }
7037 if (this.notifyFieldSet)
7038 {
7039 if ((this.notifyField == YesNoType.no))
7040 {
7041 writer.WriteAttributeString("Notify", "no");
7042 }
7043 if ((this.notifyField == YesNoType.yes))
7044 {
7045 writer.WriteAttributeString("Notify", "yes");
7046 }
7047 }
7048 if (this.createLinkFieldSet)
7049 {
7050 if ((this.createLinkField == YesNoType.no))
7051 {
7052 writer.WriteAttributeString("CreateLink", "no");
7053 }
7054 if ((this.createLinkField == YesNoType.yes))
7055 {
7056 writer.WriteAttributeString("CreateLink", "yes");
7057 }
7058 }
7059 if (this.genericAllFieldSet)
7060 {
7061 if ((this.genericAllField == YesNoType.no))
7062 {
7063 writer.WriteAttributeString("GenericAll", "no");
7064 }
7065 if ((this.genericAllField == YesNoType.yes))
7066 {
7067 writer.WriteAttributeString("GenericAll", "yes");
7068 }
7069 }
7070 if (this.genericExecuteFieldSet)
7071 {
7072 if ((this.genericExecuteField == YesNoType.no))
7073 {
7074 writer.WriteAttributeString("GenericExecute", "no");
7075 }
7076 if ((this.genericExecuteField == YesNoType.yes))
7077 {
7078 writer.WriteAttributeString("GenericExecute", "yes");
7079 }
7080 }
7081 if (this.genericWriteFieldSet)
7082 {
7083 if ((this.genericWriteField == YesNoType.no))
7084 {
7085 writer.WriteAttributeString("GenericWrite", "no");
7086 }
7087 if ((this.genericWriteField == YesNoType.yes))
7088 {
7089 writer.WriteAttributeString("GenericWrite", "yes");
7090 }
7091 }
7092 if (this.genericReadFieldSet)
7093 {
7094 if ((this.genericReadField == YesNoType.no))
7095 {
7096 writer.WriteAttributeString("GenericRead", "no");
7097 }
7098 if ((this.genericReadField == YesNoType.yes))
7099 {
7100 writer.WriteAttributeString("GenericRead", "yes");
7101 }
7102 }
7103 if (this.serviceQueryConfigFieldSet)
7104 {
7105 if ((this.serviceQueryConfigField == YesNoType.no))
7106 {
7107 writer.WriteAttributeString("ServiceQueryConfig", "no");
7108 }
7109 if ((this.serviceQueryConfigField == YesNoType.yes))
7110 {
7111 writer.WriteAttributeString("ServiceQueryConfig", "yes");
7112 }
7113 }
7114 if (this.serviceChangeConfigFieldSet)
7115 {
7116 if ((this.serviceChangeConfigField == YesNoType.no))
7117 {
7118 writer.WriteAttributeString("ServiceChangeConfig", "no");
7119 }
7120 if ((this.serviceChangeConfigField == YesNoType.yes))
7121 {
7122 writer.WriteAttributeString("ServiceChangeConfig", "yes");
7123 }
7124 }
7125 if (this.serviceQueryStatusFieldSet)
7126 {
7127 if ((this.serviceQueryStatusField == YesNoType.no))
7128 {
7129 writer.WriteAttributeString("ServiceQueryStatus", "no");
7130 }
7131 if ((this.serviceQueryStatusField == YesNoType.yes))
7132 {
7133 writer.WriteAttributeString("ServiceQueryStatus", "yes");
7134 }
7135 }
7136 if (this.serviceEnumerateDependentsFieldSet)
7137 {
7138 if ((this.serviceEnumerateDependentsField == YesNoType.no))
7139 {
7140 writer.WriteAttributeString("ServiceEnumerateDependents", "no");
7141 }
7142 if ((this.serviceEnumerateDependentsField == YesNoType.yes))
7143 {
7144 writer.WriteAttributeString("ServiceEnumerateDependents", "yes");
7145 }
7146 }
7147 if (this.serviceStartFieldSet)
7148 {
7149 if ((this.serviceStartField == YesNoType.no))
7150 {
7151 writer.WriteAttributeString("ServiceStart", "no");
7152 }
7153 if ((this.serviceStartField == YesNoType.yes))
7154 {
7155 writer.WriteAttributeString("ServiceStart", "yes");
7156 }
7157 }
7158 if (this.serviceStopFieldSet)
7159 {
7160 if ((this.serviceStopField == YesNoType.no))
7161 {
7162 writer.WriteAttributeString("ServiceStop", "no");
7163 }
7164 if ((this.serviceStopField == YesNoType.yes))
7165 {
7166 writer.WriteAttributeString("ServiceStop", "yes");
7167 }
7168 }
7169 if (this.servicePauseContinueFieldSet)
7170 {
7171 if ((this.servicePauseContinueField == YesNoType.no))
7172 {
7173 writer.WriteAttributeString("ServicePauseContinue", "no");
7174 }
7175 if ((this.servicePauseContinueField == YesNoType.yes))
7176 {
7177 writer.WriteAttributeString("ServicePauseContinue", "yes");
7178 }
7179 }
7180 if (this.serviceInterrogateFieldSet)
7181 {
7182 if ((this.serviceInterrogateField == YesNoType.no))
7183 {
7184 writer.WriteAttributeString("ServiceInterrogate", "no");
7185 }
7186 if ((this.serviceInterrogateField == YesNoType.yes))
7187 {
7188 writer.WriteAttributeString("ServiceInterrogate", "yes");
7189 }
7190 }
7191 if (this.serviceUserDefinedControlFieldSet)
7192 {
7193 if ((this.serviceUserDefinedControlField == YesNoType.no))
7194 {
7195 writer.WriteAttributeString("ServiceUserDefinedControl", "no");
7196 }
7197 if ((this.serviceUserDefinedControlField == YesNoType.yes))
7198 {
7199 writer.WriteAttributeString("ServiceUserDefinedControl", "yes");
7200 }
7201 }
7202 writer.WriteEndElement();
7203 }
7204
7205 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7206 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
7207 void ISetAttributes.SetAttribute(string name, string value)
7208 {
7209 if (String.IsNullOrEmpty(name))
7210 {
7211 throw new ArgumentNullException("name");
7212 }
7213 if (("Domain" == name))
7214 {
7215 this.domainField = value;
7216 this.domainFieldSet = true;
7217 }
7218 if (("User" == name))
7219 {
7220 this.userField = value;
7221 this.userFieldSet = true;
7222 }
7223 if (("Read" == name))
7224 {
7225 this.readField = Enums.ParseYesNoType(value);
7226 this.readFieldSet = true;
7227 }
7228 if (("Delete" == name))
7229 {
7230 this.deleteField = Enums.ParseYesNoType(value);
7231 this.deleteFieldSet = true;
7232 }
7233 if (("ReadPermission" == name))
7234 {
7235 this.readPermissionField = Enums.ParseYesNoType(value);
7236 this.readPermissionFieldSet = true;
7237 }
7238 if (("ChangePermission" == name))
7239 {
7240 this.changePermissionField = Enums.ParseYesNoType(value);
7241 this.changePermissionFieldSet = true;
7242 }
7243 if (("TakeOwnership" == name))
7244 {
7245 this.takeOwnershipField = Enums.ParseYesNoType(value);
7246 this.takeOwnershipFieldSet = true;
7247 }
7248 if (("ReadAttributes" == name))
7249 {
7250 this.readAttributesField = Enums.ParseYesNoType(value);
7251 this.readAttributesFieldSet = true;
7252 }
7253 if (("WriteAttributes" == name))
7254 {
7255 this.writeAttributesField = Enums.ParseYesNoType(value);
7256 this.writeAttributesFieldSet = true;
7257 }
7258 if (("ReadExtendedAttributes" == name))
7259 {
7260 this.readExtendedAttributesField = Enums.ParseYesNoType(value);
7261 this.readExtendedAttributesFieldSet = true;
7262 }
7263 if (("WriteExtendedAttributes" == name))
7264 {
7265 this.writeExtendedAttributesField = Enums.ParseYesNoType(value);
7266 this.writeExtendedAttributesFieldSet = true;
7267 }
7268 if (("Synchronize" == name))
7269 {
7270 this.synchronizeField = Enums.ParseYesNoType(value);
7271 this.synchronizeFieldSet = true;
7272 }
7273 if (("CreateFile" == name))
7274 {
7275 this.createFileField = Enums.ParseYesNoType(value);
7276 this.createFileFieldSet = true;
7277 }
7278 if (("CreateChild" == name))
7279 {
7280 this.createChildField = Enums.ParseYesNoType(value);
7281 this.createChildFieldSet = true;
7282 }
7283 if (("DeleteChild" == name))
7284 {
7285 this.deleteChildField = Enums.ParseYesNoType(value);
7286 this.deleteChildFieldSet = true;
7287 }
7288 if (("Traverse" == name))
7289 {
7290 this.traverseField = Enums.ParseYesNoType(value);
7291 this.traverseFieldSet = true;
7292 }
7293 if (("Append" == name))
7294 {
7295 this.appendField = Enums.ParseYesNoType(value);
7296 this.appendFieldSet = true;
7297 }
7298 if (("Execute" == name))
7299 {
7300 this.executeField = Enums.ParseYesNoType(value);
7301 this.executeFieldSet = true;
7302 }
7303 if (("Write" == name))
7304 {
7305 this.writeField = Enums.ParseYesNoType(value);
7306 this.writeFieldSet = true;
7307 }
7308 if (("CreateSubkeys" == name))
7309 {
7310 this.createSubkeysField = Enums.ParseYesNoType(value);
7311 this.createSubkeysFieldSet = true;
7312 }
7313 if (("EnumerateSubkeys" == name))
7314 {
7315 this.enumerateSubkeysField = Enums.ParseYesNoType(value);
7316 this.enumerateSubkeysFieldSet = true;
7317 }
7318 if (("Notify" == name))
7319 {
7320 this.notifyField = Enums.ParseYesNoType(value);
7321 this.notifyFieldSet = true;
7322 }
7323 if (("CreateLink" == name))
7324 {
7325 this.createLinkField = Enums.ParseYesNoType(value);
7326 this.createLinkFieldSet = true;
7327 }
7328 if (("GenericAll" == name))
7329 {
7330 this.genericAllField = Enums.ParseYesNoType(value);
7331 this.genericAllFieldSet = true;
7332 }
7333 if (("GenericExecute" == name))
7334 {
7335 this.genericExecuteField = Enums.ParseYesNoType(value);
7336 this.genericExecuteFieldSet = true;
7337 }
7338 if (("GenericWrite" == name))
7339 {
7340 this.genericWriteField = Enums.ParseYesNoType(value);
7341 this.genericWriteFieldSet = true;
7342 }
7343 if (("GenericRead" == name))
7344 {
7345 this.genericReadField = Enums.ParseYesNoType(value);
7346 this.genericReadFieldSet = true;
7347 }
7348 if (("ServiceQueryConfig" == name))
7349 {
7350 this.serviceQueryConfigField = Enums.ParseYesNoType(value);
7351 this.serviceQueryConfigFieldSet = true;
7352 }
7353 if (("ServiceChangeConfig" == name))
7354 {
7355 this.serviceChangeConfigField = Enums.ParseYesNoType(value);
7356 this.serviceChangeConfigFieldSet = true;
7357 }
7358 if (("ServiceQueryStatus" == name))
7359 {
7360 this.serviceQueryStatusField = Enums.ParseYesNoType(value);
7361 this.serviceQueryStatusFieldSet = true;
7362 }
7363 if (("ServiceEnumerateDependents" == name))
7364 {
7365 this.serviceEnumerateDependentsField = Enums.ParseYesNoType(value);
7366 this.serviceEnumerateDependentsFieldSet = true;
7367 }
7368 if (("ServiceStart" == name))
7369 {
7370 this.serviceStartField = Enums.ParseYesNoType(value);
7371 this.serviceStartFieldSet = true;
7372 }
7373 if (("ServiceStop" == name))
7374 {
7375 this.serviceStopField = Enums.ParseYesNoType(value);
7376 this.serviceStopFieldSet = true;
7377 }
7378 if (("ServicePauseContinue" == name))
7379 {
7380 this.servicePauseContinueField = Enums.ParseYesNoType(value);
7381 this.servicePauseContinueFieldSet = true;
7382 }
7383 if (("ServiceInterrogate" == name))
7384 {
7385 this.serviceInterrogateField = Enums.ParseYesNoType(value);
7386 this.serviceInterrogateFieldSet = true;
7387 }
7388 if (("ServiceUserDefinedControl" == name))
7389 {
7390 this.serviceUserDefinedControlField = Enums.ParseYesNoType(value);
7391 this.serviceUserDefinedControlFieldSet = true;
7392 }
7393 }
7394 }
7395
7396 /// <summary>
7397 /// Describes a product search.
7398 /// </summary>
7399 [GeneratedCode("XsdGen", "4.0.0.0")]
7400 public class ProductSearch : ISchemaElement, ISetAttributes
7401 {
7402
7403 private string idField;
7404
7405 private bool idFieldSet;
7406
7407 private string variableField;
7408
7409 private bool variableFieldSet;
7410
7411 private string conditionField;
7412
7413 private bool conditionFieldSet;
7414
7415 private string afterField;
7416
7417 private bool afterFieldSet;
7418
7419 private string guidField;
7420
7421 private bool guidFieldSet;
7422
7423 private string productCodeField;
7424
7425 private bool productCodeFieldSet;
7426
7427 private string upgradeCodeField;
7428
7429 private bool upgradeCodeFieldSet;
7430
7431 private ResultType resultField;
7432
7433 private bool resultFieldSet;
7434
7435 private ISchemaElement parentElement;
7436
7437 /// <summary>
7438 /// Id of the search for ordering and dependency.
7439 /// </summary>
7440 public string Id
7441 {
7442 get
7443 {
7444 return this.idField;
7445 }
7446 set
7447 {
7448 this.idFieldSet = true;
7449 this.idField = value;
7450 }
7451 }
7452
7453 /// <summary>
7454 /// Name of the variable in which to place the result of the search.
7455 /// </summary>
7456 public string Variable
7457 {
7458 get
7459 {
7460 return this.variableField;
7461 }
7462 set
7463 {
7464 this.variableFieldSet = true;
7465 this.variableField = value;
7466 }
7467 }
7468
7469 /// <summary>
7470 /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all.
7471 /// </summary>
7472 public string Condition
7473 {
7474 get
7475 {
7476 return this.conditionField;
7477 }
7478 set
7479 {
7480 this.conditionFieldSet = true;
7481 this.conditionField = value;
7482 }
7483 }
7484
7485 /// <summary>
7486 /// Id of the search that this one should come after.
7487 /// </summary>
7488 public string After
7489 {
7490 get
7491 {
7492 return this.afterField;
7493 }
7494 set
7495 {
7496 this.afterFieldSet = true;
7497 this.afterField = value;
7498 }
7499 }
7500
7501 /// <summary>
7502 /// The Guid attribute has been deprecated; use the ProductCode or UpgradeCode attribute instead. If this attribute is used, it is assumed to be a ProductCode.
7503 /// </summary>
7504 public string Guid
7505 {
7506 get
7507 {
7508 return this.guidField;
7509 }
7510 set
7511 {
7512 this.guidFieldSet = true;
7513 this.guidField = value;
7514 }
7515 }
7516
7517 /// <summary>
7518 /// The ProductCode to use for the search. This attribute must be omitted if UpgradeCode is specified.
7519 /// </summary>
7520 public string ProductCode
7521 {
7522 get
7523 {
7524 return this.productCodeField;
7525 }
7526 set
7527 {
7528 this.productCodeFieldSet = true;
7529 this.productCodeField = value;
7530 }
7531 }
7532
7533 /// <summary>
7534 /// The UpgradeCode to use for the search. This attribute must be omitted if ProductCode is specified. Note that if multiple products are found, the highest versioned product will be used for the result.
7535 /// </summary>
7536 public string UpgradeCode
7537 {
7538 get
7539 {
7540 return this.upgradeCodeField;
7541 }
7542 set
7543 {
7544 this.upgradeCodeFieldSet = true;
7545 this.upgradeCodeField = value;
7546 }
7547 }
7548
7549 /// <summary>
7550 /// Rather than saving the product version into the variable, a ProductSearch can save another attribute of the matching product instead.
7551 /// </summary>
7552 public ResultType Result
7553 {
7554 get
7555 {
7556 return this.resultField;
7557 }
7558 set
7559 {
7560 this.resultFieldSet = true;
7561 this.resultField = value;
7562 }
7563 }
7564
7565 public virtual ISchemaElement ParentElement
7566 {
7567 get
7568 {
7569 return this.parentElement;
7570 }
7571 set
7572 {
7573 this.parentElement = value;
7574 }
7575 }
7576
7577 /// <summary>
7578 /// Parses a ResultType from a string.
7579 /// </summary>
7580 public static ResultType ParseResultType(string value)
7581 {
7582 ResultType parsedValue;
7583 ProductSearch.TryParseResultType(value, out parsedValue);
7584 return parsedValue;
7585 }
7586
7587 /// <summary>
7588 /// Tries to parse a ResultType from a string.
7589 /// </summary>
7590 public static bool TryParseResultType(string value, out ResultType parsedValue)
7591 {
7592 parsedValue = ResultType.NotSet;
7593 if (string.IsNullOrEmpty(value))
7594 {
7595 return false;
7596 }
7597 if (("version" == value))
7598 {
7599 parsedValue = ResultType.version;
7600 }
7601 else
7602 {
7603 if (("language" == value))
7604 {
7605 parsedValue = ResultType.language;
7606 }
7607 else
7608 {
7609 if (("state" == value))
7610 {
7611 parsedValue = ResultType.state;
7612 }
7613 else
7614 {
7615 if (("assignment" == value))
7616 {
7617 parsedValue = ResultType.assignment;
7618 }
7619 else
7620 {
7621 parsedValue = ResultType.IllegalValue;
7622 return false;
7623 }
7624 }
7625 }
7626 }
7627 return true;
7628 }
7629
7630 /// <summary>
7631 /// Processes this element and all child elements into an XmlWriter.
7632 /// </summary>
7633 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
7634 public virtual void OutputXml(XmlWriter writer)
7635 {
7636 if ((null == writer))
7637 {
7638 throw new ArgumentNullException("writer");
7639 }
7640 writer.WriteStartElement("ProductSearch", "http://wixtoolset.org/schemas/v4/wxs/util");
7641 if (this.idFieldSet)
7642 {
7643 writer.WriteAttributeString("Id", this.idField);
7644 }
7645 if (this.variableFieldSet)
7646 {
7647 writer.WriteAttributeString("Variable", this.variableField);
7648 }
7649 if (this.conditionFieldSet)
7650 {
7651 writer.WriteAttributeString("Condition", this.conditionField);
7652 }
7653 if (this.afterFieldSet)
7654 {
7655 writer.WriteAttributeString("After", this.afterField);
7656 }
7657 if (this.guidFieldSet)
7658 {
7659 writer.WriteAttributeString("Guid", this.guidField);
7660 }
7661 if (this.productCodeFieldSet)
7662 {
7663 writer.WriteAttributeString("ProductCode", this.productCodeField);
7664 }
7665 if (this.upgradeCodeFieldSet)
7666 {
7667 writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField);
7668 }
7669 if (this.resultFieldSet)
7670 {
7671 if ((this.resultField == ResultType.version))
7672 {
7673 writer.WriteAttributeString("Result", "version");
7674 }
7675 if ((this.resultField == ResultType.language))
7676 {
7677 writer.WriteAttributeString("Result", "language");
7678 }
7679 if ((this.resultField == ResultType.state))
7680 {
7681 writer.WriteAttributeString("Result", "state");
7682 }
7683 if ((this.resultField == ResultType.assignment))
7684 {
7685 writer.WriteAttributeString("Result", "assignment");
7686 }
7687 }
7688 writer.WriteEndElement();
7689 }
7690
7691 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7692 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
7693 void ISetAttributes.SetAttribute(string name, string value)
7694 {
7695 if (String.IsNullOrEmpty(name))
7696 {
7697 throw new ArgumentNullException("name");
7698 }
7699 if (("Id" == name))
7700 {
7701 this.idField = value;
7702 this.idFieldSet = true;
7703 }
7704 if (("Variable" == name))
7705 {
7706 this.variableField = value;
7707 this.variableFieldSet = true;
7708 }
7709 if (("Condition" == name))
7710 {
7711 this.conditionField = value;
7712 this.conditionFieldSet = true;
7713 }
7714 if (("After" == name))
7715 {
7716 this.afterField = value;
7717 this.afterFieldSet = true;
7718 }
7719 if (("Guid" == name))
7720 {
7721 this.guidField = value;
7722 this.guidFieldSet = true;
7723 }
7724 if (("ProductCode" == name))
7725 {
7726 this.productCodeField = value;
7727 this.productCodeFieldSet = true;
7728 }
7729 if (("UpgradeCode" == name))
7730 {
7731 this.upgradeCodeField = value;
7732 this.upgradeCodeFieldSet = true;
7733 }
7734 if (("Result" == name))
7735 {
7736 this.resultField = ProductSearch.ParseResultType(value);
7737 this.resultFieldSet = true;
7738 }
7739 }
7740
7741 [GeneratedCode("XsdGen", "4.0.0.0")]
7742 public enum ResultType
7743 {
7744
7745 IllegalValue = int.MaxValue,
7746
7747 NotSet = -1,
7748
7749 /// <summary>
7750 /// Saves the version of a matching product if found; 0.0.0.0 otherwise. This is the default.
7751 /// </summary>
7752 version,
7753
7754 /// <summary>
7755 /// Saves the language of a matching product if found; empty otherwise.
7756 /// </summary>
7757 language,
7758
7759 /// <summary>
7760 /// Saves the state of the product: advertised (1), absent (2), or locally installed (5).
7761 /// </summary>
7762 state,
7763
7764 /// <summary>
7765 /// Saves the assignment type of the product: per-user (0), or per-machine (1).
7766 /// </summary>
7767 assignment,
7768 }
7769 }
7770
7771 /// <summary>
7772 /// References a ProductSearch.
7773 /// </summary>
7774 [GeneratedCode("XsdGen", "4.0.0.0")]
7775 public class ProductSearchRef : ISchemaElement, ISetAttributes
7776 {
7777
7778 private string idField;
7779
7780 private bool idFieldSet;
7781
7782 private ISchemaElement parentElement;
7783
7784 public string Id
7785 {
7786 get
7787 {
7788 return this.idField;
7789 }
7790 set
7791 {
7792 this.idFieldSet = true;
7793 this.idField = value;
7794 }
7795 }
7796
7797 public virtual ISchemaElement ParentElement
7798 {
7799 get
7800 {
7801 return this.parentElement;
7802 }
7803 set
7804 {
7805 this.parentElement = value;
7806 }
7807 }
7808
7809 /// <summary>
7810 /// Processes this element and all child elements into an XmlWriter.
7811 /// </summary>
7812 public virtual void OutputXml(XmlWriter writer)
7813 {
7814 if ((null == writer))
7815 {
7816 throw new ArgumentNullException("writer");
7817 }
7818 writer.WriteStartElement("ProductSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util");
7819 if (this.idFieldSet)
7820 {
7821 writer.WriteAttributeString("Id", this.idField);
7822 }
7823 writer.WriteEndElement();
7824 }
7825
7826 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7827 void ISetAttributes.SetAttribute(string name, string value)
7828 {
7829 if (String.IsNullOrEmpty(name))
7830 {
7831 throw new ArgumentNullException("name");
7832 }
7833 if (("Id" == name))
7834 {
7835 this.idField = value;
7836 this.idFieldSet = true;
7837 }
7838 }
7839 }
7840
7841 /// <summary>
7842 /// Remove a folder and all contained files and folders if the parent component is selected for installation or removal.
7843 /// The folder must be specified in the Property attribute as the name of a property that will have a value that resolves
7844 /// to the full path of the folder before the CostInitialize action. Note that Directory ids cannot be used.
7845 /// For more details, see the Remarks.
7846 /// </summary>
7847 [GeneratedCode("XsdGen", "4.0.0.0")]
7848 public class RemoveFolderEx : ISchemaElement, ISetAttributes
7849 {
7850
7851 private string idField;
7852
7853 private bool idFieldSet;
7854
7855 private string propertyField;
7856
7857 private bool propertyFieldSet;
7858
7859 private OnType onField;
7860
7861 private bool onFieldSet;
7862
7863 private ISchemaElement parentElement;
7864
7865 /// <summary>
7866 /// Primary key used to identify this particular entry. If this is not specified, a stable identifier
7867 /// will be generated at compile time based on the other attributes.
7868 /// </summary>
7869 public string Id
7870 {
7871 get
7872 {
7873 return this.idField;
7874 }
7875 set
7876 {
7877 this.idFieldSet = true;
7878 this.idField = value;
7879 }
7880 }
7881
7882 /// <summary>
7883 /// The id of a property that resolves to the full path of the source directory. The property does not have
7884 /// to exist in the installer database at creation time; it could be created at installation time by a custom
7885 /// action, on the command line, etc. The property value can contain environment variables surrounded by
7886 /// percent signs such as from a REG_EXPAND_SZ registry value; environment variables will be expanded before
7887 /// being evaluated for a full path.
7888 /// </summary>
7889 public string Property
7890 {
7891 get
7892 {
7893 return this.propertyField;
7894 }
7895 set
7896 {
7897 this.propertyFieldSet = true;
7898 this.propertyField = value;
7899 }
7900 }
7901
7902 /// <summary>
7903 /// This value determines when the folder may be removed.
7904 /// </summary>
7905 public OnType On
7906 {
7907 get
7908 {
7909 return this.onField;
7910 }
7911 set
7912 {
7913 this.onFieldSet = true;
7914 this.onField = value;
7915 }
7916 }
7917
7918 public virtual ISchemaElement ParentElement
7919 {
7920 get
7921 {
7922 return this.parentElement;
7923 }
7924 set
7925 {
7926 this.parentElement = value;
7927 }
7928 }
7929
7930 /// <summary>
7931 /// Parses a OnType from a string.
7932 /// </summary>
7933 public static OnType ParseOnType(string value)
7934 {
7935 OnType parsedValue;
7936 RemoveFolderEx.TryParseOnType(value, out parsedValue);
7937 return parsedValue;
7938 }
7939
7940 /// <summary>
7941 /// Tries to parse a OnType from a string.
7942 /// </summary>
7943 public static bool TryParseOnType(string value, out OnType parsedValue)
7944 {
7945 parsedValue = OnType.NotSet;
7946 if (string.IsNullOrEmpty(value))
7947 {
7948 return false;
7949 }
7950 if (("install" == value))
7951 {
7952 parsedValue = OnType.install;
7953 }
7954 else
7955 {
7956 if (("uninstall" == value))
7957 {
7958 parsedValue = OnType.uninstall;
7959 }
7960 else
7961 {
7962 if (("both" == value))
7963 {
7964 parsedValue = OnType.both;
7965 }
7966 else
7967 {
7968 parsedValue = OnType.IllegalValue;
7969 return false;
7970 }
7971 }
7972 }
7973 return true;
7974 }
7975
7976 /// <summary>
7977 /// Processes this element and all child elements into an XmlWriter.
7978 /// </summary>
7979 public virtual void OutputXml(XmlWriter writer)
7980 {
7981 if ((null == writer))
7982 {
7983 throw new ArgumentNullException("writer");
7984 }
7985 writer.WriteStartElement("RemoveFolderEx", "http://wixtoolset.org/schemas/v4/wxs/util");
7986 if (this.idFieldSet)
7987 {
7988 writer.WriteAttributeString("Id", this.idField);
7989 }
7990 if (this.propertyFieldSet)
7991 {
7992 writer.WriteAttributeString("Property", this.propertyField);
7993 }
7994 if (this.onFieldSet)
7995 {
7996 if ((this.onField == OnType.install))
7997 {
7998 writer.WriteAttributeString("On", "install");
7999 }
8000 if ((this.onField == OnType.uninstall))
8001 {
8002 writer.WriteAttributeString("On", "uninstall");
8003 }
8004 if ((this.onField == OnType.both))
8005 {
8006 writer.WriteAttributeString("On", "both");
8007 }
8008 }
8009 writer.WriteEndElement();
8010 }
8011
8012 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8013 void ISetAttributes.SetAttribute(string name, string value)
8014 {
8015 if (String.IsNullOrEmpty(name))
8016 {
8017 throw new ArgumentNullException("name");
8018 }
8019 if (("Id" == name))
8020 {
8021 this.idField = value;
8022 this.idFieldSet = true;
8023 }
8024 if (("Property" == name))
8025 {
8026 this.propertyField = value;
8027 this.propertyFieldSet = true;
8028 }
8029 if (("On" == name))
8030 {
8031 this.onField = RemoveFolderEx.ParseOnType(value);
8032 this.onFieldSet = true;
8033 }
8034 }
8035
8036 [GeneratedCode("XsdGen", "4.0.0.0")]
8037 public enum OnType
8038 {
8039
8040 IllegalValue = int.MaxValue,
8041
8042 NotSet = -1,
8043
8044 /// <summary>
8045 /// Removes the folder only when the parent component is being installed (msiInstallStateLocal or msiInstallStateSource).
8046 /// </summary>
8047 install,
8048
8049 /// <summary>
8050 /// Default: Removes the folder only when the parent component is being removed (msiInstallStateAbsent).
8051 /// </summary>
8052 uninstall,
8053
8054 /// <summary>
8055 /// Removes the folder when the parent component is being installed or removed.
8056 /// </summary>
8057 both,
8058 }
8059 }
8060
8061 /// <summary>
8062 /// Registers a resource with the Restart Manager.
8063 /// </summary>
8064 [GeneratedCode("XsdGen", "4.0.0.0")]
8065 public class RestartResource : ISchemaElement, ISetAttributes
8066 {
8067
8068 private string idField;
8069
8070 private bool idFieldSet;
8071
8072 private string pathField;
8073
8074 private bool pathFieldSet;
8075
8076 private string processNameField;
8077
8078 private bool processNameFieldSet;
8079
8080 private string serviceNameField;
8081
8082 private bool serviceNameFieldSet;
8083
8084 private ISchemaElement parentElement;
8085
8086 /// <summary>
8087 /// The unique identifier for this resource. A unique identifier will
8088 /// be generated automatically if not specified.
8089 /// </summary>
8090 public string Id
8091 {
8092 get
8093 {
8094 return this.idField;
8095 }
8096 set
8097 {
8098 this.idFieldSet = true;
8099 this.idField = value;
8100 }
8101 }
8102
8103 /// <summary>
8104 /// The full path to the process module to register with the Restart Manager.
8105 /// This can be a formatted value that resolves to a full path.
8106 /// </summary>
8107 public string Path
8108 {
8109 get
8110 {
8111 return this.pathField;
8112 }
8113 set
8114 {
8115 this.pathFieldSet = true;
8116 this.pathField = value;
8117 }
8118 }
8119
8120 /// <summary>
8121 /// The name of a process to register with the Restart Manager.
8122 /// This can be a formatted value that resolves to a process name.
8123 /// </summary>
8124 public string ProcessName
8125 {
8126 get
8127 {
8128 return this.processNameField;
8129 }
8130 set
8131 {
8132 this.processNameFieldSet = true;
8133 this.processNameField = value;
8134 }
8135 }
8136
8137 /// <summary>
8138 /// The name of a Windows service to register with the Restart Manager.
8139 /// This can be a formatted value that resolves to a service name.
8140 /// </summary>
8141 public string ServiceName
8142 {
8143 get
8144 {
8145 return this.serviceNameField;
8146 }
8147 set
8148 {
8149 this.serviceNameFieldSet = true;
8150 this.serviceNameField = value;
8151 }
8152 }
8153
8154 public virtual ISchemaElement ParentElement
8155 {
8156 get
8157 {
8158 return this.parentElement;
8159 }
8160 set
8161 {
8162 this.parentElement = value;
8163 }
8164 }
8165
8166 /// <summary>
8167 /// Processes this element and all child elements into an XmlWriter.
8168 /// </summary>
8169 public virtual void OutputXml(XmlWriter writer)
8170 {
8171 if ((null == writer))
8172 {
8173 throw new ArgumentNullException("writer");
8174 }
8175 writer.WriteStartElement("RestartResource", "http://wixtoolset.org/schemas/v4/wxs/util");
8176 if (this.idFieldSet)
8177 {
8178 writer.WriteAttributeString("Id", this.idField);
8179 }
8180 if (this.pathFieldSet)
8181 {
8182 writer.WriteAttributeString("Path", this.pathField);
8183 }
8184 if (this.processNameFieldSet)
8185 {
8186 writer.WriteAttributeString("ProcessName", this.processNameField);
8187 }
8188 if (this.serviceNameFieldSet)
8189 {
8190 writer.WriteAttributeString("ServiceName", this.serviceNameField);
8191 }
8192 writer.WriteEndElement();
8193 }
8194
8195 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8196 void ISetAttributes.SetAttribute(string name, string value)
8197 {
8198 if (String.IsNullOrEmpty(name))
8199 {
8200 throw new ArgumentNullException("name");
8201 }
8202 if (("Id" == name))
8203 {
8204 this.idField = value;
8205 this.idFieldSet = true;
8206 }
8207 if (("Path" == name))
8208 {
8209 this.pathField = value;
8210 this.pathFieldSet = true;
8211 }
8212 if (("ProcessName" == name))
8213 {
8214 this.processNameField = value;
8215 this.processNameFieldSet = true;
8216 }
8217 if (("ServiceName" == name))
8218 {
8219 this.serviceNameField = value;
8220 this.serviceNameFieldSet = true;
8221 }
8222 }
8223 }
8224
8225 /// <summary>
8226 /// Describes a registry search.
8227 /// </summary>
8228 [GeneratedCode("XsdGen", "4.0.0.0")]
8229 public class RegistrySearch : ISchemaElement, ISetAttributes
8230 {
8231
8232 private string idField;
8233
8234 private bool idFieldSet;
8235
8236 private string variableField;
8237
8238 private bool variableFieldSet;
8239
8240 private string conditionField;
8241
8242 private bool conditionFieldSet;
8243
8244 private string afterField;
8245
8246 private bool afterFieldSet;
8247
8248 private RootType rootField;
8249
8250 private bool rootFieldSet;
8251
8252 private string keyField;
8253
8254 private bool keyFieldSet;
8255
8256 private string valueField;
8257
8258 private bool valueFieldSet;
8259
8260 private FormatType formatField;
8261
8262 private bool formatFieldSet;
8263
8264 private YesNoType expandEnvironmentVariablesField;
8265
8266 private bool expandEnvironmentVariablesFieldSet;
8267
8268 private ResultType resultField;
8269
8270 private bool resultFieldSet;
8271
8272 private YesNoType win64Field;
8273
8274 private bool win64FieldSet;
8275
8276 private ISchemaElement parentElement;
8277
8278 /// <summary>
8279 /// Id of the search for ordering and dependency.
8280 /// </summary>
8281 public string Id
8282 {
8283 get
8284 {
8285 return this.idField;
8286 }
8287 set
8288 {
8289 this.idFieldSet = true;
8290 this.idField = value;
8291 }
8292 }
8293
8294 /// <summary>
8295 /// Name of the variable in which to place the result of the search.
8296 /// </summary>
8297 public string Variable
8298 {
8299 get
8300 {
8301 return this.variableField;
8302 }
8303 set
8304 {
8305 this.variableFieldSet = true;
8306 this.variableField = value;
8307 }
8308 }
8309
8310 /// <summary>
8311 /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all.
8312 /// </summary>
8313 public string Condition
8314 {
8315 get
8316 {
8317 return this.conditionField;
8318 }
8319 set
8320 {
8321 this.conditionFieldSet = true;
8322 this.conditionField = value;
8323 }
8324 }
8325
8326 /// <summary>
8327 /// Id of the search that this one should come after.
8328 /// </summary>
8329 public string After
8330 {
8331 get
8332 {
8333 return this.afterField;
8334 }
8335 set
8336 {
8337 this.afterFieldSet = true;
8338 this.afterField = value;
8339 }
8340 }
8341
8342 /// <summary>
8343 /// Registry root hive to search under.
8344 /// </summary>
8345 public RootType Root
8346 {
8347 get
8348 {
8349 return this.rootField;
8350 }
8351 set
8352 {
8353 this.rootFieldSet = true;
8354 this.rootField = value;
8355 }
8356 }
8357
8358 /// <summary>
8359 /// Key to search for.
8360 /// </summary>
8361 public string Key
8362 {
8363 get
8364 {
8365 return this.keyField;
8366 }
8367 set
8368 {
8369 this.keyFieldSet = true;
8370 this.keyField = value;
8371 }
8372 }
8373
8374 /// <summary>
8375 /// Optional value to search for under the given Key.
8376 /// </summary>
8377 public string Value
8378 {
8379 get
8380 {
8381 return this.valueField;
8382 }
8383 set
8384 {
8385 this.valueFieldSet = true;
8386 this.valueField = value;
8387 }
8388 }
8389
8390 /// <summary>
8391 /// What format to return the value in.
8392 /// </summary>
8393 public FormatType Format
8394 {
8395 get
8396 {
8397 return this.formatField;
8398 }
8399 set
8400 {
8401 this.formatFieldSet = true;
8402 this.formatField = value;
8403 }
8404 }
8405
8406 /// <summary>
8407 /// Whether to expand any environment variables in REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ values.
8408 /// </summary>
8409 public YesNoType ExpandEnvironmentVariables
8410 {
8411 get
8412 {
8413 return this.expandEnvironmentVariablesField;
8414 }
8415 set
8416 {
8417 this.expandEnvironmentVariablesFieldSet = true;
8418 this.expandEnvironmentVariablesField = value;
8419 }
8420 }
8421
8422 /// <summary>
8423 /// Rather than saving the matching registry value into the variable, a RegistrySearch can save an attribute of the matching entry instead.
8424 /// </summary>
8425 public ResultType Result
8426 {
8427 get
8428 {
8429 return this.resultField;
8430 }
8431 set
8432 {
8433 this.resultFieldSet = true;
8434 this.resultField = value;
8435 }
8436 }
8437
8438 /// <summary>
8439 /// Instructs the search to look in the 64-bit registry when the value is 'yes'. When the value is 'no', the search looks in the 32-bit registry. The default value is 'no'.
8440 /// </summary>
8441 public YesNoType Win64
8442 {
8443 get
8444 {
8445 return this.win64Field;
8446 }
8447 set
8448 {
8449 this.win64FieldSet = true;
8450 this.win64Field = value;
8451 }
8452 }
8453
8454 public virtual ISchemaElement ParentElement
8455 {
8456 get
8457 {
8458 return this.parentElement;
8459 }
8460 set
8461 {
8462 this.parentElement = value;
8463 }
8464 }
8465
8466 /// <summary>
8467 /// Parses a RootType from a string.
8468 /// </summary>
8469 public static RootType ParseRootType(string value)
8470 {
8471 RootType parsedValue;
8472 RegistrySearch.TryParseRootType(value, out parsedValue);
8473 return parsedValue;
8474 }
8475
8476 /// <summary>
8477 /// Tries to parse a RootType from a string.
8478 /// </summary>
8479 public static bool TryParseRootType(string value, out RootType parsedValue)
8480 {
8481 parsedValue = RootType.NotSet;
8482 if (string.IsNullOrEmpty(value))
8483 {
8484 return false;
8485 }
8486 if (("HKLM" == value))
8487 {
8488 parsedValue = RootType.HKLM;
8489 }
8490 else
8491 {
8492 if (("HKCU" == value))
8493 {
8494 parsedValue = RootType.HKCU;
8495 }
8496 else
8497 {
8498 if (("HKCR" == value))
8499 {
8500 parsedValue = RootType.HKCR;
8501 }
8502 else
8503 {
8504 if (("HKU" == value))
8505 {
8506 parsedValue = RootType.HKU;
8507 }
8508 else
8509 {
8510 parsedValue = RootType.IllegalValue;
8511 return false;
8512 }
8513 }
8514 }
8515 }
8516 return true;
8517 }
8518
8519 /// <summary>
8520 /// Parses a FormatType from a string.
8521 /// </summary>
8522 public static FormatType ParseFormatType(string value)
8523 {
8524 FormatType parsedValue;
8525 RegistrySearch.TryParseFormatType(value, out parsedValue);
8526 return parsedValue;
8527 }
8528
8529 /// <summary>
8530 /// Tries to parse a FormatType from a string.
8531 /// </summary>
8532 public static bool TryParseFormatType(string value, out FormatType parsedValue)
8533 {
8534 parsedValue = FormatType.NotSet;
8535 if (string.IsNullOrEmpty(value))
8536 {
8537 return false;
8538 }
8539 if (("raw" == value))
8540 {
8541 parsedValue = FormatType.raw;
8542 }
8543 else
8544 {
8545 if (("compatible" == value))
8546 {
8547 parsedValue = FormatType.compatible;
8548 }
8549 else
8550 {
8551 parsedValue = FormatType.IllegalValue;
8552 return false;
8553 }
8554 }
8555 return true;
8556 }
8557
8558 /// <summary>
8559 /// Parses a ResultType from a string.
8560 /// </summary>
8561 public static ResultType ParseResultType(string value)
8562 {
8563 ResultType parsedValue;
8564 RegistrySearch.TryParseResultType(value, out parsedValue);
8565 return parsedValue;
8566 }
8567
8568 /// <summary>
8569 /// Tries to parse a ResultType from a string.
8570 /// </summary>
8571 public static bool TryParseResultType(string value, out ResultType parsedValue)
8572 {
8573 parsedValue = ResultType.NotSet;
8574 if (string.IsNullOrEmpty(value))
8575 {
8576 return false;
8577 }
8578 if (("exists" == value))
8579 {
8580 parsedValue = ResultType.exists;
8581 }
8582 else
8583 {
8584 if (("value" == value))
8585 {
8586 parsedValue = ResultType.value;
8587 }
8588 else
8589 {
8590 parsedValue = ResultType.IllegalValue;
8591 return false;
8592 }
8593 }
8594 return true;
8595 }
8596
8597 /// <summary>
8598 /// Processes this element and all child elements into an XmlWriter.
8599 /// </summary>
8600 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
8601 public virtual void OutputXml(XmlWriter writer)
8602 {
8603 if ((null == writer))
8604 {
8605 throw new ArgumentNullException("writer");
8606 }
8607 writer.WriteStartElement("RegistrySearch", "http://wixtoolset.org/schemas/v4/wxs/util");
8608 if (this.idFieldSet)
8609 {
8610 writer.WriteAttributeString("Id", this.idField);
8611 }
8612 if (this.variableFieldSet)
8613 {
8614 writer.WriteAttributeString("Variable", this.variableField);
8615 }
8616 if (this.conditionFieldSet)
8617 {
8618 writer.WriteAttributeString("Condition", this.conditionField);
8619 }
8620 if (this.afterFieldSet)
8621 {
8622 writer.WriteAttributeString("After", this.afterField);
8623 }
8624 if (this.rootFieldSet)
8625 {
8626 if ((this.rootField == RootType.HKLM))
8627 {
8628 writer.WriteAttributeString("Root", "HKLM");
8629 }
8630 if ((this.rootField == RootType.HKCU))
8631 {
8632 writer.WriteAttributeString("Root", "HKCU");
8633 }
8634 if ((this.rootField == RootType.HKCR))
8635 {
8636 writer.WriteAttributeString("Root", "HKCR");
8637 }
8638 if ((this.rootField == RootType.HKU))
8639 {
8640 writer.WriteAttributeString("Root", "HKU");
8641 }
8642 }
8643 if (this.keyFieldSet)
8644 {
8645 writer.WriteAttributeString("Key", this.keyField);
8646 }
8647 if (this.valueFieldSet)
8648 {
8649 writer.WriteAttributeString("Value", this.valueField);
8650 }
8651 if (this.formatFieldSet)
8652 {
8653 if ((this.formatField == FormatType.raw))
8654 {
8655 writer.WriteAttributeString("Format", "raw");
8656 }
8657 if ((this.formatField == FormatType.compatible))
8658 {
8659 writer.WriteAttributeString("Format", "compatible");
8660 }
8661 }
8662 if (this.expandEnvironmentVariablesFieldSet)
8663 {
8664 if ((this.expandEnvironmentVariablesField == YesNoType.no))
8665 {
8666 writer.WriteAttributeString("ExpandEnvironmentVariables", "no");
8667 }
8668 if ((this.expandEnvironmentVariablesField == YesNoType.yes))
8669 {
8670 writer.WriteAttributeString("ExpandEnvironmentVariables", "yes");
8671 }
8672 }
8673 if (this.resultFieldSet)
8674 {
8675 if ((this.resultField == ResultType.exists))
8676 {
8677 writer.WriteAttributeString("Result", "exists");
8678 }
8679 if ((this.resultField == ResultType.value))
8680 {
8681 writer.WriteAttributeString("Result", "value");
8682 }
8683 }
8684 if (this.win64FieldSet)
8685 {
8686 if ((this.win64Field == YesNoType.no))
8687 {
8688 writer.WriteAttributeString("Win64", "no");
8689 }
8690 if ((this.win64Field == YesNoType.yes))
8691 {
8692 writer.WriteAttributeString("Win64", "yes");
8693 }
8694 }
8695 writer.WriteEndElement();
8696 }
8697
8698 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8699 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
8700 void ISetAttributes.SetAttribute(string name, string value)
8701 {
8702 if (String.IsNullOrEmpty(name))
8703 {
8704 throw new ArgumentNullException("name");
8705 }
8706 if (("Id" == name))
8707 {
8708 this.idField = value;
8709 this.idFieldSet = true;
8710 }
8711 if (("Variable" == name))
8712 {
8713 this.variableField = value;
8714 this.variableFieldSet = true;
8715 }
8716 if (("Condition" == name))
8717 {
8718 this.conditionField = value;
8719 this.conditionFieldSet = true;
8720 }
8721 if (("After" == name))
8722 {
8723 this.afterField = value;
8724 this.afterFieldSet = true;
8725 }
8726 if (("Root" == name))
8727 {
8728 this.rootField = RegistrySearch.ParseRootType(value);
8729 this.rootFieldSet = true;
8730 }
8731 if (("Key" == name))
8732 {
8733 this.keyField = value;
8734 this.keyFieldSet = true;
8735 }
8736 if (("Value" == name))
8737 {
8738 this.valueField = value;
8739 this.valueFieldSet = true;
8740 }
8741 if (("Format" == name))
8742 {
8743 this.formatField = RegistrySearch.ParseFormatType(value);
8744 this.formatFieldSet = true;
8745 }
8746 if (("ExpandEnvironmentVariables" == name))
8747 {
8748 this.expandEnvironmentVariablesField = Enums.ParseYesNoType(value);
8749 this.expandEnvironmentVariablesFieldSet = true;
8750 }
8751 if (("Result" == name))
8752 {
8753 this.resultField = RegistrySearch.ParseResultType(value);
8754 this.resultFieldSet = true;
8755 }
8756 if (("Win64" == name))
8757 {
8758 this.win64Field = Enums.ParseYesNoType(value);
8759 this.win64FieldSet = true;
8760 }
8761 }
8762
8763 [GeneratedCode("XsdGen", "4.0.0.0")]
8764 public enum RootType
8765 {
8766
8767 IllegalValue = int.MaxValue,
8768
8769 NotSet = -1,
8770
8771 /// <summary>
8772 /// HKEY_LOCAL_MACHINE
8773 /// </summary>
8774 HKLM,
8775
8776 /// <summary>
8777 /// HKEY_CURRENT_USER
8778 /// </summary>
8779 HKCU,
8780
8781 /// <summary>
8782 /// HKEY_CLASSES_ROOT
8783 /// </summary>
8784 HKCR,
8785
8786 /// <summary>
8787 /// HKEY_USERS
8788 /// </summary>
8789 HKU,
8790 }
8791
8792 [GeneratedCode("XsdGen", "4.0.0.0")]
8793 public enum FormatType
8794 {
8795
8796 IllegalValue = int.MaxValue,
8797
8798 NotSet = -1,
8799
8800 /// <summary>
8801 /// Returns the unformatted value directly from the registry. For example, a REG_DWORD value of '1' is returned as '1', not '#1'.
8802 /// </summary>
8803 raw,
8804
8805 /// <summary>
8806 /// Returns the value formatted as Windows Installer would. For example, a REG_DWORD value of '1' is returned as '#1', not '1'.
8807 /// </summary>
8808 compatible,
8809 }
8810
8811 [GeneratedCode("XsdGen", "4.0.0.0")]
8812 public enum ResultType
8813 {
8814
8815 IllegalValue = int.MaxValue,
8816
8817 NotSet = -1,
8818
8819 /// <summary>
8820 /// Saves true if a matching registry entry is found; false otherwise.
8821 /// </summary>
8822 exists,
8823
8824 /// <summary>
8825 /// Saves the value of the registry key in the variable. This is the default.
8826 /// </summary>
8827 value,
8828 }
8829 }
8830
8831 /// <summary>
8832 /// References a RegistrySearch.
8833 /// </summary>
8834 [GeneratedCode("XsdGen", "4.0.0.0")]
8835 public class RegistrySearchRef : ISchemaElement, ISetAttributes
8836 {
8837
8838 private string idField;
8839
8840 private bool idFieldSet;
8841
8842 private ISchemaElement parentElement;
8843
8844 public string Id
8845 {
8846 get
8847 {
8848 return this.idField;
8849 }
8850 set
8851 {
8852 this.idFieldSet = true;
8853 this.idField = value;
8854 }
8855 }
8856
8857 public virtual ISchemaElement ParentElement
8858 {
8859 get
8860 {
8861 return this.parentElement;
8862 }
8863 set
8864 {
8865 this.parentElement = value;
8866 }
8867 }
8868
8869 /// <summary>
8870 /// Processes this element and all child elements into an XmlWriter.
8871 /// </summary>
8872 public virtual void OutputXml(XmlWriter writer)
8873 {
8874 if ((null == writer))
8875 {
8876 throw new ArgumentNullException("writer");
8877 }
8878 writer.WriteStartElement("RegistrySearchRef", "http://wixtoolset.org/schemas/v4/wxs/util");
8879 if (this.idFieldSet)
8880 {
8881 writer.WriteAttributeString("Id", this.idField);
8882 }
8883 writer.WriteEndElement();
8884 }
8885
8886 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8887 void ISetAttributes.SetAttribute(string name, string value)
8888 {
8889 if (String.IsNullOrEmpty(name))
8890 {
8891 throw new ArgumentNullException("name");
8892 }
8893 if (("Id" == name))
8894 {
8895 this.idField = value;
8896 this.idFieldSet = true;
8897 }
8898 }
8899 }
8900
8901 /// <summary>
8902 /// Service configuration information for failure actions.
8903 /// </summary>
8904 [GeneratedCode("XsdGen", "4.0.0.0")]
8905 public class ServiceConfig : ISchemaElement, ISetAttributes
8906 {
8907
8908 private string serviceNameField;
8909
8910 private bool serviceNameFieldSet;
8911
8912 private FirstFailureActionTypeType firstFailureActionTypeField;
8913
8914 private bool firstFailureActionTypeFieldSet;
8915
8916 private SecondFailureActionTypeType secondFailureActionTypeField;
8917
8918 private bool secondFailureActionTypeFieldSet;
8919
8920 private ThirdFailureActionTypeType thirdFailureActionTypeField;
8921
8922 private bool thirdFailureActionTypeFieldSet;
8923
8924 private int resetPeriodInDaysField;
8925
8926 private bool resetPeriodInDaysFieldSet;
8927
8928 private int restartServiceDelayInSecondsField;
8929
8930 private bool restartServiceDelayInSecondsFieldSet;
8931
8932 private string programCommandLineField;
8933
8934 private bool programCommandLineFieldSet;
8935
8936 private string rebootMessageField;
8937
8938 private bool rebootMessageFieldSet;
8939
8940 private ISchemaElement parentElement;
8941
8942 /// <summary>
8943 /// Required if not under a ServiceInstall element.
8944 /// </summary>
8945 public string ServiceName
8946 {
8947 get
8948 {
8949 return this.serviceNameField;
8950 }
8951 set
8952 {
8953 this.serviceNameFieldSet = true;
8954 this.serviceNameField = value;
8955 }
8956 }
8957
8958 /// <summary>
8959 /// Action to take on the first failure of the service.
8960 /// </summary>
8961 public FirstFailureActionTypeType FirstFailureActionType
8962 {
8963 get
8964 {
8965 return this.firstFailureActionTypeField;
8966 }
8967 set
8968 {
8969 this.firstFailureActionTypeFieldSet = true;
8970 this.firstFailureActionTypeField = value;
8971 }
8972 }
8973
8974 /// <summary>
8975 /// Action to take on the second failure of the service.
8976 /// </summary>
8977 public SecondFailureActionTypeType SecondFailureActionType
8978 {
8979 get
8980 {
8981 return this.secondFailureActionTypeField;
8982 }
8983 set
8984 {
8985 this.secondFailureActionTypeFieldSet = true;
8986 this.secondFailureActionTypeField = value;
8987 }
8988 }
8989
8990 /// <summary>
8991 /// Action to take on the third failure of the service.
8992 /// </summary>
8993 public ThirdFailureActionTypeType ThirdFailureActionType
8994 {
8995 get
8996 {
8997 return this.thirdFailureActionTypeField;
8998 }
8999 set
9000 {
9001 this.thirdFailureActionTypeFieldSet = true;
9002 this.thirdFailureActionTypeField = value;
9003 }
9004 }
9005
9006 /// <summary>
9007 /// Number of days after which to reset the failure count to zero if there are no failures.
9008 /// </summary>
9009 public int ResetPeriodInDays
9010 {
9011 get
9012 {
9013 return this.resetPeriodInDaysField;
9014 }
9015 set
9016 {
9017 this.resetPeriodInDaysFieldSet = true;
9018 this.resetPeriodInDaysField = value;
9019 }
9020 }
9021
9022 /// <summary>
9023 /// If any of the three *ActionType attributes is "restart", this specifies the number of seconds to wait before doing so.
9024 /// </summary>
9025 public int RestartServiceDelayInSeconds
9026 {
9027 get
9028 {
9029 return this.restartServiceDelayInSecondsField;
9030 }
9031 set
9032 {
9033 this.restartServiceDelayInSecondsFieldSet = true;
9034 this.restartServiceDelayInSecondsField = value;
9035 }
9036 }
9037
9038 /// <summary>
9039 /// If any of the three *ActionType attributes is "runCommand", this specifies the command to run when doing so. This value is formatted.
9040 /// </summary>
9041 public string ProgramCommandLine
9042 {
9043 get
9044 {
9045 return this.programCommandLineField;
9046 }
9047 set
9048 {
9049 this.programCommandLineFieldSet = true;
9050 this.programCommandLineField = value;
9051 }
9052 }
9053
9054 /// <summary>
9055 /// If any of the three *ActionType attributes is "reboot", this specifies the message to broadcast to server users before doing so.
9056 /// </summary>
9057 public string RebootMessage
9058 {
9059 get
9060 {
9061 return this.rebootMessageField;
9062 }
9063 set
9064 {
9065 this.rebootMessageFieldSet = true;
9066 this.rebootMessageField = value;
9067 }
9068 }
9069
9070 public virtual ISchemaElement ParentElement
9071 {
9072 get
9073 {
9074 return this.parentElement;
9075 }
9076 set
9077 {
9078 this.parentElement = value;
9079 }
9080 }
9081
9082 /// <summary>
9083 /// Parses a FirstFailureActionTypeType from a string.
9084 /// </summary>
9085 public static FirstFailureActionTypeType ParseFirstFailureActionTypeType(string value)
9086 {
9087 FirstFailureActionTypeType parsedValue;
9088 ServiceConfig.TryParseFirstFailureActionTypeType(value, out parsedValue);
9089 return parsedValue;
9090 }
9091
9092 /// <summary>
9093 /// Tries to parse a FirstFailureActionTypeType from a string.
9094 /// </summary>
9095 public static bool TryParseFirstFailureActionTypeType(string value, out FirstFailureActionTypeType parsedValue)
9096 {
9097 parsedValue = FirstFailureActionTypeType.NotSet;
9098 if (string.IsNullOrEmpty(value))
9099 {
9100 return false;
9101 }
9102 if (("none" == value))
9103 {
9104 parsedValue = FirstFailureActionTypeType.none;
9105 }
9106 else
9107 {
9108 if (("reboot" == value))
9109 {
9110 parsedValue = FirstFailureActionTypeType.reboot;
9111 }
9112 else
9113 {
9114 if (("restart" == value))
9115 {
9116 parsedValue = FirstFailureActionTypeType.restart;
9117 }
9118 else
9119 {
9120 if (("runCommand" == value))
9121 {
9122 parsedValue = FirstFailureActionTypeType.runCommand;
9123 }
9124 else
9125 {
9126 parsedValue = FirstFailureActionTypeType.IllegalValue;
9127 return false;
9128 }
9129 }
9130 }
9131 }
9132 return true;
9133 }
9134
9135 /// <summary>
9136 /// Parses a SecondFailureActionTypeType from a string.
9137 /// </summary>
9138 public static SecondFailureActionTypeType ParseSecondFailureActionTypeType(string value)
9139 {
9140 SecondFailureActionTypeType parsedValue;
9141 ServiceConfig.TryParseSecondFailureActionTypeType(value, out parsedValue);
9142 return parsedValue;
9143 }
9144
9145 /// <summary>
9146 /// Tries to parse a SecondFailureActionTypeType from a string.
9147 /// </summary>
9148 public static bool TryParseSecondFailureActionTypeType(string value, out SecondFailureActionTypeType parsedValue)
9149 {
9150 parsedValue = SecondFailureActionTypeType.NotSet;
9151 if (string.IsNullOrEmpty(value))
9152 {
9153 return false;
9154 }
9155 if (("none" == value))
9156 {
9157 parsedValue = SecondFailureActionTypeType.none;
9158 }
9159 else
9160 {
9161 if (("reboot" == value))
9162 {
9163 parsedValue = SecondFailureActionTypeType.reboot;
9164 }
9165 else
9166 {
9167 if (("restart" == value))
9168 {
9169 parsedValue = SecondFailureActionTypeType.restart;
9170 }
9171 else
9172 {
9173 if (("runCommand" == value))
9174 {
9175 parsedValue = SecondFailureActionTypeType.runCommand;
9176 }
9177 else
9178 {
9179 parsedValue = SecondFailureActionTypeType.IllegalValue;
9180 return false;
9181 }
9182 }
9183 }
9184 }
9185 return true;
9186 }
9187
9188 /// <summary>
9189 /// Parses a ThirdFailureActionTypeType from a string.
9190 /// </summary>
9191 public static ThirdFailureActionTypeType ParseThirdFailureActionTypeType(string value)
9192 {
9193 ThirdFailureActionTypeType parsedValue;
9194 ServiceConfig.TryParseThirdFailureActionTypeType(value, out parsedValue);
9195 return parsedValue;
9196 }
9197
9198 /// <summary>
9199 /// Tries to parse a ThirdFailureActionTypeType from a string.
9200 /// </summary>
9201 public static bool TryParseThirdFailureActionTypeType(string value, out ThirdFailureActionTypeType parsedValue)
9202 {
9203 parsedValue = ThirdFailureActionTypeType.NotSet;
9204 if (string.IsNullOrEmpty(value))
9205 {
9206 return false;
9207 }
9208 if (("none" == value))
9209 {
9210 parsedValue = ThirdFailureActionTypeType.none;
9211 }
9212 else
9213 {
9214 if (("reboot" == value))
9215 {
9216 parsedValue = ThirdFailureActionTypeType.reboot;
9217 }
9218 else
9219 {
9220 if (("restart" == value))
9221 {
9222 parsedValue = ThirdFailureActionTypeType.restart;
9223 }
9224 else
9225 {
9226 if (("runCommand" == value))
9227 {
9228 parsedValue = ThirdFailureActionTypeType.runCommand;
9229 }
9230 else
9231 {
9232 parsedValue = ThirdFailureActionTypeType.IllegalValue;
9233 return false;
9234 }
9235 }
9236 }
9237 }
9238 return true;
9239 }
9240
9241 /// <summary>
9242 /// Processes this element and all child elements into an XmlWriter.
9243 /// </summary>
9244 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
9245 public virtual void OutputXml(XmlWriter writer)
9246 {
9247 if ((null == writer))
9248 {
9249 throw new ArgumentNullException("writer");
9250 }
9251 writer.WriteStartElement("ServiceConfig", "http://wixtoolset.org/schemas/v4/wxs/util");
9252 if (this.serviceNameFieldSet)
9253 {
9254 writer.WriteAttributeString("ServiceName", this.serviceNameField);
9255 }
9256 if (this.firstFailureActionTypeFieldSet)
9257 {
9258 if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.none))
9259 {
9260 writer.WriteAttributeString("FirstFailureActionType", "none");
9261 }
9262 if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.reboot))
9263 {
9264 writer.WriteAttributeString("FirstFailureActionType", "reboot");
9265 }
9266 if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.restart))
9267 {
9268 writer.WriteAttributeString("FirstFailureActionType", "restart");
9269 }
9270 if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.runCommand))
9271 {
9272 writer.WriteAttributeString("FirstFailureActionType", "runCommand");
9273 }
9274 }
9275 if (this.secondFailureActionTypeFieldSet)
9276 {
9277 if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.none))
9278 {
9279 writer.WriteAttributeString("SecondFailureActionType", "none");
9280 }
9281 if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.reboot))
9282 {
9283 writer.WriteAttributeString("SecondFailureActionType", "reboot");
9284 }
9285 if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.restart))
9286 {
9287 writer.WriteAttributeString("SecondFailureActionType", "restart");
9288 }
9289 if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.runCommand))
9290 {
9291 writer.WriteAttributeString("SecondFailureActionType", "runCommand");
9292 }
9293 }
9294 if (this.thirdFailureActionTypeFieldSet)
9295 {
9296 if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.none))
9297 {
9298 writer.WriteAttributeString("ThirdFailureActionType", "none");
9299 }
9300 if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.reboot))
9301 {
9302 writer.WriteAttributeString("ThirdFailureActionType", "reboot");
9303 }
9304 if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.restart))
9305 {
9306 writer.WriteAttributeString("ThirdFailureActionType", "restart");
9307 }
9308 if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.runCommand))
9309 {
9310 writer.WriteAttributeString("ThirdFailureActionType", "runCommand");
9311 }
9312 }
9313 if (this.resetPeriodInDaysFieldSet)
9314 {
9315 writer.WriteAttributeString("ResetPeriodInDays", this.resetPeriodInDaysField.ToString(CultureInfo.InvariantCulture));
9316 }
9317 if (this.restartServiceDelayInSecondsFieldSet)
9318 {
9319 writer.WriteAttributeString("RestartServiceDelayInSeconds", this.restartServiceDelayInSecondsField.ToString(CultureInfo.InvariantCulture));
9320 }
9321 if (this.programCommandLineFieldSet)
9322 {
9323 writer.WriteAttributeString("ProgramCommandLine", this.programCommandLineField);
9324 }
9325 if (this.rebootMessageFieldSet)
9326 {
9327 writer.WriteAttributeString("RebootMessage", this.rebootMessageField);
9328 }
9329 writer.WriteEndElement();
9330 }
9331
9332 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9333 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
9334 void ISetAttributes.SetAttribute(string name, string value)
9335 {
9336 if (String.IsNullOrEmpty(name))
9337 {
9338 throw new ArgumentNullException("name");
9339 }
9340 if (("ServiceName" == name))
9341 {
9342 this.serviceNameField = value;
9343 this.serviceNameFieldSet = true;
9344 }
9345 if (("FirstFailureActionType" == name))
9346 {
9347 this.firstFailureActionTypeField = ServiceConfig.ParseFirstFailureActionTypeType(value);
9348 this.firstFailureActionTypeFieldSet = true;
9349 }
9350 if (("SecondFailureActionType" == name))
9351 {
9352 this.secondFailureActionTypeField = ServiceConfig.ParseSecondFailureActionTypeType(value);
9353 this.secondFailureActionTypeFieldSet = true;
9354 }
9355 if (("ThirdFailureActionType" == name))
9356 {
9357 this.thirdFailureActionTypeField = ServiceConfig.ParseThirdFailureActionTypeType(value);
9358 this.thirdFailureActionTypeFieldSet = true;
9359 }
9360 if (("ResetPeriodInDays" == name))
9361 {
9362 this.resetPeriodInDaysField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
9363 this.resetPeriodInDaysFieldSet = true;
9364 }
9365 if (("RestartServiceDelayInSeconds" == name))
9366 {
9367 this.restartServiceDelayInSecondsField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
9368 this.restartServiceDelayInSecondsFieldSet = true;
9369 }
9370 if (("ProgramCommandLine" == name))
9371 {
9372 this.programCommandLineField = value;
9373 this.programCommandLineFieldSet = true;
9374 }
9375 if (("RebootMessage" == name))
9376 {
9377 this.rebootMessageField = value;
9378 this.rebootMessageFieldSet = true;
9379 }
9380 }
9381
9382 [GeneratedCode("XsdGen", "4.0.0.0")]
9383 public enum FirstFailureActionTypeType
9384 {
9385
9386 IllegalValue = int.MaxValue,
9387
9388 NotSet = -1,
9389
9390 none,
9391
9392 reboot,
9393
9394 restart,
9395
9396 runCommand,
9397 }
9398
9399 [GeneratedCode("XsdGen", "4.0.0.0")]
9400 public enum SecondFailureActionTypeType
9401 {
9402
9403 IllegalValue = int.MaxValue,
9404
9405 NotSet = -1,
9406
9407 none,
9408
9409 reboot,
9410
9411 restart,
9412
9413 runCommand,
9414 }
9415
9416 [GeneratedCode("XsdGen", "4.0.0.0")]
9417 public enum ThirdFailureActionTypeType
9418 {
9419
9420 IllegalValue = int.MaxValue,
9421
9422 NotSet = -1,
9423
9424 none,
9425
9426 reboot,
9427
9428 restart,
9429
9430 runCommand,
9431 }
9432 }
9433
9434 /// <summary>
9435 /// Updates the last modified date/time of a file.
9436 /// </summary>
9437 [GeneratedCode("XsdGen", "4.0.0.0")]
9438 public class TouchFile : ISchemaElement, ISetAttributes
9439 {
9440
9441 private string idField;
9442
9443 private bool idFieldSet;
9444
9445 private string pathField;
9446
9447 private bool pathFieldSet;
9448
9449 private YesNoType onInstallField;
9450
9451 private bool onInstallFieldSet;
9452
9453 private YesNoType onReinstallField;
9454
9455 private bool onReinstallFieldSet;
9456
9457 private YesNoType onUninstallField;
9458
9459 private bool onUninstallFieldSet;
9460
9461 private YesNoType nonvitalField;
9462
9463 private bool nonvitalFieldSet;
9464
9465 private ISchemaElement parentElement;
9466
9467 /// <summary>
9468 /// Identifier for the touch file operation. If the identifier is not specified it will be generated.
9469 /// </summary>
9470 public string Id
9471 {
9472 get
9473 {
9474 return this.idField;
9475 }
9476 set
9477 {
9478 this.idFieldSet = true;
9479 this.idField = value;
9480 }
9481 }
9482
9483 /// <summary>
9484 /// Path of the file to update. This value is formatted.
9485 /// </summary>
9486 public string Path
9487 {
9488 get
9489 {
9490 return this.pathField;
9491 }
9492 set
9493 {
9494 this.pathFieldSet = true;
9495 this.pathField = value;
9496 }
9497 }
9498
9499 /// <summary>
9500 /// Specifies whether or not the modified time of the file should be updated on install. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'yes'.
9501 /// </summary>
9502 public YesNoType OnInstall
9503 {
9504 get
9505 {
9506 return this.onInstallField;
9507 }
9508 set
9509 {
9510 this.onInstallFieldSet = true;
9511 this.onInstallField = value;
9512 }
9513 }
9514
9515 /// <summary>
9516 /// Specifies whether or not the modified time of the file should be updated on reinstall. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'yes'.
9517 /// </summary>
9518 public YesNoType OnReinstall
9519 {
9520 get
9521 {
9522 return this.onReinstallField;
9523 }
9524 set
9525 {
9526 this.onReinstallFieldSet = true;
9527 this.onReinstallField = value;
9528 }
9529 }
9530
9531 /// <summary>
9532 /// Specifies whether or not the modified time of the file should be updated on uninstall. If the OnInstall, OnReinstall and OnUninstall attributes are all absent the default is 'no'.
9533 /// </summary>
9534 public YesNoType OnUninstall
9535 {
9536 get
9537 {
9538 return this.onUninstallField;
9539 }
9540 set
9541 {
9542 this.onUninstallFieldSet = true;
9543 this.onUninstallField = value;
9544 }
9545 }
9546
9547 /// <summary>
9548 /// Indicates the installation will succeed even if the modified time of the file cannot be updated. The default is 'no'.
9549 /// </summary>
9550 public YesNoType Nonvital
9551 {
9552 get
9553 {
9554 return this.nonvitalField;
9555 }
9556 set
9557 {
9558 this.nonvitalFieldSet = true;
9559 this.nonvitalField = value;
9560 }
9561 }
9562
9563 public virtual ISchemaElement ParentElement
9564 {
9565 get
9566 {
9567 return this.parentElement;
9568 }
9569 set
9570 {
9571 this.parentElement = value;
9572 }
9573 }
9574
9575 /// <summary>
9576 /// Processes this element and all child elements into an XmlWriter.
9577 /// </summary>
9578 public virtual void OutputXml(XmlWriter writer)
9579 {
9580 if ((null == writer))
9581 {
9582 throw new ArgumentNullException("writer");
9583 }
9584 writer.WriteStartElement("TouchFile", "http://wixtoolset.org/schemas/v4/wxs/util");
9585 if (this.idFieldSet)
9586 {
9587 writer.WriteAttributeString("Id", this.idField);
9588 }
9589 if (this.pathFieldSet)
9590 {
9591 writer.WriteAttributeString("Path", this.pathField);
9592 }
9593 if (this.onInstallFieldSet)
9594 {
9595 if ((this.onInstallField == YesNoType.no))
9596 {
9597 writer.WriteAttributeString("OnInstall", "no");
9598 }
9599 if ((this.onInstallField == YesNoType.yes))
9600 {
9601 writer.WriteAttributeString("OnInstall", "yes");
9602 }
9603 }
9604 if (this.onReinstallFieldSet)
9605 {
9606 if ((this.onReinstallField == YesNoType.no))
9607 {
9608 writer.WriteAttributeString("OnReinstall", "no");
9609 }
9610 if ((this.onReinstallField == YesNoType.yes))
9611 {
9612 writer.WriteAttributeString("OnReinstall", "yes");
9613 }
9614 }
9615 if (this.onUninstallFieldSet)
9616 {
9617 if ((this.onUninstallField == YesNoType.no))
9618 {
9619 writer.WriteAttributeString("OnUninstall", "no");
9620 }
9621 if ((this.onUninstallField == YesNoType.yes))
9622 {
9623 writer.WriteAttributeString("OnUninstall", "yes");
9624 }
9625 }
9626 if (this.nonvitalFieldSet)
9627 {
9628 if ((this.nonvitalField == YesNoType.no))
9629 {
9630 writer.WriteAttributeString("Nonvital", "no");
9631 }
9632 if ((this.nonvitalField == YesNoType.yes))
9633 {
9634 writer.WriteAttributeString("Nonvital", "yes");
9635 }
9636 }
9637 writer.WriteEndElement();
9638 }
9639
9640 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9641 void ISetAttributes.SetAttribute(string name, string value)
9642 {
9643 if (String.IsNullOrEmpty(name))
9644 {
9645 throw new ArgumentNullException("name");
9646 }
9647 if (("Id" == name))
9648 {
9649 this.idField = value;
9650 this.idFieldSet = true;
9651 }
9652 if (("Path" == name))
9653 {
9654 this.pathField = value;
9655 this.pathFieldSet = true;
9656 }
9657 if (("OnInstall" == name))
9658 {
9659 this.onInstallField = Enums.ParseYesNoType(value);
9660 this.onInstallFieldSet = true;
9661 }
9662 if (("OnReinstall" == name))
9663 {
9664 this.onReinstallField = Enums.ParseYesNoType(value);
9665 this.onReinstallFieldSet = true;
9666 }
9667 if (("OnUninstall" == name))
9668 {
9669 this.onUninstallField = Enums.ParseYesNoType(value);
9670 this.onUninstallFieldSet = true;
9671 }
9672 if (("Nonvital" == name))
9673 {
9674 this.nonvitalField = Enums.ParseYesNoType(value);
9675 this.nonvitalFieldSet = true;
9676 }
9677 }
9678 }
9679
9680 /// <summary>
9681 /// User for all kinds of things. When it is not nested under a component it is included in the MSI so it can be referenced by other elements such as the User attribute in the AppPool element. When it is nested under a Component element, the User will be created on install and can also be used for reference.
9682 /// </summary>
9683 [GeneratedCode("XsdGen", "4.0.0.0")]
9684 public class User : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
9685 {
9686
9687 private ElementCollection children;
9688
9689 private string idField;
9690
9691 private bool idFieldSet;
9692
9693 private string nameField;
9694
9695 private bool nameFieldSet;
9696
9697 private string domainField;
9698
9699 private bool domainFieldSet;
9700
9701 private string passwordField;
9702
9703 private bool passwordFieldSet;
9704
9705 private YesNoType passwordNeverExpiresField;
9706
9707 private bool passwordNeverExpiresFieldSet;
9708
9709 private YesNoType canNotChangePasswordField;
9710
9711 private bool canNotChangePasswordFieldSet;
9712
9713 private YesNoType removeOnUninstallField;
9714
9715 private bool removeOnUninstallFieldSet;
9716
9717 private YesNoType failIfExistsField;
9718
9719 private bool failIfExistsFieldSet;
9720
9721 private YesNoType logonAsServiceField;
9722
9723 private bool logonAsServiceFieldSet;
9724
9725 private YesNoType logonAsBatchJobField;
9726
9727 private bool logonAsBatchJobFieldSet;
9728
9729 private YesNoType updateIfExistsField;
9730
9731 private bool updateIfExistsFieldSet;
9732
9733 private YesNoType passwordExpiredField;
9734
9735 private bool passwordExpiredFieldSet;
9736
9737 private YesNoType disabledField;
9738
9739 private bool disabledFieldSet;
9740
9741 private YesNoType createUserField;
9742
9743 private bool createUserFieldSet;
9744
9745 private YesNoType vitalField;
9746
9747 private bool vitalFieldSet;
9748
9749 private ISchemaElement parentElement;
9750
9751 public User()
9752 {
9753 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
9754 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(GroupRef)));
9755 this.children = childCollection0;
9756 }
9757
9758 public virtual IEnumerable Children
9759 {
9760 get
9761 {
9762 return this.children;
9763 }
9764 }
9765
9766 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
9767 public virtual IEnumerable this[System.Type childType]
9768 {
9769 get
9770 {
9771 return this.children.Filter(childType);
9772 }
9773 }
9774
9775 public string Id
9776 {
9777 get
9778 {
9779 return this.idField;
9780 }
9781 set
9782 {
9783 this.idFieldSet = true;
9784 this.idField = value;
9785 }
9786 }
9787
9788 /// <summary>
9789 /// A
9790 /// </summary>
9791 public string Name
9792 {
9793 get
9794 {
9795 return this.nameField;
9796 }
9797 set
9798 {
9799 this.nameFieldSet = true;
9800 this.nameField = value;
9801 }
9802 }
9803
9804 /// <summary>
9805 /// A
9806 /// </summary>
9807 public string Domain
9808 {
9809 get
9810 {
9811 return this.domainField;
9812 }
9813 set
9814 {
9815 this.domainFieldSet = true;
9816 this.domainField = value;
9817 }
9818 }
9819
9820 /// <summary>
9821 /// Usually a Property that is passed in on the command-line to keep it more secure.
9822 /// </summary>
9823 public string Password
9824 {
9825 get
9826 {
9827 return this.passwordField;
9828 }
9829 set
9830 {
9831 this.passwordFieldSet = true;
9832 this.passwordField = value;
9833 }
9834 }
9835
9836 /// <summary>
9837 /// The account's password never expires. Equivalent to UF_DONT_EXPIRE_PASSWD.
9838 /// </summary>
9839 public YesNoType PasswordNeverExpires
9840 {
9841 get
9842 {
9843 return this.passwordNeverExpiresField;
9844 }
9845 set
9846 {
9847 this.passwordNeverExpiresFieldSet = true;
9848 this.passwordNeverExpiresField = value;
9849 }
9850 }
9851
9852 /// <summary>
9853 /// The user cannot change the account's password. Equivalent to UF_PASSWD_CANT_CHANGE.
9854 /// </summary>
9855 public YesNoType CanNotChangePassword
9856 {
9857 get
9858 {
9859 return this.canNotChangePasswordField;
9860 }
9861 set
9862 {
9863 this.canNotChangePasswordFieldSet = true;
9864 this.canNotChangePasswordField = value;
9865 }
9866 }
9867
9868 /// <summary>
9869 /// Indicates whether the user account should be removed or left behind on uninstall.
9870 /// </summary>
9871 public YesNoType RemoveOnUninstall
9872 {
9873 get
9874 {
9875 return this.removeOnUninstallField;
9876 }
9877 set
9878 {
9879 this.removeOnUninstallFieldSet = true;
9880 this.removeOnUninstallField = value;
9881 }
9882 }
9883
9884 /// <summary>
9885 /// Indicates if the install should fail if the user already exists.
9886 /// </summary>
9887 public YesNoType FailIfExists
9888 {
9889 get
9890 {
9891 return this.failIfExistsField;
9892 }
9893 set
9894 {
9895 this.failIfExistsFieldSet = true;
9896 this.failIfExistsField = value;
9897 }
9898 }
9899
9900 /// <summary>
9901 /// Indicates whether or not the user can logon as a serivce. User creation can be skipped if all that is desired is to set this access right on the user.
9902 /// </summary>
9903 public YesNoType LogonAsService
9904 {
9905 get
9906 {
9907 return this.logonAsServiceField;
9908 }
9909 set
9910 {
9911 this.logonAsServiceFieldSet = true;
9912 this.logonAsServiceField = value;
9913 }
9914 }
9915
9916 /// <summary>
9917 /// Indicates whether or not the user can logon as a batch job. User creation can be skipped if all that is desired is to set this access right on the user.
9918 /// </summary>
9919 public YesNoType LogonAsBatchJob
9920 {
9921 get
9922 {
9923 return this.logonAsBatchJobField;
9924 }
9925 set
9926 {
9927 this.logonAsBatchJobFieldSet = true;
9928 this.logonAsBatchJobField = value;
9929 }
9930 }
9931
9932 /// <summary>
9933 /// Indicates if the user account properties should be updated if the user already exists.
9934 /// </summary>
9935 public YesNoType UpdateIfExists
9936 {
9937 get
9938 {
9939 return this.updateIfExistsField;
9940 }
9941 set
9942 {
9943 this.updateIfExistsFieldSet = true;
9944 this.updateIfExistsField = value;
9945 }
9946 }
9947
9948 /// <summary>
9949 /// Indicates whether the user must change their password on their first login.
9950 /// </summary>
9951 public YesNoType PasswordExpired
9952 {
9953 get
9954 {
9955 return this.passwordExpiredField;
9956 }
9957 set
9958 {
9959 this.passwordExpiredFieldSet = true;
9960 this.passwordExpiredField = value;
9961 }
9962 }
9963
9964 /// <summary>
9965 /// The account is disabled. Equivalent to UF_ACCOUNTDISABLE.
9966 /// </summary>
9967 public YesNoType Disabled
9968 {
9969 get
9970 {
9971 return this.disabledField;
9972 }
9973 set
9974 {
9975 this.disabledFieldSet = true;
9976 this.disabledField = value;
9977 }
9978 }
9979
9980 /// <summary>
9981 /// Indicates whether or not to create the user. User creation can be skipped if all that is desired is to join a user to groups.
9982 /// </summary>
9983 public YesNoType CreateUser
9984 {
9985 get
9986 {
9987 return this.createUserField;
9988 }
9989 set
9990 {
9991 this.createUserFieldSet = true;
9992 this.createUserField = value;
9993 }
9994 }
9995
9996 /// <summary>
9997 /// Indicates whether failure to create the user or add the user to a group fails the installation. The default value is "yes".
9998 /// </summary>
9999 public YesNoType Vital
10000 {
10001 get
10002 {
10003 return this.vitalField;
10004 }
10005 set
10006 {
10007 this.vitalFieldSet = true;
10008 this.vitalField = value;
10009 }
10010 }
10011
10012 public virtual ISchemaElement ParentElement
10013 {
10014 get
10015 {
10016 return this.parentElement;
10017 }
10018 set
10019 {
10020 this.parentElement = value;
10021 }
10022 }
10023
10024 public virtual void AddChild(ISchemaElement child)
10025 {
10026 if ((null == child))
10027 {
10028 throw new ArgumentNullException("child");
10029 }
10030 this.children.AddElement(child);
10031 child.ParentElement = this;
10032 }
10033
10034 public virtual void RemoveChild(ISchemaElement child)
10035 {
10036 if ((null == child))
10037 {
10038 throw new ArgumentNullException("child");
10039 }
10040 this.children.RemoveElement(child);
10041 child.ParentElement = null;
10042 }
10043
10044 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
10045 ISchemaElement ICreateChildren.CreateChild(string childName)
10046 {
10047 if (String.IsNullOrEmpty(childName))
10048 {
10049 throw new ArgumentNullException("childName");
10050 }
10051 ISchemaElement childValue = null;
10052 if (("GroupRef" == childName))
10053 {
10054 childValue = new GroupRef();
10055 }
10056 if ((null == childValue))
10057 {
10058 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
10059 }
10060 return childValue;
10061 }
10062
10063 /// <summary>
10064 /// Processes this element and all child elements into an XmlWriter.
10065 /// </summary>
10066 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
10067 public virtual void OutputXml(XmlWriter writer)
10068 {
10069 if ((null == writer))
10070 {
10071 throw new ArgumentNullException("writer");
10072 }
10073 writer.WriteStartElement("User", "http://wixtoolset.org/schemas/v4/wxs/util");
10074 if (this.idFieldSet)
10075 {
10076 writer.WriteAttributeString("Id", this.idField);
10077 }
10078 if (this.nameFieldSet)
10079 {
10080 writer.WriteAttributeString("Name", this.nameField);
10081 }
10082 if (this.domainFieldSet)
10083 {
10084 writer.WriteAttributeString("Domain", this.domainField);
10085 }
10086 if (this.passwordFieldSet)
10087 {
10088 writer.WriteAttributeString("Password", this.passwordField);
10089 }
10090 if (this.passwordNeverExpiresFieldSet)
10091 {
10092 if ((this.passwordNeverExpiresField == YesNoType.no))
10093 {
10094 writer.WriteAttributeString("PasswordNeverExpires", "no");
10095 }
10096 if ((this.passwordNeverExpiresField == YesNoType.yes))
10097 {
10098 writer.WriteAttributeString("PasswordNeverExpires", "yes");
10099 }
10100 }
10101 if (this.canNotChangePasswordFieldSet)
10102 {
10103 if ((this.canNotChangePasswordField == YesNoType.no))
10104 {
10105 writer.WriteAttributeString("CanNotChangePassword", "no");
10106 }
10107 if ((this.canNotChangePasswordField == YesNoType.yes))
10108 {
10109 writer.WriteAttributeString("CanNotChangePassword", "yes");
10110 }
10111 }
10112 if (this.removeOnUninstallFieldSet)
10113 {
10114 if ((this.removeOnUninstallField == YesNoType.no))
10115 {
10116 writer.WriteAttributeString("RemoveOnUninstall", "no");
10117 }
10118 if ((this.removeOnUninstallField == YesNoType.yes))
10119 {
10120 writer.WriteAttributeString("RemoveOnUninstall", "yes");
10121 }
10122 }
10123 if (this.failIfExistsFieldSet)
10124 {
10125 if ((this.failIfExistsField == YesNoType.no))
10126 {
10127 writer.WriteAttributeString("FailIfExists", "no");
10128 }
10129 if ((this.failIfExistsField == YesNoType.yes))
10130 {
10131 writer.WriteAttributeString("FailIfExists", "yes");
10132 }
10133 }
10134 if (this.logonAsServiceFieldSet)
10135 {
10136 if ((this.logonAsServiceField == YesNoType.no))
10137 {
10138 writer.WriteAttributeString("LogonAsService", "no");
10139 }
10140 if ((this.logonAsServiceField == YesNoType.yes))
10141 {
10142 writer.WriteAttributeString("LogonAsService", "yes");
10143 }
10144 }
10145 if (this.logonAsBatchJobFieldSet)
10146 {
10147 if ((this.logonAsBatchJobField == YesNoType.no))
10148 {
10149 writer.WriteAttributeString("LogonAsBatchJob", "no");
10150 }
10151 if ((this.logonAsBatchJobField == YesNoType.yes))
10152 {
10153 writer.WriteAttributeString("LogonAsBatchJob", "yes");
10154 }
10155 }
10156 if (this.updateIfExistsFieldSet)
10157 {
10158 if ((this.updateIfExistsField == YesNoType.no))
10159 {
10160 writer.WriteAttributeString("UpdateIfExists", "no");
10161 }
10162 if ((this.updateIfExistsField == YesNoType.yes))
10163 {
10164 writer.WriteAttributeString("UpdateIfExists", "yes");
10165 }
10166 }
10167 if (this.passwordExpiredFieldSet)
10168 {
10169 if ((this.passwordExpiredField == YesNoType.no))
10170 {
10171 writer.WriteAttributeString("PasswordExpired", "no");
10172 }
10173 if ((this.passwordExpiredField == YesNoType.yes))
10174 {
10175 writer.WriteAttributeString("PasswordExpired", "yes");
10176 }
10177 }
10178 if (this.disabledFieldSet)
10179 {
10180 if ((this.disabledField == YesNoType.no))
10181 {
10182 writer.WriteAttributeString("Disabled", "no");
10183 }
10184 if ((this.disabledField == YesNoType.yes))
10185 {
10186 writer.WriteAttributeString("Disabled", "yes");
10187 }
10188 }
10189 if (this.createUserFieldSet)
10190 {
10191 if ((this.createUserField == YesNoType.no))
10192 {
10193 writer.WriteAttributeString("CreateUser", "no");
10194 }
10195 if ((this.createUserField == YesNoType.yes))
10196 {
10197 writer.WriteAttributeString("CreateUser", "yes");
10198 }
10199 }
10200 if (this.vitalFieldSet)
10201 {
10202 if ((this.vitalField == YesNoType.no))
10203 {
10204 writer.WriteAttributeString("Vital", "no");
10205 }
10206 if ((this.vitalField == YesNoType.yes))
10207 {
10208 writer.WriteAttributeString("Vital", "yes");
10209 }
10210 }
10211 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
10212 {
10213 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
10214 childElement.OutputXml(writer);
10215 }
10216 writer.WriteEndElement();
10217 }
10218
10219 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
10220 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
10221 void ISetAttributes.SetAttribute(string name, string value)
10222 {
10223 if (String.IsNullOrEmpty(name))
10224 {
10225 throw new ArgumentNullException("name");
10226 }
10227 if (("Id" == name))
10228 {
10229 this.idField = value;
10230 this.idFieldSet = true;
10231 }
10232 if (("Name" == name))
10233 {
10234 this.nameField = value;
10235 this.nameFieldSet = true;
10236 }
10237 if (("Domain" == name))
10238 {
10239 this.domainField = value;
10240 this.domainFieldSet = true;
10241 }
10242 if (("Password" == name))
10243 {
10244 this.passwordField = value;
10245 this.passwordFieldSet = true;
10246 }
10247 if (("PasswordNeverExpires" == name))
10248 {
10249 this.passwordNeverExpiresField = Enums.ParseYesNoType(value);
10250 this.passwordNeverExpiresFieldSet = true;
10251 }
10252 if (("CanNotChangePassword" == name))
10253 {
10254 this.canNotChangePasswordField = Enums.ParseYesNoType(value);
10255 this.canNotChangePasswordFieldSet = true;
10256 }
10257 if (("RemoveOnUninstall" == name))
10258 {
10259 this.removeOnUninstallField = Enums.ParseYesNoType(value);
10260 this.removeOnUninstallFieldSet = true;
10261 }
10262 if (("FailIfExists" == name))
10263 {
10264 this.failIfExistsField = Enums.ParseYesNoType(value);
10265 this.failIfExistsFieldSet = true;
10266 }
10267 if (("LogonAsService" == name))
10268 {
10269 this.logonAsServiceField = Enums.ParseYesNoType(value);
10270 this.logonAsServiceFieldSet = true;
10271 }
10272 if (("LogonAsBatchJob" == name))
10273 {
10274 this.logonAsBatchJobField = Enums.ParseYesNoType(value);
10275 this.logonAsBatchJobFieldSet = true;
10276 }
10277 if (("UpdateIfExists" == name))
10278 {
10279 this.updateIfExistsField = Enums.ParseYesNoType(value);
10280 this.updateIfExistsFieldSet = true;
10281 }
10282 if (("PasswordExpired" == name))
10283 {
10284 this.passwordExpiredField = Enums.ParseYesNoType(value);
10285 this.passwordExpiredFieldSet = true;
10286 }
10287 if (("Disabled" == name))
10288 {
10289 this.disabledField = Enums.ParseYesNoType(value);
10290 this.disabledFieldSet = true;
10291 }
10292 if (("CreateUser" == name))
10293 {
10294 this.createUserField = Enums.ParseYesNoType(value);
10295 this.createUserFieldSet = true;
10296 }
10297 if (("Vital" == name))
10298 {
10299 this.vitalField = Enums.ParseYesNoType(value);
10300 this.vitalFieldSet = true;
10301 }
10302 }
10303 }
10304
10305 /// <summary>
10306 /// Adds or removes .xml file entries. If you use the XmlFile element you must reference WixUtilExtension.dll as it contains the XmlFile custom actions.
10307 /// </summary>
10308 [GeneratedCode("XsdGen", "4.0.0.0")]
10309 public class XmlFile : ISchemaElement, ISetAttributes
10310 {
10311
10312 private string idField;
10313
10314 private bool idFieldSet;
10315
10316 private string elementPathField;
10317
10318 private bool elementPathFieldSet;
10319
10320 private string fileField;
10321
10322 private bool fileFieldSet;
10323
10324 private string nameField;
10325
10326 private bool nameFieldSet;
10327
10328 private string valueField;
10329
10330 private bool valueFieldSet;
10331
10332 private ActionType actionField;
10333
10334 private bool actionFieldSet;
10335
10336 private YesNoType permanentField;
10337
10338 private bool permanentFieldSet;
10339
10340 private YesNoType preserveModifiedDateField;
10341
10342 private bool preserveModifiedDateFieldSet;
10343
10344 private int sequenceField;
10345
10346 private bool sequenceFieldSet;
10347
10348 private SelectionLanguageType selectionLanguageField;
10349
10350 private bool selectionLanguageFieldSet;
10351
10352 private ISchemaElement parentElement;
10353
10354 /// <summary>
10355 /// Identifier for xml file modification.
10356 /// </summary>
10357 public string Id
10358 {
10359 get
10360 {
10361 return this.idField;
10362 }
10363 set
10364 {
10365 this.idFieldSet = true;
10366 this.idField = value;
10367 }
10368 }
10369
10370 /// <summary>
10371 /// The XPath of the element to be modified. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath.
10372 /// </summary>
10373 public string ElementPath
10374 {
10375 get
10376 {
10377 return this.elementPathField;
10378 }
10379 set
10380 {
10381 this.elementPathFieldSet = true;
10382 this.elementPathField = value;
10383 }
10384 }
10385
10386 /// <summary>
10387 /// Path of the .xml file to configure.
10388 /// </summary>
10389 public string File
10390 {
10391 get
10392 {
10393 return this.fileField;
10394 }
10395 set
10396 {
10397 this.fileFieldSet = true;
10398 this.fileField = value;
10399 }
10400 }
10401
10402 /// <summary>
10403 /// Name of XML node to set/add to the specified element. Not setting this attribute causes the element's text value to be set. Otherwise this specified the attribute name that is set.
10404 /// </summary>
10405 public string Name
10406 {
10407 get
10408 {
10409 return this.nameField;
10410 }
10411 set
10412 {
10413 this.nameFieldSet = true;
10414 this.nameField = value;
10415 }
10416 }
10417
10418 /// <summary>
10419 /// The value to be written. See the
10420 /// </summary>
10421 public string Value
10422 {
10423 get
10424 {
10425 return this.valueField;
10426 }
10427 set
10428 {
10429 this.valueFieldSet = true;
10430 this.valueField = value;
10431 }
10432 }
10433
10434 /// <summary>
10435 /// The type of modification to be made to the XML file when the component is installed.
10436 /// </summary>
10437 public ActionType Action
10438 {
10439 get
10440 {
10441 return this.actionField;
10442 }
10443 set
10444 {
10445 this.actionFieldSet = true;
10446 this.actionField = value;
10447 }
10448 }
10449
10450 /// <summary>
10451 /// Specifies whether or not the modification should be removed on uninstall. This has no effect on uninstall if the action was deleteValue.
10452 /// </summary>
10453 public YesNoType Permanent
10454 {
10455 get
10456 {
10457 return this.permanentField;
10458 }
10459 set
10460 {
10461 this.permanentFieldSet = true;
10462 this.permanentField = value;
10463 }
10464 }
10465
10466 /// <summary>
10467 /// Specifies wheter or not the modification should preserve the modified date. Preserving the modified date will allow the file to be patched if no other modifications have been made.
10468 /// </summary>
10469 public YesNoType PreserveModifiedDate
10470 {
10471 get
10472 {
10473 return this.preserveModifiedDateField;
10474 }
10475 set
10476 {
10477 this.preserveModifiedDateFieldSet = true;
10478 this.preserveModifiedDateField = value;
10479 }
10480 }
10481
10482 /// <summary>
10483 /// Specifies the order in which the modification is to be attempted on the XML file. It is important to ensure that new elements are created before you attempt to add an attribute to them.
10484 /// </summary>
10485 public int Sequence
10486 {
10487 get
10488 {
10489 return this.sequenceField;
10490 }
10491 set
10492 {
10493 this.sequenceFieldSet = true;
10494 this.sequenceField = value;
10495 }
10496 }
10497
10498 /// <summary>
10499 /// Specify whether the DOM object should use XPath language or the old XSLPattern language (default) as the query language.
10500 /// </summary>
10501 public SelectionLanguageType SelectionLanguage
10502 {
10503 get
10504 {
10505 return this.selectionLanguageField;
10506 }
10507 set
10508 {
10509 this.selectionLanguageFieldSet = true;
10510 this.selectionLanguageField = value;
10511 }
10512 }
10513
10514 public virtual ISchemaElement ParentElement
10515 {
10516 get
10517 {
10518 return this.parentElement;
10519 }
10520 set
10521 {
10522 this.parentElement = value;
10523 }
10524 }
10525
10526 /// <summary>
10527 /// Parses a ActionType from a string.
10528 /// </summary>
10529 public static ActionType ParseActionType(string value)
10530 {
10531 ActionType parsedValue;
10532 XmlFile.TryParseActionType(value, out parsedValue);
10533 return parsedValue;
10534 }
10535
10536 /// <summary>
10537 /// Tries to parse a ActionType from a string.
10538 /// </summary>
10539 public static bool TryParseActionType(string value, out ActionType parsedValue)
10540 {
10541 parsedValue = ActionType.NotSet;
10542 if (string.IsNullOrEmpty(value))
10543 {
10544 return false;
10545 }
10546 if (("createElement" == value))
10547 {
10548 parsedValue = ActionType.createElement;
10549 }
10550 else
10551 {
10552 if (("deleteValue" == value))
10553 {
10554 parsedValue = ActionType.deleteValue;
10555 }
10556 else
10557 {
10558 if (("setValue" == value))
10559 {
10560 parsedValue = ActionType.setValue;
10561 }
10562 else
10563 {
10564 if (("bulkSetValue" == value))
10565 {
10566 parsedValue = ActionType.bulkSetValue;
10567 }
10568 else
10569 {
10570 parsedValue = ActionType.IllegalValue;
10571 return false;
10572 }
10573 }
10574 }
10575 }
10576 return true;
10577 }
10578
10579 /// <summary>
10580 /// Parses a SelectionLanguageType from a string.
10581 /// </summary>
10582 public static SelectionLanguageType ParseSelectionLanguageType(string value)
10583 {
10584 SelectionLanguageType parsedValue;
10585 XmlFile.TryParseSelectionLanguageType(value, out parsedValue);
10586 return parsedValue;
10587 }
10588
10589 /// <summary>
10590 /// Tries to parse a SelectionLanguageType from a string.
10591 /// </summary>
10592 public static bool TryParseSelectionLanguageType(string value, out SelectionLanguageType parsedValue)
10593 {
10594 parsedValue = SelectionLanguageType.NotSet;
10595 if (string.IsNullOrEmpty(value))
10596 {
10597 return false;
10598 }
10599 if (("XPath" == value))
10600 {
10601 parsedValue = SelectionLanguageType.XPath;
10602 }
10603 else
10604 {
10605 if (("XSLPattern" == value))
10606 {
10607 parsedValue = SelectionLanguageType.XSLPattern;
10608 }
10609 else
10610 {
10611 parsedValue = SelectionLanguageType.IllegalValue;
10612 return false;
10613 }
10614 }
10615 return true;
10616 }
10617
10618 /// <summary>
10619 /// Processes this element and all child elements into an XmlWriter.
10620 /// </summary>
10621 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
10622 public virtual void OutputXml(XmlWriter writer)
10623 {
10624 if ((null == writer))
10625 {
10626 throw new ArgumentNullException("writer");
10627 }
10628 writer.WriteStartElement("XmlFile", "http://wixtoolset.org/schemas/v4/wxs/util");
10629 if (this.idFieldSet)
10630 {
10631 writer.WriteAttributeString("Id", this.idField);
10632 }
10633 if (this.elementPathFieldSet)
10634 {
10635 writer.WriteAttributeString("ElementPath", this.elementPathField);
10636 }
10637 if (this.fileFieldSet)
10638 {
10639 writer.WriteAttributeString("File", this.fileField);
10640 }
10641 if (this.nameFieldSet)
10642 {
10643 writer.WriteAttributeString("Name", this.nameField);
10644 }
10645 if (this.valueFieldSet)
10646 {
10647 writer.WriteAttributeString("Value", this.valueField);
10648 }
10649 if (this.actionFieldSet)
10650 {
10651 if ((this.actionField == ActionType.createElement))
10652 {
10653 writer.WriteAttributeString("Action", "createElement");
10654 }
10655 if ((this.actionField == ActionType.deleteValue))
10656 {
10657 writer.WriteAttributeString("Action", "deleteValue");
10658 }
10659 if ((this.actionField == ActionType.setValue))
10660 {
10661 writer.WriteAttributeString("Action", "setValue");
10662 }
10663 if ((this.actionField == ActionType.bulkSetValue))
10664 {
10665 writer.WriteAttributeString("Action", "bulkSetValue");
10666 }
10667 }
10668 if (this.permanentFieldSet)
10669 {
10670 if ((this.permanentField == YesNoType.no))
10671 {
10672 writer.WriteAttributeString("Permanent", "no");
10673 }
10674 if ((this.permanentField == YesNoType.yes))
10675 {
10676 writer.WriteAttributeString("Permanent", "yes");
10677 }
10678 }
10679 if (this.preserveModifiedDateFieldSet)
10680 {
10681 if ((this.preserveModifiedDateField == YesNoType.no))
10682 {
10683 writer.WriteAttributeString("PreserveModifiedDate", "no");
10684 }
10685 if ((this.preserveModifiedDateField == YesNoType.yes))
10686 {
10687 writer.WriteAttributeString("PreserveModifiedDate", "yes");
10688 }
10689 }
10690 if (this.sequenceFieldSet)
10691 {
10692 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
10693 }
10694 if (this.selectionLanguageFieldSet)
10695 {
10696 if ((this.selectionLanguageField == SelectionLanguageType.XPath))
10697 {
10698 writer.WriteAttributeString("SelectionLanguage", "XPath");
10699 }
10700 if ((this.selectionLanguageField == SelectionLanguageType.XSLPattern))
10701 {
10702 writer.WriteAttributeString("SelectionLanguage", "XSLPattern");
10703 }
10704 }
10705 writer.WriteEndElement();
10706 }
10707
10708 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
10709 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
10710 void ISetAttributes.SetAttribute(string name, string value)
10711 {
10712 if (String.IsNullOrEmpty(name))
10713 {
10714 throw new ArgumentNullException("name");
10715 }
10716 if (("Id" == name))
10717 {
10718 this.idField = value;
10719 this.idFieldSet = true;
10720 }
10721 if (("ElementPath" == name))
10722 {
10723 this.elementPathField = value;
10724 this.elementPathFieldSet = true;
10725 }
10726 if (("File" == name))
10727 {
10728 this.fileField = value;
10729 this.fileFieldSet = true;
10730 }
10731 if (("Name" == name))
10732 {
10733 this.nameField = value;
10734 this.nameFieldSet = true;
10735 }
10736 if (("Value" == name))
10737 {
10738 this.valueField = value;
10739 this.valueFieldSet = true;
10740 }
10741 if (("Action" == name))
10742 {
10743 this.actionField = XmlFile.ParseActionType(value);
10744 this.actionFieldSet = true;
10745 }
10746 if (("Permanent" == name))
10747 {
10748 this.permanentField = Enums.ParseYesNoType(value);
10749 this.permanentFieldSet = true;
10750 }
10751 if (("PreserveModifiedDate" == name))
10752 {
10753 this.preserveModifiedDateField = Enums.ParseYesNoType(value);
10754 this.preserveModifiedDateFieldSet = true;
10755 }
10756 if (("Sequence" == name))
10757 {
10758 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
10759 this.sequenceFieldSet = true;
10760 }
10761 if (("SelectionLanguage" == name))
10762 {
10763 this.selectionLanguageField = XmlFile.ParseSelectionLanguageType(value);
10764 this.selectionLanguageFieldSet = true;
10765 }
10766 }
10767
10768 [GeneratedCode("XsdGen", "4.0.0.0")]
10769 public enum ActionType
10770 {
10771
10772 IllegalValue = int.MaxValue,
10773
10774 NotSet = -1,
10775
10776 /// <summary>
10777 /// Creates a new element under the element specified in ElementPath. The Name attribute is required in this case and specifies the name of the new element. The Value attribute is not necessary when createElement is specified as the action. If the Value attribute is set, it will cause the new element's text value to be set.
10778 /// </summary>
10779 createElement,
10780
10781 /// <summary>
10782 /// Deletes a value from the element specified in the ElementPath. If Name is specified, the attribute with that name is deleted. If Name is not specified, the text value of the element specified in the ElementPath is deleted. The Value attribute is ignored if deleteValue is the action specified.
10783 /// </summary>
10784 deleteValue,
10785
10786 /// <summary>
10787 /// Sets a value in the element specified in the ElementPath. If Name is specified, and attribute with that name is set to the value specified in Value. If Name is not specified, the text value of the element is set. Value is a required attribute if setValue is the action specified.
10788 /// </summary>
10789 setValue,
10790
10791 /// <summary>
10792 /// Sets all the values in the elements that match the ElementPath. If Name is specified, attributes with that name are set to the same value specified in Value. If Name is not specified, the text values of the elements are set. Value is a required attribute if setBulkValue is the action specified.
10793 /// </summary>
10794 bulkSetValue,
10795 }
10796
10797 [GeneratedCode("XsdGen", "4.0.0.0")]
10798 public enum SelectionLanguageType
10799 {
10800
10801 IllegalValue = int.MaxValue,
10802
10803 NotSet = -1,
10804
10805 XPath,
10806
10807 XSLPattern,
10808 }
10809 }
10810
10811 /// <summary>
10812 /// Adds or removes .xml file entries. If you use the XmlConfig element you must reference WixUtilExtension.dll as it contains the XmlConfig custom actions.
10813 /// </summary>
10814 [GeneratedCode("XsdGen", "4.0.0.0")]
10815 public class XmlConfig : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
10816 {
10817
10818 private ElementCollection children;
10819
10820 private string idField;
10821
10822 private bool idFieldSet;
10823
10824 private ActionType actionField;
10825
10826 private bool actionFieldSet;
10827
10828 private string elementIdField;
10829
10830 private bool elementIdFieldSet;
10831
10832 private string elementPathField;
10833
10834 private bool elementPathFieldSet;
10835
10836 private string fileField;
10837
10838 private bool fileFieldSet;
10839
10840 private string nameField;
10841
10842 private bool nameFieldSet;
10843
10844 private NodeType nodeField;
10845
10846 private bool nodeFieldSet;
10847
10848 private OnType onField;
10849
10850 private bool onFieldSet;
10851
10852 private YesNoType preserveModifiedDateField;
10853
10854 private bool preserveModifiedDateFieldSet;
10855
10856 private int sequenceField;
10857
10858 private bool sequenceFieldSet;
10859
10860 private string valueField;
10861
10862 private bool valueFieldSet;
10863
10864 private string verifyPathField;
10865
10866 private bool verifyPathFieldSet;
10867
10868 private ISchemaElement parentElement;
10869
10870 public XmlConfig()
10871 {
10872 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
10873 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(XmlConfig)));
10874 this.children = childCollection0;
10875 }
10876
10877 public virtual IEnumerable Children
10878 {
10879 get
10880 {
10881 return this.children;
10882 }
10883 }
10884
10885 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
10886 public virtual IEnumerable this[System.Type childType]
10887 {
10888 get
10889 {
10890 return this.children.Filter(childType);
10891 }
10892 }
10893
10894 /// <summary>
10895 /// Identifier for xml file modification.
10896 /// </summary>
10897 public string Id
10898 {
10899 get
10900 {
10901 return this.idField;
10902 }
10903 set
10904 {
10905 this.idFieldSet = true;
10906 this.idField = value;
10907 }
10908 }
10909
10910 public ActionType Action
10911 {
10912 get
10913 {
10914 return this.actionField;
10915 }
10916 set
10917 {
10918 this.actionFieldSet = true;
10919 this.actionField = value;
10920 }
10921 }
10922
10923 /// <summary>
10924 /// The Id of another XmlConfig to add attributes to. In this case, the 'ElementPath', 'Action', 'Node', and 'On' attributes must be omitted.
10925 /// </summary>
10926 public string ElementId
10927 {
10928 get
10929 {
10930 return this.elementIdField;
10931 }
10932 set
10933 {
10934 this.elementIdFieldSet = true;
10935 this.elementIdField = value;
10936 }
10937 }
10938
10939 /// <summary>
10940 /// The XPath of the parent element being modified. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath.
10941 /// </summary>
10942 public string ElementPath
10943 {
10944 get
10945 {
10946 return this.elementPathField;
10947 }
10948 set
10949 {
10950 this.elementPathFieldSet = true;
10951 this.elementPathField = value;
10952 }
10953 }
10954
10955 /// <summary>
10956 /// Path of the .xml file to configure.
10957 /// </summary>
10958 public string File
10959 {
10960 get
10961 {
10962 return this.fileField;
10963 }
10964 set
10965 {
10966 this.fileFieldSet = true;
10967 this.fileField = value;
10968 }
10969 }
10970
10971 /// <summary>
10972 /// Name of XML node to set/add to the specified element. Not setting this attribute causes the element's text value to be set. Otherwise this specified the attribute name that is set.
10973 /// </summary>
10974 public string Name
10975 {
10976 get
10977 {
10978 return this.nameField;
10979 }
10980 set
10981 {
10982 this.nameFieldSet = true;
10983 this.nameField = value;
10984 }
10985 }
10986
10987 public NodeType Node
10988 {
10989 get
10990 {
10991 return this.nodeField;
10992 }
10993 set
10994 {
10995 this.nodeFieldSet = true;
10996 this.nodeField = value;
10997 }
10998 }
10999
11000 public OnType On
11001 {
11002 get
11003 {
11004 return this.onField;
11005 }
11006 set
11007 {
11008 this.onFieldSet = true;
11009 this.onField = value;
11010 }
11011 }
11012
11013 /// <summary>
11014 /// Specifies wheter or not the modification should preserve the modified date. Preserving the modified date will allow the file to be patched if no other modifications have been made.
11015 /// </summary>
11016 public YesNoType PreserveModifiedDate
11017 {
11018 get
11019 {
11020 return this.preserveModifiedDateField;
11021 }
11022 set
11023 {
11024 this.preserveModifiedDateFieldSet = true;
11025 this.preserveModifiedDateField = value;
11026 }
11027 }
11028
11029 /// <summary>
11030 /// Specifies the order in which the modification is to be attempted on the XML file. It is important to ensure that new elements are created before you attempt to add an attribute to them.
11031 /// </summary>
11032 public int Sequence
11033 {
11034 get
11035 {
11036 return this.sequenceField;
11037 }
11038 set
11039 {
11040 this.sequenceFieldSet = true;
11041 this.sequenceField = value;
11042 }
11043 }
11044
11045 /// <summary>
11046 /// The value to be written. See the
11047 /// </summary>
11048 public string Value
11049 {
11050 get
11051 {
11052 return this.valueField;
11053 }
11054 set
11055 {
11056 this.valueFieldSet = true;
11057 this.valueField = value;
11058 }
11059 }
11060
11061 /// <summary>
11062 /// The XPath to the element being modified. This is required for 'delete' actions. For 'create' actions, VerifyPath is used to decide if the element already exists. Note that this is a formatted field and therefore, square brackets in the XPath must be escaped. In addition, XPaths allow backslashes to be used to escape characters, so if you intend to include literal backslashes, you must escape them as well by doubling them in this attribute. The string is formatted by MSI first, and the result is consumed as the XPath.
11063 /// </summary>
11064 public string VerifyPath
11065 {
11066 get
11067 {
11068 return this.verifyPathField;
11069 }
11070 set
11071 {
11072 this.verifyPathFieldSet = true;
11073 this.verifyPathField = value;
11074 }
11075 }
11076
11077 public virtual ISchemaElement ParentElement
11078 {
11079 get
11080 {
11081 return this.parentElement;
11082 }
11083 set
11084 {
11085 this.parentElement = value;
11086 }
11087 }
11088
11089 public virtual void AddChild(ISchemaElement child)
11090 {
11091 if ((null == child))
11092 {
11093 throw new ArgumentNullException("child");
11094 }
11095 this.children.AddElement(child);
11096 child.ParentElement = this;
11097 }
11098
11099 public virtual void RemoveChild(ISchemaElement child)
11100 {
11101 if ((null == child))
11102 {
11103 throw new ArgumentNullException("child");
11104 }
11105 this.children.RemoveElement(child);
11106 child.ParentElement = null;
11107 }
11108
11109 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11110 ISchemaElement ICreateChildren.CreateChild(string childName)
11111 {
11112 if (String.IsNullOrEmpty(childName))
11113 {
11114 throw new ArgumentNullException("childName");
11115 }
11116 ISchemaElement childValue = null;
11117 if (("XmlConfig" == childName))
11118 {
11119 childValue = new XmlConfig();
11120 }
11121 if ((null == childValue))
11122 {
11123 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
11124 }
11125 return childValue;
11126 }
11127
11128 /// <summary>
11129 /// Parses a ActionType from a string.
11130 /// </summary>
11131 public static ActionType ParseActionType(string value)
11132 {
11133 ActionType parsedValue;
11134 XmlConfig.TryParseActionType(value, out parsedValue);
11135 return parsedValue;
11136 }
11137
11138 /// <summary>
11139 /// Tries to parse a ActionType from a string.
11140 /// </summary>
11141 public static bool TryParseActionType(string value, out ActionType parsedValue)
11142 {
11143 parsedValue = ActionType.NotSet;
11144 if (string.IsNullOrEmpty(value))
11145 {
11146 return false;
11147 }
11148 if (("create" == value))
11149 {
11150 parsedValue = ActionType.create;
11151 }
11152 else
11153 {
11154 if (("delete" == value))
11155 {
11156 parsedValue = ActionType.delete;
11157 }
11158 else
11159 {
11160 parsedValue = ActionType.IllegalValue;
11161 return false;
11162 }
11163 }
11164 return true;
11165 }
11166
11167 /// <summary>
11168 /// Parses a NodeType from a string.
11169 /// </summary>
11170 public static NodeType ParseNodeType(string value)
11171 {
11172 NodeType parsedValue;
11173 XmlConfig.TryParseNodeType(value, out parsedValue);
11174 return parsedValue;
11175 }
11176
11177 /// <summary>
11178 /// Tries to parse a NodeType from a string.
11179 /// </summary>
11180 public static bool TryParseNodeType(string value, out NodeType parsedValue)
11181 {
11182 parsedValue = NodeType.NotSet;
11183 if (string.IsNullOrEmpty(value))
11184 {
11185 return false;
11186 }
11187 if (("element" == value))
11188 {
11189 parsedValue = NodeType.element;
11190 }
11191 else
11192 {
11193 if (("value" == value))
11194 {
11195 parsedValue = NodeType.value;
11196 }
11197 else
11198 {
11199 if (("document" == value))
11200 {
11201 parsedValue = NodeType.document;
11202 }
11203 else
11204 {
11205 parsedValue = NodeType.IllegalValue;
11206 return false;
11207 }
11208 }
11209 }
11210 return true;
11211 }
11212
11213 /// <summary>
11214 /// Parses a OnType from a string.
11215 /// </summary>
11216 public static OnType ParseOnType(string value)
11217 {
11218 OnType parsedValue;
11219 XmlConfig.TryParseOnType(value, out parsedValue);
11220 return parsedValue;
11221 }
11222
11223 /// <summary>
11224 /// Tries to parse a OnType from a string.
11225 /// </summary>
11226 public static bool TryParseOnType(string value, out OnType parsedValue)
11227 {
11228 parsedValue = OnType.NotSet;
11229 if (string.IsNullOrEmpty(value))
11230 {
11231 return false;
11232 }
11233 if (("install" == value))
11234 {
11235 parsedValue = OnType.install;
11236 }
11237 else
11238 {
11239 if (("uninstall" == value))
11240 {
11241 parsedValue = OnType.uninstall;
11242 }
11243 else
11244 {
11245 parsedValue = OnType.IllegalValue;
11246 return false;
11247 }
11248 }
11249 return true;
11250 }
11251
11252 /// <summary>
11253 /// Processes this element and all child elements into an XmlWriter.
11254 /// </summary>
11255 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
11256 public virtual void OutputXml(XmlWriter writer)
11257 {
11258 if ((null == writer))
11259 {
11260 throw new ArgumentNullException("writer");
11261 }
11262 writer.WriteStartElement("XmlConfig", "http://wixtoolset.org/schemas/v4/wxs/util");
11263 if (this.idFieldSet)
11264 {
11265 writer.WriteAttributeString("Id", this.idField);
11266 }
11267 if (this.actionFieldSet)
11268 {
11269 if ((this.actionField == ActionType.create))
11270 {
11271 writer.WriteAttributeString("Action", "create");
11272 }
11273 if ((this.actionField == ActionType.delete))
11274 {
11275 writer.WriteAttributeString("Action", "delete");
11276 }
11277 }
11278 if (this.elementIdFieldSet)
11279 {
11280 writer.WriteAttributeString("ElementId", this.elementIdField);
11281 }
11282 if (this.elementPathFieldSet)
11283 {
11284 writer.WriteAttributeString("ElementPath", this.elementPathField);
11285 }
11286 if (this.fileFieldSet)
11287 {
11288 writer.WriteAttributeString("File", this.fileField);
11289 }
11290 if (this.nameFieldSet)
11291 {
11292 writer.WriteAttributeString("Name", this.nameField);
11293 }
11294 if (this.nodeFieldSet)
11295 {
11296 if ((this.nodeField == NodeType.element))
11297 {
11298 writer.WriteAttributeString("Node", "element");
11299 }
11300 if ((this.nodeField == NodeType.value))
11301 {
11302 writer.WriteAttributeString("Node", "value");
11303 }
11304 if ((this.nodeField == NodeType.document))
11305 {
11306 writer.WriteAttributeString("Node", "document");
11307 }
11308 }
11309 if (this.onFieldSet)
11310 {
11311 if ((this.onField == OnType.install))
11312 {
11313 writer.WriteAttributeString("On", "install");
11314 }
11315 if ((this.onField == OnType.uninstall))
11316 {
11317 writer.WriteAttributeString("On", "uninstall");
11318 }
11319 }
11320 if (this.preserveModifiedDateFieldSet)
11321 {
11322 if ((this.preserveModifiedDateField == YesNoType.no))
11323 {
11324 writer.WriteAttributeString("PreserveModifiedDate", "no");
11325 }
11326 if ((this.preserveModifiedDateField == YesNoType.yes))
11327 {
11328 writer.WriteAttributeString("PreserveModifiedDate", "yes");
11329 }
11330 }
11331 if (this.sequenceFieldSet)
11332 {
11333 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
11334 }
11335 if (this.valueFieldSet)
11336 {
11337 writer.WriteAttributeString("Value", this.valueField);
11338 }
11339 if (this.verifyPathFieldSet)
11340 {
11341 writer.WriteAttributeString("VerifyPath", this.verifyPathField);
11342 }
11343 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
11344 {
11345 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
11346 childElement.OutputXml(writer);
11347 }
11348 writer.WriteEndElement();
11349 }
11350
11351 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11352 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
11353 void ISetAttributes.SetAttribute(string name, string value)
11354 {
11355 if (String.IsNullOrEmpty(name))
11356 {
11357 throw new ArgumentNullException("name");
11358 }
11359 if (("Id" == name))
11360 {
11361 this.idField = value;
11362 this.idFieldSet = true;
11363 }
11364 if (("Action" == name))
11365 {
11366 this.actionField = XmlConfig.ParseActionType(value);
11367 this.actionFieldSet = true;
11368 }
11369 if (("ElementId" == name))
11370 {
11371 this.elementIdField = value;
11372 this.elementIdFieldSet = true;
11373 }
11374 if (("ElementPath" == name))
11375 {
11376 this.elementPathField = value;
11377 this.elementPathFieldSet = true;
11378 }
11379 if (("File" == name))
11380 {
11381 this.fileField = value;
11382 this.fileFieldSet = true;
11383 }
11384 if (("Name" == name))
11385 {
11386 this.nameField = value;
11387 this.nameFieldSet = true;
11388 }
11389 if (("Node" == name))
11390 {
11391 this.nodeField = XmlConfig.ParseNodeType(value);
11392 this.nodeFieldSet = true;
11393 }
11394 if (("On" == name))
11395 {
11396 this.onField = XmlConfig.ParseOnType(value);
11397 this.onFieldSet = true;
11398 }
11399 if (("PreserveModifiedDate" == name))
11400 {
11401 this.preserveModifiedDateField = Enums.ParseYesNoType(value);
11402 this.preserveModifiedDateFieldSet = true;
11403 }
11404 if (("Sequence" == name))
11405 {
11406 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
11407 this.sequenceFieldSet = true;
11408 }
11409 if (("Value" == name))
11410 {
11411 this.valueField = value;
11412 this.valueFieldSet = true;
11413 }
11414 if (("VerifyPath" == name))
11415 {
11416 this.verifyPathField = value;
11417 this.verifyPathFieldSet = true;
11418 }
11419 }
11420
11421 [GeneratedCode("XsdGen", "4.0.0.0")]
11422 public enum ActionType
11423 {
11424
11425 IllegalValue = int.MaxValue,
11426
11427 NotSet = -1,
11428
11429 create,
11430
11431 delete,
11432 }
11433
11434 [GeneratedCode("XsdGen", "4.0.0.0")]
11435 public enum NodeType
11436 {
11437
11438 IllegalValue = int.MaxValue,
11439
11440 NotSet = -1,
11441
11442 element,
11443
11444 value,
11445
11446 document,
11447 }
11448
11449 [GeneratedCode("XsdGen", "4.0.0.0")]
11450 public enum OnType
11451 {
11452
11453 IllegalValue = int.MaxValue,
11454
11455 NotSet = -1,
11456
11457 install,
11458
11459 uninstall,
11460 }
11461 }
11462}
diff --git a/src/wix/heat/Serialize/vs.cs b/src/wix/heat/Serialize/vs.cs
new file mode 100644
index 00000000..8f926efc
--- /dev/null
+++ b/src/wix/heat/Serialize/vs.cs
@@ -0,0 +1,1574 @@
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#pragma warning disable 1591
12namespace WixToolset.Harvesters.Serialize.VS
13{
14 using System;
15 using System.CodeDom.Compiler;
16 using System.Collections;
17 using System.Diagnostics.CodeAnalysis;
18 using System.Globalization;
19 using System.Xml;
20 using WixToolset.Harvesters.Serialize;
21
22
23 /// <summary>
24 /// Values of this type will either be "yes" or "no".
25 /// </summary>
26 [GeneratedCode("XsdGen", "4.0.0.0")]
27 public enum YesNoType
28 {
29
30 IllegalValue = int.MaxValue,
31
32 NotSet = -1,
33
34 no,
35
36 yes,
37 }
38
39 [GeneratedCode("XsdGen", "4.0.0.0")]
40 public class Enums
41 {
42
43 /// <summary>
44 /// Parses a YesNoType from a string.
45 /// </summary>
46 public static YesNoType ParseYesNoType(string value)
47 {
48 YesNoType parsedValue;
49 Enums.TryParseYesNoType(value, out parsedValue);
50 return parsedValue;
51 }
52
53 /// <summary>
54 /// Tries to parse a YesNoType from a string.
55 /// </summary>
56 public static bool TryParseYesNoType(string value, out YesNoType parsedValue)
57 {
58 parsedValue = YesNoType.NotSet;
59 if (string.IsNullOrEmpty(value))
60 {
61 return false;
62 }
63 if (("no" == value))
64 {
65 parsedValue = YesNoType.no;
66 }
67 else
68 {
69 if (("yes" == value))
70 {
71 parsedValue = YesNoType.yes;
72 }
73 else
74 {
75 parsedValue = YesNoType.IllegalValue;
76 return false;
77 }
78 }
79 return true;
80 }
81 }
82
83 /// <summary>
84 /// Help Namespace for a help collection. The parent file is the key for the HxC (Collection) file.
85 /// </summary>
86 [GeneratedCode("XsdGen", "4.0.0.0")]
87 public class HelpCollection : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
88 {
89
90 private ElementCollection children;
91
92 private string idField;
93
94 private bool idFieldSet;
95
96 private string descriptionField;
97
98 private bool descriptionFieldSet;
99
100 private string nameField;
101
102 private bool nameFieldSet;
103
104 private YesNoType suppressCustomActionsField;
105
106 private bool suppressCustomActionsFieldSet;
107
108 private ISchemaElement parentElement;
109
110 public HelpCollection()
111 {
112 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
113 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFileRef)));
114 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFilterRef)));
115 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PlugCollectionInto)));
116 this.children = childCollection0;
117 }
118
119 public virtual IEnumerable Children
120 {
121 get
122 {
123 return this.children;
124 }
125 }
126
127 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
128 public virtual IEnumerable this[System.Type childType]
129 {
130 get
131 {
132 return this.children.Filter(childType);
133 }
134 }
135
136 /// <summary>
137 /// Primary Key for HelpNamespace.
138 /// </summary>
139 public string Id
140 {
141 get
142 {
143 return this.idField;
144 }
145 set
146 {
147 this.idFieldSet = true;
148 this.idField = value;
149 }
150 }
151
152 /// <summary>
153 /// Friendly name for Namespace.
154 /// </summary>
155 public string Description
156 {
157 get
158 {
159 return this.descriptionField;
160 }
161 set
162 {
163 this.descriptionFieldSet = true;
164 this.descriptionField = value;
165 }
166 }
167
168 /// <summary>
169 /// Internal Microsoft Help ID for this Namespace.
170 /// </summary>
171 public string Name
172 {
173 get
174 {
175 return this.nameField;
176 }
177 set
178 {
179 this.nameFieldSet = true;
180 this.nameField = value;
181 }
182 }
183
184 /// <summary>
185 /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module.
186 /// </summary>
187 public YesNoType SuppressCustomActions
188 {
189 get
190 {
191 return this.suppressCustomActionsField;
192 }
193 set
194 {
195 this.suppressCustomActionsFieldSet = true;
196 this.suppressCustomActionsField = value;
197 }
198 }
199
200 public virtual ISchemaElement ParentElement
201 {
202 get
203 {
204 return this.parentElement;
205 }
206 set
207 {
208 this.parentElement = value;
209 }
210 }
211
212 public virtual void AddChild(ISchemaElement child)
213 {
214 if ((null == child))
215 {
216 throw new ArgumentNullException("child");
217 }
218 this.children.AddElement(child);
219 child.ParentElement = this;
220 }
221
222 public virtual void RemoveChild(ISchemaElement child)
223 {
224 if ((null == child))
225 {
226 throw new ArgumentNullException("child");
227 }
228 this.children.RemoveElement(child);
229 child.ParentElement = null;
230 }
231
232 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
233 ISchemaElement ICreateChildren.CreateChild(string childName)
234 {
235 if (String.IsNullOrEmpty(childName))
236 {
237 throw new ArgumentNullException("childName");
238 }
239 ISchemaElement childValue = null;
240 if (("HelpFileRef" == childName))
241 {
242 childValue = new HelpFileRef();
243 }
244 if (("HelpFilterRef" == childName))
245 {
246 childValue = new HelpFilterRef();
247 }
248 if (("PlugCollectionInto" == childName))
249 {
250 childValue = new PlugCollectionInto();
251 }
252 if ((null == childValue))
253 {
254 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
255 }
256 return childValue;
257 }
258
259 /// <summary>
260 /// Processes this element and all child elements into an XmlWriter.
261 /// </summary>
262 public virtual void OutputXml(XmlWriter writer)
263 {
264 if ((null == writer))
265 {
266 throw new ArgumentNullException("writer");
267 }
268 writer.WriteStartElement("HelpCollection", "http://wixtoolset.org/schemas/v4/wxs/vs");
269 if (this.idFieldSet)
270 {
271 writer.WriteAttributeString("Id", this.idField);
272 }
273 if (this.descriptionFieldSet)
274 {
275 writer.WriteAttributeString("Description", this.descriptionField);
276 }
277 if (this.nameFieldSet)
278 {
279 writer.WriteAttributeString("Name", this.nameField);
280 }
281 if (this.suppressCustomActionsFieldSet)
282 {
283 if ((this.suppressCustomActionsField == YesNoType.no))
284 {
285 writer.WriteAttributeString("SuppressCustomActions", "no");
286 }
287 if ((this.suppressCustomActionsField == YesNoType.yes))
288 {
289 writer.WriteAttributeString("SuppressCustomActions", "yes");
290 }
291 }
292 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
293 {
294 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
295 childElement.OutputXml(writer);
296 }
297 writer.WriteEndElement();
298 }
299
300 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
301 void ISetAttributes.SetAttribute(string name, string value)
302 {
303 if (String.IsNullOrEmpty(name))
304 {
305 throw new ArgumentNullException("name");
306 }
307 if (("Id" == name))
308 {
309 this.idField = value;
310 this.idFieldSet = true;
311 }
312 if (("Description" == name))
313 {
314 this.descriptionField = value;
315 this.descriptionFieldSet = true;
316 }
317 if (("Name" == name))
318 {
319 this.nameField = value;
320 this.nameFieldSet = true;
321 }
322 if (("SuppressCustomActions" == name))
323 {
324 this.suppressCustomActionsField = Enums.ParseYesNoType(value);
325 this.suppressCustomActionsFieldSet = true;
326 }
327 }
328 }
329
330 /// <summary>
331 /// Filter for Help Namespace.
332 /// </summary>
333 [GeneratedCode("XsdGen", "4.0.0.0")]
334 public class HelpFilter : ISchemaElement, ISetAttributes
335 {
336
337 private string idField;
338
339 private bool idFieldSet;
340
341 private string filterDefinitionField;
342
343 private bool filterDefinitionFieldSet;
344
345 private string nameField;
346
347 private bool nameFieldSet;
348
349 private YesNoType suppressCustomActionsField;
350
351 private bool suppressCustomActionsFieldSet;
352
353 private ISchemaElement parentElement;
354
355 /// <summary>
356 /// Primary Key for HelpFilter.
357 /// </summary>
358 public string Id
359 {
360 get
361 {
362 return this.idField;
363 }
364 set
365 {
366 this.idFieldSet = true;
367 this.idField = value;
368 }
369 }
370
371 /// <summary>
372 /// Query String for Help Filter.
373 /// </summary>
374 public string FilterDefinition
375 {
376 get
377 {
378 return this.filterDefinitionField;
379 }
380 set
381 {
382 this.filterDefinitionFieldSet = true;
383 this.filterDefinitionField = value;
384 }
385 }
386
387 /// <summary>
388 /// Friendly name for Filter.
389 /// </summary>
390 public string Name
391 {
392 get
393 {
394 return this.nameField;
395 }
396 set
397 {
398 this.nameFieldSet = true;
399 this.nameField = value;
400 }
401 }
402
403 /// <summary>
404 /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module.
405 /// </summary>
406 public YesNoType SuppressCustomActions
407 {
408 get
409 {
410 return this.suppressCustomActionsField;
411 }
412 set
413 {
414 this.suppressCustomActionsFieldSet = true;
415 this.suppressCustomActionsField = value;
416 }
417 }
418
419 public virtual ISchemaElement ParentElement
420 {
421 get
422 {
423 return this.parentElement;
424 }
425 set
426 {
427 this.parentElement = value;
428 }
429 }
430
431 /// <summary>
432 /// Processes this element and all child elements into an XmlWriter.
433 /// </summary>
434 public virtual void OutputXml(XmlWriter writer)
435 {
436 if ((null == writer))
437 {
438 throw new ArgumentNullException("writer");
439 }
440 writer.WriteStartElement("HelpFilter", "http://wixtoolset.org/schemas/v4/wxs/vs");
441 if (this.idFieldSet)
442 {
443 writer.WriteAttributeString("Id", this.idField);
444 }
445 if (this.filterDefinitionFieldSet)
446 {
447 writer.WriteAttributeString("FilterDefinition", this.filterDefinitionField);
448 }
449 if (this.nameFieldSet)
450 {
451 writer.WriteAttributeString("Name", this.nameField);
452 }
453 if (this.suppressCustomActionsFieldSet)
454 {
455 if ((this.suppressCustomActionsField == YesNoType.no))
456 {
457 writer.WriteAttributeString("SuppressCustomActions", "no");
458 }
459 if ((this.suppressCustomActionsField == YesNoType.yes))
460 {
461 writer.WriteAttributeString("SuppressCustomActions", "yes");
462 }
463 }
464 writer.WriteEndElement();
465 }
466
467 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
468 void ISetAttributes.SetAttribute(string name, string value)
469 {
470 if (String.IsNullOrEmpty(name))
471 {
472 throw new ArgumentNullException("name");
473 }
474 if (("Id" == name))
475 {
476 this.idField = value;
477 this.idFieldSet = true;
478 }
479 if (("FilterDefinition" == name))
480 {
481 this.filterDefinitionField = value;
482 this.filterDefinitionFieldSet = true;
483 }
484 if (("Name" == name))
485 {
486 this.nameField = value;
487 this.nameFieldSet = true;
488 }
489 if (("SuppressCustomActions" == name))
490 {
491 this.suppressCustomActionsField = Enums.ParseYesNoType(value);
492 this.suppressCustomActionsFieldSet = true;
493 }
494 }
495 }
496
497 /// <summary>
498 /// File for Help Namespace. The parent file is the key for HxS (Title) file.
499 /// </summary>
500 [GeneratedCode("XsdGen", "4.0.0.0")]
501 public class HelpFile : ISchemaElement, ISetAttributes
502 {
503
504 private string idField;
505
506 private bool idFieldSet;
507
508 private string attributeIndexField;
509
510 private bool attributeIndexFieldSet;
511
512 private string indexField;
513
514 private bool indexFieldSet;
515
516 private int languageField;
517
518 private bool languageFieldSet;
519
520 private string nameField;
521
522 private bool nameFieldSet;
523
524 private string sampleLocationField;
525
526 private bool sampleLocationFieldSet;
527
528 private string searchField;
529
530 private bool searchFieldSet;
531
532 private YesNoType suppressCustomActionsField;
533
534 private bool suppressCustomActionsFieldSet;
535
536 private ISchemaElement parentElement;
537
538 /// <summary>
539 /// Primary Key for HelpFile Table.
540 /// </summary>
541 public string Id
542 {
543 get
544 {
545 return this.idField;
546 }
547 set
548 {
549 this.idFieldSet = true;
550 this.idField = value;
551 }
552 }
553
554 /// <summary>
555 /// Key for HxR (Attributes) file.
556 /// </summary>
557 public string AttributeIndex
558 {
559 get
560 {
561 return this.attributeIndexField;
562 }
563 set
564 {
565 this.attributeIndexFieldSet = true;
566 this.attributeIndexField = value;
567 }
568 }
569
570 /// <summary>
571 /// Key for HxI (Index) file.
572 /// </summary>
573 public string Index
574 {
575 get
576 {
577 return this.indexField;
578 }
579 set
580 {
581 this.indexFieldSet = true;
582 this.indexField = value;
583 }
584 }
585
586 /// <summary>
587 /// Language ID for content file.
588 /// </summary>
589 public int Language
590 {
591 get
592 {
593 return this.languageField;
594 }
595 set
596 {
597 this.languageFieldSet = true;
598 this.languageField = value;
599 }
600 }
601
602 /// <summary>
603 /// Internal Microsoft Help ID for this HelpFile.
604 /// </summary>
605 public string Name
606 {
607 get
608 {
609 return this.nameField;
610 }
611 set
612 {
613 this.nameFieldSet = true;
614 this.nameField = value;
615 }
616 }
617
618 /// <summary>
619 /// Key for a file that is in the "root" of the samples directory for this HelpFile.
620 /// </summary>
621 public string SampleLocation
622 {
623 get
624 {
625 return this.sampleLocationField;
626 }
627 set
628 {
629 this.sampleLocationFieldSet = true;
630 this.sampleLocationField = value;
631 }
632 }
633
634 /// <summary>
635 /// Key for HxQ (Query) file.
636 /// </summary>
637 public string Search
638 {
639 get
640 {
641 return this.searchField;
642 }
643 set
644 {
645 this.searchFieldSet = true;
646 this.searchField = value;
647 }
648 }
649
650 /// <summary>
651 /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module.
652 /// </summary>
653 public YesNoType SuppressCustomActions
654 {
655 get
656 {
657 return this.suppressCustomActionsField;
658 }
659 set
660 {
661 this.suppressCustomActionsFieldSet = true;
662 this.suppressCustomActionsField = value;
663 }
664 }
665
666 public virtual ISchemaElement ParentElement
667 {
668 get
669 {
670 return this.parentElement;
671 }
672 set
673 {
674 this.parentElement = value;
675 }
676 }
677
678 /// <summary>
679 /// Processes this element and all child elements into an XmlWriter.
680 /// </summary>
681 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
682 public virtual void OutputXml(XmlWriter writer)
683 {
684 if ((null == writer))
685 {
686 throw new ArgumentNullException("writer");
687 }
688 writer.WriteStartElement("HelpFile", "http://wixtoolset.org/schemas/v4/wxs/vs");
689 if (this.idFieldSet)
690 {
691 writer.WriteAttributeString("Id", this.idField);
692 }
693 if (this.attributeIndexFieldSet)
694 {
695 writer.WriteAttributeString("AttributeIndex", this.attributeIndexField);
696 }
697 if (this.indexFieldSet)
698 {
699 writer.WriteAttributeString("Index", this.indexField);
700 }
701 if (this.languageFieldSet)
702 {
703 writer.WriteAttributeString("Language", this.languageField.ToString(CultureInfo.InvariantCulture));
704 }
705 if (this.nameFieldSet)
706 {
707 writer.WriteAttributeString("Name", this.nameField);
708 }
709 if (this.sampleLocationFieldSet)
710 {
711 writer.WriteAttributeString("SampleLocation", this.sampleLocationField);
712 }
713 if (this.searchFieldSet)
714 {
715 writer.WriteAttributeString("Search", this.searchField);
716 }
717 if (this.suppressCustomActionsFieldSet)
718 {
719 if ((this.suppressCustomActionsField == YesNoType.no))
720 {
721 writer.WriteAttributeString("SuppressCustomActions", "no");
722 }
723 if ((this.suppressCustomActionsField == YesNoType.yes))
724 {
725 writer.WriteAttributeString("SuppressCustomActions", "yes");
726 }
727 }
728 writer.WriteEndElement();
729 }
730
731 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
732 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
733 void ISetAttributes.SetAttribute(string name, string value)
734 {
735 if (String.IsNullOrEmpty(name))
736 {
737 throw new ArgumentNullException("name");
738 }
739 if (("Id" == name))
740 {
741 this.idField = value;
742 this.idFieldSet = true;
743 }
744 if (("AttributeIndex" == name))
745 {
746 this.attributeIndexField = value;
747 this.attributeIndexFieldSet = true;
748 }
749 if (("Index" == name))
750 {
751 this.indexField = value;
752 this.indexFieldSet = true;
753 }
754 if (("Language" == name))
755 {
756 this.languageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
757 this.languageFieldSet = true;
758 }
759 if (("Name" == name))
760 {
761 this.nameField = value;
762 this.nameFieldSet = true;
763 }
764 if (("SampleLocation" == name))
765 {
766 this.sampleLocationField = value;
767 this.sampleLocationFieldSet = true;
768 }
769 if (("Search" == name))
770 {
771 this.searchField = value;
772 this.searchFieldSet = true;
773 }
774 if (("SuppressCustomActions" == name))
775 {
776 this.suppressCustomActionsField = Enums.ParseYesNoType(value);
777 this.suppressCustomActionsFieldSet = true;
778 }
779 }
780 }
781
782 /// <summary>
783 /// Plugin for Help Namespace.
784 /// </summary>
785 [GeneratedCode("XsdGen", "4.0.0.0")]
786 public class PlugCollectionInto : ISchemaElement, ISetAttributes
787 {
788
789 private string attributesField;
790
791 private bool attributesFieldSet;
792
793 private string tableOfContentsField;
794
795 private bool tableOfContentsFieldSet;
796
797 private string targetCollectionField;
798
799 private bool targetCollectionFieldSet;
800
801 private string targetTableOfContentsField;
802
803 private bool targetTableOfContentsFieldSet;
804
805 private string targetFeatureField;
806
807 private bool targetFeatureFieldSet;
808
809 private YesNoType suppressExternalNamespacesField;
810
811 private bool suppressExternalNamespacesFieldSet;
812
813 private ISchemaElement parentElement;
814
815 /// <summary>
816 /// Key for HxA (Attributes) file of child namespace.
817 /// </summary>
818 public string Attributes
819 {
820 get
821 {
822 return this.attributesField;
823 }
824 set
825 {
826 this.attributesFieldSet = true;
827 this.attributesField = value;
828 }
829 }
830
831 /// <summary>
832 /// Key for HxT file of child namespace.
833 /// </summary>
834 public string TableOfContents
835 {
836 get
837 {
838 return this.tableOfContentsField;
839 }
840 set
841 {
842 this.tableOfContentsFieldSet = true;
843 this.tableOfContentsField = value;
844 }
845 }
846
847 /// <summary>
848 /// Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted.
849 /// The following special keys can be used to plug into external namespaces defined outside of the installer.
850 /// MS_VSIPCC_v80 : Visual Studio 2005
851 /// MS.VSIPCC.v90 : Visual Studio 2008
852 /// </summary>
853 public string TargetCollection
854 {
855 get
856 {
857 return this.targetCollectionField;
858 }
859 set
860 {
861 this.targetCollectionFieldSet = true;
862 this.targetCollectionField = value;
863 }
864 }
865
866 /// <summary>
867 /// Key for HxT file of parent namespace that now includes the new child namespace.
868 /// </summary>
869 public string TargetTableOfContents
870 {
871 get
872 {
873 return this.targetTableOfContentsField;
874 }
875 set
876 {
877 this.targetTableOfContentsFieldSet = true;
878 this.targetTableOfContentsField = value;
879 }
880 }
881
882 /// <summary>
883 /// Key for the feature parent of this help collection. Required only when plugging into external namespaces.
884 /// </summary>
885 public string TargetFeature
886 {
887 get
888 {
889 return this.targetFeatureField;
890 }
891 set
892 {
893 this.targetFeatureFieldSet = true;
894 this.targetFeatureField = value;
895 }
896 }
897
898 /// <summary>
899 /// Suppress linking Visual Studio Help namespaces. Help redistributable merge modules will be required. Use this when building a merge module.
900 /// </summary>
901 public YesNoType SuppressExternalNamespaces
902 {
903 get
904 {
905 return this.suppressExternalNamespacesField;
906 }
907 set
908 {
909 this.suppressExternalNamespacesFieldSet = true;
910 this.suppressExternalNamespacesField = value;
911 }
912 }
913
914 public virtual ISchemaElement ParentElement
915 {
916 get
917 {
918 return this.parentElement;
919 }
920 set
921 {
922 this.parentElement = value;
923 }
924 }
925
926 /// <summary>
927 /// Processes this element and all child elements into an XmlWriter.
928 /// </summary>
929 public virtual void OutputXml(XmlWriter writer)
930 {
931 if ((null == writer))
932 {
933 throw new ArgumentNullException("writer");
934 }
935 writer.WriteStartElement("PlugCollectionInto", "http://wixtoolset.org/schemas/v4/wxs/vs");
936 if (this.attributesFieldSet)
937 {
938 writer.WriteAttributeString("Attributes", this.attributesField);
939 }
940 if (this.tableOfContentsFieldSet)
941 {
942 writer.WriteAttributeString("TableOfContents", this.tableOfContentsField);
943 }
944 if (this.targetCollectionFieldSet)
945 {
946 writer.WriteAttributeString("TargetCollection", this.targetCollectionField);
947 }
948 if (this.targetTableOfContentsFieldSet)
949 {
950 writer.WriteAttributeString("TargetTableOfContents", this.targetTableOfContentsField);
951 }
952 if (this.targetFeatureFieldSet)
953 {
954 writer.WriteAttributeString("TargetFeature", this.targetFeatureField);
955 }
956 if (this.suppressExternalNamespacesFieldSet)
957 {
958 if ((this.suppressExternalNamespacesField == YesNoType.no))
959 {
960 writer.WriteAttributeString("SuppressExternalNamespaces", "no");
961 }
962 if ((this.suppressExternalNamespacesField == YesNoType.yes))
963 {
964 writer.WriteAttributeString("SuppressExternalNamespaces", "yes");
965 }
966 }
967 writer.WriteEndElement();
968 }
969
970 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
971 void ISetAttributes.SetAttribute(string name, string value)
972 {
973 if (String.IsNullOrEmpty(name))
974 {
975 throw new ArgumentNullException("name");
976 }
977 if (("Attributes" == name))
978 {
979 this.attributesField = value;
980 this.attributesFieldSet = true;
981 }
982 if (("TableOfContents" == name))
983 {
984 this.tableOfContentsField = value;
985 this.tableOfContentsFieldSet = true;
986 }
987 if (("TargetCollection" == name))
988 {
989 this.targetCollectionField = value;
990 this.targetCollectionFieldSet = true;
991 }
992 if (("TargetTableOfContents" == name))
993 {
994 this.targetTableOfContentsField = value;
995 this.targetTableOfContentsFieldSet = true;
996 }
997 if (("TargetFeature" == name))
998 {
999 this.targetFeatureField = value;
1000 this.targetFeatureFieldSet = true;
1001 }
1002 if (("SuppressExternalNamespaces" == name))
1003 {
1004 this.suppressExternalNamespacesField = Enums.ParseYesNoType(value);
1005 this.suppressExternalNamespacesFieldSet = true;
1006 }
1007 }
1008 }
1009
1010 /// <summary>
1011 /// Create a reference to a HelpFile element in another Fragment.
1012 /// </summary>
1013 [GeneratedCode("XsdGen", "4.0.0.0")]
1014 public class HelpFileRef : ISchemaElement, ISetAttributes
1015 {
1016
1017 private string idField;
1018
1019 private bool idFieldSet;
1020
1021 private ISchemaElement parentElement;
1022
1023 /// <summary>
1024 /// Primary Key for HelpFile Table.
1025 /// </summary>
1026 public string Id
1027 {
1028 get
1029 {
1030 return this.idField;
1031 }
1032 set
1033 {
1034 this.idFieldSet = true;
1035 this.idField = value;
1036 }
1037 }
1038
1039 public virtual ISchemaElement ParentElement
1040 {
1041 get
1042 {
1043 return this.parentElement;
1044 }
1045 set
1046 {
1047 this.parentElement = value;
1048 }
1049 }
1050
1051 /// <summary>
1052 /// Processes this element and all child elements into an XmlWriter.
1053 /// </summary>
1054 public virtual void OutputXml(XmlWriter writer)
1055 {
1056 if ((null == writer))
1057 {
1058 throw new ArgumentNullException("writer");
1059 }
1060 writer.WriteStartElement("HelpFileRef", "http://wixtoolset.org/schemas/v4/wxs/vs");
1061 if (this.idFieldSet)
1062 {
1063 writer.WriteAttributeString("Id", this.idField);
1064 }
1065 writer.WriteEndElement();
1066 }
1067
1068 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1069 void ISetAttributes.SetAttribute(string name, string value)
1070 {
1071 if (String.IsNullOrEmpty(name))
1072 {
1073 throw new ArgumentNullException("name");
1074 }
1075 if (("Id" == name))
1076 {
1077 this.idField = value;
1078 this.idFieldSet = true;
1079 }
1080 }
1081 }
1082
1083 /// <summary>
1084 /// Create a reference to a HelpFile element in another Fragment.
1085 /// </summary>
1086 [GeneratedCode("XsdGen", "4.0.0.0")]
1087 public class HelpFilterRef : ISchemaElement, ISetAttributes
1088 {
1089
1090 private string idField;
1091
1092 private bool idFieldSet;
1093
1094 private ISchemaElement parentElement;
1095
1096 /// <summary>
1097 /// Primary Key for HelpFilter.
1098 /// </summary>
1099 public string Id
1100 {
1101 get
1102 {
1103 return this.idField;
1104 }
1105 set
1106 {
1107 this.idFieldSet = true;
1108 this.idField = value;
1109 }
1110 }
1111
1112 public virtual ISchemaElement ParentElement
1113 {
1114 get
1115 {
1116 return this.parentElement;
1117 }
1118 set
1119 {
1120 this.parentElement = value;
1121 }
1122 }
1123
1124 /// <summary>
1125 /// Processes this element and all child elements into an XmlWriter.
1126 /// </summary>
1127 public virtual void OutputXml(XmlWriter writer)
1128 {
1129 if ((null == writer))
1130 {
1131 throw new ArgumentNullException("writer");
1132 }
1133 writer.WriteStartElement("HelpFilterRef", "http://wixtoolset.org/schemas/v4/wxs/vs");
1134 if (this.idFieldSet)
1135 {
1136 writer.WriteAttributeString("Id", this.idField);
1137 }
1138 writer.WriteEndElement();
1139 }
1140
1141 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1142 void ISetAttributes.SetAttribute(string name, string value)
1143 {
1144 if (String.IsNullOrEmpty(name))
1145 {
1146 throw new ArgumentNullException("name");
1147 }
1148 if (("Id" == name))
1149 {
1150 this.idField = value;
1151 this.idFieldSet = true;
1152 }
1153 }
1154 }
1155
1156 /// <summary>
1157 /// Create a reference to a HelpCollection element in another Fragment.
1158 /// </summary>
1159 [GeneratedCode("XsdGen", "4.0.0.0")]
1160 public class HelpCollectionRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
1161 {
1162
1163 private ElementCollection children;
1164
1165 private string idField;
1166
1167 private bool idFieldSet;
1168
1169 private ISchemaElement parentElement;
1170
1171 public HelpCollectionRef()
1172 {
1173 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
1174 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFileRef)));
1175 this.children = childCollection0;
1176 }
1177
1178 public virtual IEnumerable Children
1179 {
1180 get
1181 {
1182 return this.children;
1183 }
1184 }
1185
1186 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
1187 public virtual IEnumerable this[System.Type childType]
1188 {
1189 get
1190 {
1191 return this.children.Filter(childType);
1192 }
1193 }
1194
1195 /// <summary>
1196 /// Primary Key for HelpNamespace Table.
1197 /// </summary>
1198 public string Id
1199 {
1200 get
1201 {
1202 return this.idField;
1203 }
1204 set
1205 {
1206 this.idFieldSet = true;
1207 this.idField = value;
1208 }
1209 }
1210
1211 public virtual ISchemaElement ParentElement
1212 {
1213 get
1214 {
1215 return this.parentElement;
1216 }
1217 set
1218 {
1219 this.parentElement = value;
1220 }
1221 }
1222
1223 public virtual void AddChild(ISchemaElement child)
1224 {
1225 if ((null == child))
1226 {
1227 throw new ArgumentNullException("child");
1228 }
1229 this.children.AddElement(child);
1230 child.ParentElement = this;
1231 }
1232
1233 public virtual void RemoveChild(ISchemaElement child)
1234 {
1235 if ((null == child))
1236 {
1237 throw new ArgumentNullException("child");
1238 }
1239 this.children.RemoveElement(child);
1240 child.ParentElement = null;
1241 }
1242
1243 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1244 ISchemaElement ICreateChildren.CreateChild(string childName)
1245 {
1246 if (String.IsNullOrEmpty(childName))
1247 {
1248 throw new ArgumentNullException("childName");
1249 }
1250 ISchemaElement childValue = null;
1251 if (("HelpFileRef" == childName))
1252 {
1253 childValue = new HelpFileRef();
1254 }
1255 if ((null == childValue))
1256 {
1257 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
1258 }
1259 return childValue;
1260 }
1261
1262 /// <summary>
1263 /// Processes this element and all child elements into an XmlWriter.
1264 /// </summary>
1265 public virtual void OutputXml(XmlWriter writer)
1266 {
1267 if ((null == writer))
1268 {
1269 throw new ArgumentNullException("writer");
1270 }
1271 writer.WriteStartElement("HelpCollectionRef", "http://wixtoolset.org/schemas/v4/wxs/vs");
1272 if (this.idFieldSet)
1273 {
1274 writer.WriteAttributeString("Id", this.idField);
1275 }
1276 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
1277 {
1278 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
1279 childElement.OutputXml(writer);
1280 }
1281 writer.WriteEndElement();
1282 }
1283
1284 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1285 void ISetAttributes.SetAttribute(string name, string value)
1286 {
1287 if (String.IsNullOrEmpty(name))
1288 {
1289 throw new ArgumentNullException("name");
1290 }
1291 if (("Id" == name))
1292 {
1293 this.idField = value;
1294 this.idFieldSet = true;
1295 }
1296 }
1297 }
1298
1299 /// <summary>
1300 /// This element provides the metdata required to install/uninstall a file as
1301 /// a VSIX Package. The VSIX package file will be installed as part of the MSI
1302 /// then passed to the VSIX installer to install the VSIX package. To avoid the
1303 /// duplication, simply use the MSI to install the VSIX package itself.
1304 /// </summary>
1305 [GeneratedCode("XsdGen", "4.0.0.0")]
1306 public class VsixPackage : ISchemaElement, ISetAttributes
1307 {
1308
1309 private string fileField;
1310
1311 private bool fileFieldSet;
1312
1313 private string packageIdField;
1314
1315 private bool packageIdFieldSet;
1316
1317 private YesNoType permanentField;
1318
1319 private bool permanentFieldSet;
1320
1321 private string targetField;
1322
1323 private bool targetFieldSet;
1324
1325 private string targetVersionField;
1326
1327 private bool targetVersionFieldSet;
1328
1329 private YesNoType vitalField;
1330
1331 private bool vitalFieldSet;
1332
1333 private string vsixInstallerPathPropertyField;
1334
1335 private bool vsixInstallerPathPropertyFieldSet;
1336
1337 private ISchemaElement parentElement;
1338
1339 /// <summary>
1340 /// Reference to file identifer. This attribute is required when the element is not a
1341 /// child of a File element and is invalid when the element is a child of the File element.
1342 /// </summary>
1343 public string File
1344 {
1345 get
1346 {
1347 return this.fileField;
1348 }
1349 set
1350 {
1351 this.fileFieldSet = true;
1352 this.fileField = value;
1353 }
1354 }
1355
1356 /// <summary>
1357 /// Identity of the VSIX package per its internal manifest. If this value is not correct
1358 /// the VSIX package will not correctly uninstall.
1359 /// </summary>
1360 public string PackageId
1361 {
1362 get
1363 {
1364 return this.packageIdField;
1365 }
1366 set
1367 {
1368 this.packageIdFieldSet = true;
1369 this.packageIdField = value;
1370 }
1371 }
1372
1373 /// <summary>
1374 /// Indicates whether the VSIX package is uninstalled when the parent Component is uninstalled.
1375 /// The default is 'no'.
1376 /// </summary>
1377 public YesNoType Permanent
1378 {
1379 get
1380 {
1381 return this.permanentField;
1382 }
1383 set
1384 {
1385 this.permanentFieldSet = true;
1386 this.permanentField = value;
1387 }
1388 }
1389
1390 /// <summary>
1391 /// Specifies the SKU of Visual Studio in which to register the extension. If no target
1392 /// is specified the extension is registered with all installed SKUs. If the Target
1393 /// attribute is specified the TargetVersion attribute must also be specified. The
1394 /// following is a list of known Visual Studio targets: integratedShell, professional,
1395 /// premium, ultimate, vbExpress, vcExpress, vcsExpress, vwdExpress
1396 /// </summary>
1397 public string Target
1398 {
1399 get
1400 {
1401 return this.targetField;
1402 }
1403 set
1404 {
1405 this.targetFieldSet = true;
1406 this.targetField = value;
1407 }
1408 }
1409
1410 /// <summary>
1411 /// Specifies the version of Visual Studio in which to register the extension. This attribute
1412 /// is required if the Target attribute is specified.
1413 /// </summary>
1414 public string TargetVersion
1415 {
1416 get
1417 {
1418 return this.targetVersionField;
1419 }
1420 set
1421 {
1422 this.targetVersionFieldSet = true;
1423 this.targetVersionField = value;
1424 }
1425 }
1426
1427 /// <summary>
1428 /// Indicates whether failure to install the VSIX package causes the installation to rollback.
1429 /// The default is 'yes'.
1430 /// </summary>
1431 public YesNoType Vital
1432 {
1433 get
1434 {
1435 return this.vitalField;
1436 }
1437 set
1438 {
1439 this.vitalFieldSet = true;
1440 this.vitalField = value;
1441 }
1442 }
1443
1444 /// <summary>
1445 /// Optional reference to a Property element that contains the path to the VsixInstaller.exe.
1446 /// By default, the latest VsixInstaller.exe on the machine will be used to install the VSIX
1447 /// package. It is highly recommended that this attribute is *not* used.
1448 /// </summary>
1449 public string VsixInstallerPathProperty
1450 {
1451 get
1452 {
1453 return this.vsixInstallerPathPropertyField;
1454 }
1455 set
1456 {
1457 this.vsixInstallerPathPropertyFieldSet = true;
1458 this.vsixInstallerPathPropertyField = value;
1459 }
1460 }
1461
1462 public virtual ISchemaElement ParentElement
1463 {
1464 get
1465 {
1466 return this.parentElement;
1467 }
1468 set
1469 {
1470 this.parentElement = value;
1471 }
1472 }
1473
1474 /// <summary>
1475 /// Processes this element and all child elements into an XmlWriter.
1476 /// </summary>
1477 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
1478 public virtual void OutputXml(XmlWriter writer)
1479 {
1480 if ((null == writer))
1481 {
1482 throw new ArgumentNullException("writer");
1483 }
1484 writer.WriteStartElement("VsixPackage", "http://wixtoolset.org/schemas/v4/wxs/vs");
1485 if (this.fileFieldSet)
1486 {
1487 writer.WriteAttributeString("File", this.fileField);
1488 }
1489 if (this.packageIdFieldSet)
1490 {
1491 writer.WriteAttributeString("PackageId", this.packageIdField);
1492 }
1493 if (this.permanentFieldSet)
1494 {
1495 if ((this.permanentField == YesNoType.no))
1496 {
1497 writer.WriteAttributeString("Permanent", "no");
1498 }
1499 if ((this.permanentField == YesNoType.yes))
1500 {
1501 writer.WriteAttributeString("Permanent", "yes");
1502 }
1503 }
1504 if (this.targetFieldSet)
1505 {
1506 writer.WriteAttributeString("Target", this.targetField);
1507 }
1508 if (this.targetVersionFieldSet)
1509 {
1510 writer.WriteAttributeString("TargetVersion", this.targetVersionField);
1511 }
1512 if (this.vitalFieldSet)
1513 {
1514 if ((this.vitalField == YesNoType.no))
1515 {
1516 writer.WriteAttributeString("Vital", "no");
1517 }
1518 if ((this.vitalField == YesNoType.yes))
1519 {
1520 writer.WriteAttributeString("Vital", "yes");
1521 }
1522 }
1523 if (this.vsixInstallerPathPropertyFieldSet)
1524 {
1525 writer.WriteAttributeString("VsixInstallerPathProperty", this.vsixInstallerPathPropertyField);
1526 }
1527 writer.WriteEndElement();
1528 }
1529
1530 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1531 void ISetAttributes.SetAttribute(string name, string value)
1532 {
1533 if (String.IsNullOrEmpty(name))
1534 {
1535 throw new ArgumentNullException("name");
1536 }
1537 if (("File" == name))
1538 {
1539 this.fileField = value;
1540 this.fileFieldSet = true;
1541 }
1542 if (("PackageId" == name))
1543 {
1544 this.packageIdField = value;
1545 this.packageIdFieldSet = true;
1546 }
1547 if (("Permanent" == name))
1548 {
1549 this.permanentField = Enums.ParseYesNoType(value);
1550 this.permanentFieldSet = true;
1551 }
1552 if (("Target" == name))
1553 {
1554 this.targetField = value;
1555 this.targetFieldSet = true;
1556 }
1557 if (("TargetVersion" == name))
1558 {
1559 this.targetVersionField = value;
1560 this.targetVersionFieldSet = true;
1561 }
1562 if (("Vital" == name))
1563 {
1564 this.vitalField = Enums.ParseYesNoType(value);
1565 this.vitalFieldSet = true;
1566 }
1567 if (("VsixInstallerPathProperty" == name))
1568 {
1569 this.vsixInstallerPathPropertyField = value;
1570 this.vsixInstallerPathPropertyFieldSet = true;
1571 }
1572 }
1573 }
1574}
diff --git a/src/wix/heat/Serialize/wix.cs b/src/wix/heat/Serialize/wix.cs
new file mode 100644
index 00000000..e5a81cd0
--- /dev/null
+++ b/src/wix/heat/Serialize/wix.cs
@@ -0,0 +1,57740 @@
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#pragma warning disable 1591 // TODO: add documentation
12namespace WixToolset.Harvesters.Serialize
13{
14 using System;
15 using System.CodeDom.Compiler;
16 using System.Collections;
17 using System.Diagnostics.CodeAnalysis;
18 using System.Globalization;
19 using System.Xml;
20
21 /// <summary>
22 /// Values of this type will either be "attached" or "detached".
23 /// </summary>
24 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
25 public enum BurnContainerType
26 {
27
28 IllegalValue = int.MaxValue,
29
30 NotSet = -1,
31
32 attached,
33
34 detached,
35 }
36
37 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38 public class Enums
39 {
40
41 /// <summary>
42 /// Parses a BurnContainerType from a string.
43 /// </summary>
44 public static BurnContainerType ParseBurnContainerType(string value)
45 {
46 BurnContainerType parsedValue;
47 Enums.TryParseBurnContainerType(value, out parsedValue);
48 return parsedValue;
49 }
50
51 /// <summary>
52 /// Tries to parse a BurnContainerType from a string.
53 /// </summary>
54 public static bool TryParseBurnContainerType(string value, out BurnContainerType parsedValue)
55 {
56 parsedValue = BurnContainerType.NotSet;
57 if (string.IsNullOrEmpty(value))
58 {
59 return false;
60 }
61 if (("attached" == value))
62 {
63 parsedValue = BurnContainerType.attached;
64 }
65 else
66 {
67 if (("detached" == value))
68 {
69 parsedValue = BurnContainerType.detached;
70 }
71 else
72 {
73 parsedValue = BurnContainerType.IllegalValue;
74 return false;
75 }
76 }
77 return true;
78 }
79
80 /// <summary>
81 /// Parses a BurnExeProtocolType from a string.
82 /// </summary>
83 public static BurnExeProtocolType ParseBurnExeProtocolType(string value)
84 {
85 BurnExeProtocolType parsedValue;
86 Enums.TryParseBurnExeProtocolType(value, out parsedValue);
87 return parsedValue;
88 }
89
90 /// <summary>
91 /// Tries to parse a BurnExeProtocolType from a string.
92 /// </summary>
93 public static bool TryParseBurnExeProtocolType(string value, out BurnExeProtocolType parsedValue)
94 {
95 parsedValue = BurnExeProtocolType.NotSet;
96 if (string.IsNullOrEmpty(value))
97 {
98 return false;
99 }
100 if (("none" == value))
101 {
102 parsedValue = BurnExeProtocolType.none;
103 }
104 else
105 {
106 if (("burn" == value))
107 {
108 parsedValue = BurnExeProtocolType.burn;
109 }
110 else
111 {
112 if (("netfx4" == value))
113 {
114 parsedValue = BurnExeProtocolType.netfx4;
115 }
116 else
117 {
118 parsedValue = BurnExeProtocolType.IllegalValue;
119 return false;
120 }
121 }
122 }
123 return true;
124 }
125
126 /// <summary>
127 /// Parses a YesNoType from a string.
128 /// </summary>
129 public static YesNoType ParseYesNoType(string value)
130 {
131 YesNoType parsedValue;
132 Enums.TryParseYesNoType(value, out parsedValue);
133 return parsedValue;
134 }
135
136 /// <summary>
137 /// Tries to parse a YesNoType from a string.
138 /// </summary>
139 public static bool TryParseYesNoType(string value, out YesNoType parsedValue)
140 {
141 parsedValue = YesNoType.NotSet;
142 if (string.IsNullOrEmpty(value))
143 {
144 return false;
145 }
146 if (("no" == value))
147 {
148 parsedValue = YesNoType.no;
149 }
150 else
151 {
152 if (("yes" == value))
153 {
154 parsedValue = YesNoType.yes;
155 }
156 else
157 {
158 parsedValue = YesNoType.IllegalValue;
159 return false;
160 }
161 }
162 return true;
163 }
164
165 /// <summary>
166 /// Parses a YesNoButtonType from a string.
167 /// </summary>
168 public static YesNoButtonType ParseYesNoButtonType(string value)
169 {
170 YesNoButtonType parsedValue;
171 Enums.TryParseYesNoButtonType(value, out parsedValue);
172 return parsedValue;
173 }
174
175 /// <summary>
176 /// Tries to parse a YesNoButtonType from a string.
177 /// </summary>
178 public static bool TryParseYesNoButtonType(string value, out YesNoButtonType parsedValue)
179 {
180 parsedValue = YesNoButtonType.NotSet;
181 if (string.IsNullOrEmpty(value))
182 {
183 return false;
184 }
185 if (("no" == value))
186 {
187 parsedValue = YesNoButtonType.no;
188 }
189 else
190 {
191 if (("yes" == value))
192 {
193 parsedValue = YesNoButtonType.yes;
194 }
195 else
196 {
197 if (("button" == value))
198 {
199 parsedValue = YesNoButtonType.button;
200 }
201 else
202 {
203 parsedValue = YesNoButtonType.IllegalValue;
204 return false;
205 }
206 }
207 }
208 return true;
209 }
210
211 /// <summary>
212 /// Parses a YesNoDefaultType from a string.
213 /// </summary>
214 public static YesNoDefaultType ParseYesNoDefaultType(string value)
215 {
216 YesNoDefaultType parsedValue;
217 Enums.TryParseYesNoDefaultType(value, out parsedValue);
218 return parsedValue;
219 }
220
221 /// <summary>
222 /// Tries to parse a YesNoDefaultType from a string.
223 /// </summary>
224 public static bool TryParseYesNoDefaultType(string value, out YesNoDefaultType parsedValue)
225 {
226 parsedValue = YesNoDefaultType.NotSet;
227 if (string.IsNullOrEmpty(value))
228 {
229 return false;
230 }
231 if (("default" == value))
232 {
233 parsedValue = YesNoDefaultType.@default;
234 }
235 else
236 {
237 if (("no" == value))
238 {
239 parsedValue = YesNoDefaultType.no;
240 }
241 else
242 {
243 if (("yes" == value))
244 {
245 parsedValue = YesNoDefaultType.yes;
246 }
247 else
248 {
249 parsedValue = YesNoDefaultType.IllegalValue;
250 return false;
251 }
252 }
253 }
254 return true;
255 }
256
257 /// <summary>
258 /// Parses a YesNoAlwaysType from a string.
259 /// </summary>
260 public static YesNoAlwaysType ParseYesNoAlwaysType(string value)
261 {
262 YesNoAlwaysType parsedValue;
263 Enums.TryParseYesNoAlwaysType(value, out parsedValue);
264 return parsedValue;
265 }
266
267 /// <summary>
268 /// Tries to parse a YesNoAlwaysType from a string.
269 /// </summary>
270 public static bool TryParseYesNoAlwaysType(string value, out YesNoAlwaysType parsedValue)
271 {
272 parsedValue = YesNoAlwaysType.NotSet;
273 if (string.IsNullOrEmpty(value))
274 {
275 return false;
276 }
277 if (("always" == value))
278 {
279 parsedValue = YesNoAlwaysType.always;
280 }
281 else
282 {
283 if (("no" == value))
284 {
285 parsedValue = YesNoAlwaysType.no;
286 }
287 else
288 {
289 if (("yes" == value))
290 {
291 parsedValue = YesNoAlwaysType.yes;
292 }
293 else
294 {
295 parsedValue = YesNoAlwaysType.IllegalValue;
296 return false;
297 }
298 }
299 }
300 return true;
301 }
302
303 /// <summary>
304 /// Parses a RegistryRootType from a string.
305 /// </summary>
306 public static RegistryRootType ParseRegistryRootType(string value)
307 {
308 RegistryRootType parsedValue;
309 Enums.TryParseRegistryRootType(value, out parsedValue);
310 return parsedValue;
311 }
312
313 /// <summary>
314 /// Tries to parse a RegistryRootType from a string.
315 /// </summary>
316 public static bool TryParseRegistryRootType(string value, out RegistryRootType parsedValue)
317 {
318 parsedValue = RegistryRootType.NotSet;
319 if (string.IsNullOrEmpty(value))
320 {
321 return false;
322 }
323 if (("HKMU" == value))
324 {
325 parsedValue = RegistryRootType.HKMU;
326 }
327 else
328 {
329 if (("HKCR" == value))
330 {
331 parsedValue = RegistryRootType.HKCR;
332 }
333 else
334 {
335 if (("HKCU" == value))
336 {
337 parsedValue = RegistryRootType.HKCU;
338 }
339 else
340 {
341 if (("HKLM" == value))
342 {
343 parsedValue = RegistryRootType.HKLM;
344 }
345 else
346 {
347 if (("HKU" == value))
348 {
349 parsedValue = RegistryRootType.HKU;
350 }
351 else
352 {
353 parsedValue = RegistryRootType.IllegalValue;
354 return false;
355 }
356 }
357 }
358 }
359 }
360 return true;
361 }
362
363 /// <summary>
364 /// Parses a ExitType from a string.
365 /// </summary>
366 public static ExitType ParseExitType(string value)
367 {
368 ExitType parsedValue;
369 Enums.TryParseExitType(value, out parsedValue);
370 return parsedValue;
371 }
372
373 /// <summary>
374 /// Tries to parse a ExitType from a string.
375 /// </summary>
376 public static bool TryParseExitType(string value, out ExitType parsedValue)
377 {
378 parsedValue = ExitType.NotSet;
379 if (string.IsNullOrEmpty(value))
380 {
381 return false;
382 }
383 if (("success" == value))
384 {
385 parsedValue = ExitType.success;
386 }
387 else
388 {
389 if (("cancel" == value))
390 {
391 parsedValue = ExitType.cancel;
392 }
393 else
394 {
395 if (("error" == value))
396 {
397 parsedValue = ExitType.error;
398 }
399 else
400 {
401 if (("suspend" == value))
402 {
403 parsedValue = ExitType.suspend;
404 }
405 else
406 {
407 parsedValue = ExitType.IllegalValue;
408 return false;
409 }
410 }
411 }
412 }
413 return true;
414 }
415
416 /// <summary>
417 /// Parses a InstallUninstallType from a string.
418 /// </summary>
419 public static InstallUninstallType ParseInstallUninstallType(string value)
420 {
421 InstallUninstallType parsedValue;
422 Enums.TryParseInstallUninstallType(value, out parsedValue);
423 return parsedValue;
424 }
425
426 /// <summary>
427 /// Tries to parse a InstallUninstallType from a string.
428 /// </summary>
429 public static bool TryParseInstallUninstallType(string value, out InstallUninstallType parsedValue)
430 {
431 parsedValue = InstallUninstallType.NotSet;
432 if (string.IsNullOrEmpty(value))
433 {
434 return false;
435 }
436 if (("install" == value))
437 {
438 parsedValue = InstallUninstallType.install;
439 }
440 else
441 {
442 if (("uninstall" == value))
443 {
444 parsedValue = InstallUninstallType.uninstall;
445 }
446 else
447 {
448 if (("both" == value))
449 {
450 parsedValue = InstallUninstallType.both;
451 }
452 else
453 {
454 parsedValue = InstallUninstallType.IllegalValue;
455 return false;
456 }
457 }
458 }
459 return true;
460 }
461
462 /// <summary>
463 /// Parses a SequenceType from a string.
464 /// </summary>
465 public static SequenceType ParseSequenceType(string value)
466 {
467 SequenceType parsedValue;
468 Enums.TryParseSequenceType(value, out parsedValue);
469 return parsedValue;
470 }
471
472 /// <summary>
473 /// Tries to parse a SequenceType from a string.
474 /// </summary>
475 public static bool TryParseSequenceType(string value, out SequenceType parsedValue)
476 {
477 parsedValue = SequenceType.NotSet;
478 if (string.IsNullOrEmpty(value))
479 {
480 return false;
481 }
482 if (("both" == value))
483 {
484 parsedValue = SequenceType.both;
485 }
486 else
487 {
488 if (("first" == value))
489 {
490 parsedValue = SequenceType.first;
491 }
492 else
493 {
494 if (("execute" == value))
495 {
496 parsedValue = SequenceType.execute;
497 }
498 else
499 {
500 if (("ui" == value))
501 {
502 parsedValue = SequenceType.ui;
503 }
504 else
505 {
506 parsedValue = SequenceType.IllegalValue;
507 return false;
508 }
509 }
510 }
511 }
512 return true;
513 }
514
515 /// <summary>
516 /// Parses a CompressionLevelType from a string.
517 /// </summary>
518 public static CompressionLevelType ParseCompressionLevelType(string value)
519 {
520 CompressionLevelType parsedValue;
521 Enums.TryParseCompressionLevelType(value, out parsedValue);
522 return parsedValue;
523 }
524
525 /// <summary>
526 /// Tries to parse a CompressionLevelType from a string.
527 /// </summary>
528 public static bool TryParseCompressionLevelType(string value, out CompressionLevelType parsedValue)
529 {
530 parsedValue = CompressionLevelType.NotSet;
531 if (string.IsNullOrEmpty(value))
532 {
533 return false;
534 }
535 if (("high" == value))
536 {
537 parsedValue = CompressionLevelType.high;
538 }
539 else
540 {
541 if (("low" == value))
542 {
543 parsedValue = CompressionLevelType.low;
544 }
545 else
546 {
547 if (("medium" == value))
548 {
549 parsedValue = CompressionLevelType.medium;
550 }
551 else
552 {
553 if (("mszip" == value))
554 {
555 parsedValue = CompressionLevelType.mszip;
556 }
557 else
558 {
559 if (("none" == value))
560 {
561 parsedValue = CompressionLevelType.none;
562 }
563 else
564 {
565 parsedValue = CompressionLevelType.IllegalValue;
566 return false;
567 }
568 }
569 }
570 }
571 }
572 return true;
573 }
574 }
575
576 /// <summary>
577 /// The list of communcation protocols with executable packages Burn supports.
578 /// </summary>
579 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
580 public enum BurnExeProtocolType
581 {
582
583 IllegalValue = int.MaxValue,
584
585 NotSet = -1,
586
587 /// <summary>
588 /// The executable package does not support a communication protocol.
589 /// </summary>
590 none,
591
592 /// <summary>
593 /// The executable package is another Burn bundle and supports the Burn communication protocol.
594 /// </summary>
595 burn,
596
597 /// <summary>
598 /// The executable package implements the .NET Framework v4.0 communication protocol.
599 /// </summary>
600 netfx4,
601 }
602
603 /// <summary>
604 /// Values of this type will either be "yes" or "no".
605 /// </summary>
606 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
607 public enum YesNoType
608 {
609
610 IllegalValue = int.MaxValue,
611
612 NotSet = -1,
613
614 no,
615
616 yes,
617 }
618
619 /// <summary>
620 /// Values of this type will either be "button", "yes" or "no".
621 /// </summary>
622 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
623 public enum YesNoButtonType
624 {
625
626 IllegalValue = int.MaxValue,
627
628 NotSet = -1,
629
630 no,
631
632 yes,
633
634 button,
635 }
636
637 /// <summary>
638 /// Values of this type will either be "default", "yes", or "no".
639 /// </summary>
640 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
641 public enum YesNoDefaultType
642 {
643
644 IllegalValue = int.MaxValue,
645
646 NotSet = -1,
647
648 @default,
649
650 no,
651
652 yes,
653 }
654
655 /// <summary>
656 /// Values of this type will either be "always", "yes", or "no".
657 /// </summary>
658 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
659 public enum YesNoAlwaysType
660 {
661
662 IllegalValue = int.MaxValue,
663
664 NotSet = -1,
665
666 always,
667
668 no,
669
670 yes,
671 }
672
673 /// <summary>
674 /// Values of this type represent possible registry roots.
675 /// </summary>
676 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
677 public enum RegistryRootType
678 {
679
680 IllegalValue = int.MaxValue,
681
682 NotSet = -1,
683
684 /// <summary>
685 /// A per-user installation will make the operation occur under HKEY_CURRENT_USER.
686 /// A per-machine installation will make the operation occur under HKEY_LOCAL_MACHINE.
687 /// </summary>
688 HKMU,
689
690 /// <summary>
691 /// Operation occurs under HKEY_CLASSES_ROOT. When using Windows 2000 or later, the installer writes or removes the value
692 /// from the HKCU\Software\Classes hive during per-user installations. When using Windows 2000 or later operating systems,
693 /// the installer writes or removes the value from the HKLM\Software\Classes hive during per-machine installations.
694 /// </summary>
695 HKCR,
696
697 /// <summary>
698 /// Operation occurs under HKEY_CURRENT_USER. It is recommended to set the KeyPath='yes' attribute when setting this value for writing values
699 /// in order to ensure that the installer writes the necessary registry entries when there are multiple users on the same computer.
700 /// </summary>
701 HKCU,
702
703 /// <summary>
704 /// Operation occurs under HKEY_LOCAL_MACHINE.
705 /// </summary>
706 HKLM,
707
708 /// <summary>
709 /// Operation occurs under HKEY_USERS.
710 /// </summary>
711 HKU,
712 }
713
714 /// <summary>
715 /// Value indicates that this action is executed if the installer returns the associated exit type. Each exit type can be used with no more than one action.
716 /// Multiple actions can have exit types assigned, but every action and exit type must be different. Exit types are typically used with dialog boxes.
717 /// </summary>
718 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
719 public enum ExitType
720 {
721
722 IllegalValue = int.MaxValue,
723
724 NotSet = -1,
725
726 success,
727
728 cancel,
729
730 error,
731
732 suspend,
733 }
734
735 /// <summary>
736 /// Specifies whether an action occur on install, uninstall or both.
737 /// </summary>
738 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
739 public enum InstallUninstallType
740 {
741
742 IllegalValue = int.MaxValue,
743
744 NotSet = -1,
745
746 /// <summary>
747 /// The action should happen during install (msiInstallStateLocal or msiInstallStateSource).
748 /// </summary>
749 install,
750
751 /// <summary>
752 /// The action should happen during uninstall (msiInstallStateAbsent).
753 /// </summary>
754 uninstall,
755
756 /// <summary>
757 /// The action should happen during both install and uninstall.
758 /// </summary>
759 both,
760 }
761
762 /// <summary>
763 /// Controls which sequences the item assignment is sequenced in.
764 /// </summary>
765 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
766 public enum SequenceType
767 {
768
769 IllegalValue = int.MaxValue,
770
771 NotSet = -1,
772
773 /// <summary>
774 /// Schedules the assignment in the InstallUISequence and the InstallExecuteSequence.
775 /// </summary>
776 both,
777
778 /// <summary>
779 /// Schedules the assignment to run in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped.
780 /// </summary>
781 first,
782
783 /// <summary>
784 /// Schedules the assignment only in the the InstallExecuteSequence.
785 /// </summary>
786 execute,
787
788 /// <summary>
789 /// Schedules the assignment only in the the InstallUISequence.
790 /// </summary>
791 ui,
792 }
793
794 /// <summary>
795 /// Indicates the compression level for a cabinet.
796 /// </summary>
797 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
798 public enum CompressionLevelType
799 {
800
801 IllegalValue = int.MaxValue,
802
803 NotSet = -1,
804
805 high,
806
807 low,
808
809 medium,
810
811 mszip,
812
813 none,
814 }
815
816 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
817 public abstract class ActionModuleSequenceType : ISchemaElement, ISetAttributes
818 {
819
820 private string afterField;
821
822 private bool afterFieldSet;
823
824 private string beforeField;
825
826 private bool beforeFieldSet;
827
828 private YesNoType overridableField;
829
830 private bool overridableFieldSet;
831
832 private int sequenceField;
833
834 private bool sequenceFieldSet;
835
836 private YesNoType suppressField;
837
838 private bool suppressFieldSet;
839
840 private string contentField;
841
842 private bool contentFieldSet;
843
844 private ISchemaElement parentElement;
845
846 /// <summary>
847 /// The name of an action that this action should come after.
848 /// </summary>
849 public string After
850 {
851 get
852 {
853 return this.afterField;
854 }
855 set
856 {
857 this.afterFieldSet = true;
858 this.afterField = value;
859 }
860 }
861
862 /// <summary>
863 /// The name of an action that this action should come before.
864 /// </summary>
865 public string Before
866 {
867 get
868 {
869 return this.beforeField;
870 }
871 set
872 {
873 this.beforeFieldSet = true;
874 this.beforeField = value;
875 }
876 }
877
878 /// <summary>
879 /// If "yes", the sequencing of this action may be overridden by sequencing elsewhere.
880 /// </summary>
881 public YesNoType Overridable
882 {
883 get
884 {
885 return this.overridableField;
886 }
887 set
888 {
889 this.overridableFieldSet = true;
890 this.overridableField = value;
891 }
892 }
893
894 /// <summary>
895 /// A value used to indicate the position of this action in a sequence.
896 /// </summary>
897 public int Sequence
898 {
899 get
900 {
901 return this.sequenceField;
902 }
903 set
904 {
905 this.sequenceFieldSet = true;
906 this.sequenceField = value;
907 }
908 }
909
910 /// <summary>
911 /// If yes, this action will not occur.
912 /// </summary>
913 public YesNoType Suppress
914 {
915 get
916 {
917 return this.suppressField;
918 }
919 set
920 {
921 this.suppressFieldSet = true;
922 this.suppressField = value;
923 }
924 }
925
926 /// <summary>
927 /// Text node specifies the condition of the action.
928 /// </summary>
929 public string Content
930 {
931 get
932 {
933 return this.contentField;
934 }
935 set
936 {
937 this.contentFieldSet = true;
938 this.contentField = value;
939 }
940 }
941
942 public virtual ISchemaElement ParentElement
943 {
944 get
945 {
946 return this.parentElement;
947 }
948 set
949 {
950 this.parentElement = value;
951 }
952 }
953
954 /// <summary>
955 /// Processes this element and all child elements into an XmlWriter.
956 /// </summary>
957 public virtual void OutputXml(XmlWriter writer)
958 {
959 if ((null == writer))
960 {
961 throw new ArgumentNullException("writer");
962 }
963 if (this.afterFieldSet)
964 {
965 writer.WriteAttributeString("After", this.afterField);
966 }
967 if (this.beforeFieldSet)
968 {
969 writer.WriteAttributeString("Before", this.beforeField);
970 }
971 if (this.overridableFieldSet)
972 {
973 if ((this.overridableField == YesNoType.no))
974 {
975 writer.WriteAttributeString("Overridable", "no");
976 }
977 if ((this.overridableField == YesNoType.yes))
978 {
979 writer.WriteAttributeString("Overridable", "yes");
980 }
981 }
982 if (this.sequenceFieldSet)
983 {
984 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
985 }
986 if (this.suppressFieldSet)
987 {
988 if ((this.suppressField == YesNoType.no))
989 {
990 writer.WriteAttributeString("Suppress", "no");
991 }
992 if ((this.suppressField == YesNoType.yes))
993 {
994 writer.WriteAttributeString("Suppress", "yes");
995 }
996 }
997 if (this.contentFieldSet)
998 {
999 writer.WriteString(this.contentField);
1000 }
1001 }
1002
1003 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1004 void ISetAttributes.SetAttribute(string name, string value)
1005 {
1006 if (String.IsNullOrEmpty(name))
1007 {
1008 throw new ArgumentNullException("name");
1009 }
1010 if (("After" == name))
1011 {
1012 this.afterField = value;
1013 this.afterFieldSet = true;
1014 }
1015 if (("Before" == name))
1016 {
1017 this.beforeField = value;
1018 this.beforeFieldSet = true;
1019 }
1020 if (("Overridable" == name))
1021 {
1022 this.overridableField = Enums.ParseYesNoType(value);
1023 this.overridableFieldSet = true;
1024 }
1025 if (("Sequence" == name))
1026 {
1027 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1028 this.sequenceFieldSet = true;
1029 }
1030 if (("Suppress" == name))
1031 {
1032 this.suppressField = Enums.ParseYesNoType(value);
1033 this.suppressFieldSet = true;
1034 }
1035 if (("Content" == name))
1036 {
1037 this.contentField = value;
1038 this.contentFieldSet = true;
1039 }
1040 }
1041 }
1042
1043 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1044 public abstract class ActionSequenceType : ISchemaElement, ISetAttributes
1045 {
1046
1047 private int sequenceField;
1048
1049 private bool sequenceFieldSet;
1050
1051 private YesNoType suppressField;
1052
1053 private bool suppressFieldSet;
1054
1055 private string contentField;
1056
1057 private bool contentFieldSet;
1058
1059 private ISchemaElement parentElement;
1060
1061 /// <summary>
1062 /// A value used to indicate the position of this action in a sequence.
1063 /// </summary>
1064 public int Sequence
1065 {
1066 get
1067 {
1068 return this.sequenceField;
1069 }
1070 set
1071 {
1072 this.sequenceFieldSet = true;
1073 this.sequenceField = value;
1074 }
1075 }
1076
1077 /// <summary>
1078 /// If yes, this action will not occur.
1079 /// </summary>
1080 public YesNoType Suppress
1081 {
1082 get
1083 {
1084 return this.suppressField;
1085 }
1086 set
1087 {
1088 this.suppressFieldSet = true;
1089 this.suppressField = value;
1090 }
1091 }
1092
1093 public string Content
1094 {
1095 get
1096 {
1097 return this.contentField;
1098 }
1099 set
1100 {
1101 this.contentFieldSet = true;
1102 this.contentField = value;
1103 }
1104 }
1105
1106 public virtual ISchemaElement ParentElement
1107 {
1108 get
1109 {
1110 return this.parentElement;
1111 }
1112 set
1113 {
1114 this.parentElement = value;
1115 }
1116 }
1117
1118 /// <summary>
1119 /// Processes this element and all child elements into an XmlWriter.
1120 /// </summary>
1121 public virtual void OutputXml(XmlWriter writer)
1122 {
1123 if ((null == writer))
1124 {
1125 throw new ArgumentNullException("writer");
1126 }
1127 if (this.sequenceFieldSet)
1128 {
1129 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
1130 }
1131 if (this.suppressFieldSet)
1132 {
1133 if ((this.suppressField == YesNoType.no))
1134 {
1135 writer.WriteAttributeString("Suppress", "no");
1136 }
1137 if ((this.suppressField == YesNoType.yes))
1138 {
1139 writer.WriteAttributeString("Suppress", "yes");
1140 }
1141 }
1142 if (this.contentFieldSet)
1143 {
1144 writer.WriteString(this.contentField);
1145 }
1146 }
1147
1148 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1149 void ISetAttributes.SetAttribute(string name, string value)
1150 {
1151 if (String.IsNullOrEmpty(name))
1152 {
1153 throw new ArgumentNullException("name");
1154 }
1155 if (("Sequence" == name))
1156 {
1157 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1158 this.sequenceFieldSet = true;
1159 }
1160 if (("Suppress" == name))
1161 {
1162 this.suppressField = Enums.ParseYesNoType(value);
1163 this.suppressFieldSet = true;
1164 }
1165 if (("Content" == name))
1166 {
1167 this.contentField = value;
1168 this.contentFieldSet = true;
1169 }
1170 }
1171 }
1172
1173 /// <summary>
1174 /// This is the top-level container element for every wxs file. Among the possible children,
1175 /// the Bundle, Package, Module, Patch, and PatchCreation elements are analogous to the main function in a C program.
1176 /// There can only be one of these present when linking occurs. Package compiles into an msi file,
1177 /// Module compiles into an msm file, PatchCreation compiles into a pcp file. The Fragment element
1178 /// is an atomic unit which ultimately links into either a Package, Module, or PatchCreation. The
1179 /// Fragment can either be completely included or excluded during linking.
1180 /// </summary>
1181 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1182 public class Wix : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
1183 {
1184
1185 private ElementCollection children;
1186
1187 private string requiredVersionField;
1188
1189 private bool requiredVersionFieldSet;
1190
1191 private ISchemaElement parentElement;
1192
1193 public Wix()
1194 {
1195 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
1196 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence);
1197 ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Choice);
1198 childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Bundle)));
1199 childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Package)));
1200 childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Module)));
1201 childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Patch)));
1202 childCollection1.AddCollection(childCollection2);
1203 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(Fragment)));
1204 childCollection0.AddCollection(childCollection1);
1205 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCreation)));
1206 this.children = childCollection0;
1207 }
1208
1209 public virtual IEnumerable Children
1210 {
1211 get
1212 {
1213 return this.children;
1214 }
1215 }
1216
1217 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
1218 public virtual IEnumerable this[System.Type childType]
1219 {
1220 get
1221 {
1222 return this.children.Filter(childType);
1223 }
1224 }
1225
1226 /// <summary>
1227 /// Required version of the WiX toolset to compile this input file.
1228 /// </summary>
1229 public string RequiredVersion
1230 {
1231 get
1232 {
1233 return this.requiredVersionField;
1234 }
1235 set
1236 {
1237 this.requiredVersionFieldSet = true;
1238 this.requiredVersionField = value;
1239 }
1240 }
1241
1242 public virtual ISchemaElement ParentElement
1243 {
1244 get
1245 {
1246 return this.parentElement;
1247 }
1248 set
1249 {
1250 this.parentElement = value;
1251 }
1252 }
1253
1254 public virtual void AddChild(ISchemaElement child)
1255 {
1256 if ((null == child))
1257 {
1258 throw new ArgumentNullException("child");
1259 }
1260 this.children.AddElement(child);
1261 child.ParentElement = this;
1262 }
1263
1264 public virtual void RemoveChild(ISchemaElement child)
1265 {
1266 if ((null == child))
1267 {
1268 throw new ArgumentNullException("child");
1269 }
1270 this.children.RemoveElement(child);
1271 child.ParentElement = null;
1272 }
1273
1274 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1275 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
1276 ISchemaElement ICreateChildren.CreateChild(string childName)
1277 {
1278 if (String.IsNullOrEmpty(childName))
1279 {
1280 throw new ArgumentNullException("childName");
1281 }
1282 ISchemaElement childValue = null;
1283 if (("Bundle" == childName))
1284 {
1285 childValue = new Bundle();
1286 }
1287 if (("Package" == childName))
1288 {
1289 childValue = new Package();
1290 }
1291 if (("Module" == childName))
1292 {
1293 childValue = new Module();
1294 }
1295 if (("Patch" == childName))
1296 {
1297 childValue = new Patch();
1298 }
1299 if (("Fragment" == childName))
1300 {
1301 childValue = new Fragment();
1302 }
1303 if (("PatchCreation" == childName))
1304 {
1305 childValue = new PatchCreation();
1306 }
1307 if ((null == childValue))
1308 {
1309 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
1310 }
1311 return childValue;
1312 }
1313
1314 /// <summary>
1315 /// Processes this element and all child elements into an XmlWriter.
1316 /// </summary>
1317 public virtual void OutputXml(XmlWriter writer)
1318 {
1319 if ((null == writer))
1320 {
1321 throw new ArgumentNullException("writer");
1322 }
1323 writer.WriteStartElement("Wix", "http://wixtoolset.org/schemas/v4/wxs");
1324 if (this.requiredVersionFieldSet)
1325 {
1326 writer.WriteAttributeString("RequiredVersion", this.requiredVersionField);
1327 }
1328 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
1329 {
1330 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
1331 childElement.OutputXml(writer);
1332 }
1333 writer.WriteEndElement();
1334 }
1335
1336 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1337 void ISetAttributes.SetAttribute(string name, string value)
1338 {
1339 if (String.IsNullOrEmpty(name))
1340 {
1341 throw new ArgumentNullException("name");
1342 }
1343 if (("RequiredVersion" == name))
1344 {
1345 this.requiredVersionField = value;
1346 this.requiredVersionFieldSet = true;
1347 }
1348 }
1349 }
1350
1351 /// <summary>
1352 /// This is the top-level container element for every wxi file.
1353 /// </summary>
1354 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1355 public class Include : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
1356 {
1357
1358 private ElementCollection children;
1359
1360 private ISchemaElement parentElement;
1361
1362 public Include()
1363 {
1364 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
1365 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
1366 this.children = childCollection0;
1367 }
1368
1369 public virtual IEnumerable Children
1370 {
1371 get
1372 {
1373 return this.children;
1374 }
1375 }
1376
1377 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
1378 public virtual IEnumerable this[System.Type childType]
1379 {
1380 get
1381 {
1382 return this.children.Filter(childType);
1383 }
1384 }
1385
1386 public virtual ISchemaElement ParentElement
1387 {
1388 get
1389 {
1390 return this.parentElement;
1391 }
1392 set
1393 {
1394 this.parentElement = value;
1395 }
1396 }
1397
1398 public virtual void AddChild(ISchemaElement child)
1399 {
1400 if ((null == child))
1401 {
1402 throw new ArgumentNullException("child");
1403 }
1404 this.children.AddElement(child);
1405 child.ParentElement = this;
1406 }
1407
1408 public virtual void RemoveChild(ISchemaElement child)
1409 {
1410 if ((null == child))
1411 {
1412 throw new ArgumentNullException("child");
1413 }
1414 this.children.RemoveElement(child);
1415 child.ParentElement = null;
1416 }
1417
1418 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1419 ISchemaElement ICreateChildren.CreateChild(string childName)
1420 {
1421 if (String.IsNullOrEmpty(childName))
1422 {
1423 throw new ArgumentNullException("childName");
1424 }
1425 ISchemaElement childValue = null;
1426 if ((null == childValue))
1427 {
1428 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
1429 }
1430 return childValue;
1431 }
1432
1433 /// <summary>
1434 /// Processes this element and all child elements into an XmlWriter.
1435 /// </summary>
1436 public virtual void OutputXml(XmlWriter writer)
1437 {
1438 if ((null == writer))
1439 {
1440 throw new ArgumentNullException("writer");
1441 }
1442 writer.WriteStartElement("Include", "http://wixtoolset.org/schemas/v4/wxs");
1443 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
1444 {
1445 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
1446 childElement.OutputXml(writer);
1447 }
1448 writer.WriteEndElement();
1449 }
1450
1451 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1452 void ISetAttributes.SetAttribute(string name, string value)
1453 {
1454 if (String.IsNullOrEmpty(name))
1455 {
1456 throw new ArgumentNullException("name");
1457 }
1458 }
1459 }
1460
1461 /// <summary>
1462 /// The root element for creating bundled packages.
1463 /// </summary>
1464 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1465 public class Bundle : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
1466 {
1467
1468 private ElementCollection children;
1469
1470 private string aboutUrlField;
1471
1472 private bool aboutUrlFieldSet;
1473
1474 private string copyrightField;
1475
1476 private bool copyrightFieldSet;
1477
1478 private YesNoDefaultType compressedField;
1479
1480 private bool compressedFieldSet;
1481
1482 private YesNoButtonType disableModifyField;
1483
1484 private bool disableModifyFieldSet;
1485
1486 private YesNoType disableRemoveField;
1487
1488 private bool disableRemoveFieldSet;
1489
1490 private YesNoType disableRepairField;
1491
1492 private bool disableRepairFieldSet;
1493
1494 private string helpTelephoneField;
1495
1496 private bool helpTelephoneFieldSet;
1497
1498 private string helpUrlField;
1499
1500 private bool helpUrlFieldSet;
1501
1502 private string iconSourceFileField;
1503
1504 private bool iconSourceFileFieldSet;
1505
1506 private string manufacturerField;
1507
1508 private bool manufacturerFieldSet;
1509
1510 private string nameField;
1511
1512 private bool nameFieldSet;
1513
1514 private string parentNameField;
1515
1516 private bool parentNameFieldSet;
1517
1518 private string splashScreenSourceFileField;
1519
1520 private bool splashScreenSourceFileFieldSet;
1521
1522 private string tagField;
1523
1524 private bool tagFieldSet;
1525
1526 private string updateUrlField;
1527
1528 private bool updateUrlFieldSet;
1529
1530 private string upgradeCodeField;
1531
1532 private bool upgradeCodeFieldSet;
1533
1534 private string versionField;
1535
1536 private bool versionFieldSet;
1537
1538 private string conditionField;
1539
1540 private bool conditionFieldSet;
1541
1542 private ISchemaElement parentElement;
1543
1544 public Bundle()
1545 {
1546 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
1547 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ApprovedExeForElevation)));
1548 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Log)));
1549 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Catalog)));
1550 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplication)));
1551 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplicationRef)));
1552 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(OptionalUpdateRegistration)));
1553 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Chain)));
1554 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Container)));
1555 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ContainerRef)));
1556 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroup)));
1557 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
1558 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RelatedBundle)));
1559 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Update)));
1560 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Variable)));
1561 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable)));
1562 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
1563 this.children = childCollection0;
1564 }
1565
1566 public virtual IEnumerable Children
1567 {
1568 get
1569 {
1570 return this.children;
1571 }
1572 }
1573
1574 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
1575 public virtual IEnumerable this[System.Type childType]
1576 {
1577 get
1578 {
1579 return this.children.Filter(childType);
1580 }
1581 }
1582
1583 /// <summary>
1584 /// A URL for more information about the bundle to display in Programs and Features (also
1585 /// known as Add/Remove Programs).
1586 /// </summary>
1587 public string AboutUrl
1588 {
1589 get
1590 {
1591 return this.aboutUrlField;
1592 }
1593 set
1594 {
1595 this.aboutUrlFieldSet = true;
1596 this.aboutUrlField = value;
1597 }
1598 }
1599
1600 /// <summary>
1601 /// The legal copyright found in the version resources of final bundle executable. If
1602 /// this attribute is not provided the copyright will be set to "Copyright (c) [Bundle/@Manufacturer]. All rights reserved.".
1603 /// </summary>
1604 public string Copyright
1605 {
1606 get
1607 {
1608 return this.copyrightField;
1609 }
1610 set
1611 {
1612 this.copyrightFieldSet = true;
1613 this.copyrightField = value;
1614 }
1615 }
1616
1617 /// <summary>
1618 /// Whether Packages and Payloads not assigned to a container should be added to the default attached container or if they should be external. The default is yes.
1619 /// </summary>
1620 public YesNoDefaultType Compressed
1621 {
1622 get
1623 {
1624 return this.compressedField;
1625 }
1626 set
1627 {
1628 this.compressedFieldSet = true;
1629 this.compressedField = value;
1630 }
1631 }
1632
1633 /// <summary>
1634 /// Determines whether the bundle can be modified via the Programs and Features (also known as
1635 /// Add/Remove Programs). If the value is "button" then Programs and Features will show a single
1636 /// "Uninstall/Change" button. If the value is "yes" then Programs and Features will only show
1637 /// the "Uninstall" button". If the value is "no", the default, then a "Change" button is shown.
1638 /// See the DisableRemove attribute for information how to not display the bundle in Programs
1639 /// and Features.
1640 /// </summary>
1641 public YesNoButtonType DisableModify
1642 {
1643 get
1644 {
1645 return this.disableModifyField;
1646 }
1647 set
1648 {
1649 this.disableModifyFieldSet = true;
1650 this.disableModifyField = value;
1651 }
1652 }
1653
1654 /// <summary>
1655 /// Determines whether the bundle can be removed via the Programs and Features (also
1656 /// known as Add/Remove Programs). If the value is "yes" then the "Uninstall" button will
1657 /// not be displayed. The default is "no" which ensures there is an "Uninstall" button to
1658 /// remove the bundle. If the "DisableModify" attribute is also "yes" or "button" then the
1659 /// bundle will not be displayed in Progams and Features and another mechanism (such as
1660 /// registering as a related bundle addon) must be used to ensure the bundle can be removed.
1661 /// </summary>
1662 public YesNoType DisableRemove
1663 {
1664 get
1665 {
1666 return this.disableRemoveField;
1667 }
1668 set
1669 {
1670 this.disableRemoveFieldSet = true;
1671 this.disableRemoveField = value;
1672 }
1673 }
1674
1675 public YesNoType DisableRepair
1676 {
1677 get
1678 {
1679 return this.disableRepairField;
1680 }
1681 set
1682 {
1683 this.disableRepairFieldSet = true;
1684 this.disableRepairField = value;
1685 }
1686 }
1687
1688 /// <summary>
1689 /// A telephone number for help to display in Programs and Features (also known as
1690 /// Add/Remove Programs).
1691 /// </summary>
1692 public string HelpTelephone
1693 {
1694 get
1695 {
1696 return this.helpTelephoneField;
1697 }
1698 set
1699 {
1700 this.helpTelephoneFieldSet = true;
1701 this.helpTelephoneField = value;
1702 }
1703 }
1704
1705 /// <summary>
1706 /// A URL to the help for the bundle to display in Programs and Features (also known as
1707 /// Add/Remove Programs).
1708 /// </summary>
1709 public string HelpUrl
1710 {
1711 get
1712 {
1713 return this.helpUrlField;
1714 }
1715 set
1716 {
1717 this.helpUrlFieldSet = true;
1718 this.helpUrlField = value;
1719 }
1720 }
1721
1722 /// <summary>
1723 /// Path to an icon that will replace the default icon in the final Bundle executable.
1724 /// This icon will also be displayed in Programs and Features (also known as Add/Remove
1725 /// Programs).
1726 /// </summary>
1727 public string IconSourceFile
1728 {
1729 get
1730 {
1731 return this.iconSourceFileField;
1732 }
1733 set
1734 {
1735 this.iconSourceFileFieldSet = true;
1736 this.iconSourceFileField = value;
1737 }
1738 }
1739
1740 /// <summary>
1741 /// The publisher of the bundle to display in Programs and Features (also known as
1742 /// Add/Remove Programs).
1743 /// </summary>
1744 public string Manufacturer
1745 {
1746 get
1747 {
1748 return this.manufacturerField;
1749 }
1750 set
1751 {
1752 this.manufacturerFieldSet = true;
1753 this.manufacturerField = value;
1754 }
1755 }
1756
1757 /// <summary>
1758 /// The name of the bundle to display in Programs and Features (also known as Add/Remove
1759 /// Programs). This name can be accessed and overwritten by a BootstrapperApplication
1760 /// using the WixBundleName bundle variable.
1761 /// </summary>
1762 public string Name
1763 {
1764 get
1765 {
1766 return this.nameField;
1767 }
1768 set
1769 {
1770 this.nameFieldSet = true;
1771 this.nameField = value;
1772 }
1773 }
1774
1775 /// <summary>
1776 /// The name of the parent bundle to display in Installed Updates (also known as Add/Remove
1777 /// Programs). This name is used to nest or group bundles that will appear as updates.
1778 /// If the parent name does not actually exist, a virtual parent is created automatically.
1779 /// </summary>
1780 public string ParentName
1781 {
1782 get
1783 {
1784 return this.parentNameField;
1785 }
1786 set
1787 {
1788 this.parentNameFieldSet = true;
1789 this.parentNameField = value;
1790 }
1791 }
1792
1793 /// <summary>
1794 /// Path to a bitmap that will be shown as the bootstrapper application is being loaded. If this attribute is not specified, no splash screen will be displayed.
1795 /// </summary>
1796 public string SplashScreenSourceFile
1797 {
1798 get
1799 {
1800 return this.splashScreenSourceFileField;
1801 }
1802 set
1803 {
1804 this.splashScreenSourceFileFieldSet = true;
1805 this.splashScreenSourceFileField = value;
1806 }
1807 }
1808
1809 /// <summary>
1810 /// Set this string to uniquely identify this bundle to its own BA, and to related bundles. The value of this string only matters to the BA, and its value has no direct effect on engine functionality.
1811 /// </summary>
1812 public string Tag
1813 {
1814 get
1815 {
1816 return this.tagField;
1817 }
1818 set
1819 {
1820 this.tagFieldSet = true;
1821 this.tagField = value;
1822 }
1823 }
1824
1825 /// <summary>
1826 /// A URL for updates of the bundle to display in Programs and Features (also
1827 /// known as Add/Remove Programs).
1828 /// </summary>
1829 public string UpdateUrl
1830 {
1831 get
1832 {
1833 return this.updateUrlField;
1834 }
1835 set
1836 {
1837 this.updateUrlFieldSet = true;
1838 this.updateUrlField = value;
1839 }
1840 }
1841
1842 /// <summary>
1843 /// Unique identifier for a family of bundles. If two bundles have the same UpgradeCode the
1844 /// bundle with the highest version will be installed.
1845 /// </summary>
1846 public string UpgradeCode
1847 {
1848 get
1849 {
1850 return this.upgradeCodeField;
1851 }
1852 set
1853 {
1854 this.upgradeCodeFieldSet = true;
1855 this.upgradeCodeField = value;
1856 }
1857 }
1858
1859 /// <summary>
1860 /// The version of the bundle. Newer versions upgrade earlier versions of the bundles
1861 /// with matching UpgradeCodes. If the bundle is registered in Programs and Features
1862 /// then this attribute will be displayed in the Programs and Features user interface.
1863 /// </summary>
1864 public string Version
1865 {
1866 get
1867 {
1868 return this.versionField;
1869 }
1870 set
1871 {
1872 this.versionFieldSet = true;
1873 this.versionField = value;
1874 }
1875 }
1876
1877 /// <summary>
1878 /// The condition of the bundle. If the condition is not met, the bundle will
1879 /// refuse to run. Conditions are checked before the bootstrapper application is loaded
1880 /// (before detect), and thus can only reference built-in variables such as
1881 /// variables which indicate the version of the OS.
1882 /// </summary>
1883 public string Condition
1884 {
1885 get
1886 {
1887 return this.conditionField;
1888 }
1889 set
1890 {
1891 this.conditionFieldSet = true;
1892 this.conditionField = value;
1893 }
1894 }
1895
1896 public virtual ISchemaElement ParentElement
1897 {
1898 get
1899 {
1900 return this.parentElement;
1901 }
1902 set
1903 {
1904 this.parentElement = value;
1905 }
1906 }
1907
1908 public virtual void AddChild(ISchemaElement child)
1909 {
1910 if ((null == child))
1911 {
1912 throw new ArgumentNullException("child");
1913 }
1914 this.children.AddElement(child);
1915 child.ParentElement = this;
1916 }
1917
1918 public virtual void RemoveChild(ISchemaElement child)
1919 {
1920 if ((null == child))
1921 {
1922 throw new ArgumentNullException("child");
1923 }
1924 this.children.RemoveElement(child);
1925 child.ParentElement = null;
1926 }
1927
1928 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1929 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
1930 ISchemaElement ICreateChildren.CreateChild(string childName)
1931 {
1932 if (String.IsNullOrEmpty(childName))
1933 {
1934 throw new ArgumentNullException("childName");
1935 }
1936 ISchemaElement childValue = null;
1937 if (("ApprovedExeForElevation" == childName))
1938 {
1939 childValue = new ApprovedExeForElevation();
1940 }
1941 if (("Log" == childName))
1942 {
1943 childValue = new Log();
1944 }
1945 if (("Catalog" == childName))
1946 {
1947 childValue = new Catalog();
1948 }
1949 if (("BootstrapperApplication" == childName))
1950 {
1951 childValue = new BootstrapperApplication();
1952 }
1953 if (("BootstrapperApplicationRef" == childName))
1954 {
1955 childValue = new BootstrapperApplicationRef();
1956 }
1957 if (("OptionalUpdateRegistration" == childName))
1958 {
1959 childValue = new OptionalUpdateRegistration();
1960 }
1961 if (("Chain" == childName))
1962 {
1963 childValue = new Chain();
1964 }
1965 if (("Container" == childName))
1966 {
1967 childValue = new Container();
1968 }
1969 if (("ContainerRef" == childName))
1970 {
1971 childValue = new ContainerRef();
1972 }
1973 if (("PayloadGroup" == childName))
1974 {
1975 childValue = new PayloadGroup();
1976 }
1977 if (("PayloadGroupRef" == childName))
1978 {
1979 childValue = new PayloadGroupRef();
1980 }
1981 if (("RelatedBundle" == childName))
1982 {
1983 childValue = new RelatedBundle();
1984 }
1985 if (("Update" == childName))
1986 {
1987 childValue = new Update();
1988 }
1989 if (("Variable" == childName))
1990 {
1991 childValue = new Variable();
1992 }
1993 if (("WixVariable" == childName))
1994 {
1995 childValue = new WixVariable();
1996 }
1997 if ((null == childValue))
1998 {
1999 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
2000 }
2001 return childValue;
2002 }
2003
2004 /// <summary>
2005 /// Processes this element and all child elements into an XmlWriter.
2006 /// </summary>
2007 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
2008 public virtual void OutputXml(XmlWriter writer)
2009 {
2010 if ((null == writer))
2011 {
2012 throw new ArgumentNullException("writer");
2013 }
2014 writer.WriteStartElement("Bundle", "http://wixtoolset.org/schemas/v4/wxs");
2015 if (this.aboutUrlFieldSet)
2016 {
2017 writer.WriteAttributeString("AboutUrl", this.aboutUrlField);
2018 }
2019 if (this.copyrightFieldSet)
2020 {
2021 writer.WriteAttributeString("Copyright", this.copyrightField);
2022 }
2023 if (this.compressedFieldSet)
2024 {
2025 if ((this.compressedField == YesNoDefaultType.@default))
2026 {
2027 writer.WriteAttributeString("Compressed", "default");
2028 }
2029 if ((this.compressedField == YesNoDefaultType.no))
2030 {
2031 writer.WriteAttributeString("Compressed", "no");
2032 }
2033 if ((this.compressedField == YesNoDefaultType.yes))
2034 {
2035 writer.WriteAttributeString("Compressed", "yes");
2036 }
2037 }
2038 if (this.disableModifyFieldSet)
2039 {
2040 if ((this.disableModifyField == YesNoButtonType.no))
2041 {
2042 writer.WriteAttributeString("DisableModify", "no");
2043 }
2044 if ((this.disableModifyField == YesNoButtonType.yes))
2045 {
2046 writer.WriteAttributeString("DisableModify", "yes");
2047 }
2048 if ((this.disableModifyField == YesNoButtonType.button))
2049 {
2050 writer.WriteAttributeString("DisableModify", "button");
2051 }
2052 }
2053 if (this.disableRemoveFieldSet)
2054 {
2055 if ((this.disableRemoveField == YesNoType.no))
2056 {
2057 writer.WriteAttributeString("DisableRemove", "no");
2058 }
2059 if ((this.disableRemoveField == YesNoType.yes))
2060 {
2061 writer.WriteAttributeString("DisableRemove", "yes");
2062 }
2063 }
2064 if (this.disableRepairFieldSet)
2065 {
2066 if ((this.disableRepairField == YesNoType.no))
2067 {
2068 writer.WriteAttributeString("DisableRepair", "no");
2069 }
2070 if ((this.disableRepairField == YesNoType.yes))
2071 {
2072 writer.WriteAttributeString("DisableRepair", "yes");
2073 }
2074 }
2075 if (this.helpTelephoneFieldSet)
2076 {
2077 writer.WriteAttributeString("HelpTelephone", this.helpTelephoneField);
2078 }
2079 if (this.helpUrlFieldSet)
2080 {
2081 writer.WriteAttributeString("HelpUrl", this.helpUrlField);
2082 }
2083 if (this.iconSourceFileFieldSet)
2084 {
2085 writer.WriteAttributeString("IconSourceFile", this.iconSourceFileField);
2086 }
2087 if (this.manufacturerFieldSet)
2088 {
2089 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
2090 }
2091 if (this.nameFieldSet)
2092 {
2093 writer.WriteAttributeString("Name", this.nameField);
2094 }
2095 if (this.parentNameFieldSet)
2096 {
2097 writer.WriteAttributeString("ParentName", this.parentNameField);
2098 }
2099 if (this.splashScreenSourceFileFieldSet)
2100 {
2101 writer.WriteAttributeString("SplashScreenSourceFile", this.splashScreenSourceFileField);
2102 }
2103 if (this.tagFieldSet)
2104 {
2105 writer.WriteAttributeString("Tag", this.tagField);
2106 }
2107 if (this.updateUrlFieldSet)
2108 {
2109 writer.WriteAttributeString("UpdateUrl", this.updateUrlField);
2110 }
2111 if (this.upgradeCodeFieldSet)
2112 {
2113 writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField);
2114 }
2115 if (this.versionFieldSet)
2116 {
2117 writer.WriteAttributeString("Version", this.versionField);
2118 }
2119 if (this.conditionFieldSet)
2120 {
2121 writer.WriteAttributeString("Condition", this.conditionField);
2122 }
2123 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
2124 {
2125 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
2126 childElement.OutputXml(writer);
2127 }
2128 writer.WriteEndElement();
2129 }
2130
2131 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2132 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
2133 void ISetAttributes.SetAttribute(string name, string value)
2134 {
2135 if (String.IsNullOrEmpty(name))
2136 {
2137 throw new ArgumentNullException("name");
2138 }
2139 if (("AboutUrl" == name))
2140 {
2141 this.aboutUrlField = value;
2142 this.aboutUrlFieldSet = true;
2143 }
2144 if (("Copyright" == name))
2145 {
2146 this.copyrightField = value;
2147 this.copyrightFieldSet = true;
2148 }
2149 if (("Compressed" == name))
2150 {
2151 this.compressedField = Enums.ParseYesNoDefaultType(value);
2152 this.compressedFieldSet = true;
2153 }
2154 if (("DisableModify" == name))
2155 {
2156 this.disableModifyField = Enums.ParseYesNoButtonType(value);
2157 this.disableModifyFieldSet = true;
2158 }
2159 if (("DisableRemove" == name))
2160 {
2161 this.disableRemoveField = Enums.ParseYesNoType(value);
2162 this.disableRemoveFieldSet = true;
2163 }
2164 if (("DisableRepair" == name))
2165 {
2166 this.disableRepairField = Enums.ParseYesNoType(value);
2167 this.disableRepairFieldSet = true;
2168 }
2169 if (("HelpTelephone" == name))
2170 {
2171 this.helpTelephoneField = value;
2172 this.helpTelephoneFieldSet = true;
2173 }
2174 if (("HelpUrl" == name))
2175 {
2176 this.helpUrlField = value;
2177 this.helpUrlFieldSet = true;
2178 }
2179 if (("IconSourceFile" == name))
2180 {
2181 this.iconSourceFileField = value;
2182 this.iconSourceFileFieldSet = true;
2183 }
2184 if (("Manufacturer" == name))
2185 {
2186 this.manufacturerField = value;
2187 this.manufacturerFieldSet = true;
2188 }
2189 if (("Name" == name))
2190 {
2191 this.nameField = value;
2192 this.nameFieldSet = true;
2193 }
2194 if (("ParentName" == name))
2195 {
2196 this.parentNameField = value;
2197 this.parentNameFieldSet = true;
2198 }
2199 if (("SplashScreenSourceFile" == name))
2200 {
2201 this.splashScreenSourceFileField = value;
2202 this.splashScreenSourceFileFieldSet = true;
2203 }
2204 if (("Tag" == name))
2205 {
2206 this.tagField = value;
2207 this.tagFieldSet = true;
2208 }
2209 if (("UpdateUrl" == name))
2210 {
2211 this.updateUrlField = value;
2212 this.updateUrlFieldSet = true;
2213 }
2214 if (("UpgradeCode" == name))
2215 {
2216 this.upgradeCodeField = value;
2217 this.upgradeCodeFieldSet = true;
2218 }
2219 if (("Version" == name))
2220 {
2221 this.versionField = value;
2222 this.versionFieldSet = true;
2223 }
2224 if (("Condition" == name))
2225 {
2226 this.conditionField = value;
2227 this.conditionFieldSet = true;
2228 }
2229 }
2230 }
2231
2232 /// <summary>
2233 /// Provides information about an .exe so that the BA can request the engine to run it elevated from any secure location.
2234 /// </summary>
2235 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2236 public class ApprovedExeForElevation : ISchemaElement, ISetAttributes
2237 {
2238
2239 private string idField;
2240
2241 private bool idFieldSet;
2242
2243 private string keyField;
2244
2245 private bool keyFieldSet;
2246
2247 private string valueField;
2248
2249 private bool valueFieldSet;
2250
2251 private YesNoType win64Field;
2252
2253 private bool win64FieldSet;
2254
2255 private ISchemaElement parentElement;
2256
2257 /// <summary>
2258 /// The identifier of the ApprovedExeForElevation element.
2259 /// </summary>
2260 public string Id
2261 {
2262 get
2263 {
2264 return this.idField;
2265 }
2266 set
2267 {
2268 this.idFieldSet = true;
2269 this.idField = value;
2270 }
2271 }
2272
2273 /// <summary>
2274 /// The key path.
2275 /// For security purposes, the root key will be HKLM and Variables are not supported.
2276 /// </summary>
2277 public string Key
2278 {
2279 get
2280 {
2281 return this.keyField;
2282 }
2283 set
2284 {
2285 this.keyFieldSet = true;
2286 this.keyField = value;
2287 }
2288 }
2289
2290 /// <summary>
2291 /// The value name.
2292 /// For security purposes, Variables are not supported.
2293 /// </summary>
2294 public string Value
2295 {
2296 get
2297 {
2298 return this.valueField;
2299 }
2300 set
2301 {
2302 this.valueFieldSet = true;
2303 this.valueField = value;
2304 }
2305 }
2306
2307 /// <summary>
2308 /// Instructs the search to look in the 64-bit registry when the value is 'yes'.
2309 /// When the value is 'no', the search looks in the 32-bit registry.
2310 /// The default value is 'no'.
2311 /// </summary>
2312 public YesNoType Win64
2313 {
2314 get
2315 {
2316 return this.win64Field;
2317 }
2318 set
2319 {
2320 this.win64FieldSet = true;
2321 this.win64Field = value;
2322 }
2323 }
2324
2325 public virtual ISchemaElement ParentElement
2326 {
2327 get
2328 {
2329 return this.parentElement;
2330 }
2331 set
2332 {
2333 this.parentElement = value;
2334 }
2335 }
2336
2337 /// <summary>
2338 /// Processes this element and all child elements into an XmlWriter.
2339 /// </summary>
2340 public virtual void OutputXml(XmlWriter writer)
2341 {
2342 if ((null == writer))
2343 {
2344 throw new ArgumentNullException("writer");
2345 }
2346 writer.WriteStartElement("ApprovedExeForElevation", "http://wixtoolset.org/schemas/v4/wxs");
2347 if (this.idFieldSet)
2348 {
2349 writer.WriteAttributeString("Id", this.idField);
2350 }
2351 if (this.keyFieldSet)
2352 {
2353 writer.WriteAttributeString("Key", this.keyField);
2354 }
2355 if (this.valueFieldSet)
2356 {
2357 writer.WriteAttributeString("Value", this.valueField);
2358 }
2359 if (this.win64FieldSet)
2360 {
2361 if ((this.win64Field == YesNoType.no))
2362 {
2363 writer.WriteAttributeString("Win64", "no");
2364 }
2365 if ((this.win64Field == YesNoType.yes))
2366 {
2367 writer.WriteAttributeString("Win64", "yes");
2368 }
2369 }
2370 writer.WriteEndElement();
2371 }
2372
2373 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2374 void ISetAttributes.SetAttribute(string name, string value)
2375 {
2376 if (String.IsNullOrEmpty(name))
2377 {
2378 throw new ArgumentNullException("name");
2379 }
2380 if (("Id" == name))
2381 {
2382 this.idField = value;
2383 this.idFieldSet = true;
2384 }
2385 if (("Key" == name))
2386 {
2387 this.keyField = value;
2388 this.keyFieldSet = true;
2389 }
2390 if (("Value" == name))
2391 {
2392 this.valueField = value;
2393 this.valueFieldSet = true;
2394 }
2395 if (("Win64" == name))
2396 {
2397 this.win64Field = Enums.ParseYesNoType(value);
2398 this.win64FieldSet = true;
2399 }
2400 }
2401 }
2402
2403 /// <summary>
2404 /// Overrides the default log settings for a bundle.
2405 /// </summary>
2406 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2407 public class Log : ISchemaElement, ISetAttributes
2408 {
2409
2410 private YesNoType disableField;
2411
2412 private bool disableFieldSet;
2413
2414 private string pathVariableField;
2415
2416 private bool pathVariableFieldSet;
2417
2418 private string prefixField;
2419
2420 private bool prefixFieldSet;
2421
2422 private string extensionField;
2423
2424 private bool extensionFieldSet;
2425
2426 private ISchemaElement parentElement;
2427
2428 /// <summary>
2429 /// Disables the default logging in the Bundle. The end user can still generate a
2430 /// log file by specifying the "-l" command-line argument when installing the
2431 /// Bundle.
2432 /// </summary>
2433 public YesNoType Disable
2434 {
2435 get
2436 {
2437 return this.disableField;
2438 }
2439 set
2440 {
2441 this.disableFieldSet = true;
2442 this.disableField = value;
2443 }
2444 }
2445
2446 /// <summary>
2447 /// Name of a Variable that will hold the path to the log file. An empty value
2448 /// will cause the variable to not be set. The default is "WixBundleLog".
2449 /// </summary>
2450 public string PathVariable
2451 {
2452 get
2453 {
2454 return this.pathVariableField;
2455 }
2456 set
2457 {
2458 this.pathVariableFieldSet = true;
2459 this.pathVariableField = value;
2460 }
2461 }
2462
2463 /// <summary>
2464 /// File name and optionally a relative path to use as the prefix for the log file. The
2465 /// default is to use the Bundle/@Name or, if Bundle/@Name is not specified, the value
2466 /// "Setup".
2467 /// </summary>
2468 public string Prefix
2469 {
2470 get
2471 {
2472 return this.prefixField;
2473 }
2474 set
2475 {
2476 this.prefixFieldSet = true;
2477 this.prefixField = value;
2478 }
2479 }
2480
2481 /// <summary>
2482 /// The extension to use for the log. The default is ".log".
2483 /// </summary>
2484 public string Extension
2485 {
2486 get
2487 {
2488 return this.extensionField;
2489 }
2490 set
2491 {
2492 this.extensionFieldSet = true;
2493 this.extensionField = value;
2494 }
2495 }
2496
2497 public virtual ISchemaElement ParentElement
2498 {
2499 get
2500 {
2501 return this.parentElement;
2502 }
2503 set
2504 {
2505 this.parentElement = value;
2506 }
2507 }
2508
2509 /// <summary>
2510 /// Processes this element and all child elements into an XmlWriter.
2511 /// </summary>
2512 public virtual void OutputXml(XmlWriter writer)
2513 {
2514 if ((null == writer))
2515 {
2516 throw new ArgumentNullException("writer");
2517 }
2518 writer.WriteStartElement("Log", "http://wixtoolset.org/schemas/v4/wxs");
2519 if (this.disableFieldSet)
2520 {
2521 if ((this.disableField == YesNoType.no))
2522 {
2523 writer.WriteAttributeString("Disable", "no");
2524 }
2525 if ((this.disableField == YesNoType.yes))
2526 {
2527 writer.WriteAttributeString("Disable", "yes");
2528 }
2529 }
2530 if (this.pathVariableFieldSet)
2531 {
2532 writer.WriteAttributeString("PathVariable", this.pathVariableField);
2533 }
2534 if (this.prefixFieldSet)
2535 {
2536 writer.WriteAttributeString("Prefix", this.prefixField);
2537 }
2538 if (this.extensionFieldSet)
2539 {
2540 writer.WriteAttributeString("Extension", this.extensionField);
2541 }
2542 writer.WriteEndElement();
2543 }
2544
2545 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2546 void ISetAttributes.SetAttribute(string name, string value)
2547 {
2548 if (String.IsNullOrEmpty(name))
2549 {
2550 throw new ArgumentNullException("name");
2551 }
2552 if (("Disable" == name))
2553 {
2554 this.disableField = Enums.ParseYesNoType(value);
2555 this.disableFieldSet = true;
2556 }
2557 if (("PathVariable" == name))
2558 {
2559 this.pathVariableField = value;
2560 this.pathVariableFieldSet = true;
2561 }
2562 if (("Prefix" == name))
2563 {
2564 this.prefixField = value;
2565 this.prefixFieldSet = true;
2566 }
2567 if (("Extension" == name))
2568 {
2569 this.extensionField = value;
2570 this.extensionFieldSet = true;
2571 }
2572 }
2573 }
2574
2575 /// <summary>
2576 /// Specify one or more catalog files that will be used to verify the contents of the bundle.
2577 /// </summary>
2578 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2579 public class Catalog : ISchemaElement, ISetAttributes
2580 {
2581
2582 private string idField;
2583
2584 private bool idFieldSet;
2585
2586 private string sourceFileField;
2587
2588 private bool sourceFileFieldSet;
2589
2590 private ISchemaElement parentElement;
2591
2592 /// <summary>
2593 /// The identifier of the catalog element.
2594 /// </summary>
2595 public string Id
2596 {
2597 get
2598 {
2599 return this.idField;
2600 }
2601 set
2602 {
2603 this.idFieldSet = true;
2604 this.idField = value;
2605 }
2606 }
2607
2608 /// <summary>
2609 /// The catalog file
2610 /// </summary>
2611 public string SourceFile
2612 {
2613 get
2614 {
2615 return this.sourceFileField;
2616 }
2617 set
2618 {
2619 this.sourceFileFieldSet = true;
2620 this.sourceFileField = value;
2621 }
2622 }
2623
2624 public virtual ISchemaElement ParentElement
2625 {
2626 get
2627 {
2628 return this.parentElement;
2629 }
2630 set
2631 {
2632 this.parentElement = value;
2633 }
2634 }
2635
2636 /// <summary>
2637 /// Processes this element and all child elements into an XmlWriter.
2638 /// </summary>
2639 public virtual void OutputXml(XmlWriter writer)
2640 {
2641 if ((null == writer))
2642 {
2643 throw new ArgumentNullException("writer");
2644 }
2645 writer.WriteStartElement("Catalog", "http://wixtoolset.org/schemas/v4/wxs");
2646 if (this.idFieldSet)
2647 {
2648 writer.WriteAttributeString("Id", this.idField);
2649 }
2650 if (this.sourceFileFieldSet)
2651 {
2652 writer.WriteAttributeString("SourceFile", this.sourceFileField);
2653 }
2654 writer.WriteEndElement();
2655 }
2656
2657 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2658 void ISetAttributes.SetAttribute(string name, string value)
2659 {
2660 if (String.IsNullOrEmpty(name))
2661 {
2662 throw new ArgumentNullException("name");
2663 }
2664 if (("Id" == name))
2665 {
2666 this.idField = value;
2667 this.idFieldSet = true;
2668 }
2669 if (("SourceFile" == name))
2670 {
2671 this.sourceFileField = value;
2672 this.sourceFileFieldSet = true;
2673 }
2674 }
2675 }
2676
2677 /// <summary>
2678 /// Contains all the relevant information about the setup UI.
2679 /// </summary>
2680 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2681 public class BootstrapperApplication : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
2682 {
2683
2684 private ElementCollection children;
2685
2686 private string idField;
2687
2688 private bool idFieldSet;
2689
2690 private string sourceFileField;
2691
2692 private bool sourceFileFieldSet;
2693
2694 private string nameField;
2695
2696 private bool nameFieldSet;
2697
2698 private ISchemaElement parentElement;
2699
2700 public BootstrapperApplication()
2701 {
2702 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
2703 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
2704 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
2705 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
2706 this.children = childCollection0;
2707 }
2708
2709 public virtual IEnumerable Children
2710 {
2711 get
2712 {
2713 return this.children;
2714 }
2715 }
2716
2717 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
2718 public virtual IEnumerable this[System.Type childType]
2719 {
2720 get
2721 {
2722 return this.children.Filter(childType);
2723 }
2724 }
2725
2726 /// <summary>
2727 /// The identifier of the BootstrapperApplication element. Only required if you want to reference this element using a BootstrapperApplicationRef element.
2728 /// </summary>
2729 public string Id
2730 {
2731 get
2732 {
2733 return this.idField;
2734 }
2735 set
2736 {
2737 this.idFieldSet = true;
2738 this.idField = value;
2739 }
2740 }
2741
2742 /// <summary>
2743 /// The DLL with the bootstrapper application entry function.
2744 /// </summary>
2745 public string SourceFile
2746 {
2747 get
2748 {
2749 return this.sourceFileField;
2750 }
2751 set
2752 {
2753 this.sourceFileFieldSet = true;
2754 this.sourceFileField = value;
2755 }
2756 }
2757
2758 /// <summary>
2759 /// The relative destination path and file name for the bootstrapper application DLL. The default is the source file name. Use this attribute to rename the bootstrapper application DLL or extract it into a subfolder. The use of '..' directories is not allowed.
2760 /// </summary>
2761 public string Name
2762 {
2763 get
2764 {
2765 return this.nameField;
2766 }
2767 set
2768 {
2769 this.nameFieldSet = true;
2770 this.nameField = value;
2771 }
2772 }
2773
2774 public virtual ISchemaElement ParentElement
2775 {
2776 get
2777 {
2778 return this.parentElement;
2779 }
2780 set
2781 {
2782 this.parentElement = value;
2783 }
2784 }
2785
2786 public virtual void AddChild(ISchemaElement child)
2787 {
2788 if ((null == child))
2789 {
2790 throw new ArgumentNullException("child");
2791 }
2792 this.children.AddElement(child);
2793 child.ParentElement = this;
2794 }
2795
2796 public virtual void RemoveChild(ISchemaElement child)
2797 {
2798 if ((null == child))
2799 {
2800 throw new ArgumentNullException("child");
2801 }
2802 this.children.RemoveElement(child);
2803 child.ParentElement = null;
2804 }
2805
2806 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2807 ISchemaElement ICreateChildren.CreateChild(string childName)
2808 {
2809 if (String.IsNullOrEmpty(childName))
2810 {
2811 throw new ArgumentNullException("childName");
2812 }
2813 ISchemaElement childValue = null;
2814 if (("Payload" == childName))
2815 {
2816 childValue = new Payload();
2817 }
2818 if (("PayloadGroupRef" == childName))
2819 {
2820 childValue = new PayloadGroupRef();
2821 }
2822 if ((null == childValue))
2823 {
2824 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
2825 }
2826 return childValue;
2827 }
2828
2829 /// <summary>
2830 /// Processes this element and all child elements into an XmlWriter.
2831 /// </summary>
2832 public virtual void OutputXml(XmlWriter writer)
2833 {
2834 if ((null == writer))
2835 {
2836 throw new ArgumentNullException("writer");
2837 }
2838 writer.WriteStartElement("BootstrapperApplication", "http://wixtoolset.org/schemas/v4/wxs");
2839 if (this.idFieldSet)
2840 {
2841 writer.WriteAttributeString("Id", this.idField);
2842 }
2843 if (this.sourceFileFieldSet)
2844 {
2845 writer.WriteAttributeString("SourceFile", this.sourceFileField);
2846 }
2847 if (this.nameFieldSet)
2848 {
2849 writer.WriteAttributeString("Name", this.nameField);
2850 }
2851 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
2852 {
2853 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
2854 childElement.OutputXml(writer);
2855 }
2856 writer.WriteEndElement();
2857 }
2858
2859 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2860 void ISetAttributes.SetAttribute(string name, string value)
2861 {
2862 if (String.IsNullOrEmpty(name))
2863 {
2864 throw new ArgumentNullException("name");
2865 }
2866 if (("Id" == name))
2867 {
2868 this.idField = value;
2869 this.idFieldSet = true;
2870 }
2871 if (("SourceFile" == name))
2872 {
2873 this.sourceFileField = value;
2874 this.sourceFileFieldSet = true;
2875 }
2876 if (("Name" == name))
2877 {
2878 this.nameField = value;
2879 this.nameFieldSet = true;
2880 }
2881 }
2882 }
2883
2884 /// <summary>
2885 /// Used to reference a BootstrapperApplication element and optionally add additional payloads to the bootstrapper application.
2886 /// </summary>
2887 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2888 public class BootstrapperApplicationRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
2889 {
2890
2891 private ElementCollection children;
2892
2893 private string idField;
2894
2895 private bool idFieldSet;
2896
2897 private ISchemaElement parentElement;
2898
2899 public BootstrapperApplicationRef()
2900 {
2901 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
2902 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
2903 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
2904 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
2905 this.children = childCollection0;
2906 }
2907
2908 public virtual IEnumerable Children
2909 {
2910 get
2911 {
2912 return this.children;
2913 }
2914 }
2915
2916 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
2917 public virtual IEnumerable this[System.Type childType]
2918 {
2919 get
2920 {
2921 return this.children.Filter(childType);
2922 }
2923 }
2924
2925 /// <summary>
2926 /// The identifier of the BootstrapperApplication element to reference.
2927 /// </summary>
2928 public string Id
2929 {
2930 get
2931 {
2932 return this.idField;
2933 }
2934 set
2935 {
2936 this.idFieldSet = true;
2937 this.idField = value;
2938 }
2939 }
2940
2941 public virtual ISchemaElement ParentElement
2942 {
2943 get
2944 {
2945 return this.parentElement;
2946 }
2947 set
2948 {
2949 this.parentElement = value;
2950 }
2951 }
2952
2953 public virtual void AddChild(ISchemaElement child)
2954 {
2955 if ((null == child))
2956 {
2957 throw new ArgumentNullException("child");
2958 }
2959 this.children.AddElement(child);
2960 child.ParentElement = this;
2961 }
2962
2963 public virtual void RemoveChild(ISchemaElement child)
2964 {
2965 if ((null == child))
2966 {
2967 throw new ArgumentNullException("child");
2968 }
2969 this.children.RemoveElement(child);
2970 child.ParentElement = null;
2971 }
2972
2973 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2974 ISchemaElement ICreateChildren.CreateChild(string childName)
2975 {
2976 if (String.IsNullOrEmpty(childName))
2977 {
2978 throw new ArgumentNullException("childName");
2979 }
2980 ISchemaElement childValue = null;
2981 if (("Payload" == childName))
2982 {
2983 childValue = new Payload();
2984 }
2985 if (("PayloadGroupRef" == childName))
2986 {
2987 childValue = new PayloadGroupRef();
2988 }
2989 if ((null == childValue))
2990 {
2991 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
2992 }
2993 return childValue;
2994 }
2995
2996 /// <summary>
2997 /// Processes this element and all child elements into an XmlWriter.
2998 /// </summary>
2999 public virtual void OutputXml(XmlWriter writer)
3000 {
3001 if ((null == writer))
3002 {
3003 throw new ArgumentNullException("writer");
3004 }
3005 writer.WriteStartElement("BootstrapperApplicationRef", "http://wixtoolset.org/schemas/v4/wxs");
3006 if (this.idFieldSet)
3007 {
3008 writer.WriteAttributeString("Id", this.idField);
3009 }
3010 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
3011 {
3012 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
3013 childElement.OutputXml(writer);
3014 }
3015 writer.WriteEndElement();
3016 }
3017
3018 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3019 void ISetAttributes.SetAttribute(string name, string value)
3020 {
3021 if (String.IsNullOrEmpty(name))
3022 {
3023 throw new ArgumentNullException("name");
3024 }
3025 if (("Id" == name))
3026 {
3027 this.idField = value;
3028 this.idFieldSet = true;
3029 }
3030 }
3031 }
3032
3033 /// <summary>
3034 /// This element has been deprecated. Use the BootstrapperApplication element instead.
3035 /// </summary>
3036 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3037 public class UX : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
3038 {
3039
3040 private ElementCollection children;
3041
3042 private string sourceFileField;
3043
3044 private bool sourceFileFieldSet;
3045
3046 private string nameField;
3047
3048 private bool nameFieldSet;
3049
3050 private string splashScreenSourceFileField;
3051
3052 private bool splashScreenSourceFileFieldSet;
3053
3054 private ISchemaElement parentElement;
3055
3056 public UX()
3057 {
3058 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
3059 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
3060 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
3061 this.children = childCollection0;
3062 }
3063
3064 public virtual IEnumerable Children
3065 {
3066 get
3067 {
3068 return this.children;
3069 }
3070 }
3071
3072 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
3073 public virtual IEnumerable this[System.Type childType]
3074 {
3075 get
3076 {
3077 return this.children.Filter(childType);
3078 }
3079 }
3080
3081 /// <summary>
3082 /// See the BootstrapperApplication instead.
3083 /// </summary>
3084 public string SourceFile
3085 {
3086 get
3087 {
3088 return this.sourceFileField;
3089 }
3090 set
3091 {
3092 this.sourceFileFieldSet = true;
3093 this.sourceFileField = value;
3094 }
3095 }
3096
3097 /// <summary>
3098 /// See the BootstrapperApplication instead.
3099 /// </summary>
3100 public string Name
3101 {
3102 get
3103 {
3104 return this.nameField;
3105 }
3106 set
3107 {
3108 this.nameFieldSet = true;
3109 this.nameField = value;
3110 }
3111 }
3112
3113 /// <summary>
3114 /// See the BootstrapperApplication instead.
3115 /// </summary>
3116 public string SplashScreenSourceFile
3117 {
3118 get
3119 {
3120 return this.splashScreenSourceFileField;
3121 }
3122 set
3123 {
3124 this.splashScreenSourceFileFieldSet = true;
3125 this.splashScreenSourceFileField = value;
3126 }
3127 }
3128
3129 public virtual ISchemaElement ParentElement
3130 {
3131 get
3132 {
3133 return this.parentElement;
3134 }
3135 set
3136 {
3137 this.parentElement = value;
3138 }
3139 }
3140
3141 public virtual void AddChild(ISchemaElement child)
3142 {
3143 if ((null == child))
3144 {
3145 throw new ArgumentNullException("child");
3146 }
3147 this.children.AddElement(child);
3148 child.ParentElement = this;
3149 }
3150
3151 public virtual void RemoveChild(ISchemaElement child)
3152 {
3153 if ((null == child))
3154 {
3155 throw new ArgumentNullException("child");
3156 }
3157 this.children.RemoveElement(child);
3158 child.ParentElement = null;
3159 }
3160
3161 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3162 ISchemaElement ICreateChildren.CreateChild(string childName)
3163 {
3164 if (String.IsNullOrEmpty(childName))
3165 {
3166 throw new ArgumentNullException("childName");
3167 }
3168 ISchemaElement childValue = null;
3169 if (("Payload" == childName))
3170 {
3171 childValue = new Payload();
3172 }
3173 if (("PayloadGroupRef" == childName))
3174 {
3175 childValue = new PayloadGroupRef();
3176 }
3177 if ((null == childValue))
3178 {
3179 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
3180 }
3181 return childValue;
3182 }
3183
3184 /// <summary>
3185 /// Processes this element and all child elements into an XmlWriter.
3186 /// </summary>
3187 public virtual void OutputXml(XmlWriter writer)
3188 {
3189 if ((null == writer))
3190 {
3191 throw new ArgumentNullException("writer");
3192 }
3193 writer.WriteStartElement("UX", "http://wixtoolset.org/schemas/v4/wxs");
3194 if (this.sourceFileFieldSet)
3195 {
3196 writer.WriteAttributeString("SourceFile", this.sourceFileField);
3197 }
3198 if (this.nameFieldSet)
3199 {
3200 writer.WriteAttributeString("Name", this.nameField);
3201 }
3202 if (this.splashScreenSourceFileFieldSet)
3203 {
3204 writer.WriteAttributeString("SplashScreenSourceFile", this.splashScreenSourceFileField);
3205 }
3206 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
3207 {
3208 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
3209 childElement.OutputXml(writer);
3210 }
3211 writer.WriteEndElement();
3212 }
3213
3214 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3215 void ISetAttributes.SetAttribute(string name, string value)
3216 {
3217 if (String.IsNullOrEmpty(name))
3218 {
3219 throw new ArgumentNullException("name");
3220 }
3221 if (("SourceFile" == name))
3222 {
3223 this.sourceFileField = value;
3224 this.sourceFileFieldSet = true;
3225 }
3226 if (("Name" == name))
3227 {
3228 this.nameField = value;
3229 this.nameFieldSet = true;
3230 }
3231 if (("SplashScreenSourceFile" == name))
3232 {
3233 this.splashScreenSourceFileField = value;
3234 this.splashScreenSourceFileFieldSet = true;
3235 }
3236 }
3237 }
3238
3239 /// <summary>
3240 /// Writes additional information to the Windows registry that can be used to detect the bundle.
3241 /// This registration is intended primarily for update to an existing product.
3242 /// </summary>
3243 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3244 public class OptionalUpdateRegistration : ISchemaElement, ISetAttributes
3245 {
3246
3247 private string manufacturerField;
3248
3249 private bool manufacturerFieldSet;
3250
3251 private string departmentField;
3252
3253 private bool departmentFieldSet;
3254
3255 private string productFamilyField;
3256
3257 private bool productFamilyFieldSet;
3258
3259 private string nameField;
3260
3261 private bool nameFieldSet;
3262
3263 private string classificationField;
3264
3265 private bool classificationFieldSet;
3266
3267 private ISchemaElement parentElement;
3268
3269 /// <summary>
3270 /// The name of the manufacturer. The default is the Bundle/@Manufacturer attribute,
3271 /// but may also be a short form, ex: Acme instead of Acme Corporation.
3272 /// An error is generated at build time if neither attribute is specified.
3273 /// </summary>
3274 public string Manufacturer
3275 {
3276 get
3277 {
3278 return this.manufacturerField;
3279 }
3280 set
3281 {
3282 this.manufacturerFieldSet = true;
3283 this.manufacturerField = value;
3284 }
3285 }
3286
3287 /// <summary>
3288 /// The name of the department or division publishing the update bundle.
3289 /// The PublishingGroup registry value is not written if this attribute is not specified.
3290 /// </summary>
3291 public string Department
3292 {
3293 get
3294 {
3295 return this.departmentField;
3296 }
3297 set
3298 {
3299 this.departmentFieldSet = true;
3300 this.departmentField = value;
3301 }
3302 }
3303
3304 /// <summary>
3305 /// The name of the family of products being updated. The default is the Bundle/@ParentName attribute.
3306 /// The corresponding registry key is not created if neither attribute is specified.
3307 /// </summary>
3308 public string ProductFamily
3309 {
3310 get
3311 {
3312 return this.productFamilyField;
3313 }
3314 set
3315 {
3316 this.productFamilyFieldSet = true;
3317 this.productFamilyField = value;
3318 }
3319 }
3320
3321 /// <summary>
3322 /// The name of the bundle. The default is the Bundle/@Name attribute,
3323 /// but may also be a short form, ex: KB12345 instead of Update to Product (KB12345).
3324 /// An error is generated at build time if neither attribute is specified.
3325 /// </summary>
3326 public string Name
3327 {
3328 get
3329 {
3330 return this.nameField;
3331 }
3332 set
3333 {
3334 this.nameFieldSet = true;
3335 this.nameField = value;
3336 }
3337 }
3338
3339 /// <summary>
3340 /// The release type of the update bundle, such as Update, Security Update, Service Pack, etc.
3341 /// The default value is Update.
3342 /// </summary>
3343 public string Classification
3344 {
3345 get
3346 {
3347 return this.classificationField;
3348 }
3349 set
3350 {
3351 this.classificationFieldSet = true;
3352 this.classificationField = value;
3353 }
3354 }
3355
3356 public virtual ISchemaElement ParentElement
3357 {
3358 get
3359 {
3360 return this.parentElement;
3361 }
3362 set
3363 {
3364 this.parentElement = value;
3365 }
3366 }
3367
3368 /// <summary>
3369 /// Processes this element and all child elements into an XmlWriter.
3370 /// </summary>
3371 public virtual void OutputXml(XmlWriter writer)
3372 {
3373 if ((null == writer))
3374 {
3375 throw new ArgumentNullException("writer");
3376 }
3377 writer.WriteStartElement("OptionalUpdateRegistration", "http://wixtoolset.org/schemas/v4/wxs");
3378 if (this.manufacturerFieldSet)
3379 {
3380 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
3381 }
3382 if (this.departmentFieldSet)
3383 {
3384 writer.WriteAttributeString("Department", this.departmentField);
3385 }
3386 if (this.productFamilyFieldSet)
3387 {
3388 writer.WriteAttributeString("ProductFamily", this.productFamilyField);
3389 }
3390 if (this.nameFieldSet)
3391 {
3392 writer.WriteAttributeString("Name", this.nameField);
3393 }
3394 if (this.classificationFieldSet)
3395 {
3396 writer.WriteAttributeString("Classification", this.classificationField);
3397 }
3398 writer.WriteEndElement();
3399 }
3400
3401 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3402 void ISetAttributes.SetAttribute(string name, string value)
3403 {
3404 if (String.IsNullOrEmpty(name))
3405 {
3406 throw new ArgumentNullException("name");
3407 }
3408 if (("Manufacturer" == name))
3409 {
3410 this.manufacturerField = value;
3411 this.manufacturerFieldSet = true;
3412 }
3413 if (("Department" == name))
3414 {
3415 this.departmentField = value;
3416 this.departmentFieldSet = true;
3417 }
3418 if (("ProductFamily" == name))
3419 {
3420 this.productFamilyField = value;
3421 this.productFamilyFieldSet = true;
3422 }
3423 if (("Name" == name))
3424 {
3425 this.nameField = value;
3426 this.nameFieldSet = true;
3427 }
3428 if (("Classification" == name))
3429 {
3430 this.classificationField = value;
3431 this.classificationFieldSet = true;
3432 }
3433 }
3434 }
3435
3436 /// <summary>
3437 /// Contains the chain of packages to install.
3438 /// </summary>
3439 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3440 public class Chain : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
3441 {
3442
3443 private ElementCollection children;
3444
3445 private YesNoType disableRollbackField;
3446
3447 private bool disableRollbackFieldSet;
3448
3449 private YesNoType disableSystemRestoreField;
3450
3451 private bool disableSystemRestoreFieldSet;
3452
3453 private YesNoType parallelCacheField;
3454
3455 private bool parallelCacheFieldSet;
3456
3457 private ISchemaElement parentElement;
3458
3459 public Chain()
3460 {
3461 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
3462 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPackage)));
3463 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MspPackage)));
3464 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackage)));
3465 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackage)));
3466 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RollbackBoundary)));
3467 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef)));
3468 this.children = childCollection0;
3469 }
3470
3471 public virtual IEnumerable Children
3472 {
3473 get
3474 {
3475 return this.children;
3476 }
3477 }
3478
3479 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
3480 public virtual IEnumerable this[System.Type childType]
3481 {
3482 get
3483 {
3484 return this.children.Filter(childType);
3485 }
3486 }
3487
3488 /// <summary>
3489 /// Specifies whether the bundle will attempt to rollback packages
3490 /// executed in the chain. If "yes" is specified then when a vital
3491 /// package fails to install only that package will rollback and the
3492 /// chain will stop with the error. The default is "no" which
3493 /// indicates all packages executed during the chain will be
3494 /// rolledback to their previous state when a vital package fails.
3495 /// </summary>
3496 public YesNoType DisableRollback
3497 {
3498 get
3499 {
3500 return this.disableRollbackField;
3501 }
3502 set
3503 {
3504 this.disableRollbackFieldSet = true;
3505 this.disableRollbackField = value;
3506 }
3507 }
3508
3509 /// <summary>
3510 /// Specifies whether the bundle will attempt to create a system
3511 /// restore point when executing the chain. If "yes" is specified then
3512 /// a system restore point will not be created. The default is "no" which
3513 /// indicates a system restore point will be created when the bundle is
3514 /// installed, uninstalled, repaired, modified, etc. If the system restore
3515 /// point cannot be created, the bundle will log the issue and continue.
3516 /// </summary>
3517 public YesNoType DisableSystemRestore
3518 {
3519 get
3520 {
3521 return this.disableSystemRestoreField;
3522 }
3523 set
3524 {
3525 this.disableSystemRestoreFieldSet = true;
3526 this.disableSystemRestoreField = value;
3527 }
3528 }
3529
3530 /// <summary>
3531 /// Specifies whether the bundle will start installing packages
3532 /// while other packages are still being cached. If "yes",
3533 /// packages will start executing when a rollback boundary is
3534 /// encountered. The default is "no" which dictates all packages
3535 /// must be cached before any packages will start to be installed.
3536 /// </summary>
3537 public YesNoType ParallelCache
3538 {
3539 get
3540 {
3541 return this.parallelCacheField;
3542 }
3543 set
3544 {
3545 this.parallelCacheFieldSet = true;
3546 this.parallelCacheField = value;
3547 }
3548 }
3549
3550 public virtual ISchemaElement ParentElement
3551 {
3552 get
3553 {
3554 return this.parentElement;
3555 }
3556 set
3557 {
3558 this.parentElement = value;
3559 }
3560 }
3561
3562 public virtual void AddChild(ISchemaElement child)
3563 {
3564 if ((null == child))
3565 {
3566 throw new ArgumentNullException("child");
3567 }
3568 this.children.AddElement(child);
3569 child.ParentElement = this;
3570 }
3571
3572 public virtual void RemoveChild(ISchemaElement child)
3573 {
3574 if ((null == child))
3575 {
3576 throw new ArgumentNullException("child");
3577 }
3578 this.children.RemoveElement(child);
3579 child.ParentElement = null;
3580 }
3581
3582 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3583 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
3584 ISchemaElement ICreateChildren.CreateChild(string childName)
3585 {
3586 if (String.IsNullOrEmpty(childName))
3587 {
3588 throw new ArgumentNullException("childName");
3589 }
3590 ISchemaElement childValue = null;
3591 if (("MsiPackage" == childName))
3592 {
3593 childValue = new MsiPackage();
3594 }
3595 if (("MspPackage" == childName))
3596 {
3597 childValue = new MspPackage();
3598 }
3599 if (("MsuPackage" == childName))
3600 {
3601 childValue = new MsuPackage();
3602 }
3603 if (("ExePackage" == childName))
3604 {
3605 childValue = new ExePackage();
3606 }
3607 if (("RollbackBoundary" == childName))
3608 {
3609 childValue = new RollbackBoundary();
3610 }
3611 if (("PackageGroupRef" == childName))
3612 {
3613 childValue = new PackageGroupRef();
3614 }
3615 if ((null == childValue))
3616 {
3617 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
3618 }
3619 return childValue;
3620 }
3621
3622 /// <summary>
3623 /// Processes this element and all child elements into an XmlWriter.
3624 /// </summary>
3625 public virtual void OutputXml(XmlWriter writer)
3626 {
3627 if ((null == writer))
3628 {
3629 throw new ArgumentNullException("writer");
3630 }
3631 writer.WriteStartElement("Chain", "http://wixtoolset.org/schemas/v4/wxs");
3632 if (this.disableRollbackFieldSet)
3633 {
3634 if ((this.disableRollbackField == YesNoType.no))
3635 {
3636 writer.WriteAttributeString("DisableRollback", "no");
3637 }
3638 if ((this.disableRollbackField == YesNoType.yes))
3639 {
3640 writer.WriteAttributeString("DisableRollback", "yes");
3641 }
3642 }
3643 if (this.disableSystemRestoreFieldSet)
3644 {
3645 if ((this.disableSystemRestoreField == YesNoType.no))
3646 {
3647 writer.WriteAttributeString("DisableSystemRestore", "no");
3648 }
3649 if ((this.disableSystemRestoreField == YesNoType.yes))
3650 {
3651 writer.WriteAttributeString("DisableSystemRestore", "yes");
3652 }
3653 }
3654 if (this.parallelCacheFieldSet)
3655 {
3656 if ((this.parallelCacheField == YesNoType.no))
3657 {
3658 writer.WriteAttributeString("ParallelCache", "no");
3659 }
3660 if ((this.parallelCacheField == YesNoType.yes))
3661 {
3662 writer.WriteAttributeString("ParallelCache", "yes");
3663 }
3664 }
3665 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
3666 {
3667 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
3668 childElement.OutputXml(writer);
3669 }
3670 writer.WriteEndElement();
3671 }
3672
3673 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3674 void ISetAttributes.SetAttribute(string name, string value)
3675 {
3676 if (String.IsNullOrEmpty(name))
3677 {
3678 throw new ArgumentNullException("name");
3679 }
3680 if (("DisableRollback" == name))
3681 {
3682 this.disableRollbackField = Enums.ParseYesNoType(value);
3683 this.disableRollbackFieldSet = true;
3684 }
3685 if (("DisableSystemRestore" == name))
3686 {
3687 this.disableSystemRestoreField = Enums.ParseYesNoType(value);
3688 this.disableSystemRestoreFieldSet = true;
3689 }
3690 if (("ParallelCache" == name))
3691 {
3692 this.parallelCacheField = Enums.ParseYesNoType(value);
3693 this.parallelCacheFieldSet = true;
3694 }
3695 }
3696 }
3697
3698 /// <summary>
3699 /// Describes a single msi package to install.
3700 /// </summary>
3701 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3702 public class MsiPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
3703 {
3704
3705 private ElementCollection children;
3706
3707 private string sourceFileField;
3708
3709 private bool sourceFileFieldSet;
3710
3711 private string nameField;
3712
3713 private bool nameFieldSet;
3714
3715 private string downloadUrlField;
3716
3717 private bool downloadUrlFieldSet;
3718
3719 private string idField;
3720
3721 private bool idFieldSet;
3722
3723 private string afterField;
3724
3725 private bool afterFieldSet;
3726
3727 private string installSizeField;
3728
3729 private bool installSizeFieldSet;
3730
3731 private string installConditionField;
3732
3733 private bool installConditionFieldSet;
3734
3735 private YesNoAlwaysType cacheField;
3736
3737 private bool cacheFieldSet;
3738
3739 private string cacheIdField;
3740
3741 private bool cacheIdFieldSet;
3742
3743 private string displayNameField;
3744
3745 private bool displayNameFieldSet;
3746
3747 private string descriptionField;
3748
3749 private bool descriptionFieldSet;
3750
3751 private string logPathVariableField;
3752
3753 private bool logPathVariableFieldSet;
3754
3755 private string rollbackLogPathVariableField;
3756
3757 private bool rollbackLogPathVariableFieldSet;
3758
3759 private YesNoType permanentField;
3760
3761 private bool permanentFieldSet;
3762
3763 private YesNoType vitalField;
3764
3765 private bool vitalFieldSet;
3766
3767 private YesNoDefaultType compressedField;
3768
3769 private bool compressedFieldSet;
3770
3771 private YesNoType enableSignatureVerificationField;
3772
3773 private bool enableSignatureVerificationFieldSet;
3774
3775 private YesNoType enableFeatureSelectionField;
3776
3777 private bool enableFeatureSelectionFieldSet;
3778
3779 private YesNoType forcePerMachineField;
3780
3781 private bool forcePerMachineFieldSet;
3782
3783 private YesNoType suppressLooseFilePayloadGenerationField;
3784
3785 private bool suppressLooseFilePayloadGenerationFieldSet;
3786
3787 private YesNoType visibleField;
3788
3789 private bool visibleFieldSet;
3790
3791 private ISchemaElement parentElement;
3792
3793 public MsiPackage()
3794 {
3795 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
3796 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiProperty)));
3797 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SlipstreamMsp)));
3798 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
3799 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
3800 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
3801 this.children = childCollection0;
3802 }
3803
3804 public virtual IEnumerable Children
3805 {
3806 get
3807 {
3808 return this.children;
3809 }
3810 }
3811
3812 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
3813 public virtual IEnumerable this[System.Type childType]
3814 {
3815 get
3816 {
3817 return this.children.Filter(childType);
3818 }
3819 }
3820
3821 /// <summary>
3822 /// Location of the package to add to the bundle. The default value is the Name attribute, if provided.
3823 /// At a minimum, the SourceFile or Name attribute must be specified.
3824 /// </summary>
3825 public string SourceFile
3826 {
3827 get
3828 {
3829 return this.sourceFileField;
3830 }
3831 set
3832 {
3833 this.sourceFileFieldSet = true;
3834 this.sourceFileField = value;
3835 }
3836 }
3837
3838 /// <summary>
3839 /// The destination path and file name for this chain payload. Use this attribute to rename the
3840 /// chain entry point or extract it into a subfolder. The default value is the file name from the
3841 /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified.
3842 /// The use of '..' directories is not allowed.
3843 /// </summary>
3844 public string Name
3845 {
3846 get
3847 {
3848 return this.nameField;
3849 }
3850 set
3851 {
3852 this.nameFieldSet = true;
3853 this.nameField = value;
3854 }
3855 }
3856
3857 public string DownloadUrl
3858 {
3859 get
3860 {
3861 return this.downloadUrlField;
3862 }
3863 set
3864 {
3865 this.downloadUrlFieldSet = true;
3866 this.downloadUrlField = value;
3867 }
3868 }
3869
3870 /// <summary>
3871 /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute
3872 /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores).
3873 /// </summary>
3874 public string Id
3875 {
3876 get
3877 {
3878 return this.idField;
3879 }
3880 set
3881 {
3882 this.idFieldSet = true;
3883 this.idField = value;
3884 }
3885 }
3886
3887 /// <summary>
3888 /// The identifier of another package that this one should be installed after. By default the After
3889 /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this
3890 /// attribute is specified ensure that a cycle is not created explicitly or implicitly.
3891 /// </summary>
3892 public string After
3893 {
3894 get
3895 {
3896 return this.afterField;
3897 }
3898 set
3899 {
3900 this.afterFieldSet = true;
3901 this.afterField = value;
3902 }
3903 }
3904
3905 /// <summary>
3906 /// The size this package will take on disk in bytes after it is installed. By default, the binder will
3907 /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs)
3908 /// and use the total for the install size of the package.
3909 /// </summary>
3910 public string InstallSize
3911 {
3912 get
3913 {
3914 return this.installSizeField;
3915 }
3916 set
3917 {
3918 this.installSizeFieldSet = true;
3919 this.installSizeField = value;
3920 }
3921 }
3922
3923 /// <summary>
3924 /// A condition to evaluate before installing the package. The package will only be installed if the condition evaluates to true. If the condition evaluates to false and the bundle is being installed, repaired, or modified, the package will be uninstalled.
3925 /// </summary>
3926 public string InstallCondition
3927 {
3928 get
3929 {
3930 return this.installConditionField;
3931 }
3932 set
3933 {
3934 this.installConditionFieldSet = true;
3935 this.installConditionField = value;
3936 }
3937 }
3938
3939 /// <summary>
3940 /// Whether to cache the package. The default is "yes".
3941 /// </summary>
3942 public YesNoAlwaysType Cache
3943 {
3944 get
3945 {
3946 return this.cacheField;
3947 }
3948 set
3949 {
3950 this.cacheFieldSet = true;
3951 this.cacheField = value;
3952 }
3953 }
3954
3955 /// <summary>
3956 /// The identifier to use when caching the package.
3957 /// </summary>
3958 public string CacheId
3959 {
3960 get
3961 {
3962 return this.cacheIdField;
3963 }
3964 set
3965 {
3966 this.cacheIdFieldSet = true;
3967 this.cacheIdField = value;
3968 }
3969 }
3970
3971 /// <summary>
3972 /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages
3973 /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use
3974 /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the
3975 /// bootstrapper application data manifest.
3976 /// </summary>
3977 public string DisplayName
3978 {
3979 get
3980 {
3981 return this.displayNameField;
3982 }
3983 set
3984 {
3985 this.displayNameFieldSet = true;
3986 this.displayNameField = value;
3987 }
3988 }
3989
3990 /// <summary>
3991 /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages
3992 /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use
3993 /// the Description patch metadata property. Other package types must use this attribute to define a description in the
3994 /// bootstrapper application data manifest.
3995 /// </summary>
3996 public string Description
3997 {
3998 get
3999 {
4000 return this.descriptionField;
4001 }
4002 set
4003 {
4004 this.descriptionFieldSet = true;
4005 this.descriptionField = value;
4006 }
4007 }
4008
4009 /// <summary>
4010 /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not
4011 /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging.
4012 /// </summary>
4013 public string LogPathVariable
4014 {
4015 get
4016 {
4017 return this.logPathVariableField;
4018 }
4019 set
4020 {
4021 this.logPathVariableFieldSet = true;
4022 this.logPathVariableField = value;
4023 }
4024 }
4025
4026 /// <summary>
4027 /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause
4028 /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which
4029 /// default to no logging.
4030 /// </summary>
4031 public string RollbackLogPathVariable
4032 {
4033 get
4034 {
4035 return this.rollbackLogPathVariableField;
4036 }
4037 set
4038 {
4039 this.rollbackLogPathVariableFieldSet = true;
4040 this.rollbackLogPathVariableField = value;
4041 }
4042 }
4043
4044 /// <summary>
4045 /// Specifies whether the package can be uninstalled. The default is "no".
4046 /// </summary>
4047 public YesNoType Permanent
4048 {
4049 get
4050 {
4051 return this.permanentField;
4052 }
4053 set
4054 {
4055 this.permanentFieldSet = true;
4056 this.permanentField = value;
4057 }
4058 }
4059
4060 /// <summary>
4061 /// Specifies whether the package must succeed for the chain to continue. The default "yes"
4062 /// indicates that if the package fails then the chain will fail and rollback or stop. If
4063 /// "no" is specified then the chain will continue even if the package reports failure.
4064 /// </summary>
4065 public YesNoType Vital
4066 {
4067 get
4068 {
4069 return this.vitalField;
4070 }
4071 set
4072 {
4073 this.vitalFieldSet = true;
4074 this.vitalField = value;
4075 }
4076 }
4077
4078 /// <summary>
4079 /// Whether the package payload should be embedded in a container or left as an external payload.
4080 /// </summary>
4081 public YesNoDefaultType Compressed
4082 {
4083 get
4084 {
4085 return this.compressedField;
4086 }
4087 set
4088 {
4089 this.compressedFieldSet = true;
4090 this.compressedField = value;
4091 }
4092 }
4093
4094 /// <summary>
4095 /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
4096 /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
4097 /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
4098 /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
4099 /// </summary>
4100 public YesNoType EnableSignatureVerification
4101 {
4102 get
4103 {
4104 return this.enableSignatureVerificationField;
4105 }
4106 set
4107 {
4108 this.enableSignatureVerificationFieldSet = true;
4109 this.enableSignatureVerificationField = value;
4110 }
4111 }
4112
4113 /// <summary>
4114 /// Specifies whether the bundle will allow individual control over the installation state of Features inside
4115 /// the msi package. Managing feature selection requires special care to ensure the install, modify, update and
4116 /// uninstall behavior of the package is always correct. The default is "no".
4117 /// </summary>
4118 public YesNoType EnableFeatureSelection
4119 {
4120 get
4121 {
4122 return this.enableFeatureSelectionField;
4123 }
4124 set
4125 {
4126 this.enableFeatureSelectionFieldSet = true;
4127 this.enableFeatureSelectionField = value;
4128 }
4129 }
4130
4131 /// <summary>
4132 /// Override the automatic per-machine detection of MSI packages and force the package to be per-machine.
4133 /// The default is "no", which allows the tools to detect the expected value.
4134 /// </summary>
4135 public YesNoType ForcePerMachine
4136 {
4137 get
4138 {
4139 return this.forcePerMachineField;
4140 }
4141 set
4142 {
4143 this.forcePerMachineFieldSet = true;
4144 this.forcePerMachineField = value;
4145 }
4146 }
4147
4148 /// <summary>
4149 /// This attribute has been deprecated. When the value is "yes", the Binder will not read the MSI package
4150 /// to detect uncompressed files that would otherwise be automatically included in the Bundle as Payloads.
4151 /// The resulting Bundle may not be able to install the MSI package correctly. The default is "no".
4152 /// </summary>
4153 public YesNoType SuppressLooseFilePayloadGeneration
4154 {
4155 get
4156 {
4157 return this.suppressLooseFilePayloadGenerationField;
4158 }
4159 set
4160 {
4161 this.suppressLooseFilePayloadGenerationFieldSet = true;
4162 this.suppressLooseFilePayloadGenerationField = value;
4163 }
4164 }
4165
4166 /// <summary>
4167 /// Specifies whether the MSI will be displayed in Programs and Features (also known as Add/Remove Programs). If "yes" is
4168 /// specified the MSI package information will be displayed in Programs and Features. The default "no" indicates the MSI
4169 /// will not be displayed.
4170 /// </summary>
4171 public YesNoType Visible
4172 {
4173 get
4174 {
4175 return this.visibleField;
4176 }
4177 set
4178 {
4179 this.visibleFieldSet = true;
4180 this.visibleField = value;
4181 }
4182 }
4183
4184 public virtual ISchemaElement ParentElement
4185 {
4186 get
4187 {
4188 return this.parentElement;
4189 }
4190 set
4191 {
4192 this.parentElement = value;
4193 }
4194 }
4195
4196 public virtual void AddChild(ISchemaElement child)
4197 {
4198 if ((null == child))
4199 {
4200 throw new ArgumentNullException("child");
4201 }
4202 this.children.AddElement(child);
4203 child.ParentElement = this;
4204 }
4205
4206 public virtual void RemoveChild(ISchemaElement child)
4207 {
4208 if ((null == child))
4209 {
4210 throw new ArgumentNullException("child");
4211 }
4212 this.children.RemoveElement(child);
4213 child.ParentElement = null;
4214 }
4215
4216 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4217 ISchemaElement ICreateChildren.CreateChild(string childName)
4218 {
4219 if (String.IsNullOrEmpty(childName))
4220 {
4221 throw new ArgumentNullException("childName");
4222 }
4223 ISchemaElement childValue = null;
4224 if (("MsiProperty" == childName))
4225 {
4226 childValue = new MsiProperty();
4227 }
4228 if (("SlipstreamMsp" == childName))
4229 {
4230 childValue = new SlipstreamMsp();
4231 }
4232 if (("Payload" == childName))
4233 {
4234 childValue = new Payload();
4235 }
4236 if (("PayloadGroupRef" == childName))
4237 {
4238 childValue = new PayloadGroupRef();
4239 }
4240 if ((null == childValue))
4241 {
4242 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
4243 }
4244 return childValue;
4245 }
4246
4247 /// <summary>
4248 /// Processes this element and all child elements into an XmlWriter.
4249 /// </summary>
4250 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
4251 public virtual void OutputXml(XmlWriter writer)
4252 {
4253 if ((null == writer))
4254 {
4255 throw new ArgumentNullException("writer");
4256 }
4257 writer.WriteStartElement("MsiPackage", "http://wixtoolset.org/schemas/v4/wxs");
4258 if (this.sourceFileFieldSet)
4259 {
4260 writer.WriteAttributeString("SourceFile", this.sourceFileField);
4261 }
4262 if (this.nameFieldSet)
4263 {
4264 writer.WriteAttributeString("Name", this.nameField);
4265 }
4266 if (this.downloadUrlFieldSet)
4267 {
4268 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
4269 }
4270 if (this.idFieldSet)
4271 {
4272 writer.WriteAttributeString("Id", this.idField);
4273 }
4274 if (this.afterFieldSet)
4275 {
4276 writer.WriteAttributeString("After", this.afterField);
4277 }
4278 if (this.installSizeFieldSet)
4279 {
4280 writer.WriteAttributeString("InstallSize", this.installSizeField);
4281 }
4282 if (this.installConditionFieldSet)
4283 {
4284 writer.WriteAttributeString("InstallCondition", this.installConditionField);
4285 }
4286 if (this.cacheFieldSet)
4287 {
4288 if ((this.cacheField == YesNoAlwaysType.always))
4289 {
4290 writer.WriteAttributeString("Cache", "always");
4291 }
4292 if ((this.cacheField == YesNoAlwaysType.no))
4293 {
4294 writer.WriteAttributeString("Cache", "no");
4295 }
4296 if ((this.cacheField == YesNoAlwaysType.yes))
4297 {
4298 writer.WriteAttributeString("Cache", "yes");
4299 }
4300 }
4301 if (this.cacheIdFieldSet)
4302 {
4303 writer.WriteAttributeString("CacheId", this.cacheIdField);
4304 }
4305 if (this.displayNameFieldSet)
4306 {
4307 writer.WriteAttributeString("DisplayName", this.displayNameField);
4308 }
4309 if (this.descriptionFieldSet)
4310 {
4311 writer.WriteAttributeString("Description", this.descriptionField);
4312 }
4313 if (this.logPathVariableFieldSet)
4314 {
4315 writer.WriteAttributeString("LogPathVariable", this.logPathVariableField);
4316 }
4317 if (this.rollbackLogPathVariableFieldSet)
4318 {
4319 writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField);
4320 }
4321 if (this.permanentFieldSet)
4322 {
4323 if ((this.permanentField == YesNoType.no))
4324 {
4325 writer.WriteAttributeString("Permanent", "no");
4326 }
4327 if ((this.permanentField == YesNoType.yes))
4328 {
4329 writer.WriteAttributeString("Permanent", "yes");
4330 }
4331 }
4332 if (this.vitalFieldSet)
4333 {
4334 if ((this.vitalField == YesNoType.no))
4335 {
4336 writer.WriteAttributeString("Vital", "no");
4337 }
4338 if ((this.vitalField == YesNoType.yes))
4339 {
4340 writer.WriteAttributeString("Vital", "yes");
4341 }
4342 }
4343 if (this.compressedFieldSet)
4344 {
4345 if ((this.compressedField == YesNoDefaultType.@default))
4346 {
4347 writer.WriteAttributeString("Compressed", "default");
4348 }
4349 if ((this.compressedField == YesNoDefaultType.no))
4350 {
4351 writer.WriteAttributeString("Compressed", "no");
4352 }
4353 if ((this.compressedField == YesNoDefaultType.yes))
4354 {
4355 writer.WriteAttributeString("Compressed", "yes");
4356 }
4357 }
4358 if (this.enableSignatureVerificationFieldSet)
4359 {
4360 if ((this.enableSignatureVerificationField == YesNoType.no))
4361 {
4362 writer.WriteAttributeString("EnableSignatureVerification", "no");
4363 }
4364 if ((this.enableSignatureVerificationField == YesNoType.yes))
4365 {
4366 writer.WriteAttributeString("EnableSignatureVerification", "yes");
4367 }
4368 }
4369 if (this.enableFeatureSelectionFieldSet)
4370 {
4371 if ((this.enableFeatureSelectionField == YesNoType.no))
4372 {
4373 writer.WriteAttributeString("EnableFeatureSelection", "no");
4374 }
4375 if ((this.enableFeatureSelectionField == YesNoType.yes))
4376 {
4377 writer.WriteAttributeString("EnableFeatureSelection", "yes");
4378 }
4379 }
4380 if (this.forcePerMachineFieldSet)
4381 {
4382 if ((this.forcePerMachineField == YesNoType.no))
4383 {
4384 writer.WriteAttributeString("ForcePerMachine", "no");
4385 }
4386 if ((this.forcePerMachineField == YesNoType.yes))
4387 {
4388 writer.WriteAttributeString("ForcePerMachine", "yes");
4389 }
4390 }
4391 if (this.suppressLooseFilePayloadGenerationFieldSet)
4392 {
4393 if ((this.suppressLooseFilePayloadGenerationField == YesNoType.no))
4394 {
4395 writer.WriteAttributeString("SuppressLooseFilePayloadGeneration", "no");
4396 }
4397 if ((this.suppressLooseFilePayloadGenerationField == YesNoType.yes))
4398 {
4399 writer.WriteAttributeString("SuppressLooseFilePayloadGeneration", "yes");
4400 }
4401 }
4402 if (this.visibleFieldSet)
4403 {
4404 if ((this.visibleField == YesNoType.no))
4405 {
4406 writer.WriteAttributeString("Visible", "no");
4407 }
4408 if ((this.visibleField == YesNoType.yes))
4409 {
4410 writer.WriteAttributeString("Visible", "yes");
4411 }
4412 }
4413 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
4414 {
4415 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
4416 childElement.OutputXml(writer);
4417 }
4418 writer.WriteEndElement();
4419 }
4420
4421 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4422 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
4423 void ISetAttributes.SetAttribute(string name, string value)
4424 {
4425 if (String.IsNullOrEmpty(name))
4426 {
4427 throw new ArgumentNullException("name");
4428 }
4429 if (("SourceFile" == name))
4430 {
4431 this.sourceFileField = value;
4432 this.sourceFileFieldSet = true;
4433 }
4434 if (("Name" == name))
4435 {
4436 this.nameField = value;
4437 this.nameFieldSet = true;
4438 }
4439 if (("DownloadUrl" == name))
4440 {
4441 this.downloadUrlField = value;
4442 this.downloadUrlFieldSet = true;
4443 }
4444 if (("Id" == name))
4445 {
4446 this.idField = value;
4447 this.idFieldSet = true;
4448 }
4449 if (("After" == name))
4450 {
4451 this.afterField = value;
4452 this.afterFieldSet = true;
4453 }
4454 if (("InstallSize" == name))
4455 {
4456 this.installSizeField = value;
4457 this.installSizeFieldSet = true;
4458 }
4459 if (("InstallCondition" == name))
4460 {
4461 this.installConditionField = value;
4462 this.installConditionFieldSet = true;
4463 }
4464 if (("Cache" == name))
4465 {
4466 this.cacheField = Enums.ParseYesNoAlwaysType(value);
4467 this.cacheFieldSet = true;
4468 }
4469 if (("CacheId" == name))
4470 {
4471 this.cacheIdField = value;
4472 this.cacheIdFieldSet = true;
4473 }
4474 if (("DisplayName" == name))
4475 {
4476 this.displayNameField = value;
4477 this.displayNameFieldSet = true;
4478 }
4479 if (("Description" == name))
4480 {
4481 this.descriptionField = value;
4482 this.descriptionFieldSet = true;
4483 }
4484 if (("LogPathVariable" == name))
4485 {
4486 this.logPathVariableField = value;
4487 this.logPathVariableFieldSet = true;
4488 }
4489 if (("RollbackLogPathVariable" == name))
4490 {
4491 this.rollbackLogPathVariableField = value;
4492 this.rollbackLogPathVariableFieldSet = true;
4493 }
4494 if (("Permanent" == name))
4495 {
4496 this.permanentField = Enums.ParseYesNoType(value);
4497 this.permanentFieldSet = true;
4498 }
4499 if (("Vital" == name))
4500 {
4501 this.vitalField = Enums.ParseYesNoType(value);
4502 this.vitalFieldSet = true;
4503 }
4504 if (("Compressed" == name))
4505 {
4506 this.compressedField = Enums.ParseYesNoDefaultType(value);
4507 this.compressedFieldSet = true;
4508 }
4509 if (("EnableSignatureVerification" == name))
4510 {
4511 this.enableSignatureVerificationField = Enums.ParseYesNoType(value);
4512 this.enableSignatureVerificationFieldSet = true;
4513 }
4514 if (("EnableFeatureSelection" == name))
4515 {
4516 this.enableFeatureSelectionField = Enums.ParseYesNoType(value);
4517 this.enableFeatureSelectionFieldSet = true;
4518 }
4519 if (("ForcePerMachine" == name))
4520 {
4521 this.forcePerMachineField = Enums.ParseYesNoType(value);
4522 this.forcePerMachineFieldSet = true;
4523 }
4524 if (("SuppressLooseFilePayloadGeneration" == name))
4525 {
4526 this.suppressLooseFilePayloadGenerationField = Enums.ParseYesNoType(value);
4527 this.suppressLooseFilePayloadGenerationFieldSet = true;
4528 }
4529 if (("Visible" == name))
4530 {
4531 this.visibleField = Enums.ParseYesNoType(value);
4532 this.visibleFieldSet = true;
4533 }
4534 }
4535 }
4536
4537 /// <summary>
4538 /// Describes a single msp package to install.
4539 /// </summary>
4540 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
4541 public class MspPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
4542 {
4543
4544 private ElementCollection children;
4545
4546 private string sourceFileField;
4547
4548 private bool sourceFileFieldSet;
4549
4550 private string nameField;
4551
4552 private bool nameFieldSet;
4553
4554 private string downloadUrlField;
4555
4556 private bool downloadUrlFieldSet;
4557
4558 private string idField;
4559
4560 private bool idFieldSet;
4561
4562 private string afterField;
4563
4564 private bool afterFieldSet;
4565
4566 private string installSizeField;
4567
4568 private bool installSizeFieldSet;
4569
4570 private string installConditionField;
4571
4572 private bool installConditionFieldSet;
4573
4574 private YesNoAlwaysType cacheField;
4575
4576 private bool cacheFieldSet;
4577
4578 private string cacheIdField;
4579
4580 private bool cacheIdFieldSet;
4581
4582 private string displayNameField;
4583
4584 private bool displayNameFieldSet;
4585
4586 private string descriptionField;
4587
4588 private bool descriptionFieldSet;
4589
4590 private string logPathVariableField;
4591
4592 private bool logPathVariableFieldSet;
4593
4594 private string rollbackLogPathVariableField;
4595
4596 private bool rollbackLogPathVariableFieldSet;
4597
4598 private YesNoType permanentField;
4599
4600 private bool permanentFieldSet;
4601
4602 private YesNoType vitalField;
4603
4604 private bool vitalFieldSet;
4605
4606 private YesNoDefaultType compressedField;
4607
4608 private bool compressedFieldSet;
4609
4610 private YesNoType enableSignatureVerificationField;
4611
4612 private bool enableSignatureVerificationFieldSet;
4613
4614 private YesNoDefaultType perMachineField;
4615
4616 private bool perMachineFieldSet;
4617
4618 private YesNoType slipstreamField;
4619
4620 private bool slipstreamFieldSet;
4621
4622 private ISchemaElement parentElement;
4623
4624 public MspPackage()
4625 {
4626 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
4627 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiProperty)));
4628 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
4629 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
4630 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
4631 this.children = childCollection0;
4632 }
4633
4634 public virtual IEnumerable Children
4635 {
4636 get
4637 {
4638 return this.children;
4639 }
4640 }
4641
4642 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
4643 public virtual IEnumerable this[System.Type childType]
4644 {
4645 get
4646 {
4647 return this.children.Filter(childType);
4648 }
4649 }
4650
4651 /// <summary>
4652 /// Location of the package to add to the bundle. The default value is the Name attribute, if provided.
4653 /// At a minimum, the SourceFile or Name attribute must be specified.
4654 /// </summary>
4655 public string SourceFile
4656 {
4657 get
4658 {
4659 return this.sourceFileField;
4660 }
4661 set
4662 {
4663 this.sourceFileFieldSet = true;
4664 this.sourceFileField = value;
4665 }
4666 }
4667
4668 /// <summary>
4669 /// The destination path and file name for this chain payload. Use this attribute to rename the
4670 /// chain entry point or extract it into a subfolder. The default value is the file name from the
4671 /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified.
4672 /// The use of '..' directories is not allowed.
4673 /// </summary>
4674 public string Name
4675 {
4676 get
4677 {
4678 return this.nameField;
4679 }
4680 set
4681 {
4682 this.nameFieldSet = true;
4683 this.nameField = value;
4684 }
4685 }
4686
4687 public string DownloadUrl
4688 {
4689 get
4690 {
4691 return this.downloadUrlField;
4692 }
4693 set
4694 {
4695 this.downloadUrlFieldSet = true;
4696 this.downloadUrlField = value;
4697 }
4698 }
4699
4700 /// <summary>
4701 /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute
4702 /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores).
4703 /// </summary>
4704 public string Id
4705 {
4706 get
4707 {
4708 return this.idField;
4709 }
4710 set
4711 {
4712 this.idFieldSet = true;
4713 this.idField = value;
4714 }
4715 }
4716
4717 /// <summary>
4718 /// The identifier of another package that this one should be installed after. By default the After
4719 /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this
4720 /// attribute is specified ensure that a cycle is not created explicitly or implicitly.
4721 /// </summary>
4722 public string After
4723 {
4724 get
4725 {
4726 return this.afterField;
4727 }
4728 set
4729 {
4730 this.afterFieldSet = true;
4731 this.afterField = value;
4732 }
4733 }
4734
4735 /// <summary>
4736 /// The size this package will take on disk in bytes after it is installed. By default, the binder will
4737 /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs)
4738 /// and use the total for the install size of the package.
4739 /// </summary>
4740 public string InstallSize
4741 {
4742 get
4743 {
4744 return this.installSizeField;
4745 }
4746 set
4747 {
4748 this.installSizeFieldSet = true;
4749 this.installSizeField = value;
4750 }
4751 }
4752
4753 /// <summary>
4754 /// A condition to evaluate before installing the package. The package will only be installed if the condition evaluates to true. If the condition evaluates to false and the bundle is being installed, repaired, or modified, the package will be uninstalled.
4755 /// </summary>
4756 public string InstallCondition
4757 {
4758 get
4759 {
4760 return this.installConditionField;
4761 }
4762 set
4763 {
4764 this.installConditionFieldSet = true;
4765 this.installConditionField = value;
4766 }
4767 }
4768
4769 /// <summary>
4770 /// Whether to cache the package. The default is "yes".
4771 /// </summary>
4772 public YesNoAlwaysType Cache
4773 {
4774 get
4775 {
4776 return this.cacheField;
4777 }
4778 set
4779 {
4780 this.cacheFieldSet = true;
4781 this.cacheField = value;
4782 }
4783 }
4784
4785 /// <summary>
4786 /// The identifier to use when caching the package.
4787 /// </summary>
4788 public string CacheId
4789 {
4790 get
4791 {
4792 return this.cacheIdField;
4793 }
4794 set
4795 {
4796 this.cacheIdFieldSet = true;
4797 this.cacheIdField = value;
4798 }
4799 }
4800
4801 /// <summary>
4802 /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages
4803 /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use
4804 /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the
4805 /// bootstrapper application data manifest.
4806 /// </summary>
4807 public string DisplayName
4808 {
4809 get
4810 {
4811 return this.displayNameField;
4812 }
4813 set
4814 {
4815 this.displayNameFieldSet = true;
4816 this.displayNameField = value;
4817 }
4818 }
4819
4820 /// <summary>
4821 /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages
4822 /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use
4823 /// the Description patch metadata property. Other package types must use this attribute to define a description in the
4824 /// bootstrapper application data manifest.
4825 /// </summary>
4826 public string Description
4827 {
4828 get
4829 {
4830 return this.descriptionField;
4831 }
4832 set
4833 {
4834 this.descriptionFieldSet = true;
4835 this.descriptionField = value;
4836 }
4837 }
4838
4839 /// <summary>
4840 /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not
4841 /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging.
4842 /// </summary>
4843 public string LogPathVariable
4844 {
4845 get
4846 {
4847 return this.logPathVariableField;
4848 }
4849 set
4850 {
4851 this.logPathVariableFieldSet = true;
4852 this.logPathVariableField = value;
4853 }
4854 }
4855
4856 /// <summary>
4857 /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause
4858 /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which
4859 /// default to no logging.
4860 /// </summary>
4861 public string RollbackLogPathVariable
4862 {
4863 get
4864 {
4865 return this.rollbackLogPathVariableField;
4866 }
4867 set
4868 {
4869 this.rollbackLogPathVariableFieldSet = true;
4870 this.rollbackLogPathVariableField = value;
4871 }
4872 }
4873
4874 /// <summary>
4875 /// Specifies whether the package can be uninstalled. The default is "no".
4876 /// </summary>
4877 public YesNoType Permanent
4878 {
4879 get
4880 {
4881 return this.permanentField;
4882 }
4883 set
4884 {
4885 this.permanentFieldSet = true;
4886 this.permanentField = value;
4887 }
4888 }
4889
4890 /// <summary>
4891 /// Specifies whether the package must succeed for the chain to continue. The default "yes"
4892 /// indicates that if the package fails then the chain will fail and rollback or stop. If
4893 /// "no" is specified then the chain will continue even if the package reports failure.
4894 /// </summary>
4895 public YesNoType Vital
4896 {
4897 get
4898 {
4899 return this.vitalField;
4900 }
4901 set
4902 {
4903 this.vitalFieldSet = true;
4904 this.vitalField = value;
4905 }
4906 }
4907
4908 /// <summary>
4909 /// Whether the package payload should be embedded in a container or left as an external payload.
4910 /// </summary>
4911 public YesNoDefaultType Compressed
4912 {
4913 get
4914 {
4915 return this.compressedField;
4916 }
4917 set
4918 {
4919 this.compressedFieldSet = true;
4920 this.compressedField = value;
4921 }
4922 }
4923
4924 /// <summary>
4925 /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
4926 /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
4927 /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
4928 /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
4929 /// </summary>
4930 public YesNoType EnableSignatureVerification
4931 {
4932 get
4933 {
4934 return this.enableSignatureVerificationField;
4935 }
4936 set
4937 {
4938 this.enableSignatureVerificationFieldSet = true;
4939 this.enableSignatureVerificationField = value;
4940 }
4941 }
4942
4943 /// <summary>
4944 /// Indicates the package must be executed elevated. The default is "no".
4945 /// </summary>
4946 public YesNoDefaultType PerMachine
4947 {
4948 get
4949 {
4950 return this.perMachineField;
4951 }
4952 set
4953 {
4954 this.perMachineFieldSet = true;
4955 this.perMachineField = value;
4956 }
4957 }
4958
4959 /// <summary>
4960 /// Specifies whether to automatically slipstream the patch for any target msi packages in the chain. The default is "no".
4961 /// Even when the value is "no", you can still author the SlipstreamMsp element under MsiPackage elements as desired.
4962 /// </summary>
4963 public YesNoType Slipstream
4964 {
4965 get
4966 {
4967 return this.slipstreamField;
4968 }
4969 set
4970 {
4971 this.slipstreamFieldSet = true;
4972 this.slipstreamField = value;
4973 }
4974 }
4975
4976 public virtual ISchemaElement ParentElement
4977 {
4978 get
4979 {
4980 return this.parentElement;
4981 }
4982 set
4983 {
4984 this.parentElement = value;
4985 }
4986 }
4987
4988 public virtual void AddChild(ISchemaElement child)
4989 {
4990 if ((null == child))
4991 {
4992 throw new ArgumentNullException("child");
4993 }
4994 this.children.AddElement(child);
4995 child.ParentElement = this;
4996 }
4997
4998 public virtual void RemoveChild(ISchemaElement child)
4999 {
5000 if ((null == child))
5001 {
5002 throw new ArgumentNullException("child");
5003 }
5004 this.children.RemoveElement(child);
5005 child.ParentElement = null;
5006 }
5007
5008 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5009 ISchemaElement ICreateChildren.CreateChild(string childName)
5010 {
5011 if (String.IsNullOrEmpty(childName))
5012 {
5013 throw new ArgumentNullException("childName");
5014 }
5015 ISchemaElement childValue = null;
5016 if (("MsiProperty" == childName))
5017 {
5018 childValue = new MsiProperty();
5019 }
5020 if (("Payload" == childName))
5021 {
5022 childValue = new Payload();
5023 }
5024 if (("PayloadGroupRef" == childName))
5025 {
5026 childValue = new PayloadGroupRef();
5027 }
5028 if ((null == childValue))
5029 {
5030 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
5031 }
5032 return childValue;
5033 }
5034
5035 /// <summary>
5036 /// Processes this element and all child elements into an XmlWriter.
5037 /// </summary>
5038 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5039 public virtual void OutputXml(XmlWriter writer)
5040 {
5041 if ((null == writer))
5042 {
5043 throw new ArgumentNullException("writer");
5044 }
5045 writer.WriteStartElement("MspPackage", "http://wixtoolset.org/schemas/v4/wxs");
5046 if (this.sourceFileFieldSet)
5047 {
5048 writer.WriteAttributeString("SourceFile", this.sourceFileField);
5049 }
5050 if (this.nameFieldSet)
5051 {
5052 writer.WriteAttributeString("Name", this.nameField);
5053 }
5054 if (this.downloadUrlFieldSet)
5055 {
5056 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
5057 }
5058 if (this.idFieldSet)
5059 {
5060 writer.WriteAttributeString("Id", this.idField);
5061 }
5062 if (this.afterFieldSet)
5063 {
5064 writer.WriteAttributeString("After", this.afterField);
5065 }
5066 if (this.installSizeFieldSet)
5067 {
5068 writer.WriteAttributeString("InstallSize", this.installSizeField);
5069 }
5070 if (this.installConditionFieldSet)
5071 {
5072 writer.WriteAttributeString("InstallCondition", this.installConditionField);
5073 }
5074 if (this.cacheFieldSet)
5075 {
5076 if ((this.cacheField == YesNoAlwaysType.always))
5077 {
5078 writer.WriteAttributeString("Cache", "always");
5079 }
5080 if ((this.cacheField == YesNoAlwaysType.no))
5081 {
5082 writer.WriteAttributeString("Cache", "no");
5083 }
5084 if ((this.cacheField == YesNoAlwaysType.yes))
5085 {
5086 writer.WriteAttributeString("Cache", "yes");
5087 }
5088 }
5089 if (this.cacheIdFieldSet)
5090 {
5091 writer.WriteAttributeString("CacheId", this.cacheIdField);
5092 }
5093 if (this.displayNameFieldSet)
5094 {
5095 writer.WriteAttributeString("DisplayName", this.displayNameField);
5096 }
5097 if (this.descriptionFieldSet)
5098 {
5099 writer.WriteAttributeString("Description", this.descriptionField);
5100 }
5101 if (this.logPathVariableFieldSet)
5102 {
5103 writer.WriteAttributeString("LogPathVariable", this.logPathVariableField);
5104 }
5105 if (this.rollbackLogPathVariableFieldSet)
5106 {
5107 writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField);
5108 }
5109 if (this.permanentFieldSet)
5110 {
5111 if ((this.permanentField == YesNoType.no))
5112 {
5113 writer.WriteAttributeString("Permanent", "no");
5114 }
5115 if ((this.permanentField == YesNoType.yes))
5116 {
5117 writer.WriteAttributeString("Permanent", "yes");
5118 }
5119 }
5120 if (this.vitalFieldSet)
5121 {
5122 if ((this.vitalField == YesNoType.no))
5123 {
5124 writer.WriteAttributeString("Vital", "no");
5125 }
5126 if ((this.vitalField == YesNoType.yes))
5127 {
5128 writer.WriteAttributeString("Vital", "yes");
5129 }
5130 }
5131 if (this.compressedFieldSet)
5132 {
5133 if ((this.compressedField == YesNoDefaultType.@default))
5134 {
5135 writer.WriteAttributeString("Compressed", "default");
5136 }
5137 if ((this.compressedField == YesNoDefaultType.no))
5138 {
5139 writer.WriteAttributeString("Compressed", "no");
5140 }
5141 if ((this.compressedField == YesNoDefaultType.yes))
5142 {
5143 writer.WriteAttributeString("Compressed", "yes");
5144 }
5145 }
5146 if (this.enableSignatureVerificationFieldSet)
5147 {
5148 if ((this.enableSignatureVerificationField == YesNoType.no))
5149 {
5150 writer.WriteAttributeString("EnableSignatureVerification", "no");
5151 }
5152 if ((this.enableSignatureVerificationField == YesNoType.yes))
5153 {
5154 writer.WriteAttributeString("EnableSignatureVerification", "yes");
5155 }
5156 }
5157 if (this.perMachineFieldSet)
5158 {
5159 if ((this.perMachineField == YesNoDefaultType.@default))
5160 {
5161 writer.WriteAttributeString("PerMachine", "default");
5162 }
5163 if ((this.perMachineField == YesNoDefaultType.no))
5164 {
5165 writer.WriteAttributeString("PerMachine", "no");
5166 }
5167 if ((this.perMachineField == YesNoDefaultType.yes))
5168 {
5169 writer.WriteAttributeString("PerMachine", "yes");
5170 }
5171 }
5172 if (this.slipstreamFieldSet)
5173 {
5174 if ((this.slipstreamField == YesNoType.no))
5175 {
5176 writer.WriteAttributeString("Slipstream", "no");
5177 }
5178 if ((this.slipstreamField == YesNoType.yes))
5179 {
5180 writer.WriteAttributeString("Slipstream", "yes");
5181 }
5182 }
5183 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
5184 {
5185 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
5186 childElement.OutputXml(writer);
5187 }
5188 writer.WriteEndElement();
5189 }
5190
5191 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5192 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5193 void ISetAttributes.SetAttribute(string name, string value)
5194 {
5195 if (String.IsNullOrEmpty(name))
5196 {
5197 throw new ArgumentNullException("name");
5198 }
5199 if (("SourceFile" == name))
5200 {
5201 this.sourceFileField = value;
5202 this.sourceFileFieldSet = true;
5203 }
5204 if (("Name" == name))
5205 {
5206 this.nameField = value;
5207 this.nameFieldSet = true;
5208 }
5209 if (("DownloadUrl" == name))
5210 {
5211 this.downloadUrlField = value;
5212 this.downloadUrlFieldSet = true;
5213 }
5214 if (("Id" == name))
5215 {
5216 this.idField = value;
5217 this.idFieldSet = true;
5218 }
5219 if (("After" == name))
5220 {
5221 this.afterField = value;
5222 this.afterFieldSet = true;
5223 }
5224 if (("InstallSize" == name))
5225 {
5226 this.installSizeField = value;
5227 this.installSizeFieldSet = true;
5228 }
5229 if (("InstallCondition" == name))
5230 {
5231 this.installConditionField = value;
5232 this.installConditionFieldSet = true;
5233 }
5234 if (("Cache" == name))
5235 {
5236 this.cacheField = Enums.ParseYesNoAlwaysType(value);
5237 this.cacheFieldSet = true;
5238 }
5239 if (("CacheId" == name))
5240 {
5241 this.cacheIdField = value;
5242 this.cacheIdFieldSet = true;
5243 }
5244 if (("DisplayName" == name))
5245 {
5246 this.displayNameField = value;
5247 this.displayNameFieldSet = true;
5248 }
5249 if (("Description" == name))
5250 {
5251 this.descriptionField = value;
5252 this.descriptionFieldSet = true;
5253 }
5254 if (("LogPathVariable" == name))
5255 {
5256 this.logPathVariableField = value;
5257 this.logPathVariableFieldSet = true;
5258 }
5259 if (("RollbackLogPathVariable" == name))
5260 {
5261 this.rollbackLogPathVariableField = value;
5262 this.rollbackLogPathVariableFieldSet = true;
5263 }
5264 if (("Permanent" == name))
5265 {
5266 this.permanentField = Enums.ParseYesNoType(value);
5267 this.permanentFieldSet = true;
5268 }
5269 if (("Vital" == name))
5270 {
5271 this.vitalField = Enums.ParseYesNoType(value);
5272 this.vitalFieldSet = true;
5273 }
5274 if (("Compressed" == name))
5275 {
5276 this.compressedField = Enums.ParseYesNoDefaultType(value);
5277 this.compressedFieldSet = true;
5278 }
5279 if (("EnableSignatureVerification" == name))
5280 {
5281 this.enableSignatureVerificationField = Enums.ParseYesNoType(value);
5282 this.enableSignatureVerificationFieldSet = true;
5283 }
5284 if (("PerMachine" == name))
5285 {
5286 this.perMachineField = Enums.ParseYesNoDefaultType(value);
5287 this.perMachineFieldSet = true;
5288 }
5289 if (("Slipstream" == name))
5290 {
5291 this.slipstreamField = Enums.ParseYesNoType(value);
5292 this.slipstreamFieldSet = true;
5293 }
5294 }
5295 }
5296
5297 /// <summary>
5298 /// Describes a single msu package to install.
5299 /// </summary>
5300 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
5301 public class MsuPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
5302 {
5303
5304 private ElementCollection children;
5305
5306 private string sourceFileField;
5307
5308 private bool sourceFileFieldSet;
5309
5310 private string nameField;
5311
5312 private bool nameFieldSet;
5313
5314 private string downloadUrlField;
5315
5316 private bool downloadUrlFieldSet;
5317
5318 private string idField;
5319
5320 private bool idFieldSet;
5321
5322 private string afterField;
5323
5324 private bool afterFieldSet;
5325
5326 private string installSizeField;
5327
5328 private bool installSizeFieldSet;
5329
5330 private string installConditionField;
5331
5332 private bool installConditionFieldSet;
5333
5334 private YesNoAlwaysType cacheField;
5335
5336 private bool cacheFieldSet;
5337
5338 private string cacheIdField;
5339
5340 private bool cacheIdFieldSet;
5341
5342 private string displayNameField;
5343
5344 private bool displayNameFieldSet;
5345
5346 private string descriptionField;
5347
5348 private bool descriptionFieldSet;
5349
5350 private string logPathVariableField;
5351
5352 private bool logPathVariableFieldSet;
5353
5354 private string rollbackLogPathVariableField;
5355
5356 private bool rollbackLogPathVariableFieldSet;
5357
5358 private YesNoType permanentField;
5359
5360 private bool permanentFieldSet;
5361
5362 private YesNoType vitalField;
5363
5364 private bool vitalFieldSet;
5365
5366 private YesNoDefaultType compressedField;
5367
5368 private bool compressedFieldSet;
5369
5370 private YesNoType enableSignatureVerificationField;
5371
5372 private bool enableSignatureVerificationFieldSet;
5373
5374 private string detectConditionField;
5375
5376 private bool detectConditionFieldSet;
5377
5378 private string kBField;
5379
5380 private bool kBFieldSet;
5381
5382 private ISchemaElement parentElement;
5383
5384 public MsuPackage()
5385 {
5386 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
5387 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
5388 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
5389 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackagePayload)));
5390 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
5391 this.children = childCollection0;
5392 }
5393
5394 public virtual IEnumerable Children
5395 {
5396 get
5397 {
5398 return this.children;
5399 }
5400 }
5401
5402 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
5403 public virtual IEnumerable this[System.Type childType]
5404 {
5405 get
5406 {
5407 return this.children.Filter(childType);
5408 }
5409 }
5410
5411 /// <summary>
5412 /// Location of the package to add to the bundle. The default value is the Name attribute, if provided.
5413 /// At a minimum, the SourceFile or Name attribute must be specified.
5414 /// </summary>
5415 public string SourceFile
5416 {
5417 get
5418 {
5419 return this.sourceFileField;
5420 }
5421 set
5422 {
5423 this.sourceFileFieldSet = true;
5424 this.sourceFileField = value;
5425 }
5426 }
5427
5428 /// <summary>
5429 /// The destination path and file name for this chain payload. Use this attribute to rename the
5430 /// chain entry point or extract it into a subfolder. The default value is the file name from the
5431 /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified.
5432 /// The use of '..' directories is not allowed.
5433 /// </summary>
5434 public string Name
5435 {
5436 get
5437 {
5438 return this.nameField;
5439 }
5440 set
5441 {
5442 this.nameFieldSet = true;
5443 this.nameField = value;
5444 }
5445 }
5446
5447 public string DownloadUrl
5448 {
5449 get
5450 {
5451 return this.downloadUrlField;
5452 }
5453 set
5454 {
5455 this.downloadUrlFieldSet = true;
5456 this.downloadUrlField = value;
5457 }
5458 }
5459
5460 /// <summary>
5461 /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute
5462 /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores).
5463 /// </summary>
5464 public string Id
5465 {
5466 get
5467 {
5468 return this.idField;
5469 }
5470 set
5471 {
5472 this.idFieldSet = true;
5473 this.idField = value;
5474 }
5475 }
5476
5477 /// <summary>
5478 /// The identifier of another package that this one should be installed after. By default the After
5479 /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this
5480 /// attribute is specified ensure that a cycle is not created explicitly or implicitly.
5481 /// </summary>
5482 public string After
5483 {
5484 get
5485 {
5486 return this.afterField;
5487 }
5488 set
5489 {
5490 this.afterFieldSet = true;
5491 this.afterField = value;
5492 }
5493 }
5494
5495 /// <summary>
5496 /// The size this package will take on disk in bytes after it is installed. By default, the binder will
5497 /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs)
5498 /// and use the total for the install size of the package.
5499 /// </summary>
5500 public string InstallSize
5501 {
5502 get
5503 {
5504 return this.installSizeField;
5505 }
5506 set
5507 {
5508 this.installSizeFieldSet = true;
5509 this.installSizeField = value;
5510 }
5511 }
5512
5513 /// <summary>
5514 /// A condition to evaluate before installing the package. The package will only be installed if the condition evaluates to true. If the condition evaluates to false and the bundle is being installed, repaired, or modified, the package will be uninstalled.
5515 /// </summary>
5516 public string InstallCondition
5517 {
5518 get
5519 {
5520 return this.installConditionField;
5521 }
5522 set
5523 {
5524 this.installConditionFieldSet = true;
5525 this.installConditionField = value;
5526 }
5527 }
5528
5529 /// <summary>
5530 /// Whether to cache the package. The default is "yes".
5531 /// </summary>
5532 public YesNoAlwaysType Cache
5533 {
5534 get
5535 {
5536 return this.cacheField;
5537 }
5538 set
5539 {
5540 this.cacheFieldSet = true;
5541 this.cacheField = value;
5542 }
5543 }
5544
5545 /// <summary>
5546 /// The identifier to use when caching the package.
5547 /// </summary>
5548 public string CacheId
5549 {
5550 get
5551 {
5552 return this.cacheIdField;
5553 }
5554 set
5555 {
5556 this.cacheIdFieldSet = true;
5557 this.cacheIdField = value;
5558 }
5559 }
5560
5561 /// <summary>
5562 /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages
5563 /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use
5564 /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the
5565 /// bootstrapper application data manifest.
5566 /// </summary>
5567 public string DisplayName
5568 {
5569 get
5570 {
5571 return this.displayNameField;
5572 }
5573 set
5574 {
5575 this.displayNameFieldSet = true;
5576 this.displayNameField = value;
5577 }
5578 }
5579
5580 /// <summary>
5581 /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages
5582 /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use
5583 /// the Description patch metadata property. Other package types must use this attribute to define a description in the
5584 /// bootstrapper application data manifest.
5585 /// </summary>
5586 public string Description
5587 {
5588 get
5589 {
5590 return this.descriptionField;
5591 }
5592 set
5593 {
5594 this.descriptionFieldSet = true;
5595 this.descriptionField = value;
5596 }
5597 }
5598
5599 /// <summary>
5600 /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not
5601 /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging.
5602 /// </summary>
5603 public string LogPathVariable
5604 {
5605 get
5606 {
5607 return this.logPathVariableField;
5608 }
5609 set
5610 {
5611 this.logPathVariableFieldSet = true;
5612 this.logPathVariableField = value;
5613 }
5614 }
5615
5616 /// <summary>
5617 /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause
5618 /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which
5619 /// default to no logging.
5620 /// </summary>
5621 public string RollbackLogPathVariable
5622 {
5623 get
5624 {
5625 return this.rollbackLogPathVariableField;
5626 }
5627 set
5628 {
5629 this.rollbackLogPathVariableFieldSet = true;
5630 this.rollbackLogPathVariableField = value;
5631 }
5632 }
5633
5634 /// <summary>
5635 /// Specifies whether the package can be uninstalled. The default is "no".
5636 /// </summary>
5637 public YesNoType Permanent
5638 {
5639 get
5640 {
5641 return this.permanentField;
5642 }
5643 set
5644 {
5645 this.permanentFieldSet = true;
5646 this.permanentField = value;
5647 }
5648 }
5649
5650 /// <summary>
5651 /// Specifies whether the package must succeed for the chain to continue. The default "yes"
5652 /// indicates that if the package fails then the chain will fail and rollback or stop. If
5653 /// "no" is specified then the chain will continue even if the package reports failure.
5654 /// </summary>
5655 public YesNoType Vital
5656 {
5657 get
5658 {
5659 return this.vitalField;
5660 }
5661 set
5662 {
5663 this.vitalFieldSet = true;
5664 this.vitalField = value;
5665 }
5666 }
5667
5668 /// <summary>
5669 /// Whether the package payload should be embedded in a container or left as an external payload.
5670 /// </summary>
5671 public YesNoDefaultType Compressed
5672 {
5673 get
5674 {
5675 return this.compressedField;
5676 }
5677 set
5678 {
5679 this.compressedFieldSet = true;
5680 this.compressedField = value;
5681 }
5682 }
5683
5684 /// <summary>
5685 /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
5686 /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
5687 /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
5688 /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
5689 /// </summary>
5690 public YesNoType EnableSignatureVerification
5691 {
5692 get
5693 {
5694 return this.enableSignatureVerificationField;
5695 }
5696 set
5697 {
5698 this.enableSignatureVerificationFieldSet = true;
5699 this.enableSignatureVerificationField = value;
5700 }
5701 }
5702
5703 /// <summary>
5704 /// A condition that determines if the package is present on the target system. This condition can use built-in
5705 /// variables and variables returned by searches. This condition is necessary because Windows doesn't provide a
5706 /// method to detect the presence of an MsuPackage. Burn uses this condition to determine how to treat this
5707 /// package during a bundle action; for example, if this condition is false or omitted and the bundle is being
5708 /// installed, Burn will install this package.
5709 /// </summary>
5710 public string DetectCondition
5711 {
5712 get
5713 {
5714 return this.detectConditionField;
5715 }
5716 set
5717 {
5718 this.detectConditionFieldSet = true;
5719 this.detectConditionField = value;
5720 }
5721 }
5722
5723 /// <summary>
5724 /// The knowledge base identifier for the MSU. The KB attribute must be specified to enable the MSU package to
5725 /// be uninstalled. Even then MSU uninstallation is only supported on Windows 7 and later. When the KB attribute
5726 /// is specified, the Permanent attribute will the control whether the package is uninstalled.
5727 /// </summary>
5728 public string KB
5729 {
5730 get
5731 {
5732 return this.kBField;
5733 }
5734 set
5735 {
5736 this.kBFieldSet = true;
5737 this.kBField = value;
5738 }
5739 }
5740
5741 public virtual ISchemaElement ParentElement
5742 {
5743 get
5744 {
5745 return this.parentElement;
5746 }
5747 set
5748 {
5749 this.parentElement = value;
5750 }
5751 }
5752
5753 public virtual void AddChild(ISchemaElement child)
5754 {
5755 if ((null == child))
5756 {
5757 throw new ArgumentNullException("child");
5758 }
5759 this.children.AddElement(child);
5760 child.ParentElement = this;
5761 }
5762
5763 public virtual void RemoveChild(ISchemaElement child)
5764 {
5765 if ((null == child))
5766 {
5767 throw new ArgumentNullException("child");
5768 }
5769 this.children.RemoveElement(child);
5770 child.ParentElement = null;
5771 }
5772
5773 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5774 ISchemaElement ICreateChildren.CreateChild(string childName)
5775 {
5776 if (String.IsNullOrEmpty(childName))
5777 {
5778 throw new ArgumentNullException("childName");
5779 }
5780 ISchemaElement childValue = null;
5781 if (("Payload" == childName))
5782 {
5783 childValue = new Payload();
5784 }
5785 if (("PayloadGroupRef" == childName))
5786 {
5787 childValue = new PayloadGroupRef();
5788 }
5789 if (("MsuPackagePayload" == childName))
5790 {
5791 childValue = new MsuPackagePayload();
5792 }
5793 if ((null == childValue))
5794 {
5795 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
5796 }
5797 return childValue;
5798 }
5799
5800 /// <summary>
5801 /// Processes this element and all child elements into an XmlWriter.
5802 /// </summary>
5803 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5804 public virtual void OutputXml(XmlWriter writer)
5805 {
5806 if ((null == writer))
5807 {
5808 throw new ArgumentNullException("writer");
5809 }
5810 writer.WriteStartElement("MsuPackage", "http://wixtoolset.org/schemas/v4/wxs");
5811 if (this.sourceFileFieldSet)
5812 {
5813 writer.WriteAttributeString("SourceFile", this.sourceFileField);
5814 }
5815 if (this.nameFieldSet)
5816 {
5817 writer.WriteAttributeString("Name", this.nameField);
5818 }
5819 if (this.downloadUrlFieldSet)
5820 {
5821 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
5822 }
5823 if (this.idFieldSet)
5824 {
5825 writer.WriteAttributeString("Id", this.idField);
5826 }
5827 if (this.afterFieldSet)
5828 {
5829 writer.WriteAttributeString("After", this.afterField);
5830 }
5831 if (this.installSizeFieldSet)
5832 {
5833 writer.WriteAttributeString("InstallSize", this.installSizeField);
5834 }
5835 if (this.installConditionFieldSet)
5836 {
5837 writer.WriteAttributeString("InstallCondition", this.installConditionField);
5838 }
5839 if (this.cacheFieldSet)
5840 {
5841 if ((this.cacheField == YesNoAlwaysType.always))
5842 {
5843 writer.WriteAttributeString("Cache", "always");
5844 }
5845 if ((this.cacheField == YesNoAlwaysType.no))
5846 {
5847 writer.WriteAttributeString("Cache", "no");
5848 }
5849 if ((this.cacheField == YesNoAlwaysType.yes))
5850 {
5851 writer.WriteAttributeString("Cache", "yes");
5852 }
5853 }
5854 if (this.cacheIdFieldSet)
5855 {
5856 writer.WriteAttributeString("CacheId", this.cacheIdField);
5857 }
5858 if (this.displayNameFieldSet)
5859 {
5860 writer.WriteAttributeString("DisplayName", this.displayNameField);
5861 }
5862 if (this.descriptionFieldSet)
5863 {
5864 writer.WriteAttributeString("Description", this.descriptionField);
5865 }
5866 if (this.logPathVariableFieldSet)
5867 {
5868 writer.WriteAttributeString("LogPathVariable", this.logPathVariableField);
5869 }
5870 if (this.rollbackLogPathVariableFieldSet)
5871 {
5872 writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField);
5873 }
5874 if (this.permanentFieldSet)
5875 {
5876 if ((this.permanentField == YesNoType.no))
5877 {
5878 writer.WriteAttributeString("Permanent", "no");
5879 }
5880 if ((this.permanentField == YesNoType.yes))
5881 {
5882 writer.WriteAttributeString("Permanent", "yes");
5883 }
5884 }
5885 if (this.vitalFieldSet)
5886 {
5887 if ((this.vitalField == YesNoType.no))
5888 {
5889 writer.WriteAttributeString("Vital", "no");
5890 }
5891 if ((this.vitalField == YesNoType.yes))
5892 {
5893 writer.WriteAttributeString("Vital", "yes");
5894 }
5895 }
5896 if (this.compressedFieldSet)
5897 {
5898 if ((this.compressedField == YesNoDefaultType.@default))
5899 {
5900 writer.WriteAttributeString("Compressed", "default");
5901 }
5902 if ((this.compressedField == YesNoDefaultType.no))
5903 {
5904 writer.WriteAttributeString("Compressed", "no");
5905 }
5906 if ((this.compressedField == YesNoDefaultType.yes))
5907 {
5908 writer.WriteAttributeString("Compressed", "yes");
5909 }
5910 }
5911 if (this.enableSignatureVerificationFieldSet)
5912 {
5913 if ((this.enableSignatureVerificationField == YesNoType.no))
5914 {
5915 writer.WriteAttributeString("EnableSignatureVerification", "no");
5916 }
5917 if ((this.enableSignatureVerificationField == YesNoType.yes))
5918 {
5919 writer.WriteAttributeString("EnableSignatureVerification", "yes");
5920 }
5921 }
5922 if (this.detectConditionFieldSet)
5923 {
5924 writer.WriteAttributeString("DetectCondition", this.detectConditionField);
5925 }
5926 if (this.kBFieldSet)
5927 {
5928 writer.WriteAttributeString("KB", this.kBField);
5929 }
5930 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
5931 {
5932 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
5933 childElement.OutputXml(writer);
5934 }
5935 writer.WriteEndElement();
5936 }
5937
5938 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5939 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5940 void ISetAttributes.SetAttribute(string name, string value)
5941 {
5942 if (String.IsNullOrEmpty(name))
5943 {
5944 throw new ArgumentNullException("name");
5945 }
5946 if (("SourceFile" == name))
5947 {
5948 this.sourceFileField = value;
5949 this.sourceFileFieldSet = true;
5950 }
5951 if (("Name" == name))
5952 {
5953 this.nameField = value;
5954 this.nameFieldSet = true;
5955 }
5956 if (("DownloadUrl" == name))
5957 {
5958 this.downloadUrlField = value;
5959 this.downloadUrlFieldSet = true;
5960 }
5961 if (("Id" == name))
5962 {
5963 this.idField = value;
5964 this.idFieldSet = true;
5965 }
5966 if (("After" == name))
5967 {
5968 this.afterField = value;
5969 this.afterFieldSet = true;
5970 }
5971 if (("InstallSize" == name))
5972 {
5973 this.installSizeField = value;
5974 this.installSizeFieldSet = true;
5975 }
5976 if (("InstallCondition" == name))
5977 {
5978 this.installConditionField = value;
5979 this.installConditionFieldSet = true;
5980 }
5981 if (("Cache" == name))
5982 {
5983 this.cacheField = Enums.ParseYesNoAlwaysType(value);
5984 this.cacheFieldSet = true;
5985 }
5986 if (("CacheId" == name))
5987 {
5988 this.cacheIdField = value;
5989 this.cacheIdFieldSet = true;
5990 }
5991 if (("DisplayName" == name))
5992 {
5993 this.displayNameField = value;
5994 this.displayNameFieldSet = true;
5995 }
5996 if (("Description" == name))
5997 {
5998 this.descriptionField = value;
5999 this.descriptionFieldSet = true;
6000 }
6001 if (("LogPathVariable" == name))
6002 {
6003 this.logPathVariableField = value;
6004 this.logPathVariableFieldSet = true;
6005 }
6006 if (("RollbackLogPathVariable" == name))
6007 {
6008 this.rollbackLogPathVariableField = value;
6009 this.rollbackLogPathVariableFieldSet = true;
6010 }
6011 if (("Permanent" == name))
6012 {
6013 this.permanentField = Enums.ParseYesNoType(value);
6014 this.permanentFieldSet = true;
6015 }
6016 if (("Vital" == name))
6017 {
6018 this.vitalField = Enums.ParseYesNoType(value);
6019 this.vitalFieldSet = true;
6020 }
6021 if (("Compressed" == name))
6022 {
6023 this.compressedField = Enums.ParseYesNoDefaultType(value);
6024 this.compressedFieldSet = true;
6025 }
6026 if (("EnableSignatureVerification" == name))
6027 {
6028 this.enableSignatureVerificationField = Enums.ParseYesNoType(value);
6029 this.enableSignatureVerificationFieldSet = true;
6030 }
6031 if (("DetectCondition" == name))
6032 {
6033 this.detectConditionField = value;
6034 this.detectConditionFieldSet = true;
6035 }
6036 if (("KB" == name))
6037 {
6038 this.kBField = value;
6039 this.kBFieldSet = true;
6040 }
6041 }
6042 }
6043
6044 /// <summary>
6045 /// Describes a single exe package to install.
6046 /// </summary>
6047 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
6048 public class ExePackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
6049 {
6050
6051 private ElementCollection children;
6052
6053 private string sourceFileField;
6054
6055 private bool sourceFileFieldSet;
6056
6057 private string nameField;
6058
6059 private bool nameFieldSet;
6060
6061 private string downloadUrlField;
6062
6063 private bool downloadUrlFieldSet;
6064
6065 private string idField;
6066
6067 private bool idFieldSet;
6068
6069 private string afterField;
6070
6071 private bool afterFieldSet;
6072
6073 private string installSizeField;
6074
6075 private bool installSizeFieldSet;
6076
6077 private string installConditionField;
6078
6079 private bool installConditionFieldSet;
6080
6081 private YesNoAlwaysType cacheField;
6082
6083 private bool cacheFieldSet;
6084
6085 private string cacheIdField;
6086
6087 private bool cacheIdFieldSet;
6088
6089 private string displayNameField;
6090
6091 private bool displayNameFieldSet;
6092
6093 private string descriptionField;
6094
6095 private bool descriptionFieldSet;
6096
6097 private string logPathVariableField;
6098
6099 private bool logPathVariableFieldSet;
6100
6101 private string rollbackLogPathVariableField;
6102
6103 private bool rollbackLogPathVariableFieldSet;
6104
6105 private YesNoType permanentField;
6106
6107 private bool permanentFieldSet;
6108
6109 private YesNoType vitalField;
6110
6111 private bool vitalFieldSet;
6112
6113 private YesNoDefaultType compressedField;
6114
6115 private bool compressedFieldSet;
6116
6117 private YesNoType enableSignatureVerificationField;
6118
6119 private bool enableSignatureVerificationFieldSet;
6120
6121 private string detectConditionField;
6122
6123 private bool detectConditionFieldSet;
6124
6125 private string installCommandField;
6126
6127 private bool installCommandFieldSet;
6128
6129 private string repairCommandField;
6130
6131 private bool repairCommandFieldSet;
6132
6133 private string uninstallCommandField;
6134
6135 private bool uninstallCommandFieldSet;
6136
6137 private YesNoDefaultType perMachineField;
6138
6139 private bool perMachineFieldSet;
6140
6141 private BurnExeProtocolType protocolField;
6142
6143 private bool protocolFieldSet;
6144
6145 private ISchemaElement parentElement;
6146
6147 public ExePackage()
6148 {
6149 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
6150 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
6151 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
6152 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackagePayload)));
6153 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExitCode)));
6154 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CommandLine)));
6155 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
6156 this.children = childCollection0;
6157 }
6158
6159 public virtual IEnumerable Children
6160 {
6161 get
6162 {
6163 return this.children;
6164 }
6165 }
6166
6167 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
6168 public virtual IEnumerable this[System.Type childType]
6169 {
6170 get
6171 {
6172 return this.children.Filter(childType);
6173 }
6174 }
6175
6176 /// <summary>
6177 /// Location of the package to add to the bundle. The default value is the Name attribute, if provided.
6178 /// At a minimum, the SourceFile or Name attribute must be specified.
6179 /// </summary>
6180 public string SourceFile
6181 {
6182 get
6183 {
6184 return this.sourceFileField;
6185 }
6186 set
6187 {
6188 this.sourceFileFieldSet = true;
6189 this.sourceFileField = value;
6190 }
6191 }
6192
6193 /// <summary>
6194 /// The destination path and file name for this chain payload. Use this attribute to rename the
6195 /// chain entry point or extract it into a subfolder. The default value is the file name from the
6196 /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified.
6197 /// The use of '..' directories is not allowed.
6198 /// </summary>
6199 public string Name
6200 {
6201 get
6202 {
6203 return this.nameField;
6204 }
6205 set
6206 {
6207 this.nameFieldSet = true;
6208 this.nameField = value;
6209 }
6210 }
6211
6212 public string DownloadUrl
6213 {
6214 get
6215 {
6216 return this.downloadUrlField;
6217 }
6218 set
6219 {
6220 this.downloadUrlFieldSet = true;
6221 this.downloadUrlField = value;
6222 }
6223 }
6224
6225 /// <summary>
6226 /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute
6227 /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores).
6228 /// </summary>
6229 public string Id
6230 {
6231 get
6232 {
6233 return this.idField;
6234 }
6235 set
6236 {
6237 this.idFieldSet = true;
6238 this.idField = value;
6239 }
6240 }
6241
6242 /// <summary>
6243 /// The identifier of another package that this one should be installed after. By default the After
6244 /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this
6245 /// attribute is specified ensure that a cycle is not created explicitly or implicitly.
6246 /// </summary>
6247 public string After
6248 {
6249 get
6250 {
6251 return this.afterField;
6252 }
6253 set
6254 {
6255 this.afterFieldSet = true;
6256 this.afterField = value;
6257 }
6258 }
6259
6260 /// <summary>
6261 /// The size this package will take on disk in bytes after it is installed. By default, the binder will
6262 /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs)
6263 /// and use the total for the install size of the package.
6264 /// </summary>
6265 public string InstallSize
6266 {
6267 get
6268 {
6269 return this.installSizeField;
6270 }
6271 set
6272 {
6273 this.installSizeFieldSet = true;
6274 this.installSizeField = value;
6275 }
6276 }
6277
6278 /// <summary>
6279 /// A condition to evaluate before installing the package. The package will only be installed if the condition evaluates to true. If the condition evaluates to false and the bundle is being installed, repaired, or modified, the package will be uninstalled.
6280 /// </summary>
6281 public string InstallCondition
6282 {
6283 get
6284 {
6285 return this.installConditionField;
6286 }
6287 set
6288 {
6289 this.installConditionFieldSet = true;
6290 this.installConditionField = value;
6291 }
6292 }
6293
6294 /// <summary>
6295 /// Whether to cache the package. The default is "yes".
6296 /// </summary>
6297 public YesNoAlwaysType Cache
6298 {
6299 get
6300 {
6301 return this.cacheField;
6302 }
6303 set
6304 {
6305 this.cacheFieldSet = true;
6306 this.cacheField = value;
6307 }
6308 }
6309
6310 /// <summary>
6311 /// The identifier to use when caching the package.
6312 /// </summary>
6313 public string CacheId
6314 {
6315 get
6316 {
6317 return this.cacheIdField;
6318 }
6319 set
6320 {
6321 this.cacheIdFieldSet = true;
6322 this.cacheIdField = value;
6323 }
6324 }
6325
6326 /// <summary>
6327 /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages
6328 /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use
6329 /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the
6330 /// bootstrapper application data manifest.
6331 /// </summary>
6332 public string DisplayName
6333 {
6334 get
6335 {
6336 return this.displayNameField;
6337 }
6338 set
6339 {
6340 this.displayNameFieldSet = true;
6341 this.displayNameField = value;
6342 }
6343 }
6344
6345 /// <summary>
6346 /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages
6347 /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use
6348 /// the Description patch metadata property. Other package types must use this attribute to define a description in the
6349 /// bootstrapper application data manifest.
6350 /// </summary>
6351 public string Description
6352 {
6353 get
6354 {
6355 return this.descriptionField;
6356 }
6357 set
6358 {
6359 this.descriptionFieldSet = true;
6360 this.descriptionField = value;
6361 }
6362 }
6363
6364 /// <summary>
6365 /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not
6366 /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging.
6367 /// </summary>
6368 public string LogPathVariable
6369 {
6370 get
6371 {
6372 return this.logPathVariableField;
6373 }
6374 set
6375 {
6376 this.logPathVariableFieldSet = true;
6377 this.logPathVariableField = value;
6378 }
6379 }
6380
6381 /// <summary>
6382 /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause
6383 /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which
6384 /// default to no logging.
6385 /// </summary>
6386 public string RollbackLogPathVariable
6387 {
6388 get
6389 {
6390 return this.rollbackLogPathVariableField;
6391 }
6392 set
6393 {
6394 this.rollbackLogPathVariableFieldSet = true;
6395 this.rollbackLogPathVariableField = value;
6396 }
6397 }
6398
6399 /// <summary>
6400 /// Specifies whether the package can be uninstalled. The default is "no".
6401 /// </summary>
6402 public YesNoType Permanent
6403 {
6404 get
6405 {
6406 return this.permanentField;
6407 }
6408 set
6409 {
6410 this.permanentFieldSet = true;
6411 this.permanentField = value;
6412 }
6413 }
6414
6415 /// <summary>
6416 /// Specifies whether the package must succeed for the chain to continue. The default "yes"
6417 /// indicates that if the package fails then the chain will fail and rollback or stop. If
6418 /// "no" is specified then the chain will continue even if the package reports failure.
6419 /// </summary>
6420 public YesNoType Vital
6421 {
6422 get
6423 {
6424 return this.vitalField;
6425 }
6426 set
6427 {
6428 this.vitalFieldSet = true;
6429 this.vitalField = value;
6430 }
6431 }
6432
6433 /// <summary>
6434 /// Whether the package payload should be embedded in a container or left as an external payload.
6435 /// </summary>
6436 public YesNoDefaultType Compressed
6437 {
6438 get
6439 {
6440 return this.compressedField;
6441 }
6442 set
6443 {
6444 this.compressedFieldSet = true;
6445 this.compressedField = value;
6446 }
6447 }
6448
6449 /// <summary>
6450 /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
6451 /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
6452 /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
6453 /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
6454 /// </summary>
6455 public YesNoType EnableSignatureVerification
6456 {
6457 get
6458 {
6459 return this.enableSignatureVerificationField;
6460 }
6461 set
6462 {
6463 this.enableSignatureVerificationFieldSet = true;
6464 this.enableSignatureVerificationField = value;
6465 }
6466 }
6467
6468 /// <summary>
6469 /// A condition that determines if the package is present on the target system. This condition can use built-in
6470 /// variables and variables returned by searches. This condition is necessary because Windows doesn't provide a
6471 /// method to detect the presence of an ExePackage. Burn uses this condition to determine how to treat this
6472 /// package during a bundle action; for example, if this condition is false or omitted and the bundle is being
6473 /// installed, Burn will install this package.
6474 /// </summary>
6475 public string DetectCondition
6476 {
6477 get
6478 {
6479 return this.detectConditionField;
6480 }
6481 set
6482 {
6483 this.detectConditionFieldSet = true;
6484 this.detectConditionField = value;
6485 }
6486 }
6487
6488 /// <summary>
6489 /// The command-line arguments provided to the ExePackage during install. If this attribute is absent the executable will be launched with no command-line arguments.
6490 /// </summary>
6491 public string InstallCommand
6492 {
6493 get
6494 {
6495 return this.installCommandField;
6496 }
6497 set
6498 {
6499 this.installCommandFieldSet = true;
6500 this.installCommandField = value;
6501 }
6502 }
6503
6504 /// <summary>
6505 /// The command-line arguments to specify to indicate a repair. If the executable package can be repaired but
6506 /// does not require any special command-line arguments to do so then set the attribute's value to blank. To
6507 /// indicate that the package does not support repair, omit this attribute.
6508 /// </summary>
6509 public string RepairCommand
6510 {
6511 get
6512 {
6513 return this.repairCommandField;
6514 }
6515 set
6516 {
6517 this.repairCommandFieldSet = true;
6518 this.repairCommandField = value;
6519 }
6520 }
6521
6522 /// <summary>
6523 /// The command-line arguments provided to the ExePackage during uninstall. If this attribute is absent the executable will be launched with no command-line arguments. To prevent an ExePackage from being uninstalled set the Permanent attribute to "yes".
6524 /// </summary>
6525 public string UninstallCommand
6526 {
6527 get
6528 {
6529 return this.uninstallCommandField;
6530 }
6531 set
6532 {
6533 this.uninstallCommandFieldSet = true;
6534 this.uninstallCommandField = value;
6535 }
6536 }
6537
6538 /// <summary>
6539 /// Indicates the package must be executed elevated. The default is "no".
6540 /// </summary>
6541 public YesNoDefaultType PerMachine
6542 {
6543 get
6544 {
6545 return this.perMachineField;
6546 }
6547 set
6548 {
6549 this.perMachineFieldSet = true;
6550 this.perMachineField = value;
6551 }
6552 }
6553
6554 /// <summary>
6555 /// Indicates the communication protocol the package supports for extended progress and error reporting. The default is "none".
6556 /// </summary>
6557 public BurnExeProtocolType Protocol
6558 {
6559 get
6560 {
6561 return this.protocolField;
6562 }
6563 set
6564 {
6565 this.protocolFieldSet = true;
6566 this.protocolField = value;
6567 }
6568 }
6569
6570 public virtual ISchemaElement ParentElement
6571 {
6572 get
6573 {
6574 return this.parentElement;
6575 }
6576 set
6577 {
6578 this.parentElement = value;
6579 }
6580 }
6581
6582 public virtual void AddChild(ISchemaElement child)
6583 {
6584 if ((null == child))
6585 {
6586 throw new ArgumentNullException("child");
6587 }
6588 this.children.AddElement(child);
6589 child.ParentElement = this;
6590 }
6591
6592 public virtual void RemoveChild(ISchemaElement child)
6593 {
6594 if ((null == child))
6595 {
6596 throw new ArgumentNullException("child");
6597 }
6598 this.children.RemoveElement(child);
6599 child.ParentElement = null;
6600 }
6601
6602 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
6603 ISchemaElement ICreateChildren.CreateChild(string childName)
6604 {
6605 if (String.IsNullOrEmpty(childName))
6606 {
6607 throw new ArgumentNullException("childName");
6608 }
6609 ISchemaElement childValue = null;
6610 if (("Payload" == childName))
6611 {
6612 childValue = new Payload();
6613 }
6614 if (("PayloadGroupRef" == childName))
6615 {
6616 childValue = new PayloadGroupRef();
6617 }
6618 if (("ExePackagePayload" == childName))
6619 {
6620 childValue = new ExePackagePayload();
6621 }
6622 if (("ExitCode" == childName))
6623 {
6624 childValue = new ExitCode();
6625 }
6626 if (("CommandLine" == childName))
6627 {
6628 childValue = new CommandLine();
6629 }
6630 if ((null == childValue))
6631 {
6632 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
6633 }
6634 return childValue;
6635 }
6636
6637 /// <summary>
6638 /// Processes this element and all child elements into an XmlWriter.
6639 /// </summary>
6640 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
6641 public virtual void OutputXml(XmlWriter writer)
6642 {
6643 if ((null == writer))
6644 {
6645 throw new ArgumentNullException("writer");
6646 }
6647 writer.WriteStartElement("ExePackage", "http://wixtoolset.org/schemas/v4/wxs");
6648 if (this.sourceFileFieldSet)
6649 {
6650 writer.WriteAttributeString("SourceFile", this.sourceFileField);
6651 }
6652 if (this.nameFieldSet)
6653 {
6654 writer.WriteAttributeString("Name", this.nameField);
6655 }
6656 if (this.downloadUrlFieldSet)
6657 {
6658 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
6659 }
6660 if (this.idFieldSet)
6661 {
6662 writer.WriteAttributeString("Id", this.idField);
6663 }
6664 if (this.afterFieldSet)
6665 {
6666 writer.WriteAttributeString("After", this.afterField);
6667 }
6668 if (this.installSizeFieldSet)
6669 {
6670 writer.WriteAttributeString("InstallSize", this.installSizeField);
6671 }
6672 if (this.installConditionFieldSet)
6673 {
6674 writer.WriteAttributeString("InstallCondition", this.installConditionField);
6675 }
6676 if (this.cacheFieldSet)
6677 {
6678 if ((this.cacheField == YesNoAlwaysType.always))
6679 {
6680 writer.WriteAttributeString("Cache", "always");
6681 }
6682 if ((this.cacheField == YesNoAlwaysType.no))
6683 {
6684 writer.WriteAttributeString("Cache", "no");
6685 }
6686 if ((this.cacheField == YesNoAlwaysType.yes))
6687 {
6688 writer.WriteAttributeString("Cache", "yes");
6689 }
6690 }
6691 if (this.cacheIdFieldSet)
6692 {
6693 writer.WriteAttributeString("CacheId", this.cacheIdField);
6694 }
6695 if (this.displayNameFieldSet)
6696 {
6697 writer.WriteAttributeString("DisplayName", this.displayNameField);
6698 }
6699 if (this.descriptionFieldSet)
6700 {
6701 writer.WriteAttributeString("Description", this.descriptionField);
6702 }
6703 if (this.logPathVariableFieldSet)
6704 {
6705 writer.WriteAttributeString("LogPathVariable", this.logPathVariableField);
6706 }
6707 if (this.rollbackLogPathVariableFieldSet)
6708 {
6709 writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField);
6710 }
6711 if (this.permanentFieldSet)
6712 {
6713 if ((this.permanentField == YesNoType.no))
6714 {
6715 writer.WriteAttributeString("Permanent", "no");
6716 }
6717 if ((this.permanentField == YesNoType.yes))
6718 {
6719 writer.WriteAttributeString("Permanent", "yes");
6720 }
6721 }
6722 if (this.vitalFieldSet)
6723 {
6724 if ((this.vitalField == YesNoType.no))
6725 {
6726 writer.WriteAttributeString("Vital", "no");
6727 }
6728 if ((this.vitalField == YesNoType.yes))
6729 {
6730 writer.WriteAttributeString("Vital", "yes");
6731 }
6732 }
6733 if (this.compressedFieldSet)
6734 {
6735 if ((this.compressedField == YesNoDefaultType.@default))
6736 {
6737 writer.WriteAttributeString("Compressed", "default");
6738 }
6739 if ((this.compressedField == YesNoDefaultType.no))
6740 {
6741 writer.WriteAttributeString("Compressed", "no");
6742 }
6743 if ((this.compressedField == YesNoDefaultType.yes))
6744 {
6745 writer.WriteAttributeString("Compressed", "yes");
6746 }
6747 }
6748 if (this.enableSignatureVerificationFieldSet)
6749 {
6750 if ((this.enableSignatureVerificationField == YesNoType.no))
6751 {
6752 writer.WriteAttributeString("EnableSignatureVerification", "no");
6753 }
6754 if ((this.enableSignatureVerificationField == YesNoType.yes))
6755 {
6756 writer.WriteAttributeString("EnableSignatureVerification", "yes");
6757 }
6758 }
6759 if (this.detectConditionFieldSet)
6760 {
6761 writer.WriteAttributeString("DetectCondition", this.detectConditionField);
6762 }
6763 if (this.installCommandFieldSet)
6764 {
6765 writer.WriteAttributeString("InstallCommand", this.installCommandField);
6766 }
6767 if (this.repairCommandFieldSet)
6768 {
6769 writer.WriteAttributeString("RepairCommand", this.repairCommandField);
6770 }
6771 if (this.uninstallCommandFieldSet)
6772 {
6773 writer.WriteAttributeString("UninstallCommand", this.uninstallCommandField);
6774 }
6775 if (this.perMachineFieldSet)
6776 {
6777 if ((this.perMachineField == YesNoDefaultType.@default))
6778 {
6779 writer.WriteAttributeString("PerMachine", "default");
6780 }
6781 if ((this.perMachineField == YesNoDefaultType.no))
6782 {
6783 writer.WriteAttributeString("PerMachine", "no");
6784 }
6785 if ((this.perMachineField == YesNoDefaultType.yes))
6786 {
6787 writer.WriteAttributeString("PerMachine", "yes");
6788 }
6789 }
6790 if (this.protocolFieldSet)
6791 {
6792 if ((this.protocolField == BurnExeProtocolType.none))
6793 {
6794 writer.WriteAttributeString("Protocol", "none");
6795 }
6796 if ((this.protocolField == BurnExeProtocolType.burn))
6797 {
6798 writer.WriteAttributeString("Protocol", "burn");
6799 }
6800 if ((this.protocolField == BurnExeProtocolType.netfx4))
6801 {
6802 writer.WriteAttributeString("Protocol", "netfx4");
6803 }
6804 }
6805 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
6806 {
6807 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
6808 childElement.OutputXml(writer);
6809 }
6810 writer.WriteEndElement();
6811 }
6812
6813 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
6814 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
6815 void ISetAttributes.SetAttribute(string name, string value)
6816 {
6817 if (String.IsNullOrEmpty(name))
6818 {
6819 throw new ArgumentNullException("name");
6820 }
6821 if (("SourceFile" == name))
6822 {
6823 this.sourceFileField = value;
6824 this.sourceFileFieldSet = true;
6825 }
6826 if (("Name" == name))
6827 {
6828 this.nameField = value;
6829 this.nameFieldSet = true;
6830 }
6831 if (("DownloadUrl" == name))
6832 {
6833 this.downloadUrlField = value;
6834 this.downloadUrlFieldSet = true;
6835 }
6836 if (("Id" == name))
6837 {
6838 this.idField = value;
6839 this.idFieldSet = true;
6840 }
6841 if (("After" == name))
6842 {
6843 this.afterField = value;
6844 this.afterFieldSet = true;
6845 }
6846 if (("InstallSize" == name))
6847 {
6848 this.installSizeField = value;
6849 this.installSizeFieldSet = true;
6850 }
6851 if (("InstallCondition" == name))
6852 {
6853 this.installConditionField = value;
6854 this.installConditionFieldSet = true;
6855 }
6856 if (("Cache" == name))
6857 {
6858 this.cacheField = Enums.ParseYesNoAlwaysType(value);
6859 this.cacheFieldSet = true;
6860 }
6861 if (("CacheId" == name))
6862 {
6863 this.cacheIdField = value;
6864 this.cacheIdFieldSet = true;
6865 }
6866 if (("DisplayName" == name))
6867 {
6868 this.displayNameField = value;
6869 this.displayNameFieldSet = true;
6870 }
6871 if (("Description" == name))
6872 {
6873 this.descriptionField = value;
6874 this.descriptionFieldSet = true;
6875 }
6876 if (("LogPathVariable" == name))
6877 {
6878 this.logPathVariableField = value;
6879 this.logPathVariableFieldSet = true;
6880 }
6881 if (("RollbackLogPathVariable" == name))
6882 {
6883 this.rollbackLogPathVariableField = value;
6884 this.rollbackLogPathVariableFieldSet = true;
6885 }
6886 if (("Permanent" == name))
6887 {
6888 this.permanentField = Enums.ParseYesNoType(value);
6889 this.permanentFieldSet = true;
6890 }
6891 if (("Vital" == name))
6892 {
6893 this.vitalField = Enums.ParseYesNoType(value);
6894 this.vitalFieldSet = true;
6895 }
6896 if (("Compressed" == name))
6897 {
6898 this.compressedField = Enums.ParseYesNoDefaultType(value);
6899 this.compressedFieldSet = true;
6900 }
6901 if (("EnableSignatureVerification" == name))
6902 {
6903 this.enableSignatureVerificationField = Enums.ParseYesNoType(value);
6904 this.enableSignatureVerificationFieldSet = true;
6905 }
6906 if (("DetectCondition" == name))
6907 {
6908 this.detectConditionField = value;
6909 this.detectConditionFieldSet = true;
6910 }
6911 if (("InstallCommand" == name))
6912 {
6913 this.installCommandField = value;
6914 this.installCommandFieldSet = true;
6915 }
6916 if (("RepairCommand" == name))
6917 {
6918 this.repairCommandField = value;
6919 this.repairCommandFieldSet = true;
6920 }
6921 if (("UninstallCommand" == name))
6922 {
6923 this.uninstallCommandField = value;
6924 this.uninstallCommandFieldSet = true;
6925 }
6926 if (("PerMachine" == name))
6927 {
6928 this.perMachineField = Enums.ParseYesNoDefaultType(value);
6929 this.perMachineFieldSet = true;
6930 }
6931 if (("Protocol" == name))
6932 {
6933 this.protocolField = Enums.ParseBurnExeProtocolType(value);
6934 this.protocolFieldSet = true;
6935 }
6936 }
6937 }
6938
6939 /// <summary>
6940 /// Describes a rollback boundary in the chain.
6941 /// </summary>
6942 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
6943 public class RollbackBoundary : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
6944 {
6945
6946 private ElementCollection children;
6947
6948 private string idField;
6949
6950 private bool idFieldSet;
6951
6952 private YesNoType vitalField;
6953
6954 private bool vitalFieldSet;
6955
6956 private YesNoType transactionField;
6957
6958 private bool transactionFieldSet;
6959
6960 private ISchemaElement parentElement;
6961
6962 public RollbackBoundary()
6963 {
6964 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
6965 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
6966 this.children = childCollection0;
6967 }
6968
6969 public virtual IEnumerable Children
6970 {
6971 get
6972 {
6973 return this.children;
6974 }
6975 }
6976
6977 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
6978 public virtual IEnumerable this[System.Type childType]
6979 {
6980 get
6981 {
6982 return this.children.Filter(childType);
6983 }
6984 }
6985
6986 /// <summary>
6987 /// Identifier for this rollback boundary, for ordering and cross-referencing. If this attribute is
6988 /// not provided a stable identifier will be generated.
6989 /// </summary>
6990 public string Id
6991 {
6992 get
6993 {
6994 return this.idField;
6995 }
6996 set
6997 {
6998 this.idFieldSet = true;
6999 this.idField = value;
7000 }
7001 }
7002
7003 /// <summary>
7004 /// Specifies whether the rollback boundary aborts the chain. The default "yes" indicates that if
7005 /// the rollback boundary is encountered then the chain will fail and rollback or stop. If "no"
7006 /// is specified then the chain should continue successfuly at the next rollback boundary.
7007 /// </summary>
7008 public YesNoType Vital
7009 {
7010 get
7011 {
7012 return this.vitalField;
7013 }
7014 set
7015 {
7016 this.vitalFieldSet = true;
7017 this.vitalField = value;
7018 }
7019 }
7020
7021 /// <summary>
7022 /// Specifies whether the rollback boundary is wrapped in an MSI transaction. The default is "no"
7023 /// </summary>
7024 public YesNoType Transaction
7025 {
7026 get
7027 {
7028 return this.transactionField;
7029 }
7030 set
7031 {
7032 this.transactionFieldSet = true;
7033 this.transactionField = value;
7034 }
7035 }
7036
7037 public virtual ISchemaElement ParentElement
7038 {
7039 get
7040 {
7041 return this.parentElement;
7042 }
7043 set
7044 {
7045 this.parentElement = value;
7046 }
7047 }
7048
7049 public virtual void AddChild(ISchemaElement child)
7050 {
7051 if ((null == child))
7052 {
7053 throw new ArgumentNullException("child");
7054 }
7055 this.children.AddElement(child);
7056 child.ParentElement = this;
7057 }
7058
7059 public virtual void RemoveChild(ISchemaElement child)
7060 {
7061 if ((null == child))
7062 {
7063 throw new ArgumentNullException("child");
7064 }
7065 this.children.RemoveElement(child);
7066 child.ParentElement = null;
7067 }
7068
7069 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7070 ISchemaElement ICreateChildren.CreateChild(string childName)
7071 {
7072 if (String.IsNullOrEmpty(childName))
7073 {
7074 throw new ArgumentNullException("childName");
7075 }
7076 ISchemaElement childValue = null;
7077 if ((null == childValue))
7078 {
7079 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
7080 }
7081 return childValue;
7082 }
7083
7084 /// <summary>
7085 /// Processes this element and all child elements into an XmlWriter.
7086 /// </summary>
7087 public virtual void OutputXml(XmlWriter writer)
7088 {
7089 if ((null == writer))
7090 {
7091 throw new ArgumentNullException("writer");
7092 }
7093 writer.WriteStartElement("RollbackBoundary", "http://wixtoolset.org/schemas/v4/wxs");
7094 if (this.idFieldSet)
7095 {
7096 writer.WriteAttributeString("Id", this.idField);
7097 }
7098 if (this.vitalFieldSet)
7099 {
7100 if ((this.vitalField == YesNoType.no))
7101 {
7102 writer.WriteAttributeString("Vital", "no");
7103 }
7104 if ((this.vitalField == YesNoType.yes))
7105 {
7106 writer.WriteAttributeString("Vital", "yes");
7107 }
7108 }
7109 if (this.transactionFieldSet)
7110 {
7111 if ((this.transactionField == YesNoType.no))
7112 {
7113 writer.WriteAttributeString("Transaction", "no");
7114 }
7115 if ((this.transactionField == YesNoType.yes))
7116 {
7117 writer.WriteAttributeString("Transaction", "yes");
7118 }
7119 }
7120 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
7121 {
7122 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
7123 childElement.OutputXml(writer);
7124 }
7125 writer.WriteEndElement();
7126 }
7127
7128 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7129 void ISetAttributes.SetAttribute(string name, string value)
7130 {
7131 if (String.IsNullOrEmpty(name))
7132 {
7133 throw new ArgumentNullException("name");
7134 }
7135 if (("Id" == name))
7136 {
7137 this.idField = value;
7138 this.idFieldSet = true;
7139 }
7140 if (("Vital" == name))
7141 {
7142 this.vitalField = Enums.ParseYesNoType(value);
7143 this.vitalFieldSet = true;
7144 }
7145 if (("Transaction" == name))
7146 {
7147 this.transactionField = Enums.ParseYesNoType(value);
7148 this.transactionFieldSet = true;
7149 }
7150 }
7151 }
7152
7153 /// <summary>
7154 /// Describes a package group to a bootstrapper.
7155 /// </summary>
7156 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7157 public class PackageGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
7158 {
7159
7160 private ElementCollection children;
7161
7162 private string idField;
7163
7164 private bool idFieldSet;
7165
7166 private ISchemaElement parentElement;
7167
7168 public PackageGroup()
7169 {
7170 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
7171 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPackage)));
7172 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MspPackage)));
7173 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackage)));
7174 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackage)));
7175 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RollbackBoundary)));
7176 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef)));
7177 this.children = childCollection0;
7178 }
7179
7180 public virtual IEnumerable Children
7181 {
7182 get
7183 {
7184 return this.children;
7185 }
7186 }
7187
7188 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
7189 public virtual IEnumerable this[System.Type childType]
7190 {
7191 get
7192 {
7193 return this.children.Filter(childType);
7194 }
7195 }
7196
7197 /// <summary>
7198 /// Identifier for package group.
7199 /// </summary>
7200 public string Id
7201 {
7202 get
7203 {
7204 return this.idField;
7205 }
7206 set
7207 {
7208 this.idFieldSet = true;
7209 this.idField = value;
7210 }
7211 }
7212
7213 public virtual ISchemaElement ParentElement
7214 {
7215 get
7216 {
7217 return this.parentElement;
7218 }
7219 set
7220 {
7221 this.parentElement = value;
7222 }
7223 }
7224
7225 public virtual void AddChild(ISchemaElement child)
7226 {
7227 if ((null == child))
7228 {
7229 throw new ArgumentNullException("child");
7230 }
7231 this.children.AddElement(child);
7232 child.ParentElement = this;
7233 }
7234
7235 public virtual void RemoveChild(ISchemaElement child)
7236 {
7237 if ((null == child))
7238 {
7239 throw new ArgumentNullException("child");
7240 }
7241 this.children.RemoveElement(child);
7242 child.ParentElement = null;
7243 }
7244
7245 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7246 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
7247 ISchemaElement ICreateChildren.CreateChild(string childName)
7248 {
7249 if (String.IsNullOrEmpty(childName))
7250 {
7251 throw new ArgumentNullException("childName");
7252 }
7253 ISchemaElement childValue = null;
7254 if (("MsiPackage" == childName))
7255 {
7256 childValue = new MsiPackage();
7257 }
7258 if (("MspPackage" == childName))
7259 {
7260 childValue = new MspPackage();
7261 }
7262 if (("MsuPackage" == childName))
7263 {
7264 childValue = new MsuPackage();
7265 }
7266 if (("ExePackage" == childName))
7267 {
7268 childValue = new ExePackage();
7269 }
7270 if (("RollbackBoundary" == childName))
7271 {
7272 childValue = new RollbackBoundary();
7273 }
7274 if (("PackageGroupRef" == childName))
7275 {
7276 childValue = new PackageGroupRef();
7277 }
7278 if ((null == childValue))
7279 {
7280 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
7281 }
7282 return childValue;
7283 }
7284
7285 /// <summary>
7286 /// Processes this element and all child elements into an XmlWriter.
7287 /// </summary>
7288 public virtual void OutputXml(XmlWriter writer)
7289 {
7290 if ((null == writer))
7291 {
7292 throw new ArgumentNullException("writer");
7293 }
7294 writer.WriteStartElement("PackageGroup", "http://wixtoolset.org/schemas/v4/wxs");
7295 if (this.idFieldSet)
7296 {
7297 writer.WriteAttributeString("Id", this.idField);
7298 }
7299 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
7300 {
7301 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
7302 childElement.OutputXml(writer);
7303 }
7304 writer.WriteEndElement();
7305 }
7306
7307 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7308 void ISetAttributes.SetAttribute(string name, string value)
7309 {
7310 if (String.IsNullOrEmpty(name))
7311 {
7312 throw new ArgumentNullException("name");
7313 }
7314 if (("Id" == name))
7315 {
7316 this.idField = value;
7317 this.idFieldSet = true;
7318 }
7319 }
7320 }
7321
7322 /// <summary>
7323 /// Create a reference to PackageGroup element that exists inside a Bundle or Fragment element.
7324 /// </summary>
7325 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7326 public class PackageGroupRef : ISchemaElement, ISetAttributes
7327 {
7328
7329 private string idField;
7330
7331 private bool idFieldSet;
7332
7333 private string afterField;
7334
7335 private bool afterFieldSet;
7336
7337 private ISchemaElement parentElement;
7338
7339 /// <summary>
7340 /// The identifier of the PackageGroup element to reference.
7341 /// </summary>
7342 public string Id
7343 {
7344 get
7345 {
7346 return this.idField;
7347 }
7348 set
7349 {
7350 this.idFieldSet = true;
7351 this.idField = value;
7352 }
7353 }
7354
7355 /// <summary>
7356 /// The identifier of a package that this group should be installed after.
7357 /// </summary>
7358 public string After
7359 {
7360 get
7361 {
7362 return this.afterField;
7363 }
7364 set
7365 {
7366 this.afterFieldSet = true;
7367 this.afterField = value;
7368 }
7369 }
7370
7371 public virtual ISchemaElement ParentElement
7372 {
7373 get
7374 {
7375 return this.parentElement;
7376 }
7377 set
7378 {
7379 this.parentElement = value;
7380 }
7381 }
7382
7383 /// <summary>
7384 /// Processes this element and all child elements into an XmlWriter.
7385 /// </summary>
7386 public virtual void OutputXml(XmlWriter writer)
7387 {
7388 if ((null == writer))
7389 {
7390 throw new ArgumentNullException("writer");
7391 }
7392 writer.WriteStartElement("PackageGroupRef", "http://wixtoolset.org/schemas/v4/wxs");
7393 if (this.idFieldSet)
7394 {
7395 writer.WriteAttributeString("Id", this.idField);
7396 }
7397 if (this.afterFieldSet)
7398 {
7399 writer.WriteAttributeString("After", this.afterField);
7400 }
7401 writer.WriteEndElement();
7402 }
7403
7404 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7405 void ISetAttributes.SetAttribute(string name, string value)
7406 {
7407 if (String.IsNullOrEmpty(name))
7408 {
7409 throw new ArgumentNullException("name");
7410 }
7411 if (("Id" == name))
7412 {
7413 this.idField = value;
7414 this.idFieldSet = true;
7415 }
7416 if (("After" == name))
7417 {
7418 this.afterField = value;
7419 this.afterFieldSet = true;
7420 }
7421 }
7422 }
7423
7424 /// <summary>
7425 /// Allows an MSI property to be set based on the value of a burn engine expression.
7426 /// </summary>
7427 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7428 public class MsiProperty : ISchemaElement, ISetAttributes
7429 {
7430
7431 private string nameField;
7432
7433 private bool nameFieldSet;
7434
7435 private string valueField;
7436
7437 private bool valueFieldSet;
7438
7439 private ISchemaElement parentElement;
7440
7441 /// <summary>
7442 /// The name of the MSI property to set. Burn controls the follow MSI properties so they cannot be set with MsiProperty: ACTION, ALLUSERS, REBOOT, REINSTALL, REINSTALLMODE
7443 /// </summary>
7444 public string Name
7445 {
7446 get
7447 {
7448 return this.nameField;
7449 }
7450 set
7451 {
7452 this.nameFieldSet = true;
7453 this.nameField = value;
7454 }
7455 }
7456
7457 /// <summary>
7458 /// The value to set the property to. This string is evaluated by the burn engine and can be as simple as a burn engine variable reference or as complex as a full expression.
7459 /// </summary>
7460 public string Value
7461 {
7462 get
7463 {
7464 return this.valueField;
7465 }
7466 set
7467 {
7468 this.valueFieldSet = true;
7469 this.valueField = value;
7470 }
7471 }
7472
7473 public virtual ISchemaElement ParentElement
7474 {
7475 get
7476 {
7477 return this.parentElement;
7478 }
7479 set
7480 {
7481 this.parentElement = value;
7482 }
7483 }
7484
7485 /// <summary>
7486 /// Processes this element and all child elements into an XmlWriter.
7487 /// </summary>
7488 public virtual void OutputXml(XmlWriter writer)
7489 {
7490 if ((null == writer))
7491 {
7492 throw new ArgumentNullException("writer");
7493 }
7494 writer.WriteStartElement("MsiProperty", "http://wixtoolset.org/schemas/v4/wxs");
7495 if (this.nameFieldSet)
7496 {
7497 writer.WriteAttributeString("Name", this.nameField);
7498 }
7499 if (this.valueFieldSet)
7500 {
7501 writer.WriteAttributeString("Value", this.valueField);
7502 }
7503 writer.WriteEndElement();
7504 }
7505
7506 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7507 void ISetAttributes.SetAttribute(string name, string value)
7508 {
7509 if (String.IsNullOrEmpty(name))
7510 {
7511 throw new ArgumentNullException("name");
7512 }
7513 if (("Name" == name))
7514 {
7515 this.nameField = value;
7516 this.nameFieldSet = true;
7517 }
7518 if (("Value" == name))
7519 {
7520 this.valueField = value;
7521 this.valueFieldSet = true;
7522 }
7523 }
7524 }
7525
7526 /// <summary>
7527 /// Specifies a patch included in the same bundle that is installed when the parent MSI package is installed.
7528 /// </summary>
7529 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7530 public class SlipstreamMsp : ISchemaElement, ISetAttributes
7531 {
7532
7533 private string idField;
7534
7535 private bool idFieldSet;
7536
7537 private ISchemaElement parentElement;
7538
7539 /// <summary>
7540 /// The identifier for a MspPackage in the bundle.
7541 /// </summary>
7542 public string Id
7543 {
7544 get
7545 {
7546 return this.idField;
7547 }
7548 set
7549 {
7550 this.idFieldSet = true;
7551 this.idField = value;
7552 }
7553 }
7554
7555 public virtual ISchemaElement ParentElement
7556 {
7557 get
7558 {
7559 return this.parentElement;
7560 }
7561 set
7562 {
7563 this.parentElement = value;
7564 }
7565 }
7566
7567 /// <summary>
7568 /// Processes this element and all child elements into an XmlWriter.
7569 /// </summary>
7570 public virtual void OutputXml(XmlWriter writer)
7571 {
7572 if ((null == writer))
7573 {
7574 throw new ArgumentNullException("writer");
7575 }
7576 writer.WriteStartElement("SlipstreamMsp", "http://wixtoolset.org/schemas/v4/wxs");
7577 if (this.idFieldSet)
7578 {
7579 writer.WriteAttributeString("Id", this.idField);
7580 }
7581 writer.WriteEndElement();
7582 }
7583
7584 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7585 void ISetAttributes.SetAttribute(string name, string value)
7586 {
7587 if (String.IsNullOrEmpty(name))
7588 {
7589 throw new ArgumentNullException("name");
7590 }
7591 if (("Id" == name))
7592 {
7593 this.idField = value;
7594 this.idFieldSet = true;
7595 }
7596 }
7597 }
7598
7599 /// <summary>
7600 /// Describes a burn engine variable to define.
7601 /// </summary>
7602 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7603 public class Variable : ISchemaElement, ISetAttributes
7604 {
7605
7606 private YesNoType hiddenField;
7607
7608 private bool hiddenFieldSet;
7609
7610 private string nameField;
7611
7612 private bool nameFieldSet;
7613
7614 private YesNoType persistedField;
7615
7616 private bool persistedFieldSet;
7617
7618 private string valueField;
7619
7620 private bool valueFieldSet;
7621
7622 private TypeType typeField;
7623
7624 private bool typeFieldSet;
7625
7626 private ISchemaElement parentElement;
7627
7628 /// <summary>
7629 /// Whether the value of the variable should be hidden.
7630 /// </summary>
7631 public YesNoType Hidden
7632 {
7633 get
7634 {
7635 return this.hiddenField;
7636 }
7637 set
7638 {
7639 this.hiddenFieldSet = true;
7640 this.hiddenField = value;
7641 }
7642 }
7643
7644 /// <summary>
7645 /// The name for the variable.
7646 /// </summary>
7647 public string Name
7648 {
7649 get
7650 {
7651 return this.nameField;
7652 }
7653 set
7654 {
7655 this.nameFieldSet = true;
7656 this.nameField = value;
7657 }
7658 }
7659
7660 /// <summary>
7661 /// Whether the variable should be persisted.
7662 /// </summary>
7663 public YesNoType Persisted
7664 {
7665 get
7666 {
7667 return this.persistedField;
7668 }
7669 set
7670 {
7671 this.persistedFieldSet = true;
7672 this.persistedField = value;
7673 }
7674 }
7675
7676 /// <summary>
7677 /// Starting value for the variable.
7678 /// </summary>
7679 public string Value
7680 {
7681 get
7682 {
7683 return this.valueField;
7684 }
7685 set
7686 {
7687 this.valueFieldSet = true;
7688 this.valueField = value;
7689 }
7690 }
7691
7692 /// <summary>
7693 /// Type of the variable, inferred from the value if not specified.
7694 /// </summary>
7695 public TypeType Type
7696 {
7697 get
7698 {
7699 return this.typeField;
7700 }
7701 set
7702 {
7703 this.typeFieldSet = true;
7704 this.typeField = value;
7705 }
7706 }
7707
7708 public virtual ISchemaElement ParentElement
7709 {
7710 get
7711 {
7712 return this.parentElement;
7713 }
7714 set
7715 {
7716 this.parentElement = value;
7717 }
7718 }
7719
7720 /// <summary>
7721 /// Parses a TypeType from a string.
7722 /// </summary>
7723 public static TypeType ParseTypeType(string value)
7724 {
7725 TypeType parsedValue;
7726 Variable.TryParseTypeType(value, out parsedValue);
7727 return parsedValue;
7728 }
7729
7730 /// <summary>
7731 /// Tries to parse a TypeType from a string.
7732 /// </summary>
7733 public static bool TryParseTypeType(string value, out TypeType parsedValue)
7734 {
7735 parsedValue = TypeType.NotSet;
7736 if (string.IsNullOrEmpty(value))
7737 {
7738 return false;
7739 }
7740 if (("string" == value))
7741 {
7742 parsedValue = TypeType.@string;
7743 }
7744 else
7745 {
7746 if (("numeric" == value))
7747 {
7748 parsedValue = TypeType.numeric;
7749 }
7750 else
7751 {
7752 if (("version" == value))
7753 {
7754 parsedValue = TypeType.version;
7755 }
7756 else
7757 {
7758 parsedValue = TypeType.IllegalValue;
7759 return false;
7760 }
7761 }
7762 }
7763 return true;
7764 }
7765
7766 /// <summary>
7767 /// Processes this element and all child elements into an XmlWriter.
7768 /// </summary>
7769 public virtual void OutputXml(XmlWriter writer)
7770 {
7771 if ((null == writer))
7772 {
7773 throw new ArgumentNullException("writer");
7774 }
7775 writer.WriteStartElement("Variable", "http://wixtoolset.org/schemas/v4/wxs");
7776 if (this.hiddenFieldSet)
7777 {
7778 if ((this.hiddenField == YesNoType.no))
7779 {
7780 writer.WriteAttributeString("Hidden", "no");
7781 }
7782 if ((this.hiddenField == YesNoType.yes))
7783 {
7784 writer.WriteAttributeString("Hidden", "yes");
7785 }
7786 }
7787 if (this.nameFieldSet)
7788 {
7789 writer.WriteAttributeString("Name", this.nameField);
7790 }
7791 if (this.persistedFieldSet)
7792 {
7793 if ((this.persistedField == YesNoType.no))
7794 {
7795 writer.WriteAttributeString("Persisted", "no");
7796 }
7797 if ((this.persistedField == YesNoType.yes))
7798 {
7799 writer.WriteAttributeString("Persisted", "yes");
7800 }
7801 }
7802 if (this.valueFieldSet)
7803 {
7804 writer.WriteAttributeString("Value", this.valueField);
7805 }
7806 if (this.typeFieldSet)
7807 {
7808 if ((this.typeField == TypeType.@string))
7809 {
7810 writer.WriteAttributeString("Type", "string");
7811 }
7812 if ((this.typeField == TypeType.numeric))
7813 {
7814 writer.WriteAttributeString("Type", "numeric");
7815 }
7816 if ((this.typeField == TypeType.version))
7817 {
7818 writer.WriteAttributeString("Type", "version");
7819 }
7820 }
7821 writer.WriteEndElement();
7822 }
7823
7824 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7825 void ISetAttributes.SetAttribute(string name, string value)
7826 {
7827 if (String.IsNullOrEmpty(name))
7828 {
7829 throw new ArgumentNullException("name");
7830 }
7831 if (("Hidden" == name))
7832 {
7833 this.hiddenField = Enums.ParseYesNoType(value);
7834 this.hiddenFieldSet = true;
7835 }
7836 if (("Name" == name))
7837 {
7838 this.nameField = value;
7839 this.nameFieldSet = true;
7840 }
7841 if (("Persisted" == name))
7842 {
7843 this.persistedField = Enums.ParseYesNoType(value);
7844 this.persistedFieldSet = true;
7845 }
7846 if (("Value" == name))
7847 {
7848 this.valueField = value;
7849 this.valueFieldSet = true;
7850 }
7851 if (("Type" == name))
7852 {
7853 this.typeField = Variable.ParseTypeType(value);
7854 this.typeFieldSet = true;
7855 }
7856 }
7857
7858 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7859 public enum TypeType
7860 {
7861
7862 IllegalValue = int.MaxValue,
7863
7864 NotSet = -1,
7865
7866 @string,
7867
7868 numeric,
7869
7870 version,
7871 }
7872 }
7873
7874 /// <summary>
7875 /// Representation of a file that contains one or more files.
7876 /// </summary>
7877 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7878 public class Container : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
7879 {
7880
7881 private ElementCollection children;
7882
7883 private string downloadUrlField;
7884
7885 private bool downloadUrlFieldSet;
7886
7887 private string idField;
7888
7889 private bool idFieldSet;
7890
7891 private string nameField;
7892
7893 private bool nameFieldSet;
7894
7895 private BurnContainerType typeField;
7896
7897 private bool typeFieldSet;
7898
7899 private ISchemaElement parentElement;
7900
7901 public Container()
7902 {
7903 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
7904 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef)));
7905 this.children = childCollection0;
7906 }
7907
7908 public virtual IEnumerable Children
7909 {
7910 get
7911 {
7912 return this.children;
7913 }
7914 }
7915
7916 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
7917 public virtual IEnumerable this[System.Type childType]
7918 {
7919 get
7920 {
7921 return this.children.Filter(childType);
7922 }
7923 }
7924
7925 public string DownloadUrl
7926 {
7927 get
7928 {
7929 return this.downloadUrlField;
7930 }
7931 set
7932 {
7933 this.downloadUrlFieldSet = true;
7934 this.downloadUrlField = value;
7935 }
7936 }
7937
7938 /// <summary>
7939 /// The unique identifier for the container. If this attribute is not specified the Name attribute will be used.
7940 /// </summary>
7941 public string Id
7942 {
7943 get
7944 {
7945 return this.idField;
7946 }
7947 set
7948 {
7949 this.idFieldSet = true;
7950 this.idField = value;
7951 }
7952 }
7953
7954 /// <summary>
7955 /// The file name for this container. A relative path may be provided to place the container in a sub-folder of the bundle.
7956 /// </summary>
7957 public string Name
7958 {
7959 get
7960 {
7961 return this.nameField;
7962 }
7963 set
7964 {
7965 this.nameFieldSet = true;
7966 this.nameField = value;
7967 }
7968 }
7969
7970 /// <summary>
7971 /// Indicates whether the container is "attached" to the bundle executable or placed external to the bundle extecutable as "detached". If
7972 /// this attribute is not specified, the default is to create a detached container.
7973 /// </summary>
7974 public BurnContainerType Type
7975 {
7976 get
7977 {
7978 return this.typeField;
7979 }
7980 set
7981 {
7982 this.typeFieldSet = true;
7983 this.typeField = value;
7984 }
7985 }
7986
7987 public virtual ISchemaElement ParentElement
7988 {
7989 get
7990 {
7991 return this.parentElement;
7992 }
7993 set
7994 {
7995 this.parentElement = value;
7996 }
7997 }
7998
7999 public virtual void AddChild(ISchemaElement child)
8000 {
8001 if ((null == child))
8002 {
8003 throw new ArgumentNullException("child");
8004 }
8005 this.children.AddElement(child);
8006 child.ParentElement = this;
8007 }
8008
8009 public virtual void RemoveChild(ISchemaElement child)
8010 {
8011 if ((null == child))
8012 {
8013 throw new ArgumentNullException("child");
8014 }
8015 this.children.RemoveElement(child);
8016 child.ParentElement = null;
8017 }
8018
8019 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8020 ISchemaElement ICreateChildren.CreateChild(string childName)
8021 {
8022 if (String.IsNullOrEmpty(childName))
8023 {
8024 throw new ArgumentNullException("childName");
8025 }
8026 ISchemaElement childValue = null;
8027 if (("PackageGroupRef" == childName))
8028 {
8029 childValue = new PackageGroupRef();
8030 }
8031 if ((null == childValue))
8032 {
8033 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
8034 }
8035 return childValue;
8036 }
8037
8038 /// <summary>
8039 /// Processes this element and all child elements into an XmlWriter.
8040 /// </summary>
8041 public virtual void OutputXml(XmlWriter writer)
8042 {
8043 if ((null == writer))
8044 {
8045 throw new ArgumentNullException("writer");
8046 }
8047 writer.WriteStartElement("Container", "http://wixtoolset.org/schemas/v4/wxs");
8048 if (this.downloadUrlFieldSet)
8049 {
8050 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
8051 }
8052 if (this.idFieldSet)
8053 {
8054 writer.WriteAttributeString("Id", this.idField);
8055 }
8056 if (this.nameFieldSet)
8057 {
8058 writer.WriteAttributeString("Name", this.nameField);
8059 }
8060 if (this.typeFieldSet)
8061 {
8062 if ((this.typeField == BurnContainerType.attached))
8063 {
8064 writer.WriteAttributeString("Type", "attached");
8065 }
8066 if ((this.typeField == BurnContainerType.detached))
8067 {
8068 writer.WriteAttributeString("Type", "detached");
8069 }
8070 }
8071 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
8072 {
8073 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
8074 childElement.OutputXml(writer);
8075 }
8076 writer.WriteEndElement();
8077 }
8078
8079 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8080 void ISetAttributes.SetAttribute(string name, string value)
8081 {
8082 if (String.IsNullOrEmpty(name))
8083 {
8084 throw new ArgumentNullException("name");
8085 }
8086 if (("DownloadUrl" == name))
8087 {
8088 this.downloadUrlField = value;
8089 this.downloadUrlFieldSet = true;
8090 }
8091 if (("Id" == name))
8092 {
8093 this.idField = value;
8094 this.idFieldSet = true;
8095 }
8096 if (("Name" == name))
8097 {
8098 this.nameField = value;
8099 this.nameFieldSet = true;
8100 }
8101 if (("Type" == name))
8102 {
8103 this.typeField = Enums.ParseBurnContainerType(value);
8104 this.typeFieldSet = true;
8105 }
8106 }
8107 }
8108
8109 /// <summary>
8110 /// Create a reference to an existing Container element.
8111 /// </summary>
8112 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8113 public class ContainerRef : ISchemaElement, ISetAttributes
8114 {
8115
8116 private string idField;
8117
8118 private bool idFieldSet;
8119
8120 private ISchemaElement parentElement;
8121
8122 /// <summary>
8123 /// The identifier of Container element to reference.
8124 /// </summary>
8125 public string Id
8126 {
8127 get
8128 {
8129 return this.idField;
8130 }
8131 set
8132 {
8133 this.idFieldSet = true;
8134 this.idField = value;
8135 }
8136 }
8137
8138 public virtual ISchemaElement ParentElement
8139 {
8140 get
8141 {
8142 return this.parentElement;
8143 }
8144 set
8145 {
8146 this.parentElement = value;
8147 }
8148 }
8149
8150 /// <summary>
8151 /// Processes this element and all child elements into an XmlWriter.
8152 /// </summary>
8153 public virtual void OutputXml(XmlWriter writer)
8154 {
8155 if ((null == writer))
8156 {
8157 throw new ArgumentNullException("writer");
8158 }
8159 writer.WriteStartElement("ContainerRef", "http://wixtoolset.org/schemas/v4/wxs");
8160 if (this.idFieldSet)
8161 {
8162 writer.WriteAttributeString("Id", this.idField);
8163 }
8164 writer.WriteEndElement();
8165 }
8166
8167 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8168 void ISetAttributes.SetAttribute(string name, string value)
8169 {
8170 if (String.IsNullOrEmpty(name))
8171 {
8172 throw new ArgumentNullException("name");
8173 }
8174 if (("Id" == name))
8175 {
8176 this.idField = value;
8177 this.idFieldSet = true;
8178 }
8179 }
8180 }
8181
8182 /// <summary>
8183 /// Describes map of exit code returned from executable package to a bootstrapper behavior.
8184 /// </summary>
8185 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8186 public class ExitCode : ISchemaElement, ISetAttributes
8187 {
8188
8189 private int valueField;
8190
8191 private bool valueFieldSet;
8192
8193 private BehaviorType behaviorField;
8194
8195 private bool behaviorFieldSet;
8196
8197 private ISchemaElement parentElement;
8198
8199 /// <summary>
8200 /// Exit code returned from executable package. If no value is provided it means all values not explicitly set default to this behavior.
8201 /// </summary>
8202 public int Value
8203 {
8204 get
8205 {
8206 return this.valueField;
8207 }
8208 set
8209 {
8210 this.valueFieldSet = true;
8211 this.valueField = value;
8212 }
8213 }
8214
8215 /// <summary>
8216 /// Choose one of the supported behaviors error codes: success, error, scheduleReboot, forceReboot.
8217 /// </summary>
8218 public BehaviorType Behavior
8219 {
8220 get
8221 {
8222 return this.behaviorField;
8223 }
8224 set
8225 {
8226 this.behaviorFieldSet = true;
8227 this.behaviorField = value;
8228 }
8229 }
8230
8231 public virtual ISchemaElement ParentElement
8232 {
8233 get
8234 {
8235 return this.parentElement;
8236 }
8237 set
8238 {
8239 this.parentElement = value;
8240 }
8241 }
8242
8243 /// <summary>
8244 /// Parses a BehaviorType from a string.
8245 /// </summary>
8246 public static BehaviorType ParseBehaviorType(string value)
8247 {
8248 BehaviorType parsedValue;
8249 ExitCode.TryParseBehaviorType(value, out parsedValue);
8250 return parsedValue;
8251 }
8252
8253 /// <summary>
8254 /// Tries to parse a BehaviorType from a string.
8255 /// </summary>
8256 public static bool TryParseBehaviorType(string value, out BehaviorType parsedValue)
8257 {
8258 parsedValue = BehaviorType.NotSet;
8259 if (string.IsNullOrEmpty(value))
8260 {
8261 return false;
8262 }
8263 if (("success" == value))
8264 {
8265 parsedValue = BehaviorType.success;
8266 }
8267 else
8268 {
8269 if (("error" == value))
8270 {
8271 parsedValue = BehaviorType.error;
8272 }
8273 else
8274 {
8275 if (("scheduleReboot" == value))
8276 {
8277 parsedValue = BehaviorType.scheduleReboot;
8278 }
8279 else
8280 {
8281 if (("forceReboot" == value))
8282 {
8283 parsedValue = BehaviorType.forceReboot;
8284 }
8285 else
8286 {
8287 parsedValue = BehaviorType.IllegalValue;
8288 return false;
8289 }
8290 }
8291 }
8292 }
8293 return true;
8294 }
8295
8296 /// <summary>
8297 /// Processes this element and all child elements into an XmlWriter.
8298 /// </summary>
8299 public virtual void OutputXml(XmlWriter writer)
8300 {
8301 if ((null == writer))
8302 {
8303 throw new ArgumentNullException("writer");
8304 }
8305 writer.WriteStartElement("ExitCode", "http://wixtoolset.org/schemas/v4/wxs");
8306 if (this.valueFieldSet)
8307 {
8308 writer.WriteAttributeString("Value", this.valueField.ToString(CultureInfo.InvariantCulture));
8309 }
8310 if (this.behaviorFieldSet)
8311 {
8312 if ((this.behaviorField == BehaviorType.success))
8313 {
8314 writer.WriteAttributeString("Behavior", "success");
8315 }
8316 if ((this.behaviorField == BehaviorType.error))
8317 {
8318 writer.WriteAttributeString("Behavior", "error");
8319 }
8320 if ((this.behaviorField == BehaviorType.scheduleReboot))
8321 {
8322 writer.WriteAttributeString("Behavior", "scheduleReboot");
8323 }
8324 if ((this.behaviorField == BehaviorType.forceReboot))
8325 {
8326 writer.WriteAttributeString("Behavior", "forceReboot");
8327 }
8328 }
8329 writer.WriteEndElement();
8330 }
8331
8332 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8333 void ISetAttributes.SetAttribute(string name, string value)
8334 {
8335 if (String.IsNullOrEmpty(name))
8336 {
8337 throw new ArgumentNullException("name");
8338 }
8339 if (("Value" == name))
8340 {
8341 this.valueField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
8342 this.valueFieldSet = true;
8343 }
8344 if (("Behavior" == name))
8345 {
8346 this.behaviorField = ExitCode.ParseBehaviorType(value);
8347 this.behaviorFieldSet = true;
8348 }
8349 }
8350
8351 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8352 public enum BehaviorType
8353 {
8354
8355 IllegalValue = int.MaxValue,
8356
8357 NotSet = -1,
8358
8359 success,
8360
8361 error,
8362
8363 scheduleReboot,
8364
8365 forceReboot,
8366 }
8367 }
8368
8369 /// <summary>
8370 /// Describes additional, conditional command-line arguments for an ExePackage.
8371 /// </summary>
8372 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8373 public class CommandLine : ISchemaElement, ISetAttributes
8374 {
8375
8376 private string installArgumentField;
8377
8378 private bool installArgumentFieldSet;
8379
8380 private string uninstallArgumentField;
8381
8382 private bool uninstallArgumentFieldSet;
8383
8384 private string repairArgumentField;
8385
8386 private bool repairArgumentFieldSet;
8387
8388 private string conditionField;
8389
8390 private bool conditionFieldSet;
8391
8392 private ISchemaElement parentElement;
8393
8394 /// <summary>
8395 /// Additional command-line arguments to apply during package installation if Condition is true.
8396 /// </summary>
8397 public string InstallArgument
8398 {
8399 get
8400 {
8401 return this.installArgumentField;
8402 }
8403 set
8404 {
8405 this.installArgumentFieldSet = true;
8406 this.installArgumentField = value;
8407 }
8408 }
8409
8410 /// <summary>
8411 /// Additional command-line arguments to apply during package uninstallation if Condition is true.
8412 /// </summary>
8413 public string UninstallArgument
8414 {
8415 get
8416 {
8417 return this.uninstallArgumentField;
8418 }
8419 set
8420 {
8421 this.uninstallArgumentFieldSet = true;
8422 this.uninstallArgumentField = value;
8423 }
8424 }
8425
8426 /// <summary>
8427 /// Additional command-line arguments to apply during package repair if Condition is true.
8428 /// </summary>
8429 public string RepairArgument
8430 {
8431 get
8432 {
8433 return this.repairArgumentField;
8434 }
8435 set
8436 {
8437 this.repairArgumentFieldSet = true;
8438 this.repairArgumentField = value;
8439 }
8440 }
8441
8442 /// <summary>
8443 /// The condition that controls whether the command-line arguments specified in the
8444 /// InstallArgument, UninstallArgument, or RepairArgument attributes are appended to the
8445 /// command line passed to the ExePackage. Which attribute is used depends on the
8446 /// action being applied to the ExePackage. For example, when the ExePackage is
8447 /// being installed, the InstallArgument attribute value is appended to the command
8448 /// line when the ExePackage is executed.
8449 /// </summary>
8450 public string Condition
8451 {
8452 get
8453 {
8454 return this.conditionField;
8455 }
8456 set
8457 {
8458 this.conditionFieldSet = true;
8459 this.conditionField = value;
8460 }
8461 }
8462
8463 public virtual ISchemaElement ParentElement
8464 {
8465 get
8466 {
8467 return this.parentElement;
8468 }
8469 set
8470 {
8471 this.parentElement = value;
8472 }
8473 }
8474
8475 /// <summary>
8476 /// Processes this element and all child elements into an XmlWriter.
8477 /// </summary>
8478 public virtual void OutputXml(XmlWriter writer)
8479 {
8480 if ((null == writer))
8481 {
8482 throw new ArgumentNullException("writer");
8483 }
8484 writer.WriteStartElement("CommandLine", "http://wixtoolset.org/schemas/v4/wxs");
8485 if (this.installArgumentFieldSet)
8486 {
8487 writer.WriteAttributeString("InstallArgument", this.installArgumentField);
8488 }
8489 if (this.uninstallArgumentFieldSet)
8490 {
8491 writer.WriteAttributeString("UninstallArgument", this.uninstallArgumentField);
8492 }
8493 if (this.repairArgumentFieldSet)
8494 {
8495 writer.WriteAttributeString("RepairArgument", this.repairArgumentField);
8496 }
8497 if (this.conditionFieldSet)
8498 {
8499 writer.WriteAttributeString("Condition", this.conditionField);
8500 }
8501 writer.WriteEndElement();
8502 }
8503
8504 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8505 void ISetAttributes.SetAttribute(string name, string value)
8506 {
8507 if (String.IsNullOrEmpty(name))
8508 {
8509 throw new ArgumentNullException("name");
8510 }
8511 if (("InstallArgument" == name))
8512 {
8513 this.installArgumentField = value;
8514 this.installArgumentFieldSet = true;
8515 }
8516 if (("UninstallArgument" == name))
8517 {
8518 this.uninstallArgumentField = value;
8519 this.uninstallArgumentFieldSet = true;
8520 }
8521 if (("RepairArgument" == name))
8522 {
8523 this.repairArgumentField = value;
8524 this.repairArgumentFieldSet = true;
8525 }
8526 if (("Condition" == name))
8527 {
8528 this.conditionField = value;
8529 this.conditionFieldSet = true;
8530 }
8531 }
8532 }
8533
8534 /// <summary>
8535 /// Describes a payload to a bootstrapper.
8536 /// </summary>
8537 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8538 public class Payload : ISchemaElement, ISetAttributes
8539 {
8540
8541 private string idField;
8542
8543 private bool idFieldSet;
8544
8545 private YesNoDefaultType compressedField;
8546
8547 private bool compressedFieldSet;
8548
8549 private string sourceFileField;
8550
8551 private bool sourceFileFieldSet;
8552
8553 private string nameField;
8554
8555 private bool nameFieldSet;
8556
8557 private string downloadUrlField;
8558
8559 private bool downloadUrlFieldSet;
8560
8561 private YesNoType enableSignatureVerificationField;
8562
8563 private bool enableSignatureVerificationFieldSet;
8564
8565 private ISchemaElement parentElement;
8566
8567 /// <summary>
8568 /// The identifier of Payload element.
8569 /// </summary>
8570 public string Id
8571 {
8572 get
8573 {
8574 return this.idField;
8575 }
8576 set
8577 {
8578 this.idFieldSet = true;
8579 this.idField = value;
8580 }
8581 }
8582
8583 /// <summary>
8584 /// Whether the payload should be embedded in a container or left as an external payload.
8585 /// </summary>
8586 public YesNoDefaultType Compressed
8587 {
8588 get
8589 {
8590 return this.compressedField;
8591 }
8592 set
8593 {
8594 this.compressedFieldSet = true;
8595 this.compressedField = value;
8596 }
8597 }
8598
8599 /// <summary>
8600 /// Location of the source file.
8601 /// </summary>
8602 public string SourceFile
8603 {
8604 get
8605 {
8606 return this.sourceFileField;
8607 }
8608 set
8609 {
8610 this.sourceFileFieldSet = true;
8611 this.sourceFileField = value;
8612 }
8613 }
8614
8615 /// <summary>
8616 /// The destination path and file name for this payload. The default is the source file name. The use of '..' directories is not allowed.
8617 /// </summary>
8618 public string Name
8619 {
8620 get
8621 {
8622 return this.nameField;
8623 }
8624 set
8625 {
8626 this.nameFieldSet = true;
8627 this.nameField = value;
8628 }
8629 }
8630
8631 public string DownloadUrl
8632 {
8633 get
8634 {
8635 return this.downloadUrlField;
8636 }
8637 set
8638 {
8639 this.downloadUrlFieldSet = true;
8640 this.downloadUrlField = value;
8641 }
8642 }
8643
8644 /// <summary>
8645 /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
8646 /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
8647 /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
8648 /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
8649 /// </summary>
8650 public YesNoType EnableSignatureVerification
8651 {
8652 get
8653 {
8654 return this.enableSignatureVerificationField;
8655 }
8656 set
8657 {
8658 this.enableSignatureVerificationFieldSet = true;
8659 this.enableSignatureVerificationField = value;
8660 }
8661 }
8662
8663 public virtual ISchemaElement ParentElement
8664 {
8665 get
8666 {
8667 return this.parentElement;
8668 }
8669 set
8670 {
8671 this.parentElement = value;
8672 }
8673 }
8674
8675 /// <summary>
8676 /// Processes this element and all child elements into an XmlWriter.
8677 /// </summary>
8678 public virtual void OutputXml(XmlWriter writer)
8679 {
8680 if ((null == writer))
8681 {
8682 throw new ArgumentNullException("writer");
8683 }
8684 writer.WriteStartElement("Payload", "http://wixtoolset.org/schemas/v4/wxs");
8685 if (this.idFieldSet)
8686 {
8687 writer.WriteAttributeString("Id", this.idField);
8688 }
8689 if (this.compressedFieldSet)
8690 {
8691 if ((this.compressedField == YesNoDefaultType.@default))
8692 {
8693 writer.WriteAttributeString("Compressed", "default");
8694 }
8695 if ((this.compressedField == YesNoDefaultType.no))
8696 {
8697 writer.WriteAttributeString("Compressed", "no");
8698 }
8699 if ((this.compressedField == YesNoDefaultType.yes))
8700 {
8701 writer.WriteAttributeString("Compressed", "yes");
8702 }
8703 }
8704 if (this.sourceFileFieldSet)
8705 {
8706 writer.WriteAttributeString("SourceFile", this.sourceFileField);
8707 }
8708 if (this.nameFieldSet)
8709 {
8710 writer.WriteAttributeString("Name", this.nameField);
8711 }
8712 if (this.downloadUrlFieldSet)
8713 {
8714 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
8715 }
8716 if (this.enableSignatureVerificationFieldSet)
8717 {
8718 if ((this.enableSignatureVerificationField == YesNoType.no))
8719 {
8720 writer.WriteAttributeString("EnableSignatureVerification", "no");
8721 }
8722 if ((this.enableSignatureVerificationField == YesNoType.yes))
8723 {
8724 writer.WriteAttributeString("EnableSignatureVerification", "yes");
8725 }
8726 }
8727 writer.WriteEndElement();
8728 }
8729
8730 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8731 void ISetAttributes.SetAttribute(string name, string value)
8732 {
8733 if (String.IsNullOrEmpty(name))
8734 {
8735 throw new ArgumentNullException("name");
8736 }
8737 if (("Id" == name))
8738 {
8739 this.idField = value;
8740 this.idFieldSet = true;
8741 }
8742 if (("Compressed" == name))
8743 {
8744 this.compressedField = Enums.ParseYesNoDefaultType(value);
8745 this.compressedFieldSet = true;
8746 }
8747 if (("SourceFile" == name))
8748 {
8749 this.sourceFileField = value;
8750 this.sourceFileFieldSet = true;
8751 }
8752 if (("Name" == name))
8753 {
8754 this.nameField = value;
8755 this.nameFieldSet = true;
8756 }
8757 if (("DownloadUrl" == name))
8758 {
8759 this.downloadUrlField = value;
8760 this.downloadUrlFieldSet = true;
8761 }
8762 if (("EnableSignatureVerification" == name))
8763 {
8764 this.enableSignatureVerificationField = Enums.ParseYesNoType(value);
8765 this.enableSignatureVerificationFieldSet = true;
8766 }
8767 }
8768 }
8769
8770 /// <summary>
8771 /// Describes a payload group to a bootstrapper. PayloadGroups referenced from within a Bundle are tied to the Bundle.
8772 /// PayloadGroups referenced from a Fragment are tied to the context of whatever references them such as an ExePackage or MsiPackage.
8773 /// It is possible to share a PayloadGroup between multiple Packages and/or a Bundle by creating multiple references to it.
8774 /// </summary>
8775 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8776 public class PayloadGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
8777 {
8778
8779 private ElementCollection children;
8780
8781 private string idField;
8782
8783 private bool idFieldSet;
8784
8785 private ISchemaElement parentElement;
8786
8787 public PayloadGroup()
8788 {
8789 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
8790 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
8791 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
8792 this.children = childCollection0;
8793 }
8794
8795 public virtual IEnumerable Children
8796 {
8797 get
8798 {
8799 return this.children;
8800 }
8801 }
8802
8803 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
8804 public virtual IEnumerable this[System.Type childType]
8805 {
8806 get
8807 {
8808 return this.children.Filter(childType);
8809 }
8810 }
8811
8812 /// <summary>
8813 /// Identifier for payload group.
8814 /// </summary>
8815 public string Id
8816 {
8817 get
8818 {
8819 return this.idField;
8820 }
8821 set
8822 {
8823 this.idFieldSet = true;
8824 this.idField = value;
8825 }
8826 }
8827
8828 public virtual ISchemaElement ParentElement
8829 {
8830 get
8831 {
8832 return this.parentElement;
8833 }
8834 set
8835 {
8836 this.parentElement = value;
8837 }
8838 }
8839
8840 public virtual void AddChild(ISchemaElement child)
8841 {
8842 if ((null == child))
8843 {
8844 throw new ArgumentNullException("child");
8845 }
8846 this.children.AddElement(child);
8847 child.ParentElement = this;
8848 }
8849
8850 public virtual void RemoveChild(ISchemaElement child)
8851 {
8852 if ((null == child))
8853 {
8854 throw new ArgumentNullException("child");
8855 }
8856 this.children.RemoveElement(child);
8857 child.ParentElement = null;
8858 }
8859
8860 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8861 ISchemaElement ICreateChildren.CreateChild(string childName)
8862 {
8863 if (String.IsNullOrEmpty(childName))
8864 {
8865 throw new ArgumentNullException("childName");
8866 }
8867 ISchemaElement childValue = null;
8868 if (("Payload" == childName))
8869 {
8870 childValue = new Payload();
8871 }
8872 if (("PayloadGroupRef" == childName))
8873 {
8874 childValue = new PayloadGroupRef();
8875 }
8876 if ((null == childValue))
8877 {
8878 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
8879 }
8880 return childValue;
8881 }
8882
8883 /// <summary>
8884 /// Processes this element and all child elements into an XmlWriter.
8885 /// </summary>
8886 public virtual void OutputXml(XmlWriter writer)
8887 {
8888 if ((null == writer))
8889 {
8890 throw new ArgumentNullException("writer");
8891 }
8892 writer.WriteStartElement("PayloadGroup", "http://wixtoolset.org/schemas/v4/wxs");
8893 if (this.idFieldSet)
8894 {
8895 writer.WriteAttributeString("Id", this.idField);
8896 }
8897 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
8898 {
8899 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
8900 childElement.OutputXml(writer);
8901 }
8902 writer.WriteEndElement();
8903 }
8904
8905 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8906 void ISetAttributes.SetAttribute(string name, string value)
8907 {
8908 if (String.IsNullOrEmpty(name))
8909 {
8910 throw new ArgumentNullException("name");
8911 }
8912 if (("Id" == name))
8913 {
8914 this.idField = value;
8915 this.idFieldSet = true;
8916 }
8917 }
8918 }
8919
8920 /// <summary>
8921 /// Create a reference to PayloadGroup element that exists inside a Bundle or Fragment element.
8922 /// </summary>
8923 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8924 public class PayloadGroupRef : ISchemaElement, ISetAttributes
8925 {
8926
8927 private string idField;
8928
8929 private bool idFieldSet;
8930
8931 private ISchemaElement parentElement;
8932
8933 /// <summary>
8934 /// The identifier of the PayloadGroup element to reference.
8935 /// </summary>
8936 public string Id
8937 {
8938 get
8939 {
8940 return this.idField;
8941 }
8942 set
8943 {
8944 this.idFieldSet = true;
8945 this.idField = value;
8946 }
8947 }
8948
8949 public virtual ISchemaElement ParentElement
8950 {
8951 get
8952 {
8953 return this.parentElement;
8954 }
8955 set
8956 {
8957 this.parentElement = value;
8958 }
8959 }
8960
8961 /// <summary>
8962 /// Processes this element and all child elements into an XmlWriter.
8963 /// </summary>
8964 public virtual void OutputXml(XmlWriter writer)
8965 {
8966 if ((null == writer))
8967 {
8968 throw new ArgumentNullException("writer");
8969 }
8970 writer.WriteStartElement("PayloadGroupRef", "http://wixtoolset.org/schemas/v4/wxs");
8971 if (this.idFieldSet)
8972 {
8973 writer.WriteAttributeString("Id", this.idField);
8974 }
8975 writer.WriteEndElement();
8976 }
8977
8978 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8979 void ISetAttributes.SetAttribute(string name, string value)
8980 {
8981 if (String.IsNullOrEmpty(name))
8982 {
8983 throw new ArgumentNullException("name");
8984 }
8985 if (("Id" == name))
8986 {
8987 this.idField = value;
8988 this.idFieldSet = true;
8989 }
8990 }
8991 }
8992
8993 public class ExePackagePayload : RemotePayload
8994 {
8995 public ExePackagePayload() : base("ExePackagePayload") { }
8996 }
8997
8998 public class MsuPackagePayload : RemotePayload
8999 {
9000 public MsuPackagePayload() : base("MsuPackagePayload") { }
9001 }
9002
9003 /// <summary>
9004 /// Describes information about a remote file payload that is not available at the time of building the bundle.
9005 /// The parent must specify DownloadUrl and must not specify SourceFile when using this element.
9006 /// </summary>
9007 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9008 public abstract class RemotePayload : ISchemaElement, ISetAttributes
9009 {
9010 private string elementName;
9011
9012 public RemotePayload(string elementName)
9013 {
9014 this.elementName = elementName;
9015 }
9016
9017 private string descriptionField;
9018
9019 private bool descriptionFieldSet;
9020
9021 private string hashField;
9022
9023 private bool hashFieldSet;
9024
9025 private string productNameField;
9026
9027 private bool productNameFieldSet;
9028
9029 private long sizeField;
9030
9031 private bool sizeFieldSet;
9032
9033 private string versionField;
9034
9035 private bool versionFieldSet;
9036
9037 private ISchemaElement parentElement;
9038
9039 /// <summary>
9040 /// Description of the file from version resources.
9041 /// </summary>
9042 public string Description
9043 {
9044 get
9045 {
9046 return this.descriptionField;
9047 }
9048 set
9049 {
9050 this.descriptionFieldSet = true;
9051 this.descriptionField = value;
9052 }
9053 }
9054
9055 /// <summary>
9056 /// SHA-1 hash of the RemotePayload. Include this attribute if the remote file is unsigned or SuppressSignatureVerification is set to Yes.
9057 /// </summary>
9058 public string Hash
9059 {
9060 get
9061 {
9062 return this.hashField;
9063 }
9064 set
9065 {
9066 this.hashFieldSet = true;
9067 this.hashField = value;
9068 }
9069 }
9070
9071 /// <summary>
9072 /// Product name of the file from version resouces.
9073 /// </summary>
9074 public string ProductName
9075 {
9076 get
9077 {
9078 return this.productNameField;
9079 }
9080 set
9081 {
9082 this.productNameFieldSet = true;
9083 this.productNameField = value;
9084 }
9085 }
9086
9087 /// <summary>
9088 /// Size of the remote file in bytes.
9089 /// </summary>
9090 public long Size
9091 {
9092 get
9093 {
9094 return this.sizeField;
9095 }
9096 set
9097 {
9098 this.sizeFieldSet = true;
9099 this.sizeField = value;
9100 }
9101 }
9102
9103 /// <summary>
9104 /// Version of the remote file
9105 /// </summary>
9106 public string Version
9107 {
9108 get
9109 {
9110 return this.versionField;
9111 }
9112 set
9113 {
9114 this.versionFieldSet = true;
9115 this.versionField = value;
9116 }
9117 }
9118
9119 public virtual ISchemaElement ParentElement
9120 {
9121 get
9122 {
9123 return this.parentElement;
9124 }
9125 set
9126 {
9127 this.parentElement = value;
9128 }
9129 }
9130
9131 /// <summary>
9132 /// Processes this element and all child elements into an XmlWriter.
9133 /// </summary>
9134 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
9135 public virtual void OutputXml(XmlWriter writer)
9136 {
9137 if ((null == writer))
9138 {
9139 throw new ArgumentNullException("writer");
9140 }
9141 writer.WriteStartElement(this.elementName, "http://wixtoolset.org/schemas/v4/wxs");
9142 if (this.descriptionFieldSet)
9143 {
9144 writer.WriteAttributeString("Description", this.descriptionField);
9145 }
9146 if (this.hashFieldSet)
9147 {
9148 writer.WriteAttributeString("Hash", this.hashField);
9149 }
9150 if (this.productNameFieldSet)
9151 {
9152 writer.WriteAttributeString("ProductName", this.productNameField);
9153 }
9154 if (this.sizeFieldSet)
9155 {
9156 writer.WriteAttributeString("Size", this.sizeField.ToString(CultureInfo.InvariantCulture));
9157 }
9158 if (this.versionFieldSet)
9159 {
9160 writer.WriteAttributeString("Version", this.versionField);
9161 }
9162 writer.WriteEndElement();
9163 }
9164
9165 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9166 void ISetAttributes.SetAttribute(string name, string value)
9167 {
9168 if (String.IsNullOrEmpty(name))
9169 {
9170 throw new ArgumentNullException("name");
9171 }
9172 if (("Description" == name))
9173 {
9174 this.descriptionField = value;
9175 this.descriptionFieldSet = true;
9176 }
9177 if (("Hash" == name))
9178 {
9179 this.hashField = value;
9180 this.hashFieldSet = true;
9181 }
9182 if (("ProductName" == name))
9183 {
9184 this.productNameField = value;
9185 this.productNameFieldSet = true;
9186 }
9187 if (("Size" == name))
9188 {
9189 this.sizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
9190 this.sizeFieldSet = true;
9191 }
9192 if (("Version" == name))
9193 {
9194 this.versionField = value;
9195 this.versionFieldSet = true;
9196 }
9197 }
9198 }
9199
9200 /// <summary>
9201 /// Create a RelatedBundle element.
9202 /// </summary>
9203 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9204 public class RelatedBundle : ISchemaElement, ISetAttributes
9205 {
9206
9207 private string idField;
9208
9209 private bool idFieldSet;
9210
9211 private ActionType actionField;
9212
9213 private bool actionFieldSet;
9214
9215 private ISchemaElement parentElement;
9216
9217 /// <summary>
9218 /// The identifier of the RelatedBundle group.
9219 /// </summary>
9220 public string Id
9221 {
9222 get
9223 {
9224 return this.idField;
9225 }
9226 set
9227 {
9228 this.idFieldSet = true;
9229 this.idField = value;
9230 }
9231 }
9232
9233 /// <summary>
9234 /// The action to take on bundles related to this one. Detect is the default.
9235 /// </summary>
9236 public ActionType Action
9237 {
9238 get
9239 {
9240 return this.actionField;
9241 }
9242 set
9243 {
9244 this.actionFieldSet = true;
9245 this.actionField = value;
9246 }
9247 }
9248
9249 public virtual ISchemaElement ParentElement
9250 {
9251 get
9252 {
9253 return this.parentElement;
9254 }
9255 set
9256 {
9257 this.parentElement = value;
9258 }
9259 }
9260
9261 /// <summary>
9262 /// Parses a ActionType from a string.
9263 /// </summary>
9264 public static ActionType ParseActionType(string value)
9265 {
9266 ActionType parsedValue;
9267 RelatedBundle.TryParseActionType(value, out parsedValue);
9268 return parsedValue;
9269 }
9270
9271 /// <summary>
9272 /// Tries to parse a ActionType from a string.
9273 /// </summary>
9274 public static bool TryParseActionType(string value, out ActionType parsedValue)
9275 {
9276 parsedValue = ActionType.NotSet;
9277 if (string.IsNullOrEmpty(value))
9278 {
9279 return false;
9280 }
9281 if (("Detect" == value))
9282 {
9283 parsedValue = ActionType.Detect;
9284 }
9285 else
9286 {
9287 if (("Upgrade" == value))
9288 {
9289 parsedValue = ActionType.Upgrade;
9290 }
9291 else
9292 {
9293 if (("Addon" == value))
9294 {
9295 parsedValue = ActionType.Addon;
9296 }
9297 else
9298 {
9299 if (("Patch" == value))
9300 {
9301 parsedValue = ActionType.Patch;
9302 }
9303 else
9304 {
9305 parsedValue = ActionType.IllegalValue;
9306 return false;
9307 }
9308 }
9309 }
9310 }
9311 return true;
9312 }
9313
9314 /// <summary>
9315 /// Processes this element and all child elements into an XmlWriter.
9316 /// </summary>
9317 public virtual void OutputXml(XmlWriter writer)
9318 {
9319 if ((null == writer))
9320 {
9321 throw new ArgumentNullException("writer");
9322 }
9323 writer.WriteStartElement("RelatedBundle", "http://wixtoolset.org/schemas/v4/wxs");
9324 if (this.idFieldSet)
9325 {
9326 writer.WriteAttributeString("Id", this.idField);
9327 }
9328 if (this.actionFieldSet)
9329 {
9330 if ((this.actionField == ActionType.Detect))
9331 {
9332 writer.WriteAttributeString("Action", "Detect");
9333 }
9334 if ((this.actionField == ActionType.Upgrade))
9335 {
9336 writer.WriteAttributeString("Action", "Upgrade");
9337 }
9338 if ((this.actionField == ActionType.Addon))
9339 {
9340 writer.WriteAttributeString("Action", "Addon");
9341 }
9342 if ((this.actionField == ActionType.Patch))
9343 {
9344 writer.WriteAttributeString("Action", "Patch");
9345 }
9346 }
9347 writer.WriteEndElement();
9348 }
9349
9350 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9351 void ISetAttributes.SetAttribute(string name, string value)
9352 {
9353 if (String.IsNullOrEmpty(name))
9354 {
9355 throw new ArgumentNullException("name");
9356 }
9357 if (("Id" == name))
9358 {
9359 this.idField = value;
9360 this.idFieldSet = true;
9361 }
9362 if (("Action" == name))
9363 {
9364 this.actionField = RelatedBundle.ParseActionType(value);
9365 this.actionFieldSet = true;
9366 }
9367 }
9368
9369 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9370 public enum ActionType
9371 {
9372
9373 IllegalValue = int.MaxValue,
9374
9375 NotSet = -1,
9376
9377 Detect,
9378
9379 Upgrade,
9380
9381 Addon,
9382
9383 Patch,
9384 }
9385 }
9386
9387 /// <summary>
9388 /// Defines the update for a Bundle.
9389 /// </summary>
9390 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9391 public class Update : ISchemaElement, ISetAttributes
9392 {
9393
9394 private string locationField;
9395
9396 private bool locationFieldSet;
9397
9398 private ISchemaElement parentElement;
9399
9400 /// <summary>
9401 /// The absolute path or URL to check for an update bundle. Currently the engine provides this value
9402 /// in the IBootstrapperApplication::OnDetectUpdateBegin() and otherwise ignores the value. In the
9403 /// future the engine will be able to acquire an update bundle from the location and determine if it
9404 /// is newer than the current executing bundle.
9405 /// </summary>
9406 public string Location
9407 {
9408 get
9409 {
9410 return this.locationField;
9411 }
9412 set
9413 {
9414 this.locationFieldSet = true;
9415 this.locationField = value;
9416 }
9417 }
9418
9419 public virtual ISchemaElement ParentElement
9420 {
9421 get
9422 {
9423 return this.parentElement;
9424 }
9425 set
9426 {
9427 this.parentElement = value;
9428 }
9429 }
9430
9431 /// <summary>
9432 /// Processes this element and all child elements into an XmlWriter.
9433 /// </summary>
9434 public virtual void OutputXml(XmlWriter writer)
9435 {
9436 if ((null == writer))
9437 {
9438 throw new ArgumentNullException("writer");
9439 }
9440 writer.WriteStartElement("Update", "http://wixtoolset.org/schemas/v4/wxs");
9441 if (this.locationFieldSet)
9442 {
9443 writer.WriteAttributeString("Location", this.locationField);
9444 }
9445 writer.WriteEndElement();
9446 }
9447
9448 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9449 void ISetAttributes.SetAttribute(string name, string value)
9450 {
9451 if (String.IsNullOrEmpty(name))
9452 {
9453 throw new ArgumentNullException("name");
9454 }
9455 if (("Location" == name))
9456 {
9457 this.locationField = value;
9458 this.locationFieldSet = true;
9459 }
9460 }
9461 }
9462
9463 /// <summary>
9464 /// The Package element is analogous to the main function in a C program. When linking, only one Package section
9465 /// can be given to the linker to produce a successful result. Using this element creates an msi file.
9466 /// </summary>
9467 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9468 public class Package : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
9469 {
9470
9471 private ElementCollection children;
9472
9473 private string idField;
9474
9475 private bool idFieldSet;
9476
9477 private string codepageField;
9478
9479 private bool codepageFieldSet;
9480
9481 private string languageField;
9482
9483 private bool languageFieldSet;
9484
9485 private string manufacturerField;
9486
9487 private bool manufacturerFieldSet;
9488
9489 private string nameField;
9490
9491 private bool nameFieldSet;
9492
9493 private string upgradeCodeField;
9494
9495 private bool upgradeCodeFieldSet;
9496
9497 private string versionField;
9498
9499 private bool versionFieldSet;
9500
9501 private ISchemaElement parentElement;
9502
9503 public Package()
9504 {
9505 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
9506 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SummaryInformation)));
9507 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
9508 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
9509 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Binary)));
9510 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComplianceCheck)));
9511 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
9512 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroup)));
9513 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Condition)));
9514 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction)));
9515 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef)));
9516 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable)));
9517 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Directory)));
9518 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef)));
9519 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer)));
9520 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef)));
9521 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable)));
9522 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Feature)));
9523 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
9524 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef)));
9525 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Icon)));
9526 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(InstanceTransforms)));
9527 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(MajorUpgrade)));
9528 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Media)));
9529 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(MediaTemplate)));
9530 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PackageCertificates)));
9531 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCertificates)));
9532 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Property)));
9533 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef)));
9534 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory)));
9535 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty)));
9536 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog)));
9537 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
9538 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UI)));
9539 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef)));
9540 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Upgrade)));
9541 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable)));
9542 ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Sequence);
9543 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence)));
9544 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence)));
9545 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence)));
9546 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence)));
9547 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence)));
9548 childCollection1.AddCollection(childCollection2);
9549 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
9550 childCollection0.AddCollection(childCollection1);
9551 this.children = childCollection0;
9552 }
9553
9554 public virtual IEnumerable Children
9555 {
9556 get
9557 {
9558 return this.children;
9559 }
9560 }
9561
9562 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
9563 public virtual IEnumerable this[System.Type childType]
9564 {
9565 get
9566 {
9567 return this.children.Filter(childType);
9568 }
9569 }
9570
9571 /// <summary>
9572 /// The product code GUID for the product.
9573 /// </summary>
9574 public string Id
9575 {
9576 get
9577 {
9578 return this.idField;
9579 }
9580 set
9581 {
9582 this.idFieldSet = true;
9583 this.idField = value;
9584 }
9585 }
9586
9587 /// <summary>
9588 /// The code page integer value or web name for the resulting MSI. See remarks for more information.
9589 /// </summary>
9590 public string Codepage
9591 {
9592 get
9593 {
9594 return this.codepageField;
9595 }
9596 set
9597 {
9598 this.codepageFieldSet = true;
9599 this.codepageField = value;
9600 }
9601 }
9602
9603 /// <summary>
9604 /// The decimal language ID (LCID) for the product.
9605 /// </summary>
9606 public string Language
9607 {
9608 get
9609 {
9610 return this.languageField;
9611 }
9612 set
9613 {
9614 this.languageFieldSet = true;
9615 this.languageField = value;
9616 }
9617 }
9618
9619 /// <summary>
9620 /// The manufacturer of the product.
9621 /// </summary>
9622 public string Manufacturer
9623 {
9624 get
9625 {
9626 return this.manufacturerField;
9627 }
9628 set
9629 {
9630 this.manufacturerFieldSet = true;
9631 this.manufacturerField = value;
9632 }
9633 }
9634
9635 /// <summary>
9636 /// The descriptive name of the product.
9637 /// </summary>
9638 public string Name
9639 {
9640 get
9641 {
9642 return this.nameField;
9643 }
9644 set
9645 {
9646 this.nameFieldSet = true;
9647 this.nameField = value;
9648 }
9649 }
9650
9651 /// <summary>
9652 /// The upgrade code GUID for the product.
9653 /// </summary>
9654 public string UpgradeCode
9655 {
9656 get
9657 {
9658 return this.upgradeCodeField;
9659 }
9660 set
9661 {
9662 this.upgradeCodeFieldSet = true;
9663 this.upgradeCodeField = value;
9664 }
9665 }
9666
9667 /// <summary>
9668 /// The product's version string.
9669 /// </summary>
9670 public string Version
9671 {
9672 get
9673 {
9674 return this.versionField;
9675 }
9676 set
9677 {
9678 this.versionFieldSet = true;
9679 this.versionField = value;
9680 }
9681 }
9682
9683 public virtual ISchemaElement ParentElement
9684 {
9685 get
9686 {
9687 return this.parentElement;
9688 }
9689 set
9690 {
9691 this.parentElement = value;
9692 }
9693 }
9694
9695 public virtual void AddChild(ISchemaElement child)
9696 {
9697 if ((null == child))
9698 {
9699 throw new ArgumentNullException("child");
9700 }
9701 this.children.AddElement(child);
9702 child.ParentElement = this;
9703 }
9704
9705 public virtual void RemoveChild(ISchemaElement child)
9706 {
9707 if ((null == child))
9708 {
9709 throw new ArgumentNullException("child");
9710 }
9711 this.children.RemoveElement(child);
9712 child.ParentElement = null;
9713 }
9714
9715 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9716 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
9717 ISchemaElement ICreateChildren.CreateChild(string childName)
9718 {
9719 if (String.IsNullOrEmpty(childName))
9720 {
9721 throw new ArgumentNullException("childName");
9722 }
9723 ISchemaElement childValue = null;
9724 if (("SummaryInformation" == childName))
9725 {
9726 childValue = new SummaryInformation();
9727 }
9728 if (("AppId" == childName))
9729 {
9730 childValue = new AppId();
9731 }
9732 if (("Binary" == childName))
9733 {
9734 childValue = new Binary();
9735 }
9736 if (("ComplianceCheck" == childName))
9737 {
9738 childValue = new ComplianceCheck();
9739 }
9740 if (("Component" == childName))
9741 {
9742 childValue = new Component();
9743 }
9744 if (("ComponentGroup" == childName))
9745 {
9746 childValue = new ComponentGroup();
9747 }
9748 if (("Condition" == childName))
9749 {
9750 childValue = new Condition();
9751 }
9752 if (("CustomAction" == childName))
9753 {
9754 childValue = new CustomAction();
9755 }
9756 if (("CustomActionRef" == childName))
9757 {
9758 childValue = new CustomActionRef();
9759 }
9760 if (("CustomTable" == childName))
9761 {
9762 childValue = new CustomTable();
9763 }
9764 if (("Directory" == childName))
9765 {
9766 childValue = new Directory();
9767 }
9768 if (("DirectoryRef" == childName))
9769 {
9770 childValue = new DirectoryRef();
9771 }
9772 if (("EmbeddedChainer" == childName))
9773 {
9774 childValue = new EmbeddedChainer();
9775 }
9776 if (("EmbeddedChainerRef" == childName))
9777 {
9778 childValue = new EmbeddedChainerRef();
9779 }
9780 if (("EnsureTable" == childName))
9781 {
9782 childValue = new EnsureTable();
9783 }
9784 if (("Feature" == childName))
9785 {
9786 childValue = new Feature();
9787 }
9788 if (("FeatureRef" == childName))
9789 {
9790 childValue = new FeatureRef();
9791 }
9792 if (("FeatureGroupRef" == childName))
9793 {
9794 childValue = new FeatureGroupRef();
9795 }
9796 if (("Icon" == childName))
9797 {
9798 childValue = new Icon();
9799 }
9800 if (("InstanceTransforms" == childName))
9801 {
9802 childValue = new InstanceTransforms();
9803 }
9804 if (("MajorUpgrade" == childName))
9805 {
9806 childValue = new MajorUpgrade();
9807 }
9808 if (("Media" == childName))
9809 {
9810 childValue = new Media();
9811 }
9812 if (("MediaTemplate" == childName))
9813 {
9814 childValue = new MediaTemplate();
9815 }
9816 if (("PackageCertificates" == childName))
9817 {
9818 childValue = new PackageCertificates();
9819 }
9820 if (("PatchCertificates" == childName))
9821 {
9822 childValue = new PatchCertificates();
9823 }
9824 if (("Property" == childName))
9825 {
9826 childValue = new Property();
9827 }
9828 if (("PropertyRef" == childName))
9829 {
9830 childValue = new PropertyRef();
9831 }
9832 if (("SetDirectory" == childName))
9833 {
9834 childValue = new SetDirectory();
9835 }
9836 if (("SetProperty" == childName))
9837 {
9838 childValue = new SetProperty();
9839 }
9840 if (("SFPCatalog" == childName))
9841 {
9842 childValue = new SFPCatalog();
9843 }
9844 if (("SymbolPath" == childName))
9845 {
9846 childValue = new SymbolPath();
9847 }
9848 if (("UI" == childName))
9849 {
9850 childValue = new UI();
9851 }
9852 if (("UIRef" == childName))
9853 {
9854 childValue = new UIRef();
9855 }
9856 if (("Upgrade" == childName))
9857 {
9858 childValue = new Upgrade();
9859 }
9860 if (("WixVariable" == childName))
9861 {
9862 childValue = new WixVariable();
9863 }
9864 if (("InstallExecuteSequence" == childName))
9865 {
9866 childValue = new InstallExecuteSequence();
9867 }
9868 if (("InstallUISequence" == childName))
9869 {
9870 childValue = new InstallUISequence();
9871 }
9872 if (("AdminExecuteSequence" == childName))
9873 {
9874 childValue = new AdminExecuteSequence();
9875 }
9876 if (("AdminUISequence" == childName))
9877 {
9878 childValue = new AdminUISequence();
9879 }
9880 if (("AdvertiseExecuteSequence" == childName))
9881 {
9882 childValue = new AdvertiseExecuteSequence();
9883 }
9884 if ((null == childValue))
9885 {
9886 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
9887 }
9888 return childValue;
9889 }
9890
9891 /// <summary>
9892 /// Processes this element and all child elements into an XmlWriter.
9893 /// </summary>
9894 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
9895 public virtual void OutputXml(XmlWriter writer)
9896 {
9897 if ((null == writer))
9898 {
9899 throw new ArgumentNullException("writer");
9900 }
9901 writer.WriteStartElement("Package", "http://wixtoolset.org/schemas/v4/wxs");
9902 if (this.idFieldSet)
9903 {
9904 writer.WriteAttributeString("Id", this.idField);
9905 }
9906 if (this.codepageFieldSet)
9907 {
9908 writer.WriteAttributeString("Codepage", this.codepageField);
9909 }
9910 if (this.languageFieldSet)
9911 {
9912 writer.WriteAttributeString("Language", this.languageField);
9913 }
9914 if (this.manufacturerFieldSet)
9915 {
9916 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
9917 }
9918 if (this.nameFieldSet)
9919 {
9920 writer.WriteAttributeString("Name", this.nameField);
9921 }
9922 if (this.upgradeCodeFieldSet)
9923 {
9924 writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField);
9925 }
9926 if (this.versionFieldSet)
9927 {
9928 writer.WriteAttributeString("Version", this.versionField);
9929 }
9930 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
9931 {
9932 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
9933 childElement.OutputXml(writer);
9934 }
9935 writer.WriteEndElement();
9936 }
9937
9938 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9939 void ISetAttributes.SetAttribute(string name, string value)
9940 {
9941 if (String.IsNullOrEmpty(name))
9942 {
9943 throw new ArgumentNullException("name");
9944 }
9945 if (("Id" == name))
9946 {
9947 this.idField = value;
9948 this.idFieldSet = true;
9949 }
9950 if (("Codepage" == name))
9951 {
9952 this.codepageField = value;
9953 this.codepageFieldSet = true;
9954 }
9955 if (("Language" == name))
9956 {
9957 this.languageField = value;
9958 this.languageFieldSet = true;
9959 }
9960 if (("Manufacturer" == name))
9961 {
9962 this.manufacturerField = value;
9963 this.manufacturerFieldSet = true;
9964 }
9965 if (("Name" == name))
9966 {
9967 this.nameField = value;
9968 this.nameFieldSet = true;
9969 }
9970 if (("UpgradeCode" == name))
9971 {
9972 this.upgradeCodeField = value;
9973 this.upgradeCodeFieldSet = true;
9974 }
9975 if (("Version" == name))
9976 {
9977 this.versionField = value;
9978 this.versionFieldSet = true;
9979 }
9980 }
9981 }
9982
9983 /// <summary>
9984 /// The Module element is analogous to the main function in a C program. When linking, only
9985 /// one Module section can be given to the linker to produce a successful result. Using this
9986 /// element creates an msm file.
9987 /// </summary>
9988 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9989 public class Module : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
9990 {
9991
9992 private ElementCollection children;
9993
9994 private string idField;
9995
9996 private bool idFieldSet;
9997
9998 private string codepageField;
9999
10000 private bool codepageFieldSet;
10001
10002 private string guidField;
10003
10004 private bool guidFieldSet;
10005
10006 private string languageField;
10007
10008 private bool languageFieldSet;
10009
10010 private string versionField;
10011
10012 private bool versionFieldSet;
10013
10014 private ISchemaElement parentElement;
10015
10016 public Module()
10017 {
10018 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
10019 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SummaryInformation)));
10020 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
10021 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
10022 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Binary)));
10023 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
10024 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef)));
10025 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
10026 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Configuration)));
10027 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction)));
10028 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef)));
10029 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable)));
10030 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Dependency)));
10031 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Directory)));
10032 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef)));
10033 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer)));
10034 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef)));
10035 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable)));
10036 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Exclusion)));
10037 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Icon)));
10038 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreModularization)));
10039 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreTable)));
10040 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Property)));
10041 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef)));
10042 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory)));
10043 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty)));
10044 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog)));
10045 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Substitution)));
10046 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UI)));
10047 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef)));
10048 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable)));
10049 ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Sequence);
10050 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence)));
10051 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence)));
10052 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence)));
10053 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence)));
10054 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence)));
10055 childCollection1.AddCollection(childCollection2);
10056 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
10057 childCollection0.AddCollection(childCollection1);
10058 this.children = childCollection0;
10059 }
10060
10061 public virtual IEnumerable Children
10062 {
10063 get
10064 {
10065 return this.children;
10066 }
10067 }
10068
10069 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
10070 public virtual IEnumerable this[System.Type childType]
10071 {
10072 get
10073 {
10074 return this.children.Filter(childType);
10075 }
10076 }
10077
10078 /// <summary>
10079 /// The name of the merge module (not the file name).
10080 /// </summary>
10081 public string Id
10082 {
10083 get
10084 {
10085 return this.idField;
10086 }
10087 set
10088 {
10089 this.idFieldSet = true;
10090 this.idField = value;
10091 }
10092 }
10093
10094 /// <summary>
10095 /// The code page integer value or web name for the resulting MSM. See remarks for more information.
10096 /// </summary>
10097 public string Codepage
10098 {
10099 get
10100 {
10101 return this.codepageField;
10102 }
10103 set
10104 {
10105 this.codepageFieldSet = true;
10106 this.codepageField = value;
10107 }
10108 }
10109
10110 /// <summary>
10111 /// The modularizaion Guid.
10112 /// </summary>
10113 public string Guid
10114 {
10115 get
10116 {
10117 return this.guidField;
10118 }
10119 set
10120 {
10121 this.guidFieldSet = true;
10122 this.guidField = value;
10123 }
10124 }
10125
10126 /// <summary>
10127 /// The decimal language ID (LCID) of the merge module.
10128 /// </summary>
10129 public string Language
10130 {
10131 get
10132 {
10133 return this.languageField;
10134 }
10135 set
10136 {
10137 this.languageFieldSet = true;
10138 this.languageField = value;
10139 }
10140 }
10141
10142 /// <summary>
10143 /// The major and minor versions of the merge module.
10144 /// </summary>
10145 public string Version
10146 {
10147 get
10148 {
10149 return this.versionField;
10150 }
10151 set
10152 {
10153 this.versionFieldSet = true;
10154 this.versionField = value;
10155 }
10156 }
10157
10158 public virtual ISchemaElement ParentElement
10159 {
10160 get
10161 {
10162 return this.parentElement;
10163 }
10164 set
10165 {
10166 this.parentElement = value;
10167 }
10168 }
10169
10170 public virtual void AddChild(ISchemaElement child)
10171 {
10172 if ((null == child))
10173 {
10174 throw new ArgumentNullException("child");
10175 }
10176 this.children.AddElement(child);
10177 child.ParentElement = this;
10178 }
10179
10180 public virtual void RemoveChild(ISchemaElement child)
10181 {
10182 if ((null == child))
10183 {
10184 throw new ArgumentNullException("child");
10185 }
10186 this.children.RemoveElement(child);
10187 child.ParentElement = null;
10188 }
10189
10190 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
10191 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
10192 ISchemaElement ICreateChildren.CreateChild(string childName)
10193 {
10194 if (String.IsNullOrEmpty(childName))
10195 {
10196 throw new ArgumentNullException("childName");
10197 }
10198 ISchemaElement childValue = null;
10199 if (("SummaryInformation" == childName))
10200 {
10201 childValue = new SummaryInformation();
10202 }
10203 if (("AppId" == childName))
10204 {
10205 childValue = new AppId();
10206 }
10207 if (("Binary" == childName))
10208 {
10209 childValue = new Binary();
10210 }
10211 if (("Component" == childName))
10212 {
10213 childValue = new Component();
10214 }
10215 if (("ComponentGroupRef" == childName))
10216 {
10217 childValue = new ComponentGroupRef();
10218 }
10219 if (("ComponentRef" == childName))
10220 {
10221 childValue = new ComponentRef();
10222 }
10223 if (("Configuration" == childName))
10224 {
10225 childValue = new Configuration();
10226 }
10227 if (("CustomAction" == childName))
10228 {
10229 childValue = new CustomAction();
10230 }
10231 if (("CustomActionRef" == childName))
10232 {
10233 childValue = new CustomActionRef();
10234 }
10235 if (("CustomTable" == childName))
10236 {
10237 childValue = new CustomTable();
10238 }
10239 if (("Dependency" == childName))
10240 {
10241 childValue = new Dependency();
10242 }
10243 if (("Directory" == childName))
10244 {
10245 childValue = new Directory();
10246 }
10247 if (("DirectoryRef" == childName))
10248 {
10249 childValue = new DirectoryRef();
10250 }
10251 if (("EmbeddedChainer" == childName))
10252 {
10253 childValue = new EmbeddedChainer();
10254 }
10255 if (("EmbeddedChainerRef" == childName))
10256 {
10257 childValue = new EmbeddedChainerRef();
10258 }
10259 if (("EnsureTable" == childName))
10260 {
10261 childValue = new EnsureTable();
10262 }
10263 if (("Exclusion" == childName))
10264 {
10265 childValue = new Exclusion();
10266 }
10267 if (("Icon" == childName))
10268 {
10269 childValue = new Icon();
10270 }
10271 if (("IgnoreModularization" == childName))
10272 {
10273 childValue = new IgnoreModularization();
10274 }
10275 if (("IgnoreTable" == childName))
10276 {
10277 childValue = new IgnoreTable();
10278 }
10279 if (("Property" == childName))
10280 {
10281 childValue = new Property();
10282 }
10283 if (("PropertyRef" == childName))
10284 {
10285 childValue = new PropertyRef();
10286 }
10287 if (("SetDirectory" == childName))
10288 {
10289 childValue = new SetDirectory();
10290 }
10291 if (("SetProperty" == childName))
10292 {
10293 childValue = new SetProperty();
10294 }
10295 if (("SFPCatalog" == childName))
10296 {
10297 childValue = new SFPCatalog();
10298 }
10299 if (("Substitution" == childName))
10300 {
10301 childValue = new Substitution();
10302 }
10303 if (("UI" == childName))
10304 {
10305 childValue = new UI();
10306 }
10307 if (("UIRef" == childName))
10308 {
10309 childValue = new UIRef();
10310 }
10311 if (("WixVariable" == childName))
10312 {
10313 childValue = new WixVariable();
10314 }
10315 if (("InstallExecuteSequence" == childName))
10316 {
10317 childValue = new InstallExecuteSequence();
10318 }
10319 if (("InstallUISequence" == childName))
10320 {
10321 childValue = new InstallUISequence();
10322 }
10323 if (("AdminExecuteSequence" == childName))
10324 {
10325 childValue = new AdminExecuteSequence();
10326 }
10327 if (("AdminUISequence" == childName))
10328 {
10329 childValue = new AdminUISequence();
10330 }
10331 if (("AdvertiseExecuteSequence" == childName))
10332 {
10333 childValue = new AdvertiseExecuteSequence();
10334 }
10335 if ((null == childValue))
10336 {
10337 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
10338 }
10339 return childValue;
10340 }
10341
10342 /// <summary>
10343 /// Processes this element and all child elements into an XmlWriter.
10344 /// </summary>
10345 public virtual void OutputXml(XmlWriter writer)
10346 {
10347 if ((null == writer))
10348 {
10349 throw new ArgumentNullException("writer");
10350 }
10351 writer.WriteStartElement("Module", "http://wixtoolset.org/schemas/v4/wxs");
10352 if (this.idFieldSet)
10353 {
10354 writer.WriteAttributeString("Id", this.idField);
10355 }
10356 if (this.codepageFieldSet)
10357 {
10358 writer.WriteAttributeString("Codepage", this.codepageField);
10359 }
10360 if (this.guidFieldSet)
10361 {
10362 writer.WriteAttributeString("Guid", this.guidField);
10363 }
10364 if (this.languageFieldSet)
10365 {
10366 writer.WriteAttributeString("Language", this.languageField);
10367 }
10368 if (this.versionFieldSet)
10369 {
10370 writer.WriteAttributeString("Version", this.versionField);
10371 }
10372 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
10373 {
10374 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
10375 childElement.OutputXml(writer);
10376 }
10377 writer.WriteEndElement();
10378 }
10379
10380 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
10381 void ISetAttributes.SetAttribute(string name, string value)
10382 {
10383 if (String.IsNullOrEmpty(name))
10384 {
10385 throw new ArgumentNullException("name");
10386 }
10387 if (("Id" == name))
10388 {
10389 this.idField = value;
10390 this.idFieldSet = true;
10391 }
10392 if (("Codepage" == name))
10393 {
10394 this.codepageField = value;
10395 this.codepageFieldSet = true;
10396 }
10397 if (("Guid" == name))
10398 {
10399 this.guidField = value;
10400 this.guidFieldSet = true;
10401 }
10402 if (("Language" == name))
10403 {
10404 this.languageField = value;
10405 this.languageFieldSet = true;
10406 }
10407 if (("Version" == name))
10408 {
10409 this.versionField = value;
10410 this.versionFieldSet = true;
10411 }
10412 }
10413 }
10414
10415 /// <summary>
10416 /// Declares a dependency on another merge module.
10417 /// </summary>
10418 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
10419 public class Dependency : ISchemaElement, ISetAttributes
10420 {
10421
10422 private string requiredIdField;
10423
10424 private bool requiredIdFieldSet;
10425
10426 private int requiredLanguageField;
10427
10428 private bool requiredLanguageFieldSet;
10429
10430 private string requiredVersionField;
10431
10432 private bool requiredVersionFieldSet;
10433
10434 private ISchemaElement parentElement;
10435
10436 /// <summary>
10437 /// Identifier of the merge module required by the merge module.
10438 /// </summary>
10439 public string RequiredId
10440 {
10441 get
10442 {
10443 return this.requiredIdField;
10444 }
10445 set
10446 {
10447 this.requiredIdFieldSet = true;
10448 this.requiredIdField = value;
10449 }
10450 }
10451
10452 /// <summary>
10453 /// Numeric language ID of the merge module in RequiredID.
10454 /// </summary>
10455 public int RequiredLanguage
10456 {
10457 get
10458 {
10459 return this.requiredLanguageField;
10460 }
10461 set
10462 {
10463 this.requiredLanguageFieldSet = true;
10464 this.requiredLanguageField = value;
10465 }
10466 }
10467
10468 /// <summary>
10469 /// Version of the merge module in RequiredID.
10470 /// </summary>
10471 public string RequiredVersion
10472 {
10473 get
10474 {
10475 return this.requiredVersionField;
10476 }
10477 set
10478 {
10479 this.requiredVersionFieldSet = true;
10480 this.requiredVersionField = value;
10481 }
10482 }
10483
10484 public virtual ISchemaElement ParentElement
10485 {
10486 get
10487 {
10488 return this.parentElement;
10489 }
10490 set
10491 {
10492 this.parentElement = value;
10493 }
10494 }
10495
10496 /// <summary>
10497 /// Processes this element and all child elements into an XmlWriter.
10498 /// </summary>
10499 public virtual void OutputXml(XmlWriter writer)
10500 {
10501 if ((null == writer))
10502 {
10503 throw new ArgumentNullException("writer");
10504 }
10505 writer.WriteStartElement("Dependency", "http://wixtoolset.org/schemas/v4/wxs");
10506 if (this.requiredIdFieldSet)
10507 {
10508 writer.WriteAttributeString("RequiredId", this.requiredIdField);
10509 }
10510 if (this.requiredLanguageFieldSet)
10511 {
10512 writer.WriteAttributeString("RequiredLanguage", this.requiredLanguageField.ToString(CultureInfo.InvariantCulture));
10513 }
10514 if (this.requiredVersionFieldSet)
10515 {
10516 writer.WriteAttributeString("RequiredVersion", this.requiredVersionField);
10517 }
10518 writer.WriteEndElement();
10519 }
10520
10521 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
10522 void ISetAttributes.SetAttribute(string name, string value)
10523 {
10524 if (String.IsNullOrEmpty(name))
10525 {
10526 throw new ArgumentNullException("name");
10527 }
10528 if (("RequiredId" == name))
10529 {
10530 this.requiredIdField = value;
10531 this.requiredIdFieldSet = true;
10532 }
10533 if (("RequiredLanguage" == name))
10534 {
10535 this.requiredLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
10536 this.requiredLanguageFieldSet = true;
10537 }
10538 if (("RequiredVersion" == name))
10539 {
10540 this.requiredVersionField = value;
10541 this.requiredVersionFieldSet = true;
10542 }
10543 }
10544 }
10545
10546 /// <summary>
10547 /// Declares a merge module with which this merge module is incompatible.
10548 /// </summary>
10549 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
10550 public class Exclusion : ISchemaElement, ISetAttributes
10551 {
10552
10553 private string excludedIdField;
10554
10555 private bool excludedIdFieldSet;
10556
10557 private int excludeExceptLanguageField;
10558
10559 private bool excludeExceptLanguageFieldSet;
10560
10561 private int excludeLanguageField;
10562
10563 private bool excludeLanguageFieldSet;
10564
10565 private string excludedMinVersionField;
10566
10567 private bool excludedMinVersionFieldSet;
10568
10569 private string excludedMaxVersionField;
10570
10571 private bool excludedMaxVersionFieldSet;
10572
10573 private ISchemaElement parentElement;
10574
10575 /// <summary>
10576 /// Identifier of the merge module that is incompatible.
10577 /// </summary>
10578 public string ExcludedId
10579 {
10580 get
10581 {
10582 return this.excludedIdField;
10583 }
10584 set
10585 {
10586 this.excludedIdFieldSet = true;
10587 this.excludedIdField = value;
10588 }
10589 }
10590
10591 /// <summary>
10592 /// Numeric language ID of the merge module in ExcludedID. All except this language will be excluded. Only one of ExcludeExceptLanguage and ExcludeLanguage may be specified.
10593 /// </summary>
10594 public int ExcludeExceptLanguage
10595 {
10596 get
10597 {
10598 return this.excludeExceptLanguageField;
10599 }
10600 set
10601 {
10602 this.excludeExceptLanguageFieldSet = true;
10603 this.excludeExceptLanguageField = value;
10604 }
10605 }
10606
10607 /// <summary>
10608 /// Numeric language ID of the merge module in ExcludedID. The specified language will be excluded. Only one of ExcludeExceptLanguage and ExcludeLanguage may be specified.
10609 /// </summary>
10610 public int ExcludeLanguage
10611 {
10612 get
10613 {
10614 return this.excludeLanguageField;
10615 }
10616 set
10617 {
10618 this.excludeLanguageFieldSet = true;
10619 this.excludeLanguageField = value;
10620 }
10621 }
10622
10623 /// <summary>
10624 /// Minimum version excluded from a range. If not set, all versions before max are excluded. If neither max nor min, no exclusion based on version.
10625 /// </summary>
10626 public string ExcludedMinVersion
10627 {
10628 get
10629 {
10630 return this.excludedMinVersionField;
10631 }
10632 set
10633 {
10634 this.excludedMinVersionFieldSet = true;
10635 this.excludedMinVersionField = value;
10636 }
10637 }
10638
10639 /// <summary>
10640 /// Maximum version excluded from a range. If not set, all versions after min are excluded. If neither max nor min, no exclusion based on version.
10641 /// </summary>
10642 public string ExcludedMaxVersion
10643 {
10644 get
10645 {
10646 return this.excludedMaxVersionField;
10647 }
10648 set
10649 {
10650 this.excludedMaxVersionFieldSet = true;
10651 this.excludedMaxVersionField = value;
10652 }
10653 }
10654
10655 public virtual ISchemaElement ParentElement
10656 {
10657 get
10658 {
10659 return this.parentElement;
10660 }
10661 set
10662 {
10663 this.parentElement = value;
10664 }
10665 }
10666
10667 /// <summary>
10668 /// Processes this element and all child elements into an XmlWriter.
10669 /// </summary>
10670 public virtual void OutputXml(XmlWriter writer)
10671 {
10672 if ((null == writer))
10673 {
10674 throw new ArgumentNullException("writer");
10675 }
10676 writer.WriteStartElement("Exclusion", "http://wixtoolset.org/schemas/v4/wxs");
10677 if (this.excludedIdFieldSet)
10678 {
10679 writer.WriteAttributeString("ExcludedId", this.excludedIdField);
10680 }
10681 if (this.excludeExceptLanguageFieldSet)
10682 {
10683 writer.WriteAttributeString("ExcludeExceptLanguage", this.excludeExceptLanguageField.ToString(CultureInfo.InvariantCulture));
10684 }
10685 if (this.excludeLanguageFieldSet)
10686 {
10687 writer.WriteAttributeString("ExcludeLanguage", this.excludeLanguageField.ToString(CultureInfo.InvariantCulture));
10688 }
10689 if (this.excludedMinVersionFieldSet)
10690 {
10691 writer.WriteAttributeString("ExcludedMinVersion", this.excludedMinVersionField);
10692 }
10693 if (this.excludedMaxVersionFieldSet)
10694 {
10695 writer.WriteAttributeString("ExcludedMaxVersion", this.excludedMaxVersionField);
10696 }
10697 writer.WriteEndElement();
10698 }
10699
10700 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
10701 void ISetAttributes.SetAttribute(string name, string value)
10702 {
10703 if (String.IsNullOrEmpty(name))
10704 {
10705 throw new ArgumentNullException("name");
10706 }
10707 if (("ExcludedId" == name))
10708 {
10709 this.excludedIdField = value;
10710 this.excludedIdFieldSet = true;
10711 }
10712 if (("ExcludeExceptLanguage" == name))
10713 {
10714 this.excludeExceptLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
10715 this.excludeExceptLanguageFieldSet = true;
10716 }
10717 if (("ExcludeLanguage" == name))
10718 {
10719 this.excludeLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
10720 this.excludeLanguageFieldSet = true;
10721 }
10722 if (("ExcludedMinVersion" == name))
10723 {
10724 this.excludedMinVersionField = value;
10725 this.excludedMinVersionFieldSet = true;
10726 }
10727 if (("ExcludedMaxVersion" == name))
10728 {
10729 this.excludedMaxVersionField = value;
10730 this.excludedMaxVersionFieldSet = true;
10731 }
10732 }
10733 }
10734
10735 /// <summary>
10736 /// Defines the configurable attributes of merge module.
10737 /// </summary>
10738 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
10739 public class Configuration : ISchemaElement, ISetAttributes
10740 {
10741
10742 private string nameField;
10743
10744 private bool nameFieldSet;
10745
10746 private FormatType formatField;
10747
10748 private bool formatFieldSet;
10749
10750 private string typeField;
10751
10752 private bool typeFieldSet;
10753
10754 private string contextDataField;
10755
10756 private bool contextDataFieldSet;
10757
10758 private string defaultValueField;
10759
10760 private bool defaultValueFieldSet;
10761
10762 private YesNoType keyNoOrphanField;
10763
10764 private bool keyNoOrphanFieldSet;
10765
10766 private YesNoType nonNullableField;
10767
10768 private bool nonNullableFieldSet;
10769
10770 private string displayNameField;
10771
10772 private bool displayNameFieldSet;
10773
10774 private string descriptionField;
10775
10776 private bool descriptionFieldSet;
10777
10778 private string helpLocationField;
10779
10780 private bool helpLocationFieldSet;
10781
10782 private string helpKeywordField;
10783
10784 private bool helpKeywordFieldSet;
10785
10786 private ISchemaElement parentElement;
10787
10788 /// <summary>
10789 /// Defines the name of the configurable item.
10790 /// </summary>
10791 public string Name
10792 {
10793 get
10794 {
10795 return this.nameField;
10796 }
10797 set
10798 {
10799 this.nameFieldSet = true;
10800 this.nameField = value;
10801 }
10802 }
10803
10804 /// <summary>
10805 /// Specifies the format of the data being changed.
10806 /// </summary>
10807 public FormatType Format
10808 {
10809 get
10810 {
10811 return this.formatField;
10812 }
10813 set
10814 {
10815 this.formatFieldSet = true;
10816 this.formatField = value;
10817 }
10818 }
10819
10820 /// <summary>
10821 /// Specifies the type of the data being changed.
10822 /// </summary>
10823 public string Type
10824 {
10825 get
10826 {
10827 return this.typeField;
10828 }
10829 set
10830 {
10831 this.typeFieldSet = true;
10832 this.typeField = value;
10833 }
10834 }
10835
10836 /// <summary>
10837 /// Specifies a semantic context for the requested data.
10838 /// </summary>
10839 public string ContextData
10840 {
10841 get
10842 {
10843 return this.contextDataField;
10844 }
10845 set
10846 {
10847 this.contextDataFieldSet = true;
10848 this.contextDataField = value;
10849 }
10850 }
10851
10852 /// <summary>
10853 /// Specifies a default value for the item in this record if the merge tool declines to provide a value.
10854 /// </summary>
10855 public string DefaultValue
10856 {
10857 get
10858 {
10859 return this.defaultValueField;
10860 }
10861 set
10862 {
10863 this.defaultValueFieldSet = true;
10864 this.defaultValueField = value;
10865 }
10866 }
10867
10868 /// <summary>
10869 /// Does not merge rule according to rules in MSI SDK.
10870 /// </summary>
10871 public YesNoType KeyNoOrphan
10872 {
10873 get
10874 {
10875 return this.keyNoOrphanField;
10876 }
10877 set
10878 {
10879 this.keyNoOrphanFieldSet = true;
10880 this.keyNoOrphanField = value;
10881 }
10882 }
10883
10884 /// <summary>
10885 /// If yes, null is not a valid entry.
10886 /// </summary>
10887 public YesNoType NonNullable
10888 {
10889 get
10890 {
10891 return this.nonNullableField;
10892 }
10893 set
10894 {
10895 this.nonNullableFieldSet = true;
10896 this.nonNullableField = value;
10897 }
10898 }
10899
10900 /// <summary>
10901 /// Display name for authoring.
10902 /// </summary>
10903 public string DisplayName
10904 {
10905 get
10906 {
10907 return this.displayNameField;
10908 }
10909 set
10910 {
10911 this.displayNameFieldSet = true;
10912 this.displayNameField = value;
10913 }
10914 }
10915
10916 /// <summary>
10917 /// Description for authoring.
10918 /// </summary>
10919 public string Description
10920 {
10921 get
10922 {
10923 return this.descriptionField;
10924 }
10925 set
10926 {
10927 this.descriptionFieldSet = true;
10928 this.descriptionField = value;
10929 }
10930 }
10931
10932 /// <summary>
10933 /// Location of chm file for authoring.
10934 /// </summary>
10935 public string HelpLocation
10936 {
10937 get
10938 {
10939 return this.helpLocationField;
10940 }
10941 set
10942 {
10943 this.helpLocationFieldSet = true;
10944 this.helpLocationField = value;
10945 }
10946 }
10947
10948 /// <summary>
10949 /// Keyword into chm file for authoring.
10950 /// </summary>
10951 public string HelpKeyword
10952 {
10953 get
10954 {
10955 return this.helpKeywordField;
10956 }
10957 set
10958 {
10959 this.helpKeywordFieldSet = true;
10960 this.helpKeywordField = value;
10961 }
10962 }
10963
10964 public virtual ISchemaElement ParentElement
10965 {
10966 get
10967 {
10968 return this.parentElement;
10969 }
10970 set
10971 {
10972 this.parentElement = value;
10973 }
10974 }
10975
10976 /// <summary>
10977 /// Parses a FormatType from a string.
10978 /// </summary>
10979 public static FormatType ParseFormatType(string value)
10980 {
10981 FormatType parsedValue;
10982 Configuration.TryParseFormatType(value, out parsedValue);
10983 return parsedValue;
10984 }
10985
10986 /// <summary>
10987 /// Tries to parse a FormatType from a string.
10988 /// </summary>
10989 public static bool TryParseFormatType(string value, out FormatType parsedValue)
10990 {
10991 parsedValue = FormatType.NotSet;
10992 if (string.IsNullOrEmpty(value))
10993 {
10994 return false;
10995 }
10996 if (("Text" == value))
10997 {
10998 parsedValue = FormatType.Text;
10999 }
11000 else
11001 {
11002 if (("Key" == value))
11003 {
11004 parsedValue = FormatType.Key;
11005 }
11006 else
11007 {
11008 if (("Integer" == value))
11009 {
11010 parsedValue = FormatType.Integer;
11011 }
11012 else
11013 {
11014 if (("Bitfield" == value))
11015 {
11016 parsedValue = FormatType.Bitfield;
11017 }
11018 else
11019 {
11020 parsedValue = FormatType.IllegalValue;
11021 return false;
11022 }
11023 }
11024 }
11025 }
11026 return true;
11027 }
11028
11029 /// <summary>
11030 /// Processes this element and all child elements into an XmlWriter.
11031 /// </summary>
11032 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
11033 public virtual void OutputXml(XmlWriter writer)
11034 {
11035 if ((null == writer))
11036 {
11037 throw new ArgumentNullException("writer");
11038 }
11039 writer.WriteStartElement("Configuration", "http://wixtoolset.org/schemas/v4/wxs");
11040 if (this.nameFieldSet)
11041 {
11042 writer.WriteAttributeString("Name", this.nameField);
11043 }
11044 if (this.formatFieldSet)
11045 {
11046 if ((this.formatField == FormatType.Text))
11047 {
11048 writer.WriteAttributeString("Format", "Text");
11049 }
11050 if ((this.formatField == FormatType.Key))
11051 {
11052 writer.WriteAttributeString("Format", "Key");
11053 }
11054 if ((this.formatField == FormatType.Integer))
11055 {
11056 writer.WriteAttributeString("Format", "Integer");
11057 }
11058 if ((this.formatField == FormatType.Bitfield))
11059 {
11060 writer.WriteAttributeString("Format", "Bitfield");
11061 }
11062 }
11063 if (this.typeFieldSet)
11064 {
11065 writer.WriteAttributeString("Type", this.typeField);
11066 }
11067 if (this.contextDataFieldSet)
11068 {
11069 writer.WriteAttributeString("ContextData", this.contextDataField);
11070 }
11071 if (this.defaultValueFieldSet)
11072 {
11073 writer.WriteAttributeString("DefaultValue", this.defaultValueField);
11074 }
11075 if (this.keyNoOrphanFieldSet)
11076 {
11077 if ((this.keyNoOrphanField == YesNoType.no))
11078 {
11079 writer.WriteAttributeString("KeyNoOrphan", "no");
11080 }
11081 if ((this.keyNoOrphanField == YesNoType.yes))
11082 {
11083 writer.WriteAttributeString("KeyNoOrphan", "yes");
11084 }
11085 }
11086 if (this.nonNullableFieldSet)
11087 {
11088 if ((this.nonNullableField == YesNoType.no))
11089 {
11090 writer.WriteAttributeString("NonNullable", "no");
11091 }
11092 if ((this.nonNullableField == YesNoType.yes))
11093 {
11094 writer.WriteAttributeString("NonNullable", "yes");
11095 }
11096 }
11097 if (this.displayNameFieldSet)
11098 {
11099 writer.WriteAttributeString("DisplayName", this.displayNameField);
11100 }
11101 if (this.descriptionFieldSet)
11102 {
11103 writer.WriteAttributeString("Description", this.descriptionField);
11104 }
11105 if (this.helpLocationFieldSet)
11106 {
11107 writer.WriteAttributeString("HelpLocation", this.helpLocationField);
11108 }
11109 if (this.helpKeywordFieldSet)
11110 {
11111 writer.WriteAttributeString("HelpKeyword", this.helpKeywordField);
11112 }
11113 writer.WriteEndElement();
11114 }
11115
11116 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11117 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
11118 void ISetAttributes.SetAttribute(string name, string value)
11119 {
11120 if (String.IsNullOrEmpty(name))
11121 {
11122 throw new ArgumentNullException("name");
11123 }
11124 if (("Name" == name))
11125 {
11126 this.nameField = value;
11127 this.nameFieldSet = true;
11128 }
11129 if (("Format" == name))
11130 {
11131 this.formatField = Configuration.ParseFormatType(value);
11132 this.formatFieldSet = true;
11133 }
11134 if (("Type" == name))
11135 {
11136 this.typeField = value;
11137 this.typeFieldSet = true;
11138 }
11139 if (("ContextData" == name))
11140 {
11141 this.contextDataField = value;
11142 this.contextDataFieldSet = true;
11143 }
11144 if (("DefaultValue" == name))
11145 {
11146 this.defaultValueField = value;
11147 this.defaultValueFieldSet = true;
11148 }
11149 if (("KeyNoOrphan" == name))
11150 {
11151 this.keyNoOrphanField = Enums.ParseYesNoType(value);
11152 this.keyNoOrphanFieldSet = true;
11153 }
11154 if (("NonNullable" == name))
11155 {
11156 this.nonNullableField = Enums.ParseYesNoType(value);
11157 this.nonNullableFieldSet = true;
11158 }
11159 if (("DisplayName" == name))
11160 {
11161 this.displayNameField = value;
11162 this.displayNameFieldSet = true;
11163 }
11164 if (("Description" == name))
11165 {
11166 this.descriptionField = value;
11167 this.descriptionFieldSet = true;
11168 }
11169 if (("HelpLocation" == name))
11170 {
11171 this.helpLocationField = value;
11172 this.helpLocationFieldSet = true;
11173 }
11174 if (("HelpKeyword" == name))
11175 {
11176 this.helpKeywordField = value;
11177 this.helpKeywordFieldSet = true;
11178 }
11179 }
11180
11181 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
11182 public enum FormatType
11183 {
11184
11185 IllegalValue = int.MaxValue,
11186
11187 NotSet = -1,
11188
11189 Text,
11190
11191 Key,
11192
11193 Integer,
11194
11195 Bitfield,
11196 }
11197 }
11198
11199 /// <summary>
11200 /// Specifies the configurable fields of a module database and provides a template for the configuration of each field.
11201 /// </summary>
11202 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
11203 public class Substitution : ISchemaElement, ISetAttributes
11204 {
11205
11206 private string tableField;
11207
11208 private bool tableFieldSet;
11209
11210 private string rowField;
11211
11212 private bool rowFieldSet;
11213
11214 private string columnField;
11215
11216 private bool columnFieldSet;
11217
11218 private string valueField;
11219
11220 private bool valueFieldSet;
11221
11222 private ISchemaElement parentElement;
11223
11224 /// <summary>
11225 /// Specifies the name of the table being modified in the module database.
11226 /// </summary>
11227 public string Table
11228 {
11229 get
11230 {
11231 return this.tableField;
11232 }
11233 set
11234 {
11235 this.tableFieldSet = true;
11236 this.tableField = value;
11237 }
11238 }
11239
11240 /// <summary>
11241 /// Specifies the primary keys of the target row in the table named in the Table column. If multiple keys, separated by semicolons.
11242 /// </summary>
11243 public string Row
11244 {
11245 get
11246 {
11247 return this.rowField;
11248 }
11249 set
11250 {
11251 this.rowFieldSet = true;
11252 this.rowField = value;
11253 }
11254 }
11255
11256 /// <summary>
11257 /// Specifies the target column in the row named in the Row column.
11258 /// </summary>
11259 public string Column
11260 {
11261 get
11262 {
11263 return this.columnField;
11264 }
11265 set
11266 {
11267 this.columnFieldSet = true;
11268 this.columnField = value;
11269 }
11270 }
11271
11272 /// <summary>
11273 /// Provides a formatting template for the data being substituted into the target field specified by Table, Row, and Column.
11274 /// </summary>
11275 public string Value
11276 {
11277 get
11278 {
11279 return this.valueField;
11280 }
11281 set
11282 {
11283 this.valueFieldSet = true;
11284 this.valueField = value;
11285 }
11286 }
11287
11288 public virtual ISchemaElement ParentElement
11289 {
11290 get
11291 {
11292 return this.parentElement;
11293 }
11294 set
11295 {
11296 this.parentElement = value;
11297 }
11298 }
11299
11300 /// <summary>
11301 /// Processes this element and all child elements into an XmlWriter.
11302 /// </summary>
11303 public virtual void OutputXml(XmlWriter writer)
11304 {
11305 if ((null == writer))
11306 {
11307 throw new ArgumentNullException("writer");
11308 }
11309 writer.WriteStartElement("Substitution", "http://wixtoolset.org/schemas/v4/wxs");
11310 if (this.tableFieldSet)
11311 {
11312 writer.WriteAttributeString("Table", this.tableField);
11313 }
11314 if (this.rowFieldSet)
11315 {
11316 writer.WriteAttributeString("Row", this.rowField);
11317 }
11318 if (this.columnFieldSet)
11319 {
11320 writer.WriteAttributeString("Column", this.columnField);
11321 }
11322 if (this.valueFieldSet)
11323 {
11324 writer.WriteAttributeString("Value", this.valueField);
11325 }
11326 writer.WriteEndElement();
11327 }
11328
11329 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11330 void ISetAttributes.SetAttribute(string name, string value)
11331 {
11332 if (String.IsNullOrEmpty(name))
11333 {
11334 throw new ArgumentNullException("name");
11335 }
11336 if (("Table" == name))
11337 {
11338 this.tableField = value;
11339 this.tableFieldSet = true;
11340 }
11341 if (("Row" == name))
11342 {
11343 this.rowField = value;
11344 this.rowFieldSet = true;
11345 }
11346 if (("Column" == name))
11347 {
11348 this.columnField = value;
11349 this.columnFieldSet = true;
11350 }
11351 if (("Value" == name))
11352 {
11353 this.valueField = value;
11354 this.valueFieldSet = true;
11355 }
11356 }
11357 }
11358
11359 /// <summary>
11360 /// Specifies a table from the merge module that is not merged into an .msi file.
11361 /// If the table already exists in an .msi file, it is not modified by the merge.
11362 /// The specified table can therefore contain data that is unneeded after the merge.
11363 /// To minimize the size of the .msm file, it is recommended that developers remove
11364 /// unused tables from modules intended for redistribution rather than creating
11365 /// IgnoreTable elements for those tables.
11366 /// </summary>
11367 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
11368 public class IgnoreTable : ISchemaElement, ISetAttributes
11369 {
11370
11371 private string idField;
11372
11373 private bool idFieldSet;
11374
11375 private ISchemaElement parentElement;
11376
11377 /// <summary>
11378 /// The name of the table in the merge module that is not to be merged into the .msi file.
11379 /// </summary>
11380 public string Id
11381 {
11382 get
11383 {
11384 return this.idField;
11385 }
11386 set
11387 {
11388 this.idFieldSet = true;
11389 this.idField = value;
11390 }
11391 }
11392
11393 public virtual ISchemaElement ParentElement
11394 {
11395 get
11396 {
11397 return this.parentElement;
11398 }
11399 set
11400 {
11401 this.parentElement = value;
11402 }
11403 }
11404
11405 /// <summary>
11406 /// Processes this element and all child elements into an XmlWriter.
11407 /// </summary>
11408 public virtual void OutputXml(XmlWriter writer)
11409 {
11410 if ((null == writer))
11411 {
11412 throw new ArgumentNullException("writer");
11413 }
11414 writer.WriteStartElement("IgnoreTable", "http://wixtoolset.org/schemas/v4/wxs");
11415 if (this.idFieldSet)
11416 {
11417 writer.WriteAttributeString("Id", this.idField);
11418 }
11419 writer.WriteEndElement();
11420 }
11421
11422 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11423 void ISetAttributes.SetAttribute(string name, string value)
11424 {
11425 if (String.IsNullOrEmpty(name))
11426 {
11427 throw new ArgumentNullException("name");
11428 }
11429 if (("Id" == name))
11430 {
11431 this.idField = value;
11432 this.idFieldSet = true;
11433 }
11434 }
11435 }
11436
11437 /// <summary>
11438 /// The Fragment element is the building block of creating an installer database in WiX. Once defined,
11439 /// the Fragment becomes an immutable, atomic unit which can either be completely included or excluded
11440 /// from a product. The contents of a Fragment element can be linked into a product by utilizing one
11441 /// of the many *Ref elements. When linking in a Fragment, it will be necessary to link in all of its
11442 /// individual units. For instance, if a given Fragment contains two Component elements, you must link
11443 /// both under features using ComponentRef for each linked Component. Otherwise, you will get a linker
11444 /// warning and have a floating Component that does not appear under any Feature.
11445 /// </summary>
11446 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
11447 public class Fragment : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
11448 {
11449
11450 private ElementCollection children;
11451
11452 private string idField;
11453
11454 private bool idFieldSet;
11455
11456 private ISchemaElement parentElement;
11457
11458 public Fragment()
11459 {
11460 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
11461 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
11462 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Binary)));
11463 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplication)));
11464 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplicationRef)));
11465 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComplianceCheck)));
11466 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
11467 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroup)));
11468 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition)));
11469 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Container)));
11470 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction)));
11471 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef)));
11472 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable)));
11473 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory)));
11474 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef)));
11475 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer)));
11476 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef)));
11477 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable)));
11478 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature)));
11479 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroup)));
11480 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
11481 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Icon)));
11482 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreModularization)));
11483 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Media)));
11484 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MediaTemplate)));
11485 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroup)));
11486 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageCertificates)));
11487 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCertificates)));
11488 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily)));
11489 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroup)));
11490 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroup)));
11491 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property)));
11492 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef)));
11493 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RelatedBundle)));
11494 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory)));
11495 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty)));
11496 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog)));
11497 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UI)));
11498 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef)));
11499 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Upgrade)));
11500 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Variable)));
11501 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable)));
11502 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence);
11503 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence)));
11504 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence)));
11505 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence)));
11506 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence)));
11507 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence)));
11508 childCollection0.AddCollection(childCollection1);
11509 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
11510 this.children = childCollection0;
11511 }
11512
11513 public virtual IEnumerable Children
11514 {
11515 get
11516 {
11517 return this.children;
11518 }
11519 }
11520
11521 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
11522 public virtual IEnumerable this[System.Type childType]
11523 {
11524 get
11525 {
11526 return this.children.Filter(childType);
11527 }
11528 }
11529
11530 /// <summary>
11531 /// Optional identifier for a Fragment. Should only be set by advanced users to tag sections.
11532 /// </summary>
11533 public string Id
11534 {
11535 get
11536 {
11537 return this.idField;
11538 }
11539 set
11540 {
11541 this.idFieldSet = true;
11542 this.idField = value;
11543 }
11544 }
11545
11546 public virtual ISchemaElement ParentElement
11547 {
11548 get
11549 {
11550 return this.parentElement;
11551 }
11552 set
11553 {
11554 this.parentElement = value;
11555 }
11556 }
11557
11558 public virtual void AddChild(ISchemaElement child)
11559 {
11560 if ((null == child))
11561 {
11562 throw new ArgumentNullException("child");
11563 }
11564 this.children.AddElement(child);
11565 child.ParentElement = this;
11566 }
11567
11568 public virtual void RemoveChild(ISchemaElement child)
11569 {
11570 if ((null == child))
11571 {
11572 throw new ArgumentNullException("child");
11573 }
11574 this.children.RemoveElement(child);
11575 child.ParentElement = null;
11576 }
11577
11578 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11579 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
11580 ISchemaElement ICreateChildren.CreateChild(string childName)
11581 {
11582 if (String.IsNullOrEmpty(childName))
11583 {
11584 throw new ArgumentNullException("childName");
11585 }
11586 ISchemaElement childValue = null;
11587 if (("AppId" == childName))
11588 {
11589 childValue = new AppId();
11590 }
11591 if (("Binary" == childName))
11592 {
11593 childValue = new Binary();
11594 }
11595 if (("BootstrapperApplication" == childName))
11596 {
11597 childValue = new BootstrapperApplication();
11598 }
11599 if (("BootstrapperApplicationRef" == childName))
11600 {
11601 childValue = new BootstrapperApplicationRef();
11602 }
11603 if (("ComplianceCheck" == childName))
11604 {
11605 childValue = new ComplianceCheck();
11606 }
11607 if (("Component" == childName))
11608 {
11609 childValue = new Component();
11610 }
11611 if (("ComponentGroup" == childName))
11612 {
11613 childValue = new ComponentGroup();
11614 }
11615 if (("Condition" == childName))
11616 {
11617 childValue = new Condition();
11618 }
11619 if (("Container" == childName))
11620 {
11621 childValue = new Container();
11622 }
11623 if (("CustomAction" == childName))
11624 {
11625 childValue = new CustomAction();
11626 }
11627 if (("CustomActionRef" == childName))
11628 {
11629 childValue = new CustomActionRef();
11630 }
11631 if (("CustomTable" == childName))
11632 {
11633 childValue = new CustomTable();
11634 }
11635 if (("Directory" == childName))
11636 {
11637 childValue = new Directory();
11638 }
11639 if (("DirectoryRef" == childName))
11640 {
11641 childValue = new DirectoryRef();
11642 }
11643 if (("EmbeddedChainer" == childName))
11644 {
11645 childValue = new EmbeddedChainer();
11646 }
11647 if (("EmbeddedChainerRef" == childName))
11648 {
11649 childValue = new EmbeddedChainerRef();
11650 }
11651 if (("EnsureTable" == childName))
11652 {
11653 childValue = new EnsureTable();
11654 }
11655 if (("Feature" == childName))
11656 {
11657 childValue = new Feature();
11658 }
11659 if (("FeatureGroup" == childName))
11660 {
11661 childValue = new FeatureGroup();
11662 }
11663 if (("FeatureRef" == childName))
11664 {
11665 childValue = new FeatureRef();
11666 }
11667 if (("Icon" == childName))
11668 {
11669 childValue = new Icon();
11670 }
11671 if (("IgnoreModularization" == childName))
11672 {
11673 childValue = new IgnoreModularization();
11674 }
11675 if (("Media" == childName))
11676 {
11677 childValue = new Media();
11678 }
11679 if (("MediaTemplate" == childName))
11680 {
11681 childValue = new MediaTemplate();
11682 }
11683 if (("PackageGroup" == childName))
11684 {
11685 childValue = new PackageGroup();
11686 }
11687 if (("PackageCertificates" == childName))
11688 {
11689 childValue = new PackageCertificates();
11690 }
11691 if (("PatchCertificates" == childName))
11692 {
11693 childValue = new PatchCertificates();
11694 }
11695 if (("PatchFamily" == childName))
11696 {
11697 childValue = new PatchFamily();
11698 }
11699 if (("PatchFamilyGroup" == childName))
11700 {
11701 childValue = new PatchFamilyGroup();
11702 }
11703 if (("PayloadGroup" == childName))
11704 {
11705 childValue = new PayloadGroup();
11706 }
11707 if (("Property" == childName))
11708 {
11709 childValue = new Property();
11710 }
11711 if (("PropertyRef" == childName))
11712 {
11713 childValue = new PropertyRef();
11714 }
11715 if (("RelatedBundle" == childName))
11716 {
11717 childValue = new RelatedBundle();
11718 }
11719 if (("SetDirectory" == childName))
11720 {
11721 childValue = new SetDirectory();
11722 }
11723 if (("SetProperty" == childName))
11724 {
11725 childValue = new SetProperty();
11726 }
11727 if (("SFPCatalog" == childName))
11728 {
11729 childValue = new SFPCatalog();
11730 }
11731 if (("UI" == childName))
11732 {
11733 childValue = new UI();
11734 }
11735 if (("UIRef" == childName))
11736 {
11737 childValue = new UIRef();
11738 }
11739 if (("Upgrade" == childName))
11740 {
11741 childValue = new Upgrade();
11742 }
11743 if (("Variable" == childName))
11744 {
11745 childValue = new Variable();
11746 }
11747 if (("WixVariable" == childName))
11748 {
11749 childValue = new WixVariable();
11750 }
11751 if (("InstallExecuteSequence" == childName))
11752 {
11753 childValue = new InstallExecuteSequence();
11754 }
11755 if (("InstallUISequence" == childName))
11756 {
11757 childValue = new InstallUISequence();
11758 }
11759 if (("AdminExecuteSequence" == childName))
11760 {
11761 childValue = new AdminExecuteSequence();
11762 }
11763 if (("AdminUISequence" == childName))
11764 {
11765 childValue = new AdminUISequence();
11766 }
11767 if (("AdvertiseExecuteSequence" == childName))
11768 {
11769 childValue = new AdvertiseExecuteSequence();
11770 }
11771 if ((null == childValue))
11772 {
11773 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
11774 }
11775 return childValue;
11776 }
11777
11778 /// <summary>
11779 /// Processes this element and all child elements into an XmlWriter.
11780 /// </summary>
11781 public virtual void OutputXml(XmlWriter writer)
11782 {
11783 if ((null == writer))
11784 {
11785 throw new ArgumentNullException("writer");
11786 }
11787 writer.WriteStartElement("Fragment", "http://wixtoolset.org/schemas/v4/wxs");
11788 if (this.idFieldSet)
11789 {
11790 writer.WriteAttributeString("Id", this.idField);
11791 }
11792 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
11793 {
11794 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
11795 childElement.OutputXml(writer);
11796 }
11797 writer.WriteEndElement();
11798 }
11799
11800 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11801 void ISetAttributes.SetAttribute(string name, string value)
11802 {
11803 if (String.IsNullOrEmpty(name))
11804 {
11805 throw new ArgumentNullException("name");
11806 }
11807 if (("Id" == name))
11808 {
11809 this.idField = value;
11810 this.idFieldSet = true;
11811 }
11812 }
11813 }
11814
11815 /// <summary>
11816 /// The Patch element is analogous to the main function in a C program. When linking, only one Patch section
11817 /// can be given to the linker to produce a successful result. Using this element creates an MSP file.
11818 /// </summary>
11819 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
11820 public class Patch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
11821 {
11822
11823 private ElementCollection children;
11824
11825 private string idField;
11826
11827 private bool idFieldSet;
11828
11829 private string codepageField;
11830
11831 private bool codepageFieldSet;
11832
11833 private YesNoType allowRemovalField;
11834
11835 private bool allowRemovalFieldSet;
11836
11837 private string classificationField;
11838
11839 private bool classificationFieldSet;
11840
11841 private string clientPatchIdField;
11842
11843 private bool clientPatchIdFieldSet;
11844
11845 private YesNoType apiPatchingSymbolNoImagehlpFlagField;
11846
11847 private bool apiPatchingSymbolNoImagehlpFlagFieldSet;
11848
11849 private YesNoType apiPatchingSymbolNoFailuresFlagField;
11850
11851 private bool apiPatchingSymbolNoFailuresFlagFieldSet;
11852
11853 private YesNoType apiPatchingSymbolUndecoratedTooFlagField;
11854
11855 private bool apiPatchingSymbolUndecoratedTooFlagFieldSet;
11856
11857 private string descriptionField;
11858
11859 private bool descriptionFieldSet;
11860
11861 private string displayNameField;
11862
11863 private bool displayNameFieldSet;
11864
11865 private string commentsField;
11866
11867 private bool commentsFieldSet;
11868
11869 private string manufacturerField;
11870
11871 private bool manufacturerFieldSet;
11872
11873 private YesNoType minorUpdateTargetRTMField;
11874
11875 private bool minorUpdateTargetRTMFieldSet;
11876
11877 private string moreInfoURLField;
11878
11879 private bool moreInfoURLFieldSet;
11880
11881 private YesNoType optimizedInstallModeField;
11882
11883 private bool optimizedInstallModeFieldSet;
11884
11885 private string targetProductNameField;
11886
11887 private bool targetProductNameFieldSet;
11888
11889 private YesNoType optimizePatchSizeForLargeFilesField;
11890
11891 private bool optimizePatchSizeForLargeFilesFieldSet;
11892
11893 private ISchemaElement parentElement;
11894
11895 public Patch()
11896 {
11897 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
11898 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
11899 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchInformation)));
11900 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Media)));
11901 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(OptimizeCustomActions)));
11902 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily)));
11903 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyRef)));
11904 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroup)));
11905 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroupRef)));
11906 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchProperty)));
11907 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCodes)));
11908 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
11909 childCollection0.AddCollection(childCollection1);
11910 this.children = childCollection0;
11911 }
11912
11913 public virtual IEnumerable Children
11914 {
11915 get
11916 {
11917 return this.children;
11918 }
11919 }
11920
11921 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
11922 public virtual IEnumerable this[System.Type childType]
11923 {
11924 get
11925 {
11926 return this.children.Filter(childType);
11927 }
11928 }
11929
11930 /// <summary>
11931 /// Patch code for this patch.
11932 /// </summary>
11933 public string Id
11934 {
11935 get
11936 {
11937 return this.idField;
11938 }
11939 set
11940 {
11941 this.idFieldSet = true;
11942 this.idField = value;
11943 }
11944 }
11945
11946 /// <summary>
11947 /// The code page integer value or web name for the resulting MSP. See remarks for more information.
11948 /// </summary>
11949 public string Codepage
11950 {
11951 get
11952 {
11953 return this.codepageField;
11954 }
11955 set
11956 {
11957 this.codepageFieldSet = true;
11958 this.codepageField = value;
11959 }
11960 }
11961
11962 /// <summary>
11963 /// Whether this is an uninstallable patch.
11964 /// </summary>
11965 public YesNoType AllowRemoval
11966 {
11967 get
11968 {
11969 return this.allowRemovalField;
11970 }
11971 set
11972 {
11973 this.allowRemovalFieldSet = true;
11974 this.allowRemovalField = value;
11975 }
11976 }
11977
11978 /// <summary>
11979 /// Category of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup.
11980 /// </summary>
11981 public string Classification
11982 {
11983 get
11984 {
11985 return this.classificationField;
11986 }
11987 set
11988 {
11989 this.classificationFieldSet = true;
11990 this.classificationField = value;
11991 }
11992 }
11993
11994 /// <summary>
11995 /// An easily referenced identity unique to a patch that can be used in product authoring. See remarks for more information.
11996 /// </summary>
11997 public string ClientPatchId
11998 {
11999 get
12000 {
12001 return this.clientPatchIdField;
12002 }
12003 set
12004 {
12005 this.clientPatchIdFieldSet = true;
12006 this.clientPatchIdField = value;
12007 }
12008 }
12009
12010 /// <summary>
12011 /// Flag used when creating a binary file patch. Default is "no". Don't use imagehlp.dll.
12012 /// </summary>
12013 public YesNoType ApiPatchingSymbolNoImagehlpFlag
12014 {
12015 get
12016 {
12017 return this.apiPatchingSymbolNoImagehlpFlagField;
12018 }
12019 set
12020 {
12021 this.apiPatchingSymbolNoImagehlpFlagFieldSet = true;
12022 this.apiPatchingSymbolNoImagehlpFlagField = value;
12023 }
12024 }
12025
12026 /// <summary>
12027 /// Flag used when creating a binary file patch. Default is "no". Don't fail patch due to imagehlp failures.
12028 /// </summary>
12029 public YesNoType ApiPatchingSymbolNoFailuresFlag
12030 {
12031 get
12032 {
12033 return this.apiPatchingSymbolNoFailuresFlagField;
12034 }
12035 set
12036 {
12037 this.apiPatchingSymbolNoFailuresFlagFieldSet = true;
12038 this.apiPatchingSymbolNoFailuresFlagField = value;
12039 }
12040 }
12041
12042 /// <summary>
12043 /// Flag used when creating a binary file patch. Default is "no". After matching decorated symbols, try to match remaining by undecorated names.
12044 /// </summary>
12045 public YesNoType ApiPatchingSymbolUndecoratedTooFlag
12046 {
12047 get
12048 {
12049 return this.apiPatchingSymbolUndecoratedTooFlagField;
12050 }
12051 set
12052 {
12053 this.apiPatchingSymbolUndecoratedTooFlagFieldSet = true;
12054 this.apiPatchingSymbolUndecoratedTooFlagField = value;
12055 }
12056 }
12057
12058 /// <summary>
12059 /// Description of the patch.
12060 /// </summary>
12061 public string Description
12062 {
12063 get
12064 {
12065 return this.descriptionField;
12066 }
12067 set
12068 {
12069 this.descriptionFieldSet = true;
12070 this.descriptionField = value;
12071 }
12072 }
12073
12074 /// <summary>
12075 /// A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on.
12076 /// </summary>
12077 public string DisplayName
12078 {
12079 get
12080 {
12081 return this.displayNameField;
12082 }
12083 set
12084 {
12085 this.displayNameFieldSet = true;
12086 this.displayNameField = value;
12087 }
12088 }
12089
12090 /// <summary>
12091 /// Optional comments for browsing.
12092 /// </summary>
12093 public string Comments
12094 {
12095 get
12096 {
12097 return this.commentsField;
12098 }
12099 set
12100 {
12101 this.commentsFieldSet = true;
12102 this.commentsField = value;
12103 }
12104 }
12105
12106 /// <summary>
12107 /// Vendor releasing the package
12108 /// </summary>
12109 public string Manufacturer
12110 {
12111 get
12112 {
12113 return this.manufacturerField;
12114 }
12115 set
12116 {
12117 this.manufacturerFieldSet = true;
12118 this.manufacturerField = value;
12119 }
12120 }
12121
12122 /// <summary>
12123 /// Indicates that the patch targets the RTM version of the product or the most recent major
12124 /// upgrade patch. Author this optional property in minor update patches that contain sequencing
12125 /// information to indicate that the patch removes all patches up to the RTM version of the
12126 /// product, or up to the most recent major upgrade patch. This property is available beginning
12127 /// with Windows Installer 3.1.
12128 /// </summary>
12129 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
12130 public YesNoType MinorUpdateTargetRTM
12131 {
12132 get
12133 {
12134 return this.minorUpdateTargetRTMField;
12135 }
12136 set
12137 {
12138 this.minorUpdateTargetRTMFieldSet = true;
12139 this.minorUpdateTargetRTMField = value;
12140 }
12141 }
12142
12143 /// <summary>
12144 /// A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on.
12145 /// </summary>
12146 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
12147 public string MoreInfoURL
12148 {
12149 get
12150 {
12151 return this.moreInfoURLField;
12152 }
12153 set
12154 {
12155 this.moreInfoURLFieldSet = true;
12156 this.moreInfoURLField = value;
12157 }
12158 }
12159
12160 /// <summary>
12161 /// If this attribute is set to 'yes' in all the patches to be applied in a transaction, the
12162 /// application of the patch is optimized if possible. Available beginning with Windows Installer 3.1.
12163 /// </summary>
12164 public YesNoType OptimizedInstallMode
12165 {
12166 get
12167 {
12168 return this.optimizedInstallModeField;
12169 }
12170 set
12171 {
12172 this.optimizedInstallModeFieldSet = true;
12173 this.optimizedInstallModeField = value;
12174 }
12175 }
12176
12177 /// <summary>
12178 /// Name of the application or target product suite.
12179 /// </summary>
12180 public string TargetProductName
12181 {
12182 get
12183 {
12184 return this.targetProductNameField;
12185 }
12186 set
12187 {
12188 this.targetProductNameFieldSet = true;
12189 this.targetProductNameField = value;
12190 }
12191 }
12192
12193 /// <summary>
12194 /// When this attribute is set, patches for files greater than approximately 4 MB in size may be made smaller.
12195 /// </summary>
12196 public YesNoType OptimizePatchSizeForLargeFiles
12197 {
12198 get
12199 {
12200 return this.optimizePatchSizeForLargeFilesField;
12201 }
12202 set
12203 {
12204 this.optimizePatchSizeForLargeFilesFieldSet = true;
12205 this.optimizePatchSizeForLargeFilesField = value;
12206 }
12207 }
12208
12209 public virtual ISchemaElement ParentElement
12210 {
12211 get
12212 {
12213 return this.parentElement;
12214 }
12215 set
12216 {
12217 this.parentElement = value;
12218 }
12219 }
12220
12221 public virtual void AddChild(ISchemaElement child)
12222 {
12223 if ((null == child))
12224 {
12225 throw new ArgumentNullException("child");
12226 }
12227 this.children.AddElement(child);
12228 child.ParentElement = this;
12229 }
12230
12231 public virtual void RemoveChild(ISchemaElement child)
12232 {
12233 if ((null == child))
12234 {
12235 throw new ArgumentNullException("child");
12236 }
12237 this.children.RemoveElement(child);
12238 child.ParentElement = null;
12239 }
12240
12241 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
12242 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
12243 ISchemaElement ICreateChildren.CreateChild(string childName)
12244 {
12245 if (String.IsNullOrEmpty(childName))
12246 {
12247 throw new ArgumentNullException("childName");
12248 }
12249 ISchemaElement childValue = null;
12250 if (("PatchInformation" == childName))
12251 {
12252 childValue = new PatchInformation();
12253 }
12254 if (("Media" == childName))
12255 {
12256 childValue = new Media();
12257 }
12258 if (("OptimizeCustomActions" == childName))
12259 {
12260 childValue = new OptimizeCustomActions();
12261 }
12262 if (("PatchFamily" == childName))
12263 {
12264 childValue = new PatchFamily();
12265 }
12266 if (("PatchFamilyRef" == childName))
12267 {
12268 childValue = new PatchFamilyRef();
12269 }
12270 if (("PatchFamilyGroup" == childName))
12271 {
12272 childValue = new PatchFamilyGroup();
12273 }
12274 if (("PatchFamilyGroupRef" == childName))
12275 {
12276 childValue = new PatchFamilyGroupRef();
12277 }
12278 if (("PatchProperty" == childName))
12279 {
12280 childValue = new PatchProperty();
12281 }
12282 if (("TargetProductCodes" == childName))
12283 {
12284 childValue = new TargetProductCodes();
12285 }
12286 if ((null == childValue))
12287 {
12288 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
12289 }
12290 return childValue;
12291 }
12292
12293 /// <summary>
12294 /// Processes this element and all child elements into an XmlWriter.
12295 /// </summary>
12296 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
12297 public virtual void OutputXml(XmlWriter writer)
12298 {
12299 if ((null == writer))
12300 {
12301 throw new ArgumentNullException("writer");
12302 }
12303 writer.WriteStartElement("Patch", "http://wixtoolset.org/schemas/v4/wxs");
12304 if (this.idFieldSet)
12305 {
12306 writer.WriteAttributeString("Id", this.idField);
12307 }
12308 if (this.codepageFieldSet)
12309 {
12310 writer.WriteAttributeString("Codepage", this.codepageField);
12311 }
12312 if (this.allowRemovalFieldSet)
12313 {
12314 if ((this.allowRemovalField == YesNoType.no))
12315 {
12316 writer.WriteAttributeString("AllowRemoval", "no");
12317 }
12318 if ((this.allowRemovalField == YesNoType.yes))
12319 {
12320 writer.WriteAttributeString("AllowRemoval", "yes");
12321 }
12322 }
12323 if (this.classificationFieldSet)
12324 {
12325 writer.WriteAttributeString("Classification", this.classificationField);
12326 }
12327 if (this.clientPatchIdFieldSet)
12328 {
12329 writer.WriteAttributeString("ClientPatchId", this.clientPatchIdField);
12330 }
12331 if (this.apiPatchingSymbolNoImagehlpFlagFieldSet)
12332 {
12333 if ((this.apiPatchingSymbolNoImagehlpFlagField == YesNoType.no))
12334 {
12335 writer.WriteAttributeString("ApiPatchingSymbolNoImagehlpFlag", "no");
12336 }
12337 if ((this.apiPatchingSymbolNoImagehlpFlagField == YesNoType.yes))
12338 {
12339 writer.WriteAttributeString("ApiPatchingSymbolNoImagehlpFlag", "yes");
12340 }
12341 }
12342 if (this.apiPatchingSymbolNoFailuresFlagFieldSet)
12343 {
12344 if ((this.apiPatchingSymbolNoFailuresFlagField == YesNoType.no))
12345 {
12346 writer.WriteAttributeString("ApiPatchingSymbolNoFailuresFlag", "no");
12347 }
12348 if ((this.apiPatchingSymbolNoFailuresFlagField == YesNoType.yes))
12349 {
12350 writer.WriteAttributeString("ApiPatchingSymbolNoFailuresFlag", "yes");
12351 }
12352 }
12353 if (this.apiPatchingSymbolUndecoratedTooFlagFieldSet)
12354 {
12355 if ((this.apiPatchingSymbolUndecoratedTooFlagField == YesNoType.no))
12356 {
12357 writer.WriteAttributeString("ApiPatchingSymbolUndecoratedTooFlag", "no");
12358 }
12359 if ((this.apiPatchingSymbolUndecoratedTooFlagField == YesNoType.yes))
12360 {
12361 writer.WriteAttributeString("ApiPatchingSymbolUndecoratedTooFlag", "yes");
12362 }
12363 }
12364 if (this.descriptionFieldSet)
12365 {
12366 writer.WriteAttributeString("Description", this.descriptionField);
12367 }
12368 if (this.displayNameFieldSet)
12369 {
12370 writer.WriteAttributeString("DisplayName", this.displayNameField);
12371 }
12372 if (this.commentsFieldSet)
12373 {
12374 writer.WriteAttributeString("Comments", this.commentsField);
12375 }
12376 if (this.manufacturerFieldSet)
12377 {
12378 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
12379 }
12380 if (this.minorUpdateTargetRTMFieldSet)
12381 {
12382 if ((this.minorUpdateTargetRTMField == YesNoType.no))
12383 {
12384 writer.WriteAttributeString("MinorUpdateTargetRTM", "no");
12385 }
12386 if ((this.minorUpdateTargetRTMField == YesNoType.yes))
12387 {
12388 writer.WriteAttributeString("MinorUpdateTargetRTM", "yes");
12389 }
12390 }
12391 if (this.moreInfoURLFieldSet)
12392 {
12393 writer.WriteAttributeString("MoreInfoURL", this.moreInfoURLField);
12394 }
12395 if (this.optimizedInstallModeFieldSet)
12396 {
12397 if ((this.optimizedInstallModeField == YesNoType.no))
12398 {
12399 writer.WriteAttributeString("OptimizedInstallMode", "no");
12400 }
12401 if ((this.optimizedInstallModeField == YesNoType.yes))
12402 {
12403 writer.WriteAttributeString("OptimizedInstallMode", "yes");
12404 }
12405 }
12406 if (this.targetProductNameFieldSet)
12407 {
12408 writer.WriteAttributeString("TargetProductName", this.targetProductNameField);
12409 }
12410 if (this.optimizePatchSizeForLargeFilesFieldSet)
12411 {
12412 if ((this.optimizePatchSizeForLargeFilesField == YesNoType.no))
12413 {
12414 writer.WriteAttributeString("OptimizePatchSizeForLargeFiles", "no");
12415 }
12416 if ((this.optimizePatchSizeForLargeFilesField == YesNoType.yes))
12417 {
12418 writer.WriteAttributeString("OptimizePatchSizeForLargeFiles", "yes");
12419 }
12420 }
12421 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
12422 {
12423 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
12424 childElement.OutputXml(writer);
12425 }
12426 writer.WriteEndElement();
12427 }
12428
12429 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
12430 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
12431 void ISetAttributes.SetAttribute(string name, string value)
12432 {
12433 if (String.IsNullOrEmpty(name))
12434 {
12435 throw new ArgumentNullException("name");
12436 }
12437 if (("Id" == name))
12438 {
12439 this.idField = value;
12440 this.idFieldSet = true;
12441 }
12442 if (("Codepage" == name))
12443 {
12444 this.codepageField = value;
12445 this.codepageFieldSet = true;
12446 }
12447 if (("AllowRemoval" == name))
12448 {
12449 this.allowRemovalField = Enums.ParseYesNoType(value);
12450 this.allowRemovalFieldSet = true;
12451 }
12452 if (("Classification" == name))
12453 {
12454 this.classificationField = value;
12455 this.classificationFieldSet = true;
12456 }
12457 if (("ClientPatchId" == name))
12458 {
12459 this.clientPatchIdField = value;
12460 this.clientPatchIdFieldSet = true;
12461 }
12462 if (("ApiPatchingSymbolNoImagehlpFlag" == name))
12463 {
12464 this.apiPatchingSymbolNoImagehlpFlagField = Enums.ParseYesNoType(value);
12465 this.apiPatchingSymbolNoImagehlpFlagFieldSet = true;
12466 }
12467 if (("ApiPatchingSymbolNoFailuresFlag" == name))
12468 {
12469 this.apiPatchingSymbolNoFailuresFlagField = Enums.ParseYesNoType(value);
12470 this.apiPatchingSymbolNoFailuresFlagFieldSet = true;
12471 }
12472 if (("ApiPatchingSymbolUndecoratedTooFlag" == name))
12473 {
12474 this.apiPatchingSymbolUndecoratedTooFlagField = Enums.ParseYesNoType(value);
12475 this.apiPatchingSymbolUndecoratedTooFlagFieldSet = true;
12476 }
12477 if (("Description" == name))
12478 {
12479 this.descriptionField = value;
12480 this.descriptionFieldSet = true;
12481 }
12482 if (("DisplayName" == name))
12483 {
12484 this.displayNameField = value;
12485 this.displayNameFieldSet = true;
12486 }
12487 if (("Comments" == name))
12488 {
12489 this.commentsField = value;
12490 this.commentsFieldSet = true;
12491 }
12492 if (("Manufacturer" == name))
12493 {
12494 this.manufacturerField = value;
12495 this.manufacturerFieldSet = true;
12496 }
12497 if (("MinorUpdateTargetRTM" == name))
12498 {
12499 this.minorUpdateTargetRTMField = Enums.ParseYesNoType(value);
12500 this.minorUpdateTargetRTMFieldSet = true;
12501 }
12502 if (("MoreInfoURL" == name))
12503 {
12504 this.moreInfoURLField = value;
12505 this.moreInfoURLFieldSet = true;
12506 }
12507 if (("OptimizedInstallMode" == name))
12508 {
12509 this.optimizedInstallModeField = Enums.ParseYesNoType(value);
12510 this.optimizedInstallModeFieldSet = true;
12511 }
12512 if (("TargetProductName" == name))
12513 {
12514 this.targetProductNameField = value;
12515 this.targetProductNameFieldSet = true;
12516 }
12517 if (("OptimizePatchSizeForLargeFiles" == name))
12518 {
12519 this.optimizePatchSizeForLargeFilesField = Enums.ParseYesNoType(value);
12520 this.optimizePatchSizeForLargeFilesFieldSet = true;
12521 }
12522 }
12523 }
12524
12525 /// <summary>
12526 /// Sets information in the patch transform that determines if the transform applies to an installed product and what errors should be ignored when applying the patch transform.
12527 /// </summary>
12528 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
12529 public class Validate : ISchemaElement, ISetAttributes
12530 {
12531
12532 private YesNoType productIdField;
12533
12534 private bool productIdFieldSet;
12535
12536 private YesNoType productLanguageField;
12537
12538 private bool productLanguageFieldSet;
12539
12540 private ProductVersionType productVersionField;
12541
12542 private bool productVersionFieldSet;
12543
12544 private ProductVersionOperatorType productVersionOperatorField;
12545
12546 private bool productVersionOperatorFieldSet;
12547
12548 private YesNoType upgradeCodeField;
12549
12550 private bool upgradeCodeFieldSet;
12551
12552 private YesNoType ignoreAddExistingRowField;
12553
12554 private bool ignoreAddExistingRowFieldSet;
12555
12556 private YesNoType ignoreAddExistingTableField;
12557
12558 private bool ignoreAddExistingTableFieldSet;
12559
12560 private YesNoType ignoreDeleteMissingRowField;
12561
12562 private bool ignoreDeleteMissingRowFieldSet;
12563
12564 private YesNoType ignoreDeleteMissingTableField;
12565
12566 private bool ignoreDeleteMissingTableFieldSet;
12567
12568 private YesNoType ignoreUpdateMissingRowField;
12569
12570 private bool ignoreUpdateMissingRowFieldSet;
12571
12572 private YesNoType ignoreChangingCodePageField;
12573
12574 private bool ignoreChangingCodePageFieldSet;
12575
12576 private ISchemaElement parentElement;
12577
12578 /// <summary>
12579 /// Requires that the installed ProductCode match the target ProductCode used to create the transform. The default is 'yes'.
12580 /// </summary>
12581 public YesNoType ProductId
12582 {
12583 get
12584 {
12585 return this.productIdField;
12586 }
12587 set
12588 {
12589 this.productIdFieldSet = true;
12590 this.productIdField = value;
12591 }
12592 }
12593
12594 /// <summary>
12595 /// Requires that the installed ProductLanguage match the target ProductLanguage used to create the transform. The default is 'no'.
12596 /// </summary>
12597 public YesNoType ProductLanguage
12598 {
12599 get
12600 {
12601 return this.productLanguageField;
12602 }
12603 set
12604 {
12605 this.productLanguageFieldSet = true;
12606 this.productLanguageField = value;
12607 }
12608 }
12609
12610 /// <summary>
12611 /// Determines how many fields of the installed ProductVersion to compare. See remarks for more information. The default is 'Update'.
12612 /// </summary>
12613 public ProductVersionType ProductVersion
12614 {
12615 get
12616 {
12617 return this.productVersionField;
12618 }
12619 set
12620 {
12621 this.productVersionFieldSet = true;
12622 this.productVersionField = value;
12623 }
12624 }
12625
12626 /// <summary>
12627 /// Determines how the installed ProductVersion is compared to the target ProductVersion used to create the transform. See remarks for more information. The default is 'Equal'.
12628 /// </summary>
12629 public ProductVersionOperatorType ProductVersionOperator
12630 {
12631 get
12632 {
12633 return this.productVersionOperatorField;
12634 }
12635 set
12636 {
12637 this.productVersionOperatorFieldSet = true;
12638 this.productVersionOperatorField = value;
12639 }
12640 }
12641
12642 /// <summary>
12643 /// Requires that the installed UpgradeCode match the target UpgradeCode used to create the transform. The default is 'yes'.
12644 /// </summary>
12645 public YesNoType UpgradeCode
12646 {
12647 get
12648 {
12649 return this.upgradeCodeField;
12650 }
12651 set
12652 {
12653 this.upgradeCodeFieldSet = true;
12654 this.upgradeCodeField = value;
12655 }
12656 }
12657
12658 /// <summary>
12659 /// Ignore errors when adding existing rows. The default is 'yes'.
12660 /// </summary>
12661 public YesNoType IgnoreAddExistingRow
12662 {
12663 get
12664 {
12665 return this.ignoreAddExistingRowField;
12666 }
12667 set
12668 {
12669 this.ignoreAddExistingRowFieldSet = true;
12670 this.ignoreAddExistingRowField = value;
12671 }
12672 }
12673
12674 /// <summary>
12675 /// Ignore errors when adding existing tables. The default is 'yes'.
12676 /// </summary>
12677 public YesNoType IgnoreAddExistingTable
12678 {
12679 get
12680 {
12681 return this.ignoreAddExistingTableField;
12682 }
12683 set
12684 {
12685 this.ignoreAddExistingTableFieldSet = true;
12686 this.ignoreAddExistingTableField = value;
12687 }
12688 }
12689
12690 /// <summary>
12691 /// Ignore errors when deleting missing rows. The default is 'yes'.
12692 /// </summary>
12693 public YesNoType IgnoreDeleteMissingRow
12694 {
12695 get
12696 {
12697 return this.ignoreDeleteMissingRowField;
12698 }
12699 set
12700 {
12701 this.ignoreDeleteMissingRowFieldSet = true;
12702 this.ignoreDeleteMissingRowField = value;
12703 }
12704 }
12705
12706 /// <summary>
12707 /// Ignore errors when deleting missing tables. The default is 'yes'.
12708 /// </summary>
12709 public YesNoType IgnoreDeleteMissingTable
12710 {
12711 get
12712 {
12713 return this.ignoreDeleteMissingTableField;
12714 }
12715 set
12716 {
12717 this.ignoreDeleteMissingTableFieldSet = true;
12718 this.ignoreDeleteMissingTableField = value;
12719 }
12720 }
12721
12722 /// <summary>
12723 /// Ignore errors when updating missing rows. The default is 'yes'.
12724 /// </summary>
12725 public YesNoType IgnoreUpdateMissingRow
12726 {
12727 get
12728 {
12729 return this.ignoreUpdateMissingRowField;
12730 }
12731 set
12732 {
12733 this.ignoreUpdateMissingRowFieldSet = true;
12734 this.ignoreUpdateMissingRowField = value;
12735 }
12736 }
12737
12738 /// <summary>
12739 /// Ignore errors when changing the database code page. The default is 'no'.
12740 /// </summary>
12741 public YesNoType IgnoreChangingCodePage
12742 {
12743 get
12744 {
12745 return this.ignoreChangingCodePageField;
12746 }
12747 set
12748 {
12749 this.ignoreChangingCodePageFieldSet = true;
12750 this.ignoreChangingCodePageField = value;
12751 }
12752 }
12753
12754 public virtual ISchemaElement ParentElement
12755 {
12756 get
12757 {
12758 return this.parentElement;
12759 }
12760 set
12761 {
12762 this.parentElement = value;
12763 }
12764 }
12765
12766 /// <summary>
12767 /// Parses a ProductVersionType from a string.
12768 /// </summary>
12769 public static ProductVersionType ParseProductVersionType(string value)
12770 {
12771 ProductVersionType parsedValue;
12772 Validate.TryParseProductVersionType(value, out parsedValue);
12773 return parsedValue;
12774 }
12775
12776 /// <summary>
12777 /// Tries to parse a ProductVersionType from a string.
12778 /// </summary>
12779 public static bool TryParseProductVersionType(string value, out ProductVersionType parsedValue)
12780 {
12781 parsedValue = ProductVersionType.NotSet;
12782 if (string.IsNullOrEmpty(value))
12783 {
12784 return false;
12785 }
12786 if (("Major" == value))
12787 {
12788 parsedValue = ProductVersionType.Major;
12789 }
12790 else
12791 {
12792 if (("Minor" == value))
12793 {
12794 parsedValue = ProductVersionType.Minor;
12795 }
12796 else
12797 {
12798 if (("Update" == value))
12799 {
12800 parsedValue = ProductVersionType.Update;
12801 }
12802 else
12803 {
12804 parsedValue = ProductVersionType.IllegalValue;
12805 return false;
12806 }
12807 }
12808 }
12809 return true;
12810 }
12811
12812 /// <summary>
12813 /// Parses a ProductVersionOperatorType from a string.
12814 /// </summary>
12815 public static ProductVersionOperatorType ParseProductVersionOperatorType(string value)
12816 {
12817 ProductVersionOperatorType parsedValue;
12818 Validate.TryParseProductVersionOperatorType(value, out parsedValue);
12819 return parsedValue;
12820 }
12821
12822 /// <summary>
12823 /// Tries to parse a ProductVersionOperatorType from a string.
12824 /// </summary>
12825 public static bool TryParseProductVersionOperatorType(string value, out ProductVersionOperatorType parsedValue)
12826 {
12827 parsedValue = ProductVersionOperatorType.NotSet;
12828 if (string.IsNullOrEmpty(value))
12829 {
12830 return false;
12831 }
12832 if (("Lesser" == value))
12833 {
12834 parsedValue = ProductVersionOperatorType.Lesser;
12835 }
12836 else
12837 {
12838 if (("LesserOrEqual" == value))
12839 {
12840 parsedValue = ProductVersionOperatorType.LesserOrEqual;
12841 }
12842 else
12843 {
12844 if (("Equal" == value))
12845 {
12846 parsedValue = ProductVersionOperatorType.Equal;
12847 }
12848 else
12849 {
12850 if (("GreaterOrEqual" == value))
12851 {
12852 parsedValue = ProductVersionOperatorType.GreaterOrEqual;
12853 }
12854 else
12855 {
12856 if (("Greater" == value))
12857 {
12858 parsedValue = ProductVersionOperatorType.Greater;
12859 }
12860 else
12861 {
12862 parsedValue = ProductVersionOperatorType.IllegalValue;
12863 return false;
12864 }
12865 }
12866 }
12867 }
12868 }
12869 return true;
12870 }
12871
12872 /// <summary>
12873 /// Processes this element and all child elements into an XmlWriter.
12874 /// </summary>
12875 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
12876 public virtual void OutputXml(XmlWriter writer)
12877 {
12878 if ((null == writer))
12879 {
12880 throw new ArgumentNullException("writer");
12881 }
12882 writer.WriteStartElement("Validate", "http://wixtoolset.org/schemas/v4/wxs");
12883 if (this.productIdFieldSet)
12884 {
12885 if ((this.productIdField == YesNoType.no))
12886 {
12887 writer.WriteAttributeString("ProductId", "no");
12888 }
12889 if ((this.productIdField == YesNoType.yes))
12890 {
12891 writer.WriteAttributeString("ProductId", "yes");
12892 }
12893 }
12894 if (this.productLanguageFieldSet)
12895 {
12896 if ((this.productLanguageField == YesNoType.no))
12897 {
12898 writer.WriteAttributeString("ProductLanguage", "no");
12899 }
12900 if ((this.productLanguageField == YesNoType.yes))
12901 {
12902 writer.WriteAttributeString("ProductLanguage", "yes");
12903 }
12904 }
12905 if (this.productVersionFieldSet)
12906 {
12907 if ((this.productVersionField == ProductVersionType.Major))
12908 {
12909 writer.WriteAttributeString("ProductVersion", "Major");
12910 }
12911 if ((this.productVersionField == ProductVersionType.Minor))
12912 {
12913 writer.WriteAttributeString("ProductVersion", "Minor");
12914 }
12915 if ((this.productVersionField == ProductVersionType.Update))
12916 {
12917 writer.WriteAttributeString("ProductVersion", "Update");
12918 }
12919 }
12920 if (this.productVersionOperatorFieldSet)
12921 {
12922 if ((this.productVersionOperatorField == ProductVersionOperatorType.Lesser))
12923 {
12924 writer.WriteAttributeString("ProductVersionOperator", "Lesser");
12925 }
12926 if ((this.productVersionOperatorField == ProductVersionOperatorType.LesserOrEqual))
12927 {
12928 writer.WriteAttributeString("ProductVersionOperator", "LesserOrEqual");
12929 }
12930 if ((this.productVersionOperatorField == ProductVersionOperatorType.Equal))
12931 {
12932 writer.WriteAttributeString("ProductVersionOperator", "Equal");
12933 }
12934 if ((this.productVersionOperatorField == ProductVersionOperatorType.GreaterOrEqual))
12935 {
12936 writer.WriteAttributeString("ProductVersionOperator", "GreaterOrEqual");
12937 }
12938 if ((this.productVersionOperatorField == ProductVersionOperatorType.Greater))
12939 {
12940 writer.WriteAttributeString("ProductVersionOperator", "Greater");
12941 }
12942 }
12943 if (this.upgradeCodeFieldSet)
12944 {
12945 if ((this.upgradeCodeField == YesNoType.no))
12946 {
12947 writer.WriteAttributeString("UpgradeCode", "no");
12948 }
12949 if ((this.upgradeCodeField == YesNoType.yes))
12950 {
12951 writer.WriteAttributeString("UpgradeCode", "yes");
12952 }
12953 }
12954 if (this.ignoreAddExistingRowFieldSet)
12955 {
12956 if ((this.ignoreAddExistingRowField == YesNoType.no))
12957 {
12958 writer.WriteAttributeString("IgnoreAddExistingRow", "no");
12959 }
12960 if ((this.ignoreAddExistingRowField == YesNoType.yes))
12961 {
12962 writer.WriteAttributeString("IgnoreAddExistingRow", "yes");
12963 }
12964 }
12965 if (this.ignoreAddExistingTableFieldSet)
12966 {
12967 if ((this.ignoreAddExistingTableField == YesNoType.no))
12968 {
12969 writer.WriteAttributeString("IgnoreAddExistingTable", "no");
12970 }
12971 if ((this.ignoreAddExistingTableField == YesNoType.yes))
12972 {
12973 writer.WriteAttributeString("IgnoreAddExistingTable", "yes");
12974 }
12975 }
12976 if (this.ignoreDeleteMissingRowFieldSet)
12977 {
12978 if ((this.ignoreDeleteMissingRowField == YesNoType.no))
12979 {
12980 writer.WriteAttributeString("IgnoreDeleteMissingRow", "no");
12981 }
12982 if ((this.ignoreDeleteMissingRowField == YesNoType.yes))
12983 {
12984 writer.WriteAttributeString("IgnoreDeleteMissingRow", "yes");
12985 }
12986 }
12987 if (this.ignoreDeleteMissingTableFieldSet)
12988 {
12989 if ((this.ignoreDeleteMissingTableField == YesNoType.no))
12990 {
12991 writer.WriteAttributeString("IgnoreDeleteMissingTable", "no");
12992 }
12993 if ((this.ignoreDeleteMissingTableField == YesNoType.yes))
12994 {
12995 writer.WriteAttributeString("IgnoreDeleteMissingTable", "yes");
12996 }
12997 }
12998 if (this.ignoreUpdateMissingRowFieldSet)
12999 {
13000 if ((this.ignoreUpdateMissingRowField == YesNoType.no))
13001 {
13002 writer.WriteAttributeString("IgnoreUpdateMissingRow", "no");
13003 }
13004 if ((this.ignoreUpdateMissingRowField == YesNoType.yes))
13005 {
13006 writer.WriteAttributeString("IgnoreUpdateMissingRow", "yes");
13007 }
13008 }
13009 if (this.ignoreChangingCodePageFieldSet)
13010 {
13011 if ((this.ignoreChangingCodePageField == YesNoType.no))
13012 {
13013 writer.WriteAttributeString("IgnoreChangingCodePage", "no");
13014 }
13015 if ((this.ignoreChangingCodePageField == YesNoType.yes))
13016 {
13017 writer.WriteAttributeString("IgnoreChangingCodePage", "yes");
13018 }
13019 }
13020 writer.WriteEndElement();
13021 }
13022
13023 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13024 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
13025 void ISetAttributes.SetAttribute(string name, string value)
13026 {
13027 if (String.IsNullOrEmpty(name))
13028 {
13029 throw new ArgumentNullException("name");
13030 }
13031 if (("ProductId" == name))
13032 {
13033 this.productIdField = Enums.ParseYesNoType(value);
13034 this.productIdFieldSet = true;
13035 }
13036 if (("ProductLanguage" == name))
13037 {
13038 this.productLanguageField = Enums.ParseYesNoType(value);
13039 this.productLanguageFieldSet = true;
13040 }
13041 if (("ProductVersion" == name))
13042 {
13043 this.productVersionField = Validate.ParseProductVersionType(value);
13044 this.productVersionFieldSet = true;
13045 }
13046 if (("ProductVersionOperator" == name))
13047 {
13048 this.productVersionOperatorField = Validate.ParseProductVersionOperatorType(value);
13049 this.productVersionOperatorFieldSet = true;
13050 }
13051 if (("UpgradeCode" == name))
13052 {
13053 this.upgradeCodeField = Enums.ParseYesNoType(value);
13054 this.upgradeCodeFieldSet = true;
13055 }
13056 if (("IgnoreAddExistingRow" == name))
13057 {
13058 this.ignoreAddExistingRowField = Enums.ParseYesNoType(value);
13059 this.ignoreAddExistingRowFieldSet = true;
13060 }
13061 if (("IgnoreAddExistingTable" == name))
13062 {
13063 this.ignoreAddExistingTableField = Enums.ParseYesNoType(value);
13064 this.ignoreAddExistingTableFieldSet = true;
13065 }
13066 if (("IgnoreDeleteMissingRow" == name))
13067 {
13068 this.ignoreDeleteMissingRowField = Enums.ParseYesNoType(value);
13069 this.ignoreDeleteMissingRowFieldSet = true;
13070 }
13071 if (("IgnoreDeleteMissingTable" == name))
13072 {
13073 this.ignoreDeleteMissingTableField = Enums.ParseYesNoType(value);
13074 this.ignoreDeleteMissingTableFieldSet = true;
13075 }
13076 if (("IgnoreUpdateMissingRow" == name))
13077 {
13078 this.ignoreUpdateMissingRowField = Enums.ParseYesNoType(value);
13079 this.ignoreUpdateMissingRowFieldSet = true;
13080 }
13081 if (("IgnoreChangingCodePage" == name))
13082 {
13083 this.ignoreChangingCodePageField = Enums.ParseYesNoType(value);
13084 this.ignoreChangingCodePageFieldSet = true;
13085 }
13086 }
13087
13088 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13089 public enum ProductVersionType
13090 {
13091
13092 IllegalValue = int.MaxValue,
13093
13094 NotSet = -1,
13095
13096 /// <summary>
13097 /// Checks the major version.
13098 /// </summary>
13099 Major,
13100
13101 /// <summary>
13102 /// Checks the major and minor versions.
13103 /// </summary>
13104 Minor,
13105
13106 /// <summary>
13107 /// Checks the major, minor, and update versions.
13108 /// </summary>
13109 Update,
13110 }
13111
13112 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13113 public enum ProductVersionOperatorType
13114 {
13115
13116 IllegalValue = int.MaxValue,
13117
13118 NotSet = -1,
13119
13120 /// <summary>
13121 /// Installed ProductVersion &lt; target ProductVersion.
13122 /// </summary>
13123 Lesser,
13124
13125 /// <summary>
13126 /// Installed ProductVersion &lt;= target ProductVersion.
13127 /// </summary>
13128 LesserOrEqual,
13129
13130 /// <summary>
13131 /// Installed ProductVersion = target ProductVersion.
13132 /// </summary>
13133 Equal,
13134
13135 /// <summary>
13136 /// Installed ProductVersion &gt;= target ProductVersion.
13137 /// </summary>
13138 GreaterOrEqual,
13139
13140 /// <summary>
13141 /// Installed ProductVersion &gt; target ProductVersion.
13142 /// </summary>
13143 Greater,
13144 }
13145 }
13146
13147 /// <summary>
13148 /// Indicates whether custom actions can be skipped when applying the patch.
13149 /// </summary>
13150 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13151 public class OptimizeCustomActions : ISchemaElement, ISetAttributes
13152 {
13153
13154 private YesNoType skipAssignmentField;
13155
13156 private bool skipAssignmentFieldSet;
13157
13158 private YesNoType skipImmediateField;
13159
13160 private bool skipImmediateFieldSet;
13161
13162 private YesNoType skipDeferredField;
13163
13164 private bool skipDeferredFieldSet;
13165
13166 private ISchemaElement parentElement;
13167
13168 /// <summary>
13169 /// Skip property (type 51) and directory (type 35) assignment custom actions.
13170 /// </summary>
13171 public YesNoType SkipAssignment
13172 {
13173 get
13174 {
13175 return this.skipAssignmentField;
13176 }
13177 set
13178 {
13179 this.skipAssignmentFieldSet = true;
13180 this.skipAssignmentField = value;
13181 }
13182 }
13183
13184 /// <summary>
13185 /// Skip immediate custom actions that are not property or directory assignment custom actions.
13186 /// </summary>
13187 public YesNoType SkipImmediate
13188 {
13189 get
13190 {
13191 return this.skipImmediateField;
13192 }
13193 set
13194 {
13195 this.skipImmediateFieldSet = true;
13196 this.skipImmediateField = value;
13197 }
13198 }
13199
13200 /// <summary>
13201 /// Skip custom actions that run within the script.
13202 /// </summary>
13203 public YesNoType SkipDeferred
13204 {
13205 get
13206 {
13207 return this.skipDeferredField;
13208 }
13209 set
13210 {
13211 this.skipDeferredFieldSet = true;
13212 this.skipDeferredField = value;
13213 }
13214 }
13215
13216 public virtual ISchemaElement ParentElement
13217 {
13218 get
13219 {
13220 return this.parentElement;
13221 }
13222 set
13223 {
13224 this.parentElement = value;
13225 }
13226 }
13227
13228 /// <summary>
13229 /// Processes this element and all child elements into an XmlWriter.
13230 /// </summary>
13231 public virtual void OutputXml(XmlWriter writer)
13232 {
13233 if ((null == writer))
13234 {
13235 throw new ArgumentNullException("writer");
13236 }
13237 writer.WriteStartElement("OptimizeCustomActions", "http://wixtoolset.org/schemas/v4/wxs");
13238 if (this.skipAssignmentFieldSet)
13239 {
13240 if ((this.skipAssignmentField == YesNoType.no))
13241 {
13242 writer.WriteAttributeString("SkipAssignment", "no");
13243 }
13244 if ((this.skipAssignmentField == YesNoType.yes))
13245 {
13246 writer.WriteAttributeString("SkipAssignment", "yes");
13247 }
13248 }
13249 if (this.skipImmediateFieldSet)
13250 {
13251 if ((this.skipImmediateField == YesNoType.no))
13252 {
13253 writer.WriteAttributeString("SkipImmediate", "no");
13254 }
13255 if ((this.skipImmediateField == YesNoType.yes))
13256 {
13257 writer.WriteAttributeString("SkipImmediate", "yes");
13258 }
13259 }
13260 if (this.skipDeferredFieldSet)
13261 {
13262 if ((this.skipDeferredField == YesNoType.no))
13263 {
13264 writer.WriteAttributeString("SkipDeferred", "no");
13265 }
13266 if ((this.skipDeferredField == YesNoType.yes))
13267 {
13268 writer.WriteAttributeString("SkipDeferred", "yes");
13269 }
13270 }
13271 writer.WriteEndElement();
13272 }
13273
13274 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13275 void ISetAttributes.SetAttribute(string name, string value)
13276 {
13277 if (String.IsNullOrEmpty(name))
13278 {
13279 throw new ArgumentNullException("name");
13280 }
13281 if (("SkipAssignment" == name))
13282 {
13283 this.skipAssignmentField = Enums.ParseYesNoType(value);
13284 this.skipAssignmentFieldSet = true;
13285 }
13286 if (("SkipImmediate" == name))
13287 {
13288 this.skipImmediateField = Enums.ParseYesNoType(value);
13289 this.skipImmediateFieldSet = true;
13290 }
13291 if (("SkipDeferred" == name))
13292 {
13293 this.skipDeferredField = Enums.ParseYesNoType(value);
13294 this.skipDeferredFieldSet = true;
13295 }
13296 }
13297 }
13298
13299 /// <summary>
13300 /// Identifies a set of product versions.
13301 /// </summary>
13302 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13303 public class PatchBaseline : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
13304 {
13305
13306 private ElementCollection children;
13307
13308 private string idField;
13309
13310 private bool idFieldSet;
13311
13312 private ISchemaElement parentElement;
13313
13314 public PatchBaseline()
13315 {
13316 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
13317 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Validate)));
13318 this.children = childCollection0;
13319 }
13320
13321 public virtual IEnumerable Children
13322 {
13323 get
13324 {
13325 return this.children;
13326 }
13327 }
13328
13329 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
13330 public virtual IEnumerable this[System.Type childType]
13331 {
13332 get
13333 {
13334 return this.children.Filter(childType);
13335 }
13336 }
13337
13338 /// <summary>
13339 /// Identifier for a set of product versions.
13340 /// </summary>
13341 public string Id
13342 {
13343 get
13344 {
13345 return this.idField;
13346 }
13347 set
13348 {
13349 this.idFieldSet = true;
13350 this.idField = value;
13351 }
13352 }
13353
13354 public virtual ISchemaElement ParentElement
13355 {
13356 get
13357 {
13358 return this.parentElement;
13359 }
13360 set
13361 {
13362 this.parentElement = value;
13363 }
13364 }
13365
13366 public virtual void AddChild(ISchemaElement child)
13367 {
13368 if ((null == child))
13369 {
13370 throw new ArgumentNullException("child");
13371 }
13372 this.children.AddElement(child);
13373 child.ParentElement = this;
13374 }
13375
13376 public virtual void RemoveChild(ISchemaElement child)
13377 {
13378 if ((null == child))
13379 {
13380 throw new ArgumentNullException("child");
13381 }
13382 this.children.RemoveElement(child);
13383 child.ParentElement = null;
13384 }
13385
13386 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13387 ISchemaElement ICreateChildren.CreateChild(string childName)
13388 {
13389 if (String.IsNullOrEmpty(childName))
13390 {
13391 throw new ArgumentNullException("childName");
13392 }
13393 ISchemaElement childValue = null;
13394 if (("Validate" == childName))
13395 {
13396 childValue = new Validate();
13397 }
13398 if ((null == childValue))
13399 {
13400 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
13401 }
13402 return childValue;
13403 }
13404
13405 /// <summary>
13406 /// Processes this element and all child elements into an XmlWriter.
13407 /// </summary>
13408 public virtual void OutputXml(XmlWriter writer)
13409 {
13410 if ((null == writer))
13411 {
13412 throw new ArgumentNullException("writer");
13413 }
13414 writer.WriteStartElement("PatchBaseline", "http://wixtoolset.org/schemas/v4/wxs");
13415 if (this.idFieldSet)
13416 {
13417 writer.WriteAttributeString("Id", this.idField);
13418 }
13419 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
13420 {
13421 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
13422 childElement.OutputXml(writer);
13423 }
13424 writer.WriteEndElement();
13425 }
13426
13427 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13428 void ISetAttributes.SetAttribute(string name, string value)
13429 {
13430 if (String.IsNullOrEmpty(name))
13431 {
13432 throw new ArgumentNullException("name");
13433 }
13434 if (("Id" == name))
13435 {
13436 this.idField = value;
13437 this.idFieldSet = true;
13438 }
13439 }
13440 }
13441
13442 /// <summary>
13443 /// Collection of items that should be kept from the differences between two products.
13444 /// </summary>
13445 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13446 public class PatchFamily : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
13447 {
13448
13449 private ElementCollection children;
13450
13451 private string idField;
13452
13453 private bool idFieldSet;
13454
13455 private string productCodeField;
13456
13457 private bool productCodeFieldSet;
13458
13459 private string versionField;
13460
13461 private bool versionFieldSet;
13462
13463 private YesNoType supersedeField;
13464
13465 private bool supersedeFieldSet;
13466
13467 private ISchemaElement parentElement;
13468
13469 public PatchFamily()
13470 {
13471 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
13472 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
13473 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(All)));
13474 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(BinaryRef)));
13475 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
13476 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef)));
13477 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificateRef)));
13478 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef)));
13479 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
13480 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IconRef)));
13481 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef)));
13482 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef)));
13483 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
13484 childCollection0.AddCollection(childCollection1);
13485 this.children = childCollection0;
13486 }
13487
13488 public virtual IEnumerable Children
13489 {
13490 get
13491 {
13492 return this.children;
13493 }
13494 }
13495
13496 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
13497 public virtual IEnumerable this[System.Type childType]
13498 {
13499 get
13500 {
13501 return this.children.Filter(childType);
13502 }
13503 }
13504
13505 /// <summary>
13506 /// Identifier which indicates a sequence family to which this patch belongs.
13507 /// </summary>
13508 public string Id
13509 {
13510 get
13511 {
13512 return this.idField;
13513 }
13514 set
13515 {
13516 this.idFieldSet = true;
13517 this.idField = value;
13518 }
13519 }
13520
13521 /// <summary>
13522 /// Specifies the ProductCode of the product that this family applies to.
13523 /// </summary>
13524 public string ProductCode
13525 {
13526 get
13527 {
13528 return this.productCodeField;
13529 }
13530 set
13531 {
13532 this.productCodeFieldSet = true;
13533 this.productCodeField = value;
13534 }
13535 }
13536
13537 /// <summary>
13538 /// Used to populate the sequence column of the MsiPatchSequence table in the final MSP file. Specified in x.x.x.x format. See documentation for Sequence column of MsiPatchSequence table in MSI SDK.
13539 /// </summary>
13540 public string Version
13541 {
13542 get
13543 {
13544 return this.versionField;
13545 }
13546 set
13547 {
13548 this.versionFieldSet = true;
13549 this.versionField = value;
13550 }
13551 }
13552
13553 /// <summary>
13554 /// Set this value to 'yes' to indicate that this patch will supersede all previous patches in this patch family.
13555 /// The default value is 'no'.
13556 /// </summary>
13557 public YesNoType Supersede
13558 {
13559 get
13560 {
13561 return this.supersedeField;
13562 }
13563 set
13564 {
13565 this.supersedeFieldSet = true;
13566 this.supersedeField = value;
13567 }
13568 }
13569
13570 public virtual ISchemaElement ParentElement
13571 {
13572 get
13573 {
13574 return this.parentElement;
13575 }
13576 set
13577 {
13578 this.parentElement = value;
13579 }
13580 }
13581
13582 public virtual void AddChild(ISchemaElement child)
13583 {
13584 if ((null == child))
13585 {
13586 throw new ArgumentNullException("child");
13587 }
13588 this.children.AddElement(child);
13589 child.ParentElement = this;
13590 }
13591
13592 public virtual void RemoveChild(ISchemaElement child)
13593 {
13594 if ((null == child))
13595 {
13596 throw new ArgumentNullException("child");
13597 }
13598 this.children.RemoveElement(child);
13599 child.ParentElement = null;
13600 }
13601
13602 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13603 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
13604 ISchemaElement ICreateChildren.CreateChild(string childName)
13605 {
13606 if (String.IsNullOrEmpty(childName))
13607 {
13608 throw new ArgumentNullException("childName");
13609 }
13610 ISchemaElement childValue = null;
13611 if (("All" == childName))
13612 {
13613 childValue = new All();
13614 }
13615 if (("BinaryRef" == childName))
13616 {
13617 childValue = new BinaryRef();
13618 }
13619 if (("ComponentRef" == childName))
13620 {
13621 childValue = new ComponentRef();
13622 }
13623 if (("CustomActionRef" == childName))
13624 {
13625 childValue = new CustomActionRef();
13626 }
13627 if (("DigitalCertificateRef" == childName))
13628 {
13629 childValue = new DigitalCertificateRef();
13630 }
13631 if (("DirectoryRef" == childName))
13632 {
13633 childValue = new DirectoryRef();
13634 }
13635 if (("FeatureRef" == childName))
13636 {
13637 childValue = new FeatureRef();
13638 }
13639 if (("IconRef" == childName))
13640 {
13641 childValue = new IconRef();
13642 }
13643 if (("PropertyRef" == childName))
13644 {
13645 childValue = new PropertyRef();
13646 }
13647 if (("UIRef" == childName))
13648 {
13649 childValue = new UIRef();
13650 }
13651 if ((null == childValue))
13652 {
13653 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
13654 }
13655 return childValue;
13656 }
13657
13658 /// <summary>
13659 /// Processes this element and all child elements into an XmlWriter.
13660 /// </summary>
13661 public virtual void OutputXml(XmlWriter writer)
13662 {
13663 if ((null == writer))
13664 {
13665 throw new ArgumentNullException("writer");
13666 }
13667 writer.WriteStartElement("PatchFamily", "http://wixtoolset.org/schemas/v4/wxs");
13668 if (this.idFieldSet)
13669 {
13670 writer.WriteAttributeString("Id", this.idField);
13671 }
13672 if (this.productCodeFieldSet)
13673 {
13674 writer.WriteAttributeString("ProductCode", this.productCodeField);
13675 }
13676 if (this.versionFieldSet)
13677 {
13678 writer.WriteAttributeString("Version", this.versionField);
13679 }
13680 if (this.supersedeFieldSet)
13681 {
13682 if ((this.supersedeField == YesNoType.no))
13683 {
13684 writer.WriteAttributeString("Supersede", "no");
13685 }
13686 if ((this.supersedeField == YesNoType.yes))
13687 {
13688 writer.WriteAttributeString("Supersede", "yes");
13689 }
13690 }
13691 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
13692 {
13693 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
13694 childElement.OutputXml(writer);
13695 }
13696 writer.WriteEndElement();
13697 }
13698
13699 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13700 void ISetAttributes.SetAttribute(string name, string value)
13701 {
13702 if (String.IsNullOrEmpty(name))
13703 {
13704 throw new ArgumentNullException("name");
13705 }
13706 if (("Id" == name))
13707 {
13708 this.idField = value;
13709 this.idFieldSet = true;
13710 }
13711 if (("ProductCode" == name))
13712 {
13713 this.productCodeField = value;
13714 this.productCodeFieldSet = true;
13715 }
13716 if (("Version" == name))
13717 {
13718 this.versionField = value;
13719 this.versionFieldSet = true;
13720 }
13721 if (("Supersede" == name))
13722 {
13723 this.supersedeField = Enums.ParseYesNoType(value);
13724 this.supersedeFieldSet = true;
13725 }
13726 }
13727 }
13728
13729 /// <summary>
13730 /// Groups together multiple patch families to be used in other locations.
13731 /// </summary>
13732 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13733 public class PatchFamilyGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
13734 {
13735
13736 private ElementCollection children;
13737
13738 private string idField;
13739
13740 private bool idFieldSet;
13741
13742 private ISchemaElement parentElement;
13743
13744 public PatchFamilyGroup()
13745 {
13746 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
13747 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily)));
13748 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyRef)));
13749 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroupRef)));
13750 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
13751 this.children = childCollection0;
13752 }
13753
13754 public virtual IEnumerable Children
13755 {
13756 get
13757 {
13758 return this.children;
13759 }
13760 }
13761
13762 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
13763 public virtual IEnumerable this[System.Type childType]
13764 {
13765 get
13766 {
13767 return this.children.Filter(childType);
13768 }
13769 }
13770
13771 /// <summary>
13772 /// Identifier for the PatchFamilyGroup.
13773 /// </summary>
13774 public string Id
13775 {
13776 get
13777 {
13778 return this.idField;
13779 }
13780 set
13781 {
13782 this.idFieldSet = true;
13783 this.idField = value;
13784 }
13785 }
13786
13787 public virtual ISchemaElement ParentElement
13788 {
13789 get
13790 {
13791 return this.parentElement;
13792 }
13793 set
13794 {
13795 this.parentElement = value;
13796 }
13797 }
13798
13799 public virtual void AddChild(ISchemaElement child)
13800 {
13801 if ((null == child))
13802 {
13803 throw new ArgumentNullException("child");
13804 }
13805 this.children.AddElement(child);
13806 child.ParentElement = this;
13807 }
13808
13809 public virtual void RemoveChild(ISchemaElement child)
13810 {
13811 if ((null == child))
13812 {
13813 throw new ArgumentNullException("child");
13814 }
13815 this.children.RemoveElement(child);
13816 child.ParentElement = null;
13817 }
13818
13819 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13820 ISchemaElement ICreateChildren.CreateChild(string childName)
13821 {
13822 if (String.IsNullOrEmpty(childName))
13823 {
13824 throw new ArgumentNullException("childName");
13825 }
13826 ISchemaElement childValue = null;
13827 if (("PatchFamily" == childName))
13828 {
13829 childValue = new PatchFamily();
13830 }
13831 if (("PatchFamilyRef" == childName))
13832 {
13833 childValue = new PatchFamilyRef();
13834 }
13835 if (("PatchFamilyGroupRef" == childName))
13836 {
13837 childValue = new PatchFamilyGroupRef();
13838 }
13839 if ((null == childValue))
13840 {
13841 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
13842 }
13843 return childValue;
13844 }
13845
13846 /// <summary>
13847 /// Processes this element and all child elements into an XmlWriter.
13848 /// </summary>
13849 public virtual void OutputXml(XmlWriter writer)
13850 {
13851 if ((null == writer))
13852 {
13853 throw new ArgumentNullException("writer");
13854 }
13855 writer.WriteStartElement("PatchFamilyGroup", "http://wixtoolset.org/schemas/v4/wxs");
13856 if (this.idFieldSet)
13857 {
13858 writer.WriteAttributeString("Id", this.idField);
13859 }
13860 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
13861 {
13862 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
13863 childElement.OutputXml(writer);
13864 }
13865 writer.WriteEndElement();
13866 }
13867
13868 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13869 void ISetAttributes.SetAttribute(string name, string value)
13870 {
13871 if (String.IsNullOrEmpty(name))
13872 {
13873 throw new ArgumentNullException("name");
13874 }
13875 if (("Id" == name))
13876 {
13877 this.idField = value;
13878 this.idFieldSet = true;
13879 }
13880 }
13881 }
13882
13883 /// <summary>
13884 /// Create a reference to a PatchFamilyGroup in another Fragment.
13885 /// </summary>
13886 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13887 public class PatchFamilyGroupRef : ISchemaElement, ISetAttributes
13888 {
13889
13890 private string idField;
13891
13892 private bool idFieldSet;
13893
13894 private ISchemaElement parentElement;
13895
13896 /// <summary>
13897 /// The identifier of the PatchFamilyGroup to reference.
13898 /// </summary>
13899 public string Id
13900 {
13901 get
13902 {
13903 return this.idField;
13904 }
13905 set
13906 {
13907 this.idFieldSet = true;
13908 this.idField = value;
13909 }
13910 }
13911
13912 public virtual ISchemaElement ParentElement
13913 {
13914 get
13915 {
13916 return this.parentElement;
13917 }
13918 set
13919 {
13920 this.parentElement = value;
13921 }
13922 }
13923
13924 /// <summary>
13925 /// Processes this element and all child elements into an XmlWriter.
13926 /// </summary>
13927 public virtual void OutputXml(XmlWriter writer)
13928 {
13929 if ((null == writer))
13930 {
13931 throw new ArgumentNullException("writer");
13932 }
13933 writer.WriteStartElement("PatchFamilyGroupRef", "http://wixtoolset.org/schemas/v4/wxs");
13934 if (this.idFieldSet)
13935 {
13936 writer.WriteAttributeString("Id", this.idField);
13937 }
13938 writer.WriteEndElement();
13939 }
13940
13941 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13942 void ISetAttributes.SetAttribute(string name, string value)
13943 {
13944 if (String.IsNullOrEmpty(name))
13945 {
13946 throw new ArgumentNullException("name");
13947 }
13948 if (("Id" == name))
13949 {
13950 this.idField = value;
13951 this.idFieldSet = true;
13952 }
13953 }
13954 }
13955
13956 /// <summary>
13957 /// The PatchCreation element is analogous to the main function in a C program. When linking, only one PatchCreation section
13958 /// can be given to the linker to produce a successful result. Using this element creates a pcp file.
13959 /// </summary>
13960 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13961 public class PatchCreation : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
13962 {
13963
13964 private ElementCollection children;
13965
13966 private string idField;
13967
13968 private bool idFieldSet;
13969
13970 private YesNoType allowMajorVersionMismatchesField;
13971
13972 private bool allowMajorVersionMismatchesFieldSet;
13973
13974 private YesNoType allowProductCodeMismatchesField;
13975
13976 private bool allowProductCodeMismatchesFieldSet;
13977
13978 private YesNoType cleanWorkingFolderField;
13979
13980 private bool cleanWorkingFolderFieldSet;
13981
13982 private string codepageField;
13983
13984 private bool codepageFieldSet;
13985
13986 private string outputPathField;
13987
13988 private bool outputPathFieldSet;
13989
13990 private string sourceListField;
13991
13992 private bool sourceListFieldSet;
13993
13994 private int symbolFlagsField;
13995
13996 private bool symbolFlagsFieldSet;
13997
13998 private YesNoType wholeFilesOnlyField;
13999
14000 private bool wholeFilesOnlyFieldSet;
14001
14002 private ISchemaElement parentElement;
14003
14004 public PatchCreation()
14005 {
14006 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
14007 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PatchInformation)));
14008 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PatchMetadata)));
14009 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Family)));
14010 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
14011 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchProperty)));
14012 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchSequence)));
14013 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ReplacePatch)));
14014 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCode)));
14015 childCollection0.AddCollection(childCollection1);
14016 this.children = childCollection0;
14017 }
14018
14019 public virtual IEnumerable Children
14020 {
14021 get
14022 {
14023 return this.children;
14024 }
14025 }
14026
14027 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
14028 public virtual IEnumerable this[System.Type childType]
14029 {
14030 get
14031 {
14032 return this.children.Filter(childType);
14033 }
14034 }
14035
14036 /// <summary>
14037 /// PatchCreation identifier; this is the primary key for identifying patches.
14038 /// </summary>
14039 public string Id
14040 {
14041 get
14042 {
14043 return this.idField;
14044 }
14045 set
14046 {
14047 this.idFieldSet = true;
14048 this.idField = value;
14049 }
14050 }
14051
14052 /// <summary>
14053 /// Use this to set whether the major versions between the upgrade and target images match. See
14054 /// </summary>
14055 public YesNoType AllowMajorVersionMismatches
14056 {
14057 get
14058 {
14059 return this.allowMajorVersionMismatchesField;
14060 }
14061 set
14062 {
14063 this.allowMajorVersionMismatchesFieldSet = true;
14064 this.allowMajorVersionMismatchesField = value;
14065 }
14066 }
14067
14068 /// <summary>
14069 /// Use this to set whether the product code between the upgrade and target images match. See
14070 /// </summary>
14071 public YesNoType AllowProductCodeMismatches
14072 {
14073 get
14074 {
14075 return this.allowProductCodeMismatchesField;
14076 }
14077 set
14078 {
14079 this.allowProductCodeMismatchesFieldSet = true;
14080 this.allowProductCodeMismatchesField = value;
14081 }
14082 }
14083
14084 /// <summary>
14085 /// Use this to set whether Patchwiz should clean the temp folder when finished. See
14086 /// </summary>
14087 public YesNoType CleanWorkingFolder
14088 {
14089 get
14090 {
14091 return this.cleanWorkingFolderField;
14092 }
14093 set
14094 {
14095 this.cleanWorkingFolderFieldSet = true;
14096 this.cleanWorkingFolderField = value;
14097 }
14098 }
14099
14100 /// <summary>
14101 /// The code page integer value or web name for the resulting PCP. See remarks for more information.
14102 /// </summary>
14103 public string Codepage
14104 {
14105 get
14106 {
14107 return this.codepageField;
14108 }
14109 set
14110 {
14111 this.codepageFieldSet = true;
14112 this.codepageField = value;
14113 }
14114 }
14115
14116 /// <summary>
14117 /// The full path, including file name, of the patch package file that is to be generated. See
14118 /// </summary>
14119 public string OutputPath
14120 {
14121 get
14122 {
14123 return this.outputPathField;
14124 }
14125 set
14126 {
14127 this.outputPathFieldSet = true;
14128 this.outputPathField = value;
14129 }
14130 }
14131
14132 /// <summary>
14133 /// Used to locate the .msp file for the patch if the cached copy is unavailable. See
14134 /// </summary>
14135 public string SourceList
14136 {
14137 get
14138 {
14139 return this.sourceListField;
14140 }
14141 set
14142 {
14143 this.sourceListFieldSet = true;
14144 this.sourceListField = value;
14145 }
14146 }
14147
14148 /// <summary>
14149 /// An 8-digit hex integer representing the combination of patch symbol usage flags to use when creating a binary file patch. See
14150 /// </summary>
14151 public int SymbolFlags
14152 {
14153 get
14154 {
14155 return this.symbolFlagsField;
14156 }
14157 set
14158 {
14159 this.symbolFlagsFieldSet = true;
14160 this.symbolFlagsField = value;
14161 }
14162 }
14163
14164 /// <summary>
14165 /// Use this to set whether changing files should be included in their entirety. See
14166 /// </summary>
14167 public YesNoType WholeFilesOnly
14168 {
14169 get
14170 {
14171 return this.wholeFilesOnlyField;
14172 }
14173 set
14174 {
14175 this.wholeFilesOnlyFieldSet = true;
14176 this.wholeFilesOnlyField = value;
14177 }
14178 }
14179
14180 public virtual ISchemaElement ParentElement
14181 {
14182 get
14183 {
14184 return this.parentElement;
14185 }
14186 set
14187 {
14188 this.parentElement = value;
14189 }
14190 }
14191
14192 public virtual void AddChild(ISchemaElement child)
14193 {
14194 if ((null == child))
14195 {
14196 throw new ArgumentNullException("child");
14197 }
14198 this.children.AddElement(child);
14199 child.ParentElement = this;
14200 }
14201
14202 public virtual void RemoveChild(ISchemaElement child)
14203 {
14204 if ((null == child))
14205 {
14206 throw new ArgumentNullException("child");
14207 }
14208 this.children.RemoveElement(child);
14209 child.ParentElement = null;
14210 }
14211
14212 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
14213 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
14214 ISchemaElement ICreateChildren.CreateChild(string childName)
14215 {
14216 if (String.IsNullOrEmpty(childName))
14217 {
14218 throw new ArgumentNullException("childName");
14219 }
14220 ISchemaElement childValue = null;
14221 if (("PatchInformation" == childName))
14222 {
14223 childValue = new PatchInformation();
14224 }
14225 if (("PatchMetadata" == childName))
14226 {
14227 childValue = new PatchMetadata();
14228 }
14229 if (("Family" == childName))
14230 {
14231 childValue = new Family();
14232 }
14233 if (("PatchProperty" == childName))
14234 {
14235 childValue = new PatchProperty();
14236 }
14237 if (("PatchSequence" == childName))
14238 {
14239 childValue = new PatchSequence();
14240 }
14241 if (("ReplacePatch" == childName))
14242 {
14243 childValue = new ReplacePatch();
14244 }
14245 if (("TargetProductCode" == childName))
14246 {
14247 childValue = new TargetProductCode();
14248 }
14249 if ((null == childValue))
14250 {
14251 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
14252 }
14253 return childValue;
14254 }
14255
14256 /// <summary>
14257 /// Processes this element and all child elements into an XmlWriter.
14258 /// </summary>
14259 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
14260 public virtual void OutputXml(XmlWriter writer)
14261 {
14262 if ((null == writer))
14263 {
14264 throw new ArgumentNullException("writer");
14265 }
14266 writer.WriteStartElement("PatchCreation", "http://wixtoolset.org/schemas/v4/wxs");
14267 if (this.idFieldSet)
14268 {
14269 writer.WriteAttributeString("Id", this.idField);
14270 }
14271 if (this.allowMajorVersionMismatchesFieldSet)
14272 {
14273 if ((this.allowMajorVersionMismatchesField == YesNoType.no))
14274 {
14275 writer.WriteAttributeString("AllowMajorVersionMismatches", "no");
14276 }
14277 if ((this.allowMajorVersionMismatchesField == YesNoType.yes))
14278 {
14279 writer.WriteAttributeString("AllowMajorVersionMismatches", "yes");
14280 }
14281 }
14282 if (this.allowProductCodeMismatchesFieldSet)
14283 {
14284 if ((this.allowProductCodeMismatchesField == YesNoType.no))
14285 {
14286 writer.WriteAttributeString("AllowProductCodeMismatches", "no");
14287 }
14288 if ((this.allowProductCodeMismatchesField == YesNoType.yes))
14289 {
14290 writer.WriteAttributeString("AllowProductCodeMismatches", "yes");
14291 }
14292 }
14293 if (this.cleanWorkingFolderFieldSet)
14294 {
14295 if ((this.cleanWorkingFolderField == YesNoType.no))
14296 {
14297 writer.WriteAttributeString("CleanWorkingFolder", "no");
14298 }
14299 if ((this.cleanWorkingFolderField == YesNoType.yes))
14300 {
14301 writer.WriteAttributeString("CleanWorkingFolder", "yes");
14302 }
14303 }
14304 if (this.codepageFieldSet)
14305 {
14306 writer.WriteAttributeString("Codepage", this.codepageField);
14307 }
14308 if (this.outputPathFieldSet)
14309 {
14310 writer.WriteAttributeString("OutputPath", this.outputPathField);
14311 }
14312 if (this.sourceListFieldSet)
14313 {
14314 writer.WriteAttributeString("SourceList", this.sourceListField);
14315 }
14316 if (this.symbolFlagsFieldSet)
14317 {
14318 writer.WriteAttributeString("SymbolFlags", this.symbolFlagsField.ToString(CultureInfo.InvariantCulture));
14319 }
14320 if (this.wholeFilesOnlyFieldSet)
14321 {
14322 if ((this.wholeFilesOnlyField == YesNoType.no))
14323 {
14324 writer.WriteAttributeString("WholeFilesOnly", "no");
14325 }
14326 if ((this.wholeFilesOnlyField == YesNoType.yes))
14327 {
14328 writer.WriteAttributeString("WholeFilesOnly", "yes");
14329 }
14330 }
14331 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
14332 {
14333 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
14334 childElement.OutputXml(writer);
14335 }
14336 writer.WriteEndElement();
14337 }
14338
14339 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
14340 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
14341 void ISetAttributes.SetAttribute(string name, string value)
14342 {
14343 if (String.IsNullOrEmpty(name))
14344 {
14345 throw new ArgumentNullException("name");
14346 }
14347 if (("Id" == name))
14348 {
14349 this.idField = value;
14350 this.idFieldSet = true;
14351 }
14352 if (("AllowMajorVersionMismatches" == name))
14353 {
14354 this.allowMajorVersionMismatchesField = Enums.ParseYesNoType(value);
14355 this.allowMajorVersionMismatchesFieldSet = true;
14356 }
14357 if (("AllowProductCodeMismatches" == name))
14358 {
14359 this.allowProductCodeMismatchesField = Enums.ParseYesNoType(value);
14360 this.allowProductCodeMismatchesFieldSet = true;
14361 }
14362 if (("CleanWorkingFolder" == name))
14363 {
14364 this.cleanWorkingFolderField = Enums.ParseYesNoType(value);
14365 this.cleanWorkingFolderFieldSet = true;
14366 }
14367 if (("Codepage" == name))
14368 {
14369 this.codepageField = value;
14370 this.codepageFieldSet = true;
14371 }
14372 if (("OutputPath" == name))
14373 {
14374 this.outputPathField = value;
14375 this.outputPathFieldSet = true;
14376 }
14377 if (("SourceList" == name))
14378 {
14379 this.sourceListField = value;
14380 this.sourceListFieldSet = true;
14381 }
14382 if (("SymbolFlags" == name))
14383 {
14384 this.symbolFlagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
14385 this.symbolFlagsFieldSet = true;
14386 }
14387 if (("WholeFilesOnly" == name))
14388 {
14389 this.wholeFilesOnlyField = Enums.ParseYesNoType(value);
14390 this.wholeFilesOnlyFieldSet = true;
14391 }
14392 }
14393 }
14394
14395 /// <summary>
14396 /// Properties about the patch to be placed in the Summary Information Stream. These are visible from COM through the IStream interface, and these properties can be seen on the package in Explorer.
14397 /// </summary>
14398 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
14399 public class PatchInformation : ISchemaElement, ISetAttributes
14400 {
14401
14402 private string descriptionField;
14403
14404 private bool descriptionFieldSet;
14405
14406 private string platformsField;
14407
14408 private bool platformsFieldSet;
14409
14410 private string languagesField;
14411
14412 private bool languagesFieldSet;
14413
14414 private string manufacturerField;
14415
14416 private bool manufacturerFieldSet;
14417
14418 private string keywordsField;
14419
14420 private bool keywordsFieldSet;
14421
14422 private string commentsField;
14423
14424 private bool commentsFieldSet;
14425
14426 private YesNoDefaultType readOnlyField;
14427
14428 private bool readOnlyFieldSet;
14429
14430 private string summaryCodepageField;
14431
14432 private bool summaryCodepageFieldSet;
14433
14434 private YesNoType shortNamesField;
14435
14436 private bool shortNamesFieldSet;
14437
14438 private YesNoType compressedField;
14439
14440 private bool compressedFieldSet;
14441
14442 private YesNoType adminImageField;
14443
14444 private bool adminImageFieldSet;
14445
14446 private ISchemaElement parentElement;
14447
14448 /// <summary>
14449 /// A short description of the patch that includes the name of the product.
14450 /// </summary>
14451 public string Description
14452 {
14453 get
14454 {
14455 return this.descriptionField;
14456 }
14457 set
14458 {
14459 this.descriptionFieldSet = true;
14460 this.descriptionField = value;
14461 }
14462 }
14463
14464 public string Platforms
14465 {
14466 get
14467 {
14468 return this.platformsField;
14469 }
14470 set
14471 {
14472 this.platformsFieldSet = true;
14473 this.platformsField = value;
14474 }
14475 }
14476
14477 public string Languages
14478 {
14479 get
14480 {
14481 return this.languagesField;
14482 }
14483 set
14484 {
14485 this.languagesFieldSet = true;
14486 this.languagesField = value;
14487 }
14488 }
14489
14490 /// <summary>
14491 /// The name of the manufacturer of the patch package.
14492 /// </summary>
14493 public string Manufacturer
14494 {
14495 get
14496 {
14497 return this.manufacturerField;
14498 }
14499 set
14500 {
14501 this.manufacturerFieldSet = true;
14502 this.manufacturerField = value;
14503 }
14504 }
14505
14506 /// <summary>
14507 /// A semicolon-delimited list of network or URL locations for alternate sources of the patch. The default is "Installer,Patching,PCP,Database".
14508 /// </summary>
14509 public string Keywords
14510 {
14511 get
14512 {
14513 return this.keywordsField;
14514 }
14515 set
14516 {
14517 this.keywordsFieldSet = true;
14518 this.keywordsField = value;
14519 }
14520 }
14521
14522 /// <summary>
14523 /// General purpose of the patch package. For example, "This patch contains the logic and data required to install
14524 /// </summary>
14525 public string Comments
14526 {
14527 get
14528 {
14529 return this.commentsField;
14530 }
14531 set
14532 {
14533 this.commentsFieldSet = true;
14534 this.commentsField = value;
14535 }
14536 }
14537
14538 /// <summary>
14539 /// The value of this attribute conveys whether the package should be opened as read-only.
14540 /// A database editing tool should not modify a read-only enforced database and should
14541 /// issue a warning at attempts to modify a read-only recommended database.
14542 /// </summary>
14543 public YesNoDefaultType ReadOnly
14544 {
14545 get
14546 {
14547 return this.readOnlyField;
14548 }
14549 set
14550 {
14551 this.readOnlyFieldSet = true;
14552 this.readOnlyField = value;
14553 }
14554 }
14555
14556 /// <summary>
14557 /// The code page integer value or web name for summary info strings only. The default is 1252. See remarks for more information.
14558 /// </summary>
14559 public string SummaryCodepage
14560 {
14561 get
14562 {
14563 return this.summaryCodepageField;
14564 }
14565 set
14566 {
14567 this.summaryCodepageFieldSet = true;
14568 this.summaryCodepageField = value;
14569 }
14570 }
14571
14572 public YesNoType ShortNames
14573 {
14574 get
14575 {
14576 return this.shortNamesField;
14577 }
14578 set
14579 {
14580 this.shortNamesFieldSet = true;
14581 this.shortNamesField = value;
14582 }
14583 }
14584
14585 public YesNoType Compressed
14586 {
14587 get
14588 {
14589 return this.compressedField;
14590 }
14591 set
14592 {
14593 this.compressedFieldSet = true;
14594 this.compressedField = value;
14595 }
14596 }
14597
14598 public YesNoType AdminImage
14599 {
14600 get
14601 {
14602 return this.adminImageField;
14603 }
14604 set
14605 {
14606 this.adminImageFieldSet = true;
14607 this.adminImageField = value;
14608 }
14609 }
14610
14611 public virtual ISchemaElement ParentElement
14612 {
14613 get
14614 {
14615 return this.parentElement;
14616 }
14617 set
14618 {
14619 this.parentElement = value;
14620 }
14621 }
14622
14623 /// <summary>
14624 /// Processes this element and all child elements into an XmlWriter.
14625 /// </summary>
14626 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
14627 public virtual void OutputXml(XmlWriter writer)
14628 {
14629 if ((null == writer))
14630 {
14631 throw new ArgumentNullException("writer");
14632 }
14633 writer.WriteStartElement("PatchInformation", "http://wixtoolset.org/schemas/v4/wxs");
14634 if (this.descriptionFieldSet)
14635 {
14636 writer.WriteAttributeString("Description", this.descriptionField);
14637 }
14638 if (this.platformsFieldSet)
14639 {
14640 writer.WriteAttributeString("Platforms", this.platformsField);
14641 }
14642 if (this.languagesFieldSet)
14643 {
14644 writer.WriteAttributeString("Languages", this.languagesField);
14645 }
14646 if (this.manufacturerFieldSet)
14647 {
14648 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
14649 }
14650 if (this.keywordsFieldSet)
14651 {
14652 writer.WriteAttributeString("Keywords", this.keywordsField);
14653 }
14654 if (this.commentsFieldSet)
14655 {
14656 writer.WriteAttributeString("Comments", this.commentsField);
14657 }
14658 if (this.readOnlyFieldSet)
14659 {
14660 if ((this.readOnlyField == YesNoDefaultType.@default))
14661 {
14662 writer.WriteAttributeString("ReadOnly", "default");
14663 }
14664 if ((this.readOnlyField == YesNoDefaultType.no))
14665 {
14666 writer.WriteAttributeString("ReadOnly", "no");
14667 }
14668 if ((this.readOnlyField == YesNoDefaultType.yes))
14669 {
14670 writer.WriteAttributeString("ReadOnly", "yes");
14671 }
14672 }
14673 if (this.summaryCodepageFieldSet)
14674 {
14675 writer.WriteAttributeString("SummaryCodepage", this.summaryCodepageField);
14676 }
14677 if (this.shortNamesFieldSet)
14678 {
14679 if ((this.shortNamesField == YesNoType.no))
14680 {
14681 writer.WriteAttributeString("ShortNames", "no");
14682 }
14683 if ((this.shortNamesField == YesNoType.yes))
14684 {
14685 writer.WriteAttributeString("ShortNames", "yes");
14686 }
14687 }
14688 if (this.compressedFieldSet)
14689 {
14690 if ((this.compressedField == YesNoType.no))
14691 {
14692 writer.WriteAttributeString("Compressed", "no");
14693 }
14694 if ((this.compressedField == YesNoType.yes))
14695 {
14696 writer.WriteAttributeString("Compressed", "yes");
14697 }
14698 }
14699 if (this.adminImageFieldSet)
14700 {
14701 if ((this.adminImageField == YesNoType.no))
14702 {
14703 writer.WriteAttributeString("AdminImage", "no");
14704 }
14705 if ((this.adminImageField == YesNoType.yes))
14706 {
14707 writer.WriteAttributeString("AdminImage", "yes");
14708 }
14709 }
14710 writer.WriteEndElement();
14711 }
14712
14713 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
14714 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
14715 void ISetAttributes.SetAttribute(string name, string value)
14716 {
14717 if (String.IsNullOrEmpty(name))
14718 {
14719 throw new ArgumentNullException("name");
14720 }
14721 if (("Description" == name))
14722 {
14723 this.descriptionField = value;
14724 this.descriptionFieldSet = true;
14725 }
14726 if (("Platforms" == name))
14727 {
14728 this.platformsField = value;
14729 this.platformsFieldSet = true;
14730 }
14731 if (("Languages" == name))
14732 {
14733 this.languagesField = value;
14734 this.languagesFieldSet = true;
14735 }
14736 if (("Manufacturer" == name))
14737 {
14738 this.manufacturerField = value;
14739 this.manufacturerFieldSet = true;
14740 }
14741 if (("Keywords" == name))
14742 {
14743 this.keywordsField = value;
14744 this.keywordsFieldSet = true;
14745 }
14746 if (("Comments" == name))
14747 {
14748 this.commentsField = value;
14749 this.commentsFieldSet = true;
14750 }
14751 if (("ReadOnly" == name))
14752 {
14753 this.readOnlyField = Enums.ParseYesNoDefaultType(value);
14754 this.readOnlyFieldSet = true;
14755 }
14756 if (("SummaryCodepage" == name))
14757 {
14758 this.summaryCodepageField = value;
14759 this.summaryCodepageFieldSet = true;
14760 }
14761 if (("ShortNames" == name))
14762 {
14763 this.shortNamesField = Enums.ParseYesNoType(value);
14764 this.shortNamesFieldSet = true;
14765 }
14766 if (("Compressed" == name))
14767 {
14768 this.compressedField = Enums.ParseYesNoType(value);
14769 this.compressedFieldSet = true;
14770 }
14771 if (("AdminImage" == name))
14772 {
14773 this.adminImageField = Enums.ParseYesNoType(value);
14774 this.adminImageFieldSet = true;
14775 }
14776 }
14777 }
14778
14779 /// <summary>
14780 /// Properties about the patch to be placed in the PatchMetadata table.
14781 /// </summary>
14782 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
14783 public class PatchMetadata : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
14784 {
14785
14786 private ElementCollection children;
14787
14788 private YesNoType allowRemovalField;
14789
14790 private bool allowRemovalFieldSet;
14791
14792 private string classificationField;
14793
14794 private bool classificationFieldSet;
14795
14796 private string creationTimeUTCField;
14797
14798 private bool creationTimeUTCFieldSet;
14799
14800 private string descriptionField;
14801
14802 private bool descriptionFieldSet;
14803
14804 private string displayNameField;
14805
14806 private bool displayNameFieldSet;
14807
14808 private string manufacturerNameField;
14809
14810 private bool manufacturerNameFieldSet;
14811
14812 private string minorUpdateTargetRTMField;
14813
14814 private bool minorUpdateTargetRTMFieldSet;
14815
14816 private string moreInfoURLField;
14817
14818 private bool moreInfoURLFieldSet;
14819
14820 private YesNoType optimizedInstallModeField;
14821
14822 private bool optimizedInstallModeFieldSet;
14823
14824 private string targetProductNameField;
14825
14826 private bool targetProductNameFieldSet;
14827
14828 private ISchemaElement parentElement;
14829
14830 public PatchMetadata()
14831 {
14832 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
14833 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
14834 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomProperty)));
14835 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(OptimizeCustomActions)));
14836 childCollection0.AddCollection(childCollection1);
14837 this.children = childCollection0;
14838 }
14839
14840 public virtual IEnumerable Children
14841 {
14842 get
14843 {
14844 return this.children;
14845 }
14846 }
14847
14848 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
14849 public virtual IEnumerable this[System.Type childType]
14850 {
14851 get
14852 {
14853 return this.children.Filter(childType);
14854 }
14855 }
14856
14857 /// <summary>
14858 /// Whether this is an uninstallable patch.
14859 /// </summary>
14860 public YesNoType AllowRemoval
14861 {
14862 get
14863 {
14864 return this.allowRemovalField;
14865 }
14866 set
14867 {
14868 this.allowRemovalFieldSet = true;
14869 this.allowRemovalField = value;
14870 }
14871 }
14872
14873 /// <summary>
14874 /// Category of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup.
14875 /// </summary>
14876 public string Classification
14877 {
14878 get
14879 {
14880 return this.classificationField;
14881 }
14882 set
14883 {
14884 this.classificationFieldSet = true;
14885 this.classificationField = value;
14886 }
14887 }
14888
14889 /// <summary>
14890 /// Creation time of the .msp file in the form mm-dd-yy HH:MM (month-day-year hour:minute).
14891 /// </summary>
14892 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
14893 public string CreationTimeUTC
14894 {
14895 get
14896 {
14897 return this.creationTimeUTCField;
14898 }
14899 set
14900 {
14901 this.creationTimeUTCFieldSet = true;
14902 this.creationTimeUTCField = value;
14903 }
14904 }
14905
14906 /// <summary>
14907 /// Description of the patch.
14908 /// </summary>
14909 public string Description
14910 {
14911 get
14912 {
14913 return this.descriptionField;
14914 }
14915 set
14916 {
14917 this.descriptionFieldSet = true;
14918 this.descriptionField = value;
14919 }
14920 }
14921
14922 /// <summary>
14923 /// A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on.
14924 /// </summary>
14925 public string DisplayName
14926 {
14927 get
14928 {
14929 return this.displayNameField;
14930 }
14931 set
14932 {
14933 this.displayNameFieldSet = true;
14934 this.displayNameField = value;
14935 }
14936 }
14937
14938 /// <summary>
14939 /// Name of the manufacturer.
14940 /// </summary>
14941 public string ManufacturerName
14942 {
14943 get
14944 {
14945 return this.manufacturerNameField;
14946 }
14947 set
14948 {
14949 this.manufacturerNameFieldSet = true;
14950 this.manufacturerNameField = value;
14951 }
14952 }
14953
14954 /// <summary>
14955 /// Indicates that the patch targets the RTM version of the product or the most recent major
14956 /// upgrade patch. Author this optional property in minor update patches that contain sequencing
14957 /// information to indicate that the patch removes all patches up to the RTM version of the
14958 /// product, or up to the most recent major upgrade patch. This property is available beginning
14959 /// with Windows Installer 3.1.
14960 /// </summary>
14961 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
14962 public string MinorUpdateTargetRTM
14963 {
14964 get
14965 {
14966 return this.minorUpdateTargetRTMField;
14967 }
14968 set
14969 {
14970 this.minorUpdateTargetRTMFieldSet = true;
14971 this.minorUpdateTargetRTMField = value;
14972 }
14973 }
14974
14975 /// <summary>
14976 /// A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on.
14977 /// </summary>
14978 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
14979 public string MoreInfoURL
14980 {
14981 get
14982 {
14983 return this.moreInfoURLField;
14984 }
14985 set
14986 {
14987 this.moreInfoURLFieldSet = true;
14988 this.moreInfoURLField = value;
14989 }
14990 }
14991
14992 /// <summary>
14993 /// If this attribute is set to 'yes' in all the patches to be applied in a transaction, the
14994 /// application of the patch is optimized if possible. Available beginning with Windows Installer 3.1.
14995 /// </summary>
14996 public YesNoType OptimizedInstallMode
14997 {
14998 get
14999 {
15000 return this.optimizedInstallModeField;
15001 }
15002 set
15003 {
15004 this.optimizedInstallModeFieldSet = true;
15005 this.optimizedInstallModeField = value;
15006 }
15007 }
15008
15009 /// <summary>
15010 /// Name of the application or target product suite.
15011 /// </summary>
15012 public string TargetProductName
15013 {
15014 get
15015 {
15016 return this.targetProductNameField;
15017 }
15018 set
15019 {
15020 this.targetProductNameFieldSet = true;
15021 this.targetProductNameField = value;
15022 }
15023 }
15024
15025 public virtual ISchemaElement ParentElement
15026 {
15027 get
15028 {
15029 return this.parentElement;
15030 }
15031 set
15032 {
15033 this.parentElement = value;
15034 }
15035 }
15036
15037 public virtual void AddChild(ISchemaElement child)
15038 {
15039 if ((null == child))
15040 {
15041 throw new ArgumentNullException("child");
15042 }
15043 this.children.AddElement(child);
15044 child.ParentElement = this;
15045 }
15046
15047 public virtual void RemoveChild(ISchemaElement child)
15048 {
15049 if ((null == child))
15050 {
15051 throw new ArgumentNullException("child");
15052 }
15053 this.children.RemoveElement(child);
15054 child.ParentElement = null;
15055 }
15056
15057 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15058 ISchemaElement ICreateChildren.CreateChild(string childName)
15059 {
15060 if (String.IsNullOrEmpty(childName))
15061 {
15062 throw new ArgumentNullException("childName");
15063 }
15064 ISchemaElement childValue = null;
15065 if (("CustomProperty" == childName))
15066 {
15067 childValue = new CustomProperty();
15068 }
15069 if (("OptimizeCustomActions" == childName))
15070 {
15071 childValue = new OptimizeCustomActions();
15072 }
15073 if ((null == childValue))
15074 {
15075 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
15076 }
15077 return childValue;
15078 }
15079
15080 /// <summary>
15081 /// Processes this element and all child elements into an XmlWriter.
15082 /// </summary>
15083 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
15084 public virtual void OutputXml(XmlWriter writer)
15085 {
15086 if ((null == writer))
15087 {
15088 throw new ArgumentNullException("writer");
15089 }
15090 writer.WriteStartElement("PatchMetadata", "http://wixtoolset.org/schemas/v4/wxs");
15091 if (this.allowRemovalFieldSet)
15092 {
15093 if ((this.allowRemovalField == YesNoType.no))
15094 {
15095 writer.WriteAttributeString("AllowRemoval", "no");
15096 }
15097 if ((this.allowRemovalField == YesNoType.yes))
15098 {
15099 writer.WriteAttributeString("AllowRemoval", "yes");
15100 }
15101 }
15102 if (this.classificationFieldSet)
15103 {
15104 writer.WriteAttributeString("Classification", this.classificationField);
15105 }
15106 if (this.creationTimeUTCFieldSet)
15107 {
15108 writer.WriteAttributeString("CreationTimeUTC", this.creationTimeUTCField);
15109 }
15110 if (this.descriptionFieldSet)
15111 {
15112 writer.WriteAttributeString("Description", this.descriptionField);
15113 }
15114 if (this.displayNameFieldSet)
15115 {
15116 writer.WriteAttributeString("DisplayName", this.displayNameField);
15117 }
15118 if (this.manufacturerNameFieldSet)
15119 {
15120 writer.WriteAttributeString("ManufacturerName", this.manufacturerNameField);
15121 }
15122 if (this.minorUpdateTargetRTMFieldSet)
15123 {
15124 writer.WriteAttributeString("MinorUpdateTargetRTM", this.minorUpdateTargetRTMField);
15125 }
15126 if (this.moreInfoURLFieldSet)
15127 {
15128 writer.WriteAttributeString("MoreInfoURL", this.moreInfoURLField);
15129 }
15130 if (this.optimizedInstallModeFieldSet)
15131 {
15132 if ((this.optimizedInstallModeField == YesNoType.no))
15133 {
15134 writer.WriteAttributeString("OptimizedInstallMode", "no");
15135 }
15136 if ((this.optimizedInstallModeField == YesNoType.yes))
15137 {
15138 writer.WriteAttributeString("OptimizedInstallMode", "yes");
15139 }
15140 }
15141 if (this.targetProductNameFieldSet)
15142 {
15143 writer.WriteAttributeString("TargetProductName", this.targetProductNameField);
15144 }
15145 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
15146 {
15147 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
15148 childElement.OutputXml(writer);
15149 }
15150 writer.WriteEndElement();
15151 }
15152
15153 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15154 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
15155 void ISetAttributes.SetAttribute(string name, string value)
15156 {
15157 if (String.IsNullOrEmpty(name))
15158 {
15159 throw new ArgumentNullException("name");
15160 }
15161 if (("AllowRemoval" == name))
15162 {
15163 this.allowRemovalField = Enums.ParseYesNoType(value);
15164 this.allowRemovalFieldSet = true;
15165 }
15166 if (("Classification" == name))
15167 {
15168 this.classificationField = value;
15169 this.classificationFieldSet = true;
15170 }
15171 if (("CreationTimeUTC" == name))
15172 {
15173 this.creationTimeUTCField = value;
15174 this.creationTimeUTCFieldSet = true;
15175 }
15176 if (("Description" == name))
15177 {
15178 this.descriptionField = value;
15179 this.descriptionFieldSet = true;
15180 }
15181 if (("DisplayName" == name))
15182 {
15183 this.displayNameField = value;
15184 this.displayNameFieldSet = true;
15185 }
15186 if (("ManufacturerName" == name))
15187 {
15188 this.manufacturerNameField = value;
15189 this.manufacturerNameFieldSet = true;
15190 }
15191 if (("MinorUpdateTargetRTM" == name))
15192 {
15193 this.minorUpdateTargetRTMField = value;
15194 this.minorUpdateTargetRTMFieldSet = true;
15195 }
15196 if (("MoreInfoURL" == name))
15197 {
15198 this.moreInfoURLField = value;
15199 this.moreInfoURLFieldSet = true;
15200 }
15201 if (("OptimizedInstallMode" == name))
15202 {
15203 this.optimizedInstallModeField = Enums.ParseYesNoType(value);
15204 this.optimizedInstallModeFieldSet = true;
15205 }
15206 if (("TargetProductName" == name))
15207 {
15208 this.targetProductNameField = value;
15209 this.targetProductNameFieldSet = true;
15210 }
15211 }
15212 }
15213
15214 /// <summary>
15215 /// A custom property for the PatchMetadata table.
15216 /// </summary>
15217 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15218 public class CustomProperty : ISchemaElement, ISetAttributes
15219 {
15220
15221 private string companyField;
15222
15223 private bool companyFieldSet;
15224
15225 private string propertyField;
15226
15227 private bool propertyFieldSet;
15228
15229 private string valueField;
15230
15231 private bool valueFieldSet;
15232
15233 private ISchemaElement parentElement;
15234
15235 /// <summary>
15236 /// The name of the company.
15237 /// </summary>
15238 public string Company
15239 {
15240 get
15241 {
15242 return this.companyField;
15243 }
15244 set
15245 {
15246 this.companyFieldSet = true;
15247 this.companyField = value;
15248 }
15249 }
15250
15251 /// <summary>
15252 /// The name of the metadata property.
15253 /// </summary>
15254 public string Property
15255 {
15256 get
15257 {
15258 return this.propertyField;
15259 }
15260 set
15261 {
15262 this.propertyFieldSet = true;
15263 this.propertyField = value;
15264 }
15265 }
15266
15267 /// <summary>
15268 /// Value of the metadata property.
15269 /// </summary>
15270 public string Value
15271 {
15272 get
15273 {
15274 return this.valueField;
15275 }
15276 set
15277 {
15278 this.valueFieldSet = true;
15279 this.valueField = value;
15280 }
15281 }
15282
15283 public virtual ISchemaElement ParentElement
15284 {
15285 get
15286 {
15287 return this.parentElement;
15288 }
15289 set
15290 {
15291 this.parentElement = value;
15292 }
15293 }
15294
15295 /// <summary>
15296 /// Processes this element and all child elements into an XmlWriter.
15297 /// </summary>
15298 public virtual void OutputXml(XmlWriter writer)
15299 {
15300 if ((null == writer))
15301 {
15302 throw new ArgumentNullException("writer");
15303 }
15304 writer.WriteStartElement("CustomProperty", "http://wixtoolset.org/schemas/v4/wxs");
15305 if (this.companyFieldSet)
15306 {
15307 writer.WriteAttributeString("Company", this.companyField);
15308 }
15309 if (this.propertyFieldSet)
15310 {
15311 writer.WriteAttributeString("Property", this.propertyField);
15312 }
15313 if (this.valueFieldSet)
15314 {
15315 writer.WriteAttributeString("Value", this.valueField);
15316 }
15317 writer.WriteEndElement();
15318 }
15319
15320 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15321 void ISetAttributes.SetAttribute(string name, string value)
15322 {
15323 if (String.IsNullOrEmpty(name))
15324 {
15325 throw new ArgumentNullException("name");
15326 }
15327 if (("Company" == name))
15328 {
15329 this.companyField = value;
15330 this.companyFieldSet = true;
15331 }
15332 if (("Property" == name))
15333 {
15334 this.propertyField = value;
15335 this.propertyFieldSet = true;
15336 }
15337 if (("Value" == name))
15338 {
15339 this.valueField = value;
15340 this.valueFieldSet = true;
15341 }
15342 }
15343 }
15344
15345 /// <summary>
15346 /// A patch that is deprecated by this patch.
15347 /// </summary>
15348 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15349 public class ReplacePatch : ISchemaElement, ISetAttributes
15350 {
15351
15352 private string idField;
15353
15354 private bool idFieldSet;
15355
15356 private ISchemaElement parentElement;
15357
15358 /// <summary>
15359 /// Patch GUID to be unregistered if it exists on the machine targeted by this patch.
15360 /// </summary>
15361 public string Id
15362 {
15363 get
15364 {
15365 return this.idField;
15366 }
15367 set
15368 {
15369 this.idFieldSet = true;
15370 this.idField = value;
15371 }
15372 }
15373
15374 public virtual ISchemaElement ParentElement
15375 {
15376 get
15377 {
15378 return this.parentElement;
15379 }
15380 set
15381 {
15382 this.parentElement = value;
15383 }
15384 }
15385
15386 /// <summary>
15387 /// Processes this element and all child elements into an XmlWriter.
15388 /// </summary>
15389 public virtual void OutputXml(XmlWriter writer)
15390 {
15391 if ((null == writer))
15392 {
15393 throw new ArgumentNullException("writer");
15394 }
15395 writer.WriteStartElement("ReplacePatch", "http://wixtoolset.org/schemas/v4/wxs");
15396 if (this.idFieldSet)
15397 {
15398 writer.WriteAttributeString("Id", this.idField);
15399 }
15400 writer.WriteEndElement();
15401 }
15402
15403 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15404 void ISetAttributes.SetAttribute(string name, string value)
15405 {
15406 if (String.IsNullOrEmpty(name))
15407 {
15408 throw new ArgumentNullException("name");
15409 }
15410 if (("Id" == name))
15411 {
15412 this.idField = value;
15413 this.idFieldSet = true;
15414 }
15415 }
15416 }
15417
15418 /// <summary>
15419 /// The product codes for products that can accept the patch.
15420 /// </summary>
15421 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15422 public class TargetProductCodes : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
15423 {
15424
15425 private ElementCollection children;
15426
15427 private YesNoType replaceField;
15428
15429 private bool replaceFieldSet;
15430
15431 private ISchemaElement parentElement;
15432
15433 public TargetProductCodes()
15434 {
15435 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
15436 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCode)));
15437 this.children = childCollection0;
15438 }
15439
15440 public virtual IEnumerable Children
15441 {
15442 get
15443 {
15444 return this.children;
15445 }
15446 }
15447
15448 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
15449 public virtual IEnumerable this[System.Type childType]
15450 {
15451 get
15452 {
15453 return this.children.Filter(childType);
15454 }
15455 }
15456
15457 /// <summary>
15458 /// Whether to replace the product codes that can accept the patch from the target packages with the child elements.
15459 /// </summary>
15460 public YesNoType Replace
15461 {
15462 get
15463 {
15464 return this.replaceField;
15465 }
15466 set
15467 {
15468 this.replaceFieldSet = true;
15469 this.replaceField = value;
15470 }
15471 }
15472
15473 public virtual ISchemaElement ParentElement
15474 {
15475 get
15476 {
15477 return this.parentElement;
15478 }
15479 set
15480 {
15481 this.parentElement = value;
15482 }
15483 }
15484
15485 public virtual void AddChild(ISchemaElement child)
15486 {
15487 if ((null == child))
15488 {
15489 throw new ArgumentNullException("child");
15490 }
15491 this.children.AddElement(child);
15492 child.ParentElement = this;
15493 }
15494
15495 public virtual void RemoveChild(ISchemaElement child)
15496 {
15497 if ((null == child))
15498 {
15499 throw new ArgumentNullException("child");
15500 }
15501 this.children.RemoveElement(child);
15502 child.ParentElement = null;
15503 }
15504
15505 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15506 ISchemaElement ICreateChildren.CreateChild(string childName)
15507 {
15508 if (String.IsNullOrEmpty(childName))
15509 {
15510 throw new ArgumentNullException("childName");
15511 }
15512 ISchemaElement childValue = null;
15513 if (("TargetProductCode" == childName))
15514 {
15515 childValue = new TargetProductCode();
15516 }
15517 if ((null == childValue))
15518 {
15519 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
15520 }
15521 return childValue;
15522 }
15523
15524 /// <summary>
15525 /// Processes this element and all child elements into an XmlWriter.
15526 /// </summary>
15527 public virtual void OutputXml(XmlWriter writer)
15528 {
15529 if ((null == writer))
15530 {
15531 throw new ArgumentNullException("writer");
15532 }
15533 writer.WriteStartElement("TargetProductCodes", "http://wixtoolset.org/schemas/v4/wxs");
15534 if (this.replaceFieldSet)
15535 {
15536 if ((this.replaceField == YesNoType.no))
15537 {
15538 writer.WriteAttributeString("Replace", "no");
15539 }
15540 if ((this.replaceField == YesNoType.yes))
15541 {
15542 writer.WriteAttributeString("Replace", "yes");
15543 }
15544 }
15545 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
15546 {
15547 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
15548 childElement.OutputXml(writer);
15549 }
15550 writer.WriteEndElement();
15551 }
15552
15553 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15554 void ISetAttributes.SetAttribute(string name, string value)
15555 {
15556 if (String.IsNullOrEmpty(name))
15557 {
15558 throw new ArgumentNullException("name");
15559 }
15560 if (("Replace" == name))
15561 {
15562 this.replaceField = Enums.ParseYesNoType(value);
15563 this.replaceFieldSet = true;
15564 }
15565 }
15566 }
15567
15568 /// <summary>
15569 /// A product code for a product that can accept the patch.
15570 /// </summary>
15571 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15572 public class TargetProductCode : ISchemaElement, ISetAttributes
15573 {
15574
15575 private string idField;
15576
15577 private bool idFieldSet;
15578
15579 private ISchemaElement parentElement;
15580
15581 /// <summary>
15582 /// The product code for a product that can accept the patch. This can be '*'. See remarks for more information.
15583 /// </summary>
15584 public string Id
15585 {
15586 get
15587 {
15588 return this.idField;
15589 }
15590 set
15591 {
15592 this.idFieldSet = true;
15593 this.idField = value;
15594 }
15595 }
15596
15597 public virtual ISchemaElement ParentElement
15598 {
15599 get
15600 {
15601 return this.parentElement;
15602 }
15603 set
15604 {
15605 this.parentElement = value;
15606 }
15607 }
15608
15609 /// <summary>
15610 /// Processes this element and all child elements into an XmlWriter.
15611 /// </summary>
15612 public virtual void OutputXml(XmlWriter writer)
15613 {
15614 if ((null == writer))
15615 {
15616 throw new ArgumentNullException("writer");
15617 }
15618 writer.WriteStartElement("TargetProductCode", "http://wixtoolset.org/schemas/v4/wxs");
15619 if (this.idFieldSet)
15620 {
15621 writer.WriteAttributeString("Id", this.idField);
15622 }
15623 writer.WriteEndElement();
15624 }
15625
15626 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15627 void ISetAttributes.SetAttribute(string name, string value)
15628 {
15629 if (String.IsNullOrEmpty(name))
15630 {
15631 throw new ArgumentNullException("name");
15632 }
15633 if (("Id" == name))
15634 {
15635 this.idField = value;
15636 this.idFieldSet = true;
15637 }
15638 }
15639 }
15640
15641 /// <summary>
15642 /// A property for this patch database.
15643 /// </summary>
15644 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15645 public class PatchProperty : ISchemaElement, ISetAttributes
15646 {
15647
15648 private string companyField;
15649
15650 private bool companyFieldSet;
15651
15652 private string nameField;
15653
15654 private bool nameFieldSet;
15655
15656 private string valueField;
15657
15658 private bool valueFieldSet;
15659
15660 private ISchemaElement parentElement;
15661
15662 /// <summary>
15663 /// Name of the company for a custom metadata property.
15664 /// </summary>
15665 public string Company
15666 {
15667 get
15668 {
15669 return this.companyField;
15670 }
15671 set
15672 {
15673 this.companyFieldSet = true;
15674 this.companyField = value;
15675 }
15676 }
15677
15678 /// <summary>
15679 /// Name of the patch property.
15680 /// </summary>
15681 public string Name
15682 {
15683 get
15684 {
15685 return this.nameField;
15686 }
15687 set
15688 {
15689 this.nameFieldSet = true;
15690 this.nameField = value;
15691 }
15692 }
15693
15694 /// <summary>
15695 /// Value of the patch property.
15696 /// </summary>
15697 public string Value
15698 {
15699 get
15700 {
15701 return this.valueField;
15702 }
15703 set
15704 {
15705 this.valueFieldSet = true;
15706 this.valueField = value;
15707 }
15708 }
15709
15710 public virtual ISchemaElement ParentElement
15711 {
15712 get
15713 {
15714 return this.parentElement;
15715 }
15716 set
15717 {
15718 this.parentElement = value;
15719 }
15720 }
15721
15722 /// <summary>
15723 /// Processes this element and all child elements into an XmlWriter.
15724 /// </summary>
15725 public virtual void OutputXml(XmlWriter writer)
15726 {
15727 if ((null == writer))
15728 {
15729 throw new ArgumentNullException("writer");
15730 }
15731 writer.WriteStartElement("PatchProperty", "http://wixtoolset.org/schemas/v4/wxs");
15732 if (this.companyFieldSet)
15733 {
15734 writer.WriteAttributeString("Company", this.companyField);
15735 }
15736 if (this.nameFieldSet)
15737 {
15738 writer.WriteAttributeString("Name", this.nameField);
15739 }
15740 if (this.valueFieldSet)
15741 {
15742 writer.WriteAttributeString("Value", this.valueField);
15743 }
15744 writer.WriteEndElement();
15745 }
15746
15747 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15748 void ISetAttributes.SetAttribute(string name, string value)
15749 {
15750 if (String.IsNullOrEmpty(name))
15751 {
15752 throw new ArgumentNullException("name");
15753 }
15754 if (("Company" == name))
15755 {
15756 this.companyField = value;
15757 this.companyFieldSet = true;
15758 }
15759 if (("Name" == name))
15760 {
15761 this.nameField = value;
15762 this.nameFieldSet = true;
15763 }
15764 if (("Value" == name))
15765 {
15766 this.valueField = value;
15767 this.valueFieldSet = true;
15768 }
15769 }
15770 }
15771
15772 /// <summary>
15773 /// Sequence information for this patch database. Sequence information is generated automatically in most cases, and rarely needs to be set explicitly.
15774 /// </summary>
15775 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15776 public class PatchSequence : ISchemaElement, ISetAttributes
15777 {
15778
15779 private string patchFamilyField;
15780
15781 private bool patchFamilyFieldSet;
15782
15783 private string productCodeField;
15784
15785 private bool productCodeFieldSet;
15786
15787 private string sequenceField;
15788
15789 private bool sequenceFieldSet;
15790
15791 private YesNoType supersedeField;
15792
15793 private bool supersedeFieldSet;
15794
15795 private string targetField;
15796
15797 private bool targetFieldSet;
15798
15799 private string targetImageField;
15800
15801 private bool targetImageFieldSet;
15802
15803 private ISchemaElement parentElement;
15804
15805 /// <summary>
15806 /// Identifier which indicates a sequence family to which this patch belongs.
15807 /// </summary>
15808 public string PatchFamily
15809 {
15810 get
15811 {
15812 return this.patchFamilyField;
15813 }
15814 set
15815 {
15816 this.patchFamilyFieldSet = true;
15817 this.patchFamilyField = value;
15818 }
15819 }
15820
15821 /// <summary>
15822 /// Specifies the ProductCode of the product that this family applies to.
15823 /// This attribute cannot the specified if the TargetImage attribute is specified.
15824 /// </summary>
15825 public string ProductCode
15826 {
15827 get
15828 {
15829 return this.productCodeField;
15830 }
15831 set
15832 {
15833 this.productCodeFieldSet = true;
15834 this.productCodeField = value;
15835 }
15836 }
15837
15838 /// <summary>
15839 /// Used to populate the sequence column of the MsiPatchSequence table in the final MSP file. Specified in x.x.x.x format. See documentation for Sequence column of MsiPatchSequence table in MSI SDK.
15840 /// </summary>
15841 public string Sequence
15842 {
15843 get
15844 {
15845 return this.sequenceField;
15846 }
15847 set
15848 {
15849 this.sequenceFieldSet = true;
15850 this.sequenceField = value;
15851 }
15852 }
15853
15854 /// <summary>
15855 /// Set this value to 'yes' to indicate that this patch will supersede all previous patches in this patch family.
15856 /// The default value is 'no'.
15857 /// </summary>
15858 public YesNoType Supersede
15859 {
15860 get
15861 {
15862 return this.supersedeField;
15863 }
15864 set
15865 {
15866 this.supersedeFieldSet = true;
15867 this.supersedeField = value;
15868 }
15869 }
15870
15871 public string Target
15872 {
15873 get
15874 {
15875 return this.targetField;
15876 }
15877 set
15878 {
15879 this.targetFieldSet = true;
15880 this.targetField = value;
15881 }
15882 }
15883
15884 /// <summary>
15885 /// Specifies the TargetImage that this family applies to.
15886 /// This attribute cannot the specified if the ProductCode attribute is specified.
15887 /// </summary>
15888 public string TargetImage
15889 {
15890 get
15891 {
15892 return this.targetImageField;
15893 }
15894 set
15895 {
15896 this.targetImageFieldSet = true;
15897 this.targetImageField = value;
15898 }
15899 }
15900
15901 public virtual ISchemaElement ParentElement
15902 {
15903 get
15904 {
15905 return this.parentElement;
15906 }
15907 set
15908 {
15909 this.parentElement = value;
15910 }
15911 }
15912
15913 /// <summary>
15914 /// Processes this element and all child elements into an XmlWriter.
15915 /// </summary>
15916 public virtual void OutputXml(XmlWriter writer)
15917 {
15918 if ((null == writer))
15919 {
15920 throw new ArgumentNullException("writer");
15921 }
15922 writer.WriteStartElement("PatchSequence", "http://wixtoolset.org/schemas/v4/wxs");
15923 if (this.patchFamilyFieldSet)
15924 {
15925 writer.WriteAttributeString("PatchFamily", this.patchFamilyField);
15926 }
15927 if (this.productCodeFieldSet)
15928 {
15929 writer.WriteAttributeString("ProductCode", this.productCodeField);
15930 }
15931 if (this.sequenceFieldSet)
15932 {
15933 writer.WriteAttributeString("Sequence", this.sequenceField);
15934 }
15935 if (this.supersedeFieldSet)
15936 {
15937 if ((this.supersedeField == YesNoType.no))
15938 {
15939 writer.WriteAttributeString("Supersede", "no");
15940 }
15941 if ((this.supersedeField == YesNoType.yes))
15942 {
15943 writer.WriteAttributeString("Supersede", "yes");
15944 }
15945 }
15946 if (this.targetFieldSet)
15947 {
15948 writer.WriteAttributeString("Target", this.targetField);
15949 }
15950 if (this.targetImageFieldSet)
15951 {
15952 writer.WriteAttributeString("TargetImage", this.targetImageField);
15953 }
15954 writer.WriteEndElement();
15955 }
15956
15957 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15958 void ISetAttributes.SetAttribute(string name, string value)
15959 {
15960 if (String.IsNullOrEmpty(name))
15961 {
15962 throw new ArgumentNullException("name");
15963 }
15964 if (("PatchFamily" == name))
15965 {
15966 this.patchFamilyField = value;
15967 this.patchFamilyFieldSet = true;
15968 }
15969 if (("ProductCode" == name))
15970 {
15971 this.productCodeField = value;
15972 this.productCodeFieldSet = true;
15973 }
15974 if (("Sequence" == name))
15975 {
15976 this.sequenceField = value;
15977 this.sequenceFieldSet = true;
15978 }
15979 if (("Supersede" == name))
15980 {
15981 this.supersedeField = Enums.ParseYesNoType(value);
15982 this.supersedeFieldSet = true;
15983 }
15984 if (("Target" == name))
15985 {
15986 this.targetField = value;
15987 this.targetFieldSet = true;
15988 }
15989 if (("TargetImage" == name))
15990 {
15991 this.targetImageField = value;
15992 this.targetImageFieldSet = true;
15993 }
15994 }
15995 }
15996
15997 /// <summary>
15998 /// Group of one or more upgraded images of a product.
15999 /// </summary>
16000 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
16001 public class Family : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
16002 {
16003
16004 private ElementCollection children;
16005
16006 private string diskIdField;
16007
16008 private bool diskIdFieldSet;
16009
16010 private string diskPromptField;
16011
16012 private bool diskPromptFieldSet;
16013
16014 private string mediaSrcPropField;
16015
16016 private bool mediaSrcPropFieldSet;
16017
16018 private string nameField;
16019
16020 private bool nameFieldSet;
16021
16022 private int sequenceStartField;
16023
16024 private bool sequenceStartFieldSet;
16025
16026 private string volumeLabelField;
16027
16028 private bool volumeLabelFieldSet;
16029
16030 private ISchemaElement parentElement;
16031
16032 public Family()
16033 {
16034 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
16035 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(UpgradeImage)));
16036 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
16037 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ExternalFile)));
16038 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectFile)));
16039 childCollection0.AddCollection(childCollection1);
16040 this.children = childCollection0;
16041 }
16042
16043 public virtual IEnumerable Children
16044 {
16045 get
16046 {
16047 return this.children;
16048 }
16049 }
16050
16051 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
16052 public virtual IEnumerable this[System.Type childType]
16053 {
16054 get
16055 {
16056 return this.children.Filter(childType);
16057 }
16058 }
16059
16060 /// <summary>
16061 /// Entered into the DiskId field of the new Media table record.
16062 /// </summary>
16063 public string DiskId
16064 {
16065 get
16066 {
16067 return this.diskIdField;
16068 }
16069 set
16070 {
16071 this.diskIdFieldSet = true;
16072 this.diskIdField = value;
16073 }
16074 }
16075
16076 /// <summary>
16077 /// Value to display in the "[1]" of the DiskPrompt Property. Using this attribute will require you to define a DiskPrompt Property.
16078 /// </summary>
16079 public string DiskPrompt
16080 {
16081 get
16082 {
16083 return this.diskPromptField;
16084 }
16085 set
16086 {
16087 this.diskPromptFieldSet = true;
16088 this.diskPromptField = value;
16089 }
16090 }
16091
16092 /// <summary>
16093 /// Entered into the Source field of the new Media table entry of the upgraded image.
16094 /// </summary>
16095 public string MediaSrcProp
16096 {
16097 get
16098 {
16099 return this.mediaSrcPropField;
16100 }
16101 set
16102 {
16103 this.mediaSrcPropFieldSet = true;
16104 this.mediaSrcPropField = value;
16105 }
16106 }
16107
16108 /// <summary>
16109 /// Identifier for the family.
16110 /// </summary>
16111 public string Name
16112 {
16113 get
16114 {
16115 return this.nameField;
16116 }
16117 set
16118 {
16119 this.nameFieldSet = true;
16120 this.nameField = value;
16121 }
16122 }
16123
16124 /// <summary>
16125 /// Sequence number for the starting file.
16126 /// </summary>
16127 public int SequenceStart
16128 {
16129 get
16130 {
16131 return this.sequenceStartField;
16132 }
16133 set
16134 {
16135 this.sequenceStartFieldSet = true;
16136 this.sequenceStartField = value;
16137 }
16138 }
16139
16140 /// <summary>
16141 /// Entered into the VolumeLabel field of the new Media table record.
16142 /// </summary>
16143 public string VolumeLabel
16144 {
16145 get
16146 {
16147 return this.volumeLabelField;
16148 }
16149 set
16150 {
16151 this.volumeLabelFieldSet = true;
16152 this.volumeLabelField = value;
16153 }
16154 }
16155
16156 public virtual ISchemaElement ParentElement
16157 {
16158 get
16159 {
16160 return this.parentElement;
16161 }
16162 set
16163 {
16164 this.parentElement = value;
16165 }
16166 }
16167
16168 public virtual void AddChild(ISchemaElement child)
16169 {
16170 if ((null == child))
16171 {
16172 throw new ArgumentNullException("child");
16173 }
16174 this.children.AddElement(child);
16175 child.ParentElement = this;
16176 }
16177
16178 public virtual void RemoveChild(ISchemaElement child)
16179 {
16180 if ((null == child))
16181 {
16182 throw new ArgumentNullException("child");
16183 }
16184 this.children.RemoveElement(child);
16185 child.ParentElement = null;
16186 }
16187
16188 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16189 ISchemaElement ICreateChildren.CreateChild(string childName)
16190 {
16191 if (String.IsNullOrEmpty(childName))
16192 {
16193 throw new ArgumentNullException("childName");
16194 }
16195 ISchemaElement childValue = null;
16196 if (("UpgradeImage" == childName))
16197 {
16198 childValue = new UpgradeImage();
16199 }
16200 if (("ExternalFile" == childName))
16201 {
16202 childValue = new ExternalFile();
16203 }
16204 if (("ProtectFile" == childName))
16205 {
16206 childValue = new ProtectFile();
16207 }
16208 if ((null == childValue))
16209 {
16210 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
16211 }
16212 return childValue;
16213 }
16214
16215 /// <summary>
16216 /// Processes this element and all child elements into an XmlWriter.
16217 /// </summary>
16218 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
16219 public virtual void OutputXml(XmlWriter writer)
16220 {
16221 if ((null == writer))
16222 {
16223 throw new ArgumentNullException("writer");
16224 }
16225 writer.WriteStartElement("Family", "http://wixtoolset.org/schemas/v4/wxs");
16226 if (this.diskIdFieldSet)
16227 {
16228 writer.WriteAttributeString("DiskId", this.diskIdField);
16229 }
16230 if (this.diskPromptFieldSet)
16231 {
16232 writer.WriteAttributeString("DiskPrompt", this.diskPromptField);
16233 }
16234 if (this.mediaSrcPropFieldSet)
16235 {
16236 writer.WriteAttributeString("MediaSrcProp", this.mediaSrcPropField);
16237 }
16238 if (this.nameFieldSet)
16239 {
16240 writer.WriteAttributeString("Name", this.nameField);
16241 }
16242 if (this.sequenceStartFieldSet)
16243 {
16244 writer.WriteAttributeString("SequenceStart", this.sequenceStartField.ToString(CultureInfo.InvariantCulture));
16245 }
16246 if (this.volumeLabelFieldSet)
16247 {
16248 writer.WriteAttributeString("VolumeLabel", this.volumeLabelField);
16249 }
16250 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
16251 {
16252 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
16253 childElement.OutputXml(writer);
16254 }
16255 writer.WriteEndElement();
16256 }
16257
16258 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16259 void ISetAttributes.SetAttribute(string name, string value)
16260 {
16261 if (String.IsNullOrEmpty(name))
16262 {
16263 throw new ArgumentNullException("name");
16264 }
16265 if (("DiskId" == name))
16266 {
16267 this.diskIdField = value;
16268 this.diskIdFieldSet = true;
16269 }
16270 if (("DiskPrompt" == name))
16271 {
16272 this.diskPromptField = value;
16273 this.diskPromptFieldSet = true;
16274 }
16275 if (("MediaSrcProp" == name))
16276 {
16277 this.mediaSrcPropField = value;
16278 this.mediaSrcPropFieldSet = true;
16279 }
16280 if (("Name" == name))
16281 {
16282 this.nameField = value;
16283 this.nameFieldSet = true;
16284 }
16285 if (("SequenceStart" == name))
16286 {
16287 this.sequenceStartField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
16288 this.sequenceStartFieldSet = true;
16289 }
16290 if (("VolumeLabel" == name))
16291 {
16292 this.volumeLabelField = value;
16293 this.volumeLabelFieldSet = true;
16294 }
16295 }
16296 }
16297
16298 /// <summary>
16299 /// Contains information about the upgraded images of the product.
16300 /// </summary>
16301 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
16302 public class UpgradeImage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
16303 {
16304
16305 private ElementCollection children;
16306
16307 private string idField;
16308
16309 private bool idFieldSet;
16310
16311 private string sourceFileField;
16312
16313 private bool sourceFileFieldSet;
16314
16315 private string srcField;
16316
16317 private bool srcFieldSet;
16318
16319 private string sourcePatchField;
16320
16321 private bool sourcePatchFieldSet;
16322
16323 private string srcPatchField;
16324
16325 private bool srcPatchFieldSet;
16326
16327 private ISchemaElement parentElement;
16328
16329 public UpgradeImage()
16330 {
16331 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
16332 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(TargetImage)));
16333 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
16334 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
16335 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UpgradeFile)));
16336 childCollection0.AddCollection(childCollection1);
16337 this.children = childCollection0;
16338 }
16339
16340 public virtual IEnumerable Children
16341 {
16342 get
16343 {
16344 return this.children;
16345 }
16346 }
16347
16348 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
16349 public virtual IEnumerable this[System.Type childType]
16350 {
16351 get
16352 {
16353 return this.children.Filter(childType);
16354 }
16355 }
16356
16357 /// <summary>
16358 /// Identifier to connect target images with upgraded image.
16359 /// </summary>
16360 public string Id
16361 {
16362 get
16363 {
16364 return this.idField;
16365 }
16366 set
16367 {
16368 this.idFieldSet = true;
16369 this.idField = value;
16370 }
16371 }
16372
16373 /// <summary>
16374 /// Full path to location of msi file for upgraded image.
16375 /// </summary>
16376 public string SourceFile
16377 {
16378 get
16379 {
16380 return this.sourceFileField;
16381 }
16382 set
16383 {
16384 this.sourceFileFieldSet = true;
16385 this.sourceFileField = value;
16386 }
16387 }
16388
16389 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
16390 public string src
16391 {
16392 get
16393 {
16394 return this.srcField;
16395 }
16396 set
16397 {
16398 this.srcFieldSet = true;
16399 this.srcField = value;
16400 }
16401 }
16402
16403 /// <summary>
16404 /// Modified copy of the upgraded installation database that contains additional authoring specific to patching.
16405 /// </summary>
16406 public string SourcePatch
16407 {
16408 get
16409 {
16410 return this.sourcePatchField;
16411 }
16412 set
16413 {
16414 this.sourcePatchFieldSet = true;
16415 this.sourcePatchField = value;
16416 }
16417 }
16418
16419 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
16420 public string srcPatch
16421 {
16422 get
16423 {
16424 return this.srcPatchField;
16425 }
16426 set
16427 {
16428 this.srcPatchFieldSet = true;
16429 this.srcPatchField = value;
16430 }
16431 }
16432
16433 public virtual ISchemaElement ParentElement
16434 {
16435 get
16436 {
16437 return this.parentElement;
16438 }
16439 set
16440 {
16441 this.parentElement = value;
16442 }
16443 }
16444
16445 public virtual void AddChild(ISchemaElement child)
16446 {
16447 if ((null == child))
16448 {
16449 throw new ArgumentNullException("child");
16450 }
16451 this.children.AddElement(child);
16452 child.ParentElement = this;
16453 }
16454
16455 public virtual void RemoveChild(ISchemaElement child)
16456 {
16457 if ((null == child))
16458 {
16459 throw new ArgumentNullException("child");
16460 }
16461 this.children.RemoveElement(child);
16462 child.ParentElement = null;
16463 }
16464
16465 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16466 ISchemaElement ICreateChildren.CreateChild(string childName)
16467 {
16468 if (String.IsNullOrEmpty(childName))
16469 {
16470 throw new ArgumentNullException("childName");
16471 }
16472 ISchemaElement childValue = null;
16473 if (("TargetImage" == childName))
16474 {
16475 childValue = new TargetImage();
16476 }
16477 if (("SymbolPath" == childName))
16478 {
16479 childValue = new SymbolPath();
16480 }
16481 if (("UpgradeFile" == childName))
16482 {
16483 childValue = new UpgradeFile();
16484 }
16485 if ((null == childValue))
16486 {
16487 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
16488 }
16489 return childValue;
16490 }
16491
16492 /// <summary>
16493 /// Processes this element and all child elements into an XmlWriter.
16494 /// </summary>
16495 public virtual void OutputXml(XmlWriter writer)
16496 {
16497 if ((null == writer))
16498 {
16499 throw new ArgumentNullException("writer");
16500 }
16501 writer.WriteStartElement("UpgradeImage", "http://wixtoolset.org/schemas/v4/wxs");
16502 if (this.idFieldSet)
16503 {
16504 writer.WriteAttributeString("Id", this.idField);
16505 }
16506 if (this.sourceFileFieldSet)
16507 {
16508 writer.WriteAttributeString("SourceFile", this.sourceFileField);
16509 }
16510 if (this.srcFieldSet)
16511 {
16512 writer.WriteAttributeString("src", this.srcField);
16513 }
16514 if (this.sourcePatchFieldSet)
16515 {
16516 writer.WriteAttributeString("SourcePatch", this.sourcePatchField);
16517 }
16518 if (this.srcPatchFieldSet)
16519 {
16520 writer.WriteAttributeString("srcPatch", this.srcPatchField);
16521 }
16522 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
16523 {
16524 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
16525 childElement.OutputXml(writer);
16526 }
16527 writer.WriteEndElement();
16528 }
16529
16530 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16531 void ISetAttributes.SetAttribute(string name, string value)
16532 {
16533 if (String.IsNullOrEmpty(name))
16534 {
16535 throw new ArgumentNullException("name");
16536 }
16537 if (("Id" == name))
16538 {
16539 this.idField = value;
16540 this.idFieldSet = true;
16541 }
16542 if (("SourceFile" == name))
16543 {
16544 this.sourceFileField = value;
16545 this.sourceFileFieldSet = true;
16546 }
16547 if (("src" == name))
16548 {
16549 this.srcField = value;
16550 this.srcFieldSet = true;
16551 }
16552 if (("SourcePatch" == name))
16553 {
16554 this.sourcePatchField = value;
16555 this.sourcePatchFieldSet = true;
16556 }
16557 if (("srcPatch" == name))
16558 {
16559 this.srcPatchField = value;
16560 this.srcPatchFieldSet = true;
16561 }
16562 }
16563 }
16564
16565 /// <summary>
16566 /// Contains information about the target images of the product.
16567 /// </summary>
16568 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
16569 public class TargetImage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
16570 {
16571
16572 private ElementCollection children;
16573
16574 private string idField;
16575
16576 private bool idFieldSet;
16577
16578 private string sourceFileField;
16579
16580 private bool sourceFileFieldSet;
16581
16582 private string srcField;
16583
16584 private bool srcFieldSet;
16585
16586 private int orderField;
16587
16588 private bool orderFieldSet;
16589
16590 private string validationField;
16591
16592 private bool validationFieldSet;
16593
16594 private YesNoType ignoreMissingFilesField;
16595
16596 private bool ignoreMissingFilesFieldSet;
16597
16598 private ISchemaElement parentElement;
16599
16600 public TargetImage()
16601 {
16602 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
16603 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
16604 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TargetFile)));
16605 this.children = childCollection0;
16606 }
16607
16608 public virtual IEnumerable Children
16609 {
16610 get
16611 {
16612 return this.children;
16613 }
16614 }
16615
16616 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
16617 public virtual IEnumerable this[System.Type childType]
16618 {
16619 get
16620 {
16621 return this.children.Filter(childType);
16622 }
16623 }
16624
16625 /// <summary>
16626 /// Identifier for the target image.
16627 /// </summary>
16628 public string Id
16629 {
16630 get
16631 {
16632 return this.idField;
16633 }
16634 set
16635 {
16636 this.idFieldSet = true;
16637 this.idField = value;
16638 }
16639 }
16640
16641 /// <summary>
16642 /// Full path to the location of the msi file for the target image.
16643 /// </summary>
16644 public string SourceFile
16645 {
16646 get
16647 {
16648 return this.sourceFileField;
16649 }
16650 set
16651 {
16652 this.sourceFileFieldSet = true;
16653 this.sourceFileField = value;
16654 }
16655 }
16656
16657 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
16658 public string src
16659 {
16660 get
16661 {
16662 return this.srcField;
16663 }
16664 set
16665 {
16666 this.srcFieldSet = true;
16667 this.srcField = value;
16668 }
16669 }
16670
16671 /// <summary>
16672 /// Relative order of the target image.
16673 /// </summary>
16674 public int Order
16675 {
16676 get
16677 {
16678 return this.orderField;
16679 }
16680 set
16681 {
16682 this.orderFieldSet = true;
16683 this.orderField = value;
16684 }
16685 }
16686
16687 /// <summary>
16688 /// Product checking to avoid applying irrelevant transforms.
16689 /// </summary>
16690 public string Validation
16691 {
16692 get
16693 {
16694 return this.validationField;
16695 }
16696 set
16697 {
16698 this.validationFieldSet = true;
16699 this.validationField = value;
16700 }
16701 }
16702
16703 /// <summary>
16704 /// Files missing from the target image are ignored by the installer.
16705 /// </summary>
16706 public YesNoType IgnoreMissingFiles
16707 {
16708 get
16709 {
16710 return this.ignoreMissingFilesField;
16711 }
16712 set
16713 {
16714 this.ignoreMissingFilesFieldSet = true;
16715 this.ignoreMissingFilesField = value;
16716 }
16717 }
16718
16719 public virtual ISchemaElement ParentElement
16720 {
16721 get
16722 {
16723 return this.parentElement;
16724 }
16725 set
16726 {
16727 this.parentElement = value;
16728 }
16729 }
16730
16731 public virtual void AddChild(ISchemaElement child)
16732 {
16733 if ((null == child))
16734 {
16735 throw new ArgumentNullException("child");
16736 }
16737 this.children.AddElement(child);
16738 child.ParentElement = this;
16739 }
16740
16741 public virtual void RemoveChild(ISchemaElement child)
16742 {
16743 if ((null == child))
16744 {
16745 throw new ArgumentNullException("child");
16746 }
16747 this.children.RemoveElement(child);
16748 child.ParentElement = null;
16749 }
16750
16751 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16752 ISchemaElement ICreateChildren.CreateChild(string childName)
16753 {
16754 if (String.IsNullOrEmpty(childName))
16755 {
16756 throw new ArgumentNullException("childName");
16757 }
16758 ISchemaElement childValue = null;
16759 if (("SymbolPath" == childName))
16760 {
16761 childValue = new SymbolPath();
16762 }
16763 if (("TargetFile" == childName))
16764 {
16765 childValue = new TargetFile();
16766 }
16767 if ((null == childValue))
16768 {
16769 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
16770 }
16771 return childValue;
16772 }
16773
16774 /// <summary>
16775 /// Processes this element and all child elements into an XmlWriter.
16776 /// </summary>
16777 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
16778 public virtual void OutputXml(XmlWriter writer)
16779 {
16780 if ((null == writer))
16781 {
16782 throw new ArgumentNullException("writer");
16783 }
16784 writer.WriteStartElement("TargetImage", "http://wixtoolset.org/schemas/v4/wxs");
16785 if (this.idFieldSet)
16786 {
16787 writer.WriteAttributeString("Id", this.idField);
16788 }
16789 if (this.sourceFileFieldSet)
16790 {
16791 writer.WriteAttributeString("SourceFile", this.sourceFileField);
16792 }
16793 if (this.srcFieldSet)
16794 {
16795 writer.WriteAttributeString("src", this.srcField);
16796 }
16797 if (this.orderFieldSet)
16798 {
16799 writer.WriteAttributeString("Order", this.orderField.ToString(CultureInfo.InvariantCulture));
16800 }
16801 if (this.validationFieldSet)
16802 {
16803 writer.WriteAttributeString("Validation", this.validationField);
16804 }
16805 if (this.ignoreMissingFilesFieldSet)
16806 {
16807 if ((this.ignoreMissingFilesField == YesNoType.no))
16808 {
16809 writer.WriteAttributeString("IgnoreMissingFiles", "no");
16810 }
16811 if ((this.ignoreMissingFilesField == YesNoType.yes))
16812 {
16813 writer.WriteAttributeString("IgnoreMissingFiles", "yes");
16814 }
16815 }
16816 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
16817 {
16818 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
16819 childElement.OutputXml(writer);
16820 }
16821 writer.WriteEndElement();
16822 }
16823
16824 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16825 void ISetAttributes.SetAttribute(string name, string value)
16826 {
16827 if (String.IsNullOrEmpty(name))
16828 {
16829 throw new ArgumentNullException("name");
16830 }
16831 if (("Id" == name))
16832 {
16833 this.idField = value;
16834 this.idFieldSet = true;
16835 }
16836 if (("SourceFile" == name))
16837 {
16838 this.sourceFileField = value;
16839 this.sourceFileFieldSet = true;
16840 }
16841 if (("src" == name))
16842 {
16843 this.srcField = value;
16844 this.srcFieldSet = true;
16845 }
16846 if (("Order" == name))
16847 {
16848 this.orderField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
16849 this.orderFieldSet = true;
16850 }
16851 if (("Validation" == name))
16852 {
16853 this.validationField = value;
16854 this.validationFieldSet = true;
16855 }
16856 if (("IgnoreMissingFiles" == name))
16857 {
16858 this.ignoreMissingFilesField = Enums.ParseYesNoType(value);
16859 this.ignoreMissingFilesFieldSet = true;
16860 }
16861 }
16862 }
16863
16864 /// <summary>
16865 /// Information about specific files in a target image.
16866 /// </summary>
16867 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
16868 public class TargetFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
16869 {
16870
16871 private ElementCollection children;
16872
16873 private string idField;
16874
16875 private bool idFieldSet;
16876
16877 private ISchemaElement parentElement;
16878
16879 public TargetFile()
16880 {
16881 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
16882 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SymbolPath)));
16883 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
16884 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreRange)));
16885 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectRange)));
16886 childCollection0.AddCollection(childCollection1);
16887 this.children = childCollection0;
16888 }
16889
16890 public virtual IEnumerable Children
16891 {
16892 get
16893 {
16894 return this.children;
16895 }
16896 }
16897
16898 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
16899 public virtual IEnumerable this[System.Type childType]
16900 {
16901 get
16902 {
16903 return this.children.Filter(childType);
16904 }
16905 }
16906
16907 /// <summary>
16908 /// Foreign key into the File table.
16909 /// </summary>
16910 public string Id
16911 {
16912 get
16913 {
16914 return this.idField;
16915 }
16916 set
16917 {
16918 this.idFieldSet = true;
16919 this.idField = value;
16920 }
16921 }
16922
16923 public virtual ISchemaElement ParentElement
16924 {
16925 get
16926 {
16927 return this.parentElement;
16928 }
16929 set
16930 {
16931 this.parentElement = value;
16932 }
16933 }
16934
16935 public virtual void AddChild(ISchemaElement child)
16936 {
16937 if ((null == child))
16938 {
16939 throw new ArgumentNullException("child");
16940 }
16941 this.children.AddElement(child);
16942 child.ParentElement = this;
16943 }
16944
16945 public virtual void RemoveChild(ISchemaElement child)
16946 {
16947 if ((null == child))
16948 {
16949 throw new ArgumentNullException("child");
16950 }
16951 this.children.RemoveElement(child);
16952 child.ParentElement = null;
16953 }
16954
16955 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16956 ISchemaElement ICreateChildren.CreateChild(string childName)
16957 {
16958 if (String.IsNullOrEmpty(childName))
16959 {
16960 throw new ArgumentNullException("childName");
16961 }
16962 ISchemaElement childValue = null;
16963 if (("SymbolPath" == childName))
16964 {
16965 childValue = new SymbolPath();
16966 }
16967 if (("IgnoreRange" == childName))
16968 {
16969 childValue = new IgnoreRange();
16970 }
16971 if (("ProtectRange" == childName))
16972 {
16973 childValue = new ProtectRange();
16974 }
16975 if ((null == childValue))
16976 {
16977 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
16978 }
16979 return childValue;
16980 }
16981
16982 /// <summary>
16983 /// Processes this element and all child elements into an XmlWriter.
16984 /// </summary>
16985 public virtual void OutputXml(XmlWriter writer)
16986 {
16987 if ((null == writer))
16988 {
16989 throw new ArgumentNullException("writer");
16990 }
16991 writer.WriteStartElement("TargetFile", "http://wixtoolset.org/schemas/v4/wxs");
16992 if (this.idFieldSet)
16993 {
16994 writer.WriteAttributeString("Id", this.idField);
16995 }
16996 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
16997 {
16998 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
16999 childElement.OutputXml(writer);
17000 }
17001 writer.WriteEndElement();
17002 }
17003
17004 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17005 void ISetAttributes.SetAttribute(string name, string value)
17006 {
17007 if (String.IsNullOrEmpty(name))
17008 {
17009 throw new ArgumentNullException("name");
17010 }
17011 if (("Id" == name))
17012 {
17013 this.idField = value;
17014 this.idFieldSet = true;
17015 }
17016 }
17017 }
17018
17019 /// <summary>
17020 /// Specifies part of a file that is to be ignored during patching.
17021 /// </summary>
17022 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17023 public class IgnoreRange : ISchemaElement, ISetAttributes
17024 {
17025
17026 private int offsetField;
17027
17028 private bool offsetFieldSet;
17029
17030 private int lengthField;
17031
17032 private bool lengthFieldSet;
17033
17034 private ISchemaElement parentElement;
17035
17036 /// <summary>
17037 /// Offset of the start of the range.
17038 /// </summary>
17039 public int Offset
17040 {
17041 get
17042 {
17043 return this.offsetField;
17044 }
17045 set
17046 {
17047 this.offsetFieldSet = true;
17048 this.offsetField = value;
17049 }
17050 }
17051
17052 /// <summary>
17053 /// Length of the range.
17054 /// </summary>
17055 public int Length
17056 {
17057 get
17058 {
17059 return this.lengthField;
17060 }
17061 set
17062 {
17063 this.lengthFieldSet = true;
17064 this.lengthField = value;
17065 }
17066 }
17067
17068 public virtual ISchemaElement ParentElement
17069 {
17070 get
17071 {
17072 return this.parentElement;
17073 }
17074 set
17075 {
17076 this.parentElement = value;
17077 }
17078 }
17079
17080 /// <summary>
17081 /// Processes this element and all child elements into an XmlWriter.
17082 /// </summary>
17083 public virtual void OutputXml(XmlWriter writer)
17084 {
17085 if ((null == writer))
17086 {
17087 throw new ArgumentNullException("writer");
17088 }
17089 writer.WriteStartElement("IgnoreRange", "http://wixtoolset.org/schemas/v4/wxs");
17090 if (this.offsetFieldSet)
17091 {
17092 writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture));
17093 }
17094 if (this.lengthFieldSet)
17095 {
17096 writer.WriteAttributeString("Length", this.lengthField.ToString(CultureInfo.InvariantCulture));
17097 }
17098 writer.WriteEndElement();
17099 }
17100
17101 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17102 void ISetAttributes.SetAttribute(string name, string value)
17103 {
17104 if (String.IsNullOrEmpty(name))
17105 {
17106 throw new ArgumentNullException("name");
17107 }
17108 if (("Offset" == name))
17109 {
17110 this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
17111 this.offsetFieldSet = true;
17112 }
17113 if (("Length" == name))
17114 {
17115 this.lengthField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
17116 this.lengthFieldSet = true;
17117 }
17118 }
17119 }
17120
17121 /// <summary>
17122 /// Specifies part of a file that cannot be overwritten during patching.
17123 /// </summary>
17124 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17125 public class ProtectRange : ISchemaElement, ISetAttributes
17126 {
17127
17128 private int offsetField;
17129
17130 private bool offsetFieldSet;
17131
17132 private int lengthField;
17133
17134 private bool lengthFieldSet;
17135
17136 private ISchemaElement parentElement;
17137
17138 /// <summary>
17139 /// Offset of the start of the range.
17140 /// </summary>
17141 public int Offset
17142 {
17143 get
17144 {
17145 return this.offsetField;
17146 }
17147 set
17148 {
17149 this.offsetFieldSet = true;
17150 this.offsetField = value;
17151 }
17152 }
17153
17154 /// <summary>
17155 /// Length of the range.
17156 /// </summary>
17157 public int Length
17158 {
17159 get
17160 {
17161 return this.lengthField;
17162 }
17163 set
17164 {
17165 this.lengthFieldSet = true;
17166 this.lengthField = value;
17167 }
17168 }
17169
17170 public virtual ISchemaElement ParentElement
17171 {
17172 get
17173 {
17174 return this.parentElement;
17175 }
17176 set
17177 {
17178 this.parentElement = value;
17179 }
17180 }
17181
17182 /// <summary>
17183 /// Processes this element and all child elements into an XmlWriter.
17184 /// </summary>
17185 public virtual void OutputXml(XmlWriter writer)
17186 {
17187 if ((null == writer))
17188 {
17189 throw new ArgumentNullException("writer");
17190 }
17191 writer.WriteStartElement("ProtectRange", "http://wixtoolset.org/schemas/v4/wxs");
17192 if (this.offsetFieldSet)
17193 {
17194 writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture));
17195 }
17196 if (this.lengthFieldSet)
17197 {
17198 writer.WriteAttributeString("Length", this.lengthField.ToString(CultureInfo.InvariantCulture));
17199 }
17200 writer.WriteEndElement();
17201 }
17202
17203 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17204 void ISetAttributes.SetAttribute(string name, string value)
17205 {
17206 if (String.IsNullOrEmpty(name))
17207 {
17208 throw new ArgumentNullException("name");
17209 }
17210 if (("Offset" == name))
17211 {
17212 this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
17213 this.offsetFieldSet = true;
17214 }
17215 if (("Length" == name))
17216 {
17217 this.lengthField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
17218 this.lengthFieldSet = true;
17219 }
17220 }
17221 }
17222
17223 /// <summary>
17224 /// Specifies a file to be protected.
17225 /// </summary>
17226 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17227 public class ProtectFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
17228 {
17229
17230 private ElementCollection children;
17231
17232 private string fileField;
17233
17234 private bool fileFieldSet;
17235
17236 private ISchemaElement parentElement;
17237
17238 public ProtectFile()
17239 {
17240 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
17241 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectRange)));
17242 this.children = childCollection0;
17243 }
17244
17245 public virtual IEnumerable Children
17246 {
17247 get
17248 {
17249 return this.children;
17250 }
17251 }
17252
17253 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
17254 public virtual IEnumerable this[System.Type childType]
17255 {
17256 get
17257 {
17258 return this.children.Filter(childType);
17259 }
17260 }
17261
17262 /// <summary>
17263 /// Foreign key into the File table.
17264 /// </summary>
17265 public string File
17266 {
17267 get
17268 {
17269 return this.fileField;
17270 }
17271 set
17272 {
17273 this.fileFieldSet = true;
17274 this.fileField = value;
17275 }
17276 }
17277
17278 public virtual ISchemaElement ParentElement
17279 {
17280 get
17281 {
17282 return this.parentElement;
17283 }
17284 set
17285 {
17286 this.parentElement = value;
17287 }
17288 }
17289
17290 public virtual void AddChild(ISchemaElement child)
17291 {
17292 if ((null == child))
17293 {
17294 throw new ArgumentNullException("child");
17295 }
17296 this.children.AddElement(child);
17297 child.ParentElement = this;
17298 }
17299
17300 public virtual void RemoveChild(ISchemaElement child)
17301 {
17302 if ((null == child))
17303 {
17304 throw new ArgumentNullException("child");
17305 }
17306 this.children.RemoveElement(child);
17307 child.ParentElement = null;
17308 }
17309
17310 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17311 ISchemaElement ICreateChildren.CreateChild(string childName)
17312 {
17313 if (String.IsNullOrEmpty(childName))
17314 {
17315 throw new ArgumentNullException("childName");
17316 }
17317 ISchemaElement childValue = null;
17318 if (("ProtectRange" == childName))
17319 {
17320 childValue = new ProtectRange();
17321 }
17322 if ((null == childValue))
17323 {
17324 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
17325 }
17326 return childValue;
17327 }
17328
17329 /// <summary>
17330 /// Processes this element and all child elements into an XmlWriter.
17331 /// </summary>
17332 public virtual void OutputXml(XmlWriter writer)
17333 {
17334 if ((null == writer))
17335 {
17336 throw new ArgumentNullException("writer");
17337 }
17338 writer.WriteStartElement("ProtectFile", "http://wixtoolset.org/schemas/v4/wxs");
17339 if (this.fileFieldSet)
17340 {
17341 writer.WriteAttributeString("File", this.fileField);
17342 }
17343 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
17344 {
17345 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
17346 childElement.OutputXml(writer);
17347 }
17348 writer.WriteEndElement();
17349 }
17350
17351 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17352 void ISetAttributes.SetAttribute(string name, string value)
17353 {
17354 if (String.IsNullOrEmpty(name))
17355 {
17356 throw new ArgumentNullException("name");
17357 }
17358 if (("File" == name))
17359 {
17360 this.fileField = value;
17361 this.fileFieldSet = true;
17362 }
17363 }
17364 }
17365
17366 /// <summary>
17367 /// Contains information about specific files that are not part of a regular target image.
17368 /// </summary>
17369 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17370 public class ExternalFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
17371 {
17372
17373 private ElementCollection children;
17374
17375 private string fileField;
17376
17377 private bool fileFieldSet;
17378
17379 private string sourceField;
17380
17381 private bool sourceFieldSet;
17382
17383 private string srcField;
17384
17385 private bool srcFieldSet;
17386
17387 private int orderField;
17388
17389 private bool orderFieldSet;
17390
17391 private ISchemaElement parentElement;
17392
17393 public ExternalFile()
17394 {
17395 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
17396 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ProtectRange)));
17397 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SymbolPath)));
17398 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
17399 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreRange)));
17400 childCollection0.AddCollection(childCollection1);
17401 this.children = childCollection0;
17402 }
17403
17404 public virtual IEnumerable Children
17405 {
17406 get
17407 {
17408 return this.children;
17409 }
17410 }
17411
17412 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
17413 public virtual IEnumerable this[System.Type childType]
17414 {
17415 get
17416 {
17417 return this.children.Filter(childType);
17418 }
17419 }
17420
17421 /// <summary>
17422 /// Foreign key into the File table.
17423 /// </summary>
17424 public string File
17425 {
17426 get
17427 {
17428 return this.fileField;
17429 }
17430 set
17431 {
17432 this.fileFieldSet = true;
17433 this.fileField = value;
17434 }
17435 }
17436
17437 /// <summary>
17438 /// Full path of the external file.
17439 /// </summary>
17440 public string Source
17441 {
17442 get
17443 {
17444 return this.sourceField;
17445 }
17446 set
17447 {
17448 this.sourceFieldSet = true;
17449 this.sourceField = value;
17450 }
17451 }
17452
17453 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
17454 public string src
17455 {
17456 get
17457 {
17458 return this.srcField;
17459 }
17460 set
17461 {
17462 this.srcFieldSet = true;
17463 this.srcField = value;
17464 }
17465 }
17466
17467 /// <summary>
17468 /// Specifies the order of the external files to use when creating the patch.
17469 /// </summary>
17470 public int Order
17471 {
17472 get
17473 {
17474 return this.orderField;
17475 }
17476 set
17477 {
17478 this.orderFieldSet = true;
17479 this.orderField = value;
17480 }
17481 }
17482
17483 public virtual ISchemaElement ParentElement
17484 {
17485 get
17486 {
17487 return this.parentElement;
17488 }
17489 set
17490 {
17491 this.parentElement = value;
17492 }
17493 }
17494
17495 public virtual void AddChild(ISchemaElement child)
17496 {
17497 if ((null == child))
17498 {
17499 throw new ArgumentNullException("child");
17500 }
17501 this.children.AddElement(child);
17502 child.ParentElement = this;
17503 }
17504
17505 public virtual void RemoveChild(ISchemaElement child)
17506 {
17507 if ((null == child))
17508 {
17509 throw new ArgumentNullException("child");
17510 }
17511 this.children.RemoveElement(child);
17512 child.ParentElement = null;
17513 }
17514
17515 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17516 ISchemaElement ICreateChildren.CreateChild(string childName)
17517 {
17518 if (String.IsNullOrEmpty(childName))
17519 {
17520 throw new ArgumentNullException("childName");
17521 }
17522 ISchemaElement childValue = null;
17523 if (("ProtectRange" == childName))
17524 {
17525 childValue = new ProtectRange();
17526 }
17527 if (("SymbolPath" == childName))
17528 {
17529 childValue = new SymbolPath();
17530 }
17531 if (("IgnoreRange" == childName))
17532 {
17533 childValue = new IgnoreRange();
17534 }
17535 if ((null == childValue))
17536 {
17537 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
17538 }
17539 return childValue;
17540 }
17541
17542 /// <summary>
17543 /// Processes this element and all child elements into an XmlWriter.
17544 /// </summary>
17545 public virtual void OutputXml(XmlWriter writer)
17546 {
17547 if ((null == writer))
17548 {
17549 throw new ArgumentNullException("writer");
17550 }
17551 writer.WriteStartElement("ExternalFile", "http://wixtoolset.org/schemas/v4/wxs");
17552 if (this.fileFieldSet)
17553 {
17554 writer.WriteAttributeString("File", this.fileField);
17555 }
17556 if (this.sourceFieldSet)
17557 {
17558 writer.WriteAttributeString("Source", this.sourceField);
17559 }
17560 if (this.srcFieldSet)
17561 {
17562 writer.WriteAttributeString("src", this.srcField);
17563 }
17564 if (this.orderFieldSet)
17565 {
17566 writer.WriteAttributeString("Order", this.orderField.ToString(CultureInfo.InvariantCulture));
17567 }
17568 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
17569 {
17570 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
17571 childElement.OutputXml(writer);
17572 }
17573 writer.WriteEndElement();
17574 }
17575
17576 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17577 void ISetAttributes.SetAttribute(string name, string value)
17578 {
17579 if (String.IsNullOrEmpty(name))
17580 {
17581 throw new ArgumentNullException("name");
17582 }
17583 if (("File" == name))
17584 {
17585 this.fileField = value;
17586 this.fileFieldSet = true;
17587 }
17588 if (("Source" == name))
17589 {
17590 this.sourceField = value;
17591 this.sourceFieldSet = true;
17592 }
17593 if (("src" == name))
17594 {
17595 this.srcField = value;
17596 this.srcFieldSet = true;
17597 }
17598 if (("Order" == name))
17599 {
17600 this.orderField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
17601 this.orderFieldSet = true;
17602 }
17603 }
17604 }
17605
17606 /// <summary>
17607 /// Specifies files to either ignore or to specify optional data about a file.
17608 /// </summary>
17609 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17610 public class UpgradeFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
17611 {
17612
17613 private ElementCollection children;
17614
17615 private string fileField;
17616
17617 private bool fileFieldSet;
17618
17619 private YesNoType ignoreField;
17620
17621 private bool ignoreFieldSet;
17622
17623 private YesNoType allowIgnoreOnErrorField;
17624
17625 private bool allowIgnoreOnErrorFieldSet;
17626
17627 private YesNoType wholeFileField;
17628
17629 private bool wholeFileFieldSet;
17630
17631 private ISchemaElement parentElement;
17632
17633 public UpgradeFile()
17634 {
17635 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
17636 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
17637 this.children = childCollection0;
17638 }
17639
17640 public virtual IEnumerable Children
17641 {
17642 get
17643 {
17644 return this.children;
17645 }
17646 }
17647
17648 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
17649 public virtual IEnumerable this[System.Type childType]
17650 {
17651 get
17652 {
17653 return this.children.Filter(childType);
17654 }
17655 }
17656
17657 /// <summary>
17658 /// Foreign key into the File table.
17659 /// </summary>
17660 public string File
17661 {
17662 get
17663 {
17664 return this.fileField;
17665 }
17666 set
17667 {
17668 this.fileFieldSet = true;
17669 this.fileField = value;
17670 }
17671 }
17672
17673 /// <summary>
17674 /// If yes, the file is ignored during patching, and the next two attributes are ignored.
17675 /// </summary>
17676 public YesNoType Ignore
17677 {
17678 get
17679 {
17680 return this.ignoreField;
17681 }
17682 set
17683 {
17684 this.ignoreFieldSet = true;
17685 this.ignoreField = value;
17686 }
17687 }
17688
17689 /// <summary>
17690 /// Specifies whether patching this file is vital.
17691 /// </summary>
17692 public YesNoType AllowIgnoreOnError
17693 {
17694 get
17695 {
17696 return this.allowIgnoreOnErrorField;
17697 }
17698 set
17699 {
17700 this.allowIgnoreOnErrorFieldSet = true;
17701 this.allowIgnoreOnErrorField = value;
17702 }
17703 }
17704
17705 /// <summary>
17706 /// Whether the whole file should be installed, rather than creating a binary patch.
17707 /// </summary>
17708 public YesNoType WholeFile
17709 {
17710 get
17711 {
17712 return this.wholeFileField;
17713 }
17714 set
17715 {
17716 this.wholeFileFieldSet = true;
17717 this.wholeFileField = value;
17718 }
17719 }
17720
17721 public virtual ISchemaElement ParentElement
17722 {
17723 get
17724 {
17725 return this.parentElement;
17726 }
17727 set
17728 {
17729 this.parentElement = value;
17730 }
17731 }
17732
17733 public virtual void AddChild(ISchemaElement child)
17734 {
17735 if ((null == child))
17736 {
17737 throw new ArgumentNullException("child");
17738 }
17739 this.children.AddElement(child);
17740 child.ParentElement = this;
17741 }
17742
17743 public virtual void RemoveChild(ISchemaElement child)
17744 {
17745 if ((null == child))
17746 {
17747 throw new ArgumentNullException("child");
17748 }
17749 this.children.RemoveElement(child);
17750 child.ParentElement = null;
17751 }
17752
17753 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17754 ISchemaElement ICreateChildren.CreateChild(string childName)
17755 {
17756 if (String.IsNullOrEmpty(childName))
17757 {
17758 throw new ArgumentNullException("childName");
17759 }
17760 ISchemaElement childValue = null;
17761 if (("SymbolPath" == childName))
17762 {
17763 childValue = new SymbolPath();
17764 }
17765 if ((null == childValue))
17766 {
17767 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
17768 }
17769 return childValue;
17770 }
17771
17772 /// <summary>
17773 /// Processes this element and all child elements into an XmlWriter.
17774 /// </summary>
17775 public virtual void OutputXml(XmlWriter writer)
17776 {
17777 if ((null == writer))
17778 {
17779 throw new ArgumentNullException("writer");
17780 }
17781 writer.WriteStartElement("UpgradeFile", "http://wixtoolset.org/schemas/v4/wxs");
17782 if (this.fileFieldSet)
17783 {
17784 writer.WriteAttributeString("File", this.fileField);
17785 }
17786 if (this.ignoreFieldSet)
17787 {
17788 if ((this.ignoreField == YesNoType.no))
17789 {
17790 writer.WriteAttributeString("Ignore", "no");
17791 }
17792 if ((this.ignoreField == YesNoType.yes))
17793 {
17794 writer.WriteAttributeString("Ignore", "yes");
17795 }
17796 }
17797 if (this.allowIgnoreOnErrorFieldSet)
17798 {
17799 if ((this.allowIgnoreOnErrorField == YesNoType.no))
17800 {
17801 writer.WriteAttributeString("AllowIgnoreOnError", "no");
17802 }
17803 if ((this.allowIgnoreOnErrorField == YesNoType.yes))
17804 {
17805 writer.WriteAttributeString("AllowIgnoreOnError", "yes");
17806 }
17807 }
17808 if (this.wholeFileFieldSet)
17809 {
17810 if ((this.wholeFileField == YesNoType.no))
17811 {
17812 writer.WriteAttributeString("WholeFile", "no");
17813 }
17814 if ((this.wholeFileField == YesNoType.yes))
17815 {
17816 writer.WriteAttributeString("WholeFile", "yes");
17817 }
17818 }
17819 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
17820 {
17821 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
17822 childElement.OutputXml(writer);
17823 }
17824 writer.WriteEndElement();
17825 }
17826
17827 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17828 void ISetAttributes.SetAttribute(string name, string value)
17829 {
17830 if (String.IsNullOrEmpty(name))
17831 {
17832 throw new ArgumentNullException("name");
17833 }
17834 if (("File" == name))
17835 {
17836 this.fileField = value;
17837 this.fileFieldSet = true;
17838 }
17839 if (("Ignore" == name))
17840 {
17841 this.ignoreField = Enums.ParseYesNoType(value);
17842 this.ignoreFieldSet = true;
17843 }
17844 if (("AllowIgnoreOnError" == name))
17845 {
17846 this.allowIgnoreOnErrorField = Enums.ParseYesNoType(value);
17847 this.allowIgnoreOnErrorFieldSet = true;
17848 }
17849 if (("WholeFile" == name))
17850 {
17851 this.wholeFileField = Enums.ParseYesNoType(value);
17852 this.wholeFileFieldSet = true;
17853 }
17854 }
17855 }
17856
17857 /// <summary>
17858 /// A path to symbols.
17859 /// </summary>
17860 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17861 public class SymbolPath : ISchemaElement, ISetAttributes
17862 {
17863
17864 private string pathField;
17865
17866 private bool pathFieldSet;
17867
17868 private ISchemaElement parentElement;
17869
17870 /// <summary>
17871 /// The path.
17872 /// </summary>
17873 public string Path
17874 {
17875 get
17876 {
17877 return this.pathField;
17878 }
17879 set
17880 {
17881 this.pathFieldSet = true;
17882 this.pathField = value;
17883 }
17884 }
17885
17886 public virtual ISchemaElement ParentElement
17887 {
17888 get
17889 {
17890 return this.parentElement;
17891 }
17892 set
17893 {
17894 this.parentElement = value;
17895 }
17896 }
17897
17898 /// <summary>
17899 /// Processes this element and all child elements into an XmlWriter.
17900 /// </summary>
17901 public virtual void OutputXml(XmlWriter writer)
17902 {
17903 if ((null == writer))
17904 {
17905 throw new ArgumentNullException("writer");
17906 }
17907 writer.WriteStartElement("SymbolPath", "http://wixtoolset.org/schemas/v4/wxs");
17908 if (this.pathFieldSet)
17909 {
17910 writer.WriteAttributeString("Path", this.pathField);
17911 }
17912 writer.WriteEndElement();
17913 }
17914
17915 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17916 void ISetAttributes.SetAttribute(string name, string value)
17917 {
17918 if (String.IsNullOrEmpty(name))
17919 {
17920 throw new ArgumentNullException("name");
17921 }
17922 if (("Path" == name))
17923 {
17924 this.pathField = value;
17925 this.pathFieldSet = true;
17926 }
17927 }
17928 }
17929
17930 /// <summary>
17931 /// Properties about the package to be placed in the Summary Information Stream. These are
17932 /// visible from COM through the IStream interface, and these properties can be seen on the package in Explorer.
17933 /// </summary>
17934 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17935 public class SummaryInformation : ISchemaElement, ISetAttributes
17936 {
17937
17938 private string idField;
17939
17940 private bool idFieldSet;
17941
17942 private YesNoType adminImageField;
17943
17944 private bool adminImageFieldSet;
17945
17946 private string commentsField;
17947
17948 private bool commentsFieldSet;
17949
17950 private YesNoType compressedField;
17951
17952 private bool compressedFieldSet;
17953
17954 private string descriptionField;
17955
17956 private bool descriptionFieldSet;
17957
17958 private InstallPrivilegesType installPrivilegesField;
17959
17960 private bool installPrivilegesFieldSet;
17961
17962 private InstallScopeType installScopeField;
17963
17964 private bool installScopeFieldSet;
17965
17966 private int installerVersionField;
17967
17968 private bool installerVersionFieldSet;
17969
17970 private string keywordsField;
17971
17972 private bool keywordsFieldSet;
17973
17974 private string languagesField;
17975
17976 private bool languagesFieldSet;
17977
17978 private string manufacturerField;
17979
17980 private bool manufacturerFieldSet;
17981
17982 private string platformsField;
17983
17984 private bool platformsFieldSet;
17985
17986 private PlatformType platformField;
17987
17988 private bool platformFieldSet;
17989
17990 private YesNoDefaultType readOnlyField;
17991
17992 private bool readOnlyFieldSet;
17993
17994 private YesNoType shortNamesField;
17995
17996 private bool shortNamesFieldSet;
17997
17998 private string summaryCodepageField;
17999
18000 private bool summaryCodepageFieldSet;
18001
18002 private ISchemaElement parentElement;
18003
18004 /// <summary>
18005 /// The package code GUID for a product or merge module.
18006 /// When compiling a product, this attribute should not be set in order to allow the package
18007 /// code to be generated for each build.
18008 /// When compiling a merge module, this attribute must be set to the modularization guid.
18009 /// </summary>
18010 public string Id
18011 {
18012 get
18013 {
18014 return this.idField;
18015 }
18016 set
18017 {
18018 this.idFieldSet = true;
18019 this.idField = value;
18020 }
18021 }
18022
18023 /// <summary>
18024 /// Set to 'yes' if the source is an admin image.
18025 /// </summary>
18026 public YesNoType AdminImage
18027 {
18028 get
18029 {
18030 return this.adminImageField;
18031 }
18032 set
18033 {
18034 this.adminImageFieldSet = true;
18035 this.adminImageField = value;
18036 }
18037 }
18038
18039 /// <summary>
18040 /// Optional comments for browsing.
18041 /// </summary>
18042 public string Comments
18043 {
18044 get
18045 {
18046 return this.commentsField;
18047 }
18048 set
18049 {
18050 this.commentsFieldSet = true;
18051 this.commentsField = value;
18052 }
18053 }
18054
18055 /// <summary>
18056 /// Set to 'yes' to have compressed files in the source.
18057 /// This attribute cannot be set for merge modules.
18058 /// </summary>
18059 public YesNoType Compressed
18060 {
18061 get
18062 {
18063 return this.compressedField;
18064 }
18065 set
18066 {
18067 this.compressedFieldSet = true;
18068 this.compressedField = value;
18069 }
18070 }
18071
18072 /// <summary>
18073 /// The product full name or description.
18074 /// </summary>
18075 public string Description
18076 {
18077 get
18078 {
18079 return this.descriptionField;
18080 }
18081 set
18082 {
18083 this.descriptionFieldSet = true;
18084 this.descriptionField = value;
18085 }
18086 }
18087
18088 /// <summary>
18089 /// Use this attribute to specify the priviliges required to install the package on Windows Vista and above.
18090 /// </summary>
18091 public InstallPrivilegesType InstallPrivileges
18092 {
18093 get
18094 {
18095 return this.installPrivilegesField;
18096 }
18097 set
18098 {
18099 this.installPrivilegesFieldSet = true;
18100 this.installPrivilegesField = value;
18101 }
18102 }
18103
18104 /// <summary>
18105 /// Use this attribute to specify the installation scope of this package: per-machine or per-user.
18106 /// </summary>
18107 public InstallScopeType InstallScope
18108 {
18109 get
18110 {
18111 return this.installScopeField;
18112 }
18113 set
18114 {
18115 this.installScopeFieldSet = true;
18116 this.installScopeField = value;
18117 }
18118 }
18119
18120 /// <summary>
18121 /// The minimum version of the Windows Installer required to install this package. Take the major version of the required Windows Installer
18122 /// and multiply by a 100 then add the minor version of the Windows Installer. For example, "200" would represent Windows Installer 2.0 and
18123 /// "405" would represent Windows Installer 4.5. For 64-bit Windows Installer packages, this property is set to 200 by default as
18124 /// Windows Installer 2.0 was the first version to support 64-bit packages.
18125 /// </summary>
18126 public int InstallerVersion
18127 {
18128 get
18129 {
18130 return this.installerVersionField;
18131 }
18132 set
18133 {
18134 this.installerVersionFieldSet = true;
18135 this.installerVersionField = value;
18136 }
18137 }
18138
18139 /// <summary>
18140 /// Optional keywords for browsing.
18141 /// </summary>
18142 public string Keywords
18143 {
18144 get
18145 {
18146 return this.keywordsField;
18147 }
18148 set
18149 {
18150 this.keywordsFieldSet = true;
18151 this.keywordsField = value;
18152 }
18153 }
18154
18155 /// <summary>
18156 /// The list of language IDs (LCIDs) supported in the package.
18157 /// </summary>
18158 public string Languages
18159 {
18160 get
18161 {
18162 return this.languagesField;
18163 }
18164 set
18165 {
18166 this.languagesFieldSet = true;
18167 this.languagesField = value;
18168 }
18169 }
18170
18171 /// <summary>
18172 /// The vendor releasing the package.
18173 /// </summary>
18174 public string Manufacturer
18175 {
18176 get
18177 {
18178 return this.manufacturerField;
18179 }
18180 set
18181 {
18182 this.manufacturerFieldSet = true;
18183 this.manufacturerField = value;
18184 }
18185 }
18186
18187 /// <summary>
18188 /// The list of platforms supported by the package. This attribute has been deprecated.
18189 /// Specify the -arch switch at the candle.exe command line or the InstallerPlatform
18190 /// property in a .wixproj MSBuild project.
18191 /// </summary>
18192 public string Platforms
18193 {
18194 get
18195 {
18196 return this.platformsField;
18197 }
18198 set
18199 {
18200 this.platformsFieldSet = true;
18201 this.platformsField = value;
18202 }
18203 }
18204
18205 /// <summary>
18206 /// The platform supported by the package. Use of this attribute is discouraged; instead,
18207 /// specify the -arch switch at the candle.exe command line or the InstallerPlatform
18208 /// property in a .wixproj MSBuild project.
18209 /// </summary>
18210 public PlatformType Platform
18211 {
18212 get
18213 {
18214 return this.platformField;
18215 }
18216 set
18217 {
18218 this.platformFieldSet = true;
18219 this.platformField = value;
18220 }
18221 }
18222
18223 /// <summary>
18224 /// The value of this attribute conveys whether the package should be opened as read-only.
18225 /// A database editing tool should not modify a read-only enforced database and should
18226 /// issue a warning at attempts to modify a read-only recommended database.
18227 /// </summary>
18228 public YesNoDefaultType ReadOnly
18229 {
18230 get
18231 {
18232 return this.readOnlyField;
18233 }
18234 set
18235 {
18236 this.readOnlyFieldSet = true;
18237 this.readOnlyField = value;
18238 }
18239 }
18240
18241 /// <summary>
18242 /// Set to 'yes' to have short filenames in the source.
18243 /// </summary>
18244 public YesNoType ShortNames
18245 {
18246 get
18247 {
18248 return this.shortNamesField;
18249 }
18250 set
18251 {
18252 this.shortNamesFieldSet = true;
18253 this.shortNamesField = value;
18254 }
18255 }
18256
18257 /// <summary>
18258 /// The code page integer value or web name for summary info strings only. See remarks for more information.
18259 /// </summary>
18260 public string SummaryCodepage
18261 {
18262 get
18263 {
18264 return this.summaryCodepageField;
18265 }
18266 set
18267 {
18268 this.summaryCodepageFieldSet = true;
18269 this.summaryCodepageField = value;
18270 }
18271 }
18272
18273 public virtual ISchemaElement ParentElement
18274 {
18275 get
18276 {
18277 return this.parentElement;
18278 }
18279 set
18280 {
18281 this.parentElement = value;
18282 }
18283 }
18284
18285 /// <summary>
18286 /// Parses a InstallPrivilegesType from a string.
18287 /// </summary>
18288 public static InstallPrivilegesType ParseInstallPrivilegesType(string value)
18289 {
18290 InstallPrivilegesType parsedValue;
18291 SummaryInformation.TryParseInstallPrivilegesType(value, out parsedValue);
18292 return parsedValue;
18293 }
18294
18295 /// <summary>
18296 /// Tries to parse a InstallPrivilegesType from a string.
18297 /// </summary>
18298 public static bool TryParseInstallPrivilegesType(string value, out InstallPrivilegesType parsedValue)
18299 {
18300 parsedValue = InstallPrivilegesType.NotSet;
18301 if (string.IsNullOrEmpty(value))
18302 {
18303 return false;
18304 }
18305 if (("limited" == value))
18306 {
18307 parsedValue = InstallPrivilegesType.limited;
18308 }
18309 else
18310 {
18311 if (("elevated" == value))
18312 {
18313 parsedValue = InstallPrivilegesType.elevated;
18314 }
18315 else
18316 {
18317 parsedValue = InstallPrivilegesType.IllegalValue;
18318 return false;
18319 }
18320 }
18321 return true;
18322 }
18323
18324 /// <summary>
18325 /// Parses a InstallScopeType from a string.
18326 /// </summary>
18327 public static InstallScopeType ParseInstallScopeType(string value)
18328 {
18329 InstallScopeType parsedValue;
18330 SummaryInformation.TryParseInstallScopeType(value, out parsedValue);
18331 return parsedValue;
18332 }
18333
18334 /// <summary>
18335 /// Tries to parse a InstallScopeType from a string.
18336 /// </summary>
18337 public static bool TryParseInstallScopeType(string value, out InstallScopeType parsedValue)
18338 {
18339 parsedValue = InstallScopeType.NotSet;
18340 if (string.IsNullOrEmpty(value))
18341 {
18342 return false;
18343 }
18344 if (("perMachine" == value))
18345 {
18346 parsedValue = InstallScopeType.perMachine;
18347 }
18348 else
18349 {
18350 if (("perUser" == value))
18351 {
18352 parsedValue = InstallScopeType.perUser;
18353 }
18354 else
18355 {
18356 parsedValue = InstallScopeType.IllegalValue;
18357 return false;
18358 }
18359 }
18360 return true;
18361 }
18362
18363 /// <summary>
18364 /// Parses a PlatformType from a string.
18365 /// </summary>
18366 public static PlatformType ParsePlatformType(string value)
18367 {
18368 PlatformType parsedValue;
18369 SummaryInformation.TryParsePlatformType(value, out parsedValue);
18370 return parsedValue;
18371 }
18372
18373 /// <summary>
18374 /// Tries to parse a PlatformType from a string.
18375 /// </summary>
18376 public static bool TryParsePlatformType(string value, out PlatformType parsedValue)
18377 {
18378 parsedValue = PlatformType.NotSet;
18379 if (string.IsNullOrEmpty(value))
18380 {
18381 return false;
18382 }
18383 if (("x86" == value))
18384 {
18385 parsedValue = PlatformType.x86;
18386 }
18387 else
18388 {
18389 if (("ia64" == value))
18390 {
18391 parsedValue = PlatformType.ia64;
18392 }
18393 else
18394 {
18395 if (("x64" == value))
18396 {
18397 parsedValue = PlatformType.x64;
18398 }
18399 else
18400 {
18401 if (("arm" == value))
18402 {
18403 parsedValue = PlatformType.arm;
18404 }
18405 else
18406 {
18407 if (("intel" == value))
18408 {
18409 parsedValue = PlatformType.intel;
18410 }
18411 else
18412 {
18413 if (("intel64" == value))
18414 {
18415 parsedValue = PlatformType.intel64;
18416 }
18417 else
18418 {
18419 parsedValue = PlatformType.IllegalValue;
18420 return false;
18421 }
18422 }
18423 }
18424 }
18425 }
18426 }
18427 return true;
18428 }
18429
18430 /// <summary>
18431 /// Processes this element and all child elements into an XmlWriter.
18432 /// </summary>
18433 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
18434 public virtual void OutputXml(XmlWriter writer)
18435 {
18436 if ((null == writer))
18437 {
18438 throw new ArgumentNullException("writer");
18439 }
18440 writer.WriteStartElement("SummaryInformation", "http://wixtoolset.org/schemas/v4/wxs");
18441 if (this.idFieldSet)
18442 {
18443 writer.WriteAttributeString("Id", this.idField);
18444 }
18445 if (this.adminImageFieldSet)
18446 {
18447 if ((this.adminImageField == YesNoType.no))
18448 {
18449 writer.WriteAttributeString("AdminImage", "no");
18450 }
18451 if ((this.adminImageField == YesNoType.yes))
18452 {
18453 writer.WriteAttributeString("AdminImage", "yes");
18454 }
18455 }
18456 if (this.commentsFieldSet)
18457 {
18458 writer.WriteAttributeString("Comments", this.commentsField);
18459 }
18460 if (this.compressedFieldSet)
18461 {
18462 if ((this.compressedField == YesNoType.no))
18463 {
18464 writer.WriteAttributeString("Compressed", "no");
18465 }
18466 if ((this.compressedField == YesNoType.yes))
18467 {
18468 writer.WriteAttributeString("Compressed", "yes");
18469 }
18470 }
18471 if (this.descriptionFieldSet)
18472 {
18473 writer.WriteAttributeString("Description", this.descriptionField);
18474 }
18475 if (this.installPrivilegesFieldSet)
18476 {
18477 if ((this.installPrivilegesField == InstallPrivilegesType.limited))
18478 {
18479 writer.WriteAttributeString("InstallPrivileges", "limited");
18480 }
18481 if ((this.installPrivilegesField == InstallPrivilegesType.elevated))
18482 {
18483 writer.WriteAttributeString("InstallPrivileges", "elevated");
18484 }
18485 }
18486 if (this.installScopeFieldSet)
18487 {
18488 if ((this.installScopeField == InstallScopeType.perMachine))
18489 {
18490 writer.WriteAttributeString("InstallScope", "perMachine");
18491 }
18492 if ((this.installScopeField == InstallScopeType.perUser))
18493 {
18494 writer.WriteAttributeString("InstallScope", "perUser");
18495 }
18496 }
18497 if (this.installerVersionFieldSet)
18498 {
18499 writer.WriteAttributeString("InstallerVersion", this.installerVersionField.ToString(CultureInfo.InvariantCulture));
18500 }
18501 if (this.keywordsFieldSet)
18502 {
18503 writer.WriteAttributeString("Keywords", this.keywordsField);
18504 }
18505 if (this.languagesFieldSet)
18506 {
18507 writer.WriteAttributeString("Languages", this.languagesField);
18508 }
18509 if (this.manufacturerFieldSet)
18510 {
18511 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
18512 }
18513 if (this.platformsFieldSet)
18514 {
18515 writer.WriteAttributeString("Platforms", this.platformsField);
18516 }
18517 if (this.platformFieldSet)
18518 {
18519 if ((this.platformField == PlatformType.x86))
18520 {
18521 writer.WriteAttributeString("Platform", "x86");
18522 }
18523 if ((this.platformField == PlatformType.ia64))
18524 {
18525 writer.WriteAttributeString("Platform", "ia64");
18526 }
18527 if ((this.platformField == PlatformType.x64))
18528 {
18529 writer.WriteAttributeString("Platform", "x64");
18530 }
18531 if ((this.platformField == PlatformType.arm))
18532 {
18533 writer.WriteAttributeString("Platform", "arm");
18534 }
18535 if ((this.platformField == PlatformType.intel))
18536 {
18537 writer.WriteAttributeString("Platform", "intel");
18538 }
18539 if ((this.platformField == PlatformType.intel64))
18540 {
18541 writer.WriteAttributeString("Platform", "intel64");
18542 }
18543 }
18544 if (this.readOnlyFieldSet)
18545 {
18546 if ((this.readOnlyField == YesNoDefaultType.@default))
18547 {
18548 writer.WriteAttributeString("ReadOnly", "default");
18549 }
18550 if ((this.readOnlyField == YesNoDefaultType.no))
18551 {
18552 writer.WriteAttributeString("ReadOnly", "no");
18553 }
18554 if ((this.readOnlyField == YesNoDefaultType.yes))
18555 {
18556 writer.WriteAttributeString("ReadOnly", "yes");
18557 }
18558 }
18559 if (this.shortNamesFieldSet)
18560 {
18561 if ((this.shortNamesField == YesNoType.no))
18562 {
18563 writer.WriteAttributeString("ShortNames", "no");
18564 }
18565 if ((this.shortNamesField == YesNoType.yes))
18566 {
18567 writer.WriteAttributeString("ShortNames", "yes");
18568 }
18569 }
18570 if (this.summaryCodepageFieldSet)
18571 {
18572 writer.WriteAttributeString("SummaryCodepage", this.summaryCodepageField);
18573 }
18574 writer.WriteEndElement();
18575 }
18576
18577 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
18578 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
18579 void ISetAttributes.SetAttribute(string name, string value)
18580 {
18581 if (String.IsNullOrEmpty(name))
18582 {
18583 throw new ArgumentNullException("name");
18584 }
18585 if (("Id" == name))
18586 {
18587 this.idField = value;
18588 this.idFieldSet = true;
18589 }
18590 if (("AdminImage" == name))
18591 {
18592 this.adminImageField = Enums.ParseYesNoType(value);
18593 this.adminImageFieldSet = true;
18594 }
18595 if (("Comments" == name))
18596 {
18597 this.commentsField = value;
18598 this.commentsFieldSet = true;
18599 }
18600 if (("Compressed" == name))
18601 {
18602 this.compressedField = Enums.ParseYesNoType(value);
18603 this.compressedFieldSet = true;
18604 }
18605 if (("Description" == name))
18606 {
18607 this.descriptionField = value;
18608 this.descriptionFieldSet = true;
18609 }
18610 if (("InstallPrivileges" == name))
18611 {
18612 this.installPrivilegesField = SummaryInformation.ParseInstallPrivilegesType(value);
18613 this.installPrivilegesFieldSet = true;
18614 }
18615 if (("InstallScope" == name))
18616 {
18617 this.installScopeField = SummaryInformation.ParseInstallScopeType(value);
18618 this.installScopeFieldSet = true;
18619 }
18620 if (("InstallerVersion" == name))
18621 {
18622 this.installerVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
18623 this.installerVersionFieldSet = true;
18624 }
18625 if (("Keywords" == name))
18626 {
18627 this.keywordsField = value;
18628 this.keywordsFieldSet = true;
18629 }
18630 if (("Languages" == name))
18631 {
18632 this.languagesField = value;
18633 this.languagesFieldSet = true;
18634 }
18635 if (("Manufacturer" == name))
18636 {
18637 this.manufacturerField = value;
18638 this.manufacturerFieldSet = true;
18639 }
18640 if (("Platforms" == name))
18641 {
18642 this.platformsField = value;
18643 this.platformsFieldSet = true;
18644 }
18645 if (("Platform" == name))
18646 {
18647 this.platformField = SummaryInformation.ParsePlatformType(value);
18648 this.platformFieldSet = true;
18649 }
18650 if (("ReadOnly" == name))
18651 {
18652 this.readOnlyField = Enums.ParseYesNoDefaultType(value);
18653 this.readOnlyFieldSet = true;
18654 }
18655 if (("ShortNames" == name))
18656 {
18657 this.shortNamesField = Enums.ParseYesNoType(value);
18658 this.shortNamesFieldSet = true;
18659 }
18660 if (("SummaryCodepage" == name))
18661 {
18662 this.summaryCodepageField = value;
18663 this.summaryCodepageFieldSet = true;
18664 }
18665 }
18666
18667 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18668 public enum InstallPrivilegesType
18669 {
18670
18671 IllegalValue = int.MaxValue,
18672
18673 NotSet = -1,
18674
18675 /// <summary>
18676 /// Set this value to declare that the package does not require elevated privileges to install.
18677 /// </summary>
18678 limited,
18679
18680 /// <summary>
18681 /// Set this value to declare that the package requires elevated privileges to install.
18682 /// This is the default value.
18683 /// </summary>
18684 elevated,
18685 }
18686
18687 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18688 public enum InstallScopeType
18689 {
18690
18691 IllegalValue = int.MaxValue,
18692
18693 NotSet = -1,
18694
18695 /// <summary>
18696 /// Set this value to declare that the package is a per-machine installation and requires elevated privileges to install.
18697 /// Sets the ALLUSERS property to 1.
18698 /// </summary>
18699 perMachine,
18700
18701 /// <summary>
18702 /// Set this value to declare that the package is a per-user installation and does not require elevated privileges to install.
18703 /// Sets the package's InstallPrivileges attribute to "limited."
18704 /// </summary>
18705 perUser,
18706 }
18707
18708 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18709 public enum PlatformType
18710 {
18711
18712 IllegalValue = int.MaxValue,
18713
18714 NotSet = -1,
18715
18716 /// <summary>
18717 /// Set this value to declare that the package is an x86 package.
18718 /// </summary>
18719 x86,
18720
18721 /// <summary>
18722 /// Set this value to declare that the package is an ia64 package.
18723 /// This value requires that the InstallerVersion property be set to 200 or greater.
18724 /// </summary>
18725 ia64,
18726
18727 /// <summary>
18728 /// Set this value to declare that the package is an x64 package.
18729 /// This value requires that the InstallerVersion property be set to 200 or greater.
18730 /// </summary>
18731 x64,
18732
18733 /// <summary>
18734 /// Set this value to declare that the package is an arm package.
18735 /// This value requires that the InstallerVersion property be set to 500 or greater.
18736 /// </summary>
18737 arm,
18738
18739 /// <summary>
18740 /// This value has been deprecated. Use "x86" instead.
18741 /// </summary>
18742 intel,
18743
18744 /// <summary>
18745 /// This value has been deprecated. Use "ia64" instead.
18746 /// </summary>
18747 intel64,
18748 }
18749 }
18750
18751 /// <summary>
18752 /// The MsiAssemblyName table specifies the schema for the elements of a strong assembly cache name for a .NET Framework or Win32 assembly.
18753 /// Consider using the Assembly attribute on File element to have the toolset populate these entries automatically.
18754 /// </summary>
18755 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18756 public class AssemblyName : ISchemaElement, ISetAttributes
18757 {
18758
18759 private string idField;
18760
18761 private bool idFieldSet;
18762
18763 private string valueField;
18764
18765 private bool valueFieldSet;
18766
18767 private ISchemaElement parentElement;
18768
18769 /// <summary>
18770 /// Name of the attribute associated with the value specified in the Value column.
18771 /// </summary>
18772 public string Id
18773 {
18774 get
18775 {
18776 return this.idField;
18777 }
18778 set
18779 {
18780 this.idFieldSet = true;
18781 this.idField = value;
18782 }
18783 }
18784
18785 /// <summary>
18786 /// Value associated with the name specified in the Name column.
18787 /// </summary>
18788 public string Value
18789 {
18790 get
18791 {
18792 return this.valueField;
18793 }
18794 set
18795 {
18796 this.valueFieldSet = true;
18797 this.valueField = value;
18798 }
18799 }
18800
18801 public virtual ISchemaElement ParentElement
18802 {
18803 get
18804 {
18805 return this.parentElement;
18806 }
18807 set
18808 {
18809 this.parentElement = value;
18810 }
18811 }
18812
18813 /// <summary>
18814 /// Processes this element and all child elements into an XmlWriter.
18815 /// </summary>
18816 public virtual void OutputXml(XmlWriter writer)
18817 {
18818 if ((null == writer))
18819 {
18820 throw new ArgumentNullException("writer");
18821 }
18822 writer.WriteStartElement("AssemblyName", "http://wixtoolset.org/schemas/v4/wxs");
18823 if (this.idFieldSet)
18824 {
18825 writer.WriteAttributeString("Id", this.idField);
18826 }
18827 if (this.valueFieldSet)
18828 {
18829 writer.WriteAttributeString("Value", this.valueField);
18830 }
18831 writer.WriteEndElement();
18832 }
18833
18834 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
18835 void ISetAttributes.SetAttribute(string name, string value)
18836 {
18837 if (String.IsNullOrEmpty(name))
18838 {
18839 throw new ArgumentNullException("name");
18840 }
18841 if (("Id" == name))
18842 {
18843 this.idField = value;
18844 this.idFieldSet = true;
18845 }
18846 if (("Value" == name))
18847 {
18848 this.valueField = value;
18849 this.valueFieldSet = true;
18850 }
18851 }
18852 }
18853
18854 /// <summary>
18855 /// Identifies the possible signer certificates used to digitally sign patches.
18856 /// </summary>
18857 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18858 public class PatchCertificates : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
18859 {
18860
18861 private ElementCollection children;
18862
18863 private ISchemaElement parentElement;
18864
18865 public PatchCertificates()
18866 {
18867 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
18868 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate)));
18869 this.children = childCollection0;
18870 }
18871
18872 public virtual IEnumerable Children
18873 {
18874 get
18875 {
18876 return this.children;
18877 }
18878 }
18879
18880 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
18881 public virtual IEnumerable this[System.Type childType]
18882 {
18883 get
18884 {
18885 return this.children.Filter(childType);
18886 }
18887 }
18888
18889 public virtual ISchemaElement ParentElement
18890 {
18891 get
18892 {
18893 return this.parentElement;
18894 }
18895 set
18896 {
18897 this.parentElement = value;
18898 }
18899 }
18900
18901 public virtual void AddChild(ISchemaElement child)
18902 {
18903 if ((null == child))
18904 {
18905 throw new ArgumentNullException("child");
18906 }
18907 this.children.AddElement(child);
18908 child.ParentElement = this;
18909 }
18910
18911 public virtual void RemoveChild(ISchemaElement child)
18912 {
18913 if ((null == child))
18914 {
18915 throw new ArgumentNullException("child");
18916 }
18917 this.children.RemoveElement(child);
18918 child.ParentElement = null;
18919 }
18920
18921 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
18922 ISchemaElement ICreateChildren.CreateChild(string childName)
18923 {
18924 if (String.IsNullOrEmpty(childName))
18925 {
18926 throw new ArgumentNullException("childName");
18927 }
18928 ISchemaElement childValue = null;
18929 if (("DigitalCertificate" == childName))
18930 {
18931 childValue = new DigitalCertificate();
18932 }
18933 if ((null == childValue))
18934 {
18935 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
18936 }
18937 return childValue;
18938 }
18939
18940 /// <summary>
18941 /// Processes this element and all child elements into an XmlWriter.
18942 /// </summary>
18943 public virtual void OutputXml(XmlWriter writer)
18944 {
18945 if ((null == writer))
18946 {
18947 throw new ArgumentNullException("writer");
18948 }
18949 writer.WriteStartElement("PatchCertificates", "http://wixtoolset.org/schemas/v4/wxs");
18950 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
18951 {
18952 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
18953 childElement.OutputXml(writer);
18954 }
18955 writer.WriteEndElement();
18956 }
18957
18958 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
18959 void ISetAttributes.SetAttribute(string name, string value)
18960 {
18961 if (String.IsNullOrEmpty(name))
18962 {
18963 throw new ArgumentNullException("name");
18964 }
18965 }
18966 }
18967
18968 /// <summary>
18969 /// Digital signatures that identify installation packages in a multi-product transaction.
18970 /// </summary>
18971 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18972 public class PackageCertificates : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
18973 {
18974
18975 private ElementCollection children;
18976
18977 private ISchemaElement parentElement;
18978
18979 public PackageCertificates()
18980 {
18981 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
18982 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate)));
18983 this.children = childCollection0;
18984 }
18985
18986 public virtual IEnumerable Children
18987 {
18988 get
18989 {
18990 return this.children;
18991 }
18992 }
18993
18994 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
18995 public virtual IEnumerable this[System.Type childType]
18996 {
18997 get
18998 {
18999 return this.children.Filter(childType);
19000 }
19001 }
19002
19003 public virtual ISchemaElement ParentElement
19004 {
19005 get
19006 {
19007 return this.parentElement;
19008 }
19009 set
19010 {
19011 this.parentElement = value;
19012 }
19013 }
19014
19015 public virtual void AddChild(ISchemaElement child)
19016 {
19017 if ((null == child))
19018 {
19019 throw new ArgumentNullException("child");
19020 }
19021 this.children.AddElement(child);
19022 child.ParentElement = this;
19023 }
19024
19025 public virtual void RemoveChild(ISchemaElement child)
19026 {
19027 if ((null == child))
19028 {
19029 throw new ArgumentNullException("child");
19030 }
19031 this.children.RemoveElement(child);
19032 child.ParentElement = null;
19033 }
19034
19035 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19036 ISchemaElement ICreateChildren.CreateChild(string childName)
19037 {
19038 if (String.IsNullOrEmpty(childName))
19039 {
19040 throw new ArgumentNullException("childName");
19041 }
19042 ISchemaElement childValue = null;
19043 if (("DigitalCertificate" == childName))
19044 {
19045 childValue = new DigitalCertificate();
19046 }
19047 if ((null == childValue))
19048 {
19049 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
19050 }
19051 return childValue;
19052 }
19053
19054 /// <summary>
19055 /// Processes this element and all child elements into an XmlWriter.
19056 /// </summary>
19057 public virtual void OutputXml(XmlWriter writer)
19058 {
19059 if ((null == writer))
19060 {
19061 throw new ArgumentNullException("writer");
19062 }
19063 writer.WriteStartElement("PackageCertificates", "http://wixtoolset.org/schemas/v4/wxs");
19064 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
19065 {
19066 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
19067 childElement.OutputXml(writer);
19068 }
19069 writer.WriteEndElement();
19070 }
19071
19072 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19073 void ISetAttributes.SetAttribute(string name, string value)
19074 {
19075 if (String.IsNullOrEmpty(name))
19076 {
19077 throw new ArgumentNullException("name");
19078 }
19079 }
19080 }
19081
19082 /// <summary>
19083 /// Adds a digital certificate.
19084 /// </summary>
19085 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19086 public class DigitalCertificate : ISchemaElement, ISetAttributes
19087 {
19088
19089 private string idField;
19090
19091 private bool idFieldSet;
19092
19093 private string sourceFileField;
19094
19095 private bool sourceFileFieldSet;
19096
19097 private ISchemaElement parentElement;
19098
19099 /// <summary>
19100 /// Identifier for a certificate file.
19101 /// </summary>
19102 public string Id
19103 {
19104 get
19105 {
19106 return this.idField;
19107 }
19108 set
19109 {
19110 this.idFieldSet = true;
19111 this.idField = value;
19112 }
19113 }
19114
19115 /// <summary>
19116 /// The path to the certificate file.
19117 /// </summary>
19118 public string SourceFile
19119 {
19120 get
19121 {
19122 return this.sourceFileField;
19123 }
19124 set
19125 {
19126 this.sourceFileFieldSet = true;
19127 this.sourceFileField = value;
19128 }
19129 }
19130
19131 public virtual ISchemaElement ParentElement
19132 {
19133 get
19134 {
19135 return this.parentElement;
19136 }
19137 set
19138 {
19139 this.parentElement = value;
19140 }
19141 }
19142
19143 /// <summary>
19144 /// Processes this element and all child elements into an XmlWriter.
19145 /// </summary>
19146 public virtual void OutputXml(XmlWriter writer)
19147 {
19148 if ((null == writer))
19149 {
19150 throw new ArgumentNullException("writer");
19151 }
19152 writer.WriteStartElement("DigitalCertificate", "http://wixtoolset.org/schemas/v4/wxs");
19153 if (this.idFieldSet)
19154 {
19155 writer.WriteAttributeString("Id", this.idField);
19156 }
19157 if (this.sourceFileFieldSet)
19158 {
19159 writer.WriteAttributeString("SourceFile", this.sourceFileField);
19160 }
19161 writer.WriteEndElement();
19162 }
19163
19164 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19165 void ISetAttributes.SetAttribute(string name, string value)
19166 {
19167 if (String.IsNullOrEmpty(name))
19168 {
19169 throw new ArgumentNullException("name");
19170 }
19171 if (("Id" == name))
19172 {
19173 this.idField = value;
19174 this.idFieldSet = true;
19175 }
19176 if (("SourceFile" == name))
19177 {
19178 this.sourceFileField = value;
19179 this.sourceFileFieldSet = true;
19180 }
19181 }
19182 }
19183
19184 /// <summary>
19185 /// Reference to a DigitalCertificate element. This will force the entire referenced Fragment's contents
19186 /// to be included in the installer database. This is only used for references when patching.
19187 /// </summary>
19188 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19189 public class DigitalCertificateRef : ISchemaElement, ISetAttributes
19190 {
19191
19192 private string idField;
19193
19194 private bool idFieldSet;
19195
19196 private ISchemaElement parentElement;
19197
19198 public string Id
19199 {
19200 get
19201 {
19202 return this.idField;
19203 }
19204 set
19205 {
19206 this.idFieldSet = true;
19207 this.idField = value;
19208 }
19209 }
19210
19211 public virtual ISchemaElement ParentElement
19212 {
19213 get
19214 {
19215 return this.parentElement;
19216 }
19217 set
19218 {
19219 this.parentElement = value;
19220 }
19221 }
19222
19223 /// <summary>
19224 /// Processes this element and all child elements into an XmlWriter.
19225 /// </summary>
19226 public virtual void OutputXml(XmlWriter writer)
19227 {
19228 if ((null == writer))
19229 {
19230 throw new ArgumentNullException("writer");
19231 }
19232 writer.WriteStartElement("DigitalCertificateRef", "http://wixtoolset.org/schemas/v4/wxs");
19233 if (this.idFieldSet)
19234 {
19235 writer.WriteAttributeString("Id", this.idField);
19236 }
19237 writer.WriteEndElement();
19238 }
19239
19240 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19241 void ISetAttributes.SetAttribute(string name, string value)
19242 {
19243 if (String.IsNullOrEmpty(name))
19244 {
19245 throw new ArgumentNullException("name");
19246 }
19247 if (("Id" == name))
19248 {
19249 this.idField = value;
19250 this.idFieldSet = true;
19251 }
19252 }
19253 }
19254
19255 /// <summary>
19256 /// Adds a digital signature.
19257 /// </summary>
19258 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19259 public class DigitalSignature : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
19260 {
19261
19262 private ElementCollection children;
19263
19264 private string sourceFileField;
19265
19266 private bool sourceFileFieldSet;
19267
19268 private ISchemaElement parentElement;
19269
19270 public DigitalSignature()
19271 {
19272 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
19273 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate)));
19274 this.children = childCollection0;
19275 }
19276
19277 public virtual IEnumerable Children
19278 {
19279 get
19280 {
19281 return this.children;
19282 }
19283 }
19284
19285 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
19286 public virtual IEnumerable this[System.Type childType]
19287 {
19288 get
19289 {
19290 return this.children.Filter(childType);
19291 }
19292 }
19293
19294 /// <summary>
19295 /// The path to signature's optional hash file.
19296 /// </summary>
19297 public string SourceFile
19298 {
19299 get
19300 {
19301 return this.sourceFileField;
19302 }
19303 set
19304 {
19305 this.sourceFileFieldSet = true;
19306 this.sourceFileField = value;
19307 }
19308 }
19309
19310 public virtual ISchemaElement ParentElement
19311 {
19312 get
19313 {
19314 return this.parentElement;
19315 }
19316 set
19317 {
19318 this.parentElement = value;
19319 }
19320 }
19321
19322 public virtual void AddChild(ISchemaElement child)
19323 {
19324 if ((null == child))
19325 {
19326 throw new ArgumentNullException("child");
19327 }
19328 this.children.AddElement(child);
19329 child.ParentElement = this;
19330 }
19331
19332 public virtual void RemoveChild(ISchemaElement child)
19333 {
19334 if ((null == child))
19335 {
19336 throw new ArgumentNullException("child");
19337 }
19338 this.children.RemoveElement(child);
19339 child.ParentElement = null;
19340 }
19341
19342 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19343 ISchemaElement ICreateChildren.CreateChild(string childName)
19344 {
19345 if (String.IsNullOrEmpty(childName))
19346 {
19347 throw new ArgumentNullException("childName");
19348 }
19349 ISchemaElement childValue = null;
19350 if (("DigitalCertificate" == childName))
19351 {
19352 childValue = new DigitalCertificate();
19353 }
19354 if ((null == childValue))
19355 {
19356 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
19357 }
19358 return childValue;
19359 }
19360
19361 /// <summary>
19362 /// Processes this element and all child elements into an XmlWriter.
19363 /// </summary>
19364 public virtual void OutputXml(XmlWriter writer)
19365 {
19366 if ((null == writer))
19367 {
19368 throw new ArgumentNullException("writer");
19369 }
19370 writer.WriteStartElement("DigitalSignature", "http://wixtoolset.org/schemas/v4/wxs");
19371 if (this.sourceFileFieldSet)
19372 {
19373 writer.WriteAttributeString("SourceFile", this.sourceFileField);
19374 }
19375 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
19376 {
19377 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
19378 childElement.OutputXml(writer);
19379 }
19380 writer.WriteEndElement();
19381 }
19382
19383 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19384 void ISetAttributes.SetAttribute(string name, string value)
19385 {
19386 if (String.IsNullOrEmpty(name))
19387 {
19388 throw new ArgumentNullException("name");
19389 }
19390 if (("SourceFile" == name))
19391 {
19392 this.sourceFileField = value;
19393 this.sourceFileFieldSet = true;
19394 }
19395 }
19396 }
19397
19398 /// <summary>
19399 /// Adds a system file protection update catalog file
19400 /// </summary>
19401 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19402 public class SFPCatalog : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
19403 {
19404
19405 private ElementCollection children;
19406
19407 private string nameField;
19408
19409 private bool nameFieldSet;
19410
19411 private string dependencyField;
19412
19413 private bool dependencyFieldSet;
19414
19415 private string sourceFileField;
19416
19417 private bool sourceFileFieldSet;
19418
19419 private ISchemaElement parentElement;
19420
19421 public SFPCatalog()
19422 {
19423 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
19424 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog)));
19425 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPFile)));
19426 this.children = childCollection0;
19427 }
19428
19429 public virtual IEnumerable Children
19430 {
19431 get
19432 {
19433 return this.children;
19434 }
19435 }
19436
19437 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
19438 public virtual IEnumerable this[System.Type childType]
19439 {
19440 get
19441 {
19442 return this.children.Filter(childType);
19443 }
19444 }
19445
19446 /// <summary>
19447 /// Filename for catalog file when installed.
19448 /// </summary>
19449 public string Name
19450 {
19451 get
19452 {
19453 return this.nameField;
19454 }
19455 set
19456 {
19457 this.nameFieldSet = true;
19458 this.nameField = value;
19459 }
19460 }
19461
19462 /// <summary>
19463 /// Used to define dependency outside of the package.
19464 /// </summary>
19465 public string Dependency
19466 {
19467 get
19468 {
19469 return this.dependencyField;
19470 }
19471 set
19472 {
19473 this.dependencyFieldSet = true;
19474 this.dependencyField = value;
19475 }
19476 }
19477
19478 /// <summary>
19479 /// Path to catalog file in binary.
19480 /// </summary>
19481 public string SourceFile
19482 {
19483 get
19484 {
19485 return this.sourceFileField;
19486 }
19487 set
19488 {
19489 this.sourceFileFieldSet = true;
19490 this.sourceFileField = value;
19491 }
19492 }
19493
19494 public virtual ISchemaElement ParentElement
19495 {
19496 get
19497 {
19498 return this.parentElement;
19499 }
19500 set
19501 {
19502 this.parentElement = value;
19503 }
19504 }
19505
19506 public virtual void AddChild(ISchemaElement child)
19507 {
19508 if ((null == child))
19509 {
19510 throw new ArgumentNullException("child");
19511 }
19512 this.children.AddElement(child);
19513 child.ParentElement = this;
19514 }
19515
19516 public virtual void RemoveChild(ISchemaElement child)
19517 {
19518 if ((null == child))
19519 {
19520 throw new ArgumentNullException("child");
19521 }
19522 this.children.RemoveElement(child);
19523 child.ParentElement = null;
19524 }
19525
19526 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19527 ISchemaElement ICreateChildren.CreateChild(string childName)
19528 {
19529 if (String.IsNullOrEmpty(childName))
19530 {
19531 throw new ArgumentNullException("childName");
19532 }
19533 ISchemaElement childValue = null;
19534 if (("SFPCatalog" == childName))
19535 {
19536 childValue = new SFPCatalog();
19537 }
19538 if (("SFPFile" == childName))
19539 {
19540 childValue = new SFPFile();
19541 }
19542 if ((null == childValue))
19543 {
19544 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
19545 }
19546 return childValue;
19547 }
19548
19549 /// <summary>
19550 /// Processes this element and all child elements into an XmlWriter.
19551 /// </summary>
19552 public virtual void OutputXml(XmlWriter writer)
19553 {
19554 if ((null == writer))
19555 {
19556 throw new ArgumentNullException("writer");
19557 }
19558 writer.WriteStartElement("SFPCatalog", "http://wixtoolset.org/schemas/v4/wxs");
19559 if (this.nameFieldSet)
19560 {
19561 writer.WriteAttributeString("Name", this.nameField);
19562 }
19563 if (this.dependencyFieldSet)
19564 {
19565 writer.WriteAttributeString("Dependency", this.dependencyField);
19566 }
19567 if (this.sourceFileFieldSet)
19568 {
19569 writer.WriteAttributeString("SourceFile", this.sourceFileField);
19570 }
19571 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
19572 {
19573 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
19574 childElement.OutputXml(writer);
19575 }
19576 writer.WriteEndElement();
19577 }
19578
19579 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19580 void ISetAttributes.SetAttribute(string name, string value)
19581 {
19582 if (String.IsNullOrEmpty(name))
19583 {
19584 throw new ArgumentNullException("name");
19585 }
19586 if (("Name" == name))
19587 {
19588 this.nameField = value;
19589 this.nameFieldSet = true;
19590 }
19591 if (("Dependency" == name))
19592 {
19593 this.dependencyField = value;
19594 this.dependencyFieldSet = true;
19595 }
19596 if (("SourceFile" == name))
19597 {
19598 this.sourceFileField = value;
19599 this.sourceFileFieldSet = true;
19600 }
19601 }
19602 }
19603
19604 /// <summary>
19605 /// Provides a many-to-many mapping from the SFPCatalog table to the File table
19606 /// </summary>
19607 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19608 public class SFPFile : ISchemaElement, ISetAttributes
19609 {
19610
19611 private string idField;
19612
19613 private bool idFieldSet;
19614
19615 private ISchemaElement parentElement;
19616
19617 /// <summary>
19618 /// Primary Key to File Table.
19619 /// </summary>
19620 public string Id
19621 {
19622 get
19623 {
19624 return this.idField;
19625 }
19626 set
19627 {
19628 this.idFieldSet = true;
19629 this.idField = value;
19630 }
19631 }
19632
19633 public virtual ISchemaElement ParentElement
19634 {
19635 get
19636 {
19637 return this.parentElement;
19638 }
19639 set
19640 {
19641 this.parentElement = value;
19642 }
19643 }
19644
19645 /// <summary>
19646 /// Processes this element and all child elements into an XmlWriter.
19647 /// </summary>
19648 public virtual void OutputXml(XmlWriter writer)
19649 {
19650 if ((null == writer))
19651 {
19652 throw new ArgumentNullException("writer");
19653 }
19654 writer.WriteStartElement("SFPFile", "http://wixtoolset.org/schemas/v4/wxs");
19655 if (this.idFieldSet)
19656 {
19657 writer.WriteAttributeString("Id", this.idField);
19658 }
19659 writer.WriteEndElement();
19660 }
19661
19662 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19663 void ISetAttributes.SetAttribute(string name, string value)
19664 {
19665 if (String.IsNullOrEmpty(name))
19666 {
19667 throw new ArgumentNullException("name");
19668 }
19669 if (("Id" == name))
19670 {
19671 this.idField = value;
19672 this.idFieldSet = true;
19673 }
19674 }
19675 }
19676
19677 /// <summary>
19678 /// Adds or removes .ini file entries.
19679 /// </summary>
19680 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19681 public class IniFile : ISchemaElement, ISetAttributes
19682 {
19683
19684 private string idField;
19685
19686 private bool idFieldSet;
19687
19688 private ActionType actionField;
19689
19690 private bool actionFieldSet;
19691
19692 private string directoryField;
19693
19694 private bool directoryFieldSet;
19695
19696 private string keyField;
19697
19698 private bool keyFieldSet;
19699
19700 private string nameField;
19701
19702 private bool nameFieldSet;
19703
19704 private string sectionField;
19705
19706 private bool sectionFieldSet;
19707
19708 private string shortNameField;
19709
19710 private bool shortNameFieldSet;
19711
19712 private string valueField;
19713
19714 private bool valueFieldSet;
19715
19716 private ISchemaElement parentElement;
19717
19718 /// <summary>
19719 /// Identifier for ini file.
19720 /// </summary>
19721 public string Id
19722 {
19723 get
19724 {
19725 return this.idField;
19726 }
19727 set
19728 {
19729 this.idFieldSet = true;
19730 this.idField = value;
19731 }
19732 }
19733
19734 /// <summary>
19735 /// The type of modification to be made.
19736 /// </summary>
19737 public ActionType Action
19738 {
19739 get
19740 {
19741 return this.actionField;
19742 }
19743 set
19744 {
19745 this.actionFieldSet = true;
19746 this.actionField = value;
19747 }
19748 }
19749
19750 /// <summary>
19751 /// Name of a property, the value of which is the full path of the folder containing the .ini file. Can be name of a directory in the Directory table, a property set by the AppSearch table, or any other property representing a full path.
19752 /// </summary>
19753 public string Directory
19754 {
19755 get
19756 {
19757 return this.directoryField;
19758 }
19759 set
19760 {
19761 this.directoryFieldSet = true;
19762 this.directoryField = value;
19763 }
19764 }
19765
19766 /// <summary>
19767 /// The localizable .ini file key within the section.
19768 /// </summary>
19769 public string Key
19770 {
19771 get
19772 {
19773 return this.keyField;
19774 }
19775 set
19776 {
19777 this.keyFieldSet = true;
19778 this.keyField = value;
19779 }
19780 }
19781
19782 /// <summary>
19783 /// In prior versions of the WiX toolset, this attribute specified the short name.
19784 /// This attribute's value may now be either a short or long name.
19785 /// If a short name is specified, the ShortName attribute may not be specified.
19786 /// Also, if this value is a long name, the ShortName attribute may be omitted to
19787 /// allow WiX to attempt to generate a unique short name.
19788 /// However, if this name collides with another file or you wish to manually specify
19789 /// the short name, then the ShortName attribute may be specified.
19790 /// </summary>
19791 public string Name
19792 {
19793 get
19794 {
19795 return this.nameField;
19796 }
19797 set
19798 {
19799 this.nameFieldSet = true;
19800 this.nameField = value;
19801 }
19802 }
19803
19804 /// <summary>
19805 /// The localizable .ini file section.
19806 /// </summary>
19807 public string Section
19808 {
19809 get
19810 {
19811 return this.sectionField;
19812 }
19813 set
19814 {
19815 this.sectionFieldSet = true;
19816 this.sectionField = value;
19817 }
19818 }
19819
19820 /// <summary>
19821 /// The short name of the in 8.3 format.
19822 /// This attribute should only be set if there is a conflict between generated short names
19823 /// or the user wants to manually specify the short name.
19824 /// </summary>
19825 public string ShortName
19826 {
19827 get
19828 {
19829 return this.shortNameField;
19830 }
19831 set
19832 {
19833 this.shortNameFieldSet = true;
19834 this.shortNameField = value;
19835 }
19836 }
19837
19838 /// <summary>
19839 /// The localizable value to be written or deleted. This attribute must be set if
19840 /// the Action attribute's value is "addLine", "addTag", or "createLine".
19841 /// </summary>
19842 public string Value
19843 {
19844 get
19845 {
19846 return this.valueField;
19847 }
19848 set
19849 {
19850 this.valueFieldSet = true;
19851 this.valueField = value;
19852 }
19853 }
19854
19855 public virtual ISchemaElement ParentElement
19856 {
19857 get
19858 {
19859 return this.parentElement;
19860 }
19861 set
19862 {
19863 this.parentElement = value;
19864 }
19865 }
19866
19867 /// <summary>
19868 /// Parses a ActionType from a string.
19869 /// </summary>
19870 public static ActionType ParseActionType(string value)
19871 {
19872 ActionType parsedValue;
19873 IniFile.TryParseActionType(value, out parsedValue);
19874 return parsedValue;
19875 }
19876
19877 /// <summary>
19878 /// Tries to parse a ActionType from a string.
19879 /// </summary>
19880 public static bool TryParseActionType(string value, out ActionType parsedValue)
19881 {
19882 parsedValue = ActionType.NotSet;
19883 if (string.IsNullOrEmpty(value))
19884 {
19885 return false;
19886 }
19887 if (("addLine" == value))
19888 {
19889 parsedValue = ActionType.addLine;
19890 }
19891 else
19892 {
19893 if (("addTag" == value))
19894 {
19895 parsedValue = ActionType.addTag;
19896 }
19897 else
19898 {
19899 if (("createLine" == value))
19900 {
19901 parsedValue = ActionType.createLine;
19902 }
19903 else
19904 {
19905 if (("removeLine" == value))
19906 {
19907 parsedValue = ActionType.removeLine;
19908 }
19909 else
19910 {
19911 if (("removeTag" == value))
19912 {
19913 parsedValue = ActionType.removeTag;
19914 }
19915 else
19916 {
19917 parsedValue = ActionType.IllegalValue;
19918 return false;
19919 }
19920 }
19921 }
19922 }
19923 }
19924 return true;
19925 }
19926
19927 /// <summary>
19928 /// Processes this element and all child elements into an XmlWriter.
19929 /// </summary>
19930 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
19931 public virtual void OutputXml(XmlWriter writer)
19932 {
19933 if ((null == writer))
19934 {
19935 throw new ArgumentNullException("writer");
19936 }
19937 writer.WriteStartElement("IniFile", "http://wixtoolset.org/schemas/v4/wxs");
19938 if (this.idFieldSet)
19939 {
19940 writer.WriteAttributeString("Id", this.idField);
19941 }
19942 if (this.actionFieldSet)
19943 {
19944 if ((this.actionField == ActionType.addLine))
19945 {
19946 writer.WriteAttributeString("Action", "addLine");
19947 }
19948 if ((this.actionField == ActionType.addTag))
19949 {
19950 writer.WriteAttributeString("Action", "addTag");
19951 }
19952 if ((this.actionField == ActionType.createLine))
19953 {
19954 writer.WriteAttributeString("Action", "createLine");
19955 }
19956 if ((this.actionField == ActionType.removeLine))
19957 {
19958 writer.WriteAttributeString("Action", "removeLine");
19959 }
19960 if ((this.actionField == ActionType.removeTag))
19961 {
19962 writer.WriteAttributeString("Action", "removeTag");
19963 }
19964 }
19965 if (this.directoryFieldSet)
19966 {
19967 writer.WriteAttributeString("Directory", this.directoryField);
19968 }
19969 if (this.keyFieldSet)
19970 {
19971 writer.WriteAttributeString("Key", this.keyField);
19972 }
19973 if (this.nameFieldSet)
19974 {
19975 writer.WriteAttributeString("Name", this.nameField);
19976 }
19977 if (this.sectionFieldSet)
19978 {
19979 writer.WriteAttributeString("Section", this.sectionField);
19980 }
19981 if (this.shortNameFieldSet)
19982 {
19983 writer.WriteAttributeString("ShortName", this.shortNameField);
19984 }
19985 if (this.valueFieldSet)
19986 {
19987 writer.WriteAttributeString("Value", this.valueField);
19988 }
19989 writer.WriteEndElement();
19990 }
19991
19992 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19993 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
19994 void ISetAttributes.SetAttribute(string name, string value)
19995 {
19996 if (String.IsNullOrEmpty(name))
19997 {
19998 throw new ArgumentNullException("name");
19999 }
20000 if (("Id" == name))
20001 {
20002 this.idField = value;
20003 this.idFieldSet = true;
20004 }
20005 if (("Action" == name))
20006 {
20007 this.actionField = IniFile.ParseActionType(value);
20008 this.actionFieldSet = true;
20009 }
20010 if (("Directory" == name))
20011 {
20012 this.directoryField = value;
20013 this.directoryFieldSet = true;
20014 }
20015 if (("Key" == name))
20016 {
20017 this.keyField = value;
20018 this.keyFieldSet = true;
20019 }
20020 if (("Name" == name))
20021 {
20022 this.nameField = value;
20023 this.nameFieldSet = true;
20024 }
20025 if (("Section" == name))
20026 {
20027 this.sectionField = value;
20028 this.sectionFieldSet = true;
20029 }
20030 if (("ShortName" == name))
20031 {
20032 this.shortNameField = value;
20033 this.shortNameFieldSet = true;
20034 }
20035 if (("Value" == name))
20036 {
20037 this.valueField = value;
20038 this.valueFieldSet = true;
20039 }
20040 }
20041
20042 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20043 public enum ActionType
20044 {
20045
20046 IllegalValue = int.MaxValue,
20047
20048 NotSet = -1,
20049
20050 /// <summary>
20051 /// Creates or updates an .ini entry.
20052 /// </summary>
20053 addLine,
20054
20055 /// <summary>
20056 /// Creates a new entry or appends a new comma-separated value to an existing entry.
20057 /// </summary>
20058 addTag,
20059
20060 /// <summary>
20061 /// Creates an .ini entry only if the entry does no already exist.
20062 /// </summary>
20063 createLine,
20064
20065 /// <summary>
20066 /// Removes an .ini entry.
20067 /// </summary>
20068 removeLine,
20069
20070 /// <summary>
20071 /// Removes a tag from an .ini entry.
20072 /// </summary>
20073 removeTag,
20074 }
20075 }
20076
20077 /// <summary>
20078 /// ODBCDataSource for a Component
20079 /// </summary>
20080 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20081 public class ODBCDataSource : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
20082 {
20083
20084 private ElementCollection children;
20085
20086 private string idField;
20087
20088 private bool idFieldSet;
20089
20090 private string nameField;
20091
20092 private bool nameFieldSet;
20093
20094 private string driverNameField;
20095
20096 private bool driverNameFieldSet;
20097
20098 private RegistrationType registrationField;
20099
20100 private bool registrationFieldSet;
20101
20102 private YesNoType keyPathField;
20103
20104 private bool keyPathFieldSet;
20105
20106 private ISchemaElement parentElement;
20107
20108 public ODBCDataSource()
20109 {
20110 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
20111 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property)));
20112 this.children = childCollection0;
20113 }
20114
20115 public virtual IEnumerable Children
20116 {
20117 get
20118 {
20119 return this.children;
20120 }
20121 }
20122
20123 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
20124 public virtual IEnumerable this[System.Type childType]
20125 {
20126 get
20127 {
20128 return this.children.Filter(childType);
20129 }
20130 }
20131
20132 /// <summary>
20133 /// Identifier of the data source.
20134 /// </summary>
20135 public string Id
20136 {
20137 get
20138 {
20139 return this.idField;
20140 }
20141 set
20142 {
20143 this.idFieldSet = true;
20144 this.idField = value;
20145 }
20146 }
20147
20148 /// <summary>
20149 /// Name for the data source.
20150 /// </summary>
20151 public string Name
20152 {
20153 get
20154 {
20155 return this.nameField;
20156 }
20157 set
20158 {
20159 this.nameFieldSet = true;
20160 this.nameField = value;
20161 }
20162 }
20163
20164 /// <summary>
20165 /// Required if not found as child of ODBCDriver element
20166 /// </summary>
20167 public string DriverName
20168 {
20169 get
20170 {
20171 return this.driverNameField;
20172 }
20173 set
20174 {
20175 this.driverNameFieldSet = true;
20176 this.driverNameField = value;
20177 }
20178 }
20179
20180 /// <summary>
20181 /// Scope for which the data source should be registered.
20182 /// </summary>
20183 public RegistrationType Registration
20184 {
20185 get
20186 {
20187 return this.registrationField;
20188 }
20189 set
20190 {
20191 this.registrationFieldSet = true;
20192 this.registrationField = value;
20193 }
20194 }
20195
20196 /// <summary>
20197 /// Set 'yes' to force this file to be key path for parent Component
20198 /// </summary>
20199 public YesNoType KeyPath
20200 {
20201 get
20202 {
20203 return this.keyPathField;
20204 }
20205 set
20206 {
20207 this.keyPathFieldSet = true;
20208 this.keyPathField = value;
20209 }
20210 }
20211
20212 public virtual ISchemaElement ParentElement
20213 {
20214 get
20215 {
20216 return this.parentElement;
20217 }
20218 set
20219 {
20220 this.parentElement = value;
20221 }
20222 }
20223
20224 public virtual void AddChild(ISchemaElement child)
20225 {
20226 if ((null == child))
20227 {
20228 throw new ArgumentNullException("child");
20229 }
20230 this.children.AddElement(child);
20231 child.ParentElement = this;
20232 }
20233
20234 public virtual void RemoveChild(ISchemaElement child)
20235 {
20236 if ((null == child))
20237 {
20238 throw new ArgumentNullException("child");
20239 }
20240 this.children.RemoveElement(child);
20241 child.ParentElement = null;
20242 }
20243
20244 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
20245 ISchemaElement ICreateChildren.CreateChild(string childName)
20246 {
20247 if (String.IsNullOrEmpty(childName))
20248 {
20249 throw new ArgumentNullException("childName");
20250 }
20251 ISchemaElement childValue = null;
20252 if (("Property" == childName))
20253 {
20254 childValue = new Property();
20255 }
20256 if ((null == childValue))
20257 {
20258 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
20259 }
20260 return childValue;
20261 }
20262
20263 /// <summary>
20264 /// Parses a RegistrationType from a string.
20265 /// </summary>
20266 public static RegistrationType ParseRegistrationType(string value)
20267 {
20268 RegistrationType parsedValue;
20269 ODBCDataSource.TryParseRegistrationType(value, out parsedValue);
20270 return parsedValue;
20271 }
20272
20273 /// <summary>
20274 /// Tries to parse a RegistrationType from a string.
20275 /// </summary>
20276 public static bool TryParseRegistrationType(string value, out RegistrationType parsedValue)
20277 {
20278 parsedValue = RegistrationType.NotSet;
20279 if (string.IsNullOrEmpty(value))
20280 {
20281 return false;
20282 }
20283 if (("machine" == value))
20284 {
20285 parsedValue = RegistrationType.machine;
20286 }
20287 else
20288 {
20289 if (("user" == value))
20290 {
20291 parsedValue = RegistrationType.user;
20292 }
20293 else
20294 {
20295 parsedValue = RegistrationType.IllegalValue;
20296 return false;
20297 }
20298 }
20299 return true;
20300 }
20301
20302 /// <summary>
20303 /// Processes this element and all child elements into an XmlWriter.
20304 /// </summary>
20305 public virtual void OutputXml(XmlWriter writer)
20306 {
20307 if ((null == writer))
20308 {
20309 throw new ArgumentNullException("writer");
20310 }
20311 writer.WriteStartElement("ODBCDataSource", "http://wixtoolset.org/schemas/v4/wxs");
20312 if (this.idFieldSet)
20313 {
20314 writer.WriteAttributeString("Id", this.idField);
20315 }
20316 if (this.nameFieldSet)
20317 {
20318 writer.WriteAttributeString("Name", this.nameField);
20319 }
20320 if (this.driverNameFieldSet)
20321 {
20322 writer.WriteAttributeString("DriverName", this.driverNameField);
20323 }
20324 if (this.registrationFieldSet)
20325 {
20326 if ((this.registrationField == RegistrationType.machine))
20327 {
20328 writer.WriteAttributeString("Registration", "machine");
20329 }
20330 if ((this.registrationField == RegistrationType.user))
20331 {
20332 writer.WriteAttributeString("Registration", "user");
20333 }
20334 }
20335 if (this.keyPathFieldSet)
20336 {
20337 if ((this.keyPathField == YesNoType.no))
20338 {
20339 writer.WriteAttributeString("KeyPath", "no");
20340 }
20341 if ((this.keyPathField == YesNoType.yes))
20342 {
20343 writer.WriteAttributeString("KeyPath", "yes");
20344 }
20345 }
20346 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
20347 {
20348 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
20349 childElement.OutputXml(writer);
20350 }
20351 writer.WriteEndElement();
20352 }
20353
20354 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
20355 void ISetAttributes.SetAttribute(string name, string value)
20356 {
20357 if (String.IsNullOrEmpty(name))
20358 {
20359 throw new ArgumentNullException("name");
20360 }
20361 if (("Id" == name))
20362 {
20363 this.idField = value;
20364 this.idFieldSet = true;
20365 }
20366 if (("Name" == name))
20367 {
20368 this.nameField = value;
20369 this.nameFieldSet = true;
20370 }
20371 if (("DriverName" == name))
20372 {
20373 this.driverNameField = value;
20374 this.driverNameFieldSet = true;
20375 }
20376 if (("Registration" == name))
20377 {
20378 this.registrationField = ODBCDataSource.ParseRegistrationType(value);
20379 this.registrationFieldSet = true;
20380 }
20381 if (("KeyPath" == name))
20382 {
20383 this.keyPathField = Enums.ParseYesNoType(value);
20384 this.keyPathFieldSet = true;
20385 }
20386 }
20387
20388 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20389 public enum RegistrationType
20390 {
20391
20392 IllegalValue = int.MaxValue,
20393
20394 NotSet = -1,
20395
20396 /// <summary>
20397 /// Data source is registered per machine.
20398 /// </summary>
20399 machine,
20400
20401 /// <summary>
20402 /// Data source is registered per user.
20403 /// </summary>
20404 user,
20405 }
20406 }
20407
20408 /// <summary>
20409 /// ODBCDriver for a Component
20410 /// </summary>
20411 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20412 public class ODBCDriver : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
20413 {
20414
20415 private ElementCollection children;
20416
20417 private string idField;
20418
20419 private bool idFieldSet;
20420
20421 private string nameField;
20422
20423 private bool nameFieldSet;
20424
20425 private string fileField;
20426
20427 private bool fileFieldSet;
20428
20429 private string setupFileField;
20430
20431 private bool setupFileFieldSet;
20432
20433 private ISchemaElement parentElement;
20434
20435 public ODBCDriver()
20436 {
20437 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
20438 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property)));
20439 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ODBCDataSource)));
20440 this.children = childCollection0;
20441 }
20442
20443 public virtual IEnumerable Children
20444 {
20445 get
20446 {
20447 return this.children;
20448 }
20449 }
20450
20451 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
20452 public virtual IEnumerable this[System.Type childType]
20453 {
20454 get
20455 {
20456 return this.children.Filter(childType);
20457 }
20458 }
20459
20460 /// <summary>
20461 /// Identifier for the driver.
20462 /// </summary>
20463 public string Id
20464 {
20465 get
20466 {
20467 return this.idField;
20468 }
20469 set
20470 {
20471 this.idFieldSet = true;
20472 this.idField = value;
20473 }
20474 }
20475
20476 /// <summary>
20477 /// Name for the driver.
20478 /// </summary>
20479 public string Name
20480 {
20481 get
20482 {
20483 return this.nameField;
20484 }
20485 set
20486 {
20487 this.nameFieldSet = true;
20488 this.nameField = value;
20489 }
20490 }
20491
20492 /// <summary>
20493 /// Required if not found as child of File element
20494 /// </summary>
20495 public string File
20496 {
20497 get
20498 {
20499 return this.fileField;
20500 }
20501 set
20502 {
20503 this.fileFieldSet = true;
20504 this.fileField = value;
20505 }
20506 }
20507
20508 /// <summary>
20509 /// Required if not found as child of File element or different from File attribute above
20510 /// </summary>
20511 public string SetupFile
20512 {
20513 get
20514 {
20515 return this.setupFileField;
20516 }
20517 set
20518 {
20519 this.setupFileFieldSet = true;
20520 this.setupFileField = value;
20521 }
20522 }
20523
20524 public virtual ISchemaElement ParentElement
20525 {
20526 get
20527 {
20528 return this.parentElement;
20529 }
20530 set
20531 {
20532 this.parentElement = value;
20533 }
20534 }
20535
20536 public virtual void AddChild(ISchemaElement child)
20537 {
20538 if ((null == child))
20539 {
20540 throw new ArgumentNullException("child");
20541 }
20542 this.children.AddElement(child);
20543 child.ParentElement = this;
20544 }
20545
20546 public virtual void RemoveChild(ISchemaElement child)
20547 {
20548 if ((null == child))
20549 {
20550 throw new ArgumentNullException("child");
20551 }
20552 this.children.RemoveElement(child);
20553 child.ParentElement = null;
20554 }
20555
20556 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
20557 ISchemaElement ICreateChildren.CreateChild(string childName)
20558 {
20559 if (String.IsNullOrEmpty(childName))
20560 {
20561 throw new ArgumentNullException("childName");
20562 }
20563 ISchemaElement childValue = null;
20564 if (("Property" == childName))
20565 {
20566 childValue = new Property();
20567 }
20568 if (("ODBCDataSource" == childName))
20569 {
20570 childValue = new ODBCDataSource();
20571 }
20572 if ((null == childValue))
20573 {
20574 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
20575 }
20576 return childValue;
20577 }
20578
20579 /// <summary>
20580 /// Processes this element and all child elements into an XmlWriter.
20581 /// </summary>
20582 public virtual void OutputXml(XmlWriter writer)
20583 {
20584 if ((null == writer))
20585 {
20586 throw new ArgumentNullException("writer");
20587 }
20588 writer.WriteStartElement("ODBCDriver", "http://wixtoolset.org/schemas/v4/wxs");
20589 if (this.idFieldSet)
20590 {
20591 writer.WriteAttributeString("Id", this.idField);
20592 }
20593 if (this.nameFieldSet)
20594 {
20595 writer.WriteAttributeString("Name", this.nameField);
20596 }
20597 if (this.fileFieldSet)
20598 {
20599 writer.WriteAttributeString("File", this.fileField);
20600 }
20601 if (this.setupFileFieldSet)
20602 {
20603 writer.WriteAttributeString("SetupFile", this.setupFileField);
20604 }
20605 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
20606 {
20607 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
20608 childElement.OutputXml(writer);
20609 }
20610 writer.WriteEndElement();
20611 }
20612
20613 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
20614 void ISetAttributes.SetAttribute(string name, string value)
20615 {
20616 if (String.IsNullOrEmpty(name))
20617 {
20618 throw new ArgumentNullException("name");
20619 }
20620 if (("Id" == name))
20621 {
20622 this.idField = value;
20623 this.idFieldSet = true;
20624 }
20625 if (("Name" == name))
20626 {
20627 this.nameField = value;
20628 this.nameFieldSet = true;
20629 }
20630 if (("File" == name))
20631 {
20632 this.fileField = value;
20633 this.fileFieldSet = true;
20634 }
20635 if (("SetupFile" == name))
20636 {
20637 this.setupFileField = value;
20638 this.setupFileFieldSet = true;
20639 }
20640 }
20641 }
20642
20643 /// <summary>
20644 /// ODBCTranslator for a Component
20645 /// </summary>
20646 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20647 public class ODBCTranslator : ISchemaElement, ISetAttributes
20648 {
20649
20650 private string idField;
20651
20652 private bool idFieldSet;
20653
20654 private string nameField;
20655
20656 private bool nameFieldSet;
20657
20658 private string fileField;
20659
20660 private bool fileFieldSet;
20661
20662 private string setupFileField;
20663
20664 private bool setupFileFieldSet;
20665
20666 private ISchemaElement parentElement;
20667
20668 /// <summary>
20669 /// Identifier for the translator.
20670 /// </summary>
20671 public string Id
20672 {
20673 get
20674 {
20675 return this.idField;
20676 }
20677 set
20678 {
20679 this.idFieldSet = true;
20680 this.idField = value;
20681 }
20682 }
20683
20684 /// <summary>
20685 /// Name for the translator.
20686 /// </summary>
20687 public string Name
20688 {
20689 get
20690 {
20691 return this.nameField;
20692 }
20693 set
20694 {
20695 this.nameFieldSet = true;
20696 this.nameField = value;
20697 }
20698 }
20699
20700 /// <summary>
20701 /// Required if not found as child of File element
20702 /// </summary>
20703 public string File
20704 {
20705 get
20706 {
20707 return this.fileField;
20708 }
20709 set
20710 {
20711 this.fileFieldSet = true;
20712 this.fileField = value;
20713 }
20714 }
20715
20716 /// <summary>
20717 /// Required if not found as child of File element or different from File attribute above
20718 /// </summary>
20719 public string SetupFile
20720 {
20721 get
20722 {
20723 return this.setupFileField;
20724 }
20725 set
20726 {
20727 this.setupFileFieldSet = true;
20728 this.setupFileField = value;
20729 }
20730 }
20731
20732 public virtual ISchemaElement ParentElement
20733 {
20734 get
20735 {
20736 return this.parentElement;
20737 }
20738 set
20739 {
20740 this.parentElement = value;
20741 }
20742 }
20743
20744 /// <summary>
20745 /// Processes this element and all child elements into an XmlWriter.
20746 /// </summary>
20747 public virtual void OutputXml(XmlWriter writer)
20748 {
20749 if ((null == writer))
20750 {
20751 throw new ArgumentNullException("writer");
20752 }
20753 writer.WriteStartElement("ODBCTranslator", "http://wixtoolset.org/schemas/v4/wxs");
20754 if (this.idFieldSet)
20755 {
20756 writer.WriteAttributeString("Id", this.idField);
20757 }
20758 if (this.nameFieldSet)
20759 {
20760 writer.WriteAttributeString("Name", this.nameField);
20761 }
20762 if (this.fileFieldSet)
20763 {
20764 writer.WriteAttributeString("File", this.fileField);
20765 }
20766 if (this.setupFileFieldSet)
20767 {
20768 writer.WriteAttributeString("SetupFile", this.setupFileField);
20769 }
20770 writer.WriteEndElement();
20771 }
20772
20773 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
20774 void ISetAttributes.SetAttribute(string name, string value)
20775 {
20776 if (String.IsNullOrEmpty(name))
20777 {
20778 throw new ArgumentNullException("name");
20779 }
20780 if (("Id" == name))
20781 {
20782 this.idField = value;
20783 this.idFieldSet = true;
20784 }
20785 if (("Name" == name))
20786 {
20787 this.nameField = value;
20788 this.nameFieldSet = true;
20789 }
20790 if (("File" == name))
20791 {
20792 this.fileField = value;
20793 this.fileFieldSet = true;
20794 }
20795 if (("SetupFile" == name))
20796 {
20797 this.setupFileField = value;
20798 this.setupFileFieldSet = true;
20799 }
20800 }
20801 }
20802
20803 /// <summary>
20804 /// Searches for file and assigns to fullpath value of parent Property
20805 /// </summary>
20806 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20807 public class FileSearch : ISchemaElement, ISetAttributes
20808 {
20809
20810 private string idField;
20811
20812 private bool idFieldSet;
20813
20814 private string nameField;
20815
20816 private bool nameFieldSet;
20817
20818 private string shortNameField;
20819
20820 private bool shortNameFieldSet;
20821
20822 private int minSizeField;
20823
20824 private bool minSizeFieldSet;
20825
20826 private int maxSizeField;
20827
20828 private bool maxSizeFieldSet;
20829
20830 private string minVersionField;
20831
20832 private bool minVersionFieldSet;
20833
20834 private string maxVersionField;
20835
20836 private bool maxVersionFieldSet;
20837
20838 private DateTime minDateField;
20839
20840 private bool minDateFieldSet;
20841
20842 private DateTime maxDateField;
20843
20844 private bool maxDateFieldSet;
20845
20846 private string languagesField;
20847
20848 private bool languagesFieldSet;
20849
20850 private ISchemaElement parentElement;
20851
20852 /// <summary>
20853 /// Unique identifier for the file search and external key into the Signature table. If this attribute value is not set then the parent element's @Id attribute is used.
20854 /// </summary>
20855 public string Id
20856 {
20857 get
20858 {
20859 return this.idField;
20860 }
20861 set
20862 {
20863 this.idFieldSet = true;
20864 this.idField = value;
20865 }
20866 }
20867
20868 /// <summary>
20869 /// In prior versions of the WiX toolset, this attribute specified the short file name.
20870 /// This attribute's value may now be either a short or long file name.
20871 /// If a short file name is specified, the ShortName attribute may not be specified.
20872 /// If you wish to manually specify the short file name, then the ShortName
20873 /// attribute may be specified.
20874 /// </summary>
20875 public string Name
20876 {
20877 get
20878 {
20879 return this.nameField;
20880 }
20881 set
20882 {
20883 this.nameFieldSet = true;
20884 this.nameField = value;
20885 }
20886 }
20887
20888 /// <summary>
20889 /// The short file name of the file in 8.3 format.
20890 /// There is a Windows Installer bug which prevents the FileSearch functionality from working
20891 /// if both a short and long file name are specified. Since the Name attribute allows either
20892 /// a short or long name to be specified, it is the only attribute related to file names which
20893 /// should be specified.
20894 /// </summary>
20895 public string ShortName
20896 {
20897 get
20898 {
20899 return this.shortNameField;
20900 }
20901 set
20902 {
20903 this.shortNameFieldSet = true;
20904 this.shortNameField = value;
20905 }
20906 }
20907
20908 /// <summary>
20909 /// The minimum size of the file.
20910 /// </summary>
20911 public int MinSize
20912 {
20913 get
20914 {
20915 return this.minSizeField;
20916 }
20917 set
20918 {
20919 this.minSizeFieldSet = true;
20920 this.minSizeField = value;
20921 }
20922 }
20923
20924 /// <summary>
20925 /// The maximum size of the file.
20926 /// </summary>
20927 public int MaxSize
20928 {
20929 get
20930 {
20931 return this.maxSizeField;
20932 }
20933 set
20934 {
20935 this.maxSizeFieldSet = true;
20936 this.maxSizeField = value;
20937 }
20938 }
20939
20940 /// <summary>
20941 /// The minimum version of the file.
20942 /// </summary>
20943 public string MinVersion
20944 {
20945 get
20946 {
20947 return this.minVersionField;
20948 }
20949 set
20950 {
20951 this.minVersionFieldSet = true;
20952 this.minVersionField = value;
20953 }
20954 }
20955
20956 /// <summary>
20957 /// The maximum version of the file.
20958 /// </summary>
20959 public string MaxVersion
20960 {
20961 get
20962 {
20963 return this.maxVersionField;
20964 }
20965 set
20966 {
20967 this.maxVersionFieldSet = true;
20968 this.maxVersionField = value;
20969 }
20970 }
20971
20972 /// <summary>
20973 /// The minimum modification date and time of the file. Formatted as YYYY-MM-DDTHH:mm:ss, where YYYY is the year, MM is month, DD is day, 'T' is literal, HH is hour, mm is minute and ss is second.
20974 /// </summary>
20975 public DateTime MinDate
20976 {
20977 get
20978 {
20979 return this.minDateField;
20980 }
20981 set
20982 {
20983 this.minDateFieldSet = true;
20984 this.minDateField = value;
20985 }
20986 }
20987
20988 /// <summary>
20989 /// The maximum modification date and time of the file. Formatted as YYYY-MM-DDTHH:mm:ss, where YYYY is the year, MM is month, DD is day, 'T' is literal, HH is hour, mm is minute and ss is second.
20990 /// </summary>
20991 public DateTime MaxDate
20992 {
20993 get
20994 {
20995 return this.maxDateField;
20996 }
20997 set
20998 {
20999 this.maxDateFieldSet = true;
21000 this.maxDateField = value;
21001 }
21002 }
21003
21004 /// <summary>
21005 /// The languages supported by the file.
21006 /// </summary>
21007 public string Languages
21008 {
21009 get
21010 {
21011 return this.languagesField;
21012 }
21013 set
21014 {
21015 this.languagesFieldSet = true;
21016 this.languagesField = value;
21017 }
21018 }
21019
21020 public virtual ISchemaElement ParentElement
21021 {
21022 get
21023 {
21024 return this.parentElement;
21025 }
21026 set
21027 {
21028 this.parentElement = value;
21029 }
21030 }
21031
21032 /// <summary>
21033 /// Processes this element and all child elements into an XmlWriter.
21034 /// </summary>
21035 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
21036 public virtual void OutputXml(XmlWriter writer)
21037 {
21038 if ((null == writer))
21039 {
21040 throw new ArgumentNullException("writer");
21041 }
21042 writer.WriteStartElement("FileSearch", "http://wixtoolset.org/schemas/v4/wxs");
21043 if (this.idFieldSet)
21044 {
21045 writer.WriteAttributeString("Id", this.idField);
21046 }
21047 if (this.nameFieldSet)
21048 {
21049 writer.WriteAttributeString("Name", this.nameField);
21050 }
21051 if (this.shortNameFieldSet)
21052 {
21053 writer.WriteAttributeString("ShortName", this.shortNameField);
21054 }
21055 if (this.minSizeFieldSet)
21056 {
21057 writer.WriteAttributeString("MinSize", this.minSizeField.ToString(CultureInfo.InvariantCulture));
21058 }
21059 if (this.maxSizeFieldSet)
21060 {
21061 writer.WriteAttributeString("MaxSize", this.maxSizeField.ToString(CultureInfo.InvariantCulture));
21062 }
21063 if (this.minVersionFieldSet)
21064 {
21065 writer.WriteAttributeString("MinVersion", this.minVersionField);
21066 }
21067 if (this.maxVersionFieldSet)
21068 {
21069 writer.WriteAttributeString("MaxVersion", this.maxVersionField);
21070 }
21071 if (this.minDateFieldSet)
21072 {
21073 writer.WriteAttributeString("MinDate", this.minDateField.ToString("yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture.DateTimeFormat));
21074 }
21075 if (this.maxDateFieldSet)
21076 {
21077 writer.WriteAttributeString("MaxDate", this.maxDateField.ToString("yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture.DateTimeFormat));
21078 }
21079 if (this.languagesFieldSet)
21080 {
21081 writer.WriteAttributeString("Languages", this.languagesField);
21082 }
21083 writer.WriteEndElement();
21084 }
21085
21086 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21087 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
21088 void ISetAttributes.SetAttribute(string name, string value)
21089 {
21090 if (String.IsNullOrEmpty(name))
21091 {
21092 throw new ArgumentNullException("name");
21093 }
21094 if (("Id" == name))
21095 {
21096 this.idField = value;
21097 this.idFieldSet = true;
21098 }
21099 if (("Name" == name))
21100 {
21101 this.nameField = value;
21102 this.nameFieldSet = true;
21103 }
21104 if (("ShortName" == name))
21105 {
21106 this.shortNameField = value;
21107 this.shortNameFieldSet = true;
21108 }
21109 if (("MinSize" == name))
21110 {
21111 this.minSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
21112 this.minSizeFieldSet = true;
21113 }
21114 if (("MaxSize" == name))
21115 {
21116 this.maxSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
21117 this.maxSizeFieldSet = true;
21118 }
21119 if (("MinVersion" == name))
21120 {
21121 this.minVersionField = value;
21122 this.minVersionFieldSet = true;
21123 }
21124 if (("MaxVersion" == name))
21125 {
21126 this.maxVersionField = value;
21127 this.maxVersionFieldSet = true;
21128 }
21129 if (("MinDate" == name))
21130 {
21131 this.minDateField = Convert.ToDateTime(value, CultureInfo.InvariantCulture);
21132 this.minDateFieldSet = true;
21133 }
21134 if (("MaxDate" == name))
21135 {
21136 this.maxDateField = Convert.ToDateTime(value, CultureInfo.InvariantCulture);
21137 this.maxDateFieldSet = true;
21138 }
21139 if (("Languages" == name))
21140 {
21141 this.languagesField = value;
21142 this.languagesFieldSet = true;
21143 }
21144 }
21145 }
21146
21147 /// <summary>
21148 /// References an existing FileSearch element.
21149 /// </summary>
21150 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21151 public class FileSearchRef : ISchemaElement, ISetAttributes
21152 {
21153
21154 private string idField;
21155
21156 private bool idFieldSet;
21157
21158 private ISchemaElement parentElement;
21159
21160 /// <summary>
21161 /// Specify the Id to the FileSearch to reference.
21162 /// </summary>
21163 public string Id
21164 {
21165 get
21166 {
21167 return this.idField;
21168 }
21169 set
21170 {
21171 this.idFieldSet = true;
21172 this.idField = value;
21173 }
21174 }
21175
21176 public virtual ISchemaElement ParentElement
21177 {
21178 get
21179 {
21180 return this.parentElement;
21181 }
21182 set
21183 {
21184 this.parentElement = value;
21185 }
21186 }
21187
21188 /// <summary>
21189 /// Processes this element and all child elements into an XmlWriter.
21190 /// </summary>
21191 public virtual void OutputXml(XmlWriter writer)
21192 {
21193 if ((null == writer))
21194 {
21195 throw new ArgumentNullException("writer");
21196 }
21197 writer.WriteStartElement("FileSearchRef", "http://wixtoolset.org/schemas/v4/wxs");
21198 if (this.idFieldSet)
21199 {
21200 writer.WriteAttributeString("Id", this.idField);
21201 }
21202 writer.WriteEndElement();
21203 }
21204
21205 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21206 void ISetAttributes.SetAttribute(string name, string value)
21207 {
21208 if (String.IsNullOrEmpty(name))
21209 {
21210 throw new ArgumentNullException("name");
21211 }
21212 if (("Id" == name))
21213 {
21214 this.idField = value;
21215 this.idFieldSet = true;
21216 }
21217 }
21218 }
21219
21220 /// <summary>
21221 /// Searches for directory and assigns to value of parent Property.
21222 /// </summary>
21223 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21224 public class DirectorySearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
21225 {
21226
21227 private ElementCollection children;
21228
21229 private string idField;
21230
21231 private bool idFieldSet;
21232
21233 private string pathField;
21234
21235 private bool pathFieldSet;
21236
21237 private int depthField;
21238
21239 private bool depthFieldSet;
21240
21241 private YesNoType assignToPropertyField;
21242
21243 private bool assignToPropertyFieldSet;
21244
21245 private ISchemaElement parentElement;
21246
21247 public DirectorySearch()
21248 {
21249 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
21250 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
21251 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
21252 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch)));
21253 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef)));
21254 this.children = childCollection0;
21255 }
21256
21257 public virtual IEnumerable Children
21258 {
21259 get
21260 {
21261 return this.children;
21262 }
21263 }
21264
21265 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
21266 public virtual IEnumerable this[System.Type childType]
21267 {
21268 get
21269 {
21270 return this.children.Filter(childType);
21271 }
21272 }
21273
21274 /// <summary>
21275 /// Unique identifier for the directory search.
21276 /// </summary>
21277 public string Id
21278 {
21279 get
21280 {
21281 return this.idField;
21282 }
21283 set
21284 {
21285 this.idFieldSet = true;
21286 this.idField = value;
21287 }
21288 }
21289
21290 /// <summary>
21291 /// Path on the user's system. Either absolute, or relative to containing directories.
21292 /// </summary>
21293 public string Path
21294 {
21295 get
21296 {
21297 return this.pathField;
21298 }
21299 set
21300 {
21301 this.pathFieldSet = true;
21302 this.pathField = value;
21303 }
21304 }
21305
21306 /// <summary>
21307 /// Depth below the path that the installer searches for the file or directory specified by the search. See remarks for more information.
21308 /// </summary>
21309 public int Depth
21310 {
21311 get
21312 {
21313 return this.depthField;
21314 }
21315 set
21316 {
21317 this.depthFieldSet = true;
21318 this.depthField = value;
21319 }
21320 }
21321
21322 /// <summary>
21323 /// Set the value of the outer Property to the result of this search. See remarks for more information.
21324 /// </summary>
21325 public YesNoType AssignToProperty
21326 {
21327 get
21328 {
21329 return this.assignToPropertyField;
21330 }
21331 set
21332 {
21333 this.assignToPropertyFieldSet = true;
21334 this.assignToPropertyField = value;
21335 }
21336 }
21337
21338 public virtual ISchemaElement ParentElement
21339 {
21340 get
21341 {
21342 return this.parentElement;
21343 }
21344 set
21345 {
21346 this.parentElement = value;
21347 }
21348 }
21349
21350 public virtual void AddChild(ISchemaElement child)
21351 {
21352 if ((null == child))
21353 {
21354 throw new ArgumentNullException("child");
21355 }
21356 this.children.AddElement(child);
21357 child.ParentElement = this;
21358 }
21359
21360 public virtual void RemoveChild(ISchemaElement child)
21361 {
21362 if ((null == child))
21363 {
21364 throw new ArgumentNullException("child");
21365 }
21366 this.children.RemoveElement(child);
21367 child.ParentElement = null;
21368 }
21369
21370 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21371 ISchemaElement ICreateChildren.CreateChild(string childName)
21372 {
21373 if (String.IsNullOrEmpty(childName))
21374 {
21375 throw new ArgumentNullException("childName");
21376 }
21377 ISchemaElement childValue = null;
21378 if (("DirectorySearch" == childName))
21379 {
21380 childValue = new DirectorySearch();
21381 }
21382 if (("DirectorySearchRef" == childName))
21383 {
21384 childValue = new DirectorySearchRef();
21385 }
21386 if (("FileSearch" == childName))
21387 {
21388 childValue = new FileSearch();
21389 }
21390 if (("FileSearchRef" == childName))
21391 {
21392 childValue = new FileSearchRef();
21393 }
21394 if ((null == childValue))
21395 {
21396 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
21397 }
21398 return childValue;
21399 }
21400
21401 /// <summary>
21402 /// Processes this element and all child elements into an XmlWriter.
21403 /// </summary>
21404 public virtual void OutputXml(XmlWriter writer)
21405 {
21406 if ((null == writer))
21407 {
21408 throw new ArgumentNullException("writer");
21409 }
21410 writer.WriteStartElement("DirectorySearch", "http://wixtoolset.org/schemas/v4/wxs");
21411 if (this.idFieldSet)
21412 {
21413 writer.WriteAttributeString("Id", this.idField);
21414 }
21415 if (this.pathFieldSet)
21416 {
21417 writer.WriteAttributeString("Path", this.pathField);
21418 }
21419 if (this.depthFieldSet)
21420 {
21421 writer.WriteAttributeString("Depth", this.depthField.ToString(CultureInfo.InvariantCulture));
21422 }
21423 if (this.assignToPropertyFieldSet)
21424 {
21425 if ((this.assignToPropertyField == YesNoType.no))
21426 {
21427 writer.WriteAttributeString("AssignToProperty", "no");
21428 }
21429 if ((this.assignToPropertyField == YesNoType.yes))
21430 {
21431 writer.WriteAttributeString("AssignToProperty", "yes");
21432 }
21433 }
21434 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
21435 {
21436 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
21437 childElement.OutputXml(writer);
21438 }
21439 writer.WriteEndElement();
21440 }
21441
21442 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21443 void ISetAttributes.SetAttribute(string name, string value)
21444 {
21445 if (String.IsNullOrEmpty(name))
21446 {
21447 throw new ArgumentNullException("name");
21448 }
21449 if (("Id" == name))
21450 {
21451 this.idField = value;
21452 this.idFieldSet = true;
21453 }
21454 if (("Path" == name))
21455 {
21456 this.pathField = value;
21457 this.pathFieldSet = true;
21458 }
21459 if (("Depth" == name))
21460 {
21461 this.depthField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
21462 this.depthFieldSet = true;
21463 }
21464 if (("AssignToProperty" == name))
21465 {
21466 this.assignToPropertyField = Enums.ParseYesNoType(value);
21467 this.assignToPropertyFieldSet = true;
21468 }
21469 }
21470 }
21471
21472 /// <summary>
21473 /// References an existing DirectorySearch element.
21474 /// </summary>
21475 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21476 public class DirectorySearchRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
21477 {
21478
21479 private ElementCollection children;
21480
21481 private string idField;
21482
21483 private bool idFieldSet;
21484
21485 private string parentField;
21486
21487 private bool parentFieldSet;
21488
21489 private string pathField;
21490
21491 private bool pathFieldSet;
21492
21493 private ISchemaElement parentElement;
21494
21495 public DirectorySearchRef()
21496 {
21497 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
21498 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
21499 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
21500 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch)));
21501 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef)));
21502 this.children = childCollection0;
21503 }
21504
21505 public virtual IEnumerable Children
21506 {
21507 get
21508 {
21509 return this.children;
21510 }
21511 }
21512
21513 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
21514 public virtual IEnumerable this[System.Type childType]
21515 {
21516 get
21517 {
21518 return this.children.Filter(childType);
21519 }
21520 }
21521
21522 /// <summary>
21523 /// Id of the search being referred to.
21524 /// </summary>
21525 public string Id
21526 {
21527 get
21528 {
21529 return this.idField;
21530 }
21531 set
21532 {
21533 this.idFieldSet = true;
21534 this.idField = value;
21535 }
21536 }
21537
21538 /// <summary>
21539 /// This attribute is the signature of the parent directory of the file or directory in the Signature_ column. If this field is null, and the Path column does not expand to a full path, then all the fixed drives of the user's system are searched by using the Path. This field is a key into one of the following tables: the RegLocator, the IniLocator, the CompLocator, or the DrLocator tables.
21540 /// </summary>
21541 public string Parent
21542 {
21543 get
21544 {
21545 return this.parentField;
21546 }
21547 set
21548 {
21549 this.parentFieldSet = true;
21550 this.parentField = value;
21551 }
21552 }
21553
21554 /// <summary>
21555 /// Path on the user's system. Either absolute, or relative to containing directories.
21556 /// </summary>
21557 public string Path
21558 {
21559 get
21560 {
21561 return this.pathField;
21562 }
21563 set
21564 {
21565 this.pathFieldSet = true;
21566 this.pathField = value;
21567 }
21568 }
21569
21570 public virtual ISchemaElement ParentElement
21571 {
21572 get
21573 {
21574 return this.parentElement;
21575 }
21576 set
21577 {
21578 this.parentElement = value;
21579 }
21580 }
21581
21582 public virtual void AddChild(ISchemaElement child)
21583 {
21584 if ((null == child))
21585 {
21586 throw new ArgumentNullException("child");
21587 }
21588 this.children.AddElement(child);
21589 child.ParentElement = this;
21590 }
21591
21592 public virtual void RemoveChild(ISchemaElement child)
21593 {
21594 if ((null == child))
21595 {
21596 throw new ArgumentNullException("child");
21597 }
21598 this.children.RemoveElement(child);
21599 child.ParentElement = null;
21600 }
21601
21602 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21603 ISchemaElement ICreateChildren.CreateChild(string childName)
21604 {
21605 if (String.IsNullOrEmpty(childName))
21606 {
21607 throw new ArgumentNullException("childName");
21608 }
21609 ISchemaElement childValue = null;
21610 if (("DirectorySearch" == childName))
21611 {
21612 childValue = new DirectorySearch();
21613 }
21614 if (("DirectorySearchRef" == childName))
21615 {
21616 childValue = new DirectorySearchRef();
21617 }
21618 if (("FileSearch" == childName))
21619 {
21620 childValue = new FileSearch();
21621 }
21622 if (("FileSearchRef" == childName))
21623 {
21624 childValue = new FileSearchRef();
21625 }
21626 if ((null == childValue))
21627 {
21628 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
21629 }
21630 return childValue;
21631 }
21632
21633 /// <summary>
21634 /// Processes this element and all child elements into an XmlWriter.
21635 /// </summary>
21636 public virtual void OutputXml(XmlWriter writer)
21637 {
21638 if ((null == writer))
21639 {
21640 throw new ArgumentNullException("writer");
21641 }
21642 writer.WriteStartElement("DirectorySearchRef", "http://wixtoolset.org/schemas/v4/wxs");
21643 if (this.idFieldSet)
21644 {
21645 writer.WriteAttributeString("Id", this.idField);
21646 }
21647 if (this.parentFieldSet)
21648 {
21649 writer.WriteAttributeString("Parent", this.parentField);
21650 }
21651 if (this.pathFieldSet)
21652 {
21653 writer.WriteAttributeString("Path", this.pathField);
21654 }
21655 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
21656 {
21657 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
21658 childElement.OutputXml(writer);
21659 }
21660 writer.WriteEndElement();
21661 }
21662
21663 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21664 void ISetAttributes.SetAttribute(string name, string value)
21665 {
21666 if (String.IsNullOrEmpty(name))
21667 {
21668 throw new ArgumentNullException("name");
21669 }
21670 if (("Id" == name))
21671 {
21672 this.idField = value;
21673 this.idFieldSet = true;
21674 }
21675 if (("Parent" == name))
21676 {
21677 this.parentField = value;
21678 this.parentFieldSet = true;
21679 }
21680 if (("Path" == name))
21681 {
21682 this.pathField = value;
21683 this.pathFieldSet = true;
21684 }
21685 }
21686 }
21687
21688 /// <summary>
21689 /// Searches for file or directory and assigns to value of parent Property.
21690 /// </summary>
21691 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21692 public class ComponentSearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
21693 {
21694
21695 private ElementCollection children;
21696
21697 private string idField;
21698
21699 private bool idFieldSet;
21700
21701 private string guidField;
21702
21703 private bool guidFieldSet;
21704
21705 private TypeType typeField;
21706
21707 private bool typeFieldSet;
21708
21709 private ISchemaElement parentElement;
21710
21711 public ComponentSearch()
21712 {
21713 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
21714 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
21715 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
21716 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch)));
21717 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef)));
21718 this.children = childCollection0;
21719 }
21720
21721 public virtual IEnumerable Children
21722 {
21723 get
21724 {
21725 return this.children;
21726 }
21727 }
21728
21729 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
21730 public virtual IEnumerable this[System.Type childType]
21731 {
21732 get
21733 {
21734 return this.children.Filter(childType);
21735 }
21736 }
21737
21738 public string Id
21739 {
21740 get
21741 {
21742 return this.idField;
21743 }
21744 set
21745 {
21746 this.idFieldSet = true;
21747 this.idField = value;
21748 }
21749 }
21750
21751 /// <summary>
21752 /// The component ID of the component whose key path is to be used for the search.
21753 /// </summary>
21754 public string Guid
21755 {
21756 get
21757 {
21758 return this.guidField;
21759 }
21760 set
21761 {
21762 this.guidFieldSet = true;
21763 this.guidField = value;
21764 }
21765 }
21766
21767 /// <summary>
21768 /// Must be file if last child is FileSearch element and must be directory if last child is DirectorySearch element.
21769 /// </summary>
21770 public TypeType Type
21771 {
21772 get
21773 {
21774 return this.typeField;
21775 }
21776 set
21777 {
21778 this.typeFieldSet = true;
21779 this.typeField = value;
21780 }
21781 }
21782
21783 public virtual ISchemaElement ParentElement
21784 {
21785 get
21786 {
21787 return this.parentElement;
21788 }
21789 set
21790 {
21791 this.parentElement = value;
21792 }
21793 }
21794
21795 public virtual void AddChild(ISchemaElement child)
21796 {
21797 if ((null == child))
21798 {
21799 throw new ArgumentNullException("child");
21800 }
21801 this.children.AddElement(child);
21802 child.ParentElement = this;
21803 }
21804
21805 public virtual void RemoveChild(ISchemaElement child)
21806 {
21807 if ((null == child))
21808 {
21809 throw new ArgumentNullException("child");
21810 }
21811 this.children.RemoveElement(child);
21812 child.ParentElement = null;
21813 }
21814
21815 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21816 ISchemaElement ICreateChildren.CreateChild(string childName)
21817 {
21818 if (String.IsNullOrEmpty(childName))
21819 {
21820 throw new ArgumentNullException("childName");
21821 }
21822 ISchemaElement childValue = null;
21823 if (("DirectorySearch" == childName))
21824 {
21825 childValue = new DirectorySearch();
21826 }
21827 if (("DirectorySearchRef" == childName))
21828 {
21829 childValue = new DirectorySearchRef();
21830 }
21831 if (("FileSearch" == childName))
21832 {
21833 childValue = new FileSearch();
21834 }
21835 if (("FileSearchRef" == childName))
21836 {
21837 childValue = new FileSearchRef();
21838 }
21839 if ((null == childValue))
21840 {
21841 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
21842 }
21843 return childValue;
21844 }
21845
21846 /// <summary>
21847 /// Parses a TypeType from a string.
21848 /// </summary>
21849 public static TypeType ParseTypeType(string value)
21850 {
21851 TypeType parsedValue;
21852 ComponentSearch.TryParseTypeType(value, out parsedValue);
21853 return parsedValue;
21854 }
21855
21856 /// <summary>
21857 /// Tries to parse a TypeType from a string.
21858 /// </summary>
21859 public static bool TryParseTypeType(string value, out TypeType parsedValue)
21860 {
21861 parsedValue = TypeType.NotSet;
21862 if (string.IsNullOrEmpty(value))
21863 {
21864 return false;
21865 }
21866 if (("directory" == value))
21867 {
21868 parsedValue = TypeType.directory;
21869 }
21870 else
21871 {
21872 if (("file" == value))
21873 {
21874 parsedValue = TypeType.file;
21875 }
21876 else
21877 {
21878 parsedValue = TypeType.IllegalValue;
21879 return false;
21880 }
21881 }
21882 return true;
21883 }
21884
21885 /// <summary>
21886 /// Processes this element and all child elements into an XmlWriter.
21887 /// </summary>
21888 public virtual void OutputXml(XmlWriter writer)
21889 {
21890 if ((null == writer))
21891 {
21892 throw new ArgumentNullException("writer");
21893 }
21894 writer.WriteStartElement("ComponentSearch", "http://wixtoolset.org/schemas/v4/wxs");
21895 if (this.idFieldSet)
21896 {
21897 writer.WriteAttributeString("Id", this.idField);
21898 }
21899 if (this.guidFieldSet)
21900 {
21901 writer.WriteAttributeString("Guid", this.guidField);
21902 }
21903 if (this.typeFieldSet)
21904 {
21905 if ((this.typeField == TypeType.directory))
21906 {
21907 writer.WriteAttributeString("Type", "directory");
21908 }
21909 if ((this.typeField == TypeType.file))
21910 {
21911 writer.WriteAttributeString("Type", "file");
21912 }
21913 }
21914 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
21915 {
21916 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
21917 childElement.OutputXml(writer);
21918 }
21919 writer.WriteEndElement();
21920 }
21921
21922 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21923 void ISetAttributes.SetAttribute(string name, string value)
21924 {
21925 if (String.IsNullOrEmpty(name))
21926 {
21927 throw new ArgumentNullException("name");
21928 }
21929 if (("Id" == name))
21930 {
21931 this.idField = value;
21932 this.idFieldSet = true;
21933 }
21934 if (("Guid" == name))
21935 {
21936 this.guidField = value;
21937 this.guidFieldSet = true;
21938 }
21939 if (("Type" == name))
21940 {
21941 this.typeField = ComponentSearch.ParseTypeType(value);
21942 this.typeFieldSet = true;
21943 }
21944 }
21945
21946 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21947 public enum TypeType
21948 {
21949
21950 IllegalValue = int.MaxValue,
21951
21952 NotSet = -1,
21953
21954 /// <summary>
21955 /// The key path of the component is a directory.
21956 /// </summary>
21957 directory,
21958
21959 /// <summary>
21960 /// The key path of the component is a file. This is the default value.
21961 /// </summary>
21962 file,
21963 }
21964 }
21965
21966 /// <summary>
21967 /// Searches for file, directory or registry key and assigns to value of parent Property
21968 /// </summary>
21969 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21970 public class IniFileSearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
21971 {
21972
21973 private ElementCollection children;
21974
21975 private string idField;
21976
21977 private bool idFieldSet;
21978
21979 private int fieldField;
21980
21981 private bool fieldFieldSet;
21982
21983 private string keyField;
21984
21985 private bool keyFieldSet;
21986
21987 private string nameField;
21988
21989 private bool nameFieldSet;
21990
21991 private string sectionField;
21992
21993 private bool sectionFieldSet;
21994
21995 private string shortNameField;
21996
21997 private bool shortNameFieldSet;
21998
21999 private TypeType typeField;
22000
22001 private bool typeFieldSet;
22002
22003 private ISchemaElement parentElement;
22004
22005 public IniFileSearch()
22006 {
22007 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
22008 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
22009 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
22010 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch)));
22011 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef)));
22012 this.children = childCollection0;
22013 }
22014
22015 public virtual IEnumerable Children
22016 {
22017 get
22018 {
22019 return this.children;
22020 }
22021 }
22022
22023 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
22024 public virtual IEnumerable this[System.Type childType]
22025 {
22026 get
22027 {
22028 return this.children.Filter(childType);
22029 }
22030 }
22031
22032 /// <summary>
22033 /// External key into the Signature table.
22034 /// </summary>
22035 public string Id
22036 {
22037 get
22038 {
22039 return this.idField;
22040 }
22041 set
22042 {
22043 this.idFieldSet = true;
22044 this.idField = value;
22045 }
22046 }
22047
22048 /// <summary>
22049 /// The field in the .ini line. If field is Null or 0, the entire line is read.
22050 /// </summary>
22051 public int Field
22052 {
22053 get
22054 {
22055 return this.fieldField;
22056 }
22057 set
22058 {
22059 this.fieldFieldSet = true;
22060 this.fieldField = value;
22061 }
22062 }
22063
22064 /// <summary>
22065 /// The key value within the section.
22066 /// </summary>
22067 public string Key
22068 {
22069 get
22070 {
22071 return this.keyField;
22072 }
22073 set
22074 {
22075 this.keyFieldSet = true;
22076 this.keyField = value;
22077 }
22078 }
22079
22080 /// <summary>
22081 /// In prior versions of the WiX toolset, this attribute specified the short name.
22082 /// This attribute's value may now be either a short or long name.
22083 /// If a short name is specified, the ShortName attribute may not be specified.
22084 /// Also, if this value is a long name, the ShortName attribute may be omitted to
22085 /// allow WiX to attempt to generate a unique short name.
22086 /// However, if you wish to manually specify the short name, then the ShortName
22087 /// attribute may be specified.
22088 /// </summary>
22089 public string Name
22090 {
22091 get
22092 {
22093 return this.nameField;
22094 }
22095 set
22096 {
22097 this.nameFieldSet = true;
22098 this.nameField = value;
22099 }
22100 }
22101
22102 /// <summary>
22103 /// The localizable .ini file section.
22104 /// </summary>
22105 public string Section
22106 {
22107 get
22108 {
22109 return this.sectionField;
22110 }
22111 set
22112 {
22113 this.sectionFieldSet = true;
22114 this.sectionField = value;
22115 }
22116 }
22117
22118 /// <summary>
22119 /// The short name of the file in 8.3 format.
22120 /// This attribute should only be set if the user wants to manually specify the short name.
22121 /// </summary>
22122 public string ShortName
22123 {
22124 get
22125 {
22126 return this.shortNameField;
22127 }
22128 set
22129 {
22130 this.shortNameFieldSet = true;
22131 this.shortNameField = value;
22132 }
22133 }
22134
22135 /// <summary>
22136 /// Must be file if last child is FileSearch element and must be directory if last child is DirectorySearch element.
22137 /// </summary>
22138 public TypeType Type
22139 {
22140 get
22141 {
22142 return this.typeField;
22143 }
22144 set
22145 {
22146 this.typeFieldSet = true;
22147 this.typeField = value;
22148 }
22149 }
22150
22151 public virtual ISchemaElement ParentElement
22152 {
22153 get
22154 {
22155 return this.parentElement;
22156 }
22157 set
22158 {
22159 this.parentElement = value;
22160 }
22161 }
22162
22163 public virtual void AddChild(ISchemaElement child)
22164 {
22165 if ((null == child))
22166 {
22167 throw new ArgumentNullException("child");
22168 }
22169 this.children.AddElement(child);
22170 child.ParentElement = this;
22171 }
22172
22173 public virtual void RemoveChild(ISchemaElement child)
22174 {
22175 if ((null == child))
22176 {
22177 throw new ArgumentNullException("child");
22178 }
22179 this.children.RemoveElement(child);
22180 child.ParentElement = null;
22181 }
22182
22183 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
22184 ISchemaElement ICreateChildren.CreateChild(string childName)
22185 {
22186 if (String.IsNullOrEmpty(childName))
22187 {
22188 throw new ArgumentNullException("childName");
22189 }
22190 ISchemaElement childValue = null;
22191 if (("DirectorySearch" == childName))
22192 {
22193 childValue = new DirectorySearch();
22194 }
22195 if (("DirectorySearchRef" == childName))
22196 {
22197 childValue = new DirectorySearchRef();
22198 }
22199 if (("FileSearch" == childName))
22200 {
22201 childValue = new FileSearch();
22202 }
22203 if (("FileSearchRef" == childName))
22204 {
22205 childValue = new FileSearchRef();
22206 }
22207 if ((null == childValue))
22208 {
22209 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
22210 }
22211 return childValue;
22212 }
22213
22214 /// <summary>
22215 /// Parses a TypeType from a string.
22216 /// </summary>
22217 public static TypeType ParseTypeType(string value)
22218 {
22219 TypeType parsedValue;
22220 IniFileSearch.TryParseTypeType(value, out parsedValue);
22221 return parsedValue;
22222 }
22223
22224 /// <summary>
22225 /// Tries to parse a TypeType from a string.
22226 /// </summary>
22227 public static bool TryParseTypeType(string value, out TypeType parsedValue)
22228 {
22229 parsedValue = TypeType.NotSet;
22230 if (string.IsNullOrEmpty(value))
22231 {
22232 return false;
22233 }
22234 if (("directory" == value))
22235 {
22236 parsedValue = TypeType.directory;
22237 }
22238 else
22239 {
22240 if (("file" == value))
22241 {
22242 parsedValue = TypeType.file;
22243 }
22244 else
22245 {
22246 if (("raw" == value))
22247 {
22248 parsedValue = TypeType.raw;
22249 }
22250 else
22251 {
22252 parsedValue = TypeType.IllegalValue;
22253 return false;
22254 }
22255 }
22256 }
22257 return true;
22258 }
22259
22260 /// <summary>
22261 /// Processes this element and all child elements into an XmlWriter.
22262 /// </summary>
22263 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
22264 public virtual void OutputXml(XmlWriter writer)
22265 {
22266 if ((null == writer))
22267 {
22268 throw new ArgumentNullException("writer");
22269 }
22270 writer.WriteStartElement("IniFileSearch", "http://wixtoolset.org/schemas/v4/wxs");
22271 if (this.idFieldSet)
22272 {
22273 writer.WriteAttributeString("Id", this.idField);
22274 }
22275 if (this.fieldFieldSet)
22276 {
22277 writer.WriteAttributeString("Field", this.fieldField.ToString(CultureInfo.InvariantCulture));
22278 }
22279 if (this.keyFieldSet)
22280 {
22281 writer.WriteAttributeString("Key", this.keyField);
22282 }
22283 if (this.nameFieldSet)
22284 {
22285 writer.WriteAttributeString("Name", this.nameField);
22286 }
22287 if (this.sectionFieldSet)
22288 {
22289 writer.WriteAttributeString("Section", this.sectionField);
22290 }
22291 if (this.shortNameFieldSet)
22292 {
22293 writer.WriteAttributeString("ShortName", this.shortNameField);
22294 }
22295 if (this.typeFieldSet)
22296 {
22297 if ((this.typeField == TypeType.directory))
22298 {
22299 writer.WriteAttributeString("Type", "directory");
22300 }
22301 if ((this.typeField == TypeType.file))
22302 {
22303 writer.WriteAttributeString("Type", "file");
22304 }
22305 if ((this.typeField == TypeType.raw))
22306 {
22307 writer.WriteAttributeString("Type", "raw");
22308 }
22309 }
22310 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
22311 {
22312 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
22313 childElement.OutputXml(writer);
22314 }
22315 writer.WriteEndElement();
22316 }
22317
22318 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
22319 void ISetAttributes.SetAttribute(string name, string value)
22320 {
22321 if (String.IsNullOrEmpty(name))
22322 {
22323 throw new ArgumentNullException("name");
22324 }
22325 if (("Id" == name))
22326 {
22327 this.idField = value;
22328 this.idFieldSet = true;
22329 }
22330 if (("Field" == name))
22331 {
22332 this.fieldField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
22333 this.fieldFieldSet = true;
22334 }
22335 if (("Key" == name))
22336 {
22337 this.keyField = value;
22338 this.keyFieldSet = true;
22339 }
22340 if (("Name" == name))
22341 {
22342 this.nameField = value;
22343 this.nameFieldSet = true;
22344 }
22345 if (("Section" == name))
22346 {
22347 this.sectionField = value;
22348 this.sectionFieldSet = true;
22349 }
22350 if (("ShortName" == name))
22351 {
22352 this.shortNameField = value;
22353 this.shortNameFieldSet = true;
22354 }
22355 if (("Type" == name))
22356 {
22357 this.typeField = IniFileSearch.ParseTypeType(value);
22358 this.typeFieldSet = true;
22359 }
22360 }
22361
22362 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22363 public enum TypeType
22364 {
22365
22366 IllegalValue = int.MaxValue,
22367
22368 NotSet = -1,
22369
22370 /// <summary>
22371 /// A directory location.
22372 /// </summary>
22373 directory,
22374
22375 /// <summary>
22376 /// A file location. This is the default value.
22377 /// </summary>
22378 file,
22379
22380 /// <summary>
22381 /// A raw .ini value.
22382 /// </summary>
22383 raw,
22384 }
22385 }
22386
22387 /// <summary>
22388 /// Searches for file, directory or registry key and assigns to value of parent Property
22389 /// </summary>
22390 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22391 public class RegistrySearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
22392 {
22393
22394 private ElementCollection children;
22395
22396 private string idField;
22397
22398 private bool idFieldSet;
22399
22400 private RootType rootField;
22401
22402 private bool rootFieldSet;
22403
22404 private string keyField;
22405
22406 private bool keyFieldSet;
22407
22408 private string nameField;
22409
22410 private bool nameFieldSet;
22411
22412 private TypeType typeField;
22413
22414 private bool typeFieldSet;
22415
22416 private YesNoType win64Field;
22417
22418 private bool win64FieldSet;
22419
22420 private ISchemaElement parentElement;
22421
22422 public RegistrySearch()
22423 {
22424 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
22425 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
22426 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
22427 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch)));
22428 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef)));
22429 this.children = childCollection0;
22430 }
22431
22432 public virtual IEnumerable Children
22433 {
22434 get
22435 {
22436 return this.children;
22437 }
22438 }
22439
22440 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
22441 public virtual IEnumerable this[System.Type childType]
22442 {
22443 get
22444 {
22445 return this.children.Filter(childType);
22446 }
22447 }
22448
22449 /// <summary>
22450 /// Signature to be used for the file, directory or registry key being searched for.
22451 /// </summary>
22452 public string Id
22453 {
22454 get
22455 {
22456 return this.idField;
22457 }
22458 set
22459 {
22460 this.idFieldSet = true;
22461 this.idField = value;
22462 }
22463 }
22464
22465 /// <summary>
22466 /// Root key for the registry value.
22467 /// </summary>
22468 public RootType Root
22469 {
22470 get
22471 {
22472 return this.rootField;
22473 }
22474 set
22475 {
22476 this.rootFieldSet = true;
22477 this.rootField = value;
22478 }
22479 }
22480
22481 /// <summary>
22482 /// Key for the registry value.
22483 /// </summary>
22484 public string Key
22485 {
22486 get
22487 {
22488 return this.keyField;
22489 }
22490 set
22491 {
22492 this.keyFieldSet = true;
22493 this.keyField = value;
22494 }
22495 }
22496
22497 /// <summary>
22498 /// Registry value name. If this value is null, then the value from the key's unnamed or default value, if any, is retrieved.
22499 /// </summary>
22500 public string Name
22501 {
22502 get
22503 {
22504 return this.nameField;
22505 }
22506 set
22507 {
22508 this.nameFieldSet = true;
22509 this.nameField = value;
22510 }
22511 }
22512
22513 /// <summary>
22514 /// The value must be 'file' if the child is a FileSearch element, and must be 'directory' if child is a DirectorySearch element.
22515 /// </summary>
22516 public TypeType Type
22517 {
22518 get
22519 {
22520 return this.typeField;
22521 }
22522 set
22523 {
22524 this.typeFieldSet = true;
22525 this.typeField = value;
22526 }
22527 }
22528
22529 /// <summary>
22530 /// Instructs the search to look in the 64-bit registry when the value is 'yes'. When the value is 'no', the search looks in the 32-bit registry.
22531 /// The default value is based on the platform set by the -arch switch to candle.exe
22532 /// or the InstallerPlatform property in a .wixproj MSBuild project:
22533 /// For x86 and ARM, the default value is 'no'.
22534 /// For x64 and IA64, the default value is 'yes'.
22535 /// </summary>
22536 public YesNoType Win64
22537 {
22538 get
22539 {
22540 return this.win64Field;
22541 }
22542 set
22543 {
22544 this.win64FieldSet = true;
22545 this.win64Field = value;
22546 }
22547 }
22548
22549 public virtual ISchemaElement ParentElement
22550 {
22551 get
22552 {
22553 return this.parentElement;
22554 }
22555 set
22556 {
22557 this.parentElement = value;
22558 }
22559 }
22560
22561 public virtual void AddChild(ISchemaElement child)
22562 {
22563 if ((null == child))
22564 {
22565 throw new ArgumentNullException("child");
22566 }
22567 this.children.AddElement(child);
22568 child.ParentElement = this;
22569 }
22570
22571 public virtual void RemoveChild(ISchemaElement child)
22572 {
22573 if ((null == child))
22574 {
22575 throw new ArgumentNullException("child");
22576 }
22577 this.children.RemoveElement(child);
22578 child.ParentElement = null;
22579 }
22580
22581 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
22582 ISchemaElement ICreateChildren.CreateChild(string childName)
22583 {
22584 if (String.IsNullOrEmpty(childName))
22585 {
22586 throw new ArgumentNullException("childName");
22587 }
22588 ISchemaElement childValue = null;
22589 if (("DirectorySearch" == childName))
22590 {
22591 childValue = new DirectorySearch();
22592 }
22593 if (("DirectorySearchRef" == childName))
22594 {
22595 childValue = new DirectorySearchRef();
22596 }
22597 if (("FileSearch" == childName))
22598 {
22599 childValue = new FileSearch();
22600 }
22601 if (("FileSearchRef" == childName))
22602 {
22603 childValue = new FileSearchRef();
22604 }
22605 if ((null == childValue))
22606 {
22607 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
22608 }
22609 return childValue;
22610 }
22611
22612 /// <summary>
22613 /// Parses a RootType from a string.
22614 /// </summary>
22615 public static RootType ParseRootType(string value)
22616 {
22617 RootType parsedValue;
22618 RegistrySearch.TryParseRootType(value, out parsedValue);
22619 return parsedValue;
22620 }
22621
22622 /// <summary>
22623 /// Tries to parse a RootType from a string.
22624 /// </summary>
22625 public static bool TryParseRootType(string value, out RootType parsedValue)
22626 {
22627 parsedValue = RootType.NotSet;
22628 if (string.IsNullOrEmpty(value))
22629 {
22630 return false;
22631 }
22632 if (("HKCR" == value))
22633 {
22634 parsedValue = RootType.HKCR;
22635 }
22636 else
22637 {
22638 if (("HKCU" == value))
22639 {
22640 parsedValue = RootType.HKCU;
22641 }
22642 else
22643 {
22644 if (("HKLM" == value))
22645 {
22646 parsedValue = RootType.HKLM;
22647 }
22648 else
22649 {
22650 if (("HKU" == value))
22651 {
22652 parsedValue = RootType.HKU;
22653 }
22654 else
22655 {
22656 parsedValue = RootType.IllegalValue;
22657 return false;
22658 }
22659 }
22660 }
22661 }
22662 return true;
22663 }
22664
22665 /// <summary>
22666 /// Parses a TypeType from a string.
22667 /// </summary>
22668 public static TypeType ParseTypeType(string value)
22669 {
22670 TypeType parsedValue;
22671 RegistrySearch.TryParseTypeType(value, out parsedValue);
22672 return parsedValue;
22673 }
22674
22675 /// <summary>
22676 /// Tries to parse a TypeType from a string.
22677 /// </summary>
22678 public static bool TryParseTypeType(string value, out TypeType parsedValue)
22679 {
22680 parsedValue = TypeType.NotSet;
22681 if (string.IsNullOrEmpty(value))
22682 {
22683 return false;
22684 }
22685 if (("directory" == value))
22686 {
22687 parsedValue = TypeType.directory;
22688 }
22689 else
22690 {
22691 if (("file" == value))
22692 {
22693 parsedValue = TypeType.file;
22694 }
22695 else
22696 {
22697 if (("raw" == value))
22698 {
22699 parsedValue = TypeType.raw;
22700 }
22701 else
22702 {
22703 parsedValue = TypeType.IllegalValue;
22704 return false;
22705 }
22706 }
22707 }
22708 return true;
22709 }
22710
22711 /// <summary>
22712 /// Processes this element and all child elements into an XmlWriter.
22713 /// </summary>
22714 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
22715 public virtual void OutputXml(XmlWriter writer)
22716 {
22717 if ((null == writer))
22718 {
22719 throw new ArgumentNullException("writer");
22720 }
22721 writer.WriteStartElement("RegistrySearch", "http://wixtoolset.org/schemas/v4/wxs");
22722 if (this.idFieldSet)
22723 {
22724 writer.WriteAttributeString("Id", this.idField);
22725 }
22726 if (this.rootFieldSet)
22727 {
22728 if ((this.rootField == RootType.HKCR))
22729 {
22730 writer.WriteAttributeString("Root", "HKCR");
22731 }
22732 if ((this.rootField == RootType.HKCU))
22733 {
22734 writer.WriteAttributeString("Root", "HKCU");
22735 }
22736 if ((this.rootField == RootType.HKLM))
22737 {
22738 writer.WriteAttributeString("Root", "HKLM");
22739 }
22740 if ((this.rootField == RootType.HKU))
22741 {
22742 writer.WriteAttributeString("Root", "HKU");
22743 }
22744 }
22745 if (this.keyFieldSet)
22746 {
22747 writer.WriteAttributeString("Key", this.keyField);
22748 }
22749 if (this.nameFieldSet)
22750 {
22751 writer.WriteAttributeString("Name", this.nameField);
22752 }
22753 if (this.typeFieldSet)
22754 {
22755 if ((this.typeField == TypeType.directory))
22756 {
22757 writer.WriteAttributeString("Type", "directory");
22758 }
22759 if ((this.typeField == TypeType.file))
22760 {
22761 writer.WriteAttributeString("Type", "file");
22762 }
22763 if ((this.typeField == TypeType.raw))
22764 {
22765 writer.WriteAttributeString("Type", "raw");
22766 }
22767 }
22768 if (this.win64FieldSet)
22769 {
22770 if ((this.win64Field == YesNoType.no))
22771 {
22772 writer.WriteAttributeString("Win64", "no");
22773 }
22774 if ((this.win64Field == YesNoType.yes))
22775 {
22776 writer.WriteAttributeString("Win64", "yes");
22777 }
22778 }
22779 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
22780 {
22781 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
22782 childElement.OutputXml(writer);
22783 }
22784 writer.WriteEndElement();
22785 }
22786
22787 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
22788 void ISetAttributes.SetAttribute(string name, string value)
22789 {
22790 if (String.IsNullOrEmpty(name))
22791 {
22792 throw new ArgumentNullException("name");
22793 }
22794 if (("Id" == name))
22795 {
22796 this.idField = value;
22797 this.idFieldSet = true;
22798 }
22799 if (("Root" == name))
22800 {
22801 this.rootField = RegistrySearch.ParseRootType(value);
22802 this.rootFieldSet = true;
22803 }
22804 if (("Key" == name))
22805 {
22806 this.keyField = value;
22807 this.keyFieldSet = true;
22808 }
22809 if (("Name" == name))
22810 {
22811 this.nameField = value;
22812 this.nameFieldSet = true;
22813 }
22814 if (("Type" == name))
22815 {
22816 this.typeField = RegistrySearch.ParseTypeType(value);
22817 this.typeFieldSet = true;
22818 }
22819 if (("Win64" == name))
22820 {
22821 this.win64Field = Enums.ParseYesNoType(value);
22822 this.win64FieldSet = true;
22823 }
22824 }
22825
22826 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22827 public enum RootType
22828 {
22829
22830 IllegalValue = int.MaxValue,
22831
22832 NotSet = -1,
22833
22834 /// <summary>
22835 /// HKEY_CLASSES_ROOT
22836 /// </summary>
22837 HKCR,
22838
22839 /// <summary>
22840 /// HKEY_CURRENT_USER
22841 /// </summary>
22842 HKCU,
22843
22844 /// <summary>
22845 /// HKEY_LOCAL_MACHINE
22846 /// </summary>
22847 HKLM,
22848
22849 /// <summary>
22850 /// HKEY_USERS
22851 /// </summary>
22852 HKU,
22853 }
22854
22855 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22856 public enum TypeType
22857 {
22858
22859 IllegalValue = int.MaxValue,
22860
22861 NotSet = -1,
22862
22863 /// <summary>
22864 /// The registry value contains the path to a directory.
22865 /// </summary>
22866 directory,
22867
22868 /// <summary>
22869 /// The registry value contains the path to a file. To return the full file path you must add a FileSearch element as a child of this element; otherwise, the parent directory of the file path is returned.
22870 /// </summary>
22871 file,
22872
22873 /// <summary>
22874 /// Sets the raw value from the registry value. Please note that this value will contain a prefix as follows:
22875 /// </summary>
22876 raw,
22877 }
22878 }
22879
22880 /// <summary>
22881 /// References an existing RegistrySearch element.
22882 /// </summary>
22883 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22884 public class RegistrySearchRef : ISchemaElement, ISetAttributes
22885 {
22886
22887 private string idField;
22888
22889 private bool idFieldSet;
22890
22891 private ISchemaElement parentElement;
22892
22893 /// <summary>
22894 /// Specify the Id of the RegistrySearch to reference.
22895 /// </summary>
22896 public string Id
22897 {
22898 get
22899 {
22900 return this.idField;
22901 }
22902 set
22903 {
22904 this.idFieldSet = true;
22905 this.idField = value;
22906 }
22907 }
22908
22909 public virtual ISchemaElement ParentElement
22910 {
22911 get
22912 {
22913 return this.parentElement;
22914 }
22915 set
22916 {
22917 this.parentElement = value;
22918 }
22919 }
22920
22921 /// <summary>
22922 /// Processes this element and all child elements into an XmlWriter.
22923 /// </summary>
22924 public virtual void OutputXml(XmlWriter writer)
22925 {
22926 if ((null == writer))
22927 {
22928 throw new ArgumentNullException("writer");
22929 }
22930 writer.WriteStartElement("RegistrySearchRef", "http://wixtoolset.org/schemas/v4/wxs");
22931 if (this.idFieldSet)
22932 {
22933 writer.WriteAttributeString("Id", this.idField);
22934 }
22935 writer.WriteEndElement();
22936 }
22937
22938 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
22939 void ISetAttributes.SetAttribute(string name, string value)
22940 {
22941 if (String.IsNullOrEmpty(name))
22942 {
22943 throw new ArgumentNullException("name");
22944 }
22945 if (("Id" == name))
22946 {
22947 this.idField = value;
22948 this.idFieldSet = true;
22949 }
22950 }
22951 }
22952
22953 /// <summary>
22954 /// Sets the parent of a nested DirectorySearch element to CCP_DRIVE.
22955 /// </summary>
22956 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22957 public class ComplianceDrive : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
22958 {
22959
22960 private ElementCollection children;
22961
22962 private ISchemaElement parentElement;
22963
22964 public ComplianceDrive()
22965 {
22966 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
22967 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
22968 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
22969 this.children = childCollection0;
22970 }
22971
22972 public virtual IEnumerable Children
22973 {
22974 get
22975 {
22976 return this.children;
22977 }
22978 }
22979
22980 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
22981 public virtual IEnumerable this[System.Type childType]
22982 {
22983 get
22984 {
22985 return this.children.Filter(childType);
22986 }
22987 }
22988
22989 public virtual ISchemaElement ParentElement
22990 {
22991 get
22992 {
22993 return this.parentElement;
22994 }
22995 set
22996 {
22997 this.parentElement = value;
22998 }
22999 }
23000
23001 public virtual void AddChild(ISchemaElement child)
23002 {
23003 if ((null == child))
23004 {
23005 throw new ArgumentNullException("child");
23006 }
23007 this.children.AddElement(child);
23008 child.ParentElement = this;
23009 }
23010
23011 public virtual void RemoveChild(ISchemaElement child)
23012 {
23013 if ((null == child))
23014 {
23015 throw new ArgumentNullException("child");
23016 }
23017 this.children.RemoveElement(child);
23018 child.ParentElement = null;
23019 }
23020
23021 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23022 ISchemaElement ICreateChildren.CreateChild(string childName)
23023 {
23024 if (String.IsNullOrEmpty(childName))
23025 {
23026 throw new ArgumentNullException("childName");
23027 }
23028 ISchemaElement childValue = null;
23029 if (("DirectorySearch" == childName))
23030 {
23031 childValue = new DirectorySearch();
23032 }
23033 if (("DirectorySearchRef" == childName))
23034 {
23035 childValue = new DirectorySearchRef();
23036 }
23037 if ((null == childValue))
23038 {
23039 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
23040 }
23041 return childValue;
23042 }
23043
23044 /// <summary>
23045 /// Processes this element and all child elements into an XmlWriter.
23046 /// </summary>
23047 public virtual void OutputXml(XmlWriter writer)
23048 {
23049 if ((null == writer))
23050 {
23051 throw new ArgumentNullException("writer");
23052 }
23053 writer.WriteStartElement("ComplianceDrive", "http://wixtoolset.org/schemas/v4/wxs");
23054 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
23055 {
23056 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
23057 childElement.OutputXml(writer);
23058 }
23059 writer.WriteEndElement();
23060 }
23061
23062 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23063 void ISetAttributes.SetAttribute(string name, string value)
23064 {
23065 if (String.IsNullOrEmpty(name))
23066 {
23067 throw new ArgumentNullException("name");
23068 }
23069 }
23070 }
23071
23072 /// <summary>
23073 /// Adds a row to the CCPSearch table.
23074 /// </summary>
23075 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
23076 public class ComplianceCheck : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
23077 {
23078
23079 private ElementCollection children;
23080
23081 private ISchemaElement parentElement;
23082
23083 public ComplianceCheck()
23084 {
23085 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
23086 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence);
23087 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComplianceDrive)));
23088 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComponentSearch)));
23089 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearch)));
23090 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(IniFileSearch)));
23091 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearch)));
23092 childCollection0.AddCollection(childCollection1);
23093 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
23094 this.children = childCollection0;
23095 }
23096
23097 public virtual IEnumerable Children
23098 {
23099 get
23100 {
23101 return this.children;
23102 }
23103 }
23104
23105 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
23106 public virtual IEnumerable this[System.Type childType]
23107 {
23108 get
23109 {
23110 return this.children.Filter(childType);
23111 }
23112 }
23113
23114 public virtual ISchemaElement ParentElement
23115 {
23116 get
23117 {
23118 return this.parentElement;
23119 }
23120 set
23121 {
23122 this.parentElement = value;
23123 }
23124 }
23125
23126 public virtual void AddChild(ISchemaElement child)
23127 {
23128 if ((null == child))
23129 {
23130 throw new ArgumentNullException("child");
23131 }
23132 this.children.AddElement(child);
23133 child.ParentElement = this;
23134 }
23135
23136 public virtual void RemoveChild(ISchemaElement child)
23137 {
23138 if ((null == child))
23139 {
23140 throw new ArgumentNullException("child");
23141 }
23142 this.children.RemoveElement(child);
23143 child.ParentElement = null;
23144 }
23145
23146 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23147 ISchemaElement ICreateChildren.CreateChild(string childName)
23148 {
23149 if (String.IsNullOrEmpty(childName))
23150 {
23151 throw new ArgumentNullException("childName");
23152 }
23153 ISchemaElement childValue = null;
23154 if (("ComplianceDrive" == childName))
23155 {
23156 childValue = new ComplianceDrive();
23157 }
23158 if (("ComponentSearch" == childName))
23159 {
23160 childValue = new ComponentSearch();
23161 }
23162 if (("RegistrySearch" == childName))
23163 {
23164 childValue = new RegistrySearch();
23165 }
23166 if (("IniFileSearch" == childName))
23167 {
23168 childValue = new IniFileSearch();
23169 }
23170 if (("DirectorySearch" == childName))
23171 {
23172 childValue = new DirectorySearch();
23173 }
23174 if ((null == childValue))
23175 {
23176 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
23177 }
23178 return childValue;
23179 }
23180
23181 /// <summary>
23182 /// Processes this element and all child elements into an XmlWriter.
23183 /// </summary>
23184 public virtual void OutputXml(XmlWriter writer)
23185 {
23186 if ((null == writer))
23187 {
23188 throw new ArgumentNullException("writer");
23189 }
23190 writer.WriteStartElement("ComplianceCheck", "http://wixtoolset.org/schemas/v4/wxs");
23191 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
23192 {
23193 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
23194 childElement.OutputXml(writer);
23195 }
23196 writer.WriteEndElement();
23197 }
23198
23199 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23200 void ISetAttributes.SetAttribute(string name, string value)
23201 {
23202 if (String.IsNullOrEmpty(name))
23203 {
23204 throw new ArgumentNullException("name");
23205 }
23206 }
23207 }
23208
23209 /// <summary>
23210 /// Property value for a Package or Module.
23211 /// </summary>
23212 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
23213 public class Property : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
23214 {
23215
23216 private ElementCollection children;
23217
23218 private string idField;
23219
23220 private bool idFieldSet;
23221
23222 private string valueField;
23223
23224 private bool valueFieldSet;
23225
23226 private YesNoType complianceCheckField;
23227
23228 private bool complianceCheckFieldSet;
23229
23230 private YesNoType adminField;
23231
23232 private bool adminFieldSet;
23233
23234 private YesNoType secureField;
23235
23236 private bool secureFieldSet;
23237
23238 private YesNoType hiddenField;
23239
23240 private bool hiddenFieldSet;
23241
23242 private YesNoType suppressModularizationField;
23243
23244 private bool suppressModularizationFieldSet;
23245
23246 private ISchemaElement parentElement;
23247
23248 public Property()
23249 {
23250 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
23251 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence);
23252 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComplianceDrive)));
23253 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComponentSearch)));
23254 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearch)));
23255 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearchRef)));
23256 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(IniFileSearch)));
23257 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearch)));
23258 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearchRef)));
23259 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ProductSearch)));
23260 childCollection0.AddCollection(childCollection1);
23261 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
23262 this.children = childCollection0;
23263 }
23264
23265 public virtual IEnumerable Children
23266 {
23267 get
23268 {
23269 return this.children;
23270 }
23271 }
23272
23273 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
23274 public virtual IEnumerable this[System.Type childType]
23275 {
23276 get
23277 {
23278 return this.children.Filter(childType);
23279 }
23280 }
23281
23282 /// <summary>
23283 /// Unique identifier for Property.
23284 /// </summary>
23285 public string Id
23286 {
23287 get
23288 {
23289 return this.idField;
23290 }
23291 set
23292 {
23293 this.idFieldSet = true;
23294 this.idField = value;
23295 }
23296 }
23297
23298 /// <summary>
23299 /// Sets a default value for the property. The value will be overwritten if the Property is used for a search.
23300 /// </summary>
23301 public string Value
23302 {
23303 get
23304 {
23305 return this.valueField;
23306 }
23307 set
23308 {
23309 this.valueFieldSet = true;
23310 this.valueField = value;
23311 }
23312 }
23313
23314 /// <summary>
23315 /// Adds a row to the CCPSearch table. This attribute is only valid when this Property contains a search element.
23316 /// </summary>
23317 public YesNoType ComplianceCheck
23318 {
23319 get
23320 {
23321 return this.complianceCheckField;
23322 }
23323 set
23324 {
23325 this.complianceCheckFieldSet = true;
23326 this.complianceCheckField = value;
23327 }
23328 }
23329
23330 /// <summary>
23331 /// Denotes that the Property is saved during
23332 /// </summary>
23333 public YesNoType Admin
23334 {
23335 get
23336 {
23337 return this.adminField;
23338 }
23339 set
23340 {
23341 this.adminFieldSet = true;
23342 this.adminField = value;
23343 }
23344 }
23345
23346 /// <summary>
23347 /// Denotes that the Property can be passed to the server side when doing a managed installation with elevated privileges. See the
23348 /// </summary>
23349 public YesNoType Secure
23350 {
23351 get
23352 {
23353 return this.secureField;
23354 }
23355 set
23356 {
23357 this.secureFieldSet = true;
23358 this.secureField = value;
23359 }
23360 }
23361
23362 /// <summary>
23363 /// Denotes that the Property is not logged during installation. See the
23364 /// </summary>
23365 public YesNoType Hidden
23366 {
23367 get
23368 {
23369 return this.hiddenField;
23370 }
23371 set
23372 {
23373 this.hiddenFieldSet = true;
23374 this.hiddenField = value;
23375 }
23376 }
23377
23378 /// <summary>
23379 /// Use to suppress modularization of this property identifier in merge modules.
23380 /// Using this functionality is strongly discouraged; it should only be
23381 /// necessary as a workaround of last resort in rare scenarios.
23382 /// </summary>
23383 public YesNoType SuppressModularization
23384 {
23385 get
23386 {
23387 return this.suppressModularizationField;
23388 }
23389 set
23390 {
23391 this.suppressModularizationFieldSet = true;
23392 this.suppressModularizationField = value;
23393 }
23394 }
23395
23396 public virtual ISchemaElement ParentElement
23397 {
23398 get
23399 {
23400 return this.parentElement;
23401 }
23402 set
23403 {
23404 this.parentElement = value;
23405 }
23406 }
23407
23408 public virtual void AddChild(ISchemaElement child)
23409 {
23410 if ((null == child))
23411 {
23412 throw new ArgumentNullException("child");
23413 }
23414 this.children.AddElement(child);
23415 child.ParentElement = this;
23416 }
23417
23418 public virtual void RemoveChild(ISchemaElement child)
23419 {
23420 if ((null == child))
23421 {
23422 throw new ArgumentNullException("child");
23423 }
23424 this.children.RemoveElement(child);
23425 child.ParentElement = null;
23426 }
23427
23428 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23429 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
23430 ISchemaElement ICreateChildren.CreateChild(string childName)
23431 {
23432 if (String.IsNullOrEmpty(childName))
23433 {
23434 throw new ArgumentNullException("childName");
23435 }
23436 ISchemaElement childValue = null;
23437 if (("ComplianceDrive" == childName))
23438 {
23439 childValue = new ComplianceDrive();
23440 }
23441 if (("ComponentSearch" == childName))
23442 {
23443 childValue = new ComponentSearch();
23444 }
23445 if (("RegistrySearch" == childName))
23446 {
23447 childValue = new RegistrySearch();
23448 }
23449 if (("RegistrySearchRef" == childName))
23450 {
23451 childValue = new RegistrySearchRef();
23452 }
23453 if (("IniFileSearch" == childName))
23454 {
23455 childValue = new IniFileSearch();
23456 }
23457 if (("DirectorySearch" == childName))
23458 {
23459 childValue = new DirectorySearch();
23460 }
23461 if (("DirectorySearchRef" == childName))
23462 {
23463 childValue = new DirectorySearchRef();
23464 }
23465 if (("ProductSearch" == childName))
23466 {
23467 childValue = new ProductSearch();
23468 }
23469 if ((null == childValue))
23470 {
23471 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
23472 }
23473 return childValue;
23474 }
23475
23476 /// <summary>
23477 /// Processes this element and all child elements into an XmlWriter.
23478 /// </summary>
23479 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
23480 public virtual void OutputXml(XmlWriter writer)
23481 {
23482 if ((null == writer))
23483 {
23484 throw new ArgumentNullException("writer");
23485 }
23486 writer.WriteStartElement("Property", "http://wixtoolset.org/schemas/v4/wxs");
23487 if (this.idFieldSet)
23488 {
23489 writer.WriteAttributeString("Id", this.idField);
23490 }
23491 if (this.valueFieldSet)
23492 {
23493 writer.WriteAttributeString("Value", this.valueField);
23494 }
23495 if (this.complianceCheckFieldSet)
23496 {
23497 if ((this.complianceCheckField == YesNoType.no))
23498 {
23499 writer.WriteAttributeString("ComplianceCheck", "no");
23500 }
23501 if ((this.complianceCheckField == YesNoType.yes))
23502 {
23503 writer.WriteAttributeString("ComplianceCheck", "yes");
23504 }
23505 }
23506 if (this.adminFieldSet)
23507 {
23508 if ((this.adminField == YesNoType.no))
23509 {
23510 writer.WriteAttributeString("Admin", "no");
23511 }
23512 if ((this.adminField == YesNoType.yes))
23513 {
23514 writer.WriteAttributeString("Admin", "yes");
23515 }
23516 }
23517 if (this.secureFieldSet)
23518 {
23519 if ((this.secureField == YesNoType.no))
23520 {
23521 writer.WriteAttributeString("Secure", "no");
23522 }
23523 if ((this.secureField == YesNoType.yes))
23524 {
23525 writer.WriteAttributeString("Secure", "yes");
23526 }
23527 }
23528 if (this.hiddenFieldSet)
23529 {
23530 if ((this.hiddenField == YesNoType.no))
23531 {
23532 writer.WriteAttributeString("Hidden", "no");
23533 }
23534 if ((this.hiddenField == YesNoType.yes))
23535 {
23536 writer.WriteAttributeString("Hidden", "yes");
23537 }
23538 }
23539 if (this.suppressModularizationFieldSet)
23540 {
23541 if ((this.suppressModularizationField == YesNoType.no))
23542 {
23543 writer.WriteAttributeString("SuppressModularization", "no");
23544 }
23545 if ((this.suppressModularizationField == YesNoType.yes))
23546 {
23547 writer.WriteAttributeString("SuppressModularization", "yes");
23548 }
23549 }
23550 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
23551 {
23552 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
23553 childElement.OutputXml(writer);
23554 }
23555 writer.WriteEndElement();
23556 }
23557
23558 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23559 void ISetAttributes.SetAttribute(string name, string value)
23560 {
23561 if (String.IsNullOrEmpty(name))
23562 {
23563 throw new ArgumentNullException("name");
23564 }
23565 if (("Id" == name))
23566 {
23567 this.idField = value;
23568 this.idFieldSet = true;
23569 }
23570 if (("Value" == name))
23571 {
23572 this.valueField = value;
23573 this.valueFieldSet = true;
23574 }
23575 if (("ComplianceCheck" == name))
23576 {
23577 this.complianceCheckField = Enums.ParseYesNoType(value);
23578 this.complianceCheckFieldSet = true;
23579 }
23580 if (("Admin" == name))
23581 {
23582 this.adminField = Enums.ParseYesNoType(value);
23583 this.adminFieldSet = true;
23584 }
23585 if (("Secure" == name))
23586 {
23587 this.secureField = Enums.ParseYesNoType(value);
23588 this.secureFieldSet = true;
23589 }
23590 if (("Hidden" == name))
23591 {
23592 this.hiddenField = Enums.ParseYesNoType(value);
23593 this.hiddenFieldSet = true;
23594 }
23595 if (("SuppressModularization" == name))
23596 {
23597 this.suppressModularizationField = Enums.ParseYesNoType(value);
23598 this.suppressModularizationFieldSet = true;
23599 }
23600 }
23601 }
23602
23603 /// <summary>
23604 /// Reference to a Property value.
23605 /// </summary>
23606 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
23607 public class PropertyRef : ISchemaElement, ISetAttributes
23608 {
23609
23610 private string idField;
23611
23612 private bool idFieldSet;
23613
23614 private ISchemaElement parentElement;
23615
23616 /// <summary>
23617 /// Identifier of Property to reference.
23618 /// </summary>
23619 public string Id
23620 {
23621 get
23622 {
23623 return this.idField;
23624 }
23625 set
23626 {
23627 this.idFieldSet = true;
23628 this.idField = value;
23629 }
23630 }
23631
23632 public virtual ISchemaElement ParentElement
23633 {
23634 get
23635 {
23636 return this.parentElement;
23637 }
23638 set
23639 {
23640 this.parentElement = value;
23641 }
23642 }
23643
23644 /// <summary>
23645 /// Processes this element and all child elements into an XmlWriter.
23646 /// </summary>
23647 public virtual void OutputXml(XmlWriter writer)
23648 {
23649 if ((null == writer))
23650 {
23651 throw new ArgumentNullException("writer");
23652 }
23653 writer.WriteStartElement("PropertyRef", "http://wixtoolset.org/schemas/v4/wxs");
23654 if (this.idFieldSet)
23655 {
23656 writer.WriteAttributeString("Id", this.idField);
23657 }
23658 writer.WriteEndElement();
23659 }
23660
23661 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23662 void ISetAttributes.SetAttribute(string name, string value)
23663 {
23664 if (String.IsNullOrEmpty(name))
23665 {
23666 throw new ArgumentNullException("name");
23667 }
23668 if (("Id" == name))
23669 {
23670 this.idField = value;
23671 this.idFieldSet = true;
23672 }
23673 }
23674 }
23675
23676 /// <summary>
23677 /// Shortcut, default target is parent File, CreateFolder, or Component's Directory
23678 /// </summary>
23679 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
23680 public class Shortcut : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
23681 {
23682
23683 private ElementCollection children;
23684
23685 private string idField;
23686
23687 private bool idFieldSet;
23688
23689 private string directoryField;
23690
23691 private bool directoryFieldSet;
23692
23693 private string nameField;
23694
23695 private bool nameFieldSet;
23696
23697 private string shortNameField;
23698
23699 private bool shortNameFieldSet;
23700
23701 private string targetField;
23702
23703 private bool targetFieldSet;
23704
23705 private string descriptionField;
23706
23707 private bool descriptionFieldSet;
23708
23709 private string argumentsField;
23710
23711 private bool argumentsFieldSet;
23712
23713 private int hotkeyField;
23714
23715 private bool hotkeyFieldSet;
23716
23717 private string iconField;
23718
23719 private bool iconFieldSet;
23720
23721 private int iconIndexField;
23722
23723 private bool iconIndexFieldSet;
23724
23725 private ShowType showField;
23726
23727 private bool showFieldSet;
23728
23729 private string workingDirectoryField;
23730
23731 private bool workingDirectoryFieldSet;
23732
23733 private YesNoType advertiseField;
23734
23735 private bool advertiseFieldSet;
23736
23737 private string displayResourceDllField;
23738
23739 private bool displayResourceDllFieldSet;
23740
23741 private int displayResourceIdField;
23742
23743 private bool displayResourceIdFieldSet;
23744
23745 private string descriptionResourceDllField;
23746
23747 private bool descriptionResourceDllFieldSet;
23748
23749 private int descriptionResourceIdField;
23750
23751 private bool descriptionResourceIdFieldSet;
23752
23753 private ISchemaElement parentElement;
23754
23755 public Shortcut()
23756 {
23757 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
23758 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Icon)));
23759 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ShortcutProperty)));
23760 this.children = childCollection0;
23761 }
23762
23763 public virtual IEnumerable Children
23764 {
23765 get
23766 {
23767 return this.children;
23768 }
23769 }
23770
23771 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
23772 public virtual IEnumerable this[System.Type childType]
23773 {
23774 get
23775 {
23776 return this.children.Filter(childType);
23777 }
23778 }
23779
23780 /// <summary>
23781 /// Unique identifier for the shortcut. This value will serve as the primary key for the row.
23782 /// </summary>
23783 public string Id
23784 {
23785 get
23786 {
23787 return this.idField;
23788 }
23789 set
23790 {
23791 this.idFieldSet = true;
23792 this.idField = value;
23793 }
23794 }
23795
23796 /// <summary>
23797 /// Identifier reference to Directory element where shortcut is to be created. When nested under a Component element, this attribute's value will default to the parent directory. Otherwise, this attribute is required.
23798 /// </summary>
23799 public string Directory
23800 {
23801 get
23802 {
23803 return this.directoryField;
23804 }
23805 set
23806 {
23807 this.directoryFieldSet = true;
23808 this.directoryField = value;
23809 }
23810 }
23811
23812 /// <summary>
23813 /// In prior versions of the WiX toolset, this attribute specified the short name.
23814 /// This attribute's value may now be either a short or long name.
23815 /// If a short name is specified, the ShortName attribute may not be specified.
23816 /// Also, if this value is a long name, the ShortName attribute may be omitted to
23817 /// allow WiX to attempt to generate a unique short name.
23818 /// However, if this name collides with another shortcut or you wish to manually specify
23819 /// the short name, then the ShortName attribute may be specified.
23820 /// </summary>
23821 public string Name
23822 {
23823 get
23824 {
23825 return this.nameField;
23826 }
23827 set
23828 {
23829 this.nameFieldSet = true;
23830 this.nameField = value;
23831 }
23832 }
23833
23834 /// <summary>
23835 /// The short name of the shortcut in 8.3 format.
23836 /// This attribute should only be set if there is a conflict between generated short names
23837 /// or the user wants to manually specify the short name.
23838 /// </summary>
23839 public string ShortName
23840 {
23841 get
23842 {
23843 return this.shortNameField;
23844 }
23845 set
23846 {
23847 this.shortNameFieldSet = true;
23848 this.shortNameField = value;
23849 }
23850 }
23851
23852 /// <summary>
23853 /// This attribute can only be set if this Shortcut element is nested under a Component element.
23854 /// When nested under a Component element, this attribute's value will default to the parent directory.
23855 /// This attribute's value is the target for a non-advertised shortcut.
23856 /// This attribute is not valid for advertised shortcuts.
23857 /// If you specify this value, its value should be a property identifier enclosed by square brackets ([ ]), that is expanded into the file or a folder pointed to by the shortcut.
23858 /// </summary>
23859 public string Target
23860 {
23861 get
23862 {
23863 return this.targetField;
23864 }
23865 set
23866 {
23867 this.targetFieldSet = true;
23868 this.targetField = value;
23869 }
23870 }
23871
23872 /// <summary>
23873 /// The localizable description for the shortcut.
23874 /// </summary>
23875 public string Description
23876 {
23877 get
23878 {
23879 return this.descriptionField;
23880 }
23881 set
23882 {
23883 this.descriptionFieldSet = true;
23884 this.descriptionField = value;
23885 }
23886 }
23887
23888 /// <summary>
23889 /// The command-line arguments for the shortcut. Note that the resolution of properties
23890 /// in the Arguments field is limited. A property formatted as [Property] in this field can only be resolved if the
23891 /// property already has the intended value when the component owning the shortcut is installed. For example, for the
23892 /// argument "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and
23893 /// the component that owns the shortcut.
23894 /// </summary>
23895 public string Arguments
23896 {
23897 get
23898 {
23899 return this.argumentsField;
23900 }
23901 set
23902 {
23903 this.argumentsFieldSet = true;
23904 this.argumentsField = value;
23905 }
23906 }
23907
23908 /// <summary>
23909 /// The hotkey for the shortcut. The low-order byte contains the virtual-key code for
23910 /// the key, and the high-order byte contains modifier flags. This must be a non-negative number. Authors of
23911 /// installation packages are generally recommend not to set this option, because this can add duplicate hotkeys to a
23912 /// users desktop. In addition, the practice of assigning hotkeys to shortcuts can be problematic for users using hotkeys
23913 /// for accessibility.
23914 /// </summary>
23915 public int Hotkey
23916 {
23917 get
23918 {
23919 return this.hotkeyField;
23920 }
23921 set
23922 {
23923 this.hotkeyFieldSet = true;
23924 this.hotkeyField = value;
23925 }
23926 }
23927
23928 /// <summary>
23929 /// Identifier reference to Icon element. The Icon identifier should have the same extension
23930 /// as the file that it points at. For example, a shortcut to an executable (e.g. "my.exe") should reference an Icon with identifier
23931 /// like "MyIcon.exe"
23932 /// </summary>
23933 public string Icon
23934 {
23935 get
23936 {
23937 return this.iconField;
23938 }
23939 set
23940 {
23941 this.iconFieldSet = true;
23942 this.iconField = value;
23943 }
23944 }
23945
23946 /// <summary>
23947 /// Identifier reference to Icon element.
23948 /// </summary>
23949 public int IconIndex
23950 {
23951 get
23952 {
23953 return this.iconIndexField;
23954 }
23955 set
23956 {
23957 this.iconIndexFieldSet = true;
23958 this.iconIndexField = value;
23959 }
23960 }
23961
23962 public ShowType Show
23963 {
23964 get
23965 {
23966 return this.showField;
23967 }
23968 set
23969 {
23970 this.showFieldSet = true;
23971 this.showField = value;
23972 }
23973 }
23974
23975 /// <summary>
23976 /// Directory identifier (or Property identifier that resolves to a directory) that resolves
23977 /// to the path of the working directory for the shortcut.
23978 /// </summary>
23979 public string WorkingDirectory
23980 {
23981 get
23982 {
23983 return this.workingDirectoryField;
23984 }
23985 set
23986 {
23987 this.workingDirectoryFieldSet = true;
23988 this.workingDirectoryField = value;
23989 }
23990 }
23991
23992 /// <summary>
23993 /// Specifies if the shortcut should be advertised or not. Note that advertised shortcuts
23994 /// always point at a particular application, identified by a ProductCode, and should not be shared between applications.
23995 /// Advertised shortcuts only work for the most recently installed application, and are removed when that application is
23996 /// removed. The default value is 'no'.
23997 /// </summary>
23998 public YesNoType Advertise
23999 {
24000 get
24001 {
24002 return this.advertiseField;
24003 }
24004 set
24005 {
24006 this.advertiseFieldSet = true;
24007 this.advertiseField = value;
24008 }
24009 }
24010
24011 /// <summary>
24012 /// The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally
24013 /// authored using [#filekey] form. When this attribute is specified, the DisplayResourceId attribute must also
24014 /// be provided.
24015 ///
24016 /// This attribute is only used on Windows Vista and above. If this attribute is not populated and the install
24017 /// is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and
24018 /// the install is running on Vista and above, the value in the Name attribute is ignored.
24019 /// </summary>
24020 public string DisplayResourceDll
24021 {
24022 get
24023 {
24024 return this.displayResourceDllField;
24025 }
24026 set
24027 {
24028 this.displayResourceDllFieldSet = true;
24029 this.displayResourceDllField = value;
24030 }
24031 }
24032
24033 /// <summary>
24034 /// The display name index for the shortcut. This must be a non-negative number. When this attribute is specified, the
24035 /// DisplayResourceDll attribute must also be provided.
24036 ///
24037 /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install
24038 /// is running on Vista and above, the value in the Name attribute is used. If this attribute is specified and
24039 /// the install is running on Vista and above, the value in the Name attribute is ignored.
24040 /// </summary>
24041 public int DisplayResourceId
24042 {
24043 get
24044 {
24045 return this.displayResourceIdField;
24046 }
24047 set
24048 {
24049 this.displayResourceIdFieldSet = true;
24050 this.displayResourceIdField = value;
24051 }
24052 }
24053
24054 /// <summary>
24055 /// The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally
24056 /// authored using [#filekey] form. When this attribute is specified, the DescriptionResourceId attribute must also
24057 /// be provided.
24058 ///
24059 /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install
24060 /// is running on Vista and above, the value in the Name attribute is used. If this attribute is provided and
24061 /// the install is running on Vista and above, the value in the Name attribute is ignored.
24062 /// </summary>
24063 public string DescriptionResourceDll
24064 {
24065 get
24066 {
24067 return this.descriptionResourceDllField;
24068 }
24069 set
24070 {
24071 this.descriptionResourceDllFieldSet = true;
24072 this.descriptionResourceDllField = value;
24073 }
24074 }
24075
24076 /// <summary>
24077 /// The description name index for the shortcut. This must be a non-negative number. When this attribute is specified,
24078 /// the DescriptionResourceDll attribute must also be populated.
24079 ///
24080 /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install
24081 /// is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and the
24082 /// install is running on Vista and above, the value in the Name attribute is ignored.
24083 /// </summary>
24084 public int DescriptionResourceId
24085 {
24086 get
24087 {
24088 return this.descriptionResourceIdField;
24089 }
24090 set
24091 {
24092 this.descriptionResourceIdFieldSet = true;
24093 this.descriptionResourceIdField = value;
24094 }
24095 }
24096
24097 public virtual ISchemaElement ParentElement
24098 {
24099 get
24100 {
24101 return this.parentElement;
24102 }
24103 set
24104 {
24105 this.parentElement = value;
24106 }
24107 }
24108
24109 public virtual void AddChild(ISchemaElement child)
24110 {
24111 if ((null == child))
24112 {
24113 throw new ArgumentNullException("child");
24114 }
24115 this.children.AddElement(child);
24116 child.ParentElement = this;
24117 }
24118
24119 public virtual void RemoveChild(ISchemaElement child)
24120 {
24121 if ((null == child))
24122 {
24123 throw new ArgumentNullException("child");
24124 }
24125 this.children.RemoveElement(child);
24126 child.ParentElement = null;
24127 }
24128
24129 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
24130 ISchemaElement ICreateChildren.CreateChild(string childName)
24131 {
24132 if (String.IsNullOrEmpty(childName))
24133 {
24134 throw new ArgumentNullException("childName");
24135 }
24136 ISchemaElement childValue = null;
24137 if (("Icon" == childName))
24138 {
24139 childValue = new Icon();
24140 }
24141 if (("ShortcutProperty" == childName))
24142 {
24143 childValue = new ShortcutProperty();
24144 }
24145 if ((null == childValue))
24146 {
24147 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
24148 }
24149 return childValue;
24150 }
24151
24152 /// <summary>
24153 /// Parses a ShowType from a string.
24154 /// </summary>
24155 public static ShowType ParseShowType(string value)
24156 {
24157 ShowType parsedValue;
24158 Shortcut.TryParseShowType(value, out parsedValue);
24159 return parsedValue;
24160 }
24161
24162 /// <summary>
24163 /// Tries to parse a ShowType from a string.
24164 /// </summary>
24165 public static bool TryParseShowType(string value, out ShowType parsedValue)
24166 {
24167 parsedValue = ShowType.NotSet;
24168 if (string.IsNullOrEmpty(value))
24169 {
24170 return false;
24171 }
24172 if (("normal" == value))
24173 {
24174 parsedValue = ShowType.normal;
24175 }
24176 else
24177 {
24178 if (("minimized" == value))
24179 {
24180 parsedValue = ShowType.minimized;
24181 }
24182 else
24183 {
24184 if (("maximized" == value))
24185 {
24186 parsedValue = ShowType.maximized;
24187 }
24188 else
24189 {
24190 parsedValue = ShowType.IllegalValue;
24191 return false;
24192 }
24193 }
24194 }
24195 return true;
24196 }
24197
24198 /// <summary>
24199 /// Processes this element and all child elements into an XmlWriter.
24200 /// </summary>
24201 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
24202 public virtual void OutputXml(XmlWriter writer)
24203 {
24204 if ((null == writer))
24205 {
24206 throw new ArgumentNullException("writer");
24207 }
24208 writer.WriteStartElement("Shortcut", "http://wixtoolset.org/schemas/v4/wxs");
24209 if (this.idFieldSet)
24210 {
24211 writer.WriteAttributeString("Id", this.idField);
24212 }
24213 if (this.directoryFieldSet)
24214 {
24215 writer.WriteAttributeString("Directory", this.directoryField);
24216 }
24217 if (this.nameFieldSet)
24218 {
24219 writer.WriteAttributeString("Name", this.nameField);
24220 }
24221 if (this.shortNameFieldSet)
24222 {
24223 writer.WriteAttributeString("ShortName", this.shortNameField);
24224 }
24225 if (this.targetFieldSet)
24226 {
24227 writer.WriteAttributeString("Target", this.targetField);
24228 }
24229 if (this.descriptionFieldSet)
24230 {
24231 writer.WriteAttributeString("Description", this.descriptionField);
24232 }
24233 if (this.argumentsFieldSet)
24234 {
24235 writer.WriteAttributeString("Arguments", this.argumentsField);
24236 }
24237 if (this.hotkeyFieldSet)
24238 {
24239 writer.WriteAttributeString("Hotkey", this.hotkeyField.ToString(CultureInfo.InvariantCulture));
24240 }
24241 if (this.iconFieldSet)
24242 {
24243 writer.WriteAttributeString("Icon", this.iconField);
24244 }
24245 if (this.iconIndexFieldSet)
24246 {
24247 writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture));
24248 }
24249 if (this.showFieldSet)
24250 {
24251 if ((this.showField == ShowType.normal))
24252 {
24253 writer.WriteAttributeString("Show", "normal");
24254 }
24255 if ((this.showField == ShowType.minimized))
24256 {
24257 writer.WriteAttributeString("Show", "minimized");
24258 }
24259 if ((this.showField == ShowType.maximized))
24260 {
24261 writer.WriteAttributeString("Show", "maximized");
24262 }
24263 }
24264 if (this.workingDirectoryFieldSet)
24265 {
24266 writer.WriteAttributeString("WorkingDirectory", this.workingDirectoryField);
24267 }
24268 if (this.advertiseFieldSet)
24269 {
24270 if ((this.advertiseField == YesNoType.no))
24271 {
24272 writer.WriteAttributeString("Advertise", "no");
24273 }
24274 if ((this.advertiseField == YesNoType.yes))
24275 {
24276 writer.WriteAttributeString("Advertise", "yes");
24277 }
24278 }
24279 if (this.displayResourceDllFieldSet)
24280 {
24281 writer.WriteAttributeString("DisplayResourceDll", this.displayResourceDllField);
24282 }
24283 if (this.displayResourceIdFieldSet)
24284 {
24285 writer.WriteAttributeString("DisplayResourceId", this.displayResourceIdField.ToString(CultureInfo.InvariantCulture));
24286 }
24287 if (this.descriptionResourceDllFieldSet)
24288 {
24289 writer.WriteAttributeString("DescriptionResourceDll", this.descriptionResourceDllField);
24290 }
24291 if (this.descriptionResourceIdFieldSet)
24292 {
24293 writer.WriteAttributeString("DescriptionResourceId", this.descriptionResourceIdField.ToString(CultureInfo.InvariantCulture));
24294 }
24295 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
24296 {
24297 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
24298 childElement.OutputXml(writer);
24299 }
24300 writer.WriteEndElement();
24301 }
24302
24303 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
24304 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
24305 void ISetAttributes.SetAttribute(string name, string value)
24306 {
24307 if (String.IsNullOrEmpty(name))
24308 {
24309 throw new ArgumentNullException("name");
24310 }
24311 if (("Id" == name))
24312 {
24313 this.idField = value;
24314 this.idFieldSet = true;
24315 }
24316 if (("Directory" == name))
24317 {
24318 this.directoryField = value;
24319 this.directoryFieldSet = true;
24320 }
24321 if (("Name" == name))
24322 {
24323 this.nameField = value;
24324 this.nameFieldSet = true;
24325 }
24326 if (("ShortName" == name))
24327 {
24328 this.shortNameField = value;
24329 this.shortNameFieldSet = true;
24330 }
24331 if (("Target" == name))
24332 {
24333 this.targetField = value;
24334 this.targetFieldSet = true;
24335 }
24336 if (("Description" == name))
24337 {
24338 this.descriptionField = value;
24339 this.descriptionFieldSet = true;
24340 }
24341 if (("Arguments" == name))
24342 {
24343 this.argumentsField = value;
24344 this.argumentsFieldSet = true;
24345 }
24346 if (("Hotkey" == name))
24347 {
24348 this.hotkeyField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
24349 this.hotkeyFieldSet = true;
24350 }
24351 if (("Icon" == name))
24352 {
24353 this.iconField = value;
24354 this.iconFieldSet = true;
24355 }
24356 if (("IconIndex" == name))
24357 {
24358 this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
24359 this.iconIndexFieldSet = true;
24360 }
24361 if (("Show" == name))
24362 {
24363 this.showField = Shortcut.ParseShowType(value);
24364 this.showFieldSet = true;
24365 }
24366 if (("WorkingDirectory" == name))
24367 {
24368 this.workingDirectoryField = value;
24369 this.workingDirectoryFieldSet = true;
24370 }
24371 if (("Advertise" == name))
24372 {
24373 this.advertiseField = Enums.ParseYesNoType(value);
24374 this.advertiseFieldSet = true;
24375 }
24376 if (("DisplayResourceDll" == name))
24377 {
24378 this.displayResourceDllField = value;
24379 this.displayResourceDllFieldSet = true;
24380 }
24381 if (("DisplayResourceId" == name))
24382 {
24383 this.displayResourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
24384 this.displayResourceIdFieldSet = true;
24385 }
24386 if (("DescriptionResourceDll" == name))
24387 {
24388 this.descriptionResourceDllField = value;
24389 this.descriptionResourceDllFieldSet = true;
24390 }
24391 if (("DescriptionResourceId" == name))
24392 {
24393 this.descriptionResourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
24394 this.descriptionResourceIdFieldSet = true;
24395 }
24396 }
24397
24398 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
24399 public enum ShowType
24400 {
24401
24402 IllegalValue = int.MaxValue,
24403
24404 NotSet = -1,
24405
24406 /// <summary>
24407 /// The shortcut target will be displayed using the SW_SHOWNORMAL attribute.
24408 /// </summary>
24409 normal,
24410
24411 /// <summary>
24412 /// The shortcut target will be displayed using the SW_SHOWMINNOACTIVE attribute.
24413 /// </summary>
24414 minimized,
24415
24416 /// <summary>
24417 /// The shortcut target will be displayed using the SW_SHOWMAXIMIZED attribute.
24418 /// </summary>
24419 maximized,
24420 }
24421 }
24422
24423 /// <summary>
24424 /// Property values for a shortcut. This element's functionality is available starting with MSI 5.0.
24425 /// </summary>
24426 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
24427 public class ShortcutProperty : ISchemaElement, ISetAttributes
24428 {
24429
24430 private string idField;
24431
24432 private bool idFieldSet;
24433
24434 private string keyField;
24435
24436 private bool keyFieldSet;
24437
24438 private string valueField;
24439
24440 private bool valueFieldSet;
24441
24442 private ISchemaElement parentElement;
24443
24444 /// <summary>
24445 /// Unique identifier for MsiShortcutProperty table. If omitted, a stable identifier will be generated from the parent shortcut identifier and Key value.
24446 /// </summary>
24447 public string Id
24448 {
24449 get
24450 {
24451 return this.idField;
24452 }
24453 set
24454 {
24455 this.idFieldSet = true;
24456 this.idField = value;
24457 }
24458 }
24459
24460 /// <summary>
24461 /// A formatted string identifying the property to be set.
24462 /// </summary>
24463 public string Key
24464 {
24465 get
24466 {
24467 return this.keyField;
24468 }
24469 set
24470 {
24471 this.keyFieldSet = true;
24472 this.keyField = value;
24473 }
24474 }
24475
24476 /// <summary>
24477 /// A formatted string supplying the value of the property.
24478 /// </summary>
24479 public string Value
24480 {
24481 get
24482 {
24483 return this.valueField;
24484 }
24485 set
24486 {
24487 this.valueFieldSet = true;
24488 this.valueField = value;
24489 }
24490 }
24491
24492 public virtual ISchemaElement ParentElement
24493 {
24494 get
24495 {
24496 return this.parentElement;
24497 }
24498 set
24499 {
24500 this.parentElement = value;
24501 }
24502 }
24503
24504 /// <summary>
24505 /// Processes this element and all child elements into an XmlWriter.
24506 /// </summary>
24507 public virtual void OutputXml(XmlWriter writer)
24508 {
24509 if ((null == writer))
24510 {
24511 throw new ArgumentNullException("writer");
24512 }
24513 writer.WriteStartElement("ShortcutProperty", "http://wixtoolset.org/schemas/v4/wxs");
24514 if (this.idFieldSet)
24515 {
24516 writer.WriteAttributeString("Id", this.idField);
24517 }
24518 if (this.keyFieldSet)
24519 {
24520 writer.WriteAttributeString("Key", this.keyField);
24521 }
24522 if (this.valueFieldSet)
24523 {
24524 writer.WriteAttributeString("Value", this.valueField);
24525 }
24526 writer.WriteEndElement();
24527 }
24528
24529 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
24530 void ISetAttributes.SetAttribute(string name, string value)
24531 {
24532 if (String.IsNullOrEmpty(name))
24533 {
24534 throw new ArgumentNullException("name");
24535 }
24536 if (("Id" == name))
24537 {
24538 this.idField = value;
24539 this.idFieldSet = true;
24540 }
24541 if (("Key" == name))
24542 {
24543 this.keyField = value;
24544 this.keyFieldSet = true;
24545 }
24546 if (("Value" == name))
24547 {
24548 this.valueField = value;
24549 this.valueFieldSet = true;
24550 }
24551 }
24552 }
24553
24554 /// <summary>
24555 /// Sets ACLs on File, Registry, or CreateFolder. When under a Registry element, this cannot be used
24556 /// if the Action attribute's value is remove or removeKeyOnInstall. This element has no Id attribute.
24557 /// The table and key are taken from the parent element.
24558 /// </summary>
24559 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
24560 public class Permission : ISchemaElement, ISetAttributes
24561 {
24562
24563 private string domainField;
24564
24565 private bool domainFieldSet;
24566
24567 private string userField;
24568
24569 private bool userFieldSet;
24570
24571 private YesNoType readField;
24572
24573 private bool readFieldSet;
24574
24575 private YesNoType deleteField;
24576
24577 private bool deleteFieldSet;
24578
24579 private YesNoType readPermissionField;
24580
24581 private bool readPermissionFieldSet;
24582
24583 private YesNoType changePermissionField;
24584
24585 private bool changePermissionFieldSet;
24586
24587 private YesNoType takeOwnershipField;
24588
24589 private bool takeOwnershipFieldSet;
24590
24591 private YesNoType specificRightsAllField;
24592
24593 private bool specificRightsAllFieldSet;
24594
24595 private YesNoType readAttributesField;
24596
24597 private bool readAttributesFieldSet;
24598
24599 private YesNoType writeAttributesField;
24600
24601 private bool writeAttributesFieldSet;
24602
24603 private YesNoType readExtendedAttributesField;
24604
24605 private bool readExtendedAttributesFieldSet;
24606
24607 private YesNoType writeExtendedAttributesField;
24608
24609 private bool writeExtendedAttributesFieldSet;
24610
24611 private YesNoType synchronizeField;
24612
24613 private bool synchronizeFieldSet;
24614
24615 private YesNoType createFileField;
24616
24617 private bool createFileFieldSet;
24618
24619 private YesNoType createChildField;
24620
24621 private bool createChildFieldSet;
24622
24623 private YesNoType deleteChildField;
24624
24625 private bool deleteChildFieldSet;
24626
24627 private YesNoType traverseField;
24628
24629 private bool traverseFieldSet;
24630
24631 private YesNoType appendField;
24632
24633 private bool appendFieldSet;
24634
24635 private YesNoType executeField;
24636
24637 private bool executeFieldSet;
24638
24639 private YesNoType fileAllRightsField;
24640
24641 private bool fileAllRightsFieldSet;
24642
24643 private YesNoType writeField;
24644
24645 private bool writeFieldSet;
24646
24647 private YesNoType createSubkeysField;
24648
24649 private bool createSubkeysFieldSet;
24650
24651 private YesNoType enumerateSubkeysField;
24652
24653 private bool enumerateSubkeysFieldSet;
24654
24655 private YesNoType notifyField;
24656
24657 private bool notifyFieldSet;
24658
24659 private YesNoType createLinkField;
24660
24661 private bool createLinkFieldSet;
24662
24663 private YesNoType genericAllField;
24664
24665 private bool genericAllFieldSet;
24666
24667 private YesNoType genericExecuteField;
24668
24669 private bool genericExecuteFieldSet;
24670
24671 private YesNoType genericWriteField;
24672
24673 private bool genericWriteFieldSet;
24674
24675 private YesNoType genericReadField;
24676
24677 private bool genericReadFieldSet;
24678
24679 private ISchemaElement parentElement;
24680
24681 public string Domain
24682 {
24683 get
24684 {
24685 return this.domainField;
24686 }
24687 set
24688 {
24689 this.domainFieldSet = true;
24690 this.domainField = value;
24691 }
24692 }
24693
24694 public string User
24695 {
24696 get
24697 {
24698 return this.userField;
24699 }
24700 set
24701 {
24702 this.userFieldSet = true;
24703 this.userField = value;
24704 }
24705 }
24706
24707 public YesNoType Read
24708 {
24709 get
24710 {
24711 return this.readField;
24712 }
24713 set
24714 {
24715 this.readFieldSet = true;
24716 this.readField = value;
24717 }
24718 }
24719
24720 public YesNoType Delete
24721 {
24722 get
24723 {
24724 return this.deleteField;
24725 }
24726 set
24727 {
24728 this.deleteFieldSet = true;
24729 this.deleteField = value;
24730 }
24731 }
24732
24733 public YesNoType ReadPermission
24734 {
24735 get
24736 {
24737 return this.readPermissionField;
24738 }
24739 set
24740 {
24741 this.readPermissionFieldSet = true;
24742 this.readPermissionField = value;
24743 }
24744 }
24745
24746 public YesNoType ChangePermission
24747 {
24748 get
24749 {
24750 return this.changePermissionField;
24751 }
24752 set
24753 {
24754 this.changePermissionFieldSet = true;
24755 this.changePermissionField = value;
24756 }
24757 }
24758
24759 public YesNoType TakeOwnership
24760 {
24761 get
24762 {
24763 return this.takeOwnershipField;
24764 }
24765 set
24766 {
24767 this.takeOwnershipFieldSet = true;
24768 this.takeOwnershipField = value;
24769 }
24770 }
24771
24772 /// <summary>
24773 /// Bit mask for SPECIFIC_RIGHTS_ALL from WinNT.h (0x0000FFFF).
24774 /// </summary>
24775 public YesNoType SpecificRightsAll
24776 {
24777 get
24778 {
24779 return this.specificRightsAllField;
24780 }
24781 set
24782 {
24783 this.specificRightsAllFieldSet = true;
24784 this.specificRightsAllField = value;
24785 }
24786 }
24787
24788 public YesNoType ReadAttributes
24789 {
24790 get
24791 {
24792 return this.readAttributesField;
24793 }
24794 set
24795 {
24796 this.readAttributesFieldSet = true;
24797 this.readAttributesField = value;
24798 }
24799 }
24800
24801 public YesNoType WriteAttributes
24802 {
24803 get
24804 {
24805 return this.writeAttributesField;
24806 }
24807 set
24808 {
24809 this.writeAttributesFieldSet = true;
24810 this.writeAttributesField = value;
24811 }
24812 }
24813
24814 public YesNoType ReadExtendedAttributes
24815 {
24816 get
24817 {
24818 return this.readExtendedAttributesField;
24819 }
24820 set
24821 {
24822 this.readExtendedAttributesFieldSet = true;
24823 this.readExtendedAttributesField = value;
24824 }
24825 }
24826
24827 public YesNoType WriteExtendedAttributes
24828 {
24829 get
24830 {
24831 return this.writeExtendedAttributesField;
24832 }
24833 set
24834 {
24835 this.writeExtendedAttributesFieldSet = true;
24836 this.writeExtendedAttributesField = value;
24837 }
24838 }
24839
24840 public YesNoType Synchronize
24841 {
24842 get
24843 {
24844 return this.synchronizeField;
24845 }
24846 set
24847 {
24848 this.synchronizeFieldSet = true;
24849 this.synchronizeField = value;
24850 }
24851 }
24852
24853 /// <summary>
24854 /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent.
24855 /// </summary>
24856 public YesNoType CreateFile
24857 {
24858 get
24859 {
24860 return this.createFileField;
24861 }
24862 set
24863 {
24864 this.createFileFieldSet = true;
24865 this.createFileField = value;
24866 }
24867 }
24868
24869 /// <summary>
24870 /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent.
24871 /// </summary>
24872 public YesNoType CreateChild
24873 {
24874 get
24875 {
24876 return this.createChildField;
24877 }
24878 set
24879 {
24880 this.createChildFieldSet = true;
24881 this.createChildField = value;
24882 }
24883 }
24884
24885 /// <summary>
24886 /// For a directory, the right to delete a directory and all the files it contains, including read-only files. Only valid under a 'CreateFolder' parent.
24887 /// </summary>
24888 public YesNoType DeleteChild
24889 {
24890 get
24891 {
24892 return this.deleteChildField;
24893 }
24894 set
24895 {
24896 this.deleteChildFieldSet = true;
24897 this.deleteChildField = value;
24898 }
24899 }
24900
24901 /// <summary>
24902 /// For a directory, the right to traverse the directory. By default, users are assigned the BYPASS_TRAVERSE_CHECKING privilege, which ignores the FILE_TRAVERSE access right. Only valid under a 'CreateFolder' parent.
24903 /// </summary>
24904 public YesNoType Traverse
24905 {
24906 get
24907 {
24908 return this.traverseField;
24909 }
24910 set
24911 {
24912 this.traverseFieldSet = true;
24913 this.traverseField = value;
24914 }
24915 }
24916
24917 public YesNoType Append
24918 {
24919 get
24920 {
24921 return this.appendField;
24922 }
24923 set
24924 {
24925 this.appendFieldSet = true;
24926 this.appendField = value;
24927 }
24928 }
24929
24930 public YesNoType Execute
24931 {
24932 get
24933 {
24934 return this.executeField;
24935 }
24936 set
24937 {
24938 this.executeFieldSet = true;
24939 this.executeField = value;
24940 }
24941 }
24942
24943 /// <summary>
24944 /// Bit mask for FILE_ALL_ACCESS from WinNT.h (0x001F01FF).
24945 /// </summary>
24946 public YesNoType FileAllRights
24947 {
24948 get
24949 {
24950 return this.fileAllRightsField;
24951 }
24952 set
24953 {
24954 this.fileAllRightsFieldSet = true;
24955 this.fileAllRightsField = value;
24956 }
24957 }
24958
24959 public YesNoType Write
24960 {
24961 get
24962 {
24963 return this.writeField;
24964 }
24965 set
24966 {
24967 this.writeFieldSet = true;
24968 this.writeField = value;
24969 }
24970 }
24971
24972 public YesNoType CreateSubkeys
24973 {
24974 get
24975 {
24976 return this.createSubkeysField;
24977 }
24978 set
24979 {
24980 this.createSubkeysFieldSet = true;
24981 this.createSubkeysField = value;
24982 }
24983 }
24984
24985 public YesNoType EnumerateSubkeys
24986 {
24987 get
24988 {
24989 return this.enumerateSubkeysField;
24990 }
24991 set
24992 {
24993 this.enumerateSubkeysFieldSet = true;
24994 this.enumerateSubkeysField = value;
24995 }
24996 }
24997
24998 public YesNoType Notify
24999 {
25000 get
25001 {
25002 return this.notifyField;
25003 }
25004 set
25005 {
25006 this.notifyFieldSet = true;
25007 this.notifyField = value;
25008 }
25009 }
25010
25011 public YesNoType CreateLink
25012 {
25013 get
25014 {
25015 return this.createLinkField;
25016 }
25017 set
25018 {
25019 this.createLinkFieldSet = true;
25020 this.createLinkField = value;
25021 }
25022 }
25023
25024 public YesNoType GenericAll
25025 {
25026 get
25027 {
25028 return this.genericAllField;
25029 }
25030 set
25031 {
25032 this.genericAllFieldSet = true;
25033 this.genericAllField = value;
25034 }
25035 }
25036
25037 public YesNoType GenericExecute
25038 {
25039 get
25040 {
25041 return this.genericExecuteField;
25042 }
25043 set
25044 {
25045 this.genericExecuteFieldSet = true;
25046 this.genericExecuteField = value;
25047 }
25048 }
25049
25050 public YesNoType GenericWrite
25051 {
25052 get
25053 {
25054 return this.genericWriteField;
25055 }
25056 set
25057 {
25058 this.genericWriteFieldSet = true;
25059 this.genericWriteField = value;
25060 }
25061 }
25062
25063 /// <summary>
25064 /// specifying this will fail to grant read access
25065 /// </summary>
25066 public YesNoType GenericRead
25067 {
25068 get
25069 {
25070 return this.genericReadField;
25071 }
25072 set
25073 {
25074 this.genericReadFieldSet = true;
25075 this.genericReadField = value;
25076 }
25077 }
25078
25079 public virtual ISchemaElement ParentElement
25080 {
25081 get
25082 {
25083 return this.parentElement;
25084 }
25085 set
25086 {
25087 this.parentElement = value;
25088 }
25089 }
25090
25091 /// <summary>
25092 /// Processes this element and all child elements into an XmlWriter.
25093 /// </summary>
25094 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
25095 public virtual void OutputXml(XmlWriter writer)
25096 {
25097 if ((null == writer))
25098 {
25099 throw new ArgumentNullException("writer");
25100 }
25101 writer.WriteStartElement("Permission", "http://wixtoolset.org/schemas/v4/wxs");
25102 if (this.domainFieldSet)
25103 {
25104 writer.WriteAttributeString("Domain", this.domainField);
25105 }
25106 if (this.userFieldSet)
25107 {
25108 writer.WriteAttributeString("User", this.userField);
25109 }
25110 if (this.readFieldSet)
25111 {
25112 if ((this.readField == YesNoType.no))
25113 {
25114 writer.WriteAttributeString("Read", "no");
25115 }
25116 if ((this.readField == YesNoType.yes))
25117 {
25118 writer.WriteAttributeString("Read", "yes");
25119 }
25120 }
25121 if (this.deleteFieldSet)
25122 {
25123 if ((this.deleteField == YesNoType.no))
25124 {
25125 writer.WriteAttributeString("Delete", "no");
25126 }
25127 if ((this.deleteField == YesNoType.yes))
25128 {
25129 writer.WriteAttributeString("Delete", "yes");
25130 }
25131 }
25132 if (this.readPermissionFieldSet)
25133 {
25134 if ((this.readPermissionField == YesNoType.no))
25135 {
25136 writer.WriteAttributeString("ReadPermission", "no");
25137 }
25138 if ((this.readPermissionField == YesNoType.yes))
25139 {
25140 writer.WriteAttributeString("ReadPermission", "yes");
25141 }
25142 }
25143 if (this.changePermissionFieldSet)
25144 {
25145 if ((this.changePermissionField == YesNoType.no))
25146 {
25147 writer.WriteAttributeString("ChangePermission", "no");
25148 }
25149 if ((this.changePermissionField == YesNoType.yes))
25150 {
25151 writer.WriteAttributeString("ChangePermission", "yes");
25152 }
25153 }
25154 if (this.takeOwnershipFieldSet)
25155 {
25156 if ((this.takeOwnershipField == YesNoType.no))
25157 {
25158 writer.WriteAttributeString("TakeOwnership", "no");
25159 }
25160 if ((this.takeOwnershipField == YesNoType.yes))
25161 {
25162 writer.WriteAttributeString("TakeOwnership", "yes");
25163 }
25164 }
25165 if (this.specificRightsAllFieldSet)
25166 {
25167 if ((this.specificRightsAllField == YesNoType.no))
25168 {
25169 writer.WriteAttributeString("SpecificRightsAll", "no");
25170 }
25171 if ((this.specificRightsAllField == YesNoType.yes))
25172 {
25173 writer.WriteAttributeString("SpecificRightsAll", "yes");
25174 }
25175 }
25176 if (this.readAttributesFieldSet)
25177 {
25178 if ((this.readAttributesField == YesNoType.no))
25179 {
25180 writer.WriteAttributeString("ReadAttributes", "no");
25181 }
25182 if ((this.readAttributesField == YesNoType.yes))
25183 {
25184 writer.WriteAttributeString("ReadAttributes", "yes");
25185 }
25186 }
25187 if (this.writeAttributesFieldSet)
25188 {
25189 if ((this.writeAttributesField == YesNoType.no))
25190 {
25191 writer.WriteAttributeString("WriteAttributes", "no");
25192 }
25193 if ((this.writeAttributesField == YesNoType.yes))
25194 {
25195 writer.WriteAttributeString("WriteAttributes", "yes");
25196 }
25197 }
25198 if (this.readExtendedAttributesFieldSet)
25199 {
25200 if ((this.readExtendedAttributesField == YesNoType.no))
25201 {
25202 writer.WriteAttributeString("ReadExtendedAttributes", "no");
25203 }
25204 if ((this.readExtendedAttributesField == YesNoType.yes))
25205 {
25206 writer.WriteAttributeString("ReadExtendedAttributes", "yes");
25207 }
25208 }
25209 if (this.writeExtendedAttributesFieldSet)
25210 {
25211 if ((this.writeExtendedAttributesField == YesNoType.no))
25212 {
25213 writer.WriteAttributeString("WriteExtendedAttributes", "no");
25214 }
25215 if ((this.writeExtendedAttributesField == YesNoType.yes))
25216 {
25217 writer.WriteAttributeString("WriteExtendedAttributes", "yes");
25218 }
25219 }
25220 if (this.synchronizeFieldSet)
25221 {
25222 if ((this.synchronizeField == YesNoType.no))
25223 {
25224 writer.WriteAttributeString("Synchronize", "no");
25225 }
25226 if ((this.synchronizeField == YesNoType.yes))
25227 {
25228 writer.WriteAttributeString("Synchronize", "yes");
25229 }
25230 }
25231 if (this.createFileFieldSet)
25232 {
25233 if ((this.createFileField == YesNoType.no))
25234 {
25235 writer.WriteAttributeString("CreateFile", "no");
25236 }
25237 if ((this.createFileField == YesNoType.yes))
25238 {
25239 writer.WriteAttributeString("CreateFile", "yes");
25240 }
25241 }
25242 if (this.createChildFieldSet)
25243 {
25244 if ((this.createChildField == YesNoType.no))
25245 {
25246 writer.WriteAttributeString("CreateChild", "no");
25247 }
25248 if ((this.createChildField == YesNoType.yes))
25249 {
25250 writer.WriteAttributeString("CreateChild", "yes");
25251 }
25252 }
25253 if (this.deleteChildFieldSet)
25254 {
25255 if ((this.deleteChildField == YesNoType.no))
25256 {
25257 writer.WriteAttributeString("DeleteChild", "no");
25258 }
25259 if ((this.deleteChildField == YesNoType.yes))
25260 {
25261 writer.WriteAttributeString("DeleteChild", "yes");
25262 }
25263 }
25264 if (this.traverseFieldSet)
25265 {
25266 if ((this.traverseField == YesNoType.no))
25267 {
25268 writer.WriteAttributeString("Traverse", "no");
25269 }
25270 if ((this.traverseField == YesNoType.yes))
25271 {
25272 writer.WriteAttributeString("Traverse", "yes");
25273 }
25274 }
25275 if (this.appendFieldSet)
25276 {
25277 if ((this.appendField == YesNoType.no))
25278 {
25279 writer.WriteAttributeString("Append", "no");
25280 }
25281 if ((this.appendField == YesNoType.yes))
25282 {
25283 writer.WriteAttributeString("Append", "yes");
25284 }
25285 }
25286 if (this.executeFieldSet)
25287 {
25288 if ((this.executeField == YesNoType.no))
25289 {
25290 writer.WriteAttributeString("Execute", "no");
25291 }
25292 if ((this.executeField == YesNoType.yes))
25293 {
25294 writer.WriteAttributeString("Execute", "yes");
25295 }
25296 }
25297 if (this.fileAllRightsFieldSet)
25298 {
25299 if ((this.fileAllRightsField == YesNoType.no))
25300 {
25301 writer.WriteAttributeString("FileAllRights", "no");
25302 }
25303 if ((this.fileAllRightsField == YesNoType.yes))
25304 {
25305 writer.WriteAttributeString("FileAllRights", "yes");
25306 }
25307 }
25308 if (this.writeFieldSet)
25309 {
25310 if ((this.writeField == YesNoType.no))
25311 {
25312 writer.WriteAttributeString("Write", "no");
25313 }
25314 if ((this.writeField == YesNoType.yes))
25315 {
25316 writer.WriteAttributeString("Write", "yes");
25317 }
25318 }
25319 if (this.createSubkeysFieldSet)
25320 {
25321 if ((this.createSubkeysField == YesNoType.no))
25322 {
25323 writer.WriteAttributeString("CreateSubkeys", "no");
25324 }
25325 if ((this.createSubkeysField == YesNoType.yes))
25326 {
25327 writer.WriteAttributeString("CreateSubkeys", "yes");
25328 }
25329 }
25330 if (this.enumerateSubkeysFieldSet)
25331 {
25332 if ((this.enumerateSubkeysField == YesNoType.no))
25333 {
25334 writer.WriteAttributeString("EnumerateSubkeys", "no");
25335 }
25336 if ((this.enumerateSubkeysField == YesNoType.yes))
25337 {
25338 writer.WriteAttributeString("EnumerateSubkeys", "yes");
25339 }
25340 }
25341 if (this.notifyFieldSet)
25342 {
25343 if ((this.notifyField == YesNoType.no))
25344 {
25345 writer.WriteAttributeString("Notify", "no");
25346 }
25347 if ((this.notifyField == YesNoType.yes))
25348 {
25349 writer.WriteAttributeString("Notify", "yes");
25350 }
25351 }
25352 if (this.createLinkFieldSet)
25353 {
25354 if ((this.createLinkField == YesNoType.no))
25355 {
25356 writer.WriteAttributeString("CreateLink", "no");
25357 }
25358 if ((this.createLinkField == YesNoType.yes))
25359 {
25360 writer.WriteAttributeString("CreateLink", "yes");
25361 }
25362 }
25363 if (this.genericAllFieldSet)
25364 {
25365 if ((this.genericAllField == YesNoType.no))
25366 {
25367 writer.WriteAttributeString("GenericAll", "no");
25368 }
25369 if ((this.genericAllField == YesNoType.yes))
25370 {
25371 writer.WriteAttributeString("GenericAll", "yes");
25372 }
25373 }
25374 if (this.genericExecuteFieldSet)
25375 {
25376 if ((this.genericExecuteField == YesNoType.no))
25377 {
25378 writer.WriteAttributeString("GenericExecute", "no");
25379 }
25380 if ((this.genericExecuteField == YesNoType.yes))
25381 {
25382 writer.WriteAttributeString("GenericExecute", "yes");
25383 }
25384 }
25385 if (this.genericWriteFieldSet)
25386 {
25387 if ((this.genericWriteField == YesNoType.no))
25388 {
25389 writer.WriteAttributeString("GenericWrite", "no");
25390 }
25391 if ((this.genericWriteField == YesNoType.yes))
25392 {
25393 writer.WriteAttributeString("GenericWrite", "yes");
25394 }
25395 }
25396 if (this.genericReadFieldSet)
25397 {
25398 if ((this.genericReadField == YesNoType.no))
25399 {
25400 writer.WriteAttributeString("GenericRead", "no");
25401 }
25402 if ((this.genericReadField == YesNoType.yes))
25403 {
25404 writer.WriteAttributeString("GenericRead", "yes");
25405 }
25406 }
25407 writer.WriteEndElement();
25408 }
25409
25410 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
25411 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
25412 void ISetAttributes.SetAttribute(string name, string value)
25413 {
25414 if (String.IsNullOrEmpty(name))
25415 {
25416 throw new ArgumentNullException("name");
25417 }
25418 if (("Domain" == name))
25419 {
25420 this.domainField = value;
25421 this.domainFieldSet = true;
25422 }
25423 if (("User" == name))
25424 {
25425 this.userField = value;
25426 this.userFieldSet = true;
25427 }
25428 if (("Read" == name))
25429 {
25430 this.readField = Enums.ParseYesNoType(value);
25431 this.readFieldSet = true;
25432 }
25433 if (("Delete" == name))
25434 {
25435 this.deleteField = Enums.ParseYesNoType(value);
25436 this.deleteFieldSet = true;
25437 }
25438 if (("ReadPermission" == name))
25439 {
25440 this.readPermissionField = Enums.ParseYesNoType(value);
25441 this.readPermissionFieldSet = true;
25442 }
25443 if (("ChangePermission" == name))
25444 {
25445 this.changePermissionField = Enums.ParseYesNoType(value);
25446 this.changePermissionFieldSet = true;
25447 }
25448 if (("TakeOwnership" == name))
25449 {
25450 this.takeOwnershipField = Enums.ParseYesNoType(value);
25451 this.takeOwnershipFieldSet = true;
25452 }
25453 if (("SpecificRightsAll" == name))
25454 {
25455 this.specificRightsAllField = Enums.ParseYesNoType(value);
25456 this.specificRightsAllFieldSet = true;
25457 }
25458 if (("ReadAttributes" == name))
25459 {
25460 this.readAttributesField = Enums.ParseYesNoType(value);
25461 this.readAttributesFieldSet = true;
25462 }
25463 if (("WriteAttributes" == name))
25464 {
25465 this.writeAttributesField = Enums.ParseYesNoType(value);
25466 this.writeAttributesFieldSet = true;
25467 }
25468 if (("ReadExtendedAttributes" == name))
25469 {
25470 this.readExtendedAttributesField = Enums.ParseYesNoType(value);
25471 this.readExtendedAttributesFieldSet = true;
25472 }
25473 if (("WriteExtendedAttributes" == name))
25474 {
25475 this.writeExtendedAttributesField = Enums.ParseYesNoType(value);
25476 this.writeExtendedAttributesFieldSet = true;
25477 }
25478 if (("Synchronize" == name))
25479 {
25480 this.synchronizeField = Enums.ParseYesNoType(value);
25481 this.synchronizeFieldSet = true;
25482 }
25483 if (("CreateFile" == name))
25484 {
25485 this.createFileField = Enums.ParseYesNoType(value);
25486 this.createFileFieldSet = true;
25487 }
25488 if (("CreateChild" == name))
25489 {
25490 this.createChildField = Enums.ParseYesNoType(value);
25491 this.createChildFieldSet = true;
25492 }
25493 if (("DeleteChild" == name))
25494 {
25495 this.deleteChildField = Enums.ParseYesNoType(value);
25496 this.deleteChildFieldSet = true;
25497 }
25498 if (("Traverse" == name))
25499 {
25500 this.traverseField = Enums.ParseYesNoType(value);
25501 this.traverseFieldSet = true;
25502 }
25503 if (("Append" == name))
25504 {
25505 this.appendField = Enums.ParseYesNoType(value);
25506 this.appendFieldSet = true;
25507 }
25508 if (("Execute" == name))
25509 {
25510 this.executeField = Enums.ParseYesNoType(value);
25511 this.executeFieldSet = true;
25512 }
25513 if (("FileAllRights" == name))
25514 {
25515 this.fileAllRightsField = Enums.ParseYesNoType(value);
25516 this.fileAllRightsFieldSet = true;
25517 }
25518 if (("Write" == name))
25519 {
25520 this.writeField = Enums.ParseYesNoType(value);
25521 this.writeFieldSet = true;
25522 }
25523 if (("CreateSubkeys" == name))
25524 {
25525 this.createSubkeysField = Enums.ParseYesNoType(value);
25526 this.createSubkeysFieldSet = true;
25527 }
25528 if (("EnumerateSubkeys" == name))
25529 {
25530 this.enumerateSubkeysField = Enums.ParseYesNoType(value);
25531 this.enumerateSubkeysFieldSet = true;
25532 }
25533 if (("Notify" == name))
25534 {
25535 this.notifyField = Enums.ParseYesNoType(value);
25536 this.notifyFieldSet = true;
25537 }
25538 if (("CreateLink" == name))
25539 {
25540 this.createLinkField = Enums.ParseYesNoType(value);
25541 this.createLinkFieldSet = true;
25542 }
25543 if (("GenericAll" == name))
25544 {
25545 this.genericAllField = Enums.ParseYesNoType(value);
25546 this.genericAllFieldSet = true;
25547 }
25548 if (("GenericExecute" == name))
25549 {
25550 this.genericExecuteField = Enums.ParseYesNoType(value);
25551 this.genericExecuteFieldSet = true;
25552 }
25553 if (("GenericWrite" == name))
25554 {
25555 this.genericWriteField = Enums.ParseYesNoType(value);
25556 this.genericWriteFieldSet = true;
25557 }
25558 if (("GenericRead" == name))
25559 {
25560 this.genericReadField = Enums.ParseYesNoType(value);
25561 this.genericReadFieldSet = true;
25562 }
25563 }
25564 }
25565
25566 /// <summary>
25567 /// Sets ACLs on File, Registry, or CreateFolder. When under a Registry element, this cannot be used
25568 /// if the Action attribute's value is remove or removeKeyOnInstall. This element is only available
25569 /// when installing with MSI 5.0. For downlevel support, see the PermissionEx element from the
25570 /// WixUtilExtension.
25571 /// </summary>
25572 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
25573 public class PermissionEx : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
25574 {
25575
25576 private ElementCollection children;
25577
25578 private string idField;
25579
25580 private bool idFieldSet;
25581
25582 private string sddlField;
25583
25584 private bool sddlFieldSet;
25585
25586 private ISchemaElement parentElement;
25587
25588 public PermissionEx()
25589 {
25590 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
25591 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Condition)));
25592 this.children = childCollection0;
25593 }
25594
25595 public virtual IEnumerable Children
25596 {
25597 get
25598 {
25599 return this.children;
25600 }
25601 }
25602
25603 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
25604 public virtual IEnumerable this[System.Type childType]
25605 {
25606 get
25607 {
25608 return this.children.Filter(childType);
25609 }
25610 }
25611
25612 /// <summary>
25613 /// Primary key used to identify this particular entry. If this is not specified the parent element's Id attribute
25614 /// will be used instead.
25615 /// </summary>
25616 public string Id
25617 {
25618 get
25619 {
25620 return this.idField;
25621 }
25622 set
25623 {
25624 this.idFieldSet = true;
25625 this.idField = value;
25626 }
25627 }
25628
25629 /// <summary>
25630 /// Security descriptor to apply to parent object.
25631 /// </summary>
25632 public string Sddl
25633 {
25634 get
25635 {
25636 return this.sddlField;
25637 }
25638 set
25639 {
25640 this.sddlFieldSet = true;
25641 this.sddlField = value;
25642 }
25643 }
25644
25645 public virtual ISchemaElement ParentElement
25646 {
25647 get
25648 {
25649 return this.parentElement;
25650 }
25651 set
25652 {
25653 this.parentElement = value;
25654 }
25655 }
25656
25657 public virtual void AddChild(ISchemaElement child)
25658 {
25659 if ((null == child))
25660 {
25661 throw new ArgumentNullException("child");
25662 }
25663 this.children.AddElement(child);
25664 child.ParentElement = this;
25665 }
25666
25667 public virtual void RemoveChild(ISchemaElement child)
25668 {
25669 if ((null == child))
25670 {
25671 throw new ArgumentNullException("child");
25672 }
25673 this.children.RemoveElement(child);
25674 child.ParentElement = null;
25675 }
25676
25677 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
25678 ISchemaElement ICreateChildren.CreateChild(string childName)
25679 {
25680 if (String.IsNullOrEmpty(childName))
25681 {
25682 throw new ArgumentNullException("childName");
25683 }
25684 ISchemaElement childValue = null;
25685 if (("Condition" == childName))
25686 {
25687 childValue = new Condition();
25688 }
25689 if ((null == childValue))
25690 {
25691 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
25692 }
25693 return childValue;
25694 }
25695
25696 /// <summary>
25697 /// Processes this element and all child elements into an XmlWriter.
25698 /// </summary>
25699 public virtual void OutputXml(XmlWriter writer)
25700 {
25701 if ((null == writer))
25702 {
25703 throw new ArgumentNullException("writer");
25704 }
25705 writer.WriteStartElement("PermissionEx", "http://wixtoolset.org/schemas/v4/wxs");
25706 if (this.idFieldSet)
25707 {
25708 writer.WriteAttributeString("Id", this.idField);
25709 }
25710 if (this.sddlFieldSet)
25711 {
25712 writer.WriteAttributeString("Sddl", this.sddlField);
25713 }
25714 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
25715 {
25716 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
25717 childElement.OutputXml(writer);
25718 }
25719 writer.WriteEndElement();
25720 }
25721
25722 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
25723 void ISetAttributes.SetAttribute(string name, string value)
25724 {
25725 if (String.IsNullOrEmpty(name))
25726 {
25727 throw new ArgumentNullException("name");
25728 }
25729 if (("Id" == name))
25730 {
25731 this.idField = value;
25732 this.idFieldSet = true;
25733 }
25734 if (("Sddl" == name))
25735 {
25736 this.sddlField = value;
25737 this.sddlFieldSet = true;
25738 }
25739 }
25740 }
25741
25742 /// <summary>
25743 /// Copy or move an existing file on the target machine, or copy a file that is being installed, to another destination. When
25744 /// this element is nested under a File element, the parent file will be installed, then copied to the specified destination
25745 /// if the parent component of the file is selected for installation or removal. When this element is nested under
25746 /// a Component element and no FileId attribute is specified, the file to copy or move must already be on the target machine.
25747 /// When this element is nested under a Component element and the FileId attribute is specified, the specified file is installed,
25748 /// then copied to the specified destination if the parent component is selected for installation or removal (use
25749 /// this option to control the copy of a file in a different component by the parent component's installation state). If the
25750 /// specified destination directory is the same as the directory containing the original file and the name for the proposed source
25751 /// file is the same as the original, then no action takes place.
25752 /// </summary>
25753 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
25754 public class CopyFile : ISchemaElement, ISetAttributes
25755 {
25756
25757 private string idField;
25758
25759 private bool idFieldSet;
25760
25761 private string fileIdField;
25762
25763 private bool fileIdFieldSet;
25764
25765 private string sourceDirectoryField;
25766
25767 private bool sourceDirectoryFieldSet;
25768
25769 private string sourcePropertyField;
25770
25771 private bool sourcePropertyFieldSet;
25772
25773 private string sourceNameField;
25774
25775 private bool sourceNameFieldSet;
25776
25777 private string destinationDirectoryField;
25778
25779 private bool destinationDirectoryFieldSet;
25780
25781 private string destinationPropertyField;
25782
25783 private bool destinationPropertyFieldSet;
25784
25785 private string destinationNameField;
25786
25787 private bool destinationNameFieldSet;
25788
25789 private string destinationShortNameField;
25790
25791 private bool destinationShortNameFieldSet;
25792
25793 private YesNoType deleteField;
25794
25795 private bool deleteFieldSet;
25796
25797 private ISchemaElement parentElement;
25798
25799 /// <summary>
25800 /// Primary key used to identify this particular entry.
25801 /// </summary>
25802 public string Id
25803 {
25804 get
25805 {
25806 return this.idField;
25807 }
25808 set
25809 {
25810 this.idFieldSet = true;
25811 this.idField = value;
25812 }
25813 }
25814
25815 /// <summary>
25816 /// This attribute cannot be specified if the element is nested under a File element. Set this attribute's value to the identifier
25817 /// of a file from a different component to copy it based on the install state of the parent component.
25818 /// </summary>
25819 public string FileId
25820 {
25821 get
25822 {
25823 return this.fileIdField;
25824 }
25825 set
25826 {
25827 this.fileIdFieldSet = true;
25828 this.fileIdField = value;
25829 }
25830 }
25831
25832 /// <summary>
25833 /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set
25834 /// this value to the source directory from which to copy or move an existing file on the target machine. This Directory must
25835 /// exist in the installer database at creation time. This attribute cannot be specified in conjunction with SourceProperty.
25836 /// </summary>
25837 public string SourceDirectory
25838 {
25839 get
25840 {
25841 return this.sourceDirectoryField;
25842 }
25843 set
25844 {
25845 this.sourceDirectoryFieldSet = true;
25846 this.sourceDirectoryField = value;
25847 }
25848 }
25849
25850 /// <summary>
25851 /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set
25852 /// this value to a property that will have a value that resolves to the full path of the source directory (or full path
25853 /// including file name if SourceName is not specified). The property does not have to exist in the installer database at
25854 /// creation time; it could be created at installation time by a custom action, on the command line, etc. This attribute
25855 /// cannot be specified in conjunction with SourceDirectory.
25856 /// </summary>
25857 public string SourceProperty
25858 {
25859 get
25860 {
25861 return this.sourcePropertyField;
25862 }
25863 set
25864 {
25865 this.sourcePropertyFieldSet = true;
25866 this.sourcePropertyField = value;
25867 }
25868 }
25869
25870 /// <summary>
25871 /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set
25872 /// this value to the localizable name of the file(s) to be copied or moved. All of the files that
25873 /// match the wild card will be removed from the specified directory. The value is a filename that may also
25874 /// contain the wild card characters "?" for any single character or "*" for zero or more occurrences of any character. If this
25875 /// attribute is not specified (and this element is not nested under a File element or specify a FileId attribute) then the
25876 /// SourceProperty attribute should be set to the name of a property that will resolve to the full path of the source filename.
25877 /// If the value of this attribute contains a "*" wildcard and the DestinationName attribute is specified, all moved or copied
25878 /// files retain the file names from their sources.
25879 /// </summary>
25880 public string SourceName
25881 {
25882 get
25883 {
25884 return this.sourceNameField;
25885 }
25886 set
25887 {
25888 this.sourceNameFieldSet = true;
25889 this.sourceNameField = value;
25890 }
25891 }
25892
25893 /// <summary>
25894 /// Set this value to the destination directory where an existing file on the target machine should be moved or copied to. This
25895 /// Directory must exist in the installer database at creation time. This attribute cannot be specified in conjunction with
25896 /// DestinationProperty.
25897 /// </summary>
25898 public string DestinationDirectory
25899 {
25900 get
25901 {
25902 return this.destinationDirectoryField;
25903 }
25904 set
25905 {
25906 this.destinationDirectoryFieldSet = true;
25907 this.destinationDirectoryField = value;
25908 }
25909 }
25910
25911 /// <summary>
25912 /// Set this value to a property that will have a value that resolves to the full path of the destination directory. The property
25913 /// does not have to exist in the installer database at creation time; it could be created at installation time by a custom
25914 /// action, on the command line, etc. This attribute cannot be specified in conjunction with DestinationDirectory.
25915 /// </summary>
25916 public string DestinationProperty
25917 {
25918 get
25919 {
25920 return this.destinationPropertyField;
25921 }
25922 set
25923 {
25924 this.destinationPropertyFieldSet = true;
25925 this.destinationPropertyField = value;
25926 }
25927 }
25928
25929 /// <summary>
25930 /// In prior versions of the WiX toolset, this attribute specified the short file name.
25931 /// Now set this value to the localizable name to be given to the original file after it is moved or copied.
25932 /// If this attribute is not specified, then the destination file is given the same name as the source file.
25933 /// If a short file name is specified, the DestinationShortName attribute may not be specified.
25934 /// Also, if this value is a long file name, the DestinationShortName attribute may be omitted to
25935 /// allow WiX to attempt to generate a unique short file name.
25936 /// However, if this name collides with another file or you wish to manually specify
25937 /// the short file name, then the DestinationShortName attribute may be specified.
25938 /// </summary>
25939 public string DestinationName
25940 {
25941 get
25942 {
25943 return this.destinationNameField;
25944 }
25945 set
25946 {
25947 this.destinationNameFieldSet = true;
25948 this.destinationNameField = value;
25949 }
25950 }
25951
25952 /// <summary>
25953 /// The short file name of the file in 8.3 format.
25954 /// This attribute should only be set if there is a conflict between generated short file names
25955 /// or you wish to manually specify the short file name.
25956 /// </summary>
25957 public string DestinationShortName
25958 {
25959 get
25960 {
25961 return this.destinationShortNameField;
25962 }
25963 set
25964 {
25965 this.destinationShortNameFieldSet = true;
25966 this.destinationShortNameField = value;
25967 }
25968 }
25969
25970 /// <summary>
25971 /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. In other
25972 /// cases, if the attribute is not specified, the default value is "no" and the file is copied, not moved. Set the value to "yes"
25973 /// in order to move the file (thus deleting the source file) instead of copying it.
25974 /// </summary>
25975 public YesNoType Delete
25976 {
25977 get
25978 {
25979 return this.deleteField;
25980 }
25981 set
25982 {
25983 this.deleteFieldSet = true;
25984 this.deleteField = value;
25985 }
25986 }
25987
25988 public virtual ISchemaElement ParentElement
25989 {
25990 get
25991 {
25992 return this.parentElement;
25993 }
25994 set
25995 {
25996 this.parentElement = value;
25997 }
25998 }
25999
26000 /// <summary>
26001 /// Processes this element and all child elements into an XmlWriter.
26002 /// </summary>
26003 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
26004 public virtual void OutputXml(XmlWriter writer)
26005 {
26006 if ((null == writer))
26007 {
26008 throw new ArgumentNullException("writer");
26009 }
26010 writer.WriteStartElement("CopyFile", "http://wixtoolset.org/schemas/v4/wxs");
26011 if (this.idFieldSet)
26012 {
26013 writer.WriteAttributeString("Id", this.idField);
26014 }
26015 if (this.fileIdFieldSet)
26016 {
26017 writer.WriteAttributeString("FileId", this.fileIdField);
26018 }
26019 if (this.sourceDirectoryFieldSet)
26020 {
26021 writer.WriteAttributeString("SourceDirectory", this.sourceDirectoryField);
26022 }
26023 if (this.sourcePropertyFieldSet)
26024 {
26025 writer.WriteAttributeString("SourceProperty", this.sourcePropertyField);
26026 }
26027 if (this.sourceNameFieldSet)
26028 {
26029 writer.WriteAttributeString("SourceName", this.sourceNameField);
26030 }
26031 if (this.destinationDirectoryFieldSet)
26032 {
26033 writer.WriteAttributeString("DestinationDirectory", this.destinationDirectoryField);
26034 }
26035 if (this.destinationPropertyFieldSet)
26036 {
26037 writer.WriteAttributeString("DestinationProperty", this.destinationPropertyField);
26038 }
26039 if (this.destinationNameFieldSet)
26040 {
26041 writer.WriteAttributeString("DestinationName", this.destinationNameField);
26042 }
26043 if (this.destinationShortNameFieldSet)
26044 {
26045 writer.WriteAttributeString("DestinationShortName", this.destinationShortNameField);
26046 }
26047 if (this.deleteFieldSet)
26048 {
26049 if ((this.deleteField == YesNoType.no))
26050 {
26051 writer.WriteAttributeString("Delete", "no");
26052 }
26053 if ((this.deleteField == YesNoType.yes))
26054 {
26055 writer.WriteAttributeString("Delete", "yes");
26056 }
26057 }
26058 writer.WriteEndElement();
26059 }
26060
26061 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
26062 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
26063 void ISetAttributes.SetAttribute(string name, string value)
26064 {
26065 if (String.IsNullOrEmpty(name))
26066 {
26067 throw new ArgumentNullException("name");
26068 }
26069 if (("Id" == name))
26070 {
26071 this.idField = value;
26072 this.idFieldSet = true;
26073 }
26074 if (("FileId" == name))
26075 {
26076 this.fileIdField = value;
26077 this.fileIdFieldSet = true;
26078 }
26079 if (("SourceDirectory" == name))
26080 {
26081 this.sourceDirectoryField = value;
26082 this.sourceDirectoryFieldSet = true;
26083 }
26084 if (("SourceProperty" == name))
26085 {
26086 this.sourcePropertyField = value;
26087 this.sourcePropertyFieldSet = true;
26088 }
26089 if (("SourceName" == name))
26090 {
26091 this.sourceNameField = value;
26092 this.sourceNameFieldSet = true;
26093 }
26094 if (("DestinationDirectory" == name))
26095 {
26096 this.destinationDirectoryField = value;
26097 this.destinationDirectoryFieldSet = true;
26098 }
26099 if (("DestinationProperty" == name))
26100 {
26101 this.destinationPropertyField = value;
26102 this.destinationPropertyFieldSet = true;
26103 }
26104 if (("DestinationName" == name))
26105 {
26106 this.destinationNameField = value;
26107 this.destinationNameFieldSet = true;
26108 }
26109 if (("DestinationShortName" == name))
26110 {
26111 this.destinationShortNameField = value;
26112 this.destinationShortNameFieldSet = true;
26113 }
26114 if (("Delete" == name))
26115 {
26116 this.deleteField = Enums.ParseYesNoType(value);
26117 this.deleteFieldSet = true;
26118 }
26119 }
26120 }
26121
26122 /// <summary>
26123 /// File specification for File table, must be child node of Component.
26124 /// </summary>
26125 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
26126 public class File : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
26127 {
26128
26129 private ElementCollection children;
26130
26131 private string idField;
26132
26133 private bool idFieldSet;
26134
26135 private string companionFileField;
26136
26137 private bool companionFileFieldSet;
26138
26139 private string nameField;
26140
26141 private bool nameFieldSet;
26142
26143 private YesNoType keyPathField;
26144
26145 private bool keyPathFieldSet;
26146
26147 private string shortNameField;
26148
26149 private bool shortNameFieldSet;
26150
26151 private YesNoType readOnlyField;
26152
26153 private bool readOnlyFieldSet;
26154
26155 private YesNoType hiddenField;
26156
26157 private bool hiddenFieldSet;
26158
26159 private YesNoType systemField;
26160
26161 private bool systemFieldSet;
26162
26163 private YesNoType vitalField;
26164
26165 private bool vitalFieldSet;
26166
26167 private YesNoType checksumField;
26168
26169 private bool checksumFieldSet;
26170
26171 private YesNoDefaultType compressedField;
26172
26173 private bool compressedFieldSet;
26174
26175 private string bindPathField;
26176
26177 private bool bindPathFieldSet;
26178
26179 private int selfRegCostField;
26180
26181 private bool selfRegCostFieldSet;
26182
26183 private YesNoType trueTypeField;
26184
26185 private bool trueTypeFieldSet;
26186
26187 private string fontTitleField;
26188
26189 private bool fontTitleFieldSet;
26190
26191 private string defaultLanguageField;
26192
26193 private bool defaultLanguageFieldSet;
26194
26195 private int defaultSizeField;
26196
26197 private bool defaultSizeFieldSet;
26198
26199 private string defaultVersionField;
26200
26201 private bool defaultVersionFieldSet;
26202
26203 private AssemblyType assemblyField;
26204
26205 private bool assemblyFieldSet;
26206
26207 private string assemblyManifestField;
26208
26209 private bool assemblyManifestFieldSet;
26210
26211 private string assemblyApplicationField;
26212
26213 private bool assemblyApplicationFieldSet;
26214
26215 private ProcessorArchitectureType processorArchitectureField;
26216
26217 private bool processorArchitectureFieldSet;
26218
26219 private string diskIdField;
26220
26221 private bool diskIdFieldSet;
26222
26223 private string sourceField;
26224
26225 private bool sourceFieldSet;
26226
26227 private string srcField;
26228
26229 private bool srcFieldSet;
26230
26231 private int patchGroupField;
26232
26233 private bool patchGroupFieldSet;
26234
26235 private YesNoType patchIgnoreField;
26236
26237 private bool patchIgnoreFieldSet;
26238
26239 private YesNoType patchAllowIgnoreOnErrorField;
26240
26241 private bool patchAllowIgnoreOnErrorFieldSet;
26242
26243 private YesNoType patchWholeFileField;
26244
26245 private bool patchWholeFileFieldSet;
26246
26247 private ISchemaElement parentElement;
26248
26249 public File()
26250 {
26251 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
26252 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AssemblyName)));
26253 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission)));
26254 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
26255 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CopyFile)));
26256 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut)));
26257 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDriver)));
26258 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCTranslator)));
26259 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
26260 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class)));
26261 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
26262 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TypeLib)));
26263 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
26264 this.children = childCollection0;
26265 }
26266
26267 public virtual IEnumerable Children
26268 {
26269 get
26270 {
26271 return this.children;
26272 }
26273 }
26274
26275 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
26276 public virtual IEnumerable this[System.Type childType]
26277 {
26278 get
26279 {
26280 return this.children.Filter(childType);
26281 }
26282 }
26283
26284 /// <summary>
26285 /// The unique identifier for this File element. If you omit Id, it defaults to the file name portion of the Source attribute, if specified. May be referenced as a Property by specifying [#value].
26286 /// </summary>
26287 public string Id
26288 {
26289 get
26290 {
26291 return this.idField;
26292 }
26293 set
26294 {
26295 this.idFieldSet = true;
26296 this.idField = value;
26297 }
26298 }
26299
26300 /// <summary>
26301 /// Set this attribute to make this file a companion child of another file. The installation
26302 /// state of a companion file depends not on its own file versioning information, but on the versioning of its
26303 /// companion parent. A file that is the key path for its component can not be a companion file (that means
26304 /// this attribute cannot be set if KeyPath="yes" for this file). The Version attribute cannot be set along
26305 /// with this attribute since companion files are not installed based on their own version.
26306 /// </summary>
26307 public string CompanionFile
26308 {
26309 get
26310 {
26311 return this.companionFileField;
26312 }
26313 set
26314 {
26315 this.companionFileFieldSet = true;
26316 this.companionFileField = value;
26317 }
26318 }
26319
26320 /// <summary>
26321 /// In prior versions of the WiX toolset, this attribute specified the short file name.
26322 /// This attribute's value may now be either a short or long file name.
26323 /// If a short file name is specified, the ShortName attribute may not be specified.
26324 /// Also, if this value is a long file name, the ShortName attribute may be omitted to
26325 /// allow WiX to attempt to generate a unique short file name.
26326 /// However, if this name collides with another file or you wish to manually specify
26327 /// the short file name, then the ShortName attribute may be specified.
26328 /// Finally, if this attribute is omitted then its default value is the file name portion
26329 /// of the Source attribute, if one is specified, or the value of the Id attribute, if
26330 /// the Source attribute is omitted or doesn't contain a file name.
26331 /// </summary>
26332 public string Name
26333 {
26334 get
26335 {
26336 return this.nameField;
26337 }
26338 set
26339 {
26340 this.nameFieldSet = true;
26341 this.nameField = value;
26342 }
26343 }
26344
26345 /// <summary>
26346 /// Set to yes in order to force this file to be the key path for the parent component.
26347 /// </summary>
26348 public YesNoType KeyPath
26349 {
26350 get
26351 {
26352 return this.keyPathField;
26353 }
26354 set
26355 {
26356 this.keyPathFieldSet = true;
26357 this.keyPathField = value;
26358 }
26359 }
26360
26361 /// <summary>
26362 /// The short file name of the file in 8.3 format.
26363 /// This attribute should only be set if there is a conflict between generated short file names
26364 /// or the user wants to manually specify the short file name.
26365 /// </summary>
26366 public string ShortName
26367 {
26368 get
26369 {
26370 return this.shortNameField;
26371 }
26372 set
26373 {
26374 this.shortNameFieldSet = true;
26375 this.shortNameField = value;
26376 }
26377 }
26378
26379 /// <summary>
26380 /// Set to yes in order to have the file's read-only attribute set when it is installed on the target machine.
26381 /// </summary>
26382 public YesNoType ReadOnly
26383 {
26384 get
26385 {
26386 return this.readOnlyField;
26387 }
26388 set
26389 {
26390 this.readOnlyFieldSet = true;
26391 this.readOnlyField = value;
26392 }
26393 }
26394
26395 /// <summary>
26396 /// Set to yes in order to have the file's hidden attribute set when it is installed on the target machine.
26397 /// </summary>
26398 public YesNoType Hidden
26399 {
26400 get
26401 {
26402 return this.hiddenField;
26403 }
26404 set
26405 {
26406 this.hiddenFieldSet = true;
26407 this.hiddenField = value;
26408 }
26409 }
26410
26411 /// <summary>
26412 /// Set to yes in order to have the file's system attribute set when it is installed on the target machine.
26413 /// </summary>
26414 public YesNoType System
26415 {
26416 get
26417 {
26418 return this.systemField;
26419 }
26420 set
26421 {
26422 this.systemFieldSet = true;
26423 this.systemField = value;
26424 }
26425 }
26426
26427 /// <summary>
26428 /// If a file is vital, then installation cannot proceed unless the file is successfully installed. The user will have no option to ignore an error installing this file. If an error occurs, they can merely retry to install the file or abort the installation. The default is "yes," unless the -sfdvital switch (candle.exe) or SuppressFileDefaultVital property (.wixproj) is used.
26429 /// </summary>
26430 public YesNoType Vital
26431 {
26432 get
26433 {
26434 return this.vitalField;
26435 }
26436 set
26437 {
26438 this.vitalFieldSet = true;
26439 this.vitalField = value;
26440 }
26441 }
26442
26443 /// <summary>
26444 /// This attribute should be set to "yes" for every executable file in the installation that has a valid checksum stored in the Portable Executable (PE) file header. Only those files that have this attribute set will be verified for valid checksum during a reinstall.
26445 /// </summary>
26446 public YesNoType Checksum
26447 {
26448 get
26449 {
26450 return this.checksumField;
26451 }
26452 set
26453 {
26454 this.checksumFieldSet = true;
26455 this.checksumField = value;
26456 }
26457 }
26458
26459 /// <summary>
26460 /// Sets the file's source type compression. A setting of "yes" or "no" will override the setting in the Word Count Summary Property.
26461 /// </summary>
26462 public YesNoDefaultType Compressed
26463 {
26464 get
26465 {
26466 return this.compressedField;
26467 }
26468 set
26469 {
26470 this.compressedFieldSet = true;
26471 this.compressedField = value;
26472 }
26473 }
26474
26475 /// <summary>
26476 /// A list of paths, separated by semicolons, that represent the paths to be searched to find the imported DLLs. The list is usually a list of properties, with each property enclosed inside square brackets. The value may be set to an empty string. Including this attribute will cause an entry to be generated for the file in the BindImage table.
26477 /// </summary>
26478 public string BindPath
26479 {
26480 get
26481 {
26482 return this.bindPathField;
26483 }
26484 set
26485 {
26486 this.bindPathFieldSet = true;
26487 this.bindPathField = value;
26488 }
26489 }
26490
26491 /// <summary>
26492 /// The cost of registering the file in bytes. This must be a non-negative number. Including this attribute will cause an entry to be generated for the file in the SelfReg table.
26493 /// </summary>
26494 public int SelfRegCost
26495 {
26496 get
26497 {
26498 return this.selfRegCostField;
26499 }
26500 set
26501 {
26502 this.selfRegCostFieldSet = true;
26503 this.selfRegCostField = value;
26504 }
26505 }
26506
26507 /// <summary>
26508 /// Causes an entry to be generated for the file in the Font table with no FontTitle specified. This attribute is intended to be used to register the file as a TrueType font.
26509 /// </summary>
26510 public YesNoType TrueType
26511 {
26512 get
26513 {
26514 return this.trueTypeField;
26515 }
26516 set
26517 {
26518 this.trueTypeFieldSet = true;
26519 this.trueTypeField = value;
26520 }
26521 }
26522
26523 /// <summary>
26524 /// Causes an entry to be generated for the file in the Font table with the specified FontTitle. This attribute is intended to be used to register the file as a non-TrueType font.
26525 /// </summary>
26526 public string FontTitle
26527 {
26528 get
26529 {
26530 return this.fontTitleField;
26531 }
26532 set
26533 {
26534 this.fontTitleFieldSet = true;
26535 this.fontTitleField = value;
26536 }
26537 }
26538
26539 /// <summary>
26540 /// This is the default language of this file. The linker will replace this value from the value in the file if the suppress files option is not used.
26541 /// </summary>
26542 public string DefaultLanguage
26543 {
26544 get
26545 {
26546 return this.defaultLanguageField;
26547 }
26548 set
26549 {
26550 this.defaultLanguageFieldSet = true;
26551 this.defaultLanguageField = value;
26552 }
26553 }
26554
26555 /// <summary>
26556 /// This is the default size of this file. The linker will replace this value from the value in the file if the suppress files option is not used.
26557 /// </summary>
26558 public int DefaultSize
26559 {
26560 get
26561 {
26562 return this.defaultSizeField;
26563 }
26564 set
26565 {
26566 this.defaultSizeFieldSet = true;
26567 this.defaultSizeField = value;
26568 }
26569 }
26570
26571 /// <summary>
26572 /// This is the default version of this file. The linker will replace this value from the value in the file if the suppress files option is not used.
26573 /// </summary>
26574 public string DefaultVersion
26575 {
26576 get
26577 {
26578 return this.defaultVersionField;
26579 }
26580 set
26581 {
26582 this.defaultVersionFieldSet = true;
26583 this.defaultVersionField = value;
26584 }
26585 }
26586
26587 /// <summary>
26588 /// Specifies if this File is a Win32 Assembly or .NET Assembly that needs to be installed into the
26589 /// Global Assembly Cache (GAC). If the value is '.net' or 'win32', this file must also be the key path of the Component.
26590 /// </summary>
26591 public AssemblyType Assembly
26592 {
26593 get
26594 {
26595 return this.assemblyField;
26596 }
26597 set
26598 {
26599 this.assemblyFieldSet = true;
26600 this.assemblyField = value;
26601 }
26602 }
26603
26604 /// <summary>
26605 /// Specifies the file identifier of the manifest file that describes this assembly.
26606 /// The manifest file should be in the same component as the assembly it describes.
26607 /// This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'.
26608 /// </summary>
26609 public string AssemblyManifest
26610 {
26611 get
26612 {
26613 return this.assemblyManifestField;
26614 }
26615 set
26616 {
26617 this.assemblyManifestFieldSet = true;
26618 this.assemblyManifestField = value;
26619 }
26620 }
26621
26622 /// <summary>
26623 /// Specifies the file identifier of the application file. This assembly will be isolated
26624 /// to the same directory as the application file.
26625 /// If this attribute is absent, the assembly will be installed to the Global Assembly Cache (GAC).
26626 /// This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'.
26627 /// </summary>
26628 public string AssemblyApplication
26629 {
26630 get
26631 {
26632 return this.assemblyApplicationField;
26633 }
26634 set
26635 {
26636 this.assemblyApplicationFieldSet = true;
26637 this.assemblyApplicationField = value;
26638 }
26639 }
26640
26641 /// <summary>
26642 /// Specifies the architecture for this assembly. This attribute should only be used on .NET Framework 2.0 or higher assemblies.
26643 /// </summary>
26644 public ProcessorArchitectureType ProcessorArchitecture
26645 {
26646 get
26647 {
26648 return this.processorArchitectureField;
26649 }
26650 set
26651 {
26652 this.processorArchitectureFieldSet = true;
26653 this.processorArchitectureField = value;
26654 }
26655 }
26656
26657 /// <summary>
26658 /// The value of this attribute should correspond to the Id attribute of a Media
26659 /// element authored elsewhere. By creating this connection between a file and
26660 /// its media, you set the packaging options to the values specified in the Media
26661 /// element (values such as compression level, cab embedding, etc...). Specifying
26662 /// the DiskId attribute on the File element overrides the default DiskId attribute
26663 /// from the parent Component element. If no DiskId attribute is specified,
26664 /// the default is "1". This DiskId attribute is ignored when creating a merge module
26665 /// because merge modules do not have media.
26666 /// </summary>
26667 public string DiskId
26668 {
26669 get
26670 {
26671 return this.diskIdField;
26672 }
26673 set
26674 {
26675 this.diskIdFieldSet = true;
26676 this.diskIdField = value;
26677 }
26678 }
26679
26680 /// <summary>
26681 /// Specifies the path to the File in the build process. Overrides default source path set by parent directories and Name attribute. This attribute must be set if no source information can be gathered from parent directories. For more information, see
26682 /// </summary>
26683 public string Source
26684 {
26685 get
26686 {
26687 return this.sourceField;
26688 }
26689 set
26690 {
26691 this.sourceFieldSet = true;
26692 this.sourceField = value;
26693 }
26694 }
26695
26696 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
26697 public string src
26698 {
26699 get
26700 {
26701 return this.srcField;
26702 }
26703 set
26704 {
26705 this.srcFieldSet = true;
26706 this.srcField = value;
26707 }
26708 }
26709
26710 /// <summary>
26711 /// This attribute must be set for patch-added files. Each patch should be assigned a different patch group number. Patch groups
26712 /// numbers must be greater 0 and should be assigned consecutively. For example, the first patch should use PatchGroup='1', the
26713 /// second patch will have PatchGroup='2', etc...
26714 /// </summary>
26715 public int PatchGroup
26716 {
26717 get
26718 {
26719 return this.patchGroupField;
26720 }
26721 set
26722 {
26723 this.patchGroupFieldSet = true;
26724 this.patchGroupField = value;
26725 }
26726 }
26727
26728 /// <summary>
26729 /// Prevents the updating of the file that is in fact changed in the upgraded image relative to the target images.
26730 /// </summary>
26731 public YesNoType PatchIgnore
26732 {
26733 get
26734 {
26735 return this.patchIgnoreField;
26736 }
26737 set
26738 {
26739 this.patchIgnoreFieldSet = true;
26740 this.patchIgnoreField = value;
26741 }
26742 }
26743
26744 /// <summary>
26745 /// Set to indicate that the patch is non-vital.
26746 /// </summary>
26747 public YesNoType PatchAllowIgnoreOnError
26748 {
26749 get
26750 {
26751 return this.patchAllowIgnoreOnErrorField;
26752 }
26753 set
26754 {
26755 this.patchAllowIgnoreOnErrorFieldSet = true;
26756 this.patchAllowIgnoreOnErrorField = value;
26757 }
26758 }
26759
26760 /// <summary>
26761 /// Set if the entire file should be installed rather than creating a binary patch.
26762 /// </summary>
26763 public YesNoType PatchWholeFile
26764 {
26765 get
26766 {
26767 return this.patchWholeFileField;
26768 }
26769 set
26770 {
26771 this.patchWholeFileFieldSet = true;
26772 this.patchWholeFileField = value;
26773 }
26774 }
26775
26776 public virtual ISchemaElement ParentElement
26777 {
26778 get
26779 {
26780 return this.parentElement;
26781 }
26782 set
26783 {
26784 this.parentElement = value;
26785 }
26786 }
26787
26788 public virtual void AddChild(ISchemaElement child)
26789 {
26790 if ((null == child))
26791 {
26792 throw new ArgumentNullException("child");
26793 }
26794 this.children.AddElement(child);
26795 child.ParentElement = this;
26796 }
26797
26798 public virtual void RemoveChild(ISchemaElement child)
26799 {
26800 if ((null == child))
26801 {
26802 throw new ArgumentNullException("child");
26803 }
26804 this.children.RemoveElement(child);
26805 child.ParentElement = null;
26806 }
26807
26808 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
26809 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
26810 ISchemaElement ICreateChildren.CreateChild(string childName)
26811 {
26812 if (String.IsNullOrEmpty(childName))
26813 {
26814 throw new ArgumentNullException("childName");
26815 }
26816 ISchemaElement childValue = null;
26817 if (("AssemblyName" == childName))
26818 {
26819 childValue = new AssemblyName();
26820 }
26821 if (("Permission" == childName))
26822 {
26823 childValue = new Permission();
26824 }
26825 if (("PermissionEx" == childName))
26826 {
26827 childValue = new PermissionEx();
26828 }
26829 if (("CopyFile" == childName))
26830 {
26831 childValue = new CopyFile();
26832 }
26833 if (("Shortcut" == childName))
26834 {
26835 childValue = new Shortcut();
26836 }
26837 if (("ODBCDriver" == childName))
26838 {
26839 childValue = new ODBCDriver();
26840 }
26841 if (("ODBCTranslator" == childName))
26842 {
26843 childValue = new ODBCTranslator();
26844 }
26845 if (("SymbolPath" == childName))
26846 {
26847 childValue = new SymbolPath();
26848 }
26849 if (("Class" == childName))
26850 {
26851 childValue = new Class();
26852 }
26853 if (("AppId" == childName))
26854 {
26855 childValue = new AppId();
26856 }
26857 if (("TypeLib" == childName))
26858 {
26859 childValue = new TypeLib();
26860 }
26861 if ((null == childValue))
26862 {
26863 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
26864 }
26865 return childValue;
26866 }
26867
26868 /// <summary>
26869 /// Parses a AssemblyType from a string.
26870 /// </summary>
26871 public static AssemblyType ParseAssemblyType(string value)
26872 {
26873 AssemblyType parsedValue;
26874 File.TryParseAssemblyType(value, out parsedValue);
26875 return parsedValue;
26876 }
26877
26878 /// <summary>
26879 /// Tries to parse a AssemblyType from a string.
26880 /// </summary>
26881 public static bool TryParseAssemblyType(string value, out AssemblyType parsedValue)
26882 {
26883 parsedValue = AssemblyType.NotSet;
26884 if (string.IsNullOrEmpty(value))
26885 {
26886 return false;
26887 }
26888 if ((".net" == value))
26889 {
26890 parsedValue = AssemblyType.net;
26891 }
26892 else
26893 {
26894 if (("no" == value))
26895 {
26896 parsedValue = AssemblyType.no;
26897 }
26898 else
26899 {
26900 if (("win32" == value))
26901 {
26902 parsedValue = AssemblyType.win32;
26903 }
26904 else
26905 {
26906 parsedValue = AssemblyType.IllegalValue;
26907 return false;
26908 }
26909 }
26910 }
26911 return true;
26912 }
26913
26914 /// <summary>
26915 /// Parses a ProcessorArchitectureType from a string.
26916 /// </summary>
26917 public static ProcessorArchitectureType ParseProcessorArchitectureType(string value)
26918 {
26919 ProcessorArchitectureType parsedValue;
26920 File.TryParseProcessorArchitectureType(value, out parsedValue);
26921 return parsedValue;
26922 }
26923
26924 /// <summary>
26925 /// Tries to parse a ProcessorArchitectureType from a string.
26926 /// </summary>
26927 public static bool TryParseProcessorArchitectureType(string value, out ProcessorArchitectureType parsedValue)
26928 {
26929 parsedValue = ProcessorArchitectureType.NotSet;
26930 if (string.IsNullOrEmpty(value))
26931 {
26932 return false;
26933 }
26934 if (("msil" == value))
26935 {
26936 parsedValue = ProcessorArchitectureType.msil;
26937 }
26938 else
26939 {
26940 if (("x86" == value))
26941 {
26942 parsedValue = ProcessorArchitectureType.x86;
26943 }
26944 else
26945 {
26946 if (("x64" == value))
26947 {
26948 parsedValue = ProcessorArchitectureType.x64;
26949 }
26950 else
26951 {
26952 if (("ia64" == value))
26953 {
26954 parsedValue = ProcessorArchitectureType.ia64;
26955 }
26956 else
26957 {
26958 parsedValue = ProcessorArchitectureType.IllegalValue;
26959 return false;
26960 }
26961 }
26962 }
26963 }
26964 return true;
26965 }
26966
26967 /// <summary>
26968 /// Processes this element and all child elements into an XmlWriter.
26969 /// </summary>
26970 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
26971 public virtual void OutputXml(XmlWriter writer)
26972 {
26973 if ((null == writer))
26974 {
26975 throw new ArgumentNullException("writer");
26976 }
26977 writer.WriteStartElement("File", "http://wixtoolset.org/schemas/v4/wxs");
26978 if (this.idFieldSet)
26979 {
26980 writer.WriteAttributeString("Id", this.idField);
26981 }
26982 if (this.companionFileFieldSet)
26983 {
26984 writer.WriteAttributeString("CompanionFile", this.companionFileField);
26985 }
26986 if (this.nameFieldSet)
26987 {
26988 writer.WriteAttributeString("Name", this.nameField);
26989 }
26990 if (this.keyPathFieldSet)
26991 {
26992 if ((this.keyPathField == YesNoType.no))
26993 {
26994 writer.WriteAttributeString("KeyPath", "no");
26995 }
26996 if ((this.keyPathField == YesNoType.yes))
26997 {
26998 writer.WriteAttributeString("KeyPath", "yes");
26999 }
27000 }
27001 if (this.shortNameFieldSet)
27002 {
27003 writer.WriteAttributeString("ShortName", this.shortNameField);
27004 }
27005 if (this.readOnlyFieldSet)
27006 {
27007 if ((this.readOnlyField == YesNoType.no))
27008 {
27009 writer.WriteAttributeString("ReadOnly", "no");
27010 }
27011 if ((this.readOnlyField == YesNoType.yes))
27012 {
27013 writer.WriteAttributeString("ReadOnly", "yes");
27014 }
27015 }
27016 if (this.hiddenFieldSet)
27017 {
27018 if ((this.hiddenField == YesNoType.no))
27019 {
27020 writer.WriteAttributeString("Hidden", "no");
27021 }
27022 if ((this.hiddenField == YesNoType.yes))
27023 {
27024 writer.WriteAttributeString("Hidden", "yes");
27025 }
27026 }
27027 if (this.systemFieldSet)
27028 {
27029 if ((this.systemField == YesNoType.no))
27030 {
27031 writer.WriteAttributeString("System", "no");
27032 }
27033 if ((this.systemField == YesNoType.yes))
27034 {
27035 writer.WriteAttributeString("System", "yes");
27036 }
27037 }
27038 if (this.vitalFieldSet)
27039 {
27040 if ((this.vitalField == YesNoType.no))
27041 {
27042 writer.WriteAttributeString("Vital", "no");
27043 }
27044 if ((this.vitalField == YesNoType.yes))
27045 {
27046 writer.WriteAttributeString("Vital", "yes");
27047 }
27048 }
27049 if (this.checksumFieldSet)
27050 {
27051 if ((this.checksumField == YesNoType.no))
27052 {
27053 writer.WriteAttributeString("Checksum", "no");
27054 }
27055 if ((this.checksumField == YesNoType.yes))
27056 {
27057 writer.WriteAttributeString("Checksum", "yes");
27058 }
27059 }
27060 if (this.compressedFieldSet)
27061 {
27062 if ((this.compressedField == YesNoDefaultType.@default))
27063 {
27064 writer.WriteAttributeString("Compressed", "default");
27065 }
27066 if ((this.compressedField == YesNoDefaultType.no))
27067 {
27068 writer.WriteAttributeString("Compressed", "no");
27069 }
27070 if ((this.compressedField == YesNoDefaultType.yes))
27071 {
27072 writer.WriteAttributeString("Compressed", "yes");
27073 }
27074 }
27075 if (this.bindPathFieldSet)
27076 {
27077 writer.WriteAttributeString("BindPath", this.bindPathField);
27078 }
27079 if (this.selfRegCostFieldSet)
27080 {
27081 writer.WriteAttributeString("SelfRegCost", this.selfRegCostField.ToString(CultureInfo.InvariantCulture));
27082 }
27083 if (this.trueTypeFieldSet)
27084 {
27085 if ((this.trueTypeField == YesNoType.no))
27086 {
27087 writer.WriteAttributeString("TrueType", "no");
27088 }
27089 if ((this.trueTypeField == YesNoType.yes))
27090 {
27091 writer.WriteAttributeString("TrueType", "yes");
27092 }
27093 }
27094 if (this.fontTitleFieldSet)
27095 {
27096 writer.WriteAttributeString("FontTitle", this.fontTitleField);
27097 }
27098 if (this.defaultLanguageFieldSet)
27099 {
27100 writer.WriteAttributeString("DefaultLanguage", this.defaultLanguageField);
27101 }
27102 if (this.defaultSizeFieldSet)
27103 {
27104 writer.WriteAttributeString("DefaultSize", this.defaultSizeField.ToString(CultureInfo.InvariantCulture));
27105 }
27106 if (this.defaultVersionFieldSet)
27107 {
27108 writer.WriteAttributeString("DefaultVersion", this.defaultVersionField);
27109 }
27110 if (this.assemblyFieldSet)
27111 {
27112 if ((this.assemblyField == AssemblyType.net))
27113 {
27114 writer.WriteAttributeString("Assembly", ".net");
27115 }
27116 if ((this.assemblyField == AssemblyType.no))
27117 {
27118 writer.WriteAttributeString("Assembly", "no");
27119 }
27120 if ((this.assemblyField == AssemblyType.win32))
27121 {
27122 writer.WriteAttributeString("Assembly", "win32");
27123 }
27124 }
27125 if (this.assemblyManifestFieldSet)
27126 {
27127 writer.WriteAttributeString("AssemblyManifest", this.assemblyManifestField);
27128 }
27129 if (this.assemblyApplicationFieldSet)
27130 {
27131 writer.WriteAttributeString("AssemblyApplication", this.assemblyApplicationField);
27132 }
27133 if (this.processorArchitectureFieldSet)
27134 {
27135 if ((this.processorArchitectureField == ProcessorArchitectureType.msil))
27136 {
27137 writer.WriteAttributeString("ProcessorArchitecture", "msil");
27138 }
27139 if ((this.processorArchitectureField == ProcessorArchitectureType.x86))
27140 {
27141 writer.WriteAttributeString("ProcessorArchitecture", "x86");
27142 }
27143 if ((this.processorArchitectureField == ProcessorArchitectureType.x64))
27144 {
27145 writer.WriteAttributeString("ProcessorArchitecture", "x64");
27146 }
27147 if ((this.processorArchitectureField == ProcessorArchitectureType.ia64))
27148 {
27149 writer.WriteAttributeString("ProcessorArchitecture", "ia64");
27150 }
27151 }
27152 if (this.diskIdFieldSet)
27153 {
27154 writer.WriteAttributeString("DiskId", this.diskIdField);
27155 }
27156 if (this.sourceFieldSet)
27157 {
27158 writer.WriteAttributeString("Source", this.sourceField);
27159 }
27160 if (this.srcFieldSet)
27161 {
27162 writer.WriteAttributeString("src", this.srcField);
27163 }
27164 if (this.patchGroupFieldSet)
27165 {
27166 writer.WriteAttributeString("PatchGroup", this.patchGroupField.ToString(CultureInfo.InvariantCulture));
27167 }
27168 if (this.patchIgnoreFieldSet)
27169 {
27170 if ((this.patchIgnoreField == YesNoType.no))
27171 {
27172 writer.WriteAttributeString("PatchIgnore", "no");
27173 }
27174 if ((this.patchIgnoreField == YesNoType.yes))
27175 {
27176 writer.WriteAttributeString("PatchIgnore", "yes");
27177 }
27178 }
27179 if (this.patchAllowIgnoreOnErrorFieldSet)
27180 {
27181 if ((this.patchAllowIgnoreOnErrorField == YesNoType.no))
27182 {
27183 writer.WriteAttributeString("PatchAllowIgnoreOnError", "no");
27184 }
27185 if ((this.patchAllowIgnoreOnErrorField == YesNoType.yes))
27186 {
27187 writer.WriteAttributeString("PatchAllowIgnoreOnError", "yes");
27188 }
27189 }
27190 if (this.patchWholeFileFieldSet)
27191 {
27192 if ((this.patchWholeFileField == YesNoType.no))
27193 {
27194 writer.WriteAttributeString("PatchWholeFile", "no");
27195 }
27196 if ((this.patchWholeFileField == YesNoType.yes))
27197 {
27198 writer.WriteAttributeString("PatchWholeFile", "yes");
27199 }
27200 }
27201 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
27202 {
27203 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
27204 childElement.OutputXml(writer);
27205 }
27206 writer.WriteEndElement();
27207 }
27208
27209 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
27210 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
27211 void ISetAttributes.SetAttribute(string name, string value)
27212 {
27213 if (String.IsNullOrEmpty(name))
27214 {
27215 throw new ArgumentNullException("name");
27216 }
27217 if (("Id" == name))
27218 {
27219 this.idField = value;
27220 this.idFieldSet = true;
27221 }
27222 if (("CompanionFile" == name))
27223 {
27224 this.companionFileField = value;
27225 this.companionFileFieldSet = true;
27226 }
27227 if (("Name" == name))
27228 {
27229 this.nameField = value;
27230 this.nameFieldSet = true;
27231 }
27232 if (("KeyPath" == name))
27233 {
27234 this.keyPathField = Enums.ParseYesNoType(value);
27235 this.keyPathFieldSet = true;
27236 }
27237 if (("ShortName" == name))
27238 {
27239 this.shortNameField = value;
27240 this.shortNameFieldSet = true;
27241 }
27242 if (("ReadOnly" == name))
27243 {
27244 this.readOnlyField = Enums.ParseYesNoType(value);
27245 this.readOnlyFieldSet = true;
27246 }
27247 if (("Hidden" == name))
27248 {
27249 this.hiddenField = Enums.ParseYesNoType(value);
27250 this.hiddenFieldSet = true;
27251 }
27252 if (("System" == name))
27253 {
27254 this.systemField = Enums.ParseYesNoType(value);
27255 this.systemFieldSet = true;
27256 }
27257 if (("Vital" == name))
27258 {
27259 this.vitalField = Enums.ParseYesNoType(value);
27260 this.vitalFieldSet = true;
27261 }
27262 if (("Checksum" == name))
27263 {
27264 this.checksumField = Enums.ParseYesNoType(value);
27265 this.checksumFieldSet = true;
27266 }
27267 if (("Compressed" == name))
27268 {
27269 this.compressedField = Enums.ParseYesNoDefaultType(value);
27270 this.compressedFieldSet = true;
27271 }
27272 if (("BindPath" == name))
27273 {
27274 this.bindPathField = value;
27275 this.bindPathFieldSet = true;
27276 }
27277 if (("SelfRegCost" == name))
27278 {
27279 this.selfRegCostField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
27280 this.selfRegCostFieldSet = true;
27281 }
27282 if (("TrueType" == name))
27283 {
27284 this.trueTypeField = Enums.ParseYesNoType(value);
27285 this.trueTypeFieldSet = true;
27286 }
27287 if (("FontTitle" == name))
27288 {
27289 this.fontTitleField = value;
27290 this.fontTitleFieldSet = true;
27291 }
27292 if (("DefaultLanguage" == name))
27293 {
27294 this.defaultLanguageField = value;
27295 this.defaultLanguageFieldSet = true;
27296 }
27297 if (("DefaultSize" == name))
27298 {
27299 this.defaultSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
27300 this.defaultSizeFieldSet = true;
27301 }
27302 if (("DefaultVersion" == name))
27303 {
27304 this.defaultVersionField = value;
27305 this.defaultVersionFieldSet = true;
27306 }
27307 if (("Assembly" == name))
27308 {
27309 this.assemblyField = File.ParseAssemblyType(value);
27310 this.assemblyFieldSet = true;
27311 }
27312 if (("AssemblyManifest" == name))
27313 {
27314 this.assemblyManifestField = value;
27315 this.assemblyManifestFieldSet = true;
27316 }
27317 if (("AssemblyApplication" == name))
27318 {
27319 this.assemblyApplicationField = value;
27320 this.assemblyApplicationFieldSet = true;
27321 }
27322 if (("ProcessorArchitecture" == name))
27323 {
27324 this.processorArchitectureField = File.ParseProcessorArchitectureType(value);
27325 this.processorArchitectureFieldSet = true;
27326 }
27327 if (("DiskId" == name))
27328 {
27329 this.diskIdField = value;
27330 this.diskIdFieldSet = true;
27331 }
27332 if (("Source" == name))
27333 {
27334 this.sourceField = value;
27335 this.sourceFieldSet = true;
27336 }
27337 if (("src" == name))
27338 {
27339 this.srcField = value;
27340 this.srcFieldSet = true;
27341 }
27342 if (("PatchGroup" == name))
27343 {
27344 this.patchGroupField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
27345 this.patchGroupFieldSet = true;
27346 }
27347 if (("PatchIgnore" == name))
27348 {
27349 this.patchIgnoreField = Enums.ParseYesNoType(value);
27350 this.patchIgnoreFieldSet = true;
27351 }
27352 if (("PatchAllowIgnoreOnError" == name))
27353 {
27354 this.patchAllowIgnoreOnErrorField = Enums.ParseYesNoType(value);
27355 this.patchAllowIgnoreOnErrorFieldSet = true;
27356 }
27357 if (("PatchWholeFile" == name))
27358 {
27359 this.patchWholeFileField = Enums.ParseYesNoType(value);
27360 this.patchWholeFileFieldSet = true;
27361 }
27362 }
27363
27364 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27365 public enum AssemblyType
27366 {
27367
27368 IllegalValue = int.MaxValue,
27369
27370 NotSet = -1,
27371
27372 /// <summary>
27373 /// The file is a .NET Framework assembly.
27374 /// </summary>
27375 net,
27376
27377 /// <summary>
27378 /// The file is not a .NET Framework or Win32 assembly. This is the default value.
27379 /// </summary>
27380 no,
27381
27382 /// <summary>
27383 /// The file is a Win32 assembly.
27384 /// </summary>
27385 win32,
27386 }
27387
27388 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27389 public enum ProcessorArchitectureType
27390 {
27391
27392 IllegalValue = int.MaxValue,
27393
27394 NotSet = -1,
27395
27396 /// <summary>
27397 /// The file is a .NET Framework assembly that is processor-neutral.
27398 /// </summary>
27399 msil,
27400
27401 /// <summary>
27402 /// The file is a .NET Framework assembly for the x86 processor.
27403 /// </summary>
27404 x86,
27405
27406 /// <summary>
27407 /// The file is a .NET Framework assembly for the x64 processor.
27408 /// </summary>
27409 x64,
27410
27411 /// <summary>
27412 /// The file is a .NET Framework assembly for the ia64 processor.
27413 /// </summary>
27414 ia64,
27415 }
27416 }
27417
27418 /// <summary>
27419 /// Use several of these elements to specify each registry value in a multiString registry value. This element
27420 /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The
27421 /// values should go in the text area of the MultiStringValue element.
27422 /// </summary>
27423 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27424 public class MultiStringValue : ISetAttributes, ISchemaElement
27425 {
27426
27427 private ISchemaElement parentElement;
27428
27429 private string contentField;
27430
27431 private bool contentFieldSet;
27432
27433 public virtual ISchemaElement ParentElement
27434 {
27435 get
27436 {
27437 return this.parentElement;
27438 }
27439 set
27440 {
27441 this.parentElement = value;
27442 }
27443 }
27444
27445 /// <summary>
27446 /// Use several of these elements to specify each registry value in a multiString registry value. This element
27447 /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The
27448 /// values should go in the text area of the MultiStringValue element.
27449 /// </summary>
27450 public string Content
27451 {
27452 get
27453 {
27454 return this.contentField;
27455 }
27456 set
27457 {
27458 this.contentFieldSet = true;
27459 this.contentField = value;
27460 }
27461 }
27462
27463 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
27464 void ISetAttributes.SetAttribute(string name, string value)
27465 {
27466 if (String.IsNullOrEmpty(name))
27467 {
27468 throw new ArgumentNullException("name");
27469 }
27470 if (("Content" == name))
27471 {
27472 this.contentField = value;
27473 this.contentFieldSet = true;
27474 }
27475 }
27476
27477 /// <summary>
27478 /// Processes this element and all child elements into an XmlWriter.
27479 /// </summary>
27480 public virtual void OutputXml(XmlWriter writer)
27481 {
27482 if ((null == writer))
27483 {
27484 throw new ArgumentNullException("writer");
27485 }
27486 writer.WriteStartElement("MultiStringValue", "http://wixtoolset.org/schemas/v4/wxs");
27487 if (this.contentFieldSet)
27488 {
27489 writer.WriteString(this.contentField);
27490 }
27491 writer.WriteEndElement();
27492 }
27493 }
27494
27495 /// <summary>
27496 /// Used for organization of child RegistryValue elements or to create a registry key
27497 /// (and optionally remove it during uninstallation).
27498 /// </summary>
27499 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27500 public class RegistryKey : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
27501 {
27502
27503 private ElementCollection children;
27504
27505 private string idField;
27506
27507 private bool idFieldSet;
27508
27509 private ActionType actionField;
27510
27511 private bool actionFieldSet;
27512
27513 private YesNoType forceCreateOnInstallField;
27514
27515 private bool forceCreateOnInstallFieldSet;
27516
27517 private YesNoType forceDeleteOnUninstallField;
27518
27519 private bool forceDeleteOnUninstallFieldSet;
27520
27521 private string keyField;
27522
27523 private bool keyFieldSet;
27524
27525 private RegistryRootType rootField;
27526
27527 private bool rootFieldSet;
27528
27529 private ISchemaElement parentElement;
27530
27531 public RegistryKey()
27532 {
27533 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
27534 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryKey)));
27535 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue)));
27536 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission)));
27537 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
27538 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
27539 this.children = childCollection0;
27540 }
27541
27542 public virtual IEnumerable Children
27543 {
27544 get
27545 {
27546 return this.children;
27547 }
27548 }
27549
27550 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
27551 public virtual IEnumerable this[System.Type childType]
27552 {
27553 get
27554 {
27555 return this.children.Filter(childType);
27556 }
27557 }
27558
27559 /// <summary>
27560 /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be
27561 /// generated by hashing the parent Component identifier, Root, Key, and Name.
27562 /// </summary>
27563 public string Id
27564 {
27565 get
27566 {
27567 return this.idField;
27568 }
27569 set
27570 {
27571 this.idFieldSet = true;
27572 this.idField = value;
27573 }
27574 }
27575
27576 /// <summary>
27577 /// The Action attribute has been deprecated. In most cases, you can simply omit @Action. If you need to force Windows Installer
27578 /// to create an empty key or recursively delete the key, use the ForceCreateOnInstall or ForceDeleteOnUninstall attributes instead.
27579 /// </summary>
27580 public ActionType Action
27581 {
27582 get
27583 {
27584 return this.actionField;
27585 }
27586 set
27587 {
27588 this.actionFieldSet = true;
27589 this.actionField = value;
27590 }
27591 }
27592
27593 /// <summary>
27594 /// Set this attribute to 'yes' to create an empty key, if absent, when the parent component is installed.
27595 /// This value is needed only to create an empty key with no subkeys or values. Windows Installer creates
27596 /// keys as needed to store subkeys and values. The default is "no".
27597 /// </summary>
27598 public YesNoType ForceCreateOnInstall
27599 {
27600 get
27601 {
27602 return this.forceCreateOnInstallField;
27603 }
27604 set
27605 {
27606 this.forceCreateOnInstallFieldSet = true;
27607 this.forceCreateOnInstallField = value;
27608 }
27609 }
27610
27611 /// <summary>
27612 /// Set this attribute to 'yes' to remove the key with all its values and subkeys when the parent component is uninstalled.
27613 /// Note that this value is useful only if your program creates additional values or subkeys under this key and you want an uninstall to remove them. MSI already
27614 /// removes all values and subkeys that it creates, so this option just adds additional overhead to uninstall.
27615 /// The default is "no".
27616 /// </summary>
27617 public YesNoType ForceDeleteOnUninstall
27618 {
27619 get
27620 {
27621 return this.forceDeleteOnUninstallField;
27622 }
27623 set
27624 {
27625 this.forceDeleteOnUninstallFieldSet = true;
27626 this.forceDeleteOnUninstallField = value;
27627 }
27628 }
27629
27630 /// <summary>
27631 /// The localizable key for the registry value.
27632 /// If the parent element is a RegistryKey, this value may be omitted to use the
27633 /// path of the parent, or if its specified it will be appended to the path of the parent.
27634 /// </summary>
27635 public string Key
27636 {
27637 get
27638 {
27639 return this.keyField;
27640 }
27641 set
27642 {
27643 this.keyFieldSet = true;
27644 this.keyField = value;
27645 }
27646 }
27647
27648 /// <summary>
27649 /// The predefined root key for the registry value.
27650 /// </summary>
27651 public RegistryRootType Root
27652 {
27653 get
27654 {
27655 return this.rootField;
27656 }
27657 set
27658 {
27659 this.rootFieldSet = true;
27660 this.rootField = value;
27661 }
27662 }
27663
27664 public virtual ISchemaElement ParentElement
27665 {
27666 get
27667 {
27668 return this.parentElement;
27669 }
27670 set
27671 {
27672 this.parentElement = value;
27673 }
27674 }
27675
27676 public virtual void AddChild(ISchemaElement child)
27677 {
27678 if ((null == child))
27679 {
27680 throw new ArgumentNullException("child");
27681 }
27682 this.children.AddElement(child);
27683 child.ParentElement = this;
27684 }
27685
27686 public virtual void RemoveChild(ISchemaElement child)
27687 {
27688 if ((null == child))
27689 {
27690 throw new ArgumentNullException("child");
27691 }
27692 this.children.RemoveElement(child);
27693 child.ParentElement = null;
27694 }
27695
27696 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
27697 ISchemaElement ICreateChildren.CreateChild(string childName)
27698 {
27699 if (String.IsNullOrEmpty(childName))
27700 {
27701 throw new ArgumentNullException("childName");
27702 }
27703 ISchemaElement childValue = null;
27704 if (("RegistryKey" == childName))
27705 {
27706 childValue = new RegistryKey();
27707 }
27708 if (("RegistryValue" == childName))
27709 {
27710 childValue = new RegistryValue();
27711 }
27712 if (("Permission" == childName))
27713 {
27714 childValue = new Permission();
27715 }
27716 if (("PermissionEx" == childName))
27717 {
27718 childValue = new PermissionEx();
27719 }
27720 if ((null == childValue))
27721 {
27722 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
27723 }
27724 return childValue;
27725 }
27726
27727 /// <summary>
27728 /// Parses a ActionType from a string.
27729 /// </summary>
27730 public static ActionType ParseActionType(string value)
27731 {
27732 ActionType parsedValue;
27733 RegistryKey.TryParseActionType(value, out parsedValue);
27734 return parsedValue;
27735 }
27736
27737 /// <summary>
27738 /// Tries to parse a ActionType from a string.
27739 /// </summary>
27740 public static bool TryParseActionType(string value, out ActionType parsedValue)
27741 {
27742 parsedValue = ActionType.NotSet;
27743 if (string.IsNullOrEmpty(value))
27744 {
27745 return false;
27746 }
27747 if (("create" == value))
27748 {
27749 parsedValue = ActionType.create;
27750 }
27751 else
27752 {
27753 if (("createAndRemoveOnUninstall" == value))
27754 {
27755 parsedValue = ActionType.createAndRemoveOnUninstall;
27756 }
27757 else
27758 {
27759 if (("none" == value))
27760 {
27761 parsedValue = ActionType.none;
27762 }
27763 else
27764 {
27765 parsedValue = ActionType.IllegalValue;
27766 return false;
27767 }
27768 }
27769 }
27770 return true;
27771 }
27772
27773 /// <summary>
27774 /// Processes this element and all child elements into an XmlWriter.
27775 /// </summary>
27776 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
27777 public virtual void OutputXml(XmlWriter writer)
27778 {
27779 if ((null == writer))
27780 {
27781 throw new ArgumentNullException("writer");
27782 }
27783 writer.WriteStartElement("RegistryKey", "http://wixtoolset.org/schemas/v4/wxs");
27784 if (this.idFieldSet)
27785 {
27786 writer.WriteAttributeString("Id", this.idField);
27787 }
27788 if (this.actionFieldSet)
27789 {
27790 if ((this.actionField == ActionType.create))
27791 {
27792 writer.WriteAttributeString("Action", "create");
27793 }
27794 if ((this.actionField == ActionType.createAndRemoveOnUninstall))
27795 {
27796 writer.WriteAttributeString("Action", "createAndRemoveOnUninstall");
27797 }
27798 if ((this.actionField == ActionType.none))
27799 {
27800 writer.WriteAttributeString("Action", "none");
27801 }
27802 }
27803 if (this.forceCreateOnInstallFieldSet)
27804 {
27805 if ((this.forceCreateOnInstallField == YesNoType.no))
27806 {
27807 writer.WriteAttributeString("ForceCreateOnInstall", "no");
27808 }
27809 if ((this.forceCreateOnInstallField == YesNoType.yes))
27810 {
27811 writer.WriteAttributeString("ForceCreateOnInstall", "yes");
27812 }
27813 }
27814 if (this.forceDeleteOnUninstallFieldSet)
27815 {
27816 if ((this.forceDeleteOnUninstallField == YesNoType.no))
27817 {
27818 writer.WriteAttributeString("ForceDeleteOnUninstall", "no");
27819 }
27820 if ((this.forceDeleteOnUninstallField == YesNoType.yes))
27821 {
27822 writer.WriteAttributeString("ForceDeleteOnUninstall", "yes");
27823 }
27824 }
27825 if (this.keyFieldSet)
27826 {
27827 writer.WriteAttributeString("Key", this.keyField);
27828 }
27829 if (this.rootFieldSet)
27830 {
27831 if ((this.rootField == RegistryRootType.HKMU))
27832 {
27833 writer.WriteAttributeString("Root", "HKMU");
27834 }
27835 if ((this.rootField == RegistryRootType.HKCR))
27836 {
27837 writer.WriteAttributeString("Root", "HKCR");
27838 }
27839 if ((this.rootField == RegistryRootType.HKCU))
27840 {
27841 writer.WriteAttributeString("Root", "HKCU");
27842 }
27843 if ((this.rootField == RegistryRootType.HKLM))
27844 {
27845 writer.WriteAttributeString("Root", "HKLM");
27846 }
27847 if ((this.rootField == RegistryRootType.HKU))
27848 {
27849 writer.WriteAttributeString("Root", "HKU");
27850 }
27851 }
27852 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
27853 {
27854 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
27855 childElement.OutputXml(writer);
27856 }
27857 writer.WriteEndElement();
27858 }
27859
27860 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
27861 void ISetAttributes.SetAttribute(string name, string value)
27862 {
27863 if (String.IsNullOrEmpty(name))
27864 {
27865 throw new ArgumentNullException("name");
27866 }
27867 if (("Id" == name))
27868 {
27869 this.idField = value;
27870 this.idFieldSet = true;
27871 }
27872 if (("Action" == name))
27873 {
27874 this.actionField = RegistryKey.ParseActionType(value);
27875 this.actionFieldSet = true;
27876 }
27877 if (("ForceCreateOnInstall" == name))
27878 {
27879 this.forceCreateOnInstallField = Enums.ParseYesNoType(value);
27880 this.forceCreateOnInstallFieldSet = true;
27881 }
27882 if (("ForceDeleteOnUninstall" == name))
27883 {
27884 this.forceDeleteOnUninstallField = Enums.ParseYesNoType(value);
27885 this.forceDeleteOnUninstallFieldSet = true;
27886 }
27887 if (("Key" == name))
27888 {
27889 this.keyField = value;
27890 this.keyFieldSet = true;
27891 }
27892 if (("Root" == name))
27893 {
27894 this.rootField = Enums.ParseRegistryRootType(value);
27895 this.rootFieldSet = true;
27896 }
27897 }
27898
27899 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27900 public enum ActionType
27901 {
27902
27903 IllegalValue = int.MaxValue,
27904
27905 NotSet = -1,
27906
27907 /// <summary>
27908 /// Creates the key, if absent, when the parent component is installed.
27909 /// </summary>
27910 create,
27911
27912 /// <summary>
27913 /// Creates the key, if absent, when the parent component is installed then remove the key with all its values and subkeys when the parent component is uninstalled.
27914 /// Note that this value is useful only if your program creates additional values or subkeys under this key and you want an uninstall to remove them. MSI already
27915 /// removes all values and subkeys that it creates, so this option just adds additional overhead to uninstall.
27916 /// </summary>
27917 createAndRemoveOnUninstall,
27918
27919 /// <summary>
27920 /// Does nothing; this element is used merely in WiX authoring for organization and does nothing to the final output.
27921 /// This is the default value.
27922 /// </summary>
27923 none,
27924 }
27925 }
27926
27927 /// <summary>
27928 /// Used to create a registry value. For multi-string values, this can be used to prepend or append values.
27929 ///
27930 /// For legacy authoring: Use several of these elements to specify each registry value in a multiString registry value. This element
27931 /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The
27932 /// values should go in the text area of the RegistryValue element.
27933 /// </summary>
27934 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27935 public class RegistryValue : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
27936 {
27937
27938 private ElementCollection children;
27939
27940 private string idField;
27941
27942 private bool idFieldSet;
27943
27944 private RegistryRootType rootField;
27945
27946 private bool rootFieldSet;
27947
27948 private string keyField;
27949
27950 private bool keyFieldSet;
27951
27952 private string nameField;
27953
27954 private bool nameFieldSet;
27955
27956 private string valueField;
27957
27958 private bool valueFieldSet;
27959
27960 private TypeType typeField;
27961
27962 private bool typeFieldSet;
27963
27964 private ActionType actionField;
27965
27966 private bool actionFieldSet;
27967
27968 private YesNoType keyPathField;
27969
27970 private bool keyPathFieldSet;
27971
27972 private ISchemaElement parentElement;
27973
27974 public RegistryValue()
27975 {
27976 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
27977 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission)));
27978 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
27979 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MultiStringValue)));
27980 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
27981 this.children = childCollection0;
27982 }
27983
27984 public virtual IEnumerable Children
27985 {
27986 get
27987 {
27988 return this.children;
27989 }
27990 }
27991
27992 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
27993 public virtual IEnumerable this[System.Type childType]
27994 {
27995 get
27996 {
27997 return this.children.Filter(childType);
27998 }
27999 }
28000
28001 /// <summary>
28002 /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be
28003 /// generated by hashing the parent Component identifier, Root, Key, and Name.
28004 /// </summary>
28005 public string Id
28006 {
28007 get
28008 {
28009 return this.idField;
28010 }
28011 set
28012 {
28013 this.idFieldSet = true;
28014 this.idField = value;
28015 }
28016 }
28017
28018 /// <summary>
28019 /// The predefined root key for the registry value.
28020 /// </summary>
28021 public RegistryRootType Root
28022 {
28023 get
28024 {
28025 return this.rootField;
28026 }
28027 set
28028 {
28029 this.rootFieldSet = true;
28030 this.rootField = value;
28031 }
28032 }
28033
28034 /// <summary>
28035 /// The localizable key for the registry value.
28036 /// If the parent element is a RegistryKey, this value may be omitted to use the
28037 /// path of the parent, or if its specified it will be appended to the path of the parent.
28038 /// </summary>
28039 public string Key
28040 {
28041 get
28042 {
28043 return this.keyField;
28044 }
28045 set
28046 {
28047 this.keyFieldSet = true;
28048 this.keyField = value;
28049 }
28050 }
28051
28052 /// <summary>
28053 /// The localizable registry value name. If this attribute is not provided the default value for the registry key will
28054 /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not
28055 /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior.
28056 /// </summary>
28057 public string Name
28058 {
28059 get
28060 {
28061 return this.nameField;
28062 }
28063 set
28064 {
28065 this.nameFieldSet = true;
28066 this.nameField = value;
28067 }
28068 }
28069
28070 /// <summary>
28071 /// Set this attribute to the localizable registry value. This value is formatted. The Windows Installer allows
28072 /// several special values to be set for this attribute. You should not use them in WiX. Instead use appropriate
28073 /// values in the Type attribute to get the desired behavior.
28074 /// </summary>
28075 public string Value
28076 {
28077 get
28078 {
28079 return this.valueField;
28080 }
28081 set
28082 {
28083 this.valueFieldSet = true;
28084 this.valueField = value;
28085 }
28086 }
28087
28088 /// <summary>
28089 /// Set this attribute to the type of the desired registry key. This attribute must be specified whenever the Value
28090 /// attribute or a child RegistryValue element is specified. This attribute
28091 /// should only be set when the value of the Action attribute does not include the word 'remove'.
28092 /// </summary>
28093 public TypeType Type
28094 {
28095 get
28096 {
28097 return this.typeField;
28098 }
28099 set
28100 {
28101 this.typeFieldSet = true;
28102 this.typeField = value;
28103 }
28104 }
28105
28106 /// <summary>
28107 /// This is the action that will be taken for this registry value.
28108 /// </summary>
28109 public ActionType Action
28110 {
28111 get
28112 {
28113 return this.actionField;
28114 }
28115 set
28116 {
28117 this.actionFieldSet = true;
28118 this.actionField = value;
28119 }
28120 }
28121
28122 /// <summary>
28123 /// Set this attribute to 'yes' to make this registry key the KeyPath of the parent component.
28124 /// Only one resource (registry, file, etc) can be the KeyPath of a component.
28125 /// </summary>
28126 public YesNoType KeyPath
28127 {
28128 get
28129 {
28130 return this.keyPathField;
28131 }
28132 set
28133 {
28134 this.keyPathFieldSet = true;
28135 this.keyPathField = value;
28136 }
28137 }
28138
28139 public virtual ISchemaElement ParentElement
28140 {
28141 get
28142 {
28143 return this.parentElement;
28144 }
28145 set
28146 {
28147 this.parentElement = value;
28148 }
28149 }
28150
28151 public virtual void AddChild(ISchemaElement child)
28152 {
28153 if ((null == child))
28154 {
28155 throw new ArgumentNullException("child");
28156 }
28157 this.children.AddElement(child);
28158 child.ParentElement = this;
28159 }
28160
28161 public virtual void RemoveChild(ISchemaElement child)
28162 {
28163 if ((null == child))
28164 {
28165 throw new ArgumentNullException("child");
28166 }
28167 this.children.RemoveElement(child);
28168 child.ParentElement = null;
28169 }
28170
28171 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
28172 ISchemaElement ICreateChildren.CreateChild(string childName)
28173 {
28174 if (String.IsNullOrEmpty(childName))
28175 {
28176 throw new ArgumentNullException("childName");
28177 }
28178 ISchemaElement childValue = null;
28179 if (("Permission" == childName))
28180 {
28181 childValue = new Permission();
28182 }
28183 if (("PermissionEx" == childName))
28184 {
28185 childValue = new PermissionEx();
28186 }
28187 if (("MultiStringValue" == childName))
28188 {
28189 childValue = new MultiStringValue();
28190 }
28191 if ((null == childValue))
28192 {
28193 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
28194 }
28195 return childValue;
28196 }
28197
28198 /// <summary>
28199 /// Parses a TypeType from a string.
28200 /// </summary>
28201 public static TypeType ParseTypeType(string value)
28202 {
28203 TypeType parsedValue;
28204 RegistryValue.TryParseTypeType(value, out parsedValue);
28205 return parsedValue;
28206 }
28207
28208 /// <summary>
28209 /// Tries to parse a TypeType from a string.
28210 /// </summary>
28211 public static bool TryParseTypeType(string value, out TypeType parsedValue)
28212 {
28213 parsedValue = TypeType.NotSet;
28214 if (string.IsNullOrEmpty(value))
28215 {
28216 return false;
28217 }
28218 if (("string" == value))
28219 {
28220 parsedValue = TypeType.@string;
28221 }
28222 else
28223 {
28224 if (("integer" == value))
28225 {
28226 parsedValue = TypeType.integer;
28227 }
28228 else
28229 {
28230 if (("binary" == value))
28231 {
28232 parsedValue = TypeType.binary;
28233 }
28234 else
28235 {
28236 if (("expandable" == value))
28237 {
28238 parsedValue = TypeType.expandable;
28239 }
28240 else
28241 {
28242 if (("multiString" == value))
28243 {
28244 parsedValue = TypeType.multiString;
28245 }
28246 else
28247 {
28248 parsedValue = TypeType.IllegalValue;
28249 return false;
28250 }
28251 }
28252 }
28253 }
28254 }
28255 return true;
28256 }
28257
28258 /// <summary>
28259 /// Parses a ActionType from a string.
28260 /// </summary>
28261 public static ActionType ParseActionType(string value)
28262 {
28263 ActionType parsedValue;
28264 RegistryValue.TryParseActionType(value, out parsedValue);
28265 return parsedValue;
28266 }
28267
28268 /// <summary>
28269 /// Tries to parse a ActionType from a string.
28270 /// </summary>
28271 public static bool TryParseActionType(string value, out ActionType parsedValue)
28272 {
28273 parsedValue = ActionType.NotSet;
28274 if (string.IsNullOrEmpty(value))
28275 {
28276 return false;
28277 }
28278 if (("append" == value))
28279 {
28280 parsedValue = ActionType.append;
28281 }
28282 else
28283 {
28284 if (("prepend" == value))
28285 {
28286 parsedValue = ActionType.prepend;
28287 }
28288 else
28289 {
28290 if (("write" == value))
28291 {
28292 parsedValue = ActionType.write;
28293 }
28294 else
28295 {
28296 parsedValue = ActionType.IllegalValue;
28297 return false;
28298 }
28299 }
28300 }
28301 return true;
28302 }
28303
28304 /// <summary>
28305 /// Processes this element and all child elements into an XmlWriter.
28306 /// </summary>
28307 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
28308 public virtual void OutputXml(XmlWriter writer)
28309 {
28310 if ((null == writer))
28311 {
28312 throw new ArgumentNullException("writer");
28313 }
28314 writer.WriteStartElement("RegistryValue", "http://wixtoolset.org/schemas/v4/wxs");
28315 if (this.idFieldSet)
28316 {
28317 writer.WriteAttributeString("Id", this.idField);
28318 }
28319 if (this.rootFieldSet)
28320 {
28321 if ((this.rootField == RegistryRootType.HKMU))
28322 {
28323 writer.WriteAttributeString("Root", "HKMU");
28324 }
28325 if ((this.rootField == RegistryRootType.HKCR))
28326 {
28327 writer.WriteAttributeString("Root", "HKCR");
28328 }
28329 if ((this.rootField == RegistryRootType.HKCU))
28330 {
28331 writer.WriteAttributeString("Root", "HKCU");
28332 }
28333 if ((this.rootField == RegistryRootType.HKLM))
28334 {
28335 writer.WriteAttributeString("Root", "HKLM");
28336 }
28337 if ((this.rootField == RegistryRootType.HKU))
28338 {
28339 writer.WriteAttributeString("Root", "HKU");
28340 }
28341 }
28342 if (this.keyFieldSet)
28343 {
28344 writer.WriteAttributeString("Key", this.keyField);
28345 }
28346 if (this.nameFieldSet)
28347 {
28348 writer.WriteAttributeString("Name", this.nameField);
28349 }
28350 if (this.valueFieldSet)
28351 {
28352 writer.WriteAttributeString("Value", this.valueField);
28353 }
28354 if (this.typeFieldSet)
28355 {
28356 if ((this.typeField == TypeType.@string))
28357 {
28358 writer.WriteAttributeString("Type", "string");
28359 }
28360 if ((this.typeField == TypeType.integer))
28361 {
28362 writer.WriteAttributeString("Type", "integer");
28363 }
28364 if ((this.typeField == TypeType.binary))
28365 {
28366 writer.WriteAttributeString("Type", "binary");
28367 }
28368 if ((this.typeField == TypeType.expandable))
28369 {
28370 writer.WriteAttributeString("Type", "expandable");
28371 }
28372 if ((this.typeField == TypeType.multiString))
28373 {
28374 writer.WriteAttributeString("Type", "multiString");
28375 }
28376 }
28377 if (this.actionFieldSet)
28378 {
28379 if ((this.actionField == ActionType.append))
28380 {
28381 writer.WriteAttributeString("Action", "append");
28382 }
28383 if ((this.actionField == ActionType.prepend))
28384 {
28385 writer.WriteAttributeString("Action", "prepend");
28386 }
28387 if ((this.actionField == ActionType.write))
28388 {
28389 writer.WriteAttributeString("Action", "write");
28390 }
28391 }
28392 if (this.keyPathFieldSet)
28393 {
28394 if ((this.keyPathField == YesNoType.no))
28395 {
28396 writer.WriteAttributeString("KeyPath", "no");
28397 }
28398 if ((this.keyPathField == YesNoType.yes))
28399 {
28400 writer.WriteAttributeString("KeyPath", "yes");
28401 }
28402 }
28403 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
28404 {
28405 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
28406 childElement.OutputXml(writer);
28407 }
28408 writer.WriteEndElement();
28409 }
28410
28411 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
28412 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
28413 void ISetAttributes.SetAttribute(string name, string value)
28414 {
28415 if (String.IsNullOrEmpty(name))
28416 {
28417 throw new ArgumentNullException("name");
28418 }
28419 if (("Id" == name))
28420 {
28421 this.idField = value;
28422 this.idFieldSet = true;
28423 }
28424 if (("Root" == name))
28425 {
28426 this.rootField = Enums.ParseRegistryRootType(value);
28427 this.rootFieldSet = true;
28428 }
28429 if (("Key" == name))
28430 {
28431 this.keyField = value;
28432 this.keyFieldSet = true;
28433 }
28434 if (("Name" == name))
28435 {
28436 this.nameField = value;
28437 this.nameFieldSet = true;
28438 }
28439 if (("Value" == name))
28440 {
28441 this.valueField = value;
28442 this.valueFieldSet = true;
28443 }
28444 if (("Type" == name))
28445 {
28446 this.typeField = RegistryValue.ParseTypeType(value);
28447 this.typeFieldSet = true;
28448 }
28449 if (("Action" == name))
28450 {
28451 this.actionField = RegistryValue.ParseActionType(value);
28452 this.actionFieldSet = true;
28453 }
28454 if (("KeyPath" == name))
28455 {
28456 this.keyPathField = Enums.ParseYesNoType(value);
28457 this.keyPathFieldSet = true;
28458 }
28459 }
28460
28461 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28462 public enum TypeType
28463 {
28464
28465 IllegalValue = int.MaxValue,
28466
28467 NotSet = -1,
28468
28469 /// <summary>
28470 /// The value is interpreted and stored as a string (REG_SZ).
28471 /// </summary>
28472 @string,
28473
28474 /// <summary>
28475 /// The value is interpreted and stored as an integer (REG_DWORD).
28476 /// </summary>
28477 integer,
28478
28479 /// <summary>
28480 /// The value is interpreted and stored as a hexadecimal value (REG_BINARY).
28481 /// </summary>
28482 binary,
28483
28484 /// <summary>
28485 /// The value is interpreted and stored as an expandable string (REG_EXPAND_SZ).
28486 /// </summary>
28487 expandable,
28488
28489 /// <summary>
28490 /// The value is interpreted and stored as a multiple strings (REG_MULTI_SZ).
28491 /// Please note that this value will only result in a multi-string value if there is more than one registry value
28492 /// or the Action attribute's value is 'append' or 'prepend'. Otherwise a string value will be created.
28493 /// </summary>
28494 multiString,
28495 }
28496
28497 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28498 public enum ActionType
28499 {
28500
28501 IllegalValue = int.MaxValue,
28502
28503 NotSet = -1,
28504
28505 /// <summary>
28506 /// Appends the specified value(s) to a multiString registry value.
28507 /// </summary>
28508 append,
28509
28510 /// <summary>
28511 /// Prepends the specified value(s) to a multiString registry value.
28512 /// </summary>
28513 prepend,
28514
28515 /// <summary>
28516 /// Writes a registry value. This is the default value.
28517 /// </summary>
28518 write,
28519 }
28520 }
28521
28522 /// <summary>
28523 /// Used for removing registry keys and all child keys either during install or uninstall.
28524 /// </summary>
28525 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28526 public class RemoveRegistryKey : ISchemaElement, ISetAttributes
28527 {
28528
28529 private string idField;
28530
28531 private bool idFieldSet;
28532
28533 private ActionType actionField;
28534
28535 private bool actionFieldSet;
28536
28537 private string keyField;
28538
28539 private bool keyFieldSet;
28540
28541 private RegistryRootType rootField;
28542
28543 private bool rootFieldSet;
28544
28545 private ISchemaElement parentElement;
28546
28547 /// <summary>
28548 /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be
28549 /// generated by hashing the parent Component identifier, Root, Key, and Name.
28550 /// </summary>
28551 public string Id
28552 {
28553 get
28554 {
28555 return this.idField;
28556 }
28557 set
28558 {
28559 this.idFieldSet = true;
28560 this.idField = value;
28561 }
28562 }
28563
28564 /// <summary>
28565 /// This is the action that will be taken for this registry value.
28566 /// </summary>
28567 public ActionType Action
28568 {
28569 get
28570 {
28571 return this.actionField;
28572 }
28573 set
28574 {
28575 this.actionFieldSet = true;
28576 this.actionField = value;
28577 }
28578 }
28579
28580 /// <summary>
28581 /// The localizable key for the registry value.
28582 /// </summary>
28583 public string Key
28584 {
28585 get
28586 {
28587 return this.keyField;
28588 }
28589 set
28590 {
28591 this.keyFieldSet = true;
28592 this.keyField = value;
28593 }
28594 }
28595
28596 /// <summary>
28597 /// The predefined root key for the registry value.
28598 /// </summary>
28599 public RegistryRootType Root
28600 {
28601 get
28602 {
28603 return this.rootField;
28604 }
28605 set
28606 {
28607 this.rootFieldSet = true;
28608 this.rootField = value;
28609 }
28610 }
28611
28612 public virtual ISchemaElement ParentElement
28613 {
28614 get
28615 {
28616 return this.parentElement;
28617 }
28618 set
28619 {
28620 this.parentElement = value;
28621 }
28622 }
28623
28624 /// <summary>
28625 /// Parses a ActionType from a string.
28626 /// </summary>
28627 public static ActionType ParseActionType(string value)
28628 {
28629 ActionType parsedValue;
28630 RemoveRegistryKey.TryParseActionType(value, out parsedValue);
28631 return parsedValue;
28632 }
28633
28634 /// <summary>
28635 /// Tries to parse a ActionType from a string.
28636 /// </summary>
28637 public static bool TryParseActionType(string value, out ActionType parsedValue)
28638 {
28639 parsedValue = ActionType.NotSet;
28640 if (string.IsNullOrEmpty(value))
28641 {
28642 return false;
28643 }
28644 if (("removeOnInstall" == value))
28645 {
28646 parsedValue = ActionType.removeOnInstall;
28647 }
28648 else
28649 {
28650 if (("removeOnUninstall" == value))
28651 {
28652 parsedValue = ActionType.removeOnUninstall;
28653 }
28654 else
28655 {
28656 parsedValue = ActionType.IllegalValue;
28657 return false;
28658 }
28659 }
28660 return true;
28661 }
28662
28663 /// <summary>
28664 /// Processes this element and all child elements into an XmlWriter.
28665 /// </summary>
28666 public virtual void OutputXml(XmlWriter writer)
28667 {
28668 if ((null == writer))
28669 {
28670 throw new ArgumentNullException("writer");
28671 }
28672 writer.WriteStartElement("RemoveRegistryKey", "http://wixtoolset.org/schemas/v4/wxs");
28673 if (this.idFieldSet)
28674 {
28675 writer.WriteAttributeString("Id", this.idField);
28676 }
28677 if (this.actionFieldSet)
28678 {
28679 if ((this.actionField == ActionType.removeOnInstall))
28680 {
28681 writer.WriteAttributeString("Action", "removeOnInstall");
28682 }
28683 if ((this.actionField == ActionType.removeOnUninstall))
28684 {
28685 writer.WriteAttributeString("Action", "removeOnUninstall");
28686 }
28687 }
28688 if (this.keyFieldSet)
28689 {
28690 writer.WriteAttributeString("Key", this.keyField);
28691 }
28692 if (this.rootFieldSet)
28693 {
28694 if ((this.rootField == RegistryRootType.HKMU))
28695 {
28696 writer.WriteAttributeString("Root", "HKMU");
28697 }
28698 if ((this.rootField == RegistryRootType.HKCR))
28699 {
28700 writer.WriteAttributeString("Root", "HKCR");
28701 }
28702 if ((this.rootField == RegistryRootType.HKCU))
28703 {
28704 writer.WriteAttributeString("Root", "HKCU");
28705 }
28706 if ((this.rootField == RegistryRootType.HKLM))
28707 {
28708 writer.WriteAttributeString("Root", "HKLM");
28709 }
28710 if ((this.rootField == RegistryRootType.HKU))
28711 {
28712 writer.WriteAttributeString("Root", "HKU");
28713 }
28714 }
28715 writer.WriteEndElement();
28716 }
28717
28718 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
28719 void ISetAttributes.SetAttribute(string name, string value)
28720 {
28721 if (String.IsNullOrEmpty(name))
28722 {
28723 throw new ArgumentNullException("name");
28724 }
28725 if (("Id" == name))
28726 {
28727 this.idField = value;
28728 this.idFieldSet = true;
28729 }
28730 if (("Action" == name))
28731 {
28732 this.actionField = RemoveRegistryKey.ParseActionType(value);
28733 this.actionFieldSet = true;
28734 }
28735 if (("Key" == name))
28736 {
28737 this.keyField = value;
28738 this.keyFieldSet = true;
28739 }
28740 if (("Root" == name))
28741 {
28742 this.rootField = Enums.ParseRegistryRootType(value);
28743 this.rootFieldSet = true;
28744 }
28745 }
28746
28747 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28748 public enum ActionType
28749 {
28750
28751 IllegalValue = int.MaxValue,
28752
28753 NotSet = -1,
28754
28755 /// <summary>
28756 /// Removes a key with all its values and subkeys when the parent component is installed.
28757 /// </summary>
28758 removeOnInstall,
28759
28760 /// <summary>
28761 /// Removes a key with all its values and subkeys when the parent component is uninstalled.
28762 /// </summary>
28763 removeOnUninstall,
28764 }
28765 }
28766
28767 /// <summary>
28768 /// Used to remove a registry value during installation.
28769 /// There is no standard way to remove a single registry value during uninstall (but you can remove an entire key with RemoveRegistryKey).
28770 /// </summary>
28771 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28772 public class RemoveRegistryValue : ISchemaElement, ISetAttributes
28773 {
28774
28775 private string idField;
28776
28777 private bool idFieldSet;
28778
28779 private string keyField;
28780
28781 private bool keyFieldSet;
28782
28783 private string nameField;
28784
28785 private bool nameFieldSet;
28786
28787 private RegistryRootType rootField;
28788
28789 private bool rootFieldSet;
28790
28791 private ISchemaElement parentElement;
28792
28793 /// <summary>
28794 /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be
28795 /// generated by hashing the parent Component identifier, Root, Key, and Name.
28796 /// </summary>
28797 public string Id
28798 {
28799 get
28800 {
28801 return this.idField;
28802 }
28803 set
28804 {
28805 this.idFieldSet = true;
28806 this.idField = value;
28807 }
28808 }
28809
28810 /// <summary>
28811 /// The localizable key for the registry value.
28812 /// If the parent element is a RegistryKey, this value may be omitted to use the
28813 /// path of the parent, or if its specified it will be appended to the path of the parent.
28814 /// </summary>
28815 public string Key
28816 {
28817 get
28818 {
28819 return this.keyField;
28820 }
28821 set
28822 {
28823 this.keyFieldSet = true;
28824 this.keyField = value;
28825 }
28826 }
28827
28828 /// <summary>
28829 /// The localizable registry value name. If this attribute is not provided the default value for the registry key will
28830 /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not
28831 /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior.
28832 /// </summary>
28833 public string Name
28834 {
28835 get
28836 {
28837 return this.nameField;
28838 }
28839 set
28840 {
28841 this.nameFieldSet = true;
28842 this.nameField = value;
28843 }
28844 }
28845
28846 /// <summary>
28847 /// The predefined root key for the registry value.
28848 /// </summary>
28849 public RegistryRootType Root
28850 {
28851 get
28852 {
28853 return this.rootField;
28854 }
28855 set
28856 {
28857 this.rootFieldSet = true;
28858 this.rootField = value;
28859 }
28860 }
28861
28862 public virtual ISchemaElement ParentElement
28863 {
28864 get
28865 {
28866 return this.parentElement;
28867 }
28868 set
28869 {
28870 this.parentElement = value;
28871 }
28872 }
28873
28874 /// <summary>
28875 /// Processes this element and all child elements into an XmlWriter.
28876 /// </summary>
28877 public virtual void OutputXml(XmlWriter writer)
28878 {
28879 if ((null == writer))
28880 {
28881 throw new ArgumentNullException("writer");
28882 }
28883 writer.WriteStartElement("RemoveRegistryValue", "http://wixtoolset.org/schemas/v4/wxs");
28884 if (this.idFieldSet)
28885 {
28886 writer.WriteAttributeString("Id", this.idField);
28887 }
28888 if (this.keyFieldSet)
28889 {
28890 writer.WriteAttributeString("Key", this.keyField);
28891 }
28892 if (this.nameFieldSet)
28893 {
28894 writer.WriteAttributeString("Name", this.nameField);
28895 }
28896 if (this.rootFieldSet)
28897 {
28898 if ((this.rootField == RegistryRootType.HKMU))
28899 {
28900 writer.WriteAttributeString("Root", "HKMU");
28901 }
28902 if ((this.rootField == RegistryRootType.HKCR))
28903 {
28904 writer.WriteAttributeString("Root", "HKCR");
28905 }
28906 if ((this.rootField == RegistryRootType.HKCU))
28907 {
28908 writer.WriteAttributeString("Root", "HKCU");
28909 }
28910 if ((this.rootField == RegistryRootType.HKLM))
28911 {
28912 writer.WriteAttributeString("Root", "HKLM");
28913 }
28914 if ((this.rootField == RegistryRootType.HKU))
28915 {
28916 writer.WriteAttributeString("Root", "HKU");
28917 }
28918 }
28919 writer.WriteEndElement();
28920 }
28921
28922 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
28923 void ISetAttributes.SetAttribute(string name, string value)
28924 {
28925 if (String.IsNullOrEmpty(name))
28926 {
28927 throw new ArgumentNullException("name");
28928 }
28929 if (("Id" == name))
28930 {
28931 this.idField = value;
28932 this.idFieldSet = true;
28933 }
28934 if (("Key" == name))
28935 {
28936 this.keyField = value;
28937 this.keyFieldSet = true;
28938 }
28939 if (("Name" == name))
28940 {
28941 this.nameField = value;
28942 this.nameFieldSet = true;
28943 }
28944 if (("Root" == name))
28945 {
28946 this.rootField = Enums.ParseRegistryRootType(value);
28947 this.rootFieldSet = true;
28948 }
28949 }
28950 }
28951
28952 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28953 public class Registry : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
28954 {
28955
28956 private ElementCollection children;
28957
28958 private string idField;
28959
28960 private bool idFieldSet;
28961
28962 private ActionType actionField;
28963
28964 private bool actionFieldSet;
28965
28966 private string keyField;
28967
28968 private bool keyFieldSet;
28969
28970 private YesNoType keyPathField;
28971
28972 private bool keyPathFieldSet;
28973
28974 private string nameField;
28975
28976 private bool nameFieldSet;
28977
28978 private RegistryRootType rootField;
28979
28980 private bool rootFieldSet;
28981
28982 private TypeType typeField;
28983
28984 private bool typeFieldSet;
28985
28986 private string valueField;
28987
28988 private bool valueFieldSet;
28989
28990 private ISchemaElement parentElement;
28991
28992 public Registry()
28993 {
28994 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
28995 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission)));
28996 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
28997 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue)));
28998 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Registry)));
28999 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
29000 this.children = childCollection0;
29001 }
29002
29003 public virtual IEnumerable Children
29004 {
29005 get
29006 {
29007 return this.children;
29008 }
29009 }
29010
29011 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
29012 public virtual IEnumerable this[System.Type childType]
29013 {
29014 get
29015 {
29016 return this.children.Filter(childType);
29017 }
29018 }
29019
29020 /// <summary>
29021 /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be
29022 /// generated by hashing the parent Component identifier, Root, Key, and Name.
29023 /// </summary>
29024 public string Id
29025 {
29026 get
29027 {
29028 return this.idField;
29029 }
29030 set
29031 {
29032 this.idFieldSet = true;
29033 this.idField = value;
29034 }
29035 }
29036
29037 /// <summary>
29038 /// This is the action that will be taken for this registry key.
29039 /// </summary>
29040 public ActionType Action
29041 {
29042 get
29043 {
29044 return this.actionField;
29045 }
29046 set
29047 {
29048 this.actionFieldSet = true;
29049 this.actionField = value;
29050 }
29051 }
29052
29053 /// <summary>
29054 /// The localizable key for the registry value.
29055 /// </summary>
29056 public string Key
29057 {
29058 get
29059 {
29060 return this.keyField;
29061 }
29062 set
29063 {
29064 this.keyFieldSet = true;
29065 this.keyField = value;
29066 }
29067 }
29068
29069 /// <summary>
29070 /// Set this attribute to 'yes' to make this registry key the KeyPath of the parent component. Only one resource (registry,
29071 /// file, etc) can be the KeyPath of a component.
29072 /// </summary>
29073 public YesNoType KeyPath
29074 {
29075 get
29076 {
29077 return this.keyPathField;
29078 }
29079 set
29080 {
29081 this.keyPathFieldSet = true;
29082 this.keyPathField = value;
29083 }
29084 }
29085
29086 /// <summary>
29087 /// The localizable registry value name. If this attribute is not provided the default value for the registry key will
29088 /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not
29089 /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior.
29090 /// </summary>
29091 public string Name
29092 {
29093 get
29094 {
29095 return this.nameField;
29096 }
29097 set
29098 {
29099 this.nameFieldSet = true;
29100 this.nameField = value;
29101 }
29102 }
29103
29104 /// <summary>
29105 /// The predefined root key for the registry value.
29106 /// </summary>
29107 public RegistryRootType Root
29108 {
29109 get
29110 {
29111 return this.rootField;
29112 }
29113 set
29114 {
29115 this.rootFieldSet = true;
29116 this.rootField = value;
29117 }
29118 }
29119
29120 /// <summary>
29121 /// Set this attribute to the type of the desired registry key. This attribute must be specified whenever the Value
29122 /// attribute or a child RegistryValue element is specified. This attribute
29123 /// should only be set when the value of the Action attribute does not include the word 'remove'.
29124 /// </summary>
29125 public TypeType Type
29126 {
29127 get
29128 {
29129 return this.typeField;
29130 }
29131 set
29132 {
29133 this.typeFieldSet = true;
29134 this.typeField = value;
29135 }
29136 }
29137
29138 /// <summary>
29139 /// Set this attribute to the localizable registry value. This value is formatted. The Windows Installer allows
29140 /// several special values to be set for this attribute. You should not use them in WiX. Instead use appropriate
29141 /// values in the Type attribute to get the desired behavior. This attribute cannot be specified if the Action
29142 /// attribute's value contains the word 'remove'.
29143 /// </summary>
29144 public string Value
29145 {
29146 get
29147 {
29148 return this.valueField;
29149 }
29150 set
29151 {
29152 this.valueFieldSet = true;
29153 this.valueField = value;
29154 }
29155 }
29156
29157 public virtual ISchemaElement ParentElement
29158 {
29159 get
29160 {
29161 return this.parentElement;
29162 }
29163 set
29164 {
29165 this.parentElement = value;
29166 }
29167 }
29168
29169 public virtual void AddChild(ISchemaElement child)
29170 {
29171 if ((null == child))
29172 {
29173 throw new ArgumentNullException("child");
29174 }
29175 this.children.AddElement(child);
29176 child.ParentElement = this;
29177 }
29178
29179 public virtual void RemoveChild(ISchemaElement child)
29180 {
29181 if ((null == child))
29182 {
29183 throw new ArgumentNullException("child");
29184 }
29185 this.children.RemoveElement(child);
29186 child.ParentElement = null;
29187 }
29188
29189 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
29190 ISchemaElement ICreateChildren.CreateChild(string childName)
29191 {
29192 if (String.IsNullOrEmpty(childName))
29193 {
29194 throw new ArgumentNullException("childName");
29195 }
29196 ISchemaElement childValue = null;
29197 if (("Permission" == childName))
29198 {
29199 childValue = new Permission();
29200 }
29201 if (("PermissionEx" == childName))
29202 {
29203 childValue = new PermissionEx();
29204 }
29205 if (("RegistryValue" == childName))
29206 {
29207 childValue = new RegistryValue();
29208 }
29209 if (("Registry" == childName))
29210 {
29211 childValue = new Registry();
29212 }
29213 if ((null == childValue))
29214 {
29215 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
29216 }
29217 return childValue;
29218 }
29219
29220 /// <summary>
29221 /// Parses a ActionType from a string.
29222 /// </summary>
29223 public static ActionType ParseActionType(string value)
29224 {
29225 ActionType parsedValue;
29226 Registry.TryParseActionType(value, out parsedValue);
29227 return parsedValue;
29228 }
29229
29230 /// <summary>
29231 /// Tries to parse a ActionType from a string.
29232 /// </summary>
29233 public static bool TryParseActionType(string value, out ActionType parsedValue)
29234 {
29235 parsedValue = ActionType.NotSet;
29236 if (string.IsNullOrEmpty(value))
29237 {
29238 return false;
29239 }
29240 if (("append" == value))
29241 {
29242 parsedValue = ActionType.append;
29243 }
29244 else
29245 {
29246 if (("createKey" == value))
29247 {
29248 parsedValue = ActionType.createKey;
29249 }
29250 else
29251 {
29252 if (("createKeyAndRemoveKeyOnUninstall" == value))
29253 {
29254 parsedValue = ActionType.createKeyAndRemoveKeyOnUninstall;
29255 }
29256 else
29257 {
29258 if (("prepend" == value))
29259 {
29260 parsedValue = ActionType.prepend;
29261 }
29262 else
29263 {
29264 if (("remove" == value))
29265 {
29266 parsedValue = ActionType.remove;
29267 }
29268 else
29269 {
29270 if (("removeKeyOnInstall" == value))
29271 {
29272 parsedValue = ActionType.removeKeyOnInstall;
29273 }
29274 else
29275 {
29276 if (("removeKeyOnUninstall" == value))
29277 {
29278 parsedValue = ActionType.removeKeyOnUninstall;
29279 }
29280 else
29281 {
29282 if (("write" == value))
29283 {
29284 parsedValue = ActionType.write;
29285 }
29286 else
29287 {
29288 parsedValue = ActionType.IllegalValue;
29289 return false;
29290 }
29291 }
29292 }
29293 }
29294 }
29295 }
29296 }
29297 }
29298 return true;
29299 }
29300
29301 /// <summary>
29302 /// Parses a TypeType from a string.
29303 /// </summary>
29304 public static TypeType ParseTypeType(string value)
29305 {
29306 TypeType parsedValue;
29307 Registry.TryParseTypeType(value, out parsedValue);
29308 return parsedValue;
29309 }
29310
29311 /// <summary>
29312 /// Tries to parse a TypeType from a string.
29313 /// </summary>
29314 public static bool TryParseTypeType(string value, out TypeType parsedValue)
29315 {
29316 parsedValue = TypeType.NotSet;
29317 if (string.IsNullOrEmpty(value))
29318 {
29319 return false;
29320 }
29321 if (("string" == value))
29322 {
29323 parsedValue = TypeType.@string;
29324 }
29325 else
29326 {
29327 if (("integer" == value))
29328 {
29329 parsedValue = TypeType.integer;
29330 }
29331 else
29332 {
29333 if (("binary" == value))
29334 {
29335 parsedValue = TypeType.binary;
29336 }
29337 else
29338 {
29339 if (("expandable" == value))
29340 {
29341 parsedValue = TypeType.expandable;
29342 }
29343 else
29344 {
29345 if (("multiString" == value))
29346 {
29347 parsedValue = TypeType.multiString;
29348 }
29349 else
29350 {
29351 parsedValue = TypeType.IllegalValue;
29352 return false;
29353 }
29354 }
29355 }
29356 }
29357 }
29358 return true;
29359 }
29360
29361 /// <summary>
29362 /// Processes this element and all child elements into an XmlWriter.
29363 /// </summary>
29364 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
29365 public virtual void OutputXml(XmlWriter writer)
29366 {
29367 if ((null == writer))
29368 {
29369 throw new ArgumentNullException("writer");
29370 }
29371 writer.WriteStartElement("Registry", "http://wixtoolset.org/schemas/v4/wxs");
29372 if (this.idFieldSet)
29373 {
29374 writer.WriteAttributeString("Id", this.idField);
29375 }
29376 if (this.actionFieldSet)
29377 {
29378 if ((this.actionField == ActionType.append))
29379 {
29380 writer.WriteAttributeString("Action", "append");
29381 }
29382 if ((this.actionField == ActionType.createKey))
29383 {
29384 writer.WriteAttributeString("Action", "createKey");
29385 }
29386 if ((this.actionField == ActionType.createKeyAndRemoveKeyOnUninstall))
29387 {
29388 writer.WriteAttributeString("Action", "createKeyAndRemoveKeyOnUninstall");
29389 }
29390 if ((this.actionField == ActionType.prepend))
29391 {
29392 writer.WriteAttributeString("Action", "prepend");
29393 }
29394 if ((this.actionField == ActionType.remove))
29395 {
29396 writer.WriteAttributeString("Action", "remove");
29397 }
29398 if ((this.actionField == ActionType.removeKeyOnInstall))
29399 {
29400 writer.WriteAttributeString("Action", "removeKeyOnInstall");
29401 }
29402 if ((this.actionField == ActionType.removeKeyOnUninstall))
29403 {
29404 writer.WriteAttributeString("Action", "removeKeyOnUninstall");
29405 }
29406 if ((this.actionField == ActionType.write))
29407 {
29408 writer.WriteAttributeString("Action", "write");
29409 }
29410 }
29411 if (this.keyFieldSet)
29412 {
29413 writer.WriteAttributeString("Key", this.keyField);
29414 }
29415 if (this.keyPathFieldSet)
29416 {
29417 if ((this.keyPathField == YesNoType.no))
29418 {
29419 writer.WriteAttributeString("KeyPath", "no");
29420 }
29421 if ((this.keyPathField == YesNoType.yes))
29422 {
29423 writer.WriteAttributeString("KeyPath", "yes");
29424 }
29425 }
29426 if (this.nameFieldSet)
29427 {
29428 writer.WriteAttributeString("Name", this.nameField);
29429 }
29430 if (this.rootFieldSet)
29431 {
29432 if ((this.rootField == RegistryRootType.HKMU))
29433 {
29434 writer.WriteAttributeString("Root", "HKMU");
29435 }
29436 if ((this.rootField == RegistryRootType.HKCR))
29437 {
29438 writer.WriteAttributeString("Root", "HKCR");
29439 }
29440 if ((this.rootField == RegistryRootType.HKCU))
29441 {
29442 writer.WriteAttributeString("Root", "HKCU");
29443 }
29444 if ((this.rootField == RegistryRootType.HKLM))
29445 {
29446 writer.WriteAttributeString("Root", "HKLM");
29447 }
29448 if ((this.rootField == RegistryRootType.HKU))
29449 {
29450 writer.WriteAttributeString("Root", "HKU");
29451 }
29452 }
29453 if (this.typeFieldSet)
29454 {
29455 if ((this.typeField == TypeType.@string))
29456 {
29457 writer.WriteAttributeString("Type", "string");
29458 }
29459 if ((this.typeField == TypeType.integer))
29460 {
29461 writer.WriteAttributeString("Type", "integer");
29462 }
29463 if ((this.typeField == TypeType.binary))
29464 {
29465 writer.WriteAttributeString("Type", "binary");
29466 }
29467 if ((this.typeField == TypeType.expandable))
29468 {
29469 writer.WriteAttributeString("Type", "expandable");
29470 }
29471 if ((this.typeField == TypeType.multiString))
29472 {
29473 writer.WriteAttributeString("Type", "multiString");
29474 }
29475 }
29476 if (this.valueFieldSet)
29477 {
29478 writer.WriteAttributeString("Value", this.valueField);
29479 }
29480 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
29481 {
29482 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
29483 childElement.OutputXml(writer);
29484 }
29485 writer.WriteEndElement();
29486 }
29487
29488 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
29489 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
29490 void ISetAttributes.SetAttribute(string name, string value)
29491 {
29492 if (String.IsNullOrEmpty(name))
29493 {
29494 throw new ArgumentNullException("name");
29495 }
29496 if (("Id" == name))
29497 {
29498 this.idField = value;
29499 this.idFieldSet = true;
29500 }
29501 if (("Action" == name))
29502 {
29503 this.actionField = Registry.ParseActionType(value);
29504 this.actionFieldSet = true;
29505 }
29506 if (("Key" == name))
29507 {
29508 this.keyField = value;
29509 this.keyFieldSet = true;
29510 }
29511 if (("KeyPath" == name))
29512 {
29513 this.keyPathField = Enums.ParseYesNoType(value);
29514 this.keyPathFieldSet = true;
29515 }
29516 if (("Name" == name))
29517 {
29518 this.nameField = value;
29519 this.nameFieldSet = true;
29520 }
29521 if (("Root" == name))
29522 {
29523 this.rootField = Enums.ParseRegistryRootType(value);
29524 this.rootFieldSet = true;
29525 }
29526 if (("Type" == name))
29527 {
29528 this.typeField = Registry.ParseTypeType(value);
29529 this.typeFieldSet = true;
29530 }
29531 if (("Value" == name))
29532 {
29533 this.valueField = value;
29534 this.valueFieldSet = true;
29535 }
29536 }
29537
29538 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
29539 public enum ActionType
29540 {
29541
29542 IllegalValue = int.MaxValue,
29543
29544 NotSet = -1,
29545
29546 /// <summary>
29547 /// Appends the specified value(s) to a multiString registry key.
29548 /// </summary>
29549 append,
29550
29551 /// <summary>
29552 /// Creates the key, if absent, when the parent component is installed.
29553 /// </summary>
29554 createKey,
29555
29556 /// <summary>
29557 /// Creates the key, if absent, when the parent component is installed then remove the key with all its values and subkeys when the parent component is uninstalled.
29558 /// </summary>
29559 createKeyAndRemoveKeyOnUninstall,
29560
29561 /// <summary>
29562 /// Prepends the specified value(s) to a multiString registry key.
29563 /// </summary>
29564 prepend,
29565
29566 /// <summary>
29567 /// Removes a registry name when the parent component is installed.
29568 /// </summary>
29569 remove,
29570
29571 /// <summary>
29572 /// Removes a key with all its values and subkeys when the parent component is installed.
29573 /// </summary>
29574 removeKeyOnInstall,
29575
29576 /// <summary>
29577 /// Removes a key with all its values and subkeys when the parent component is uninstalled.
29578 /// </summary>
29579 removeKeyOnUninstall,
29580
29581 /// <summary>
29582 /// Writes a registry value.
29583 /// </summary>
29584 write,
29585 }
29586
29587 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
29588 public enum TypeType
29589 {
29590
29591 IllegalValue = int.MaxValue,
29592
29593 NotSet = -1,
29594
29595 /// <summary>
29596 /// The value is interpreted and stored as a string (REG_SZ).
29597 /// </summary>
29598 @string,
29599
29600 /// <summary>
29601 /// The value is interpreted and stored as an integer (REG_DWORD).
29602 /// </summary>
29603 integer,
29604
29605 /// <summary>
29606 /// The value is interpreted and stored as a hexadecimal value (REG_BINARY).
29607 /// </summary>
29608 binary,
29609
29610 /// <summary>
29611 /// The value is interpreted and stored as an expandable string (REG_EXPAND_SZ).
29612 /// </summary>
29613 expandable,
29614
29615 /// <summary>
29616 /// The value is interpreted and stored as a multiple strings (REG_MULTI_SZ).
29617 /// Please note that this value will only result in a multi-string value if there is more than one registry value
29618 /// or the Action attribute's value is 'append' or 'prepend'. Otherwise a string value will be created.
29619 /// </summary>
29620 multiString,
29621 }
29622 }
29623
29624 /// <summary>
29625 /// Remove a file(s) if the parent component is selected for installation or removal. Multiple files can be removed
29626 /// by specifying a wildcard for the value of the Name attribute. By default, the source
29627 /// directory of the file is the directory of the parent component. This can be overridden by specifying the
29628 /// Directory attribute with a value corresponding to the Id of the source directory, or by specifying the Property
29629 /// attribute with a value corresponding to a property that will have a value that resolves to the full path
29630 /// to the source directory.
29631 /// </summary>
29632 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
29633 public class RemoveFile : ISchemaElement, ISetAttributes
29634 {
29635
29636 private string idField;
29637
29638 private bool idFieldSet;
29639
29640 private string directoryField;
29641
29642 private bool directoryFieldSet;
29643
29644 private string propertyField;
29645
29646 private bool propertyFieldSet;
29647
29648 private string nameField;
29649
29650 private bool nameFieldSet;
29651
29652 private string shortNameField;
29653
29654 private bool shortNameFieldSet;
29655
29656 private InstallUninstallType onField;
29657
29658 private bool onFieldSet;
29659
29660 private ISchemaElement parentElement;
29661
29662 /// <summary>
29663 /// Primary key used to identify this particular entry.
29664 /// </summary>
29665 public string Id
29666 {
29667 get
29668 {
29669 return this.idField;
29670 }
29671 set
29672 {
29673 this.idFieldSet = true;
29674 this.idField = value;
29675 }
29676 }
29677
29678 /// <summary>
29679 /// Overrides the directory of the parent component with a specific Directory. This Directory must exist in the
29680 /// installer database at creation time. This attribute cannot be specified in conjunction with the Property attribute.
29681 /// </summary>
29682 public string Directory
29683 {
29684 get
29685 {
29686 return this.directoryField;
29687 }
29688 set
29689 {
29690 this.directoryFieldSet = true;
29691 this.directoryField = value;
29692 }
29693 }
29694
29695 /// <summary>
29696 /// Overrides the directory of the parent component with the value of the specified property. The property
29697 /// should have a value that resolves to the full path of the source directory. The property does not have
29698 /// to exist in the installer database at creation time; it could be created at installation time by a custom
29699 /// action, on the command line, etc. This attribute cannot be specified in conjunction with the Directory attribute.
29700 /// </summary>
29701 public string Property
29702 {
29703 get
29704 {
29705 return this.propertyField;
29706 }
29707 set
29708 {
29709 this.propertyFieldSet = true;
29710 this.propertyField = value;
29711 }
29712 }
29713
29714 /// <summary>
29715 /// This value should be set to the localizable name of the file(s) to be removed. All of the files that
29716 /// match the wild card will be removed from the specified directory. The value is a filename that may also
29717 /// contain the wild card characters "?" for any single character or "*" for zero or more occurrences of any character.
29718 /// In prior versions of the WiX toolset, this attribute specified the short file name.
29719 /// This attribute's value may now be either a short or long file name.
29720 /// If a short file name is specified, the ShortName attribute may not be specified.
29721 /// Also, if this value is a long file name, the ShortName attribute may be omitted to
29722 /// allow WiX to attempt to generate a unique short file name.
29723 /// However, if you wish to manually specify the short file name, then the ShortName attribute may be specified.
29724 /// </summary>
29725 public string Name
29726 {
29727 get
29728 {
29729 return this.nameField;
29730 }
29731 set
29732 {
29733 this.nameFieldSet = true;
29734 this.nameField = value;
29735 }
29736 }
29737
29738 /// <summary>
29739 /// The short file name of the file in 8.3 format.
29740 /// This attribute should only be set if you want to manually specify the short file name.
29741 /// </summary>
29742 public string ShortName
29743 {
29744 get
29745 {
29746 return this.shortNameField;
29747 }
29748 set
29749 {
29750 this.shortNameFieldSet = true;
29751 this.shortNameField = value;
29752 }
29753 }
29754
29755 /// <summary>
29756 /// This value determines the time at which the file(s) may be removed. For 'install', the file will
29757 /// be removed only when the parent component is being installed (msiInstallStateLocal or
29758 /// msiInstallStateSource); for 'uninstall', the file will be removed only when the parent component
29759 /// is being removed (msiInstallStateAbsent); for 'both', the file will be removed in both cases.
29760 /// </summary>
29761 public InstallUninstallType On
29762 {
29763 get
29764 {
29765 return this.onField;
29766 }
29767 set
29768 {
29769 this.onFieldSet = true;
29770 this.onField = value;
29771 }
29772 }
29773
29774 public virtual ISchemaElement ParentElement
29775 {
29776 get
29777 {
29778 return this.parentElement;
29779 }
29780 set
29781 {
29782 this.parentElement = value;
29783 }
29784 }
29785
29786 /// <summary>
29787 /// Processes this element and all child elements into an XmlWriter.
29788 /// </summary>
29789 public virtual void OutputXml(XmlWriter writer)
29790 {
29791 if ((null == writer))
29792 {
29793 throw new ArgumentNullException("writer");
29794 }
29795 writer.WriteStartElement("RemoveFile", "http://wixtoolset.org/schemas/v4/wxs");
29796 if (this.idFieldSet)
29797 {
29798 writer.WriteAttributeString("Id", this.idField);
29799 }
29800 if (this.directoryFieldSet)
29801 {
29802 writer.WriteAttributeString("Directory", this.directoryField);
29803 }
29804 if (this.propertyFieldSet)
29805 {
29806 writer.WriteAttributeString("Property", this.propertyField);
29807 }
29808 if (this.nameFieldSet)
29809 {
29810 writer.WriteAttributeString("Name", this.nameField);
29811 }
29812 if (this.shortNameFieldSet)
29813 {
29814 writer.WriteAttributeString("ShortName", this.shortNameField);
29815 }
29816 if (this.onFieldSet)
29817 {
29818 if ((this.onField == InstallUninstallType.install))
29819 {
29820 writer.WriteAttributeString("On", "install");
29821 }
29822 if ((this.onField == InstallUninstallType.uninstall))
29823 {
29824 writer.WriteAttributeString("On", "uninstall");
29825 }
29826 if ((this.onField == InstallUninstallType.both))
29827 {
29828 writer.WriteAttributeString("On", "both");
29829 }
29830 }
29831 writer.WriteEndElement();
29832 }
29833
29834 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
29835 void ISetAttributes.SetAttribute(string name, string value)
29836 {
29837 if (String.IsNullOrEmpty(name))
29838 {
29839 throw new ArgumentNullException("name");
29840 }
29841 if (("Id" == name))
29842 {
29843 this.idField = value;
29844 this.idFieldSet = true;
29845 }
29846 if (("Directory" == name))
29847 {
29848 this.directoryField = value;
29849 this.directoryFieldSet = true;
29850 }
29851 if (("Property" == name))
29852 {
29853 this.propertyField = value;
29854 this.propertyFieldSet = true;
29855 }
29856 if (("Name" == name))
29857 {
29858 this.nameField = value;
29859 this.nameFieldSet = true;
29860 }
29861 if (("ShortName" == name))
29862 {
29863 this.shortNameField = value;
29864 this.shortNameFieldSet = true;
29865 }
29866 if (("On" == name))
29867 {
29868 this.onField = Enums.ParseInstallUninstallType(value);
29869 this.onFieldSet = true;
29870 }
29871 }
29872 }
29873
29874 /// <summary>
29875 /// Remove an empty folder if the parent component is selected for installation or removal. By default, the folder
29876 /// is the directory of the parent component. This can be overridden by specifying the Directory attribute
29877 /// with a value corresponding to the Id of the directory, or by specifying the Property attribute with a value
29878 /// corresponding to a property that will have a value that resolves to the full path of the folder.
29879 /// </summary>
29880 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
29881 public class RemoveFolder : ISchemaElement, ISetAttributes
29882 {
29883
29884 private string idField;
29885
29886 private bool idFieldSet;
29887
29888 private string directoryField;
29889
29890 private bool directoryFieldSet;
29891
29892 private string propertyField;
29893
29894 private bool propertyFieldSet;
29895
29896 private InstallUninstallType onField;
29897
29898 private bool onFieldSet;
29899
29900 private ISchemaElement parentElement;
29901
29902 /// <summary>
29903 /// Primary key used to identify this particular entry.
29904 /// </summary>
29905 public string Id
29906 {
29907 get
29908 {
29909 return this.idField;
29910 }
29911 set
29912 {
29913 this.idFieldSet = true;
29914 this.idField = value;
29915 }
29916 }
29917
29918 /// <summary>
29919 /// Overrides the directory of the parent component with a specific Directory. This Directory must exist in the
29920 /// installer database at creation time. This attribute cannot be specified in conjunction with the Property attribute.
29921 /// </summary>
29922 public string Directory
29923 {
29924 get
29925 {
29926 return this.directoryField;
29927 }
29928 set
29929 {
29930 this.directoryFieldSet = true;
29931 this.directoryField = value;
29932 }
29933 }
29934
29935 /// <summary>
29936 /// Overrides the directory of the parent component with the value of the specified property. The property
29937 /// should have a value that resolves to the full path of the source directory. The property does not have
29938 /// to exist in the installer database at creation time; it could be created at installation time by a custom
29939 /// action, on the command line, etc. This attribute cannot be specified in conjunction with the Directory attribute.
29940 /// </summary>
29941 public string Property
29942 {
29943 get
29944 {
29945 return this.propertyField;
29946 }
29947 set
29948 {
29949 this.propertyFieldSet = true;
29950 this.propertyField = value;
29951 }
29952 }
29953
29954 /// <summary>
29955 /// This value determines the time at which the folder may be removed, based on the install/uninstall of the parent component.
29956 /// For 'install', the folder will be removed only when the parent component is being installed (msiInstallStateLocal or
29957 /// msiInstallStateSource); for 'uninstall', the folder will be removed only when the parent component
29958 /// is being removed (msiInstallStateAbsent); for 'both', the folder will be removed in both cases.
29959 /// </summary>
29960 public InstallUninstallType On
29961 {
29962 get
29963 {
29964 return this.onField;
29965 }
29966 set
29967 {
29968 this.onFieldSet = true;
29969 this.onField = value;
29970 }
29971 }
29972
29973 public virtual ISchemaElement ParentElement
29974 {
29975 get
29976 {
29977 return this.parentElement;
29978 }
29979 set
29980 {
29981 this.parentElement = value;
29982 }
29983 }
29984
29985 /// <summary>
29986 /// Processes this element and all child elements into an XmlWriter.
29987 /// </summary>
29988 public virtual void OutputXml(XmlWriter writer)
29989 {
29990 if ((null == writer))
29991 {
29992 throw new ArgumentNullException("writer");
29993 }
29994 writer.WriteStartElement("RemoveFolder", "http://wixtoolset.org/schemas/v4/wxs");
29995 if (this.idFieldSet)
29996 {
29997 writer.WriteAttributeString("Id", this.idField);
29998 }
29999 if (this.directoryFieldSet)
30000 {
30001 writer.WriteAttributeString("Directory", this.directoryField);
30002 }
30003 if (this.propertyFieldSet)
30004 {
30005 writer.WriteAttributeString("Property", this.propertyField);
30006 }
30007 if (this.onFieldSet)
30008 {
30009 if ((this.onField == InstallUninstallType.install))
30010 {
30011 writer.WriteAttributeString("On", "install");
30012 }
30013 if ((this.onField == InstallUninstallType.uninstall))
30014 {
30015 writer.WriteAttributeString("On", "uninstall");
30016 }
30017 if ((this.onField == InstallUninstallType.both))
30018 {
30019 writer.WriteAttributeString("On", "both");
30020 }
30021 }
30022 writer.WriteEndElement();
30023 }
30024
30025 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30026 void ISetAttributes.SetAttribute(string name, string value)
30027 {
30028 if (String.IsNullOrEmpty(name))
30029 {
30030 throw new ArgumentNullException("name");
30031 }
30032 if (("Id" == name))
30033 {
30034 this.idField = value;
30035 this.idFieldSet = true;
30036 }
30037 if (("Directory" == name))
30038 {
30039 this.directoryField = value;
30040 this.directoryFieldSet = true;
30041 }
30042 if (("Property" == name))
30043 {
30044 this.propertyField = value;
30045 this.propertyFieldSet = true;
30046 }
30047 if (("On" == name))
30048 {
30049 this.onField = Enums.ParseInstallUninstallType(value);
30050 this.onFieldSet = true;
30051 }
30052 }
30053 }
30054
30055 /// <summary>
30056 /// Create folder as part of parent Component.
30057 /// </summary>
30058 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30059 public class CreateFolder : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
30060 {
30061
30062 private ElementCollection children;
30063
30064 private string directoryField;
30065
30066 private bool directoryFieldSet;
30067
30068 private ISchemaElement parentElement;
30069
30070 public CreateFolder()
30071 {
30072 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
30073 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut)));
30074 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission)));
30075 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
30076 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
30077 this.children = childCollection0;
30078 }
30079
30080 public virtual IEnumerable Children
30081 {
30082 get
30083 {
30084 return this.children;
30085 }
30086 }
30087
30088 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
30089 public virtual IEnumerable this[System.Type childType]
30090 {
30091 get
30092 {
30093 return this.children.Filter(childType);
30094 }
30095 }
30096
30097 /// <summary>
30098 /// Identifier of Directory to create. Defaults to Directory of parent Component.
30099 /// </summary>
30100 public string Directory
30101 {
30102 get
30103 {
30104 return this.directoryField;
30105 }
30106 set
30107 {
30108 this.directoryFieldSet = true;
30109 this.directoryField = value;
30110 }
30111 }
30112
30113 public virtual ISchemaElement ParentElement
30114 {
30115 get
30116 {
30117 return this.parentElement;
30118 }
30119 set
30120 {
30121 this.parentElement = value;
30122 }
30123 }
30124
30125 public virtual void AddChild(ISchemaElement child)
30126 {
30127 if ((null == child))
30128 {
30129 throw new ArgumentNullException("child");
30130 }
30131 this.children.AddElement(child);
30132 child.ParentElement = this;
30133 }
30134
30135 public virtual void RemoveChild(ISchemaElement child)
30136 {
30137 if ((null == child))
30138 {
30139 throw new ArgumentNullException("child");
30140 }
30141 this.children.RemoveElement(child);
30142 child.ParentElement = null;
30143 }
30144
30145 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30146 ISchemaElement ICreateChildren.CreateChild(string childName)
30147 {
30148 if (String.IsNullOrEmpty(childName))
30149 {
30150 throw new ArgumentNullException("childName");
30151 }
30152 ISchemaElement childValue = null;
30153 if (("Shortcut" == childName))
30154 {
30155 childValue = new Shortcut();
30156 }
30157 if (("Permission" == childName))
30158 {
30159 childValue = new Permission();
30160 }
30161 if (("PermissionEx" == childName))
30162 {
30163 childValue = new PermissionEx();
30164 }
30165 if ((null == childValue))
30166 {
30167 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
30168 }
30169 return childValue;
30170 }
30171
30172 /// <summary>
30173 /// Processes this element and all child elements into an XmlWriter.
30174 /// </summary>
30175 public virtual void OutputXml(XmlWriter writer)
30176 {
30177 if ((null == writer))
30178 {
30179 throw new ArgumentNullException("writer");
30180 }
30181 writer.WriteStartElement("CreateFolder", "http://wixtoolset.org/schemas/v4/wxs");
30182 if (this.directoryFieldSet)
30183 {
30184 writer.WriteAttributeString("Directory", this.directoryField);
30185 }
30186 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
30187 {
30188 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
30189 childElement.OutputXml(writer);
30190 }
30191 writer.WriteEndElement();
30192 }
30193
30194 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30195 void ISetAttributes.SetAttribute(string name, string value)
30196 {
30197 if (String.IsNullOrEmpty(name))
30198 {
30199 throw new ArgumentNullException("name");
30200 }
30201 if (("Directory" == name))
30202 {
30203 this.directoryField = value;
30204 this.directoryFieldSet = true;
30205 }
30206 }
30207 }
30208
30209 /// <summary>
30210 /// Optional way for defining AppData, generally used for complex CDATA.
30211 /// </summary>
30212 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30213 public class AppData : ISetAttributes, ISchemaElement
30214 {
30215
30216 private ISchemaElement parentElement;
30217
30218 private string contentField;
30219
30220 private bool contentFieldSet;
30221
30222 public virtual ISchemaElement ParentElement
30223 {
30224 get
30225 {
30226 return this.parentElement;
30227 }
30228 set
30229 {
30230 this.parentElement = value;
30231 }
30232 }
30233
30234 /// <summary>
30235 /// Optional way for defining AppData, generally used for complex CDATA.
30236 /// </summary>
30237 public string Content
30238 {
30239 get
30240 {
30241 return this.contentField;
30242 }
30243 set
30244 {
30245 this.contentFieldSet = true;
30246 this.contentField = value;
30247 }
30248 }
30249
30250 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30251 void ISetAttributes.SetAttribute(string name, string value)
30252 {
30253 if (String.IsNullOrEmpty(name))
30254 {
30255 throw new ArgumentNullException("name");
30256 }
30257 if (("Content" == name))
30258 {
30259 this.contentField = value;
30260 this.contentFieldSet = true;
30261 }
30262 }
30263
30264 /// <summary>
30265 /// Processes this element and all child elements into an XmlWriter.
30266 /// </summary>
30267 public virtual void OutputXml(XmlWriter writer)
30268 {
30269 if ((null == writer))
30270 {
30271 throw new ArgumentNullException("writer");
30272 }
30273 writer.WriteStartElement("AppData", "http://wixtoolset.org/schemas/v4/wxs");
30274 if (this.contentFieldSet)
30275 {
30276 writer.WriteString(this.contentField);
30277 }
30278 writer.WriteEndElement();
30279 }
30280 }
30281
30282 /// <summary>
30283 /// Qualified published component for parent Component
30284 /// </summary>
30285 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30286 public class Category : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
30287 {
30288
30289 private ElementCollection children;
30290
30291 private string idField;
30292
30293 private bool idFieldSet;
30294
30295 private string qualifierField;
30296
30297 private bool qualifierFieldSet;
30298
30299 private string appDataField;
30300
30301 private bool appDataFieldSet;
30302
30303 private string featureField;
30304
30305 private bool featureFieldSet;
30306
30307 private ISchemaElement parentElement;
30308
30309 public Category()
30310 {
30311 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
30312 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(AppData)));
30313 this.children = childCollection0;
30314 }
30315
30316 public virtual IEnumerable Children
30317 {
30318 get
30319 {
30320 return this.children;
30321 }
30322 }
30323
30324 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
30325 public virtual IEnumerable this[System.Type childType]
30326 {
30327 get
30328 {
30329 return this.children.Filter(childType);
30330 }
30331 }
30332
30333 /// <summary>
30334 /// A string GUID that represents the category of components being grouped together.
30335 /// </summary>
30336 public string Id
30337 {
30338 get
30339 {
30340 return this.idField;
30341 }
30342 set
30343 {
30344 this.idFieldSet = true;
30345 this.idField = value;
30346 }
30347 }
30348
30349 /// <summary>
30350 /// A text string that qualifies the value in the Id attribute. A qualifier is used to distinguish multiple forms of the same Component, such as a Component that is implemented in multiple languages.
30351 /// </summary>
30352 public string Qualifier
30353 {
30354 get
30355 {
30356 return this.qualifierField;
30357 }
30358 set
30359 {
30360 this.qualifierFieldSet = true;
30361 this.qualifierField = value;
30362 }
30363 }
30364
30365 /// <summary>
30366 /// An optional localizable text describing the category. The string is commonly parsed by the application and can be displayed to the user. It should describe the category.
30367 /// </summary>
30368 public string AppData
30369 {
30370 get
30371 {
30372 return this.appDataField;
30373 }
30374 set
30375 {
30376 this.appDataFieldSet = true;
30377 this.appDataField = value;
30378 }
30379 }
30380
30381 /// <summary>
30382 /// Feature that controls the advertisement of the category. Defaults to the primary Feature for the parent Component .
30383 /// </summary>
30384 public string Feature
30385 {
30386 get
30387 {
30388 return this.featureField;
30389 }
30390 set
30391 {
30392 this.featureFieldSet = true;
30393 this.featureField = value;
30394 }
30395 }
30396
30397 public virtual ISchemaElement ParentElement
30398 {
30399 get
30400 {
30401 return this.parentElement;
30402 }
30403 set
30404 {
30405 this.parentElement = value;
30406 }
30407 }
30408
30409 public virtual void AddChild(ISchemaElement child)
30410 {
30411 if ((null == child))
30412 {
30413 throw new ArgumentNullException("child");
30414 }
30415 this.children.AddElement(child);
30416 child.ParentElement = this;
30417 }
30418
30419 public virtual void RemoveChild(ISchemaElement child)
30420 {
30421 if ((null == child))
30422 {
30423 throw new ArgumentNullException("child");
30424 }
30425 this.children.RemoveElement(child);
30426 child.ParentElement = null;
30427 }
30428
30429 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30430 ISchemaElement ICreateChildren.CreateChild(string childName)
30431 {
30432 if (String.IsNullOrEmpty(childName))
30433 {
30434 throw new ArgumentNullException("childName");
30435 }
30436 ISchemaElement childValue = null;
30437 if (("AppData" == childName))
30438 {
30439 childValue = new AppData();
30440 }
30441 if ((null == childValue))
30442 {
30443 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
30444 }
30445 return childValue;
30446 }
30447
30448 /// <summary>
30449 /// Processes this element and all child elements into an XmlWriter.
30450 /// </summary>
30451 public virtual void OutputXml(XmlWriter writer)
30452 {
30453 if ((null == writer))
30454 {
30455 throw new ArgumentNullException("writer");
30456 }
30457 writer.WriteStartElement("Category", "http://wixtoolset.org/schemas/v4/wxs");
30458 if (this.idFieldSet)
30459 {
30460 writer.WriteAttributeString("Id", this.idField);
30461 }
30462 if (this.qualifierFieldSet)
30463 {
30464 writer.WriteAttributeString("Qualifier", this.qualifierField);
30465 }
30466 if (this.appDataFieldSet)
30467 {
30468 writer.WriteAttributeString("AppData", this.appDataField);
30469 }
30470 if (this.featureFieldSet)
30471 {
30472 writer.WriteAttributeString("Feature", this.featureField);
30473 }
30474 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
30475 {
30476 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
30477 childElement.OutputXml(writer);
30478 }
30479 writer.WriteEndElement();
30480 }
30481
30482 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30483 void ISetAttributes.SetAttribute(string name, string value)
30484 {
30485 if (String.IsNullOrEmpty(name))
30486 {
30487 throw new ArgumentNullException("name");
30488 }
30489 if (("Id" == name))
30490 {
30491 this.idField = value;
30492 this.idFieldSet = true;
30493 }
30494 if (("Qualifier" == name))
30495 {
30496 this.qualifierField = value;
30497 this.qualifierFieldSet = true;
30498 }
30499 if (("AppData" == name))
30500 {
30501 this.appDataField = value;
30502 this.appDataFieldSet = true;
30503 }
30504 if (("Feature" == name))
30505 {
30506 this.featureField = value;
30507 this.featureFieldSet = true;
30508 }
30509 }
30510 }
30511
30512 /// <summary>
30513 /// MIME content-type for an Extension
30514 /// </summary>
30515 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30516 public class MIME : ISchemaElement, ISetAttributes
30517 {
30518
30519 private YesNoType advertiseField;
30520
30521 private bool advertiseFieldSet;
30522
30523 private string contentTypeField;
30524
30525 private bool contentTypeFieldSet;
30526
30527 private string classField;
30528
30529 private bool classFieldSet;
30530
30531 private YesNoType defaultField;
30532
30533 private bool defaultFieldSet;
30534
30535 private ISchemaElement parentElement;
30536
30537 /// <summary>
30538 /// Whether this MIME is to be advertised. The default is to match whatever the parent extension element uses. If the parent element is not advertised, then this element cannot be advertised either.
30539 /// </summary>
30540 public YesNoType Advertise
30541 {
30542 get
30543 {
30544 return this.advertiseField;
30545 }
30546 set
30547 {
30548 this.advertiseFieldSet = true;
30549 this.advertiseField = value;
30550 }
30551 }
30552
30553 /// <summary>
30554 /// This is the identifier for the MIME content. It is commonly written in the form of type/format.
30555 /// </summary>
30556 public string ContentType
30557 {
30558 get
30559 {
30560 return this.contentTypeField;
30561 }
30562 set
30563 {
30564 this.contentTypeFieldSet = true;
30565 this.contentTypeField = value;
30566 }
30567 }
30568
30569 /// <summary>
30570 /// Class ID for the COM server that is to be associated with the MIME content.
30571 /// </summary>
30572 public string Class
30573 {
30574 get
30575 {
30576 return this.classField;
30577 }
30578 set
30579 {
30580 this.classFieldSet = true;
30581 this.classField = value;
30582 }
30583 }
30584
30585 /// <summary>
30586 /// If 'yes', become the content type for the parent Extension. The default value is 'no'.
30587 /// </summary>
30588 public YesNoType Default
30589 {
30590 get
30591 {
30592 return this.defaultField;
30593 }
30594 set
30595 {
30596 this.defaultFieldSet = true;
30597 this.defaultField = value;
30598 }
30599 }
30600
30601 public virtual ISchemaElement ParentElement
30602 {
30603 get
30604 {
30605 return this.parentElement;
30606 }
30607 set
30608 {
30609 this.parentElement = value;
30610 }
30611 }
30612
30613 /// <summary>
30614 /// Processes this element and all child elements into an XmlWriter.
30615 /// </summary>
30616 public virtual void OutputXml(XmlWriter writer)
30617 {
30618 if ((null == writer))
30619 {
30620 throw new ArgumentNullException("writer");
30621 }
30622 writer.WriteStartElement("MIME", "http://wixtoolset.org/schemas/v4/wxs");
30623 if (this.advertiseFieldSet)
30624 {
30625 if ((this.advertiseField == YesNoType.no))
30626 {
30627 writer.WriteAttributeString("Advertise", "no");
30628 }
30629 if ((this.advertiseField == YesNoType.yes))
30630 {
30631 writer.WriteAttributeString("Advertise", "yes");
30632 }
30633 }
30634 if (this.contentTypeFieldSet)
30635 {
30636 writer.WriteAttributeString("ContentType", this.contentTypeField);
30637 }
30638 if (this.classFieldSet)
30639 {
30640 writer.WriteAttributeString("Class", this.classField);
30641 }
30642 if (this.defaultFieldSet)
30643 {
30644 if ((this.defaultField == YesNoType.no))
30645 {
30646 writer.WriteAttributeString("Default", "no");
30647 }
30648 if ((this.defaultField == YesNoType.yes))
30649 {
30650 writer.WriteAttributeString("Default", "yes");
30651 }
30652 }
30653 writer.WriteEndElement();
30654 }
30655
30656 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30657 void ISetAttributes.SetAttribute(string name, string value)
30658 {
30659 if (String.IsNullOrEmpty(name))
30660 {
30661 throw new ArgumentNullException("name");
30662 }
30663 if (("Advertise" == name))
30664 {
30665 this.advertiseField = Enums.ParseYesNoType(value);
30666 this.advertiseFieldSet = true;
30667 }
30668 if (("ContentType" == name))
30669 {
30670 this.contentTypeField = value;
30671 this.contentTypeFieldSet = true;
30672 }
30673 if (("Class" == name))
30674 {
30675 this.classField = value;
30676 this.classFieldSet = true;
30677 }
30678 if (("Default" == name))
30679 {
30680 this.defaultField = Enums.ParseYesNoType(value);
30681 this.defaultFieldSet = true;
30682 }
30683 }
30684 }
30685
30686 /// <summary>
30687 /// Verb definition for an Extension. When advertised, this element creates a row in the
30688 /// </summary>
30689 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30690 public class Verb : ISchemaElement, ISetAttributes
30691 {
30692
30693 private string idField;
30694
30695 private bool idFieldSet;
30696
30697 private string commandField;
30698
30699 private bool commandFieldSet;
30700
30701 private string argumentField;
30702
30703 private bool argumentFieldSet;
30704
30705 private int sequenceField;
30706
30707 private bool sequenceFieldSet;
30708
30709 private string targetField;
30710
30711 private bool targetFieldSet;
30712
30713 private string targetFileField;
30714
30715 private bool targetFileFieldSet;
30716
30717 private string targetPropertyField;
30718
30719 private bool targetPropertyFieldSet;
30720
30721 private ISchemaElement parentElement;
30722
30723 /// <summary>
30724 /// The verb for the command.
30725 /// </summary>
30726 public string Id
30727 {
30728 get
30729 {
30730 return this.idField;
30731 }
30732 set
30733 {
30734 this.idFieldSet = true;
30735 this.idField = value;
30736 }
30737 }
30738
30739 /// <summary>
30740 /// The localized text displayed on the context menu.
30741 /// </summary>
30742 public string Command
30743 {
30744 get
30745 {
30746 return this.commandField;
30747 }
30748 set
30749 {
30750 this.commandFieldSet = true;
30751 this.commandField = value;
30752 }
30753 }
30754
30755 /// <summary>
30756 /// Value for the command arguments. Note that the resolution of properties in the
30757 /// Argument field is limited. A property formatted as [Property] in this field can only be resolved if the property
30758 /// already has the intended value when the component owning the verb is installed. For example, for the argument
30759 /// "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and the
30760 /// component that owns the verb.
30761 /// </summary>
30762 public string Argument
30763 {
30764 get
30765 {
30766 return this.argumentField;
30767 }
30768 set
30769 {
30770 this.argumentFieldSet = true;
30771 this.argumentField = value;
30772 }
30773 }
30774
30775 /// <summary>
30776 /// The sequence of the commands. Only verbs for which the Sequence is specified
30777 /// are used to prepare an ordered list for the default value of the shell key. The Verb with the lowest value in this
30778 /// column becomes the default verb. Used only for Advertised verbs.
30779 /// </summary>
30780 public int Sequence
30781 {
30782 get
30783 {
30784 return this.sequenceField;
30785 }
30786 set
30787 {
30788 this.sequenceFieldSet = true;
30789 this.sequenceField = value;
30790 }
30791 }
30792
30793 public string Target
30794 {
30795 get
30796 {
30797 return this.targetField;
30798 }
30799 set
30800 {
30801 this.targetFieldSet = true;
30802 this.targetField = value;
30803 }
30804 }
30805
30806 /// <summary>
30807 /// Either this attribute or the TargetProperty attribute must be specified for a non-advertised verb.
30808 /// The value should be the identifier of the target file to be executed for the verb.
30809 /// </summary>
30810 public string TargetFile
30811 {
30812 get
30813 {
30814 return this.targetFileField;
30815 }
30816 set
30817 {
30818 this.targetFileFieldSet = true;
30819 this.targetFileField = value;
30820 }
30821 }
30822
30823 /// <summary>
30824 /// Either this attribute or the TargetFile attribute must be specified for a non-advertised verb.
30825 /// The value should be the identifier of the property which will resolve to the path to the target file to be executed for the verb.
30826 /// </summary>
30827 public string TargetProperty
30828 {
30829 get
30830 {
30831 return this.targetPropertyField;
30832 }
30833 set
30834 {
30835 this.targetPropertyFieldSet = true;
30836 this.targetPropertyField = value;
30837 }
30838 }
30839
30840 public virtual ISchemaElement ParentElement
30841 {
30842 get
30843 {
30844 return this.parentElement;
30845 }
30846 set
30847 {
30848 this.parentElement = value;
30849 }
30850 }
30851
30852 /// <summary>
30853 /// Processes this element and all child elements into an XmlWriter.
30854 /// </summary>
30855 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
30856 public virtual void OutputXml(XmlWriter writer)
30857 {
30858 if ((null == writer))
30859 {
30860 throw new ArgumentNullException("writer");
30861 }
30862 writer.WriteStartElement("Verb", "http://wixtoolset.org/schemas/v4/wxs");
30863 if (this.idFieldSet)
30864 {
30865 writer.WriteAttributeString("Id", this.idField);
30866 }
30867 if (this.commandFieldSet)
30868 {
30869 writer.WriteAttributeString("Command", this.commandField);
30870 }
30871 if (this.argumentFieldSet)
30872 {
30873 writer.WriteAttributeString("Argument", this.argumentField);
30874 }
30875 if (this.sequenceFieldSet)
30876 {
30877 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
30878 }
30879 if (this.targetFieldSet)
30880 {
30881 writer.WriteAttributeString("Target", this.targetField);
30882 }
30883 if (this.targetFileFieldSet)
30884 {
30885 writer.WriteAttributeString("TargetFile", this.targetFileField);
30886 }
30887 if (this.targetPropertyFieldSet)
30888 {
30889 writer.WriteAttributeString("TargetProperty", this.targetPropertyField);
30890 }
30891 writer.WriteEndElement();
30892 }
30893
30894 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30895 void ISetAttributes.SetAttribute(string name, string value)
30896 {
30897 if (String.IsNullOrEmpty(name))
30898 {
30899 throw new ArgumentNullException("name");
30900 }
30901 if (("Id" == name))
30902 {
30903 this.idField = value;
30904 this.idFieldSet = true;
30905 }
30906 if (("Command" == name))
30907 {
30908 this.commandField = value;
30909 this.commandFieldSet = true;
30910 }
30911 if (("Argument" == name))
30912 {
30913 this.argumentField = value;
30914 this.argumentFieldSet = true;
30915 }
30916 if (("Sequence" == name))
30917 {
30918 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
30919 this.sequenceFieldSet = true;
30920 }
30921 if (("Target" == name))
30922 {
30923 this.targetField = value;
30924 this.targetFieldSet = true;
30925 }
30926 if (("TargetFile" == name))
30927 {
30928 this.targetFileField = value;
30929 this.targetFileFieldSet = true;
30930 }
30931 if (("TargetProperty" == name))
30932 {
30933 this.targetPropertyField = value;
30934 this.targetPropertyFieldSet = true;
30935 }
30936 }
30937 }
30938
30939 /// <summary>
30940 /// Extension for a Component
30941 /// </summary>
30942 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30943 public class Extension : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
30944 {
30945
30946 private ElementCollection children;
30947
30948 private string idField;
30949
30950 private bool idFieldSet;
30951
30952 private string contentTypeField;
30953
30954 private bool contentTypeFieldSet;
30955
30956 private YesNoType advertiseField;
30957
30958 private bool advertiseFieldSet;
30959
30960 private ISchemaElement parentElement;
30961
30962 public Extension()
30963 {
30964 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
30965 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MIME)));
30966 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Verb)));
30967 this.children = childCollection0;
30968 }
30969
30970 public virtual IEnumerable Children
30971 {
30972 get
30973 {
30974 return this.children;
30975 }
30976 }
30977
30978 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
30979 public virtual IEnumerable this[System.Type childType]
30980 {
30981 get
30982 {
30983 return this.children.Filter(childType);
30984 }
30985 }
30986
30987 /// <summary>
30988 /// This is simply the file extension, like "doc" or "xml". Do not include the preceding period.
30989 /// </summary>
30990 public string Id
30991 {
30992 get
30993 {
30994 return this.idField;
30995 }
30996 set
30997 {
30998 this.idFieldSet = true;
30999 this.idField = value;
31000 }
31001 }
31002
31003 /// <summary>
31004 /// The MIME type that is to be written.
31005 /// </summary>
31006 public string ContentType
31007 {
31008 get
31009 {
31010 return this.contentTypeField;
31011 }
31012 set
31013 {
31014 this.contentTypeFieldSet = true;
31015 this.contentTypeField = value;
31016 }
31017 }
31018
31019 /// <summary>
31020 /// Whether this extension is to be advertised. The default is "no".
31021 /// </summary>
31022 public YesNoType Advertise
31023 {
31024 get
31025 {
31026 return this.advertiseField;
31027 }
31028 set
31029 {
31030 this.advertiseFieldSet = true;
31031 this.advertiseField = value;
31032 }
31033 }
31034
31035 public virtual ISchemaElement ParentElement
31036 {
31037 get
31038 {
31039 return this.parentElement;
31040 }
31041 set
31042 {
31043 this.parentElement = value;
31044 }
31045 }
31046
31047 public virtual void AddChild(ISchemaElement child)
31048 {
31049 if ((null == child))
31050 {
31051 throw new ArgumentNullException("child");
31052 }
31053 this.children.AddElement(child);
31054 child.ParentElement = this;
31055 }
31056
31057 public virtual void RemoveChild(ISchemaElement child)
31058 {
31059 if ((null == child))
31060 {
31061 throw new ArgumentNullException("child");
31062 }
31063 this.children.RemoveElement(child);
31064 child.ParentElement = null;
31065 }
31066
31067 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31068 ISchemaElement ICreateChildren.CreateChild(string childName)
31069 {
31070 if (String.IsNullOrEmpty(childName))
31071 {
31072 throw new ArgumentNullException("childName");
31073 }
31074 ISchemaElement childValue = null;
31075 if (("MIME" == childName))
31076 {
31077 childValue = new MIME();
31078 }
31079 if (("Verb" == childName))
31080 {
31081 childValue = new Verb();
31082 }
31083 if ((null == childValue))
31084 {
31085 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
31086 }
31087 return childValue;
31088 }
31089
31090 /// <summary>
31091 /// Processes this element and all child elements into an XmlWriter.
31092 /// </summary>
31093 public virtual void OutputXml(XmlWriter writer)
31094 {
31095 if ((null == writer))
31096 {
31097 throw new ArgumentNullException("writer");
31098 }
31099 writer.WriteStartElement("Extension", "http://wixtoolset.org/schemas/v4/wxs");
31100 if (this.idFieldSet)
31101 {
31102 writer.WriteAttributeString("Id", this.idField);
31103 }
31104 if (this.contentTypeFieldSet)
31105 {
31106 writer.WriteAttributeString("ContentType", this.contentTypeField);
31107 }
31108 if (this.advertiseFieldSet)
31109 {
31110 if ((this.advertiseField == YesNoType.no))
31111 {
31112 writer.WriteAttributeString("Advertise", "no");
31113 }
31114 if ((this.advertiseField == YesNoType.yes))
31115 {
31116 writer.WriteAttributeString("Advertise", "yes");
31117 }
31118 }
31119 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
31120 {
31121 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
31122 childElement.OutputXml(writer);
31123 }
31124 writer.WriteEndElement();
31125 }
31126
31127 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31128 void ISetAttributes.SetAttribute(string name, string value)
31129 {
31130 if (String.IsNullOrEmpty(name))
31131 {
31132 throw new ArgumentNullException("name");
31133 }
31134 if (("Id" == name))
31135 {
31136 this.idField = value;
31137 this.idFieldSet = true;
31138 }
31139 if (("ContentType" == name))
31140 {
31141 this.contentTypeField = value;
31142 this.contentTypeFieldSet = true;
31143 }
31144 if (("Advertise" == name))
31145 {
31146 this.advertiseField = Enums.ParseYesNoType(value);
31147 this.advertiseFieldSet = true;
31148 }
31149 }
31150 }
31151
31152 /// <summary>
31153 /// Register a type library (TypeLib). Please note that in order to properly use this
31154 /// non-advertised, you will need use this element with Advertise='no' and also author the
31155 /// appropriate child Interface elements by extracting them from the type library itself.
31156 /// </summary>
31157 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
31158 public class TypeLib : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
31159 {
31160
31161 private ElementCollection children;
31162
31163 private string idField;
31164
31165 private bool idFieldSet;
31166
31167 private YesNoType advertiseField;
31168
31169 private bool advertiseFieldSet;
31170
31171 private YesNoType controlField;
31172
31173 private bool controlFieldSet;
31174
31175 private int costField;
31176
31177 private bool costFieldSet;
31178
31179 private string descriptionField;
31180
31181 private bool descriptionFieldSet;
31182
31183 private YesNoType hasDiskImageField;
31184
31185 private bool hasDiskImageFieldSet;
31186
31187 private string helpDirectoryField;
31188
31189 private bool helpDirectoryFieldSet;
31190
31191 private YesNoType hiddenField;
31192
31193 private bool hiddenFieldSet;
31194
31195 private int languageField;
31196
31197 private bool languageFieldSet;
31198
31199 private int majorVersionField;
31200
31201 private bool majorVersionFieldSet;
31202
31203 private int minorVersionField;
31204
31205 private bool minorVersionFieldSet;
31206
31207 private int resourceIdField;
31208
31209 private bool resourceIdFieldSet;
31210
31211 private YesNoType restrictedField;
31212
31213 private bool restrictedFieldSet;
31214
31215 private ISchemaElement parentElement;
31216
31217 public TypeLib()
31218 {
31219 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
31220 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
31221 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class)));
31222 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface)));
31223 this.children = childCollection0;
31224 }
31225
31226 public virtual IEnumerable Children
31227 {
31228 get
31229 {
31230 return this.children;
31231 }
31232 }
31233
31234 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
31235 public virtual IEnumerable this[System.Type childType]
31236 {
31237 get
31238 {
31239 return this.children.Filter(childType);
31240 }
31241 }
31242
31243 /// <summary>
31244 /// The GUID that identifes the type library.
31245 /// </summary>
31246 public string Id
31247 {
31248 get
31249 {
31250 return this.idField;
31251 }
31252 set
31253 {
31254 this.idFieldSet = true;
31255 this.idField = value;
31256 }
31257 }
31258
31259 /// <summary>
31260 /// Value of 'yes' will create a row in the TypeLib table.
31261 /// Value of 'no' will create rows in the Registry table.
31262 /// The default value is 'no'.
31263 /// </summary>
31264 public YesNoType Advertise
31265 {
31266 get
31267 {
31268 return this.advertiseField;
31269 }
31270 set
31271 {
31272 this.advertiseFieldSet = true;
31273 this.advertiseField = value;
31274 }
31275 }
31276
31277 /// <summary>
31278 /// Value of 'yes' means the type library describes controls, and should not be displayed in type browsers intended for nonvisual objects.
31279 /// This attribute can only be set if Advertise='no'.
31280 /// </summary>
31281 public YesNoType Control
31282 {
31283 get
31284 {
31285 return this.controlField;
31286 }
31287 set
31288 {
31289 this.controlFieldSet = true;
31290 this.controlField = value;
31291 }
31292 }
31293
31294 /// <summary>
31295 /// The cost associated with the registration of the type library in bytes. This attribute cannot be set if Advertise='no'.
31296 /// </summary>
31297 public int Cost
31298 {
31299 get
31300 {
31301 return this.costField;
31302 }
31303 set
31304 {
31305 this.costFieldSet = true;
31306 this.costField = value;
31307 }
31308 }
31309
31310 /// <summary>
31311 /// The localizable description of the type library.
31312 /// </summary>
31313 public string Description
31314 {
31315 get
31316 {
31317 return this.descriptionField;
31318 }
31319 set
31320 {
31321 this.descriptionFieldSet = true;
31322 this.descriptionField = value;
31323 }
31324 }
31325
31326 /// <summary>
31327 /// Value of 'yes' means the type library exists in a persisted form on disk. This attribute can only be set if Advertise='no'.
31328 /// </summary>
31329 public YesNoType HasDiskImage
31330 {
31331 get
31332 {
31333 return this.hasDiskImageField;
31334 }
31335 set
31336 {
31337 this.hasDiskImageFieldSet = true;
31338 this.hasDiskImageField = value;
31339 }
31340 }
31341
31342 /// <summary>
31343 /// The identifier of the Directory element for the help directory.
31344 /// </summary>
31345 public string HelpDirectory
31346 {
31347 get
31348 {
31349 return this.helpDirectoryField;
31350 }
31351 set
31352 {
31353 this.helpDirectoryFieldSet = true;
31354 this.helpDirectoryField = value;
31355 }
31356 }
31357
31358 /// <summary>
31359 /// Value of 'yes' means the type library should not be displayed to users, although its use is not restricted.
31360 /// Should be used by controls. Hosts should create a new type library that wraps the control with extended properties.
31361 /// This attribute can only be set if Advertise='no'.
31362 /// </summary>
31363 public YesNoType Hidden
31364 {
31365 get
31366 {
31367 return this.hiddenField;
31368 }
31369 set
31370 {
31371 this.hiddenFieldSet = true;
31372 this.hiddenField = value;
31373 }
31374 }
31375
31376 /// <summary>
31377 /// The language of the type library. This must be a non-negative integer.
31378 /// </summary>
31379 public int Language
31380 {
31381 get
31382 {
31383 return this.languageField;
31384 }
31385 set
31386 {
31387 this.languageFieldSet = true;
31388 this.languageField = value;
31389 }
31390 }
31391
31392 /// <summary>
31393 /// The major version of the type library. The value should be an integer from 0 - 255.
31394 /// </summary>
31395 public int MajorVersion
31396 {
31397 get
31398 {
31399 return this.majorVersionField;
31400 }
31401 set
31402 {
31403 this.majorVersionFieldSet = true;
31404 this.majorVersionField = value;
31405 }
31406 }
31407
31408 /// <summary>
31409 /// The minor version of the type library. The value should be an integer from 0 - 255.
31410 /// </summary>
31411 public int MinorVersion
31412 {
31413 get
31414 {
31415 return this.minorVersionField;
31416 }
31417 set
31418 {
31419 this.minorVersionFieldSet = true;
31420 this.minorVersionField = value;
31421 }
31422 }
31423
31424 /// <summary>
31425 /// The resource id of a typelib. The value is appended to the end of the typelib path in the registry.
31426 /// </summary>
31427 public int ResourceId
31428 {
31429 get
31430 {
31431 return this.resourceIdField;
31432 }
31433 set
31434 {
31435 this.resourceIdFieldSet = true;
31436 this.resourceIdField = value;
31437 }
31438 }
31439
31440 /// <summary>
31441 /// Value of 'yes' means the type library is restricted, and should not be displayed to users. This attribute can only be set if Advertise='no'.
31442 /// </summary>
31443 public YesNoType Restricted
31444 {
31445 get
31446 {
31447 return this.restrictedField;
31448 }
31449 set
31450 {
31451 this.restrictedFieldSet = true;
31452 this.restrictedField = value;
31453 }
31454 }
31455
31456 public virtual ISchemaElement ParentElement
31457 {
31458 get
31459 {
31460 return this.parentElement;
31461 }
31462 set
31463 {
31464 this.parentElement = value;
31465 }
31466 }
31467
31468 public virtual void AddChild(ISchemaElement child)
31469 {
31470 if ((null == child))
31471 {
31472 throw new ArgumentNullException("child");
31473 }
31474 this.children.AddElement(child);
31475 child.ParentElement = this;
31476 }
31477
31478 public virtual void RemoveChild(ISchemaElement child)
31479 {
31480 if ((null == child))
31481 {
31482 throw new ArgumentNullException("child");
31483 }
31484 this.children.RemoveElement(child);
31485 child.ParentElement = null;
31486 }
31487
31488 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31489 ISchemaElement ICreateChildren.CreateChild(string childName)
31490 {
31491 if (String.IsNullOrEmpty(childName))
31492 {
31493 throw new ArgumentNullException("childName");
31494 }
31495 ISchemaElement childValue = null;
31496 if (("AppId" == childName))
31497 {
31498 childValue = new AppId();
31499 }
31500 if (("Class" == childName))
31501 {
31502 childValue = new Class();
31503 }
31504 if (("Interface" == childName))
31505 {
31506 childValue = new Interface();
31507 }
31508 if ((null == childValue))
31509 {
31510 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
31511 }
31512 return childValue;
31513 }
31514
31515 /// <summary>
31516 /// Processes this element and all child elements into an XmlWriter.
31517 /// </summary>
31518 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
31519 public virtual void OutputXml(XmlWriter writer)
31520 {
31521 if ((null == writer))
31522 {
31523 throw new ArgumentNullException("writer");
31524 }
31525 writer.WriteStartElement("TypeLib", "http://wixtoolset.org/schemas/v4/wxs");
31526 if (this.idFieldSet)
31527 {
31528 writer.WriteAttributeString("Id", this.idField);
31529 }
31530 if (this.advertiseFieldSet)
31531 {
31532 if ((this.advertiseField == YesNoType.no))
31533 {
31534 writer.WriteAttributeString("Advertise", "no");
31535 }
31536 if ((this.advertiseField == YesNoType.yes))
31537 {
31538 writer.WriteAttributeString("Advertise", "yes");
31539 }
31540 }
31541 if (this.controlFieldSet)
31542 {
31543 if ((this.controlField == YesNoType.no))
31544 {
31545 writer.WriteAttributeString("Control", "no");
31546 }
31547 if ((this.controlField == YesNoType.yes))
31548 {
31549 writer.WriteAttributeString("Control", "yes");
31550 }
31551 }
31552 if (this.costFieldSet)
31553 {
31554 writer.WriteAttributeString("Cost", this.costField.ToString(CultureInfo.InvariantCulture));
31555 }
31556 if (this.descriptionFieldSet)
31557 {
31558 writer.WriteAttributeString("Description", this.descriptionField);
31559 }
31560 if (this.hasDiskImageFieldSet)
31561 {
31562 if ((this.hasDiskImageField == YesNoType.no))
31563 {
31564 writer.WriteAttributeString("HasDiskImage", "no");
31565 }
31566 if ((this.hasDiskImageField == YesNoType.yes))
31567 {
31568 writer.WriteAttributeString("HasDiskImage", "yes");
31569 }
31570 }
31571 if (this.helpDirectoryFieldSet)
31572 {
31573 writer.WriteAttributeString("HelpDirectory", this.helpDirectoryField);
31574 }
31575 if (this.hiddenFieldSet)
31576 {
31577 if ((this.hiddenField == YesNoType.no))
31578 {
31579 writer.WriteAttributeString("Hidden", "no");
31580 }
31581 if ((this.hiddenField == YesNoType.yes))
31582 {
31583 writer.WriteAttributeString("Hidden", "yes");
31584 }
31585 }
31586 if (this.languageFieldSet)
31587 {
31588 writer.WriteAttributeString("Language", this.languageField.ToString(CultureInfo.InvariantCulture));
31589 }
31590 if (this.majorVersionFieldSet)
31591 {
31592 writer.WriteAttributeString("MajorVersion", this.majorVersionField.ToString(CultureInfo.InvariantCulture));
31593 }
31594 if (this.minorVersionFieldSet)
31595 {
31596 writer.WriteAttributeString("MinorVersion", this.minorVersionField.ToString(CultureInfo.InvariantCulture));
31597 }
31598 if (this.resourceIdFieldSet)
31599 {
31600 writer.WriteAttributeString("ResourceId", this.resourceIdField.ToString(CultureInfo.InvariantCulture));
31601 }
31602 if (this.restrictedFieldSet)
31603 {
31604 if ((this.restrictedField == YesNoType.no))
31605 {
31606 writer.WriteAttributeString("Restricted", "no");
31607 }
31608 if ((this.restrictedField == YesNoType.yes))
31609 {
31610 writer.WriteAttributeString("Restricted", "yes");
31611 }
31612 }
31613 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
31614 {
31615 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
31616 childElement.OutputXml(writer);
31617 }
31618 writer.WriteEndElement();
31619 }
31620
31621 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31622 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
31623 void ISetAttributes.SetAttribute(string name, string value)
31624 {
31625 if (String.IsNullOrEmpty(name))
31626 {
31627 throw new ArgumentNullException("name");
31628 }
31629 if (("Id" == name))
31630 {
31631 this.idField = value;
31632 this.idFieldSet = true;
31633 }
31634 if (("Advertise" == name))
31635 {
31636 this.advertiseField = Enums.ParseYesNoType(value);
31637 this.advertiseFieldSet = true;
31638 }
31639 if (("Control" == name))
31640 {
31641 this.controlField = Enums.ParseYesNoType(value);
31642 this.controlFieldSet = true;
31643 }
31644 if (("Cost" == name))
31645 {
31646 this.costField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31647 this.costFieldSet = true;
31648 }
31649 if (("Description" == name))
31650 {
31651 this.descriptionField = value;
31652 this.descriptionFieldSet = true;
31653 }
31654 if (("HasDiskImage" == name))
31655 {
31656 this.hasDiskImageField = Enums.ParseYesNoType(value);
31657 this.hasDiskImageFieldSet = true;
31658 }
31659 if (("HelpDirectory" == name))
31660 {
31661 this.helpDirectoryField = value;
31662 this.helpDirectoryFieldSet = true;
31663 }
31664 if (("Hidden" == name))
31665 {
31666 this.hiddenField = Enums.ParseYesNoType(value);
31667 this.hiddenFieldSet = true;
31668 }
31669 if (("Language" == name))
31670 {
31671 this.languageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31672 this.languageFieldSet = true;
31673 }
31674 if (("MajorVersion" == name))
31675 {
31676 this.majorVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31677 this.majorVersionFieldSet = true;
31678 }
31679 if (("MinorVersion" == name))
31680 {
31681 this.minorVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31682 this.minorVersionFieldSet = true;
31683 }
31684 if (("ResourceId" == name))
31685 {
31686 this.resourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31687 this.resourceIdFieldSet = true;
31688 }
31689 if (("Restricted" == name))
31690 {
31691 this.restrictedField = Enums.ParseYesNoType(value);
31692 this.restrictedFieldSet = true;
31693 }
31694 }
31695 }
31696
31697 /// <summary>
31698 /// ProgId registration for parent Component. If ProgId has an associated Class, it must be a child of that element.
31699 /// </summary>
31700 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
31701 public class ProgId : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
31702 {
31703
31704 private ElementCollection children;
31705
31706 private string idField;
31707
31708 private bool idFieldSet;
31709
31710 private string descriptionField;
31711
31712 private bool descriptionFieldSet;
31713
31714 private string iconField;
31715
31716 private bool iconFieldSet;
31717
31718 private int iconIndexField;
31719
31720 private bool iconIndexFieldSet;
31721
31722 private YesNoType advertiseField;
31723
31724 private bool advertiseFieldSet;
31725
31726 private string noOpenField;
31727
31728 private bool noOpenFieldSet;
31729
31730 private ISchemaElement parentElement;
31731
31732 public ProgId()
31733 {
31734 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
31735 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ProgId)));
31736 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Extension)));
31737 this.children = childCollection0;
31738 }
31739
31740 public virtual IEnumerable Children
31741 {
31742 get
31743 {
31744 return this.children;
31745 }
31746 }
31747
31748 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
31749 public virtual IEnumerable this[System.Type childType]
31750 {
31751 get
31752 {
31753 return this.children.Filter(childType);
31754 }
31755 }
31756
31757 public string Id
31758 {
31759 get
31760 {
31761 return this.idField;
31762 }
31763 set
31764 {
31765 this.idFieldSet = true;
31766 this.idField = value;
31767 }
31768 }
31769
31770 public string Description
31771 {
31772 get
31773 {
31774 return this.descriptionField;
31775 }
31776 set
31777 {
31778 this.descriptionFieldSet = true;
31779 this.descriptionField = value;
31780 }
31781 }
31782
31783 /// <summary>
31784 /// For an advertised ProgId, the Id of an Icon element. For a non-advertised ProgId, this is the Id of a file containing an icon resource.
31785 /// </summary>
31786 public string Icon
31787 {
31788 get
31789 {
31790 return this.iconField;
31791 }
31792 set
31793 {
31794 this.iconFieldSet = true;
31795 this.iconField = value;
31796 }
31797 }
31798
31799 public int IconIndex
31800 {
31801 get
31802 {
31803 return this.iconIndexField;
31804 }
31805 set
31806 {
31807 this.iconIndexFieldSet = true;
31808 this.iconIndexField = value;
31809 }
31810 }
31811
31812 public YesNoType Advertise
31813 {
31814 get
31815 {
31816 return this.advertiseField;
31817 }
31818 set
31819 {
31820 this.advertiseFieldSet = true;
31821 this.advertiseField = value;
31822 }
31823 }
31824
31825 /// <summary>
31826 /// Specifies that the associated ProgId should not be opened by users. The value is presented as a warning to users. An empty string is also valid for this attribute.
31827 /// </summary>
31828 public string NoOpen
31829 {
31830 get
31831 {
31832 return this.noOpenField;
31833 }
31834 set
31835 {
31836 this.noOpenFieldSet = true;
31837 this.noOpenField = value;
31838 }
31839 }
31840
31841 public virtual ISchemaElement ParentElement
31842 {
31843 get
31844 {
31845 return this.parentElement;
31846 }
31847 set
31848 {
31849 this.parentElement = value;
31850 }
31851 }
31852
31853 public virtual void AddChild(ISchemaElement child)
31854 {
31855 if ((null == child))
31856 {
31857 throw new ArgumentNullException("child");
31858 }
31859 this.children.AddElement(child);
31860 child.ParentElement = this;
31861 }
31862
31863 public virtual void RemoveChild(ISchemaElement child)
31864 {
31865 if ((null == child))
31866 {
31867 throw new ArgumentNullException("child");
31868 }
31869 this.children.RemoveElement(child);
31870 child.ParentElement = null;
31871 }
31872
31873 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31874 ISchemaElement ICreateChildren.CreateChild(string childName)
31875 {
31876 if (String.IsNullOrEmpty(childName))
31877 {
31878 throw new ArgumentNullException("childName");
31879 }
31880 ISchemaElement childValue = null;
31881 if (("ProgId" == childName))
31882 {
31883 childValue = new ProgId();
31884 }
31885 if (("Extension" == childName))
31886 {
31887 childValue = new Extension();
31888 }
31889 if ((null == childValue))
31890 {
31891 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
31892 }
31893 return childValue;
31894 }
31895
31896 /// <summary>
31897 /// Processes this element and all child elements into an XmlWriter.
31898 /// </summary>
31899 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
31900 public virtual void OutputXml(XmlWriter writer)
31901 {
31902 if ((null == writer))
31903 {
31904 throw new ArgumentNullException("writer");
31905 }
31906 writer.WriteStartElement("ProgId", "http://wixtoolset.org/schemas/v4/wxs");
31907 if (this.idFieldSet)
31908 {
31909 writer.WriteAttributeString("Id", this.idField);
31910 }
31911 if (this.descriptionFieldSet)
31912 {
31913 writer.WriteAttributeString("Description", this.descriptionField);
31914 }
31915 if (this.iconFieldSet)
31916 {
31917 writer.WriteAttributeString("Icon", this.iconField);
31918 }
31919 if (this.iconIndexFieldSet)
31920 {
31921 writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture));
31922 }
31923 if (this.advertiseFieldSet)
31924 {
31925 if ((this.advertiseField == YesNoType.no))
31926 {
31927 writer.WriteAttributeString("Advertise", "no");
31928 }
31929 if ((this.advertiseField == YesNoType.yes))
31930 {
31931 writer.WriteAttributeString("Advertise", "yes");
31932 }
31933 }
31934 if (this.noOpenFieldSet)
31935 {
31936 writer.WriteAttributeString("NoOpen", this.noOpenField);
31937 }
31938 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
31939 {
31940 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
31941 childElement.OutputXml(writer);
31942 }
31943 writer.WriteEndElement();
31944 }
31945
31946 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31947 void ISetAttributes.SetAttribute(string name, string value)
31948 {
31949 if (String.IsNullOrEmpty(name))
31950 {
31951 throw new ArgumentNullException("name");
31952 }
31953 if (("Id" == name))
31954 {
31955 this.idField = value;
31956 this.idFieldSet = true;
31957 }
31958 if (("Description" == name))
31959 {
31960 this.descriptionField = value;
31961 this.descriptionFieldSet = true;
31962 }
31963 if (("Icon" == name))
31964 {
31965 this.iconField = value;
31966 this.iconFieldSet = true;
31967 }
31968 if (("IconIndex" == name))
31969 {
31970 this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31971 this.iconIndexFieldSet = true;
31972 }
31973 if (("Advertise" == name))
31974 {
31975 this.advertiseField = Enums.ParseYesNoType(value);
31976 this.advertiseFieldSet = true;
31977 }
31978 if (("NoOpen" == name))
31979 {
31980 this.noOpenField = value;
31981 this.noOpenFieldSet = true;
31982 }
31983 }
31984 }
31985
31986 /// <summary>
31987 /// Application ID containing DCOM information for the associated application GUID.
31988 /// If this element is nested under a Fragment, Module, or Package element, it must be
31989 /// advertised.
31990 /// </summary>
31991 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
31992 public class AppId : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
31993 {
31994
31995 private ElementCollection children;
31996
31997 private YesNoType activateAtStorageField;
31998
31999 private bool activateAtStorageFieldSet;
32000
32001 private YesNoType advertiseField;
32002
32003 private bool advertiseFieldSet;
32004
32005 private string descriptionField;
32006
32007 private bool descriptionFieldSet;
32008
32009 private string dllSurrogateField;
32010
32011 private bool dllSurrogateFieldSet;
32012
32013 private string idField;
32014
32015 private bool idFieldSet;
32016
32017 private string localServiceField;
32018
32019 private bool localServiceFieldSet;
32020
32021 private string remoteServerNameField;
32022
32023 private bool remoteServerNameFieldSet;
32024
32025 private YesNoType runAsInteractiveUserField;
32026
32027 private bool runAsInteractiveUserFieldSet;
32028
32029 private string serviceParametersField;
32030
32031 private bool serviceParametersFieldSet;
32032
32033 private ISchemaElement parentElement;
32034
32035 public AppId()
32036 {
32037 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
32038 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class)));
32039 this.children = childCollection0;
32040 }
32041
32042 public virtual IEnumerable Children
32043 {
32044 get
32045 {
32046 return this.children;
32047 }
32048 }
32049
32050 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
32051 public virtual IEnumerable this[System.Type childType]
32052 {
32053 get
32054 {
32055 return this.children.Filter(childType);
32056 }
32057 }
32058
32059 /// <summary>
32060 /// Set this value to 'yes' to configure the client to activate on the same system as persistent storage.
32061 /// </summary>
32062 public YesNoType ActivateAtStorage
32063 {
32064 get
32065 {
32066 return this.activateAtStorageField;
32067 }
32068 set
32069 {
32070 this.activateAtStorageFieldSet = true;
32071 this.activateAtStorageField = value;
32072 }
32073 }
32074
32075 /// <summary>
32076 /// Set this value to 'yes' in order to create a normal AppId table row. Set this value to 'no' in order to
32077 /// generate Registry rows that perform similar registration (without the often problematic Windows Installer
32078 /// advertising behavior).
32079 /// </summary>
32080 public YesNoType Advertise
32081 {
32082 get
32083 {
32084 return this.advertiseField;
32085 }
32086 set
32087 {
32088 this.advertiseFieldSet = true;
32089 this.advertiseField = value;
32090 }
32091 }
32092
32093 /// <summary>
32094 /// Set this value to the description of the AppId. It can only be specified when the AppId is not being advertised.
32095 /// </summary>
32096 public string Description
32097 {
32098 get
32099 {
32100 return this.descriptionField;
32101 }
32102 set
32103 {
32104 this.descriptionFieldSet = true;
32105 this.descriptionField = value;
32106 }
32107 }
32108
32109 /// <summary>
32110 /// Set this value to specify that the class is a DLL that is to be activated in a surrogate EXE
32111 /// process, and the surrogate process to be used is the path of a surrogate EXE file specified by the value.
32112 /// </summary>
32113 public string DllSurrogate
32114 {
32115 get
32116 {
32117 return this.dllSurrogateField;
32118 }
32119 set
32120 {
32121 this.dllSurrogateFieldSet = true;
32122 this.dllSurrogateField = value;
32123 }
32124 }
32125
32126 /// <summary>
32127 /// Set this value to the AppID GUID that corresponds to the named executable.
32128 /// </summary>
32129 public string Id
32130 {
32131 get
32132 {
32133 return this.idField;
32134 }
32135 set
32136 {
32137 this.idFieldSet = true;
32138 this.idField = value;
32139 }
32140 }
32141
32142 /// <summary>
32143 /// Set this value to the name of a service to allow the object to be installed as a Win32 service.
32144 /// </summary>
32145 public string LocalService
32146 {
32147 get
32148 {
32149 return this.localServiceField;
32150 }
32151 set
32152 {
32153 this.localServiceFieldSet = true;
32154 this.localServiceField = value;
32155 }
32156 }
32157
32158 /// <summary>
32159 /// Set this value to the name of the remote server to configure the client to request the object
32160 /// be run at a particular machine whenever an activation function is called for which a COSERVERINFO
32161 /// structure is not specified.
32162 /// </summary>
32163 public string RemoteServerName
32164 {
32165 get
32166 {
32167 return this.remoteServerNameField;
32168 }
32169 set
32170 {
32171 this.remoteServerNameFieldSet = true;
32172 this.remoteServerNameField = value;
32173 }
32174 }
32175
32176 /// <summary>
32177 /// Set this value to 'yes' to configure a class to run under the identity of the user currently
32178 /// logged on and connected to the interactive desktop when activated by a remote client without
32179 /// being written as a Win32 service.
32180 /// </summary>
32181 public YesNoType RunAsInteractiveUser
32182 {
32183 get
32184 {
32185 return this.runAsInteractiveUserField;
32186 }
32187 set
32188 {
32189 this.runAsInteractiveUserFieldSet = true;
32190 this.runAsInteractiveUserField = value;
32191 }
32192 }
32193
32194 /// <summary>
32195 /// Set this value to the parameters to be passed to a LocalService on invocation.
32196 /// </summary>
32197 public string ServiceParameters
32198 {
32199 get
32200 {
32201 return this.serviceParametersField;
32202 }
32203 set
32204 {
32205 this.serviceParametersFieldSet = true;
32206 this.serviceParametersField = value;
32207 }
32208 }
32209
32210 public virtual ISchemaElement ParentElement
32211 {
32212 get
32213 {
32214 return this.parentElement;
32215 }
32216 set
32217 {
32218 this.parentElement = value;
32219 }
32220 }
32221
32222 public virtual void AddChild(ISchemaElement child)
32223 {
32224 if ((null == child))
32225 {
32226 throw new ArgumentNullException("child");
32227 }
32228 this.children.AddElement(child);
32229 child.ParentElement = this;
32230 }
32231
32232 public virtual void RemoveChild(ISchemaElement child)
32233 {
32234 if ((null == child))
32235 {
32236 throw new ArgumentNullException("child");
32237 }
32238 this.children.RemoveElement(child);
32239 child.ParentElement = null;
32240 }
32241
32242 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
32243 ISchemaElement ICreateChildren.CreateChild(string childName)
32244 {
32245 if (String.IsNullOrEmpty(childName))
32246 {
32247 throw new ArgumentNullException("childName");
32248 }
32249 ISchemaElement childValue = null;
32250 if (("Class" == childName))
32251 {
32252 childValue = new Class();
32253 }
32254 if ((null == childValue))
32255 {
32256 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
32257 }
32258 return childValue;
32259 }
32260
32261 /// <summary>
32262 /// Processes this element and all child elements into an XmlWriter.
32263 /// </summary>
32264 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
32265 public virtual void OutputXml(XmlWriter writer)
32266 {
32267 if ((null == writer))
32268 {
32269 throw new ArgumentNullException("writer");
32270 }
32271 writer.WriteStartElement("AppId", "http://wixtoolset.org/schemas/v4/wxs");
32272 if (this.activateAtStorageFieldSet)
32273 {
32274 if ((this.activateAtStorageField == YesNoType.no))
32275 {
32276 writer.WriteAttributeString("ActivateAtStorage", "no");
32277 }
32278 if ((this.activateAtStorageField == YesNoType.yes))
32279 {
32280 writer.WriteAttributeString("ActivateAtStorage", "yes");
32281 }
32282 }
32283 if (this.advertiseFieldSet)
32284 {
32285 if ((this.advertiseField == YesNoType.no))
32286 {
32287 writer.WriteAttributeString("Advertise", "no");
32288 }
32289 if ((this.advertiseField == YesNoType.yes))
32290 {
32291 writer.WriteAttributeString("Advertise", "yes");
32292 }
32293 }
32294 if (this.descriptionFieldSet)
32295 {
32296 writer.WriteAttributeString("Description", this.descriptionField);
32297 }
32298 if (this.dllSurrogateFieldSet)
32299 {
32300 writer.WriteAttributeString("DllSurrogate", this.dllSurrogateField);
32301 }
32302 if (this.idFieldSet)
32303 {
32304 writer.WriteAttributeString("Id", this.idField);
32305 }
32306 if (this.localServiceFieldSet)
32307 {
32308 writer.WriteAttributeString("LocalService", this.localServiceField);
32309 }
32310 if (this.remoteServerNameFieldSet)
32311 {
32312 writer.WriteAttributeString("RemoteServerName", this.remoteServerNameField);
32313 }
32314 if (this.runAsInteractiveUserFieldSet)
32315 {
32316 if ((this.runAsInteractiveUserField == YesNoType.no))
32317 {
32318 writer.WriteAttributeString("RunAsInteractiveUser", "no");
32319 }
32320 if ((this.runAsInteractiveUserField == YesNoType.yes))
32321 {
32322 writer.WriteAttributeString("RunAsInteractiveUser", "yes");
32323 }
32324 }
32325 if (this.serviceParametersFieldSet)
32326 {
32327 writer.WriteAttributeString("ServiceParameters", this.serviceParametersField);
32328 }
32329 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
32330 {
32331 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
32332 childElement.OutputXml(writer);
32333 }
32334 writer.WriteEndElement();
32335 }
32336
32337 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
32338 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
32339 void ISetAttributes.SetAttribute(string name, string value)
32340 {
32341 if (String.IsNullOrEmpty(name))
32342 {
32343 throw new ArgumentNullException("name");
32344 }
32345 if (("ActivateAtStorage" == name))
32346 {
32347 this.activateAtStorageField = Enums.ParseYesNoType(value);
32348 this.activateAtStorageFieldSet = true;
32349 }
32350 if (("Advertise" == name))
32351 {
32352 this.advertiseField = Enums.ParseYesNoType(value);
32353 this.advertiseFieldSet = true;
32354 }
32355 if (("Description" == name))
32356 {
32357 this.descriptionField = value;
32358 this.descriptionFieldSet = true;
32359 }
32360 if (("DllSurrogate" == name))
32361 {
32362 this.dllSurrogateField = value;
32363 this.dllSurrogateFieldSet = true;
32364 }
32365 if (("Id" == name))
32366 {
32367 this.idField = value;
32368 this.idFieldSet = true;
32369 }
32370 if (("LocalService" == name))
32371 {
32372 this.localServiceField = value;
32373 this.localServiceFieldSet = true;
32374 }
32375 if (("RemoteServerName" == name))
32376 {
32377 this.remoteServerNameField = value;
32378 this.remoteServerNameFieldSet = true;
32379 }
32380 if (("RunAsInteractiveUser" == name))
32381 {
32382 this.runAsInteractiveUserField = Enums.ParseYesNoType(value);
32383 this.runAsInteractiveUserFieldSet = true;
32384 }
32385 if (("ServiceParameters" == name))
32386 {
32387 this.serviceParametersField = value;
32388 this.serviceParametersFieldSet = true;
32389 }
32390 }
32391 }
32392
32393 /// <summary>
32394 /// COM Class registration for parent Component.
32395 /// </summary>
32396 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
32397 public class Class : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
32398 {
32399
32400 private ElementCollection children;
32401
32402 private string idField;
32403
32404 private bool idFieldSet;
32405
32406 private ContextType contextField;
32407
32408 private bool contextFieldSet;
32409
32410 private string descriptionField;
32411
32412 private bool descriptionFieldSet;
32413
32414 private string appIdField;
32415
32416 private bool appIdFieldSet;
32417
32418 private string iconField;
32419
32420 private bool iconFieldSet;
32421
32422 private int iconIndexField;
32423
32424 private bool iconIndexFieldSet;
32425
32426 private string handlerField;
32427
32428 private bool handlerFieldSet;
32429
32430 private string argumentField;
32431
32432 private bool argumentFieldSet;
32433
32434 private YesNoType relativePathField;
32435
32436 private bool relativePathFieldSet;
32437
32438 private YesNoType advertiseField;
32439
32440 private bool advertiseFieldSet;
32441
32442 private ThreadingModelType threadingModelField;
32443
32444 private bool threadingModelFieldSet;
32445
32446 private string versionField;
32447
32448 private bool versionFieldSet;
32449
32450 private YesNoType insertableField;
32451
32452 private bool insertableFieldSet;
32453
32454 private YesNoType programmableField;
32455
32456 private bool programmableFieldSet;
32457
32458 private string foreignServerField;
32459
32460 private bool foreignServerFieldSet;
32461
32462 private string serverField;
32463
32464 private bool serverFieldSet;
32465
32466 private YesNoType shortPathField;
32467
32468 private bool shortPathFieldSet;
32469
32470 private YesNoType safeForScriptingField;
32471
32472 private bool safeForScriptingFieldSet;
32473
32474 private YesNoType safeForInitializingField;
32475
32476 private bool safeForInitializingFieldSet;
32477
32478 private YesNoType controlField;
32479
32480 private bool controlFieldSet;
32481
32482 private ISchemaElement parentElement;
32483
32484 public Class()
32485 {
32486 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
32487 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgId)));
32488 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileTypeMask)));
32489 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface)));
32490 this.children = childCollection0;
32491 }
32492
32493 public virtual IEnumerable Children
32494 {
32495 get
32496 {
32497 return this.children;
32498 }
32499 }
32500
32501 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
32502 public virtual IEnumerable this[System.Type childType]
32503 {
32504 get
32505 {
32506 return this.children.Filter(childType);
32507 }
32508 }
32509
32510 /// <summary>
32511 /// The Class identifier (CLSID) of a COM server.
32512 /// </summary>
32513 public string Id
32514 {
32515 get
32516 {
32517 return this.idField;
32518 }
32519 set
32520 {
32521 this.idFieldSet = true;
32522 this.idField = value;
32523 }
32524 }
32525
32526 /// <summary>
32527 /// The server context(s) for this COM server. This attribute is optional for VB6 libraries that are marked "PublicNotCreateable".
32528 /// Class elements marked Advertised must specify at least one server context. It is most common for there to be a single value
32529 /// for the Context attribute.
32530 /// </summary>
32531 public ContextType Context
32532 {
32533 get
32534 {
32535 return this.contextField;
32536 }
32537 set
32538 {
32539 this.contextFieldSet = true;
32540 this.contextField = value;
32541 }
32542 }
32543
32544 /// <summary>
32545 /// Localized description associated with the Class ID and Program ID.
32546 /// </summary>
32547 public string Description
32548 {
32549 get
32550 {
32551 return this.descriptionField;
32552 }
32553 set
32554 {
32555 this.descriptionFieldSet = true;
32556 this.descriptionField = value;
32557 }
32558 }
32559
32560 /// <summary>
32561 /// This attribute is only allowed when a Class is advertised. Using this attribute will reference an Application ID
32562 /// containing DCOM information for the associated application GUID. The value must correspond to an AppId/@Id of an
32563 /// AppId element nested under a Fragment, Module, or Package element. To associate an AppId with a non-advertised
32564 /// class, nest the class within a parent AppId element.
32565 /// </summary>
32566 public string AppId
32567 {
32568 get
32569 {
32570 return this.appIdField;
32571 }
32572 set
32573 {
32574 this.appIdFieldSet = true;
32575 this.appIdField = value;
32576 }
32577 }
32578
32579 /// <summary>
32580 /// The file providing the icon associated with this CLSID. Reference to an Icon element
32581 /// (should match the Id attribute of an Icon element). This is currently not supported if the
32582 /// value of the Advertise attribute is "no".
32583 /// </summary>
32584 public string Icon
32585 {
32586 get
32587 {
32588 return this.iconField;
32589 }
32590 set
32591 {
32592 this.iconFieldSet = true;
32593 this.iconField = value;
32594 }
32595 }
32596
32597 /// <summary>
32598 /// Icon index into the icon file.
32599 /// </summary>
32600 public int IconIndex
32601 {
32602 get
32603 {
32604 return this.iconIndexField;
32605 }
32606 set
32607 {
32608 this.iconIndexFieldSet = true;
32609 this.iconIndexField = value;
32610 }
32611 }
32612
32613 /// <summary>
32614 /// The default inproc handler. May be optionally provided only for Context = LocalServer or
32615 /// LocalServer32. Value of "1" creates a 16-bit InprocHandler (appearing as the InprocHandler
32616 /// value). Value of "2" creates a 32-bit InprocHandler (appearing as the InprocHandler32 value).
32617 /// Value of "3" creates 16-bit as well as 32-bit InprocHandlers. A non-numeric value is treated
32618 /// as a system file that serves as the 32-bit InprocHandler (appearing as the InprocHandler32 value).
32619 /// </summary>
32620 public string Handler
32621 {
32622 get
32623 {
32624 return this.handlerField;
32625 }
32626 set
32627 {
32628 this.handlerFieldSet = true;
32629 this.handlerField = value;
32630 }
32631 }
32632
32633 /// <summary>
32634 /// This column is optional only when the Context column is set to "LocalServer"
32635 /// or "LocalServer32" server context. The text is registered as the argument against
32636 /// the OLE server and is used by OLE for invoking the server. Note that the resolution
32637 /// of properties in the Argument field is limited. A property formatted as [Property] in
32638 /// this field can only be resolved if the property already has the intended value when
32639 /// the component owning the class is installed. For example, for the argument "[#MyDoc.doc]"
32640 /// to resolve to the correct value, the same process must be installing the file MyDoc.doc and the
32641 /// component that owns the class.
32642 /// </summary>
32643 public string Argument
32644 {
32645 get
32646 {
32647 return this.argumentField;
32648 }
32649 set
32650 {
32651 this.argumentFieldSet = true;
32652 this.argumentField = value;
32653 }
32654 }
32655
32656 /// <summary>
32657 /// When the value is "yes", the bare file name can be used for COM servers. The installer
32658 /// registers the file name only instead of the complete path. This enables the server in
32659 /// the current directory to take precedence and allows multiple copies of the same component.
32660 /// </summary>
32661 public YesNoType RelativePath
32662 {
32663 get
32664 {
32665 return this.relativePathField;
32666 }
32667 set
32668 {
32669 this.relativePathFieldSet = true;
32670 this.relativePathField = value;
32671 }
32672 }
32673
32674 /// <summary>
32675 /// Set this value to "yes" in order to create a normal Class table row. Set this value to
32676 /// "no" in order to generate Registry rows that perform similar registration (without the
32677 /// often problematic Windows Installer advertising behavior).
32678 /// </summary>
32679 public YesNoType Advertise
32680 {
32681 get
32682 {
32683 return this.advertiseField;
32684 }
32685 set
32686 {
32687 this.advertiseFieldSet = true;
32688 this.advertiseField = value;
32689 }
32690 }
32691
32692 /// <summary>
32693 /// Threading model for the CLSID.
32694 /// </summary>
32695 public ThreadingModelType ThreadingModel
32696 {
32697 get
32698 {
32699 return this.threadingModelField;
32700 }
32701 set
32702 {
32703 this.threadingModelFieldSet = true;
32704 this.threadingModelField = value;
32705 }
32706 }
32707
32708 /// <summary>
32709 /// Version for the CLSID.
32710 /// </summary>
32711 public string Version
32712 {
32713 get
32714 {
32715 return this.versionField;
32716 }
32717 set
32718 {
32719 this.versionFieldSet = true;
32720 this.versionField = value;
32721 }
32722 }
32723
32724 /// <summary>
32725 /// Specifies the CLSID may be insertable.
32726 /// </summary>
32727 public YesNoType Insertable
32728 {
32729 get
32730 {
32731 return this.insertableField;
32732 }
32733 set
32734 {
32735 this.insertableFieldSet = true;
32736 this.insertableField = value;
32737 }
32738 }
32739
32740 /// <summary>
32741 /// Specifies the CLSID may be programmable.
32742 /// </summary>
32743 public YesNoType Programmable
32744 {
32745 get
32746 {
32747 return this.programmableField;
32748 }
32749 set
32750 {
32751 this.programmableFieldSet = true;
32752 this.programmableField = value;
32753 }
32754 }
32755
32756 /// <summary>
32757 /// May only be specified if the value of the Advertise attribute is "no" and Server has not been specified. In addition, it may only
32758 /// be used when the Class element is directly under the Component element. The value can be
32759 /// that of an registry type (REG_SZ). This attribute should be used to specify foreign servers, such as mscoree.dll if needed.
32760 /// </summary>
32761 public string ForeignServer
32762 {
32763 get
32764 {
32765 return this.foreignServerField;
32766 }
32767 set
32768 {
32769 this.foreignServerFieldSet = true;
32770 this.foreignServerField = value;
32771 }
32772 }
32773
32774 /// <summary>
32775 /// May only be specified if the value of the Advertise attribute is "no" and the ForeignServer attribute is not specified. File Id of the
32776 /// COM server file. If this element is nested under a File element, this value defaults to
32777 /// the value of the parent File/@Id.
32778 /// </summary>
32779 public string Server
32780 {
32781 get
32782 {
32783 return this.serverField;
32784 }
32785 set
32786 {
32787 this.serverFieldSet = true;
32788 this.serverField = value;
32789 }
32790 }
32791
32792 /// <summary>
32793 /// Specifies whether or not to use the short path for the COM server. This can only apply when Advertise is set to 'no'. The default is 'no' meaning that it will use the long file name for the COM server.
32794 /// </summary>
32795 public YesNoType ShortPath
32796 {
32797 get
32798 {
32799 return this.shortPathField;
32800 }
32801 set
32802 {
32803 this.shortPathFieldSet = true;
32804 this.shortPathField = value;
32805 }
32806 }
32807
32808 /// <summary>
32809 /// May only be specified if the value of the Advertise attribute is "no".
32810 /// </summary>
32811 public YesNoType SafeForScripting
32812 {
32813 get
32814 {
32815 return this.safeForScriptingField;
32816 }
32817 set
32818 {
32819 this.safeForScriptingFieldSet = true;
32820 this.safeForScriptingField = value;
32821 }
32822 }
32823
32824 /// <summary>
32825 /// May only be specified if the value of the Advertise attribute is "no".
32826 /// </summary>
32827 public YesNoType SafeForInitializing
32828 {
32829 get
32830 {
32831 return this.safeForInitializingField;
32832 }
32833 set
32834 {
32835 this.safeForInitializingFieldSet = true;
32836 this.safeForInitializingField = value;
32837 }
32838 }
32839
32840 /// <summary>
32841 /// Set this attribute's value to 'yes' to identify an object as an ActiveX Control. The default value is 'no'.
32842 /// </summary>
32843 public YesNoType Control
32844 {
32845 get
32846 {
32847 return this.controlField;
32848 }
32849 set
32850 {
32851 this.controlFieldSet = true;
32852 this.controlField = value;
32853 }
32854 }
32855
32856 public virtual ISchemaElement ParentElement
32857 {
32858 get
32859 {
32860 return this.parentElement;
32861 }
32862 set
32863 {
32864 this.parentElement = value;
32865 }
32866 }
32867
32868 public virtual void AddChild(ISchemaElement child)
32869 {
32870 if ((null == child))
32871 {
32872 throw new ArgumentNullException("child");
32873 }
32874 this.children.AddElement(child);
32875 child.ParentElement = this;
32876 }
32877
32878 public virtual void RemoveChild(ISchemaElement child)
32879 {
32880 if ((null == child))
32881 {
32882 throw new ArgumentNullException("child");
32883 }
32884 this.children.RemoveElement(child);
32885 child.ParentElement = null;
32886 }
32887
32888 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
32889 ISchemaElement ICreateChildren.CreateChild(string childName)
32890 {
32891 if (String.IsNullOrEmpty(childName))
32892 {
32893 throw new ArgumentNullException("childName");
32894 }
32895 ISchemaElement childValue = null;
32896 if (("ProgId" == childName))
32897 {
32898 childValue = new ProgId();
32899 }
32900 if (("FileTypeMask" == childName))
32901 {
32902 childValue = new FileTypeMask();
32903 }
32904 if (("Interface" == childName))
32905 {
32906 childValue = new Interface();
32907 }
32908 if ((null == childValue))
32909 {
32910 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
32911 }
32912 return childValue;
32913 }
32914
32915 /// <summary>
32916 /// Tries to parse a ContextType from a string.
32917 /// </summary>
32918 public static bool TryParseContextType(string value, out ContextType parsedValue)
32919 {
32920 parsedValue = ContextType.None;
32921 if (string.IsNullOrEmpty(value))
32922 {
32923 return false;
32924 }
32925 string[] splitValue = value.Split(" \t\r\n".ToCharArray(), System.StringSplitOptions.RemoveEmptyEntries);
32926 for (System.Collections.IEnumerator enumerator = splitValue.GetEnumerator(); enumerator.MoveNext();
32927 )
32928 {
32929 string currentValue = ((string)(enumerator.Current));
32930 if (("LocalServer" == currentValue))
32931 {
32932 parsedValue = (parsedValue | ContextType.LocalServer);
32933 }
32934 else
32935 {
32936 if (("LocalServer32" == currentValue))
32937 {
32938 parsedValue = (parsedValue | ContextType.LocalServer32);
32939 }
32940 else
32941 {
32942 if (("InprocServer" == currentValue))
32943 {
32944 parsedValue = (parsedValue | ContextType.InprocServer);
32945 }
32946 else
32947 {
32948 if (("InprocServer32" == currentValue))
32949 {
32950 parsedValue = (parsedValue | ContextType.InprocServer32);
32951 }
32952 else
32953 {
32954 parsedValue = ContextType.None;
32955 return false;
32956 }
32957 }
32958 }
32959 }
32960 }
32961 return true;
32962 }
32963
32964 /// <summary>
32965 /// Parses a ThreadingModelType from a string.
32966 /// </summary>
32967 public static ThreadingModelType ParseThreadingModelType(string value)
32968 {
32969 ThreadingModelType parsedValue;
32970 Class.TryParseThreadingModelType(value, out parsedValue);
32971 return parsedValue;
32972 }
32973
32974 /// <summary>
32975 /// Tries to parse a ThreadingModelType from a string.
32976 /// </summary>
32977 public static bool TryParseThreadingModelType(string value, out ThreadingModelType parsedValue)
32978 {
32979 parsedValue = ThreadingModelType.NotSet;
32980 if (string.IsNullOrEmpty(value))
32981 {
32982 return false;
32983 }
32984 if (("apartment" == value))
32985 {
32986 parsedValue = ThreadingModelType.apartment;
32987 }
32988 else
32989 {
32990 if (("free" == value))
32991 {
32992 parsedValue = ThreadingModelType.free;
32993 }
32994 else
32995 {
32996 if (("both" == value))
32997 {
32998 parsedValue = ThreadingModelType.both;
32999 }
33000 else
33001 {
33002 if (("neutral" == value))
33003 {
33004 parsedValue = ThreadingModelType.neutral;
33005 }
33006 else
33007 {
33008 if (("single" == value))
33009 {
33010 parsedValue = ThreadingModelType.single;
33011 }
33012 else
33013 {
33014 if (("rental" == value))
33015 {
33016 parsedValue = ThreadingModelType.rental;
33017 }
33018 else
33019 {
33020 parsedValue = ThreadingModelType.IllegalValue;
33021 return false;
33022 }
33023 }
33024 }
33025 }
33026 }
33027 }
33028 return true;
33029 }
33030
33031 /// <summary>
33032 /// Processes this element and all child elements into an XmlWriter.
33033 /// </summary>
33034 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
33035 public virtual void OutputXml(XmlWriter writer)
33036 {
33037 if ((null == writer))
33038 {
33039 throw new ArgumentNullException("writer");
33040 }
33041 writer.WriteStartElement("Class", "http://wixtoolset.org/schemas/v4/wxs");
33042 if (this.idFieldSet)
33043 {
33044 writer.WriteAttributeString("Id", this.idField);
33045 }
33046 if (this.contextFieldSet)
33047 {
33048 string outputValue = "";
33049 if (((this.contextField & ContextType.LocalServer)
33050 != 0))
33051 {
33052 if ((outputValue.Length != 0))
33053 {
33054 outputValue = (outputValue + " ");
33055 }
33056 outputValue = (outputValue + "LocalServer");
33057 }
33058 if (((this.contextField & ContextType.LocalServer32)
33059 != 0))
33060 {
33061 if ((outputValue.Length != 0))
33062 {
33063 outputValue = (outputValue + " ");
33064 }
33065 outputValue = (outputValue + "LocalServer32");
33066 }
33067 if (((this.contextField & ContextType.InprocServer)
33068 != 0))
33069 {
33070 if ((outputValue.Length != 0))
33071 {
33072 outputValue = (outputValue + " ");
33073 }
33074 outputValue = (outputValue + "InprocServer");
33075 }
33076 if (((this.contextField & ContextType.InprocServer32)
33077 != 0))
33078 {
33079 if ((outputValue.Length != 0))
33080 {
33081 outputValue = (outputValue + " ");
33082 }
33083 outputValue = (outputValue + "InprocServer32");
33084 }
33085 writer.WriteAttributeString("Context", outputValue);
33086 }
33087 if (this.descriptionFieldSet)
33088 {
33089 writer.WriteAttributeString("Description", this.descriptionField);
33090 }
33091 if (this.appIdFieldSet)
33092 {
33093 writer.WriteAttributeString("AppId", this.appIdField);
33094 }
33095 if (this.iconFieldSet)
33096 {
33097 writer.WriteAttributeString("Icon", this.iconField);
33098 }
33099 if (this.iconIndexFieldSet)
33100 {
33101 writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture));
33102 }
33103 if (this.handlerFieldSet)
33104 {
33105 writer.WriteAttributeString("Handler", this.handlerField);
33106 }
33107 if (this.argumentFieldSet)
33108 {
33109 writer.WriteAttributeString("Argument", this.argumentField);
33110 }
33111 if (this.relativePathFieldSet)
33112 {
33113 if ((this.relativePathField == YesNoType.no))
33114 {
33115 writer.WriteAttributeString("RelativePath", "no");
33116 }
33117 if ((this.relativePathField == YesNoType.yes))
33118 {
33119 writer.WriteAttributeString("RelativePath", "yes");
33120 }
33121 }
33122 if (this.advertiseFieldSet)
33123 {
33124 if ((this.advertiseField == YesNoType.no))
33125 {
33126 writer.WriteAttributeString("Advertise", "no");
33127 }
33128 if ((this.advertiseField == YesNoType.yes))
33129 {
33130 writer.WriteAttributeString("Advertise", "yes");
33131 }
33132 }
33133 if (this.threadingModelFieldSet)
33134 {
33135 if ((this.threadingModelField == ThreadingModelType.apartment))
33136 {
33137 writer.WriteAttributeString("ThreadingModel", "apartment");
33138 }
33139 if ((this.threadingModelField == ThreadingModelType.free))
33140 {
33141 writer.WriteAttributeString("ThreadingModel", "free");
33142 }
33143 if ((this.threadingModelField == ThreadingModelType.both))
33144 {
33145 writer.WriteAttributeString("ThreadingModel", "both");
33146 }
33147 if ((this.threadingModelField == ThreadingModelType.neutral))
33148 {
33149 writer.WriteAttributeString("ThreadingModel", "neutral");
33150 }
33151 if ((this.threadingModelField == ThreadingModelType.single))
33152 {
33153 writer.WriteAttributeString("ThreadingModel", "single");
33154 }
33155 if ((this.threadingModelField == ThreadingModelType.rental))
33156 {
33157 writer.WriteAttributeString("ThreadingModel", "rental");
33158 }
33159 }
33160 if (this.versionFieldSet)
33161 {
33162 writer.WriteAttributeString("Version", this.versionField);
33163 }
33164 if (this.insertableFieldSet)
33165 {
33166 if ((this.insertableField == YesNoType.no))
33167 {
33168 writer.WriteAttributeString("Insertable", "no");
33169 }
33170 if ((this.insertableField == YesNoType.yes))
33171 {
33172 writer.WriteAttributeString("Insertable", "yes");
33173 }
33174 }
33175 if (this.programmableFieldSet)
33176 {
33177 if ((this.programmableField == YesNoType.no))
33178 {
33179 writer.WriteAttributeString("Programmable", "no");
33180 }
33181 if ((this.programmableField == YesNoType.yes))
33182 {
33183 writer.WriteAttributeString("Programmable", "yes");
33184 }
33185 }
33186 if (this.foreignServerFieldSet)
33187 {
33188 writer.WriteAttributeString("ForeignServer", this.foreignServerField);
33189 }
33190 if (this.serverFieldSet)
33191 {
33192 writer.WriteAttributeString("Server", this.serverField);
33193 }
33194 if (this.shortPathFieldSet)
33195 {
33196 if ((this.shortPathField == YesNoType.no))
33197 {
33198 writer.WriteAttributeString("ShortPath", "no");
33199 }
33200 if ((this.shortPathField == YesNoType.yes))
33201 {
33202 writer.WriteAttributeString("ShortPath", "yes");
33203 }
33204 }
33205 if (this.safeForScriptingFieldSet)
33206 {
33207 if ((this.safeForScriptingField == YesNoType.no))
33208 {
33209 writer.WriteAttributeString("SafeForScripting", "no");
33210 }
33211 if ((this.safeForScriptingField == YesNoType.yes))
33212 {
33213 writer.WriteAttributeString("SafeForScripting", "yes");
33214 }
33215 }
33216 if (this.safeForInitializingFieldSet)
33217 {
33218 if ((this.safeForInitializingField == YesNoType.no))
33219 {
33220 writer.WriteAttributeString("SafeForInitializing", "no");
33221 }
33222 if ((this.safeForInitializingField == YesNoType.yes))
33223 {
33224 writer.WriteAttributeString("SafeForInitializing", "yes");
33225 }
33226 }
33227 if (this.controlFieldSet)
33228 {
33229 if ((this.controlField == YesNoType.no))
33230 {
33231 writer.WriteAttributeString("Control", "no");
33232 }
33233 if ((this.controlField == YesNoType.yes))
33234 {
33235 writer.WriteAttributeString("Control", "yes");
33236 }
33237 }
33238 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
33239 {
33240 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
33241 childElement.OutputXml(writer);
33242 }
33243 writer.WriteEndElement();
33244 }
33245
33246 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
33247 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
33248 void ISetAttributes.SetAttribute(string name, string value)
33249 {
33250 if (String.IsNullOrEmpty(name))
33251 {
33252 throw new ArgumentNullException("name");
33253 }
33254 if (("Id" == name))
33255 {
33256 this.idField = value;
33257 this.idFieldSet = true;
33258 }
33259 if (("Context" == name))
33260 {
33261 Class.TryParseContextType(value, out this.contextField);
33262 this.contextFieldSet = true;
33263 }
33264 if (("Description" == name))
33265 {
33266 this.descriptionField = value;
33267 this.descriptionFieldSet = true;
33268 }
33269 if (("AppId" == name))
33270 {
33271 this.appIdField = value;
33272 this.appIdFieldSet = true;
33273 }
33274 if (("Icon" == name))
33275 {
33276 this.iconField = value;
33277 this.iconFieldSet = true;
33278 }
33279 if (("IconIndex" == name))
33280 {
33281 this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
33282 this.iconIndexFieldSet = true;
33283 }
33284 if (("Handler" == name))
33285 {
33286 this.handlerField = value;
33287 this.handlerFieldSet = true;
33288 }
33289 if (("Argument" == name))
33290 {
33291 this.argumentField = value;
33292 this.argumentFieldSet = true;
33293 }
33294 if (("RelativePath" == name))
33295 {
33296 this.relativePathField = Enums.ParseYesNoType(value);
33297 this.relativePathFieldSet = true;
33298 }
33299 if (("Advertise" == name))
33300 {
33301 this.advertiseField = Enums.ParseYesNoType(value);
33302 this.advertiseFieldSet = true;
33303 }
33304 if (("ThreadingModel" == name))
33305 {
33306 this.threadingModelField = Class.ParseThreadingModelType(value);
33307 this.threadingModelFieldSet = true;
33308 }
33309 if (("Version" == name))
33310 {
33311 this.versionField = value;
33312 this.versionFieldSet = true;
33313 }
33314 if (("Insertable" == name))
33315 {
33316 this.insertableField = Enums.ParseYesNoType(value);
33317 this.insertableFieldSet = true;
33318 }
33319 if (("Programmable" == name))
33320 {
33321 this.programmableField = Enums.ParseYesNoType(value);
33322 this.programmableFieldSet = true;
33323 }
33324 if (("ForeignServer" == name))
33325 {
33326 this.foreignServerField = value;
33327 this.foreignServerFieldSet = true;
33328 }
33329 if (("Server" == name))
33330 {
33331 this.serverField = value;
33332 this.serverFieldSet = true;
33333 }
33334 if (("ShortPath" == name))
33335 {
33336 this.shortPathField = Enums.ParseYesNoType(value);
33337 this.shortPathFieldSet = true;
33338 }
33339 if (("SafeForScripting" == name))
33340 {
33341 this.safeForScriptingField = Enums.ParseYesNoType(value);
33342 this.safeForScriptingFieldSet = true;
33343 }
33344 if (("SafeForInitializing" == name))
33345 {
33346 this.safeForInitializingField = Enums.ParseYesNoType(value);
33347 this.safeForInitializingFieldSet = true;
33348 }
33349 if (("Control" == name))
33350 {
33351 this.controlField = Enums.ParseYesNoType(value);
33352 this.controlFieldSet = true;
33353 }
33354 }
33355
33356 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33357 [Flags()]
33358 public enum ContextType
33359 {
33360
33361 None = 0,
33362
33363 /// <summary>
33364 /// A 16-bit local server application.
33365 /// </summary>
33366 LocalServer = 1,
33367
33368 /// <summary>
33369 /// A 32-bit local server application.
33370 /// </summary>
33371 LocalServer32 = 2,
33372
33373 /// <summary>
33374 /// A 16-bit in-process server DLL.
33375 /// </summary>
33376 InprocServer = 4,
33377
33378 /// <summary>
33379 /// A 32-bit in-process server DLL.
33380 /// </summary>
33381 InprocServer32 = 8,
33382 }
33383
33384 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33385 public enum ThreadingModelType
33386 {
33387
33388 IllegalValue = int.MaxValue,
33389
33390 NotSet = -1,
33391
33392 apartment,
33393
33394 free,
33395
33396 both,
33397
33398 neutral,
33399
33400 single,
33401
33402 rental,
33403 }
33404 }
33405
33406 /// <summary>
33407 /// COM Interface registration for parent TypeLib.
33408 /// </summary>
33409 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33410 public class Interface : ISchemaElement, ISetAttributes
33411 {
33412
33413 private string idField;
33414
33415 private bool idFieldSet;
33416
33417 private string nameField;
33418
33419 private bool nameFieldSet;
33420
33421 private string baseInterfaceField;
33422
33423 private bool baseInterfaceFieldSet;
33424
33425 private string proxyStubClassIdField;
33426
33427 private bool proxyStubClassIdFieldSet;
33428
33429 private string proxyStubClassId32Field;
33430
33431 private bool proxyStubClassId32FieldSet;
33432
33433 private int numMethodsField;
33434
33435 private bool numMethodsFieldSet;
33436
33437 private YesNoType versionedField;
33438
33439 private bool versionedFieldSet;
33440
33441 private ISchemaElement parentElement;
33442
33443 /// <summary>
33444 /// GUID identifier for COM Interface.
33445 /// </summary>
33446 public string Id
33447 {
33448 get
33449 {
33450 return this.idField;
33451 }
33452 set
33453 {
33454 this.idFieldSet = true;
33455 this.idField = value;
33456 }
33457 }
33458
33459 /// <summary>
33460 /// Name for COM Interface.
33461 /// </summary>
33462 public string Name
33463 {
33464 get
33465 {
33466 return this.nameField;
33467 }
33468 set
33469 {
33470 this.nameFieldSet = true;
33471 this.nameField = value;
33472 }
33473 }
33474
33475 /// <summary>
33476 /// Identifies the interface from which the current interface is derived.
33477 /// </summary>
33478 public string BaseInterface
33479 {
33480 get
33481 {
33482 return this.baseInterfaceField;
33483 }
33484 set
33485 {
33486 this.baseInterfaceFieldSet = true;
33487 this.baseInterfaceField = value;
33488 }
33489 }
33490
33491 /// <summary>
33492 /// GUID CLSID for proxy stub to COM Interface.
33493 /// </summary>
33494 public string ProxyStubClassId
33495 {
33496 get
33497 {
33498 return this.proxyStubClassIdField;
33499 }
33500 set
33501 {
33502 this.proxyStubClassIdFieldSet = true;
33503 this.proxyStubClassIdField = value;
33504 }
33505 }
33506
33507 /// <summary>
33508 /// GUID CLSID for 32-bit proxy stub to COM Interface.
33509 /// </summary>
33510 public string ProxyStubClassId32
33511 {
33512 get
33513 {
33514 return this.proxyStubClassId32Field;
33515 }
33516 set
33517 {
33518 this.proxyStubClassId32FieldSet = true;
33519 this.proxyStubClassId32Field = value;
33520 }
33521 }
33522
33523 /// <summary>
33524 /// Number of methods implemented on COM Interface.
33525 /// </summary>
33526 public int NumMethods
33527 {
33528 get
33529 {
33530 return this.numMethodsField;
33531 }
33532 set
33533 {
33534 this.numMethodsFieldSet = true;
33535 this.numMethodsField = value;
33536 }
33537 }
33538
33539 /// <summary>
33540 /// Determines whether a Typelib version entry should be created with the other COM Interface registry keys. Default is 'yes'.
33541 /// </summary>
33542 public YesNoType Versioned
33543 {
33544 get
33545 {
33546 return this.versionedField;
33547 }
33548 set
33549 {
33550 this.versionedFieldSet = true;
33551 this.versionedField = value;
33552 }
33553 }
33554
33555 public virtual ISchemaElement ParentElement
33556 {
33557 get
33558 {
33559 return this.parentElement;
33560 }
33561 set
33562 {
33563 this.parentElement = value;
33564 }
33565 }
33566
33567 /// <summary>
33568 /// Processes this element and all child elements into an XmlWriter.
33569 /// </summary>
33570 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
33571 public virtual void OutputXml(XmlWriter writer)
33572 {
33573 if ((null == writer))
33574 {
33575 throw new ArgumentNullException("writer");
33576 }
33577 writer.WriteStartElement("Interface", "http://wixtoolset.org/schemas/v4/wxs");
33578 if (this.idFieldSet)
33579 {
33580 writer.WriteAttributeString("Id", this.idField);
33581 }
33582 if (this.nameFieldSet)
33583 {
33584 writer.WriteAttributeString("Name", this.nameField);
33585 }
33586 if (this.baseInterfaceFieldSet)
33587 {
33588 writer.WriteAttributeString("BaseInterface", this.baseInterfaceField);
33589 }
33590 if (this.proxyStubClassIdFieldSet)
33591 {
33592 writer.WriteAttributeString("ProxyStubClassId", this.proxyStubClassIdField);
33593 }
33594 if (this.proxyStubClassId32FieldSet)
33595 {
33596 writer.WriteAttributeString("ProxyStubClassId32", this.proxyStubClassId32Field);
33597 }
33598 if (this.numMethodsFieldSet)
33599 {
33600 writer.WriteAttributeString("NumMethods", this.numMethodsField.ToString(CultureInfo.InvariantCulture));
33601 }
33602 if (this.versionedFieldSet)
33603 {
33604 if ((this.versionedField == YesNoType.no))
33605 {
33606 writer.WriteAttributeString("Versioned", "no");
33607 }
33608 if ((this.versionedField == YesNoType.yes))
33609 {
33610 writer.WriteAttributeString("Versioned", "yes");
33611 }
33612 }
33613 writer.WriteEndElement();
33614 }
33615
33616 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
33617 void ISetAttributes.SetAttribute(string name, string value)
33618 {
33619 if (String.IsNullOrEmpty(name))
33620 {
33621 throw new ArgumentNullException("name");
33622 }
33623 if (("Id" == name))
33624 {
33625 this.idField = value;
33626 this.idFieldSet = true;
33627 }
33628 if (("Name" == name))
33629 {
33630 this.nameField = value;
33631 this.nameFieldSet = true;
33632 }
33633 if (("BaseInterface" == name))
33634 {
33635 this.baseInterfaceField = value;
33636 this.baseInterfaceFieldSet = true;
33637 }
33638 if (("ProxyStubClassId" == name))
33639 {
33640 this.proxyStubClassIdField = value;
33641 this.proxyStubClassIdFieldSet = true;
33642 }
33643 if (("ProxyStubClassId32" == name))
33644 {
33645 this.proxyStubClassId32Field = value;
33646 this.proxyStubClassId32FieldSet = true;
33647 }
33648 if (("NumMethods" == name))
33649 {
33650 this.numMethodsField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
33651 this.numMethodsFieldSet = true;
33652 }
33653 if (("Versioned" == name))
33654 {
33655 this.versionedField = Enums.ParseYesNoType(value);
33656 this.versionedFieldSet = true;
33657 }
33658 }
33659 }
33660
33661 /// <summary>
33662 /// FileType data for class Id registration.
33663 /// </summary>
33664 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33665 public class FileTypeMask : ISchemaElement, ISetAttributes
33666 {
33667
33668 private int offsetField;
33669
33670 private bool offsetFieldSet;
33671
33672 private string maskField;
33673
33674 private bool maskFieldSet;
33675
33676 private string valueField;
33677
33678 private bool valueFieldSet;
33679
33680 private ISchemaElement parentElement;
33681
33682 /// <summary>
33683 /// Offset into file. If positive, offset is from the beginning; if negative, offset is from the end.
33684 /// </summary>
33685 public int Offset
33686 {
33687 get
33688 {
33689 return this.offsetField;
33690 }
33691 set
33692 {
33693 this.offsetFieldSet = true;
33694 this.offsetField = value;
33695 }
33696 }
33697
33698 /// <summary>
33699 /// Hex value that is AND'd against the bytes in the file at Offset.
33700 /// </summary>
33701 public string Mask
33702 {
33703 get
33704 {
33705 return this.maskField;
33706 }
33707 set
33708 {
33709 this.maskFieldSet = true;
33710 this.maskField = value;
33711 }
33712 }
33713
33714 /// <summary>
33715 /// If the result of the AND'ing of Mask with the bytes in the file is Value, the file is a match for this File Type.
33716 /// </summary>
33717 public string Value
33718 {
33719 get
33720 {
33721 return this.valueField;
33722 }
33723 set
33724 {
33725 this.valueFieldSet = true;
33726 this.valueField = value;
33727 }
33728 }
33729
33730 public virtual ISchemaElement ParentElement
33731 {
33732 get
33733 {
33734 return this.parentElement;
33735 }
33736 set
33737 {
33738 this.parentElement = value;
33739 }
33740 }
33741
33742 /// <summary>
33743 /// Processes this element and all child elements into an XmlWriter.
33744 /// </summary>
33745 public virtual void OutputXml(XmlWriter writer)
33746 {
33747 if ((null == writer))
33748 {
33749 throw new ArgumentNullException("writer");
33750 }
33751 writer.WriteStartElement("FileTypeMask", "http://wixtoolset.org/schemas/v4/wxs");
33752 if (this.offsetFieldSet)
33753 {
33754 writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture));
33755 }
33756 if (this.maskFieldSet)
33757 {
33758 writer.WriteAttributeString("Mask", this.maskField);
33759 }
33760 if (this.valueFieldSet)
33761 {
33762 writer.WriteAttributeString("Value", this.valueField);
33763 }
33764 writer.WriteEndElement();
33765 }
33766
33767 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
33768 void ISetAttributes.SetAttribute(string name, string value)
33769 {
33770 if (String.IsNullOrEmpty(name))
33771 {
33772 throw new ArgumentNullException("name");
33773 }
33774 if (("Offset" == name))
33775 {
33776 this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
33777 this.offsetFieldSet = true;
33778 }
33779 if (("Mask" == name))
33780 {
33781 this.maskField = value;
33782 this.maskFieldSet = true;
33783 }
33784 if (("Value" == name))
33785 {
33786 this.valueField = value;
33787 this.valueFieldSet = true;
33788 }
33789 }
33790 }
33791
33792 /// <summary>
33793 /// Service or group of services that must start before the parent service.
33794 /// </summary>
33795 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33796 public class ServiceDependency : ISchemaElement, ISetAttributes
33797 {
33798
33799 private string idField;
33800
33801 private bool idFieldSet;
33802
33803 private YesNoType groupField;
33804
33805 private bool groupFieldSet;
33806
33807 private ISchemaElement parentElement;
33808
33809 /// <summary>
33810 /// The value of this attribute should be one of the following:
33811 /// </summary>
33812 public string Id
33813 {
33814 get
33815 {
33816 return this.idField;
33817 }
33818 set
33819 {
33820 this.idFieldSet = true;
33821 this.idField = value;
33822 }
33823 }
33824
33825 /// <summary>
33826 /// Set to 'yes' to indicate that the value in the Id attribute is the name of a group of services.
33827 /// </summary>
33828 public YesNoType Group
33829 {
33830 get
33831 {
33832 return this.groupField;
33833 }
33834 set
33835 {
33836 this.groupFieldSet = true;
33837 this.groupField = value;
33838 }
33839 }
33840
33841 public virtual ISchemaElement ParentElement
33842 {
33843 get
33844 {
33845 return this.parentElement;
33846 }
33847 set
33848 {
33849 this.parentElement = value;
33850 }
33851 }
33852
33853 /// <summary>
33854 /// Processes this element and all child elements into an XmlWriter.
33855 /// </summary>
33856 public virtual void OutputXml(XmlWriter writer)
33857 {
33858 if ((null == writer))
33859 {
33860 throw new ArgumentNullException("writer");
33861 }
33862 writer.WriteStartElement("ServiceDependency", "http://wixtoolset.org/schemas/v4/wxs");
33863 if (this.idFieldSet)
33864 {
33865 writer.WriteAttributeString("Id", this.idField);
33866 }
33867 if (this.groupFieldSet)
33868 {
33869 if ((this.groupField == YesNoType.no))
33870 {
33871 writer.WriteAttributeString("Group", "no");
33872 }
33873 if ((this.groupField == YesNoType.yes))
33874 {
33875 writer.WriteAttributeString("Group", "yes");
33876 }
33877 }
33878 writer.WriteEndElement();
33879 }
33880
33881 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
33882 void ISetAttributes.SetAttribute(string name, string value)
33883 {
33884 if (String.IsNullOrEmpty(name))
33885 {
33886 throw new ArgumentNullException("name");
33887 }
33888 if (("Id" == name))
33889 {
33890 this.idField = value;
33891 this.idFieldSet = true;
33892 }
33893 if (("Group" == name))
33894 {
33895 this.groupField = Enums.ParseYesNoType(value);
33896 this.groupFieldSet = true;
33897 }
33898 }
33899 }
33900
33901 /// <summary>
33902 /// Adds services for parent Component. Use the ServiceControl element to remove services.
33903 /// </summary>
33904 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33905 public class ServiceInstall : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
33906 {
33907
33908 private ElementCollection children;
33909
33910 private string idField;
33911
33912 private bool idFieldSet;
33913
33914 private string nameField;
33915
33916 private bool nameFieldSet;
33917
33918 private string displayNameField;
33919
33920 private bool displayNameFieldSet;
33921
33922 private TypeType typeField;
33923
33924 private bool typeFieldSet;
33925
33926 private YesNoType interactiveField;
33927
33928 private bool interactiveFieldSet;
33929
33930 private StartType startField;
33931
33932 private bool startFieldSet;
33933
33934 private ErrorControlType errorControlField;
33935
33936 private bool errorControlFieldSet;
33937
33938 private YesNoType vitalField;
33939
33940 private bool vitalFieldSet;
33941
33942 private string loadOrderGroupField;
33943
33944 private bool loadOrderGroupFieldSet;
33945
33946 private string accountField;
33947
33948 private bool accountFieldSet;
33949
33950 private string passwordField;
33951
33952 private bool passwordFieldSet;
33953
33954 private string argumentsField;
33955
33956 private bool argumentsFieldSet;
33957
33958 private string descriptionField;
33959
33960 private bool descriptionFieldSet;
33961
33962 private YesNoType eraseDescriptionField;
33963
33964 private bool eraseDescriptionFieldSet;
33965
33966 private ISchemaElement parentElement;
33967
33968 public ServiceInstall()
33969 {
33970 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
33971 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
33972 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceDependency)));
33973 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfig)));
33974 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfigFailureActions)));
33975 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
33976 this.children = childCollection0;
33977 }
33978
33979 public virtual IEnumerable Children
33980 {
33981 get
33982 {
33983 return this.children;
33984 }
33985 }
33986
33987 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
33988 public virtual IEnumerable this[System.Type childType]
33989 {
33990 get
33991 {
33992 return this.children.Filter(childType);
33993 }
33994 }
33995
33996 /// <summary>
33997 /// Unique identifier for this service configuration. This value will default to the Name attribute if not
33998 /// specified.
33999 /// </summary>
34000 public string Id
34001 {
34002 get
34003 {
34004 return this.idField;
34005 }
34006 set
34007 {
34008 this.idFieldSet = true;
34009 this.idField = value;
34010 }
34011 }
34012
34013 /// <summary>
34014 /// This column is the string that gives the service name to install.
34015 /// </summary>
34016 public string Name
34017 {
34018 get
34019 {
34020 return this.nameField;
34021 }
34022 set
34023 {
34024 this.nameFieldSet = true;
34025 this.nameField = value;
34026 }
34027 }
34028
34029 /// <summary>
34030 /// This column is the localizable string that user interface programs use to identify the service.
34031 /// </summary>
34032 public string DisplayName
34033 {
34034 get
34035 {
34036 return this.displayNameField;
34037 }
34038 set
34039 {
34040 this.displayNameFieldSet = true;
34041 this.displayNameField = value;
34042 }
34043 }
34044
34045 /// <summary>
34046 /// The Windows Installer does not currently support kernelDriver or systemDriver.
34047 /// </summary>
34048 public TypeType Type
34049 {
34050 get
34051 {
34052 return this.typeField;
34053 }
34054 set
34055 {
34056 this.typeFieldSet = true;
34057 this.typeField = value;
34058 }
34059 }
34060
34061 /// <summary>
34062 /// Whether or not the service interacts with the desktop.
34063 /// </summary>
34064 public YesNoType Interactive
34065 {
34066 get
34067 {
34068 return this.interactiveField;
34069 }
34070 set
34071 {
34072 this.interactiveFieldSet = true;
34073 this.interactiveField = value;
34074 }
34075 }
34076
34077 /// <summary>
34078 /// Determines when the service should be started. The Windows Installer does not support boot or system.
34079 /// </summary>
34080 public StartType Start
34081 {
34082 get
34083 {
34084 return this.startField;
34085 }
34086 set
34087 {
34088 this.startFieldSet = true;
34089 this.startField = value;
34090 }
34091 }
34092
34093 /// <summary>
34094 /// Determines what action should be taken on an error.
34095 /// </summary>
34096 public ErrorControlType ErrorControl
34097 {
34098 get
34099 {
34100 return this.errorControlField;
34101 }
34102 set
34103 {
34104 this.errorControlFieldSet = true;
34105 this.errorControlField = value;
34106 }
34107 }
34108
34109 /// <summary>
34110 /// The overall install should fail if this service fails to install.
34111 /// </summary>
34112 public YesNoType Vital
34113 {
34114 get
34115 {
34116 return this.vitalField;
34117 }
34118 set
34119 {
34120 this.vitalFieldSet = true;
34121 this.vitalField = value;
34122 }
34123 }
34124
34125 /// <summary>
34126 /// The load ordering group that this service should be a part of.
34127 /// </summary>
34128 public string LoadOrderGroup
34129 {
34130 get
34131 {
34132 return this.loadOrderGroupField;
34133 }
34134 set
34135 {
34136 this.loadOrderGroupFieldSet = true;
34137 this.loadOrderGroupField = value;
34138 }
34139 }
34140
34141 /// <summary>
34142 /// Fully qualified names must be used even for local accounts, e.g.: ".\LOCAL_ACCOUNT". Valid only when ServiceType is ownProcess.
34143 /// </summary>
34144 public string Account
34145 {
34146 get
34147 {
34148 return this.accountField;
34149 }
34150 set
34151 {
34152 this.accountFieldSet = true;
34153 this.accountField = value;
34154 }
34155 }
34156
34157 /// <summary>
34158 /// The password for the account. Valid only when the account has a password.
34159 /// </summary>
34160 public string Password
34161 {
34162 get
34163 {
34164 return this.passwordField;
34165 }
34166 set
34167 {
34168 this.passwordFieldSet = true;
34169 this.passwordField = value;
34170 }
34171 }
34172
34173 /// <summary>
34174 /// Contains any command line arguments or properties required to run the service.
34175 /// </summary>
34176 public string Arguments
34177 {
34178 get
34179 {
34180 return this.argumentsField;
34181 }
34182 set
34183 {
34184 this.argumentsFieldSet = true;
34185 this.argumentsField = value;
34186 }
34187 }
34188
34189 /// <summary>
34190 /// Sets the description of the service.
34191 /// </summary>
34192 public string Description
34193 {
34194 get
34195 {
34196 return this.descriptionField;
34197 }
34198 set
34199 {
34200 this.descriptionFieldSet = true;
34201 this.descriptionField = value;
34202 }
34203 }
34204
34205 /// <summary>
34206 /// Determines whether the existing service description will be ignored. If 'yes', the service description will be null, even if the Description attribute is set.
34207 /// </summary>
34208 public YesNoType EraseDescription
34209 {
34210 get
34211 {
34212 return this.eraseDescriptionField;
34213 }
34214 set
34215 {
34216 this.eraseDescriptionFieldSet = true;
34217 this.eraseDescriptionField = value;
34218 }
34219 }
34220
34221 public virtual ISchemaElement ParentElement
34222 {
34223 get
34224 {
34225 return this.parentElement;
34226 }
34227 set
34228 {
34229 this.parentElement = value;
34230 }
34231 }
34232
34233 public virtual void AddChild(ISchemaElement child)
34234 {
34235 if ((null == child))
34236 {
34237 throw new ArgumentNullException("child");
34238 }
34239 this.children.AddElement(child);
34240 child.ParentElement = this;
34241 }
34242
34243 public virtual void RemoveChild(ISchemaElement child)
34244 {
34245 if ((null == child))
34246 {
34247 throw new ArgumentNullException("child");
34248 }
34249 this.children.RemoveElement(child);
34250 child.ParentElement = null;
34251 }
34252
34253 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
34254 ISchemaElement ICreateChildren.CreateChild(string childName)
34255 {
34256 if (String.IsNullOrEmpty(childName))
34257 {
34258 throw new ArgumentNullException("childName");
34259 }
34260 ISchemaElement childValue = null;
34261 if (("PermissionEx" == childName))
34262 {
34263 childValue = new PermissionEx();
34264 }
34265 if (("ServiceDependency" == childName))
34266 {
34267 childValue = new ServiceDependency();
34268 }
34269 if (("ServiceConfig" == childName))
34270 {
34271 childValue = new ServiceConfig();
34272 }
34273 if (("ServiceConfigFailureActions" == childName))
34274 {
34275 childValue = new ServiceConfigFailureActions();
34276 }
34277 if ((null == childValue))
34278 {
34279 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
34280 }
34281 return childValue;
34282 }
34283
34284 /// <summary>
34285 /// Parses a TypeType from a string.
34286 /// </summary>
34287 public static TypeType ParseTypeType(string value)
34288 {
34289 TypeType parsedValue;
34290 ServiceInstall.TryParseTypeType(value, out parsedValue);
34291 return parsedValue;
34292 }
34293
34294 /// <summary>
34295 /// Tries to parse a TypeType from a string.
34296 /// </summary>
34297 public static bool TryParseTypeType(string value, out TypeType parsedValue)
34298 {
34299 parsedValue = TypeType.NotSet;
34300 if (string.IsNullOrEmpty(value))
34301 {
34302 return false;
34303 }
34304 if (("ownProcess" == value))
34305 {
34306 parsedValue = TypeType.ownProcess;
34307 }
34308 else
34309 {
34310 if (("shareProcess" == value))
34311 {
34312 parsedValue = TypeType.shareProcess;
34313 }
34314 else
34315 {
34316 if (("kernelDriver" == value))
34317 {
34318 parsedValue = TypeType.kernelDriver;
34319 }
34320 else
34321 {
34322 if (("systemDriver" == value))
34323 {
34324 parsedValue = TypeType.systemDriver;
34325 }
34326 else
34327 {
34328 parsedValue = TypeType.IllegalValue;
34329 return false;
34330 }
34331 }
34332 }
34333 }
34334 return true;
34335 }
34336
34337 /// <summary>
34338 /// Parses a StartType from a string.
34339 /// </summary>
34340 public static StartType ParseStartType(string value)
34341 {
34342 StartType parsedValue;
34343 ServiceInstall.TryParseStartType(value, out parsedValue);
34344 return parsedValue;
34345 }
34346
34347 /// <summary>
34348 /// Tries to parse a StartType from a string.
34349 /// </summary>
34350 public static bool TryParseStartType(string value, out StartType parsedValue)
34351 {
34352 parsedValue = StartType.NotSet;
34353 if (string.IsNullOrEmpty(value))
34354 {
34355 return false;
34356 }
34357 if (("auto" == value))
34358 {
34359 parsedValue = StartType.auto;
34360 }
34361 else
34362 {
34363 if (("demand" == value))
34364 {
34365 parsedValue = StartType.demand;
34366 }
34367 else
34368 {
34369 if (("disabled" == value))
34370 {
34371 parsedValue = StartType.disabled;
34372 }
34373 else
34374 {
34375 if (("boot" == value))
34376 {
34377 parsedValue = StartType.boot;
34378 }
34379 else
34380 {
34381 if (("system" == value))
34382 {
34383 parsedValue = StartType.system;
34384 }
34385 else
34386 {
34387 parsedValue = StartType.IllegalValue;
34388 return false;
34389 }
34390 }
34391 }
34392 }
34393 }
34394 return true;
34395 }
34396
34397 /// <summary>
34398 /// Parses a ErrorControlType from a string.
34399 /// </summary>
34400 public static ErrorControlType ParseErrorControlType(string value)
34401 {
34402 ErrorControlType parsedValue;
34403 ServiceInstall.TryParseErrorControlType(value, out parsedValue);
34404 return parsedValue;
34405 }
34406
34407 /// <summary>
34408 /// Tries to parse a ErrorControlType from a string.
34409 /// </summary>
34410 public static bool TryParseErrorControlType(string value, out ErrorControlType parsedValue)
34411 {
34412 parsedValue = ErrorControlType.NotSet;
34413 if (string.IsNullOrEmpty(value))
34414 {
34415 return false;
34416 }
34417 if (("ignore" == value))
34418 {
34419 parsedValue = ErrorControlType.ignore;
34420 }
34421 else
34422 {
34423 if (("normal" == value))
34424 {
34425 parsedValue = ErrorControlType.normal;
34426 }
34427 else
34428 {
34429 if (("critical" == value))
34430 {
34431 parsedValue = ErrorControlType.critical;
34432 }
34433 else
34434 {
34435 parsedValue = ErrorControlType.IllegalValue;
34436 return false;
34437 }
34438 }
34439 }
34440 return true;
34441 }
34442
34443 /// <summary>
34444 /// Processes this element and all child elements into an XmlWriter.
34445 /// </summary>
34446 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
34447 public virtual void OutputXml(XmlWriter writer)
34448 {
34449 if ((null == writer))
34450 {
34451 throw new ArgumentNullException("writer");
34452 }
34453 writer.WriteStartElement("ServiceInstall", "http://wixtoolset.org/schemas/v4/wxs");
34454 if (this.idFieldSet)
34455 {
34456 writer.WriteAttributeString("Id", this.idField);
34457 }
34458 if (this.nameFieldSet)
34459 {
34460 writer.WriteAttributeString("Name", this.nameField);
34461 }
34462 if (this.displayNameFieldSet)
34463 {
34464 writer.WriteAttributeString("DisplayName", this.displayNameField);
34465 }
34466 if (this.typeFieldSet)
34467 {
34468 if ((this.typeField == TypeType.ownProcess))
34469 {
34470 writer.WriteAttributeString("Type", "ownProcess");
34471 }
34472 if ((this.typeField == TypeType.shareProcess))
34473 {
34474 writer.WriteAttributeString("Type", "shareProcess");
34475 }
34476 if ((this.typeField == TypeType.kernelDriver))
34477 {
34478 writer.WriteAttributeString("Type", "kernelDriver");
34479 }
34480 if ((this.typeField == TypeType.systemDriver))
34481 {
34482 writer.WriteAttributeString("Type", "systemDriver");
34483 }
34484 }
34485 if (this.interactiveFieldSet)
34486 {
34487 if ((this.interactiveField == YesNoType.no))
34488 {
34489 writer.WriteAttributeString("Interactive", "no");
34490 }
34491 if ((this.interactiveField == YesNoType.yes))
34492 {
34493 writer.WriteAttributeString("Interactive", "yes");
34494 }
34495 }
34496 if (this.startFieldSet)
34497 {
34498 if ((this.startField == StartType.auto))
34499 {
34500 writer.WriteAttributeString("Start", "auto");
34501 }
34502 if ((this.startField == StartType.demand))
34503 {
34504 writer.WriteAttributeString("Start", "demand");
34505 }
34506 if ((this.startField == StartType.disabled))
34507 {
34508 writer.WriteAttributeString("Start", "disabled");
34509 }
34510 if ((this.startField == StartType.boot))
34511 {
34512 writer.WriteAttributeString("Start", "boot");
34513 }
34514 if ((this.startField == StartType.system))
34515 {
34516 writer.WriteAttributeString("Start", "system");
34517 }
34518 }
34519 if (this.errorControlFieldSet)
34520 {
34521 if ((this.errorControlField == ErrorControlType.ignore))
34522 {
34523 writer.WriteAttributeString("ErrorControl", "ignore");
34524 }
34525 if ((this.errorControlField == ErrorControlType.normal))
34526 {
34527 writer.WriteAttributeString("ErrorControl", "normal");
34528 }
34529 if ((this.errorControlField == ErrorControlType.critical))
34530 {
34531 writer.WriteAttributeString("ErrorControl", "critical");
34532 }
34533 }
34534 if (this.vitalFieldSet)
34535 {
34536 if ((this.vitalField == YesNoType.no))
34537 {
34538 writer.WriteAttributeString("Vital", "no");
34539 }
34540 if ((this.vitalField == YesNoType.yes))
34541 {
34542 writer.WriteAttributeString("Vital", "yes");
34543 }
34544 }
34545 if (this.loadOrderGroupFieldSet)
34546 {
34547 writer.WriteAttributeString("LoadOrderGroup", this.loadOrderGroupField);
34548 }
34549 if (this.accountFieldSet)
34550 {
34551 writer.WriteAttributeString("Account", this.accountField);
34552 }
34553 if (this.passwordFieldSet)
34554 {
34555 writer.WriteAttributeString("Password", this.passwordField);
34556 }
34557 if (this.argumentsFieldSet)
34558 {
34559 writer.WriteAttributeString("Arguments", this.argumentsField);
34560 }
34561 if (this.descriptionFieldSet)
34562 {
34563 writer.WriteAttributeString("Description", this.descriptionField);
34564 }
34565 if (this.eraseDescriptionFieldSet)
34566 {
34567 if ((this.eraseDescriptionField == YesNoType.no))
34568 {
34569 writer.WriteAttributeString("EraseDescription", "no");
34570 }
34571 if ((this.eraseDescriptionField == YesNoType.yes))
34572 {
34573 writer.WriteAttributeString("EraseDescription", "yes");
34574 }
34575 }
34576 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
34577 {
34578 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
34579 childElement.OutputXml(writer);
34580 }
34581 writer.WriteEndElement();
34582 }
34583
34584 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
34585 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
34586 void ISetAttributes.SetAttribute(string name, string value)
34587 {
34588 if (String.IsNullOrEmpty(name))
34589 {
34590 throw new ArgumentNullException("name");
34591 }
34592 if (("Id" == name))
34593 {
34594 this.idField = value;
34595 this.idFieldSet = true;
34596 }
34597 if (("Name" == name))
34598 {
34599 this.nameField = value;
34600 this.nameFieldSet = true;
34601 }
34602 if (("DisplayName" == name))
34603 {
34604 this.displayNameField = value;
34605 this.displayNameFieldSet = true;
34606 }
34607 if (("Type" == name))
34608 {
34609 this.typeField = ServiceInstall.ParseTypeType(value);
34610 this.typeFieldSet = true;
34611 }
34612 if (("Interactive" == name))
34613 {
34614 this.interactiveField = Enums.ParseYesNoType(value);
34615 this.interactiveFieldSet = true;
34616 }
34617 if (("Start" == name))
34618 {
34619 this.startField = ServiceInstall.ParseStartType(value);
34620 this.startFieldSet = true;
34621 }
34622 if (("ErrorControl" == name))
34623 {
34624 this.errorControlField = ServiceInstall.ParseErrorControlType(value);
34625 this.errorControlFieldSet = true;
34626 }
34627 if (("Vital" == name))
34628 {
34629 this.vitalField = Enums.ParseYesNoType(value);
34630 this.vitalFieldSet = true;
34631 }
34632 if (("LoadOrderGroup" == name))
34633 {
34634 this.loadOrderGroupField = value;
34635 this.loadOrderGroupFieldSet = true;
34636 }
34637 if (("Account" == name))
34638 {
34639 this.accountField = value;
34640 this.accountFieldSet = true;
34641 }
34642 if (("Password" == name))
34643 {
34644 this.passwordField = value;
34645 this.passwordFieldSet = true;
34646 }
34647 if (("Arguments" == name))
34648 {
34649 this.argumentsField = value;
34650 this.argumentsFieldSet = true;
34651 }
34652 if (("Description" == name))
34653 {
34654 this.descriptionField = value;
34655 this.descriptionFieldSet = true;
34656 }
34657 if (("EraseDescription" == name))
34658 {
34659 this.eraseDescriptionField = Enums.ParseYesNoType(value);
34660 this.eraseDescriptionFieldSet = true;
34661 }
34662 }
34663
34664 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
34665 public enum TypeType
34666 {
34667
34668 IllegalValue = int.MaxValue,
34669
34670 NotSet = -1,
34671
34672 /// <summary>
34673 /// A Win32 service that runs its own process.
34674 /// </summary>
34675 ownProcess,
34676
34677 /// <summary>
34678 /// A Win32 service that shares a process.
34679 /// </summary>
34680 shareProcess,
34681
34682 /// <summary>
34683 /// A kernel driver service. This value is not currently supported by the Windows Installer.
34684 /// </summary>
34685 kernelDriver,
34686
34687 /// <summary>
34688 /// A file system driver service. This value is not currently supported by the Windows Installer.
34689 /// </summary>
34690 systemDriver,
34691 }
34692
34693 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
34694 public enum StartType
34695 {
34696
34697 IllegalValue = int.MaxValue,
34698
34699 NotSet = -1,
34700
34701 /// <summary>
34702 /// The service will start during startup of the system.
34703 /// </summary>
34704 auto,
34705
34706 /// <summary>
34707 /// The service will start when the service control manager calls the StartService function.
34708 /// </summary>
34709 demand,
34710
34711 /// <summary>
34712 /// The service can no longer be started.
34713 /// </summary>
34714 disabled,
34715
34716 /// <summary>
34717 /// The service is a device driver that will be started by the operating system boot loader. This value is not currently supported by the Windows Installer.
34718 /// </summary>
34719 boot,
34720
34721 /// <summary>
34722 /// The service is a device driver that will be started by the IoInitSystem function. This value is not currently supported by the Windows Installer.
34723 /// </summary>
34724 system,
34725 }
34726
34727 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
34728 public enum ErrorControlType
34729 {
34730
34731 IllegalValue = int.MaxValue,
34732
34733 NotSet = -1,
34734
34735 /// <summary>
34736 /// Logs the error and continues with the startup operation.
34737 /// </summary>
34738 ignore,
34739
34740 /// <summary>
34741 /// Logs the error, displays a message box and continues the startup operation.
34742 /// </summary>
34743 normal,
34744
34745 /// <summary>
34746 /// Logs the error if it is possible and the system is restarted with the last configuration known to be good. If the last-known-good configuration is being started, the startup operation fails.
34747 /// </summary>
34748 critical,
34749 }
34750 }
34751
34752 /// <summary>
34753 /// Argument used in ServiceControl parent
34754 /// </summary>
34755 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
34756 public class ServiceArgument : ISetAttributes, ISchemaElement
34757 {
34758
34759 private ISchemaElement parentElement;
34760
34761 private string contentField;
34762
34763 private bool contentFieldSet;
34764
34765 public virtual ISchemaElement ParentElement
34766 {
34767 get
34768 {
34769 return this.parentElement;
34770 }
34771 set
34772 {
34773 this.parentElement = value;
34774 }
34775 }
34776
34777 /// <summary>
34778 /// Argument used in ServiceControl parent
34779 /// </summary>
34780 public string Content
34781 {
34782 get
34783 {
34784 return this.contentField;
34785 }
34786 set
34787 {
34788 this.contentFieldSet = true;
34789 this.contentField = value;
34790 }
34791 }
34792
34793 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
34794 void ISetAttributes.SetAttribute(string name, string value)
34795 {
34796 if (String.IsNullOrEmpty(name))
34797 {
34798 throw new ArgumentNullException("name");
34799 }
34800 if (("Content" == name))
34801 {
34802 this.contentField = value;
34803 this.contentFieldSet = true;
34804 }
34805 }
34806
34807 /// <summary>
34808 /// Processes this element and all child elements into an XmlWriter.
34809 /// </summary>
34810 public virtual void OutputXml(XmlWriter writer)
34811 {
34812 if ((null == writer))
34813 {
34814 throw new ArgumentNullException("writer");
34815 }
34816 writer.WriteStartElement("ServiceArgument", "http://wixtoolset.org/schemas/v4/wxs");
34817 if (this.contentFieldSet)
34818 {
34819 writer.WriteString(this.contentField);
34820 }
34821 writer.WriteEndElement();
34822 }
34823 }
34824
34825 /// <summary>
34826 /// Starts, stops, and removes services for parent Component. This element is used to control the state
34827 /// of a service installed by the MSI or MSM file by using the start, stop and remove attributes.
34828 /// For example, Start='install' Stop='both' Remove='uninstall' would mean: start the service on install,
34829 /// remove the service when the product is uninstalled, and stop the service both on install and uninstall.
34830 /// </summary>
34831 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
34832 public class ServiceControl : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
34833 {
34834
34835 private ElementCollection children;
34836
34837 private string idField;
34838
34839 private bool idFieldSet;
34840
34841 private string nameField;
34842
34843 private bool nameFieldSet;
34844
34845 private InstallUninstallType startField;
34846
34847 private bool startFieldSet;
34848
34849 private InstallUninstallType stopField;
34850
34851 private bool stopFieldSet;
34852
34853 private InstallUninstallType removeField;
34854
34855 private bool removeFieldSet;
34856
34857 private YesNoType waitField;
34858
34859 private bool waitFieldSet;
34860
34861 private ISchemaElement parentElement;
34862
34863 public ServiceControl()
34864 {
34865 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
34866 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ServiceArgument)));
34867 this.children = childCollection0;
34868 }
34869
34870 public virtual IEnumerable Children
34871 {
34872 get
34873 {
34874 return this.children;
34875 }
34876 }
34877
34878 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
34879 public virtual IEnumerable this[System.Type childType]
34880 {
34881 get
34882 {
34883 return this.children.Filter(childType);
34884 }
34885 }
34886
34887 public string Id
34888 {
34889 get
34890 {
34891 return this.idField;
34892 }
34893 set
34894 {
34895 this.idFieldSet = true;
34896 this.idField = value;
34897 }
34898 }
34899
34900 /// <summary>
34901 /// Name of the service.
34902 /// </summary>
34903 public string Name
34904 {
34905 get
34906 {
34907 return this.nameField;
34908 }
34909 set
34910 {
34911 this.nameFieldSet = true;
34912 this.nameField = value;
34913 }
34914 }
34915
34916 /// <summary>
34917 /// Specifies whether the service should be started by the StartServices action on install, uninstall or both.
34918 /// For 'install', the service will be started only when the parent component is being installed (msiInstallStateLocal or
34919 /// msiInstallStateSource); for 'uninstall', the service will be started only when the parent component
34920 /// is being removed (msiInstallStateAbsent); for 'both', the service will be started in both cases.
34921 /// </summary>
34922 public InstallUninstallType Start
34923 {
34924 get
34925 {
34926 return this.startField;
34927 }
34928 set
34929 {
34930 this.startFieldSet = true;
34931 this.startField = value;
34932 }
34933 }
34934
34935 /// <summary>
34936 /// Specifies whether the service should be stopped by the StopServices action on install, uninstall or both.
34937 /// For 'install', the service will be stopped only when the parent component is being installed (msiInstallStateLocal or
34938 /// msiInstallStateSource); for 'uninstall', the service will be stopped only when the parent component
34939 /// is being removed (msiInstallStateAbsent); for 'both', the service will be stopped in both cases.
34940 /// </summary>
34941 public InstallUninstallType Stop
34942 {
34943 get
34944 {
34945 return this.stopField;
34946 }
34947 set
34948 {
34949 this.stopFieldSet = true;
34950 this.stopField = value;
34951 }
34952 }
34953
34954 /// <summary>
34955 /// Specifies whether the service should be removed by the DeleteServices action on install, uninstall or both.
34956 /// For 'install', the service will be removed only when the parent component is being installed (msiInstallStateLocal or
34957 /// msiInstallStateSource); for 'uninstall', the service will be removed only when the parent component
34958 /// is being removed (msiInstallStateAbsent); for 'both', the service will be removed in both cases.
34959 /// </summary>
34960 public InstallUninstallType Remove
34961 {
34962 get
34963 {
34964 return this.removeField;
34965 }
34966 set
34967 {
34968 this.removeFieldSet = true;
34969 this.removeField = value;
34970 }
34971 }
34972
34973 /// <summary>
34974 /// Specifies whether or not to wait for the service to complete before continuing. The default is 'yes'.
34975 /// </summary>
34976 public YesNoType Wait
34977 {
34978 get
34979 {
34980 return this.waitField;
34981 }
34982 set
34983 {
34984 this.waitFieldSet = true;
34985 this.waitField = value;
34986 }
34987 }
34988
34989 public virtual ISchemaElement ParentElement
34990 {
34991 get
34992 {
34993 return this.parentElement;
34994 }
34995 set
34996 {
34997 this.parentElement = value;
34998 }
34999 }
35000
35001 public virtual void AddChild(ISchemaElement child)
35002 {
35003 if ((null == child))
35004 {
35005 throw new ArgumentNullException("child");
35006 }
35007 this.children.AddElement(child);
35008 child.ParentElement = this;
35009 }
35010
35011 public virtual void RemoveChild(ISchemaElement child)
35012 {
35013 if ((null == child))
35014 {
35015 throw new ArgumentNullException("child");
35016 }
35017 this.children.RemoveElement(child);
35018 child.ParentElement = null;
35019 }
35020
35021 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35022 ISchemaElement ICreateChildren.CreateChild(string childName)
35023 {
35024 if (String.IsNullOrEmpty(childName))
35025 {
35026 throw new ArgumentNullException("childName");
35027 }
35028 ISchemaElement childValue = null;
35029 if (("ServiceArgument" == childName))
35030 {
35031 childValue = new ServiceArgument();
35032 }
35033 if ((null == childValue))
35034 {
35035 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
35036 }
35037 return childValue;
35038 }
35039
35040 /// <summary>
35041 /// Processes this element and all child elements into an XmlWriter.
35042 /// </summary>
35043 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
35044 public virtual void OutputXml(XmlWriter writer)
35045 {
35046 if ((null == writer))
35047 {
35048 throw new ArgumentNullException("writer");
35049 }
35050 writer.WriteStartElement("ServiceControl", "http://wixtoolset.org/schemas/v4/wxs");
35051 if (this.idFieldSet)
35052 {
35053 writer.WriteAttributeString("Id", this.idField);
35054 }
35055 if (this.nameFieldSet)
35056 {
35057 writer.WriteAttributeString("Name", this.nameField);
35058 }
35059 if (this.startFieldSet)
35060 {
35061 if ((this.startField == InstallUninstallType.install))
35062 {
35063 writer.WriteAttributeString("Start", "install");
35064 }
35065 if ((this.startField == InstallUninstallType.uninstall))
35066 {
35067 writer.WriteAttributeString("Start", "uninstall");
35068 }
35069 if ((this.startField == InstallUninstallType.both))
35070 {
35071 writer.WriteAttributeString("Start", "both");
35072 }
35073 }
35074 if (this.stopFieldSet)
35075 {
35076 if ((this.stopField == InstallUninstallType.install))
35077 {
35078 writer.WriteAttributeString("Stop", "install");
35079 }
35080 if ((this.stopField == InstallUninstallType.uninstall))
35081 {
35082 writer.WriteAttributeString("Stop", "uninstall");
35083 }
35084 if ((this.stopField == InstallUninstallType.both))
35085 {
35086 writer.WriteAttributeString("Stop", "both");
35087 }
35088 }
35089 if (this.removeFieldSet)
35090 {
35091 if ((this.removeField == InstallUninstallType.install))
35092 {
35093 writer.WriteAttributeString("Remove", "install");
35094 }
35095 if ((this.removeField == InstallUninstallType.uninstall))
35096 {
35097 writer.WriteAttributeString("Remove", "uninstall");
35098 }
35099 if ((this.removeField == InstallUninstallType.both))
35100 {
35101 writer.WriteAttributeString("Remove", "both");
35102 }
35103 }
35104 if (this.waitFieldSet)
35105 {
35106 if ((this.waitField == YesNoType.no))
35107 {
35108 writer.WriteAttributeString("Wait", "no");
35109 }
35110 if ((this.waitField == YesNoType.yes))
35111 {
35112 writer.WriteAttributeString("Wait", "yes");
35113 }
35114 }
35115 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
35116 {
35117 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
35118 childElement.OutputXml(writer);
35119 }
35120 writer.WriteEndElement();
35121 }
35122
35123 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35124 void ISetAttributes.SetAttribute(string name, string value)
35125 {
35126 if (String.IsNullOrEmpty(name))
35127 {
35128 throw new ArgumentNullException("name");
35129 }
35130 if (("Id" == name))
35131 {
35132 this.idField = value;
35133 this.idFieldSet = true;
35134 }
35135 if (("Name" == name))
35136 {
35137 this.nameField = value;
35138 this.nameFieldSet = true;
35139 }
35140 if (("Start" == name))
35141 {
35142 this.startField = Enums.ParseInstallUninstallType(value);
35143 this.startFieldSet = true;
35144 }
35145 if (("Stop" == name))
35146 {
35147 this.stopField = Enums.ParseInstallUninstallType(value);
35148 this.stopFieldSet = true;
35149 }
35150 if (("Remove" == name))
35151 {
35152 this.removeField = Enums.ParseInstallUninstallType(value);
35153 this.removeFieldSet = true;
35154 }
35155 if (("Wait" == name))
35156 {
35157 this.waitField = Enums.ParseYesNoType(value);
35158 this.waitFieldSet = true;
35159 }
35160 }
35161 }
35162
35163 /// <summary>
35164 /// Privilege required by service configured by ServiceConfig parent. Valid values are a
35165 /// </summary>
35166 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
35167 public class RequiredPrivilege : ISetAttributes, ISchemaElement
35168 {
35169
35170 private ISchemaElement parentElement;
35171
35172 private string contentField;
35173
35174 private bool contentFieldSet;
35175
35176 public virtual ISchemaElement ParentElement
35177 {
35178 get
35179 {
35180 return this.parentElement;
35181 }
35182 set
35183 {
35184 this.parentElement = value;
35185 }
35186 }
35187
35188 /// <summary>
35189 /// Privilege required by service configured by ServiceConfig parent. Valid values are a
35190 /// </summary>
35191 public string Content
35192 {
35193 get
35194 {
35195 return this.contentField;
35196 }
35197 set
35198 {
35199 this.contentFieldSet = true;
35200 this.contentField = value;
35201 }
35202 }
35203
35204 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35205 void ISetAttributes.SetAttribute(string name, string value)
35206 {
35207 if (String.IsNullOrEmpty(name))
35208 {
35209 throw new ArgumentNullException("name");
35210 }
35211 if (("Content" == name))
35212 {
35213 this.contentField = value;
35214 this.contentFieldSet = true;
35215 }
35216 }
35217
35218 /// <summary>
35219 /// Processes this element and all child elements into an XmlWriter.
35220 /// </summary>
35221 public virtual void OutputXml(XmlWriter writer)
35222 {
35223 if ((null == writer))
35224 {
35225 throw new ArgumentNullException("writer");
35226 }
35227 writer.WriteStartElement("RequiredPrivilege", "http://wixtoolset.org/schemas/v4/wxs");
35228 if (this.contentFieldSet)
35229 {
35230 writer.WriteString(this.contentField);
35231 }
35232 writer.WriteEndElement();
35233 }
35234 }
35235
35236 /// <summary>
35237 /// Configures a service being installed or one that already exists. This element's functionality is available starting with MSI 5.0.
35238 /// </summary>
35239 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
35240 public class ServiceConfig : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
35241 {
35242
35243 private ElementCollection children;
35244
35245 private string idField;
35246
35247 private bool idFieldSet;
35248
35249 private string delayedAutoStartField;
35250
35251 private bool delayedAutoStartFieldSet;
35252
35253 private string failureActionsWhenField;
35254
35255 private bool failureActionsWhenFieldSet;
35256
35257 private string preShutdownDelayField;
35258
35259 private bool preShutdownDelayFieldSet;
35260
35261 private YesNoType onInstallField;
35262
35263 private bool onInstallFieldSet;
35264
35265 private YesNoType onReinstallField;
35266
35267 private bool onReinstallFieldSet;
35268
35269 private YesNoType onUninstallField;
35270
35271 private bool onUninstallFieldSet;
35272
35273 private string serviceNameField;
35274
35275 private bool serviceNameFieldSet;
35276
35277 private string serviceSidField;
35278
35279 private bool serviceSidFieldSet;
35280
35281 private ISchemaElement parentElement;
35282
35283 public ServiceConfig()
35284 {
35285 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
35286 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RequiredPrivilege)));
35287 this.children = childCollection0;
35288 }
35289
35290 public virtual IEnumerable Children
35291 {
35292 get
35293 {
35294 return this.children;
35295 }
35296 }
35297
35298 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
35299 public virtual IEnumerable this[System.Type childType]
35300 {
35301 get
35302 {
35303 return this.children.Filter(childType);
35304 }
35305 }
35306
35307 /// <summary>
35308 /// Unique identifier for this service configuration. This value will default to the ServiceName attribute if not
35309 /// specified.
35310 /// </summary>
35311 public string Id
35312 {
35313 get
35314 {
35315 return this.idField;
35316 }
35317 set
35318 {
35319 this.idFieldSet = true;
35320 this.idField = value;
35321 }
35322 }
35323
35324 /// <summary>
35325 /// This attribute specifies whether an auto-start service should delay its start until after all other auto-start
35326 /// services. This attribute only affects auto-start services. Allowed values are "yes", "no" or a Formatted property that
35327 /// resolves to "1" (for "yes") or "0" (for "no"). If this attribute is not present the setting is not configured.
35328 /// </summary>
35329 public string DelayedAutoStart
35330 {
35331 get
35332 {
35333 return this.delayedAutoStartField;
35334 }
35335 set
35336 {
35337 this.delayedAutoStartFieldSet = true;
35338 this.delayedAutoStartField = value;
35339 }
35340 }
35341
35342 /// <summary>
35343 /// This attribute specifies when failure actions should be applied. Allowed values are "failedToStop", "failedToStopOrReturnedError"
35344 /// or a Formatted property that resolves to "1" (for "failedToStopOrReturnedError") or "0" (for "failedToStop"). If this attribute
35345 /// is not present the setting is not configured.
35346 /// </summary>
35347 public string FailureActionsWhen
35348 {
35349 get
35350 {
35351 return this.failureActionsWhenField;
35352 }
35353 set
35354 {
35355 this.failureActionsWhenFieldSet = true;
35356 this.failureActionsWhenField = value;
35357 }
35358 }
35359
35360 /// <summary>
35361 /// This attribute specifies time in milliseconds that the Service Control Manager (SCM) waits after notifying the service of a system
35362 /// shutdown. If this attribute is not present the default value, 3 minutes, is used.
35363 /// </summary>
35364 public string PreShutdownDelay
35365 {
35366 get
35367 {
35368 return this.preShutdownDelayField;
35369 }
35370 set
35371 {
35372 this.preShutdownDelayFieldSet = true;
35373 this.preShutdownDelayField = value;
35374 }
35375 }
35376
35377 /// <summary>
35378 /// Specifies whether to configure the service when the parent Component is installed. This attribute may be combined with OnReinstall
35379 /// and OnUninstall.
35380 /// </summary>
35381 public YesNoType OnInstall
35382 {
35383 get
35384 {
35385 return this.onInstallField;
35386 }
35387 set
35388 {
35389 this.onInstallFieldSet = true;
35390 this.onInstallField = value;
35391 }
35392 }
35393
35394 /// <summary>
35395 /// Specifies whether to configure the service when the parent Component is reinstalled. This attribute may be combined with OnInstall
35396 /// and OnUninstall.
35397 /// </summary>
35398 public YesNoType OnReinstall
35399 {
35400 get
35401 {
35402 return this.onReinstallField;
35403 }
35404 set
35405 {
35406 this.onReinstallFieldSet = true;
35407 this.onReinstallField = value;
35408 }
35409 }
35410
35411 /// <summary>
35412 /// Specifies whether to configure the service when the parent Component is uninstalled. This attribute may be combined with OnInstall
35413 /// and OnReinstall.
35414 /// </summary>
35415 public YesNoType OnUninstall
35416 {
35417 get
35418 {
35419 return this.onUninstallField;
35420 }
35421 set
35422 {
35423 this.onUninstallFieldSet = true;
35424 this.onUninstallField = value;
35425 }
35426 }
35427
35428 /// <summary>
35429 /// Specifies the name of the service to configure. This value will default to the ServiceInstall/@Name attribute when nested under
35430 /// a ServiceInstall element.
35431 /// </summary>
35432 public string ServiceName
35433 {
35434 get
35435 {
35436 return this.serviceNameField;
35437 }
35438 set
35439 {
35440 this.serviceNameFieldSet = true;
35441 this.serviceNameField = value;
35442 }
35443 }
35444
35445 /// <summary>
35446 /// Specifies the service SID to apply to the service. Valid values are "none", "restricted", "unrestricted" or a Formatted property
35447 /// that resolves to "0" (for "none"), "3" (for "restricted") or "1" (for "unrestricted"). If this attribute is not present the
35448 /// setting is not configured.
35449 /// </summary>
35450 public string ServiceSid
35451 {
35452 get
35453 {
35454 return this.serviceSidField;
35455 }
35456 set
35457 {
35458 this.serviceSidFieldSet = true;
35459 this.serviceSidField = value;
35460 }
35461 }
35462
35463 public virtual ISchemaElement ParentElement
35464 {
35465 get
35466 {
35467 return this.parentElement;
35468 }
35469 set
35470 {
35471 this.parentElement = value;
35472 }
35473 }
35474
35475 public virtual void AddChild(ISchemaElement child)
35476 {
35477 if ((null == child))
35478 {
35479 throw new ArgumentNullException("child");
35480 }
35481 this.children.AddElement(child);
35482 child.ParentElement = this;
35483 }
35484
35485 public virtual void RemoveChild(ISchemaElement child)
35486 {
35487 if ((null == child))
35488 {
35489 throw new ArgumentNullException("child");
35490 }
35491 this.children.RemoveElement(child);
35492 child.ParentElement = null;
35493 }
35494
35495 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35496 ISchemaElement ICreateChildren.CreateChild(string childName)
35497 {
35498 if (String.IsNullOrEmpty(childName))
35499 {
35500 throw new ArgumentNullException("childName");
35501 }
35502 ISchemaElement childValue = null;
35503 if (("RequiredPrivilege" == childName))
35504 {
35505 childValue = new RequiredPrivilege();
35506 }
35507 if ((null == childValue))
35508 {
35509 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
35510 }
35511 return childValue;
35512 }
35513
35514 /// <summary>
35515 /// Processes this element and all child elements into an XmlWriter.
35516 /// </summary>
35517 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
35518 public virtual void OutputXml(XmlWriter writer)
35519 {
35520 if ((null == writer))
35521 {
35522 throw new ArgumentNullException("writer");
35523 }
35524 writer.WriteStartElement("ServiceConfig", "http://wixtoolset.org/schemas/v4/wxs");
35525 if (this.idFieldSet)
35526 {
35527 writer.WriteAttributeString("Id", this.idField);
35528 }
35529 if (this.delayedAutoStartFieldSet)
35530 {
35531 writer.WriteAttributeString("DelayedAutoStart", this.delayedAutoStartField);
35532 }
35533 if (this.failureActionsWhenFieldSet)
35534 {
35535 writer.WriteAttributeString("FailureActionsWhen", this.failureActionsWhenField);
35536 }
35537 if (this.preShutdownDelayFieldSet)
35538 {
35539 writer.WriteAttributeString("PreShutdownDelay", this.preShutdownDelayField);
35540 }
35541 if (this.onInstallFieldSet)
35542 {
35543 if ((this.onInstallField == YesNoType.no))
35544 {
35545 writer.WriteAttributeString("OnInstall", "no");
35546 }
35547 if ((this.onInstallField == YesNoType.yes))
35548 {
35549 writer.WriteAttributeString("OnInstall", "yes");
35550 }
35551 }
35552 if (this.onReinstallFieldSet)
35553 {
35554 if ((this.onReinstallField == YesNoType.no))
35555 {
35556 writer.WriteAttributeString("OnReinstall", "no");
35557 }
35558 if ((this.onReinstallField == YesNoType.yes))
35559 {
35560 writer.WriteAttributeString("OnReinstall", "yes");
35561 }
35562 }
35563 if (this.onUninstallFieldSet)
35564 {
35565 if ((this.onUninstallField == YesNoType.no))
35566 {
35567 writer.WriteAttributeString("OnUninstall", "no");
35568 }
35569 if ((this.onUninstallField == YesNoType.yes))
35570 {
35571 writer.WriteAttributeString("OnUninstall", "yes");
35572 }
35573 }
35574 if (this.serviceNameFieldSet)
35575 {
35576 writer.WriteAttributeString("ServiceName", this.serviceNameField);
35577 }
35578 if (this.serviceSidFieldSet)
35579 {
35580 writer.WriteAttributeString("ServiceSid", this.serviceSidField);
35581 }
35582 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
35583 {
35584 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
35585 childElement.OutputXml(writer);
35586 }
35587 writer.WriteEndElement();
35588 }
35589
35590 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35591 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
35592 void ISetAttributes.SetAttribute(string name, string value)
35593 {
35594 if (String.IsNullOrEmpty(name))
35595 {
35596 throw new ArgumentNullException("name");
35597 }
35598 if (("Id" == name))
35599 {
35600 this.idField = value;
35601 this.idFieldSet = true;
35602 }
35603 if (("DelayedAutoStart" == name))
35604 {
35605 this.delayedAutoStartField = value;
35606 this.delayedAutoStartFieldSet = true;
35607 }
35608 if (("FailureActionsWhen" == name))
35609 {
35610 this.failureActionsWhenField = value;
35611 this.failureActionsWhenFieldSet = true;
35612 }
35613 if (("PreShutdownDelay" == name))
35614 {
35615 this.preShutdownDelayField = value;
35616 this.preShutdownDelayFieldSet = true;
35617 }
35618 if (("OnInstall" == name))
35619 {
35620 this.onInstallField = Enums.ParseYesNoType(value);
35621 this.onInstallFieldSet = true;
35622 }
35623 if (("OnReinstall" == name))
35624 {
35625 this.onReinstallField = Enums.ParseYesNoType(value);
35626 this.onReinstallFieldSet = true;
35627 }
35628 if (("OnUninstall" == name))
35629 {
35630 this.onUninstallField = Enums.ParseYesNoType(value);
35631 this.onUninstallFieldSet = true;
35632 }
35633 if (("ServiceName" == name))
35634 {
35635 this.serviceNameField = value;
35636 this.serviceNameFieldSet = true;
35637 }
35638 if (("ServiceSid" == name))
35639 {
35640 this.serviceSidField = value;
35641 this.serviceSidFieldSet = true;
35642 }
35643 }
35644 }
35645
35646 /// <summary>
35647 /// Failure action for a ServiceConfigFailureActions element.
35648 /// </summary>
35649 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
35650 public class Failure : ISchemaElement, ISetAttributes
35651 {
35652
35653 private string actionField;
35654
35655 private bool actionFieldSet;
35656
35657 private string delayField;
35658
35659 private bool delayFieldSet;
35660
35661 private ISchemaElement parentElement;
35662
35663 /// <summary>
35664 /// Specifies the action to take when the service fails. Valid values are "none", "restartComputer", "restartService", "runCommand" or a Formatted property
35665 /// that resolves to "0" (for "none"), "1" (for "restartService"), "2" (for "restartComputer") or "3" (for "runCommand").
35666 /// </summary>
35667 public string Action
35668 {
35669 get
35670 {
35671 return this.actionField;
35672 }
35673 set
35674 {
35675 this.actionFieldSet = true;
35676 this.actionField = value;
35677 }
35678 }
35679
35680 /// <summary>
35681 /// Specifies the time in milliseconds to wait before performing the value from the Action attribute.
35682 /// </summary>
35683 public string Delay
35684 {
35685 get
35686 {
35687 return this.delayField;
35688 }
35689 set
35690 {
35691 this.delayFieldSet = true;
35692 this.delayField = value;
35693 }
35694 }
35695
35696 public virtual ISchemaElement ParentElement
35697 {
35698 get
35699 {
35700 return this.parentElement;
35701 }
35702 set
35703 {
35704 this.parentElement = value;
35705 }
35706 }
35707
35708 /// <summary>
35709 /// Processes this element and all child elements into an XmlWriter.
35710 /// </summary>
35711 public virtual void OutputXml(XmlWriter writer)
35712 {
35713 if ((null == writer))
35714 {
35715 throw new ArgumentNullException("writer");
35716 }
35717 writer.WriteStartElement("Failure", "http://wixtoolset.org/schemas/v4/wxs");
35718 if (this.actionFieldSet)
35719 {
35720 writer.WriteAttributeString("Action", this.actionField);
35721 }
35722 if (this.delayFieldSet)
35723 {
35724 writer.WriteAttributeString("Delay", this.delayField);
35725 }
35726 writer.WriteEndElement();
35727 }
35728
35729 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35730 void ISetAttributes.SetAttribute(string name, string value)
35731 {
35732 if (String.IsNullOrEmpty(name))
35733 {
35734 throw new ArgumentNullException("name");
35735 }
35736 if (("Action" == name))
35737 {
35738 this.actionField = value;
35739 this.actionFieldSet = true;
35740 }
35741 if (("Delay" == name))
35742 {
35743 this.delayField = value;
35744 this.delayFieldSet = true;
35745 }
35746 }
35747 }
35748
35749 /// <summary>
35750 /// Configures the failure actions for a service being installed or one that already exists. This element's functionality is available starting with MSI 5.0.
35751 /// </summary>
35752 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
35753 public class ServiceConfigFailureActions : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
35754 {
35755
35756 private ElementCollection children;
35757
35758 private string idField;
35759
35760 private bool idFieldSet;
35761
35762 private string commandField;
35763
35764 private bool commandFieldSet;
35765
35766 private YesNoType onInstallField;
35767
35768 private bool onInstallFieldSet;
35769
35770 private YesNoType onReinstallField;
35771
35772 private bool onReinstallFieldSet;
35773
35774 private YesNoType onUninstallField;
35775
35776 private bool onUninstallFieldSet;
35777
35778 private string rebootMessageField;
35779
35780 private bool rebootMessageFieldSet;
35781
35782 private string resetPeriodField;
35783
35784 private bool resetPeriodFieldSet;
35785
35786 private string serviceNameField;
35787
35788 private bool serviceNameFieldSet;
35789
35790 private ISchemaElement parentElement;
35791
35792 public ServiceConfigFailureActions()
35793 {
35794 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
35795 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Failure)));
35796 this.children = childCollection0;
35797 }
35798
35799 public virtual IEnumerable Children
35800 {
35801 get
35802 {
35803 return this.children;
35804 }
35805 }
35806
35807 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
35808 public virtual IEnumerable this[System.Type childType]
35809 {
35810 get
35811 {
35812 return this.children.Filter(childType);
35813 }
35814 }
35815
35816 /// <summary>
35817 /// Unique identifier for this service configuration. This value will default to the ServiceName attribute if not
35818 /// specified.
35819 /// </summary>
35820 public string Id
35821 {
35822 get
35823 {
35824 return this.idField;
35825 }
35826 set
35827 {
35828 this.idFieldSet = true;
35829 this.idField = value;
35830 }
35831 }
35832
35833 /// <summary>
35834 /// This attribute specifies command to execute when a "runCommand" failure action hit. If an empty string is provided it clears
35835 /// the existing command. If this attribute is not present the setting is not changed.
35836 /// </summary>
35837 public string Command
35838 {
35839 get
35840 {
35841 return this.commandField;
35842 }
35843 set
35844 {
35845 this.commandFieldSet = true;
35846 this.commandField = value;
35847 }
35848 }
35849
35850 /// <summary>
35851 /// Specifies whether to configure the service when the parent Component is installed. This attribute may be combined with OnReinstall
35852 /// and OnUninstall.
35853 /// </summary>
35854 public YesNoType OnInstall
35855 {
35856 get
35857 {
35858 return this.onInstallField;
35859 }
35860 set
35861 {
35862 this.onInstallFieldSet = true;
35863 this.onInstallField = value;
35864 }
35865 }
35866
35867 /// <summary>
35868 /// Specifies whether to configure the service when the parent Component is reinstalled. This attribute may be combined with OnInstall
35869 /// and OnUninstall.
35870 /// </summary>
35871 public YesNoType OnReinstall
35872 {
35873 get
35874 {
35875 return this.onReinstallField;
35876 }
35877 set
35878 {
35879 this.onReinstallFieldSet = true;
35880 this.onReinstallField = value;
35881 }
35882 }
35883
35884 /// <summary>
35885 /// Specifies whether to configure the service when the parent Component is uninstalled. This attribute may be combined with OnInstall
35886 /// and OnReinstall.
35887 /// </summary>
35888 public YesNoType OnUninstall
35889 {
35890 get
35891 {
35892 return this.onUninstallField;
35893 }
35894 set
35895 {
35896 this.onUninstallFieldSet = true;
35897 this.onUninstallField = value;
35898 }
35899 }
35900
35901 /// <summary>
35902 /// Specifies the message to show for a reboot failure action. If an empty string is provided it clears any existing reboot message. If this
35903 /// attribute is not present the setting is not changed.
35904 /// </summary>
35905 public string RebootMessage
35906 {
35907 get
35908 {
35909 return this.rebootMessageField;
35910 }
35911 set
35912 {
35913 this.rebootMessageFieldSet = true;
35914 this.rebootMessageField = value;
35915 }
35916 }
35917
35918 /// <summary>
35919 /// Specifies the time in seconds to reset the failure count. If this attribute is not present the failure count will not be reset.
35920 /// </summary>
35921 public string ResetPeriod
35922 {
35923 get
35924 {
35925 return this.resetPeriodField;
35926 }
35927 set
35928 {
35929 this.resetPeriodFieldSet = true;
35930 this.resetPeriodField = value;
35931 }
35932 }
35933
35934 /// <summary>
35935 /// Specifies the name of the service to configure. This value will default to the ServiceInstall/@Name attribute when nested under
35936 /// a ServiceInstall element.
35937 /// </summary>
35938 public string ServiceName
35939 {
35940 get
35941 {
35942 return this.serviceNameField;
35943 }
35944 set
35945 {
35946 this.serviceNameFieldSet = true;
35947 this.serviceNameField = value;
35948 }
35949 }
35950
35951 public virtual ISchemaElement ParentElement
35952 {
35953 get
35954 {
35955 return this.parentElement;
35956 }
35957 set
35958 {
35959 this.parentElement = value;
35960 }
35961 }
35962
35963 public virtual void AddChild(ISchemaElement child)
35964 {
35965 if ((null == child))
35966 {
35967 throw new ArgumentNullException("child");
35968 }
35969 this.children.AddElement(child);
35970 child.ParentElement = this;
35971 }
35972
35973 public virtual void RemoveChild(ISchemaElement child)
35974 {
35975 if ((null == child))
35976 {
35977 throw new ArgumentNullException("child");
35978 }
35979 this.children.RemoveElement(child);
35980 child.ParentElement = null;
35981 }
35982
35983 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35984 ISchemaElement ICreateChildren.CreateChild(string childName)
35985 {
35986 if (String.IsNullOrEmpty(childName))
35987 {
35988 throw new ArgumentNullException("childName");
35989 }
35990 ISchemaElement childValue = null;
35991 if (("Failure" == childName))
35992 {
35993 childValue = new Failure();
35994 }
35995 if ((null == childValue))
35996 {
35997 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
35998 }
35999 return childValue;
36000 }
36001
36002 /// <summary>
36003 /// Processes this element and all child elements into an XmlWriter.
36004 /// </summary>
36005 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
36006 public virtual void OutputXml(XmlWriter writer)
36007 {
36008 if ((null == writer))
36009 {
36010 throw new ArgumentNullException("writer");
36011 }
36012 writer.WriteStartElement("ServiceConfigFailureActions", "http://wixtoolset.org/schemas/v4/wxs");
36013 if (this.idFieldSet)
36014 {
36015 writer.WriteAttributeString("Id", this.idField);
36016 }
36017 if (this.commandFieldSet)
36018 {
36019 writer.WriteAttributeString("Command", this.commandField);
36020 }
36021 if (this.onInstallFieldSet)
36022 {
36023 if ((this.onInstallField == YesNoType.no))
36024 {
36025 writer.WriteAttributeString("OnInstall", "no");
36026 }
36027 if ((this.onInstallField == YesNoType.yes))
36028 {
36029 writer.WriteAttributeString("OnInstall", "yes");
36030 }
36031 }
36032 if (this.onReinstallFieldSet)
36033 {
36034 if ((this.onReinstallField == YesNoType.no))
36035 {
36036 writer.WriteAttributeString("OnReinstall", "no");
36037 }
36038 if ((this.onReinstallField == YesNoType.yes))
36039 {
36040 writer.WriteAttributeString("OnReinstall", "yes");
36041 }
36042 }
36043 if (this.onUninstallFieldSet)
36044 {
36045 if ((this.onUninstallField == YesNoType.no))
36046 {
36047 writer.WriteAttributeString("OnUninstall", "no");
36048 }
36049 if ((this.onUninstallField == YesNoType.yes))
36050 {
36051 writer.WriteAttributeString("OnUninstall", "yes");
36052 }
36053 }
36054 if (this.rebootMessageFieldSet)
36055 {
36056 writer.WriteAttributeString("RebootMessage", this.rebootMessageField);
36057 }
36058 if (this.resetPeriodFieldSet)
36059 {
36060 writer.WriteAttributeString("ResetPeriod", this.resetPeriodField);
36061 }
36062 if (this.serviceNameFieldSet)
36063 {
36064 writer.WriteAttributeString("ServiceName", this.serviceNameField);
36065 }
36066 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
36067 {
36068 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
36069 childElement.OutputXml(writer);
36070 }
36071 writer.WriteEndElement();
36072 }
36073
36074 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
36075 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
36076 void ISetAttributes.SetAttribute(string name, string value)
36077 {
36078 if (String.IsNullOrEmpty(name))
36079 {
36080 throw new ArgumentNullException("name");
36081 }
36082 if (("Id" == name))
36083 {
36084 this.idField = value;
36085 this.idFieldSet = true;
36086 }
36087 if (("Command" == name))
36088 {
36089 this.commandField = value;
36090 this.commandFieldSet = true;
36091 }
36092 if (("OnInstall" == name))
36093 {
36094 this.onInstallField = Enums.ParseYesNoType(value);
36095 this.onInstallFieldSet = true;
36096 }
36097 if (("OnReinstall" == name))
36098 {
36099 this.onReinstallField = Enums.ParseYesNoType(value);
36100 this.onReinstallFieldSet = true;
36101 }
36102 if (("OnUninstall" == name))
36103 {
36104 this.onUninstallField = Enums.ParseYesNoType(value);
36105 this.onUninstallFieldSet = true;
36106 }
36107 if (("RebootMessage" == name))
36108 {
36109 this.rebootMessageField = value;
36110 this.rebootMessageFieldSet = true;
36111 }
36112 if (("ResetPeriod" == name))
36113 {
36114 this.resetPeriodField = value;
36115 this.resetPeriodFieldSet = true;
36116 }
36117 if (("ServiceName" == name))
36118 {
36119 this.serviceNameField = value;
36120 this.serviceNameFieldSet = true;
36121 }
36122 }
36123 }
36124
36125 /// <summary>
36126 /// Environment variables added or removed for the parent component.
36127 /// </summary>
36128 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36129 public class Environment : ISchemaElement, ISetAttributes
36130 {
36131
36132 private string idField;
36133
36134 private bool idFieldSet;
36135
36136 private string nameField;
36137
36138 private bool nameFieldSet;
36139
36140 private string valueField;
36141
36142 private bool valueFieldSet;
36143
36144 private string separatorField;
36145
36146 private bool separatorFieldSet;
36147
36148 private ActionType actionField;
36149
36150 private bool actionFieldSet;
36151
36152 private PartType partField;
36153
36154 private bool partFieldSet;
36155
36156 private YesNoType permanentField;
36157
36158 private bool permanentFieldSet;
36159
36160 private YesNoType systemField;
36161
36162 private bool systemFieldSet;
36163
36164 private ISchemaElement parentElement;
36165
36166 /// <summary>
36167 /// Unique identifier for environment entry.
36168 /// </summary>
36169 public string Id
36170 {
36171 get
36172 {
36173 return this.idField;
36174 }
36175 set
36176 {
36177 this.idFieldSet = true;
36178 this.idField = value;
36179 }
36180 }
36181
36182 /// <summary>
36183 /// Name of the environment variable.
36184 /// </summary>
36185 public string Name
36186 {
36187 get
36188 {
36189 return this.nameField;
36190 }
36191 set
36192 {
36193 this.nameFieldSet = true;
36194 this.nameField = value;
36195 }
36196 }
36197
36198 /// <summary>
36199 /// The value to set into the environment variable.
36200 /// If this attribute is not set, the environment variable is removed during installation if it exists on the machine.
36201 /// </summary>
36202 public string Value
36203 {
36204 get
36205 {
36206 return this.valueField;
36207 }
36208 set
36209 {
36210 this.valueFieldSet = true;
36211 this.valueField = value;
36212 }
36213 }
36214
36215 /// <summary>
36216 /// Optional attribute to change the separator used between values. By default a semicolon is used.
36217 /// </summary>
36218 public string Separator
36219 {
36220 get
36221 {
36222 return this.separatorField;
36223 }
36224 set
36225 {
36226 this.separatorFieldSet = true;
36227 this.separatorField = value;
36228 }
36229 }
36230
36231 /// <summary>
36232 /// Specfies whether the environmental variable should be created, set or removed when the parent component is installed.
36233 /// </summary>
36234 public ActionType Action
36235 {
36236 get
36237 {
36238 return this.actionField;
36239 }
36240 set
36241 {
36242 this.actionFieldSet = true;
36243 this.actionField = value;
36244 }
36245 }
36246
36247 public PartType Part
36248 {
36249 get
36250 {
36251 return this.partField;
36252 }
36253 set
36254 {
36255 this.partFieldSet = true;
36256 this.partField = value;
36257 }
36258 }
36259
36260 /// <summary>
36261 /// Specifies that the environment variable should not be removed on uninstall.
36262 /// </summary>
36263 public YesNoType Permanent
36264 {
36265 get
36266 {
36267 return this.permanentField;
36268 }
36269 set
36270 {
36271 this.permanentFieldSet = true;
36272 this.permanentField = value;
36273 }
36274 }
36275
36276 /// <summary>
36277 /// Specifies that the environment variable should be added to the system environment space. The default
36278 /// is 'no' which indicates the environment variable is added to the user environment space.
36279 /// </summary>
36280 public YesNoType System
36281 {
36282 get
36283 {
36284 return this.systemField;
36285 }
36286 set
36287 {
36288 this.systemFieldSet = true;
36289 this.systemField = value;
36290 }
36291 }
36292
36293 public virtual ISchemaElement ParentElement
36294 {
36295 get
36296 {
36297 return this.parentElement;
36298 }
36299 set
36300 {
36301 this.parentElement = value;
36302 }
36303 }
36304
36305 /// <summary>
36306 /// Parses a ActionType from a string.
36307 /// </summary>
36308 public static ActionType ParseActionType(string value)
36309 {
36310 ActionType parsedValue;
36311 Environment.TryParseActionType(value, out parsedValue);
36312 return parsedValue;
36313 }
36314
36315 /// <summary>
36316 /// Tries to parse a ActionType from a string.
36317 /// </summary>
36318 public static bool TryParseActionType(string value, out ActionType parsedValue)
36319 {
36320 parsedValue = ActionType.NotSet;
36321 if (string.IsNullOrEmpty(value))
36322 {
36323 return false;
36324 }
36325 if (("create" == value))
36326 {
36327 parsedValue = ActionType.create;
36328 }
36329 else
36330 {
36331 if (("set" == value))
36332 {
36333 parsedValue = ActionType.set;
36334 }
36335 else
36336 {
36337 if (("remove" == value))
36338 {
36339 parsedValue = ActionType.remove;
36340 }
36341 else
36342 {
36343 parsedValue = ActionType.IllegalValue;
36344 return false;
36345 }
36346 }
36347 }
36348 return true;
36349 }
36350
36351 /// <summary>
36352 /// Parses a PartType from a string.
36353 /// </summary>
36354 public static PartType ParsePartType(string value)
36355 {
36356 PartType parsedValue;
36357 Environment.TryParsePartType(value, out parsedValue);
36358 return parsedValue;
36359 }
36360
36361 /// <summary>
36362 /// Tries to parse a PartType from a string.
36363 /// </summary>
36364 public static bool TryParsePartType(string value, out PartType parsedValue)
36365 {
36366 parsedValue = PartType.NotSet;
36367 if (string.IsNullOrEmpty(value))
36368 {
36369 return false;
36370 }
36371 if (("all" == value))
36372 {
36373 parsedValue = PartType.all;
36374 }
36375 else
36376 {
36377 if (("first" == value))
36378 {
36379 parsedValue = PartType.first;
36380 }
36381 else
36382 {
36383 if (("last" == value))
36384 {
36385 parsedValue = PartType.last;
36386 }
36387 else
36388 {
36389 parsedValue = PartType.IllegalValue;
36390 return false;
36391 }
36392 }
36393 }
36394 return true;
36395 }
36396
36397 /// <summary>
36398 /// Processes this element and all child elements into an XmlWriter.
36399 /// </summary>
36400 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
36401 public virtual void OutputXml(XmlWriter writer)
36402 {
36403 if ((null == writer))
36404 {
36405 throw new ArgumentNullException("writer");
36406 }
36407 writer.WriteStartElement("Environment", "http://wixtoolset.org/schemas/v4/wxs");
36408 if (this.idFieldSet)
36409 {
36410 writer.WriteAttributeString("Id", this.idField);
36411 }
36412 if (this.nameFieldSet)
36413 {
36414 writer.WriteAttributeString("Name", this.nameField);
36415 }
36416 if (this.valueFieldSet)
36417 {
36418 writer.WriteAttributeString("Value", this.valueField);
36419 }
36420 if (this.separatorFieldSet)
36421 {
36422 writer.WriteAttributeString("Separator", this.separatorField);
36423 }
36424 if (this.actionFieldSet)
36425 {
36426 if ((this.actionField == ActionType.create))
36427 {
36428 writer.WriteAttributeString("Action", "create");
36429 }
36430 if ((this.actionField == ActionType.set))
36431 {
36432 writer.WriteAttributeString("Action", "set");
36433 }
36434 if ((this.actionField == ActionType.remove))
36435 {
36436 writer.WriteAttributeString("Action", "remove");
36437 }
36438 }
36439 if (this.partFieldSet)
36440 {
36441 if ((this.partField == PartType.all))
36442 {
36443 writer.WriteAttributeString("Part", "all");
36444 }
36445 if ((this.partField == PartType.first))
36446 {
36447 writer.WriteAttributeString("Part", "first");
36448 }
36449 if ((this.partField == PartType.last))
36450 {
36451 writer.WriteAttributeString("Part", "last");
36452 }
36453 }
36454 if (this.permanentFieldSet)
36455 {
36456 if ((this.permanentField == YesNoType.no))
36457 {
36458 writer.WriteAttributeString("Permanent", "no");
36459 }
36460 if ((this.permanentField == YesNoType.yes))
36461 {
36462 writer.WriteAttributeString("Permanent", "yes");
36463 }
36464 }
36465 if (this.systemFieldSet)
36466 {
36467 if ((this.systemField == YesNoType.no))
36468 {
36469 writer.WriteAttributeString("System", "no");
36470 }
36471 if ((this.systemField == YesNoType.yes))
36472 {
36473 writer.WriteAttributeString("System", "yes");
36474 }
36475 }
36476 writer.WriteEndElement();
36477 }
36478
36479 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
36480 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
36481 void ISetAttributes.SetAttribute(string name, string value)
36482 {
36483 if (String.IsNullOrEmpty(name))
36484 {
36485 throw new ArgumentNullException("name");
36486 }
36487 if (("Id" == name))
36488 {
36489 this.idField = value;
36490 this.idFieldSet = true;
36491 }
36492 if (("Name" == name))
36493 {
36494 this.nameField = value;
36495 this.nameFieldSet = true;
36496 }
36497 if (("Value" == name))
36498 {
36499 this.valueField = value;
36500 this.valueFieldSet = true;
36501 }
36502 if (("Separator" == name))
36503 {
36504 this.separatorField = value;
36505 this.separatorFieldSet = true;
36506 }
36507 if (("Action" == name))
36508 {
36509 this.actionField = Environment.ParseActionType(value);
36510 this.actionFieldSet = true;
36511 }
36512 if (("Part" == name))
36513 {
36514 this.partField = Environment.ParsePartType(value);
36515 this.partFieldSet = true;
36516 }
36517 if (("Permanent" == name))
36518 {
36519 this.permanentField = Enums.ParseYesNoType(value);
36520 this.permanentFieldSet = true;
36521 }
36522 if (("System" == name))
36523 {
36524 this.systemField = Enums.ParseYesNoType(value);
36525 this.systemFieldSet = true;
36526 }
36527 }
36528
36529 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36530 public enum ActionType
36531 {
36532
36533 IllegalValue = int.MaxValue,
36534
36535 NotSet = -1,
36536
36537 /// <summary>
36538 /// Creates the environment variable if it does not exist, then set it during installation. This has no effect on the value of the environment variable if it already exists.
36539 /// </summary>
36540 create,
36541
36542 /// <summary>
36543 /// Creates the environment variable if it does not exist, and then set it during installation. If the environment variable exists, set it during the installation.
36544 /// </summary>
36545 set,
36546
36547 /// <summary>
36548 /// Removes the environment variable during an installation.
36549 /// The installer only removes an environment variable during an installation if the name and value
36550 /// of the variable match the entries in the Name and Value attributes.
36551 /// If you want to remove an environment variable, regardless of its value, do not set the Value attribute.
36552 /// </summary>
36553 remove,
36554 }
36555
36556 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36557 public enum PartType
36558 {
36559
36560 IllegalValue = int.MaxValue,
36561
36562 NotSet = -1,
36563
36564 /// <summary>
36565 /// This value is the entire environmental variable. This is the default.
36566 /// </summary>
36567 all,
36568
36569 /// <summary>
36570 /// This value is prefixed.
36571 /// </summary>
36572 first,
36573
36574 /// <summary>
36575 /// This value is appended.
36576 /// </summary>
36577 last,
36578 }
36579 }
36580
36581 /// <summary>
36582 /// Conditions for components, controls, features, and products. The condition is specified in the inner text of the element.
36583 /// </summary>
36584 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36585 public class Condition : ISchemaElement, ISetAttributes
36586 {
36587
36588 private ActionType actionField;
36589
36590 private bool actionFieldSet;
36591
36592 private int levelField;
36593
36594 private bool levelFieldSet;
36595
36596 private string messageField;
36597
36598 private bool messageFieldSet;
36599
36600 private string contentField;
36601
36602 private bool contentFieldSet;
36603
36604 private ISchemaElement parentElement;
36605
36606 /// <summary>
36607 /// Used only under Control elements and is required. Allows specific actions to be applied to a control based
36608 /// on the result of this condition.
36609 /// </summary>
36610 public ActionType Action
36611 {
36612 get
36613 {
36614 return this.actionField;
36615 }
36616 set
36617 {
36618 this.actionFieldSet = true;
36619 this.actionField = value;
36620 }
36621 }
36622
36623 /// <summary>
36624 /// Used only under Feature elements and is required. Allows modifying the level of a Feature based on the
36625 /// result of this condition.
36626 /// </summary>
36627 public int Level
36628 {
36629 get
36630 {
36631 return this.levelField;
36632 }
36633 set
36634 {
36635 this.levelFieldSet = true;
36636 this.levelField = value;
36637 }
36638 }
36639
36640 /// <summary>
36641 /// Used only under Fragment or Package elements and is required. Set the value to the text to display when the
36642 /// condition fails and the installation must be terminated.
36643 /// </summary>
36644 public string Message
36645 {
36646 get
36647 {
36648 return this.messageField;
36649 }
36650 set
36651 {
36652 this.messageFieldSet = true;
36653 this.messageField = value;
36654 }
36655 }
36656
36657 /// <summary>
36658 /// Under a Component element, the condition becomes the condition of the component. Under a Control element,
36659 /// the condition becomes a ControlCondition entry. Under a Feature element, the condition becomes a Condition
36660 /// entry. Under a Fragment or Package element, the condition becomes a LaunchCondition entry.
36661 /// </summary>
36662 public string Content
36663 {
36664 get
36665 {
36666 return this.contentField;
36667 }
36668 set
36669 {
36670 this.contentFieldSet = true;
36671 this.contentField = value;
36672 }
36673 }
36674
36675 public virtual ISchemaElement ParentElement
36676 {
36677 get
36678 {
36679 return this.parentElement;
36680 }
36681 set
36682 {
36683 this.parentElement = value;
36684 }
36685 }
36686
36687 /// <summary>
36688 /// Parses a ActionType from a string.
36689 /// </summary>
36690 public static ActionType ParseActionType(string value)
36691 {
36692 ActionType parsedValue;
36693 Condition.TryParseActionType(value, out parsedValue);
36694 return parsedValue;
36695 }
36696
36697 /// <summary>
36698 /// Tries to parse a ActionType from a string.
36699 /// </summary>
36700 public static bool TryParseActionType(string value, out ActionType parsedValue)
36701 {
36702 parsedValue = ActionType.NotSet;
36703 if (string.IsNullOrEmpty(value))
36704 {
36705 return false;
36706 }
36707 if (("default" == value))
36708 {
36709 parsedValue = ActionType.@default;
36710 }
36711 else
36712 {
36713 if (("enable" == value))
36714 {
36715 parsedValue = ActionType.enable;
36716 }
36717 else
36718 {
36719 if (("disable" == value))
36720 {
36721 parsedValue = ActionType.disable;
36722 }
36723 else
36724 {
36725 if (("hide" == value))
36726 {
36727 parsedValue = ActionType.hide;
36728 }
36729 else
36730 {
36731 if (("show" == value))
36732 {
36733 parsedValue = ActionType.show;
36734 }
36735 else
36736 {
36737 parsedValue = ActionType.IllegalValue;
36738 return false;
36739 }
36740 }
36741 }
36742 }
36743 }
36744 return true;
36745 }
36746
36747 /// <summary>
36748 /// Processes this element and all child elements into an XmlWriter.
36749 /// </summary>
36750 public virtual void OutputXml(XmlWriter writer)
36751 {
36752 if ((null == writer))
36753 {
36754 throw new ArgumentNullException("writer");
36755 }
36756 writer.WriteStartElement("Condition", "http://wixtoolset.org/schemas/v4/wxs");
36757 if (this.actionFieldSet)
36758 {
36759 if ((this.actionField == ActionType.@default))
36760 {
36761 writer.WriteAttributeString("Action", "default");
36762 }
36763 if ((this.actionField == ActionType.enable))
36764 {
36765 writer.WriteAttributeString("Action", "enable");
36766 }
36767 if ((this.actionField == ActionType.disable))
36768 {
36769 writer.WriteAttributeString("Action", "disable");
36770 }
36771 if ((this.actionField == ActionType.hide))
36772 {
36773 writer.WriteAttributeString("Action", "hide");
36774 }
36775 if ((this.actionField == ActionType.show))
36776 {
36777 writer.WriteAttributeString("Action", "show");
36778 }
36779 }
36780 if (this.levelFieldSet)
36781 {
36782 writer.WriteAttributeString("Level", this.levelField.ToString(CultureInfo.InvariantCulture));
36783 }
36784 if (this.messageFieldSet)
36785 {
36786 writer.WriteAttributeString("Message", this.messageField);
36787 }
36788 if (this.contentFieldSet)
36789 {
36790 writer.WriteString(this.contentField);
36791 }
36792 writer.WriteEndElement();
36793 }
36794
36795 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
36796 void ISetAttributes.SetAttribute(string name, string value)
36797 {
36798 if (String.IsNullOrEmpty(name))
36799 {
36800 throw new ArgumentNullException("name");
36801 }
36802 if (("Action" == name))
36803 {
36804 this.actionField = Condition.ParseActionType(value);
36805 this.actionFieldSet = true;
36806 }
36807 if (("Level" == name))
36808 {
36809 this.levelField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
36810 this.levelFieldSet = true;
36811 }
36812 if (("Message" == name))
36813 {
36814 this.messageField = value;
36815 this.messageFieldSet = true;
36816 }
36817 if (("Content" == name))
36818 {
36819 this.contentField = value;
36820 this.contentFieldSet = true;
36821 }
36822 }
36823
36824 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36825 public enum ActionType
36826 {
36827
36828 IllegalValue = int.MaxValue,
36829
36830 NotSet = -1,
36831
36832 /// <summary>
36833 /// Set the Control as the default. Only used under Control elements.
36834 /// </summary>
36835 @default,
36836
36837 /// <summary>
36838 /// Enable the Control. Only used under Control elements.
36839 /// </summary>
36840 enable,
36841
36842 /// <summary>
36843 /// Disable the Control. Only used under Control elements.
36844 /// </summary>
36845 disable,
36846
36847 /// <summary>
36848 /// Hide the Control. Only used under Control elements.
36849 /// </summary>
36850 hide,
36851
36852 /// <summary>
36853 /// Display the Control. Only used under Control elements.
36854 /// </summary>
36855 show,
36856 }
36857 }
36858
36859 /// <summary>
36860 /// Shared Component to be privately replicated in folder of parent Component
36861 /// </summary>
36862 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36863 public class IsolateComponent : ISchemaElement, ISetAttributes
36864 {
36865
36866 private string sharedField;
36867
36868 private bool sharedFieldSet;
36869
36870 private ISchemaElement parentElement;
36871
36872 /// <summary>
36873 /// Shared Component for this application Component.
36874 /// </summary>
36875 public string Shared
36876 {
36877 get
36878 {
36879 return this.sharedField;
36880 }
36881 set
36882 {
36883 this.sharedFieldSet = true;
36884 this.sharedField = value;
36885 }
36886 }
36887
36888 public virtual ISchemaElement ParentElement
36889 {
36890 get
36891 {
36892 return this.parentElement;
36893 }
36894 set
36895 {
36896 this.parentElement = value;
36897 }
36898 }
36899
36900 /// <summary>
36901 /// Processes this element and all child elements into an XmlWriter.
36902 /// </summary>
36903 public virtual void OutputXml(XmlWriter writer)
36904 {
36905 if ((null == writer))
36906 {
36907 throw new ArgumentNullException("writer");
36908 }
36909 writer.WriteStartElement("IsolateComponent", "http://wixtoolset.org/schemas/v4/wxs");
36910 if (this.sharedFieldSet)
36911 {
36912 writer.WriteAttributeString("Shared", this.sharedField);
36913 }
36914 writer.WriteEndElement();
36915 }
36916
36917 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
36918 void ISetAttributes.SetAttribute(string name, string value)
36919 {
36920 if (String.IsNullOrEmpty(name))
36921 {
36922 throw new ArgumentNullException("name");
36923 }
36924 if (("Shared" == name))
36925 {
36926 this.sharedField = value;
36927 this.sharedFieldSet = true;
36928 }
36929 }
36930 }
36931
36932 /// <summary>
36933 /// Disk cost to reserve in a folder for running locally and/or from source.
36934 /// </summary>
36935 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36936 public class ReserveCost : ISchemaElement, ISetAttributes
36937 {
36938
36939 private string idField;
36940
36941 private bool idFieldSet;
36942
36943 private string directoryField;
36944
36945 private bool directoryFieldSet;
36946
36947 private int runFromSourceField;
36948
36949 private bool runFromSourceFieldSet;
36950
36951 private int runLocalField;
36952
36953 private bool runLocalFieldSet;
36954
36955 private ISchemaElement parentElement;
36956
36957 /// <summary>
36958 /// A primary key that uniquely identifies this ReserveCost entry.
36959 /// </summary>
36960 public string Id
36961 {
36962 get
36963 {
36964 return this.idField;
36965 }
36966 set
36967 {
36968 this.idFieldSet = true;
36969 this.idField = value;
36970 }
36971 }
36972
36973 /// <summary>
36974 /// Adds the amount of disk space specified in RunFromSource or RunLocal to the volume cost of the device containing the directory.
36975 /// If this attribute is not set, it will default to the directory of parent component.
36976 /// </summary>
36977 public string Directory
36978 {
36979 get
36980 {
36981 return this.directoryField;
36982 }
36983 set
36984 {
36985 this.directoryFieldSet = true;
36986 this.directoryField = value;
36987 }
36988 }
36989
36990 /// <summary>
36991 /// The number of bytes of disk space to reserve if the component is installed to run from source.
36992 /// </summary>
36993 public int RunFromSource
36994 {
36995 get
36996 {
36997 return this.runFromSourceField;
36998 }
36999 set
37000 {
37001 this.runFromSourceFieldSet = true;
37002 this.runFromSourceField = value;
37003 }
37004 }
37005
37006 /// <summary>
37007 /// The number of bytes of disk space to reserve if the component is installed to run locally.
37008 /// </summary>
37009 public int RunLocal
37010 {
37011 get
37012 {
37013 return this.runLocalField;
37014 }
37015 set
37016 {
37017 this.runLocalFieldSet = true;
37018 this.runLocalField = value;
37019 }
37020 }
37021
37022 public virtual ISchemaElement ParentElement
37023 {
37024 get
37025 {
37026 return this.parentElement;
37027 }
37028 set
37029 {
37030 this.parentElement = value;
37031 }
37032 }
37033
37034 /// <summary>
37035 /// Processes this element and all child elements into an XmlWriter.
37036 /// </summary>
37037 public virtual void OutputXml(XmlWriter writer)
37038 {
37039 if ((null == writer))
37040 {
37041 throw new ArgumentNullException("writer");
37042 }
37043 writer.WriteStartElement("ReserveCost", "http://wixtoolset.org/schemas/v4/wxs");
37044 if (this.idFieldSet)
37045 {
37046 writer.WriteAttributeString("Id", this.idField);
37047 }
37048 if (this.directoryFieldSet)
37049 {
37050 writer.WriteAttributeString("Directory", this.directoryField);
37051 }
37052 if (this.runFromSourceFieldSet)
37053 {
37054 writer.WriteAttributeString("RunFromSource", this.runFromSourceField.ToString(CultureInfo.InvariantCulture));
37055 }
37056 if (this.runLocalFieldSet)
37057 {
37058 writer.WriteAttributeString("RunLocal", this.runLocalField.ToString(CultureInfo.InvariantCulture));
37059 }
37060 writer.WriteEndElement();
37061 }
37062
37063 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
37064 void ISetAttributes.SetAttribute(string name, string value)
37065 {
37066 if (String.IsNullOrEmpty(name))
37067 {
37068 throw new ArgumentNullException("name");
37069 }
37070 if (("Id" == name))
37071 {
37072 this.idField = value;
37073 this.idFieldSet = true;
37074 }
37075 if (("Directory" == name))
37076 {
37077 this.directoryField = value;
37078 this.directoryFieldSet = true;
37079 }
37080 if (("RunFromSource" == name))
37081 {
37082 this.runFromSourceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
37083 this.runFromSourceFieldSet = true;
37084 }
37085 if (("RunLocal" == name))
37086 {
37087 this.runLocalField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
37088 this.runLocalFieldSet = true;
37089 }
37090 }
37091 }
37092
37093 /// <summary>
37094 /// Component for parent Directory
37095 /// </summary>
37096 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
37097 public class Component : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
37098 {
37099
37100 private ElementCollection children;
37101
37102 private string idField;
37103
37104 private bool idFieldSet;
37105
37106 private int comPlusFlagsField;
37107
37108 private bool comPlusFlagsFieldSet;
37109
37110 private YesNoType disableRegistryReflectionField;
37111
37112 private bool disableRegistryReflectionFieldSet;
37113
37114 private string directoryField;
37115
37116 private bool directoryFieldSet;
37117
37118 private string diskIdField;
37119
37120 private bool diskIdFieldSet;
37121
37122 private string featureField;
37123
37124 private bool featureFieldSet;
37125
37126 private string guidField;
37127
37128 private bool guidFieldSet;
37129
37130 private YesNoType keyPathField;
37131
37132 private bool keyPathFieldSet;
37133
37134 private LocationType locationField;
37135
37136 private bool locationFieldSet;
37137
37138 private YesNoType multiInstanceField;
37139
37140 private bool multiInstanceFieldSet;
37141
37142 private YesNoType neverOverwriteField;
37143
37144 private bool neverOverwriteFieldSet;
37145
37146 private YesNoType permanentField;
37147
37148 private bool permanentFieldSet;
37149
37150 private YesNoType sharedField;
37151
37152 private bool sharedFieldSet;
37153
37154 private YesNoType sharedDllRefCountField;
37155
37156 private bool sharedDllRefCountFieldSet;
37157
37158 private YesNoType transitiveField;
37159
37160 private bool transitiveFieldSet;
37161
37162 private YesNoType uninstallWhenSupersededField;
37163
37164 private bool uninstallWhenSupersededFieldSet;
37165
37166 private YesNoType win64Field;
37167
37168 private bool win64FieldSet;
37169
37170 private ISchemaElement parentElement;
37171
37172 public Component()
37173 {
37174 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
37175 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
37176 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Category)));
37177 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class)));
37178 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition)));
37179 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CopyFile)));
37180 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateFolder)));
37181 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Environment)));
37182 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Extension)));
37183 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(File)));
37184 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IniFile)));
37185 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface)));
37186 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponent)));
37187 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDataSource)));
37188 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDriver)));
37189 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCTranslator)));
37190 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgId)));
37191 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Registry)));
37192 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryKey)));
37193 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue)));
37194 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFile)));
37195 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFolder)));
37196 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryKey)));
37197 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryValue)));
37198 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ReserveCost)));
37199 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceControl)));
37200 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfig)));
37201 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfigFailureActions)));
37202 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceInstall)));
37203 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut)));
37204 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
37205 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TypeLib)));
37206 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
37207 this.children = childCollection0;
37208 }
37209
37210 public virtual IEnumerable Children
37211 {
37212 get
37213 {
37214 return this.children;
37215 }
37216 }
37217
37218 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
37219 public virtual IEnumerable this[System.Type childType]
37220 {
37221 get
37222 {
37223 return this.children.Filter(childType);
37224 }
37225 }
37226
37227 /// <summary>
37228 /// Component identifier; this is the primary key for identifying components. If omitted,
37229 /// the compiler defaults the identifier to the identifier of the resource that is the
37230 /// explicit keypath of the component (for example, a child File element with KeyPath
37231 /// attribute with value 'yes'.
37232 /// </summary>
37233 public string Id
37234 {
37235 get
37236 {
37237 return this.idField;
37238 }
37239 set
37240 {
37241 this.idFieldSet = true;
37242 this.idField = value;
37243 }
37244 }
37245
37246 /// <summary>
37247 /// Set this attribute to create a ComPlus entry. The value should be the export flags used
37248 /// during the generation of the .msi file. For more information see the COM+ documentation
37249 /// in the Platform SDK.
37250 /// </summary>
37251 public int ComPlusFlags
37252 {
37253 get
37254 {
37255 return this.comPlusFlagsField;
37256 }
37257 set
37258 {
37259 this.comPlusFlagsFieldSet = true;
37260 this.comPlusFlagsField = value;
37261 }
37262 }
37263
37264 /// <summary>
37265 /// Set this attribute to 'yes' in order to disable registry reflection on all existing and
37266 /// new registry keys affected by this component.
37267 /// When set to 'yes', the Windows Installer calls the RegDisableReflectionKey on each key
37268 /// being accessed by the component.
37269 /// This bit is available with Windows Installer version 4.0 and is ignored on 32-bit systems.
37270 /// </summary>
37271 public YesNoType DisableRegistryReflection
37272 {
37273 get
37274 {
37275 return this.disableRegistryReflectionField;
37276 }
37277 set
37278 {
37279 this.disableRegistryReflectionFieldSet = true;
37280 this.disableRegistryReflectionField = value;
37281 }
37282 }
37283
37284 /// <summary>
37285 /// Sets the Directory of the Component. If this element is nested under a Directory element,
37286 /// this value defaults to the value of the parent Directory/@Id.
37287 /// </summary>
37288 public string Directory
37289 {
37290 get
37291 {
37292 return this.directoryField;
37293 }
37294 set
37295 {
37296 this.directoryFieldSet = true;
37297 this.directoryField = value;
37298 }
37299 }
37300
37301 /// <summary>
37302 /// This attribute provides a default DiskId attribute for all child File elements. Specifying
37303 /// the DiskId on a Component element will override any DiskId attributes set by parent Directory
37304 /// or DirectoryRef elements. See the File element's DiskId attribute for more information about
37305 /// the purpose of the DiskId.
37306 /// </summary>
37307 public string DiskId
37308 {
37309 get
37310 {
37311 return this.diskIdField;
37312 }
37313 set
37314 {
37315 this.diskIdFieldSet = true;
37316 this.diskIdField = value;
37317 }
37318 }
37319
37320 /// <summary>
37321 /// Identifies a feature to which this component belongs, as a shorthand for a child
37322 /// ComponentRef element of the Feature element. The value of this attribute should
37323 /// correspond to the Id attribute of a Feature element authored elsewhere. Note that
37324 /// a single component can belong to multiple features but this attribute allows you
37325 /// to specify only a single feature.
37326 /// </summary>
37327 public string Feature
37328 {
37329 get
37330 {
37331 return this.featureField;
37332 }
37333 set
37334 {
37335 this.featureFieldSet = true;
37336 this.featureField = value;
37337 }
37338 }
37339
37340 /// <summary>
37341 /// This value should be a guid that uniquely identifies this component's contents, language, platform, and version.
37342 /// If omitted, the default value is '*' which indicates that the linker should generate a stable guid.
37343 /// Generatable guids are supported only for components with a single file as the component's keypath
37344 /// or no files and a registry value as the keypath.
37345 /// It's also possible to set the value to an empty string to specify an unmanaged component.
37346 /// Unmanaged components are a security vulnerability because the component cannot be removed or repaired
37347 /// by Windows Installer (it is essentially an unpatchable, permanent component). Therefore, a guid should
37348 /// always be specified for any component which contains resources that may need to be patched in the future.
37349 /// </summary>
37350 public string Guid
37351 {
37352 get
37353 {
37354 return this.guidField;
37355 }
37356 set
37357 {
37358 this.guidFieldSet = true;
37359 this.guidField = value;
37360 }
37361 }
37362
37363 /// <summary>
37364 /// If this attribute's value is set to 'yes', then the Directory of this Component is used
37365 /// as the KeyPath. To set a Registry value or File as the KeyPath of a component, set the
37366 /// KeyPath attribute to 'yes' on one of those child elements. If KeyPath is not set to 'yes' for the
37367 /// Component or for a child Registry value or File, WiX will look at the child elements under the
37368 /// Component in sequential order and try to automatically select one of them as a key path. Allowing
37369 /// WiX to automatically select a key path can be dangerous because adding or removing child elements
37370 /// under the Component can inadvertantly cause the key path to change, which can lead to
37371 /// installation problems.
37372 /// </summary>
37373 public YesNoType KeyPath
37374 {
37375 get
37376 {
37377 return this.keyPathField;
37378 }
37379 set
37380 {
37381 this.keyPathFieldSet = true;
37382 this.keyPathField = value;
37383 }
37384 }
37385
37386 /// <summary>
37387 /// Optional value that specifies the location that the component can be run from.
37388 /// </summary>
37389 public LocationType Location
37390 {
37391 get
37392 {
37393 return this.locationField;
37394 }
37395 set
37396 {
37397 this.locationFieldSet = true;
37398 this.locationField = value;
37399 }
37400 }
37401
37402 /// <summary>
37403 /// If this attribute is set to 'yes', a new Component/@Guid will be generated for each
37404 /// instance transform. Ensure that all of the resources contained in a multi-instance
37405 /// Component will be installed to different paths based on the instance Property; otherwise,
37406 /// the Component Rules will be violated.
37407 /// </summary>
37408 public YesNoType MultiInstance
37409 {
37410 get
37411 {
37412 return this.multiInstanceField;
37413 }
37414 set
37415 {
37416 this.multiInstanceFieldSet = true;
37417 this.multiInstanceField = value;
37418 }
37419 }
37420
37421 /// <summary>
37422 /// If this attribute is set to 'yes', the installer does not install or reinstall the
37423 /// component if a key path file or a key path registry entry for the component already
37424 /// exists. The application does register itself as a client of the component. Use this
37425 /// flag only for components that are being registered by the Registry table. Do not use
37426 /// this flag for components registered by the AppId, Class, Extension, ProgId, MIME, and
37427 /// Verb tables.
37428 /// </summary>
37429 public YesNoType NeverOverwrite
37430 {
37431 get
37432 {
37433 return this.neverOverwriteField;
37434 }
37435 set
37436 {
37437 this.neverOverwriteFieldSet = true;
37438 this.neverOverwriteField = value;
37439 }
37440 }
37441
37442 /// <summary>
37443 /// If this attribute is set to 'yes', the installer does not remove the component during
37444 /// an uninstall. The installer registers an extra system client for the component in
37445 /// the Windows Installer registry settings (which basically just means that at least one
37446 /// product is always referencing this component). Note that this option differs from the
37447 /// behavior of not setting a guid because although the component is permanent, it is still
37448 /// patchable (because Windows Installer still tracks it), it's just not uninstallable.
37449 /// </summary>
37450 public YesNoType Permanent
37451 {
37452 get
37453 {
37454 return this.permanentField;
37455 }
37456 set
37457 {
37458 this.permanentFieldSet = true;
37459 this.permanentField = value;
37460 }
37461 }
37462
37463 /// <summary>
37464 /// If this attribute's value is set to 'yes', enables advanced patching semantics for
37465 /// Components that are shared across multiple Products. Specifically, the Windows Installer
37466 /// will cache the shared files to improve patch uninstall. This functionality is available
37467 /// in Windows Installer 4.5 and later.
37468 /// </summary>
37469 public YesNoType Shared
37470 {
37471 get
37472 {
37473 return this.sharedField;
37474 }
37475 set
37476 {
37477 this.sharedFieldSet = true;
37478 this.sharedField = value;
37479 }
37480 }
37481
37482 /// <summary>
37483 /// If this attribute's value is set to 'yes', the installer increments the reference count
37484 /// in the shared DLL registry of the component's key file. If this bit is not set, the
37485 /// installer increments the reference count only if the reference count already exists.
37486 /// </summary>
37487 public YesNoType SharedDllRefCount
37488 {
37489 get
37490 {
37491 return this.sharedDllRefCountField;
37492 }
37493 set
37494 {
37495 this.sharedDllRefCountFieldSet = true;
37496 this.sharedDllRefCountField = value;
37497 }
37498 }
37499
37500 /// <summary>
37501 /// If this attribute is set to 'yes', the installer reevaluates the value of the statement
37502 /// in the Condition upon a reinstall. If the value was previously False and has changed to
37503 /// True, the installer installs the component. If the value was previously True and has
37504 /// changed to False, the installer removes the component even if the component has other
37505 /// products as clients.
37506 /// </summary>
37507 public YesNoType Transitive
37508 {
37509 get
37510 {
37511 return this.transitiveField;
37512 }
37513 set
37514 {
37515 this.transitiveFieldSet = true;
37516 this.transitiveField = value;
37517 }
37518 }
37519
37520 /// <summary>
37521 /// If this attribute is set to 'yes', the installer will uninstall the Component's files
37522 /// and registry keys when it is superseded by a patch. This functionality is available in
37523 /// Windows Installer 4.5 and later.
37524 /// </summary>
37525 public YesNoType UninstallWhenSuperseded
37526 {
37527 get
37528 {
37529 return this.uninstallWhenSupersededField;
37530 }
37531 set
37532 {
37533 this.uninstallWhenSupersededFieldSet = true;
37534 this.uninstallWhenSupersededField = value;
37535 }
37536 }
37537
37538 /// <summary>
37539 /// Set this attribute to 'yes' to mark this as a 64-bit component. This attribute facilitates
37540 /// the installation of packages that include both 32-bit and 64-bit components. If this is a 64-bit
37541 /// component replacing a 32-bit component, set this attribute to 'yes' and assign a new GUID in the Guid attribute.
37542 /// The default value is based on the platform set by the -arch switch to candle.exe
37543 /// or the InstallerPlatform property in a .wixproj MSBuild project:
37544 /// For x86 and ARM, the default value is 'no'.
37545 /// For x64 and IA64, the default value is 'yes'.
37546 /// </summary>
37547 public YesNoType Win64
37548 {
37549 get
37550 {
37551 return this.win64Field;
37552 }
37553 set
37554 {
37555 this.win64FieldSet = true;
37556 this.win64Field = value;
37557 }
37558 }
37559
37560 public virtual ISchemaElement ParentElement
37561 {
37562 get
37563 {
37564 return this.parentElement;
37565 }
37566 set
37567 {
37568 this.parentElement = value;
37569 }
37570 }
37571
37572 public virtual void AddChild(ISchemaElement child)
37573 {
37574 if ((null == child))
37575 {
37576 throw new ArgumentNullException("child");
37577 }
37578 this.children.AddElement(child);
37579 child.ParentElement = this;
37580 }
37581
37582 public virtual void RemoveChild(ISchemaElement child)
37583 {
37584 if ((null == child))
37585 {
37586 throw new ArgumentNullException("child");
37587 }
37588 this.children.RemoveElement(child);
37589 child.ParentElement = null;
37590 }
37591
37592 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
37593 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
37594 ISchemaElement ICreateChildren.CreateChild(string childName)
37595 {
37596 if (String.IsNullOrEmpty(childName))
37597 {
37598 throw new ArgumentNullException("childName");
37599 }
37600 ISchemaElement childValue = null;
37601 if (("AppId" == childName))
37602 {
37603 childValue = new AppId();
37604 }
37605 if (("Category" == childName))
37606 {
37607 childValue = new Category();
37608 }
37609 if (("Class" == childName))
37610 {
37611 childValue = new Class();
37612 }
37613 if (("Condition" == childName))
37614 {
37615 childValue = new Condition();
37616 }
37617 if (("CopyFile" == childName))
37618 {
37619 childValue = new CopyFile();
37620 }
37621 if (("CreateFolder" == childName))
37622 {
37623 childValue = new CreateFolder();
37624 }
37625 if (("Environment" == childName))
37626 {
37627 childValue = new Environment();
37628 }
37629 if (("Extension" == childName))
37630 {
37631 childValue = new Extension();
37632 }
37633 if (("File" == childName))
37634 {
37635 childValue = new File();
37636 }
37637 if (("IniFile" == childName))
37638 {
37639 childValue = new IniFile();
37640 }
37641 if (("Interface" == childName))
37642 {
37643 childValue = new Interface();
37644 }
37645 if (("IsolateComponent" == childName))
37646 {
37647 childValue = new IsolateComponent();
37648 }
37649 if (("ODBCDataSource" == childName))
37650 {
37651 childValue = new ODBCDataSource();
37652 }
37653 if (("ODBCDriver" == childName))
37654 {
37655 childValue = new ODBCDriver();
37656 }
37657 if (("ODBCTranslator" == childName))
37658 {
37659 childValue = new ODBCTranslator();
37660 }
37661 if (("ProgId" == childName))
37662 {
37663 childValue = new ProgId();
37664 }
37665 if (("Registry" == childName))
37666 {
37667 childValue = new Registry();
37668 }
37669 if (("RegistryKey" == childName))
37670 {
37671 childValue = new RegistryKey();
37672 }
37673 if (("RegistryValue" == childName))
37674 {
37675 childValue = new RegistryValue();
37676 }
37677 if (("RemoveFile" == childName))
37678 {
37679 childValue = new RemoveFile();
37680 }
37681 if (("RemoveFolder" == childName))
37682 {
37683 childValue = new RemoveFolder();
37684 }
37685 if (("RemoveRegistryKey" == childName))
37686 {
37687 childValue = new RemoveRegistryKey();
37688 }
37689 if (("RemoveRegistryValue" == childName))
37690 {
37691 childValue = new RemoveRegistryValue();
37692 }
37693 if (("ReserveCost" == childName))
37694 {
37695 childValue = new ReserveCost();
37696 }
37697 if (("ServiceControl" == childName))
37698 {
37699 childValue = new ServiceControl();
37700 }
37701 if (("ServiceConfig" == childName))
37702 {
37703 childValue = new ServiceConfig();
37704 }
37705 if (("ServiceConfigFailureActions" == childName))
37706 {
37707 childValue = new ServiceConfigFailureActions();
37708 }
37709 if (("ServiceInstall" == childName))
37710 {
37711 childValue = new ServiceInstall();
37712 }
37713 if (("Shortcut" == childName))
37714 {
37715 childValue = new Shortcut();
37716 }
37717 if (("SymbolPath" == childName))
37718 {
37719 childValue = new SymbolPath();
37720 }
37721 if (("TypeLib" == childName))
37722 {
37723 childValue = new TypeLib();
37724 }
37725 if ((null == childValue))
37726 {
37727 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
37728 }
37729 return childValue;
37730 }
37731
37732 /// <summary>
37733 /// Parses a LocationType from a string.
37734 /// </summary>
37735 public static LocationType ParseLocationType(string value)
37736 {
37737 LocationType parsedValue;
37738 Component.TryParseLocationType(value, out parsedValue);
37739 return parsedValue;
37740 }
37741
37742 /// <summary>
37743 /// Tries to parse a LocationType from a string.
37744 /// </summary>
37745 public static bool TryParseLocationType(string value, out LocationType parsedValue)
37746 {
37747 parsedValue = LocationType.NotSet;
37748 if (string.IsNullOrEmpty(value))
37749 {
37750 return false;
37751 }
37752 if (("local" == value))
37753 {
37754 parsedValue = LocationType.local;
37755 }
37756 else
37757 {
37758 if (("source" == value))
37759 {
37760 parsedValue = LocationType.source;
37761 }
37762 else
37763 {
37764 if (("either" == value))
37765 {
37766 parsedValue = LocationType.either;
37767 }
37768 else
37769 {
37770 parsedValue = LocationType.IllegalValue;
37771 return false;
37772 }
37773 }
37774 }
37775 return true;
37776 }
37777
37778 /// <summary>
37779 /// Processes this element and all child elements into an XmlWriter.
37780 /// </summary>
37781 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
37782 public virtual void OutputXml(XmlWriter writer)
37783 {
37784 if ((null == writer))
37785 {
37786 throw new ArgumentNullException("writer");
37787 }
37788 writer.WriteStartElement("Component", "http://wixtoolset.org/schemas/v4/wxs");
37789 if (this.idFieldSet)
37790 {
37791 writer.WriteAttributeString("Id", this.idField);
37792 }
37793 if (this.comPlusFlagsFieldSet)
37794 {
37795 writer.WriteAttributeString("ComPlusFlags", this.comPlusFlagsField.ToString(CultureInfo.InvariantCulture));
37796 }
37797 if (this.disableRegistryReflectionFieldSet)
37798 {
37799 if ((this.disableRegistryReflectionField == YesNoType.no))
37800 {
37801 writer.WriteAttributeString("DisableRegistryReflection", "no");
37802 }
37803 if ((this.disableRegistryReflectionField == YesNoType.yes))
37804 {
37805 writer.WriteAttributeString("DisableRegistryReflection", "yes");
37806 }
37807 }
37808 if (this.directoryFieldSet)
37809 {
37810 writer.WriteAttributeString("Directory", this.directoryField);
37811 }
37812 if (this.diskIdFieldSet)
37813 {
37814 writer.WriteAttributeString("DiskId", this.diskIdField);
37815 }
37816 if (this.featureFieldSet)
37817 {
37818 writer.WriteAttributeString("Feature", this.featureField);
37819 }
37820 if (this.guidFieldSet)
37821 {
37822 writer.WriteAttributeString("Guid", this.guidField);
37823 }
37824 if (this.keyPathFieldSet)
37825 {
37826 if ((this.keyPathField == YesNoType.no))
37827 {
37828 writer.WriteAttributeString("KeyPath", "no");
37829 }
37830 if ((this.keyPathField == YesNoType.yes))
37831 {
37832 writer.WriteAttributeString("KeyPath", "yes");
37833 }
37834 }
37835 if (this.locationFieldSet)
37836 {
37837 if ((this.locationField == LocationType.local))
37838 {
37839 writer.WriteAttributeString("Location", "local");
37840 }
37841 if ((this.locationField == LocationType.source))
37842 {
37843 writer.WriteAttributeString("Location", "source");
37844 }
37845 if ((this.locationField == LocationType.either))
37846 {
37847 writer.WriteAttributeString("Location", "either");
37848 }
37849 }
37850 if (this.multiInstanceFieldSet)
37851 {
37852 if ((this.multiInstanceField == YesNoType.no))
37853 {
37854 writer.WriteAttributeString("MultiInstance", "no");
37855 }
37856 if ((this.multiInstanceField == YesNoType.yes))
37857 {
37858 writer.WriteAttributeString("MultiInstance", "yes");
37859 }
37860 }
37861 if (this.neverOverwriteFieldSet)
37862 {
37863 if ((this.neverOverwriteField == YesNoType.no))
37864 {
37865 writer.WriteAttributeString("NeverOverwrite", "no");
37866 }
37867 if ((this.neverOverwriteField == YesNoType.yes))
37868 {
37869 writer.WriteAttributeString("NeverOverwrite", "yes");
37870 }
37871 }
37872 if (this.permanentFieldSet)
37873 {
37874 if ((this.permanentField == YesNoType.no))
37875 {
37876 writer.WriteAttributeString("Permanent", "no");
37877 }
37878 if ((this.permanentField == YesNoType.yes))
37879 {
37880 writer.WriteAttributeString("Permanent", "yes");
37881 }
37882 }
37883 if (this.sharedFieldSet)
37884 {
37885 if ((this.sharedField == YesNoType.no))
37886 {
37887 writer.WriteAttributeString("Shared", "no");
37888 }
37889 if ((this.sharedField == YesNoType.yes))
37890 {
37891 writer.WriteAttributeString("Shared", "yes");
37892 }
37893 }
37894 if (this.sharedDllRefCountFieldSet)
37895 {
37896 if ((this.sharedDllRefCountField == YesNoType.no))
37897 {
37898 writer.WriteAttributeString("SharedDllRefCount", "no");
37899 }
37900 if ((this.sharedDllRefCountField == YesNoType.yes))
37901 {
37902 writer.WriteAttributeString("SharedDllRefCount", "yes");
37903 }
37904 }
37905 if (this.transitiveFieldSet)
37906 {
37907 if ((this.transitiveField == YesNoType.no))
37908 {
37909 writer.WriteAttributeString("Transitive", "no");
37910 }
37911 if ((this.transitiveField == YesNoType.yes))
37912 {
37913 writer.WriteAttributeString("Transitive", "yes");
37914 }
37915 }
37916 if (this.uninstallWhenSupersededFieldSet)
37917 {
37918 if ((this.uninstallWhenSupersededField == YesNoType.no))
37919 {
37920 writer.WriteAttributeString("UninstallWhenSuperseded", "no");
37921 }
37922 if ((this.uninstallWhenSupersededField == YesNoType.yes))
37923 {
37924 writer.WriteAttributeString("UninstallWhenSuperseded", "yes");
37925 }
37926 }
37927 if (this.win64FieldSet)
37928 {
37929 if ((this.win64Field == YesNoType.no))
37930 {
37931 writer.WriteAttributeString("Win64", "no");
37932 }
37933 if ((this.win64Field == YesNoType.yes))
37934 {
37935 writer.WriteAttributeString("Win64", "yes");
37936 }
37937 }
37938 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
37939 {
37940 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
37941 childElement.OutputXml(writer);
37942 }
37943 writer.WriteEndElement();
37944 }
37945
37946 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
37947 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
37948 void ISetAttributes.SetAttribute(string name, string value)
37949 {
37950 if (String.IsNullOrEmpty(name))
37951 {
37952 throw new ArgumentNullException("name");
37953 }
37954 if (("Id" == name))
37955 {
37956 this.idField = value;
37957 this.idFieldSet = true;
37958 }
37959 if (("ComPlusFlags" == name))
37960 {
37961 this.comPlusFlagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
37962 this.comPlusFlagsFieldSet = true;
37963 }
37964 if (("DisableRegistryReflection" == name))
37965 {
37966 this.disableRegistryReflectionField = Enums.ParseYesNoType(value);
37967 this.disableRegistryReflectionFieldSet = true;
37968 }
37969 if (("Directory" == name))
37970 {
37971 this.directoryField = value;
37972 this.directoryFieldSet = true;
37973 }
37974 if (("DiskId" == name))
37975 {
37976 this.diskIdField = value;
37977 this.diskIdFieldSet = true;
37978 }
37979 if (("Feature" == name))
37980 {
37981 this.featureField = value;
37982 this.featureFieldSet = true;
37983 }
37984 if (("Guid" == name))
37985 {
37986 this.guidField = value;
37987 this.guidFieldSet = true;
37988 }
37989 if (("KeyPath" == name))
37990 {
37991 this.keyPathField = Enums.ParseYesNoType(value);
37992 this.keyPathFieldSet = true;
37993 }
37994 if (("Location" == name))
37995 {
37996 this.locationField = Component.ParseLocationType(value);
37997 this.locationFieldSet = true;
37998 }
37999 if (("MultiInstance" == name))
38000 {
38001 this.multiInstanceField = Enums.ParseYesNoType(value);
38002 this.multiInstanceFieldSet = true;
38003 }
38004 if (("NeverOverwrite" == name))
38005 {
38006 this.neverOverwriteField = Enums.ParseYesNoType(value);
38007 this.neverOverwriteFieldSet = true;
38008 }
38009 if (("Permanent" == name))
38010 {
38011 this.permanentField = Enums.ParseYesNoType(value);
38012 this.permanentFieldSet = true;
38013 }
38014 if (("Shared" == name))
38015 {
38016 this.sharedField = Enums.ParseYesNoType(value);
38017 this.sharedFieldSet = true;
38018 }
38019 if (("SharedDllRefCount" == name))
38020 {
38021 this.sharedDllRefCountField = Enums.ParseYesNoType(value);
38022 this.sharedDllRefCountFieldSet = true;
38023 }
38024 if (("Transitive" == name))
38025 {
38026 this.transitiveField = Enums.ParseYesNoType(value);
38027 this.transitiveFieldSet = true;
38028 }
38029 if (("UninstallWhenSuperseded" == name))
38030 {
38031 this.uninstallWhenSupersededField = Enums.ParseYesNoType(value);
38032 this.uninstallWhenSupersededFieldSet = true;
38033 }
38034 if (("Win64" == name))
38035 {
38036 this.win64Field = Enums.ParseYesNoType(value);
38037 this.win64FieldSet = true;
38038 }
38039 }
38040
38041 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38042 public enum LocationType
38043 {
38044
38045 IllegalValue = int.MaxValue,
38046
38047 NotSet = -1,
38048
38049 /// <summary>
38050 /// Prevents the component from running from the source or the network (this is the default behavior if this attribute is not set).
38051 /// </summary>
38052 local,
38053
38054 /// <summary>
38055 /// Enforces that the component can only be run from the source (it cannot be run from the user's computer).
38056 /// </summary>
38057 source,
38058
38059 /// <summary>
38060 /// Allows the component to run from source or locally.
38061 /// </summary>
38062 either,
38063 }
38064 }
38065
38066 /// <summary>
38067 /// Groups together multiple components to be used in other locations.
38068 /// </summary>
38069 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38070 public class ComponentGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
38071 {
38072
38073 private ElementCollection children;
38074
38075 private string idField;
38076
38077 private bool idFieldSet;
38078
38079 private string directoryField;
38080
38081 private bool directoryFieldSet;
38082
38083 private string sourceField;
38084
38085 private bool sourceFieldSet;
38086
38087 private ISchemaElement parentElement;
38088
38089 public ComponentGroup()
38090 {
38091 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
38092 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
38093 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef)));
38094 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
38095 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
38096 this.children = childCollection0;
38097 }
38098
38099 public virtual IEnumerable Children
38100 {
38101 get
38102 {
38103 return this.children;
38104 }
38105 }
38106
38107 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
38108 public virtual IEnumerable this[System.Type childType]
38109 {
38110 get
38111 {
38112 return this.children.Filter(childType);
38113 }
38114 }
38115
38116 /// <summary>
38117 /// Identifier for the ComponentGroup.
38118 /// </summary>
38119 public string Id
38120 {
38121 get
38122 {
38123 return this.idField;
38124 }
38125 set
38126 {
38127 this.idFieldSet = true;
38128 this.idField = value;
38129 }
38130 }
38131
38132 /// <summary>
38133 /// Sets the default directory identifier for child Component elements.
38134 /// </summary>
38135 public string Directory
38136 {
38137 get
38138 {
38139 return this.directoryField;
38140 }
38141 set
38142 {
38143 this.directoryFieldSet = true;
38144 this.directoryField = value;
38145 }
38146 }
38147
38148 /// <summary>
38149 /// Used to set the default file system source for child Component elements. For more information, see
38150 /// </summary>
38151 public string Source
38152 {
38153 get
38154 {
38155 return this.sourceField;
38156 }
38157 set
38158 {
38159 this.sourceFieldSet = true;
38160 this.sourceField = value;
38161 }
38162 }
38163
38164 public virtual ISchemaElement ParentElement
38165 {
38166 get
38167 {
38168 return this.parentElement;
38169 }
38170 set
38171 {
38172 this.parentElement = value;
38173 }
38174 }
38175
38176 public virtual void AddChild(ISchemaElement child)
38177 {
38178 if ((null == child))
38179 {
38180 throw new ArgumentNullException("child");
38181 }
38182 this.children.AddElement(child);
38183 child.ParentElement = this;
38184 }
38185
38186 public virtual void RemoveChild(ISchemaElement child)
38187 {
38188 if ((null == child))
38189 {
38190 throw new ArgumentNullException("child");
38191 }
38192 this.children.RemoveElement(child);
38193 child.ParentElement = null;
38194 }
38195
38196 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38197 ISchemaElement ICreateChildren.CreateChild(string childName)
38198 {
38199 if (String.IsNullOrEmpty(childName))
38200 {
38201 throw new ArgumentNullException("childName");
38202 }
38203 ISchemaElement childValue = null;
38204 if (("Component" == childName))
38205 {
38206 childValue = new Component();
38207 }
38208 if (("ComponentGroupRef" == childName))
38209 {
38210 childValue = new ComponentGroupRef();
38211 }
38212 if (("ComponentRef" == childName))
38213 {
38214 childValue = new ComponentRef();
38215 }
38216 if ((null == childValue))
38217 {
38218 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
38219 }
38220 return childValue;
38221 }
38222
38223 /// <summary>
38224 /// Processes this element and all child elements into an XmlWriter.
38225 /// </summary>
38226 public virtual void OutputXml(XmlWriter writer)
38227 {
38228 if ((null == writer))
38229 {
38230 throw new ArgumentNullException("writer");
38231 }
38232 writer.WriteStartElement("ComponentGroup", "http://wixtoolset.org/schemas/v4/wxs");
38233 if (this.idFieldSet)
38234 {
38235 writer.WriteAttributeString("Id", this.idField);
38236 }
38237 if (this.directoryFieldSet)
38238 {
38239 writer.WriteAttributeString("Directory", this.directoryField);
38240 }
38241 if (this.sourceFieldSet)
38242 {
38243 writer.WriteAttributeString("Source", this.sourceField);
38244 }
38245 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
38246 {
38247 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
38248 childElement.OutputXml(writer);
38249 }
38250 writer.WriteEndElement();
38251 }
38252
38253 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38254 void ISetAttributes.SetAttribute(string name, string value)
38255 {
38256 if (String.IsNullOrEmpty(name))
38257 {
38258 throw new ArgumentNullException("name");
38259 }
38260 if (("Id" == name))
38261 {
38262 this.idField = value;
38263 this.idFieldSet = true;
38264 }
38265 if (("Directory" == name))
38266 {
38267 this.directoryField = value;
38268 this.directoryFieldSet = true;
38269 }
38270 if (("Source" == name))
38271 {
38272 this.sourceField = value;
38273 this.sourceFieldSet = true;
38274 }
38275 }
38276 }
38277
38278 /// <summary>
38279 /// Create a reference to a ComponentGroup in another Fragment.
38280 /// </summary>
38281 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38282 public class ComponentGroupRef : ISchemaElement, ISetAttributes
38283 {
38284
38285 private string idField;
38286
38287 private bool idFieldSet;
38288
38289 private YesNoType primaryField;
38290
38291 private bool primaryFieldSet;
38292
38293 private ISchemaElement parentElement;
38294
38295 /// <summary>
38296 /// The identifier of the ComponentGroup to reference.
38297 /// </summary>
38298 public string Id
38299 {
38300 get
38301 {
38302 return this.idField;
38303 }
38304 set
38305 {
38306 this.idFieldSet = true;
38307 this.idField = value;
38308 }
38309 }
38310
38311 /// <summary>
38312 /// Set this attribute to 'yes' in order to make the parent feature of this component
38313 /// the primary feature for this component. Components may belong to multiple features.
38314 /// By designating a feature as the primary feature of a component, you ensure that
38315 /// whenever a component is selected for install-on-demand (IOD), the primary feature
38316 /// will be the one to install it. This attribute should only be set if a component
38317 /// actually nests under multiple features. If a component nests under only one feature,
38318 /// that feature is the primary feature for the component. You cannot set more than one
38319 /// feature as the primary feature of a given component.
38320 /// </summary>
38321 public YesNoType Primary
38322 {
38323 get
38324 {
38325 return this.primaryField;
38326 }
38327 set
38328 {
38329 this.primaryFieldSet = true;
38330 this.primaryField = value;
38331 }
38332 }
38333
38334 public virtual ISchemaElement ParentElement
38335 {
38336 get
38337 {
38338 return this.parentElement;
38339 }
38340 set
38341 {
38342 this.parentElement = value;
38343 }
38344 }
38345
38346 /// <summary>
38347 /// Processes this element and all child elements into an XmlWriter.
38348 /// </summary>
38349 public virtual void OutputXml(XmlWriter writer)
38350 {
38351 if ((null == writer))
38352 {
38353 throw new ArgumentNullException("writer");
38354 }
38355 writer.WriteStartElement("ComponentGroupRef", "http://wixtoolset.org/schemas/v4/wxs");
38356 if (this.idFieldSet)
38357 {
38358 writer.WriteAttributeString("Id", this.idField);
38359 }
38360 if (this.primaryFieldSet)
38361 {
38362 if ((this.primaryField == YesNoType.no))
38363 {
38364 writer.WriteAttributeString("Primary", "no");
38365 }
38366 if ((this.primaryField == YesNoType.yes))
38367 {
38368 writer.WriteAttributeString("Primary", "yes");
38369 }
38370 }
38371 writer.WriteEndElement();
38372 }
38373
38374 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38375 void ISetAttributes.SetAttribute(string name, string value)
38376 {
38377 if (String.IsNullOrEmpty(name))
38378 {
38379 throw new ArgumentNullException("name");
38380 }
38381 if (("Id" == name))
38382 {
38383 this.idField = value;
38384 this.idFieldSet = true;
38385 }
38386 if (("Primary" == name))
38387 {
38388 this.primaryField = Enums.ParseYesNoType(value);
38389 this.primaryFieldSet = true;
38390 }
38391 }
38392 }
38393
38394 /// <summary>
38395 /// Used only for PatchFamilies to include all changes between the baseline and upgraded packages in a patch.
38396 /// </summary>
38397 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38398 public class All : ISetAttributes, ISchemaElement
38399 {
38400
38401 private ISchemaElement parentElement;
38402
38403 private string contentField;
38404
38405 private bool contentFieldSet;
38406
38407 public virtual ISchemaElement ParentElement
38408 {
38409 get
38410 {
38411 return this.parentElement;
38412 }
38413 set
38414 {
38415 this.parentElement = value;
38416 }
38417 }
38418
38419 /// <summary>
38420 /// Used only for PatchFamilies to include all changes between the baseline and upgraded packages in a patch.
38421 /// </summary>
38422 public string Content
38423 {
38424 get
38425 {
38426 return this.contentField;
38427 }
38428 set
38429 {
38430 this.contentFieldSet = true;
38431 this.contentField = value;
38432 }
38433 }
38434
38435 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38436 void ISetAttributes.SetAttribute(string name, string value)
38437 {
38438 if (String.IsNullOrEmpty(name))
38439 {
38440 throw new ArgumentNullException("name");
38441 }
38442 if (("Content" == name))
38443 {
38444 this.contentField = value;
38445 this.contentFieldSet = true;
38446 }
38447 }
38448
38449 /// <summary>
38450 /// Processes this element and all child elements into an XmlWriter.
38451 /// </summary>
38452 public virtual void OutputXml(XmlWriter writer)
38453 {
38454 if ((null == writer))
38455 {
38456 throw new ArgumentNullException("writer");
38457 }
38458 writer.WriteStartElement("All", "http://wixtoolset.org/schemas/v4/wxs");
38459 if (this.contentFieldSet)
38460 {
38461 writer.WriteString(this.contentField);
38462 }
38463 writer.WriteEndElement();
38464 }
38465 }
38466
38467 /// <summary>
38468 /// Used only for PatchFamilies to include only a binary table entry in a patch.
38469 /// </summary>
38470 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38471 public class BinaryRef : ISchemaElement, ISetAttributes
38472 {
38473
38474 private string idField;
38475
38476 private bool idFieldSet;
38477
38478 private ISchemaElement parentElement;
38479
38480 /// <summary>
38481 /// The identifier of the Binary element to reference.
38482 /// </summary>
38483 public string Id
38484 {
38485 get
38486 {
38487 return this.idField;
38488 }
38489 set
38490 {
38491 this.idFieldSet = true;
38492 this.idField = value;
38493 }
38494 }
38495
38496 public virtual ISchemaElement ParentElement
38497 {
38498 get
38499 {
38500 return this.parentElement;
38501 }
38502 set
38503 {
38504 this.parentElement = value;
38505 }
38506 }
38507
38508 /// <summary>
38509 /// Processes this element and all child elements into an XmlWriter.
38510 /// </summary>
38511 public virtual void OutputXml(XmlWriter writer)
38512 {
38513 if ((null == writer))
38514 {
38515 throw new ArgumentNullException("writer");
38516 }
38517 writer.WriteStartElement("BinaryRef", "http://wixtoolset.org/schemas/v4/wxs");
38518 if (this.idFieldSet)
38519 {
38520 writer.WriteAttributeString("Id", this.idField);
38521 }
38522 writer.WriteEndElement();
38523 }
38524
38525 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38526 void ISetAttributes.SetAttribute(string name, string value)
38527 {
38528 if (String.IsNullOrEmpty(name))
38529 {
38530 throw new ArgumentNullException("name");
38531 }
38532 if (("Id" == name))
38533 {
38534 this.idField = value;
38535 this.idFieldSet = true;
38536 }
38537 }
38538 }
38539
38540 /// <summary>
38541 /// Used only for PatchFamilies to include only a icon table entry in a patch.
38542 /// </summary>
38543 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38544 public class IconRef : ISchemaElement, ISetAttributes
38545 {
38546
38547 private string idField;
38548
38549 private bool idFieldSet;
38550
38551 private ISchemaElement parentElement;
38552
38553 /// <summary>
38554 /// The identifier of the Icon element to reference.
38555 /// </summary>
38556 public string Id
38557 {
38558 get
38559 {
38560 return this.idField;
38561 }
38562 set
38563 {
38564 this.idFieldSet = true;
38565 this.idField = value;
38566 }
38567 }
38568
38569 public virtual ISchemaElement ParentElement
38570 {
38571 get
38572 {
38573 return this.parentElement;
38574 }
38575 set
38576 {
38577 this.parentElement = value;
38578 }
38579 }
38580
38581 /// <summary>
38582 /// Processes this element and all child elements into an XmlWriter.
38583 /// </summary>
38584 public virtual void OutputXml(XmlWriter writer)
38585 {
38586 if ((null == writer))
38587 {
38588 throw new ArgumentNullException("writer");
38589 }
38590 writer.WriteStartElement("IconRef", "http://wixtoolset.org/schemas/v4/wxs");
38591 if (this.idFieldSet)
38592 {
38593 writer.WriteAttributeString("Id", this.idField);
38594 }
38595 writer.WriteEndElement();
38596 }
38597
38598 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38599 void ISetAttributes.SetAttribute(string name, string value)
38600 {
38601 if (String.IsNullOrEmpty(name))
38602 {
38603 throw new ArgumentNullException("name");
38604 }
38605 if (("Id" == name))
38606 {
38607 this.idField = value;
38608 this.idFieldSet = true;
38609 }
38610 }
38611 }
38612
38613 /// <summary>
38614 /// Create a reference to a Feature element in another Fragment.
38615 /// </summary>
38616 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38617 public class ComponentRef : ISchemaElement, ISetAttributes
38618 {
38619
38620 private string idField;
38621
38622 private bool idFieldSet;
38623
38624 private YesNoType primaryField;
38625
38626 private bool primaryFieldSet;
38627
38628 private ISchemaElement parentElement;
38629
38630 /// <summary>
38631 /// The identifier of the Component element to reference.
38632 /// </summary>
38633 public string Id
38634 {
38635 get
38636 {
38637 return this.idField;
38638 }
38639 set
38640 {
38641 this.idFieldSet = true;
38642 this.idField = value;
38643 }
38644 }
38645
38646 /// <summary>
38647 /// Set this attribute to 'yes' in order to make the parent feature of this component
38648 /// the primary feature for this component. Components may belong to multiple features.
38649 /// By designating a feature as the primary feature of a component, you ensure that
38650 /// whenever a component is selected for install-on-demand (IOD), the primary feature
38651 /// will be the one to install it. This attribute should only be set if a component
38652 /// actually nests under multiple features. If a component nests under only one feature,
38653 /// that feature is the primary feature for the component. You cannot set more than one
38654 /// feature as the primary feature of a given component.
38655 /// </summary>
38656 public YesNoType Primary
38657 {
38658 get
38659 {
38660 return this.primaryField;
38661 }
38662 set
38663 {
38664 this.primaryFieldSet = true;
38665 this.primaryField = value;
38666 }
38667 }
38668
38669 public virtual ISchemaElement ParentElement
38670 {
38671 get
38672 {
38673 return this.parentElement;
38674 }
38675 set
38676 {
38677 this.parentElement = value;
38678 }
38679 }
38680
38681 /// <summary>
38682 /// Processes this element and all child elements into an XmlWriter.
38683 /// </summary>
38684 public virtual void OutputXml(XmlWriter writer)
38685 {
38686 if ((null == writer))
38687 {
38688 throw new ArgumentNullException("writer");
38689 }
38690 writer.WriteStartElement("ComponentRef", "http://wixtoolset.org/schemas/v4/wxs");
38691 if (this.idFieldSet)
38692 {
38693 writer.WriteAttributeString("Id", this.idField);
38694 }
38695 if (this.primaryFieldSet)
38696 {
38697 if ((this.primaryField == YesNoType.no))
38698 {
38699 writer.WriteAttributeString("Primary", "no");
38700 }
38701 if ((this.primaryField == YesNoType.yes))
38702 {
38703 writer.WriteAttributeString("Primary", "yes");
38704 }
38705 }
38706 writer.WriteEndElement();
38707 }
38708
38709 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38710 void ISetAttributes.SetAttribute(string name, string value)
38711 {
38712 if (String.IsNullOrEmpty(name))
38713 {
38714 throw new ArgumentNullException("name");
38715 }
38716 if (("Id" == name))
38717 {
38718 this.idField = value;
38719 this.idFieldSet = true;
38720 }
38721 if (("Primary" == name))
38722 {
38723 this.primaryField = Enums.ParseYesNoType(value);
38724 this.primaryFieldSet = true;
38725 }
38726 }
38727 }
38728
38729 /// <summary>
38730 /// Merge directive to bring in a merge module that will be redirected to the parent directory.
38731 /// </summary>
38732 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38733 public class Merge : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
38734 {
38735
38736 private ElementCollection children;
38737
38738 private string idField;
38739
38740 private bool idFieldSet;
38741
38742 private string diskIdField;
38743
38744 private bool diskIdFieldSet;
38745
38746 private YesNoType fileCompressionField;
38747
38748 private bool fileCompressionFieldSet;
38749
38750 private string languageField;
38751
38752 private bool languageFieldSet;
38753
38754 private string sourceFileField;
38755
38756 private bool sourceFileFieldSet;
38757
38758 private string srcField;
38759
38760 private bool srcFieldSet;
38761
38762 private ISchemaElement parentElement;
38763
38764 public Merge()
38765 {
38766 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
38767 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ConfigurationData)));
38768 this.children = childCollection0;
38769 }
38770
38771 public virtual IEnumerable Children
38772 {
38773 get
38774 {
38775 return this.children;
38776 }
38777 }
38778
38779 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
38780 public virtual IEnumerable this[System.Type childType]
38781 {
38782 get
38783 {
38784 return this.children.Filter(childType);
38785 }
38786 }
38787
38788 /// <summary>
38789 /// The unique identifier for the Merge element in the source code. Referenced by the MergeRef/@Id.
38790 /// </summary>
38791 public string Id
38792 {
38793 get
38794 {
38795 return this.idField;
38796 }
38797 set
38798 {
38799 this.idFieldSet = true;
38800 this.idField = value;
38801 }
38802 }
38803
38804 /// <summary>
38805 /// The value of this attribute should correspond to the Id attribute of a
38806 /// Media element authored elsewhere. By creating this connection between the merge module and Media
38807 /// element, you set the packaging options to the values specified in the Media
38808 /// element (values such as compression level, cab embedding, etc...).
38809 /// </summary>
38810 public string DiskId
38811 {
38812 get
38813 {
38814 return this.diskIdField;
38815 }
38816 set
38817 {
38818 this.diskIdFieldSet = true;
38819 this.diskIdField = value;
38820 }
38821 }
38822
38823 /// <summary>
38824 /// Specifies if the files in the merge module should be compressed.
38825 /// </summary>
38826 public YesNoType FileCompression
38827 {
38828 get
38829 {
38830 return this.fileCompressionField;
38831 }
38832 set
38833 {
38834 this.fileCompressionFieldSet = true;
38835 this.fileCompressionField = value;
38836 }
38837 }
38838
38839 /// <summary>
38840 /// Specifies the decimal LCID or localization token for the language to merge the Module in as.
38841 /// </summary>
38842 public string Language
38843 {
38844 get
38845 {
38846 return this.languageField;
38847 }
38848 set
38849 {
38850 this.languageFieldSet = true;
38851 this.languageField = value;
38852 }
38853 }
38854
38855 /// <summary>
38856 /// Path to the source location of the merge module.
38857 /// </summary>
38858 public string SourceFile
38859 {
38860 get
38861 {
38862 return this.sourceFileField;
38863 }
38864 set
38865 {
38866 this.sourceFileFieldSet = true;
38867 this.sourceFileField = value;
38868 }
38869 }
38870
38871 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
38872 public string src
38873 {
38874 get
38875 {
38876 return this.srcField;
38877 }
38878 set
38879 {
38880 this.srcFieldSet = true;
38881 this.srcField = value;
38882 }
38883 }
38884
38885 public virtual ISchemaElement ParentElement
38886 {
38887 get
38888 {
38889 return this.parentElement;
38890 }
38891 set
38892 {
38893 this.parentElement = value;
38894 }
38895 }
38896
38897 public virtual void AddChild(ISchemaElement child)
38898 {
38899 if ((null == child))
38900 {
38901 throw new ArgumentNullException("child");
38902 }
38903 this.children.AddElement(child);
38904 child.ParentElement = this;
38905 }
38906
38907 public virtual void RemoveChild(ISchemaElement child)
38908 {
38909 if ((null == child))
38910 {
38911 throw new ArgumentNullException("child");
38912 }
38913 this.children.RemoveElement(child);
38914 child.ParentElement = null;
38915 }
38916
38917 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38918 ISchemaElement ICreateChildren.CreateChild(string childName)
38919 {
38920 if (String.IsNullOrEmpty(childName))
38921 {
38922 throw new ArgumentNullException("childName");
38923 }
38924 ISchemaElement childValue = null;
38925 if (("ConfigurationData" == childName))
38926 {
38927 childValue = new ConfigurationData();
38928 }
38929 if ((null == childValue))
38930 {
38931 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
38932 }
38933 return childValue;
38934 }
38935
38936 /// <summary>
38937 /// Processes this element and all child elements into an XmlWriter.
38938 /// </summary>
38939 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
38940 public virtual void OutputXml(XmlWriter writer)
38941 {
38942 if ((null == writer))
38943 {
38944 throw new ArgumentNullException("writer");
38945 }
38946 writer.WriteStartElement("Merge", "http://wixtoolset.org/schemas/v4/wxs");
38947 if (this.idFieldSet)
38948 {
38949 writer.WriteAttributeString("Id", this.idField);
38950 }
38951 if (this.diskIdFieldSet)
38952 {
38953 writer.WriteAttributeString("DiskId", this.diskIdField);
38954 }
38955 if (this.fileCompressionFieldSet)
38956 {
38957 if ((this.fileCompressionField == YesNoType.no))
38958 {
38959 writer.WriteAttributeString("FileCompression", "no");
38960 }
38961 if ((this.fileCompressionField == YesNoType.yes))
38962 {
38963 writer.WriteAttributeString("FileCompression", "yes");
38964 }
38965 }
38966 if (this.languageFieldSet)
38967 {
38968 writer.WriteAttributeString("Language", this.languageField);
38969 }
38970 if (this.sourceFileFieldSet)
38971 {
38972 writer.WriteAttributeString("SourceFile", this.sourceFileField);
38973 }
38974 if (this.srcFieldSet)
38975 {
38976 writer.WriteAttributeString("src", this.srcField);
38977 }
38978 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
38979 {
38980 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
38981 childElement.OutputXml(writer);
38982 }
38983 writer.WriteEndElement();
38984 }
38985
38986 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38987 void ISetAttributes.SetAttribute(string name, string value)
38988 {
38989 if (String.IsNullOrEmpty(name))
38990 {
38991 throw new ArgumentNullException("name");
38992 }
38993 if (("Id" == name))
38994 {
38995 this.idField = value;
38996 this.idFieldSet = true;
38997 }
38998 if (("DiskId" == name))
38999 {
39000 this.diskIdField = value;
39001 this.diskIdFieldSet = true;
39002 }
39003 if (("FileCompression" == name))
39004 {
39005 this.fileCompressionField = Enums.ParseYesNoType(value);
39006 this.fileCompressionFieldSet = true;
39007 }
39008 if (("Language" == name))
39009 {
39010 this.languageField = value;
39011 this.languageFieldSet = true;
39012 }
39013 if (("SourceFile" == name))
39014 {
39015 this.sourceFileField = value;
39016 this.sourceFileFieldSet = true;
39017 }
39018 if (("src" == name))
39019 {
39020 this.srcField = value;
39021 this.srcFieldSet = true;
39022 }
39023 }
39024 }
39025
39026 /// <summary>
39027 /// Merge reference to connect a Merge Module to parent Feature
39028 /// </summary>
39029 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
39030 public class MergeRef : ISchemaElement, ISetAttributes
39031 {
39032
39033 private string idField;
39034
39035 private bool idFieldSet;
39036
39037 private YesNoType primaryField;
39038
39039 private bool primaryFieldSet;
39040
39041 private ISchemaElement parentElement;
39042
39043 /// <summary>
39044 /// The unique identifier for the Merge element to be referenced.
39045 /// </summary>
39046 public string Id
39047 {
39048 get
39049 {
39050 return this.idField;
39051 }
39052 set
39053 {
39054 this.idFieldSet = true;
39055 this.idField = value;
39056 }
39057 }
39058
39059 /// <summary>
39060 /// Specifies whether the feature containing this MergeRef is the primary feature for advertising the merge module's components.
39061 /// </summary>
39062 public YesNoType Primary
39063 {
39064 get
39065 {
39066 return this.primaryField;
39067 }
39068 set
39069 {
39070 this.primaryFieldSet = true;
39071 this.primaryField = value;
39072 }
39073 }
39074
39075 public virtual ISchemaElement ParentElement
39076 {
39077 get
39078 {
39079 return this.parentElement;
39080 }
39081 set
39082 {
39083 this.parentElement = value;
39084 }
39085 }
39086
39087 /// <summary>
39088 /// Processes this element and all child elements into an XmlWriter.
39089 /// </summary>
39090 public virtual void OutputXml(XmlWriter writer)
39091 {
39092 if ((null == writer))
39093 {
39094 throw new ArgumentNullException("writer");
39095 }
39096 writer.WriteStartElement("MergeRef", "http://wixtoolset.org/schemas/v4/wxs");
39097 if (this.idFieldSet)
39098 {
39099 writer.WriteAttributeString("Id", this.idField);
39100 }
39101 if (this.primaryFieldSet)
39102 {
39103 if ((this.primaryField == YesNoType.no))
39104 {
39105 writer.WriteAttributeString("Primary", "no");
39106 }
39107 if ((this.primaryField == YesNoType.yes))
39108 {
39109 writer.WriteAttributeString("Primary", "yes");
39110 }
39111 }
39112 writer.WriteEndElement();
39113 }
39114
39115 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39116 void ISetAttributes.SetAttribute(string name, string value)
39117 {
39118 if (String.IsNullOrEmpty(name))
39119 {
39120 throw new ArgumentNullException("name");
39121 }
39122 if (("Id" == name))
39123 {
39124 this.idField = value;
39125 this.idFieldSet = true;
39126 }
39127 if (("Primary" == name))
39128 {
39129 this.primaryField = Enums.ParseYesNoType(value);
39130 this.primaryFieldSet = true;
39131 }
39132 }
39133 }
39134
39135 /// <summary>
39136 /// Data to use as input to a configurable merge module.
39137 /// </summary>
39138 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
39139 public class ConfigurationData : ISchemaElement, ISetAttributes
39140 {
39141
39142 private string nameField;
39143
39144 private bool nameFieldSet;
39145
39146 private string valueField;
39147
39148 private bool valueFieldSet;
39149
39150 private ISchemaElement parentElement;
39151
39152 /// <summary>
39153 /// Name of the item in the ModuleConfiguration table.
39154 /// </summary>
39155 public string Name
39156 {
39157 get
39158 {
39159 return this.nameField;
39160 }
39161 set
39162 {
39163 this.nameFieldSet = true;
39164 this.nameField = value;
39165 }
39166 }
39167
39168 /// <summary>
39169 /// Value to be passed to configurable merge module.
39170 /// </summary>
39171 public string Value
39172 {
39173 get
39174 {
39175 return this.valueField;
39176 }
39177 set
39178 {
39179 this.valueFieldSet = true;
39180 this.valueField = value;
39181 }
39182 }
39183
39184 public virtual ISchemaElement ParentElement
39185 {
39186 get
39187 {
39188 return this.parentElement;
39189 }
39190 set
39191 {
39192 this.parentElement = value;
39193 }
39194 }
39195
39196 /// <summary>
39197 /// Processes this element and all child elements into an XmlWriter.
39198 /// </summary>
39199 public virtual void OutputXml(XmlWriter writer)
39200 {
39201 if ((null == writer))
39202 {
39203 throw new ArgumentNullException("writer");
39204 }
39205 writer.WriteStartElement("ConfigurationData", "http://wixtoolset.org/schemas/v4/wxs");
39206 if (this.nameFieldSet)
39207 {
39208 writer.WriteAttributeString("Name", this.nameField);
39209 }
39210 if (this.valueFieldSet)
39211 {
39212 writer.WriteAttributeString("Value", this.valueField);
39213 }
39214 writer.WriteEndElement();
39215 }
39216
39217 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39218 void ISetAttributes.SetAttribute(string name, string value)
39219 {
39220 if (String.IsNullOrEmpty(name))
39221 {
39222 throw new ArgumentNullException("name");
39223 }
39224 if (("Name" == name))
39225 {
39226 this.nameField = value;
39227 this.nameFieldSet = true;
39228 }
39229 if (("Value" == name))
39230 {
39231 this.valueField = value;
39232 this.valueFieldSet = true;
39233 }
39234 }
39235 }
39236
39237 /// <summary>
39238 /// Directory layout for the product. Also specifies the mappings between source and target directories.
39239 /// </summary>
39240 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
39241 public class Directory : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
39242 {
39243
39244 private ElementCollection children;
39245
39246 private string idField;
39247
39248 private bool idFieldSet;
39249
39250 private string componentGuidGenerationSeedField;
39251
39252 private bool componentGuidGenerationSeedFieldSet;
39253
39254 private string diskIdField;
39255
39256 private bool diskIdFieldSet;
39257
39258 private string fileSourceField;
39259
39260 private bool fileSourceFieldSet;
39261
39262 private string nameField;
39263
39264 private bool nameFieldSet;
39265
39266 private string shortNameField;
39267
39268 private bool shortNameFieldSet;
39269
39270 private string shortSourceNameField;
39271
39272 private bool shortSourceNameFieldSet;
39273
39274 private string sourceNameField;
39275
39276 private bool sourceNameFieldSet;
39277
39278 private string srcField;
39279
39280 private bool srcFieldSet;
39281
39282 private ISchemaElement parentElement;
39283
39284 public Directory()
39285 {
39286 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
39287 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
39288 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory)));
39289 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Merge)));
39290 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
39291 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
39292 this.children = childCollection0;
39293 }
39294
39295 public virtual IEnumerable Children
39296 {
39297 get
39298 {
39299 return this.children;
39300 }
39301 }
39302
39303 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
39304 public virtual IEnumerable this[System.Type childType]
39305 {
39306 get
39307 {
39308 return this.children.Filter(childType);
39309 }
39310 }
39311
39312 /// <summary>
39313 /// This value is the unique identifier of the directory entry.
39314 /// </summary>
39315 public string Id
39316 {
39317 get
39318 {
39319 return this.idField;
39320 }
39321 set
39322 {
39323 this.idFieldSet = true;
39324 this.idField = value;
39325 }
39326 }
39327
39328 /// <summary>
39329 /// The Component Guid Generation Seed is a guid that must be used when a Component with the generate guid directive ("*")
39330 /// is not rooted in a standard Windows Installer directory (for example, ProgramFilesFolder or CommonFilesFolder).
39331 /// It is recommended that this attribute be avoided and that developers install their Components under standard
39332 /// directories with unique names instead (for example, "ProgramFilesFolder\Company Name Product Name Version"). It is
39333 /// important to note that once a directory is assigned a Component Guid Generation Seed the value must not change until
39334 /// (and must be changed when) the path to that directory, including itself and all parent directories, changes.
39335 /// </summary>
39336 public string ComponentGuidGenerationSeed
39337 {
39338 get
39339 {
39340 return this.componentGuidGenerationSeedField;
39341 }
39342 set
39343 {
39344 this.componentGuidGenerationSeedFieldSet = true;
39345 this.componentGuidGenerationSeedField = value;
39346 }
39347 }
39348
39349 /// <summary>
39350 /// Sets the default disk identifier for the files contained in this directory.
39351 /// This attribute's value may be overridden by a child Component, Directory,
39352 /// Merge or File element. See the File or Merge elements' DiskId attribute for
39353 /// more information.
39354 /// </summary>
39355 public string DiskId
39356 {
39357 get
39358 {
39359 return this.diskIdField;
39360 }
39361 set
39362 {
39363 this.diskIdFieldSet = true;
39364 this.diskIdField = value;
39365 }
39366 }
39367
39368 /// <summary>
39369 /// Used to set the file system source for this directory's child elements. For more information, see
39370 /// </summary>
39371 public string FileSource
39372 {
39373 get
39374 {
39375 return this.fileSourceField;
39376 }
39377 set
39378 {
39379 this.fileSourceFieldSet = true;
39380 this.fileSourceField = value;
39381 }
39382 }
39383
39384 /// <summary>
39385 /// The name of the directory.
39386 ///
39387 /// Do not specify this attribute if this directory represents
39388 /// the same directory as the parent (see the Windows Installer SDK's
39389 /// </summary>
39390 public string Name
39391 {
39392 get
39393 {
39394 return this.nameField;
39395 }
39396 set
39397 {
39398 this.nameFieldSet = true;
39399 this.nameField = value;
39400 }
39401 }
39402
39403 /// <summary>
39404 /// The short name of the directory in 8.3 format.
39405 /// This attribute should only be set if there is a conflict between generated short directory names
39406 /// or the user wants to manually specify the short directory name.
39407 /// </summary>
39408 public string ShortName
39409 {
39410 get
39411 {
39412 return this.shortNameField;
39413 }
39414 set
39415 {
39416 this.shortNameFieldSet = true;
39417 this.shortNameField = value;
39418 }
39419 }
39420
39421 /// <summary>
39422 /// The short name of the directory on the source media in 8.3 format.
39423 /// This attribute should only be set if there is a conflict between generated short directory names
39424 /// or the user wants to manually specify the short source directory name.
39425 /// </summary>
39426 public string ShortSourceName
39427 {
39428 get
39429 {
39430 return this.shortSourceNameField;
39431 }
39432 set
39433 {
39434 this.shortSourceNameFieldSet = true;
39435 this.shortSourceNameField = value;
39436 }
39437 }
39438
39439 /// <summary>
39440 /// The name of the directory on the source media.
39441 /// If this attribute is not specified, Windows Installer will default to the Name attribute.
39442 ///
39443 /// In prior versions of the WiX toolset, this attribute specified the short source directory name.
39444 /// This attribute's value may now be either a short or long directory name.
39445 /// If a short directory name is specified, the ShortSourceName attribute may not be specified.
39446 /// If a long directory name is specified, the LongSource attribute may not be specified.
39447 /// Also, if this value is a long directory name, the ShortSourceName attribute may be omitted to
39448 /// allow WiX to attempt to generate a unique short directory name.
39449 /// However, if this name collides with another directory or you wish to manually specify
39450 /// the short directory name, then the ShortSourceName attribute may be specified.
39451 /// </summary>
39452 public string SourceName
39453 {
39454 get
39455 {
39456 return this.sourceNameField;
39457 }
39458 set
39459 {
39460 this.sourceNameFieldSet = true;
39461 this.sourceNameField = value;
39462 }
39463 }
39464
39465 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
39466 public string src
39467 {
39468 get
39469 {
39470 return this.srcField;
39471 }
39472 set
39473 {
39474 this.srcFieldSet = true;
39475 this.srcField = value;
39476 }
39477 }
39478
39479 public virtual ISchemaElement ParentElement
39480 {
39481 get
39482 {
39483 return this.parentElement;
39484 }
39485 set
39486 {
39487 this.parentElement = value;
39488 }
39489 }
39490
39491 public virtual void AddChild(ISchemaElement child)
39492 {
39493 if ((null == child))
39494 {
39495 throw new ArgumentNullException("child");
39496 }
39497 this.children.AddElement(child);
39498 child.ParentElement = this;
39499 }
39500
39501 public virtual void RemoveChild(ISchemaElement child)
39502 {
39503 if ((null == child))
39504 {
39505 throw new ArgumentNullException("child");
39506 }
39507 this.children.RemoveElement(child);
39508 child.ParentElement = null;
39509 }
39510
39511 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39512 ISchemaElement ICreateChildren.CreateChild(string childName)
39513 {
39514 if (String.IsNullOrEmpty(childName))
39515 {
39516 throw new ArgumentNullException("childName");
39517 }
39518 ISchemaElement childValue = null;
39519 if (("Component" == childName))
39520 {
39521 childValue = new Component();
39522 }
39523 if (("Directory" == childName))
39524 {
39525 childValue = new Directory();
39526 }
39527 if (("Merge" == childName))
39528 {
39529 childValue = new Merge();
39530 }
39531 if (("SymbolPath" == childName))
39532 {
39533 childValue = new SymbolPath();
39534 }
39535 if ((null == childValue))
39536 {
39537 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
39538 }
39539 return childValue;
39540 }
39541
39542 /// <summary>
39543 /// Processes this element and all child elements into an XmlWriter.
39544 /// </summary>
39545 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
39546 public virtual void OutputXml(XmlWriter writer)
39547 {
39548 if ((null == writer))
39549 {
39550 throw new ArgumentNullException("writer");
39551 }
39552 writer.WriteStartElement("Directory", "http://wixtoolset.org/schemas/v4/wxs");
39553 if (this.idFieldSet)
39554 {
39555 writer.WriteAttributeString("Id", this.idField);
39556 }
39557 if (this.componentGuidGenerationSeedFieldSet)
39558 {
39559 writer.WriteAttributeString("ComponentGuidGenerationSeed", this.componentGuidGenerationSeedField);
39560 }
39561 if (this.diskIdFieldSet)
39562 {
39563 writer.WriteAttributeString("DiskId", this.diskIdField);
39564 }
39565 if (this.fileSourceFieldSet)
39566 {
39567 writer.WriteAttributeString("FileSource", this.fileSourceField);
39568 }
39569 if (this.nameFieldSet)
39570 {
39571 writer.WriteAttributeString("Name", this.nameField);
39572 }
39573 if (this.shortNameFieldSet)
39574 {
39575 writer.WriteAttributeString("ShortName", this.shortNameField);
39576 }
39577 if (this.shortSourceNameFieldSet)
39578 {
39579 writer.WriteAttributeString("ShortSourceName", this.shortSourceNameField);
39580 }
39581 if (this.sourceNameFieldSet)
39582 {
39583 writer.WriteAttributeString("SourceName", this.sourceNameField);
39584 }
39585 if (this.srcFieldSet)
39586 {
39587 writer.WriteAttributeString("src", this.srcField);
39588 }
39589 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
39590 {
39591 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
39592 childElement.OutputXml(writer);
39593 }
39594 writer.WriteEndElement();
39595 }
39596
39597 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39598 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
39599 void ISetAttributes.SetAttribute(string name, string value)
39600 {
39601 if (String.IsNullOrEmpty(name))
39602 {
39603 throw new ArgumentNullException("name");
39604 }
39605 if (("Id" == name))
39606 {
39607 this.idField = value;
39608 this.idFieldSet = true;
39609 }
39610 if (("ComponentGuidGenerationSeed" == name))
39611 {
39612 this.componentGuidGenerationSeedField = value;
39613 this.componentGuidGenerationSeedFieldSet = true;
39614 }
39615 if (("DiskId" == name))
39616 {
39617 this.diskIdField = value;
39618 this.diskIdFieldSet = true;
39619 }
39620 if (("FileSource" == name))
39621 {
39622 this.fileSourceField = value;
39623 this.fileSourceFieldSet = true;
39624 }
39625 if (("Name" == name))
39626 {
39627 this.nameField = value;
39628 this.nameFieldSet = true;
39629 }
39630 if (("ShortName" == name))
39631 {
39632 this.shortNameField = value;
39633 this.shortNameFieldSet = true;
39634 }
39635 if (("ShortSourceName" == name))
39636 {
39637 this.shortSourceNameField = value;
39638 this.shortSourceNameFieldSet = true;
39639 }
39640 if (("SourceName" == name))
39641 {
39642 this.sourceNameField = value;
39643 this.sourceNameFieldSet = true;
39644 }
39645 if (("src" == name))
39646 {
39647 this.srcField = value;
39648 this.srcFieldSet = true;
39649 }
39650 }
39651 }
39652
39653 /// <summary>
39654 /// Create a reference to a Directory element in another Fragment.
39655 /// </summary>
39656 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
39657 public class DirectoryRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
39658 {
39659
39660 private ElementCollection children;
39661
39662 private string idField;
39663
39664 private bool idFieldSet;
39665
39666 private string diskIdField;
39667
39668 private bool diskIdFieldSet;
39669
39670 private string fileSourceField;
39671
39672 private bool fileSourceFieldSet;
39673
39674 private string srcField;
39675
39676 private bool srcFieldSet;
39677
39678 private ISchemaElement parentElement;
39679
39680 public DirectoryRef()
39681 {
39682 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
39683 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
39684 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory)));
39685 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Merge)));
39686 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
39687 this.children = childCollection0;
39688 }
39689
39690 public virtual IEnumerable Children
39691 {
39692 get
39693 {
39694 return this.children;
39695 }
39696 }
39697
39698 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
39699 public virtual IEnumerable this[System.Type childType]
39700 {
39701 get
39702 {
39703 return this.children.Filter(childType);
39704 }
39705 }
39706
39707 /// <summary>
39708 /// The identifier of the Directory element to reference.
39709 /// </summary>
39710 public string Id
39711 {
39712 get
39713 {
39714 return this.idField;
39715 }
39716 set
39717 {
39718 this.idFieldSet = true;
39719 this.idField = value;
39720 }
39721 }
39722
39723 /// <summary>
39724 /// Sets the default disk identifier for the files contained in this directory.
39725 /// This attribute's value may be overridden by a child Component, Directory,
39726 /// Merge or File element. See the File or Merge elements' DiskId attribute for
39727 /// more information.
39728 /// </summary>
39729 public string DiskId
39730 {
39731 get
39732 {
39733 return this.diskIdField;
39734 }
39735 set
39736 {
39737 this.diskIdFieldSet = true;
39738 this.diskIdField = value;
39739 }
39740 }
39741
39742 /// <summary>
39743 /// Used to set the file system source for this DirectoryRef's child elements. For more information, see
39744 /// </summary>
39745 public string FileSource
39746 {
39747 get
39748 {
39749 return this.fileSourceField;
39750 }
39751 set
39752 {
39753 this.fileSourceFieldSet = true;
39754 this.fileSourceField = value;
39755 }
39756 }
39757
39758 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
39759 public string src
39760 {
39761 get
39762 {
39763 return this.srcField;
39764 }
39765 set
39766 {
39767 this.srcFieldSet = true;
39768 this.srcField = value;
39769 }
39770 }
39771
39772 public virtual ISchemaElement ParentElement
39773 {
39774 get
39775 {
39776 return this.parentElement;
39777 }
39778 set
39779 {
39780 this.parentElement = value;
39781 }
39782 }
39783
39784 public virtual void AddChild(ISchemaElement child)
39785 {
39786 if ((null == child))
39787 {
39788 throw new ArgumentNullException("child");
39789 }
39790 this.children.AddElement(child);
39791 child.ParentElement = this;
39792 }
39793
39794 public virtual void RemoveChild(ISchemaElement child)
39795 {
39796 if ((null == child))
39797 {
39798 throw new ArgumentNullException("child");
39799 }
39800 this.children.RemoveElement(child);
39801 child.ParentElement = null;
39802 }
39803
39804 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39805 ISchemaElement ICreateChildren.CreateChild(string childName)
39806 {
39807 if (String.IsNullOrEmpty(childName))
39808 {
39809 throw new ArgumentNullException("childName");
39810 }
39811 ISchemaElement childValue = null;
39812 if (("Component" == childName))
39813 {
39814 childValue = new Component();
39815 }
39816 if (("Directory" == childName))
39817 {
39818 childValue = new Directory();
39819 }
39820 if (("Merge" == childName))
39821 {
39822 childValue = new Merge();
39823 }
39824 if ((null == childValue))
39825 {
39826 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
39827 }
39828 return childValue;
39829 }
39830
39831 /// <summary>
39832 /// Processes this element and all child elements into an XmlWriter.
39833 /// </summary>
39834 public virtual void OutputXml(XmlWriter writer)
39835 {
39836 if ((null == writer))
39837 {
39838 throw new ArgumentNullException("writer");
39839 }
39840 writer.WriteStartElement("DirectoryRef", "http://wixtoolset.org/schemas/v4/wxs");
39841 if (this.idFieldSet)
39842 {
39843 writer.WriteAttributeString("Id", this.idField);
39844 }
39845 if (this.diskIdFieldSet)
39846 {
39847 writer.WriteAttributeString("DiskId", this.diskIdField);
39848 }
39849 if (this.fileSourceFieldSet)
39850 {
39851 writer.WriteAttributeString("FileSource", this.fileSourceField);
39852 }
39853 if (this.srcFieldSet)
39854 {
39855 writer.WriteAttributeString("src", this.srcField);
39856 }
39857 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
39858 {
39859 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
39860 childElement.OutputXml(writer);
39861 }
39862 writer.WriteEndElement();
39863 }
39864
39865 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39866 void ISetAttributes.SetAttribute(string name, string value)
39867 {
39868 if (String.IsNullOrEmpty(name))
39869 {
39870 throw new ArgumentNullException("name");
39871 }
39872 if (("Id" == name))
39873 {
39874 this.idField = value;
39875 this.idFieldSet = true;
39876 }
39877 if (("DiskId" == name))
39878 {
39879 this.diskIdField = value;
39880 this.diskIdFieldSet = true;
39881 }
39882 if (("FileSource" == name))
39883 {
39884 this.fileSourceField = value;
39885 this.fileSourceFieldSet = true;
39886 }
39887 if (("src" == name))
39888 {
39889 this.srcField = value;
39890 this.srcFieldSet = true;
39891 }
39892 }
39893 }
39894
39895 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
39896 public class UpgradeVersion : ISchemaElement, ISetAttributes
39897 {
39898
39899 private string minimumField;
39900
39901 private bool minimumFieldSet;
39902
39903 private string maximumField;
39904
39905 private bool maximumFieldSet;
39906
39907 private string languageField;
39908
39909 private bool languageFieldSet;
39910
39911 private string removeFeaturesField;
39912
39913 private bool removeFeaturesFieldSet;
39914
39915 private string propertyField;
39916
39917 private bool propertyFieldSet;
39918
39919 private YesNoType migrateFeaturesField;
39920
39921 private bool migrateFeaturesFieldSet;
39922
39923 private YesNoType onlyDetectField;
39924
39925 private bool onlyDetectFieldSet;
39926
39927 private YesNoType ignoreRemoveFailureField;
39928
39929 private bool ignoreRemoveFailureFieldSet;
39930
39931 private YesNoType includeMinimumField;
39932
39933 private bool includeMinimumFieldSet;
39934
39935 private YesNoType includeMaximumField;
39936
39937 private bool includeMaximumFieldSet;
39938
39939 private YesNoType excludeLanguagesField;
39940
39941 private bool excludeLanguagesFieldSet;
39942
39943 private string contentField;
39944
39945 private bool contentFieldSet;
39946
39947 private ISchemaElement parentElement;
39948
39949 /// <summary>
39950 /// Specifies the lower bound on the range of product versions to be detected by FindRelatedProducts.
39951 /// </summary>
39952 public string Minimum
39953 {
39954 get
39955 {
39956 return this.minimumField;
39957 }
39958 set
39959 {
39960 this.minimumFieldSet = true;
39961 this.minimumField = value;
39962 }
39963 }
39964
39965 /// <summary>
39966 /// Specifies the upper boundary of the range of product versions detected by FindRelatedProducts.
39967 /// </summary>
39968 public string Maximum
39969 {
39970 get
39971 {
39972 return this.maximumField;
39973 }
39974 set
39975 {
39976 this.maximumFieldSet = true;
39977 this.maximumField = value;
39978 }
39979 }
39980
39981 /// <summary>
39982 /// Specifies the set of languages detected by FindRelatedProducts. Enter a list of numeric language identifiers (LANGID) separated by commas (,). Leave this value null to specify all languages. Set ExcludeLanguages to "yes" in order detect all languages, excluding the languages listed in this value.
39983 /// </summary>
39984 public string Language
39985 {
39986 get
39987 {
39988 return this.languageField;
39989 }
39990 set
39991 {
39992 this.languageFieldSet = true;
39993 this.languageField = value;
39994 }
39995 }
39996
39997 /// <summary>
39998 /// The installer sets the REMOVE property to features specified in this column. The features to be removed can be determined at run time. The Formatted string entered in this field must evaluate to a comma-delimited list of feature names. For example: [Feature1],[Feature2],[Feature3]. No features are removed if the field contains formatted text that evaluates to an empty string. The installer sets REMOVE=ALL only if the Remove field is empty.
39999 /// </summary>
40000 public string RemoveFeatures
40001 {
40002 get
40003 {
40004 return this.removeFeaturesField;
40005 }
40006 set
40007 {
40008 this.removeFeaturesFieldSet = true;
40009 this.removeFeaturesField = value;
40010 }
40011 }
40012
40013 /// <summary>
40014 /// When the FindRelatedProducts action detects a related product installed on the system, it appends the product code to the property specified in this field. Windows Installer documentation for the
40015 /// </summary>
40016 public string Property
40017 {
40018 get
40019 {
40020 return this.propertyField;
40021 }
40022 set
40023 {
40024 this.propertyFieldSet = true;
40025 this.propertyField = value;
40026 }
40027 }
40028
40029 /// <summary>
40030 /// Set to "yes" to migrate feature states from upgraded products by enabling the logic in the MigrateFeatureStates action.
40031 /// </summary>
40032 public YesNoType MigrateFeatures
40033 {
40034 get
40035 {
40036 return this.migrateFeaturesField;
40037 }
40038 set
40039 {
40040 this.migrateFeaturesFieldSet = true;
40041 this.migrateFeaturesField = value;
40042 }
40043 }
40044
40045 /// <summary>
40046 /// Set to "yes" to detect products and applications but do not uninstall.
40047 /// </summary>
40048 public YesNoType OnlyDetect
40049 {
40050 get
40051 {
40052 return this.onlyDetectField;
40053 }
40054 set
40055 {
40056 this.onlyDetectFieldSet = true;
40057 this.onlyDetectField = value;
40058 }
40059 }
40060
40061 /// <summary>
40062 /// Set to "yes" to continue installation upon failure to remove a product or application.
40063 /// </summary>
40064 public YesNoType IgnoreRemoveFailure
40065 {
40066 get
40067 {
40068 return this.ignoreRemoveFailureField;
40069 }
40070 set
40071 {
40072 this.ignoreRemoveFailureFieldSet = true;
40073 this.ignoreRemoveFailureField = value;
40074 }
40075 }
40076
40077 /// <summary>
40078 /// Set to "no" to make the range of versions detected exclude the value specified in Minimum. This attribute is "yes" by default.
40079 /// </summary>
40080 public YesNoType IncludeMinimum
40081 {
40082 get
40083 {
40084 return this.includeMinimumField;
40085 }
40086 set
40087 {
40088 this.includeMinimumFieldSet = true;
40089 this.includeMinimumField = value;
40090 }
40091 }
40092
40093 /// <summary>
40094 /// Set to "yes" to make the range of versions detected include the value specified in Maximum.
40095 /// </summary>
40096 public YesNoType IncludeMaximum
40097 {
40098 get
40099 {
40100 return this.includeMaximumField;
40101 }
40102 set
40103 {
40104 this.includeMaximumFieldSet = true;
40105 this.includeMaximumField = value;
40106 }
40107 }
40108
40109 /// <summary>
40110 /// Set to "yes" to detect all languages, excluding the languages listed in the Language attribute.
40111 /// </summary>
40112 public YesNoType ExcludeLanguages
40113 {
40114 get
40115 {
40116 return this.excludeLanguagesField;
40117 }
40118 set
40119 {
40120 this.excludeLanguagesFieldSet = true;
40121 this.excludeLanguagesField = value;
40122 }
40123 }
40124
40125 public string Content
40126 {
40127 get
40128 {
40129 return this.contentField;
40130 }
40131 set
40132 {
40133 this.contentFieldSet = true;
40134 this.contentField = value;
40135 }
40136 }
40137
40138 public virtual ISchemaElement ParentElement
40139 {
40140 get
40141 {
40142 return this.parentElement;
40143 }
40144 set
40145 {
40146 this.parentElement = value;
40147 }
40148 }
40149
40150 /// <summary>
40151 /// Processes this element and all child elements into an XmlWriter.
40152 /// </summary>
40153 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
40154 public virtual void OutputXml(XmlWriter writer)
40155 {
40156 if ((null == writer))
40157 {
40158 throw new ArgumentNullException("writer");
40159 }
40160 writer.WriteStartElement("UpgradeVersion", "http://wixtoolset.org/schemas/v4/wxs");
40161 if (this.minimumFieldSet)
40162 {
40163 writer.WriteAttributeString("Minimum", this.minimumField);
40164 }
40165 if (this.maximumFieldSet)
40166 {
40167 writer.WriteAttributeString("Maximum", this.maximumField);
40168 }
40169 if (this.languageFieldSet)
40170 {
40171 writer.WriteAttributeString("Language", this.languageField);
40172 }
40173 if (this.removeFeaturesFieldSet)
40174 {
40175 writer.WriteAttributeString("RemoveFeatures", this.removeFeaturesField);
40176 }
40177 if (this.propertyFieldSet)
40178 {
40179 writer.WriteAttributeString("Property", this.propertyField);
40180 }
40181 if (this.migrateFeaturesFieldSet)
40182 {
40183 if ((this.migrateFeaturesField == YesNoType.no))
40184 {
40185 writer.WriteAttributeString("MigrateFeatures", "no");
40186 }
40187 if ((this.migrateFeaturesField == YesNoType.yes))
40188 {
40189 writer.WriteAttributeString("MigrateFeatures", "yes");
40190 }
40191 }
40192 if (this.onlyDetectFieldSet)
40193 {
40194 if ((this.onlyDetectField == YesNoType.no))
40195 {
40196 writer.WriteAttributeString("OnlyDetect", "no");
40197 }
40198 if ((this.onlyDetectField == YesNoType.yes))
40199 {
40200 writer.WriteAttributeString("OnlyDetect", "yes");
40201 }
40202 }
40203 if (this.ignoreRemoveFailureFieldSet)
40204 {
40205 if ((this.ignoreRemoveFailureField == YesNoType.no))
40206 {
40207 writer.WriteAttributeString("IgnoreRemoveFailure", "no");
40208 }
40209 if ((this.ignoreRemoveFailureField == YesNoType.yes))
40210 {
40211 writer.WriteAttributeString("IgnoreRemoveFailure", "yes");
40212 }
40213 }
40214 if (this.includeMinimumFieldSet)
40215 {
40216 if ((this.includeMinimumField == YesNoType.no))
40217 {
40218 writer.WriteAttributeString("IncludeMinimum", "no");
40219 }
40220 if ((this.includeMinimumField == YesNoType.yes))
40221 {
40222 writer.WriteAttributeString("IncludeMinimum", "yes");
40223 }
40224 }
40225 if (this.includeMaximumFieldSet)
40226 {
40227 if ((this.includeMaximumField == YesNoType.no))
40228 {
40229 writer.WriteAttributeString("IncludeMaximum", "no");
40230 }
40231 if ((this.includeMaximumField == YesNoType.yes))
40232 {
40233 writer.WriteAttributeString("IncludeMaximum", "yes");
40234 }
40235 }
40236 if (this.excludeLanguagesFieldSet)
40237 {
40238 if ((this.excludeLanguagesField == YesNoType.no))
40239 {
40240 writer.WriteAttributeString("ExcludeLanguages", "no");
40241 }
40242 if ((this.excludeLanguagesField == YesNoType.yes))
40243 {
40244 writer.WriteAttributeString("ExcludeLanguages", "yes");
40245 }
40246 }
40247 if (this.contentFieldSet)
40248 {
40249 writer.WriteString(this.contentField);
40250 }
40251 writer.WriteEndElement();
40252 }
40253
40254 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
40255 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
40256 void ISetAttributes.SetAttribute(string name, string value)
40257 {
40258 if (String.IsNullOrEmpty(name))
40259 {
40260 throw new ArgumentNullException("name");
40261 }
40262 if (("Minimum" == name))
40263 {
40264 this.minimumField = value;
40265 this.minimumFieldSet = true;
40266 }
40267 if (("Maximum" == name))
40268 {
40269 this.maximumField = value;
40270 this.maximumFieldSet = true;
40271 }
40272 if (("Language" == name))
40273 {
40274 this.languageField = value;
40275 this.languageFieldSet = true;
40276 }
40277 if (("RemoveFeatures" == name))
40278 {
40279 this.removeFeaturesField = value;
40280 this.removeFeaturesFieldSet = true;
40281 }
40282 if (("Property" == name))
40283 {
40284 this.propertyField = value;
40285 this.propertyFieldSet = true;
40286 }
40287 if (("MigrateFeatures" == name))
40288 {
40289 this.migrateFeaturesField = Enums.ParseYesNoType(value);
40290 this.migrateFeaturesFieldSet = true;
40291 }
40292 if (("OnlyDetect" == name))
40293 {
40294 this.onlyDetectField = Enums.ParseYesNoType(value);
40295 this.onlyDetectFieldSet = true;
40296 }
40297 if (("IgnoreRemoveFailure" == name))
40298 {
40299 this.ignoreRemoveFailureField = Enums.ParseYesNoType(value);
40300 this.ignoreRemoveFailureFieldSet = true;
40301 }
40302 if (("IncludeMinimum" == name))
40303 {
40304 this.includeMinimumField = Enums.ParseYesNoType(value);
40305 this.includeMinimumFieldSet = true;
40306 }
40307 if (("IncludeMaximum" == name))
40308 {
40309 this.includeMaximumField = Enums.ParseYesNoType(value);
40310 this.includeMaximumFieldSet = true;
40311 }
40312 if (("ExcludeLanguages" == name))
40313 {
40314 this.excludeLanguagesField = Enums.ParseYesNoType(value);
40315 this.excludeLanguagesFieldSet = true;
40316 }
40317 if (("Content" == name))
40318 {
40319 this.contentField = value;
40320 this.contentFieldSet = true;
40321 }
40322 }
40323 }
40324
40325 /// <summary>
40326 /// Upgrade info for a particular UpgradeCode
40327 /// </summary>
40328 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
40329 public class Upgrade : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
40330 {
40331
40332 private ElementCollection children;
40333
40334 private string idField;
40335
40336 private bool idFieldSet;
40337
40338 private ISchemaElement parentElement;
40339
40340 public Upgrade()
40341 {
40342 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
40343 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UpgradeVersion)));
40344 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property)));
40345 this.children = childCollection0;
40346 }
40347
40348 public virtual IEnumerable Children
40349 {
40350 get
40351 {
40352 return this.children;
40353 }
40354 }
40355
40356 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
40357 public virtual IEnumerable this[System.Type childType]
40358 {
40359 get
40360 {
40361 return this.children.Filter(childType);
40362 }
40363 }
40364
40365 /// <summary>
40366 /// This value specifies the upgrade code for the products that are to be detected by the FindRelatedProducts action.
40367 /// </summary>
40368 public string Id
40369 {
40370 get
40371 {
40372 return this.idField;
40373 }
40374 set
40375 {
40376 this.idFieldSet = true;
40377 this.idField = value;
40378 }
40379 }
40380
40381 public virtual ISchemaElement ParentElement
40382 {
40383 get
40384 {
40385 return this.parentElement;
40386 }
40387 set
40388 {
40389 this.parentElement = value;
40390 }
40391 }
40392
40393 public virtual void AddChild(ISchemaElement child)
40394 {
40395 if ((null == child))
40396 {
40397 throw new ArgumentNullException("child");
40398 }
40399 this.children.AddElement(child);
40400 child.ParentElement = this;
40401 }
40402
40403 public virtual void RemoveChild(ISchemaElement child)
40404 {
40405 if ((null == child))
40406 {
40407 throw new ArgumentNullException("child");
40408 }
40409 this.children.RemoveElement(child);
40410 child.ParentElement = null;
40411 }
40412
40413 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
40414 ISchemaElement ICreateChildren.CreateChild(string childName)
40415 {
40416 if (String.IsNullOrEmpty(childName))
40417 {
40418 throw new ArgumentNullException("childName");
40419 }
40420 ISchemaElement childValue = null;
40421 if (("UpgradeVersion" == childName))
40422 {
40423 childValue = new UpgradeVersion();
40424 }
40425 if (("Property" == childName))
40426 {
40427 childValue = new Property();
40428 }
40429 if ((null == childValue))
40430 {
40431 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
40432 }
40433 return childValue;
40434 }
40435
40436 /// <summary>
40437 /// Processes this element and all child elements into an XmlWriter.
40438 /// </summary>
40439 public virtual void OutputXml(XmlWriter writer)
40440 {
40441 if ((null == writer))
40442 {
40443 throw new ArgumentNullException("writer");
40444 }
40445 writer.WriteStartElement("Upgrade", "http://wixtoolset.org/schemas/v4/wxs");
40446 if (this.idFieldSet)
40447 {
40448 writer.WriteAttributeString("Id", this.idField);
40449 }
40450 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
40451 {
40452 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
40453 childElement.OutputXml(writer);
40454 }
40455 writer.WriteEndElement();
40456 }
40457
40458 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
40459 void ISetAttributes.SetAttribute(string name, string value)
40460 {
40461 if (String.IsNullOrEmpty(name))
40462 {
40463 throw new ArgumentNullException("name");
40464 }
40465 if (("Id" == name))
40466 {
40467 this.idField = value;
40468 this.idFieldSet = true;
40469 }
40470 }
40471 }
40472
40473 /// <summary>
40474 /// A feature for the Feature table. Features are the smallest installable unit. See msi.chm for more
40475 /// detailed information on the myriad installation options for a feature.
40476 /// </summary>
40477 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
40478 public class Feature : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
40479 {
40480
40481 private ElementCollection children;
40482
40483 private string idField;
40484
40485 private bool idFieldSet;
40486
40487 private AbsentType absentField;
40488
40489 private bool absentFieldSet;
40490
40491 private AllowAdvertiseType allowAdvertiseField;
40492
40493 private bool allowAdvertiseFieldSet;
40494
40495 private string configurableDirectoryField;
40496
40497 private bool configurableDirectoryFieldSet;
40498
40499 private string descriptionField;
40500
40501 private bool descriptionFieldSet;
40502
40503 private string displayField;
40504
40505 private bool displayFieldSet;
40506
40507 private InstallDefaultType installDefaultField;
40508
40509 private bool installDefaultFieldSet;
40510
40511 private int levelField;
40512
40513 private bool levelFieldSet;
40514
40515 private string titleField;
40516
40517 private bool titleFieldSet;
40518
40519 private TypicalDefaultType typicalDefaultField;
40520
40521 private bool typicalDefaultFieldSet;
40522
40523 private ISchemaElement parentElement;
40524
40525 public Feature()
40526 {
40527 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
40528 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
40529 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef)));
40530 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
40531 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition)));
40532 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature)));
40533 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef)));
40534 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
40535 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef)));
40536 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
40537 this.children = childCollection0;
40538 }
40539
40540 public virtual IEnumerable Children
40541 {
40542 get
40543 {
40544 return this.children;
40545 }
40546 }
40547
40548 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
40549 public virtual IEnumerable this[System.Type childType]
40550 {
40551 get
40552 {
40553 return this.children.Filter(childType);
40554 }
40555 }
40556
40557 /// <summary>
40558 /// Unique identifier of the feature.
40559 /// </summary>
40560 public string Id
40561 {
40562 get
40563 {
40564 return this.idField;
40565 }
40566 set
40567 {
40568 this.idFieldSet = true;
40569 this.idField = value;
40570 }
40571 }
40572
40573 /// <summary>
40574 /// This attribute determines if a user will have the option to set a feature to absent in the user interface.
40575 /// </summary>
40576 public AbsentType Absent
40577 {
40578 get
40579 {
40580 return this.absentField;
40581 }
40582 set
40583 {
40584 this.absentFieldSet = true;
40585 this.absentField = value;
40586 }
40587 }
40588
40589 /// <summary>
40590 /// This attribute determines the possible advertise states for this feature.
40591 /// </summary>
40592 public AllowAdvertiseType AllowAdvertise
40593 {
40594 get
40595 {
40596 return this.allowAdvertiseField;
40597 }
40598 set
40599 {
40600 this.allowAdvertiseFieldSet = true;
40601 this.allowAdvertiseField = value;
40602 }
40603 }
40604
40605 /// <summary>
40606 /// Specify the Id of a Directory that can be configured by the user at installation time. This identifier
40607 /// must be a public property and therefore completely uppercase.
40608 /// </summary>
40609 public string ConfigurableDirectory
40610 {
40611 get
40612 {
40613 return this.configurableDirectoryField;
40614 }
40615 set
40616 {
40617 this.configurableDirectoryFieldSet = true;
40618 this.configurableDirectoryField = value;
40619 }
40620 }
40621
40622 /// <summary>
40623 /// Longer string of text describing the feature. This localizable string is displayed by the
40624 /// Text Control of the Selection Dialog.
40625 /// </summary>
40626 public string Description
40627 {
40628 get
40629 {
40630 return this.descriptionField;
40631 }
40632 set
40633 {
40634 this.descriptionFieldSet = true;
40635 this.descriptionField = value;
40636 }
40637 }
40638
40639 /// <summary>
40640 /// Determines the initial display of this feature in the feature tree.
40641 /// This attribute's value should be one of the following:
40642 /// </summary>
40643 public string Display
40644 {
40645 get
40646 {
40647 return this.displayField;
40648 }
40649 set
40650 {
40651 this.displayFieldSet = true;
40652 this.displayField = value;
40653 }
40654 }
40655
40656 /// <summary>
40657 /// This attribute determines the default install/run location of a feature. This attribute cannot be specified
40658 /// if the value of the FollowParent attribute is 'yes' since that would ask the installer to force this feature
40659 /// to follow the parent installation state and simultaneously favor a particular installation state just for this feature.
40660 /// </summary>
40661 public InstallDefaultType InstallDefault
40662 {
40663 get
40664 {
40665 return this.installDefaultField;
40666 }
40667 set
40668 {
40669 this.installDefaultFieldSet = true;
40670 this.installDefaultField = value;
40671 }
40672 }
40673
40674 /// <summary>
40675 /// Sets the install level of this feature. A value of 0 will disable the feature. Processing the
40676 /// Condition Table can modify the level value (this is set via the Condition child element). The
40677 /// default value is "1".
40678 /// </summary>
40679 public int Level
40680 {
40681 get
40682 {
40683 return this.levelField;
40684 }
40685 set
40686 {
40687 this.levelFieldSet = true;
40688 this.levelField = value;
40689 }
40690 }
40691
40692 /// <summary>
40693 /// Short string of text identifying the feature. This string is listed as an item by the
40694 /// SelectionTree control of the Selection Dialog.
40695 /// </summary>
40696 public string Title
40697 {
40698 get
40699 {
40700 return this.titleField;
40701 }
40702 set
40703 {
40704 this.titleFieldSet = true;
40705 this.titleField = value;
40706 }
40707 }
40708
40709 /// <summary>
40710 /// This attribute determines the default advertise state of the feature.
40711 /// </summary>
40712 public TypicalDefaultType TypicalDefault
40713 {
40714 get
40715 {
40716 return this.typicalDefaultField;
40717 }
40718 set
40719 {
40720 this.typicalDefaultFieldSet = true;
40721 this.typicalDefaultField = value;
40722 }
40723 }
40724
40725 public virtual ISchemaElement ParentElement
40726 {
40727 get
40728 {
40729 return this.parentElement;
40730 }
40731 set
40732 {
40733 this.parentElement = value;
40734 }
40735 }
40736
40737 public virtual void AddChild(ISchemaElement child)
40738 {
40739 if ((null == child))
40740 {
40741 throw new ArgumentNullException("child");
40742 }
40743 this.children.AddElement(child);
40744 child.ParentElement = this;
40745 }
40746
40747 public virtual void RemoveChild(ISchemaElement child)
40748 {
40749 if ((null == child))
40750 {
40751 throw new ArgumentNullException("child");
40752 }
40753 this.children.RemoveElement(child);
40754 child.ParentElement = null;
40755 }
40756
40757 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
40758 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
40759 ISchemaElement ICreateChildren.CreateChild(string childName)
40760 {
40761 if (String.IsNullOrEmpty(childName))
40762 {
40763 throw new ArgumentNullException("childName");
40764 }
40765 ISchemaElement childValue = null;
40766 if (("Component" == childName))
40767 {
40768 childValue = new Component();
40769 }
40770 if (("ComponentGroupRef" == childName))
40771 {
40772 childValue = new ComponentGroupRef();
40773 }
40774 if (("ComponentRef" == childName))
40775 {
40776 childValue = new ComponentRef();
40777 }
40778 if (("Condition" == childName))
40779 {
40780 childValue = new Condition();
40781 }
40782 if (("Feature" == childName))
40783 {
40784 childValue = new Feature();
40785 }
40786 if (("FeatureGroupRef" == childName))
40787 {
40788 childValue = new FeatureGroupRef();
40789 }
40790 if (("FeatureRef" == childName))
40791 {
40792 childValue = new FeatureRef();
40793 }
40794 if (("MergeRef" == childName))
40795 {
40796 childValue = new MergeRef();
40797 }
40798 if ((null == childValue))
40799 {
40800 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
40801 }
40802 return childValue;
40803 }
40804
40805 /// <summary>
40806 /// Parses a AbsentType from a string.
40807 /// </summary>
40808 public static AbsentType ParseAbsentType(string value)
40809 {
40810 AbsentType parsedValue;
40811 Feature.TryParseAbsentType(value, out parsedValue);
40812 return parsedValue;
40813 }
40814
40815 /// <summary>
40816 /// Tries to parse a AbsentType from a string.
40817 /// </summary>
40818 public static bool TryParseAbsentType(string value, out AbsentType parsedValue)
40819 {
40820 parsedValue = AbsentType.NotSet;
40821 if (string.IsNullOrEmpty(value))
40822 {
40823 return false;
40824 }
40825 if (("allow" == value))
40826 {
40827 parsedValue = AbsentType.allow;
40828 }
40829 else
40830 {
40831 if (("disallow" == value))
40832 {
40833 parsedValue = AbsentType.disallow;
40834 }
40835 else
40836 {
40837 parsedValue = AbsentType.IllegalValue;
40838 return false;
40839 }
40840 }
40841 return true;
40842 }
40843
40844 /// <summary>
40845 /// Parses a AllowAdvertiseType from a string.
40846 /// </summary>
40847 public static AllowAdvertiseType ParseAllowAdvertiseType(string value)
40848 {
40849 AllowAdvertiseType parsedValue;
40850 Feature.TryParseAllowAdvertiseType(value, out parsedValue);
40851 return parsedValue;
40852 }
40853
40854 /// <summary>
40855 /// Tries to parse a AllowAdvertiseType from a string.
40856 /// </summary>
40857 public static bool TryParseAllowAdvertiseType(string value, out AllowAdvertiseType parsedValue)
40858 {
40859 parsedValue = AllowAdvertiseType.NotSet;
40860 if (string.IsNullOrEmpty(value))
40861 {
40862 return false;
40863 }
40864 if (("no" == value))
40865 {
40866 parsedValue = AllowAdvertiseType.no;
40867 }
40868 else
40869 {
40870 if (("system" == value))
40871 {
40872 parsedValue = AllowAdvertiseType.system;
40873 }
40874 else
40875 {
40876 if (("yes" == value))
40877 {
40878 parsedValue = AllowAdvertiseType.yes;
40879 }
40880 else
40881 {
40882 parsedValue = AllowAdvertiseType.IllegalValue;
40883 return false;
40884 }
40885 }
40886 }
40887 return true;
40888 }
40889
40890 /// <summary>
40891 /// Parses a InstallDefaultType from a string.
40892 /// </summary>
40893 public static InstallDefaultType ParseInstallDefaultType(string value)
40894 {
40895 InstallDefaultType parsedValue;
40896 Feature.TryParseInstallDefaultType(value, out parsedValue);
40897 return parsedValue;
40898 }
40899
40900 /// <summary>
40901 /// Tries to parse a InstallDefaultType from a string.
40902 /// </summary>
40903 public static bool TryParseInstallDefaultType(string value, out InstallDefaultType parsedValue)
40904 {
40905 parsedValue = InstallDefaultType.NotSet;
40906 if (string.IsNullOrEmpty(value))
40907 {
40908 return false;
40909 }
40910 if (("followParent" == value))
40911 {
40912 parsedValue = InstallDefaultType.followParent;
40913 }
40914 else
40915 {
40916 if (("local" == value))
40917 {
40918 parsedValue = InstallDefaultType.local;
40919 }
40920 else
40921 {
40922 if (("source" == value))
40923 {
40924 parsedValue = InstallDefaultType.source;
40925 }
40926 else
40927 {
40928 parsedValue = InstallDefaultType.IllegalValue;
40929 return false;
40930 }
40931 }
40932 }
40933 return true;
40934 }
40935
40936 /// <summary>
40937 /// Parses a TypicalDefaultType from a string.
40938 /// </summary>
40939 public static TypicalDefaultType ParseTypicalDefaultType(string value)
40940 {
40941 TypicalDefaultType parsedValue;
40942 Feature.TryParseTypicalDefaultType(value, out parsedValue);
40943 return parsedValue;
40944 }
40945
40946 /// <summary>
40947 /// Tries to parse a TypicalDefaultType from a string.
40948 /// </summary>
40949 public static bool TryParseTypicalDefaultType(string value, out TypicalDefaultType parsedValue)
40950 {
40951 parsedValue = TypicalDefaultType.NotSet;
40952 if (string.IsNullOrEmpty(value))
40953 {
40954 return false;
40955 }
40956 if (("advertise" == value))
40957 {
40958 parsedValue = TypicalDefaultType.advertise;
40959 }
40960 else
40961 {
40962 if (("install" == value))
40963 {
40964 parsedValue = TypicalDefaultType.install;
40965 }
40966 else
40967 {
40968 parsedValue = TypicalDefaultType.IllegalValue;
40969 return false;
40970 }
40971 }
40972 return true;
40973 }
40974
40975 /// <summary>
40976 /// Processes this element and all child elements into an XmlWriter.
40977 /// </summary>
40978 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
40979 public virtual void OutputXml(XmlWriter writer)
40980 {
40981 if ((null == writer))
40982 {
40983 throw new ArgumentNullException("writer");
40984 }
40985 writer.WriteStartElement("Feature", "http://wixtoolset.org/schemas/v4/wxs");
40986 if (this.idFieldSet)
40987 {
40988 writer.WriteAttributeString("Id", this.idField);
40989 }
40990 if (this.absentFieldSet)
40991 {
40992 if ((this.absentField == AbsentType.allow))
40993 {
40994 writer.WriteAttributeString("Absent", "allow");
40995 }
40996 if ((this.absentField == AbsentType.disallow))
40997 {
40998 writer.WriteAttributeString("Absent", "disallow");
40999 }
41000 }
41001 if (this.allowAdvertiseFieldSet)
41002 {
41003 if ((this.allowAdvertiseField == AllowAdvertiseType.no))
41004 {
41005 writer.WriteAttributeString("AllowAdvertise", "no");
41006 }
41007 if ((this.allowAdvertiseField == AllowAdvertiseType.system))
41008 {
41009 writer.WriteAttributeString("AllowAdvertise", "system");
41010 }
41011 if ((this.allowAdvertiseField == AllowAdvertiseType.yes))
41012 {
41013 writer.WriteAttributeString("AllowAdvertise", "yes");
41014 }
41015 }
41016 if (this.configurableDirectoryFieldSet)
41017 {
41018 writer.WriteAttributeString("ConfigurableDirectory", this.configurableDirectoryField);
41019 }
41020 if (this.descriptionFieldSet)
41021 {
41022 writer.WriteAttributeString("Description", this.descriptionField);
41023 }
41024 if (this.displayFieldSet)
41025 {
41026 writer.WriteAttributeString("Display", this.displayField);
41027 }
41028 if (this.installDefaultFieldSet)
41029 {
41030 if ((this.installDefaultField == InstallDefaultType.followParent))
41031 {
41032 writer.WriteAttributeString("InstallDefault", "followParent");
41033 }
41034 if ((this.installDefaultField == InstallDefaultType.local))
41035 {
41036 writer.WriteAttributeString("InstallDefault", "local");
41037 }
41038 if ((this.installDefaultField == InstallDefaultType.source))
41039 {
41040 writer.WriteAttributeString("InstallDefault", "source");
41041 }
41042 }
41043 if (this.levelFieldSet)
41044 {
41045 writer.WriteAttributeString("Level", this.levelField.ToString(CultureInfo.InvariantCulture));
41046 }
41047 if (this.titleFieldSet)
41048 {
41049 writer.WriteAttributeString("Title", this.titleField);
41050 }
41051 if (this.typicalDefaultFieldSet)
41052 {
41053 if ((this.typicalDefaultField == TypicalDefaultType.advertise))
41054 {
41055 writer.WriteAttributeString("TypicalDefault", "advertise");
41056 }
41057 if ((this.typicalDefaultField == TypicalDefaultType.install))
41058 {
41059 writer.WriteAttributeString("TypicalDefault", "install");
41060 }
41061 }
41062 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
41063 {
41064 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
41065 childElement.OutputXml(writer);
41066 }
41067 writer.WriteEndElement();
41068 }
41069
41070 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41071 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
41072 void ISetAttributes.SetAttribute(string name, string value)
41073 {
41074 if (String.IsNullOrEmpty(name))
41075 {
41076 throw new ArgumentNullException("name");
41077 }
41078 if (("Id" == name))
41079 {
41080 this.idField = value;
41081 this.idFieldSet = true;
41082 }
41083 if (("Absent" == name))
41084 {
41085 this.absentField = Feature.ParseAbsentType(value);
41086 this.absentFieldSet = true;
41087 }
41088 if (("AllowAdvertise" == name))
41089 {
41090 this.allowAdvertiseField = Feature.ParseAllowAdvertiseType(value);
41091 this.allowAdvertiseFieldSet = true;
41092 }
41093 if (("ConfigurableDirectory" == name))
41094 {
41095 this.configurableDirectoryField = value;
41096 this.configurableDirectoryFieldSet = true;
41097 }
41098 if (("Description" == name))
41099 {
41100 this.descriptionField = value;
41101 this.descriptionFieldSet = true;
41102 }
41103 if (("Display" == name))
41104 {
41105 this.displayField = value;
41106 this.displayFieldSet = true;
41107 }
41108 if (("InstallDefault" == name))
41109 {
41110 this.installDefaultField = Feature.ParseInstallDefaultType(value);
41111 this.installDefaultFieldSet = true;
41112 }
41113 if (("Level" == name))
41114 {
41115 this.levelField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
41116 this.levelFieldSet = true;
41117 }
41118 if (("Title" == name))
41119 {
41120 this.titleField = value;
41121 this.titleFieldSet = true;
41122 }
41123 if (("TypicalDefault" == name))
41124 {
41125 this.typicalDefaultField = Feature.ParseTypicalDefaultType(value);
41126 this.typicalDefaultFieldSet = true;
41127 }
41128 }
41129
41130 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41131 public enum AbsentType
41132 {
41133
41134 IllegalValue = int.MaxValue,
41135
41136 NotSet = -1,
41137
41138 /// <summary>
41139 /// Allows the user interface to display an option to change the feature state to Absent.
41140 /// </summary>
41141 allow,
41142
41143 /// <summary>
41144 /// Prevents the user interface from displaying an option to change the feature state
41145 /// to Absent by setting the msidbFeatureAttributesUIDisallowAbsent attribute. This will force the feature
41146 /// to the installation state, whether or not the feature is visible in the UI.
41147 /// </summary>
41148 disallow,
41149 }
41150
41151 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41152 public enum AllowAdvertiseType
41153 {
41154
41155 IllegalValue = int.MaxValue,
41156
41157 NotSet = -1,
41158
41159 /// <summary>
41160 /// Prevents this feature from being advertised by setting the msidbFeatureAttributesDisallowAdvertise attribute.
41161 /// </summary>
41162 no,
41163
41164 /// <summary>
41165 /// Prevents advertising for this feature if the operating system shell does not support Windows Installer
41166 /// descriptors by setting the msidbFeatureAttributesNoUnsupportedAdvertise attribute.
41167 /// </summary>
41168 system,
41169
41170 /// <summary>
41171 /// Allows the feature to be advertised.
41172 /// </summary>
41173 yes,
41174 }
41175
41176 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41177 public enum InstallDefaultType
41178 {
41179
41180 IllegalValue = int.MaxValue,
41181
41182 NotSet = -1,
41183
41184 /// <summary>
41185 /// Forces the feature to follow the same installation state as its parent feature.
41186 /// </summary>
41187 followParent,
41188
41189 /// <summary>
41190 /// Favors installing this feature locally by setting the msidbFeatureAttributesFavorLocal attribute.
41191 /// </summary>
41192 local,
41193
41194 /// <summary>
41195 /// Favors running this feature from source by setting the msidbFeatureAttributesFavorSource attribute.
41196 /// </summary>
41197 source,
41198 }
41199
41200 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41201 public enum TypicalDefaultType
41202 {
41203
41204 IllegalValue = int.MaxValue,
41205
41206 NotSet = -1,
41207
41208 /// <summary>
41209 /// Sets the feature to be advertised by setting the msidbFeatureAttributesFavorAdvertise attribute.
41210 /// This value cannot be set if the value of the AllowAdvertise attribute is 'no' since that would ask the installer to
41211 /// disallow the advertised state for this feature while at the same time favoring it.
41212 /// </summary>
41213 advertise,
41214
41215 /// <summary>
41216 /// Sets the feature to the default non-advertised installation option.
41217 /// </summary>
41218 install,
41219 }
41220 }
41221
41222 /// <summary>
41223 /// Groups together multiple components, features, and merges to be used in other locations.
41224 /// </summary>
41225 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41226 public class FeatureGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
41227 {
41228
41229 private ElementCollection children;
41230
41231 private string idField;
41232
41233 private bool idFieldSet;
41234
41235 private ISchemaElement parentElement;
41236
41237 public FeatureGroup()
41238 {
41239 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
41240 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
41241 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef)));
41242 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
41243 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature)));
41244 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef)));
41245 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
41246 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef)));
41247 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
41248 this.children = childCollection0;
41249 }
41250
41251 public virtual IEnumerable Children
41252 {
41253 get
41254 {
41255 return this.children;
41256 }
41257 }
41258
41259 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
41260 public virtual IEnumerable this[System.Type childType]
41261 {
41262 get
41263 {
41264 return this.children.Filter(childType);
41265 }
41266 }
41267
41268 /// <summary>
41269 /// Identifier for the FeatureGroup.
41270 /// </summary>
41271 public string Id
41272 {
41273 get
41274 {
41275 return this.idField;
41276 }
41277 set
41278 {
41279 this.idFieldSet = true;
41280 this.idField = value;
41281 }
41282 }
41283
41284 public virtual ISchemaElement ParentElement
41285 {
41286 get
41287 {
41288 return this.parentElement;
41289 }
41290 set
41291 {
41292 this.parentElement = value;
41293 }
41294 }
41295
41296 public virtual void AddChild(ISchemaElement child)
41297 {
41298 if ((null == child))
41299 {
41300 throw new ArgumentNullException("child");
41301 }
41302 this.children.AddElement(child);
41303 child.ParentElement = this;
41304 }
41305
41306 public virtual void RemoveChild(ISchemaElement child)
41307 {
41308 if ((null == child))
41309 {
41310 throw new ArgumentNullException("child");
41311 }
41312 this.children.RemoveElement(child);
41313 child.ParentElement = null;
41314 }
41315
41316 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41317 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
41318 ISchemaElement ICreateChildren.CreateChild(string childName)
41319 {
41320 if (String.IsNullOrEmpty(childName))
41321 {
41322 throw new ArgumentNullException("childName");
41323 }
41324 ISchemaElement childValue = null;
41325 if (("Component" == childName))
41326 {
41327 childValue = new Component();
41328 }
41329 if (("ComponentGroupRef" == childName))
41330 {
41331 childValue = new ComponentGroupRef();
41332 }
41333 if (("ComponentRef" == childName))
41334 {
41335 childValue = new ComponentRef();
41336 }
41337 if (("Feature" == childName))
41338 {
41339 childValue = new Feature();
41340 }
41341 if (("FeatureGroupRef" == childName))
41342 {
41343 childValue = new FeatureGroupRef();
41344 }
41345 if (("FeatureRef" == childName))
41346 {
41347 childValue = new FeatureRef();
41348 }
41349 if (("MergeRef" == childName))
41350 {
41351 childValue = new MergeRef();
41352 }
41353 if ((null == childValue))
41354 {
41355 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
41356 }
41357 return childValue;
41358 }
41359
41360 /// <summary>
41361 /// Processes this element and all child elements into an XmlWriter.
41362 /// </summary>
41363 public virtual void OutputXml(XmlWriter writer)
41364 {
41365 if ((null == writer))
41366 {
41367 throw new ArgumentNullException("writer");
41368 }
41369 writer.WriteStartElement("FeatureGroup", "http://wixtoolset.org/schemas/v4/wxs");
41370 if (this.idFieldSet)
41371 {
41372 writer.WriteAttributeString("Id", this.idField);
41373 }
41374 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
41375 {
41376 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
41377 childElement.OutputXml(writer);
41378 }
41379 writer.WriteEndElement();
41380 }
41381
41382 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41383 void ISetAttributes.SetAttribute(string name, string value)
41384 {
41385 if (String.IsNullOrEmpty(name))
41386 {
41387 throw new ArgumentNullException("name");
41388 }
41389 if (("Id" == name))
41390 {
41391 this.idField = value;
41392 this.idFieldSet = true;
41393 }
41394 }
41395 }
41396
41397 /// <summary>
41398 /// Create a reference to a FeatureGroup in another Fragment.
41399 /// </summary>
41400 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41401 public class FeatureGroupRef : ISchemaElement, ISetAttributes
41402 {
41403
41404 private string idField;
41405
41406 private bool idFieldSet;
41407
41408 private YesNoType ignoreParentField;
41409
41410 private bool ignoreParentFieldSet;
41411
41412 private YesNoType primaryField;
41413
41414 private bool primaryFieldSet;
41415
41416 private ISchemaElement parentElement;
41417
41418 /// <summary>
41419 /// The identifier of the FeatureGroup to reference.
41420 /// </summary>
41421 public string Id
41422 {
41423 get
41424 {
41425 return this.idField;
41426 }
41427 set
41428 {
41429 this.idFieldSet = true;
41430 this.idField = value;
41431 }
41432 }
41433
41434 /// <summary>
41435 /// Normally feature group references that end up nested under a parent element create a
41436 /// connection to that parent. This behavior is undesirable when trying to simply reference
41437 /// to a FeatureGroup in a different Fragment. Specify 'yes' to have this feature group
41438 /// reference not create a connection to its parent. The default is 'no'.
41439 /// </summary>
41440 public YesNoType IgnoreParent
41441 {
41442 get
41443 {
41444 return this.ignoreParentField;
41445 }
41446 set
41447 {
41448 this.ignoreParentFieldSet = true;
41449 this.ignoreParentField = value;
41450 }
41451 }
41452
41453 /// <summary>
41454 /// Set this attribute to 'yes' in order to make the parent feature of this group
41455 /// the primary feature for any components and merges contained in the group.
41456 /// Features may belong to multiple features. By designating a feature as the
41457 /// primary feature of a component or merge, you ensure that whenever a component is
41458 /// selected for install-on-demand (IOD), the primary feature will be the one to install
41459 /// it. This attribute should only be set if a component actually nests under multiple
41460 /// features. If a component nests under only one feature, that feature is the primary
41461 /// feature for the component. You cannot set more than one feature as the primary
41462 /// feature of a given component.
41463 /// </summary>
41464 public YesNoType Primary
41465 {
41466 get
41467 {
41468 return this.primaryField;
41469 }
41470 set
41471 {
41472 this.primaryFieldSet = true;
41473 this.primaryField = value;
41474 }
41475 }
41476
41477 public virtual ISchemaElement ParentElement
41478 {
41479 get
41480 {
41481 return this.parentElement;
41482 }
41483 set
41484 {
41485 this.parentElement = value;
41486 }
41487 }
41488
41489 /// <summary>
41490 /// Processes this element and all child elements into an XmlWriter.
41491 /// </summary>
41492 public virtual void OutputXml(XmlWriter writer)
41493 {
41494 if ((null == writer))
41495 {
41496 throw new ArgumentNullException("writer");
41497 }
41498 writer.WriteStartElement("FeatureGroupRef", "http://wixtoolset.org/schemas/v4/wxs");
41499 if (this.idFieldSet)
41500 {
41501 writer.WriteAttributeString("Id", this.idField);
41502 }
41503 if (this.ignoreParentFieldSet)
41504 {
41505 if ((this.ignoreParentField == YesNoType.no))
41506 {
41507 writer.WriteAttributeString("IgnoreParent", "no");
41508 }
41509 if ((this.ignoreParentField == YesNoType.yes))
41510 {
41511 writer.WriteAttributeString("IgnoreParent", "yes");
41512 }
41513 }
41514 if (this.primaryFieldSet)
41515 {
41516 if ((this.primaryField == YesNoType.no))
41517 {
41518 writer.WriteAttributeString("Primary", "no");
41519 }
41520 if ((this.primaryField == YesNoType.yes))
41521 {
41522 writer.WriteAttributeString("Primary", "yes");
41523 }
41524 }
41525 writer.WriteEndElement();
41526 }
41527
41528 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41529 void ISetAttributes.SetAttribute(string name, string value)
41530 {
41531 if (String.IsNullOrEmpty(name))
41532 {
41533 throw new ArgumentNullException("name");
41534 }
41535 if (("Id" == name))
41536 {
41537 this.idField = value;
41538 this.idFieldSet = true;
41539 }
41540 if (("IgnoreParent" == name))
41541 {
41542 this.ignoreParentField = Enums.ParseYesNoType(value);
41543 this.ignoreParentFieldSet = true;
41544 }
41545 if (("Primary" == name))
41546 {
41547 this.primaryField = Enums.ParseYesNoType(value);
41548 this.primaryFieldSet = true;
41549 }
41550 }
41551 }
41552
41553 /// <summary>
41554 /// Create a reference to a Feature element in another Fragment.
41555 /// </summary>
41556 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41557 public class FeatureRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
41558 {
41559
41560 private ElementCollection children;
41561
41562 private string idField;
41563
41564 private bool idFieldSet;
41565
41566 private YesNoType ignoreParentField;
41567
41568 private bool ignoreParentFieldSet;
41569
41570 private ISchemaElement parentElement;
41571
41572 public FeatureRef()
41573 {
41574 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
41575 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
41576 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef)));
41577 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
41578 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature)));
41579 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
41580 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroup)));
41581 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef)));
41582 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef)));
41583 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
41584 this.children = childCollection0;
41585 }
41586
41587 public virtual IEnumerable Children
41588 {
41589 get
41590 {
41591 return this.children;
41592 }
41593 }
41594
41595 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
41596 public virtual IEnumerable this[System.Type childType]
41597 {
41598 get
41599 {
41600 return this.children.Filter(childType);
41601 }
41602 }
41603
41604 /// <summary>
41605 /// The identifier of the Feature element to reference.
41606 /// </summary>
41607 public string Id
41608 {
41609 get
41610 {
41611 return this.idField;
41612 }
41613 set
41614 {
41615 this.idFieldSet = true;
41616 this.idField = value;
41617 }
41618 }
41619
41620 /// <summary>
41621 /// Normally feature references that are nested under a parent element create a connection to that
41622 /// parent. This behavior is undesirable when trying to simply reference a Feature in a different
41623 /// Fragment. Specify 'yes' to have this feature reference not create a connection to its parent.
41624 /// The default is 'no'.
41625 /// </summary>
41626 public YesNoType IgnoreParent
41627 {
41628 get
41629 {
41630 return this.ignoreParentField;
41631 }
41632 set
41633 {
41634 this.ignoreParentFieldSet = true;
41635 this.ignoreParentField = value;
41636 }
41637 }
41638
41639 public virtual ISchemaElement ParentElement
41640 {
41641 get
41642 {
41643 return this.parentElement;
41644 }
41645 set
41646 {
41647 this.parentElement = value;
41648 }
41649 }
41650
41651 public virtual void AddChild(ISchemaElement child)
41652 {
41653 if ((null == child))
41654 {
41655 throw new ArgumentNullException("child");
41656 }
41657 this.children.AddElement(child);
41658 child.ParentElement = this;
41659 }
41660
41661 public virtual void RemoveChild(ISchemaElement child)
41662 {
41663 if ((null == child))
41664 {
41665 throw new ArgumentNullException("child");
41666 }
41667 this.children.RemoveElement(child);
41668 child.ParentElement = null;
41669 }
41670
41671 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41672 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
41673 ISchemaElement ICreateChildren.CreateChild(string childName)
41674 {
41675 if (String.IsNullOrEmpty(childName))
41676 {
41677 throw new ArgumentNullException("childName");
41678 }
41679 ISchemaElement childValue = null;
41680 if (("Component" == childName))
41681 {
41682 childValue = new Component();
41683 }
41684 if (("ComponentGroupRef" == childName))
41685 {
41686 childValue = new ComponentGroupRef();
41687 }
41688 if (("ComponentRef" == childName))
41689 {
41690 childValue = new ComponentRef();
41691 }
41692 if (("Feature" == childName))
41693 {
41694 childValue = new Feature();
41695 }
41696 if (("FeatureRef" == childName))
41697 {
41698 childValue = new FeatureRef();
41699 }
41700 if (("FeatureGroup" == childName))
41701 {
41702 childValue = new FeatureGroup();
41703 }
41704 if (("FeatureGroupRef" == childName))
41705 {
41706 childValue = new FeatureGroupRef();
41707 }
41708 if (("MergeRef" == childName))
41709 {
41710 childValue = new MergeRef();
41711 }
41712 if ((null == childValue))
41713 {
41714 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
41715 }
41716 return childValue;
41717 }
41718
41719 /// <summary>
41720 /// Processes this element and all child elements into an XmlWriter.
41721 /// </summary>
41722 public virtual void OutputXml(XmlWriter writer)
41723 {
41724 if ((null == writer))
41725 {
41726 throw new ArgumentNullException("writer");
41727 }
41728 writer.WriteStartElement("FeatureRef", "http://wixtoolset.org/schemas/v4/wxs");
41729 if (this.idFieldSet)
41730 {
41731 writer.WriteAttributeString("Id", this.idField);
41732 }
41733 if (this.ignoreParentFieldSet)
41734 {
41735 if ((this.ignoreParentField == YesNoType.no))
41736 {
41737 writer.WriteAttributeString("IgnoreParent", "no");
41738 }
41739 if ((this.ignoreParentField == YesNoType.yes))
41740 {
41741 writer.WriteAttributeString("IgnoreParent", "yes");
41742 }
41743 }
41744 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
41745 {
41746 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
41747 childElement.OutputXml(writer);
41748 }
41749 writer.WriteEndElement();
41750 }
41751
41752 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41753 void ISetAttributes.SetAttribute(string name, string value)
41754 {
41755 if (String.IsNullOrEmpty(name))
41756 {
41757 throw new ArgumentNullException("name");
41758 }
41759 if (("Id" == name))
41760 {
41761 this.idField = value;
41762 this.idFieldSet = true;
41763 }
41764 if (("IgnoreParent" == name))
41765 {
41766 this.ignoreParentField = Enums.ParseYesNoType(value);
41767 this.ignoreParentFieldSet = true;
41768 }
41769 }
41770 }
41771
41772 /// <summary>
41773 /// Media element describes a disk that makes up the source media for the installation.
41774 /// </summary>
41775 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41776 public class Media : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
41777 {
41778
41779 private ElementCollection children;
41780
41781 private string idField;
41782
41783 private bool idFieldSet;
41784
41785 private string cabinetField;
41786
41787 private bool cabinetFieldSet;
41788
41789 private CompressionLevelType compressionLevelField;
41790
41791 private bool compressionLevelFieldSet;
41792
41793 private string diskPromptField;
41794
41795 private bool diskPromptFieldSet;
41796
41797 private YesNoType embedCabField;
41798
41799 private bool embedCabFieldSet;
41800
41801 private string layoutField;
41802
41803 private bool layoutFieldSet;
41804
41805 private string srcField;
41806
41807 private bool srcFieldSet;
41808
41809 private string volumeLabelField;
41810
41811 private bool volumeLabelFieldSet;
41812
41813 private string sourceField;
41814
41815 private bool sourceFieldSet;
41816
41817 private ISchemaElement parentElement;
41818
41819 public Media()
41820 {
41821 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
41822 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
41823 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalSignature)));
41824 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchBaseline)));
41825 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
41826 childCollection0.AddCollection(childCollection1);
41827 this.children = childCollection0;
41828 }
41829
41830 public virtual IEnumerable Children
41831 {
41832 get
41833 {
41834 return this.children;
41835 }
41836 }
41837
41838 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
41839 public virtual IEnumerable this[System.Type childType]
41840 {
41841 get
41842 {
41843 return this.children.Filter(childType);
41844 }
41845 }
41846
41847 /// <summary>
41848 /// Disk identifier for Media table. This number must be equal to or greater than 1.
41849 /// </summary>
41850 public string Id
41851 {
41852 get
41853 {
41854 return this.idField;
41855 }
41856 set
41857 {
41858 this.idFieldSet = true;
41859 this.idField = value;
41860 }
41861 }
41862
41863 /// <summary>
41864 /// The name of the cabinet if some or all of the files stored on the media are in a cabinet file. If no cabinets are used, this attribute must not be set.
41865 /// </summary>
41866 public string Cabinet
41867 {
41868 get
41869 {
41870 return this.cabinetField;
41871 }
41872 set
41873 {
41874 this.cabinetFieldSet = true;
41875 this.cabinetField = value;
41876 }
41877 }
41878
41879 /// <summary>
41880 /// Indicates the compression level for the Media's cabinet. This attribute can
41881 /// only be used in conjunction with the Cabinet attribute. The default is 'mszip'.
41882 /// </summary>
41883 public CompressionLevelType CompressionLevel
41884 {
41885 get
41886 {
41887 return this.compressionLevelField;
41888 }
41889 set
41890 {
41891 this.compressionLevelFieldSet = true;
41892 this.compressionLevelField = value;
41893 }
41894 }
41895
41896 /// <summary>
41897 /// The disk name, which is usually the visible text printed on the disk. This localizable text is used to prompt the user when this disk needs to be inserted. This value will be used in the "[1]" of the DiskPrompt Property. Using this attribute will require you to define a DiskPrompt Property.
41898 /// </summary>
41899 public string DiskPrompt
41900 {
41901 get
41902 {
41903 return this.diskPromptField;
41904 }
41905 set
41906 {
41907 this.diskPromptFieldSet = true;
41908 this.diskPromptField = value;
41909 }
41910 }
41911
41912 /// <summary>
41913 /// Instructs the binder to embed the cabinet in the product if 'yes'. This attribute can only be specified in conjunction with the Cabinet attribute.
41914 /// </summary>
41915 public YesNoType EmbedCab
41916 {
41917 get
41918 {
41919 return this.embedCabField;
41920 }
41921 set
41922 {
41923 this.embedCabFieldSet = true;
41924 this.embedCabField = value;
41925 }
41926 }
41927
41928 /// <summary>
41929 /// This attribute specifies the root directory for the uncompressed files that
41930 /// are a part of this Media element. By default, the src will be the output
41931 /// directory for the final image. The default value ensures the binder generates
41932 /// an installable image. If a relative path is specified in the src attribute,
41933 /// the value will be appended to the image's output directory. If an absolute
41934 /// path is provided, that path will be used without modification. The latter two
41935 /// options are provided to ease the layout of an image onto multiple medias (CDs/DVDs).
41936 /// </summary>
41937 public string Layout
41938 {
41939 get
41940 {
41941 return this.layoutField;
41942 }
41943 set
41944 {
41945 this.layoutFieldSet = true;
41946 this.layoutField = value;
41947 }
41948 }
41949
41950 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
41951 public string src
41952 {
41953 get
41954 {
41955 return this.srcField;
41956 }
41957 set
41958 {
41959 this.srcFieldSet = true;
41960 this.srcField = value;
41961 }
41962 }
41963
41964 /// <summary>
41965 /// The label attributed to the volume. This is the volume label returned
41966 /// by the GetVolumeInformation function. If the SourceDir property refers
41967 /// to a removable (floppy or CD-ROM) volume, then this volume label is
41968 /// used to verify that the proper disk is in the drive before attempting
41969 /// to install files. The entry in this column must match the volume label
41970 /// of the physical media.
41971 /// </summary>
41972 public string VolumeLabel
41973 {
41974 get
41975 {
41976 return this.volumeLabelField;
41977 }
41978 set
41979 {
41980 this.volumeLabelFieldSet = true;
41981 this.volumeLabelField = value;
41982 }
41983 }
41984
41985 /// <summary>
41986 /// Optional property that identifies the source of the embedded cabinet.
41987 /// If a cabinet is specified for a patch, this property should be defined
41988 /// and unique to each patch so that the embedded cabinet containing patched
41989 /// and new files can be located in the patch package. If the cabinet is not
41990 /// embedded - this is not typical - the cabinet can be found in the directory
41991 /// referenced in this column. If empty, the external cabinet must be located
41992 /// in the SourceDir directory.
41993 /// </summary>
41994 public string Source
41995 {
41996 get
41997 {
41998 return this.sourceField;
41999 }
42000 set
42001 {
42002 this.sourceFieldSet = true;
42003 this.sourceField = value;
42004 }
42005 }
42006
42007 public virtual ISchemaElement ParentElement
42008 {
42009 get
42010 {
42011 return this.parentElement;
42012 }
42013 set
42014 {
42015 this.parentElement = value;
42016 }
42017 }
42018
42019 public virtual void AddChild(ISchemaElement child)
42020 {
42021 if ((null == child))
42022 {
42023 throw new ArgumentNullException("child");
42024 }
42025 this.children.AddElement(child);
42026 child.ParentElement = this;
42027 }
42028
42029 public virtual void RemoveChild(ISchemaElement child)
42030 {
42031 if ((null == child))
42032 {
42033 throw new ArgumentNullException("child");
42034 }
42035 this.children.RemoveElement(child);
42036 child.ParentElement = null;
42037 }
42038
42039 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
42040 ISchemaElement ICreateChildren.CreateChild(string childName)
42041 {
42042 if (String.IsNullOrEmpty(childName))
42043 {
42044 throw new ArgumentNullException("childName");
42045 }
42046 ISchemaElement childValue = null;
42047 if (("DigitalSignature" == childName))
42048 {
42049 childValue = new DigitalSignature();
42050 }
42051 if (("PatchBaseline" == childName))
42052 {
42053 childValue = new PatchBaseline();
42054 }
42055 if (("SymbolPath" == childName))
42056 {
42057 childValue = new SymbolPath();
42058 }
42059 if ((null == childValue))
42060 {
42061 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
42062 }
42063 return childValue;
42064 }
42065
42066 /// <summary>
42067 /// Processes this element and all child elements into an XmlWriter.
42068 /// </summary>
42069 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
42070 public virtual void OutputXml(XmlWriter writer)
42071 {
42072 if ((null == writer))
42073 {
42074 throw new ArgumentNullException("writer");
42075 }
42076 writer.WriteStartElement("Media", "http://wixtoolset.org/schemas/v4/wxs");
42077 if (this.idFieldSet)
42078 {
42079 writer.WriteAttributeString("Id", this.idField);
42080 }
42081 if (this.cabinetFieldSet)
42082 {
42083 writer.WriteAttributeString("Cabinet", this.cabinetField);
42084 }
42085 if (this.compressionLevelFieldSet)
42086 {
42087 if ((this.compressionLevelField == CompressionLevelType.high))
42088 {
42089 writer.WriteAttributeString("CompressionLevel", "high");
42090 }
42091 if ((this.compressionLevelField == CompressionLevelType.low))
42092 {
42093 writer.WriteAttributeString("CompressionLevel", "low");
42094 }
42095 if ((this.compressionLevelField == CompressionLevelType.medium))
42096 {
42097 writer.WriteAttributeString("CompressionLevel", "medium");
42098 }
42099 if ((this.compressionLevelField == CompressionLevelType.mszip))
42100 {
42101 writer.WriteAttributeString("CompressionLevel", "mszip");
42102 }
42103 if ((this.compressionLevelField == CompressionLevelType.none))
42104 {
42105 writer.WriteAttributeString("CompressionLevel", "none");
42106 }
42107 }
42108 if (this.diskPromptFieldSet)
42109 {
42110 writer.WriteAttributeString("DiskPrompt", this.diskPromptField);
42111 }
42112 if (this.embedCabFieldSet)
42113 {
42114 if ((this.embedCabField == YesNoType.no))
42115 {
42116 writer.WriteAttributeString("EmbedCab", "no");
42117 }
42118 if ((this.embedCabField == YesNoType.yes))
42119 {
42120 writer.WriteAttributeString("EmbedCab", "yes");
42121 }
42122 }
42123 if (this.layoutFieldSet)
42124 {
42125 writer.WriteAttributeString("Layout", this.layoutField);
42126 }
42127 if (this.srcFieldSet)
42128 {
42129 writer.WriteAttributeString("src", this.srcField);
42130 }
42131 if (this.volumeLabelFieldSet)
42132 {
42133 writer.WriteAttributeString("VolumeLabel", this.volumeLabelField);
42134 }
42135 if (this.sourceFieldSet)
42136 {
42137 writer.WriteAttributeString("Source", this.sourceField);
42138 }
42139 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
42140 {
42141 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
42142 childElement.OutputXml(writer);
42143 }
42144 writer.WriteEndElement();
42145 }
42146
42147 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
42148 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
42149 void ISetAttributes.SetAttribute(string name, string value)
42150 {
42151 if (String.IsNullOrEmpty(name))
42152 {
42153 throw new ArgumentNullException("name");
42154 }
42155 if (("Id" == name))
42156 {
42157 this.idField = value;
42158 this.idFieldSet = true;
42159 }
42160 if (("Cabinet" == name))
42161 {
42162 this.cabinetField = value;
42163 this.cabinetFieldSet = true;
42164 }
42165 if (("CompressionLevel" == name))
42166 {
42167 this.compressionLevelField = Enums.ParseCompressionLevelType(value);
42168 this.compressionLevelFieldSet = true;
42169 }
42170 if (("DiskPrompt" == name))
42171 {
42172 this.diskPromptField = value;
42173 this.diskPromptFieldSet = true;
42174 }
42175 if (("EmbedCab" == name))
42176 {
42177 this.embedCabField = Enums.ParseYesNoType(value);
42178 this.embedCabFieldSet = true;
42179 }
42180 if (("Layout" == name))
42181 {
42182 this.layoutField = value;
42183 this.layoutFieldSet = true;
42184 }
42185 if (("src" == name))
42186 {
42187 this.srcField = value;
42188 this.srcFieldSet = true;
42189 }
42190 if (("VolumeLabel" == name))
42191 {
42192 this.volumeLabelField = value;
42193 this.volumeLabelFieldSet = true;
42194 }
42195 if (("Source" == name))
42196 {
42197 this.sourceField = value;
42198 this.sourceFieldSet = true;
42199 }
42200 }
42201 }
42202
42203 /// <summary>
42204 /// MediaTeplate element describes information to automatically assign files to cabinets.
42205 /// A maximumum number of cabinets created is 999.
42206 /// </summary>
42207 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
42208 public class MediaTemplate : ISchemaElement, ISetAttributes
42209 {
42210
42211 private string cabinetTemplateField;
42212
42213 private bool cabinetTemplateFieldSet;
42214
42215 private CompressionLevelType compressionLevelField;
42216
42217 private bool compressionLevelFieldSet;
42218
42219 private string diskPromptField;
42220
42221 private bool diskPromptFieldSet;
42222
42223 private YesNoType embedCabField;
42224
42225 private bool embedCabFieldSet;
42226
42227 private string volumeLabelField;
42228
42229 private bool volumeLabelFieldSet;
42230
42231 private int maximumUncompressedMediaSizeField;
42232
42233 private bool maximumUncompressedMediaSizeFieldSet;
42234
42235 private int maximumCabinetSizeForLargeFileSplittingField;
42236
42237 private bool maximumCabinetSizeForLargeFileSplittingFieldSet;
42238
42239 private ISchemaElement parentElement;
42240
42241 /// <summary>
42242 /// Templated name of the cabinet if some or all of the files stored on the media are in
42243 /// a cabinet file. This name must begin with either a letter or an underscore, contain
42244 /// maximum of five characters and {0} in the cabinet name part and must end three character extension.
42245 /// The default is cab{0}.cab.
42246 /// </summary>
42247 public string CabinetTemplate
42248 {
42249 get
42250 {
42251 return this.cabinetTemplateField;
42252 }
42253 set
42254 {
42255 this.cabinetTemplateFieldSet = true;
42256 this.cabinetTemplateField = value;
42257 }
42258 }
42259
42260 /// <summary>
42261 /// Indicates the compression level for the Media's cabinet. This attribute can
42262 /// only be used in conjunction with the Cabinet attribute. The default is 'mszip'.
42263 /// </summary>
42264 public CompressionLevelType CompressionLevel
42265 {
42266 get
42267 {
42268 return this.compressionLevelField;
42269 }
42270 set
42271 {
42272 this.compressionLevelFieldSet = true;
42273 this.compressionLevelField = value;
42274 }
42275 }
42276
42277 /// <summary>
42278 /// The disk name, which is usually the visible text printed on the disk. This localizable text is used
42279 /// to prompt the user when this disk needs to be inserted. This value will be used in the "[1]" of the
42280 /// DiskPrompt Property. Using this attribute will require you to define a DiskPrompt Property.
42281 /// </summary>
42282 public string DiskPrompt
42283 {
42284 get
42285 {
42286 return this.diskPromptField;
42287 }
42288 set
42289 {
42290 this.diskPromptFieldSet = true;
42291 this.diskPromptField = value;
42292 }
42293 }
42294
42295 /// <summary>
42296 /// Instructs the binder to embed the cabinets in the product if 'yes'.
42297 /// </summary>
42298 public YesNoType EmbedCab
42299 {
42300 get
42301 {
42302 return this.embedCabField;
42303 }
42304 set
42305 {
42306 this.embedCabFieldSet = true;
42307 this.embedCabField = value;
42308 }
42309 }
42310
42311 /// <summary>
42312 /// The label attributed to the volume. This is the volume label returned
42313 /// by the GetVolumeInformation function. If the SourceDir property refers
42314 /// to a removable (floppy or CD-ROM) volume, then this volume label is
42315 /// used to verify that the proper disk is in the drive before attempting
42316 /// to install files. The entry in this column must match the volume label
42317 /// of the physical media.
42318 /// </summary>
42319 public string VolumeLabel
42320 {
42321 get
42322 {
42323 return this.volumeLabelField;
42324 }
42325 set
42326 {
42327 this.volumeLabelFieldSet = true;
42328 this.volumeLabelField = value;
42329 }
42330 }
42331
42332 /// <summary>
42333 /// Size of uncompressed files in each cabinet, in megabytes. WIX_MUMS environment variable
42334 /// can be used to override this value. Default value is 200 MB.
42335 /// </summary>
42336 public int MaximumUncompressedMediaSize
42337 {
42338 get
42339 {
42340 return this.maximumUncompressedMediaSizeField;
42341 }
42342 set
42343 {
42344 this.maximumUncompressedMediaSizeFieldSet = true;
42345 this.maximumUncompressedMediaSizeField = value;
42346 }
42347 }
42348
42349 /// <summary>
42350 /// Maximum size of cabinet files in megabytes for large files. This attribute is used for packaging
42351 /// files that are larger than MaximumUncompressedMediaSize into smaller cabinets. If cabinet size
42352 /// exceed this value, then setting this attribute will cause the file to be split into multiple
42353 /// cabinets of this maximum size. For simply controlling cabinet size without file splitting use
42354 /// MaximumUncompressedMediaSize attribute. Setting this attribute will disable smart cabbing feature
42355 /// for this Fragment / Package. Setting WIX_MCSLFS environment variable can be used to override this
42356 /// value. Minimum allowed value of this attribute is 20 MB. Maximum allowed value and the Default
42357 /// value of this attribute is 2048 MB (2 GB).
42358 /// </summary>
42359 public int MaximumCabinetSizeForLargeFileSplitting
42360 {
42361 get
42362 {
42363 return this.maximumCabinetSizeForLargeFileSplittingField;
42364 }
42365 set
42366 {
42367 this.maximumCabinetSizeForLargeFileSplittingFieldSet = true;
42368 this.maximumCabinetSizeForLargeFileSplittingField = value;
42369 }
42370 }
42371
42372 public virtual ISchemaElement ParentElement
42373 {
42374 get
42375 {
42376 return this.parentElement;
42377 }
42378 set
42379 {
42380 this.parentElement = value;
42381 }
42382 }
42383
42384 /// <summary>
42385 /// Parses a CompressionLevelType from a string.
42386 /// </summary>
42387 public static CompressionLevelType ParseCompressionLevelType(string value)
42388 {
42389 CompressionLevelType parsedValue;
42390 MediaTemplate.TryParseCompressionLevelType(value, out parsedValue);
42391 return parsedValue;
42392 }
42393
42394 /// <summary>
42395 /// Tries to parse a CompressionLevelType from a string.
42396 /// </summary>
42397 public static bool TryParseCompressionLevelType(string value, out CompressionLevelType parsedValue)
42398 {
42399 parsedValue = CompressionLevelType.NotSet;
42400 if (string.IsNullOrEmpty(value))
42401 {
42402 return false;
42403 }
42404 if (("high" == value))
42405 {
42406 parsedValue = CompressionLevelType.high;
42407 }
42408 else
42409 {
42410 if (("low" == value))
42411 {
42412 parsedValue = CompressionLevelType.low;
42413 }
42414 else
42415 {
42416 if (("medium" == value))
42417 {
42418 parsedValue = CompressionLevelType.medium;
42419 }
42420 else
42421 {
42422 if (("mszip" == value))
42423 {
42424 parsedValue = CompressionLevelType.mszip;
42425 }
42426 else
42427 {
42428 if (("none" == value))
42429 {
42430 parsedValue = CompressionLevelType.none;
42431 }
42432 else
42433 {
42434 parsedValue = CompressionLevelType.IllegalValue;
42435 return false;
42436 }
42437 }
42438 }
42439 }
42440 }
42441 return true;
42442 }
42443
42444 /// <summary>
42445 /// Processes this element and all child elements into an XmlWriter.
42446 /// </summary>
42447 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
42448 public virtual void OutputXml(XmlWriter writer)
42449 {
42450 if ((null == writer))
42451 {
42452 throw new ArgumentNullException("writer");
42453 }
42454 writer.WriteStartElement("MediaTemplate", "http://wixtoolset.org/schemas/v4/wxs");
42455 if (this.cabinetTemplateFieldSet)
42456 {
42457 writer.WriteAttributeString("CabinetTemplate", this.cabinetTemplateField);
42458 }
42459 if (this.compressionLevelFieldSet)
42460 {
42461 if ((this.compressionLevelField == CompressionLevelType.high))
42462 {
42463 writer.WriteAttributeString("CompressionLevel", "high");
42464 }
42465 if ((this.compressionLevelField == CompressionLevelType.low))
42466 {
42467 writer.WriteAttributeString("CompressionLevel", "low");
42468 }
42469 if ((this.compressionLevelField == CompressionLevelType.medium))
42470 {
42471 writer.WriteAttributeString("CompressionLevel", "medium");
42472 }
42473 if ((this.compressionLevelField == CompressionLevelType.mszip))
42474 {
42475 writer.WriteAttributeString("CompressionLevel", "mszip");
42476 }
42477 if ((this.compressionLevelField == CompressionLevelType.none))
42478 {
42479 writer.WriteAttributeString("CompressionLevel", "none");
42480 }
42481 }
42482 if (this.diskPromptFieldSet)
42483 {
42484 writer.WriteAttributeString("DiskPrompt", this.diskPromptField);
42485 }
42486 if (this.embedCabFieldSet)
42487 {
42488 if ((this.embedCabField == YesNoType.no))
42489 {
42490 writer.WriteAttributeString("EmbedCab", "no");
42491 }
42492 if ((this.embedCabField == YesNoType.yes))
42493 {
42494 writer.WriteAttributeString("EmbedCab", "yes");
42495 }
42496 }
42497 if (this.volumeLabelFieldSet)
42498 {
42499 writer.WriteAttributeString("VolumeLabel", this.volumeLabelField);
42500 }
42501 if (this.maximumUncompressedMediaSizeFieldSet)
42502 {
42503 writer.WriteAttributeString("MaximumUncompressedMediaSize", this.maximumUncompressedMediaSizeField.ToString(CultureInfo.InvariantCulture));
42504 }
42505 if (this.maximumCabinetSizeForLargeFileSplittingFieldSet)
42506 {
42507 writer.WriteAttributeString("MaximumCabinetSizeForLargeFileSplitting", this.maximumCabinetSizeForLargeFileSplittingField.ToString(CultureInfo.InvariantCulture));
42508 }
42509 writer.WriteEndElement();
42510 }
42511
42512 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
42513 void ISetAttributes.SetAttribute(string name, string value)
42514 {
42515 if (String.IsNullOrEmpty(name))
42516 {
42517 throw new ArgumentNullException("name");
42518 }
42519 if (("CabinetTemplate" == name))
42520 {
42521 this.cabinetTemplateField = value;
42522 this.cabinetTemplateFieldSet = true;
42523 }
42524 if (("CompressionLevel" == name))
42525 {
42526 this.compressionLevelField = MediaTemplate.ParseCompressionLevelType(value);
42527 this.compressionLevelFieldSet = true;
42528 }
42529 if (("DiskPrompt" == name))
42530 {
42531 this.diskPromptField = value;
42532 this.diskPromptFieldSet = true;
42533 }
42534 if (("EmbedCab" == name))
42535 {
42536 this.embedCabField = Enums.ParseYesNoType(value);
42537 this.embedCabFieldSet = true;
42538 }
42539 if (("VolumeLabel" == name))
42540 {
42541 this.volumeLabelField = value;
42542 this.volumeLabelFieldSet = true;
42543 }
42544 if (("MaximumUncompressedMediaSize" == name))
42545 {
42546 this.maximumUncompressedMediaSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
42547 this.maximumUncompressedMediaSizeFieldSet = true;
42548 }
42549 if (("MaximumCabinetSizeForLargeFileSplitting" == name))
42550 {
42551 this.maximumCabinetSizeForLargeFileSplittingField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
42552 this.maximumCabinetSizeForLargeFileSplittingFieldSet = true;
42553 }
42554 }
42555
42556 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
42557 public enum CompressionLevelType
42558 {
42559
42560 IllegalValue = int.MaxValue,
42561
42562 NotSet = -1,
42563
42564 high,
42565
42566 low,
42567
42568 medium,
42569
42570 mszip,
42571
42572 none,
42573 }
42574 }
42575
42576 /// <summary>
42577 /// This element has been deprecated.
42578 /// Use the Binary/@SuppressModularization, CustomAction/@SuppressModularization, or Property/@SuppressModularization attributes instead.
42579 /// </summary>
42580 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
42581 public class IgnoreModularization : ISchemaElement, ISetAttributes
42582 {
42583
42584 private string nameField;
42585
42586 private bool nameFieldSet;
42587
42588 private TypeType typeField;
42589
42590 private bool typeFieldSet;
42591
42592 private ISchemaElement parentElement;
42593
42594 /// <summary>
42595 /// The name of the item to ignore modularization for.
42596 /// </summary>
42597 public string Name
42598 {
42599 get
42600 {
42601 return this.nameField;
42602 }
42603 set
42604 {
42605 this.nameFieldSet = true;
42606 this.nameField = value;
42607 }
42608 }
42609
42610 /// <summary>
42611 /// The type of the item to ignore modularization for.
42612 /// </summary>
42613 public TypeType Type
42614 {
42615 get
42616 {
42617 return this.typeField;
42618 }
42619 set
42620 {
42621 this.typeFieldSet = true;
42622 this.typeField = value;
42623 }
42624 }
42625
42626 public virtual ISchemaElement ParentElement
42627 {
42628 get
42629 {
42630 return this.parentElement;
42631 }
42632 set
42633 {
42634 this.parentElement = value;
42635 }
42636 }
42637
42638 /// <summary>
42639 /// Parses a TypeType from a string.
42640 /// </summary>
42641 public static TypeType ParseTypeType(string value)
42642 {
42643 TypeType parsedValue;
42644 IgnoreModularization.TryParseTypeType(value, out parsedValue);
42645 return parsedValue;
42646 }
42647
42648 /// <summary>
42649 /// Tries to parse a TypeType from a string.
42650 /// </summary>
42651 public static bool TryParseTypeType(string value, out TypeType parsedValue)
42652 {
42653 parsedValue = TypeType.NotSet;
42654 if (string.IsNullOrEmpty(value))
42655 {
42656 return false;
42657 }
42658 if (("Action" == value))
42659 {
42660 parsedValue = TypeType.Action;
42661 }
42662 else
42663 {
42664 if (("Property" == value))
42665 {
42666 parsedValue = TypeType.Property;
42667 }
42668 else
42669 {
42670 if (("Directory" == value))
42671 {
42672 parsedValue = TypeType.Directory;
42673 }
42674 else
42675 {
42676 parsedValue = TypeType.IllegalValue;
42677 return false;
42678 }
42679 }
42680 }
42681 return true;
42682 }
42683
42684 /// <summary>
42685 /// Processes this element and all child elements into an XmlWriter.
42686 /// </summary>
42687 public virtual void OutputXml(XmlWriter writer)
42688 {
42689 if ((null == writer))
42690 {
42691 throw new ArgumentNullException("writer");
42692 }
42693 writer.WriteStartElement("IgnoreModularization", "http://wixtoolset.org/schemas/v4/wxs");
42694 if (this.nameFieldSet)
42695 {
42696 writer.WriteAttributeString("Name", this.nameField);
42697 }
42698 if (this.typeFieldSet)
42699 {
42700 if ((this.typeField == TypeType.Action))
42701 {
42702 writer.WriteAttributeString("Type", "Action");
42703 }
42704 if ((this.typeField == TypeType.Property))
42705 {
42706 writer.WriteAttributeString("Type", "Property");
42707 }
42708 if ((this.typeField == TypeType.Directory))
42709 {
42710 writer.WriteAttributeString("Type", "Directory");
42711 }
42712 }
42713 writer.WriteEndElement();
42714 }
42715
42716 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
42717 void ISetAttributes.SetAttribute(string name, string value)
42718 {
42719 if (String.IsNullOrEmpty(name))
42720 {
42721 throw new ArgumentNullException("name");
42722 }
42723 if (("Name" == name))
42724 {
42725 this.nameField = value;
42726 this.nameFieldSet = true;
42727 }
42728 if (("Type" == name))
42729 {
42730 this.typeField = IgnoreModularization.ParseTypeType(value);
42731 this.typeFieldSet = true;
42732 }
42733 }
42734
42735 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
42736 public enum TypeType
42737 {
42738
42739 IllegalValue = int.MaxValue,
42740
42741 NotSet = -1,
42742
42743 Action,
42744
42745 Property,
42746
42747 Directory,
42748 }
42749 }
42750
42751 /// <summary>
42752 /// Specifies a custom action to be added to the MSI CustomAction table. Various combinations of the attributes for this element
42753 /// correspond to different custom action types. For more information about custom actions see the
42754 /// </summary>
42755 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
42756 public class CustomAction : ISchemaElement, ISetAttributes
42757 {
42758
42759 private string idField;
42760
42761 private bool idFieldSet;
42762
42763 private string binaryKeyField;
42764
42765 private bool binaryKeyFieldSet;
42766
42767 private string fileKeyField;
42768
42769 private bool fileKeyFieldSet;
42770
42771 private string propertyField;
42772
42773 private bool propertyFieldSet;
42774
42775 private string directoryField;
42776
42777 private bool directoryFieldSet;
42778
42779 private string dllEntryField;
42780
42781 private bool dllEntryFieldSet;
42782
42783 private string exeCommandField;
42784
42785 private bool exeCommandFieldSet;
42786
42787 private string jScriptCallField;
42788
42789 private bool jScriptCallFieldSet;
42790
42791 private string vBScriptCallField;
42792
42793 private bool vBScriptCallFieldSet;
42794
42795 private ScriptType scriptField;
42796
42797 private bool scriptFieldSet;
42798
42799 private YesNoType suppressModularizationField;
42800
42801 private bool suppressModularizationFieldSet;
42802
42803 private string valueField;
42804
42805 private bool valueFieldSet;
42806
42807 private string errorField;
42808
42809 private bool errorFieldSet;
42810
42811 private ReturnType returnField;
42812
42813 private bool returnFieldSet;
42814
42815 private ExecuteType executeField;
42816
42817 private bool executeFieldSet;
42818
42819 private YesNoType impersonateField;
42820
42821 private bool impersonateFieldSet;
42822
42823 private YesNoType patchUninstallField;
42824
42825 private bool patchUninstallFieldSet;
42826
42827 private YesNoType win64Field;
42828
42829 private bool win64FieldSet;
42830
42831 private YesNoType terminalServerAwareField;
42832
42833 private bool terminalServerAwareFieldSet;
42834
42835 private YesNoType hideTargetField;
42836
42837 private bool hideTargetFieldSet;
42838
42839 private string contentField;
42840
42841 private bool contentFieldSet;
42842
42843 private ISchemaElement parentElement;
42844
42845 /// <summary>
42846 /// The identifier of the custom action.
42847 /// </summary>
42848 public string Id
42849 {
42850 get
42851 {
42852 return this.idField;
42853 }
42854 set
42855 {
42856 this.idFieldSet = true;
42857 this.idField = value;
42858 }
42859 }
42860
42861 /// <summary>
42862 /// This attribute is a reference to a Binary element with matching Id attribute. That binary stream contains
42863 /// the custom action for use during install. The custom action will not be installed into a target directory. This attribute is
42864 /// typically used with the DllEntry attribute to specify the custom action DLL to use for a type 1 custom action, with the ExeCommand
42865 /// attribute to specify a type 17 custom action that runs an embedded executable, or with the VBScriptCall or JScriptCall attributes
42866 /// to specify a type 5 or 6 custom action.
42867 /// </summary>
42868 public string BinaryKey
42869 {
42870 get
42871 {
42872 return this.binaryKeyField;
42873 }
42874 set
42875 {
42876 this.binaryKeyFieldSet = true;
42877 this.binaryKeyField = value;
42878 }
42879 }
42880
42881 /// <summary>
42882 /// This attribute specifies a reference to a File element with matching Id attribute that
42883 /// will execute the custom action code in the file after the file is installed. This
42884 /// attribute is typically used with the ExeCommand attribute to specify a type 18 custom action
42885 /// that runs an installed executable, with the DllEntry attribute to specify an installed custom
42886 /// action DLL to use for a type 17 custom action, or with the VBScriptCall or JScriptCall
42887 /// attributes to specify a type 21 or 22 custom action.
42888 /// </summary>
42889 public string FileKey
42890 {
42891 get
42892 {
42893 return this.fileKeyField;
42894 }
42895 set
42896 {
42897 this.fileKeyFieldSet = true;
42898 this.fileKeyField = value;
42899 }
42900 }
42901
42902 /// <summary>
42903 /// This attribute specifies a reference to a Property element with matching Id attribute that specifies the Property
42904 /// to be used or updated on execution of this custom action. This attribute is
42905 /// typically used with the Value attribute to create a type 51 custom action that parses
42906 /// the text in Value and places it into the specified Property. This attribute is also used with
42907 /// the ExeCommand attribute to create a type 50 custom action that uses the value of the
42908 /// given property to specify the path to the executable. Type 51 custom actions are often useful to
42909 /// pass values to a deferred custom action.
42910 /// See
42911 /// </summary>
42912 public string Property
42913 {
42914 get
42915 {
42916 return this.propertyField;
42917 }
42918 set
42919 {
42920 this.propertyFieldSet = true;
42921 this.propertyField = value;
42922 }
42923 }
42924
42925 /// <summary>
42926 /// This attribute specifies a reference to a Directory element with matching Id attribute containing a directory path.
42927 /// This attribute is typically used with the ExeCommand attribute to specify the source executable for a type 34
42928 /// custom action, or with the Value attribute to specify a formatted string to place in the specified Directory
42929 /// table entry in a type 35 custom action.
42930 /// </summary>
42931 public string Directory
42932 {
42933 get
42934 {
42935 return this.directoryField;
42936 }
42937 set
42938 {
42939 this.directoryFieldSet = true;
42940 this.directoryField = value;
42941 }
42942 }
42943
42944 /// <summary>
42945 /// This attribute specifies the name of a function in a custom action to execute.
42946 /// This attribute is used with the BinaryKey attribute to create a type 1 custom
42947 /// action, or with the FileKey attribute to create a type 17 custom action.
42948 /// </summary>
42949 public string DllEntry
42950 {
42951 get
42952 {
42953 return this.dllEntryField;
42954 }
42955 set
42956 {
42957 this.dllEntryFieldSet = true;
42958 this.dllEntryField = value;
42959 }
42960 }
42961
42962 /// <summary>
42963 /// This attribute specifies the command line parameters to supply to an externally
42964 /// run executable. This attribute is typically used with the BinaryKey attribute for a type 2 custom action,
42965 /// the FileKey attribute for a type 18 custom action, the Property attribute for a type 50 custom action,
42966 /// or the Directory attribute for a type 34 custom action that specify the executable to run.
42967 /// </summary>
42968 public string ExeCommand
42969 {
42970 get
42971 {
42972 return this.exeCommandField;
42973 }
42974 set
42975 {
42976 this.exeCommandFieldSet = true;
42977 this.exeCommandField = value;
42978 }
42979 }
42980
42981 /// <summary>
42982 /// This attribute specifies the name of the JScript function to execute in a script. The script must be
42983 /// provided in a Binary element identified by the BinaryKey attribute described above. In other words, this
42984 /// attribute must be specified in conjunction with the BinaryKey attribute.
42985 /// </summary>
42986 public string JScriptCall
42987 {
42988 get
42989 {
42990 return this.jScriptCallField;
42991 }
42992 set
42993 {
42994 this.jScriptCallFieldSet = true;
42995 this.jScriptCallField = value;
42996 }
42997 }
42998
42999 /// <summary>
43000 /// This attribute specifies the name of the VBScript Subroutine to execute in a script. The script must be
43001 /// provided in a Binary element identified by the BinaryKey attribute described above. In other words, this
43002 /// attribute must be specified in conjunction with the BinaryKey attribute.
43003 /// </summary>
43004 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
43005 public string VBScriptCall
43006 {
43007 get
43008 {
43009 return this.vBScriptCallField;
43010 }
43011 set
43012 {
43013 this.vBScriptCallFieldSet = true;
43014 this.vBScriptCallField = value;
43015 }
43016 }
43017
43018 /// <summary>
43019 /// Creates a type 37 or 38 custom action. The text of the element should contain the script to be embedded in the package.
43020 /// </summary>
43021 public ScriptType Script
43022 {
43023 get
43024 {
43025 return this.scriptField;
43026 }
43027 set
43028 {
43029 this.scriptFieldSet = true;
43030 this.scriptField = value;
43031 }
43032 }
43033
43034 /// <summary>
43035 /// Use to suppress modularization of this custom action name in merge modules.
43036 /// This should only be necessary for table-driven custom actions because the
43037 /// table name which they interact with cannot be modularized, so there can only
43038 /// be one instance of the table.
43039 /// </summary>
43040 public YesNoType SuppressModularization
43041 {
43042 get
43043 {
43044 return this.suppressModularizationField;
43045 }
43046 set
43047 {
43048 this.suppressModularizationFieldSet = true;
43049 this.suppressModularizationField = value;
43050 }
43051 }
43052
43053 /// <summary>
43054 /// This attribute specifies a string value to use in the custom action. This attribute
43055 /// must be used with the Property attribute to set the property as part of a
43056 /// type 51 custom action or with the Directory attribute to set a directory path in that
43057 /// table in a type 35 custom action. The value can be a literal value or derived from a
43058 /// Property element using the
43059 /// </summary>
43060 public string Value
43061 {
43062 get
43063 {
43064 return this.valueField;
43065 }
43066 set
43067 {
43068 this.valueFieldSet = true;
43069 this.valueField = value;
43070 }
43071 }
43072
43073 /// <summary>
43074 /// This attribute specifies an index in the MSI Error table to use as an error message for a
43075 /// type 19 custom action that displays the error message and aborts a product's installation.
43076 /// </summary>
43077 public string Error
43078 {
43079 get
43080 {
43081 return this.errorField;
43082 }
43083 set
43084 {
43085 this.errorFieldSet = true;
43086 this.errorField = value;
43087 }
43088 }
43089
43090 /// <summary>
43091 /// Set this attribute to set the return behavior of the custom action.
43092 /// </summary>
43093 public ReturnType Return
43094 {
43095 get
43096 {
43097 return this.returnField;
43098 }
43099 set
43100 {
43101 this.returnFieldSet = true;
43102 this.returnField = value;
43103 }
43104 }
43105
43106 /// <summary>
43107 /// This attribute indicates the scheduling of the custom action.
43108 /// </summary>
43109 public ExecuteType Execute
43110 {
43111 get
43112 {
43113 return this.executeField;
43114 }
43115 set
43116 {
43117 this.executeFieldSet = true;
43118 this.executeField = value;
43119 }
43120 }
43121
43122 /// <summary>
43123 /// This attribute specifies whether the Windows Installer, which executes as LocalSystem,
43124 /// should impersonate the user context of the installing user when executing this custom action.
43125 /// Typically the value should be 'yes', except when the custom action needs elevated privileges
43126 /// to apply changes to the machine.
43127 /// </summary>
43128 public YesNoType Impersonate
43129 {
43130 get
43131 {
43132 return this.impersonateField;
43133 }
43134 set
43135 {
43136 this.impersonateFieldSet = true;
43137 this.impersonateField = value;
43138 }
43139 }
43140
43141 /// <summary>
43142 /// This attribute specifies that the Windows Installer, execute the custom action only when
43143 /// a patch is being uninstalled. These custom actions should also be conditioned using the
43144 /// MSIPATCHREMOVE property to ensure proper down level (less than Windows Installer 4.5)
43145 /// behavior.
43146 /// </summary>
43147 public YesNoType PatchUninstall
43148 {
43149 get
43150 {
43151 return this.patchUninstallField;
43152 }
43153 set
43154 {
43155 this.patchUninstallFieldSet = true;
43156 this.patchUninstallField = value;
43157 }
43158 }
43159
43160 /// <summary>
43161 /// Specifies that a script custom action targets a 64-bit platform. Valid only when used with
43162 /// the Script, VBScriptCall, and JScriptCall attributes.
43163 /// The default value is based on the platform set by the -arch switch to candle.exe
43164 /// or the InstallerPlatform property in a .wixproj MSBuild project:
43165 /// For x86 and ARM, the default value is 'no'.
43166 /// For x64 and IA64, the default value is 'yes'.
43167 /// </summary>
43168 public YesNoType Win64
43169 {
43170 get
43171 {
43172 return this.win64Field;
43173 }
43174 set
43175 {
43176 this.win64FieldSet = true;
43177 this.win64Field = value;
43178 }
43179 }
43180
43181 /// <summary>
43182 /// This attribute specifies controls whether the custom action will impersonate the
43183 /// installing user during per-machine installs on Terminal Server machines.
43184 /// Deferred execution custom actions that do not specify this attribute, or explicitly set it 'no',
43185 /// will run with no user impersonation on Terminal Server machines during
43186 /// per-machine installations. This attribute is only applicable when installing on the
43187 /// Windows Server 2003 family.
43188 /// </summary>
43189 public YesNoType TerminalServerAware
43190 {
43191 get
43192 {
43193 return this.terminalServerAwareField;
43194 }
43195 set
43196 {
43197 this.terminalServerAwareFieldSet = true;
43198 this.terminalServerAwareField = value;
43199 }
43200 }
43201
43202 /// <summary>
43203 /// Ensures the installer does not log the CustomActionData for the deferred custom action.
43204 /// </summary>
43205 public YesNoType HideTarget
43206 {
43207 get
43208 {
43209 return this.hideTargetField;
43210 }
43211 set
43212 {
43213 this.hideTargetFieldSet = true;
43214 this.hideTargetField = value;
43215 }
43216 }
43217
43218 /// <summary>
43219 /// The text node is only valid if the Script attribute is specified. In that case, the text node contains the script to embed.
43220 /// </summary>
43221 public string Content
43222 {
43223 get
43224 {
43225 return this.contentField;
43226 }
43227 set
43228 {
43229 this.contentFieldSet = true;
43230 this.contentField = value;
43231 }
43232 }
43233
43234 public virtual ISchemaElement ParentElement
43235 {
43236 get
43237 {
43238 return this.parentElement;
43239 }
43240 set
43241 {
43242 this.parentElement = value;
43243 }
43244 }
43245
43246 /// <summary>
43247 /// Parses a ScriptType from a string.
43248 /// </summary>
43249 public static ScriptType ParseScriptType(string value)
43250 {
43251 ScriptType parsedValue;
43252 CustomAction.TryParseScriptType(value, out parsedValue);
43253 return parsedValue;
43254 }
43255
43256 /// <summary>
43257 /// Tries to parse a ScriptType from a string.
43258 /// </summary>
43259 public static bool TryParseScriptType(string value, out ScriptType parsedValue)
43260 {
43261 parsedValue = ScriptType.NotSet;
43262 if (string.IsNullOrEmpty(value))
43263 {
43264 return false;
43265 }
43266 if (("jscript" == value))
43267 {
43268 parsedValue = ScriptType.jscript;
43269 }
43270 else
43271 {
43272 if (("vbscript" == value))
43273 {
43274 parsedValue = ScriptType.vbscript;
43275 }
43276 else
43277 {
43278 parsedValue = ScriptType.IllegalValue;
43279 return false;
43280 }
43281 }
43282 return true;
43283 }
43284
43285 /// <summary>
43286 /// Parses a ReturnType from a string.
43287 /// </summary>
43288 public static ReturnType ParseReturnType(string value)
43289 {
43290 ReturnType parsedValue;
43291 CustomAction.TryParseReturnType(value, out parsedValue);
43292 return parsedValue;
43293 }
43294
43295 /// <summary>
43296 /// Tries to parse a ReturnType from a string.
43297 /// </summary>
43298 public static bool TryParseReturnType(string value, out ReturnType parsedValue)
43299 {
43300 parsedValue = ReturnType.NotSet;
43301 if (string.IsNullOrEmpty(value))
43302 {
43303 return false;
43304 }
43305 if (("asyncNoWait" == value))
43306 {
43307 parsedValue = ReturnType.asyncNoWait;
43308 }
43309 else
43310 {
43311 if (("asyncWait" == value))
43312 {
43313 parsedValue = ReturnType.asyncWait;
43314 }
43315 else
43316 {
43317 if (("check" == value))
43318 {
43319 parsedValue = ReturnType.check;
43320 }
43321 else
43322 {
43323 if (("ignore" == value))
43324 {
43325 parsedValue = ReturnType.ignore;
43326 }
43327 else
43328 {
43329 parsedValue = ReturnType.IllegalValue;
43330 return false;
43331 }
43332 }
43333 }
43334 }
43335 return true;
43336 }
43337
43338 /// <summary>
43339 /// Parses a ExecuteType from a string.
43340 /// </summary>
43341 public static ExecuteType ParseExecuteType(string value)
43342 {
43343 ExecuteType parsedValue;
43344 CustomAction.TryParseExecuteType(value, out parsedValue);
43345 return parsedValue;
43346 }
43347
43348 /// <summary>
43349 /// Tries to parse a ExecuteType from a string.
43350 /// </summary>
43351 public static bool TryParseExecuteType(string value, out ExecuteType parsedValue)
43352 {
43353 parsedValue = ExecuteType.NotSet;
43354 if (string.IsNullOrEmpty(value))
43355 {
43356 return false;
43357 }
43358 if (("commit" == value))
43359 {
43360 parsedValue = ExecuteType.commit;
43361 }
43362 else
43363 {
43364 if (("deferred" == value))
43365 {
43366 parsedValue = ExecuteType.deferred;
43367 }
43368 else
43369 {
43370 if (("firstSequence" == value))
43371 {
43372 parsedValue = ExecuteType.firstSequence;
43373 }
43374 else
43375 {
43376 if (("immediate" == value))
43377 {
43378 parsedValue = ExecuteType.immediate;
43379 }
43380 else
43381 {
43382 if (("oncePerProcess" == value))
43383 {
43384 parsedValue = ExecuteType.oncePerProcess;
43385 }
43386 else
43387 {
43388 if (("rollback" == value))
43389 {
43390 parsedValue = ExecuteType.rollback;
43391 }
43392 else
43393 {
43394 if (("secondSequence" == value))
43395 {
43396 parsedValue = ExecuteType.secondSequence;
43397 }
43398 else
43399 {
43400 parsedValue = ExecuteType.IllegalValue;
43401 return false;
43402 }
43403 }
43404 }
43405 }
43406 }
43407 }
43408 }
43409 return true;
43410 }
43411
43412 /// <summary>
43413 /// Processes this element and all child elements into an XmlWriter.
43414 /// </summary>
43415 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
43416 public virtual void OutputXml(XmlWriter writer)
43417 {
43418 if ((null == writer))
43419 {
43420 throw new ArgumentNullException("writer");
43421 }
43422 writer.WriteStartElement("CustomAction", "http://wixtoolset.org/schemas/v4/wxs");
43423 if (this.idFieldSet)
43424 {
43425 writer.WriteAttributeString("Id", this.idField);
43426 }
43427 if (this.binaryKeyFieldSet)
43428 {
43429 writer.WriteAttributeString("BinaryKey", this.binaryKeyField);
43430 }
43431 if (this.fileKeyFieldSet)
43432 {
43433 writer.WriteAttributeString("FileKey", this.fileKeyField);
43434 }
43435 if (this.propertyFieldSet)
43436 {
43437 writer.WriteAttributeString("Property", this.propertyField);
43438 }
43439 if (this.directoryFieldSet)
43440 {
43441 writer.WriteAttributeString("Directory", this.directoryField);
43442 }
43443 if (this.dllEntryFieldSet)
43444 {
43445 writer.WriteAttributeString("DllEntry", this.dllEntryField);
43446 }
43447 if (this.exeCommandFieldSet)
43448 {
43449 writer.WriteAttributeString("ExeCommand", this.exeCommandField);
43450 }
43451 if (this.jScriptCallFieldSet)
43452 {
43453 writer.WriteAttributeString("JScriptCall", this.jScriptCallField);
43454 }
43455 if (this.vBScriptCallFieldSet)
43456 {
43457 writer.WriteAttributeString("VBScriptCall", this.vBScriptCallField);
43458 }
43459 if (this.scriptFieldSet)
43460 {
43461 if ((this.scriptField == ScriptType.jscript))
43462 {
43463 writer.WriteAttributeString("Script", "jscript");
43464 }
43465 if ((this.scriptField == ScriptType.vbscript))
43466 {
43467 writer.WriteAttributeString("Script", "vbscript");
43468 }
43469 }
43470 if (this.suppressModularizationFieldSet)
43471 {
43472 if ((this.suppressModularizationField == YesNoType.no))
43473 {
43474 writer.WriteAttributeString("SuppressModularization", "no");
43475 }
43476 if ((this.suppressModularizationField == YesNoType.yes))
43477 {
43478 writer.WriteAttributeString("SuppressModularization", "yes");
43479 }
43480 }
43481 if (this.valueFieldSet)
43482 {
43483 writer.WriteAttributeString("Value", this.valueField);
43484 }
43485 if (this.errorFieldSet)
43486 {
43487 writer.WriteAttributeString("Error", this.errorField);
43488 }
43489 if (this.returnFieldSet)
43490 {
43491 if ((this.returnField == ReturnType.asyncNoWait))
43492 {
43493 writer.WriteAttributeString("Return", "asyncNoWait");
43494 }
43495 if ((this.returnField == ReturnType.asyncWait))
43496 {
43497 writer.WriteAttributeString("Return", "asyncWait");
43498 }
43499 if ((this.returnField == ReturnType.check))
43500 {
43501 writer.WriteAttributeString("Return", "check");
43502 }
43503 if ((this.returnField == ReturnType.ignore))
43504 {
43505 writer.WriteAttributeString("Return", "ignore");
43506 }
43507 }
43508 if (this.executeFieldSet)
43509 {
43510 if ((this.executeField == ExecuteType.commit))
43511 {
43512 writer.WriteAttributeString("Execute", "commit");
43513 }
43514 if ((this.executeField == ExecuteType.deferred))
43515 {
43516 writer.WriteAttributeString("Execute", "deferred");
43517 }
43518 if ((this.executeField == ExecuteType.firstSequence))
43519 {
43520 writer.WriteAttributeString("Execute", "firstSequence");
43521 }
43522 if ((this.executeField == ExecuteType.immediate))
43523 {
43524 writer.WriteAttributeString("Execute", "immediate");
43525 }
43526 if ((this.executeField == ExecuteType.oncePerProcess))
43527 {
43528 writer.WriteAttributeString("Execute", "oncePerProcess");
43529 }
43530 if ((this.executeField == ExecuteType.rollback))
43531 {
43532 writer.WriteAttributeString("Execute", "rollback");
43533 }
43534 if ((this.executeField == ExecuteType.secondSequence))
43535 {
43536 writer.WriteAttributeString("Execute", "secondSequence");
43537 }
43538 }
43539 if (this.impersonateFieldSet)
43540 {
43541 if ((this.impersonateField == YesNoType.no))
43542 {
43543 writer.WriteAttributeString("Impersonate", "no");
43544 }
43545 if ((this.impersonateField == YesNoType.yes))
43546 {
43547 writer.WriteAttributeString("Impersonate", "yes");
43548 }
43549 }
43550 if (this.patchUninstallFieldSet)
43551 {
43552 if ((this.patchUninstallField == YesNoType.no))
43553 {
43554 writer.WriteAttributeString("PatchUninstall", "no");
43555 }
43556 if ((this.patchUninstallField == YesNoType.yes))
43557 {
43558 writer.WriteAttributeString("PatchUninstall", "yes");
43559 }
43560 }
43561 if (this.win64FieldSet)
43562 {
43563 if ((this.win64Field == YesNoType.no))
43564 {
43565 writer.WriteAttributeString("Win64", "no");
43566 }
43567 if ((this.win64Field == YesNoType.yes))
43568 {
43569 writer.WriteAttributeString("Win64", "yes");
43570 }
43571 }
43572 if (this.terminalServerAwareFieldSet)
43573 {
43574 if ((this.terminalServerAwareField == YesNoType.no))
43575 {
43576 writer.WriteAttributeString("TerminalServerAware", "no");
43577 }
43578 if ((this.terminalServerAwareField == YesNoType.yes))
43579 {
43580 writer.WriteAttributeString("TerminalServerAware", "yes");
43581 }
43582 }
43583 if (this.hideTargetFieldSet)
43584 {
43585 if ((this.hideTargetField == YesNoType.no))
43586 {
43587 writer.WriteAttributeString("HideTarget", "no");
43588 }
43589 if ((this.hideTargetField == YesNoType.yes))
43590 {
43591 writer.WriteAttributeString("HideTarget", "yes");
43592 }
43593 }
43594 if (this.contentFieldSet)
43595 {
43596 writer.WriteString(this.contentField);
43597 }
43598 writer.WriteEndElement();
43599 }
43600
43601 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
43602 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
43603 void ISetAttributes.SetAttribute(string name, string value)
43604 {
43605 if (String.IsNullOrEmpty(name))
43606 {
43607 throw new ArgumentNullException("name");
43608 }
43609 if (("Id" == name))
43610 {
43611 this.idField = value;
43612 this.idFieldSet = true;
43613 }
43614 if (("BinaryKey" == name))
43615 {
43616 this.binaryKeyField = value;
43617 this.binaryKeyFieldSet = true;
43618 }
43619 if (("FileKey" == name))
43620 {
43621 this.fileKeyField = value;
43622 this.fileKeyFieldSet = true;
43623 }
43624 if (("Property" == name))
43625 {
43626 this.propertyField = value;
43627 this.propertyFieldSet = true;
43628 }
43629 if (("Directory" == name))
43630 {
43631 this.directoryField = value;
43632 this.directoryFieldSet = true;
43633 }
43634 if (("DllEntry" == name))
43635 {
43636 this.dllEntryField = value;
43637 this.dllEntryFieldSet = true;
43638 }
43639 if (("ExeCommand" == name))
43640 {
43641 this.exeCommandField = value;
43642 this.exeCommandFieldSet = true;
43643 }
43644 if (("JScriptCall" == name))
43645 {
43646 this.jScriptCallField = value;
43647 this.jScriptCallFieldSet = true;
43648 }
43649 if (("VBScriptCall" == name))
43650 {
43651 this.vBScriptCallField = value;
43652 this.vBScriptCallFieldSet = true;
43653 }
43654 if (("Script" == name))
43655 {
43656 this.scriptField = CustomAction.ParseScriptType(value);
43657 this.scriptFieldSet = true;
43658 }
43659 if (("SuppressModularization" == name))
43660 {
43661 this.suppressModularizationField = Enums.ParseYesNoType(value);
43662 this.suppressModularizationFieldSet = true;
43663 }
43664 if (("Value" == name))
43665 {
43666 this.valueField = value;
43667 this.valueFieldSet = true;
43668 }
43669 if (("Error" == name))
43670 {
43671 this.errorField = value;
43672 this.errorFieldSet = true;
43673 }
43674 if (("Return" == name))
43675 {
43676 this.returnField = CustomAction.ParseReturnType(value);
43677 this.returnFieldSet = true;
43678 }
43679 if (("Execute" == name))
43680 {
43681 this.executeField = CustomAction.ParseExecuteType(value);
43682 this.executeFieldSet = true;
43683 }
43684 if (("Impersonate" == name))
43685 {
43686 this.impersonateField = Enums.ParseYesNoType(value);
43687 this.impersonateFieldSet = true;
43688 }
43689 if (("PatchUninstall" == name))
43690 {
43691 this.patchUninstallField = Enums.ParseYesNoType(value);
43692 this.patchUninstallFieldSet = true;
43693 }
43694 if (("Win64" == name))
43695 {
43696 this.win64Field = Enums.ParseYesNoType(value);
43697 this.win64FieldSet = true;
43698 }
43699 if (("TerminalServerAware" == name))
43700 {
43701 this.terminalServerAwareField = Enums.ParseYesNoType(value);
43702 this.terminalServerAwareFieldSet = true;
43703 }
43704 if (("HideTarget" == name))
43705 {
43706 this.hideTargetField = Enums.ParseYesNoType(value);
43707 this.hideTargetFieldSet = true;
43708 }
43709 if (("Content" == name))
43710 {
43711 this.contentField = value;
43712 this.contentFieldSet = true;
43713 }
43714 }
43715
43716 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
43717 public enum ScriptType
43718 {
43719
43720 IllegalValue = int.MaxValue,
43721
43722 NotSet = -1,
43723
43724 jscript,
43725
43726 vbscript,
43727 }
43728
43729 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
43730 public enum ReturnType
43731 {
43732
43733 IllegalValue = int.MaxValue,
43734
43735 NotSet = -1,
43736
43737 /// <summary>
43738 /// Indicates that the custom action will run asyncronously and execution may continue after the installer terminates.
43739 /// </summary>
43740 asyncNoWait,
43741
43742 /// <summary>
43743 /// Indicates that the custom action will run asynchronously but the installer will wait for the return code at sequence end.
43744 /// </summary>
43745 asyncWait,
43746
43747 /// <summary>
43748 /// Indicates that the custom action will run synchronously and the return code will be checked for success. This is the default.
43749 /// </summary>
43750 check,
43751
43752 /// <summary>
43753 /// Indicates that the custom action will run synchronously and the return code will not be checked.
43754 /// </summary>
43755 ignore,
43756 }
43757
43758 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
43759 public enum ExecuteType
43760 {
43761
43762 IllegalValue = int.MaxValue,
43763
43764 NotSet = -1,
43765
43766 /// <summary>
43767 /// Indicates that the custom action will run after successful completion of the installation script (at the end of the installation).
43768 /// </summary>
43769 commit,
43770
43771 /// <summary>
43772 /// Indicates that the custom action runs in-script (possibly with elevated privileges).
43773 /// </summary>
43774 deferred,
43775
43776 /// <summary>
43777 /// Indicates that the custom action will only run in the first sequence that runs it.
43778 /// </summary>
43779 firstSequence,
43780
43781 /// <summary>
43782 /// Indicates that the custom action will run during normal processing time with user privileges. This is the default.
43783 /// </summary>
43784 immediate,
43785
43786 /// <summary>
43787 /// Indicates that the custom action will only run in the first sequence that runs it in the same process.
43788 /// </summary>
43789 oncePerProcess,
43790
43791 /// <summary>
43792 /// Indicates that a custom action will run in the rollback sequence when a failure
43793 /// occurs during installation, usually to undo changes made by a deferred custom action.
43794 /// </summary>
43795 rollback,
43796
43797 /// <summary>
43798 /// Indicates that a custom action should be run a second time if it was previously run in an earlier sequence.
43799 /// </summary>
43800 secondSequence,
43801 }
43802 }
43803
43804 /// <summary>
43805 /// This will cause the entire contents of the Fragment containing the referenced CustomAction to be
43806 /// included in the installer database.
43807 /// </summary>
43808 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
43809 public class CustomActionRef : ISchemaElement, ISetAttributes
43810 {
43811
43812 private string idField;
43813
43814 private bool idFieldSet;
43815
43816 private ISchemaElement parentElement;
43817
43818 /// <summary>
43819 /// The identifier of the CustomAction to reference.
43820 /// </summary>
43821 public string Id
43822 {
43823 get
43824 {
43825 return this.idField;
43826 }
43827 set
43828 {
43829 this.idFieldSet = true;
43830 this.idField = value;
43831 }
43832 }
43833
43834 public virtual ISchemaElement ParentElement
43835 {
43836 get
43837 {
43838 return this.parentElement;
43839 }
43840 set
43841 {
43842 this.parentElement = value;
43843 }
43844 }
43845
43846 /// <summary>
43847 /// Processes this element and all child elements into an XmlWriter.
43848 /// </summary>
43849 public virtual void OutputXml(XmlWriter writer)
43850 {
43851 if ((null == writer))
43852 {
43853 throw new ArgumentNullException("writer");
43854 }
43855 writer.WriteStartElement("CustomActionRef", "http://wixtoolset.org/schemas/v4/wxs");
43856 if (this.idFieldSet)
43857 {
43858 writer.WriteAttributeString("Id", this.idField);
43859 }
43860 writer.WriteEndElement();
43861 }
43862
43863 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
43864 void ISetAttributes.SetAttribute(string name, string value)
43865 {
43866 if (String.IsNullOrEmpty(name))
43867 {
43868 throw new ArgumentNullException("name");
43869 }
43870 if (("Id" == name))
43871 {
43872 this.idField = value;
43873 this.idFieldSet = true;
43874 }
43875 }
43876 }
43877
43878 /// <summary>
43879 /// Sets a Directory to a particular value. This is accomplished by creating a Type 51 custom action that is appropriately scheduled in
43880 /// the InstallUISequence and InstallExecuteSequence.
43881 /// </summary>
43882 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
43883 public class SetDirectory : ISchemaElement, ISetAttributes
43884 {
43885
43886 private string actionField;
43887
43888 private bool actionFieldSet;
43889
43890 private string idField;
43891
43892 private bool idFieldSet;
43893
43894 private SequenceType sequenceField;
43895
43896 private bool sequenceFieldSet;
43897
43898 private string valueField;
43899
43900 private bool valueFieldSet;
43901
43902 private string contentField;
43903
43904 private bool contentFieldSet;
43905
43906 private ISchemaElement parentElement;
43907
43908 /// <summary>
43909 /// By default the action is "Set" + Id attribute's value. This optional attribute can override the action name in the case
43910 /// where multiple SetDirectory elements target the same Id (probably with mutually exclusive conditions).
43911 /// </summary>
43912 public string Action
43913 {
43914 get
43915 {
43916 return this.actionField;
43917 }
43918 set
43919 {
43920 this.actionFieldSet = true;
43921 this.actionField = value;
43922 }
43923 }
43924
43925 /// <summary>
43926 /// This attribute specifies a reference to a Directory element with matching Id attribute. The path of the Directory will be set to
43927 /// the Value attribute.
43928 /// </summary>
43929 public string Id
43930 {
43931 get
43932 {
43933 return this.idField;
43934 }
43935 set
43936 {
43937 this.idFieldSet = true;
43938 this.idField = value;
43939 }
43940 }
43941
43942 /// <summary>
43943 /// Controls which sequences the Directory assignment is sequenced in.
43944 /// For 'execute', the assignment is scheduled in the InstallExecuteSequence.
43945 /// For 'ui', the assignment is scheduled in the InstallUISequence.
43946 /// For 'first', the assignment is scheduled in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped at install time.
43947 /// For 'both', the assignment is scheduled in both the InstallUISequence and the InstallExecuteSequence.
43948 /// The default is 'both'.
43949 /// </summary>
43950 public SequenceType Sequence
43951 {
43952 get
43953 {
43954 return this.sequenceField;
43955 }
43956 set
43957 {
43958 this.sequenceFieldSet = true;
43959 this.sequenceField = value;
43960 }
43961 }
43962
43963 /// <summary>
43964 /// This attribute specifies a string value to assign to the Directory. The value can be a literal value or derived from a
43965 /// Property element using the
43966 /// </summary>
43967 public string Value
43968 {
43969 get
43970 {
43971 return this.valueField;
43972 }
43973 set
43974 {
43975 this.valueFieldSet = true;
43976 this.valueField = value;
43977 }
43978 }
43979
43980 /// <summary>
43981 /// The condition that determines whether the Directory is set. If the condition evaluates to false, the SetDirectory is skipped.
43982 /// </summary>
43983 public string Content
43984 {
43985 get
43986 {
43987 return this.contentField;
43988 }
43989 set
43990 {
43991 this.contentFieldSet = true;
43992 this.contentField = value;
43993 }
43994 }
43995
43996 public virtual ISchemaElement ParentElement
43997 {
43998 get
43999 {
44000 return this.parentElement;
44001 }
44002 set
44003 {
44004 this.parentElement = value;
44005 }
44006 }
44007
44008 /// <summary>
44009 /// Processes this element and all child elements into an XmlWriter.
44010 /// </summary>
44011 public virtual void OutputXml(XmlWriter writer)
44012 {
44013 if ((null == writer))
44014 {
44015 throw new ArgumentNullException("writer");
44016 }
44017 writer.WriteStartElement("SetDirectory", "http://wixtoolset.org/schemas/v4/wxs");
44018 if (this.actionFieldSet)
44019 {
44020 writer.WriteAttributeString("Action", this.actionField);
44021 }
44022 if (this.idFieldSet)
44023 {
44024 writer.WriteAttributeString("Id", this.idField);
44025 }
44026 if (this.sequenceFieldSet)
44027 {
44028 if ((this.sequenceField == SequenceType.both))
44029 {
44030 writer.WriteAttributeString("Sequence", "both");
44031 }
44032 if ((this.sequenceField == SequenceType.first))
44033 {
44034 writer.WriteAttributeString("Sequence", "first");
44035 }
44036 if ((this.sequenceField == SequenceType.execute))
44037 {
44038 writer.WriteAttributeString("Sequence", "execute");
44039 }
44040 if ((this.sequenceField == SequenceType.ui))
44041 {
44042 writer.WriteAttributeString("Sequence", "ui");
44043 }
44044 }
44045 if (this.valueFieldSet)
44046 {
44047 writer.WriteAttributeString("Value", this.valueField);
44048 }
44049 if (this.contentFieldSet)
44050 {
44051 writer.WriteString(this.contentField);
44052 }
44053 writer.WriteEndElement();
44054 }
44055
44056 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
44057 void ISetAttributes.SetAttribute(string name, string value)
44058 {
44059 if (String.IsNullOrEmpty(name))
44060 {
44061 throw new ArgumentNullException("name");
44062 }
44063 if (("Action" == name))
44064 {
44065 this.actionField = value;
44066 this.actionFieldSet = true;
44067 }
44068 if (("Id" == name))
44069 {
44070 this.idField = value;
44071 this.idFieldSet = true;
44072 }
44073 if (("Sequence" == name))
44074 {
44075 this.sequenceField = Enums.ParseSequenceType(value);
44076 this.sequenceFieldSet = true;
44077 }
44078 if (("Value" == name))
44079 {
44080 this.valueField = value;
44081 this.valueFieldSet = true;
44082 }
44083 if (("Content" == name))
44084 {
44085 this.contentField = value;
44086 this.contentFieldSet = true;
44087 }
44088 }
44089 }
44090
44091 /// <summary>
44092 /// Sets a Property to a particular value. This is accomplished by creating a Type 51 custom action that is appropriately scheduled in
44093 /// the InstallUISequence and InstallExecuteSequence.
44094 /// </summary>
44095 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44096 public class SetProperty : ISchemaElement, ISetAttributes
44097 {
44098
44099 private string actionField;
44100
44101 private bool actionFieldSet;
44102
44103 private string afterField;
44104
44105 private bool afterFieldSet;
44106
44107 private string beforeField;
44108
44109 private bool beforeFieldSet;
44110
44111 private string idField;
44112
44113 private bool idFieldSet;
44114
44115 private SequenceType sequenceField;
44116
44117 private bool sequenceFieldSet;
44118
44119 private string valueField;
44120
44121 private bool valueFieldSet;
44122
44123 private string contentField;
44124
44125 private bool contentFieldSet;
44126
44127 private ISchemaElement parentElement;
44128
44129 /// <summary>
44130 /// By default the action is "Set" + Id attribute's value. This optional attribute can override the action name in the case
44131 /// where multiple SetProperty elements target the same Id (probably with mutually exclusive conditions).
44132 /// </summary>
44133 public string Action
44134 {
44135 get
44136 {
44137 return this.actionField;
44138 }
44139 set
44140 {
44141 this.actionFieldSet = true;
44142 this.actionField = value;
44143 }
44144 }
44145
44146 /// <summary>
44147 /// The name of the standard or custom action after which this action should be performed. Mutually exclusive with the Before attribute. A Before or After attribute is required when setting a Property.
44148 /// </summary>
44149 public string After
44150 {
44151 get
44152 {
44153 return this.afterField;
44154 }
44155 set
44156 {
44157 this.afterFieldSet = true;
44158 this.afterField = value;
44159 }
44160 }
44161
44162 /// <summary>
44163 /// The name of the standard or custom action before which this action should be performed. Mutually exclusive with the After attribute. A Before or After attribute is required when setting a Property.
44164 /// </summary>
44165 public string Before
44166 {
44167 get
44168 {
44169 return this.beforeField;
44170 }
44171 set
44172 {
44173 this.beforeFieldSet = true;
44174 this.beforeField = value;
44175 }
44176 }
44177
44178 /// <summary>
44179 /// This attribute specifies the Property to set to the Value.
44180 /// </summary>
44181 public string Id
44182 {
44183 get
44184 {
44185 return this.idField;
44186 }
44187 set
44188 {
44189 this.idFieldSet = true;
44190 this.idField = value;
44191 }
44192 }
44193
44194 /// <summary>
44195 /// Controls which sequences the Property assignment is sequenced in.
44196 /// For 'execute', the assignment is scheduled in the InstallExecuteSequence.
44197 /// For 'ui', the assignment is scheduled in the InstallUISequence.
44198 /// For 'first', the assignment is scheduled in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped at install time.
44199 /// For 'both', the assignment is scheduled in both the InstallUISequence and the InstallExecuteSequence.
44200 /// The default is 'both'.
44201 /// </summary>
44202 public SequenceType Sequence
44203 {
44204 get
44205 {
44206 return this.sequenceField;
44207 }
44208 set
44209 {
44210 this.sequenceFieldSet = true;
44211 this.sequenceField = value;
44212 }
44213 }
44214
44215 /// <summary>
44216 /// This attribute specifies a string value to assign to the Property. The value can be a literal value or derived from a
44217 /// Property element using the
44218 /// </summary>
44219 public string Value
44220 {
44221 get
44222 {
44223 return this.valueField;
44224 }
44225 set
44226 {
44227 this.valueFieldSet = true;
44228 this.valueField = value;
44229 }
44230 }
44231
44232 /// <summary>
44233 /// The condition that determines whether the Property is set. If the condition evaluates to false, the Set is skipped.
44234 /// </summary>
44235 public string Content
44236 {
44237 get
44238 {
44239 return this.contentField;
44240 }
44241 set
44242 {
44243 this.contentFieldSet = true;
44244 this.contentField = value;
44245 }
44246 }
44247
44248 public virtual ISchemaElement ParentElement
44249 {
44250 get
44251 {
44252 return this.parentElement;
44253 }
44254 set
44255 {
44256 this.parentElement = value;
44257 }
44258 }
44259
44260 /// <summary>
44261 /// Processes this element and all child elements into an XmlWriter.
44262 /// </summary>
44263 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
44264 public virtual void OutputXml(XmlWriter writer)
44265 {
44266 if ((null == writer))
44267 {
44268 throw new ArgumentNullException("writer");
44269 }
44270 writer.WriteStartElement("SetProperty", "http://wixtoolset.org/schemas/v4/wxs");
44271 if (this.actionFieldSet)
44272 {
44273 writer.WriteAttributeString("Action", this.actionField);
44274 }
44275 if (this.afterFieldSet)
44276 {
44277 writer.WriteAttributeString("After", this.afterField);
44278 }
44279 if (this.beforeFieldSet)
44280 {
44281 writer.WriteAttributeString("Before", this.beforeField);
44282 }
44283 if (this.idFieldSet)
44284 {
44285 writer.WriteAttributeString("Id", this.idField);
44286 }
44287 if (this.sequenceFieldSet)
44288 {
44289 if ((this.sequenceField == SequenceType.both))
44290 {
44291 writer.WriteAttributeString("Sequence", "both");
44292 }
44293 if ((this.sequenceField == SequenceType.first))
44294 {
44295 writer.WriteAttributeString("Sequence", "first");
44296 }
44297 if ((this.sequenceField == SequenceType.execute))
44298 {
44299 writer.WriteAttributeString("Sequence", "execute");
44300 }
44301 if ((this.sequenceField == SequenceType.ui))
44302 {
44303 writer.WriteAttributeString("Sequence", "ui");
44304 }
44305 }
44306 if (this.valueFieldSet)
44307 {
44308 writer.WriteAttributeString("Value", this.valueField);
44309 }
44310 if (this.contentFieldSet)
44311 {
44312 writer.WriteString(this.contentField);
44313 }
44314 writer.WriteEndElement();
44315 }
44316
44317 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
44318 void ISetAttributes.SetAttribute(string name, string value)
44319 {
44320 if (String.IsNullOrEmpty(name))
44321 {
44322 throw new ArgumentNullException("name");
44323 }
44324 if (("Action" == name))
44325 {
44326 this.actionField = value;
44327 this.actionFieldSet = true;
44328 }
44329 if (("After" == name))
44330 {
44331 this.afterField = value;
44332 this.afterFieldSet = true;
44333 }
44334 if (("Before" == name))
44335 {
44336 this.beforeField = value;
44337 this.beforeFieldSet = true;
44338 }
44339 if (("Id" == name))
44340 {
44341 this.idField = value;
44342 this.idFieldSet = true;
44343 }
44344 if (("Sequence" == name))
44345 {
44346 this.sequenceField = Enums.ParseSequenceType(value);
44347 this.sequenceFieldSet = true;
44348 }
44349 if (("Value" == name))
44350 {
44351 this.valueField = value;
44352 this.valueFieldSet = true;
44353 }
44354 if (("Content" == name))
44355 {
44356 this.contentField = value;
44357 this.contentFieldSet = true;
44358 }
44359 }
44360 }
44361
44362 /// <summary>
44363 /// This will cause the entire contents of the Fragment containing the referenced PatchFamily to be
44364 /// used in the process of creating a patch.
44365 /// </summary>
44366 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44367 public class PatchFamilyRef : ISchemaElement, ISetAttributes
44368 {
44369
44370 private string idField;
44371
44372 private bool idFieldSet;
44373
44374 private string productCodeField;
44375
44376 private bool productCodeFieldSet;
44377
44378 private ISchemaElement parentElement;
44379
44380 /// <summary>
44381 /// The identifier of the PatchFamily to reference.
44382 /// </summary>
44383 public string Id
44384 {
44385 get
44386 {
44387 return this.idField;
44388 }
44389 set
44390 {
44391 this.idFieldSet = true;
44392 this.idField = value;
44393 }
44394 }
44395
44396 /// <summary>
44397 /// Specifies the ProductCode of the product that this family applies to.
44398 /// </summary>
44399 public string ProductCode
44400 {
44401 get
44402 {
44403 return this.productCodeField;
44404 }
44405 set
44406 {
44407 this.productCodeFieldSet = true;
44408 this.productCodeField = value;
44409 }
44410 }
44411
44412 public virtual ISchemaElement ParentElement
44413 {
44414 get
44415 {
44416 return this.parentElement;
44417 }
44418 set
44419 {
44420 this.parentElement = value;
44421 }
44422 }
44423
44424 /// <summary>
44425 /// Processes this element and all child elements into an XmlWriter.
44426 /// </summary>
44427 public virtual void OutputXml(XmlWriter writer)
44428 {
44429 if ((null == writer))
44430 {
44431 throw new ArgumentNullException("writer");
44432 }
44433 writer.WriteStartElement("PatchFamilyRef", "http://wixtoolset.org/schemas/v4/wxs");
44434 if (this.idFieldSet)
44435 {
44436 writer.WriteAttributeString("Id", this.idField);
44437 }
44438 if (this.productCodeFieldSet)
44439 {
44440 writer.WriteAttributeString("ProductCode", this.productCodeField);
44441 }
44442 writer.WriteEndElement();
44443 }
44444
44445 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
44446 void ISetAttributes.SetAttribute(string name, string value)
44447 {
44448 if (String.IsNullOrEmpty(name))
44449 {
44450 throw new ArgumentNullException("name");
44451 }
44452 if (("Id" == name))
44453 {
44454 this.idField = value;
44455 this.idFieldSet = true;
44456 }
44457 if (("ProductCode" == name))
44458 {
44459 this.productCodeField = value;
44460 this.productCodeFieldSet = true;
44461 }
44462 }
44463 }
44464
44465 /// <summary>
44466 /// Sets the ProductID property to the full product identifier. This action must be sequenced before the user interface wizard in the InstallUISequence table and before the RegisterUser action in the InstallExecuteSequence table. If the product identifier has already been validated successfully, the ValidateProductID action does nothing. The ValidateProductID action always returns a success, whether or not the product identifier is valid, so that the product identifier can be entered on the command line the first time the product is run. The product identifier can be validated without having the user reenter this information by setting the PIDKEY property on the command line or by using a transform. The display of the dialog box requesting the user to enter the product identifier can then be made conditional upon the presence of the ProductID property, which is set when the PIDKEY property is validated. The condition for this action may be specified in the element's inner text.
44467 /// </summary>
44468 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44469 public class ValidateProductID : ActionSequenceType, ISchemaElement
44470 {
44471
44472 /// <summary>
44473 /// Processes this element and all child elements into an XmlWriter.
44474 /// </summary>
44475 public override void OutputXml(XmlWriter writer)
44476 {
44477 if ((null == writer))
44478 {
44479 throw new ArgumentNullException("writer");
44480 }
44481 writer.WriteStartElement("ValidateProductID", "http://wixtoolset.org/schemas/v4/wxs");
44482 base.OutputXml(writer);
44483 writer.WriteEndElement();
44484 }
44485 }
44486
44487 /// <summary>
44488 /// Initiates the internal installation costing process. Any standard or custom actions that affect costing should be sequenced before the CostInitialize action. Call the FileCost action immediately following the CostInitialize action. Then call the CostFinalize action following the CostInitialize action to make all final cost calculations available to the installer through the Component table. The condition for this action may be specified in the element's inner text.
44489 /// </summary>
44490 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44491 public class CostInitialize : ActionSequenceType, ISchemaElement
44492 {
44493
44494 /// <summary>
44495 /// Processes this element and all child elements into an XmlWriter.
44496 /// </summary>
44497 public override void OutputXml(XmlWriter writer)
44498 {
44499 if ((null == writer))
44500 {
44501 throw new ArgumentNullException("writer");
44502 }
44503 writer.WriteStartElement("CostInitialize", "http://wixtoolset.org/schemas/v4/wxs");
44504 base.OutputXml(writer);
44505 writer.WriteEndElement();
44506 }
44507 }
44508
44509 /// <summary>
44510 /// Initiates dynamic costing of standard installation actions. Any standard or custom actions that affect costing should sequenced before the CostInitialize action. Call the FileCost action immediately following the CostInitialize action. Then call the CostFinalize action following the FileCost action to make all final cost calculations available to the installer through the Component table. The CostInitialize action must be executed before the FileCost action. The installer then determines the disk-space cost of every file in the File table, on a per-component basis, taking both volume clustering and the presence of existing files that may need to be overwritten into account. All actions that consume or release disk space are also considered. If an existing file is found, a file version check is performed to determine whether the new file actually needs to be installed or not. If the existing file is of an equal or greater version number, the existing file is not overwritten and no disk-space cost is incurred. In all cases, the installer uses the results of version number checking to set the installation state of each file. The FileCost action initializes cost calculation with the installer. Actual dynamic costing does not occur until the CostFinalize action is executed. The condition for this action may be specified in the element's inner text.
44511 /// </summary>
44512 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44513 public class FileCost : ActionSequenceType, ISchemaElement
44514 {
44515
44516 /// <summary>
44517 /// Processes this element and all child elements into an XmlWriter.
44518 /// </summary>
44519 public override void OutputXml(XmlWriter writer)
44520 {
44521 if ((null == writer))
44522 {
44523 throw new ArgumentNullException("writer");
44524 }
44525 writer.WriteStartElement("FileCost", "http://wixtoolset.org/schemas/v4/wxs");
44526 base.OutputXml(writer);
44527 writer.WriteEndElement();
44528 }
44529 }
44530
44531 /// <summary>
44532 /// Installs a copy of a component (commonly a shared DLL) into a private location for use by a specific application (typically an .exe). This isolates the application from other copies of the component that may be installed to a shared location on the computer. The action refers to each record of the IsolatedComponent table and associates the files of the component listed in the Component_Shared field with the component listed in the Component_Application field. The installer installs the files of Component_Shared into the same directory as Component_Application. The installer generates a file in this directory, zero bytes in length, having the short filename name of the key file for Component_Application (typically this is the same file name as the .exe) appended with .local. The IsolatedComponent action does not affect the installation of Component_Application. Uninstalling Component_Application also removes the Component_Shared files and the .local file from the directory. The IsolateComponents action can be used only in the InstallUISequence table and the InstallExecuteSequence table. This action must come after the CostInitialize action and before the CostFinalize action. The condition for this action may be specified in the element's inner text.
44533 /// </summary>
44534 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44535 public class IsolateComponents : ActionSequenceType, ISchemaElement
44536 {
44537
44538 /// <summary>
44539 /// Processes this element and all child elements into an XmlWriter.
44540 /// </summary>
44541 public override void OutputXml(XmlWriter writer)
44542 {
44543 if ((null == writer))
44544 {
44545 throw new ArgumentNullException("writer");
44546 }
44547 writer.WriteStartElement("IsolateComponents", "http://wixtoolset.org/schemas/v4/wxs");
44548 base.OutputXml(writer);
44549 writer.WriteEndElement();
44550 }
44551 }
44552
44553 /// <summary>
44554 /// Ends the internal installation costing process begun by the CostInitialize action. Any standard or custom actions that affect costing should be sequenced before the CostInitialize action. Call the FileCost action immediately following the CostInitialize action and then call the CostFinalize action to make all final cost calculations available to the installer through the Component table. The CostFinalize action must be executed before starting any user interface sequence which allows the user to view or modify Feature table selections or directories. The CostFinalize action queries the Condition table to determine which features are scheduled to be installed. Costing is done for each component in the Component table. The CostFinalize action also verifies that all the target directories are writable before allowing the installation to continue. The condition for this action may be specified in the element's inner text.
44555 /// </summary>
44556 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44557 public class CostFinalize : ActionSequenceType, ISchemaElement
44558 {
44559
44560 /// <summary>
44561 /// Processes this element and all child elements into an XmlWriter.
44562 /// </summary>
44563 public override void OutputXml(XmlWriter writer)
44564 {
44565 if ((null == writer))
44566 {
44567 throw new ArgumentNullException("writer");
44568 }
44569 writer.WriteStartElement("CostFinalize", "http://wixtoolset.org/schemas/v4/wxs");
44570 base.OutputXml(writer);
44571 writer.WriteEndElement();
44572 }
44573 }
44574
44575 /// <summary>
44576 /// Checks for existing ODBC drivers and sets the target directory for each new driver to the location of an existing driver. The condition for this action may be specified in the element's inner text.
44577 /// </summary>
44578 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44579 public class SetODBCFolders : ActionSequenceType, ISchemaElement
44580 {
44581
44582 /// <summary>
44583 /// Processes this element and all child elements into an XmlWriter.
44584 /// </summary>
44585 public override void OutputXml(XmlWriter writer)
44586 {
44587 if ((null == writer))
44588 {
44589 throw new ArgumentNullException("writer");
44590 }
44591 writer.WriteStartElement("SetODBCFolders", "http://wixtoolset.org/schemas/v4/wxs");
44592 base.OutputXml(writer);
44593 writer.WriteEndElement();
44594 }
44595 }
44596
44597 /// <summary>
44598 /// Used for upgrading or installing over an existing application. Reads feature states from existing application and sets these feature states for the pending installation. The condition for this action may be specified in the element's inner text.
44599 /// </summary>
44600 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44601 public class MigrateFeatureStates : ActionSequenceType, ISchemaElement
44602 {
44603
44604 /// <summary>
44605 /// Processes this element and all child elements into an XmlWriter.
44606 /// </summary>
44607 public override void OutputXml(XmlWriter writer)
44608 {
44609 if ((null == writer))
44610 {
44611 throw new ArgumentNullException("writer");
44612 }
44613 writer.WriteStartElement("MigrateFeatureStates", "http://wixtoolset.org/schemas/v4/wxs");
44614 base.OutputXml(writer);
44615 writer.WriteEndElement();
44616 }
44617 }
44618
44619 /// <summary>
44620 /// Initiates the execution sequence. The condition for this action may be specified in the element's inner text.
44621 /// </summary>
44622 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44623 public class ExecuteAction : ActionSequenceType, ISchemaElement
44624 {
44625
44626 /// <summary>
44627 /// Processes this element and all child elements into an XmlWriter.
44628 /// </summary>
44629 public override void OutputXml(XmlWriter writer)
44630 {
44631 if ((null == writer))
44632 {
44633 throw new ArgumentNullException("writer");
44634 }
44635 writer.WriteStartElement("ExecuteAction", "http://wixtoolset.org/schemas/v4/wxs");
44636 base.OutputXml(writer);
44637 writer.WriteEndElement();
44638 }
44639 }
44640
44641 /// <summary>
44642 /// Verifies that all costed volumes have enough space for the installation. The condition for this action may be specified in the element's inner text.
44643 /// </summary>
44644 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44645 public class InstallValidate : ActionSequenceType, ISchemaElement
44646 {
44647
44648 /// <summary>
44649 /// Processes this element and all child elements into an XmlWriter.
44650 /// </summary>
44651 public override void OutputXml(XmlWriter writer)
44652 {
44653 if ((null == writer))
44654 {
44655 throw new ArgumentNullException("writer");
44656 }
44657 writer.WriteStartElement("InstallValidate", "http://wixtoolset.org/schemas/v4/wxs");
44658 base.OutputXml(writer);
44659 writer.WriteEndElement();
44660 }
44661 }
44662
44663 /// <summary>
44664 /// Marks the beginning of a sequence of actions that change the system. The condition for this action may be specified in the element's inner text.
44665 /// </summary>
44666 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44667 public class InstallInitialize : ActionSequenceType, ISchemaElement
44668 {
44669
44670 /// <summary>
44671 /// Processes this element and all child elements into an XmlWriter.
44672 /// </summary>
44673 public override void OutputXml(XmlWriter writer)
44674 {
44675 if ((null == writer))
44676 {
44677 throw new ArgumentNullException("writer");
44678 }
44679 writer.WriteStartElement("InstallInitialize", "http://wixtoolset.org/schemas/v4/wxs");
44680 base.OutputXml(writer);
44681 writer.WriteEndElement();
44682 }
44683 }
44684
44685 /// <summary>
44686 /// Ensures the needed amount of space exists in the registry. The condition for this action may be specified in the element's inner text.
44687 /// </summary>
44688 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44689 public class AllocateRegistrySpace : ActionSequenceType, ISchemaElement
44690 {
44691
44692 /// <summary>
44693 /// Processes this element and all child elements into an XmlWriter.
44694 /// </summary>
44695 public override void OutputXml(XmlWriter writer)
44696 {
44697 if ((null == writer))
44698 {
44699 throw new ArgumentNullException("writer");
44700 }
44701 writer.WriteStartElement("AllocateRegistrySpace", "http://wixtoolset.org/schemas/v4/wxs");
44702 base.OutputXml(writer);
44703 writer.WriteEndElement();
44704 }
44705 }
44706
44707 /// <summary>
44708 /// Registers and unregisters components, their key paths, and the component clients. The condition for this action may be specified in the element's inner text.
44709 /// </summary>
44710 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44711 public class ProcessComponents : ActionSequenceType, ISchemaElement
44712 {
44713
44714 /// <summary>
44715 /// Processes this element and all child elements into an XmlWriter.
44716 /// </summary>
44717 public override void OutputXml(XmlWriter writer)
44718 {
44719 if ((null == writer))
44720 {
44721 throw new ArgumentNullException("writer");
44722 }
44723 writer.WriteStartElement("ProcessComponents", "http://wixtoolset.org/schemas/v4/wxs");
44724 base.OutputXml(writer);
44725 writer.WriteEndElement();
44726 }
44727 }
44728
44729 /// <summary>
44730 /// Manages the unadvertisement of components listed in the PublishComponent table. The condition for this action may be specified in the element's inner text.
44731 /// </summary>
44732 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44733 public class UnpublishComponents : ActionSequenceType, ISchemaElement
44734 {
44735
44736 /// <summary>
44737 /// Processes this element and all child elements into an XmlWriter.
44738 /// </summary>
44739 public override void OutputXml(XmlWriter writer)
44740 {
44741 if ((null == writer))
44742 {
44743 throw new ArgumentNullException("writer");
44744 }
44745 writer.WriteStartElement("UnpublishComponents", "http://wixtoolset.org/schemas/v4/wxs");
44746 base.OutputXml(writer);
44747 writer.WriteEndElement();
44748 }
44749 }
44750
44751 /// <summary>
44752 /// Manages the unadvertisement of CLR and Win32 assemblies that are being removed. The condition for this action may be specified in the element's inner text.
44753 /// </summary>
44754 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44755 public class MsiUnpublishAssemblies : ActionSequenceType, ISchemaElement
44756 {
44757
44758 /// <summary>
44759 /// Processes this element and all child elements into an XmlWriter.
44760 /// </summary>
44761 public override void OutputXml(XmlWriter writer)
44762 {
44763 if ((null == writer))
44764 {
44765 throw new ArgumentNullException("writer");
44766 }
44767 writer.WriteStartElement("MsiUnpublishAssemblies", "http://wixtoolset.org/schemas/v4/wxs");
44768 base.OutputXml(writer);
44769 writer.WriteEndElement();
44770 }
44771 }
44772
44773 /// <summary>
44774 /// Removes selection-state and feature-component mapping information from the registry. The condition for this action may be specified in the element's inner text.
44775 /// </summary>
44776 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44777 public class UnpublishFeatures : ActionSequenceType, ISchemaElement
44778 {
44779
44780 /// <summary>
44781 /// Processes this element and all child elements into an XmlWriter.
44782 /// </summary>
44783 public override void OutputXml(XmlWriter writer)
44784 {
44785 if ((null == writer))
44786 {
44787 throw new ArgumentNullException("writer");
44788 }
44789 writer.WriteStartElement("UnpublishFeatures", "http://wixtoolset.org/schemas/v4/wxs");
44790 base.OutputXml(writer);
44791 writer.WriteEndElement();
44792 }
44793 }
44794
44795 /// <summary>
44796 /// Stops system services. The condition for this action may be specified in the element's inner text.
44797 /// </summary>
44798 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44799 public class StopServices : ActionSequenceType, ISchemaElement
44800 {
44801
44802 /// <summary>
44803 /// Processes this element and all child elements into an XmlWriter.
44804 /// </summary>
44805 public override void OutputXml(XmlWriter writer)
44806 {
44807 if ((null == writer))
44808 {
44809 throw new ArgumentNullException("writer");
44810 }
44811 writer.WriteStartElement("StopServices", "http://wixtoolset.org/schemas/v4/wxs");
44812 base.OutputXml(writer);
44813 writer.WriteEndElement();
44814 }
44815 }
44816
44817 /// <summary>
44818 /// Stops a service and removes its registration from the system. The condition for this action may be specified in the element's inner text.
44819 /// </summary>
44820 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44821 public class DeleteServices : ActionSequenceType, ISchemaElement
44822 {
44823
44824 /// <summary>
44825 /// Processes this element and all child elements into an XmlWriter.
44826 /// </summary>
44827 public override void OutputXml(XmlWriter writer)
44828 {
44829 if ((null == writer))
44830 {
44831 throw new ArgumentNullException("writer");
44832 }
44833 writer.WriteStartElement("DeleteServices", "http://wixtoolset.org/schemas/v4/wxs");
44834 base.OutputXml(writer);
44835 writer.WriteEndElement();
44836 }
44837 }
44838
44839 /// <summary>
44840 /// Removes COM+ applications from the registry. The condition for this action may be specified in the element's inner text.
44841 /// </summary>
44842 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44843 public class UnregisterComPlus : ActionSequenceType, ISchemaElement
44844 {
44845
44846 /// <summary>
44847 /// Processes this element and all child elements into an XmlWriter.
44848 /// </summary>
44849 public override void OutputXml(XmlWriter writer)
44850 {
44851 if ((null == writer))
44852 {
44853 throw new ArgumentNullException("writer");
44854 }
44855 writer.WriteStartElement("UnregisterComPlus", "http://wixtoolset.org/schemas/v4/wxs");
44856 base.OutputXml(writer);
44857 writer.WriteEndElement();
44858 }
44859 }
44860
44861 /// <summary>
44862 /// Unregisters all modules listed in the SelfReg table that are scheduled to be uninstalled. The condition for this action may be specified in the element's inner text.
44863 /// </summary>
44864 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44865 public class SelfUnregModules : ActionSequenceType, ISchemaElement
44866 {
44867
44868 /// <summary>
44869 /// Processes this element and all child elements into an XmlWriter.
44870 /// </summary>
44871 public override void OutputXml(XmlWriter writer)
44872 {
44873 if ((null == writer))
44874 {
44875 throw new ArgumentNullException("writer");
44876 }
44877 writer.WriteStartElement("SelfUnregModules", "http://wixtoolset.org/schemas/v4/wxs");
44878 base.OutputXml(writer);
44879 writer.WriteEndElement();
44880 }
44881 }
44882
44883 /// <summary>
44884 /// Unregisters type libraries from the system. The condition for this action may be specified in the element's inner text.
44885 /// </summary>
44886 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44887 public class UnregisterTypeLibraries : ActionSequenceType, ISchemaElement
44888 {
44889
44890 /// <summary>
44891 /// Processes this element and all child elements into an XmlWriter.
44892 /// </summary>
44893 public override void OutputXml(XmlWriter writer)
44894 {
44895 if ((null == writer))
44896 {
44897 throw new ArgumentNullException("writer");
44898 }
44899 writer.WriteStartElement("UnregisterTypeLibraries", "http://wixtoolset.org/schemas/v4/wxs");
44900 base.OutputXml(writer);
44901 writer.WriteEndElement();
44902 }
44903 }
44904
44905 /// <summary>
44906 /// Removes the data sources, translators, and drivers listed for removal during the installation. The condition for this action may be specified in the element's inner text.
44907 /// </summary>
44908 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44909 public class RemoveODBC : ActionSequenceType, ISchemaElement
44910 {
44911
44912 /// <summary>
44913 /// Processes this element and all child elements into an XmlWriter.
44914 /// </summary>
44915 public override void OutputXml(XmlWriter writer)
44916 {
44917 if ((null == writer))
44918 {
44919 throw new ArgumentNullException("writer");
44920 }
44921 writer.WriteStartElement("RemoveODBC", "http://wixtoolset.org/schemas/v4/wxs");
44922 base.OutputXml(writer);
44923 writer.WriteEndElement();
44924 }
44925 }
44926
44927 /// <summary>
44928 /// Removes registration information about installed fonts from the system. The condition for this action may be specified in the element's inner text.
44929 /// </summary>
44930 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44931 public class UnregisterFonts : ActionSequenceType, ISchemaElement
44932 {
44933
44934 /// <summary>
44935 /// Processes this element and all child elements into an XmlWriter.
44936 /// </summary>
44937 public override void OutputXml(XmlWriter writer)
44938 {
44939 if ((null == writer))
44940 {
44941 throw new ArgumentNullException("writer");
44942 }
44943 writer.WriteStartElement("UnregisterFonts", "http://wixtoolset.org/schemas/v4/wxs");
44944 base.OutputXml(writer);
44945 writer.WriteEndElement();
44946 }
44947 }
44948
44949 /// <summary>
44950 /// Removes a registry value that has been authored into the registry table if the associated component was installed locally or as run from source, and is now set to be uninstalled. The condition for this action may be specified in the element's inner text.
44951 /// </summary>
44952 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44953 public class RemoveRegistryValues : ActionSequenceType, ISchemaElement
44954 {
44955
44956 /// <summary>
44957 /// Processes this element and all child elements into an XmlWriter.
44958 /// </summary>
44959 public override void OutputXml(XmlWriter writer)
44960 {
44961 if ((null == writer))
44962 {
44963 throw new ArgumentNullException("writer");
44964 }
44965 writer.WriteStartElement("RemoveRegistryValues", "http://wixtoolset.org/schemas/v4/wxs");
44966 base.OutputXml(writer);
44967 writer.WriteEndElement();
44968 }
44969 }
44970
44971 /// <summary>
44972 /// Manages the removal of COM class information from the system registry. The condition for this action may be specified in the element's inner text.
44973 /// </summary>
44974 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44975 public class UnregisterClassInfo : ActionSequenceType, ISchemaElement
44976 {
44977
44978 /// <summary>
44979 /// Processes this element and all child elements into an XmlWriter.
44980 /// </summary>
44981 public override void OutputXml(XmlWriter writer)
44982 {
44983 if ((null == writer))
44984 {
44985 throw new ArgumentNullException("writer");
44986 }
44987 writer.WriteStartElement("UnregisterClassInfo", "http://wixtoolset.org/schemas/v4/wxs");
44988 base.OutputXml(writer);
44989 writer.WriteEndElement();
44990 }
44991 }
44992
44993 /// <summary>
44994 /// Manages the removal of extension-related information from the system registry. The condition for this action may be specified in the element's inner text.
44995 /// </summary>
44996 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44997 public class UnregisterExtensionInfo : ActionSequenceType, ISchemaElement
44998 {
44999
45000 /// <summary>
45001 /// Processes this element and all child elements into an XmlWriter.
45002 /// </summary>
45003 public override void OutputXml(XmlWriter writer)
45004 {
45005 if ((null == writer))
45006 {
45007 throw new ArgumentNullException("writer");
45008 }
45009 writer.WriteStartElement("UnregisterExtensionInfo", "http://wixtoolset.org/schemas/v4/wxs");
45010 base.OutputXml(writer);
45011 writer.WriteEndElement();
45012 }
45013 }
45014
45015 /// <summary>
45016 /// Manages the unregistration of OLE ProgId information with the system. The condition for this action may be specified in the element's inner text.
45017 /// </summary>
45018 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45019 public class UnregisterProgIdInfo : ActionSequenceType, ISchemaElement
45020 {
45021
45022 /// <summary>
45023 /// Processes this element and all child elements into an XmlWriter.
45024 /// </summary>
45025 public override void OutputXml(XmlWriter writer)
45026 {
45027 if ((null == writer))
45028 {
45029 throw new ArgumentNullException("writer");
45030 }
45031 writer.WriteStartElement("UnregisterProgIdInfo", "http://wixtoolset.org/schemas/v4/wxs");
45032 base.OutputXml(writer);
45033 writer.WriteEndElement();
45034 }
45035 }
45036
45037 /// <summary>
45038 /// Unregisters MIME-related registry information from the system. The condition for this action may be specified in the element's inner text.
45039 /// </summary>
45040 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45041 public class UnregisterMIMEInfo : ActionSequenceType, ISchemaElement
45042 {
45043
45044 /// <summary>
45045 /// Processes this element and all child elements into an XmlWriter.
45046 /// </summary>
45047 public override void OutputXml(XmlWriter writer)
45048 {
45049 if ((null == writer))
45050 {
45051 throw new ArgumentNullException("writer");
45052 }
45053 writer.WriteStartElement("UnregisterMIMEInfo", "http://wixtoolset.org/schemas/v4/wxs");
45054 base.OutputXml(writer);
45055 writer.WriteEndElement();
45056 }
45057 }
45058
45059 /// <summary>
45060 /// Removes .ini file information specified for removal in the RemoveIniFile table if the component is set to be installed locally or run from source. The condition for this action may be specified in the element's inner text.
45061 /// </summary>
45062 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45063 public class RemoveIniValues : ActionSequenceType, ISchemaElement
45064 {
45065
45066 /// <summary>
45067 /// Processes this element and all child elements into an XmlWriter.
45068 /// </summary>
45069 public override void OutputXml(XmlWriter writer)
45070 {
45071 if ((null == writer))
45072 {
45073 throw new ArgumentNullException("writer");
45074 }
45075 writer.WriteStartElement("RemoveIniValues", "http://wixtoolset.org/schemas/v4/wxs");
45076 base.OutputXml(writer);
45077 writer.WriteEndElement();
45078 }
45079 }
45080
45081 /// <summary>
45082 /// Manages the removal of an advertised shortcut whose feature is selected for uninstallation or a nonadvertised shortcut whose component is selected for uninstallation. The condition for this action may be specified in the element's inner text.
45083 /// </summary>
45084 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45085 public class RemoveShortcuts : ActionSequenceType, ISchemaElement
45086 {
45087
45088 /// <summary>
45089 /// Processes this element and all child elements into an XmlWriter.
45090 /// </summary>
45091 public override void OutputXml(XmlWriter writer)
45092 {
45093 if ((null == writer))
45094 {
45095 throw new ArgumentNullException("writer");
45096 }
45097 writer.WriteStartElement("RemoveShortcuts", "http://wixtoolset.org/schemas/v4/wxs");
45098 base.OutputXml(writer);
45099 writer.WriteEndElement();
45100 }
45101 }
45102
45103 /// <summary>
45104 /// Modifies the values of environment variables. The condition for this action may be specified in the element's inner text.
45105 /// </summary>
45106 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45107 public class RemoveEnvironmentStrings : ActionSequenceType, ISchemaElement
45108 {
45109
45110 /// <summary>
45111 /// Processes this element and all child elements into an XmlWriter.
45112 /// </summary>
45113 public override void OutputXml(XmlWriter writer)
45114 {
45115 if ((null == writer))
45116 {
45117 throw new ArgumentNullException("writer");
45118 }
45119 writer.WriteStartElement("RemoveEnvironmentStrings", "http://wixtoolset.org/schemas/v4/wxs");
45120 base.OutputXml(writer);
45121 writer.WriteEndElement();
45122 }
45123 }
45124
45125 /// <summary>
45126 /// Deletes files installed by the DuplicateFiles action. The condition for this action may be specified in the element's inner text.
45127 /// </summary>
45128 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45129 public class RemoveDuplicateFiles : ActionSequenceType, ISchemaElement
45130 {
45131
45132 /// <summary>
45133 /// Processes this element and all child elements into an XmlWriter.
45134 /// </summary>
45135 public override void OutputXml(XmlWriter writer)
45136 {
45137 if ((null == writer))
45138 {
45139 throw new ArgumentNullException("writer");
45140 }
45141 writer.WriteStartElement("RemoveDuplicateFiles", "http://wixtoolset.org/schemas/v4/wxs");
45142 base.OutputXml(writer);
45143 writer.WriteEndElement();
45144 }
45145 }
45146
45147 /// <summary>
45148 /// Removes files previously installed by the InstallFiles action. The condition for this action may be specified in the element's inner text.
45149 /// </summary>
45150 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45151 public class RemoveFiles : ActionSequenceType, ISchemaElement
45152 {
45153
45154 /// <summary>
45155 /// Processes this element and all child elements into an XmlWriter.
45156 /// </summary>
45157 public override void OutputXml(XmlWriter writer)
45158 {
45159 if ((null == writer))
45160 {
45161 throw new ArgumentNullException("writer");
45162 }
45163 writer.WriteStartElement("RemoveFiles", "http://wixtoolset.org/schemas/v4/wxs");
45164 base.OutputXml(writer);
45165 writer.WriteEndElement();
45166 }
45167 }
45168
45169 /// <summary>
45170 /// Removes any folders linked to components set to be removed or run from source. The condition for this action may be specified in the element's inner text.
45171 /// </summary>
45172 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45173 public class RemoveFolders : ActionSequenceType, ISchemaElement
45174 {
45175
45176 /// <summary>
45177 /// Processes this element and all child elements into an XmlWriter.
45178 /// </summary>
45179 public override void OutputXml(XmlWriter writer)
45180 {
45181 if ((null == writer))
45182 {
45183 throw new ArgumentNullException("writer");
45184 }
45185 writer.WriteStartElement("RemoveFolders", "http://wixtoolset.org/schemas/v4/wxs");
45186 base.OutputXml(writer);
45187 writer.WriteEndElement();
45188 }
45189 }
45190
45191 /// <summary>
45192 /// Creates empty folders for components that are set to be installed. The condition for this action may be specified in the element's inner text.
45193 /// </summary>
45194 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45195 public class CreateFolders : ActionSequenceType, ISchemaElement
45196 {
45197
45198 /// <summary>
45199 /// Processes this element and all child elements into an XmlWriter.
45200 /// </summary>
45201 public override void OutputXml(XmlWriter writer)
45202 {
45203 if ((null == writer))
45204 {
45205 throw new ArgumentNullException("writer");
45206 }
45207 writer.WriteStartElement("CreateFolders", "http://wixtoolset.org/schemas/v4/wxs");
45208 base.OutputXml(writer);
45209 writer.WriteEndElement();
45210 }
45211 }
45212
45213 /// <summary>
45214 /// Locates existing files on the system and moves or copies those files to a new location. The condition for this action may be specified in the element's inner text.
45215 /// </summary>
45216 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45217 public class MoveFiles : ActionSequenceType, ISchemaElement
45218 {
45219
45220 /// <summary>
45221 /// Processes this element and all child elements into an XmlWriter.
45222 /// </summary>
45223 public override void OutputXml(XmlWriter writer)
45224 {
45225 if ((null == writer))
45226 {
45227 throw new ArgumentNullException("writer");
45228 }
45229 writer.WriteStartElement("MoveFiles", "http://wixtoolset.org/schemas/v4/wxs");
45230 base.OutputXml(writer);
45231 writer.WriteEndElement();
45232 }
45233 }
45234
45235 /// <summary>
45236 /// Copies the product database to the administrative installation point. The condition for this action may be specified in the element's inner text.
45237 /// </summary>
45238 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45239 public class InstallAdminPackage : ActionSequenceType, ISchemaElement
45240 {
45241
45242 /// <summary>
45243 /// Processes this element and all child elements into an XmlWriter.
45244 /// </summary>
45245 public override void OutputXml(XmlWriter writer)
45246 {
45247 if ((null == writer))
45248 {
45249 throw new ArgumentNullException("writer");
45250 }
45251 writer.WriteStartElement("InstallAdminPackage", "http://wixtoolset.org/schemas/v4/wxs");
45252 base.OutputXml(writer);
45253 writer.WriteEndElement();
45254 }
45255 }
45256
45257 /// <summary>
45258 /// Copies files specified in the File table from the source directory to the destination directory. The condition for this action may be specified in the element's inner text.
45259 /// </summary>
45260 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45261 public class InstallFiles : ActionSequenceType, ISchemaElement
45262 {
45263
45264 /// <summary>
45265 /// Processes this element and all child elements into an XmlWriter.
45266 /// </summary>
45267 public override void OutputXml(XmlWriter writer)
45268 {
45269 if ((null == writer))
45270 {
45271 throw new ArgumentNullException("writer");
45272 }
45273 writer.WriteStartElement("InstallFiles", "http://wixtoolset.org/schemas/v4/wxs");
45274 base.OutputXml(writer);
45275 writer.WriteEndElement();
45276 }
45277 }
45278
45279 /// <summary>
45280 /// Duplicates files installed by the InstallFiles action. The condition for this action may be specified in the element's inner text.
45281 /// </summary>
45282 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45283 public class DuplicateFiles : ActionSequenceType, ISchemaElement
45284 {
45285
45286 /// <summary>
45287 /// Processes this element and all child elements into an XmlWriter.
45288 /// </summary>
45289 public override void OutputXml(XmlWriter writer)
45290 {
45291 if ((null == writer))
45292 {
45293 throw new ArgumentNullException("writer");
45294 }
45295 writer.WriteStartElement("DuplicateFiles", "http://wixtoolset.org/schemas/v4/wxs");
45296 base.OutputXml(writer);
45297 writer.WriteEndElement();
45298 }
45299 }
45300
45301 /// <summary>
45302 /// Queries the Patch table to determine which patches are to be applied. The condition for this action may be specified in the element's inner text.
45303 /// </summary>
45304 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45305 public class PatchFiles : ActionSequenceType, ISchemaElement
45306 {
45307
45308 /// <summary>
45309 /// Processes this element and all child elements into an XmlWriter.
45310 /// </summary>
45311 public override void OutputXml(XmlWriter writer)
45312 {
45313 if ((null == writer))
45314 {
45315 throw new ArgumentNullException("writer");
45316 }
45317 writer.WriteStartElement("PatchFiles", "http://wixtoolset.org/schemas/v4/wxs");
45318 base.OutputXml(writer);
45319 writer.WriteEndElement();
45320 }
45321 }
45322
45323 /// <summary>
45324 /// Binds each executable or DLL that must be bound to the DLLs imported by it. The condition for this action may be specified in the element's inner text.
45325 /// </summary>
45326 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45327 public class BindImage : ActionSequenceType, ISchemaElement
45328 {
45329
45330 /// <summary>
45331 /// Processes this element and all child elements into an XmlWriter.
45332 /// </summary>
45333 public override void OutputXml(XmlWriter writer)
45334 {
45335 if ((null == writer))
45336 {
45337 throw new ArgumentNullException("writer");
45338 }
45339 writer.WriteStartElement("BindImage", "http://wixtoolset.org/schemas/v4/wxs");
45340 base.OutputXml(writer);
45341 writer.WriteEndElement();
45342 }
45343 }
45344
45345 /// <summary>
45346 /// Manages the creation of shortcuts. The condition for this action may be specified in the element's inner text.
45347 /// </summary>
45348 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45349 public class CreateShortcuts : ActionSequenceType, ISchemaElement
45350 {
45351
45352 /// <summary>
45353 /// Processes this element and all child elements into an XmlWriter.
45354 /// </summary>
45355 public override void OutputXml(XmlWriter writer)
45356 {
45357 if ((null == writer))
45358 {
45359 throw new ArgumentNullException("writer");
45360 }
45361 writer.WriteStartElement("CreateShortcuts", "http://wixtoolset.org/schemas/v4/wxs");
45362 base.OutputXml(writer);
45363 writer.WriteEndElement();
45364 }
45365 }
45366
45367 /// <summary>
45368 /// Manages the registration of COM class information with the system. The condition for this action may be specified in the element's inner text.
45369 /// </summary>
45370 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45371 public class RegisterClassInfo : ActionSequenceType, ISchemaElement
45372 {
45373
45374 /// <summary>
45375 /// Processes this element and all child elements into an XmlWriter.
45376 /// </summary>
45377 public override void OutputXml(XmlWriter writer)
45378 {
45379 if ((null == writer))
45380 {
45381 throw new ArgumentNullException("writer");
45382 }
45383 writer.WriteStartElement("RegisterClassInfo", "http://wixtoolset.org/schemas/v4/wxs");
45384 base.OutputXml(writer);
45385 writer.WriteEndElement();
45386 }
45387 }
45388
45389 /// <summary>
45390 /// Manages the registration of extension related information with the system. The condition for this action may be specified in the element's inner text.
45391 /// </summary>
45392 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45393 public class RegisterExtensionInfo : ActionSequenceType, ISchemaElement
45394 {
45395
45396 /// <summary>
45397 /// Processes this element and all child elements into an XmlWriter.
45398 /// </summary>
45399 public override void OutputXml(XmlWriter writer)
45400 {
45401 if ((null == writer))
45402 {
45403 throw new ArgumentNullException("writer");
45404 }
45405 writer.WriteStartElement("RegisterExtensionInfo", "http://wixtoolset.org/schemas/v4/wxs");
45406 base.OutputXml(writer);
45407 writer.WriteEndElement();
45408 }
45409 }
45410
45411 /// <summary>
45412 /// Manages the registration of OLE ProgId information with the system. The condition for this action may be specified in the element's inner text.
45413 /// </summary>
45414 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45415 public class RegisterProgIdInfo : ActionSequenceType, ISchemaElement
45416 {
45417
45418 /// <summary>
45419 /// Processes this element and all child elements into an XmlWriter.
45420 /// </summary>
45421 public override void OutputXml(XmlWriter writer)
45422 {
45423 if ((null == writer))
45424 {
45425 throw new ArgumentNullException("writer");
45426 }
45427 writer.WriteStartElement("RegisterProgIdInfo", "http://wixtoolset.org/schemas/v4/wxs");
45428 base.OutputXml(writer);
45429 writer.WriteEndElement();
45430 }
45431 }
45432
45433 /// <summary>
45434 /// Registers MIME-related registry information with the system. The condition for this action may be specified in the element's inner text.
45435 /// </summary>
45436 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45437 public class RegisterMIMEInfo : ActionSequenceType, ISchemaElement
45438 {
45439
45440 /// <summary>
45441 /// Processes this element and all child elements into an XmlWriter.
45442 /// </summary>
45443 public override void OutputXml(XmlWriter writer)
45444 {
45445 if ((null == writer))
45446 {
45447 throw new ArgumentNullException("writer");
45448 }
45449 writer.WriteStartElement("RegisterMIMEInfo", "http://wixtoolset.org/schemas/v4/wxs");
45450 base.OutputXml(writer);
45451 writer.WriteEndElement();
45452 }
45453 }
45454
45455 /// <summary>
45456 /// Sets up an application's registry information. The condition for this action may be specified in the element's inner text.
45457 /// </summary>
45458 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45459 public class WriteRegistryValues : ActionSequenceType, ISchemaElement
45460 {
45461
45462 /// <summary>
45463 /// Processes this element and all child elements into an XmlWriter.
45464 /// </summary>
45465 public override void OutputXml(XmlWriter writer)
45466 {
45467 if ((null == writer))
45468 {
45469 throw new ArgumentNullException("writer");
45470 }
45471 writer.WriteStartElement("WriteRegistryValues", "http://wixtoolset.org/schemas/v4/wxs");
45472 base.OutputXml(writer);
45473 writer.WriteEndElement();
45474 }
45475 }
45476
45477 /// <summary>
45478 /// Writes the .ini file information that the application needs written to its .ini files. The condition for this action may be specified in the element's inner text.
45479 /// </summary>
45480 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45481 public class WriteIniValues : ActionSequenceType, ISchemaElement
45482 {
45483
45484 /// <summary>
45485 /// Processes this element and all child elements into an XmlWriter.
45486 /// </summary>
45487 public override void OutputXml(XmlWriter writer)
45488 {
45489 if ((null == writer))
45490 {
45491 throw new ArgumentNullException("writer");
45492 }
45493 writer.WriteStartElement("WriteIniValues", "http://wixtoolset.org/schemas/v4/wxs");
45494 base.OutputXml(writer);
45495 writer.WriteEndElement();
45496 }
45497 }
45498
45499 /// <summary>
45500 /// Modifies the values of environment variables. The condition for this action may be specified in the element's inner text.
45501 /// </summary>
45502 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45503 public class WriteEnvironmentStrings : ActionSequenceType, ISchemaElement
45504 {
45505
45506 /// <summary>
45507 /// Processes this element and all child elements into an XmlWriter.
45508 /// </summary>
45509 public override void OutputXml(XmlWriter writer)
45510 {
45511 if ((null == writer))
45512 {
45513 throw new ArgumentNullException("writer");
45514 }
45515 writer.WriteStartElement("WriteEnvironmentStrings", "http://wixtoolset.org/schemas/v4/wxs");
45516 base.OutputXml(writer);
45517 writer.WriteEndElement();
45518 }
45519 }
45520
45521 /// <summary>
45522 /// Registers installed fonts with the system. The condition for this action may be specified in the element's inner text.
45523 /// </summary>
45524 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45525 public class RegisterFonts : ActionSequenceType, ISchemaElement
45526 {
45527
45528 /// <summary>
45529 /// Processes this element and all child elements into an XmlWriter.
45530 /// </summary>
45531 public override void OutputXml(XmlWriter writer)
45532 {
45533 if ((null == writer))
45534 {
45535 throw new ArgumentNullException("writer");
45536 }
45537 writer.WriteStartElement("RegisterFonts", "http://wixtoolset.org/schemas/v4/wxs");
45538 base.OutputXml(writer);
45539 writer.WriteEndElement();
45540 }
45541 }
45542
45543 /// <summary>
45544 /// Installs the drivers, translators, and data sources in the ODBCDriver table, ODBCTranslator table, and ODBCDataSource table. The condition for this action may be specified in the element's inner text.
45545 /// </summary>
45546 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45547 public class InstallODBC : ActionSequenceType, ISchemaElement
45548 {
45549
45550 /// <summary>
45551 /// Processes this element and all child elements into an XmlWriter.
45552 /// </summary>
45553 public override void OutputXml(XmlWriter writer)
45554 {
45555 if ((null == writer))
45556 {
45557 throw new ArgumentNullException("writer");
45558 }
45559 writer.WriteStartElement("InstallODBC", "http://wixtoolset.org/schemas/v4/wxs");
45560 base.OutputXml(writer);
45561 writer.WriteEndElement();
45562 }
45563 }
45564
45565 /// <summary>
45566 /// Registers type libraries with the system. The condition for this action may be specified in the element's inner text.
45567 /// </summary>
45568 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45569 public class RegisterTypeLibraries : ActionSequenceType, ISchemaElement
45570 {
45571
45572 /// <summary>
45573 /// Processes this element and all child elements into an XmlWriter.
45574 /// </summary>
45575 public override void OutputXml(XmlWriter writer)
45576 {
45577 if ((null == writer))
45578 {
45579 throw new ArgumentNullException("writer");
45580 }
45581 writer.WriteStartElement("RegisterTypeLibraries", "http://wixtoolset.org/schemas/v4/wxs");
45582 base.OutputXml(writer);
45583 writer.WriteEndElement();
45584 }
45585 }
45586
45587 /// <summary>
45588 /// Processes all modules listed in the SelfReg table and registers all installed modules with the system. The condition for this action may be specified in the element's inner text.
45589 /// </summary>
45590 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45591 public class SelfRegModules : ActionSequenceType, ISchemaElement
45592 {
45593
45594 /// <summary>
45595 /// Processes this element and all child elements into an XmlWriter.
45596 /// </summary>
45597 public override void OutputXml(XmlWriter writer)
45598 {
45599 if ((null == writer))
45600 {
45601 throw new ArgumentNullException("writer");
45602 }
45603 writer.WriteStartElement("SelfRegModules", "http://wixtoolset.org/schemas/v4/wxs");
45604 base.OutputXml(writer);
45605 writer.WriteEndElement();
45606 }
45607 }
45608
45609 /// <summary>
45610 /// Registers COM+ applications. The condition for this action may be specified in the element's inner text.
45611 /// </summary>
45612 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45613 public class RegisterComPlus : ActionSequenceType, ISchemaElement
45614 {
45615
45616 /// <summary>
45617 /// Processes this element and all child elements into an XmlWriter.
45618 /// </summary>
45619 public override void OutputXml(XmlWriter writer)
45620 {
45621 if ((null == writer))
45622 {
45623 throw new ArgumentNullException("writer");
45624 }
45625 writer.WriteStartElement("RegisterComPlus", "http://wixtoolset.org/schemas/v4/wxs");
45626 base.OutputXml(writer);
45627 writer.WriteEndElement();
45628 }
45629 }
45630
45631 /// <summary>
45632 /// Registers a service for the system. The condition for this action may be specified in the element's inner text.
45633 /// </summary>
45634 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45635 public class InstallServices : ActionSequenceType, ISchemaElement
45636 {
45637
45638 /// <summary>
45639 /// Processes this element and all child elements into an XmlWriter.
45640 /// </summary>
45641 public override void OutputXml(XmlWriter writer)
45642 {
45643 if ((null == writer))
45644 {
45645 throw new ArgumentNullException("writer");
45646 }
45647 writer.WriteStartElement("InstallServices", "http://wixtoolset.org/schemas/v4/wxs");
45648 base.OutputXml(writer);
45649 writer.WriteEndElement();
45650 }
45651 }
45652
45653 /// <summary>
45654 /// Starts system services. The condition for this action may be specified in the element's inner text.
45655 /// </summary>
45656 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45657 public class StartServices : ActionSequenceType, ISchemaElement
45658 {
45659
45660 /// <summary>
45661 /// Processes this element and all child elements into an XmlWriter.
45662 /// </summary>
45663 public override void OutputXml(XmlWriter writer)
45664 {
45665 if ((null == writer))
45666 {
45667 throw new ArgumentNullException("writer");
45668 }
45669 writer.WriteStartElement("StartServices", "http://wixtoolset.org/schemas/v4/wxs");
45670 base.OutputXml(writer);
45671 writer.WriteEndElement();
45672 }
45673 }
45674
45675 /// <summary>
45676 /// Registers the user information with the installer to identify the user of a product. The condition for this action may be specified in the element's inner text.
45677 /// </summary>
45678 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45679 public class RegisterUser : ActionSequenceType, ISchemaElement
45680 {
45681
45682 /// <summary>
45683 /// Processes this element and all child elements into an XmlWriter.
45684 /// </summary>
45685 public override void OutputXml(XmlWriter writer)
45686 {
45687 if ((null == writer))
45688 {
45689 throw new ArgumentNullException("writer");
45690 }
45691 writer.WriteStartElement("RegisterUser", "http://wixtoolset.org/schemas/v4/wxs");
45692 base.OutputXml(writer);
45693 writer.WriteEndElement();
45694 }
45695 }
45696
45697 /// <summary>
45698 /// Registers the product information with the installer. The condition for this action may be specified in the element's inner text.
45699 /// </summary>
45700 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45701 public class RegisterProduct : ActionSequenceType, ISchemaElement
45702 {
45703
45704 /// <summary>
45705 /// Processes this element and all child elements into an XmlWriter.
45706 /// </summary>
45707 public override void OutputXml(XmlWriter writer)
45708 {
45709 if ((null == writer))
45710 {
45711 throw new ArgumentNullException("writer");
45712 }
45713 writer.WriteStartElement("RegisterProduct", "http://wixtoolset.org/schemas/v4/wxs");
45714 base.OutputXml(writer);
45715 writer.WriteEndElement();
45716 }
45717 }
45718
45719 /// <summary>
45720 /// Manages the advertisement of the components from the PublishComponent table. The condition for this action may be specified in the element's inner text.
45721 /// </summary>
45722 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45723 public class PublishComponents : ActionSequenceType, ISchemaElement
45724 {
45725
45726 /// <summary>
45727 /// Processes this element and all child elements into an XmlWriter.
45728 /// </summary>
45729 public override void OutputXml(XmlWriter writer)
45730 {
45731 if ((null == writer))
45732 {
45733 throw new ArgumentNullException("writer");
45734 }
45735 writer.WriteStartElement("PublishComponents", "http://wixtoolset.org/schemas/v4/wxs");
45736 base.OutputXml(writer);
45737 writer.WriteEndElement();
45738 }
45739 }
45740
45741 /// <summary>
45742 /// Manages the advertisement of CLR and Win32 assemblies. The condition for this action may be specified in the element's inner text.
45743 /// </summary>
45744 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45745 public class MsiPublishAssemblies : ActionSequenceType, ISchemaElement
45746 {
45747
45748 /// <summary>
45749 /// Processes this element and all child elements into an XmlWriter.
45750 /// </summary>
45751 public override void OutputXml(XmlWriter writer)
45752 {
45753 if ((null == writer))
45754 {
45755 throw new ArgumentNullException("writer");
45756 }
45757 writer.WriteStartElement("MsiPublishAssemblies", "http://wixtoolset.org/schemas/v4/wxs");
45758 base.OutputXml(writer);
45759 writer.WriteEndElement();
45760 }
45761 }
45762
45763 /// <summary>
45764 /// Writes each feature's state into the system registry. The condition for this action may be specified in the element's inner text.
45765 /// </summary>
45766 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45767 public class PublishFeatures : ActionSequenceType, ISchemaElement
45768 {
45769
45770 /// <summary>
45771 /// Processes this element and all child elements into an XmlWriter.
45772 /// </summary>
45773 public override void OutputXml(XmlWriter writer)
45774 {
45775 if ((null == writer))
45776 {
45777 throw new ArgumentNullException("writer");
45778 }
45779 writer.WriteStartElement("PublishFeatures", "http://wixtoolset.org/schemas/v4/wxs");
45780 base.OutputXml(writer);
45781 writer.WriteEndElement();
45782 }
45783 }
45784
45785 /// <summary>
45786 /// Manages the advertisement of the product information with the system. The condition for this action may be specified in the element's inner text.
45787 /// </summary>
45788 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45789 public class PublishProduct : ActionSequenceType, ISchemaElement
45790 {
45791
45792 /// <summary>
45793 /// Processes this element and all child elements into an XmlWriter.
45794 /// </summary>
45795 public override void OutputXml(XmlWriter writer)
45796 {
45797 if ((null == writer))
45798 {
45799 throw new ArgumentNullException("writer");
45800 }
45801 writer.WriteStartElement("PublishProduct", "http://wixtoolset.org/schemas/v4/wxs");
45802 base.OutputXml(writer);
45803 writer.WriteEndElement();
45804 }
45805 }
45806
45807 /// <summary>
45808 /// Marks the end of a sequence of actions that change the system. The condition for this action may be specified in the element's inner text.
45809 /// </summary>
45810 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45811 public class InstallFinalize : ActionSequenceType, ISchemaElement
45812 {
45813
45814 /// <summary>
45815 /// Processes this element and all child elements into an XmlWriter.
45816 /// </summary>
45817 public override void OutputXml(XmlWriter writer)
45818 {
45819 if ((null == writer))
45820 {
45821 throw new ArgumentNullException("writer");
45822 }
45823 writer.WriteStartElement("InstallFinalize", "http://wixtoolset.org/schemas/v4/wxs");
45824 base.OutputXml(writer);
45825 writer.WriteEndElement();
45826 }
45827 }
45828
45829 /// <summary>
45830 /// Uses file signatures to search for existing versions of products. The AppSearch action may use this information to determine where upgrades are to be installed. The AppSearch action can also be used to set a property to the existing value of an registry or .ini file entry. AppSearch should be authored into the InstallUISequence table and InstallExecuteSequence table. The installer prevents The AppSearch action from running in the InstallExecuteSequence sequence if the action has already run in InstallUISequence sequence. The AppSearch action searches for file signatures using the CompLocator table first, the RegLocator table next, then the IniLocator table, and finally the DrLocator table. The condition for this action may be specified in the element's inner text.
45831 /// </summary>
45832 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45833 public class AppSearch : ActionModuleSequenceType, ISchemaElement
45834 {
45835
45836 /// <summary>
45837 /// Processes this element and all child elements into an XmlWriter.
45838 /// </summary>
45839 public override void OutputXml(XmlWriter writer)
45840 {
45841 if ((null == writer))
45842 {
45843 throw new ArgumentNullException("writer");
45844 }
45845 writer.WriteStartElement("AppSearch", "http://wixtoolset.org/schemas/v4/wxs");
45846 base.OutputXml(writer);
45847 writer.WriteEndElement();
45848 }
45849 }
45850
45851 /// <summary>
45852 /// Uses file signatures to validate that qualifying products are installed on a system before an upgrade installation is performed. The CCPSearch action should be authored into the InstallUISequence table and InstallExecuteSequence table. The installer prevents the CCPSearch action from running in the InstallExecuteSequence sequence if the action has already run in InstallUISequence sequence. The CCPSearch action must come before the RMCCPSearch action. The condition for this action may be specified in the element's inner text.
45853 /// </summary>
45854 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45855 public class CCPSearch : ActionModuleSequenceType, ISchemaElement
45856 {
45857
45858 /// <summary>
45859 /// Processes this element and all child elements into an XmlWriter.
45860 /// </summary>
45861 public override void OutputXml(XmlWriter writer)
45862 {
45863 if ((null == writer))
45864 {
45865 throw new ArgumentNullException("writer");
45866 }
45867 writer.WriteStartElement("CCPSearch", "http://wixtoolset.org/schemas/v4/wxs");
45868 base.OutputXml(writer);
45869 writer.WriteEndElement();
45870 }
45871 }
45872
45873 /// <summary>
45874 /// Uses file signatures to validate that qualifying products are installed on a system before an upgrade installation is performed. The RMCCPSearch action should be authored into the InstallUISequence table and InstallExecuteSequence table. The installer prevents RMCCPSearch from running in the InstallExecuteSequence sequence if the action has already run in InstallUISequence sequence. The RMCCPSearch action requires the CCP_DRIVE property to be set to the root path on the removable volume that has the installation for any of the qualifying products. The condition for this action may be specified in the element's inner text.
45875 /// </summary>
45876 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45877 public class RMCCPSearch : ActionModuleSequenceType, ISchemaElement
45878 {
45879
45880 /// <summary>
45881 /// Processes this element and all child elements into an XmlWriter.
45882 /// </summary>
45883 public override void OutputXml(XmlWriter writer)
45884 {
45885 if ((null == writer))
45886 {
45887 throw new ArgumentNullException("writer");
45888 }
45889 writer.WriteStartElement("RMCCPSearch", "http://wixtoolset.org/schemas/v4/wxs");
45890 base.OutputXml(writer);
45891 writer.WriteEndElement();
45892 }
45893 }
45894
45895 /// <summary>
45896 /// Queries the LaunchCondition table and evaluates each conditional statement recorded there. If any of these conditional statements fail, an error message is displayed to the user and the installation is terminated. The LaunchConditions action is optional. This action is normally the first in the sequence, but the AppSearch Action may be sequenced before the LaunchConditions action. If there are launch conditions that do not apply to all installation modes, the appropriate installation mode property should be used in a conditional expression in the appropriate sequence table. The condition for this action may be specified in the element's inner text.
45897 /// </summary>
45898 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45899 public class LaunchConditions : ActionModuleSequenceType, ISchemaElement
45900 {
45901
45902 /// <summary>
45903 /// Processes this element and all child elements into an XmlWriter.
45904 /// </summary>
45905 public override void OutputXml(XmlWriter writer)
45906 {
45907 if ((null == writer))
45908 {
45909 throw new ArgumentNullException("writer");
45910 }
45911 writer.WriteStartElement("LaunchConditions", "http://wixtoolset.org/schemas/v4/wxs");
45912 base.OutputXml(writer);
45913 writer.WriteEndElement();
45914 }
45915 }
45916
45917 /// <summary>
45918 /// Runs through each record of the Upgrade table in sequence and compares the upgrade code, product version, and language in each row to products installed on the system. When FindRelatedProducts detects a correspondence between the upgrade information and an installed product, it appends the product code to the property specified in the ActionProperty column of the UpgradeTable. The FindRelatedProducts action only runs the first time the product is installed. The FindRelatedProducts action does not run during maintenance mode or uninstallation. FindRelatedProducts should be authored into the InstallUISequence table and InstallExecuteSequence tables. The installer prevents FindRelatedProducts from running in InstallExecuteSequence if the action has already run in InstallUISequence. The FindRelatedProducts action must come before the MigrateFeatureStates action and the RemoveExistingProducts action. The condition for this action may be specified in the element's inner text.
45919 /// </summary>
45920 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45921 public class FindRelatedProducts : ActionModuleSequenceType, ISchemaElement
45922 {
45923
45924 /// <summary>
45925 /// Processes this element and all child elements into an XmlWriter.
45926 /// </summary>
45927 public override void OutputXml(XmlWriter writer)
45928 {
45929 if ((null == writer))
45930 {
45931 throw new ArgumentNullException("writer");
45932 }
45933 writer.WriteStartElement("FindRelatedProducts", "http://wixtoolset.org/schemas/v4/wxs");
45934 base.OutputXml(writer);
45935 writer.WriteEndElement();
45936 }
45937 }
45938
45939 /// <summary>
45940 /// Runs a script containing all operations spooled since either the start of the installation or the last InstallExecute action, or InstallExecuteAgain action. Special actions don't have a built-in sequence number and thus must appear relative to another action. The suggested way to do this is by using the Before or After attribute. InstallExecute and InstallExecuteAgain can optionally appear anywhere between InstallInitialize and InstallFinalize.
45941 /// </summary>
45942 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45943 public class InstallExecute : ActionModuleSequenceType, ISchemaElement
45944 {
45945
45946 /// <summary>
45947 /// Processes this element and all child elements into an XmlWriter.
45948 /// </summary>
45949 public override void OutputXml(XmlWriter writer)
45950 {
45951 if ((null == writer))
45952 {
45953 throw new ArgumentNullException("writer");
45954 }
45955 writer.WriteStartElement("InstallExecute", "http://wixtoolset.org/schemas/v4/wxs");
45956 base.OutputXml(writer);
45957 writer.WriteEndElement();
45958 }
45959 }
45960
45961 /// <summary>
45962 /// Runs a script containing all operations spooled since either the start of the installation or the last InstallExecute action, or InstallExecuteAgain action. Should only be used after InstallExecute. Special actions don't have a built-in sequence number and thus must appear relative to another action. The suggested way to do this is by using the Before or After attribute. InstallExecute and InstallExecuteAgain can optionally appear anywhere between InstallInitialize and InstallFinalize.
45963 /// </summary>
45964 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45965 public class InstallExecuteAgain : ActionModuleSequenceType, ISchemaElement
45966 {
45967
45968 /// <summary>
45969 /// Processes this element and all child elements into an XmlWriter.
45970 /// </summary>
45971 public override void OutputXml(XmlWriter writer)
45972 {
45973 if ((null == writer))
45974 {
45975 throw new ArgumentNullException("writer");
45976 }
45977 writer.WriteStartElement("InstallExecuteAgain", "http://wixtoolset.org/schemas/v4/wxs");
45978 base.OutputXml(writer);
45979 writer.WriteEndElement();
45980 }
45981 }
45982
45983 /// <summary>
45984 /// Disables rollback for the remainder of the installation. Special actions don't have a built-in sequence number and thus must appear relative to another action. The suggested way to do this is by using the Before or After attribute. InstallExecute and InstallExecuteAgain can optionally appear anywhere between InstallInitialize and InstallFinalize.
45985 /// </summary>
45986 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45987 public class DisableRollback : ActionModuleSequenceType, ISchemaElement
45988 {
45989
45990 /// <summary>
45991 /// Processes this element and all child elements into an XmlWriter.
45992 /// </summary>
45993 public override void OutputXml(XmlWriter writer)
45994 {
45995 if ((null == writer))
45996 {
45997 throw new ArgumentNullException("writer");
45998 }
45999 writer.WriteStartElement("DisableRollback", "http://wixtoolset.org/schemas/v4/wxs");
46000 base.OutputXml(writer);
46001 writer.WriteEndElement();
46002 }
46003 }
46004
46005 /// <summary>
46006 /// Goes through the product codes listed in the ActionProperty column of the Upgrade table and removes the products in sequence. Special actions don't have a built-in sequence number and thus must appear relative to another action. The suggested way to do this is by using the Before or After attribute. InstallExecute and InstallExecuteAgain can optionally appear anywhere between InstallInitialize and InstallFinalize.
46007 /// </summary>
46008 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46009 public class RemoveExistingProducts : ActionModuleSequenceType, ISchemaElement
46010 {
46011
46012 /// <summary>
46013 /// Processes this element and all child elements into an XmlWriter.
46014 /// </summary>
46015 public override void OutputXml(XmlWriter writer)
46016 {
46017 if ((null == writer))
46018 {
46019 throw new ArgumentNullException("writer");
46020 }
46021 writer.WriteStartElement("RemoveExistingProducts", "http://wixtoolset.org/schemas/v4/wxs");
46022 base.OutputXml(writer);
46023 writer.WriteEndElement();
46024 }
46025 }
46026
46027 /// <summary>
46028 /// Prompts the user to restart the system at the end of installation. Special actions don't have a built-in sequence number and thus must appear relative to another action. The suggested way to do this is by using the Before or After attribute. InstallExecute and InstallExecuteAgain can optionally appear anywhere between InstallInitialize and InstallFinalize.
46029 /// </summary>
46030 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46031 public class ScheduleReboot : ActionModuleSequenceType, ISchemaElement
46032 {
46033
46034 /// <summary>
46035 /// Processes this element and all child elements into an XmlWriter.
46036 /// </summary>
46037 public override void OutputXml(XmlWriter writer)
46038 {
46039 if ((null == writer))
46040 {
46041 throw new ArgumentNullException("writer");
46042 }
46043 writer.WriteStartElement("ScheduleReboot", "http://wixtoolset.org/schemas/v4/wxs");
46044 base.OutputXml(writer);
46045 writer.WriteEndElement();
46046 }
46047 }
46048
46049 /// <summary>
46050 /// Prompts the user for a restart of the system during the installation. Special actions don't have a built-in sequence number and thus must appear relative to another action. The suggested way to do this is by using the Before or After attribute. InstallExecute and InstallExecuteAgain can optionally appear anywhere between InstallInitialize and InstallFinalize.
46051 /// </summary>
46052 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46053 public class ForceReboot : ActionModuleSequenceType, ISchemaElement
46054 {
46055
46056 /// <summary>
46057 /// Processes this element and all child elements into an XmlWriter.
46058 /// </summary>
46059 public override void OutputXml(XmlWriter writer)
46060 {
46061 if ((null == writer))
46062 {
46063 throw new ArgumentNullException("writer");
46064 }
46065 writer.WriteStartElement("ForceReboot", "http://wixtoolset.org/schemas/v4/wxs");
46066 base.OutputXml(writer);
46067 writer.WriteEndElement();
46068 }
46069 }
46070
46071 /// <summary>
46072 /// Determines the location of the source and sets the SourceDir property if the source has not been resolved yet. Special actions don't have a built-in sequence number and thus must appear relative to another action. The suggested way to do this is by using the Before or After attribute. InstallExecute and InstallExecuteAgain can optionally appear anywhere between InstallInitialize and InstallFinalize.
46073 /// </summary>
46074 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46075 public class ResolveSource : ActionModuleSequenceType, ISchemaElement
46076 {
46077
46078 /// <summary>
46079 /// Processes this element and all child elements into an XmlWriter.
46080 /// </summary>
46081 public override void OutputXml(XmlWriter writer)
46082 {
46083 if ((null == writer))
46084 {
46085 throw new ArgumentNullException("writer");
46086 }
46087 writer.WriteStartElement("ResolveSource", "http://wixtoolset.org/schemas/v4/wxs");
46088 base.OutputXml(writer);
46089 writer.WriteEndElement();
46090 }
46091 }
46092
46093 /// <summary>
46094 /// Use to sequence a custom action.
46095 /// </summary>
46096 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46097 public class Custom : ISchemaElement, ISetAttributes
46098 {
46099
46100 private string actionField;
46101
46102 private bool actionFieldSet;
46103
46104 private ExitType onExitField;
46105
46106 private bool onExitFieldSet;
46107
46108 private string beforeField;
46109
46110 private bool beforeFieldSet;
46111
46112 private string afterField;
46113
46114 private bool afterFieldSet;
46115
46116 private YesNoType overridableField;
46117
46118 private bool overridableFieldSet;
46119
46120 private int sequenceField;
46121
46122 private bool sequenceFieldSet;
46123
46124 private string contentField;
46125
46126 private bool contentFieldSet;
46127
46128 private ISchemaElement parentElement;
46129
46130 /// <summary>
46131 /// The action to which the Custom element applies.
46132 /// </summary>
46133 public string Action
46134 {
46135 get
46136 {
46137 return this.actionField;
46138 }
46139 set
46140 {
46141 this.actionFieldSet = true;
46142 this.actionField = value;
46143 }
46144 }
46145
46146 /// <summary>
46147 /// Mutually exclusive with Before, After, and Sequence attributes
46148 /// </summary>
46149 public ExitType OnExit
46150 {
46151 get
46152 {
46153 return this.onExitField;
46154 }
46155 set
46156 {
46157 this.onExitFieldSet = true;
46158 this.onExitField = value;
46159 }
46160 }
46161
46162 /// <summary>
46163 /// The name of the standard or custom action before which this action should be performed. Mutually exclusive with OnExit, After, and Sequence attributes
46164 /// </summary>
46165 public string Before
46166 {
46167 get
46168 {
46169 return this.beforeField;
46170 }
46171 set
46172 {
46173 this.beforeFieldSet = true;
46174 this.beforeField = value;
46175 }
46176 }
46177
46178 /// <summary>
46179 /// The name of the standard or custom action after which this action should be performed. Mutually exclusive with Before, OnExit, and Sequence attributes
46180 /// </summary>
46181 public string After
46182 {
46183 get
46184 {
46185 return this.afterField;
46186 }
46187 set
46188 {
46189 this.afterFieldSet = true;
46190 this.afterField = value;
46191 }
46192 }
46193
46194 /// <summary>
46195 /// If "yes", the sequencing of this action may be overridden by sequencing elsewhere.
46196 /// </summary>
46197 public YesNoType Overridable
46198 {
46199 get
46200 {
46201 return this.overridableField;
46202 }
46203 set
46204 {
46205 this.overridableFieldSet = true;
46206 this.overridableField = value;
46207 }
46208 }
46209
46210 /// <summary>
46211 /// The sequence number for this action. Mutually exclusive with Before, After, and OnExit attributes
46212 /// </summary>
46213 public int Sequence
46214 {
46215 get
46216 {
46217 return this.sequenceField;
46218 }
46219 set
46220 {
46221 this.sequenceFieldSet = true;
46222 this.sequenceField = value;
46223 }
46224 }
46225
46226 /// <summary>
46227 /// Text node specifies the condition of the action.
46228 /// </summary>
46229 public string Content
46230 {
46231 get
46232 {
46233 return this.contentField;
46234 }
46235 set
46236 {
46237 this.contentFieldSet = true;
46238 this.contentField = value;
46239 }
46240 }
46241
46242 public virtual ISchemaElement ParentElement
46243 {
46244 get
46245 {
46246 return this.parentElement;
46247 }
46248 set
46249 {
46250 this.parentElement = value;
46251 }
46252 }
46253
46254 /// <summary>
46255 /// Processes this element and all child elements into an XmlWriter.
46256 /// </summary>
46257 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
46258 public virtual void OutputXml(XmlWriter writer)
46259 {
46260 if ((null == writer))
46261 {
46262 throw new ArgumentNullException("writer");
46263 }
46264 writer.WriteStartElement("Custom", "http://wixtoolset.org/schemas/v4/wxs");
46265 if (this.actionFieldSet)
46266 {
46267 writer.WriteAttributeString("Action", this.actionField);
46268 }
46269 if (this.onExitFieldSet)
46270 {
46271 if ((this.onExitField == ExitType.success))
46272 {
46273 writer.WriteAttributeString("OnExit", "success");
46274 }
46275 if ((this.onExitField == ExitType.cancel))
46276 {
46277 writer.WriteAttributeString("OnExit", "cancel");
46278 }
46279 if ((this.onExitField == ExitType.error))
46280 {
46281 writer.WriteAttributeString("OnExit", "error");
46282 }
46283 if ((this.onExitField == ExitType.suspend))
46284 {
46285 writer.WriteAttributeString("OnExit", "suspend");
46286 }
46287 }
46288 if (this.beforeFieldSet)
46289 {
46290 writer.WriteAttributeString("Before", this.beforeField);
46291 }
46292 if (this.afterFieldSet)
46293 {
46294 writer.WriteAttributeString("After", this.afterField);
46295 }
46296 if (this.overridableFieldSet)
46297 {
46298 if ((this.overridableField == YesNoType.no))
46299 {
46300 writer.WriteAttributeString("Overridable", "no");
46301 }
46302 if ((this.overridableField == YesNoType.yes))
46303 {
46304 writer.WriteAttributeString("Overridable", "yes");
46305 }
46306 }
46307 if (this.sequenceFieldSet)
46308 {
46309 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
46310 }
46311 if (this.contentFieldSet)
46312 {
46313 writer.WriteString(this.contentField);
46314 }
46315 writer.WriteEndElement();
46316 }
46317
46318 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
46319 void ISetAttributes.SetAttribute(string name, string value)
46320 {
46321 if (String.IsNullOrEmpty(name))
46322 {
46323 throw new ArgumentNullException("name");
46324 }
46325 if (("Action" == name))
46326 {
46327 this.actionField = value;
46328 this.actionFieldSet = true;
46329 }
46330 if (("OnExit" == name))
46331 {
46332 this.onExitField = Enums.ParseExitType(value);
46333 this.onExitFieldSet = true;
46334 }
46335 if (("Before" == name))
46336 {
46337 this.beforeField = value;
46338 this.beforeFieldSet = true;
46339 }
46340 if (("After" == name))
46341 {
46342 this.afterField = value;
46343 this.afterFieldSet = true;
46344 }
46345 if (("Overridable" == name))
46346 {
46347 this.overridableField = Enums.ParseYesNoType(value);
46348 this.overridableFieldSet = true;
46349 }
46350 if (("Sequence" == name))
46351 {
46352 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
46353 this.sequenceFieldSet = true;
46354 }
46355 if (("Content" == name))
46356 {
46357 this.contentField = value;
46358 this.contentFieldSet = true;
46359 }
46360 }
46361 }
46362
46363 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46364 public class Show : ISchemaElement, ISetAttributes
46365 {
46366
46367 private string dialogField;
46368
46369 private bool dialogFieldSet;
46370
46371 private ExitType onExitField;
46372
46373 private bool onExitFieldSet;
46374
46375 private string beforeField;
46376
46377 private bool beforeFieldSet;
46378
46379 private string afterField;
46380
46381 private bool afterFieldSet;
46382
46383 private YesNoType overridableField;
46384
46385 private bool overridableFieldSet;
46386
46387 private int sequenceField;
46388
46389 private bool sequenceFieldSet;
46390
46391 private string contentField;
46392
46393 private bool contentFieldSet;
46394
46395 private ISchemaElement parentElement;
46396
46397 public string Dialog
46398 {
46399 get
46400 {
46401 return this.dialogField;
46402 }
46403 set
46404 {
46405 this.dialogFieldSet = true;
46406 this.dialogField = value;
46407 }
46408 }
46409
46410 /// <summary>
46411 /// mutually exclusive with Before, After, and Sequence attributes
46412 /// </summary>
46413 public ExitType OnExit
46414 {
46415 get
46416 {
46417 return this.onExitField;
46418 }
46419 set
46420 {
46421 this.onExitFieldSet = true;
46422 this.onExitField = value;
46423 }
46424 }
46425
46426 public string Before
46427 {
46428 get
46429 {
46430 return this.beforeField;
46431 }
46432 set
46433 {
46434 this.beforeFieldSet = true;
46435 this.beforeField = value;
46436 }
46437 }
46438
46439 public string After
46440 {
46441 get
46442 {
46443 return this.afterField;
46444 }
46445 set
46446 {
46447 this.afterFieldSet = true;
46448 this.afterField = value;
46449 }
46450 }
46451
46452 /// <summary>
46453 /// If "yes", the sequencing of this dialog may be overridden by sequencing elsewhere.
46454 /// </summary>
46455 public YesNoType Overridable
46456 {
46457 get
46458 {
46459 return this.overridableField;
46460 }
46461 set
46462 {
46463 this.overridableFieldSet = true;
46464 this.overridableField = value;
46465 }
46466 }
46467
46468 public int Sequence
46469 {
46470 get
46471 {
46472 return this.sequenceField;
46473 }
46474 set
46475 {
46476 this.sequenceFieldSet = true;
46477 this.sequenceField = value;
46478 }
46479 }
46480
46481 public string Content
46482 {
46483 get
46484 {
46485 return this.contentField;
46486 }
46487 set
46488 {
46489 this.contentFieldSet = true;
46490 this.contentField = value;
46491 }
46492 }
46493
46494 public virtual ISchemaElement ParentElement
46495 {
46496 get
46497 {
46498 return this.parentElement;
46499 }
46500 set
46501 {
46502 this.parentElement = value;
46503 }
46504 }
46505
46506 /// <summary>
46507 /// Processes this element and all child elements into an XmlWriter.
46508 /// </summary>
46509 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
46510 public virtual void OutputXml(XmlWriter writer)
46511 {
46512 if ((null == writer))
46513 {
46514 throw new ArgumentNullException("writer");
46515 }
46516 writer.WriteStartElement("Show", "http://wixtoolset.org/schemas/v4/wxs");
46517 if (this.dialogFieldSet)
46518 {
46519 writer.WriteAttributeString("Dialog", this.dialogField);
46520 }
46521 if (this.onExitFieldSet)
46522 {
46523 if ((this.onExitField == ExitType.success))
46524 {
46525 writer.WriteAttributeString("OnExit", "success");
46526 }
46527 if ((this.onExitField == ExitType.cancel))
46528 {
46529 writer.WriteAttributeString("OnExit", "cancel");
46530 }
46531 if ((this.onExitField == ExitType.error))
46532 {
46533 writer.WriteAttributeString("OnExit", "error");
46534 }
46535 if ((this.onExitField == ExitType.suspend))
46536 {
46537 writer.WriteAttributeString("OnExit", "suspend");
46538 }
46539 }
46540 if (this.beforeFieldSet)
46541 {
46542 writer.WriteAttributeString("Before", this.beforeField);
46543 }
46544 if (this.afterFieldSet)
46545 {
46546 writer.WriteAttributeString("After", this.afterField);
46547 }
46548 if (this.overridableFieldSet)
46549 {
46550 if ((this.overridableField == YesNoType.no))
46551 {
46552 writer.WriteAttributeString("Overridable", "no");
46553 }
46554 if ((this.overridableField == YesNoType.yes))
46555 {
46556 writer.WriteAttributeString("Overridable", "yes");
46557 }
46558 }
46559 if (this.sequenceFieldSet)
46560 {
46561 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
46562 }
46563 if (this.contentFieldSet)
46564 {
46565 writer.WriteString(this.contentField);
46566 }
46567 writer.WriteEndElement();
46568 }
46569
46570 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
46571 void ISetAttributes.SetAttribute(string name, string value)
46572 {
46573 if (String.IsNullOrEmpty(name))
46574 {
46575 throw new ArgumentNullException("name");
46576 }
46577 if (("Dialog" == name))
46578 {
46579 this.dialogField = value;
46580 this.dialogFieldSet = true;
46581 }
46582 if (("OnExit" == name))
46583 {
46584 this.onExitField = Enums.ParseExitType(value);
46585 this.onExitFieldSet = true;
46586 }
46587 if (("Before" == name))
46588 {
46589 this.beforeField = value;
46590 this.beforeFieldSet = true;
46591 }
46592 if (("After" == name))
46593 {
46594 this.afterField = value;
46595 this.afterFieldSet = true;
46596 }
46597 if (("Overridable" == name))
46598 {
46599 this.overridableField = Enums.ParseYesNoType(value);
46600 this.overridableFieldSet = true;
46601 }
46602 if (("Sequence" == name))
46603 {
46604 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
46605 this.sequenceFieldSet = true;
46606 }
46607 if (("Content" == name))
46608 {
46609 this.contentField = value;
46610 this.contentFieldSet = true;
46611 }
46612 }
46613 }
46614
46615 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46616 public class InstallUISequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
46617 {
46618
46619 private ElementCollection children;
46620
46621 private ISchemaElement parentElement;
46622
46623 public InstallUISequence()
46624 {
46625 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
46626 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom)));
46627 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Show)));
46628 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ScheduleReboot)));
46629 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions)));
46630 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FindRelatedProducts)));
46631 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppSearch)));
46632 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CCPSearch)));
46633 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RMCCPSearch)));
46634 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ValidateProductID)));
46635 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize)));
46636 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost)));
46637 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponents)));
46638 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource)));
46639 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize)));
46640 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MigrateFeatureStates)));
46641 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExecuteAction)));
46642 this.children = childCollection0;
46643 }
46644
46645 public virtual IEnumerable Children
46646 {
46647 get
46648 {
46649 return this.children;
46650 }
46651 }
46652
46653 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
46654 public virtual IEnumerable this[System.Type childType]
46655 {
46656 get
46657 {
46658 return this.children.Filter(childType);
46659 }
46660 }
46661
46662 public virtual ISchemaElement ParentElement
46663 {
46664 get
46665 {
46666 return this.parentElement;
46667 }
46668 set
46669 {
46670 this.parentElement = value;
46671 }
46672 }
46673
46674 public virtual void AddChild(ISchemaElement child)
46675 {
46676 if ((null == child))
46677 {
46678 throw new ArgumentNullException("child");
46679 }
46680 this.children.AddElement(child);
46681 child.ParentElement = this;
46682 }
46683
46684 public virtual void RemoveChild(ISchemaElement child)
46685 {
46686 if ((null == child))
46687 {
46688 throw new ArgumentNullException("child");
46689 }
46690 this.children.RemoveElement(child);
46691 child.ParentElement = null;
46692 }
46693
46694 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
46695 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
46696 ISchemaElement ICreateChildren.CreateChild(string childName)
46697 {
46698 if (String.IsNullOrEmpty(childName))
46699 {
46700 throw new ArgumentNullException("childName");
46701 }
46702 ISchemaElement childValue = null;
46703 if (("Custom" == childName))
46704 {
46705 childValue = new Custom();
46706 }
46707 if (("Show" == childName))
46708 {
46709 childValue = new Show();
46710 }
46711 if (("ScheduleReboot" == childName))
46712 {
46713 childValue = new ScheduleReboot();
46714 }
46715 if (("LaunchConditions" == childName))
46716 {
46717 childValue = new LaunchConditions();
46718 }
46719 if (("FindRelatedProducts" == childName))
46720 {
46721 childValue = new FindRelatedProducts();
46722 }
46723 if (("AppSearch" == childName))
46724 {
46725 childValue = new AppSearch();
46726 }
46727 if (("CCPSearch" == childName))
46728 {
46729 childValue = new CCPSearch();
46730 }
46731 if (("RMCCPSearch" == childName))
46732 {
46733 childValue = new RMCCPSearch();
46734 }
46735 if (("ValidateProductID" == childName))
46736 {
46737 childValue = new ValidateProductID();
46738 }
46739 if (("CostInitialize" == childName))
46740 {
46741 childValue = new CostInitialize();
46742 }
46743 if (("FileCost" == childName))
46744 {
46745 childValue = new FileCost();
46746 }
46747 if (("IsolateComponents" == childName))
46748 {
46749 childValue = new IsolateComponents();
46750 }
46751 if (("ResolveSource" == childName))
46752 {
46753 childValue = new ResolveSource();
46754 }
46755 if (("CostFinalize" == childName))
46756 {
46757 childValue = new CostFinalize();
46758 }
46759 if (("MigrateFeatureStates" == childName))
46760 {
46761 childValue = new MigrateFeatureStates();
46762 }
46763 if (("ExecuteAction" == childName))
46764 {
46765 childValue = new ExecuteAction();
46766 }
46767 if ((null == childValue))
46768 {
46769 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
46770 }
46771 return childValue;
46772 }
46773
46774 /// <summary>
46775 /// Processes this element and all child elements into an XmlWriter.
46776 /// </summary>
46777 public virtual void OutputXml(XmlWriter writer)
46778 {
46779 if ((null == writer))
46780 {
46781 throw new ArgumentNullException("writer");
46782 }
46783 writer.WriteStartElement("InstallUISequence", "http://wixtoolset.org/schemas/v4/wxs");
46784 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
46785 {
46786 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
46787 childElement.OutputXml(writer);
46788 }
46789 writer.WriteEndElement();
46790 }
46791
46792 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
46793 void ISetAttributes.SetAttribute(string name, string value)
46794 {
46795 if (String.IsNullOrEmpty(name))
46796 {
46797 throw new ArgumentNullException("name");
46798 }
46799 }
46800 }
46801
46802 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46803 public class InstallExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
46804 {
46805
46806 private ElementCollection children;
46807
46808 private ISchemaElement parentElement;
46809
46810 public InstallExecuteSequence()
46811 {
46812 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
46813 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom)));
46814 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ScheduleReboot)));
46815 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ForceReboot)));
46816 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource)));
46817 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions)));
46818 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FindRelatedProducts)));
46819 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppSearch)));
46820 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CCPSearch)));
46821 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RMCCPSearch)));
46822 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ValidateProductID)));
46823 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize)));
46824 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost)));
46825 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponents)));
46826 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize)));
46827 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetODBCFolders)));
46828 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MigrateFeatureStates)));
46829 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate)));
46830 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize)));
46831 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AllocateRegistrySpace)));
46832 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProcessComponents)));
46833 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnpublishComponents)));
46834 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnpublishFeatures)));
46835 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(StopServices)));
46836 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DeleteServices)));
46837 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterComPlus)));
46838 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SelfUnregModules)));
46839 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterTypeLibraries)));
46840 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveODBC)));
46841 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterFonts)));
46842 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryValues)));
46843 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterClassInfo)));
46844 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterExtensionInfo)));
46845 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterProgIdInfo)));
46846 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterMIMEInfo)));
46847 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveIniValues)));
46848 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveShortcuts)));
46849 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveEnvironmentStrings)));
46850 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveDuplicateFiles)));
46851 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFiles)));
46852 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFolders)));
46853 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateFolders)));
46854 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MoveFiles)));
46855 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles)));
46856 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DuplicateFiles)));
46857 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFiles)));
46858 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BindImage)));
46859 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateShortcuts)));
46860 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterClassInfo)));
46861 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterExtensionInfo)));
46862 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProgIdInfo)));
46863 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterMIMEInfo)));
46864 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteRegistryValues)));
46865 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteIniValues)));
46866 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteEnvironmentStrings)));
46867 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterFonts)));
46868 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallODBC)));
46869 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterTypeLibraries)));
46870 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SelfRegModules)));
46871 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterComPlus)));
46872 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallServices)));
46873 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(StartServices)));
46874 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterUser)));
46875 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProduct)));
46876 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishComponents)));
46877 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishFeatures)));
46878 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishProduct)));
46879 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize)));
46880 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveExistingProducts)));
46881 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DisableRollback)));
46882 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallExecute)));
46883 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallExecuteAgain)));
46884 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPublishAssemblies)));
46885 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiUnpublishAssemblies)));
46886 this.children = childCollection0;
46887 }
46888
46889 public virtual IEnumerable Children
46890 {
46891 get
46892 {
46893 return this.children;
46894 }
46895 }
46896
46897 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
46898 public virtual IEnumerable this[System.Type childType]
46899 {
46900 get
46901 {
46902 return this.children.Filter(childType);
46903 }
46904 }
46905
46906 public virtual ISchemaElement ParentElement
46907 {
46908 get
46909 {
46910 return this.parentElement;
46911 }
46912 set
46913 {
46914 this.parentElement = value;
46915 }
46916 }
46917
46918 public virtual void AddChild(ISchemaElement child)
46919 {
46920 if ((null == child))
46921 {
46922 throw new ArgumentNullException("child");
46923 }
46924 this.children.AddElement(child);
46925 child.ParentElement = this;
46926 }
46927
46928 public virtual void RemoveChild(ISchemaElement child)
46929 {
46930 if ((null == child))
46931 {
46932 throw new ArgumentNullException("child");
46933 }
46934 this.children.RemoveElement(child);
46935 child.ParentElement = null;
46936 }
46937
46938 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
46939 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
46940 ISchemaElement ICreateChildren.CreateChild(string childName)
46941 {
46942 if (String.IsNullOrEmpty(childName))
46943 {
46944 throw new ArgumentNullException("childName");
46945 }
46946 ISchemaElement childValue = null;
46947 if (("Custom" == childName))
46948 {
46949 childValue = new Custom();
46950 }
46951 if (("ScheduleReboot" == childName))
46952 {
46953 childValue = new ScheduleReboot();
46954 }
46955 if (("ForceReboot" == childName))
46956 {
46957 childValue = new ForceReboot();
46958 }
46959 if (("ResolveSource" == childName))
46960 {
46961 childValue = new ResolveSource();
46962 }
46963 if (("LaunchConditions" == childName))
46964 {
46965 childValue = new LaunchConditions();
46966 }
46967 if (("FindRelatedProducts" == childName))
46968 {
46969 childValue = new FindRelatedProducts();
46970 }
46971 if (("AppSearch" == childName))
46972 {
46973 childValue = new AppSearch();
46974 }
46975 if (("CCPSearch" == childName))
46976 {
46977 childValue = new CCPSearch();
46978 }
46979 if (("RMCCPSearch" == childName))
46980 {
46981 childValue = new RMCCPSearch();
46982 }
46983 if (("ValidateProductID" == childName))
46984 {
46985 childValue = new ValidateProductID();
46986 }
46987 if (("CostInitialize" == childName))
46988 {
46989 childValue = new CostInitialize();
46990 }
46991 if (("FileCost" == childName))
46992 {
46993 childValue = new FileCost();
46994 }
46995 if (("IsolateComponents" == childName))
46996 {
46997 childValue = new IsolateComponents();
46998 }
46999 if (("CostFinalize" == childName))
47000 {
47001 childValue = new CostFinalize();
47002 }
47003 if (("SetODBCFolders" == childName))
47004 {
47005 childValue = new SetODBCFolders();
47006 }
47007 if (("MigrateFeatureStates" == childName))
47008 {
47009 childValue = new MigrateFeatureStates();
47010 }
47011 if (("InstallValidate" == childName))
47012 {
47013 childValue = new InstallValidate();
47014 }
47015 if (("InstallInitialize" == childName))
47016 {
47017 childValue = new InstallInitialize();
47018 }
47019 if (("AllocateRegistrySpace" == childName))
47020 {
47021 childValue = new AllocateRegistrySpace();
47022 }
47023 if (("ProcessComponents" == childName))
47024 {
47025 childValue = new ProcessComponents();
47026 }
47027 if (("UnpublishComponents" == childName))
47028 {
47029 childValue = new UnpublishComponents();
47030 }
47031 if (("UnpublishFeatures" == childName))
47032 {
47033 childValue = new UnpublishFeatures();
47034 }
47035 if (("StopServices" == childName))
47036 {
47037 childValue = new StopServices();
47038 }
47039 if (("DeleteServices" == childName))
47040 {
47041 childValue = new DeleteServices();
47042 }
47043 if (("UnregisterComPlus" == childName))
47044 {
47045 childValue = new UnregisterComPlus();
47046 }
47047 if (("SelfUnregModules" == childName))
47048 {
47049 childValue = new SelfUnregModules();
47050 }
47051 if (("UnregisterTypeLibraries" == childName))
47052 {
47053 childValue = new UnregisterTypeLibraries();
47054 }
47055 if (("RemoveODBC" == childName))
47056 {
47057 childValue = new RemoveODBC();
47058 }
47059 if (("UnregisterFonts" == childName))
47060 {
47061 childValue = new UnregisterFonts();
47062 }
47063 if (("RemoveRegistryValues" == childName))
47064 {
47065 childValue = new RemoveRegistryValues();
47066 }
47067 if (("UnregisterClassInfo" == childName))
47068 {
47069 childValue = new UnregisterClassInfo();
47070 }
47071 if (("UnregisterExtensionInfo" == childName))
47072 {
47073 childValue = new UnregisterExtensionInfo();
47074 }
47075 if (("UnregisterProgIdInfo" == childName))
47076 {
47077 childValue = new UnregisterProgIdInfo();
47078 }
47079 if (("UnregisterMIMEInfo" == childName))
47080 {
47081 childValue = new UnregisterMIMEInfo();
47082 }
47083 if (("RemoveIniValues" == childName))
47084 {
47085 childValue = new RemoveIniValues();
47086 }
47087 if (("RemoveShortcuts" == childName))
47088 {
47089 childValue = new RemoveShortcuts();
47090 }
47091 if (("RemoveEnvironmentStrings" == childName))
47092 {
47093 childValue = new RemoveEnvironmentStrings();
47094 }
47095 if (("RemoveDuplicateFiles" == childName))
47096 {
47097 childValue = new RemoveDuplicateFiles();
47098 }
47099 if (("RemoveFiles" == childName))
47100 {
47101 childValue = new RemoveFiles();
47102 }
47103 if (("RemoveFolders" == childName))
47104 {
47105 childValue = new RemoveFolders();
47106 }
47107 if (("CreateFolders" == childName))
47108 {
47109 childValue = new CreateFolders();
47110 }
47111 if (("MoveFiles" == childName))
47112 {
47113 childValue = new MoveFiles();
47114 }
47115 if (("InstallFiles" == childName))
47116 {
47117 childValue = new InstallFiles();
47118 }
47119 if (("DuplicateFiles" == childName))
47120 {
47121 childValue = new DuplicateFiles();
47122 }
47123 if (("PatchFiles" == childName))
47124 {
47125 childValue = new PatchFiles();
47126 }
47127 if (("BindImage" == childName))
47128 {
47129 childValue = new BindImage();
47130 }
47131 if (("CreateShortcuts" == childName))
47132 {
47133 childValue = new CreateShortcuts();
47134 }
47135 if (("RegisterClassInfo" == childName))
47136 {
47137 childValue = new RegisterClassInfo();
47138 }
47139 if (("RegisterExtensionInfo" == childName))
47140 {
47141 childValue = new RegisterExtensionInfo();
47142 }
47143 if (("RegisterProgIdInfo" == childName))
47144 {
47145 childValue = new RegisterProgIdInfo();
47146 }
47147 if (("RegisterMIMEInfo" == childName))
47148 {
47149 childValue = new RegisterMIMEInfo();
47150 }
47151 if (("WriteRegistryValues" == childName))
47152 {
47153 childValue = new WriteRegistryValues();
47154 }
47155 if (("WriteIniValues" == childName))
47156 {
47157 childValue = new WriteIniValues();
47158 }
47159 if (("WriteEnvironmentStrings" == childName))
47160 {
47161 childValue = new WriteEnvironmentStrings();
47162 }
47163 if (("RegisterFonts" == childName))
47164 {
47165 childValue = new RegisterFonts();
47166 }
47167 if (("InstallODBC" == childName))
47168 {
47169 childValue = new InstallODBC();
47170 }
47171 if (("RegisterTypeLibraries" == childName))
47172 {
47173 childValue = new RegisterTypeLibraries();
47174 }
47175 if (("SelfRegModules" == childName))
47176 {
47177 childValue = new SelfRegModules();
47178 }
47179 if (("RegisterComPlus" == childName))
47180 {
47181 childValue = new RegisterComPlus();
47182 }
47183 if (("InstallServices" == childName))
47184 {
47185 childValue = new InstallServices();
47186 }
47187 if (("StartServices" == childName))
47188 {
47189 childValue = new StartServices();
47190 }
47191 if (("RegisterUser" == childName))
47192 {
47193 childValue = new RegisterUser();
47194 }
47195 if (("RegisterProduct" == childName))
47196 {
47197 childValue = new RegisterProduct();
47198 }
47199 if (("PublishComponents" == childName))
47200 {
47201 childValue = new PublishComponents();
47202 }
47203 if (("PublishFeatures" == childName))
47204 {
47205 childValue = new PublishFeatures();
47206 }
47207 if (("PublishProduct" == childName))
47208 {
47209 childValue = new PublishProduct();
47210 }
47211 if (("InstallFinalize" == childName))
47212 {
47213 childValue = new InstallFinalize();
47214 }
47215 if (("RemoveExistingProducts" == childName))
47216 {
47217 childValue = new RemoveExistingProducts();
47218 }
47219 if (("DisableRollback" == childName))
47220 {
47221 childValue = new DisableRollback();
47222 }
47223 if (("InstallExecute" == childName))
47224 {
47225 childValue = new InstallExecute();
47226 }
47227 if (("InstallExecuteAgain" == childName))
47228 {
47229 childValue = new InstallExecuteAgain();
47230 }
47231 if (("MsiPublishAssemblies" == childName))
47232 {
47233 childValue = new MsiPublishAssemblies();
47234 }
47235 if (("MsiUnpublishAssemblies" == childName))
47236 {
47237 childValue = new MsiUnpublishAssemblies();
47238 }
47239 if ((null == childValue))
47240 {
47241 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
47242 }
47243 return childValue;
47244 }
47245
47246 /// <summary>
47247 /// Processes this element and all child elements into an XmlWriter.
47248 /// </summary>
47249 public virtual void OutputXml(XmlWriter writer)
47250 {
47251 if ((null == writer))
47252 {
47253 throw new ArgumentNullException("writer");
47254 }
47255 writer.WriteStartElement("InstallExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs");
47256 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
47257 {
47258 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
47259 childElement.OutputXml(writer);
47260 }
47261 writer.WriteEndElement();
47262 }
47263
47264 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47265 void ISetAttributes.SetAttribute(string name, string value)
47266 {
47267 if (String.IsNullOrEmpty(name))
47268 {
47269 throw new ArgumentNullException("name");
47270 }
47271 }
47272 }
47273
47274 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
47275 public class AdminUISequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
47276 {
47277
47278 private ElementCollection children;
47279
47280 private ISchemaElement parentElement;
47281
47282 public AdminUISequence()
47283 {
47284 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
47285 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom)));
47286 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Show)));
47287 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize)));
47288 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost)));
47289 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize)));
47290 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExecuteAction)));
47291 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate)));
47292 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize)));
47293 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallAdminPackage)));
47294 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles)));
47295 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize)));
47296 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions)));
47297 this.children = childCollection0;
47298 }
47299
47300 public virtual IEnumerable Children
47301 {
47302 get
47303 {
47304 return this.children;
47305 }
47306 }
47307
47308 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
47309 public virtual IEnumerable this[System.Type childType]
47310 {
47311 get
47312 {
47313 return this.children.Filter(childType);
47314 }
47315 }
47316
47317 public virtual ISchemaElement ParentElement
47318 {
47319 get
47320 {
47321 return this.parentElement;
47322 }
47323 set
47324 {
47325 this.parentElement = value;
47326 }
47327 }
47328
47329 public virtual void AddChild(ISchemaElement child)
47330 {
47331 if ((null == child))
47332 {
47333 throw new ArgumentNullException("child");
47334 }
47335 this.children.AddElement(child);
47336 child.ParentElement = this;
47337 }
47338
47339 public virtual void RemoveChild(ISchemaElement child)
47340 {
47341 if ((null == child))
47342 {
47343 throw new ArgumentNullException("child");
47344 }
47345 this.children.RemoveElement(child);
47346 child.ParentElement = null;
47347 }
47348
47349 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47350 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
47351 ISchemaElement ICreateChildren.CreateChild(string childName)
47352 {
47353 if (String.IsNullOrEmpty(childName))
47354 {
47355 throw new ArgumentNullException("childName");
47356 }
47357 ISchemaElement childValue = null;
47358 if (("Custom" == childName))
47359 {
47360 childValue = new Custom();
47361 }
47362 if (("Show" == childName))
47363 {
47364 childValue = new Show();
47365 }
47366 if (("CostInitialize" == childName))
47367 {
47368 childValue = new CostInitialize();
47369 }
47370 if (("FileCost" == childName))
47371 {
47372 childValue = new FileCost();
47373 }
47374 if (("CostFinalize" == childName))
47375 {
47376 childValue = new CostFinalize();
47377 }
47378 if (("ExecuteAction" == childName))
47379 {
47380 childValue = new ExecuteAction();
47381 }
47382 if (("InstallValidate" == childName))
47383 {
47384 childValue = new InstallValidate();
47385 }
47386 if (("InstallInitialize" == childName))
47387 {
47388 childValue = new InstallInitialize();
47389 }
47390 if (("InstallAdminPackage" == childName))
47391 {
47392 childValue = new InstallAdminPackage();
47393 }
47394 if (("InstallFiles" == childName))
47395 {
47396 childValue = new InstallFiles();
47397 }
47398 if (("InstallFinalize" == childName))
47399 {
47400 childValue = new InstallFinalize();
47401 }
47402 if (("LaunchConditions" == childName))
47403 {
47404 childValue = new LaunchConditions();
47405 }
47406 if ((null == childValue))
47407 {
47408 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
47409 }
47410 return childValue;
47411 }
47412
47413 /// <summary>
47414 /// Processes this element and all child elements into an XmlWriter.
47415 /// </summary>
47416 public virtual void OutputXml(XmlWriter writer)
47417 {
47418 if ((null == writer))
47419 {
47420 throw new ArgumentNullException("writer");
47421 }
47422 writer.WriteStartElement("AdminUISequence", "http://wixtoolset.org/schemas/v4/wxs");
47423 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
47424 {
47425 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
47426 childElement.OutputXml(writer);
47427 }
47428 writer.WriteEndElement();
47429 }
47430
47431 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47432 void ISetAttributes.SetAttribute(string name, string value)
47433 {
47434 if (String.IsNullOrEmpty(name))
47435 {
47436 throw new ArgumentNullException("name");
47437 }
47438 }
47439 }
47440
47441 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
47442 public class AdminExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
47443 {
47444
47445 private ElementCollection children;
47446
47447 private ISchemaElement parentElement;
47448
47449 public AdminExecuteSequence()
47450 {
47451 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
47452 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom)));
47453 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize)));
47454 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost)));
47455 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize)));
47456 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate)));
47457 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize)));
47458 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallAdminPackage)));
47459 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles)));
47460 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFiles)));
47461 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize)));
47462 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions)));
47463 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource)));
47464 this.children = childCollection0;
47465 }
47466
47467 public virtual IEnumerable Children
47468 {
47469 get
47470 {
47471 return this.children;
47472 }
47473 }
47474
47475 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
47476 public virtual IEnumerable this[System.Type childType]
47477 {
47478 get
47479 {
47480 return this.children.Filter(childType);
47481 }
47482 }
47483
47484 public virtual ISchemaElement ParentElement
47485 {
47486 get
47487 {
47488 return this.parentElement;
47489 }
47490 set
47491 {
47492 this.parentElement = value;
47493 }
47494 }
47495
47496 public virtual void AddChild(ISchemaElement child)
47497 {
47498 if ((null == child))
47499 {
47500 throw new ArgumentNullException("child");
47501 }
47502 this.children.AddElement(child);
47503 child.ParentElement = this;
47504 }
47505
47506 public virtual void RemoveChild(ISchemaElement child)
47507 {
47508 if ((null == child))
47509 {
47510 throw new ArgumentNullException("child");
47511 }
47512 this.children.RemoveElement(child);
47513 child.ParentElement = null;
47514 }
47515
47516 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47517 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
47518 ISchemaElement ICreateChildren.CreateChild(string childName)
47519 {
47520 if (String.IsNullOrEmpty(childName))
47521 {
47522 throw new ArgumentNullException("childName");
47523 }
47524 ISchemaElement childValue = null;
47525 if (("Custom" == childName))
47526 {
47527 childValue = new Custom();
47528 }
47529 if (("CostInitialize" == childName))
47530 {
47531 childValue = new CostInitialize();
47532 }
47533 if (("FileCost" == childName))
47534 {
47535 childValue = new FileCost();
47536 }
47537 if (("CostFinalize" == childName))
47538 {
47539 childValue = new CostFinalize();
47540 }
47541 if (("InstallValidate" == childName))
47542 {
47543 childValue = new InstallValidate();
47544 }
47545 if (("InstallInitialize" == childName))
47546 {
47547 childValue = new InstallInitialize();
47548 }
47549 if (("InstallAdminPackage" == childName))
47550 {
47551 childValue = new InstallAdminPackage();
47552 }
47553 if (("InstallFiles" == childName))
47554 {
47555 childValue = new InstallFiles();
47556 }
47557 if (("PatchFiles" == childName))
47558 {
47559 childValue = new PatchFiles();
47560 }
47561 if (("InstallFinalize" == childName))
47562 {
47563 childValue = new InstallFinalize();
47564 }
47565 if (("LaunchConditions" == childName))
47566 {
47567 childValue = new LaunchConditions();
47568 }
47569 if (("ResolveSource" == childName))
47570 {
47571 childValue = new ResolveSource();
47572 }
47573 if ((null == childValue))
47574 {
47575 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
47576 }
47577 return childValue;
47578 }
47579
47580 /// <summary>
47581 /// Processes this element and all child elements into an XmlWriter.
47582 /// </summary>
47583 public virtual void OutputXml(XmlWriter writer)
47584 {
47585 if ((null == writer))
47586 {
47587 throw new ArgumentNullException("writer");
47588 }
47589 writer.WriteStartElement("AdminExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs");
47590 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
47591 {
47592 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
47593 childElement.OutputXml(writer);
47594 }
47595 writer.WriteEndElement();
47596 }
47597
47598 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47599 void ISetAttributes.SetAttribute(string name, string value)
47600 {
47601 if (String.IsNullOrEmpty(name))
47602 {
47603 throw new ArgumentNullException("name");
47604 }
47605 }
47606 }
47607
47608 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
47609 public class AdvertiseExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
47610 {
47611
47612 private ElementCollection children;
47613
47614 private ISchemaElement parentElement;
47615
47616 public AdvertiseExecuteSequence()
47617 {
47618 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
47619 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize)));
47620 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize)));
47621 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom)));
47622 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate)));
47623 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize)));
47624 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateShortcuts)));
47625 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterClassInfo)));
47626 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterExtensionInfo)));
47627 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterMIMEInfo)));
47628 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProgIdInfo)));
47629 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishComponents)));
47630 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishFeatures)));
47631 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishProduct)));
47632 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize)));
47633 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPublishAssemblies)));
47634 this.children = childCollection0;
47635 }
47636
47637 public virtual IEnumerable Children
47638 {
47639 get
47640 {
47641 return this.children;
47642 }
47643 }
47644
47645 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
47646 public virtual IEnumerable this[System.Type childType]
47647 {
47648 get
47649 {
47650 return this.children.Filter(childType);
47651 }
47652 }
47653
47654 public virtual ISchemaElement ParentElement
47655 {
47656 get
47657 {
47658 return this.parentElement;
47659 }
47660 set
47661 {
47662 this.parentElement = value;
47663 }
47664 }
47665
47666 public virtual void AddChild(ISchemaElement child)
47667 {
47668 if ((null == child))
47669 {
47670 throw new ArgumentNullException("child");
47671 }
47672 this.children.AddElement(child);
47673 child.ParentElement = this;
47674 }
47675
47676 public virtual void RemoveChild(ISchemaElement child)
47677 {
47678 if ((null == child))
47679 {
47680 throw new ArgumentNullException("child");
47681 }
47682 this.children.RemoveElement(child);
47683 child.ParentElement = null;
47684 }
47685
47686 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47687 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
47688 ISchemaElement ICreateChildren.CreateChild(string childName)
47689 {
47690 if (String.IsNullOrEmpty(childName))
47691 {
47692 throw new ArgumentNullException("childName");
47693 }
47694 ISchemaElement childValue = null;
47695 if (("CostInitialize" == childName))
47696 {
47697 childValue = new CostInitialize();
47698 }
47699 if (("CostFinalize" == childName))
47700 {
47701 childValue = new CostFinalize();
47702 }
47703 if (("Custom" == childName))
47704 {
47705 childValue = new Custom();
47706 }
47707 if (("InstallValidate" == childName))
47708 {
47709 childValue = new InstallValidate();
47710 }
47711 if (("InstallInitialize" == childName))
47712 {
47713 childValue = new InstallInitialize();
47714 }
47715 if (("CreateShortcuts" == childName))
47716 {
47717 childValue = new CreateShortcuts();
47718 }
47719 if (("RegisterClassInfo" == childName))
47720 {
47721 childValue = new RegisterClassInfo();
47722 }
47723 if (("RegisterExtensionInfo" == childName))
47724 {
47725 childValue = new RegisterExtensionInfo();
47726 }
47727 if (("RegisterMIMEInfo" == childName))
47728 {
47729 childValue = new RegisterMIMEInfo();
47730 }
47731 if (("RegisterProgIdInfo" == childName))
47732 {
47733 childValue = new RegisterProgIdInfo();
47734 }
47735 if (("PublishComponents" == childName))
47736 {
47737 childValue = new PublishComponents();
47738 }
47739 if (("PublishFeatures" == childName))
47740 {
47741 childValue = new PublishFeatures();
47742 }
47743 if (("PublishProduct" == childName))
47744 {
47745 childValue = new PublishProduct();
47746 }
47747 if (("InstallFinalize" == childName))
47748 {
47749 childValue = new InstallFinalize();
47750 }
47751 if (("MsiPublishAssemblies" == childName))
47752 {
47753 childValue = new MsiPublishAssemblies();
47754 }
47755 if ((null == childValue))
47756 {
47757 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
47758 }
47759 return childValue;
47760 }
47761
47762 /// <summary>
47763 /// Processes this element and all child elements into an XmlWriter.
47764 /// </summary>
47765 public virtual void OutputXml(XmlWriter writer)
47766 {
47767 if ((null == writer))
47768 {
47769 throw new ArgumentNullException("writer");
47770 }
47771 writer.WriteStartElement("AdvertiseExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs");
47772 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
47773 {
47774 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
47775 childElement.OutputXml(writer);
47776 }
47777 writer.WriteEndElement();
47778 }
47779
47780 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47781 void ISetAttributes.SetAttribute(string name, string value)
47782 {
47783 if (String.IsNullOrEmpty(name))
47784 {
47785 throw new ArgumentNullException("name");
47786 }
47787 }
47788 }
47789
47790 /// <summary>
47791 /// Binary data used for CustomAction elements and UI controls.
47792 /// </summary>
47793 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
47794 public class Binary : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
47795 {
47796
47797 private ElementCollection children;
47798
47799 private string idField;
47800
47801 private bool idFieldSet;
47802
47803 private string sourceFileField;
47804
47805 private bool sourceFileFieldSet;
47806
47807 private string srcField;
47808
47809 private bool srcFieldSet;
47810
47811 private YesNoType suppressModularizationField;
47812
47813 private bool suppressModularizationFieldSet;
47814
47815 private ISchemaElement parentElement;
47816
47817 public Binary()
47818 {
47819 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
47820 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
47821 this.children = childCollection0;
47822 }
47823
47824 public virtual IEnumerable Children
47825 {
47826 get
47827 {
47828 return this.children;
47829 }
47830 }
47831
47832 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
47833 public virtual IEnumerable this[System.Type childType]
47834 {
47835 get
47836 {
47837 return this.children.Filter(childType);
47838 }
47839 }
47840
47841 /// <summary>
47842 /// The Id cannot be longer than 55 characters. In order to prevent errors in cases where the Id is modularized, it should not be longer than 18 characters.
47843 /// </summary>
47844 public string Id
47845 {
47846 get
47847 {
47848 return this.idField;
47849 }
47850 set
47851 {
47852 this.idFieldSet = true;
47853 this.idField = value;
47854 }
47855 }
47856
47857 /// <summary>
47858 /// Path to the binary file.
47859 /// </summary>
47860 public string SourceFile
47861 {
47862 get
47863 {
47864 return this.sourceFileField;
47865 }
47866 set
47867 {
47868 this.sourceFileFieldSet = true;
47869 this.sourceFileField = value;
47870 }
47871 }
47872
47873 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
47874 public string src
47875 {
47876 get
47877 {
47878 return this.srcField;
47879 }
47880 set
47881 {
47882 this.srcFieldSet = true;
47883 this.srcField = value;
47884 }
47885 }
47886
47887 /// <summary>
47888 /// Use to suppress modularization of this Binary identifier in merge modules.
47889 /// </summary>
47890 public YesNoType SuppressModularization
47891 {
47892 get
47893 {
47894 return this.suppressModularizationField;
47895 }
47896 set
47897 {
47898 this.suppressModularizationFieldSet = true;
47899 this.suppressModularizationField = value;
47900 }
47901 }
47902
47903 public virtual ISchemaElement ParentElement
47904 {
47905 get
47906 {
47907 return this.parentElement;
47908 }
47909 set
47910 {
47911 this.parentElement = value;
47912 }
47913 }
47914
47915 public virtual void AddChild(ISchemaElement child)
47916 {
47917 if ((null == child))
47918 {
47919 throw new ArgumentNullException("child");
47920 }
47921 this.children.AddElement(child);
47922 child.ParentElement = this;
47923 }
47924
47925 public virtual void RemoveChild(ISchemaElement child)
47926 {
47927 if ((null == child))
47928 {
47929 throw new ArgumentNullException("child");
47930 }
47931 this.children.RemoveElement(child);
47932 child.ParentElement = null;
47933 }
47934
47935 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47936 ISchemaElement ICreateChildren.CreateChild(string childName)
47937 {
47938 if (String.IsNullOrEmpty(childName))
47939 {
47940 throw new ArgumentNullException("childName");
47941 }
47942 ISchemaElement childValue = null;
47943 if ((null == childValue))
47944 {
47945 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
47946 }
47947 return childValue;
47948 }
47949
47950 /// <summary>
47951 /// Processes this element and all child elements into an XmlWriter.
47952 /// </summary>
47953 public virtual void OutputXml(XmlWriter writer)
47954 {
47955 if ((null == writer))
47956 {
47957 throw new ArgumentNullException("writer");
47958 }
47959 writer.WriteStartElement("Binary", "http://wixtoolset.org/schemas/v4/wxs");
47960 if (this.idFieldSet)
47961 {
47962 writer.WriteAttributeString("Id", this.idField);
47963 }
47964 if (this.sourceFileFieldSet)
47965 {
47966 writer.WriteAttributeString("SourceFile", this.sourceFileField);
47967 }
47968 if (this.srcFieldSet)
47969 {
47970 writer.WriteAttributeString("src", this.srcField);
47971 }
47972 if (this.suppressModularizationFieldSet)
47973 {
47974 if ((this.suppressModularizationField == YesNoType.no))
47975 {
47976 writer.WriteAttributeString("SuppressModularization", "no");
47977 }
47978 if ((this.suppressModularizationField == YesNoType.yes))
47979 {
47980 writer.WriteAttributeString("SuppressModularization", "yes");
47981 }
47982 }
47983 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
47984 {
47985 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
47986 childElement.OutputXml(writer);
47987 }
47988 writer.WriteEndElement();
47989 }
47990
47991 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47992 void ISetAttributes.SetAttribute(string name, string value)
47993 {
47994 if (String.IsNullOrEmpty(name))
47995 {
47996 throw new ArgumentNullException("name");
47997 }
47998 if (("Id" == name))
47999 {
48000 this.idField = value;
48001 this.idFieldSet = true;
48002 }
48003 if (("SourceFile" == name))
48004 {
48005 this.sourceFileField = value;
48006 this.sourceFileFieldSet = true;
48007 }
48008 if (("src" == name))
48009 {
48010 this.srcField = value;
48011 this.srcFieldSet = true;
48012 }
48013 if (("SuppressModularization" == name))
48014 {
48015 this.suppressModularizationField = Enums.ParseYesNoType(value);
48016 this.suppressModularizationFieldSet = true;
48017 }
48018 }
48019 }
48020
48021 /// <summary>
48022 /// Icon used for Shortcut, ProgId, or Class elements (but not UI controls)
48023 /// </summary>
48024 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
48025 public class Icon : ISchemaElement, ISetAttributes
48026 {
48027
48028 private string idField;
48029
48030 private bool idFieldSet;
48031
48032 private string sourceFileField;
48033
48034 private bool sourceFileFieldSet;
48035
48036 private string srcField;
48037
48038 private bool srcFieldSet;
48039
48040 private ISchemaElement parentElement;
48041
48042 /// <summary>
48043 /// The Id cannot be longer than 55 characters. In order to prevent errors in cases where the Id is modularized, it should not be longer than 18 characters.
48044 /// </summary>
48045 public string Id
48046 {
48047 get
48048 {
48049 return this.idField;
48050 }
48051 set
48052 {
48053 this.idFieldSet = true;
48054 this.idField = value;
48055 }
48056 }
48057
48058 /// <summary>
48059 /// Path to the icon file.
48060 /// </summary>
48061 public string SourceFile
48062 {
48063 get
48064 {
48065 return this.sourceFileField;
48066 }
48067 set
48068 {
48069 this.sourceFileFieldSet = true;
48070 this.sourceFileField = value;
48071 }
48072 }
48073
48074 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
48075 public string src
48076 {
48077 get
48078 {
48079 return this.srcField;
48080 }
48081 set
48082 {
48083 this.srcFieldSet = true;
48084 this.srcField = value;
48085 }
48086 }
48087
48088 public virtual ISchemaElement ParentElement
48089 {
48090 get
48091 {
48092 return this.parentElement;
48093 }
48094 set
48095 {
48096 this.parentElement = value;
48097 }
48098 }
48099
48100 /// <summary>
48101 /// Processes this element and all child elements into an XmlWriter.
48102 /// </summary>
48103 public virtual void OutputXml(XmlWriter writer)
48104 {
48105 if ((null == writer))
48106 {
48107 throw new ArgumentNullException("writer");
48108 }
48109 writer.WriteStartElement("Icon", "http://wixtoolset.org/schemas/v4/wxs");
48110 if (this.idFieldSet)
48111 {
48112 writer.WriteAttributeString("Id", this.idField);
48113 }
48114 if (this.sourceFileFieldSet)
48115 {
48116 writer.WriteAttributeString("SourceFile", this.sourceFileField);
48117 }
48118 if (this.srcFieldSet)
48119 {
48120 writer.WriteAttributeString("src", this.srcField);
48121 }
48122 writer.WriteEndElement();
48123 }
48124
48125 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
48126 void ISetAttributes.SetAttribute(string name, string value)
48127 {
48128 if (String.IsNullOrEmpty(name))
48129 {
48130 throw new ArgumentNullException("name");
48131 }
48132 if (("Id" == name))
48133 {
48134 this.idField = value;
48135 this.idFieldSet = true;
48136 }
48137 if (("SourceFile" == name))
48138 {
48139 this.sourceFileField = value;
48140 this.sourceFileFieldSet = true;
48141 }
48142 if (("src" == name))
48143 {
48144 this.srcField = value;
48145 this.srcFieldSet = true;
48146 }
48147 }
48148 }
48149
48150 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
48151 public class EmbeddedChainer : ISchemaElement, ISetAttributes
48152 {
48153
48154 private string idField;
48155
48156 private bool idFieldSet;
48157
48158 private string commandLineField;
48159
48160 private bool commandLineFieldSet;
48161
48162 private string binarySourceField;
48163
48164 private bool binarySourceFieldSet;
48165
48166 private string fileSourceField;
48167
48168 private bool fileSourceFieldSet;
48169
48170 private string propertySourceField;
48171
48172 private bool propertySourceFieldSet;
48173
48174 private string contentField;
48175
48176 private bool contentFieldSet;
48177
48178 private ISchemaElement parentElement;
48179
48180 /// <summary>
48181 /// Unique identifier for embedded chainer.
48182 /// </summary>
48183 public string Id
48184 {
48185 get
48186 {
48187 return this.idField;
48188 }
48189 set
48190 {
48191 this.idFieldSet = true;
48192 this.idField = value;
48193 }
48194 }
48195
48196 /// <summary>
48197 /// Value to append to the transaction handle and passed to the chainer executable.
48198 /// </summary>
48199 public string CommandLine
48200 {
48201 get
48202 {
48203 return this.commandLineField;
48204 }
48205 set
48206 {
48207 this.commandLineFieldSet = true;
48208 this.commandLineField = value;
48209 }
48210 }
48211
48212 /// <summary>
48213 /// Reference to the Binary element that contains the chainer executable. Mutually exclusive with
48214 /// the FileSource and PropertySource attributes.
48215 /// </summary>
48216 public string BinarySource
48217 {
48218 get
48219 {
48220 return this.binarySourceField;
48221 }
48222 set
48223 {
48224 this.binarySourceFieldSet = true;
48225 this.binarySourceField = value;
48226 }
48227 }
48228
48229 /// <summary>
48230 /// Reference to the File element that is the chainer executable. Mutually exclusive with
48231 /// the BinarySource and PropertySource attributes.
48232 /// </summary>
48233 public string FileSource
48234 {
48235 get
48236 {
48237 return this.fileSourceField;
48238 }
48239 set
48240 {
48241 this.fileSourceFieldSet = true;
48242 this.fileSourceField = value;
48243 }
48244 }
48245
48246 /// <summary>
48247 /// Reference to a Property that resolves to the full path to the chainer executable. Mutually exclusive with
48248 /// the BinarySource and FileSource attributes.
48249 /// </summary>
48250 public string PropertySource
48251 {
48252 get
48253 {
48254 return this.propertySourceField;
48255 }
48256 set
48257 {
48258 this.propertySourceFieldSet = true;
48259 this.propertySourceField = value;
48260 }
48261 }
48262
48263 /// <summary>
48264 /// Element value is the condition. CDATA may be used to when a condition contains many XML characters
48265 /// that must be escaped. It is important to note that each EmbeddedChainer element must have a mutually exclusive condition
48266 /// to ensure that only one embedded chainer will execute at a time. If the conditions are not mutually exclusive the chainer
48267 /// that executes is undeterministic.
48268 /// </summary>
48269 public string Content
48270 {
48271 get
48272 {
48273 return this.contentField;
48274 }
48275 set
48276 {
48277 this.contentFieldSet = true;
48278 this.contentField = value;
48279 }
48280 }
48281
48282 public virtual ISchemaElement ParentElement
48283 {
48284 get
48285 {
48286 return this.parentElement;
48287 }
48288 set
48289 {
48290 this.parentElement = value;
48291 }
48292 }
48293
48294 /// <summary>
48295 /// Processes this element and all child elements into an XmlWriter.
48296 /// </summary>
48297 public virtual void OutputXml(XmlWriter writer)
48298 {
48299 if ((null == writer))
48300 {
48301 throw new ArgumentNullException("writer");
48302 }
48303 writer.WriteStartElement("EmbeddedChainer", "http://wixtoolset.org/schemas/v4/wxs");
48304 if (this.idFieldSet)
48305 {
48306 writer.WriteAttributeString("Id", this.idField);
48307 }
48308 if (this.commandLineFieldSet)
48309 {
48310 writer.WriteAttributeString("CommandLine", this.commandLineField);
48311 }
48312 if (this.binarySourceFieldSet)
48313 {
48314 writer.WriteAttributeString("BinarySource", this.binarySourceField);
48315 }
48316 if (this.fileSourceFieldSet)
48317 {
48318 writer.WriteAttributeString("FileSource", this.fileSourceField);
48319 }
48320 if (this.propertySourceFieldSet)
48321 {
48322 writer.WriteAttributeString("PropertySource", this.propertySourceField);
48323 }
48324 if (this.contentFieldSet)
48325 {
48326 writer.WriteString(this.contentField);
48327 }
48328 writer.WriteEndElement();
48329 }
48330
48331 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
48332 void ISetAttributes.SetAttribute(string name, string value)
48333 {
48334 if (String.IsNullOrEmpty(name))
48335 {
48336 throw new ArgumentNullException("name");
48337 }
48338 if (("Id" == name))
48339 {
48340 this.idField = value;
48341 this.idFieldSet = true;
48342 }
48343 if (("CommandLine" == name))
48344 {
48345 this.commandLineField = value;
48346 this.commandLineFieldSet = true;
48347 }
48348 if (("BinarySource" == name))
48349 {
48350 this.binarySourceField = value;
48351 this.binarySourceFieldSet = true;
48352 }
48353 if (("FileSource" == name))
48354 {
48355 this.fileSourceField = value;
48356 this.fileSourceFieldSet = true;
48357 }
48358 if (("PropertySource" == name))
48359 {
48360 this.propertySourceField = value;
48361 this.propertySourceFieldSet = true;
48362 }
48363 if (("Content" == name))
48364 {
48365 this.contentField = value;
48366 this.contentFieldSet = true;
48367 }
48368 }
48369 }
48370
48371 /// <summary>
48372 /// Reference to an EmbeddedChainer element. This will force the entire referenced Fragment's contents
48373 /// to be included in the installer database.
48374 /// </summary>
48375 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
48376 public class EmbeddedChainerRef : ISchemaElement, ISetAttributes
48377 {
48378
48379 private string idField;
48380
48381 private bool idFieldSet;
48382
48383 private ISchemaElement parentElement;
48384
48385 public string Id
48386 {
48387 get
48388 {
48389 return this.idField;
48390 }
48391 set
48392 {
48393 this.idFieldSet = true;
48394 this.idField = value;
48395 }
48396 }
48397
48398 public virtual ISchemaElement ParentElement
48399 {
48400 get
48401 {
48402 return this.parentElement;
48403 }
48404 set
48405 {
48406 this.parentElement = value;
48407 }
48408 }
48409
48410 /// <summary>
48411 /// Processes this element and all child elements into an XmlWriter.
48412 /// </summary>
48413 public virtual void OutputXml(XmlWriter writer)
48414 {
48415 if ((null == writer))
48416 {
48417 throw new ArgumentNullException("writer");
48418 }
48419 writer.WriteStartElement("EmbeddedChainerRef", "http://wixtoolset.org/schemas/v4/wxs");
48420 if (this.idFieldSet)
48421 {
48422 writer.WriteAttributeString("Id", this.idField);
48423 }
48424 writer.WriteEndElement();
48425 }
48426
48427 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
48428 void ISetAttributes.SetAttribute(string name, string value)
48429 {
48430 if (String.IsNullOrEmpty(name))
48431 {
48432 throw new ArgumentNullException("name");
48433 }
48434 if (("Id" == name))
48435 {
48436 this.idField = value;
48437 this.idFieldSet = true;
48438 }
48439 }
48440 }
48441
48442 /// <summary>
48443 /// Element value is the condition. Use CDATA if message contains delimiter characters.
48444 /// </summary>
48445 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
48446 public class EmbeddedUI : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
48447 {
48448
48449 private ElementCollection children;
48450
48451 private string idField;
48452
48453 private bool idFieldSet;
48454
48455 private YesNoType ignoreFatalExitField;
48456
48457 private bool ignoreFatalExitFieldSet;
48458
48459 private YesNoType ignoreErrorField;
48460
48461 private bool ignoreErrorFieldSet;
48462
48463 private YesNoType ignoreWarningField;
48464
48465 private bool ignoreWarningFieldSet;
48466
48467 private YesNoType ignoreUserField;
48468
48469 private bool ignoreUserFieldSet;
48470
48471 private YesNoType ignoreInfoField;
48472
48473 private bool ignoreInfoFieldSet;
48474
48475 private YesNoType ignoreFilesInUseField;
48476
48477 private bool ignoreFilesInUseFieldSet;
48478
48479 private YesNoType ignoreResolveSourceField;
48480
48481 private bool ignoreResolveSourceFieldSet;
48482
48483 private YesNoType ignoreOutOfDiskSpaceField;
48484
48485 private bool ignoreOutOfDiskSpaceFieldSet;
48486
48487 private YesNoType ignoreActionStartField;
48488
48489 private bool ignoreActionStartFieldSet;
48490
48491 private YesNoType ignoreActionDataField;
48492
48493 private bool ignoreActionDataFieldSet;
48494
48495 private YesNoType ignoreProgressField;
48496
48497 private bool ignoreProgressFieldSet;
48498
48499 private YesNoType ignoreCommonDataField;
48500
48501 private bool ignoreCommonDataFieldSet;
48502
48503 private YesNoType ignoreInitializeField;
48504
48505 private bool ignoreInitializeFieldSet;
48506
48507 private YesNoType ignoreTerminateField;
48508
48509 private bool ignoreTerminateFieldSet;
48510
48511 private YesNoType ignoreShowDialogField;
48512
48513 private bool ignoreShowDialogFieldSet;
48514
48515 private YesNoType ignoreRMFilesInUseField;
48516
48517 private bool ignoreRMFilesInUseFieldSet;
48518
48519 private YesNoType ignoreInstallStartField;
48520
48521 private bool ignoreInstallStartFieldSet;
48522
48523 private YesNoType ignoreInstallEndField;
48524
48525 private bool ignoreInstallEndFieldSet;
48526
48527 private string nameField;
48528
48529 private bool nameFieldSet;
48530
48531 private string sourceFileField;
48532
48533 private bool sourceFileFieldSet;
48534
48535 private YesNoType supportBasicUIField;
48536
48537 private bool supportBasicUIFieldSet;
48538
48539 private ISchemaElement parentElement;
48540
48541 public EmbeddedUI()
48542 {
48543 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
48544 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(EmbeddedUIResource)));
48545 this.children = childCollection0;
48546 }
48547
48548 public virtual IEnumerable Children
48549 {
48550 get
48551 {
48552 return this.children;
48553 }
48554 }
48555
48556 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
48557 public virtual IEnumerable this[System.Type childType]
48558 {
48559 get
48560 {
48561 return this.children.Filter(childType);
48562 }
48563 }
48564
48565 /// <summary>
48566 /// Unique identifier for embedded UI.If this attribute is not specified the Name attribute or the file name
48567 /// portion of the SourceFile attribute will be used.
48568 /// </summary>
48569 public string Id
48570 {
48571 get
48572 {
48573 return this.idField;
48574 }
48575 set
48576 {
48577 this.idFieldSet = true;
48578 this.idField = value;
48579 }
48580 }
48581
48582 /// <summary>
48583 /// Embedded UI will not recieve any INSTALLLOGMODE_FATALEXIT messages.
48584 /// </summary>
48585 public YesNoType IgnoreFatalExit
48586 {
48587 get
48588 {
48589 return this.ignoreFatalExitField;
48590 }
48591 set
48592 {
48593 this.ignoreFatalExitFieldSet = true;
48594 this.ignoreFatalExitField = value;
48595 }
48596 }
48597
48598 /// <summary>
48599 /// Embedded UI will not recieve any INSTALLLOGMODE_ERROR messages.
48600 /// </summary>
48601 public YesNoType IgnoreError
48602 {
48603 get
48604 {
48605 return this.ignoreErrorField;
48606 }
48607 set
48608 {
48609 this.ignoreErrorFieldSet = true;
48610 this.ignoreErrorField = value;
48611 }
48612 }
48613
48614 /// <summary>
48615 /// Embedded UI will not recieve any INSTALLLOGMODE_WARNING messages.
48616 /// </summary>
48617 public YesNoType IgnoreWarning
48618 {
48619 get
48620 {
48621 return this.ignoreWarningField;
48622 }
48623 set
48624 {
48625 this.ignoreWarningFieldSet = true;
48626 this.ignoreWarningField = value;
48627 }
48628 }
48629
48630 /// <summary>
48631 /// Embedded UI will not recieve any INSTALLLOGMODE_USER messages.
48632 /// </summary>
48633 public YesNoType IgnoreUser
48634 {
48635 get
48636 {
48637 return this.ignoreUserField;
48638 }
48639 set
48640 {
48641 this.ignoreUserFieldSet = true;
48642 this.ignoreUserField = value;
48643 }
48644 }
48645
48646 /// <summary>
48647 /// Embedded UI will not recieve any INSTALLLOGMODE_INFO messages.
48648 /// </summary>
48649 public YesNoType IgnoreInfo
48650 {
48651 get
48652 {
48653 return this.ignoreInfoField;
48654 }
48655 set
48656 {
48657 this.ignoreInfoFieldSet = true;
48658 this.ignoreInfoField = value;
48659 }
48660 }
48661
48662 /// <summary>
48663 /// Embedded UI will not recieve any INSTALLLOGMODE_FILESINUSE messages.
48664 /// </summary>
48665 public YesNoType IgnoreFilesInUse
48666 {
48667 get
48668 {
48669 return this.ignoreFilesInUseField;
48670 }
48671 set
48672 {
48673 this.ignoreFilesInUseFieldSet = true;
48674 this.ignoreFilesInUseField = value;
48675 }
48676 }
48677
48678 /// <summary>
48679 /// Embedded UI will not recieve any INSTALLLOGMODE_RESOLVESOURCE messages.
48680 /// </summary>
48681 public YesNoType IgnoreResolveSource
48682 {
48683 get
48684 {
48685 return this.ignoreResolveSourceField;
48686 }
48687 set
48688 {
48689 this.ignoreResolveSourceFieldSet = true;
48690 this.ignoreResolveSourceField = value;
48691 }
48692 }
48693
48694 /// <summary>
48695 /// Embedded UI will not recieve any INSTALLLOGMODE_OUTOFDISKSPACE messages.
48696 /// </summary>
48697 public YesNoType IgnoreOutOfDiskSpace
48698 {
48699 get
48700 {
48701 return this.ignoreOutOfDiskSpaceField;
48702 }
48703 set
48704 {
48705 this.ignoreOutOfDiskSpaceFieldSet = true;
48706 this.ignoreOutOfDiskSpaceField = value;
48707 }
48708 }
48709
48710 /// <summary>
48711 /// Embedded UI will not recieve any INSTALLLOGMODE_ACTIONSTART messages.
48712 /// </summary>
48713 public YesNoType IgnoreActionStart
48714 {
48715 get
48716 {
48717 return this.ignoreActionStartField;
48718 }
48719 set
48720 {
48721 this.ignoreActionStartFieldSet = true;
48722 this.ignoreActionStartField = value;
48723 }
48724 }
48725
48726 /// <summary>
48727 /// Embedded UI will not recieve any INSTALLLOGMODE_ACTIONDATA messages.
48728 /// </summary>
48729 public YesNoType IgnoreActionData
48730 {
48731 get
48732 {
48733 return this.ignoreActionDataField;
48734 }
48735 set
48736 {
48737 this.ignoreActionDataFieldSet = true;
48738 this.ignoreActionDataField = value;
48739 }
48740 }
48741
48742 /// <summary>
48743 /// Embedded UI will not recieve any INSTALLLOGMODE_PROGRESS messages.
48744 /// </summary>
48745 public YesNoType IgnoreProgress
48746 {
48747 get
48748 {
48749 return this.ignoreProgressField;
48750 }
48751 set
48752 {
48753 this.ignoreProgressFieldSet = true;
48754 this.ignoreProgressField = value;
48755 }
48756 }
48757
48758 /// <summary>
48759 /// Embedded UI will not recieve any INSTALLLOGMODE_COMMONDATA messages.
48760 /// </summary>
48761 public YesNoType IgnoreCommonData
48762 {
48763 get
48764 {
48765 return this.ignoreCommonDataField;
48766 }
48767 set
48768 {
48769 this.ignoreCommonDataFieldSet = true;
48770 this.ignoreCommonDataField = value;
48771 }
48772 }
48773
48774 /// <summary>
48775 /// Embedded UI will not recieve any INSTALLLOGMODE_INITIALIZE messages.
48776 /// </summary>
48777 public YesNoType IgnoreInitialize
48778 {
48779 get
48780 {
48781 return this.ignoreInitializeField;
48782 }
48783 set
48784 {
48785 this.ignoreInitializeFieldSet = true;
48786 this.ignoreInitializeField = value;
48787 }
48788 }
48789
48790 /// <summary>
48791 /// Embedded UI will not recieve any INSTALLLOGMODE_TERMINATE messages.
48792 /// </summary>
48793 public YesNoType IgnoreTerminate
48794 {
48795 get
48796 {
48797 return this.ignoreTerminateField;
48798 }
48799 set
48800 {
48801 this.ignoreTerminateFieldSet = true;
48802 this.ignoreTerminateField = value;
48803 }
48804 }
48805
48806 /// <summary>
48807 /// Embedded UI will not recieve any INSTALLLOGMODE_SHOWDIALOG messages.
48808 /// </summary>
48809 public YesNoType IgnoreShowDialog
48810 {
48811 get
48812 {
48813 return this.ignoreShowDialogField;
48814 }
48815 set
48816 {
48817 this.ignoreShowDialogFieldSet = true;
48818 this.ignoreShowDialogField = value;
48819 }
48820 }
48821
48822 /// <summary>
48823 /// Embedded UI will not recieve any INSTALLLOGMODE_RMFILESINUSE messages.
48824 /// </summary>
48825 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
48826 public YesNoType IgnoreRMFilesInUse
48827 {
48828 get
48829 {
48830 return this.ignoreRMFilesInUseField;
48831 }
48832 set
48833 {
48834 this.ignoreRMFilesInUseFieldSet = true;
48835 this.ignoreRMFilesInUseField = value;
48836 }
48837 }
48838
48839 /// <summary>
48840 /// Embedded UI will not recieve any INSTALLLOGMODE_INSTALLSTART messages.
48841 /// </summary>
48842 public YesNoType IgnoreInstallStart
48843 {
48844 get
48845 {
48846 return this.ignoreInstallStartField;
48847 }
48848 set
48849 {
48850 this.ignoreInstallStartFieldSet = true;
48851 this.ignoreInstallStartField = value;
48852 }
48853 }
48854
48855 /// <summary>
48856 /// Embedded UI will not recieve any INSTALLLOGMODE_INSTALLEND messages.
48857 /// </summary>
48858 public YesNoType IgnoreInstallEnd
48859 {
48860 get
48861 {
48862 return this.ignoreInstallEndField;
48863 }
48864 set
48865 {
48866 this.ignoreInstallEndFieldSet = true;
48867 this.ignoreInstallEndField = value;
48868 }
48869 }
48870
48871 /// <summary>
48872 /// The name for the embedded UI DLL when it is extracted from the package and executed. (Windows Installer
48873 /// does not support the typical short filename and long filename combination for embedded UI files as it
48874 /// does for other kinds of files.) If this attribute is not specified the file name portion of the SourceFile
48875 /// attribute will be used.
48876 /// </summary>
48877 public string Name
48878 {
48879 get
48880 {
48881 return this.nameField;
48882 }
48883 set
48884 {
48885 this.nameFieldSet = true;
48886 this.nameField = value;
48887 }
48888 }
48889
48890 /// <summary>
48891 /// Path to the binary file that is the embedded UI. This must be a DLL that exports the following
48892 /// three entry points: InitializeEmbeddedUI, EmbeddedUIHandler and ShutdownEmbeddedUI.
48893 /// </summary>
48894 public string SourceFile
48895 {
48896 get
48897 {
48898 return this.sourceFileField;
48899 }
48900 set
48901 {
48902 this.sourceFileFieldSet = true;
48903 this.sourceFileField = value;
48904 }
48905 }
48906
48907 /// <summary>
48908 /// Set yes to allow the Windows Installer to display the embedded UI during basic UI level installation.
48909 /// </summary>
48910 public YesNoType SupportBasicUI
48911 {
48912 get
48913 {
48914 return this.supportBasicUIField;
48915 }
48916 set
48917 {
48918 this.supportBasicUIFieldSet = true;
48919 this.supportBasicUIField = value;
48920 }
48921 }
48922
48923 public virtual ISchemaElement ParentElement
48924 {
48925 get
48926 {
48927 return this.parentElement;
48928 }
48929 set
48930 {
48931 this.parentElement = value;
48932 }
48933 }
48934
48935 public virtual void AddChild(ISchemaElement child)
48936 {
48937 if ((null == child))
48938 {
48939 throw new ArgumentNullException("child");
48940 }
48941 this.children.AddElement(child);
48942 child.ParentElement = this;
48943 }
48944
48945 public virtual void RemoveChild(ISchemaElement child)
48946 {
48947 if ((null == child))
48948 {
48949 throw new ArgumentNullException("child");
48950 }
48951 this.children.RemoveElement(child);
48952 child.ParentElement = null;
48953 }
48954
48955 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
48956 ISchemaElement ICreateChildren.CreateChild(string childName)
48957 {
48958 if (String.IsNullOrEmpty(childName))
48959 {
48960 throw new ArgumentNullException("childName");
48961 }
48962 ISchemaElement childValue = null;
48963 if (("EmbeddedUIResource" == childName))
48964 {
48965 childValue = new EmbeddedUIResource();
48966 }
48967 if ((null == childValue))
48968 {
48969 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
48970 }
48971 return childValue;
48972 }
48973
48974 /// <summary>
48975 /// Processes this element and all child elements into an XmlWriter.
48976 /// </summary>
48977 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
48978 public virtual void OutputXml(XmlWriter writer)
48979 {
48980 if ((null == writer))
48981 {
48982 throw new ArgumentNullException("writer");
48983 }
48984 writer.WriteStartElement("EmbeddedUI", "http://wixtoolset.org/schemas/v4/wxs");
48985 if (this.idFieldSet)
48986 {
48987 writer.WriteAttributeString("Id", this.idField);
48988 }
48989 if (this.ignoreFatalExitFieldSet)
48990 {
48991 if ((this.ignoreFatalExitField == YesNoType.no))
48992 {
48993 writer.WriteAttributeString("IgnoreFatalExit", "no");
48994 }
48995 if ((this.ignoreFatalExitField == YesNoType.yes))
48996 {
48997 writer.WriteAttributeString("IgnoreFatalExit", "yes");
48998 }
48999 }
49000 if (this.ignoreErrorFieldSet)
49001 {
49002 if ((this.ignoreErrorField == YesNoType.no))
49003 {
49004 writer.WriteAttributeString("IgnoreError", "no");
49005 }
49006 if ((this.ignoreErrorField == YesNoType.yes))
49007 {
49008 writer.WriteAttributeString("IgnoreError", "yes");
49009 }
49010 }
49011 if (this.ignoreWarningFieldSet)
49012 {
49013 if ((this.ignoreWarningField == YesNoType.no))
49014 {
49015 writer.WriteAttributeString("IgnoreWarning", "no");
49016 }
49017 if ((this.ignoreWarningField == YesNoType.yes))
49018 {
49019 writer.WriteAttributeString("IgnoreWarning", "yes");
49020 }
49021 }
49022 if (this.ignoreUserFieldSet)
49023 {
49024 if ((this.ignoreUserField == YesNoType.no))
49025 {
49026 writer.WriteAttributeString("IgnoreUser", "no");
49027 }
49028 if ((this.ignoreUserField == YesNoType.yes))
49029 {
49030 writer.WriteAttributeString("IgnoreUser", "yes");
49031 }
49032 }
49033 if (this.ignoreInfoFieldSet)
49034 {
49035 if ((this.ignoreInfoField == YesNoType.no))
49036 {
49037 writer.WriteAttributeString("IgnoreInfo", "no");
49038 }
49039 if ((this.ignoreInfoField == YesNoType.yes))
49040 {
49041 writer.WriteAttributeString("IgnoreInfo", "yes");
49042 }
49043 }
49044 if (this.ignoreFilesInUseFieldSet)
49045 {
49046 if ((this.ignoreFilesInUseField == YesNoType.no))
49047 {
49048 writer.WriteAttributeString("IgnoreFilesInUse", "no");
49049 }
49050 if ((this.ignoreFilesInUseField == YesNoType.yes))
49051 {
49052 writer.WriteAttributeString("IgnoreFilesInUse", "yes");
49053 }
49054 }
49055 if (this.ignoreResolveSourceFieldSet)
49056 {
49057 if ((this.ignoreResolveSourceField == YesNoType.no))
49058 {
49059 writer.WriteAttributeString("IgnoreResolveSource", "no");
49060 }
49061 if ((this.ignoreResolveSourceField == YesNoType.yes))
49062 {
49063 writer.WriteAttributeString("IgnoreResolveSource", "yes");
49064 }
49065 }
49066 if (this.ignoreOutOfDiskSpaceFieldSet)
49067 {
49068 if ((this.ignoreOutOfDiskSpaceField == YesNoType.no))
49069 {
49070 writer.WriteAttributeString("IgnoreOutOfDiskSpace", "no");
49071 }
49072 if ((this.ignoreOutOfDiskSpaceField == YesNoType.yes))
49073 {
49074 writer.WriteAttributeString("IgnoreOutOfDiskSpace", "yes");
49075 }
49076 }
49077 if (this.ignoreActionStartFieldSet)
49078 {
49079 if ((this.ignoreActionStartField == YesNoType.no))
49080 {
49081 writer.WriteAttributeString("IgnoreActionStart", "no");
49082 }
49083 if ((this.ignoreActionStartField == YesNoType.yes))
49084 {
49085 writer.WriteAttributeString("IgnoreActionStart", "yes");
49086 }
49087 }
49088 if (this.ignoreActionDataFieldSet)
49089 {
49090 if ((this.ignoreActionDataField == YesNoType.no))
49091 {
49092 writer.WriteAttributeString("IgnoreActionData", "no");
49093 }
49094 if ((this.ignoreActionDataField == YesNoType.yes))
49095 {
49096 writer.WriteAttributeString("IgnoreActionData", "yes");
49097 }
49098 }
49099 if (this.ignoreProgressFieldSet)
49100 {
49101 if ((this.ignoreProgressField == YesNoType.no))
49102 {
49103 writer.WriteAttributeString("IgnoreProgress", "no");
49104 }
49105 if ((this.ignoreProgressField == YesNoType.yes))
49106 {
49107 writer.WriteAttributeString("IgnoreProgress", "yes");
49108 }
49109 }
49110 if (this.ignoreCommonDataFieldSet)
49111 {
49112 if ((this.ignoreCommonDataField == YesNoType.no))
49113 {
49114 writer.WriteAttributeString("IgnoreCommonData", "no");
49115 }
49116 if ((this.ignoreCommonDataField == YesNoType.yes))
49117 {
49118 writer.WriteAttributeString("IgnoreCommonData", "yes");
49119 }
49120 }
49121 if (this.ignoreInitializeFieldSet)
49122 {
49123 if ((this.ignoreInitializeField == YesNoType.no))
49124 {
49125 writer.WriteAttributeString("IgnoreInitialize", "no");
49126 }
49127 if ((this.ignoreInitializeField == YesNoType.yes))
49128 {
49129 writer.WriteAttributeString("IgnoreInitialize", "yes");
49130 }
49131 }
49132 if (this.ignoreTerminateFieldSet)
49133 {
49134 if ((this.ignoreTerminateField == YesNoType.no))
49135 {
49136 writer.WriteAttributeString("IgnoreTerminate", "no");
49137 }
49138 if ((this.ignoreTerminateField == YesNoType.yes))
49139 {
49140 writer.WriteAttributeString("IgnoreTerminate", "yes");
49141 }
49142 }
49143 if (this.ignoreShowDialogFieldSet)
49144 {
49145 if ((this.ignoreShowDialogField == YesNoType.no))
49146 {
49147 writer.WriteAttributeString("IgnoreShowDialog", "no");
49148 }
49149 if ((this.ignoreShowDialogField == YesNoType.yes))
49150 {
49151 writer.WriteAttributeString("IgnoreShowDialog", "yes");
49152 }
49153 }
49154 if (this.ignoreRMFilesInUseFieldSet)
49155 {
49156 if ((this.ignoreRMFilesInUseField == YesNoType.no))
49157 {
49158 writer.WriteAttributeString("IgnoreRMFilesInUse", "no");
49159 }
49160 if ((this.ignoreRMFilesInUseField == YesNoType.yes))
49161 {
49162 writer.WriteAttributeString("IgnoreRMFilesInUse", "yes");
49163 }
49164 }
49165 if (this.ignoreInstallStartFieldSet)
49166 {
49167 if ((this.ignoreInstallStartField == YesNoType.no))
49168 {
49169 writer.WriteAttributeString("IgnoreInstallStart", "no");
49170 }
49171 if ((this.ignoreInstallStartField == YesNoType.yes))
49172 {
49173 writer.WriteAttributeString("IgnoreInstallStart", "yes");
49174 }
49175 }
49176 if (this.ignoreInstallEndFieldSet)
49177 {
49178 if ((this.ignoreInstallEndField == YesNoType.no))
49179 {
49180 writer.WriteAttributeString("IgnoreInstallEnd", "no");
49181 }
49182 if ((this.ignoreInstallEndField == YesNoType.yes))
49183 {
49184 writer.WriteAttributeString("IgnoreInstallEnd", "yes");
49185 }
49186 }
49187 if (this.nameFieldSet)
49188 {
49189 writer.WriteAttributeString("Name", this.nameField);
49190 }
49191 if (this.sourceFileFieldSet)
49192 {
49193 writer.WriteAttributeString("SourceFile", this.sourceFileField);
49194 }
49195 if (this.supportBasicUIFieldSet)
49196 {
49197 if ((this.supportBasicUIField == YesNoType.no))
49198 {
49199 writer.WriteAttributeString("SupportBasicUI", "no");
49200 }
49201 if ((this.supportBasicUIField == YesNoType.yes))
49202 {
49203 writer.WriteAttributeString("SupportBasicUI", "yes");
49204 }
49205 }
49206 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
49207 {
49208 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
49209 childElement.OutputXml(writer);
49210 }
49211 writer.WriteEndElement();
49212 }
49213
49214 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
49215 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
49216 void ISetAttributes.SetAttribute(string name, string value)
49217 {
49218 if (String.IsNullOrEmpty(name))
49219 {
49220 throw new ArgumentNullException("name");
49221 }
49222 if (("Id" == name))
49223 {
49224 this.idField = value;
49225 this.idFieldSet = true;
49226 }
49227 if (("IgnoreFatalExit" == name))
49228 {
49229 this.ignoreFatalExitField = Enums.ParseYesNoType(value);
49230 this.ignoreFatalExitFieldSet = true;
49231 }
49232 if (("IgnoreError" == name))
49233 {
49234 this.ignoreErrorField = Enums.ParseYesNoType(value);
49235 this.ignoreErrorFieldSet = true;
49236 }
49237 if (("IgnoreWarning" == name))
49238 {
49239 this.ignoreWarningField = Enums.ParseYesNoType(value);
49240 this.ignoreWarningFieldSet = true;
49241 }
49242 if (("IgnoreUser" == name))
49243 {
49244 this.ignoreUserField = Enums.ParseYesNoType(value);
49245 this.ignoreUserFieldSet = true;
49246 }
49247 if (("IgnoreInfo" == name))
49248 {
49249 this.ignoreInfoField = Enums.ParseYesNoType(value);
49250 this.ignoreInfoFieldSet = true;
49251 }
49252 if (("IgnoreFilesInUse" == name))
49253 {
49254 this.ignoreFilesInUseField = Enums.ParseYesNoType(value);
49255 this.ignoreFilesInUseFieldSet = true;
49256 }
49257 if (("IgnoreResolveSource" == name))
49258 {
49259 this.ignoreResolveSourceField = Enums.ParseYesNoType(value);
49260 this.ignoreResolveSourceFieldSet = true;
49261 }
49262 if (("IgnoreOutOfDiskSpace" == name))
49263 {
49264 this.ignoreOutOfDiskSpaceField = Enums.ParseYesNoType(value);
49265 this.ignoreOutOfDiskSpaceFieldSet = true;
49266 }
49267 if (("IgnoreActionStart" == name))
49268 {
49269 this.ignoreActionStartField = Enums.ParseYesNoType(value);
49270 this.ignoreActionStartFieldSet = true;
49271 }
49272 if (("IgnoreActionData" == name))
49273 {
49274 this.ignoreActionDataField = Enums.ParseYesNoType(value);
49275 this.ignoreActionDataFieldSet = true;
49276 }
49277 if (("IgnoreProgress" == name))
49278 {
49279 this.ignoreProgressField = Enums.ParseYesNoType(value);
49280 this.ignoreProgressFieldSet = true;
49281 }
49282 if (("IgnoreCommonData" == name))
49283 {
49284 this.ignoreCommonDataField = Enums.ParseYesNoType(value);
49285 this.ignoreCommonDataFieldSet = true;
49286 }
49287 if (("IgnoreInitialize" == name))
49288 {
49289 this.ignoreInitializeField = Enums.ParseYesNoType(value);
49290 this.ignoreInitializeFieldSet = true;
49291 }
49292 if (("IgnoreTerminate" == name))
49293 {
49294 this.ignoreTerminateField = Enums.ParseYesNoType(value);
49295 this.ignoreTerminateFieldSet = true;
49296 }
49297 if (("IgnoreShowDialog" == name))
49298 {
49299 this.ignoreShowDialogField = Enums.ParseYesNoType(value);
49300 this.ignoreShowDialogFieldSet = true;
49301 }
49302 if (("IgnoreRMFilesInUse" == name))
49303 {
49304 this.ignoreRMFilesInUseField = Enums.ParseYesNoType(value);
49305 this.ignoreRMFilesInUseFieldSet = true;
49306 }
49307 if (("IgnoreInstallStart" == name))
49308 {
49309 this.ignoreInstallStartField = Enums.ParseYesNoType(value);
49310 this.ignoreInstallStartFieldSet = true;
49311 }
49312 if (("IgnoreInstallEnd" == name))
49313 {
49314 this.ignoreInstallEndField = Enums.ParseYesNoType(value);
49315 this.ignoreInstallEndFieldSet = true;
49316 }
49317 if (("Name" == name))
49318 {
49319 this.nameField = value;
49320 this.nameFieldSet = true;
49321 }
49322 if (("SourceFile" == name))
49323 {
49324 this.sourceFileField = value;
49325 this.sourceFileFieldSet = true;
49326 }
49327 if (("SupportBasicUI" == name))
49328 {
49329 this.supportBasicUIField = Enums.ParseYesNoType(value);
49330 this.supportBasicUIFieldSet = true;
49331 }
49332 }
49333 }
49334
49335 /// <summary>
49336 /// Defines a resource for use by the embedded UI.
49337 /// </summary>
49338 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
49339 public class EmbeddedUIResource : ISchemaElement, ISetAttributes
49340 {
49341
49342 private string idField;
49343
49344 private bool idFieldSet;
49345
49346 private string nameField;
49347
49348 private bool nameFieldSet;
49349
49350 private string sourceFileField;
49351
49352 private bool sourceFileFieldSet;
49353
49354 private ISchemaElement parentElement;
49355
49356 /// <summary>
49357 /// Identifier for the embedded UI resource.
49358 /// </summary>
49359 public string Id
49360 {
49361 get
49362 {
49363 return this.idField;
49364 }
49365 set
49366 {
49367 this.idFieldSet = true;
49368 this.idField = value;
49369 }
49370 }
49371
49372 /// <summary>
49373 /// The name for the resource when it is extracted from the package for use by the embedded UI DLL. (Windows
49374 /// Installer does not support the typical short filename and long filename combination for embedded UI files
49375 /// as it does for other kinds of files.) If this attribute is not specified the Id attribute will be used.
49376 /// </summary>
49377 public string Name
49378 {
49379 get
49380 {
49381 return this.nameField;
49382 }
49383 set
49384 {
49385 this.nameFieldSet = true;
49386 this.nameField = value;
49387 }
49388 }
49389
49390 /// <summary>
49391 /// Path to the binary file that is the embedded UI resource.
49392 /// </summary>
49393 public string SourceFile
49394 {
49395 get
49396 {
49397 return this.sourceFileField;
49398 }
49399 set
49400 {
49401 this.sourceFileFieldSet = true;
49402 this.sourceFileField = value;
49403 }
49404 }
49405
49406 public virtual ISchemaElement ParentElement
49407 {
49408 get
49409 {
49410 return this.parentElement;
49411 }
49412 set
49413 {
49414 this.parentElement = value;
49415 }
49416 }
49417
49418 /// <summary>
49419 /// Processes this element and all child elements into an XmlWriter.
49420 /// </summary>
49421 public virtual void OutputXml(XmlWriter writer)
49422 {
49423 if ((null == writer))
49424 {
49425 throw new ArgumentNullException("writer");
49426 }
49427 writer.WriteStartElement("EmbeddedUIResource", "http://wixtoolset.org/schemas/v4/wxs");
49428 if (this.idFieldSet)
49429 {
49430 writer.WriteAttributeString("Id", this.idField);
49431 }
49432 if (this.nameFieldSet)
49433 {
49434 writer.WriteAttributeString("Name", this.nameField);
49435 }
49436 if (this.sourceFileFieldSet)
49437 {
49438 writer.WriteAttributeString("SourceFile", this.sourceFileField);
49439 }
49440 writer.WriteEndElement();
49441 }
49442
49443 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
49444 void ISetAttributes.SetAttribute(string name, string value)
49445 {
49446 if (String.IsNullOrEmpty(name))
49447 {
49448 throw new ArgumentNullException("name");
49449 }
49450 if (("Id" == name))
49451 {
49452 this.idField = value;
49453 this.idFieldSet = true;
49454 }
49455 if (("Name" == name))
49456 {
49457 this.nameField = value;
49458 this.nameFieldSet = true;
49459 }
49460 if (("SourceFile" == name))
49461 {
49462 this.sourceFileField = value;
49463 this.sourceFileFieldSet = true;
49464 }
49465 }
49466 }
49467
49468 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
49469 public class Error : ISchemaElement, ISetAttributes
49470 {
49471
49472 private int idField;
49473
49474 private bool idFieldSet;
49475
49476 private string contentField;
49477
49478 private bool contentFieldSet;
49479
49480 private ISchemaElement parentElement;
49481
49482 /// <summary>
49483 /// Number of the error for which a message is being provided. See MSI SDK for error definitions.
49484 /// </summary>
49485 public int Id
49486 {
49487 get
49488 {
49489 return this.idField;
49490 }
49491 set
49492 {
49493 this.idFieldSet = true;
49494 this.idField = value;
49495 }
49496 }
49497
49498 /// <summary>
49499 /// Element value is Message, use CDATA if message contains delimiter characters
49500 /// </summary>
49501 public string Content
49502 {
49503 get
49504 {
49505 return this.contentField;
49506 }
49507 set
49508 {
49509 this.contentFieldSet = true;
49510 this.contentField = value;
49511 }
49512 }
49513
49514 public virtual ISchemaElement ParentElement
49515 {
49516 get
49517 {
49518 return this.parentElement;
49519 }
49520 set
49521 {
49522 this.parentElement = value;
49523 }
49524 }
49525
49526 /// <summary>
49527 /// Processes this element and all child elements into an XmlWriter.
49528 /// </summary>
49529 public virtual void OutputXml(XmlWriter writer)
49530 {
49531 if ((null == writer))
49532 {
49533 throw new ArgumentNullException("writer");
49534 }
49535 writer.WriteStartElement("Error", "http://wixtoolset.org/schemas/v4/wxs");
49536 if (this.idFieldSet)
49537 {
49538 writer.WriteAttributeString("Id", this.idField.ToString(CultureInfo.InvariantCulture));
49539 }
49540 if (this.contentFieldSet)
49541 {
49542 writer.WriteString(this.contentField);
49543 }
49544 writer.WriteEndElement();
49545 }
49546
49547 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
49548 void ISetAttributes.SetAttribute(string name, string value)
49549 {
49550 if (String.IsNullOrEmpty(name))
49551 {
49552 throw new ArgumentNullException("name");
49553 }
49554 if (("Id" == name))
49555 {
49556 this.idField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
49557 this.idFieldSet = true;
49558 }
49559 if (("Content" == name))
49560 {
49561 this.contentField = value;
49562 this.contentFieldSet = true;
49563 }
49564 }
49565 }
49566
49567 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
49568 public class Publish : ISchemaElement, ISetAttributes
49569 {
49570
49571 private string controlField;
49572
49573 private bool controlFieldSet;
49574
49575 private string dialogField;
49576
49577 private bool dialogFieldSet;
49578
49579 private string eventField;
49580
49581 private bool eventFieldSet;
49582
49583 private string orderField;
49584
49585 private bool orderFieldSet;
49586
49587 private string propertyField;
49588
49589 private bool propertyFieldSet;
49590
49591 private string valueField;
49592
49593 private bool valueFieldSet;
49594
49595 private string contentField;
49596
49597 private bool contentFieldSet;
49598
49599 private ISchemaElement parentElement;
49600
49601 /// <summary>
49602 /// The parent Control for this Publish element, should only be specified when this element is a child of the UI element.
49603 /// </summary>
49604 public string Control
49605 {
49606 get
49607 {
49608 return this.controlField;
49609 }
49610 set
49611 {
49612 this.controlFieldSet = true;
49613 this.controlField = value;
49614 }
49615 }
49616
49617 /// <summary>
49618 /// The parent Dialog for this Publish element, should only be specified when this element is a child of the UI element.
49619 /// This attribute will create a reference to the specified Dialog, so an additional DialogRef is not necessary.
49620 /// </summary>
49621 public string Dialog
49622 {
49623 get
49624 {
49625 return this.dialogField;
49626 }
49627 set
49628 {
49629 this.dialogFieldSet = true;
49630 this.dialogField = value;
49631 }
49632 }
49633
49634 /// <summary>
49635 /// Set this attribute's value to one of the standard control events to trigger that event.
49636 /// Either this attribute or the Property attribute must be set, but not both at the same time.
49637 /// </summary>
49638 public string Event
49639 {
49640 get
49641 {
49642 return this.eventField;
49643 }
49644 set
49645 {
49646 this.eventFieldSet = true;
49647 this.eventField = value;
49648 }
49649 }
49650
49651 /// <summary>
49652 /// This attribute should only need to be set if this element is nested under a UI element in order to
49653 /// control the order in which this publish event will be started.
49654 /// If this element is nested under a Control element, the default value will be one greater than any
49655 /// previous Publish element's order (the first element's default value is 1).
49656 /// If this element is nested under a UI element, the default value is always 1 (it does not get a
49657 /// default value based on any previous Publish elements).
49658 /// </summary>
49659 public string Order
49660 {
49661 get
49662 {
49663 return this.orderField;
49664 }
49665 set
49666 {
49667 this.orderFieldSet = true;
49668 this.orderField = value;
49669 }
49670 }
49671
49672 /// <summary>
49673 /// Set this attribute's value to a property name to set that property.
49674 /// Either this attribute or the Event attribute must be set, but not both at the same time.
49675 /// </summary>
49676 public string Property
49677 {
49678 get
49679 {
49680 return this.propertyField;
49681 }
49682 set
49683 {
49684 this.propertyFieldSet = true;
49685 this.propertyField = value;
49686 }
49687 }
49688
49689 /// <summary>
49690 /// If the Property attribute is specified, set the value of this attribute to the new value for the property.
49691 /// To set a property to null, do not set this attribute (the ControlEvent Argument column will be set to '{}').
49692 /// Otherwise, this attribute's value should be the argument for the event specified in the Event attribute.
49693 /// If the event doesn't take an attribute, a common value to use is "0".
49694 /// </summary>
49695 public string Value
49696 {
49697 get
49698 {
49699 return this.valueField;
49700 }
49701 set
49702 {
49703 this.valueFieldSet = true;
49704 this.valueField = value;
49705 }
49706 }
49707
49708 /// <summary>
49709 /// The element value is the optional Condition expression.
49710 /// </summary>
49711 public string Content
49712 {
49713 get
49714 {
49715 return this.contentField;
49716 }
49717 set
49718 {
49719 this.contentFieldSet = true;
49720 this.contentField = value;
49721 }
49722 }
49723
49724 public virtual ISchemaElement ParentElement
49725 {
49726 get
49727 {
49728 return this.parentElement;
49729 }
49730 set
49731 {
49732 this.parentElement = value;
49733 }
49734 }
49735
49736 /// <summary>
49737 /// Processes this element and all child elements into an XmlWriter.
49738 /// </summary>
49739 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
49740 public virtual void OutputXml(XmlWriter writer)
49741 {
49742 if ((null == writer))
49743 {
49744 throw new ArgumentNullException("writer");
49745 }
49746 writer.WriteStartElement("Publish", "http://wixtoolset.org/schemas/v4/wxs");
49747 if (this.controlFieldSet)
49748 {
49749 writer.WriteAttributeString("Control", this.controlField);
49750 }
49751 if (this.dialogFieldSet)
49752 {
49753 writer.WriteAttributeString("Dialog", this.dialogField);
49754 }
49755 if (this.eventFieldSet)
49756 {
49757 writer.WriteAttributeString("Event", this.eventField);
49758 }
49759 if (this.orderFieldSet)
49760 {
49761 writer.WriteAttributeString("Order", this.orderField);
49762 }
49763 if (this.propertyFieldSet)
49764 {
49765 writer.WriteAttributeString("Property", this.propertyField);
49766 }
49767 if (this.valueFieldSet)
49768 {
49769 writer.WriteAttributeString("Value", this.valueField);
49770 }
49771 if (this.contentFieldSet)
49772 {
49773 writer.WriteString(this.contentField);
49774 }
49775 writer.WriteEndElement();
49776 }
49777
49778 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
49779 void ISetAttributes.SetAttribute(string name, string value)
49780 {
49781 if (String.IsNullOrEmpty(name))
49782 {
49783 throw new ArgumentNullException("name");
49784 }
49785 if (("Control" == name))
49786 {
49787 this.controlField = value;
49788 this.controlFieldSet = true;
49789 }
49790 if (("Dialog" == name))
49791 {
49792 this.dialogField = value;
49793 this.dialogFieldSet = true;
49794 }
49795 if (("Event" == name))
49796 {
49797 this.eventField = value;
49798 this.eventFieldSet = true;
49799 }
49800 if (("Order" == name))
49801 {
49802 this.orderField = value;
49803 this.orderFieldSet = true;
49804 }
49805 if (("Property" == name))
49806 {
49807 this.propertyField = value;
49808 this.propertyFieldSet = true;
49809 }
49810 if (("Value" == name))
49811 {
49812 this.valueField = value;
49813 this.valueFieldSet = true;
49814 }
49815 if (("Content" == name))
49816 {
49817 this.contentField = value;
49818 this.contentFieldSet = true;
49819 }
49820 }
49821 }
49822
49823 /// <summary>
49824 /// Sets attributes for events in the EventMapping table
49825 /// </summary>
49826 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
49827 public class Subscribe : ISchemaElement, ISetAttributes
49828 {
49829
49830 private string eventField;
49831
49832 private bool eventFieldSet;
49833
49834 private string attributeField;
49835
49836 private bool attributeFieldSet;
49837
49838 private ISchemaElement parentElement;
49839
49840 /// <summary>
49841 /// must be one of the standard control events'
49842 /// </summary>
49843 public string Event
49844 {
49845 get
49846 {
49847 return this.eventField;
49848 }
49849 set
49850 {
49851 this.eventFieldSet = true;
49852 this.eventField = value;
49853 }
49854 }
49855
49856 /// <summary>
49857 /// if not present can only handle enable, disable, hide, unhide events
49858 /// </summary>
49859 public string Attribute
49860 {
49861 get
49862 {
49863 return this.attributeField;
49864 }
49865 set
49866 {
49867 this.attributeFieldSet = true;
49868 this.attributeField = value;
49869 }
49870 }
49871
49872 public virtual ISchemaElement ParentElement
49873 {
49874 get
49875 {
49876 return this.parentElement;
49877 }
49878 set
49879 {
49880 this.parentElement = value;
49881 }
49882 }
49883
49884 /// <summary>
49885 /// Processes this element and all child elements into an XmlWriter.
49886 /// </summary>
49887 public virtual void OutputXml(XmlWriter writer)
49888 {
49889 if ((null == writer))
49890 {
49891 throw new ArgumentNullException("writer");
49892 }
49893 writer.WriteStartElement("Subscribe", "http://wixtoolset.org/schemas/v4/wxs");
49894 if (this.eventFieldSet)
49895 {
49896 writer.WriteAttributeString("Event", this.eventField);
49897 }
49898 if (this.attributeFieldSet)
49899 {
49900 writer.WriteAttributeString("Attribute", this.attributeField);
49901 }
49902 writer.WriteEndElement();
49903 }
49904
49905 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
49906 void ISetAttributes.SetAttribute(string name, string value)
49907 {
49908 if (String.IsNullOrEmpty(name))
49909 {
49910 throw new ArgumentNullException("name");
49911 }
49912 if (("Event" == name))
49913 {
49914 this.eventField = value;
49915 this.eventFieldSet = true;
49916 }
49917 if (("Attribute" == name))
49918 {
49919 this.attributeField = value;
49920 this.attributeFieldSet = true;
49921 }
49922 }
49923 }
49924
49925 /// <summary>
49926 /// An alternative to using the Text attribute when the value contains special XML characters like &lt;, &gt;, or &amp;.
49927 /// </summary>
49928 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
49929 public class Text : ISchemaElement, ISetAttributes
49930 {
49931
49932 private string sourceFileField;
49933
49934 private bool sourceFileFieldSet;
49935
49936 private string srcField;
49937
49938 private bool srcFieldSet;
49939
49940 private string contentField;
49941
49942 private bool contentFieldSet;
49943
49944 private ISchemaElement parentElement;
49945
49946 /// <summary>
49947 /// Instructs the text to be imported from a file instead of the element value during the binding process.
49948 /// </summary>
49949 public string SourceFile
49950 {
49951 get
49952 {
49953 return this.sourceFileField;
49954 }
49955 set
49956 {
49957 this.sourceFileFieldSet = true;
49958 this.sourceFileField = value;
49959 }
49960 }
49961
49962 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
49963 public string src
49964 {
49965 get
49966 {
49967 return this.srcField;
49968 }
49969 set
49970 {
49971 this.srcFieldSet = true;
49972 this.srcField = value;
49973 }
49974 }
49975
49976 public string Content
49977 {
49978 get
49979 {
49980 return this.contentField;
49981 }
49982 set
49983 {
49984 this.contentFieldSet = true;
49985 this.contentField = value;
49986 }
49987 }
49988
49989 public virtual ISchemaElement ParentElement
49990 {
49991 get
49992 {
49993 return this.parentElement;
49994 }
49995 set
49996 {
49997 this.parentElement = value;
49998 }
49999 }
50000
50001 /// <summary>
50002 /// Processes this element and all child elements into an XmlWriter.
50003 /// </summary>
50004 public virtual void OutputXml(XmlWriter writer)
50005 {
50006 if ((null == writer))
50007 {
50008 throw new ArgumentNullException("writer");
50009 }
50010 writer.WriteStartElement("Text", "http://wixtoolset.org/schemas/v4/wxs");
50011 if (this.sourceFileFieldSet)
50012 {
50013 writer.WriteAttributeString("SourceFile", this.sourceFileField);
50014 }
50015 if (this.srcFieldSet)
50016 {
50017 writer.WriteAttributeString("src", this.srcField);
50018 }
50019 if (this.contentFieldSet)
50020 {
50021 writer.WriteString(this.contentField);
50022 }
50023 writer.WriteEndElement();
50024 }
50025
50026 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
50027 void ISetAttributes.SetAttribute(string name, string value)
50028 {
50029 if (String.IsNullOrEmpty(name))
50030 {
50031 throw new ArgumentNullException("name");
50032 }
50033 if (("SourceFile" == name))
50034 {
50035 this.sourceFileField = value;
50036 this.sourceFileFieldSet = true;
50037 }
50038 if (("src" == name))
50039 {
50040 this.srcField = value;
50041 this.srcFieldSet = true;
50042 }
50043 if (("Content" == name))
50044 {
50045 this.contentField = value;
50046 this.contentFieldSet = true;
50047 }
50048 }
50049 }
50050
50051 /// <summary>
50052 /// Contains the controls that appear on each dialog.
50053 /// </summary>
50054 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
50055 public class Control : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
50056 {
50057
50058 private ElementCollection children;
50059
50060 private string idField;
50061
50062 private bool idFieldSet;
50063
50064 private string typeField;
50065
50066 private bool typeFieldSet;
50067
50068 private string xField;
50069
50070 private bool xFieldSet;
50071
50072 private string yField;
50073
50074 private bool yFieldSet;
50075
50076 private string widthField;
50077
50078 private bool widthFieldSet;
50079
50080 private string heightField;
50081
50082 private bool heightFieldSet;
50083
50084 private string propertyField;
50085
50086 private bool propertyFieldSet;
50087
50088 private string textField;
50089
50090 private bool textFieldSet;
50091
50092 private string helpField;
50093
50094 private bool helpFieldSet;
50095
50096 private string toolTipField;
50097
50098 private bool toolTipFieldSet;
50099
50100 private string checkBoxValueField;
50101
50102 private bool checkBoxValueFieldSet;
50103
50104 private string checkBoxPropertyRefField;
50105
50106 private bool checkBoxPropertyRefFieldSet;
50107
50108 private YesNoType tabSkipField;
50109
50110 private bool tabSkipFieldSet;
50111
50112 private YesNoType defaultField;
50113
50114 private bool defaultFieldSet;
50115
50116 private YesNoType cancelField;
50117
50118 private bool cancelFieldSet;
50119
50120 private YesNoType hiddenField;
50121
50122 private bool hiddenFieldSet;
50123
50124 private YesNoType disabledField;
50125
50126 private bool disabledFieldSet;
50127
50128 private YesNoType sunkenField;
50129
50130 private bool sunkenFieldSet;
50131
50132 private YesNoType indirectField;
50133
50134 private bool indirectFieldSet;
50135
50136 private YesNoType integerField;
50137
50138 private bool integerFieldSet;
50139
50140 private YesNoType rightToLeftField;
50141
50142 private bool rightToLeftFieldSet;
50143
50144 private YesNoType rightAlignedField;
50145
50146 private bool rightAlignedFieldSet;
50147
50148 private YesNoType leftScrollField;
50149
50150 private bool leftScrollFieldSet;
50151
50152 private YesNoType transparentField;
50153
50154 private bool transparentFieldSet;
50155
50156 private YesNoType noPrefixField;
50157
50158 private bool noPrefixFieldSet;
50159
50160 private YesNoType noWrapField;
50161
50162 private bool noWrapFieldSet;
50163
50164 private YesNoType formatSizeField;
50165
50166 private bool formatSizeFieldSet;
50167
50168 private YesNoType userLanguageField;
50169
50170 private bool userLanguageFieldSet;
50171
50172 private YesNoType multilineField;
50173
50174 private bool multilineFieldSet;
50175
50176 private YesNoType passwordField;
50177
50178 private bool passwordFieldSet;
50179
50180 private YesNoType progressBlocksField;
50181
50182 private bool progressBlocksFieldSet;
50183
50184 private YesNoType removableField;
50185
50186 private bool removableFieldSet;
50187
50188 private YesNoType fixedField;
50189
50190 private bool fixedFieldSet;
50191
50192 private YesNoType remoteField;
50193
50194 private bool remoteFieldSet;
50195
50196 private YesNoType cDROMField;
50197
50198 private bool cDROMFieldSet;
50199
50200 private YesNoType rAMDiskField;
50201
50202 private bool rAMDiskFieldSet;
50203
50204 private YesNoType floppyField;
50205
50206 private bool floppyFieldSet;
50207
50208 private YesNoType showRollbackCostField;
50209
50210 private bool showRollbackCostFieldSet;
50211
50212 private YesNoType sortedField;
50213
50214 private bool sortedFieldSet;
50215
50216 private YesNoType comboListField;
50217
50218 private bool comboListFieldSet;
50219
50220 private YesNoType imageField;
50221
50222 private bool imageFieldSet;
50223
50224 private IconSizeType iconSizeField;
50225
50226 private bool iconSizeFieldSet;
50227
50228 private YesNoType fixedSizeField;
50229
50230 private bool fixedSizeFieldSet;
50231
50232 private YesNoType iconField;
50233
50234 private bool iconFieldSet;
50235
50236 private YesNoType bitmapField;
50237
50238 private bool bitmapFieldSet;
50239
50240 private YesNoType pushLikeField;
50241
50242 private bool pushLikeFieldSet;
50243
50244 private YesNoType hasBorderField;
50245
50246 private bool hasBorderFieldSet;
50247
50248 private YesNoType elevationShieldField;
50249
50250 private bool elevationShieldFieldSet;
50251
50252 private ISchemaElement parentElement;
50253
50254 public Control()
50255 {
50256 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
50257 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Text)));
50258 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ComboBox)));
50259 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListBox)));
50260 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListView)));
50261 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RadioButtonGroup)));
50262 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property)));
50263 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Binary)));
50264 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
50265 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Condition)));
50266 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Publish)));
50267 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Subscribe)));
50268 childCollection0.AddCollection(childCollection1);
50269 this.children = childCollection0;
50270 }
50271
50272 public virtual IEnumerable Children
50273 {
50274 get
50275 {
50276 return this.children;
50277 }
50278 }
50279
50280 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
50281 public virtual IEnumerable this[System.Type childType]
50282 {
50283 get
50284 {
50285 return this.children.Filter(childType);
50286 }
50287 }
50288
50289 /// <summary>
50290 /// Combined with the Dialog Id to make up the primary key of the Control table.
50291 /// </summary>
50292 public string Id
50293 {
50294 get
50295 {
50296 return this.idField;
50297 }
50298 set
50299 {
50300 this.idFieldSet = true;
50301 this.idField = value;
50302 }
50303 }
50304
50305 /// <summary>
50306 /// The type of the control. Could be one of the following: Billboard, Bitmap, CheckBox, ComboBox, DirectoryCombo, DirectoryList, Edit, GroupBox, Hyperlink, Icon, Line, ListBox, ListView, MaskedEdit, PathEdit, ProgressBar, PushButton, RadioButtonGroup, ScrollableText, SelectionTree, Text, VolumeCostList, VolumeSelectCombo
50307 /// </summary>
50308 public string Type
50309 {
50310 get
50311 {
50312 return this.typeField;
50313 }
50314 set
50315 {
50316 this.typeFieldSet = true;
50317 this.typeField = value;
50318 }
50319 }
50320
50321 /// <summary>
50322 /// Horizontal coordinate of the upper-left corner of the rectangular boundary of the control. This must be a non-negative number.
50323 /// </summary>
50324 public string X
50325 {
50326 get
50327 {
50328 return this.xField;
50329 }
50330 set
50331 {
50332 this.xFieldSet = true;
50333 this.xField = value;
50334 }
50335 }
50336
50337 /// <summary>
50338 /// Vertical coordinate of the upper-left corner of the rectangular boundary of the control. This must be a non-negative number.
50339 /// </summary>
50340 public string Y
50341 {
50342 get
50343 {
50344 return this.yField;
50345 }
50346 set
50347 {
50348 this.yFieldSet = true;
50349 this.yField = value;
50350 }
50351 }
50352
50353 /// <summary>
50354 /// Width of the rectangular boundary of the control. This must be a non-negative number.
50355 /// </summary>
50356 public string Width
50357 {
50358 get
50359 {
50360 return this.widthField;
50361 }
50362 set
50363 {
50364 this.widthFieldSet = true;
50365 this.widthField = value;
50366 }
50367 }
50368
50369 /// <summary>
50370 /// Height of the rectangular boundary of the control. This must be a non-negative number.
50371 /// </summary>
50372 public string Height
50373 {
50374 get
50375 {
50376 return this.heightField;
50377 }
50378 set
50379 {
50380 this.heightFieldSet = true;
50381 this.heightField = value;
50382 }
50383 }
50384
50385 /// <summary>
50386 /// The name of a defined property to be linked to this control. This column is required for active controls.
50387 /// </summary>
50388 public string Property
50389 {
50390 get
50391 {
50392 return this.propertyField;
50393 }
50394 set
50395 {
50396 this.propertyFieldSet = true;
50397 this.propertyField = value;
50398 }
50399 }
50400
50401 /// <summary>
50402 /// A localizable string used to set the initial text contained in a control. This attribute can contain a formatted string that is processed at install time to insert the values of properties using [PropertyName] syntax. Also supported are environment variables, file installation paths, and component installation directories; see
50403 /// </summary>
50404 public string Text
50405 {
50406 get
50407 {
50408 return this.textField;
50409 }
50410 set
50411 {
50412 this.textFieldSet = true;
50413 this.textField = value;
50414 }
50415 }
50416
50417 /// <summary>
50418 /// This attribute is reserved for future use. There is no need to use this until Windows Installer uses it for something.
50419 /// </summary>
50420 public string Help
50421 {
50422 get
50423 {
50424 return this.helpField;
50425 }
50426 set
50427 {
50428 this.helpFieldSet = true;
50429 this.helpField = value;
50430 }
50431 }
50432
50433 /// <summary>
50434 /// The string used for the Tooltip.
50435 /// </summary>
50436 public string ToolTip
50437 {
50438 get
50439 {
50440 return this.toolTipField;
50441 }
50442 set
50443 {
50444 this.toolTipFieldSet = true;
50445 this.toolTipField = value;
50446 }
50447 }
50448
50449 /// <summary>
50450 /// This attribute is only valid for CheckBox Controls. When set, the linked Property will be set to this value when the check box is checked.
50451 /// </summary>
50452 public string CheckBoxValue
50453 {
50454 get
50455 {
50456 return this.checkBoxValueField;
50457 }
50458 set
50459 {
50460 this.checkBoxValueFieldSet = true;
50461 this.checkBoxValueField = value;
50462 }
50463 }
50464
50465 /// <summary>
50466 /// This attribute is only valid for CheckBox controls. The value is the name of a Property that was already used as the Property for another CheckBox control. The Property attribute cannot be specified. The attribute exists to support multiple checkboxes on different dialogs being tied to the same property.
50467 /// </summary>
50468 public string CheckBoxPropertyRef
50469 {
50470 get
50471 {
50472 return this.checkBoxPropertyRefField;
50473 }
50474 set
50475 {
50476 this.checkBoxPropertyRefFieldSet = true;
50477 this.checkBoxPropertyRefField = value;
50478 }
50479 }
50480
50481 /// <summary>
50482 /// Set this attribute to "yes" to cause this Control to be skipped in the tab sequence.
50483 /// </summary>
50484 public YesNoType TabSkip
50485 {
50486 get
50487 {
50488 return this.tabSkipField;
50489 }
50490 set
50491 {
50492 this.tabSkipFieldSet = true;
50493 this.tabSkipField = value;
50494 }
50495 }
50496
50497 /// <summary>
50498 /// Set this attribute to "yes" to cause this Control to be invoked by the return key.
50499 /// </summary>
50500 public YesNoType Default
50501 {
50502 get
50503 {
50504 return this.defaultField;
50505 }
50506 set
50507 {
50508 this.defaultFieldSet = true;
50509 this.defaultField = value;
50510 }
50511 }
50512
50513 /// <summary>
50514 /// Set this attribute to "yes" to cause this Control to be invoked by the escape key.
50515 /// </summary>
50516 public YesNoType Cancel
50517 {
50518 get
50519 {
50520 return this.cancelField;
50521 }
50522 set
50523 {
50524 this.cancelFieldSet = true;
50525 this.cancelField = value;
50526 }
50527 }
50528
50529 /// <summary>
50530 /// Set this attribute to "yes" to cause the Control to be hidden.
50531 /// </summary>
50532 public YesNoType Hidden
50533 {
50534 get
50535 {
50536 return this.hiddenField;
50537 }
50538 set
50539 {
50540 this.hiddenFieldSet = true;
50541 this.hiddenField = value;
50542 }
50543 }
50544
50545 /// <summary>
50546 /// Set this attribute to "yes" to cause the Control to be disabled.
50547 /// </summary>
50548 public YesNoType Disabled
50549 {
50550 get
50551 {
50552 return this.disabledField;
50553 }
50554 set
50555 {
50556 this.disabledFieldSet = true;
50557 this.disabledField = value;
50558 }
50559 }
50560
50561 /// <summary>
50562 /// Set this attribute to "yes" to cause the Control to be sunken.
50563 /// </summary>
50564 public YesNoType Sunken
50565 {
50566 get
50567 {
50568 return this.sunkenField;
50569 }
50570 set
50571 {
50572 this.sunkenFieldSet = true;
50573 this.sunkenField = value;
50574 }
50575 }
50576
50577 /// <summary>
50578 /// Specifies whether the value displayed or changed by this control is referenced indirectly. If this bit is set, the control displays or changes the value of the property that has the identifier listed in the Property column of the Control table.
50579 /// </summary>
50580 public YesNoType Indirect
50581 {
50582 get
50583 {
50584 return this.indirectField;
50585 }
50586 set
50587 {
50588 this.indirectFieldSet = true;
50589 this.indirectField = value;
50590 }
50591 }
50592
50593 /// <summary>
50594 /// Set this attribute to "yes" to cause the linked Property value for the Control to be treated as an integer. Otherwise, the Property will be treated as a string.
50595 /// </summary>
50596 public YesNoType Integer
50597 {
50598 get
50599 {
50600 return this.integerField;
50601 }
50602 set
50603 {
50604 this.integerFieldSet = true;
50605 this.integerField = value;
50606 }
50607 }
50608
50609 /// <summary>
50610 /// Set this attribute to "yes" to cause the Control to display from right to left.
50611 /// </summary>
50612 public YesNoType RightToLeft
50613 {
50614 get
50615 {
50616 return this.rightToLeftField;
50617 }
50618 set
50619 {
50620 this.rightToLeftFieldSet = true;
50621 this.rightToLeftField = value;
50622 }
50623 }
50624
50625 /// <summary>
50626 /// Set this attribute to "yes" to cause the Control to be right aligned.
50627 /// </summary>
50628 public YesNoType RightAligned
50629 {
50630 get
50631 {
50632 return this.rightAlignedField;
50633 }
50634 set
50635 {
50636 this.rightAlignedFieldSet = true;
50637 this.rightAlignedField = value;
50638 }
50639 }
50640
50641 /// <summary>
50642 /// Set this attribute to "yes" to cause the scroll bar to display on the left side of the Control.
50643 /// </summary>
50644 public YesNoType LeftScroll
50645 {
50646 get
50647 {
50648 return this.leftScrollField;
50649 }
50650 set
50651 {
50652 this.leftScrollFieldSet = true;
50653 this.leftScrollField = value;
50654 }
50655 }
50656
50657 /// <summary>
50658 /// This attribute is only valid for Text Controls.
50659 /// </summary>
50660 public YesNoType Transparent
50661 {
50662 get
50663 {
50664 return this.transparentField;
50665 }
50666 set
50667 {
50668 this.transparentFieldSet = true;
50669 this.transparentField = value;
50670 }
50671 }
50672
50673 /// <summary>
50674 /// This attribute is only valid for Text Controls.
50675 /// </summary>
50676 public YesNoType NoPrefix
50677 {
50678 get
50679 {
50680 return this.noPrefixField;
50681 }
50682 set
50683 {
50684 this.noPrefixFieldSet = true;
50685 this.noPrefixField = value;
50686 }
50687 }
50688
50689 /// <summary>
50690 /// This attribute is only valid for Text Controls.
50691 /// </summary>
50692 public YesNoType NoWrap
50693 {
50694 get
50695 {
50696 return this.noWrapField;
50697 }
50698 set
50699 {
50700 this.noWrapFieldSet = true;
50701 this.noWrapField = value;
50702 }
50703 }
50704
50705 /// <summary>
50706 /// This attribute is only valid for Text Controls.
50707 /// </summary>
50708 public YesNoType FormatSize
50709 {
50710 get
50711 {
50712 return this.formatSizeField;
50713 }
50714 set
50715 {
50716 this.formatSizeFieldSet = true;
50717 this.formatSizeField = value;
50718 }
50719 }
50720
50721 /// <summary>
50722 /// This attribute is only valid for Text Controls.
50723 /// </summary>
50724 public YesNoType UserLanguage
50725 {
50726 get
50727 {
50728 return this.userLanguageField;
50729 }
50730 set
50731 {
50732 this.userLanguageFieldSet = true;
50733 this.userLanguageField = value;
50734 }
50735 }
50736
50737 /// <summary>
50738 /// This attribute is only valid for Edit Controls.
50739 /// </summary>
50740 public YesNoType Multiline
50741 {
50742 get
50743 {
50744 return this.multilineField;
50745 }
50746 set
50747 {
50748 this.multilineFieldSet = true;
50749 this.multilineField = value;
50750 }
50751 }
50752
50753 /// <summary>
50754 /// This attribute is only valid for Edit Controls.
50755 /// </summary>
50756 public YesNoType Password
50757 {
50758 get
50759 {
50760 return this.passwordField;
50761 }
50762 set
50763 {
50764 this.passwordFieldSet = true;
50765 this.passwordField = value;
50766 }
50767 }
50768
50769 /// <summary>
50770 /// This attribute is only valid for ProgressBar Controls.
50771 /// </summary>
50772 public YesNoType ProgressBlocks
50773 {
50774 get
50775 {
50776 return this.progressBlocksField;
50777 }
50778 set
50779 {
50780 this.progressBlocksFieldSet = true;
50781 this.progressBlocksField = value;
50782 }
50783 }
50784
50785 /// <summary>
50786 /// This attribute is only valid for Volume and Directory Controls.
50787 /// </summary>
50788 public YesNoType Removable
50789 {
50790 get
50791 {
50792 return this.removableField;
50793 }
50794 set
50795 {
50796 this.removableFieldSet = true;
50797 this.removableField = value;
50798 }
50799 }
50800
50801 /// <summary>
50802 /// This attribute is only valid for Volume and Directory Controls.
50803 /// </summary>
50804 public YesNoType Fixed
50805 {
50806 get
50807 {
50808 return this.fixedField;
50809 }
50810 set
50811 {
50812 this.fixedFieldSet = true;
50813 this.fixedField = value;
50814 }
50815 }
50816
50817 /// <summary>
50818 /// This attribute is only valid for Volume and Directory Controls.
50819 /// </summary>
50820 public YesNoType Remote
50821 {
50822 get
50823 {
50824 return this.remoteField;
50825 }
50826 set
50827 {
50828 this.remoteFieldSet = true;
50829 this.remoteField = value;
50830 }
50831 }
50832
50833 /// <summary>
50834 /// This attribute is only valid for Volume and Directory Controls.
50835 /// </summary>
50836 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
50837 public YesNoType CDROM
50838 {
50839 get
50840 {
50841 return this.cDROMField;
50842 }
50843 set
50844 {
50845 this.cDROMFieldSet = true;
50846 this.cDROMField = value;
50847 }
50848 }
50849
50850 /// <summary>
50851 /// This attribute is only valid for Volume and Directory Controls.
50852 /// </summary>
50853 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
50854 public YesNoType RAMDisk
50855 {
50856 get
50857 {
50858 return this.rAMDiskField;
50859 }
50860 set
50861 {
50862 this.rAMDiskFieldSet = true;
50863 this.rAMDiskField = value;
50864 }
50865 }
50866
50867 /// <summary>
50868 /// This attribute is only valid for Volume and Directory Controls.
50869 /// </summary>
50870 public YesNoType Floppy
50871 {
50872 get
50873 {
50874 return this.floppyField;
50875 }
50876 set
50877 {
50878 this.floppyFieldSet = true;
50879 this.floppyField = value;
50880 }
50881 }
50882
50883 /// <summary>
50884 /// This attribute is only valid for VolumeCostList Controls.
50885 /// </summary>
50886 public YesNoType ShowRollbackCost
50887 {
50888 get
50889 {
50890 return this.showRollbackCostField;
50891 }
50892 set
50893 {
50894 this.showRollbackCostFieldSet = true;
50895 this.showRollbackCostField = value;
50896 }
50897 }
50898
50899 /// <summary>
50900 /// This attribute is only valid for ListBox, ListView, and ComboBox Controls. Set
50901 /// the value of this attribute to "yes" to have entries appear in the order specified under the Control.
50902 /// If the attribute value is "no" or absent the entries in the control will appear in alphabetical order.
50903 /// </summary>
50904 public YesNoType Sorted
50905 {
50906 get
50907 {
50908 return this.sortedField;
50909 }
50910 set
50911 {
50912 this.sortedFieldSet = true;
50913 this.sortedField = value;
50914 }
50915 }
50916
50917 /// <summary>
50918 /// This attribute is only valid for ComboBox Controls.
50919 /// </summary>
50920 public YesNoType ComboList
50921 {
50922 get
50923 {
50924 return this.comboListField;
50925 }
50926 set
50927 {
50928 this.comboListFieldSet = true;
50929 this.comboListField = value;
50930 }
50931 }
50932
50933 /// <summary>
50934 /// This attribute is only valid for RadioButton, PushButton, and Icon Controls.
50935 /// </summary>
50936 public YesNoType Image
50937 {
50938 get
50939 {
50940 return this.imageField;
50941 }
50942 set
50943 {
50944 this.imageFieldSet = true;
50945 this.imageField = value;
50946 }
50947 }
50948
50949 /// <summary>
50950 /// This attribute is only valid for RadioButton, PushButton, and Icon Controls.
50951 /// </summary>
50952 public IconSizeType IconSize
50953 {
50954 get
50955 {
50956 return this.iconSizeField;
50957 }
50958 set
50959 {
50960 this.iconSizeFieldSet = true;
50961 this.iconSizeField = value;
50962 }
50963 }
50964
50965 /// <summary>
50966 /// This attribute is only valid for RadioButton, PushButton, and Icon Controls.
50967 /// </summary>
50968 public YesNoType FixedSize
50969 {
50970 get
50971 {
50972 return this.fixedSizeField;
50973 }
50974 set
50975 {
50976 this.fixedSizeFieldSet = true;
50977 this.fixedSizeField = value;
50978 }
50979 }
50980
50981 /// <summary>
50982 /// This attribute is only valid for RadioButton and PushButton Controls.
50983 /// </summary>
50984 public YesNoType Icon
50985 {
50986 get
50987 {
50988 return this.iconField;
50989 }
50990 set
50991 {
50992 this.iconFieldSet = true;
50993 this.iconField = value;
50994 }
50995 }
50996
50997 /// <summary>
50998 /// This attribute is only valid for RadioButton and PushButton Controls.
50999 /// </summary>
51000 public YesNoType Bitmap
51001 {
51002 get
51003 {
51004 return this.bitmapField;
51005 }
51006 set
51007 {
51008 this.bitmapFieldSet = true;
51009 this.bitmapField = value;
51010 }
51011 }
51012
51013 /// <summary>
51014 /// This attribute is only valid for RadioButton and Checkbox Controls.
51015 /// </summary>
51016 public YesNoType PushLike
51017 {
51018 get
51019 {
51020 return this.pushLikeField;
51021 }
51022 set
51023 {
51024 this.pushLikeFieldSet = true;
51025 this.pushLikeField = value;
51026 }
51027 }
51028
51029 /// <summary>
51030 /// This attribute is only valid for RadioButton Controls.
51031 /// </summary>
51032 public YesNoType HasBorder
51033 {
51034 get
51035 {
51036 return this.hasBorderField;
51037 }
51038 set
51039 {
51040 this.hasBorderFieldSet = true;
51041 this.hasBorderField = value;
51042 }
51043 }
51044
51045 /// <summary>
51046 /// This attribute is only valid for PushButton controls.
51047 /// Set this attribute to "yes" to add the User Account Control (UAC) elevation icon (shield icon) to the PushButton control.
51048 /// If this attribute's value is "yes" and the installation is not yet running with elevated privileges,
51049 /// the pushbutton control is created using the User Account Control (UAC) elevation icon (shield icon).
51050 /// If this attribute's value is "yes" and the installation is already running with elevated privileges,
51051 /// the pushbutton control is created using the other icon attributes.
51052 /// Otherwise, the pushbutton control is created using the other icon attributes.
51053 /// </summary>
51054 public YesNoType ElevationShield
51055 {
51056 get
51057 {
51058 return this.elevationShieldField;
51059 }
51060 set
51061 {
51062 this.elevationShieldFieldSet = true;
51063 this.elevationShieldField = value;
51064 }
51065 }
51066
51067 public virtual ISchemaElement ParentElement
51068 {
51069 get
51070 {
51071 return this.parentElement;
51072 }
51073 set
51074 {
51075 this.parentElement = value;
51076 }
51077 }
51078
51079 public virtual void AddChild(ISchemaElement child)
51080 {
51081 if ((null == child))
51082 {
51083 throw new ArgumentNullException("child");
51084 }
51085 this.children.AddElement(child);
51086 child.ParentElement = this;
51087 }
51088
51089 public virtual void RemoveChild(ISchemaElement child)
51090 {
51091 if ((null == child))
51092 {
51093 throw new ArgumentNullException("child");
51094 }
51095 this.children.RemoveElement(child);
51096 child.ParentElement = null;
51097 }
51098
51099 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
51100 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
51101 ISchemaElement ICreateChildren.CreateChild(string childName)
51102 {
51103 if (String.IsNullOrEmpty(childName))
51104 {
51105 throw new ArgumentNullException("childName");
51106 }
51107 ISchemaElement childValue = null;
51108 if (("Text" == childName))
51109 {
51110 childValue = new Text();
51111 }
51112 if (("ComboBox" == childName))
51113 {
51114 childValue = new ComboBox();
51115 }
51116 if (("ListBox" == childName))
51117 {
51118 childValue = new ListBox();
51119 }
51120 if (("ListView" == childName))
51121 {
51122 childValue = new ListView();
51123 }
51124 if (("RadioButtonGroup" == childName))
51125 {
51126 childValue = new RadioButtonGroup();
51127 }
51128 if (("Property" == childName))
51129 {
51130 childValue = new Property();
51131 }
51132 if (("Binary" == childName))
51133 {
51134 childValue = new Binary();
51135 }
51136 if (("Condition" == childName))
51137 {
51138 childValue = new Condition();
51139 }
51140 if (("Publish" == childName))
51141 {
51142 childValue = new Publish();
51143 }
51144 if (("Subscribe" == childName))
51145 {
51146 childValue = new Subscribe();
51147 }
51148 if ((null == childValue))
51149 {
51150 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
51151 }
51152 return childValue;
51153 }
51154
51155 /// <summary>
51156 /// Parses a IconSizeType from a string.
51157 /// </summary>
51158 public static IconSizeType ParseIconSizeType(string value)
51159 {
51160 IconSizeType parsedValue;
51161 Control.TryParseIconSizeType(value, out parsedValue);
51162 return parsedValue;
51163 }
51164
51165 /// <summary>
51166 /// Tries to parse a IconSizeType from a string.
51167 /// </summary>
51168 public static bool TryParseIconSizeType(string value, out IconSizeType parsedValue)
51169 {
51170 parsedValue = IconSizeType.NotSet;
51171 if (string.IsNullOrEmpty(value))
51172 {
51173 return false;
51174 }
51175 if (("16" == value))
51176 {
51177 parsedValue = IconSizeType.Item16;
51178 }
51179 else
51180 {
51181 if (("32" == value))
51182 {
51183 parsedValue = IconSizeType.Item32;
51184 }
51185 else
51186 {
51187 if (("48" == value))
51188 {
51189 parsedValue = IconSizeType.Item48;
51190 }
51191 else
51192 {
51193 parsedValue = IconSizeType.IllegalValue;
51194 return false;
51195 }
51196 }
51197 }
51198 return true;
51199 }
51200
51201 /// <summary>
51202 /// Processes this element and all child elements into an XmlWriter.
51203 /// </summary>
51204 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
51205 public virtual void OutputXml(XmlWriter writer)
51206 {
51207 if ((null == writer))
51208 {
51209 throw new ArgumentNullException("writer");
51210 }
51211 writer.WriteStartElement("Control", "http://wixtoolset.org/schemas/v4/wxs");
51212 if (this.idFieldSet)
51213 {
51214 writer.WriteAttributeString("Id", this.idField);
51215 }
51216 if (this.typeFieldSet)
51217 {
51218 writer.WriteAttributeString("Type", this.typeField);
51219 }
51220 if (this.xFieldSet)
51221 {
51222 writer.WriteAttributeString("X", this.xField);
51223 }
51224 if (this.yFieldSet)
51225 {
51226 writer.WriteAttributeString("Y", this.yField);
51227 }
51228 if (this.widthFieldSet)
51229 {
51230 writer.WriteAttributeString("Width", this.widthField);
51231 }
51232 if (this.heightFieldSet)
51233 {
51234 writer.WriteAttributeString("Height", this.heightField);
51235 }
51236 if (this.propertyFieldSet)
51237 {
51238 writer.WriteAttributeString("Property", this.propertyField);
51239 }
51240 if (this.textFieldSet)
51241 {
51242 writer.WriteAttributeString("Text", this.textField);
51243 }
51244 if (this.helpFieldSet)
51245 {
51246 writer.WriteAttributeString("Help", this.helpField);
51247 }
51248 if (this.toolTipFieldSet)
51249 {
51250 writer.WriteAttributeString("ToolTip", this.toolTipField);
51251 }
51252 if (this.checkBoxValueFieldSet)
51253 {
51254 writer.WriteAttributeString("CheckBoxValue", this.checkBoxValueField);
51255 }
51256 if (this.checkBoxPropertyRefFieldSet)
51257 {
51258 writer.WriteAttributeString("CheckBoxPropertyRef", this.checkBoxPropertyRefField);
51259 }
51260 if (this.tabSkipFieldSet)
51261 {
51262 if ((this.tabSkipField == YesNoType.no))
51263 {
51264 writer.WriteAttributeString("TabSkip", "no");
51265 }
51266 if ((this.tabSkipField == YesNoType.yes))
51267 {
51268 writer.WriteAttributeString("TabSkip", "yes");
51269 }
51270 }
51271 if (this.defaultFieldSet)
51272 {
51273 if ((this.defaultField == YesNoType.no))
51274 {
51275 writer.WriteAttributeString("Default", "no");
51276 }
51277 if ((this.defaultField == YesNoType.yes))
51278 {
51279 writer.WriteAttributeString("Default", "yes");
51280 }
51281 }
51282 if (this.cancelFieldSet)
51283 {
51284 if ((this.cancelField == YesNoType.no))
51285 {
51286 writer.WriteAttributeString("Cancel", "no");
51287 }
51288 if ((this.cancelField == YesNoType.yes))
51289 {
51290 writer.WriteAttributeString("Cancel", "yes");
51291 }
51292 }
51293 if (this.hiddenFieldSet)
51294 {
51295 if ((this.hiddenField == YesNoType.no))
51296 {
51297 writer.WriteAttributeString("Hidden", "no");
51298 }
51299 if ((this.hiddenField == YesNoType.yes))
51300 {
51301 writer.WriteAttributeString("Hidden", "yes");
51302 }
51303 }
51304 if (this.disabledFieldSet)
51305 {
51306 if ((this.disabledField == YesNoType.no))
51307 {
51308 writer.WriteAttributeString("Disabled", "no");
51309 }
51310 if ((this.disabledField == YesNoType.yes))
51311 {
51312 writer.WriteAttributeString("Disabled", "yes");
51313 }
51314 }
51315 if (this.sunkenFieldSet)
51316 {
51317 if ((this.sunkenField == YesNoType.no))
51318 {
51319 writer.WriteAttributeString("Sunken", "no");
51320 }
51321 if ((this.sunkenField == YesNoType.yes))
51322 {
51323 writer.WriteAttributeString("Sunken", "yes");
51324 }
51325 }
51326 if (this.indirectFieldSet)
51327 {
51328 if ((this.indirectField == YesNoType.no))
51329 {
51330 writer.WriteAttributeString("Indirect", "no");
51331 }
51332 if ((this.indirectField == YesNoType.yes))
51333 {
51334 writer.WriteAttributeString("Indirect", "yes");
51335 }
51336 }
51337 if (this.integerFieldSet)
51338 {
51339 if ((this.integerField == YesNoType.no))
51340 {
51341 writer.WriteAttributeString("Integer", "no");
51342 }
51343 if ((this.integerField == YesNoType.yes))
51344 {
51345 writer.WriteAttributeString("Integer", "yes");
51346 }
51347 }
51348 if (this.rightToLeftFieldSet)
51349 {
51350 if ((this.rightToLeftField == YesNoType.no))
51351 {
51352 writer.WriteAttributeString("RightToLeft", "no");
51353 }
51354 if ((this.rightToLeftField == YesNoType.yes))
51355 {
51356 writer.WriteAttributeString("RightToLeft", "yes");
51357 }
51358 }
51359 if (this.rightAlignedFieldSet)
51360 {
51361 if ((this.rightAlignedField == YesNoType.no))
51362 {
51363 writer.WriteAttributeString("RightAligned", "no");
51364 }
51365 if ((this.rightAlignedField == YesNoType.yes))
51366 {
51367 writer.WriteAttributeString("RightAligned", "yes");
51368 }
51369 }
51370 if (this.leftScrollFieldSet)
51371 {
51372 if ((this.leftScrollField == YesNoType.no))
51373 {
51374 writer.WriteAttributeString("LeftScroll", "no");
51375 }
51376 if ((this.leftScrollField == YesNoType.yes))
51377 {
51378 writer.WriteAttributeString("LeftScroll", "yes");
51379 }
51380 }
51381 if (this.transparentFieldSet)
51382 {
51383 if ((this.transparentField == YesNoType.no))
51384 {
51385 writer.WriteAttributeString("Transparent", "no");
51386 }
51387 if ((this.transparentField == YesNoType.yes))
51388 {
51389 writer.WriteAttributeString("Transparent", "yes");
51390 }
51391 }
51392 if (this.noPrefixFieldSet)
51393 {
51394 if ((this.noPrefixField == YesNoType.no))
51395 {
51396 writer.WriteAttributeString("NoPrefix", "no");
51397 }
51398 if ((this.noPrefixField == YesNoType.yes))
51399 {
51400 writer.WriteAttributeString("NoPrefix", "yes");
51401 }
51402 }
51403 if (this.noWrapFieldSet)
51404 {
51405 if ((this.noWrapField == YesNoType.no))
51406 {
51407 writer.WriteAttributeString("NoWrap", "no");
51408 }
51409 if ((this.noWrapField == YesNoType.yes))
51410 {
51411 writer.WriteAttributeString("NoWrap", "yes");
51412 }
51413 }
51414 if (this.formatSizeFieldSet)
51415 {
51416 if ((this.formatSizeField == YesNoType.no))
51417 {
51418 writer.WriteAttributeString("FormatSize", "no");
51419 }
51420 if ((this.formatSizeField == YesNoType.yes))
51421 {
51422 writer.WriteAttributeString("FormatSize", "yes");
51423 }
51424 }
51425 if (this.userLanguageFieldSet)
51426 {
51427 if ((this.userLanguageField == YesNoType.no))
51428 {
51429 writer.WriteAttributeString("UserLanguage", "no");
51430 }
51431 if ((this.userLanguageField == YesNoType.yes))
51432 {
51433 writer.WriteAttributeString("UserLanguage", "yes");
51434 }
51435 }
51436 if (this.multilineFieldSet)
51437 {
51438 if ((this.multilineField == YesNoType.no))
51439 {
51440 writer.WriteAttributeString("Multiline", "no");
51441 }
51442 if ((this.multilineField == YesNoType.yes))
51443 {
51444 writer.WriteAttributeString("Multiline", "yes");
51445 }
51446 }
51447 if (this.passwordFieldSet)
51448 {
51449 if ((this.passwordField == YesNoType.no))
51450 {
51451 writer.WriteAttributeString("Password", "no");
51452 }
51453 if ((this.passwordField == YesNoType.yes))
51454 {
51455 writer.WriteAttributeString("Password", "yes");
51456 }
51457 }
51458 if (this.progressBlocksFieldSet)
51459 {
51460 if ((this.progressBlocksField == YesNoType.no))
51461 {
51462 writer.WriteAttributeString("ProgressBlocks", "no");
51463 }
51464 if ((this.progressBlocksField == YesNoType.yes))
51465 {
51466 writer.WriteAttributeString("ProgressBlocks", "yes");
51467 }
51468 }
51469 if (this.removableFieldSet)
51470 {
51471 if ((this.removableField == YesNoType.no))
51472 {
51473 writer.WriteAttributeString("Removable", "no");
51474 }
51475 if ((this.removableField == YesNoType.yes))
51476 {
51477 writer.WriteAttributeString("Removable", "yes");
51478 }
51479 }
51480 if (this.fixedFieldSet)
51481 {
51482 if ((this.fixedField == YesNoType.no))
51483 {
51484 writer.WriteAttributeString("Fixed", "no");
51485 }
51486 if ((this.fixedField == YesNoType.yes))
51487 {
51488 writer.WriteAttributeString("Fixed", "yes");
51489 }
51490 }
51491 if (this.remoteFieldSet)
51492 {
51493 if ((this.remoteField == YesNoType.no))
51494 {
51495 writer.WriteAttributeString("Remote", "no");
51496 }
51497 if ((this.remoteField == YesNoType.yes))
51498 {
51499 writer.WriteAttributeString("Remote", "yes");
51500 }
51501 }
51502 if (this.cDROMFieldSet)
51503 {
51504 if ((this.cDROMField == YesNoType.no))
51505 {
51506 writer.WriteAttributeString("CDROM", "no");
51507 }
51508 if ((this.cDROMField == YesNoType.yes))
51509 {
51510 writer.WriteAttributeString("CDROM", "yes");
51511 }
51512 }
51513 if (this.rAMDiskFieldSet)
51514 {
51515 if ((this.rAMDiskField == YesNoType.no))
51516 {
51517 writer.WriteAttributeString("RAMDisk", "no");
51518 }
51519 if ((this.rAMDiskField == YesNoType.yes))
51520 {
51521 writer.WriteAttributeString("RAMDisk", "yes");
51522 }
51523 }
51524 if (this.floppyFieldSet)
51525 {
51526 if ((this.floppyField == YesNoType.no))
51527 {
51528 writer.WriteAttributeString("Floppy", "no");
51529 }
51530 if ((this.floppyField == YesNoType.yes))
51531 {
51532 writer.WriteAttributeString("Floppy", "yes");
51533 }
51534 }
51535 if (this.showRollbackCostFieldSet)
51536 {
51537 if ((this.showRollbackCostField == YesNoType.no))
51538 {
51539 writer.WriteAttributeString("ShowRollbackCost", "no");
51540 }
51541 if ((this.showRollbackCostField == YesNoType.yes))
51542 {
51543 writer.WriteAttributeString("ShowRollbackCost", "yes");
51544 }
51545 }
51546 if (this.sortedFieldSet)
51547 {
51548 if ((this.sortedField == YesNoType.no))
51549 {
51550 writer.WriteAttributeString("Sorted", "no");
51551 }
51552 if ((this.sortedField == YesNoType.yes))
51553 {
51554 writer.WriteAttributeString("Sorted", "yes");
51555 }
51556 }
51557 if (this.comboListFieldSet)
51558 {
51559 if ((this.comboListField == YesNoType.no))
51560 {
51561 writer.WriteAttributeString("ComboList", "no");
51562 }
51563 if ((this.comboListField == YesNoType.yes))
51564 {
51565 writer.WriteAttributeString("ComboList", "yes");
51566 }
51567 }
51568 if (this.imageFieldSet)
51569 {
51570 if ((this.imageField == YesNoType.no))
51571 {
51572 writer.WriteAttributeString("Image", "no");
51573 }
51574 if ((this.imageField == YesNoType.yes))
51575 {
51576 writer.WriteAttributeString("Image", "yes");
51577 }
51578 }
51579 if (this.iconSizeFieldSet)
51580 {
51581 if ((this.iconSizeField == IconSizeType.Item16))
51582 {
51583 writer.WriteAttributeString("IconSize", "16");
51584 }
51585 if ((this.iconSizeField == IconSizeType.Item32))
51586 {
51587 writer.WriteAttributeString("IconSize", "32");
51588 }
51589 if ((this.iconSizeField == IconSizeType.Item48))
51590 {
51591 writer.WriteAttributeString("IconSize", "48");
51592 }
51593 }
51594 if (this.fixedSizeFieldSet)
51595 {
51596 if ((this.fixedSizeField == YesNoType.no))
51597 {
51598 writer.WriteAttributeString("FixedSize", "no");
51599 }
51600 if ((this.fixedSizeField == YesNoType.yes))
51601 {
51602 writer.WriteAttributeString("FixedSize", "yes");
51603 }
51604 }
51605 if (this.iconFieldSet)
51606 {
51607 if ((this.iconField == YesNoType.no))
51608 {
51609 writer.WriteAttributeString("Icon", "no");
51610 }
51611 if ((this.iconField == YesNoType.yes))
51612 {
51613 writer.WriteAttributeString("Icon", "yes");
51614 }
51615 }
51616 if (this.bitmapFieldSet)
51617 {
51618 if ((this.bitmapField == YesNoType.no))
51619 {
51620 writer.WriteAttributeString("Bitmap", "no");
51621 }
51622 if ((this.bitmapField == YesNoType.yes))
51623 {
51624 writer.WriteAttributeString("Bitmap", "yes");
51625 }
51626 }
51627 if (this.pushLikeFieldSet)
51628 {
51629 if ((this.pushLikeField == YesNoType.no))
51630 {
51631 writer.WriteAttributeString("PushLike", "no");
51632 }
51633 if ((this.pushLikeField == YesNoType.yes))
51634 {
51635 writer.WriteAttributeString("PushLike", "yes");
51636 }
51637 }
51638 if (this.hasBorderFieldSet)
51639 {
51640 if ((this.hasBorderField == YesNoType.no))
51641 {
51642 writer.WriteAttributeString("HasBorder", "no");
51643 }
51644 if ((this.hasBorderField == YesNoType.yes))
51645 {
51646 writer.WriteAttributeString("HasBorder", "yes");
51647 }
51648 }
51649 if (this.elevationShieldFieldSet)
51650 {
51651 if ((this.elevationShieldField == YesNoType.no))
51652 {
51653 writer.WriteAttributeString("ElevationShield", "no");
51654 }
51655 if ((this.elevationShieldField == YesNoType.yes))
51656 {
51657 writer.WriteAttributeString("ElevationShield", "yes");
51658 }
51659 }
51660 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
51661 {
51662 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
51663 childElement.OutputXml(writer);
51664 }
51665 writer.WriteEndElement();
51666 }
51667
51668 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
51669 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
51670 void ISetAttributes.SetAttribute(string name, string value)
51671 {
51672 if (String.IsNullOrEmpty(name))
51673 {
51674 throw new ArgumentNullException("name");
51675 }
51676 if (("Id" == name))
51677 {
51678 this.idField = value;
51679 this.idFieldSet = true;
51680 }
51681 if (("Type" == name))
51682 {
51683 this.typeField = value;
51684 this.typeFieldSet = true;
51685 }
51686 if (("X" == name))
51687 {
51688 this.xField = value;
51689 this.xFieldSet = true;
51690 }
51691 if (("Y" == name))
51692 {
51693 this.yField = value;
51694 this.yFieldSet = true;
51695 }
51696 if (("Width" == name))
51697 {
51698 this.widthField = value;
51699 this.widthFieldSet = true;
51700 }
51701 if (("Height" == name))
51702 {
51703 this.heightField = value;
51704 this.heightFieldSet = true;
51705 }
51706 if (("Property" == name))
51707 {
51708 this.propertyField = value;
51709 this.propertyFieldSet = true;
51710 }
51711 if (("Text" == name))
51712 {
51713 this.textField = value;
51714 this.textFieldSet = true;
51715 }
51716 if (("Help" == name))
51717 {
51718 this.helpField = value;
51719 this.helpFieldSet = true;
51720 }
51721 if (("ToolTip" == name))
51722 {
51723 this.toolTipField = value;
51724 this.toolTipFieldSet = true;
51725 }
51726 if (("CheckBoxValue" == name))
51727 {
51728 this.checkBoxValueField = value;
51729 this.checkBoxValueFieldSet = true;
51730 }
51731 if (("CheckBoxPropertyRef" == name))
51732 {
51733 this.checkBoxPropertyRefField = value;
51734 this.checkBoxPropertyRefFieldSet = true;
51735 }
51736 if (("TabSkip" == name))
51737 {
51738 this.tabSkipField = Enums.ParseYesNoType(value);
51739 this.tabSkipFieldSet = true;
51740 }
51741 if (("Default" == name))
51742 {
51743 this.defaultField = Enums.ParseYesNoType(value);
51744 this.defaultFieldSet = true;
51745 }
51746 if (("Cancel" == name))
51747 {
51748 this.cancelField = Enums.ParseYesNoType(value);
51749 this.cancelFieldSet = true;
51750 }
51751 if (("Hidden" == name))
51752 {
51753 this.hiddenField = Enums.ParseYesNoType(value);
51754 this.hiddenFieldSet = true;
51755 }
51756 if (("Disabled" == name))
51757 {
51758 this.disabledField = Enums.ParseYesNoType(value);
51759 this.disabledFieldSet = true;
51760 }
51761 if (("Sunken" == name))
51762 {
51763 this.sunkenField = Enums.ParseYesNoType(value);
51764 this.sunkenFieldSet = true;
51765 }
51766 if (("Indirect" == name))
51767 {
51768 this.indirectField = Enums.ParseYesNoType(value);
51769 this.indirectFieldSet = true;
51770 }
51771 if (("Integer" == name))
51772 {
51773 this.integerField = Enums.ParseYesNoType(value);
51774 this.integerFieldSet = true;
51775 }
51776 if (("RightToLeft" == name))
51777 {
51778 this.rightToLeftField = Enums.ParseYesNoType(value);
51779 this.rightToLeftFieldSet = true;
51780 }
51781 if (("RightAligned" == name))
51782 {
51783 this.rightAlignedField = Enums.ParseYesNoType(value);
51784 this.rightAlignedFieldSet = true;
51785 }
51786 if (("LeftScroll" == name))
51787 {
51788 this.leftScrollField = Enums.ParseYesNoType(value);
51789 this.leftScrollFieldSet = true;
51790 }
51791 if (("Transparent" == name))
51792 {
51793 this.transparentField = Enums.ParseYesNoType(value);
51794 this.transparentFieldSet = true;
51795 }
51796 if (("NoPrefix" == name))
51797 {
51798 this.noPrefixField = Enums.ParseYesNoType(value);
51799 this.noPrefixFieldSet = true;
51800 }
51801 if (("NoWrap" == name))
51802 {
51803 this.noWrapField = Enums.ParseYesNoType(value);
51804 this.noWrapFieldSet = true;
51805 }
51806 if (("FormatSize" == name))
51807 {
51808 this.formatSizeField = Enums.ParseYesNoType(value);
51809 this.formatSizeFieldSet = true;
51810 }
51811 if (("UserLanguage" == name))
51812 {
51813 this.userLanguageField = Enums.ParseYesNoType(value);
51814 this.userLanguageFieldSet = true;
51815 }
51816 if (("Multiline" == name))
51817 {
51818 this.multilineField = Enums.ParseYesNoType(value);
51819 this.multilineFieldSet = true;
51820 }
51821 if (("Password" == name))
51822 {
51823 this.passwordField = Enums.ParseYesNoType(value);
51824 this.passwordFieldSet = true;
51825 }
51826 if (("ProgressBlocks" == name))
51827 {
51828 this.progressBlocksField = Enums.ParseYesNoType(value);
51829 this.progressBlocksFieldSet = true;
51830 }
51831 if (("Removable" == name))
51832 {
51833 this.removableField = Enums.ParseYesNoType(value);
51834 this.removableFieldSet = true;
51835 }
51836 if (("Fixed" == name))
51837 {
51838 this.fixedField = Enums.ParseYesNoType(value);
51839 this.fixedFieldSet = true;
51840 }
51841 if (("Remote" == name))
51842 {
51843 this.remoteField = Enums.ParseYesNoType(value);
51844 this.remoteFieldSet = true;
51845 }
51846 if (("CDROM" == name))
51847 {
51848 this.cDROMField = Enums.ParseYesNoType(value);
51849 this.cDROMFieldSet = true;
51850 }
51851 if (("RAMDisk" == name))
51852 {
51853 this.rAMDiskField = Enums.ParseYesNoType(value);
51854 this.rAMDiskFieldSet = true;
51855 }
51856 if (("Floppy" == name))
51857 {
51858 this.floppyField = Enums.ParseYesNoType(value);
51859 this.floppyFieldSet = true;
51860 }
51861 if (("ShowRollbackCost" == name))
51862 {
51863 this.showRollbackCostField = Enums.ParseYesNoType(value);
51864 this.showRollbackCostFieldSet = true;
51865 }
51866 if (("Sorted" == name))
51867 {
51868 this.sortedField = Enums.ParseYesNoType(value);
51869 this.sortedFieldSet = true;
51870 }
51871 if (("ComboList" == name))
51872 {
51873 this.comboListField = Enums.ParseYesNoType(value);
51874 this.comboListFieldSet = true;
51875 }
51876 if (("Image" == name))
51877 {
51878 this.imageField = Enums.ParseYesNoType(value);
51879 this.imageFieldSet = true;
51880 }
51881 if (("IconSize" == name))
51882 {
51883 this.iconSizeField = Control.ParseIconSizeType(value);
51884 this.iconSizeFieldSet = true;
51885 }
51886 if (("FixedSize" == name))
51887 {
51888 this.fixedSizeField = Enums.ParseYesNoType(value);
51889 this.fixedSizeFieldSet = true;
51890 }
51891 if (("Icon" == name))
51892 {
51893 this.iconField = Enums.ParseYesNoType(value);
51894 this.iconFieldSet = true;
51895 }
51896 if (("Bitmap" == name))
51897 {
51898 this.bitmapField = Enums.ParseYesNoType(value);
51899 this.bitmapFieldSet = true;
51900 }
51901 if (("PushLike" == name))
51902 {
51903 this.pushLikeField = Enums.ParseYesNoType(value);
51904 this.pushLikeFieldSet = true;
51905 }
51906 if (("HasBorder" == name))
51907 {
51908 this.hasBorderField = Enums.ParseYesNoType(value);
51909 this.hasBorderFieldSet = true;
51910 }
51911 if (("ElevationShield" == name))
51912 {
51913 this.elevationShieldField = Enums.ParseYesNoType(value);
51914 this.elevationShieldFieldSet = true;
51915 }
51916 }
51917
51918 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
51919 public enum IconSizeType
51920 {
51921
51922 IllegalValue = int.MaxValue,
51923
51924 NotSet = -1,
51925
51926 Item16,
51927
51928 Item32,
51929
51930 Item48,
51931 }
51932 }
51933
51934 /// <summary>
51935 /// Billboard to display during install of a Feature
51936 /// </summary>
51937 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
51938 public class Billboard : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
51939 {
51940
51941 private ElementCollection children;
51942
51943 private string idField;
51944
51945 private bool idFieldSet;
51946
51947 private string featureField;
51948
51949 private bool featureFieldSet;
51950
51951 private ISchemaElement parentElement;
51952
51953 public Billboard()
51954 {
51955 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
51956 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Control)));
51957 this.children = childCollection0;
51958 }
51959
51960 public virtual IEnumerable Children
51961 {
51962 get
51963 {
51964 return this.children;
51965 }
51966 }
51967
51968 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
51969 public virtual IEnumerable this[System.Type childType]
51970 {
51971 get
51972 {
51973 return this.children.Filter(childType);
51974 }
51975 }
51976
51977 /// <summary>
51978 /// Unique identifier for the Billboard.
51979 /// </summary>
51980 public string Id
51981 {
51982 get
51983 {
51984 return this.idField;
51985 }
51986 set
51987 {
51988 this.idFieldSet = true;
51989 this.idField = value;
51990 }
51991 }
51992
51993 /// <summary>
51994 /// Feature whose state determines if the Billboard is shown.
51995 /// </summary>
51996 public string Feature
51997 {
51998 get
51999 {
52000 return this.featureField;
52001 }
52002 set
52003 {
52004 this.featureFieldSet = true;
52005 this.featureField = value;
52006 }
52007 }
52008
52009 public virtual ISchemaElement ParentElement
52010 {
52011 get
52012 {
52013 return this.parentElement;
52014 }
52015 set
52016 {
52017 this.parentElement = value;
52018 }
52019 }
52020
52021 public virtual void AddChild(ISchemaElement child)
52022 {
52023 if ((null == child))
52024 {
52025 throw new ArgumentNullException("child");
52026 }
52027 this.children.AddElement(child);
52028 child.ParentElement = this;
52029 }
52030
52031 public virtual void RemoveChild(ISchemaElement child)
52032 {
52033 if ((null == child))
52034 {
52035 throw new ArgumentNullException("child");
52036 }
52037 this.children.RemoveElement(child);
52038 child.ParentElement = null;
52039 }
52040
52041 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52042 ISchemaElement ICreateChildren.CreateChild(string childName)
52043 {
52044 if (String.IsNullOrEmpty(childName))
52045 {
52046 throw new ArgumentNullException("childName");
52047 }
52048 ISchemaElement childValue = null;
52049 if (("Control" == childName))
52050 {
52051 childValue = new Control();
52052 }
52053 if ((null == childValue))
52054 {
52055 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
52056 }
52057 return childValue;
52058 }
52059
52060 /// <summary>
52061 /// Processes this element and all child elements into an XmlWriter.
52062 /// </summary>
52063 public virtual void OutputXml(XmlWriter writer)
52064 {
52065 if ((null == writer))
52066 {
52067 throw new ArgumentNullException("writer");
52068 }
52069 writer.WriteStartElement("Billboard", "http://wixtoolset.org/schemas/v4/wxs");
52070 if (this.idFieldSet)
52071 {
52072 writer.WriteAttributeString("Id", this.idField);
52073 }
52074 if (this.featureFieldSet)
52075 {
52076 writer.WriteAttributeString("Feature", this.featureField);
52077 }
52078 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
52079 {
52080 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
52081 childElement.OutputXml(writer);
52082 }
52083 writer.WriteEndElement();
52084 }
52085
52086 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52087 void ISetAttributes.SetAttribute(string name, string value)
52088 {
52089 if (String.IsNullOrEmpty(name))
52090 {
52091 throw new ArgumentNullException("name");
52092 }
52093 if (("Id" == name))
52094 {
52095 this.idField = value;
52096 this.idFieldSet = true;
52097 }
52098 if (("Feature" == name))
52099 {
52100 this.featureField = value;
52101 this.featureFieldSet = true;
52102 }
52103 }
52104 }
52105
52106 /// <summary>
52107 /// Billboard action during which child Billboards are displayed
52108 /// </summary>
52109 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
52110 public class BillboardAction : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
52111 {
52112
52113 private ElementCollection children;
52114
52115 private string idField;
52116
52117 private bool idFieldSet;
52118
52119 private ISchemaElement parentElement;
52120
52121 public BillboardAction()
52122 {
52123 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
52124 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Billboard)));
52125 this.children = childCollection0;
52126 }
52127
52128 public virtual IEnumerable Children
52129 {
52130 get
52131 {
52132 return this.children;
52133 }
52134 }
52135
52136 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
52137 public virtual IEnumerable this[System.Type childType]
52138 {
52139 get
52140 {
52141 return this.children.Filter(childType);
52142 }
52143 }
52144
52145 /// <summary>
52146 /// Action name that determines when the Billboard should be shown.
52147 /// </summary>
52148 public string Id
52149 {
52150 get
52151 {
52152 return this.idField;
52153 }
52154 set
52155 {
52156 this.idFieldSet = true;
52157 this.idField = value;
52158 }
52159 }
52160
52161 public virtual ISchemaElement ParentElement
52162 {
52163 get
52164 {
52165 return this.parentElement;
52166 }
52167 set
52168 {
52169 this.parentElement = value;
52170 }
52171 }
52172
52173 public virtual void AddChild(ISchemaElement child)
52174 {
52175 if ((null == child))
52176 {
52177 throw new ArgumentNullException("child");
52178 }
52179 this.children.AddElement(child);
52180 child.ParentElement = this;
52181 }
52182
52183 public virtual void RemoveChild(ISchemaElement child)
52184 {
52185 if ((null == child))
52186 {
52187 throw new ArgumentNullException("child");
52188 }
52189 this.children.RemoveElement(child);
52190 child.ParentElement = null;
52191 }
52192
52193 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52194 ISchemaElement ICreateChildren.CreateChild(string childName)
52195 {
52196 if (String.IsNullOrEmpty(childName))
52197 {
52198 throw new ArgumentNullException("childName");
52199 }
52200 ISchemaElement childValue = null;
52201 if (("Billboard" == childName))
52202 {
52203 childValue = new Billboard();
52204 }
52205 if ((null == childValue))
52206 {
52207 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
52208 }
52209 return childValue;
52210 }
52211
52212 /// <summary>
52213 /// Processes this element and all child elements into an XmlWriter.
52214 /// </summary>
52215 public virtual void OutputXml(XmlWriter writer)
52216 {
52217 if ((null == writer))
52218 {
52219 throw new ArgumentNullException("writer");
52220 }
52221 writer.WriteStartElement("BillboardAction", "http://wixtoolset.org/schemas/v4/wxs");
52222 if (this.idFieldSet)
52223 {
52224 writer.WriteAttributeString("Id", this.idField);
52225 }
52226 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
52227 {
52228 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
52229 childElement.OutputXml(writer);
52230 }
52231 writer.WriteEndElement();
52232 }
52233
52234 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52235 void ISetAttributes.SetAttribute(string name, string value)
52236 {
52237 if (String.IsNullOrEmpty(name))
52238 {
52239 throw new ArgumentNullException("name");
52240 }
52241 if (("Id" == name))
52242 {
52243 this.idField = value;
52244 this.idFieldSet = true;
52245 }
52246 }
52247 }
52248
52249 /// <summary>
52250 /// Defines a dialog box in the Dialog Table.
52251 /// </summary>
52252 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
52253 public class Dialog : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
52254 {
52255
52256 private ElementCollection children;
52257
52258 private string idField;
52259
52260 private bool idFieldSet;
52261
52262 private int xField;
52263
52264 private bool xFieldSet;
52265
52266 private int yField;
52267
52268 private bool yFieldSet;
52269
52270 private int widthField;
52271
52272 private bool widthFieldSet;
52273
52274 private int heightField;
52275
52276 private bool heightFieldSet;
52277
52278 private string titleField;
52279
52280 private bool titleFieldSet;
52281
52282 private YesNoType hiddenField;
52283
52284 private bool hiddenFieldSet;
52285
52286 private YesNoType modelessField;
52287
52288 private bool modelessFieldSet;
52289
52290 private YesNoType noMinimizeField;
52291
52292 private bool noMinimizeFieldSet;
52293
52294 private YesNoType systemModalField;
52295
52296 private bool systemModalFieldSet;
52297
52298 private YesNoType keepModelessField;
52299
52300 private bool keepModelessFieldSet;
52301
52302 private YesNoType trackDiskSpaceField;
52303
52304 private bool trackDiskSpaceFieldSet;
52305
52306 private YesNoType customPaletteField;
52307
52308 private bool customPaletteFieldSet;
52309
52310 private YesNoType rightToLeftField;
52311
52312 private bool rightToLeftFieldSet;
52313
52314 private YesNoType rightAlignedField;
52315
52316 private bool rightAlignedFieldSet;
52317
52318 private YesNoType leftScrollField;
52319
52320 private bool leftScrollFieldSet;
52321
52322 private YesNoType errorDialogField;
52323
52324 private bool errorDialogFieldSet;
52325
52326 private ISchemaElement parentElement;
52327
52328 public Dialog()
52329 {
52330 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
52331 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Control)));
52332 this.children = childCollection0;
52333 }
52334
52335 public virtual IEnumerable Children
52336 {
52337 get
52338 {
52339 return this.children;
52340 }
52341 }
52342
52343 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
52344 public virtual IEnumerable this[System.Type childType]
52345 {
52346 get
52347 {
52348 return this.children.Filter(childType);
52349 }
52350 }
52351
52352 /// <summary>
52353 /// Unique identifier for the dialog.
52354 /// </summary>
52355 public string Id
52356 {
52357 get
52358 {
52359 return this.idField;
52360 }
52361 set
52362 {
52363 this.idFieldSet = true;
52364 this.idField = value;
52365 }
52366 }
52367
52368 /// <summary>
52369 /// Horizontal placement of the dialog box as a percentage of screen width. The default value is 50.
52370 /// </summary>
52371 public int X
52372 {
52373 get
52374 {
52375 return this.xField;
52376 }
52377 set
52378 {
52379 this.xFieldSet = true;
52380 this.xField = value;
52381 }
52382 }
52383
52384 /// <summary>
52385 /// Vertical placement of the dialog box as a percentage of screen height. The default value is 50.
52386 /// </summary>
52387 public int Y
52388 {
52389 get
52390 {
52391 return this.yField;
52392 }
52393 set
52394 {
52395 this.yFieldSet = true;
52396 this.yField = value;
52397 }
52398 }
52399
52400 /// <summary>
52401 /// The width of the dialog box in dialog units.
52402 /// </summary>
52403 public int Width
52404 {
52405 get
52406 {
52407 return this.widthField;
52408 }
52409 set
52410 {
52411 this.widthFieldSet = true;
52412 this.widthField = value;
52413 }
52414 }
52415
52416 /// <summary>
52417 /// The height of the dialog box in dialog units.
52418 /// </summary>
52419 public int Height
52420 {
52421 get
52422 {
52423 return this.heightField;
52424 }
52425 set
52426 {
52427 this.heightFieldSet = true;
52428 this.heightField = value;
52429 }
52430 }
52431
52432 /// <summary>
52433 /// The title of the dialog box.
52434 /// </summary>
52435 public string Title
52436 {
52437 get
52438 {
52439 return this.titleField;
52440 }
52441 set
52442 {
52443 this.titleFieldSet = true;
52444 this.titleField = value;
52445 }
52446 }
52447
52448 /// <summary>
52449 /// Used to hide the dialog.
52450 /// </summary>
52451 public YesNoType Hidden
52452 {
52453 get
52454 {
52455 return this.hiddenField;
52456 }
52457 set
52458 {
52459 this.hiddenFieldSet = true;
52460 this.hiddenField = value;
52461 }
52462 }
52463
52464 /// <summary>
52465 /// Used to set the dialog as modeless.
52466 /// </summary>
52467 public YesNoType Modeless
52468 {
52469 get
52470 {
52471 return this.modelessField;
52472 }
52473 set
52474 {
52475 this.modelessFieldSet = true;
52476 this.modelessField = value;
52477 }
52478 }
52479
52480 /// <summary>
52481 /// Used to specify if the dialog can be minimized.
52482 /// </summary>
52483 public YesNoType NoMinimize
52484 {
52485 get
52486 {
52487 return this.noMinimizeField;
52488 }
52489 set
52490 {
52491 this.noMinimizeFieldSet = true;
52492 this.noMinimizeField = value;
52493 }
52494 }
52495
52496 /// <summary>
52497 /// Used to set the dialog as system modal.
52498 /// </summary>
52499 public YesNoType SystemModal
52500 {
52501 get
52502 {
52503 return this.systemModalField;
52504 }
52505 set
52506 {
52507 this.systemModalFieldSet = true;
52508 this.systemModalField = value;
52509 }
52510 }
52511
52512 /// <summary>
52513 /// Keep modeless dialogs alive when this dialog is created through DoAction.
52514 /// </summary>
52515 public YesNoType KeepModeless
52516 {
52517 get
52518 {
52519 return this.keepModelessField;
52520 }
52521 set
52522 {
52523 this.keepModelessFieldSet = true;
52524 this.keepModelessField = value;
52525 }
52526 }
52527
52528 /// <summary>
52529 /// Have the dialog periodically call the installer to check if available disk space has changed.
52530 /// </summary>
52531 public YesNoType TrackDiskSpace
52532 {
52533 get
52534 {
52535 return this.trackDiskSpaceField;
52536 }
52537 set
52538 {
52539 this.trackDiskSpaceFieldSet = true;
52540 this.trackDiskSpaceField = value;
52541 }
52542 }
52543
52544 /// <summary>
52545 /// Used to specify if pictures in the dialog box are rendered with a custom palette.
52546 /// </summary>
52547 public YesNoType CustomPalette
52548 {
52549 get
52550 {
52551 return this.customPaletteField;
52552 }
52553 set
52554 {
52555 this.customPaletteFieldSet = true;
52556 this.customPaletteField = value;
52557 }
52558 }
52559
52560 /// <summary>
52561 /// Used to specify if the text in the dialog should be displayed in right to left reading order.
52562 /// </summary>
52563 public YesNoType RightToLeft
52564 {
52565 get
52566 {
52567 return this.rightToLeftField;
52568 }
52569 set
52570 {
52571 this.rightToLeftFieldSet = true;
52572 this.rightToLeftField = value;
52573 }
52574 }
52575
52576 /// <summary>
52577 /// Align text on the right.
52578 /// </summary>
52579 public YesNoType RightAligned
52580 {
52581 get
52582 {
52583 return this.rightAlignedField;
52584 }
52585 set
52586 {
52587 this.rightAlignedFieldSet = true;
52588 this.rightAlignedField = value;
52589 }
52590 }
52591
52592 /// <summary>
52593 /// Used to align the scroll bar on the left.
52594 /// </summary>
52595 public YesNoType LeftScroll
52596 {
52597 get
52598 {
52599 return this.leftScrollField;
52600 }
52601 set
52602 {
52603 this.leftScrollFieldSet = true;
52604 this.leftScrollField = value;
52605 }
52606 }
52607
52608 /// <summary>
52609 /// Specifies this dialog as an error dialog.
52610 /// </summary>
52611 public YesNoType ErrorDialog
52612 {
52613 get
52614 {
52615 return this.errorDialogField;
52616 }
52617 set
52618 {
52619 this.errorDialogFieldSet = true;
52620 this.errorDialogField = value;
52621 }
52622 }
52623
52624 public virtual ISchemaElement ParentElement
52625 {
52626 get
52627 {
52628 return this.parentElement;
52629 }
52630 set
52631 {
52632 this.parentElement = value;
52633 }
52634 }
52635
52636 public virtual void AddChild(ISchemaElement child)
52637 {
52638 if ((null == child))
52639 {
52640 throw new ArgumentNullException("child");
52641 }
52642 this.children.AddElement(child);
52643 child.ParentElement = this;
52644 }
52645
52646 public virtual void RemoveChild(ISchemaElement child)
52647 {
52648 if ((null == child))
52649 {
52650 throw new ArgumentNullException("child");
52651 }
52652 this.children.RemoveElement(child);
52653 child.ParentElement = null;
52654 }
52655
52656 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52657 ISchemaElement ICreateChildren.CreateChild(string childName)
52658 {
52659 if (String.IsNullOrEmpty(childName))
52660 {
52661 throw new ArgumentNullException("childName");
52662 }
52663 ISchemaElement childValue = null;
52664 if (("Control" == childName))
52665 {
52666 childValue = new Control();
52667 }
52668 if ((null == childValue))
52669 {
52670 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
52671 }
52672 return childValue;
52673 }
52674
52675 /// <summary>
52676 /// Processes this element and all child elements into an XmlWriter.
52677 /// </summary>
52678 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
52679 public virtual void OutputXml(XmlWriter writer)
52680 {
52681 if ((null == writer))
52682 {
52683 throw new ArgumentNullException("writer");
52684 }
52685 writer.WriteStartElement("Dialog", "http://wixtoolset.org/schemas/v4/wxs");
52686 if (this.idFieldSet)
52687 {
52688 writer.WriteAttributeString("Id", this.idField);
52689 }
52690 if (this.xFieldSet)
52691 {
52692 writer.WriteAttributeString("X", this.xField.ToString(CultureInfo.InvariantCulture));
52693 }
52694 if (this.yFieldSet)
52695 {
52696 writer.WriteAttributeString("Y", this.yField.ToString(CultureInfo.InvariantCulture));
52697 }
52698 if (this.widthFieldSet)
52699 {
52700 writer.WriteAttributeString("Width", this.widthField.ToString(CultureInfo.InvariantCulture));
52701 }
52702 if (this.heightFieldSet)
52703 {
52704 writer.WriteAttributeString("Height", this.heightField.ToString(CultureInfo.InvariantCulture));
52705 }
52706 if (this.titleFieldSet)
52707 {
52708 writer.WriteAttributeString("Title", this.titleField);
52709 }
52710 if (this.hiddenFieldSet)
52711 {
52712 if ((this.hiddenField == YesNoType.no))
52713 {
52714 writer.WriteAttributeString("Hidden", "no");
52715 }
52716 if ((this.hiddenField == YesNoType.yes))
52717 {
52718 writer.WriteAttributeString("Hidden", "yes");
52719 }
52720 }
52721 if (this.modelessFieldSet)
52722 {
52723 if ((this.modelessField == YesNoType.no))
52724 {
52725 writer.WriteAttributeString("Modeless", "no");
52726 }
52727 if ((this.modelessField == YesNoType.yes))
52728 {
52729 writer.WriteAttributeString("Modeless", "yes");
52730 }
52731 }
52732 if (this.noMinimizeFieldSet)
52733 {
52734 if ((this.noMinimizeField == YesNoType.no))
52735 {
52736 writer.WriteAttributeString("NoMinimize", "no");
52737 }
52738 if ((this.noMinimizeField == YesNoType.yes))
52739 {
52740 writer.WriteAttributeString("NoMinimize", "yes");
52741 }
52742 }
52743 if (this.systemModalFieldSet)
52744 {
52745 if ((this.systemModalField == YesNoType.no))
52746 {
52747 writer.WriteAttributeString("SystemModal", "no");
52748 }
52749 if ((this.systemModalField == YesNoType.yes))
52750 {
52751 writer.WriteAttributeString("SystemModal", "yes");
52752 }
52753 }
52754 if (this.keepModelessFieldSet)
52755 {
52756 if ((this.keepModelessField == YesNoType.no))
52757 {
52758 writer.WriteAttributeString("KeepModeless", "no");
52759 }
52760 if ((this.keepModelessField == YesNoType.yes))
52761 {
52762 writer.WriteAttributeString("KeepModeless", "yes");
52763 }
52764 }
52765 if (this.trackDiskSpaceFieldSet)
52766 {
52767 if ((this.trackDiskSpaceField == YesNoType.no))
52768 {
52769 writer.WriteAttributeString("TrackDiskSpace", "no");
52770 }
52771 if ((this.trackDiskSpaceField == YesNoType.yes))
52772 {
52773 writer.WriteAttributeString("TrackDiskSpace", "yes");
52774 }
52775 }
52776 if (this.customPaletteFieldSet)
52777 {
52778 if ((this.customPaletteField == YesNoType.no))
52779 {
52780 writer.WriteAttributeString("CustomPalette", "no");
52781 }
52782 if ((this.customPaletteField == YesNoType.yes))
52783 {
52784 writer.WriteAttributeString("CustomPalette", "yes");
52785 }
52786 }
52787 if (this.rightToLeftFieldSet)
52788 {
52789 if ((this.rightToLeftField == YesNoType.no))
52790 {
52791 writer.WriteAttributeString("RightToLeft", "no");
52792 }
52793 if ((this.rightToLeftField == YesNoType.yes))
52794 {
52795 writer.WriteAttributeString("RightToLeft", "yes");
52796 }
52797 }
52798 if (this.rightAlignedFieldSet)
52799 {
52800 if ((this.rightAlignedField == YesNoType.no))
52801 {
52802 writer.WriteAttributeString("RightAligned", "no");
52803 }
52804 if ((this.rightAlignedField == YesNoType.yes))
52805 {
52806 writer.WriteAttributeString("RightAligned", "yes");
52807 }
52808 }
52809 if (this.leftScrollFieldSet)
52810 {
52811 if ((this.leftScrollField == YesNoType.no))
52812 {
52813 writer.WriteAttributeString("LeftScroll", "no");
52814 }
52815 if ((this.leftScrollField == YesNoType.yes))
52816 {
52817 writer.WriteAttributeString("LeftScroll", "yes");
52818 }
52819 }
52820 if (this.errorDialogFieldSet)
52821 {
52822 if ((this.errorDialogField == YesNoType.no))
52823 {
52824 writer.WriteAttributeString("ErrorDialog", "no");
52825 }
52826 if ((this.errorDialogField == YesNoType.yes))
52827 {
52828 writer.WriteAttributeString("ErrorDialog", "yes");
52829 }
52830 }
52831 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
52832 {
52833 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
52834 childElement.OutputXml(writer);
52835 }
52836 writer.WriteEndElement();
52837 }
52838
52839 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52840 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
52841 void ISetAttributes.SetAttribute(string name, string value)
52842 {
52843 if (String.IsNullOrEmpty(name))
52844 {
52845 throw new ArgumentNullException("name");
52846 }
52847 if (("Id" == name))
52848 {
52849 this.idField = value;
52850 this.idFieldSet = true;
52851 }
52852 if (("X" == name))
52853 {
52854 this.xField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
52855 this.xFieldSet = true;
52856 }
52857 if (("Y" == name))
52858 {
52859 this.yField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
52860 this.yFieldSet = true;
52861 }
52862 if (("Width" == name))
52863 {
52864 this.widthField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
52865 this.widthFieldSet = true;
52866 }
52867 if (("Height" == name))
52868 {
52869 this.heightField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
52870 this.heightFieldSet = true;
52871 }
52872 if (("Title" == name))
52873 {
52874 this.titleField = value;
52875 this.titleFieldSet = true;
52876 }
52877 if (("Hidden" == name))
52878 {
52879 this.hiddenField = Enums.ParseYesNoType(value);
52880 this.hiddenFieldSet = true;
52881 }
52882 if (("Modeless" == name))
52883 {
52884 this.modelessField = Enums.ParseYesNoType(value);
52885 this.modelessFieldSet = true;
52886 }
52887 if (("NoMinimize" == name))
52888 {
52889 this.noMinimizeField = Enums.ParseYesNoType(value);
52890 this.noMinimizeFieldSet = true;
52891 }
52892 if (("SystemModal" == name))
52893 {
52894 this.systemModalField = Enums.ParseYesNoType(value);
52895 this.systemModalFieldSet = true;
52896 }
52897 if (("KeepModeless" == name))
52898 {
52899 this.keepModelessField = Enums.ParseYesNoType(value);
52900 this.keepModelessFieldSet = true;
52901 }
52902 if (("TrackDiskSpace" == name))
52903 {
52904 this.trackDiskSpaceField = Enums.ParseYesNoType(value);
52905 this.trackDiskSpaceFieldSet = true;
52906 }
52907 if (("CustomPalette" == name))
52908 {
52909 this.customPaletteField = Enums.ParseYesNoType(value);
52910 this.customPaletteFieldSet = true;
52911 }
52912 if (("RightToLeft" == name))
52913 {
52914 this.rightToLeftField = Enums.ParseYesNoType(value);
52915 this.rightToLeftFieldSet = true;
52916 }
52917 if (("RightAligned" == name))
52918 {
52919 this.rightAlignedField = Enums.ParseYesNoType(value);
52920 this.rightAlignedFieldSet = true;
52921 }
52922 if (("LeftScroll" == name))
52923 {
52924 this.leftScrollField = Enums.ParseYesNoType(value);
52925 this.leftScrollFieldSet = true;
52926 }
52927 if (("ErrorDialog" == name))
52928 {
52929 this.errorDialogField = Enums.ParseYesNoType(value);
52930 this.errorDialogFieldSet = true;
52931 }
52932 }
52933 }
52934
52935 /// <summary>
52936 /// Reference to a Dialog. This will cause the entire referenced section's contents
52937 /// to be included in the installer database.
52938 /// </summary>
52939 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
52940 public class DialogRef : ISchemaElement, ISetAttributes
52941 {
52942
52943 private string idField;
52944
52945 private bool idFieldSet;
52946
52947 private ISchemaElement parentElement;
52948
52949 /// <summary>
52950 /// The identifier of the Dialog to reference.
52951 /// </summary>
52952 public string Id
52953 {
52954 get
52955 {
52956 return this.idField;
52957 }
52958 set
52959 {
52960 this.idFieldSet = true;
52961 this.idField = value;
52962 }
52963 }
52964
52965 public virtual ISchemaElement ParentElement
52966 {
52967 get
52968 {
52969 return this.parentElement;
52970 }
52971 set
52972 {
52973 this.parentElement = value;
52974 }
52975 }
52976
52977 /// <summary>
52978 /// Processes this element and all child elements into an XmlWriter.
52979 /// </summary>
52980 public virtual void OutputXml(XmlWriter writer)
52981 {
52982 if ((null == writer))
52983 {
52984 throw new ArgumentNullException("writer");
52985 }
52986 writer.WriteStartElement("DialogRef", "http://wixtoolset.org/schemas/v4/wxs");
52987 if (this.idFieldSet)
52988 {
52989 writer.WriteAttributeString("Id", this.idField);
52990 }
52991 writer.WriteEndElement();
52992 }
52993
52994 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52995 void ISetAttributes.SetAttribute(string name, string value)
52996 {
52997 if (String.IsNullOrEmpty(name))
52998 {
52999 throw new ArgumentNullException("name");
53000 }
53001 if (("Id" == name))
53002 {
53003 this.idField = value;
53004 this.idFieldSet = true;
53005 }
53006 }
53007 }
53008
53009 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53010 public class ProgressText : ISchemaElement, ISetAttributes
53011 {
53012
53013 private string actionField;
53014
53015 private bool actionFieldSet;
53016
53017 private string templateField;
53018
53019 private bool templateFieldSet;
53020
53021 private string contentField;
53022
53023 private bool contentFieldSet;
53024
53025 private ISchemaElement parentElement;
53026
53027 public string Action
53028 {
53029 get
53030 {
53031 return this.actionField;
53032 }
53033 set
53034 {
53035 this.actionFieldSet = true;
53036 this.actionField = value;
53037 }
53038 }
53039
53040 /// <summary>
53041 /// used to format ActionData messages from action processing
53042 /// </summary>
53043 public string Template
53044 {
53045 get
53046 {
53047 return this.templateField;
53048 }
53049 set
53050 {
53051 this.templateFieldSet = true;
53052 this.templateField = value;
53053 }
53054 }
53055
53056 /// <summary>
53057 /// Element value is progress message text for action
53058 /// </summary>
53059 public string Content
53060 {
53061 get
53062 {
53063 return this.contentField;
53064 }
53065 set
53066 {
53067 this.contentFieldSet = true;
53068 this.contentField = value;
53069 }
53070 }
53071
53072 public virtual ISchemaElement ParentElement
53073 {
53074 get
53075 {
53076 return this.parentElement;
53077 }
53078 set
53079 {
53080 this.parentElement = value;
53081 }
53082 }
53083
53084 /// <summary>
53085 /// Processes this element and all child elements into an XmlWriter.
53086 /// </summary>
53087 public virtual void OutputXml(XmlWriter writer)
53088 {
53089 if ((null == writer))
53090 {
53091 throw new ArgumentNullException("writer");
53092 }
53093 writer.WriteStartElement("ProgressText", "http://wixtoolset.org/schemas/v4/wxs");
53094 if (this.actionFieldSet)
53095 {
53096 writer.WriteAttributeString("Action", this.actionField);
53097 }
53098 if (this.templateFieldSet)
53099 {
53100 writer.WriteAttributeString("Template", this.templateField);
53101 }
53102 if (this.contentFieldSet)
53103 {
53104 writer.WriteString(this.contentField);
53105 }
53106 writer.WriteEndElement();
53107 }
53108
53109 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53110 void ISetAttributes.SetAttribute(string name, string value)
53111 {
53112 if (String.IsNullOrEmpty(name))
53113 {
53114 throw new ArgumentNullException("name");
53115 }
53116 if (("Action" == name))
53117 {
53118 this.actionField = value;
53119 this.actionFieldSet = true;
53120 }
53121 if (("Template" == name))
53122 {
53123 this.templateField = value;
53124 this.templateFieldSet = true;
53125 }
53126 if (("Content" == name))
53127 {
53128 this.contentField = value;
53129 this.contentFieldSet = true;
53130 }
53131 }
53132 }
53133
53134 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53135 public class TextStyle : ISchemaElement, ISetAttributes
53136 {
53137
53138 private string idField;
53139
53140 private bool idFieldSet;
53141
53142 private string faceNameField;
53143
53144 private bool faceNameFieldSet;
53145
53146 private string sizeField;
53147
53148 private bool sizeFieldSet;
53149
53150 private int redField;
53151
53152 private bool redFieldSet;
53153
53154 private int greenField;
53155
53156 private bool greenFieldSet;
53157
53158 private int blueField;
53159
53160 private bool blueFieldSet;
53161
53162 private YesNoType boldField;
53163
53164 private bool boldFieldSet;
53165
53166 private YesNoType italicField;
53167
53168 private bool italicFieldSet;
53169
53170 private YesNoType underlineField;
53171
53172 private bool underlineFieldSet;
53173
53174 private YesNoType strikeField;
53175
53176 private bool strikeFieldSet;
53177
53178 private ISchemaElement parentElement;
53179
53180 public string Id
53181 {
53182 get
53183 {
53184 return this.idField;
53185 }
53186 set
53187 {
53188 this.idFieldSet = true;
53189 this.idField = value;
53190 }
53191 }
53192
53193 public string FaceName
53194 {
53195 get
53196 {
53197 return this.faceNameField;
53198 }
53199 set
53200 {
53201 this.faceNameFieldSet = true;
53202 this.faceNameField = value;
53203 }
53204 }
53205
53206 public string Size
53207 {
53208 get
53209 {
53210 return this.sizeField;
53211 }
53212 set
53213 {
53214 this.sizeFieldSet = true;
53215 this.sizeField = value;
53216 }
53217 }
53218
53219 /// <summary>
53220 /// 0 to 255
53221 /// </summary>
53222 public int Red
53223 {
53224 get
53225 {
53226 return this.redField;
53227 }
53228 set
53229 {
53230 this.redFieldSet = true;
53231 this.redField = value;
53232 }
53233 }
53234
53235 /// <summary>
53236 /// 0 to 255
53237 /// </summary>
53238 public int Green
53239 {
53240 get
53241 {
53242 return this.greenField;
53243 }
53244 set
53245 {
53246 this.greenFieldSet = true;
53247 this.greenField = value;
53248 }
53249 }
53250
53251 /// <summary>
53252 /// 0 to 255
53253 /// </summary>
53254 public int Blue
53255 {
53256 get
53257 {
53258 return this.blueField;
53259 }
53260 set
53261 {
53262 this.blueFieldSet = true;
53263 this.blueField = value;
53264 }
53265 }
53266
53267 public YesNoType Bold
53268 {
53269 get
53270 {
53271 return this.boldField;
53272 }
53273 set
53274 {
53275 this.boldFieldSet = true;
53276 this.boldField = value;
53277 }
53278 }
53279
53280 public YesNoType Italic
53281 {
53282 get
53283 {
53284 return this.italicField;
53285 }
53286 set
53287 {
53288 this.italicFieldSet = true;
53289 this.italicField = value;
53290 }
53291 }
53292
53293 public YesNoType Underline
53294 {
53295 get
53296 {
53297 return this.underlineField;
53298 }
53299 set
53300 {
53301 this.underlineFieldSet = true;
53302 this.underlineField = value;
53303 }
53304 }
53305
53306 public YesNoType Strike
53307 {
53308 get
53309 {
53310 return this.strikeField;
53311 }
53312 set
53313 {
53314 this.strikeFieldSet = true;
53315 this.strikeField = value;
53316 }
53317 }
53318
53319 public virtual ISchemaElement ParentElement
53320 {
53321 get
53322 {
53323 return this.parentElement;
53324 }
53325 set
53326 {
53327 this.parentElement = value;
53328 }
53329 }
53330
53331 /// <summary>
53332 /// Processes this element and all child elements into an XmlWriter.
53333 /// </summary>
53334 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
53335 public virtual void OutputXml(XmlWriter writer)
53336 {
53337 if ((null == writer))
53338 {
53339 throw new ArgumentNullException("writer");
53340 }
53341 writer.WriteStartElement("TextStyle", "http://wixtoolset.org/schemas/v4/wxs");
53342 if (this.idFieldSet)
53343 {
53344 writer.WriteAttributeString("Id", this.idField);
53345 }
53346 if (this.faceNameFieldSet)
53347 {
53348 writer.WriteAttributeString("FaceName", this.faceNameField);
53349 }
53350 if (this.sizeFieldSet)
53351 {
53352 writer.WriteAttributeString("Size", this.sizeField);
53353 }
53354 if (this.redFieldSet)
53355 {
53356 writer.WriteAttributeString("Red", this.redField.ToString(CultureInfo.InvariantCulture));
53357 }
53358 if (this.greenFieldSet)
53359 {
53360 writer.WriteAttributeString("Green", this.greenField.ToString(CultureInfo.InvariantCulture));
53361 }
53362 if (this.blueFieldSet)
53363 {
53364 writer.WriteAttributeString("Blue", this.blueField.ToString(CultureInfo.InvariantCulture));
53365 }
53366 if (this.boldFieldSet)
53367 {
53368 if ((this.boldField == YesNoType.no))
53369 {
53370 writer.WriteAttributeString("Bold", "no");
53371 }
53372 if ((this.boldField == YesNoType.yes))
53373 {
53374 writer.WriteAttributeString("Bold", "yes");
53375 }
53376 }
53377 if (this.italicFieldSet)
53378 {
53379 if ((this.italicField == YesNoType.no))
53380 {
53381 writer.WriteAttributeString("Italic", "no");
53382 }
53383 if ((this.italicField == YesNoType.yes))
53384 {
53385 writer.WriteAttributeString("Italic", "yes");
53386 }
53387 }
53388 if (this.underlineFieldSet)
53389 {
53390 if ((this.underlineField == YesNoType.no))
53391 {
53392 writer.WriteAttributeString("Underline", "no");
53393 }
53394 if ((this.underlineField == YesNoType.yes))
53395 {
53396 writer.WriteAttributeString("Underline", "yes");
53397 }
53398 }
53399 if (this.strikeFieldSet)
53400 {
53401 if ((this.strikeField == YesNoType.no))
53402 {
53403 writer.WriteAttributeString("Strike", "no");
53404 }
53405 if ((this.strikeField == YesNoType.yes))
53406 {
53407 writer.WriteAttributeString("Strike", "yes");
53408 }
53409 }
53410 writer.WriteEndElement();
53411 }
53412
53413 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53414 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
53415 void ISetAttributes.SetAttribute(string name, string value)
53416 {
53417 if (String.IsNullOrEmpty(name))
53418 {
53419 throw new ArgumentNullException("name");
53420 }
53421 if (("Id" == name))
53422 {
53423 this.idField = value;
53424 this.idFieldSet = true;
53425 }
53426 if (("FaceName" == name))
53427 {
53428 this.faceNameField = value;
53429 this.faceNameFieldSet = true;
53430 }
53431 if (("Size" == name))
53432 {
53433 this.sizeField = value;
53434 this.sizeFieldSet = true;
53435 }
53436 if (("Red" == name))
53437 {
53438 this.redField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
53439 this.redFieldSet = true;
53440 }
53441 if (("Green" == name))
53442 {
53443 this.greenField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
53444 this.greenFieldSet = true;
53445 }
53446 if (("Blue" == name))
53447 {
53448 this.blueField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
53449 this.blueFieldSet = true;
53450 }
53451 if (("Bold" == name))
53452 {
53453 this.boldField = Enums.ParseYesNoType(value);
53454 this.boldFieldSet = true;
53455 }
53456 if (("Italic" == name))
53457 {
53458 this.italicField = Enums.ParseYesNoType(value);
53459 this.italicFieldSet = true;
53460 }
53461 if (("Underline" == name))
53462 {
53463 this.underlineField = Enums.ParseYesNoType(value);
53464 this.underlineFieldSet = true;
53465 }
53466 if (("Strike" == name))
53467 {
53468 this.strikeField = Enums.ParseYesNoType(value);
53469 this.strikeFieldSet = true;
53470 }
53471 }
53472 }
53473
53474 /// <summary>
53475 /// The value (and optional text) associated with an item in a ComboBox, ListBox, or ListView.
53476 /// </summary>
53477 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53478 public class ListItem : ISchemaElement, ISetAttributes
53479 {
53480
53481 private string valueField;
53482
53483 private bool valueFieldSet;
53484
53485 private string textField;
53486
53487 private bool textFieldSet;
53488
53489 private string iconField;
53490
53491 private bool iconFieldSet;
53492
53493 private ISchemaElement parentElement;
53494
53495 /// <summary>
53496 /// The value assigned to the associated ComboBox, ListBox, or ListView property if this item is selected.
53497 /// </summary>
53498 public string Value
53499 {
53500 get
53501 {
53502 return this.valueField;
53503 }
53504 set
53505 {
53506 this.valueFieldSet = true;
53507 this.valueField = value;
53508 }
53509 }
53510
53511 /// <summary>
53512 /// The localizable, visible text to be assigned to the item.
53513 /// If not specified, this will default to the value of the Value attribute.
53514 /// </summary>
53515 public string Text
53516 {
53517 get
53518 {
53519 return this.textField;
53520 }
53521 set
53522 {
53523 this.textFieldSet = true;
53524 this.textField = value;
53525 }
53526 }
53527
53528 /// <summary>
53529 /// The identifier of the Binary (not Icon) element containing the icon to associate with this item.
53530 /// This value is only valid when nested under a ListView element.
53531 /// </summary>
53532 public string Icon
53533 {
53534 get
53535 {
53536 return this.iconField;
53537 }
53538 set
53539 {
53540 this.iconFieldSet = true;
53541 this.iconField = value;
53542 }
53543 }
53544
53545 public virtual ISchemaElement ParentElement
53546 {
53547 get
53548 {
53549 return this.parentElement;
53550 }
53551 set
53552 {
53553 this.parentElement = value;
53554 }
53555 }
53556
53557 /// <summary>
53558 /// Processes this element and all child elements into an XmlWriter.
53559 /// </summary>
53560 public virtual void OutputXml(XmlWriter writer)
53561 {
53562 if ((null == writer))
53563 {
53564 throw new ArgumentNullException("writer");
53565 }
53566 writer.WriteStartElement("ListItem", "http://wixtoolset.org/schemas/v4/wxs");
53567 if (this.valueFieldSet)
53568 {
53569 writer.WriteAttributeString("Value", this.valueField);
53570 }
53571 if (this.textFieldSet)
53572 {
53573 writer.WriteAttributeString("Text", this.textField);
53574 }
53575 if (this.iconFieldSet)
53576 {
53577 writer.WriteAttributeString("Icon", this.iconField);
53578 }
53579 writer.WriteEndElement();
53580 }
53581
53582 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53583 void ISetAttributes.SetAttribute(string name, string value)
53584 {
53585 if (String.IsNullOrEmpty(name))
53586 {
53587 throw new ArgumentNullException("name");
53588 }
53589 if (("Value" == name))
53590 {
53591 this.valueField = value;
53592 this.valueFieldSet = true;
53593 }
53594 if (("Text" == name))
53595 {
53596 this.textField = value;
53597 this.textFieldSet = true;
53598 }
53599 if (("Icon" == name))
53600 {
53601 this.iconField = value;
53602 this.iconFieldSet = true;
53603 }
53604 }
53605 }
53606
53607 /// <summary>
53608 /// Set of items for a particular ListBox control tied to an install Property
53609 /// </summary>
53610 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53611 public class ListBox : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
53612 {
53613
53614 private ElementCollection children;
53615
53616 private string propertyField;
53617
53618 private bool propertyFieldSet;
53619
53620 private ISchemaElement parentElement;
53621
53622 public ListBox()
53623 {
53624 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
53625 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem)));
53626 this.children = childCollection0;
53627 }
53628
53629 public virtual IEnumerable Children
53630 {
53631 get
53632 {
53633 return this.children;
53634 }
53635 }
53636
53637 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
53638 public virtual IEnumerable this[System.Type childType]
53639 {
53640 get
53641 {
53642 return this.children.Filter(childType);
53643 }
53644 }
53645
53646 /// <summary>
53647 /// Property tied to this group
53648 /// </summary>
53649 public string Property
53650 {
53651 get
53652 {
53653 return this.propertyField;
53654 }
53655 set
53656 {
53657 this.propertyFieldSet = true;
53658 this.propertyField = value;
53659 }
53660 }
53661
53662 public virtual ISchemaElement ParentElement
53663 {
53664 get
53665 {
53666 return this.parentElement;
53667 }
53668 set
53669 {
53670 this.parentElement = value;
53671 }
53672 }
53673
53674 public virtual void AddChild(ISchemaElement child)
53675 {
53676 if ((null == child))
53677 {
53678 throw new ArgumentNullException("child");
53679 }
53680 this.children.AddElement(child);
53681 child.ParentElement = this;
53682 }
53683
53684 public virtual void RemoveChild(ISchemaElement child)
53685 {
53686 if ((null == child))
53687 {
53688 throw new ArgumentNullException("child");
53689 }
53690 this.children.RemoveElement(child);
53691 child.ParentElement = null;
53692 }
53693
53694 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53695 ISchemaElement ICreateChildren.CreateChild(string childName)
53696 {
53697 if (String.IsNullOrEmpty(childName))
53698 {
53699 throw new ArgumentNullException("childName");
53700 }
53701 ISchemaElement childValue = null;
53702 if (("ListItem" == childName))
53703 {
53704 childValue = new ListItem();
53705 }
53706 if ((null == childValue))
53707 {
53708 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
53709 }
53710 return childValue;
53711 }
53712
53713 /// <summary>
53714 /// Processes this element and all child elements into an XmlWriter.
53715 /// </summary>
53716 public virtual void OutputXml(XmlWriter writer)
53717 {
53718 if ((null == writer))
53719 {
53720 throw new ArgumentNullException("writer");
53721 }
53722 writer.WriteStartElement("ListBox", "http://wixtoolset.org/schemas/v4/wxs");
53723 if (this.propertyFieldSet)
53724 {
53725 writer.WriteAttributeString("Property", this.propertyField);
53726 }
53727 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
53728 {
53729 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
53730 childElement.OutputXml(writer);
53731 }
53732 writer.WriteEndElement();
53733 }
53734
53735 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53736 void ISetAttributes.SetAttribute(string name, string value)
53737 {
53738 if (String.IsNullOrEmpty(name))
53739 {
53740 throw new ArgumentNullException("name");
53741 }
53742 if (("Property" == name))
53743 {
53744 this.propertyField = value;
53745 this.propertyFieldSet = true;
53746 }
53747 }
53748 }
53749
53750 /// <summary>
53751 /// Set of items for a particular ComboBox control tied to an install Property
53752 /// </summary>
53753 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53754 public class ComboBox : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
53755 {
53756
53757 private ElementCollection children;
53758
53759 private string propertyField;
53760
53761 private bool propertyFieldSet;
53762
53763 private ISchemaElement parentElement;
53764
53765 public ComboBox()
53766 {
53767 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
53768 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem)));
53769 this.children = childCollection0;
53770 }
53771
53772 public virtual IEnumerable Children
53773 {
53774 get
53775 {
53776 return this.children;
53777 }
53778 }
53779
53780 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
53781 public virtual IEnumerable this[System.Type childType]
53782 {
53783 get
53784 {
53785 return this.children.Filter(childType);
53786 }
53787 }
53788
53789 /// <summary>
53790 /// Property tied to this group
53791 /// </summary>
53792 public string Property
53793 {
53794 get
53795 {
53796 return this.propertyField;
53797 }
53798 set
53799 {
53800 this.propertyFieldSet = true;
53801 this.propertyField = value;
53802 }
53803 }
53804
53805 public virtual ISchemaElement ParentElement
53806 {
53807 get
53808 {
53809 return this.parentElement;
53810 }
53811 set
53812 {
53813 this.parentElement = value;
53814 }
53815 }
53816
53817 public virtual void AddChild(ISchemaElement child)
53818 {
53819 if ((null == child))
53820 {
53821 throw new ArgumentNullException("child");
53822 }
53823 this.children.AddElement(child);
53824 child.ParentElement = this;
53825 }
53826
53827 public virtual void RemoveChild(ISchemaElement child)
53828 {
53829 if ((null == child))
53830 {
53831 throw new ArgumentNullException("child");
53832 }
53833 this.children.RemoveElement(child);
53834 child.ParentElement = null;
53835 }
53836
53837 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53838 ISchemaElement ICreateChildren.CreateChild(string childName)
53839 {
53840 if (String.IsNullOrEmpty(childName))
53841 {
53842 throw new ArgumentNullException("childName");
53843 }
53844 ISchemaElement childValue = null;
53845 if (("ListItem" == childName))
53846 {
53847 childValue = new ListItem();
53848 }
53849 if ((null == childValue))
53850 {
53851 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
53852 }
53853 return childValue;
53854 }
53855
53856 /// <summary>
53857 /// Processes this element and all child elements into an XmlWriter.
53858 /// </summary>
53859 public virtual void OutputXml(XmlWriter writer)
53860 {
53861 if ((null == writer))
53862 {
53863 throw new ArgumentNullException("writer");
53864 }
53865 writer.WriteStartElement("ComboBox", "http://wixtoolset.org/schemas/v4/wxs");
53866 if (this.propertyFieldSet)
53867 {
53868 writer.WriteAttributeString("Property", this.propertyField);
53869 }
53870 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
53871 {
53872 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
53873 childElement.OutputXml(writer);
53874 }
53875 writer.WriteEndElement();
53876 }
53877
53878 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53879 void ISetAttributes.SetAttribute(string name, string value)
53880 {
53881 if (String.IsNullOrEmpty(name))
53882 {
53883 throw new ArgumentNullException("name");
53884 }
53885 if (("Property" == name))
53886 {
53887 this.propertyField = value;
53888 this.propertyFieldSet = true;
53889 }
53890 }
53891 }
53892
53893 /// <summary>
53894 /// Set of items for a particular ListView control tied to an install Property
53895 /// </summary>
53896 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53897 public class ListView : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
53898 {
53899
53900 private ElementCollection children;
53901
53902 private string propertyField;
53903
53904 private bool propertyFieldSet;
53905
53906 private ISchemaElement parentElement;
53907
53908 public ListView()
53909 {
53910 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
53911 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem)));
53912 this.children = childCollection0;
53913 }
53914
53915 public virtual IEnumerable Children
53916 {
53917 get
53918 {
53919 return this.children;
53920 }
53921 }
53922
53923 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
53924 public virtual IEnumerable this[System.Type childType]
53925 {
53926 get
53927 {
53928 return this.children.Filter(childType);
53929 }
53930 }
53931
53932 /// <summary>
53933 /// Property tied to this group
53934 /// </summary>
53935 public string Property
53936 {
53937 get
53938 {
53939 return this.propertyField;
53940 }
53941 set
53942 {
53943 this.propertyFieldSet = true;
53944 this.propertyField = value;
53945 }
53946 }
53947
53948 public virtual ISchemaElement ParentElement
53949 {
53950 get
53951 {
53952 return this.parentElement;
53953 }
53954 set
53955 {
53956 this.parentElement = value;
53957 }
53958 }
53959
53960 public virtual void AddChild(ISchemaElement child)
53961 {
53962 if ((null == child))
53963 {
53964 throw new ArgumentNullException("child");
53965 }
53966 this.children.AddElement(child);
53967 child.ParentElement = this;
53968 }
53969
53970 public virtual void RemoveChild(ISchemaElement child)
53971 {
53972 if ((null == child))
53973 {
53974 throw new ArgumentNullException("child");
53975 }
53976 this.children.RemoveElement(child);
53977 child.ParentElement = null;
53978 }
53979
53980 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53981 ISchemaElement ICreateChildren.CreateChild(string childName)
53982 {
53983 if (String.IsNullOrEmpty(childName))
53984 {
53985 throw new ArgumentNullException("childName");
53986 }
53987 ISchemaElement childValue = null;
53988 if (("ListItem" == childName))
53989 {
53990 childValue = new ListItem();
53991 }
53992 if ((null == childValue))
53993 {
53994 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
53995 }
53996 return childValue;
53997 }
53998
53999 /// <summary>
54000 /// Processes this element and all child elements into an XmlWriter.
54001 /// </summary>
54002 public virtual void OutputXml(XmlWriter writer)
54003 {
54004 if ((null == writer))
54005 {
54006 throw new ArgumentNullException("writer");
54007 }
54008 writer.WriteStartElement("ListView", "http://wixtoolset.org/schemas/v4/wxs");
54009 if (this.propertyFieldSet)
54010 {
54011 writer.WriteAttributeString("Property", this.propertyField);
54012 }
54013 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
54014 {
54015 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
54016 childElement.OutputXml(writer);
54017 }
54018 writer.WriteEndElement();
54019 }
54020
54021 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54022 void ISetAttributes.SetAttribute(string name, string value)
54023 {
54024 if (String.IsNullOrEmpty(name))
54025 {
54026 throw new ArgumentNullException("name");
54027 }
54028 if (("Property" == name))
54029 {
54030 this.propertyField = value;
54031 this.propertyFieldSet = true;
54032 }
54033 }
54034 }
54035
54036 /// <summary>
54037 /// Text or Icon plus Value that is assigned to the Property of the parent Control (RadioButtonGroup).
54038 /// </summary>
54039 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54040 public class RadioButton : ISchemaElement, ISetAttributes
54041 {
54042
54043 private string bitmapField;
54044
54045 private bool bitmapFieldSet;
54046
54047 private string heightField;
54048
54049 private bool heightFieldSet;
54050
54051 private string helpField;
54052
54053 private bool helpFieldSet;
54054
54055 private string iconField;
54056
54057 private bool iconFieldSet;
54058
54059 private string textField;
54060
54061 private bool textFieldSet;
54062
54063 private string toolTipField;
54064
54065 private bool toolTipFieldSet;
54066
54067 private string valueField;
54068
54069 private bool valueFieldSet;
54070
54071 private string widthField;
54072
54073 private bool widthFieldSet;
54074
54075 private string xField;
54076
54077 private bool xFieldSet;
54078
54079 private string yField;
54080
54081 private bool yFieldSet;
54082
54083 private ISchemaElement parentElement;
54084
54085 /// <summary>
54086 /// This attribute defines the bitmap displayed with the radio button. The value of the attribute creates a reference
54087 /// to a Binary element that represents the bitmap. This attribute is mutually exclusive with the Icon and Text
54088 /// attributes.
54089 /// </summary>
54090 public string Bitmap
54091 {
54092 get
54093 {
54094 return this.bitmapField;
54095 }
54096 set
54097 {
54098 this.bitmapFieldSet = true;
54099 this.bitmapField = value;
54100 }
54101 }
54102
54103 public string Height
54104 {
54105 get
54106 {
54107 return this.heightField;
54108 }
54109 set
54110 {
54111 this.heightFieldSet = true;
54112 this.heightField = value;
54113 }
54114 }
54115
54116 public string Help
54117 {
54118 get
54119 {
54120 return this.helpField;
54121 }
54122 set
54123 {
54124 this.helpFieldSet = true;
54125 this.helpField = value;
54126 }
54127 }
54128
54129 /// <summary>
54130 /// This attribute defines the icon displayed with the radio button. The value of the attribute creates a reference
54131 /// to a Binary element that represents the icon. This attribute is mutually exclusive with the Bitmap and Text
54132 /// attributes.
54133 /// </summary>
54134 public string Icon
54135 {
54136 get
54137 {
54138 return this.iconField;
54139 }
54140 set
54141 {
54142 this.iconFieldSet = true;
54143 this.iconField = value;
54144 }
54145 }
54146
54147 /// <summary>
54148 /// Text displayed with the radio button. This attribute is mutually exclusive with the Bitmap and Icon attributes.
54149 /// </summary>
54150 public string Text
54151 {
54152 get
54153 {
54154 return this.textField;
54155 }
54156 set
54157 {
54158 this.textFieldSet = true;
54159 this.textField = value;
54160 }
54161 }
54162
54163 public string ToolTip
54164 {
54165 get
54166 {
54167 return this.toolTipField;
54168 }
54169 set
54170 {
54171 this.toolTipFieldSet = true;
54172 this.toolTipField = value;
54173 }
54174 }
54175
54176 /// <summary>
54177 /// Value assigned to the associated control Property when this radio button is selected.
54178 /// </summary>
54179 public string Value
54180 {
54181 get
54182 {
54183 return this.valueField;
54184 }
54185 set
54186 {
54187 this.valueFieldSet = true;
54188 this.valueField = value;
54189 }
54190 }
54191
54192 public string Width
54193 {
54194 get
54195 {
54196 return this.widthField;
54197 }
54198 set
54199 {
54200 this.widthFieldSet = true;
54201 this.widthField = value;
54202 }
54203 }
54204
54205 public string X
54206 {
54207 get
54208 {
54209 return this.xField;
54210 }
54211 set
54212 {
54213 this.xFieldSet = true;
54214 this.xField = value;
54215 }
54216 }
54217
54218 public string Y
54219 {
54220 get
54221 {
54222 return this.yField;
54223 }
54224 set
54225 {
54226 this.yFieldSet = true;
54227 this.yField = value;
54228 }
54229 }
54230
54231 public virtual ISchemaElement ParentElement
54232 {
54233 get
54234 {
54235 return this.parentElement;
54236 }
54237 set
54238 {
54239 this.parentElement = value;
54240 }
54241 }
54242
54243 /// <summary>
54244 /// Processes this element and all child elements into an XmlWriter.
54245 /// </summary>
54246 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
54247 public virtual void OutputXml(XmlWriter writer)
54248 {
54249 if ((null == writer))
54250 {
54251 throw new ArgumentNullException("writer");
54252 }
54253 writer.WriteStartElement("RadioButton", "http://wixtoolset.org/schemas/v4/wxs");
54254 if (this.bitmapFieldSet)
54255 {
54256 writer.WriteAttributeString("Bitmap", this.bitmapField);
54257 }
54258 if (this.heightFieldSet)
54259 {
54260 writer.WriteAttributeString("Height", this.heightField);
54261 }
54262 if (this.helpFieldSet)
54263 {
54264 writer.WriteAttributeString("Help", this.helpField);
54265 }
54266 if (this.iconFieldSet)
54267 {
54268 writer.WriteAttributeString("Icon", this.iconField);
54269 }
54270 if (this.textFieldSet)
54271 {
54272 writer.WriteAttributeString("Text", this.textField);
54273 }
54274 if (this.toolTipFieldSet)
54275 {
54276 writer.WriteAttributeString("ToolTip", this.toolTipField);
54277 }
54278 if (this.valueFieldSet)
54279 {
54280 writer.WriteAttributeString("Value", this.valueField);
54281 }
54282 if (this.widthFieldSet)
54283 {
54284 writer.WriteAttributeString("Width", this.widthField);
54285 }
54286 if (this.xFieldSet)
54287 {
54288 writer.WriteAttributeString("X", this.xField);
54289 }
54290 if (this.yFieldSet)
54291 {
54292 writer.WriteAttributeString("Y", this.yField);
54293 }
54294 writer.WriteEndElement();
54295 }
54296
54297 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54298 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
54299 void ISetAttributes.SetAttribute(string name, string value)
54300 {
54301 if (String.IsNullOrEmpty(name))
54302 {
54303 throw new ArgumentNullException("name");
54304 }
54305 if (("Bitmap" == name))
54306 {
54307 this.bitmapField = value;
54308 this.bitmapFieldSet = true;
54309 }
54310 if (("Height" == name))
54311 {
54312 this.heightField = value;
54313 this.heightFieldSet = true;
54314 }
54315 if (("Help" == name))
54316 {
54317 this.helpField = value;
54318 this.helpFieldSet = true;
54319 }
54320 if (("Icon" == name))
54321 {
54322 this.iconField = value;
54323 this.iconFieldSet = true;
54324 }
54325 if (("Text" == name))
54326 {
54327 this.textField = value;
54328 this.textFieldSet = true;
54329 }
54330 if (("ToolTip" == name))
54331 {
54332 this.toolTipField = value;
54333 this.toolTipFieldSet = true;
54334 }
54335 if (("Value" == name))
54336 {
54337 this.valueField = value;
54338 this.valueFieldSet = true;
54339 }
54340 if (("Width" == name))
54341 {
54342 this.widthField = value;
54343 this.widthFieldSet = true;
54344 }
54345 if (("X" == name))
54346 {
54347 this.xField = value;
54348 this.xFieldSet = true;
54349 }
54350 if (("Y" == name))
54351 {
54352 this.yField = value;
54353 this.yFieldSet = true;
54354 }
54355 }
54356 }
54357
54358 /// <summary>
54359 /// Set of radio buttons tied to the specified Property
54360 /// </summary>
54361 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54362 public class RadioButtonGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
54363 {
54364
54365 private ElementCollection children;
54366
54367 private string propertyField;
54368
54369 private bool propertyFieldSet;
54370
54371 private ISchemaElement parentElement;
54372
54373 public RadioButtonGroup()
54374 {
54375 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
54376 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RadioButton)));
54377 this.children = childCollection0;
54378 }
54379
54380 public virtual IEnumerable Children
54381 {
54382 get
54383 {
54384 return this.children;
54385 }
54386 }
54387
54388 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
54389 public virtual IEnumerable this[System.Type childType]
54390 {
54391 get
54392 {
54393 return this.children.Filter(childType);
54394 }
54395 }
54396
54397 /// <summary>
54398 /// Property tied to this group.
54399 /// </summary>
54400 public string Property
54401 {
54402 get
54403 {
54404 return this.propertyField;
54405 }
54406 set
54407 {
54408 this.propertyFieldSet = true;
54409 this.propertyField = value;
54410 }
54411 }
54412
54413 public virtual ISchemaElement ParentElement
54414 {
54415 get
54416 {
54417 return this.parentElement;
54418 }
54419 set
54420 {
54421 this.parentElement = value;
54422 }
54423 }
54424
54425 public virtual void AddChild(ISchemaElement child)
54426 {
54427 if ((null == child))
54428 {
54429 throw new ArgumentNullException("child");
54430 }
54431 this.children.AddElement(child);
54432 child.ParentElement = this;
54433 }
54434
54435 public virtual void RemoveChild(ISchemaElement child)
54436 {
54437 if ((null == child))
54438 {
54439 throw new ArgumentNullException("child");
54440 }
54441 this.children.RemoveElement(child);
54442 child.ParentElement = null;
54443 }
54444
54445 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54446 ISchemaElement ICreateChildren.CreateChild(string childName)
54447 {
54448 if (String.IsNullOrEmpty(childName))
54449 {
54450 throw new ArgumentNullException("childName");
54451 }
54452 ISchemaElement childValue = null;
54453 if (("RadioButton" == childName))
54454 {
54455 childValue = new RadioButton();
54456 }
54457 if ((null == childValue))
54458 {
54459 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
54460 }
54461 return childValue;
54462 }
54463
54464 /// <summary>
54465 /// Processes this element and all child elements into an XmlWriter.
54466 /// </summary>
54467 public virtual void OutputXml(XmlWriter writer)
54468 {
54469 if ((null == writer))
54470 {
54471 throw new ArgumentNullException("writer");
54472 }
54473 writer.WriteStartElement("RadioButtonGroup", "http://wixtoolset.org/schemas/v4/wxs");
54474 if (this.propertyFieldSet)
54475 {
54476 writer.WriteAttributeString("Property", this.propertyField);
54477 }
54478 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
54479 {
54480 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
54481 childElement.OutputXml(writer);
54482 }
54483 writer.WriteEndElement();
54484 }
54485
54486 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54487 void ISetAttributes.SetAttribute(string name, string value)
54488 {
54489 if (String.IsNullOrEmpty(name))
54490 {
54491 throw new ArgumentNullException("name");
54492 }
54493 if (("Property" == name))
54494 {
54495 this.propertyField = value;
54496 this.propertyFieldSet = true;
54497 }
54498 }
54499 }
54500
54501 /// <summary>
54502 /// Text associated with certain controls
54503 /// </summary>
54504 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54505 public class UIText : ISchemaElement, ISetAttributes
54506 {
54507
54508 private string idField;
54509
54510 private bool idFieldSet;
54511
54512 private string contentField;
54513
54514 private bool contentFieldSet;
54515
54516 private ISchemaElement parentElement;
54517
54518 public string Id
54519 {
54520 get
54521 {
54522 return this.idField;
54523 }
54524 set
54525 {
54526 this.idFieldSet = true;
54527 this.idField = value;
54528 }
54529 }
54530
54531 /// <summary>
54532 /// Element value is text, may use CDATA if needed to escape XML delimiters
54533 /// </summary>
54534 public string Content
54535 {
54536 get
54537 {
54538 return this.contentField;
54539 }
54540 set
54541 {
54542 this.contentFieldSet = true;
54543 this.contentField = value;
54544 }
54545 }
54546
54547 public virtual ISchemaElement ParentElement
54548 {
54549 get
54550 {
54551 return this.parentElement;
54552 }
54553 set
54554 {
54555 this.parentElement = value;
54556 }
54557 }
54558
54559 /// <summary>
54560 /// Processes this element and all child elements into an XmlWriter.
54561 /// </summary>
54562 public virtual void OutputXml(XmlWriter writer)
54563 {
54564 if ((null == writer))
54565 {
54566 throw new ArgumentNullException("writer");
54567 }
54568 writer.WriteStartElement("UIText", "http://wixtoolset.org/schemas/v4/wxs");
54569 if (this.idFieldSet)
54570 {
54571 writer.WriteAttributeString("Id", this.idField);
54572 }
54573 if (this.contentFieldSet)
54574 {
54575 writer.WriteString(this.contentField);
54576 }
54577 writer.WriteEndElement();
54578 }
54579
54580 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54581 void ISetAttributes.SetAttribute(string name, string value)
54582 {
54583 if (String.IsNullOrEmpty(name))
54584 {
54585 throw new ArgumentNullException("name");
54586 }
54587 if (("Id" == name))
54588 {
54589 this.idField = value;
54590 this.idFieldSet = true;
54591 }
54592 if (("Content" == name))
54593 {
54594 this.contentField = value;
54595 this.contentFieldSet = true;
54596 }
54597 }
54598 }
54599
54600 /// <summary>
54601 /// Reference to a UI element. This will force the entire referenced Fragment's contents
54602 /// to be included in the installer database.
54603 /// </summary>
54604 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54605 public class UIRef : ISchemaElement, ISetAttributes
54606 {
54607
54608 private string idField;
54609
54610 private bool idFieldSet;
54611
54612 private ISchemaElement parentElement;
54613
54614 public string Id
54615 {
54616 get
54617 {
54618 return this.idField;
54619 }
54620 set
54621 {
54622 this.idFieldSet = true;
54623 this.idField = value;
54624 }
54625 }
54626
54627 public virtual ISchemaElement ParentElement
54628 {
54629 get
54630 {
54631 return this.parentElement;
54632 }
54633 set
54634 {
54635 this.parentElement = value;
54636 }
54637 }
54638
54639 /// <summary>
54640 /// Processes this element and all child elements into an XmlWriter.
54641 /// </summary>
54642 public virtual void OutputXml(XmlWriter writer)
54643 {
54644 if ((null == writer))
54645 {
54646 throw new ArgumentNullException("writer");
54647 }
54648 writer.WriteStartElement("UIRef", "http://wixtoolset.org/schemas/v4/wxs");
54649 if (this.idFieldSet)
54650 {
54651 writer.WriteAttributeString("Id", this.idField);
54652 }
54653 writer.WriteEndElement();
54654 }
54655
54656 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54657 void ISetAttributes.SetAttribute(string name, string value)
54658 {
54659 if (String.IsNullOrEmpty(name))
54660 {
54661 throw new ArgumentNullException("name");
54662 }
54663 if (("Id" == name))
54664 {
54665 this.idField = value;
54666 this.idFieldSet = true;
54667 }
54668 }
54669 }
54670
54671 /// <summary>
54672 /// Enclosing element to compartmentalize UI specifications.
54673 /// </summary>
54674 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54675 public class UI : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
54676 {
54677
54678 private ElementCollection children;
54679
54680 private string idField;
54681
54682 private bool idFieldSet;
54683
54684 private ISchemaElement parentElement;
54685
54686 public UI()
54687 {
54688 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
54689 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedUI)));
54690 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Error)));
54691 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgressText)));
54692 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BillboardAction)));
54693 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComboBox)));
54694 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ListBox)));
54695 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ListView)));
54696 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RadioButtonGroup)));
54697 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TextStyle)));
54698 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIText)));
54699 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Dialog)));
54700 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DialogRef)));
54701 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Publish)));
54702 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef)));
54703 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property)));
54704 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Binary)));
54705 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence);
54706 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence)));
54707 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence)));
54708 childCollection0.AddCollection(childCollection1);
54709 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef)));
54710 this.children = childCollection0;
54711 }
54712
54713 public virtual IEnumerable Children
54714 {
54715 get
54716 {
54717 return this.children;
54718 }
54719 }
54720
54721 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
54722 public virtual IEnumerable this[System.Type childType]
54723 {
54724 get
54725 {
54726 return this.children.Filter(childType);
54727 }
54728 }
54729
54730 public string Id
54731 {
54732 get
54733 {
54734 return this.idField;
54735 }
54736 set
54737 {
54738 this.idFieldSet = true;
54739 this.idField = value;
54740 }
54741 }
54742
54743 public virtual ISchemaElement ParentElement
54744 {
54745 get
54746 {
54747 return this.parentElement;
54748 }
54749 set
54750 {
54751 this.parentElement = value;
54752 }
54753 }
54754
54755 public virtual void AddChild(ISchemaElement child)
54756 {
54757 if ((null == child))
54758 {
54759 throw new ArgumentNullException("child");
54760 }
54761 this.children.AddElement(child);
54762 child.ParentElement = this;
54763 }
54764
54765 public virtual void RemoveChild(ISchemaElement child)
54766 {
54767 if ((null == child))
54768 {
54769 throw new ArgumentNullException("child");
54770 }
54771 this.children.RemoveElement(child);
54772 child.ParentElement = null;
54773 }
54774
54775 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54776 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
54777 ISchemaElement ICreateChildren.CreateChild(string childName)
54778 {
54779 if (String.IsNullOrEmpty(childName))
54780 {
54781 throw new ArgumentNullException("childName");
54782 }
54783 ISchemaElement childValue = null;
54784 if (("EmbeddedUI" == childName))
54785 {
54786 childValue = new EmbeddedUI();
54787 }
54788 if (("Error" == childName))
54789 {
54790 childValue = new Error();
54791 }
54792 if (("ProgressText" == childName))
54793 {
54794 childValue = new ProgressText();
54795 }
54796 if (("BillboardAction" == childName))
54797 {
54798 childValue = new BillboardAction();
54799 }
54800 if (("ComboBox" == childName))
54801 {
54802 childValue = new ComboBox();
54803 }
54804 if (("ListBox" == childName))
54805 {
54806 childValue = new ListBox();
54807 }
54808 if (("ListView" == childName))
54809 {
54810 childValue = new ListView();
54811 }
54812 if (("RadioButtonGroup" == childName))
54813 {
54814 childValue = new RadioButtonGroup();
54815 }
54816 if (("TextStyle" == childName))
54817 {
54818 childValue = new TextStyle();
54819 }
54820 if (("UIText" == childName))
54821 {
54822 childValue = new UIText();
54823 }
54824 if (("Dialog" == childName))
54825 {
54826 childValue = new Dialog();
54827 }
54828 if (("DialogRef" == childName))
54829 {
54830 childValue = new DialogRef();
54831 }
54832 if (("Publish" == childName))
54833 {
54834 childValue = new Publish();
54835 }
54836 if (("PropertyRef" == childName))
54837 {
54838 childValue = new PropertyRef();
54839 }
54840 if (("Property" == childName))
54841 {
54842 childValue = new Property();
54843 }
54844 if (("Binary" == childName))
54845 {
54846 childValue = new Binary();
54847 }
54848 if (("AdminUISequence" == childName))
54849 {
54850 childValue = new AdminUISequence();
54851 }
54852 if (("InstallUISequence" == childName))
54853 {
54854 childValue = new InstallUISequence();
54855 }
54856 if (("UIRef" == childName))
54857 {
54858 childValue = new UIRef();
54859 }
54860 if ((null == childValue))
54861 {
54862 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
54863 }
54864 return childValue;
54865 }
54866
54867 /// <summary>
54868 /// Processes this element and all child elements into an XmlWriter.
54869 /// </summary>
54870 public virtual void OutputXml(XmlWriter writer)
54871 {
54872 if ((null == writer))
54873 {
54874 throw new ArgumentNullException("writer");
54875 }
54876 writer.WriteStartElement("UI", "http://wixtoolset.org/schemas/v4/wxs");
54877 if (this.idFieldSet)
54878 {
54879 writer.WriteAttributeString("Id", this.idField);
54880 }
54881 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
54882 {
54883 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
54884 childElement.OutputXml(writer);
54885 }
54886 writer.WriteEndElement();
54887 }
54888
54889 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54890 void ISetAttributes.SetAttribute(string name, string value)
54891 {
54892 if (String.IsNullOrEmpty(name))
54893 {
54894 throw new ArgumentNullException("name");
54895 }
54896 if (("Id" == name))
54897 {
54898 this.idField = value;
54899 this.idFieldSet = true;
54900 }
54901 }
54902 }
54903
54904 /// <summary>
54905 /// Defines a custom table for use from a custom action.
54906 /// </summary>
54907 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54908 public class CustomTable : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
54909 {
54910
54911 private ElementCollection children;
54912
54913 private string idField;
54914
54915 private bool idFieldSet;
54916
54917 private YesNoType bootstrapperApplicationDataField;
54918
54919 private bool bootstrapperApplicationDataFieldSet;
54920
54921 private ISchemaElement parentElement;
54922
54923 public CustomTable()
54924 {
54925 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
54926 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Column)));
54927 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Row)));
54928 this.children = childCollection0;
54929 }
54930
54931 public virtual IEnumerable Children
54932 {
54933 get
54934 {
54935 return this.children;
54936 }
54937 }
54938
54939 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
54940 public virtual IEnumerable this[System.Type childType]
54941 {
54942 get
54943 {
54944 return this.children.Filter(childType);
54945 }
54946 }
54947
54948 /// <summary>
54949 /// Identifier for the custom table.
54950 /// </summary>
54951 public string Id
54952 {
54953 get
54954 {
54955 return this.idField;
54956 }
54957 set
54958 {
54959 this.idFieldSet = true;
54960 this.idField = value;
54961 }
54962 }
54963
54964 /// <summary>
54965 /// Indicates the table data is transformed into the bootstrapper application data manifest.
54966 /// </summary>
54967 public YesNoType BootstrapperApplicationData
54968 {
54969 get
54970 {
54971 return this.bootstrapperApplicationDataField;
54972 }
54973 set
54974 {
54975 this.bootstrapperApplicationDataFieldSet = true;
54976 this.bootstrapperApplicationDataField = value;
54977 }
54978 }
54979
54980 public virtual ISchemaElement ParentElement
54981 {
54982 get
54983 {
54984 return this.parentElement;
54985 }
54986 set
54987 {
54988 this.parentElement = value;
54989 }
54990 }
54991
54992 public virtual void AddChild(ISchemaElement child)
54993 {
54994 if ((null == child))
54995 {
54996 throw new ArgumentNullException("child");
54997 }
54998 this.children.AddElement(child);
54999 child.ParentElement = this;
55000 }
55001
55002 public virtual void RemoveChild(ISchemaElement child)
55003 {
55004 if ((null == child))
55005 {
55006 throw new ArgumentNullException("child");
55007 }
55008 this.children.RemoveElement(child);
55009 child.ParentElement = null;
55010 }
55011
55012 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
55013 ISchemaElement ICreateChildren.CreateChild(string childName)
55014 {
55015 if (String.IsNullOrEmpty(childName))
55016 {
55017 throw new ArgumentNullException("childName");
55018 }
55019 ISchemaElement childValue = null;
55020 if (("Column" == childName))
55021 {
55022 childValue = new Column();
55023 }
55024 if (("Row" == childName))
55025 {
55026 childValue = new Row();
55027 }
55028 if ((null == childValue))
55029 {
55030 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
55031 }
55032 return childValue;
55033 }
55034
55035 /// <summary>
55036 /// Processes this element and all child elements into an XmlWriter.
55037 /// </summary>
55038 public virtual void OutputXml(XmlWriter writer)
55039 {
55040 if ((null == writer))
55041 {
55042 throw new ArgumentNullException("writer");
55043 }
55044 writer.WriteStartElement("CustomTable", "http://wixtoolset.org/schemas/v4/wxs");
55045 if (this.idFieldSet)
55046 {
55047 writer.WriteAttributeString("Id", this.idField);
55048 }
55049 if (this.bootstrapperApplicationDataFieldSet)
55050 {
55051 if ((this.bootstrapperApplicationDataField == YesNoType.no))
55052 {
55053 writer.WriteAttributeString("BootstrapperApplicationData", "no");
55054 }
55055 if ((this.bootstrapperApplicationDataField == YesNoType.yes))
55056 {
55057 writer.WriteAttributeString("BootstrapperApplicationData", "yes");
55058 }
55059 }
55060 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
55061 {
55062 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
55063 childElement.OutputXml(writer);
55064 }
55065 writer.WriteEndElement();
55066 }
55067
55068 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
55069 void ISetAttributes.SetAttribute(string name, string value)
55070 {
55071 if (String.IsNullOrEmpty(name))
55072 {
55073 throw new ArgumentNullException("name");
55074 }
55075 if (("Id" == name))
55076 {
55077 this.idField = value;
55078 this.idFieldSet = true;
55079 }
55080 if (("BootstrapperApplicationData" == name))
55081 {
55082 this.bootstrapperApplicationDataField = Enums.ParseYesNoType(value);
55083 this.bootstrapperApplicationDataFieldSet = true;
55084 }
55085 }
55086 }
55087
55088 /// <summary>
55089 /// Column definition for a Custom Table
55090 /// </summary>
55091 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
55092 public class Column : ISchemaElement, ISetAttributes
55093 {
55094
55095 private string idField;
55096
55097 private bool idFieldSet;
55098
55099 private YesNoType primaryKeyField;
55100
55101 private bool primaryKeyFieldSet;
55102
55103 private TypeType typeField;
55104
55105 private bool typeFieldSet;
55106
55107 private int widthField;
55108
55109 private bool widthFieldSet;
55110
55111 private YesNoType nullableField;
55112
55113 private bool nullableFieldSet;
55114
55115 private YesNoType localizableField;
55116
55117 private bool localizableFieldSet;
55118
55119 private long minValueField;
55120
55121 private bool minValueFieldSet;
55122
55123 private long maxValueField;
55124
55125 private bool maxValueFieldSet;
55126
55127 private string keyTableField;
55128
55129 private bool keyTableFieldSet;
55130
55131 private int keyColumnField;
55132
55133 private bool keyColumnFieldSet;
55134
55135 private CategoryType categoryField;
55136
55137 private bool categoryFieldSet;
55138
55139 private string setField;
55140
55141 private bool setFieldSet;
55142
55143 private string descriptionField;
55144
55145 private bool descriptionFieldSet;
55146
55147 private ModularizeType modularizeField;
55148
55149 private bool modularizeFieldSet;
55150
55151 private ISchemaElement parentElement;
55152
55153 /// <summary>
55154 /// Identifier for the column.
55155 /// </summary>
55156 public string Id
55157 {
55158 get
55159 {
55160 return this.idField;
55161 }
55162 set
55163 {
55164 this.idFieldSet = true;
55165 this.idField = value;
55166 }
55167 }
55168
55169 /// <summary>
55170 /// Whether this column is a primary key.
55171 /// </summary>
55172 public YesNoType PrimaryKey
55173 {
55174 get
55175 {
55176 return this.primaryKeyField;
55177 }
55178 set
55179 {
55180 this.primaryKeyFieldSet = true;
55181 this.primaryKeyField = value;
55182 }
55183 }
55184
55185 /// <summary>
55186 /// The type of this column.
55187 /// </summary>
55188 public TypeType Type
55189 {
55190 get
55191 {
55192 return this.typeField;
55193 }
55194 set
55195 {
55196 this.typeFieldSet = true;
55197 this.typeField = value;
55198 }
55199 }
55200
55201 /// <summary>
55202 /// Width of this column.
55203 /// </summary>
55204 public int Width
55205 {
55206 get
55207 {
55208 return this.widthField;
55209 }
55210 set
55211 {
55212 this.widthFieldSet = true;
55213 this.widthField = value;
55214 }
55215 }
55216
55217 /// <summary>
55218 /// Whether this column can be left null.
55219 /// </summary>
55220 public YesNoType Nullable
55221 {
55222 get
55223 {
55224 return this.nullableField;
55225 }
55226 set
55227 {
55228 this.nullableFieldSet = true;
55229 this.nullableField = value;
55230 }
55231 }
55232
55233 /// <summary>
55234 /// Whether this column can be localized.
55235 /// </summary>
55236 public YesNoType Localizable
55237 {
55238 get
55239 {
55240 return this.localizableField;
55241 }
55242 set
55243 {
55244 this.localizableFieldSet = true;
55245 this.localizableField = value;
55246 }
55247 }
55248
55249 /// <summary>
55250 /// Minimum value for a numeric value, date or version in this column.
55251 /// </summary>
55252 public long MinValue
55253 {
55254 get
55255 {
55256 return this.minValueField;
55257 }
55258 set
55259 {
55260 this.minValueFieldSet = true;
55261 this.minValueField = value;
55262 }
55263 }
55264
55265 /// <summary>
55266 /// Maximum value for a numeric value, date or version in this column.
55267 /// </summary>
55268 public long MaxValue
55269 {
55270 get
55271 {
55272 return this.maxValueField;
55273 }
55274 set
55275 {
55276 this.maxValueFieldSet = true;
55277 this.maxValueField = value;
55278 }
55279 }
55280
55281 /// <summary>
55282 /// Table in which this column is an external key. Can be semicolon delimited.
55283 /// </summary>
55284 public string KeyTable
55285 {
55286 get
55287 {
55288 return this.keyTableField;
55289 }
55290 set
55291 {
55292 this.keyTableFieldSet = true;
55293 this.keyTableField = value;
55294 }
55295 }
55296
55297 /// <summary>
55298 /// Column in the table in KeyTable attribute.
55299 /// </summary>
55300 public int KeyColumn
55301 {
55302 get
55303 {
55304 return this.keyColumnField;
55305 }
55306 set
55307 {
55308 this.keyColumnFieldSet = true;
55309 this.keyColumnField = value;
55310 }
55311 }
55312
55313 /// <summary>
55314 /// Category of this column.
55315 /// This attribute must be specified with a value of 'Binary' if the Type attribute's value is 'binary'.
55316 /// </summary>
55317 public CategoryType Category
55318 {
55319 get
55320 {
55321 return this.categoryField;
55322 }
55323 set
55324 {
55325 this.categoryFieldSet = true;
55326 this.categoryField = value;
55327 }
55328 }
55329
55330 /// <summary>
55331 /// Semicolon delimited list of permissible values.
55332 /// </summary>
55333 public string Set
55334 {
55335 get
55336 {
55337 return this.setField;
55338 }
55339 set
55340 {
55341 this.setFieldSet = true;
55342 this.setField = value;
55343 }
55344 }
55345
55346 /// <summary>
55347 /// Description of this column.
55348 /// </summary>
55349 public string Description
55350 {
55351 get
55352 {
55353 return this.descriptionField;
55354 }
55355 set
55356 {
55357 this.descriptionFieldSet = true;
55358 this.descriptionField = value;
55359 }
55360 }
55361
55362 /// <summary>
55363 /// How this column should be modularized, if at all.
55364 /// </summary>
55365 public ModularizeType Modularize
55366 {
55367 get
55368 {
55369 return this.modularizeField;
55370 }
55371 set
55372 {
55373 this.modularizeFieldSet = true;
55374 this.modularizeField = value;
55375 }
55376 }
55377
55378 public virtual ISchemaElement ParentElement
55379 {
55380 get
55381 {
55382 return this.parentElement;
55383 }
55384 set
55385 {
55386 this.parentElement = value;
55387 }
55388 }
55389
55390 /// <summary>
55391 /// Parses a TypeType from a string.
55392 /// </summary>
55393 public static TypeType ParseTypeType(string value)
55394 {
55395 TypeType parsedValue;
55396 Column.TryParseTypeType(value, out parsedValue);
55397 return parsedValue;
55398 }
55399
55400 /// <summary>
55401 /// Tries to parse a TypeType from a string.
55402 /// </summary>
55403 public static bool TryParseTypeType(string value, out TypeType parsedValue)
55404 {
55405 parsedValue = TypeType.NotSet;
55406 if (string.IsNullOrEmpty(value))
55407 {
55408 return false;
55409 }
55410 if (("binary" == value))
55411 {
55412 parsedValue = TypeType.binary;
55413 }
55414 else
55415 {
55416 if (("int" == value))
55417 {
55418 parsedValue = TypeType.@int;
55419 }
55420 else
55421 {
55422 if (("string" == value))
55423 {
55424 parsedValue = TypeType.@string;
55425 }
55426 else
55427 {
55428 parsedValue = TypeType.IllegalValue;
55429 return false;
55430 }
55431 }
55432 }
55433 return true;
55434 }
55435
55436 /// <summary>
55437 /// Parses a CategoryType from a string.
55438 /// </summary>
55439 public static CategoryType ParseCategoryType(string value)
55440 {
55441 CategoryType parsedValue;
55442 Column.TryParseCategoryType(value, out parsedValue);
55443 return parsedValue;
55444 }
55445
55446 /// <summary>
55447 /// Tries to parse a CategoryType from a string.
55448 /// </summary>
55449 public static bool TryParseCategoryType(string value, out CategoryType parsedValue)
55450 {
55451 parsedValue = CategoryType.NotSet;
55452 if (string.IsNullOrEmpty(value))
55453 {
55454 return false;
55455 }
55456 if (("Text" == value))
55457 {
55458 parsedValue = CategoryType.text;
55459 }
55460 else
55461 {
55462 if (("UpperCase" == value))
55463 {
55464 parsedValue = CategoryType.upperCase;
55465 }
55466 else
55467 {
55468 if (("LowerCase" == value))
55469 {
55470 parsedValue = CategoryType.lowerCase;
55471 }
55472 else
55473 {
55474 if (("Integer" == value))
55475 {
55476 parsedValue = CategoryType.integer;
55477 }
55478 else
55479 {
55480 if (("DoubleInteger" == value))
55481 {
55482 parsedValue = CategoryType.doubleInteger;
55483 }
55484 else
55485 {
55486 if (("TimeDate" == value))
55487 {
55488 parsedValue = CategoryType.timeDate;
55489 }
55490 else
55491 {
55492 if (("Identifier" == value))
55493 {
55494 parsedValue = CategoryType.identifier;
55495 }
55496 else
55497 {
55498 if (("Property" == value))
55499 {
55500 parsedValue = CategoryType.property;
55501 }
55502 else
55503 {
55504 if (("Filename" == value))
55505 {
55506 parsedValue = CategoryType.filename;
55507 }
55508 else
55509 {
55510 if (("WildCardFilename" == value))
55511 {
55512 parsedValue = CategoryType.wildCardFilename;
55513 }
55514 else
55515 {
55516 if (("Path" == value))
55517 {
55518 parsedValue = CategoryType.path;
55519 }
55520 else
55521 {
55522 if (("Paths" == value))
55523 {
55524 parsedValue = CategoryType.paths;
55525 }
55526 else
55527 {
55528 if (("AnyPath" == value))
55529 {
55530 parsedValue = CategoryType.anyPath;
55531 }
55532 else
55533 {
55534 if (("DefaultDir" == value))
55535 {
55536 parsedValue = CategoryType.defaultDir;
55537 }
55538 else
55539 {
55540 if (("RegPath" == value))
55541 {
55542 parsedValue = CategoryType.regPath;
55543 }
55544 else
55545 {
55546 if (("Formatted" == value))
55547 {
55548 parsedValue = CategoryType.formatted;
55549 }
55550 else
55551 {
55552 if (("FormattedSddl" == value))
55553 {
55554 parsedValue = CategoryType.formattedSddl;
55555 }
55556 else
55557 {
55558 if (("Template" == value))
55559 {
55560 parsedValue = CategoryType.template;
55561 }
55562 else
55563 {
55564 if (("Condition" == value))
55565 {
55566 parsedValue = CategoryType.condition;
55567 }
55568 else
55569 {
55570 if (("Guid" == value))
55571 {
55572 parsedValue = CategoryType.guid;
55573 }
55574 else
55575 {
55576 if (("Version" == value))
55577 {
55578 parsedValue = CategoryType.version;
55579 }
55580 else
55581 {
55582 if (("Language" == value))
55583 {
55584 parsedValue = CategoryType.language;
55585 }
55586 else
55587 {
55588 if (("Binary" == value))
55589 {
55590 parsedValue = CategoryType.binary;
55591 }
55592 else
55593 {
55594 if (("CustomSource" == value))
55595 {
55596 parsedValue = CategoryType.customSource;
55597 }
55598 else
55599 {
55600 if (("Cabinet" == value))
55601 {
55602 parsedValue = CategoryType.cabinet;
55603 }
55604 else
55605 {
55606 if (("Shortcut" == value))
55607 {
55608 parsedValue = CategoryType.shortcut;
55609 }
55610 else
55611 {
55612 parsedValue = CategoryType.IllegalValue;
55613 return false;
55614 }
55615 }
55616 }
55617 }
55618 }
55619 }
55620 }
55621 }
55622 }
55623 }
55624 }
55625 }
55626 }
55627 }
55628 }
55629 }
55630 }
55631 }
55632 }
55633 }
55634 }
55635 }
55636 }
55637 }
55638 }
55639 }
55640 return true;
55641 }
55642
55643 /// <summary>
55644 /// Parses a ModularizeType from a string.
55645 /// </summary>
55646 public static ModularizeType ParseModularizeType(string value)
55647 {
55648 ModularizeType parsedValue;
55649 Column.TryParseModularizeType(value, out parsedValue);
55650 return parsedValue;
55651 }
55652
55653 /// <summary>
55654 /// Tries to parse a ModularizeType from a string.
55655 /// </summary>
55656 public static bool TryParseModularizeType(string value, out ModularizeType parsedValue)
55657 {
55658 parsedValue = ModularizeType.NotSet;
55659 if (string.IsNullOrEmpty(value))
55660 {
55661 return false;
55662 }
55663 if (("None" == value))
55664 {
55665 parsedValue = ModularizeType.None;
55666 }
55667 else
55668 {
55669 if (("Column" == value))
55670 {
55671 parsedValue = ModularizeType.Column;
55672 }
55673 else
55674 {
55675 if (("Condition" == value))
55676 {
55677 parsedValue = ModularizeType.Condition;
55678 }
55679 else
55680 {
55681 if (("Icon" == value))
55682 {
55683 parsedValue = ModularizeType.Icon;
55684 }
55685 else
55686 {
55687 if (("Property" == value))
55688 {
55689 parsedValue = ModularizeType.Property;
55690 }
55691 else
55692 {
55693 if (("SemicolonDelimited" == value))
55694 {
55695 parsedValue = ModularizeType.SemicolonDelimited;
55696 }
55697 else
55698 {
55699 parsedValue = ModularizeType.IllegalValue;
55700 return false;
55701 }
55702 }
55703 }
55704 }
55705 }
55706 }
55707 return true;
55708 }
55709
55710 /// <summary>
55711 /// Processes this element and all child elements into an XmlWriter.
55712 /// </summary>
55713 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
55714 public virtual void OutputXml(XmlWriter writer)
55715 {
55716 if ((null == writer))
55717 {
55718 throw new ArgumentNullException("writer");
55719 }
55720 writer.WriteStartElement("Column", "http://wixtoolset.org/schemas/v4/wxs");
55721 if (this.idFieldSet)
55722 {
55723 writer.WriteAttributeString("Id", this.idField);
55724 }
55725 if (this.primaryKeyFieldSet)
55726 {
55727 if ((this.primaryKeyField == YesNoType.no))
55728 {
55729 writer.WriteAttributeString("PrimaryKey", "no");
55730 }
55731 if ((this.primaryKeyField == YesNoType.yes))
55732 {
55733 writer.WriteAttributeString("PrimaryKey", "yes");
55734 }
55735 }
55736 if (this.typeFieldSet)
55737 {
55738 if ((this.typeField == TypeType.binary))
55739 {
55740 writer.WriteAttributeString("Type", "binary");
55741 }
55742 if ((this.typeField == TypeType.@int))
55743 {
55744 writer.WriteAttributeString("Type", "int");
55745 }
55746 if ((this.typeField == TypeType.@string))
55747 {
55748 writer.WriteAttributeString("Type", "string");
55749 }
55750 }
55751 if (this.widthFieldSet)
55752 {
55753 writer.WriteAttributeString("Width", this.widthField.ToString(CultureInfo.InvariantCulture));
55754 }
55755 if (this.nullableFieldSet)
55756 {
55757 if ((this.nullableField == YesNoType.no))
55758 {
55759 writer.WriteAttributeString("Nullable", "no");
55760 }
55761 if ((this.nullableField == YesNoType.yes))
55762 {
55763 writer.WriteAttributeString("Nullable", "yes");
55764 }
55765 }
55766 if (this.localizableFieldSet)
55767 {
55768 if ((this.localizableField == YesNoType.no))
55769 {
55770 writer.WriteAttributeString("Localizable", "no");
55771 }
55772 if ((this.localizableField == YesNoType.yes))
55773 {
55774 writer.WriteAttributeString("Localizable", "yes");
55775 }
55776 }
55777 if (this.minValueFieldSet)
55778 {
55779 writer.WriteAttributeString("MinValue", this.minValueField.ToString(CultureInfo.InvariantCulture));
55780 }
55781 if (this.maxValueFieldSet)
55782 {
55783 writer.WriteAttributeString("MaxValue", this.maxValueField.ToString(CultureInfo.InvariantCulture));
55784 }
55785 if (this.keyTableFieldSet)
55786 {
55787 writer.WriteAttributeString("KeyTable", this.keyTableField);
55788 }
55789 if (this.keyColumnFieldSet)
55790 {
55791 writer.WriteAttributeString("KeyColumn", this.keyColumnField.ToString(CultureInfo.InvariantCulture));
55792 }
55793 if (this.categoryFieldSet)
55794 {
55795 if ((this.categoryField == CategoryType.text))
55796 {
55797 writer.WriteAttributeString("Category", "text");
55798 }
55799 if ((this.categoryField == CategoryType.upperCase))
55800 {
55801 writer.WriteAttributeString("Category", "upperCase");
55802 }
55803 if ((this.categoryField == CategoryType.lowerCase))
55804 {
55805 writer.WriteAttributeString("Category", "lowerCase");
55806 }
55807 if ((this.categoryField == CategoryType.integer))
55808 {
55809 writer.WriteAttributeString("Category", "integer");
55810 }
55811 if ((this.categoryField == CategoryType.doubleInteger))
55812 {
55813 writer.WriteAttributeString("Category", "doubleInteger");
55814 }
55815 if ((this.categoryField == CategoryType.timeDate))
55816 {
55817 writer.WriteAttributeString("Category", "timeDate");
55818 }
55819 if ((this.categoryField == CategoryType.identifier))
55820 {
55821 writer.WriteAttributeString("Category", "identifier");
55822 }
55823 if ((this.categoryField == CategoryType.property))
55824 {
55825 writer.WriteAttributeString("Category", "property");
55826 }
55827 if ((this.categoryField == CategoryType.filename))
55828 {
55829 writer.WriteAttributeString("Category", "filename");
55830 }
55831 if ((this.categoryField == CategoryType.wildCardFilename))
55832 {
55833 writer.WriteAttributeString("Category", "wildCardFilename");
55834 }
55835 if ((this.categoryField == CategoryType.path))
55836 {
55837 writer.WriteAttributeString("Category", "path");
55838 }
55839 if ((this.categoryField == CategoryType.paths))
55840 {
55841 writer.WriteAttributeString("Category", "paths");
55842 }
55843 if ((this.categoryField == CategoryType.anyPath))
55844 {
55845 writer.WriteAttributeString("Category", "anyPath");
55846 }
55847 if ((this.categoryField == CategoryType.defaultDir))
55848 {
55849 writer.WriteAttributeString("Category", "defaultDir");
55850 }
55851 if ((this.categoryField == CategoryType.regPath))
55852 {
55853 writer.WriteAttributeString("Category", "regPath");
55854 }
55855 if ((this.categoryField == CategoryType.formatted))
55856 {
55857 writer.WriteAttributeString("Category", "formatted");
55858 }
55859 if ((this.categoryField == CategoryType.formattedSddl))
55860 {
55861 writer.WriteAttributeString("Category", "formattedSddl");
55862 }
55863 if ((this.categoryField == CategoryType.template))
55864 {
55865 writer.WriteAttributeString("Category", "template");
55866 }
55867 if ((this.categoryField == CategoryType.condition))
55868 {
55869 writer.WriteAttributeString("Category", "condition");
55870 }
55871 if ((this.categoryField == CategoryType.guid))
55872 {
55873 writer.WriteAttributeString("Category", "guid");
55874 }
55875 if ((this.categoryField == CategoryType.version))
55876 {
55877 writer.WriteAttributeString("Category", "version");
55878 }
55879 if ((this.categoryField == CategoryType.language))
55880 {
55881 writer.WriteAttributeString("Category", "language");
55882 }
55883 if ((this.categoryField == CategoryType.binary))
55884 {
55885 writer.WriteAttributeString("Category", "Binary");
55886 }
55887 if ((this.categoryField == CategoryType.customSource))
55888 {
55889 writer.WriteAttributeString("Category", "customSource");
55890 }
55891 if ((this.categoryField == CategoryType.cabinet))
55892 {
55893 writer.WriteAttributeString("Category", "cabinet");
55894 }
55895 if ((this.categoryField == CategoryType.shortcut))
55896 {
55897 writer.WriteAttributeString("Category", "shortcut");
55898 }
55899 }
55900 if (this.setFieldSet)
55901 {
55902 writer.WriteAttributeString("Set", this.setField);
55903 }
55904 if (this.descriptionFieldSet)
55905 {
55906 writer.WriteAttributeString("Description", this.descriptionField);
55907 }
55908 if (this.modularizeFieldSet)
55909 {
55910 if ((this.modularizeField == ModularizeType.None))
55911 {
55912 writer.WriteAttributeString("Modularize", "None");
55913 }
55914 if ((this.modularizeField == ModularizeType.Column))
55915 {
55916 writer.WriteAttributeString("Modularize", "Column");
55917 }
55918 if ((this.modularizeField == ModularizeType.Condition))
55919 {
55920 writer.WriteAttributeString("Modularize", "Condition");
55921 }
55922 if ((this.modularizeField == ModularizeType.Icon))
55923 {
55924 writer.WriteAttributeString("Modularize", "Icon");
55925 }
55926 if ((this.modularizeField == ModularizeType.Property))
55927 {
55928 writer.WriteAttributeString("Modularize", "Property");
55929 }
55930 if ((this.modularizeField == ModularizeType.SemicolonDelimited))
55931 {
55932 writer.WriteAttributeString("Modularize", "SemicolonDelimited");
55933 }
55934 }
55935 writer.WriteEndElement();
55936 }
55937
55938 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
55939 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
55940 void ISetAttributes.SetAttribute(string name, string value)
55941 {
55942 if (String.IsNullOrEmpty(name))
55943 {
55944 throw new ArgumentNullException("name");
55945 }
55946 if (("Id" == name))
55947 {
55948 this.idField = value;
55949 this.idFieldSet = true;
55950 }
55951 if (("PrimaryKey" == name))
55952 {
55953 this.primaryKeyField = Enums.ParseYesNoType(value);
55954 this.primaryKeyFieldSet = true;
55955 }
55956 if (("Type" == name))
55957 {
55958 this.typeField = Column.ParseTypeType(value);
55959 this.typeFieldSet = true;
55960 }
55961 if (("Width" == name))
55962 {
55963 this.widthField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
55964 this.widthFieldSet = true;
55965 }
55966 if (("Nullable" == name))
55967 {
55968 this.nullableField = Enums.ParseYesNoType(value);
55969 this.nullableFieldSet = true;
55970 }
55971 if (("Localizable" == name))
55972 {
55973 this.localizableField = Enums.ParseYesNoType(value);
55974 this.localizableFieldSet = true;
55975 }
55976 if (("MinValue" == name))
55977 {
55978 this.minValueField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
55979 this.minValueFieldSet = true;
55980 }
55981 if (("MaxValue" == name))
55982 {
55983 this.maxValueField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
55984 this.maxValueFieldSet = true;
55985 }
55986 if (("KeyTable" == name))
55987 {
55988 this.keyTableField = value;
55989 this.keyTableFieldSet = true;
55990 }
55991 if (("KeyColumn" == name))
55992 {
55993 this.keyColumnField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
55994 this.keyColumnFieldSet = true;
55995 }
55996 if (("Category" == name))
55997 {
55998 this.categoryField = Column.ParseCategoryType(value);
55999 this.categoryFieldSet = true;
56000 }
56001 if (("Set" == name))
56002 {
56003 this.setField = value;
56004 this.setFieldSet = true;
56005 }
56006 if (("Description" == name))
56007 {
56008 this.descriptionField = value;
56009 this.descriptionFieldSet = true;
56010 }
56011 if (("Modularize" == name))
56012 {
56013 this.modularizeField = Column.ParseModularizeType(value);
56014 this.modularizeFieldSet = true;
56015 }
56016 }
56017
56018 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56019 public enum TypeType
56020 {
56021
56022 IllegalValue = int.MaxValue,
56023
56024 NotSet = -1,
56025
56026 /// <summary>
56027 /// Column contains a path to a file that will be inserted into the column as a binary object.
56028 /// If this value is set, the Category attribute must also be set with a value of 'Binary' to pass ICE validation.
56029 /// </summary>
56030 binary,
56031
56032 /// <summary>
56033 /// Column contains an integer or datetime value (the MinValue and MaxValue attributes should also be set).
56034 /// </summary>
56035 @int,
56036
56037 /// <summary>
56038 /// Column contains a non-localizable string value.
56039 /// </summary>
56040 @string,
56041 }
56042
56043 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56044 public enum CategoryType
56045 {
56046
56047 IllegalValue = int.MaxValue,
56048
56049 NotSet = -1,
56050
56051 text,
56052
56053 upperCase,
56054
56055 lowerCase,
56056
56057 integer,
56058
56059 doubleInteger,
56060
56061 timeDate,
56062
56063 identifier,
56064
56065 property,
56066
56067 filename,
56068
56069 wildCardFilename,
56070
56071 path,
56072
56073 paths,
56074
56075 anyPath,
56076
56077 defaultDir,
56078
56079 regPath,
56080
56081 formatted,
56082
56083 formattedSddl,
56084
56085 template,
56086
56087 condition,
56088
56089 guid,
56090
56091 version,
56092
56093 language,
56094
56095 binary,
56096
56097 customSource,
56098
56099 cabinet,
56100
56101 shortcut,
56102 }
56103
56104 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56105 public enum ModularizeType
56106 {
56107
56108 IllegalValue = int.MaxValue,
56109
56110 NotSet = -1,
56111
56112 /// <summary>
56113 /// Column should not be modularized. This is the default value.
56114 /// </summary>
56115 None,
56116
56117 /// <summary>
56118 /// Column should be modularized.
56119 /// </summary>
56120 Column,
56121
56122 /// <summary>
56123 /// Column is a condition and should be modularized.
56124 /// </summary>
56125 Condition,
56126
56127 /// <summary>
56128 /// When the column is an primary or foreign key to the Icon table it should be modularized special.
56129 /// </summary>
56130 Icon,
56131
56132 /// <summary>
56133 /// Any Properties in the column should be modularized.
56134 /// </summary>
56135 Property,
56136
56137 /// <summary>
56138 /// Semi-colon list of keys, all of which need to be modularized.
56139 /// </summary>
56140 SemicolonDelimited,
56141 }
56142 }
56143
56144 /// <summary>
56145 /// Row data for a Custom Table
56146 /// </summary>
56147 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56148 public class Row : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
56149 {
56150
56151 private ElementCollection children;
56152
56153 private ISchemaElement parentElement;
56154
56155 public Row()
56156 {
56157 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
56158 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Data)));
56159 this.children = childCollection0;
56160 }
56161
56162 public virtual IEnumerable Children
56163 {
56164 get
56165 {
56166 return this.children;
56167 }
56168 }
56169
56170 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
56171 public virtual IEnumerable this[System.Type childType]
56172 {
56173 get
56174 {
56175 return this.children.Filter(childType);
56176 }
56177 }
56178
56179 public virtual ISchemaElement ParentElement
56180 {
56181 get
56182 {
56183 return this.parentElement;
56184 }
56185 set
56186 {
56187 this.parentElement = value;
56188 }
56189 }
56190
56191 public virtual void AddChild(ISchemaElement child)
56192 {
56193 if ((null == child))
56194 {
56195 throw new ArgumentNullException("child");
56196 }
56197 this.children.AddElement(child);
56198 child.ParentElement = this;
56199 }
56200
56201 public virtual void RemoveChild(ISchemaElement child)
56202 {
56203 if ((null == child))
56204 {
56205 throw new ArgumentNullException("child");
56206 }
56207 this.children.RemoveElement(child);
56208 child.ParentElement = null;
56209 }
56210
56211 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56212 ISchemaElement ICreateChildren.CreateChild(string childName)
56213 {
56214 if (String.IsNullOrEmpty(childName))
56215 {
56216 throw new ArgumentNullException("childName");
56217 }
56218 ISchemaElement childValue = null;
56219 if (("Data" == childName))
56220 {
56221 childValue = new Data();
56222 }
56223 if ((null == childValue))
56224 {
56225 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
56226 }
56227 return childValue;
56228 }
56229
56230 /// <summary>
56231 /// Processes this element and all child elements into an XmlWriter.
56232 /// </summary>
56233 public virtual void OutputXml(XmlWriter writer)
56234 {
56235 if ((null == writer))
56236 {
56237 throw new ArgumentNullException("writer");
56238 }
56239 writer.WriteStartElement("Row", "http://wixtoolset.org/schemas/v4/wxs");
56240 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
56241 {
56242 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
56243 childElement.OutputXml(writer);
56244 }
56245 writer.WriteEndElement();
56246 }
56247
56248 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56249 void ISetAttributes.SetAttribute(string name, string value)
56250 {
56251 if (String.IsNullOrEmpty(name))
56252 {
56253 throw new ArgumentNullException("name");
56254 }
56255 }
56256 }
56257
56258 /// <summary>
56259 /// Used for a Custom Table. Specifies the data for the parent Row and specified Column.
56260 /// </summary>
56261 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56262 public class Data : ISchemaElement, ISetAttributes
56263 {
56264
56265 private string columnField;
56266
56267 private bool columnFieldSet;
56268
56269 private string contentField;
56270
56271 private bool contentFieldSet;
56272
56273 private ISchemaElement parentElement;
56274
56275 /// <summary>
56276 /// Specifies in which column to insert this data.
56277 /// </summary>
56278 public string Column
56279 {
56280 get
56281 {
56282 return this.columnField;
56283 }
56284 set
56285 {
56286 this.columnFieldSet = true;
56287 this.columnField = value;
56288 }
56289 }
56290
56291 /// <summary>
56292 /// A data value
56293 /// </summary>
56294 public string Content
56295 {
56296 get
56297 {
56298 return this.contentField;
56299 }
56300 set
56301 {
56302 this.contentFieldSet = true;
56303 this.contentField = value;
56304 }
56305 }
56306
56307 public virtual ISchemaElement ParentElement
56308 {
56309 get
56310 {
56311 return this.parentElement;
56312 }
56313 set
56314 {
56315 this.parentElement = value;
56316 }
56317 }
56318
56319 /// <summary>
56320 /// Processes this element and all child elements into an XmlWriter.
56321 /// </summary>
56322 public virtual void OutputXml(XmlWriter writer)
56323 {
56324 if ((null == writer))
56325 {
56326 throw new ArgumentNullException("writer");
56327 }
56328 writer.WriteStartElement("Data", "http://wixtoolset.org/schemas/v4/wxs");
56329 if (this.columnFieldSet)
56330 {
56331 writer.WriteAttributeString("Column", this.columnField);
56332 }
56333 if (this.contentFieldSet)
56334 {
56335 writer.WriteString(this.contentField);
56336 }
56337 writer.WriteEndElement();
56338 }
56339
56340 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56341 void ISetAttributes.SetAttribute(string name, string value)
56342 {
56343 if (String.IsNullOrEmpty(name))
56344 {
56345 throw new ArgumentNullException("name");
56346 }
56347 if (("Column" == name))
56348 {
56349 this.columnField = value;
56350 this.columnFieldSet = true;
56351 }
56352 if (("Content" == name))
56353 {
56354 this.contentField = value;
56355 this.contentFieldSet = true;
56356 }
56357 }
56358 }
56359
56360 /// <summary>
56361 /// Use this element to ensure that a table appears in the installer database, even if its empty.
56362 /// </summary>
56363 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56364 public class EnsureTable : ISchemaElement, ISetAttributes
56365 {
56366
56367 private string idField;
56368
56369 private bool idFieldSet;
56370
56371 private ISchemaElement parentElement;
56372
56373 /// <summary>
56374 /// The name of the table.
56375 /// </summary>
56376 public string Id
56377 {
56378 get
56379 {
56380 return this.idField;
56381 }
56382 set
56383 {
56384 this.idFieldSet = true;
56385 this.idField = value;
56386 }
56387 }
56388
56389 public virtual ISchemaElement ParentElement
56390 {
56391 get
56392 {
56393 return this.parentElement;
56394 }
56395 set
56396 {
56397 this.parentElement = value;
56398 }
56399 }
56400
56401 /// <summary>
56402 /// Processes this element and all child elements into an XmlWriter.
56403 /// </summary>
56404 public virtual void OutputXml(XmlWriter writer)
56405 {
56406 if ((null == writer))
56407 {
56408 throw new ArgumentNullException("writer");
56409 }
56410 writer.WriteStartElement("EnsureTable", "http://wixtoolset.org/schemas/v4/wxs");
56411 if (this.idFieldSet)
56412 {
56413 writer.WriteAttributeString("Id", this.idField);
56414 }
56415 writer.WriteEndElement();
56416 }
56417
56418 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56419 void ISetAttributes.SetAttribute(string name, string value)
56420 {
56421 if (String.IsNullOrEmpty(name))
56422 {
56423 throw new ArgumentNullException("name");
56424 }
56425 if (("Id" == name))
56426 {
56427 this.idField = value;
56428 this.idFieldSet = true;
56429 }
56430 }
56431 }
56432
56433 /// <summary>
56434 /// This element exposes advanced WiX functionality. Use this element to declare WiX variables
56435 /// from directly within your authoring. WiX variables are not resolved until the final msi/msm/pcp
56436 /// file is actually generated. WiX variables do not persist into the msi/msm/pcp file, so they cannot
56437 /// be used when an MSI file is being installed; it's a WiX-only concept.
56438 /// </summary>
56439 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56440 public class WixVariable : ISchemaElement, ISetAttributes
56441 {
56442
56443 private string idField;
56444
56445 private bool idFieldSet;
56446
56447 private YesNoType overridableField;
56448
56449 private bool overridableFieldSet;
56450
56451 private string valueField;
56452
56453 private bool valueFieldSet;
56454
56455 private ISchemaElement parentElement;
56456
56457 /// <summary>
56458 /// The name of the variable.
56459 /// </summary>
56460 public string Id
56461 {
56462 get
56463 {
56464 return this.idField;
56465 }
56466 set
56467 {
56468 this.idFieldSet = true;
56469 this.idField = value;
56470 }
56471 }
56472
56473 /// <summary>
56474 /// Set this value to 'yes' in order to make the variable's value overridable either by
56475 /// another WixVariable entry or via the command-line option -d&lt;name&gt;=&lt;value&gt;
56476 /// for light.exe. If the same variable is declared overridable in multiple places it
56477 /// will cause an error (since WiX won't know which value is correct). The default value
56478 /// is 'no'.
56479 /// </summary>
56480 public YesNoType Overridable
56481 {
56482 get
56483 {
56484 return this.overridableField;
56485 }
56486 set
56487 {
56488 this.overridableFieldSet = true;
56489 this.overridableField = value;
56490 }
56491 }
56492
56493 /// <summary>
56494 /// The value of the variable. The value cannot be an empty string because that would
56495 /// make it possible to accidentally set a column to null.
56496 /// </summary>
56497 public string Value
56498 {
56499 get
56500 {
56501 return this.valueField;
56502 }
56503 set
56504 {
56505 this.valueFieldSet = true;
56506 this.valueField = value;
56507 }
56508 }
56509
56510 public virtual ISchemaElement ParentElement
56511 {
56512 get
56513 {
56514 return this.parentElement;
56515 }
56516 set
56517 {
56518 this.parentElement = value;
56519 }
56520 }
56521
56522 /// <summary>
56523 /// Processes this element and all child elements into an XmlWriter.
56524 /// </summary>
56525 public virtual void OutputXml(XmlWriter writer)
56526 {
56527 if ((null == writer))
56528 {
56529 throw new ArgumentNullException("writer");
56530 }
56531 writer.WriteStartElement("WixVariable", "http://wixtoolset.org/schemas/v4/wxs");
56532 if (this.idFieldSet)
56533 {
56534 writer.WriteAttributeString("Id", this.idField);
56535 }
56536 if (this.overridableFieldSet)
56537 {
56538 if ((this.overridableField == YesNoType.no))
56539 {
56540 writer.WriteAttributeString("Overridable", "no");
56541 }
56542 if ((this.overridableField == YesNoType.yes))
56543 {
56544 writer.WriteAttributeString("Overridable", "yes");
56545 }
56546 }
56547 if (this.valueFieldSet)
56548 {
56549 writer.WriteAttributeString("Value", this.valueField);
56550 }
56551 writer.WriteEndElement();
56552 }
56553
56554 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56555 void ISetAttributes.SetAttribute(string name, string value)
56556 {
56557 if (String.IsNullOrEmpty(name))
56558 {
56559 throw new ArgumentNullException("name");
56560 }
56561 if (("Id" == name))
56562 {
56563 this.idField = value;
56564 this.idFieldSet = true;
56565 }
56566 if (("Overridable" == name))
56567 {
56568 this.overridableField = Enums.ParseYesNoType(value);
56569 this.overridableFieldSet = true;
56570 }
56571 if (("Value" == name))
56572 {
56573 this.valueField = value;
56574 this.valueFieldSet = true;
56575 }
56576 }
56577 }
56578
56579 /// <summary>
56580 /// Use this element to contain definitions for instance transforms.
56581 /// </summary>
56582 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56583 public class InstanceTransforms : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
56584 {
56585
56586 private ElementCollection children;
56587
56588 private string propertyField;
56589
56590 private bool propertyFieldSet;
56591
56592 private ISchemaElement parentElement;
56593
56594 public InstanceTransforms()
56595 {
56596 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
56597 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Instance)));
56598 this.children = childCollection0;
56599 }
56600
56601 public virtual IEnumerable Children
56602 {
56603 get
56604 {
56605 return this.children;
56606 }
56607 }
56608
56609 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
56610 public virtual IEnumerable this[System.Type childType]
56611 {
56612 get
56613 {
56614 return this.children.Filter(childType);
56615 }
56616 }
56617
56618 /// <summary>
56619 /// The Id of the Property who's value should change for each instance.
56620 /// </summary>
56621 public string Property
56622 {
56623 get
56624 {
56625 return this.propertyField;
56626 }
56627 set
56628 {
56629 this.propertyFieldSet = true;
56630 this.propertyField = value;
56631 }
56632 }
56633
56634 public virtual ISchemaElement ParentElement
56635 {
56636 get
56637 {
56638 return this.parentElement;
56639 }
56640 set
56641 {
56642 this.parentElement = value;
56643 }
56644 }
56645
56646 public virtual void AddChild(ISchemaElement child)
56647 {
56648 if ((null == child))
56649 {
56650 throw new ArgumentNullException("child");
56651 }
56652 this.children.AddElement(child);
56653 child.ParentElement = this;
56654 }
56655
56656 public virtual void RemoveChild(ISchemaElement child)
56657 {
56658 if ((null == child))
56659 {
56660 throw new ArgumentNullException("child");
56661 }
56662 this.children.RemoveElement(child);
56663 child.ParentElement = null;
56664 }
56665
56666 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56667 ISchemaElement ICreateChildren.CreateChild(string childName)
56668 {
56669 if (String.IsNullOrEmpty(childName))
56670 {
56671 throw new ArgumentNullException("childName");
56672 }
56673 ISchemaElement childValue = null;
56674 if (("Instance" == childName))
56675 {
56676 childValue = new Instance();
56677 }
56678 if ((null == childValue))
56679 {
56680 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
56681 }
56682 return childValue;
56683 }
56684
56685 /// <summary>
56686 /// Processes this element and all child elements into an XmlWriter.
56687 /// </summary>
56688 public virtual void OutputXml(XmlWriter writer)
56689 {
56690 if ((null == writer))
56691 {
56692 throw new ArgumentNullException("writer");
56693 }
56694 writer.WriteStartElement("InstanceTransforms", "http://wixtoolset.org/schemas/v4/wxs");
56695 if (this.propertyFieldSet)
56696 {
56697 writer.WriteAttributeString("Property", this.propertyField);
56698 }
56699 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
56700 {
56701 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
56702 childElement.OutputXml(writer);
56703 }
56704 writer.WriteEndElement();
56705 }
56706
56707 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56708 void ISetAttributes.SetAttribute(string name, string value)
56709 {
56710 if (String.IsNullOrEmpty(name))
56711 {
56712 throw new ArgumentNullException("name");
56713 }
56714 if (("Property" == name))
56715 {
56716 this.propertyField = value;
56717 this.propertyFieldSet = true;
56718 }
56719 }
56720 }
56721
56722 /// <summary>
56723 /// Defines an instance transform for your product.
56724 /// </summary>
56725 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56726 public class Instance : ISchemaElement, ISetAttributes
56727 {
56728
56729 private string idField;
56730
56731 private bool idFieldSet;
56732
56733 private string productCodeField;
56734
56735 private bool productCodeFieldSet;
56736
56737 private string productNameField;
56738
56739 private bool productNameFieldSet;
56740
56741 private string upgradeCodeField;
56742
56743 private bool upgradeCodeFieldSet;
56744
56745 private ISchemaElement parentElement;
56746
56747 /// <summary>
56748 /// The identity of the instance transform. This value will define the name by which the instance
56749 /// should be referred to on the command line. In addition, the value of the this attribute will
56750 /// determine what the value of the property specified in Property attribute on InstanceTransforms
56751 /// will change to for each instance.
56752 /// </summary>
56753 public string Id
56754 {
56755 get
56756 {
56757 return this.idField;
56758 }
56759 set
56760 {
56761 this.idFieldSet = true;
56762 this.idField = value;
56763 }
56764 }
56765
56766 /// <summary>
56767 /// The ProductCode for this instance.
56768 /// </summary>
56769 public string ProductCode
56770 {
56771 get
56772 {
56773 return this.productCodeField;
56774 }
56775 set
56776 {
56777 this.productCodeFieldSet = true;
56778 this.productCodeField = value;
56779 }
56780 }
56781
56782 /// <summary>
56783 /// The ProductName for this instance.
56784 /// </summary>
56785 public string ProductName
56786 {
56787 get
56788 {
56789 return this.productNameField;
56790 }
56791 set
56792 {
56793 this.productNameFieldSet = true;
56794 this.productNameField = value;
56795 }
56796 }
56797
56798 /// <summary>
56799 /// The UpgradeCode for this instance.
56800 /// </summary>
56801 public string UpgradeCode
56802 {
56803 get
56804 {
56805 return this.upgradeCodeField;
56806 }
56807 set
56808 {
56809 this.upgradeCodeFieldSet = true;
56810 this.upgradeCodeField = value;
56811 }
56812 }
56813
56814 public virtual ISchemaElement ParentElement
56815 {
56816 get
56817 {
56818 return this.parentElement;
56819 }
56820 set
56821 {
56822 this.parentElement = value;
56823 }
56824 }
56825
56826 /// <summary>
56827 /// Processes this element and all child elements into an XmlWriter.
56828 /// </summary>
56829 public virtual void OutputXml(XmlWriter writer)
56830 {
56831 if ((null == writer))
56832 {
56833 throw new ArgumentNullException("writer");
56834 }
56835 writer.WriteStartElement("Instance", "http://wixtoolset.org/schemas/v4/wxs");
56836 if (this.idFieldSet)
56837 {
56838 writer.WriteAttributeString("Id", this.idField);
56839 }
56840 if (this.productCodeFieldSet)
56841 {
56842 writer.WriteAttributeString("ProductCode", this.productCodeField);
56843 }
56844 if (this.productNameFieldSet)
56845 {
56846 writer.WriteAttributeString("ProductName", this.productNameField);
56847 }
56848 if (this.upgradeCodeFieldSet)
56849 {
56850 writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField);
56851 }
56852 writer.WriteEndElement();
56853 }
56854
56855 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56856 void ISetAttributes.SetAttribute(string name, string value)
56857 {
56858 if (String.IsNullOrEmpty(name))
56859 {
56860 throw new ArgumentNullException("name");
56861 }
56862 if (("Id" == name))
56863 {
56864 this.idField = value;
56865 this.idFieldSet = true;
56866 }
56867 if (("ProductCode" == name))
56868 {
56869 this.productCodeField = value;
56870 this.productCodeFieldSet = true;
56871 }
56872 if (("ProductName" == name))
56873 {
56874 this.productNameField = value;
56875 this.productNameFieldSet = true;
56876 }
56877 if (("UpgradeCode" == name))
56878 {
56879 this.upgradeCodeField = value;
56880 this.upgradeCodeFieldSet = true;
56881 }
56882 }
56883 }
56884
56885 /// <summary>
56886 /// Simplifies authoring for major upgrades, including support for preventing downgrades.
56887 ///
56888 /// The parent Package element must have valid UpgradeCode and Version attributes.
56889 ///
56890 /// When the FindRelatedProducts action detects a related product installed on the system,
56891 /// it appends the product code to the property named WIX_UPGRADE_DETECTED. After the
56892 /// FindRelatedProducts action is run, the value of the WIX_UPGRADE_DETECTED property is a
56893 /// list of product codes, separated by semicolons (;), detected on the system.
56894 /// </summary>
56895 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56896 public class MajorUpgrade : ISchemaElement, ISetAttributes
56897 {
56898
56899 private YesNoType allowDowngradesField;
56900
56901 private bool allowDowngradesFieldSet;
56902
56903 private YesNoType allowSameVersionUpgradesField;
56904
56905 private bool allowSameVersionUpgradesFieldSet;
56906
56907 private YesNoType disallowField;
56908
56909 private bool disallowFieldSet;
56910
56911 private string downgradeErrorMessageField;
56912
56913 private bool downgradeErrorMessageFieldSet;
56914
56915 private string disallowUpgradeErrorMessageField;
56916
56917 private bool disallowUpgradeErrorMessageFieldSet;
56918
56919 private YesNoType migrateFeaturesField;
56920
56921 private bool migrateFeaturesFieldSet;
56922
56923 private YesNoType ignoreLanguageField;
56924
56925 private bool ignoreLanguageFieldSet;
56926
56927 private YesNoType ignoreRemoveFailureField;
56928
56929 private bool ignoreRemoveFailureFieldSet;
56930
56931 private string removeFeaturesField;
56932
56933 private bool removeFeaturesFieldSet;
56934
56935 private ScheduleType scheduleField;
56936
56937 private bool scheduleFieldSet;
56938
56939 private ISchemaElement parentElement;
56940
56941 /// <summary>
56942 /// When set to no (the default), products with lower version numbers are blocked from
56943 /// installing when a product with a higher version is installed; the DowngradeErrorMessage
56944 /// attribute must also be specified.
56945 ///
56946 /// When set to yes, any version can be installed over any other version.
56947 /// </summary>
56948 public YesNoType AllowDowngrades
56949 {
56950 get
56951 {
56952 return this.allowDowngradesField;
56953 }
56954 set
56955 {
56956 this.allowDowngradesFieldSet = true;
56957 this.allowDowngradesField = value;
56958 }
56959 }
56960
56961 /// <summary>
56962 /// When set to no (the default), installing a product with the same version and upgrade code
56963 /// (but different product code) is allowed and treated by MSI as two products. When set to yes,
56964 /// WiX sets the msidbUpgradeAttributesVersionMaxInclusive attribute, which tells MSI to treat
56965 /// a product with the same version as a major upgrade.
56966 ///
56967 /// This is useful when two product versions differ only in the fourth version field. MSI
56968 /// specifically ignores that field when comparing product versions, so two products that
56969 /// differ only in the fourth version field are the same product and need this attribute set to
56970 /// yes to be detected.
56971 ///
56972 /// Note that because MSI ignores the fourth product version field, setting this attribute to
56973 /// yes also allows downgrades when the first three product version fields are identical.
56974 /// For example, product version 1.0.0.1 will "upgrade" 1.0.0.2998 because they're seen as the
56975 /// same version (1.0.0). That could reintroduce serious bugs so the safest choice is to change
56976 /// the first three version fields and omit this attribute to get the default of no.
56977 ///
56978 /// This attribute cannot be "yes" when AllowDowngrades is also "yes" -- AllowDowngrades
56979 /// already allows two products with the same version number to upgrade each other.
56980 /// </summary>
56981 public YesNoType AllowSameVersionUpgrades
56982 {
56983 get
56984 {
56985 return this.allowSameVersionUpgradesField;
56986 }
56987 set
56988 {
56989 this.allowSameVersionUpgradesFieldSet = true;
56990 this.allowSameVersionUpgradesField = value;
56991 }
56992 }
56993
56994 /// <summary>
56995 /// When set to yes, products with higer version numbers are blocked from
56996 /// installing when a product with a lower version is installed; the UpgradeErrorMessage
56997 /// attribute must also be specified.
56998 ///
56999 /// When set to no (the default), any version can be installed over any lower version.
57000 /// </summary>
57001 public YesNoType Disallow
57002 {
57003 get
57004 {
57005 return this.disallowField;
57006 }
57007 set
57008 {
57009 this.disallowFieldSet = true;
57010 this.disallowField = value;
57011 }
57012 }
57013
57014 /// <summary>
57015 /// The message displayed if users try to install a product with a lower version number
57016 /// when a product with a higher version is installed. Used only when AllowDowngrades
57017 /// is no (the default).
57018 /// </summary>
57019 public string DowngradeErrorMessage
57020 {
57021 get
57022 {
57023 return this.downgradeErrorMessageField;
57024 }
57025 set
57026 {
57027 this.downgradeErrorMessageFieldSet = true;
57028 this.downgradeErrorMessageField = value;
57029 }
57030 }
57031
57032 /// <summary>
57033 /// The message displayed if users try to install a product with a higer version number
57034 /// when a product with a lower version is installed. Used only when Disallow
57035 /// is yes.
57036 /// </summary>
57037 public string DisallowUpgradeErrorMessage
57038 {
57039 get
57040 {
57041 return this.disallowUpgradeErrorMessageField;
57042 }
57043 set
57044 {
57045 this.disallowUpgradeErrorMessageFieldSet = true;
57046 this.disallowUpgradeErrorMessageField = value;
57047 }
57048 }
57049
57050 /// <summary>
57051 /// When set to yes (the default), the MigrateFeatureStates standard action will set the
57052 /// feature states of the upgrade product to those of the installed product.
57053 ///
57054 /// When set to no, the installed features have no effect on the upgrade installation.
57055 /// </summary>
57056 public YesNoType MigrateFeatures
57057 {
57058 get
57059 {
57060 return this.migrateFeaturesField;
57061 }
57062 set
57063 {
57064 this.migrateFeaturesFieldSet = true;
57065 this.migrateFeaturesField = value;
57066 }
57067 }
57068
57069 /// <summary>
57070 /// When set to yes, the Upgrade table rows will match any product with the same UpgradeCode.
57071 ///
57072 /// When set to no (the default), the Upgrade table rows will match only products with the
57073 /// same UpgradeCode and ProductLanguage.
57074 /// </summary>
57075 public YesNoType IgnoreLanguage
57076 {
57077 get
57078 {
57079 return this.ignoreLanguageField;
57080 }
57081 set
57082 {
57083 this.ignoreLanguageFieldSet = true;
57084 this.ignoreLanguageField = value;
57085 }
57086 }
57087
57088 /// <summary>
57089 /// When set to yes, failures removing the installed product during the upgrade will be
57090 /// ignored.
57091 ///
57092 /// When set to no (the default), failures removing the installed product during the upgrade
57093 /// will be considered a failure and, depending on the scheduling, roll back the upgrade.
57094 /// </summary>
57095 public YesNoType IgnoreRemoveFailure
57096 {
57097 get
57098 {
57099 return this.ignoreRemoveFailureField;
57100 }
57101 set
57102 {
57103 this.ignoreRemoveFailureFieldSet = true;
57104 this.ignoreRemoveFailureField = value;
57105 }
57106 }
57107
57108 /// <summary>
57109 /// A formatted string that contains the list of features to remove from the installed
57110 /// product. The default is to remove all features. Note that if you use formatted property
57111 /// values that evaluate to an empty string, no features will be removed; only omitting
57112 /// this attribute defaults to removing all features.
57113 /// </summary>
57114 public string RemoveFeatures
57115 {
57116 get
57117 {
57118 return this.removeFeaturesField;
57119 }
57120 set
57121 {
57122 this.removeFeaturesFieldSet = true;
57123 this.removeFeaturesField = value;
57124 }
57125 }
57126
57127 /// <summary>
57128 /// Determines the scheduling of the RemoveExistingProducts standard action, which is when
57129 /// the installed product is removed. The default is "afterInstallValidate" which removes
57130 /// the installed product entirely before installing the upgrade product. It's slowest but
57131 /// gives the most flexibility in changing components and features in the upgrade product.
57132 ///
57133 /// For more information, see
57134 /// </summary>
57135 public ScheduleType Schedule
57136 {
57137 get
57138 {
57139 return this.scheduleField;
57140 }
57141 set
57142 {
57143 this.scheduleFieldSet = true;
57144 this.scheduleField = value;
57145 }
57146 }
57147
57148 public virtual ISchemaElement ParentElement
57149 {
57150 get
57151 {
57152 return this.parentElement;
57153 }
57154 set
57155 {
57156 this.parentElement = value;
57157 }
57158 }
57159
57160 /// <summary>
57161 /// Parses a ScheduleType from a string.
57162 /// </summary>
57163 public static ScheduleType ParseScheduleType(string value)
57164 {
57165 ScheduleType parsedValue;
57166 MajorUpgrade.TryParseScheduleType(value, out parsedValue);
57167 return parsedValue;
57168 }
57169
57170 /// <summary>
57171 /// Tries to parse a ScheduleType from a string.
57172 /// </summary>
57173 public static bool TryParseScheduleType(string value, out ScheduleType parsedValue)
57174 {
57175 parsedValue = ScheduleType.NotSet;
57176 if (string.IsNullOrEmpty(value))
57177 {
57178 return false;
57179 }
57180 if (("afterInstallValidate" == value))
57181 {
57182 parsedValue = ScheduleType.afterInstallValidate;
57183 }
57184 else
57185 {
57186 if (("afterInstallInitialize" == value))
57187 {
57188 parsedValue = ScheduleType.afterInstallInitialize;
57189 }
57190 else
57191 {
57192 if (("afterInstallExecute" == value))
57193 {
57194 parsedValue = ScheduleType.afterInstallExecute;
57195 }
57196 else
57197 {
57198 if (("afterInstallExecuteAgain" == value))
57199 {
57200 parsedValue = ScheduleType.afterInstallExecuteAgain;
57201 }
57202 else
57203 {
57204 if (("afterInstallFinalize" == value))
57205 {
57206 parsedValue = ScheduleType.afterInstallFinalize;
57207 }
57208 else
57209 {
57210 parsedValue = ScheduleType.IllegalValue;
57211 return false;
57212 }
57213 }
57214 }
57215 }
57216 }
57217 return true;
57218 }
57219
57220 /// <summary>
57221 /// Processes this element and all child elements into an XmlWriter.
57222 /// </summary>
57223 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
57224 public virtual void OutputXml(XmlWriter writer)
57225 {
57226 if ((null == writer))
57227 {
57228 throw new ArgumentNullException("writer");
57229 }
57230 writer.WriteStartElement("MajorUpgrade", "http://wixtoolset.org/schemas/v4/wxs");
57231 if (this.allowDowngradesFieldSet)
57232 {
57233 if ((this.allowDowngradesField == YesNoType.no))
57234 {
57235 writer.WriteAttributeString("AllowDowngrades", "no");
57236 }
57237 if ((this.allowDowngradesField == YesNoType.yes))
57238 {
57239 writer.WriteAttributeString("AllowDowngrades", "yes");
57240 }
57241 }
57242 if (this.allowSameVersionUpgradesFieldSet)
57243 {
57244 if ((this.allowSameVersionUpgradesField == YesNoType.no))
57245 {
57246 writer.WriteAttributeString("AllowSameVersionUpgrades", "no");
57247 }
57248 if ((this.allowSameVersionUpgradesField == YesNoType.yes))
57249 {
57250 writer.WriteAttributeString("AllowSameVersionUpgrades", "yes");
57251 }
57252 }
57253 if (this.disallowFieldSet)
57254 {
57255 if ((this.disallowField == YesNoType.no))
57256 {
57257 writer.WriteAttributeString("Disallow", "no");
57258 }
57259 if ((this.disallowField == YesNoType.yes))
57260 {
57261 writer.WriteAttributeString("Disallow", "yes");
57262 }
57263 }
57264 if (this.downgradeErrorMessageFieldSet)
57265 {
57266 writer.WriteAttributeString("DowngradeErrorMessage", this.downgradeErrorMessageField);
57267 }
57268 if (this.disallowUpgradeErrorMessageFieldSet)
57269 {
57270 writer.WriteAttributeString("DisallowUpgradeErrorMessage", this.disallowUpgradeErrorMessageField);
57271 }
57272 if (this.migrateFeaturesFieldSet)
57273 {
57274 if ((this.migrateFeaturesField == YesNoType.no))
57275 {
57276 writer.WriteAttributeString("MigrateFeatures", "no");
57277 }
57278 if ((this.migrateFeaturesField == YesNoType.yes))
57279 {
57280 writer.WriteAttributeString("MigrateFeatures", "yes");
57281 }
57282 }
57283 if (this.ignoreLanguageFieldSet)
57284 {
57285 if ((this.ignoreLanguageField == YesNoType.no))
57286 {
57287 writer.WriteAttributeString("IgnoreLanguage", "no");
57288 }
57289 if ((this.ignoreLanguageField == YesNoType.yes))
57290 {
57291 writer.WriteAttributeString("IgnoreLanguage", "yes");
57292 }
57293 }
57294 if (this.ignoreRemoveFailureFieldSet)
57295 {
57296 if ((this.ignoreRemoveFailureField == YesNoType.no))
57297 {
57298 writer.WriteAttributeString("IgnoreRemoveFailure", "no");
57299 }
57300 if ((this.ignoreRemoveFailureField == YesNoType.yes))
57301 {
57302 writer.WriteAttributeString("IgnoreRemoveFailure", "yes");
57303 }
57304 }
57305 if (this.removeFeaturesFieldSet)
57306 {
57307 writer.WriteAttributeString("RemoveFeatures", this.removeFeaturesField);
57308 }
57309 if (this.scheduleFieldSet)
57310 {
57311 if ((this.scheduleField == ScheduleType.afterInstallValidate))
57312 {
57313 writer.WriteAttributeString("Schedule", "afterInstallValidate");
57314 }
57315 if ((this.scheduleField == ScheduleType.afterInstallInitialize))
57316 {
57317 writer.WriteAttributeString("Schedule", "afterInstallInitialize");
57318 }
57319 if ((this.scheduleField == ScheduleType.afterInstallExecute))
57320 {
57321 writer.WriteAttributeString("Schedule", "afterInstallExecute");
57322 }
57323 if ((this.scheduleField == ScheduleType.afterInstallExecuteAgain))
57324 {
57325 writer.WriteAttributeString("Schedule", "afterInstallExecuteAgain");
57326 }
57327 if ((this.scheduleField == ScheduleType.afterInstallFinalize))
57328 {
57329 writer.WriteAttributeString("Schedule", "afterInstallFinalize");
57330 }
57331 }
57332 writer.WriteEndElement();
57333 }
57334
57335 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
57336 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
57337 void ISetAttributes.SetAttribute(string name, string value)
57338 {
57339 if (String.IsNullOrEmpty(name))
57340 {
57341 throw new ArgumentNullException("name");
57342 }
57343 if (("AllowDowngrades" == name))
57344 {
57345 this.allowDowngradesField = Enums.ParseYesNoType(value);
57346 this.allowDowngradesFieldSet = true;
57347 }
57348 if (("AllowSameVersionUpgrades" == name))
57349 {
57350 this.allowSameVersionUpgradesField = Enums.ParseYesNoType(value);
57351 this.allowSameVersionUpgradesFieldSet = true;
57352 }
57353 if (("Disallow" == name))
57354 {
57355 this.disallowField = Enums.ParseYesNoType(value);
57356 this.disallowFieldSet = true;
57357 }
57358 if (("DowngradeErrorMessage" == name))
57359 {
57360 this.downgradeErrorMessageField = value;
57361 this.downgradeErrorMessageFieldSet = true;
57362 }
57363 if (("DisallowUpgradeErrorMessage" == name))
57364 {
57365 this.disallowUpgradeErrorMessageField = value;
57366 this.disallowUpgradeErrorMessageFieldSet = true;
57367 }
57368 if (("MigrateFeatures" == name))
57369 {
57370 this.migrateFeaturesField = Enums.ParseYesNoType(value);
57371 this.migrateFeaturesFieldSet = true;
57372 }
57373 if (("IgnoreLanguage" == name))
57374 {
57375 this.ignoreLanguageField = Enums.ParseYesNoType(value);
57376 this.ignoreLanguageFieldSet = true;
57377 }
57378 if (("IgnoreRemoveFailure" == name))
57379 {
57380 this.ignoreRemoveFailureField = Enums.ParseYesNoType(value);
57381 this.ignoreRemoveFailureFieldSet = true;
57382 }
57383 if (("RemoveFeatures" == name))
57384 {
57385 this.removeFeaturesField = value;
57386 this.removeFeaturesFieldSet = true;
57387 }
57388 if (("Schedule" == name))
57389 {
57390 this.scheduleField = MajorUpgrade.ParseScheduleType(value);
57391 this.scheduleFieldSet = true;
57392 }
57393 }
57394
57395 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
57396 public enum ScheduleType
57397 {
57398
57399 IllegalValue = int.MaxValue,
57400
57401 NotSet = -1,
57402
57403 /// <summary>
57404 /// (Default) Schedules RemoveExistingProducts after the InstallValidate standard
57405 /// action. This scheduling removes the installed product entirely before installing
57406 /// the upgrade product. It's slowest but gives the most flexibility in changing
57407 /// components and features in the upgrade product. Note that if the installation
57408 /// of the upgrade product fails, the machine will have neither version installed.
57409 /// </summary>
57410 afterInstallValidate,
57411
57412 /// <summary>
57413 /// Schedules RemoveExistingProducts after the InstallInitialize standard action.
57414 /// This is similar to the afterInstallValidate scheduling, but if the installation
57415 /// of the upgrade product fails, Windows Installer also rolls back the removal of
57416 /// the installed product -- in other words, reinstalls it.
57417 /// </summary>
57418 afterInstallInitialize,
57419
57420 /// <summary>
57421 /// Schedules RemoveExistingProducts between the InstallExecute and InstallFinalize standard actions.
57422 /// This scheduling installs the upgrade product "on top of" the installed product then lets
57423 /// RemoveExistingProducts uninstall any components that don't also exist in the upgrade product.
57424 /// Note that this scheduling requires strict adherence to the component rules because it relies
57425 /// on component reference counts to be accurate during installation of the upgrade product and
57426 /// removal of the installed product. For more information, see
57427 /// </summary>
57428 afterInstallExecute,
57429
57430 /// <summary>
57431 /// Schedules RemoveExistingProducts between the InstallExecuteAgain and InstallFinalize standard actions.
57432 /// This is identical to the afterInstallExecute scheduling but after the InstallExecuteAgain standard
57433 /// action instead of InstallExecute.
57434 /// </summary>
57435 afterInstallExecuteAgain,
57436
57437 /// <summary>
57438 /// Schedules RemoveExistingProducts after the InstallFinalize standard action. This is similar to the
57439 /// afterInstallExecute and afterInstallExecuteAgain schedulings but takes place outside the
57440 /// installation transaction so if installation of the upgrade product fails, Windows Installer does
57441 /// not roll back the removal of the installed product, so the machine will have both versions
57442 /// installed.
57443 /// </summary>
57444 afterInstallFinalize,
57445 }
57446 }
57447
57448 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
57449 public class ProductSearch : ISchemaElement, ISetAttributes
57450 {
57451
57452 private string minimumField;
57453
57454 private bool minimumFieldSet;
57455
57456 private string maximumField;
57457
57458 private bool maximumFieldSet;
57459
57460 private string languageField;
57461
57462 private bool languageFieldSet;
57463
57464 private YesNoType includeMinimumField;
57465
57466 private bool includeMinimumFieldSet;
57467
57468 private YesNoType includeMaximumField;
57469
57470 private bool includeMaximumFieldSet;
57471
57472 private YesNoType excludeLanguagesField;
57473
57474 private bool excludeLanguagesFieldSet;
57475
57476 private string upgradeCodeField;
57477
57478 private bool upgradeCodeFieldSet;
57479
57480 private string contentField;
57481
57482 private bool contentFieldSet;
57483
57484 private ISchemaElement parentElement;
57485
57486 /// <summary>
57487 /// Specifies the lower bound on the range of product versions to be detected by FindRelatedProducts.
57488 /// </summary>
57489 public string Minimum
57490 {
57491 get
57492 {
57493 return this.minimumField;
57494 }
57495 set
57496 {
57497 this.minimumFieldSet = true;
57498 this.minimumField = value;
57499 }
57500 }
57501
57502 /// <summary>
57503 /// Specifies the upper boundary of the range of product versions detected by FindRelatedProducts.
57504 /// </summary>
57505 public string Maximum
57506 {
57507 get
57508 {
57509 return this.maximumField;
57510 }
57511 set
57512 {
57513 this.maximumFieldSet = true;
57514 this.maximumField = value;
57515 }
57516 }
57517
57518 /// <summary>
57519 /// Specifies the set of languages detected by FindRelatedProducts. Enter a list of numeric language identifiers (LANGID) separated by commas (,). Leave this value null to specify all languages. Set ExcludeLanguages to "yes" in order detect all languages, excluding the languages listed in this value.
57520 /// </summary>
57521 public string Language
57522 {
57523 get
57524 {
57525 return this.languageField;
57526 }
57527 set
57528 {
57529 this.languageFieldSet = true;
57530 this.languageField = value;
57531 }
57532 }
57533
57534 /// <summary>
57535 /// Set to "no" to make the range of versions detected exclude the value specified in Minimum. This attribute is "yes" by default.
57536 /// </summary>
57537 public YesNoType IncludeMinimum
57538 {
57539 get
57540 {
57541 return this.includeMinimumField;
57542 }
57543 set
57544 {
57545 this.includeMinimumFieldSet = true;
57546 this.includeMinimumField = value;
57547 }
57548 }
57549
57550 /// <summary>
57551 /// Set to "yes" to make the range of versions detected include the value specified in Maximum.
57552 /// </summary>
57553 public YesNoType IncludeMaximum
57554 {
57555 get
57556 {
57557 return this.includeMaximumField;
57558 }
57559 set
57560 {
57561 this.includeMaximumFieldSet = true;
57562 this.includeMaximumField = value;
57563 }
57564 }
57565
57566 /// <summary>
57567 /// Set to "yes" to detect all languages, excluding the languages listed in the Language attribute.
57568 /// </summary>
57569 public YesNoType ExcludeLanguages
57570 {
57571 get
57572 {
57573 return this.excludeLanguagesField;
57574 }
57575 set
57576 {
57577 this.excludeLanguagesFieldSet = true;
57578 this.excludeLanguagesField = value;
57579 }
57580 }
57581
57582 /// <summary>
57583 /// This value specifies the upgrade code for the products that are to be detected by the FindRelatedProducts action.
57584 /// </summary>
57585 public string UpgradeCode
57586 {
57587 get
57588 {
57589 return this.upgradeCodeField;
57590 }
57591 set
57592 {
57593 this.upgradeCodeFieldSet = true;
57594 this.upgradeCodeField = value;
57595 }
57596 }
57597
57598 public string Content
57599 {
57600 get
57601 {
57602 return this.contentField;
57603 }
57604 set
57605 {
57606 this.contentFieldSet = true;
57607 this.contentField = value;
57608 }
57609 }
57610
57611 public virtual ISchemaElement ParentElement
57612 {
57613 get
57614 {
57615 return this.parentElement;
57616 }
57617 set
57618 {
57619 this.parentElement = value;
57620 }
57621 }
57622
57623 /// <summary>
57624 /// Processes this element and all child elements into an XmlWriter.
57625 /// </summary>
57626 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
57627 public virtual void OutputXml(XmlWriter writer)
57628 {
57629 if ((null == writer))
57630 {
57631 throw new ArgumentNullException("writer");
57632 }
57633 writer.WriteStartElement("ProductSearch", "http://wixtoolset.org/schemas/v4/wxs");
57634 if (this.minimumFieldSet)
57635 {
57636 writer.WriteAttributeString("Minimum", this.minimumField);
57637 }
57638 if (this.maximumFieldSet)
57639 {
57640 writer.WriteAttributeString("Maximum", this.maximumField);
57641 }
57642 if (this.languageFieldSet)
57643 {
57644 writer.WriteAttributeString("Language", this.languageField);
57645 }
57646 if (this.includeMinimumFieldSet)
57647 {
57648 if ((this.includeMinimumField == YesNoType.no))
57649 {
57650 writer.WriteAttributeString("IncludeMinimum", "no");
57651 }
57652 if ((this.includeMinimumField == YesNoType.yes))
57653 {
57654 writer.WriteAttributeString("IncludeMinimum", "yes");
57655 }
57656 }
57657 if (this.includeMaximumFieldSet)
57658 {
57659 if ((this.includeMaximumField == YesNoType.no))
57660 {
57661 writer.WriteAttributeString("IncludeMaximum", "no");
57662 }
57663 if ((this.includeMaximumField == YesNoType.yes))
57664 {
57665 writer.WriteAttributeString("IncludeMaximum", "yes");
57666 }
57667 }
57668 if (this.excludeLanguagesFieldSet)
57669 {
57670 if ((this.excludeLanguagesField == YesNoType.no))
57671 {
57672 writer.WriteAttributeString("ExcludeLanguages", "no");
57673 }
57674 if ((this.excludeLanguagesField == YesNoType.yes))
57675 {
57676 writer.WriteAttributeString("ExcludeLanguages", "yes");
57677 }
57678 }
57679 if (this.upgradeCodeFieldSet)
57680 {
57681 writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField);
57682 }
57683 if (this.contentFieldSet)
57684 {
57685 writer.WriteString(this.contentField);
57686 }
57687 writer.WriteEndElement();
57688 }
57689
57690 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
57691 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
57692 void ISetAttributes.SetAttribute(string name, string value)
57693 {
57694 if (String.IsNullOrEmpty(name))
57695 {
57696 throw new ArgumentNullException("name");
57697 }
57698 if (("Minimum" == name))
57699 {
57700 this.minimumField = value;
57701 this.minimumFieldSet = true;
57702 }
57703 if (("Maximum" == name))
57704 {
57705 this.maximumField = value;
57706 this.maximumFieldSet = true;
57707 }
57708 if (("Language" == name))
57709 {
57710 this.languageField = value;
57711 this.languageFieldSet = true;
57712 }
57713 if (("IncludeMinimum" == name))
57714 {
57715 this.includeMinimumField = Enums.ParseYesNoType(value);
57716 this.includeMinimumFieldSet = true;
57717 }
57718 if (("IncludeMaximum" == name))
57719 {
57720 this.includeMaximumField = Enums.ParseYesNoType(value);
57721 this.includeMaximumFieldSet = true;
57722 }
57723 if (("ExcludeLanguages" == name))
57724 {
57725 this.excludeLanguagesField = Enums.ParseYesNoType(value);
57726 this.excludeLanguagesFieldSet = true;
57727 }
57728 if (("UpgradeCode" == name))
57729 {
57730 this.upgradeCodeField = value;
57731 this.upgradeCodeFieldSet = true;
57732 }
57733 if (("Content" == name))
57734 {
57735 this.contentField = value;
57736 this.contentFieldSet = true;
57737 }
57738 }
57739 }
57740}
diff --git a/src/wix/heat/TypeLibraryHarvester.cs b/src/wix/heat/TypeLibraryHarvester.cs
new file mode 100644
index 00000000..4a271a35
--- /dev/null
+++ b/src/wix/heat/TypeLibraryHarvester.cs
@@ -0,0 +1,93 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Globalization;
7 using System.Runtime.InteropServices;
8 using Wix = WixToolset.Harvesters.Serialize;
9
10 /// <summary>
11 /// Harvest WiX authoring from a type library file.
12 /// </summary>
13 internal class TypeLibraryHarvester
14 {
15 /// <summary>
16 /// Harvest the registry values written by RegisterTypeLib.
17 /// </summary>
18 /// <param name="path">The file to harvest registry values from.</param>
19 /// <returns>The harvested registry values.</returns>
20 public Wix.RegistryValue[] HarvestRegistryValues(string path)
21 {
22 using (RegistryHarvester registryHarvester = new RegistryHarvester(true))
23 {
24 NativeMethods.RegisterTypeLibrary(path);
25
26 return registryHarvester.HarvestRegistry();
27 }
28 }
29
30 /// <summary>
31 /// Parses a hexadecimal version string into a Version object.
32 /// </summary>
33 /// <param name="versionString">Hexadecimal version string, for example "1.A.3C.F241"</param>
34 /// <returns>Version object, or null if versionString is not a valid hex version.</returns>
35 public static Version ParseHexVersion(string versionString)
36 {
37 if (String.IsNullOrEmpty(versionString))
38 {
39 return null;
40 }
41
42 int[] versionNumbers = new int[4];
43 string[] versionNumberStrings = versionString.Split('.');
44
45 for (int i = 0; i < versionNumbers.Length && i < versionNumberStrings.Length; i++)
46 {
47 if (!Int32.TryParse(versionNumberStrings[i], NumberStyles.HexNumber, CultureInfo.InvariantCulture, out versionNumbers[i]))
48 {
49 return null;
50 }
51 }
52
53 return new Version(versionNumbers[0], versionNumbers[1], versionNumbers[2], versionNumbers[3]);
54 }
55
56 /// <summary>
57 /// Native methods for registering type libraries.
58 /// </summary>
59 private sealed class NativeMethods
60 {
61 /// <summary>
62 /// Registers a type library.
63 /// </summary>
64 /// <param name="typeLibraryFile">The type library file to register.</param>
65 internal static void RegisterTypeLibrary(string typeLibraryFile)
66 {
67 IntPtr ptlib;
68
69 LoadTypeLib(typeLibraryFile, out ptlib);
70
71 RegisterTypeLib(ptlib, typeLibraryFile, null);
72 }
73
74 /// <summary>
75 /// Loads and registers a type library.
76 /// </summary>
77 /// <param name="szFile">Contains the name of the file from which LoadTypeLib should attempt to load a type library.</param>
78 /// <param name="pptlib">On return, contains a pointer to a pointer to the loaded type library.</param>
79 /// <remarks>LoadTypeLib will not register the type library if the path of the type library is specified.</remarks>
80 [DllImport("oleaut32.dll", PreserveSig = false)]
81 private static extern void LoadTypeLib([MarshalAs(UnmanagedType.BStr)] string szFile, out IntPtr pptlib);
82
83 /// <summary>
84 /// Adds information about a type library to the system registry.
85 /// </summary>
86 /// <param name="ptlib">Pointer to the type library being registered.</param>
87 /// <param name="szFullPath">Fully qualified path specification for the type library being registered.</param>
88 /// <param name="szHelpDir">Directory in which the Help file for the library being registered can be found. Can be Null.</param>
89 [DllImport("oleaut32.dll", PreserveSig = false)]
90 private static extern void RegisterTypeLib(IntPtr ptlib, [MarshalAs(UnmanagedType.BStr)] string szFullPath, [MarshalAs(UnmanagedType.BStr)] string szHelpDir);
91 }
92 }
93}
diff --git a/src/wix/heat/UtilFinalizeHarvesterMutator.cs b/src/wix/heat/UtilFinalizeHarvesterMutator.cs
new file mode 100644
index 00000000..3e9f1ce7
--- /dev/null
+++ b/src/wix/heat/UtilFinalizeHarvesterMutator.cs
@@ -0,0 +1,1185 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections;
7 using System.Collections.Generic;
8 using System.Collections.Specialized;
9 using System.Globalization;
10 using System.IO;
11 using System.Runtime.InteropServices;
12 using System.Text;
13 using WixToolset.Harvesters.Data;
14 using WixToolset.Harvesters.Extensibility;
15 using Wix = WixToolset.Harvesters.Serialize;
16
17 /// <summary>
18 /// The finalize harvester mutator for the WiX Toolset Utility Extension.
19 /// </summary>
20 internal class UtilFinalizeHarvesterMutator : BaseMutatorExtension
21 {
22 private ArrayList components;
23 private ArrayList directories;
24 private SortedList directoryPaths;
25 private Hashtable filePaths;
26 private ArrayList files;
27 private ArrayList registryValues;
28 private bool suppressCOMElements;
29 private bool suppressVB6COMElements;
30 private string preprocessorVariable;
31
32 /// <summary>
33 /// Instantiate a new UtilFinalizeHarvesterMutator.
34 /// </summary>
35 public UtilFinalizeHarvesterMutator()
36 {
37 this.components = new ArrayList();
38 this.directories = new ArrayList();
39 this.directoryPaths = new SortedList();
40 this.filePaths = new Hashtable();
41 this.files = new ArrayList();
42 this.registryValues = new ArrayList();
43 }
44
45 /// <summary>
46 /// Gets or sets the preprocessor variable for substitution.
47 /// </summary>
48 /// <value>The preprocessor variable for substitution.</value>
49 public string PreprocessorVariable
50 {
51 get { return this.preprocessorVariable; }
52 set { this.preprocessorVariable = value; }
53 }
54
55 /// <summary>
56 /// Gets the sequence of the extension.
57 /// </summary>
58 /// <value>The sequence of the extension.</value>
59 public override int Sequence
60 {
61 get { return 2000; }
62 }
63
64 /// <summary>
65 /// Gets or sets the option to suppress COM elements.
66 /// </summary>
67 /// <value>The option to suppress COM elements.</value>
68 public bool SuppressCOMElements
69 {
70 get { return this.suppressCOMElements; }
71 set { this.suppressCOMElements = value; }
72 }
73
74 /// <summary>
75 /// Gets or sets the option to suppress VB6 COM elements.
76 /// </summary>
77 /// <value>The option to suppress VB6 COM elements.</value>
78 public bool SuppressVB6COMElements
79 {
80 get { return this.suppressVB6COMElements; }
81 set { this.suppressVB6COMElements = value; }
82 }
83
84 /// <summary>
85 /// Mutate a WiX document.
86 /// </summary>
87 /// <param name="wix">The Wix document element.</param>
88 public override void Mutate(Wix.Wix wix)
89 {
90 this.components.Clear();
91 this.directories.Clear();
92 this.directoryPaths.Clear();
93 this.filePaths.Clear();
94 this.files.Clear();
95 this.registryValues.Clear();
96
97 // index elements in this wix document
98 this.IndexElement(wix);
99
100 this.MutateDirectories();
101 this.MutateFiles();
102 this.MutateRegistryValues();
103
104 // must occur after all the registry values have been formatted
105 this.MutateComponents();
106 }
107
108 /// <summary>
109 /// Index an element.
110 /// </summary>
111 /// <param name="element">The element to index.</param>
112 private void IndexElement(Wix.ISchemaElement element)
113 {
114 if (element is Wix.Component)
115 {
116 // Component elements only need to be indexed if COM registry values will be strongly typed
117 if (!this.suppressCOMElements)
118 {
119 this.components.Add(element);
120 }
121 }
122 else if (element is Wix.Directory)
123 {
124 this.directories.Add(element);
125 }
126 else if (element is Wix.File)
127 {
128 this.files.Add(element);
129 }
130 else if (element is Wix.RegistryValue)
131 {
132 this.registryValues.Add(element);
133 }
134
135 // index the child elements
136 if (element is Wix.IParentElement)
137 {
138 foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children)
139 {
140 this.IndexElement(childElement);
141 }
142 }
143 }
144
145 /// <summary>
146 /// Mutate the components.
147 /// </summary>
148 private void MutateComponents()
149 {
150 if (this.suppressVB6COMElements)
151 {
152 // Search for VB6 specific COM registrations
153 foreach (Wix.Component component in this.components)
154 {
155 ArrayList vb6RegistryValues = new ArrayList();
156
157 foreach (Wix.RegistryValue registryValue in component[typeof(Wix.RegistryValue)])
158 {
159 if (Wix.RegistryValue.ActionType.write == registryValue.Action && Wix.RegistryRootType.HKCR == registryValue.Root)
160 {
161 string[] parts = registryValue.Key.Split('\\');
162
163 if (String.Equals(parts[0], "CLSID", StringComparison.OrdinalIgnoreCase))
164 {
165 // Search for the VB6 CLSID {D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731}
166 if (2 <= parts.Length)
167 {
168 if (String.Equals(parts[1], "{D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731}", StringComparison.OrdinalIgnoreCase))
169 {
170 if (!vb6RegistryValues.Contains(registryValue))
171 {
172 vb6RegistryValues.Add(registryValue);
173 }
174 }
175 }
176 }
177 else if (String.Equals(parts[0], "TypeLib", StringComparison.OrdinalIgnoreCase))
178 {
179 // Search for the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046}
180 if (2 <= parts.Length)
181 {
182 if (String.Equals(parts[1], "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) ||
183 String.Equals(parts[1], "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase))
184 {
185 if (!vb6RegistryValues.Contains(registryValue))
186 {
187 vb6RegistryValues.Add(registryValue);
188 }
189 }
190 }
191 }
192 else if (String.Equals(parts[0], "Interface", StringComparison.OrdinalIgnoreCase))
193 {
194 // Search for any Interfaces that reference the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046}
195 if (3 <= parts.Length)
196 {
197 if (String.Equals(parts[2], "TypeLib", StringComparison.OrdinalIgnoreCase))
198 {
199 if (String.Equals(registryValue.Value, "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) ||
200 String.Equals(registryValue.Value, "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase))
201 {
202 // Having found a match we have to loop through again finding the matching Interface entries
203 foreach (Wix.RegistryValue regValue in component[typeof(Wix.RegistryValue)])
204 {
205 if (Wix.RegistryValue.ActionType.write == regValue.Action && Wix.RegistryRootType.HKCR == regValue.Root)
206 {
207 string[] rvparts = regValue.Key.Split('\\');
208 if (String.Equals(rvparts[0], "Interface", StringComparison.OrdinalIgnoreCase))
209 {
210 if (2 <= rvparts.Length)
211 {
212 if (String.Equals(rvparts[1], parts[1], StringComparison.OrdinalIgnoreCase))
213 {
214 if (!vb6RegistryValues.Contains(regValue))
215 {
216 vb6RegistryValues.Add(regValue);
217 }
218 }
219 }
220 }
221 }
222 }
223 }
224 }
225 }
226 }
227 }
228 }
229
230 // Remove all the VB6 specific COM registry values
231 foreach (Object entry in vb6RegistryValues)
232 {
233 component.RemoveChild((Wix.RegistryValue)entry);
234 }
235 }
236 }
237
238 foreach (Wix.Component component in this.components)
239 {
240 SortedList indexedElements = CollectionsUtil.CreateCaseInsensitiveSortedList();
241 SortedList indexedRegistryValues = CollectionsUtil.CreateCaseInsensitiveSortedList();
242 List<Wix.RegistryValue> duplicateRegistryValues = new List<Wix.RegistryValue>();
243
244 // index all the File elements
245 foreach (Wix.File file in component[typeof(Wix.File)])
246 {
247 indexedElements.Add(String.Concat("file/", file.Id), file);
248 }
249
250 // group all the registry values by the COM element they would correspond to and
251 // create a COM element for each group
252 foreach (Wix.RegistryValue registryValue in component[typeof(Wix.RegistryValue)])
253 {
254 if (!String.IsNullOrEmpty(registryValue.Key) && Wix.RegistryValue.ActionType.write == registryValue.Action && Wix.RegistryRootType.HKCR == registryValue.Root && Wix.RegistryValue.TypeType.@string == registryValue.Type)
255 {
256 string index = null;
257 string[] parts = registryValue.Key.Split('\\');
258
259 // create a COM element for COM registration and index it
260 if (1 <= parts.Length)
261 {
262 if (String.Equals(parts[0], "AppID", StringComparison.OrdinalIgnoreCase))
263 {
264 // only work with GUID AppIds here
265 if (2 <= parts.Length && parts[1].StartsWith("{", StringComparison.Ordinal) && parts[1].EndsWith("}", StringComparison.Ordinal))
266 {
267 index = String.Concat(parts[0], '/', parts[1]);
268
269 if (!indexedElements.Contains(index))
270 {
271 Wix.AppId appId = new Wix.AppId();
272 appId.Id = parts[1].ToUpper(CultureInfo.InvariantCulture);
273 indexedElements.Add(index, appId);
274 }
275 }
276 }
277 else if (String.Equals(parts[0], "CLSID", StringComparison.OrdinalIgnoreCase))
278 {
279 if (2 <= parts.Length)
280 {
281 index = String.Concat(parts[0], '/', parts[1]);
282
283 if (!indexedElements.Contains(index))
284 {
285 Wix.Class wixClass = new Wix.Class();
286 wixClass.Id = parts[1].ToUpper(CultureInfo.InvariantCulture);
287 indexedElements.Add(index, wixClass);
288 }
289 }
290 }
291 else if (String.Equals(parts[0], "Component Categories", StringComparison.OrdinalIgnoreCase))
292 {
293 // If this is the .NET Component Category it should not end up in the authoring. Therefore, add
294 // the registry key to the duplicate list to ensure it gets removed later.
295 if (String.Equals(parts[1], "{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}", StringComparison.OrdinalIgnoreCase))
296 {
297 duplicateRegistryValues.Add(registryValue);
298 }
299 else
300 {
301 // TODO: add support for Component Categories to the compiler.
302 }
303 }
304 else if (String.Equals(parts[0], "Interface", StringComparison.OrdinalIgnoreCase))
305 {
306 if (2 <= parts.Length)
307 {
308 index = String.Concat(parts[0], '/', parts[1]);
309
310 if (!indexedElements.Contains(index))
311 {
312 Wix.Interface wixInterface = new Wix.Interface();
313 wixInterface.Id = parts[1].ToUpper(CultureInfo.InvariantCulture);
314 indexedElements.Add(index, wixInterface);
315 }
316 }
317 }
318 else if (String.Equals(parts[0], "TypeLib", StringComparison.Ordinal))
319 {
320 if (3 <= parts.Length)
321 {
322 // use a special index to ensure progIds are processed before classes
323 index = String.Concat(".typelib/", parts[1], '/', parts[2]);
324
325 if (!indexedElements.Contains(index))
326 {
327 Version version = TypeLibraryHarvester.ParseHexVersion(parts[2]);
328 if (version != null)
329 {
330 Wix.TypeLib typeLib = new Wix.TypeLib();
331 typeLib.Id = parts[1].ToUpper(CultureInfo.InvariantCulture);
332 typeLib.MajorVersion = version.Major;
333 typeLib.MinorVersion = version.Minor;
334 indexedElements.Add(index, typeLib);
335 }
336 else // not a valid type library registry value
337 {
338 index = null;
339 }
340 }
341 }
342 }
343 else if (parts[0].StartsWith(".", StringComparison.Ordinal))
344 {
345 // extension
346 }
347 else // ProgId (hopefully)
348 {
349 // use a special index to ensure progIds are processed before classes
350 index = String.Concat(".progid/", parts[0]);
351
352 if (!indexedElements.Contains(index))
353 {
354 Wix.ProgId progId = new Wix.ProgId();
355 progId.Id = parts[0];
356 indexedElements.Add(index, progId);
357 }
358 }
359 }
360
361 // index the RegistryValue element according to the COM element it corresponds to
362 if (null != index)
363 {
364 SortedList registryValues = (SortedList)indexedRegistryValues[index];
365
366 if (null == registryValues)
367 {
368 registryValues = CollectionsUtil.CreateCaseInsensitiveSortedList();
369 indexedRegistryValues.Add(index, registryValues);
370 }
371
372 try
373 {
374 registryValues.Add(String.Concat(registryValue.Key, '/', registryValue.Name), registryValue);
375 }
376 catch (ArgumentException)
377 {
378 duplicateRegistryValues.Add(registryValue);
379
380 if (String.IsNullOrEmpty(registryValue.Value))
381 {
382 this.Core.Messaging.Write(HarvesterWarnings.DuplicateDllRegistryEntry(String.Concat(registryValue.Key, '/', registryValue.Name), component.Id));
383 }
384 else
385 {
386 this.Core.Messaging.Write(HarvesterWarnings.DuplicateDllRegistryEntry(String.Concat(registryValue.Key, '/', registryValue.Name), registryValue.Value, component.Id));
387 }
388 }
389 }
390 }
391 }
392
393 foreach (Wix.RegistryValue removeRegistryEntry in duplicateRegistryValues)
394 {
395 component.RemoveChild(removeRegistryEntry);
396 }
397
398 // set various values on the COM elements from their corresponding registry values
399 Hashtable indexedProcessedRegistryValues = new Hashtable();
400 foreach (DictionaryEntry entry in indexedRegistryValues)
401 {
402 Wix.ISchemaElement element = (Wix.ISchemaElement)indexedElements[entry.Key];
403 string parentIndex = null;
404 SortedList registryValues = (SortedList)entry.Value;
405
406 // element-specific variables (for really tough situations)
407 string classAppId = null;
408 bool threadingModelSet = false;
409
410 foreach (Wix.RegistryValue registryValue in registryValues.Values)
411 {
412 string[] parts = registryValue.Key.ToLower(CultureInfo.InvariantCulture).Split('\\');
413 bool processed = false;
414
415 if (element is Wix.AppId)
416 {
417 Wix.AppId appId = (Wix.AppId)element;
418
419 if (2 == parts.Length)
420 {
421 if (null == registryValue.Name)
422 {
423 appId.Description = registryValue.Value;
424 processed = true;
425 }
426 }
427 }
428 else if (element is Wix.Class)
429 {
430 Wix.Class wixClass = (Wix.Class)element;
431
432 if (2 == parts.Length)
433 {
434 if (null == registryValue.Name)
435 {
436 wixClass.Description = registryValue.Value;
437 processed = true;
438 }
439 else if (String.Equals(registryValue.Name, "AppID", StringComparison.OrdinalIgnoreCase))
440 {
441 classAppId = registryValue.Value;
442 processed = true;
443 }
444 }
445 else if (3 == parts.Length)
446 {
447 Wix.Class.ContextType contextType = Wix.Class.ContextType.None;
448
449 switch (parts[2])
450 {
451 case "control":
452 wixClass.Control = Wix.YesNoType.yes;
453 processed = true;
454 break;
455 case "inprochandler":
456 if (null == registryValue.Name)
457 {
458 if (null == wixClass.Handler)
459 {
460 wixClass.Handler = "1";
461 processed = true;
462 }
463 else if ("2" == wixClass.Handler)
464 {
465 wixClass.Handler = "3";
466 processed = true;
467 }
468 }
469 break;
470 case "inprochandler32":
471 if (null == registryValue.Name)
472 {
473 if (null == wixClass.Handler)
474 {
475 wixClass.Handler = "2";
476 processed = true;
477 }
478 else if ("1" == wixClass.Handler)
479 {
480 wixClass.Handler = "3";
481 processed = true;
482 }
483 }
484 break;
485 case "inprocserver":
486 contextType = Wix.Class.ContextType.InprocServer;
487 break;
488 case "inprocserver32":
489 contextType = Wix.Class.ContextType.InprocServer32;
490 break;
491 case "insertable":
492 wixClass.Insertable = Wix.YesNoType.yes;
493 processed = true;
494 break;
495 case "localserver":
496 contextType = Wix.Class.ContextType.LocalServer;
497 break;
498 case "localserver32":
499 contextType = Wix.Class.ContextType.LocalServer32;
500 break;
501 case "progid":
502 if (null == registryValue.Name)
503 {
504 Wix.ProgId progId = (Wix.ProgId)indexedElements[String.Concat(".progid/", registryValue.Value)];
505
506 // verify that the versioned ProgId appears under this Class element
507 // if not, toss the entire element
508 if (null == progId || wixClass != progId.ParentElement)
509 {
510 element = null;
511 }
512 else
513 {
514 processed = true;
515 }
516 }
517 break;
518 case "programmable":
519 wixClass.Programmable = Wix.YesNoType.yes;
520 processed = true;
521 break;
522 case "typelib":
523 if (null == registryValue.Name)
524 {
525 foreach (DictionaryEntry indexedEntry in indexedElements)
526 {
527 string key = (string)indexedEntry.Key;
528 Wix.ISchemaElement possibleTypeLib = (Wix.ISchemaElement)indexedEntry.Value;
529
530 if (key.StartsWith(".typelib/", StringComparison.Ordinal) &&
531 0 == String.Compare(key, 9, registryValue.Value, 0, registryValue.Value.Length, StringComparison.OrdinalIgnoreCase))
532 {
533 // ensure the TypeLib is nested under the same thing we want the Class under
534 if (null == parentIndex || indexedElements[parentIndex] == possibleTypeLib.ParentElement)
535 {
536 parentIndex = key;
537 processed = true;
538 }
539 }
540 }
541 }
542 break;
543 case "version":
544 if (null == registryValue.Name)
545 {
546 wixClass.Version = registryValue.Value;
547 processed = true;
548 }
549 break;
550 case "versionindependentprogid":
551 if (null == registryValue.Name)
552 {
553 Wix.ProgId progId = (Wix.ProgId)indexedElements[String.Concat(".progid/", registryValue.Value)];
554
555 // verify that the version independent ProgId appears somewhere
556 // under this Class element - if not, toss the entire element
557 if (null == progId || wixClass != progId.ParentElement)
558 {
559 // check the parent of the parent
560 if (null == progId || null == progId.ParentElement || wixClass != progId.ParentElement.ParentElement)
561 {
562 element = null;
563 }
564 }
565
566 processed = true;
567 }
568 break;
569 }
570
571 if (Wix.Class.ContextType.None != contextType)
572 {
573 wixClass.Context |= contextType;
574
575 if (null == registryValue.Name)
576 {
577 if ((registryValue.Value.StartsWith("[!", StringComparison.Ordinal) || registryValue.Value.StartsWith("[#", StringComparison.Ordinal))
578 && registryValue.Value.EndsWith("]", StringComparison.Ordinal))
579 {
580 parentIndex = String.Concat("file/", registryValue.Value.Substring(2, registryValue.Value.Length - 3));
581 processed = true;
582 }
583 else if (String.Equals(Path.GetFileName(registryValue.Value), "mscoree.dll", StringComparison.OrdinalIgnoreCase))
584 {
585 wixClass.ForeignServer = "mscoree.dll";
586 processed = true;
587 }
588 else if (String.Equals(Path.GetFileName(registryValue.Value), "msvbvm60.dll", StringComparison.OrdinalIgnoreCase))
589 {
590 wixClass.ForeignServer = "msvbvm60.dll";
591 processed = true;
592 }
593 else
594 {
595 // Some servers are specifying relative paths (which the above code doesn't find)
596 // If there's any ambiguity leave it alone and let the developer figure it out when it breaks in the compiler
597
598 bool possibleDuplicate = false;
599 string possibleParentIndex = null;
600
601 foreach (Wix.File file in this.files)
602 {
603 if (String.Equals(registryValue.Value, Path.GetFileName(file.Source), StringComparison.OrdinalIgnoreCase))
604 {
605 if (null == possibleParentIndex)
606 {
607 possibleParentIndex = String.Concat("file/", file.Id);
608 }
609 else
610 {
611 possibleDuplicate = true;
612 break;
613 }
614 }
615 }
616
617 if (!possibleDuplicate)
618 {
619 if (null == possibleParentIndex)
620 {
621 wixClass.ForeignServer = registryValue.Value;
622 processed = true;
623 }
624 else
625 {
626 parentIndex = possibleParentIndex;
627 wixClass.RelativePath = Wix.YesNoType.yes;
628 processed = true;
629 }
630 }
631 }
632 }
633 else if (String.Equals(registryValue.Name, "ThreadingModel", StringComparison.OrdinalIgnoreCase))
634 {
635 Wix.Class.ThreadingModelType threadingModel;
636
637 if (String.Equals(registryValue.Value, "apartment", StringComparison.OrdinalIgnoreCase))
638 {
639 threadingModel = Wix.Class.ThreadingModelType.apartment;
640 processed = true;
641 }
642 else if (String.Equals(registryValue.Value, "both", StringComparison.OrdinalIgnoreCase))
643 {
644 threadingModel = Wix.Class.ThreadingModelType.both;
645 processed = true;
646 }
647 else if (String.Equals(registryValue.Value, "free", StringComparison.OrdinalIgnoreCase))
648 {
649 threadingModel = Wix.Class.ThreadingModelType.free;
650 processed = true;
651 }
652 else if (String.Equals(registryValue.Value, "neutral", StringComparison.OrdinalIgnoreCase))
653 {
654 threadingModel = Wix.Class.ThreadingModelType.neutral;
655 processed = true;
656 }
657 else if (String.Equals(registryValue.Value, "rental", StringComparison.OrdinalIgnoreCase))
658 {
659 threadingModel = Wix.Class.ThreadingModelType.rental;
660 processed = true;
661 }
662 else if (String.Equals(registryValue.Value, "single", StringComparison.OrdinalIgnoreCase))
663 {
664 threadingModel = Wix.Class.ThreadingModelType.single;
665 processed = true;
666 }
667 else
668 {
669 continue;
670 }
671
672 if (!threadingModelSet || wixClass.ThreadingModel == threadingModel)
673 {
674 wixClass.ThreadingModel = threadingModel;
675 threadingModelSet = true;
676 }
677 else
678 {
679 element = null;
680 break;
681 }
682 }
683 }
684 }
685 else if (4 == parts.Length)
686 {
687 if (String.Equals(parts[2], "implemented categories", StringComparison.Ordinal))
688 {
689 switch (parts[3])
690 {
691 case "{7dd95801-9882-11cf-9fa9-00aa006c42c4}":
692 wixClass.SafeForScripting = Wix.YesNoType.yes;
693 processed = true;
694 break;
695 case "{7dd95802-9882-11cf-9fa9-00aa006c42c4}":
696 wixClass.SafeForInitializing = Wix.YesNoType.yes;
697 processed = true;
698 break;
699 }
700 }
701 }
702 }
703 else if (element is Wix.Interface)
704 {
705 Wix.Interface wixInterface = (Wix.Interface)element;
706
707 if (2 == parts.Length && null == registryValue.Name)
708 {
709 wixInterface.Name = registryValue.Value;
710 processed = true;
711 }
712 else if (3 == parts.Length)
713 {
714 switch (parts[2])
715 {
716 case "proxystubclsid":
717 if (null == registryValue.Name)
718 {
719 wixInterface.ProxyStubClassId = registryValue.Value.ToUpper(CultureInfo.InvariantCulture);
720 processed = true;
721 }
722 break;
723 case "proxystubclsid32":
724 if (null == registryValue.Name)
725 {
726 wixInterface.ProxyStubClassId32 = registryValue.Value.ToUpper(CultureInfo.InvariantCulture);
727 processed = true;
728 }
729 break;
730 case "nummethods":
731 if (null == registryValue.Name)
732 {
733 wixInterface.NumMethods = Convert.ToInt32(registryValue.Value, CultureInfo.InvariantCulture);
734 processed = true;
735 }
736 break;
737 case "typelib":
738 if (String.Equals("Version", registryValue.Name, StringComparison.OrdinalIgnoreCase))
739 {
740 parentIndex = String.Concat(parentIndex, registryValue.Value);
741 processed = true;
742 }
743 else if (null == registryValue.Name) // TypeLib guid
744 {
745 parentIndex = String.Concat(".typelib/", registryValue.Value, '/', parentIndex);
746 processed = true;
747 }
748 break;
749 }
750 }
751 }
752 else if (element is Wix.ProgId)
753 {
754 Wix.ProgId progId = (Wix.ProgId)element;
755
756 if (null == registryValue.Name)
757 {
758 if (1 == parts.Length)
759 {
760 progId.Description = registryValue.Value;
761 processed = true;
762 }
763 else if (2 == parts.Length)
764 {
765 if (String.Equals(parts[1], "CLSID", StringComparison.OrdinalIgnoreCase))
766 {
767 parentIndex = String.Concat("CLSID/", registryValue.Value);
768 processed = true;
769 }
770 else if (String.Equals(parts[1], "CurVer", StringComparison.OrdinalIgnoreCase))
771 {
772 // If a progId points to its own ProgId with CurVer, it isn't meaningful, so ignore it
773 if (!String.Equals(progId.Id, registryValue.Value, StringComparison.OrdinalIgnoreCase))
774 {
775 // this registry value should usually be processed second so the
776 // version independent ProgId should be under the versioned one
777 parentIndex = String.Concat(".progid/", registryValue.Value);
778 processed = true;
779 }
780 }
781 }
782 }
783 }
784 else if (element is Wix.TypeLib)
785 {
786 Wix.TypeLib typeLib = (Wix.TypeLib)element;
787
788 if (null == registryValue.Name)
789 {
790 if (3 == parts.Length)
791 {
792 typeLib.Description = registryValue.Value;
793 processed = true;
794 }
795 else if (4 == parts.Length)
796 {
797 if (String.Equals(parts[3], "flags", StringComparison.OrdinalIgnoreCase))
798 {
799 int flags = Convert.ToInt32(registryValue.Value, CultureInfo.InvariantCulture);
800
801 if (0x1 == (flags & 0x1))
802 {
803 typeLib.Restricted = Wix.YesNoType.yes;
804 }
805
806 if (0x2 == (flags & 0x2))
807 {
808 typeLib.Control = Wix.YesNoType.yes;
809 }
810
811 if (0x4 == (flags & 0x4))
812 {
813 typeLib.Hidden = Wix.YesNoType.yes;
814 }
815
816 if (0x8 == (flags & 0x8))
817 {
818 typeLib.HasDiskImage = Wix.YesNoType.yes;
819 }
820
821 processed = true;
822 }
823 else if (String.Equals(parts[3], "helpdir", StringComparison.OrdinalIgnoreCase))
824 {
825 if (registryValue.Value.StartsWith("[", StringComparison.Ordinal) && (registryValue.Value.EndsWith("]", StringComparison.Ordinal)
826 || registryValue.Value.EndsWith("]\\", StringComparison.Ordinal)))
827 {
828 typeLib.HelpDirectory = registryValue.Value.Substring(1, registryValue.Value.LastIndexOf(']') - 1);
829 }
830 else if (0 == String.Compare(registryValue.Value, Environment.SystemDirectory, StringComparison.OrdinalIgnoreCase)) // VB6 DLLs register their help directory as SystemFolder
831 {
832 typeLib.HelpDirectory = "SystemFolder";
833 }
834 else if (null != component.Directory) // -sfrag has not been specified
835 {
836 typeLib.HelpDirectory = component.Directory;
837 }
838 else if (component.ParentElement is Wix.Directory) // -sfrag has been specified
839 {
840 typeLib.HelpDirectory = ((Wix.Directory)component.ParentElement).Id;
841 }
842 else if (component.ParentElement is Wix.DirectoryRef) // -sfrag has been specified
843 {
844 typeLib.HelpDirectory = ((Wix.DirectoryRef)component.ParentElement).Id;
845 }
846
847 //If the helpdir has not matched a known directory, drop it because it cannot be resolved.
848 processed = true;
849 }
850 }
851 else if (5 == parts.Length && String.Equals("win32", parts[4], StringComparison.OrdinalIgnoreCase))
852 {
853 typeLib.Language = Convert.ToInt32(parts[3], CultureInfo.InvariantCulture);
854
855 if ((registryValue.Value.StartsWith("[!", StringComparison.Ordinal) || registryValue.Value.StartsWith("[#", StringComparison.Ordinal))
856 && registryValue.Value.EndsWith("]", StringComparison.Ordinal))
857 {
858 parentIndex = String.Concat("file/", registryValue.Value.Substring(2, registryValue.Value.Length - 3));
859 }
860
861 processed = true;
862 }
863 }
864 }
865
866 // index the processed registry values by their corresponding COM element
867 if (processed)
868 {
869 indexedProcessedRegistryValues.Add(registryValue, element);
870 }
871 }
872
873 // parent the COM element
874 if (null != element)
875 {
876 if (null != parentIndex)
877 {
878 Wix.IParentElement parentElement = (Wix.IParentElement)indexedElements[parentIndex];
879
880 if (null != parentElement)
881 {
882 parentElement.AddChild(element);
883 }
884 }
885 else if (0 < indexedProcessedRegistryValues.Count)
886 {
887 component.AddChild(element);
888 }
889
890 // special handling for AppID since it doesn't fit the general model
891 if (null != classAppId)
892 {
893 Wix.AppId appId = (Wix.AppId)indexedElements[String.Concat("AppID/", classAppId)];
894
895 // move the Class element under the AppId (and put the AppId under its old parent)
896 if (null != appId)
897 {
898 // move the AppId element
899 ((Wix.IParentElement)appId.ParentElement).RemoveChild(appId);
900 ((Wix.IParentElement)element.ParentElement).AddChild(appId);
901
902 // move the Class element
903 ((Wix.IParentElement)element.ParentElement).RemoveChild(element);
904 appId.AddChild(element);
905 }
906 }
907 }
908 }
909
910 // remove the RegistryValue elements which were converted into COM elements
911 // that were successfully nested under the Component element
912 foreach (DictionaryEntry entry in indexedProcessedRegistryValues)
913 {
914 Wix.ISchemaElement element = (Wix.ISchemaElement)entry.Value;
915 Wix.RegistryValue registryValue = (Wix.RegistryValue)entry.Key;
916
917 while (null != element)
918 {
919 if (element == component)
920 {
921 ((Wix.IParentElement)registryValue.ParentElement).RemoveChild(registryValue);
922 break;
923 }
924
925 element = element.ParentElement;
926 }
927 }
928 }
929 }
930
931 /// <summary>
932 /// Mutate the directories.
933 /// </summary>
934 private void MutateDirectories()
935 {
936 foreach (Wix.Directory directory in this.directories)
937 {
938 string path = directory.FileSource;
939
940 // create a new directory element without the FileSource attribute
941 if (null != path)
942 {
943 Wix.Directory newDirectory = new Wix.Directory();
944
945 newDirectory.Id = directory.Id;
946 newDirectory.Name = directory.Name;
947
948 foreach (Wix.ISchemaElement element in directory.Children)
949 {
950 newDirectory.AddChild(element);
951 }
952
953 ((Wix.IParentElement)directory.ParentElement).AddChild(newDirectory);
954 ((Wix.IParentElement)directory.ParentElement).RemoveChild(directory);
955
956 if (null != newDirectory.Id)
957 {
958 this.directoryPaths[path.ToLower(CultureInfo.InvariantCulture)] = String.Concat("[", newDirectory.Id, "]");
959 }
960 }
961 }
962 }
963
964 /// <summary>
965 /// Mutate the files.
966 /// </summary>
967 private void MutateFiles()
968 {
969 string sourceDirSubstitution = this.preprocessorVariable;
970 if (sourceDirSubstitution != null)
971 {
972 string prefix = "$(";
973 if (sourceDirSubstitution.StartsWith("wix.", StringComparison.Ordinal))
974 {
975 prefix = "!(";
976 }
977 sourceDirSubstitution = String.Concat(prefix, sourceDirSubstitution, ")");
978 }
979
980 foreach (Wix.File file in this.files)
981 {
982 if (null != file.Id && null != file.Source)
983 {
984 string fileSource = this.Core.ResolveFilePath(file.Source);
985
986 // index the long path
987 this.filePaths[fileSource.ToLower(CultureInfo.InvariantCulture)] = String.Concat("[#", file.Id, "]");
988
989 // index the long path as a URL for assembly harvesting
990 Uri fileUri = new Uri(fileSource);
991 this.filePaths[fileUri.ToString().ToLower(CultureInfo.InvariantCulture)] = String.Concat("file:///[#", file.Id, "]");
992
993 // index the short path
994 string shortPath = NativeMethods.GetShortPathName(fileSource);
995 this.filePaths[shortPath.ToLower(CultureInfo.InvariantCulture)] = String.Concat("[!", file.Id, "]");
996
997 // escape literal $ characters
998 file.Source = file.Source.Replace("$", "$$");
999
1000 if (null != sourceDirSubstitution && file.Source.StartsWith("SourceDir\\", StringComparison.Ordinal))
1001 {
1002 file.Source = file.Source.Substring(9).Insert(0, sourceDirSubstitution);
1003 }
1004 }
1005 }
1006 }
1007
1008 /// <summary>
1009 /// Mutate an individual registry string, according to a collection of replacement items.
1010 /// </summary>
1011 /// <param name="value">The string to mutate.</param>
1012 /// <param name="replace">The collection of items to replace within the string.</param>
1013 /// <value>The mutated registry string.</value>
1014 private string MutateRegistryString(string value, ICollection replace)
1015 {
1016 int index;
1017 string lowercaseValue = value.ToLower(CultureInfo.InvariantCulture);
1018
1019 foreach (DictionaryEntry entry in replace)
1020 {
1021 while (0 <= (index = lowercaseValue.IndexOf((string)entry.Key, StringComparison.Ordinal)))
1022 {
1023 value = value.Remove(index, ((string)entry.Key).Length);
1024 value = value.Insert(index, (string)entry.Value);
1025 lowercaseValue = value.ToLower(CultureInfo.InvariantCulture);
1026 }
1027 }
1028
1029 return value;
1030 }
1031
1032 /// <summary>
1033 /// Mutate the registry values.
1034 /// </summary>
1035 private void MutateRegistryValues()
1036 {
1037 if (this.SuppressVB6COMElements && this.SuppressCOMElements)
1038 {
1039 var vb6RegistryValues = new List<Wix.RegistryValue>();
1040 foreach (Wix.RegistryValue registryValue in this.registryValues)
1041 {
1042 if (IsVb6RegistryValue(registryValue))
1043 {
1044 if (!vb6RegistryValues.Contains(registryValue))
1045 {
1046 vb6RegistryValues.Add(registryValue);
1047 }
1048 }
1049 }
1050
1051 // Remove all the VB6 specific COM registry values
1052 foreach (var reg in vb6RegistryValues)
1053 {
1054 if (reg.ParentElement is Wix.Component component)
1055 {
1056 component.RemoveChild(reg);
1057 }
1058 this.registryValues.Remove(reg);
1059 }
1060 }
1061
1062
1063 ArrayList reversedDirectoryPaths = new ArrayList();
1064
1065 // reverse the indexed directory paths to ensure the longest paths are found first
1066 foreach (DictionaryEntry entry in this.directoryPaths)
1067 {
1068 reversedDirectoryPaths.Insert(0, entry);
1069 }
1070
1071 foreach (Wix.RegistryValue registryValue in this.registryValues)
1072 {
1073 // Multi-string values are stored as children - their "Value" member is null
1074 if (Wix.RegistryValue.TypeType.multiString == registryValue.Type)
1075 {
1076 foreach (Wix.MultiStringValue multiStringValue in registryValue.Children)
1077 {
1078 // first replace file paths with their MSI tokens
1079 multiStringValue.Content = this.MutateRegistryString(multiStringValue.Content, (ICollection)this.filePaths);
1080 // next replace directory paths with their MSI tokens
1081 multiStringValue.Content = this.MutateRegistryString(multiStringValue.Content, (ICollection)reversedDirectoryPaths);
1082 }
1083 }
1084 else
1085 {
1086 // first replace file paths with their MSI tokens
1087 registryValue.Value = this.MutateRegistryString(registryValue.Value, (ICollection)this.filePaths);
1088 // next replace directory paths with their MSI tokens
1089 registryValue.Value = this.MutateRegistryString(registryValue.Value, (ICollection)reversedDirectoryPaths);
1090 }
1091 }
1092 }
1093
1094 private static bool IsVb6RegistryValue(Wix.RegistryValue registryValue)
1095 {
1096 if (Wix.RegistryValue.ActionType.write == registryValue.Action && Wix.RegistryRootType.HKCR == registryValue.Root)
1097 {
1098 string[] parts = registryValue.Key.Split('\\');
1099 if (String.Equals(parts[0], "CLSID", StringComparison.OrdinalIgnoreCase))
1100 {
1101 // Search for the VB6 CLSID {D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731}
1102 if (2 <= parts.Length)
1103 {
1104 if (String.Equals(parts[1], "{D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731}", StringComparison.OrdinalIgnoreCase))
1105 {
1106 return true;
1107 }
1108 }
1109 }
1110 else if (String.Equals(parts[0], "TypeLib", StringComparison.OrdinalIgnoreCase))
1111 {
1112 // Search for the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046}
1113 if (2 <= parts.Length)
1114 {
1115 if (String.Equals(parts[1], "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) ||
1116 String.Equals(parts[1], "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase))
1117 {
1118 return true;
1119 }
1120 }
1121 }
1122 else if (String.Equals(parts[0], "Interface", StringComparison.OrdinalIgnoreCase))
1123 {
1124 // Search for any Interfaces that reference the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046}
1125 if (3 <= parts.Length)
1126 {
1127 if (String.Equals(parts[2], "TypeLib", StringComparison.OrdinalIgnoreCase))
1128 {
1129 if (String.Equals(registryValue.Value, "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) ||
1130 String.Equals(registryValue.Value, "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase))
1131 {
1132 return true;
1133 }
1134 }
1135 }
1136 }
1137 }
1138 return false;
1139 }
1140
1141 /// <summary>
1142 /// The native methods for grabbing machine-specific short file paths.
1143 /// </summary>
1144 private class NativeMethods
1145 {
1146 /// <summary>
1147 /// Gets the short name for a file.
1148 /// </summary>
1149 /// <param name="fullPath">Fullpath to file on disk.</param>
1150 /// <returns>Short name for file.</returns>
1151 internal static string GetShortPathName(string fullPath)
1152 {
1153 var bufferSize = (int)GetShortPathName(fullPath, null, 0);
1154 if (0 == bufferSize)
1155 {
1156 int err = System.Runtime.InteropServices.Marshal.GetLastWin32Error();
1157 throw new System.Runtime.InteropServices.COMException(String.Concat("Failed to get short path buffer size for file: ", fullPath), err);
1158 }
1159
1160 bufferSize += 1;
1161 var shortPath = new StringBuilder(bufferSize, bufferSize);
1162
1163 uint result = GetShortPathName(fullPath, shortPath, bufferSize);
1164
1165 if (0 == result)
1166 {
1167 int err = System.Runtime.InteropServices.Marshal.GetLastWin32Error();
1168 throw new System.Runtime.InteropServices.COMException(String.Concat("Failed to get short path name for file: ", fullPath), err);
1169 }
1170
1171 return shortPath.ToString();
1172 }
1173
1174 /// <summary>
1175 /// Gets the short name for a file.
1176 /// </summary>
1177 /// <param name="longPath">Long path to convert to short path.</param>
1178 /// <param name="shortPath">Short path from long path.</param>
1179 /// <param name="buffer">Size of short path.</param>
1180 /// <returns>zero if success.</returns>
1181 [DllImport("kernel32.dll", EntryPoint = "GetShortPathNameW", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)]
1182 internal static extern uint GetShortPathName(string longPath, StringBuilder shortPath, [MarshalAs(UnmanagedType.U4)]int buffer);
1183 }
1184 }
1185}
diff --git a/src/wix/heat/UtilHarvesterMutator.cs b/src/wix/heat/UtilHarvesterMutator.cs
new file mode 100644
index 00000000..59fb9a93
--- /dev/null
+++ b/src/wix/heat/UtilHarvesterMutator.cs
@@ -0,0 +1,218 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections;
7 using System.IO;
8 using System.Reflection;
9 using System.Runtime.InteropServices;
10 using WixToolset.Data;
11 using WixToolset.Harvesters.Data;
12 using WixToolset.Harvesters.Extensibility;
13 using Wix = WixToolset.Harvesters.Serialize;
14
15 /// <summary>
16 /// The WiX Toolset harvester mutator.
17 /// </summary>
18 internal class UtilHarvesterMutator : BaseMutatorExtension
19 {
20 // Flags for SetErrorMode() native method.
21 private const UInt32 SEM_FAILCRITICALERRORS = 0x0001;
22 private const UInt32 SEM_NOGPFAULTERRORBOX = 0x0002;
23 private const UInt32 SEM_NOALIGNMENTFAULTEXCEPT = 0x0004;
24 private const UInt32 SEM_NOOPENFILEERRORBOX = 0x8000;
25
26 // Remember whether we were able to call OaEnablePerUserTLibRegistration
27 private bool calledPerUserTLibReg;
28
29 /// <summary>
30 /// allow process to handle serious system errors.
31 /// </summary>
32 [DllImport("Kernel32.dll")]
33 private static extern void SetErrorMode(UInt32 uiMode);
34
35 /// <summary>
36 /// enable the RegisterTypeLib API to use the appropriate override mapping for non-admin users on Vista
37 /// </summary>
38 [DllImport("Oleaut32.dll")]
39 private static extern void OaEnablePerUserTLibRegistration();
40
41 public UtilHarvesterMutator()
42 {
43 this.calledPerUserTLibReg = false;
44
45 SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
46
47 try
48 {
49 OaEnablePerUserTLibRegistration();
50 this.calledPerUserTLibReg = true;
51 }
52 catch (EntryPointNotFoundException)
53 {
54 }
55 }
56
57 /// <summary>
58 /// Gets the sequence of this mutator extension.
59 /// </summary>
60 /// <value>The sequence of this mutator extension.</value>
61 public override int Sequence
62 {
63 get { return 100; }
64 }
65
66 /// <summary>
67 /// Mutate a WiX document.
68 /// </summary>
69 /// <param name="wix">The Wix document element.</param>
70 public override void Mutate(Wix.Wix wix)
71 {
72 this.MutateElement(null, wix);
73 }
74
75 /// <summary>
76 /// Mutate an element.
77 /// </summary>
78 /// <param name="parentElement">The parent of the element to mutate.</param>
79 /// <param name="element">The element to mutate.</param>
80 private void MutateElement(Wix.IParentElement parentElement, Wix.ISchemaElement element)
81 {
82 if (element is Wix.File)
83 {
84 this.MutateFile(parentElement, (Wix.File)element);
85 }
86
87 // mutate the child elements
88 if (element is Wix.IParentElement)
89 {
90 ArrayList childElements = new ArrayList();
91
92 // copy the child elements to a temporary array (to allow them to be deleted/moved)
93 foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children)
94 {
95 childElements.Add(childElement);
96 }
97
98 foreach (Wix.ISchemaElement childElement in childElements)
99 {
100 this.MutateElement((Wix.IParentElement)element, childElement);
101 }
102 }
103 }
104
105 /// <summary>
106 /// Mutate a file.
107 /// </summary>
108 /// <param name="parentElement">The parent of the element to mutate.</param>
109 /// <param name="file">The file to mutate.</param>
110 private void MutateFile(Wix.IParentElement parentElement, Wix.File file)
111 {
112 if (null != file.Source)
113 {
114 string fileExtension = Path.GetExtension(file.Source);
115 string fileSource = this.Core.ResolveFilePath(file.Source);
116
117 if (String.Equals(".ax", fileExtension, StringComparison.OrdinalIgnoreCase) || // DirectShow filter
118 String.Equals(".dll", fileExtension, StringComparison.OrdinalIgnoreCase) ||
119 String.Equals(".exe", fileExtension, StringComparison.OrdinalIgnoreCase) ||
120 String.Equals(".ocx", fileExtension, StringComparison.OrdinalIgnoreCase)) // ActiveX
121 {
122 // try the assembly harvester
123 try
124 {
125 AssemblyHarvester assemblyHarvester = new AssemblyHarvester();
126
127 this.Core.Messaging.Write(HarvesterVerboses.HarvestingAssembly(fileSource));
128 Wix.RegistryValue[] registryValues = assemblyHarvester.HarvestRegistryValues(fileSource);
129
130 foreach (Wix.RegistryValue registryValue in registryValues)
131 {
132 parentElement.AddChild(registryValue);
133 }
134
135 // also try self-reg since we could have a mixed-mode assembly
136 this.HarvestSelfReg(parentElement, fileSource);
137 }
138 catch (BadImageFormatException) // not an assembly, try raw DLL.
139 {
140 this.HarvestSelfReg(parentElement, fileSource);
141 }
142 catch (Exception ex)
143 {
144 this.Core.Messaging.Write(HarvesterWarnings.AssemblyHarvestFailed(fileSource, ex.Message));
145 }
146 }
147 else if (String.Equals(".olb", fileExtension, StringComparison.OrdinalIgnoreCase) || // type library
148 String.Equals(".tlb", fileExtension, StringComparison.OrdinalIgnoreCase)) // type library
149 {
150 // try the type library harvester
151 try
152 {
153 TypeLibraryHarvester typeLibHarvester = new TypeLibraryHarvester();
154
155 this.Core.Messaging.Write(HarvesterVerboses.HarvestingTypeLib(fileSource));
156 Wix.RegistryValue[] registryValues = typeLibHarvester.HarvestRegistryValues(fileSource);
157
158 foreach (Wix.RegistryValue registryValue in registryValues)
159 {
160 parentElement.AddChild(registryValue);
161 }
162 }
163 catch (COMException ce)
164 {
165 // 0x8002801C (TYPE_E_REGISTRYACCESS)
166 // If we don't have permission to harvest typelibs, it's likely because we're on
167 // Vista or higher and aren't an Admin, or don't have the appropriate QFE installed.
168 if (!this.calledPerUserTLibReg && (0x8002801c == unchecked((uint)ce.ErrorCode)))
169 {
170 this.Core.Messaging.Write(WarningMessages.InsufficientPermissionHarvestTypeLib());
171 }
172 else if (0x80029C4A == unchecked((uint)ce.ErrorCode)) // generic can't load type library
173 {
174 this.Core.Messaging.Write(HarvesterWarnings.TypeLibLoadFailed(fileSource, ce.Message));
175 }
176 }
177 }
178 }
179 }
180
181 /// <summary>
182 /// Calls self-reg harvester.
183 /// </summary>
184 /// <param name="parentElement">The parent element.</param>
185 /// <param name="fileSource">The file source.</param>
186 private void HarvestSelfReg(Wix.IParentElement parentElement, string fileSource)
187 {
188 // try the self-reg harvester
189 try
190 {
191 DllHarvester dllHarvester = new DllHarvester();
192
193 this.Core.Messaging.Write(HarvesterVerboses.HarvestingSelfReg(fileSource));
194 Wix.RegistryValue[] registryValues = dllHarvester.HarvestRegistryValues(fileSource);
195
196 foreach (Wix.RegistryValue registryValue in registryValues)
197 {
198 parentElement.AddChild(registryValue);
199 }
200 }
201 catch (TargetInvocationException tie)
202 {
203 if (tie.InnerException is EntryPointNotFoundException)
204 {
205 // No DllRegisterServer(), which is fine by me.
206 }
207 else
208 {
209 this.Core.Messaging.Write(HarvesterWarnings.SelfRegHarvestFailed(fileSource, tie.Message));
210 }
211 }
212 catch (Exception ex)
213 {
214 this.Core.Messaging.Write(HarvesterWarnings.SelfRegHarvestFailed(fileSource, ex.Message));
215 }
216 }
217 }
218}
diff --git a/src/wix/heat/UtilHeatExtension.cs b/src/wix/heat/UtilHeatExtension.cs
new file mode 100644
index 00000000..7296a3b3
--- /dev/null
+++ b/src/wix/heat/UtilHeatExtension.cs
@@ -0,0 +1,405 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections.Generic;
7 using System.IO;
8 using WixToolset.Core.Burn.Interfaces;
9 using WixToolset.Data;
10 using WixToolset.Data.Symbols;
11 using WixToolset.Extensibility.Services;
12 using WixToolset.Harvesters.Data;
13 using WixToolset.Harvesters.Extensibility;
14
15 /// <summary>
16 /// A utility heat extension for the WiX Toolset Harvester application.
17 /// </summary>
18 internal class UtilHeatExtension : BaseHeatExtension
19 {
20 public UtilHeatExtension(IServiceProvider serviceProvider)
21 {
22 this.PayloadHarvester = serviceProvider.GetService<IPayloadHarvester>();
23 }
24
25 private IPayloadHarvester PayloadHarvester { get; }
26
27 /// <summary>
28 /// Gets the supported command line types for this extension.
29 /// </summary>
30 /// <value>The supported command line types for this extension.</value>
31 public override HeatCommandLineOption[] CommandLineTypes
32 {
33 get
34 {
35 return new HeatCommandLineOption[]
36 {
37 new HeatCommandLineOption("dir", "harvest a directory"),
38 new HeatCommandLineOption("file", "harvest a file"),
39 new HeatCommandLineOption("exepackagepayload", "harvest a bundle payload as ExePackagePayload"),
40 new HeatCommandLineOption("msupackagepayload", "harvest a bundle payload as MsuPackagePayload"),
41 new HeatCommandLineOption("perf", "harvest performance counters"),
42 new HeatCommandLineOption("reg", "harvest a .reg file"),
43 new HeatCommandLineOption("-ag", "autogenerate component guids at compile time"),
44 new HeatCommandLineOption("-cg <ComponentGroupName>", "component group name (cannot contain spaces e.g -cg MyComponentGroup)"),
45 new HeatCommandLineOption("-dr <DirectoryName>", "directory reference to root directories (cannot contain spaces e.g. -dr MyAppDirRef)"),
46 new HeatCommandLineOption("-var <VariableName>", "substitute File/@Source=\"SourceDir\" with a preprocessor or a wix variable" + Environment.NewLine +
47 "(e.g. -var var.MySource will become File/@Source=\"$(var.MySource)\\myfile.txt\" and " + Environment.NewLine +
48 "-var wix.MySource will become File/@Source=\"!(wix.MySource)\\myfile.txt\""),
49 new HeatCommandLineOption("-gg", "generate guids now"),
50 new HeatCommandLineOption("-g1", "generated guids are not in brackets"),
51 new HeatCommandLineOption("-ke", "keep empty directories"),
52 new HeatCommandLineOption("-scom", "suppress COM elements"),
53 new HeatCommandLineOption("-sfrag", "suppress fragments"),
54 new HeatCommandLineOption("-srd", "suppress harvesting the root directory as an element"),
55 new HeatCommandLineOption("-svb6", "suppress VB6 COM elements"),
56 new HeatCommandLineOption("-sreg", "suppress registry harvesting"),
57 new HeatCommandLineOption("-suid", "suppress unique identifiers for files, components, & directories"),
58 new HeatCommandLineOption("-t", "transform harvested output with XSL file"),
59 new HeatCommandLineOption("-template", "use template, one of: fragment,module,product"),
60 };
61 }
62 }
63
64 /// <summary>
65 /// Parse the command line options for this extension.
66 /// </summary>
67 /// <param name="type">The active harvester type.</param>
68 /// <param name="args">The option arguments.</param>
69 public override void ParseOptions(string type, string[] args)
70 {
71 bool active = false;
72 IHarvesterExtension harvesterExtension = null;
73 bool suppressHarvestingRegistryValues = false;
74 UtilFinalizeHarvesterMutator utilFinalizeHarvesterMutator = new UtilFinalizeHarvesterMutator();
75 UtilMutator utilMutator = new UtilMutator();
76 List<UtilTransformMutator> transformMutators = new List<UtilTransformMutator>();
77 GenerateType generateType = GenerateType.Components;
78
79 // select the harvester
80 switch (type)
81 {
82 case "dir":
83 harvesterExtension = new DirectoryHarvester();
84 active = true;
85 break;
86 case "file":
87 harvesterExtension = new FileHarvester();
88 active = true;
89 break;
90 case "exepackagepayload":
91 harvesterExtension = new PayloadHarvester(this.PayloadHarvester, WixBundlePackageType.Exe);
92 active = true;
93 break;
94 case "msupackagepayload":
95 harvesterExtension = new PayloadHarvester(this.PayloadHarvester, WixBundlePackageType.Msu);
96 active = true;
97 break;
98 case "perf":
99 harvesterExtension = new PerformanceCategoryHarvester();
100 active = true;
101 break;
102 case "reg":
103 harvesterExtension = new RegFileHarvester();
104 active = true;
105 break;
106 }
107
108 // set default settings
109 utilMutator.CreateFragments = true;
110 utilMutator.SetUniqueIdentifiers = true;
111
112 // parse the options
113 for (int i = 0; i < args.Length; i++)
114 {
115 string commandSwitch = args[i];
116
117 if (null == commandSwitch || 0 == commandSwitch.Length) // skip blank arguments
118 {
119 continue;
120 }
121
122 if ('-' == commandSwitch[0] || '/' == commandSwitch[0])
123 {
124 string truncatedCommandSwitch = commandSwitch.Substring(1);
125
126 if ("ag" == truncatedCommandSwitch)
127 {
128 utilMutator.AutogenerateGuids = true;
129 }
130 else if ("cg" == truncatedCommandSwitch)
131 {
132 utilMutator.ComponentGroupName = this.GetArgumentParameter(args, i);
133
134 if (this.Core.Messaging.EncounteredError)
135 {
136 return;
137 }
138 }
139 else if ("dr" == truncatedCommandSwitch)
140 {
141 string dr = this.GetArgumentParameter(args, i);
142
143 if (this.Core.Messaging.EncounteredError)
144 {
145 return;
146 }
147
148 if (harvesterExtension is DirectoryHarvester)
149 {
150 ((DirectoryHarvester)harvesterExtension).RootedDirectoryRef = dr;
151 }
152 else if (harvesterExtension is FileHarvester)
153 {
154 ((FileHarvester)harvesterExtension).RootedDirectoryRef = dr;
155 }
156 }
157 else if ("gg" == truncatedCommandSwitch)
158 {
159 utilMutator.GenerateGuids = true;
160 }
161 else if ("g1" == truncatedCommandSwitch)
162 {
163 utilMutator.GuidFormat = "D";
164 }
165 else if ("ke" == truncatedCommandSwitch)
166 {
167 if (harvesterExtension is DirectoryHarvester)
168 {
169 ((DirectoryHarvester)harvesterExtension).KeepEmptyDirectories = true;
170 }
171 else if (active)
172 {
173 // TODO: error message - not applicable to file harvester
174 }
175 }
176 else if ("scom" == truncatedCommandSwitch)
177 {
178 if (active)
179 {
180 utilFinalizeHarvesterMutator.SuppressCOMElements = true;
181 }
182 else
183 {
184 // TODO: error message - not applicable
185 }
186 }
187 else if ("svb6" == truncatedCommandSwitch)
188 {
189 if (active)
190 {
191 utilFinalizeHarvesterMutator.SuppressVB6COMElements = true;
192 }
193 else
194 {
195 // TODO: error message - not applicable
196 }
197 }
198 else if ("sfrag" == truncatedCommandSwitch)
199 {
200 utilMutator.CreateFragments = false;
201 }
202 else if ("srd" == truncatedCommandSwitch)
203 {
204 if (harvesterExtension is DirectoryHarvester)
205 {
206 ((DirectoryHarvester)harvesterExtension).SuppressRootDirectory = true;
207 }
208 else if (harvesterExtension is FileHarvester)
209 {
210 ((FileHarvester)harvesterExtension).SuppressRootDirectory = true;
211 }
212 }
213 else if ("sreg" == truncatedCommandSwitch)
214 {
215 suppressHarvestingRegistryValues = true;
216 }
217 else if ("suid" == truncatedCommandSwitch)
218 {
219 utilMutator.SetUniqueIdentifiers = false;
220
221 if (harvesterExtension is DirectoryHarvester)
222 {
223 ((DirectoryHarvester)harvesterExtension).SetUniqueIdentifiers = false;
224 }
225 else if (harvesterExtension is FileHarvester)
226 {
227 ((FileHarvester)harvesterExtension).SetUniqueIdentifiers = false;
228 }
229 }
230 else if (truncatedCommandSwitch.StartsWith("t:", StringComparison.Ordinal) || "t" == truncatedCommandSwitch)
231 {
232 string xslFile;
233 if (truncatedCommandSwitch.StartsWith("t:", StringComparison.Ordinal))
234 {
235 this.Core.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("t:", "t"));
236 xslFile = truncatedCommandSwitch.Substring(2);
237 }
238 else
239 {
240 xslFile = this.GetArgumentParameter(args, i, true);
241 }
242
243 if (0 <= xslFile.IndexOf('\"'))
244 {
245 this.Core.Messaging.Write(ErrorMessages.PathCannotContainQuote(xslFile));
246 return;
247 }
248
249 try
250 {
251 xslFile = Path.GetFullPath(xslFile);
252 }
253 catch (Exception e)
254 {
255 this.Core.Messaging.Write(ErrorMessages.InvalidCommandLineFileName(xslFile, e.Message));
256 return;
257 }
258
259 transformMutators.Add(new UtilTransformMutator(xslFile, transformMutators.Count));
260 }
261 else if (truncatedCommandSwitch.StartsWith("template:", StringComparison.Ordinal) || "template" == truncatedCommandSwitch)
262 {
263 string template;
264 if(truncatedCommandSwitch.StartsWith("template:", StringComparison.Ordinal))
265 {
266 this.Core.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("template:", "template"));
267 template = truncatedCommandSwitch.Substring(9);
268 }
269 else
270 {
271 template = this.GetArgumentParameter(args, i);
272 }
273
274 switch (template)
275 {
276 case "fragment":
277 utilMutator.TemplateType = TemplateType.Fragment;
278 break;
279 case "module":
280 utilMutator.TemplateType = TemplateType.Module;
281 break;
282 case "product":
283 utilMutator.TemplateType = TemplateType.Package ;
284 break;
285 default:
286 // TODO: error
287 break;
288 }
289 }
290 else if ("var" == truncatedCommandSwitch)
291 {
292 if (active)
293 {
294 utilFinalizeHarvesterMutator.PreprocessorVariable = this.GetArgumentParameter(args, i);
295
296 if (this.Core.Messaging.EncounteredError)
297 {
298 return;
299 }
300 }
301 }
302 else if ("generate" == truncatedCommandSwitch)
303 {
304 if (harvesterExtension is DirectoryHarvester)
305 {
306 string genType = this.GetArgumentParameter(args, i).ToUpperInvariant();
307 switch (genType)
308 {
309 case "COMPONENTS":
310 generateType = GenerateType.Components;
311 break;
312 case "PAYLOADGROUP":
313 generateType = GenerateType.PayloadGroup;
314 break;
315 default:
316 throw new WixException(HarvesterErrors.InvalidDirectoryOutputType(genType));
317 }
318 }
319 else
320 {
321 // TODO: error message - not applicable
322 }
323 }
324 }
325 }
326
327 // set the appropriate harvester extension
328 if (active)
329 {
330 this.Core.Harvester.Extension = harvesterExtension;
331
332 if (!suppressHarvestingRegistryValues)
333 {
334 this.Core.Mutator.AddExtension(new UtilHarvesterMutator());
335 }
336
337 this.Core.Mutator.AddExtension(utilFinalizeHarvesterMutator);
338
339 if (harvesterExtension is DirectoryHarvester directoryHarvester)
340 {
341 directoryHarvester.GenerateType = generateType;
342 this.Core.Harvester.Core.RootDirectory = this.Core.Harvester.Core.ExtensionArgument;
343 }
344 else if (harvesterExtension is FileHarvester)
345 {
346 if (((FileHarvester)harvesterExtension).SuppressRootDirectory)
347 {
348 this.Core.Harvester.Core.RootDirectory = Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument));
349 }
350 else
351 {
352 this.Core.Harvester.Core.RootDirectory = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument)));
353
354 // GetDirectoryName() returns null for root paths such as "c:\", so make sure to support that as well
355 if (null == this.Core.Harvester.Core.RootDirectory)
356 {
357 this.Core.Harvester.Core.RootDirectory = Path.GetPathRoot(Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument)));
358 }
359 }
360 }
361 }
362
363 // set the mutator
364 this.Core.Mutator.AddExtension(utilMutator);
365
366 // add the transforms
367 foreach (UtilTransformMutator transformMutator in transformMutators)
368 {
369 this.Core.Mutator.AddExtension(transformMutator);
370 }
371 }
372
373 private string GetArgumentParameter(string[] args, int index)
374 {
375 return this.GetArgumentParameter(args, index, false);
376 }
377
378 private string GetArgumentParameter(string[] args, int index, bool allowSpaces)
379 {
380 string truncatedCommandSwitch = args[index];
381 string commandSwitchValue = args[index + 1];
382
383 //increment the index to the switch value
384 index++;
385
386 if (IsValidArg(args, index) && !String.IsNullOrEmpty(commandSwitchValue.Trim()))
387 {
388 if (!allowSpaces && commandSwitchValue.Contains(" "))
389 {
390 this.Core.Messaging.Write(HarvesterErrors.SpacesNotAllowedInArgumentValue(truncatedCommandSwitch, commandSwitchValue));
391 }
392 else
393 {
394 return commandSwitchValue;
395 }
396 }
397 else
398 {
399 this.Core.Messaging.Write(HarvesterErrors.ArgumentRequiresValue(truncatedCommandSwitch));
400 }
401
402 return null;
403 }
404 }
405}
diff --git a/src/wix/heat/UtilMutator.cs b/src/wix/heat/UtilMutator.cs
new file mode 100644
index 00000000..3ba3a8eb
--- /dev/null
+++ b/src/wix/heat/UtilMutator.cs
@@ -0,0 +1,633 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections;
7 using System.Diagnostics;
8 using System.Globalization;
9 using System.IO;
10 using WixToolset.Harvesters.Extensibility;
11 using Wix = WixToolset.Harvesters.Serialize;
12
13 /// <summary>
14 /// The template type.
15 /// </summary>
16 internal enum TemplateType
17 {
18 /// <summary>
19 /// A fragment template.
20 /// </summary>
21 Fragment,
22
23 /// <summary>
24 /// A module template.
25 /// </summary>
26 Module,
27
28 /// <summary>
29 /// A product template.
30 /// </summary>
31 Package
32 }
33
34 /// <summary>
35 /// The mutator for the WiX Toolset Internet Information Services Extension.
36 /// </summary>
37 internal class UtilMutator : BaseMutatorExtension
38 {
39 private ArrayList components;
40 private ArrayList componentGroups;
41 private string componentGroupName;
42 private bool createFragments;
43 private ArrayList directories;
44 private ArrayList directoryRefs;
45 private ArrayList files;
46 private ArrayList features;
47 private SortedList fragments;
48 private bool autogenerateGuids;
49 private bool generateGuids;
50 private string guidFormat = "B"; // Defaults to guid in {}
51 private Wix.IParentElement rootElement;
52 private bool setUniqueIdentifiers;
53 private TemplateType templateType;
54
55 /// <summary>
56 /// Instantiate a new UtilMutator.
57 /// </summary>
58 public UtilMutator()
59 {
60 this.components = new ArrayList();
61 this.componentGroups = new ArrayList();
62 this.directories = new ArrayList();
63 this.directoryRefs = new ArrayList();
64 this.features = new ArrayList();
65 this.files = new ArrayList();
66 this.fragments = new SortedList();
67 }
68
69 /// <summary>
70 /// Gets or sets the value of the component group name.
71 /// </summary>
72 /// <value>The component group name.</value>
73 public string ComponentGroupName
74 {
75 get { return this.componentGroupName; }
76 set { this.componentGroupName = value; }
77 }
78
79 /// <summary>
80 /// Gets or sets the option to create fragments.
81 /// </summary>
82 /// <value>The option to create fragments.</value>
83 public bool CreateFragments
84 {
85 get { return this.createFragments; }
86 set { this.createFragments = value; }
87 }
88
89 /// <summary>
90 /// Gets or sets the option to autogenerate component guids at compile time.
91 /// </summary>
92 /// <value>The option to autogenerate component guids.</value>
93 public bool AutogenerateGuids
94 {
95 get { return this.autogenerateGuids; }
96 set { this.autogenerateGuids = value; }
97 }
98
99 /// <summary>
100 /// Gets or sets the option to generate missing guids.
101 /// </summary>
102 /// <value>The option to generate missing guids.</value>
103 public bool GenerateGuids
104 {
105 get { return this.generateGuids; }
106 set { this.generateGuids = value; }
107 }
108
109 /// <summary>
110 /// Gets or sets the option to set the format of guids.
111 /// D - 32 digits separated by hyphens:
112 /// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
113 /// B - 32 digits separated by hyphens, enclosed in brackets:
114 /// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
115 /// </summary>
116 /// <value>Guid format either B or D.</value>
117 public string GuidFormat
118 {
119 get { return this.guidFormat; }
120 set { this.guidFormat = value; }
121 }
122
123 /// <summary>
124 /// Gets the sequence of the extension.
125 /// </summary>
126 /// <value>The sequence of the extension.</value>
127 public override int Sequence
128 {
129 get { return 1000; }
130 }
131
132 /// <summary>
133 /// Gets of sets the option to set unique identifiers.
134 /// </summary>
135 /// <value>The option to set unique identifiers.</value>
136 public bool SetUniqueIdentifiers
137 {
138 get { return this.setUniqueIdentifiers; }
139 set { this.setUniqueIdentifiers = value; }
140 }
141
142 /// <summary>
143 /// Gets or sets the template type.
144 /// </summary>
145 /// <value>The template type.</value>
146 public TemplateType TemplateType
147 {
148 get { return this.templateType; }
149 set { this.templateType = value; }
150 }
151
152 /// <summary>
153 /// Mutate a WiX document.
154 /// </summary>
155 /// <param name="wix">The Wix document element.</param>
156 public override void Mutate(Wix.Wix wix)
157 {
158 this.components.Clear();
159 this.directories.Clear();
160 this.directoryRefs.Clear();
161 this.features.Clear();
162 this.files.Clear();
163 this.fragments.Clear();
164 this.rootElement = null;
165
166 // index elements in this wix document
167 this.IndexElement(wix);
168
169 this.MutateWix(wix);
170
171 this.MutateFiles();
172
173 this.MutateDirectories();
174
175 this.MutateComponents();
176
177 if (null != this.componentGroupName)
178 {
179 this.CreateComponentGroup(wix);
180 }
181
182 // add the components to the product feature after all the identifiers have been set
183 if (TemplateType.Package == this.templateType)
184 {
185 Wix.Feature feature = (Wix.Feature)this.features[0];
186
187 foreach (Wix.ComponentGroup group in this.componentGroups)
188 {
189 Wix.ComponentGroupRef componentGroupRef = new Wix.ComponentGroupRef();
190 componentGroupRef.Id = group.Id;
191
192 feature.AddChild(componentGroupRef);
193 }
194 }
195 else if (TemplateType.Module == this.templateType)
196 {
197 foreach (Wix.ISchemaElement element in wix.Children)
198 {
199 if (element is Wix.Module)
200 {
201 foreach (Wix.ComponentGroup group in this.componentGroups)
202 {
203 Wix.ComponentGroupRef componentGroupRef = new Wix.ComponentGroupRef();
204 componentGroupRef.Id = group.Id;
205
206 ((Wix.IParentElement)element).AddChild(componentGroupRef);
207 }
208 break;
209 }
210 }
211 }
212
213 //if(!this.createFragments && TemplateType.Package
214 foreach (Wix.Fragment fragment in this.fragments.Values)
215 {
216 wix.AddChild(fragment);
217 }
218 }
219
220 /// <summary>
221 /// Creates a component group with a given name.
222 /// </summary>
223 /// <param name="wix">The Wix document element.</param>
224 private void CreateComponentGroup(Wix.Wix wix)
225 {
226 Wix.ComponentGroup componentGroup = new Wix.ComponentGroup();
227 componentGroup.Id = this.componentGroupName;
228 this.componentGroups.Add(componentGroup);
229
230 Wix.Fragment cgFragment = new Wix.Fragment();
231 cgFragment.AddChild(componentGroup);
232 wix.AddChild(cgFragment);
233
234 int componentCount = 0;
235 for (; componentCount < this.components.Count; componentCount++)
236 {
237 Wix.Component c = this.components[componentCount] as Wix.Component;
238
239 if (this.createFragments)
240 {
241 if (c.ParentElement is Wix.Directory)
242 {
243 Wix.Directory parentDirectory = c.ParentElement as Wix.Directory;
244
245 componentGroup.AddChild(c);
246 c.Directory = parentDirectory.Id;
247 parentDirectory.RemoveChild(c);
248 }
249 else if (c.ParentElement is Wix.DirectoryRef)
250 {
251 Wix.DirectoryRef parentDirectory = c.ParentElement as Wix.DirectoryRef;
252
253 componentGroup.AddChild(c);
254 c.Directory = parentDirectory.Id;
255 parentDirectory.RemoveChild(c);
256
257 // Remove whole fragment if moving the component to the component group just leaves an empty DirectoryRef
258 if (0 < this.fragments.Count && parentDirectory.ParentElement is Wix.Fragment)
259 {
260 Wix.Fragment parentFragment = parentDirectory.ParentElement as Wix.Fragment;
261 int childCount = 0;
262 foreach (Wix.ISchemaElement element in parentFragment.Children)
263 {
264 childCount++;
265 }
266
267 // Component should always have an Id but the SortedList creation allows for null and bases the name on the fragment count which we cannot reverse engineer here.
268 if (1 == childCount && !String.IsNullOrEmpty(c.Id))
269 {
270 int removeIndex = this.fragments.IndexOfKey(String.Concat("Component:", c.Id));
271 if (0 <= removeIndex)
272 {
273 this.fragments.RemoveAt(removeIndex);
274 }
275 }
276 }
277 }
278 }
279 else
280 {
281 Wix.ComponentRef componentRef = new Wix.ComponentRef();
282 componentRef.Id = c.Id;
283 componentGroup.AddChild(componentRef);
284 }
285 }
286 }
287
288 /// <summary>
289 /// Index an element.
290 /// </summary>
291 /// <param name="element">The element to index.</param>
292 private void IndexElement(Wix.ISchemaElement element)
293 {
294 if (element is Wix.Component)
295 {
296 this.components.Add(element);
297 }
298 else if (element is Wix.ComponentGroup)
299 {
300 this.componentGroups.Add(element);
301 }
302 else if (element is Wix.Directory)
303 {
304 this.directories.Add(element);
305 }
306 else if (element is Wix.DirectoryRef)
307 {
308 this.directoryRefs.Add(element);
309 }
310 else if (element is Wix.Feature)
311 {
312 this.features.Add(element);
313 }
314 else if (element is Wix.File)
315 {
316 this.files.Add(element);
317 }
318 else if (element is Wix.Module || element is Wix.PatchCreation || element is Wix.Package)
319 {
320 Debug.Assert(null == this.rootElement);
321 this.rootElement = (Wix.IParentElement)element;
322 }
323
324 // index the child elements
325 if (element is Wix.IParentElement)
326 {
327 foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children)
328 {
329 this.IndexElement(childElement);
330 }
331 }
332 }
333
334 /// <summary>
335 /// Mutate the components.
336 /// </summary>
337 private void MutateComponents()
338 {
339 IdentifierGenerator identifierGenerator = new IdentifierGenerator("Component", this.Core);
340 if (TemplateType.Module == this.templateType)
341 {
342 identifierGenerator.MaxIdentifierLength = IdentifierGenerator.MaxModuleIdentifierLength;
343 }
344
345 foreach (Wix.Component component in this.components)
346 {
347 if (null == component.Id)
348 {
349 string firstFileId = string.Empty;
350
351 // attempt to create a possible identifier from the first file identifier in the component
352 foreach (Wix.File file in component[typeof(Wix.File)])
353 {
354 firstFileId = file.Id;
355 break;
356 }
357
358 if (string.IsNullOrEmpty(firstFileId))
359 {
360 firstFileId = this.GetGuid();
361 }
362
363 component.Id = identifierGenerator.GetIdentifier(firstFileId);
364 }
365
366 if (null == component.Guid)
367 {
368 if (this.AutogenerateGuids)
369 {
370 component.Guid = "*";
371 }
372 else
373 {
374 component.Guid = this.GetGuid();
375 }
376 }
377
378 if (this.createFragments && component.ParentElement is Wix.Directory)
379 {
380 Wix.Directory directory = (Wix.Directory)component.ParentElement;
381
382 // parent directory must have an identifier to create a reference to it
383 if (null == directory.Id)
384 {
385 break;
386 }
387
388 if (this.rootElement is Wix.Module)
389 {
390 // add a ComponentRef for the Component
391 Wix.ComponentRef componentRef = new Wix.ComponentRef();
392 componentRef.Id = component.Id;
393 this.rootElement.AddChild(componentRef);
394 }
395
396 // create a new Fragment
397 Wix.Fragment fragment = new Wix.Fragment();
398 this.fragments.Add(String.Concat("Component:", (null != component.Id ? component.Id : this.fragments.Count.ToString())), fragment);
399
400 // create a new DirectoryRef
401 Wix.DirectoryRef directoryRef = new Wix.DirectoryRef();
402 directoryRef.Id = directory.Id;
403 fragment.AddChild(directoryRef);
404
405 // move the Component from the the Directory to the DirectoryRef
406 directory.RemoveChild(component);
407 directoryRef.AddChild(component);
408 }
409 }
410 }
411
412 /// <summary>
413 /// Mutate the directories.
414 /// </summary>
415 private void MutateDirectories()
416 {
417 if (!this.setUniqueIdentifiers)
418 {
419 // assign all identifiers before fragmenting (because fragmenting requires them all to be present)
420 IdentifierGenerator identifierGenerator = new IdentifierGenerator("Directory", this.Core);
421 if (TemplateType.Module == this.templateType)
422 {
423 identifierGenerator.MaxIdentifierLength = IdentifierGenerator.MaxModuleIdentifierLength;
424 }
425
426 foreach (Wix.Directory directory in this.directories)
427 {
428 if (null == directory.Id)
429 {
430 directory.Id = identifierGenerator.GetIdentifier(directory.Name);
431 }
432 }
433 }
434
435 if (this.createFragments)
436 {
437 foreach (Wix.Directory directory in this.directories)
438 {
439 if (directory.ParentElement is Wix.Directory)
440 {
441 Wix.Directory parentDirectory = (Wix.Directory)directory.ParentElement;
442
443 // parent directory must have an identifier to create a reference to it
444 if (null == parentDirectory.Id)
445 {
446 return;
447 }
448
449 // create a new Fragment
450 Wix.Fragment fragment = new Wix.Fragment();
451 this.fragments.Add(String.Concat("Directory:", ("TARGETDIR" == directory.Id ? null : (null != directory.Id ? directory.Id : this.fragments.Count.ToString()))), fragment);
452
453 // create a new DirectoryRef
454 Wix.DirectoryRef directoryRef = new Wix.DirectoryRef();
455 directoryRef.Id = parentDirectory.Id;
456 fragment.AddChild(directoryRef);
457
458 // move the Directory from the parent Directory to DirectoryRef
459 parentDirectory.RemoveChild(directory);
460 directoryRef.AddChild(directory);
461 }
462 else if (directory.ParentElement is Wix.Fragment)
463 {
464 // When creating fragments, remove any top-level Directory elements;
465 // the fragments should be pulled in by their DirectoryRefs instead.
466 Wix.Fragment parent = (Wix.Fragment)directory.ParentElement;
467 parent.RemoveChild(directory);
468
469 // Remove the fragment if it is empty.
470 if (parent.Children.GetEnumerator().Current == null && parent.ParentElement != null)
471 {
472 ((Wix.IParentElement)parent.ParentElement).RemoveChild(parent);
473 }
474 }
475 else if (directory.ParentElement == this.rootElement)
476 {
477 // create a new Fragment
478 Wix.Fragment fragment = new Wix.Fragment();
479 this.fragments.Add(String.Concat("Directory:", ("TARGETDIR" == directory.Id ? null : (null != directory.Id ? directory.Id : this.fragments.Count.ToString()))), fragment);
480
481 // move the Directory from the root element to the Fragment
482 this.rootElement.RemoveChild(directory);
483 fragment.AddChild(directory);
484 }
485 }
486 }
487 }
488
489 /// <summary>
490 /// Mutate the files.
491 /// </summary>
492 private void MutateFiles()
493 {
494 IdentifierGenerator identifierGenerator = new IdentifierGenerator("File", this.Core);
495 if (TemplateType.Module == this.templateType)
496 {
497 identifierGenerator.MaxIdentifierLength = IdentifierGenerator.MaxModuleIdentifierLength;
498 }
499
500 foreach (Wix.File file in this.files)
501 {
502 if (null == file.Id)
503 {
504 file.Id = identifierGenerator.GetIdentifier(Path.GetFileName(file.Source));
505 }
506 }
507 }
508
509 /// <summary>
510 /// Mutate a Wix element.
511 /// </summary>
512 /// <param name="wix">The Wix element to mutate.</param>
513 private void MutateWix(Wix.Wix wix)
514 {
515 if (TemplateType.Fragment != this.templateType)
516 {
517 if (null != this.rootElement || 0 != this.features.Count)
518 {
519 throw new Exception("The template option cannot be used with Feature, Package, or Module elements present.");
520 }
521
522 // create a package element although it won't always be used
523 Wix.SummaryInformation package = new Wix.SummaryInformation();
524 if (TemplateType.Module == this.templateType)
525 {
526 package.Id = this.GetGuid();
527 }
528 else
529 {
530 package.Compressed = Wix.YesNoType.yes;
531 }
532
533 package.InstallerVersion = 200;
534
535 Wix.Directory targetDir = new Wix.Directory();
536 targetDir.Id = "TARGETDIR";
537 targetDir.Name = "SourceDir";
538
539 foreach (Wix.DirectoryRef directoryRef in this.directoryRefs)
540 {
541 if (String.Equals(directoryRef.Id, "TARGETDIR", StringComparison.OrdinalIgnoreCase))
542 {
543 Wix.IParentElement parent = directoryRef.ParentElement as Wix.IParentElement;
544
545 foreach (Wix.ISchemaElement element in directoryRef.Children)
546 {
547 targetDir.AddChild(element);
548 }
549
550 parent.RemoveChild(directoryRef);
551
552 if (null != ((Wix.ISchemaElement)parent).ParentElement)
553 {
554 int i = 0;
555
556 foreach (Wix.ISchemaElement element in parent.Children)
557 {
558 i++;
559 }
560
561 if (0 == i)
562 {
563 Wix.IParentElement supParent = (Wix.IParentElement)((Wix.ISchemaElement)parent).ParentElement;
564 supParent.RemoveChild((Wix.ISchemaElement)parent);
565 }
566 }
567
568 break;
569 }
570 }
571
572 if (TemplateType.Module == this.templateType)
573 {
574 Wix.Module module = new Wix.Module();
575 module.Id = "PUT-MODULE-NAME-HERE";
576 module.Language = "1033";
577 module.Version = "1.0.0.0";
578
579 package.Manufacturer = "PUT-COMPANY-NAME-HERE";
580 module.AddChild(package);
581 module.AddChild(targetDir);
582
583 wix.AddChild(module);
584 this.rootElement = module;
585 }
586 else // product
587 {
588 Wix.Package product = new Wix.Package();
589 product.Id = this.GetGuid();
590 product.Language = "1033";
591 product.Manufacturer = "PUT-COMPANY-NAME-HERE";
592 product.Name = "PUT-PRODUCT-NAME-HERE";
593 product.UpgradeCode = this.GetGuid();
594 product.Version = "1.0.0.0";
595 product.AddChild(package);
596 product.AddChild(targetDir);
597
598 Wix.Media media = new Wix.Media();
599 media.Id = "1";
600 media.Cabinet = "product.cab";
601 media.EmbedCab = Wix.YesNoType.yes;
602 product.AddChild(media);
603
604 Wix.Feature feature = new Wix.Feature();
605 feature.Id = "ProductFeature";
606 feature.Title = "PUT-FEATURE-TITLE-HERE";
607 feature.Level = 1;
608 product.AddChild(feature);
609 this.features.Add(feature);
610
611 wix.AddChild(product);
612 this.rootElement = product;
613 }
614 }
615 }
616
617 /// <summary>
618 /// Get a generated guid or a placeholder for a guid.
619 /// </summary>
620 /// <returns>A generated guid or placeholder.</returns>
621 private string GetGuid()
622 {
623 if (this.generateGuids)
624 {
625 return Guid.NewGuid().ToString(this.guidFormat, CultureInfo.InvariantCulture).ToUpper(CultureInfo.InvariantCulture);
626 }
627 else
628 {
629 return "PUT-GUID-HERE";
630 }
631 }
632 }
633}
diff --git a/src/wix/heat/UtilTransformMutator.cs b/src/wix/heat/UtilTransformMutator.cs
new file mode 100644
index 00000000..f4dda3c5
--- /dev/null
+++ b/src/wix/heat/UtilTransformMutator.cs
@@ -0,0 +1,77 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.IO;
7 using System.Xml;
8 using System.Xml.Xsl;
9 using WixToolset.Harvesters.Data;
10 using WixToolset.Harvesters.Extensibility;
11
12 internal class UtilTransformMutator : BaseMutatorExtension
13 {
14 private string transform;
15 private int transformSequence;
16
17 /// <summary>
18 /// Instantiate a new UtilTransformMutator.
19 /// </summary>
20 /// <param name="transform">Path to the XSL transform file.</param>
21 /// <param name="transformSequence">Order in which the transform should be applied,
22 /// relative to other transforms.</param>
23 public UtilTransformMutator(string transform, int transformSequence)
24 {
25 this.transform = transform;
26 this.transformSequence = transformSequence;
27 }
28
29 /// <summary>
30 /// Gets the sequence of the extension.
31 /// </summary>
32 /// <value>The sequence of the extension.</value>
33 public override int Sequence
34 {
35 get { return 3000 + this.transformSequence; }
36 }
37
38 /// <summary>
39 /// Mutate a WiX document as a string.
40 /// </summary>
41 /// <param name="wixString">The Wix document element as a string.</param>
42 /// <returns>The mutated Wix document as a string.</returns>
43 public override string Mutate(string wixString)
44 {
45 try
46 {
47 XslCompiledTransform xslt = new XslCompiledTransform();
48 xslt.Load(this.transform, XsltSettings.TrustedXslt, new XmlUrlResolver());
49
50 using (XmlTextReader xmlReader = new XmlTextReader(new StringReader(wixString)))
51 {
52 using (StringWriter stringWriter = new StringWriter())
53 {
54 XmlWriterSettings xmlSettings = new XmlWriterSettings();
55 xmlSettings.Indent = true;
56 xmlSettings.IndentChars = " ";
57 xmlSettings.OmitXmlDeclaration = true;
58
59 using (XmlWriter xmlWriter = XmlWriter.Create(stringWriter, xmlSettings))
60 {
61 xslt.Transform(xmlReader, xmlWriter);
62 }
63
64 wixString = stringWriter.ToString();
65 }
66 }
67 }
68 catch (Exception ex)
69 {
70 this.Core.Messaging.Write(HarvesterErrors.ErrorTransformingHarvestedWiX(this.transform, ex.Message));
71 return null;
72 }
73
74 return wixString;
75 }
76 }
77}
diff --git a/src/wix/heat/VSHeatExtension.cs b/src/wix/heat/VSHeatExtension.cs
new file mode 100644
index 00000000..7c0539bf
--- /dev/null
+++ b/src/wix/heat/VSHeatExtension.cs
@@ -0,0 +1,229 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.Collections;
7 using WixToolset.Data;
8 using WixToolset.Harvesters.Data;
9 using WixToolset.Harvesters.Extensibility;
10
11 /// <summary>
12 /// Defines generated element types.
13 /// </summary>
14 internal enum GenerateType
15 {
16 /// <summary>Generate Components.</summary>
17 Components,
18
19 /// <summary>Generate a Container with Payloads.</summary>
20 Container,
21
22 /// <summary>Generate a Bundle PackageGroups.</summary>
23 PackageGroup,
24
25 /// <summary>Generate a PayloadGroup with Payloads.</summary>
26 PayloadGroup,
27 }
28
29 /// <summary>
30 /// VS-related extensions for the WiX Toolset Harvester application.
31 /// </summary>
32 internal class VSHeatExtension : BaseHeatExtension
33 {
34 /// <summary>
35 /// Gets the supported command line types for this extension.
36 /// </summary>
37 /// <value>The supported command line types for this extension.</value>
38 public override HeatCommandLineOption[] CommandLineTypes
39 {
40 get
41 {
42 return new HeatCommandLineOption[]
43 {
44 new HeatCommandLineOption("project", "harvest outputs of a VS project"),
45 new HeatCommandLineOption("-configuration", "configuration to set when harvesting the project"),
46 new HeatCommandLineOption("-directoryid", "overridden directory id for generated directory elements"),
47 new HeatCommandLineOption("-generate", Environment.NewLine +
48 " specify what elements to generate, one of:" + Environment.NewLine +
49 " components, container, payloadgroup, packagegroup" + Environment.NewLine +
50 " (default is components)"),
51 new HeatCommandLineOption("-msbuildbinpath", "msbuild bin directory path"),
52 new HeatCommandLineOption("-platform", "platform to set when harvesting the project"),
53 new HeatCommandLineOption("-pog", Environment.NewLine +
54 " specify output group of VS project, one of:" + Environment.NewLine +
55 " " + String.Join(",", VSProjectHarvester.GetOutputGroupNames()) + Environment.NewLine +
56 " This option may be repeated for multiple output groups."),
57 new HeatCommandLineOption("-projectname", "overridden project name to use in variables"),
58 new HeatCommandLineOption("-usetoolsversion", "ignore msbuildbinpath if project specifies known msbuild version"),
59 new HeatCommandLineOption("-wixvar", "generate binder variables instead of preprocessor variables"),
60 };
61 }
62 }
63
64 /// <summary>
65 /// Parse the command line options for this extension.
66 /// </summary>
67 /// <param name="type">The active harvester type.</param>
68 /// <param name="args">The option arguments.</param>
69 public override void ParseOptions(string type, string[] args)
70 {
71 if ("project" == type)
72 {
73 string[] allOutputGroups = VSProjectHarvester.GetOutputGroupNames();
74 bool suppressUniqueId = false;
75 bool generateWixVars = false;
76 bool useToolsVersion = false;
77 GenerateType generateType = GenerateType.Components;
78 string directoryIds = null;
79 string msbuildBinPath = null;
80 string projectName = null;
81 string configuration = null;
82 string platform = null;
83 ArrayList outputGroups = new ArrayList();
84
85 for (int i = 0; i < args.Length; i++)
86 {
87 if ("-configuration" == args[i])
88 {
89 configuration = args[++i];
90 }
91 else if ("-directoryid" == args[i])
92 {
93 if (!IsValidArg(args, ++i))
94 {
95 throw new WixException(HarvesterErrors.InvalidDirectoryId(args[i]));
96 }
97
98 directoryIds = args[i];
99 }
100 else if ("-generate" == args[i])
101 {
102 if (!IsValidArg(args, ++i))
103 {
104 throw new WixException(HarvesterErrors.InvalidProjectOutputType(args[i]));
105 }
106
107 string genType = args[i].ToUpperInvariant();
108 switch(genType)
109 {
110 case "CONTAINER":
111 generateType = GenerateType.Container;
112 break;
113 case "COMPONENTS":
114 generateType = GenerateType.Components;
115 break;
116 case "PACKAGEGROUP":
117 generateType = GenerateType.PackageGroup;
118 break;
119 case "PAYLOADGROUP":
120 generateType = GenerateType.PayloadGroup;
121 break;
122 default:
123 throw new WixException(HarvesterErrors.InvalidProjectOutputType(genType));
124 }
125 }
126 else if ("-msbuildbinpath" == args[i])
127 {
128 if (!IsValidArg(args, ++i))
129 {
130 throw new WixException(HarvesterErrors.ArgumentRequiresValue(args[i-1]));
131 }
132
133 msbuildBinPath = args[i];
134 }
135 else if ("-platform" == args[i])
136 {
137 platform = args[++i];
138 }
139 else if ("-pog" == args[i])
140 {
141 if (!IsValidArg(args, ++i))
142 {
143 throw new WixException(HarvesterErrors.InvalidOutputGroup(args[i]));
144 }
145
146 string pogName = args[i];
147 bool found = false;
148 foreach (string availableOutputGroup in allOutputGroups)
149 {
150 if (String.Equals(pogName, availableOutputGroup, StringComparison.Ordinal))
151 {
152 outputGroups.Add(availableOutputGroup);
153 found = true;
154 break;
155 }
156 }
157
158 if (!found)
159 {
160 throw new WixException(HarvesterErrors.InvalidOutputGroup(pogName));
161 }
162 }
163 else if (args[i].StartsWith("-pog:", StringComparison.Ordinal))
164 {
165 this.Core.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("pog:", "pog"));
166
167 string pogName = args[i].Substring(5);
168 bool found = false;
169 foreach (string availableOutputGroup in allOutputGroups)
170 {
171 if (String.Equals(pogName, availableOutputGroup, StringComparison.Ordinal))
172 {
173 outputGroups.Add(availableOutputGroup);
174 found = true;
175 break;
176 }
177 }
178
179 if (!found)
180 {
181 throw new WixException(HarvesterErrors.InvalidOutputGroup(pogName));
182 }
183 }
184 else if ("-projectname" == args[i])
185 {
186 if (!IsValidArg(args, ++i))
187 {
188 throw new WixException(HarvesterErrors.InvalidProjectName(args[i]));
189 }
190
191 projectName = args[i];
192 }
193 else if ("-suid" == args[i])
194 {
195 suppressUniqueId = true;
196 }
197 else if ("-usetoolsversion" == args[i])
198 {
199 useToolsVersion = true;
200 }
201 else if ("-wixvar" == args[i])
202 {
203 generateWixVars = true;
204 }
205 }
206
207 if (outputGroups.Count == 0)
208 {
209 throw new WixException(HarvesterErrors.NoOutputGroupSpecified());
210 }
211
212 VSProjectHarvester harvester = new VSProjectHarvester(
213 (string[]) outputGroups.ToArray(typeof(string)));
214
215 harvester.SetUniqueIdentifiers = !suppressUniqueId;
216 harvester.GenerateWixVars = generateWixVars;
217 harvester.GenerateType = generateType;
218 harvester.DirectoryIds = directoryIds;
219 harvester.MsbuildBinPath = msbuildBinPath;
220 harvester.ProjectName = projectName;
221 harvester.Configuration = configuration;
222 harvester.Platform = platform;
223 harvester.UseToolsVersion = String.IsNullOrEmpty(msbuildBinPath) || useToolsVersion;
224
225 this.Core.Harvester.Extension = harvester;
226 }
227 }
228 }
229}
diff --git a/src/wix/heat/VSProjectHarvester.cs b/src/wix/heat/VSProjectHarvester.cs
new file mode 100644
index 00000000..115ee828
--- /dev/null
+++ b/src/wix/heat/VSProjectHarvester.cs
@@ -0,0 +1,1455 @@
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
3namespace WixToolset.Harvesters
4{
5 using System;
6 using System.IO;
7 using System.Reflection;
8 using System.Collections;
9 using System.Collections.Generic;
10 using System.Globalization;
11 using System.Text.RegularExpressions;
12 using System.Xml;
13 using WixToolset.Data;
14 using WixToolset.Extensibility.Services;
15 using WixToolset.Harvesters.Data;
16 using WixToolset.Harvesters.Extensibility;
17 using Wix = WixToolset.Harvesters.Serialize;
18
19 /// <summary>
20 /// Harvest WiX authoring for the outputs of a VS project.
21 /// </summary>
22 internal class VSProjectHarvester : BaseHarvesterExtension
23 {
24 // These format strings are used for generated element identifiers.
25 // {0} = project name
26 // {1} = POG name
27 // {2} = file name
28 private const string DirectoryIdFormat = "{0}.{1}";
29 private const string ComponentIdFormat = "{0}.{1}.{2}";
30 private const string FileIdFormat = "{0}.{1}.{2}";
31 private const string VariableFormat = "$(var.{0}.{1})";
32 private const string WixVariableFormat = "!(wix.{0}.{1})";
33
34 private const string ComponentPrefix = "cmp";
35 private const string DirectoryPrefix = "dir";
36 private const string FilePrefix = "fil";
37
38 private string projectGUID;
39 private string directoryIds;
40 private string directoryRefSeed;
41 private string projectName;
42 private string configuration;
43 private string platform;
44 private bool setUniqueIdentifiers;
45 private GenerateType generateType;
46 private bool generateWixVars;
47
48
49 private static readonly ProjectOutputGroup[] allOutputGroups = new ProjectOutputGroup[]
50 {
51 new ProjectOutputGroup("Binaries", "BuiltProjectOutputGroup", "TargetDir"),
52 new ProjectOutputGroup("Symbols", "DebugSymbolsProjectOutputGroup", "TargetDir"),
53 new ProjectOutputGroup("Documents", "DocumentationProjectOutputGroup", "ProjectDir"),
54 new ProjectOutputGroup("Satellites", "SatelliteDllsProjectOutputGroup", "TargetDir"),
55 new ProjectOutputGroup("Sources", "SourceFilesProjectOutputGroup", "ProjectDir"),
56 new ProjectOutputGroup("Content", "ContentFilesProjectOutputGroup", "ProjectDir"),
57 };
58
59 private string[] outputGroups;
60
61 /// <summary>
62 /// Instantiate a new VSProjectHarvester.
63 /// </summary>
64 /// <param name="outputGroups">List of project output groups to harvest.</param>
65 public VSProjectHarvester(string[] outputGroups)
66 {
67 if (outputGroups == null)
68 {
69 throw new ArgumentNullException("outputGroups");
70 }
71
72 this.outputGroups = outputGroups;
73 }
74
75 /// <summary>
76 /// Gets or sets the configuration to set when harvesting.
77 /// </summary>
78 /// <value>The configuration to set when harvesting.</value>
79 public string Configuration
80 {
81 get { return this.configuration; }
82 set { this.configuration = value; }
83 }
84
85 public string DirectoryIds
86 {
87 get { return this.directoryIds; }
88 set { this.directoryIds = value; }
89 }
90
91 /// <summary>
92 /// Gets or sets what type of elements are to be generated.
93 /// </summary>
94 /// <value>The type of elements being generated.</value>
95 public GenerateType GenerateType
96 {
97 get { return this.generateType; }
98 set { this.generateType = value; }
99 }
100
101 /// <summary>
102 /// Gets or sets whether or not to use wix variables.
103 /// </summary>
104 /// <value>Whether or not to use wix variables.</value>
105 public bool GenerateWixVars
106 {
107 get { return this.generateWixVars; }
108 set { this.generateWixVars = value; }
109 }
110
111 /// <summary>
112 /// Gets or sets the location to load MSBuild from.
113 /// </summary>
114 public string MsbuildBinPath { get; set; }
115
116 /// <summary>
117 /// Gets or sets the platform to set when harvesting.
118 /// </summary>
119 /// <value>The platform to set when harvesting.</value>
120 public string Platform
121 {
122 get { return this.platform; }
123 set { this.platform = value; }
124 }
125
126 /// <summary>
127 /// Gets or sets the project name to use in wix variables.
128 /// </summary>
129 /// <value>The project name to use in wix variables.</value>
130 public string ProjectName
131 {
132 get { return this.projectName; }
133 set { this.projectName = value; }
134 }
135
136 /// <summary>
137 /// Gets or sets the option to set unique identifiers.
138 /// </summary>
139 /// <value>The option to set unique identifiers.</value>
140 public bool SetUniqueIdentifiers
141 {
142 get { return this.setUniqueIdentifiers; }
143 set { this.setUniqueIdentifiers = value; }
144 }
145
146 /// <summary>
147 /// Gets or sets whether to ignore MsbuildBinPath when the project file specifies a known MSBuild version.
148 /// </summary>
149 public bool UseToolsVersion { get; set; }
150
151 /// <summary>
152 /// Gets a list of friendly output group names that will be recognized on the command-line.
153 /// </summary>
154 /// <returns>Array of output group names.</returns>
155 public static string[] GetOutputGroupNames()
156 {
157 string[] names = new string[VSProjectHarvester.allOutputGroups.Length];
158 for (int i = 0; i < names.Length; i++)
159 {
160 names[i] = VSProjectHarvester.allOutputGroups[i].Name;
161 }
162 return names;
163 }
164
165 /// <summary>
166 /// Harvest a VS project.
167 /// </summary>
168 /// <param name="argument">The path of the VS project file.</param>
169 /// <returns>The harvested directory.</returns>
170 public override Wix.Fragment[] Harvest(string argument)
171 {
172 if (null == argument)
173 {
174 throw new ArgumentNullException("argument");
175 }
176
177 if (!System.IO.File.Exists(argument))
178 {
179 throw new FileNotFoundException(argument);
180 }
181
182 // Match specified output group names to available POG structures
183 // and collect list of build output groups to pass to MSBuild.
184 ProjectOutputGroup[] pogs = new ProjectOutputGroup[this.outputGroups.Length];
185 string[] buildOutputGroups = new string[this.outputGroups.Length];
186 for (int i = 0; i < this.outputGroups.Length; i++)
187 {
188 foreach (ProjectOutputGroup pog in VSProjectHarvester.allOutputGroups)
189 {
190 if (pog.Name == this.outputGroups[i])
191 {
192 pogs[i] = pog;
193 buildOutputGroups[i] = pog.BuildOutputGroup;
194 }
195 }
196
197 if (buildOutputGroups[i] == null)
198 {
199 throw new WixException(HarvesterErrors.InvalidOutputGroup(this.outputGroups[i]));
200 }
201 }
202
203 string projectFile = Path.GetFullPath(argument);
204
205 IDictionary buildOutputs = this.GetProjectBuildOutputs(projectFile, buildOutputGroups);
206
207 ArrayList fragmentList = new ArrayList();
208
209 for (int i = 0; i < pogs.Length; i++)
210 {
211 this.HarvestProjectOutputGroup(projectFile, buildOutputs, pogs[i], fragmentList);
212 }
213
214 return (Wix.Fragment[]) fragmentList.ToArray(typeof(Wix.Fragment));
215 }
216
217 /// <summary>
218 /// Runs MSBuild on a project file to get the list of filenames for the specified output groups.
219 /// </summary>
220 /// <param name="projectFile">VS MSBuild project file to load.</param>
221 /// <param name="buildOutputGroups">List of MSBuild output group names.</param>
222 /// <returns>Dictionary mapping output group names to lists of filenames in the group.</returns>
223 private IDictionary GetProjectBuildOutputs(string projectFile, string[] buildOutputGroups)
224 {
225 MSBuildProject project = this.GetMsbuildProject(projectFile);
226
227 project.Load(projectFile);
228
229 IDictionary buildOutputs = new Hashtable();
230
231 string originalDirectory = System.IO.Directory.GetCurrentDirectory();
232 System.IO.Directory.SetCurrentDirectory(Path.GetDirectoryName(projectFile));
233 bool buildSuccess = false;
234 try
235 {
236 buildSuccess = project.Build(projectFile, buildOutputGroups, buildOutputs);
237 }
238 finally
239 {
240 System.IO.Directory.SetCurrentDirectory(originalDirectory);
241 }
242
243 if (!buildSuccess)
244 {
245 throw new WixException(HarvesterErrors.BuildFailed());
246 }
247
248 this.projectGUID = project.GetEvaluatedProperty("ProjectGuid");
249
250 if (null == this.projectGUID)
251 {
252 throw new WixException(HarvesterErrors.BuildFailed());
253 }
254
255 IDictionary newDictionary = new Dictionary<object, object>();
256 foreach (string buildOutput in buildOutputs.Keys)
257 {
258 IEnumerable buildOutputFiles = buildOutputs[buildOutput] as IEnumerable;
259
260 bool hasFiles = false;
261
262 foreach (object file in buildOutputFiles)
263 {
264 hasFiles = true;
265 break;
266 }
267
268 // Try the item group if no outputs
269 if (!hasFiles)
270 {
271 IEnumerable itemFiles = project.GetEvaluatedItemsByName(String.Concat(buildOutput, "Output"));
272 List<object> itemFileList = new List<object>();
273
274 // Get each BuildItem and add the file path to our list
275 foreach (object itemFile in itemFiles)
276 {
277 itemFileList.Add(project.GetBuildItem(itemFile));
278 }
279
280 // Use our list for this build output
281 newDictionary.Add(buildOutput, itemFileList);
282 }
283 else
284 {
285 newDictionary.Add(buildOutput, buildOutputFiles);
286 }
287 }
288
289 return newDictionary;
290 }
291
292 /// <summary>
293 /// Creates WiX fragments for files in one output group.
294 /// </summary>
295 /// <param name="projectFile">VS MSBuild project file.</param>
296 /// <param name="buildOutputs">Dictionary of build outputs retrieved from an MSBuild run on the project file.</param>
297 /// <param name="pog">Project output group parameters.</param>
298 /// <param name="fragmentList">List to which generated fragments will be added.</param>
299 /// <returns>Count of harvested files.</returns>
300 private int HarvestProjectOutputGroup(string projectFile, IDictionary buildOutputs, ProjectOutputGroup pog, IList fragmentList)
301 {
302 string projectName = Path.GetFileNameWithoutExtension(projectFile);
303 string projectBaseDir = null;
304
305 if (this.ProjectName != null)
306 {
307 projectName = this.ProjectName;
308 }
309
310 string sanitizedProjectName = this.Core.CreateIdentifierFromFilename(projectName);
311
312 Wix.IParentElement harvestParent;
313
314 if (this.GenerateType == GenerateType.Container)
315 {
316 Wix.Container container = new Wix.Container();
317 harvestParent = container;
318
319 container.Name = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name);
320 }
321 else if (this.GenerateType == GenerateType.PayloadGroup)
322 {
323 Wix.PayloadGroup payloadGroup = new Wix.PayloadGroup();
324 harvestParent = payloadGroup;
325
326 payloadGroup.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name);
327 }
328 else if (this.GenerateType == GenerateType.PackageGroup)
329 {
330 Wix.PackageGroup packageGroup = new Wix.PackageGroup();
331 harvestParent = packageGroup;
332
333 packageGroup.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name);
334 }
335 else
336 {
337 Wix.DirectoryRef directoryRef = new Wix.DirectoryRef();
338 harvestParent = directoryRef;
339
340 if (!String.IsNullOrEmpty(this.directoryIds))
341 {
342 directoryRef.Id = this.directoryIds;
343 }
344 else if (this.setUniqueIdentifiers)
345 {
346 directoryRef.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name);
347 }
348 else
349 {
350 directoryRef.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name));
351 }
352
353 this.directoryRefSeed = this.Core.GenerateIdentifier(DirectoryPrefix, this.projectGUID, pog.Name);
354 }
355
356 IEnumerable pogFiles = buildOutputs[pog.BuildOutputGroup] as IEnumerable;
357 if (pogFiles == null)
358 {
359 throw new WixException(HarvesterErrors.MissingProjectOutputGroup(
360 projectFile, pog.BuildOutputGroup));
361 }
362
363 if (pog.FileSource == "ProjectDir")
364 {
365 projectBaseDir = Path.GetDirectoryName(projectFile) + "\\";
366 }
367
368 int harvestCount = this.HarvestProjectOutputGroupFiles(projectBaseDir, projectName, pog.Name, pog.FileSource, pogFiles, harvestParent);
369
370 if (this.GenerateType == GenerateType.Container)
371 {
372 // harvestParent must be a Container at this point
373 Wix.Container container = harvestParent as Wix.Container;
374
375 Wix.Fragment fragment = new Wix.Fragment();
376 fragment.AddChild(container);
377 fragmentList.Add(fragment);
378 }
379 else if (this.GenerateType == GenerateType.PackageGroup)
380 {
381 // harvestParent must be a PackageGroup at this point
382 Wix.PackageGroup packageGroup = harvestParent as Wix.PackageGroup;
383
384 Wix.Fragment fragment = new Wix.Fragment();
385 fragment.AddChild(packageGroup);
386 fragmentList.Add(fragment);
387 }
388 else if (this.GenerateType == GenerateType.PayloadGroup)
389 {
390 // harvestParent must be a Container at this point
391 Wix.PayloadGroup payloadGroup = harvestParent as Wix.PayloadGroup;
392
393 Wix.Fragment fragment = new Wix.Fragment();
394 fragment.AddChild(payloadGroup);
395 fragmentList.Add(fragment);
396 }
397 else
398 {
399 // harvestParent must be a DirectoryRef at this point
400 Wix.DirectoryRef directoryRef = harvestParent as Wix.DirectoryRef;
401
402 if (harvestCount > 0)
403 {
404 Wix.Fragment drf = new Wix.Fragment();
405 drf.AddChild(directoryRef);
406 fragmentList.Add(drf);
407 }
408
409 Wix.ComponentGroup cg = new Wix.ComponentGroup();
410
411 if (this.setUniqueIdentifiers || !String.IsNullOrEmpty(this.directoryIds))
412 {
413 cg.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name);
414 }
415 else
416 {
417 cg.Id = directoryRef.Id;
418 }
419
420 if (harvestCount > 0)
421 {
422 this.AddComponentsToComponentGroup(directoryRef, cg);
423 }
424
425 Wix.Fragment cgf = new Wix.Fragment();
426 cgf.AddChild(cg);
427 fragmentList.Add(cgf);
428 }
429
430 return harvestCount;
431 }
432
433 /// <summary>
434 /// Add all Components in an element tree to a ComponentGroup.
435 /// </summary>
436 /// <param name="parent">Parent of an element tree that will be searched for Components.</param>
437 /// <param name="cg">The ComponentGroup the Components will be added to.</param>
438 private void AddComponentsToComponentGroup(Wix.IParentElement parent, Wix.ComponentGroup cg)
439 {
440 foreach (Wix.ISchemaElement childElement in parent.Children)
441 {
442 Wix.Component c = childElement as Wix.Component;
443 if (c != null)
444 {
445 Wix.ComponentRef cr = new Wix.ComponentRef();
446 cr.Id = c.Id;
447 cg.AddChild(cr);
448 }
449 else
450 {
451 Wix.IParentElement p = childElement as Wix.IParentElement;
452 if (p != null)
453 {
454 this.AddComponentsToComponentGroup(p, cg);
455 }
456 }
457 }
458 }
459
460 /// <summary>
461 /// Harvest files from one output group of a VS project.
462 /// </summary>
463 /// <param name="baseDir">The base directory of the files.</param>
464 /// <param name="projectName">Name of the project, to be used as a prefix for generated identifiers.</param>
465 /// <param name="pogName">Name of the project output group, used for generating identifiers for WiX elements.</param>
466 /// <param name="pogFileSource">The ProjectOutputGroup file source.</param>
467 /// <param name="outputGroupFiles">The files from one output group to harvest.</param>
468 /// <param name="parent">The parent element that will contain the components of the harvested files.</param>
469 /// <returns>The number of files harvested.</returns>
470 private int HarvestProjectOutputGroupFiles(string baseDir, string projectName, string pogName, string pogFileSource, IEnumerable outputGroupFiles, Wix.IParentElement parent)
471 {
472 int fileCount = 0;
473
474 Wix.ISchemaElement exeFile = null;
475 Wix.ISchemaElement dllFile = null;
476 Wix.ISchemaElement appConfigFile = null;
477
478 // Keep track of files inserted
479 // Files can have different absolute paths but get mapped to the same SourceFile
480 // after the project variables have been used. For example, a WiX project that
481 // is building multiple cultures will have many output MSIs/MSMs, but will all get
482 // mapped to $(var.ProjName.TargetDir)\ProjName.msm. These duplicates would
483 // prevent generated code from compiling.
484 Dictionary<string, bool> seenList = new Dictionary<string,bool>();
485
486 foreach (object output in outputGroupFiles)
487 {
488 string filePath = output.ToString();
489 string fileName = Path.GetFileName(filePath);
490 string fileDir = Path.GetDirectoryName(filePath);
491 string link = null;
492
493 MethodInfo getMetadataMethod = output.GetType().GetMethod("GetMetadata");
494 if (getMetadataMethod != null)
495 {
496 link = (string)getMetadataMethod.Invoke(output, new object[] { "Link" });
497 if (!String.IsNullOrEmpty(link))
498 {
499 fileDir = Path.GetDirectoryName(Path.Combine(baseDir, link));
500 }
501 }
502
503 Wix.IParentElement parentDir = parent;
504 // Ignore Containers and PayloadGroups because they do not have a nested structure.
505 if (baseDir != null && !String.Equals(Path.GetDirectoryName(baseDir), fileDir, StringComparison.OrdinalIgnoreCase)
506 && this.GenerateType != GenerateType.Container && this.GenerateType != GenerateType.PackageGroup && this.GenerateType != GenerateType.PayloadGroup)
507 {
508 Uri baseUri = new Uri(baseDir);
509 Uri relativeUri = baseUri.MakeRelativeUri(new Uri(fileDir));
510 parentDir = this.GetSubDirElement(parentDir, relativeUri);
511 }
512
513 string parentDirId = null;
514
515 if (parentDir is Wix.DirectoryRef)
516 {
517 parentDirId = this.directoryRefSeed;
518 }
519 else if (parentDir is Wix.Directory)
520 {
521 parentDirId = ((Wix.Directory)parentDir).Id;
522 }
523
524 if (this.GenerateType == GenerateType.Container || this.GenerateType == GenerateType.PayloadGroup)
525 {
526 Wix.Payload payload = new Wix.Payload();
527
528 this.HarvestProjectOutputGroupPayloadFile(baseDir, projectName, pogName, pogFileSource, filePath, fileName, link, parentDir, payload, seenList);
529 }
530 else if (this.GenerateType == GenerateType.PackageGroup)
531 {
532 this.HarvestProjectOutputGroupPackage(projectName, pogName, pogFileSource, filePath, fileName, link, parentDir, seenList);
533 }
534 else
535 {
536 Wix.Component component = new Wix.Component();
537 Wix.File file = new Wix.File();
538
539 this.HarvestProjectOutputGroupFile(baseDir, projectName, pogName, pogFileSource, filePath, fileName, link, parentDir, parentDirId, component, file, seenList);
540
541 if (String.Equals(Path.GetExtension(file.Source), ".exe", StringComparison.OrdinalIgnoreCase))
542 {
543 exeFile = file;
544 }
545 else if (String.Equals(Path.GetExtension(file.Source), ".dll", StringComparison.OrdinalIgnoreCase))
546 {
547 dllFile = file;
548 }
549 else if (file.Source.EndsWith("app.config", StringComparison.OrdinalIgnoreCase))
550 {
551 appConfigFile = file;
552 }
553 }
554
555 fileCount++;
556 }
557
558 // if there was no exe file found fallback on the dll file found
559 if (exeFile == null && dllFile != null)
560 {
561 exeFile = dllFile;
562 }
563
564 // Special case for the app.config file in the Binaries POG...
565 // The POG refers to the files in the OBJ directory, while the
566 // generated WiX code references them in the bin directory.
567 // The app.config file gets renamed to match the exe name.
568 if ("Binaries" == pogName && null != exeFile && null != appConfigFile)
569 {
570 if (appConfigFile is Wix.File)
571 {
572 Wix.File appConfigFileAsWixFile = appConfigFile as Wix.File;
573 Wix.File exeFileAsWixFile = exeFile as Wix.File;
574 // Case insensitive replace
575 appConfigFileAsWixFile.Source = Regex.Replace(appConfigFileAsWixFile.Source, @"app\.config", Path.GetFileName(exeFileAsWixFile.Source) + ".config", RegexOptions.IgnoreCase);
576 }
577 }
578
579 return fileCount;
580 }
581
582 private void HarvestProjectOutputGroupFile(string baseDir, string projectName, string pogName, string pogFileSource, string filePath, string fileName, string link, Wix.IParentElement parentDir, string parentDirId, Wix.Component component, Wix.File file, Dictionary<string, bool> seenList)
583 {
584 string varFormat = VariableFormat;
585 if (this.generateWixVars)
586 {
587 varFormat = WixVariableFormat;
588 }
589
590 if (pogName.Equals("Satellites", StringComparison.OrdinalIgnoreCase))
591 {
592 Wix.Directory locDirectory = new Wix.Directory();
593
594 locDirectory.Name = Path.GetFileName(Path.GetDirectoryName(Path.GetFullPath(filePath)));
595 file.Source = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", locDirectory.Name, "\\", Path.GetFileName(filePath));
596
597 if (!seenList.ContainsKey(file.Source))
598 {
599 parentDir.AddChild(locDirectory);
600 locDirectory.AddChild(component);
601 component.AddChild(file);
602 seenList.Add(file.Source, true);
603
604 if (this.setUniqueIdentifiers)
605 {
606 locDirectory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, parentDirId, locDirectory.Name);
607 file.Id = this.Core.GenerateIdentifier(FilePrefix, locDirectory.Id, fileName);
608 component.Id = this.Core.GenerateIdentifier(ComponentPrefix, locDirectory.Id, file.Id);
609 }
610 else
611 {
612 locDirectory.Id = this.Core.CreateIdentifierFromFilename(String.Format(DirectoryIdFormat, (parentDir is Wix.DirectoryRef) ? ((Wix.DirectoryRef)parentDir).Id : parentDirId, locDirectory.Name));
613 file.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.FileIdFormat, projectName, pogName, String.Concat(locDirectory.Name, ".", fileName)));
614 component.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.ComponentIdFormat, projectName, pogName, String.Concat(locDirectory.Name, ".", fileName)));
615 }
616 }
617 }
618 else
619 {
620 file.Source = GenerateSourceFilePath(baseDir, projectName, pogFileSource, filePath, link, varFormat);
621
622 if (!seenList.ContainsKey(file.Source))
623 {
624 component.AddChild(file);
625 parentDir.AddChild(component);
626 seenList.Add(file.Source, true);
627
628 if (this.setUniqueIdentifiers)
629 {
630 file.Id = this.Core.GenerateIdentifier(FilePrefix, parentDirId, fileName);
631 component.Id = this.Core.GenerateIdentifier(ComponentPrefix, parentDirId, file.Id);
632 }
633 else
634 {
635 file.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.FileIdFormat, projectName, pogName, fileName));
636 component.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.ComponentIdFormat, projectName, pogName, fileName));
637 }
638 }
639 }
640 }
641
642 private void HarvestProjectOutputGroupPackage(string projectName, string pogName, string pogFileSource, string filePath, string fileName, string link, Wix.IParentElement parentDir, Dictionary<string, bool> seenList)
643 {
644 string varFormat = VariableFormat;
645 if (this.generateWixVars)
646 {
647 varFormat = WixVariableFormat;
648 }
649
650 if (pogName.Equals("Binaries", StringComparison.OrdinalIgnoreCase))
651 {
652 if (String.Equals(Path.GetExtension(filePath), ".exe", StringComparison.OrdinalIgnoreCase))
653 {
654 Wix.ExePackage exePackage = new Wix.ExePackage();
655 exePackage.SourceFile = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", Path.GetFileName(filePath));
656 if (!seenList.ContainsKey(exePackage.SourceFile))
657 {
658 parentDir.AddChild(exePackage);
659 seenList.Add(exePackage.SourceFile, true);
660 }
661 }
662 else if (String.Equals(Path.GetExtension(filePath), ".msi", StringComparison.OrdinalIgnoreCase))
663 {
664 Wix.MsiPackage msiPackage = new Wix.MsiPackage();
665 msiPackage.SourceFile = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", Path.GetFileName(filePath));
666 if (!seenList.ContainsKey(msiPackage.SourceFile))
667 {
668 parentDir.AddChild(msiPackage);
669 seenList.Add(msiPackage.SourceFile, true);
670 }
671 }
672 }
673 }
674
675 private void HarvestProjectOutputGroupPayloadFile(string baseDir, string projectName, string pogName, string pogFileSource, string filePath, string fileName, string link, Wix.IParentElement parentDir, Wix.Payload file, Dictionary<string, bool> seenList)
676 {
677 string varFormat = VariableFormat;
678 if (this.generateWixVars)
679 {
680 varFormat = WixVariableFormat;
681 }
682
683 if (pogName.Equals("Satellites", StringComparison.OrdinalIgnoreCase))
684 {
685 string locDirectoryName = Path.GetFileName(Path.GetDirectoryName(Path.GetFullPath(filePath)));
686 file.SourceFile = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", locDirectoryName, "\\", Path.GetFileName(filePath));
687
688 if (!seenList.ContainsKey(file.SourceFile))
689 {
690 parentDir.AddChild(file);
691 seenList.Add(file.SourceFile, true);
692 }
693 }
694 else
695 {
696 file.SourceFile = GenerateSourceFilePath(baseDir, projectName, pogFileSource, filePath, link, varFormat);
697
698 if (!seenList.ContainsKey(file.SourceFile))
699 {
700 parentDir.AddChild(file);
701 seenList.Add(file.SourceFile, true);
702 }
703 }
704 }
705
706 /// <summary>
707 /// Helper function to generates a source file path when harvesting files.
708 /// </summary>
709 /// <param name="baseDir"></param>
710 /// <param name="projectName"></param>
711 /// <param name="pogFileSource"></param>
712 /// <param name="filePath"></param>
713 /// <param name="link"></param>
714 /// <param name="varFormat"></param>
715 /// <returns></returns>
716 private static string GenerateSourceFilePath(string baseDir, string projectName, string pogFileSource, string filePath, string link, string varFormat)
717 {
718 string ret;
719
720 if (null == baseDir && !String.IsNullOrEmpty(link))
721 {
722 // This needs to be the absolute path as a link can be located anywhere.
723 ret = filePath;
724 }
725 else if (null == baseDir)
726 {
727 ret = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", Path.GetFileName(filePath));
728 }
729 else if (filePath.StartsWith(baseDir, StringComparison.OrdinalIgnoreCase))
730 {
731 ret = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", filePath.Substring(baseDir.Length));
732 }
733 else
734 {
735 // come up with a relative path to the file
736 Uri sourcePathUri = new Uri(filePath);
737 Uri baseDirUri = new Uri(baseDir);
738 Uri sourceRelativeUri = baseDirUri.MakeRelativeUri(sourcePathUri);
739 string relativePath = sourceRelativeUri.ToString().Replace('/', Path.DirectorySeparatorChar);
740 if (!sourceRelativeUri.UserEscaped)
741 {
742 relativePath = Uri.UnescapeDataString(relativePath);
743 }
744
745 ret = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", relativePath);
746 }
747
748 return ret;
749 }
750
751 /// <summary>
752 /// Gets a Directory element corresponding to a relative subdirectory within the project,
753 /// either by locating a suitable existing Directory or creating a new one.
754 /// </summary>
755 /// <param name="parentDir">The parent element which the subdirectory is relative to.</param>
756 /// <param name="relativeUri">Relative path of the subdirectory.</param>
757 /// <returns>Directory element for the relative path.</returns>
758 private Wix.IParentElement GetSubDirElement(Wix.IParentElement parentDir, Uri relativeUri)
759 {
760 string[] segments = relativeUri.ToString().Split('\\', '/');
761 string firstSubDirName = Uri.UnescapeDataString(segments[0]);
762 DirectoryAttributeAccessor subDir = null;
763
764 if (String.Equals(firstSubDirName, "..", StringComparison.Ordinal))
765 {
766 return parentDir;
767 }
768
769 Type directoryType;
770 Type directoryRefType;
771 if (parentDir is Wix.Directory || parentDir is Wix.DirectoryRef)
772 {
773 directoryType = typeof(Wix.Directory);
774 directoryRefType = typeof(Wix.DirectoryRef);
775 }
776 else
777 {
778 throw new ArgumentException("GetSubDirElement parentDir");
779 }
780
781 // Search for an existing directory element.
782 foreach (Wix.ISchemaElement childElement in parentDir.Children)
783 {
784 if(VSProjectHarvester.AreTypesEquivalent(childElement.GetType(), directoryType))
785 {
786 DirectoryAttributeAccessor childDir = new DirectoryAttributeAccessor(childElement);
787 if (String.Equals(childDir.Name, firstSubDirName, StringComparison.OrdinalIgnoreCase))
788 {
789 subDir = childDir;
790 break;
791 }
792 }
793 }
794
795 if (subDir == null)
796 {
797 string parentId = null;
798 DirectoryAttributeAccessor parentDirectory = null;
799 DirectoryAttributeAccessor parentDirectoryRef = null;
800
801 if (VSProjectHarvester.AreTypesEquivalent(parentDir.GetType(), directoryType))
802 {
803 parentDirectory = new DirectoryAttributeAccessor((Wix.ISchemaElement)parentDir);
804 }
805 else if (VSProjectHarvester.AreTypesEquivalent(parentDir.GetType(), directoryRefType))
806 {
807 parentDirectoryRef = new DirectoryAttributeAccessor((Wix.ISchemaElement)parentDir);
808 }
809
810 if (parentDirectory != null)
811 {
812 parentId = parentDirectory.Id;
813 }
814 else if (parentDirectoryRef != null)
815 {
816 if (this.setUniqueIdentifiers)
817 {
818 //Use the GUID of the project instead of the project name to help keep things stable.
819 parentId = this.directoryRefSeed;
820 }
821 else
822 {
823 parentId = parentDirectoryRef.Id;
824 }
825 }
826
827 Wix.ISchemaElement newDirectory = (Wix.ISchemaElement)directoryType.GetConstructor(new Type[] { }).Invoke(null);
828 subDir = new DirectoryAttributeAccessor(newDirectory);
829
830 if (this.setUniqueIdentifiers)
831 {
832 subDir.Id = this.Core.GenerateIdentifier(DirectoryPrefix, parentId, firstSubDirName);
833 }
834 else
835 {
836 subDir.Id = String.Format(DirectoryIdFormat, parentId, firstSubDirName);
837 }
838
839 subDir.Name = firstSubDirName;
840
841 parentDir.AddChild(subDir.Element);
842 }
843
844 if (segments.Length == 1)
845 {
846 return subDir.ElementAsParent;
847 }
848 else
849 {
850 Uri nextRelativeUri = new Uri(Uri.UnescapeDataString(relativeUri.ToString()).Substring(firstSubDirName.Length + 1), UriKind.Relative);
851 return this.GetSubDirElement(subDir.ElementAsParent, nextRelativeUri);
852 }
853 }
854
855 private MSBuildProject GetMsbuildProject(string projectFile)
856 {
857 XmlDocument document = new XmlDocument();
858 try
859 {
860 document.Load(projectFile);
861 }
862 catch (Exception e)
863 {
864 throw new WixException(HarvesterErrors.CannotLoadProject(projectFile, e.Message));
865 }
866
867 string version = null;
868
869 if (this.UseToolsVersion)
870 {
871 foreach (XmlNode child in document.ChildNodes)
872 {
873 if (String.Equals(child.Name, "Project", StringComparison.Ordinal) && child.Attributes != null)
874 {
875 XmlNode toolsVersionAttribute = child.Attributes["ToolsVersion"];
876 if (toolsVersionAttribute != null)
877 {
878 version = toolsVersionAttribute.Value;
879 this.Core.Messaging.Write(HarvesterVerboses.FoundToolsVersion(version));
880
881 break;
882 }
883 }
884 }
885
886 switch (version)
887 {
888 case "4.0":
889 version = "4.0.0.0";
890 break;
891 case "12.0":
892 version = "12.0.0.0";
893 break;
894 case "14.0":
895 version = "14.0.0.0";
896 break;
897 default:
898 if (String.IsNullOrEmpty(this.MsbuildBinPath))
899 {
900 throw new WixException(HarvesterErrors.MsbuildBinPathRequired(version ?? "(none)"));
901 }
902
903 version = null;
904 break;
905 }
906 }
907
908 var project = this.ConstructMsbuild40Project(version);
909 return project;
910 }
911
912 private Assembly ResolveFromMsbuildBinPath(object sender, ResolveEventArgs args)
913 {
914 var assemblyName = new AssemblyName(args.Name);
915
916 var assemblyPath = Path.Combine(this.MsbuildBinPath, $"{assemblyName.Name}.dll");
917 if (!File.Exists(assemblyPath))
918 {
919 return null;
920 }
921
922 return Assembly.LoadFrom(assemblyPath);
923 }
924
925 private MSBuildProject ConstructMsbuild40Project(string loadVersion)
926 {
927 const string MSBuildEngineAssemblyName = "Microsoft.Build, Version={0}, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
928 const string MSBuildFrameworkAssemblyName = "Microsoft.Build.Framework, Version={0}, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
929 Assembly msbuildAssembly;
930 Assembly msbuildFrameworkAssembly;
931
932 if (loadVersion == null)
933 {
934 this.Core.Messaging.Write(HarvesterVerboses.LoadingProjectWithBinPath(this.MsbuildBinPath));
935 AppDomain.CurrentDomain.AssemblyResolve += this.ResolveFromMsbuildBinPath;
936
937 try
938 {
939 msbuildAssembly = Assembly.Load("Microsoft.Build");
940 }
941 catch (Exception e)
942 {
943 throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message));
944 }
945
946 try
947 {
948 msbuildFrameworkAssembly = Assembly.Load("Microsoft.Build.Framework");
949 }
950 catch (Exception e)
951 {
952 throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message));
953 }
954 }
955 else
956 {
957 this.Core.Messaging.Write(HarvesterVerboses.LoadingProjectWithVersion(loadVersion));
958
959 try
960 {
961 msbuildAssembly = Assembly.Load(String.Format(MSBuildEngineAssemblyName, loadVersion));
962 }
963 catch (Exception e)
964 {
965 throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message));
966 }
967
968 try
969 {
970 msbuildFrameworkAssembly = Assembly.Load(String.Format(MSBuildFrameworkAssemblyName, loadVersion));
971 }
972 catch (Exception e)
973 {
974 throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message));
975 }
976 }
977
978 Type projectType;
979 Type buildItemType;
980
981 Type buildManagerType;
982 Type buildParametersType;
983 Type buildRequestDataFlagsType;
984 Type buildRequestDataType;
985 Type hostServicesType;
986 Type projectCollectionType;
987 Type projectInstanceType;
988
989 Type writeHandlerType;
990 Type colorSetterType;
991 Type colorResetterType;
992 Type loggerVerbosityType;
993 Type consoleLoggerType;
994 Type iLoggerType;
995
996 try
997 {
998 buildItemType = msbuildAssembly.GetType("Microsoft.Build.Execution.ProjectItemInstance", true);
999 projectType = msbuildAssembly.GetType("Microsoft.Build.Evaluation.Project", true);
1000
1001 buildManagerType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildManager", true);
1002 buildParametersType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildParameters", true);
1003 buildRequestDataFlagsType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildRequestDataFlags", true);
1004 buildRequestDataType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildRequestData", true);
1005 hostServicesType = msbuildAssembly.GetType("Microsoft.Build.Execution.HostServices", true);
1006 projectCollectionType = msbuildAssembly.GetType("Microsoft.Build.Evaluation.ProjectCollection", true);
1007 projectInstanceType = msbuildAssembly.GetType("Microsoft.Build.Execution.ProjectInstance", true);
1008
1009 writeHandlerType = msbuildAssembly.GetType("Microsoft.Build.Logging.WriteHandler", true);
1010 colorSetterType = msbuildAssembly.GetType("Microsoft.Build.Logging.ColorSetter", true);
1011 colorResetterType = msbuildAssembly.GetType("Microsoft.Build.Logging.ColorResetter", true);
1012 loggerVerbosityType = msbuildFrameworkAssembly.GetType("Microsoft.Build.Framework.LoggerVerbosity", true);
1013 consoleLoggerType = msbuildAssembly.GetType("Microsoft.Build.Logging.ConsoleLogger", true);
1014 iLoggerType = msbuildFrameworkAssembly.GetType("Microsoft.Build.Framework.ILogger", true);
1015 }
1016 catch (TargetInvocationException tie)
1017 {
1018 throw new WixException(HarvesterErrors.CannotLoadMSBuildEngine(tie.InnerException.Message));
1019 }
1020 catch (Exception e)
1021 {
1022 throw new WixException(HarvesterErrors.CannotLoadMSBuildEngine(e.Message));
1023 }
1024
1025 MSBuild40Types types = new MSBuild40Types();
1026 types.buildManagerType = buildManagerType;
1027 types.buildParametersType = buildParametersType;
1028 types.buildRequestDataFlagsType = buildRequestDataFlagsType;
1029 types.buildRequestDataType = buildRequestDataType;
1030 types.hostServicesType = hostServicesType;
1031 types.projectCollectionType = projectCollectionType;
1032 types.projectInstanceType = projectInstanceType;
1033 types.writeHandlerType = writeHandlerType;
1034 types.colorSetterType = colorSetterType;
1035 types.colorResetterType = colorResetterType;
1036 types.loggerVerbosityType = loggerVerbosityType;
1037 types.consoleLoggerType = consoleLoggerType;
1038 types.iLoggerType = iLoggerType;
1039 return new MSBuild40Project(null, projectType, buildItemType, loadVersion, types, this.Core, this.configuration, this.platform);
1040 }
1041
1042 private static bool AreTypesEquivalent(Type a, Type b)
1043 {
1044 return (a == b) || (a.IsAssignableFrom(b) && b.IsAssignableFrom(a));
1045 }
1046
1047 private abstract class MSBuildProject
1048 {
1049 protected Type projectType;
1050 protected Type buildItemType;
1051 protected object project;
1052 private string loadVersion;
1053
1054 public MSBuildProject(object project, Type projectType, Type buildItemType, string loadVersion)
1055 {
1056 this.project = project;
1057 this.projectType = projectType;
1058 this.buildItemType = buildItemType;
1059 this.loadVersion = loadVersion;
1060 }
1061
1062 public string LoadVersion
1063 {
1064 get { return this.loadVersion; }
1065 }
1066
1067 public abstract bool Build(string projectFileName, string[] targetNames, IDictionary targetOutputs);
1068
1069 public abstract MSBuildProjectItemType GetBuildItem(object buildItem);
1070
1071 public abstract IEnumerable GetEvaluatedItemsByName(string itemName);
1072
1073 public abstract string GetEvaluatedProperty(string propertyName);
1074
1075 public abstract void Load(string projectFileName);
1076 }
1077
1078 private abstract class MSBuildProjectItemType
1079 {
1080 public MSBuildProjectItemType(object buildItem)
1081 {
1082 this.buildItem = buildItem;
1083 }
1084
1085 public abstract override string ToString();
1086
1087 public abstract string GetMetadata(string name);
1088
1089 protected object buildItem;
1090 }
1091
1092
1093 private struct MSBuild40Types
1094 {
1095 public Type buildManagerType;
1096 public Type buildParametersType;
1097 public Type buildRequestDataFlagsType;
1098 public Type buildRequestDataType;
1099 public Type hostServicesType;
1100 public Type projectCollectionType;
1101 public Type projectInstanceType;
1102 public Type writeHandlerType;
1103 public Type colorSetterType;
1104 public Type colorResetterType;
1105 public Type loggerVerbosityType;
1106 public Type consoleLoggerType;
1107 public Type iLoggerType;
1108 }
1109
1110 private class MSBuild40Project : MSBuildProject
1111 {
1112 private MSBuild40Types types;
1113 private object projectCollection;
1114 private object currentProjectInstance;
1115 private object buildManager;
1116 private object buildParameters;
1117 private IHarvesterCore harvesterCore;
1118
1119 public MSBuild40Project(object project, Type projectType, Type buildItemType, string loadVersion, MSBuild40Types types, IHarvesterCore harvesterCore, string configuration, string platform)
1120 : base(project, projectType, buildItemType, loadVersion)
1121 {
1122 this.types = types;
1123 this.harvesterCore = harvesterCore;
1124
1125 this.buildParameters = this.types.buildParametersType.GetConstructor(new Type[] { }).Invoke(null);
1126
1127 try
1128 {
1129 var loggers = this.CreateLoggers();
1130
1131 // this.buildParameters.Loggers = loggers;
1132 this.types.buildParametersType.GetProperty("Loggers").SetValue(this.buildParameters, loggers, null);
1133 }
1134 catch (TargetInvocationException tie)
1135 {
1136 if (this.harvesterCore != null)
1137 {
1138 this.harvesterCore.Messaging.Write(HarvesterWarnings.NoLogger(tie.InnerException.Message));
1139 }
1140 }
1141 catch (Exception e)
1142 {
1143 if (this.harvesterCore != null)
1144 {
1145 this.harvesterCore.Messaging.Write(HarvesterWarnings.NoLogger(e.Message));
1146 }
1147 }
1148
1149 this.buildManager = this.types.buildManagerType.GetConstructor(new Type[] { }).Invoke(null);
1150
1151 if (configuration != null || platform != null)
1152 {
1153 Dictionary<string, string> globalVariables = new Dictionary<string, string>();
1154 if (configuration != null)
1155 {
1156 globalVariables.Add("Configuration", configuration);
1157 }
1158
1159 if (platform != null)
1160 {
1161 globalVariables.Add("Platform", platform);
1162 }
1163
1164 this.projectCollection = this.types.projectCollectionType.GetConstructor(new Type[] { typeof(IDictionary<string, string>) }).Invoke(new object[] { globalVariables });
1165 }
1166 else
1167 {
1168 this.projectCollection = this.types.projectCollectionType.GetConstructor(new Type[] {}).Invoke(null);
1169 }
1170 }
1171
1172 private object CreateLoggers()
1173 {
1174 var logger = new HarvestLogger(this.harvesterCore.Messaging);
1175 var loggerVerbosity = Enum.Parse(this.types.loggerVerbosityType, "Minimal");
1176 var writeHandler = Delegate.CreateDelegate(this.types.writeHandlerType, logger, nameof(logger.LogMessage));
1177 var colorSetter = Delegate.CreateDelegate(this.types.colorSetterType, logger, nameof(logger.SetColor));
1178 var colorResetter = Delegate.CreateDelegate(this.types.colorResetterType, logger, nameof(logger.ResetColor));
1179
1180 var consoleLoggerCtor = this.types.consoleLoggerType.GetConstructor(new Type[] {
1181 this.types.loggerVerbosityType,
1182 this.types.writeHandlerType,
1183 this.types.colorSetterType,
1184 this.types.colorResetterType,
1185 });
1186 var consoleLogger = consoleLoggerCtor.Invoke(new object[] { loggerVerbosity, writeHandler, colorSetter, colorResetter });
1187
1188 var loggers = Array.CreateInstance(this.types.iLoggerType, 1);
1189 loggers.SetValue(consoleLogger, 0);
1190
1191 return loggers;
1192 }
1193
1194 public override bool Build(string projectFileName, string[] targetNames, IDictionary targetOutputs)
1195 {
1196 try
1197 {
1198 // this.buildManager.BeginBuild(this.buildParameters);
1199 this.types.buildManagerType.GetMethod("BeginBuild", new Type[] { this.types.buildParametersType }).Invoke(this.buildManager, new object[] { this.buildParameters });
1200
1201 // buildRequestData = new BuildRequestData(this.currentProjectInstance, targetNames, null, BuildRequestData.BuildRequestDataFlags.ReplaceExistingProjectInstance);
1202 ConstructorInfo buildRequestDataCtor = this.types.buildRequestDataType.GetConstructor(
1203 new Type[]
1204 {
1205 this.types.projectInstanceType, typeof(string[]), this.types.hostServicesType, this.types.buildRequestDataFlagsType
1206 });
1207 object buildRequestDataFlags = this.types.buildRequestDataFlagsType.GetField("ReplaceExistingProjectInstance").GetRawConstantValue();
1208 object buildRequestData = buildRequestDataCtor.Invoke(new object[] { this.currentProjectInstance, targetNames, null, buildRequestDataFlags });
1209
1210 // BuildSubmission submission = this.buildManager.PendBuildRequest(buildRequestData);
1211 object submission = this.types.buildManagerType.GetMethod("PendBuildRequest", new Type[] { this.types.buildRequestDataType })
1212 .Invoke(this.buildManager, new object[] { buildRequestData });
1213
1214 // BuildResult buildResult = submission.Execute();
1215 object buildResult = submission.GetType().GetMethod("Execute", new Type[] { }).Invoke(submission, null);
1216
1217 // bool buildSucceeded = buildResult.OverallResult == BuildResult.Success;
1218 object overallResult = buildResult.GetType().GetProperty("OverallResult").GetValue(buildResult, null);
1219 bool buildSucceeded = String.Equals(overallResult.ToString(), "Success", StringComparison.Ordinal);
1220
1221 // this.buildManager.EndBuild();
1222 this.types.buildManagerType.GetMethod("EndBuild", new Type[] { }).Invoke(this.buildManager, null);
1223
1224 // fill in empty lists for each target so that heat will look at the item group later
1225 foreach (string target in targetNames)
1226 {
1227 targetOutputs.Add(target, new List<object>());
1228 }
1229
1230 return buildSucceeded;
1231 }
1232 catch (TargetInvocationException tie)
1233 {
1234 throw new WixException(HarvesterErrors.CannotBuildProject(projectFileName, tie.InnerException.Message));
1235 }
1236 catch (Exception e)
1237 {
1238 throw new WixException(HarvesterErrors.CannotBuildProject(projectFileName, e.Message));
1239 }
1240 }
1241
1242 public override MSBuildProjectItemType GetBuildItem(object buildItem)
1243 {
1244 return new MSBuild40ProjectItemType(buildItem);
1245 }
1246
1247 public override IEnumerable GetEvaluatedItemsByName(string itemName)
1248 {
1249 MethodInfo getEvaluatedItem = this.types.projectInstanceType.GetMethod("GetItems", new Type[] { typeof(string) });
1250 return (IEnumerable)getEvaluatedItem.Invoke(this.currentProjectInstance, new object[] { itemName });
1251 }
1252
1253 public override string GetEvaluatedProperty(string propertyName)
1254 {
1255 MethodInfo getProperty = this.types.projectInstanceType.GetMethod("GetPropertyValue", new Type[] { typeof(string) });
1256 return (string)getProperty.Invoke(this.currentProjectInstance, new object[] { propertyName });
1257 }
1258
1259 public override void Load(string projectFileName)
1260 {
1261 try
1262 {
1263 //this.project = this.projectCollection.LoadProject(projectFileName);
1264 this.project = this.types.projectCollectionType.GetMethod("LoadProject", new Type[] { typeof(string) }).Invoke(this.projectCollection, new object[] { projectFileName });
1265
1266 // this.currentProjectInstance = this.project.CreateProjectInstance();
1267 MethodInfo createProjectInstanceMethod = this.projectType.GetMethod("CreateProjectInstance", new Type[] { });
1268 this.currentProjectInstance = createProjectInstanceMethod.Invoke(this.project, null);
1269 }
1270 catch (TargetInvocationException tie)
1271 {
1272 throw new WixException(HarvesterErrors.CannotLoadProject(projectFileName, tie.InnerException.Message));
1273 }
1274 catch (Exception e)
1275 {
1276 throw new WixException(HarvesterErrors.CannotLoadProject(projectFileName, e.Message));
1277 }
1278 }
1279 }
1280
1281 private class MSBuild40ProjectItemType : MSBuildProjectItemType
1282 {
1283 public MSBuild40ProjectItemType(object buildItem)
1284 : base(buildItem)
1285 {
1286 }
1287
1288 public override string ToString()
1289 {
1290 PropertyInfo includeProperty = this.buildItem.GetType().GetProperty("EvaluatedInclude");
1291 return (string)includeProperty.GetValue(this.buildItem, null);
1292 }
1293
1294 public override string GetMetadata(string name)
1295 {
1296 MethodInfo getMetadataMethod = this.buildItem.GetType().GetMethod("GetMetadataValue");
1297 if (null != getMetadataMethod)
1298 {
1299 return (string)getMetadataMethod.Invoke(this.buildItem, new object[] { name });
1300 }
1301 return string.Empty;
1302 }
1303 }
1304
1305 /// <summary>
1306 /// Used internally in the VSProjectHarvester class to encapsulate
1307 /// the settings for a particular MSBuild "project output group".
1308 /// </summary>
1309 private struct ProjectOutputGroup
1310 {
1311 public readonly string Name;
1312 public readonly string BuildOutputGroup;
1313 public readonly string FileSource;
1314
1315 /// <summary>
1316 /// Creates a new project output group.
1317 /// </summary>
1318 /// <param name="name">Friendly name used by heat.</param>
1319 /// <param name="buildOutputGroup">MSBuild's name of the project output group.</param>
1320 /// <param name="fileSource">VS directory token containing the files of the POG.</param>
1321 public ProjectOutputGroup(string name, string buildOutputGroup, string fileSource)
1322 {
1323 this.Name = name;
1324 this.BuildOutputGroup = buildOutputGroup;
1325 this.FileSource = fileSource;
1326 }
1327 }
1328
1329 /// <summary>
1330 /// Internal class for getting and setting common attrbiutes on
1331 /// directory elements.
1332 /// </summary>
1333 internal class DirectoryAttributeAccessor
1334 {
1335 public Wix.ISchemaElement directoryElement;
1336
1337 public DirectoryAttributeAccessor(Wix.ISchemaElement directoryElement)
1338 {
1339 this.directoryElement = directoryElement;
1340 }
1341
1342 /// <summary>
1343 /// Gets the element as a ISchemaElement.
1344 /// </summary>
1345 public Wix.ISchemaElement Element
1346 {
1347 get { return this.directoryElement; }
1348 }
1349
1350 /// <summary>
1351 /// Gets the element as a IParentElement.
1352 /// </summary>
1353 public Wix.IParentElement ElementAsParent
1354 {
1355 get { return (Wix.IParentElement)this.directoryElement; }
1356 }
1357
1358 /// <summary>
1359 /// Gets or sets the Id attrbiute.
1360 /// </summary>
1361 public string Id
1362 {
1363 get
1364 {
1365 if (this.directoryElement is Wix.Directory wixDirectory)
1366 {
1367 return wixDirectory.Id;
1368 }
1369 else if (this.directoryElement is Wix.DirectoryRef wixDirectoryRef)
1370 {
1371 return wixDirectoryRef.Id;
1372 }
1373 else
1374 {
1375 throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Id"));
1376 }
1377 }
1378 set
1379 {
1380 if (this.directoryElement is Wix.Directory wixDirectory)
1381 {
1382 wixDirectory.Id = value;
1383 }
1384 else if (this.directoryElement is Wix.DirectoryRef wixDirectoryRef)
1385 {
1386 wixDirectoryRef.Id = value;
1387 }
1388 else
1389 {
1390 throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Id"));
1391 }
1392 }
1393 }
1394
1395 /// <summary>
1396 /// Gets or sets the Name attribute.
1397 /// </summary>
1398 public string Name
1399 {
1400 get
1401 {
1402 if (this.directoryElement is Wix.Directory wixDirectory)
1403 {
1404 return wixDirectory.Name;
1405 }
1406 else
1407 {
1408 throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Name"));
1409 }
1410 }
1411 set
1412 {
1413 if (this.directoryElement is Wix.Directory wixDirectory)
1414 {
1415 wixDirectory.Name = value;
1416 }
1417 else
1418 {
1419 throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Name"));
1420 }
1421 }
1422 }
1423 }
1424
1425 internal class HarvestLogger
1426 {
1427 public HarvestLogger(IMessaging messaging)
1428 {
1429 this.Color = ConsoleColor.Black;
1430 this.Messaging = messaging;
1431 }
1432
1433 private ConsoleColor Color { get; set; }
1434 private IMessaging Messaging { get; }
1435
1436 public void LogMessage(string message)
1437 {
1438 if (this.Color == ConsoleColor.Red)
1439 {
1440 this.Messaging.Write(HarvesterErrors.BuildErrorDuringHarvesting(message));
1441 }
1442 }
1443
1444 public void SetColor(ConsoleColor color)
1445 {
1446 this.Color = color;
1447 }
1448
1449 public void ResetColor()
1450 {
1451 this.Color = ConsoleColor.Black;
1452 }
1453 }
1454 }
1455}
diff --git a/src/wix/heat/app.config b/src/wix/heat/app.config
new file mode 100644
index 00000000..65d3d6c3
--- /dev/null
+++ b/src/wix/heat/app.config
@@ -0,0 +1,10 @@
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
5<configuration>
6 <runtime>
7 <loadFromRemoteSources enabled="true"/>
8 <AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false;Switch.System.IO.BlockLongPaths=false" />
9 </runtime>
10</configuration>
diff --git a/src/wix/heat/heat.csproj b/src/wix/heat/heat.csproj
new file mode 100644
index 00000000..650203b0
--- /dev/null
+++ b/src/wix/heat/heat.csproj
@@ -0,0 +1,54 @@
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 <TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
7 <OutputType>Exe</OutputType>
8 <Description>Harvester</Description>
9 <Title>WiX Harvester</Title>
10 <DebugType>embedded</DebugType>
11 <PublishRepositoryUrl>true</PublishRepositoryUrl>
12 <!-- <PackAsTool>true</PackAsTool> -->
13 <RuntimeIdentifier Condition=" '$(RuntimeIdentifier)'=='' and '$(TargetFramework)'!='netcoreapp3.1' ">win-x86</RuntimeIdentifier>
14 <AppConfig>app.config</AppConfig>
15 <ApplicationManifest>heat.exe.manifest</ApplicationManifest>
16 <RollForward>LatestMajor</RollForward>
17 </PropertyGroup>
18
19 <ItemGroup>
20 <Compile Include="..\wix\ConsoleMessageListener.cs" Link="ConsoleMessageListener.cs" />
21 </ItemGroup>
22
23 <ItemGroup>
24 <Compile Update="Serialize\WixHarvesterStrings.Designer.cs">
25 <DesignTime>True</DesignTime>
26 <AutoGen>True</AutoGen>
27 <DependentUpon>WixHarvesterStrings.resx</DependentUpon>
28 </Compile>
29 </ItemGroup>
30
31 <ItemGroup>
32 <EmbeddedResource Update="Serialize\WixHarvesterStrings.resx">
33 <Generator>ResXFileCodeGenerator</Generator>
34 <LastGenOutput>WixHarvesterStrings.Designer.cs</LastGenOutput>
35 </EmbeddedResource>
36 </ItemGroup>
37
38 <ItemGroup Condition="'$(TargetFramework)'=='net461' and '$(OS)' != 'Windows_NT'">
39 <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
40 </ItemGroup>
41
42 <ItemGroup>
43 <PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
44 <PackageReference Include="System.Diagnostics.PerformanceCounter" Version="4.7.0" />
45 <PackageReference Include="System.DirectoryServices" Version="4.7.0" />
46 <PackageReference Include="WixToolset.Core" Version="4.0.*" />
47 <PackageReference Include="WixToolset.Core.Burn" Version="4.0.*" />
48 </ItemGroup>
49
50 <ItemGroup>
51 <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
52 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
53 </ItemGroup>
54</Project>
diff --git a/src/wix/heat/heat.exe.manifest b/src/wix/heat/heat.exe.manifest
new file mode 100644
index 00000000..b4adfbb7
--- /dev/null
+++ b/src/wix/heat/heat.exe.manifest
@@ -0,0 +1,20 @@
1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
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<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
6 <assemblyIdentity name="WixToolset.Tools.Heat" version="4.0.0.0" processorArchitecture="x86" type="win32"/>
7 <description>WiX Toolset Harvester</description>
8 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
9 <security>
10 <requestedPrivileges>
11 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
12 </requestedPrivileges>
13 </security>
14 </trustInfo>
15 <application xmlns="urn:schemas-microsoft-com:asm.v3">
16 <windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
17 <ws2:longPathAware>true</ws2:longPathAware>
18 </windowsSettings>
19 </application>
20</assembly>
diff --git a/src/wix/heat/heat.net461.v3.ncrunchproject b/src/wix/heat/heat.net461.v3.ncrunchproject
new file mode 100644
index 00000000..cf22dfa9
--- /dev/null
+++ b/src/wix/heat/heat.net461.v3.ncrunchproject
@@ -0,0 +1,5 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file
diff --git a/src/wix/heat/heat.netcoreapp2.1.v3.ncrunchproject b/src/wix/heat/heat.netcoreapp2.1.v3.ncrunchproject
new file mode 100644
index 00000000..cf22dfa9
--- /dev/null
+++ b/src/wix/heat/heat.netcoreapp2.1.v3.ncrunchproject
@@ -0,0 +1,5 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file
diff --git a/src/wix/nuget-Tools.config b/src/wix/nuget-Tools.config
new file mode 100644
index 00000000..81117c3d
--- /dev/null
+++ b/src/wix/nuget-Tools.config
@@ -0,0 +1,17 @@
1<?xml version="1.0" encoding="utf-8"?>
2<configuration>
3 <packageSources>
4 <clear />
5 <add key="wixtoolset-burn" value="https://ci.appveyor.com/nuget/wixtoolset-burn" />
6 <add key="wixtoolset-converters" value="https://ci.appveyor.com/nuget/wixtoolset-converters" />
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-data" value="https://ci.appveyor.com/nuget/wixtoolset-data" />
10 <add key="wixtoolset-dtf" value="https://ci.appveyor.com/nuget/wixtoolset-dtf" />
11 <add key="wixtoolset-dutil" value="https://ci.appveyor.com/nuget/wixtoolset-dutil" />
12 <add key="wixtoolset-extensibility" value="https://ci.appveyor.com/nuget/wixtoolset-extensibility" />
13 <add key="wixtoolset-harvesters" value="https://ci.appveyor.com/nuget/wixtoolset-harvesters" />
14 <add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
15 <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
16 </packageSources>
17</configuration> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs b/src/wix/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs
new file mode 100644
index 00000000..9d132f66
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.BuildTasks/WixBuildTaskFixture.cs
@@ -0,0 +1,67 @@
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
3namespace WixToolsetTest.BuildTasks
4{
5 using System.IO;
6 using System.Linq;
7 using Microsoft.Build.Utilities;
8 using WixBuildTools.TestSupport;
9 using WixToolset.BuildTasks;
10 using WixToolset.Data;
11 using WixToolset.Data.Symbols;
12 using Xunit;
13
14 public class WixBuildTaskFixture
15 {
16 [Fact]
17 public void CanBuildSimpleMsiPackage()
18 {
19 var folder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
20
21 using (var fs = new DisposableFileSystem())
22 {
23 var baseFolder = fs.GetFolder();
24 var intermediateFolder = Path.Combine(baseFolder, "obj");
25 var pdbPath = Path.Combine(baseFolder, @"bin\testpackage.wixpdb");
26 var engine = new FakeBuildEngine();
27
28 var task = new WixBuild
29 {
30 BuildEngine = engine,
31 SourceFiles = new[]
32 {
33 new TaskItem(Path.Combine(folder, "Package.wxs")),
34 new TaskItem(Path.Combine(folder, "PackageComponents.wxs")),
35 },
36 LocalizationFiles = new[]
37 {
38 new TaskItem(Path.Combine(folder, "Package.en-us.wxl")),
39 },
40 BindInputPaths = new[]
41 {
42 new TaskItem(Path.Combine(folder, "data")),
43 },
44 IntermediateDirectory = new TaskItem(intermediateFolder),
45 OutputFile = new TaskItem(Path.Combine(baseFolder, @"bin\test.msi")),
46 PdbType = "Full",
47 PdbFile = new TaskItem(pdbPath),
48 DefaultCompressionLevel = "nOnE",
49 };
50
51 var result = task.Execute();
52 Assert.True(result, $"MSBuild task failed unexpectedly. Output:\r\n{engine.Output}");
53
54 Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\test.msi")));
55 Assert.True(File.Exists(pdbPath));
56 Assert.True(File.Exists(Path.Combine(baseFolder, @"bin\cab1.cab")));
57
58 var intermediate = Intermediate.Load(pdbPath);
59 var section = intermediate.Sections.Single();
60
61 var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
62 Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileSymbol[FileSymbolFields.Source].AsPath().Path);
63 Assert.Equal(@"test.txt", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
64 }
65 }
66 }
67}
diff --git a/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj b/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj
new file mode 100644
index 00000000..c01860cd
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj
@@ -0,0 +1,35 @@
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>net461</TargetFramework>
7 <IsPackable>false</IsPackable>
8 <DebugType>embedded</DebugType>
9 <RuntimeIdentifier>win-x86</RuntimeIdentifier>
10 </PropertyGroup>
11
12 <ItemGroup>
13 <Content Include="..\WixToolsetTest.Sdk\TestData\SimpleMsiPackage\MsiPackage\Package.en-us.wxl" Link="TestData\SimpleMsiPackage\MsiPackage\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
14 <Content Include="..\WixToolsetTest.Sdk\TestData\SimpleMsiPackage\MsiPackage\Package.wxs" Link="TestData\SimpleMsiPackage\MsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
15 <Content Include="..\WixToolsetTest.Sdk\TestData\SimpleMsiPackage\MsiPackage\PackageComponents.wxs" Link="TestData\SimpleMsiPackage\MsiPackage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
16 <Content Include="..\WixToolsetTest.Sdk\TestData\SimpleMsiPackage\MsiPackage\data\test.txt" Link="TestData\SimpleMsiPackage\MsiPackage\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
17 </ItemGroup>
18
19 <ItemGroup>
20 <ProjectReference Include="..\..\WixToolset.BuildTasks\WixToolset.BuildTasks.csproj" />
21 </ItemGroup>
22
23 <ItemGroup>
24 <PackageReference Include="Microsoft.Build.Tasks.Core" Version="14.3" Condition="'$(TargetFramework)'=='net461' or '$(TargetFramework)'=='net472'" />
25 <PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.7.179" Condition="'$(TargetFramework)'=='netcoreapp3.1' " />
26 <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
27 <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" />
28 </ItemGroup>
29
30 <ItemGroup>
31 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
32 <PackageReference Include="xunit" Version="2.4.1" />
33 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" />
34 </ItemGroup>
35</Project>
diff --git a/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.v3.ncrunchproject b/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.v3.ncrunchproject
new file mode 100644
index 00000000..f1d03cd7
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.v3.ncrunchproject
@@ -0,0 +1,8 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 <IgnoredTests>
5 <AllTestsSelector />
6 </IgnoredTests>
7 </Settings>
8</ProjectConfiguration> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Heat/HeatRunner.cs b/src/wix/test/WixToolsetTest.Heat/HeatRunner.cs
new file mode 100644
index 00000000..287698a9
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Heat/HeatRunner.cs
@@ -0,0 +1,92 @@
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
3namespace WixToolsetTest.Harvesters
4{
5 using System;
6 using System.Collections.Generic;
7 using System.Threading;
8 using System.Threading.Tasks;
9 using WixToolset.Core;
10 using WixToolset.Core.Burn;
11 using WixToolset.Core.TestPackage;
12 using WixToolset.Data;
13 using WixToolset.Extensibility.Data;
14 using WixToolset.Extensibility.Services;
15 using WixToolset.Harvesters;
16
17 /// <summary>
18 /// Utility class to emulate heat.exe.
19 /// </summary>
20 public static class HeatRunner
21 {
22 /// <summary>
23 /// Emulates calling heat.exe.
24 /// </summary>
25 /// <param name="args"></param>
26 /// <param name="messages"></param>
27 /// <param name="warningsAsErrors"></param>
28 /// <returns></returns>
29 public static int Execute(string[] args, out List<Message> messages, bool warningsAsErrors = true)
30 {
31 var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider();
32 var task = Execute(args, serviceProvider, out messages, warningsAsErrors: warningsAsErrors);
33 return task.Result;
34 }
35
36 /// <summary>
37 /// Emulates calling wix.exe with standard backends.
38 /// This overload always treats warnings as errors.
39 /// </summary>
40 /// <param name="args"></param>
41 /// <returns></returns>
42 public static WixRunnerResult Execute(params string[] args)
43 {
44 return Execute(true, args);
45 }
46
47 /// <summary>
48 /// Emulates calling wix.exe with standard backends.
49 /// </summary>
50 /// <param name="warningsAsErrors"></param>
51 /// <param name="args"></param>
52 /// <returns></returns>
53 public static WixRunnerResult Execute(bool warningsAsErrors, params string[] args)
54 {
55 var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider();
56 var exitCode = Execute(args, serviceProvider, out var messages, warningsAsErrors: warningsAsErrors);
57 return new WixRunnerResult { ExitCode = exitCode.Result, Messages = messages.ToArray() };
58 }
59
60 /// <summary>
61 /// Emulates calling wix.exe with standard backends.
62 /// </summary>
63 /// <param name="args"></param>
64 /// <param name="coreProvider"></param>
65 /// <param name="messages"></param>
66 /// <param name="warningsAsErrors"></param>
67 /// <returns></returns>
68 public static Task<int> Execute(string[] args, IWixToolsetCoreServiceProvider coreProvider, out List<Message> messages, bool warningsAsErrors = true)
69 {
70 coreProvider.AddBundleBackend();
71
72 var listener = new TestMessageListener();
73
74 messages = listener.Messages;
75
76 var messaging = coreProvider.GetService<IMessaging>();
77 messaging.SetListener(listener);
78
79 if (warningsAsErrors)
80 {
81 messaging.WarningsAsError = true;
82 }
83
84 var arguments = coreProvider.GetService<ICommandLineArguments>();
85 arguments.Populate(args);
86
87 var commandLine = HeatCommandLineFactory.CreateCommandLine(coreProvider);
88 var command = commandLine.ParseStandardCommandLine(arguments);
89 return command?.ExecuteAsync(CancellationToken.None) ?? Task.FromResult(1);
90 }
91 }
92}
diff --git a/src/wix/test/WixToolsetTest.Heat/PayloadTests.cs b/src/wix/test/WixToolsetTest.Heat/PayloadTests.cs
new file mode 100644
index 00000000..8072f50d
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Heat/PayloadTests.cs
@@ -0,0 +1,66 @@
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
3namespace WixToolsetTest.Harvesters
4{
5 using System;
6 using System.IO;
7 using WixBuildTools.TestSupport;
8 using Xunit;
9
10 public class PayloadTests
11 {
12 [Fact]
13 public void CanHarvestExePackagePayload()
14 {
15 var folder = TestData.Get(@"TestData");
16
17 using (var fs = new DisposableFileSystem())
18 {
19 var baseFolder = fs.GetFolder();
20 var outputFilePath = Path.Combine(baseFolder, "test.wxs");
21
22 var result = HeatRunner.Execute(new[]
23 {
24 "exepackagepayload",
25 Path.Combine(folder, ".Data", "burn.exe"),
26 "-o", outputFilePath,
27 });
28
29 result.AssertSuccess();
30
31 Assert.True(File.Exists(outputFilePath));
32
33 var expected = File.ReadAllText(Path.Combine(folder, "Payload", "HarvestedExePackagePayload.wxs")).Replace("\r\n", "\n");
34 var actual = File.ReadAllText(outputFilePath).Replace("\r\n", "\n");
35 Assert.Equal(expected, actual);
36 }
37 }
38
39 [Fact]
40 public void CanHarvestMsuPackagePayload()
41 {
42 var folder = TestData.Get(@"TestData");
43
44 using (var fs = new DisposableFileSystem())
45 {
46 var baseFolder = fs.GetFolder();
47 var outputFilePath = Path.Combine(baseFolder, "test.wxs");
48
49 var result = HeatRunner.Execute(new[]
50 {
51 "msupackagepayload",
52 Path.Combine(folder, ".Data", "Windows8.1-KB2937592-x86.msu"),
53 "-o", outputFilePath,
54 });
55
56 result.AssertSuccess();
57
58 Assert.True(File.Exists(outputFilePath));
59
60 var expected = File.ReadAllText(Path.Combine(folder, "Payload", "HarvestedMsuPackagePayload.wxs")).Replace("\r\n", "\n");
61 var actual = File.ReadAllText(outputFilePath).Replace("\r\n", "\n");
62 Assert.Equal(expected, actual);
63 }
64 }
65 }
66}
diff --git a/src/wix/test/WixToolsetTest.Heat/TestData/.Data/Windows8.1-KB2937592-x86.msu b/src/wix/test/WixToolsetTest.Heat/TestData/.Data/Windows8.1-KB2937592-x86.msu
new file mode 100644
index 00000000..c39f53b0
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Heat/TestData/.Data/Windows8.1-KB2937592-x86.msu
Binary files differ
diff --git a/src/wix/test/WixToolsetTest.Heat/TestData/.Data/burn.exe b/src/wix/test/WixToolsetTest.Heat/TestData/.Data/burn.exe
new file mode 100644
index 00000000..2a4f423f
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Heat/TestData/.Data/burn.exe
Binary files differ
diff --git a/src/wix/test/WixToolsetTest.Heat/TestData/Payload/HarvestedExePackagePayload.wxs b/src/wix/test/WixToolsetTest.Heat/TestData/Payload/HarvestedExePackagePayload.wxs
new file mode 100644
index 00000000..40100f22
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Heat/TestData/Payload/HarvestedExePackagePayload.wxs
@@ -0,0 +1,6 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <ExePackagePayload Description="WiX Toolset Bootstrapper" Hash="F6E722518AC3AB7E31C70099368D5770788C179AA23226110DCF07319B1E1964E246A1E8AE72E2CF23E0138AFC281BAFDE45969204405E114EB20C8195DA7E5E" ProductName="Windows Installer XML Toolset" Size="463360" Version="3.14.1703.0" />
5 </Fragment>
6</Wix> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Heat/TestData/Payload/HarvestedMsuPackagePayload.wxs b/src/wix/test/WixToolsetTest.Heat/TestData/Payload/HarvestedMsuPackagePayload.wxs
new file mode 100644
index 00000000..f203fe27
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Heat/TestData/Payload/HarvestedMsuPackagePayload.wxs
@@ -0,0 +1,6 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <MsuPackagePayload Hash="904ADEA6AB675ACE16483138BF3F5850FD56ACB6E3A13AFA7263ED49C68CCE6CF84D6AAD6F99AAF175A95EE1A56C787C5AD968019056490B1073E7DBB7B9B7BE" Size="309544" />
5 </Fragment>
6</Wix> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj b/src/wix/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj
new file mode 100644
index 00000000..4af6749c
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj
@@ -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<Project Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
6 <TargetFramework>netcoreapp3.1</TargetFramework>
7 <IsPackable>false</IsPackable>
8 </PropertyGroup>
9
10 <ItemGroup>
11 <Content Include="TestData\**" CopyToOutputDirectory="PreserveNewest" />
12 </ItemGroup>
13
14 <ItemGroup>
15 <ProjectReference Include="..\..\heat\heat.csproj" />
16 </ItemGroup>
17
18 <ItemGroup>
19 <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
20 <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" />
21 </ItemGroup>
22
23 <ItemGroup>
24 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.0" />
25 <PackageReference Include="xunit" Version="2.4.1" />
26 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" />
27 </ItemGroup>
28</Project>
diff --git a/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs b/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs
new file mode 100644
index 00000000..3c8e79e7
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs
@@ -0,0 +1,442 @@
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
3namespace WixToolsetTest.Sdk
4{
5 using System;
6 using System.Collections.Generic;
7 using System.IO;
8 using System.Linq;
9 using WixBuildTools.TestSupport;
10 using Xunit;
11
12 public class MsbuildFixture
13 {
14 [Theory]
15 [InlineData(BuildSystem.DotNetCoreSdk)]
16 [InlineData(BuildSystem.MSBuild)]
17 [InlineData(BuildSystem.MSBuild64)]
18 public void CanBuildSimpleBundle(BuildSystem buildSystem)
19 {
20 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage");
21
22 using (var fs = new TestDataFolderFileSystem())
23 {
24 fs.Initialize(sourceFolder);
25 var baseFolder = Path.Combine(fs.BaseFolder, "SimpleBundle");
26 var binFolder = Path.Combine(baseFolder, @"bin\");
27 var projectPath = Path.Combine(baseFolder, "SimpleBundle.wixproj");
28
29 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
30 result.AssertSuccess();
31
32 var warnings = result.Output.Where(line => line.Contains(": warning"));
33 Assert.Empty(warnings);
34
35 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
36 .Select(s => s.Substring(baseFolder.Length + 1))
37 .OrderBy(s => s)
38 .ToArray();
39 WixAssert.CompareLineByLine(new[]
40 {
41 @"bin\x86\Release\SimpleBundle.exe",
42 @"bin\x86\Release\SimpleBundle.wixpdb",
43 }, paths);
44 }
45 }
46
47 [Theory(Skip = "Test demonstrates failure")]
48 [InlineData(BuildSystem.DotNetCoreSdk)]
49 [InlineData(BuildSystem.MSBuild)]
50 [InlineData(BuildSystem.MSBuild64)]
51 public void CanBuildUncompressedBundle(BuildSystem buildSystem)
52 {
53 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage");
54
55 using (var fs = new TestDataFolderFileSystem())
56 {
57 fs.Initialize(sourceFolder);
58 var baseFolder = Path.Combine(fs.BaseFolder, "UncompressedBundle");
59 var binFolder = Path.Combine(baseFolder, @"bin\");
60 var projectPath = Path.Combine(baseFolder, "UncompressedBundle.wixproj");
61
62 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
63 result.AssertSuccess();
64
65 var warnings = result.Output.Where(line => line.Contains(": warning"));
66 Assert.Empty(warnings);
67
68 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
69 .Select(s => s.Substring(baseFolder.Length + 1))
70 .OrderBy(s => s)
71 .ToArray();
72 WixAssert.CompareLineByLine(new[]
73 {
74 @"bin\x86\Release\SimpleBundle.exe",
75 @"bin\x86\Release\SimpleBundle.wixpdb",
76 @"bin\x86\Release\test.txt",
77 }, paths);
78 }
79 }
80
81 [Theory]
82 [InlineData(BuildSystem.DotNetCoreSdk)]
83 [InlineData(BuildSystem.MSBuild)]
84 [InlineData(BuildSystem.MSBuild64)]
85 public void CanBuildSimpleMergeModule(BuildSystem buildSystem)
86 {
87 var sourceFolder = TestData.Get(@"TestData\MergeModule\SimpleMergeModule");
88
89 using (var fs = new TestDataFolderFileSystem())
90 {
91 fs.Initialize(sourceFolder);
92 var baseFolder = fs.BaseFolder;
93 var binFolder = Path.Combine(baseFolder, @"bin\");
94 var projectPath = Path.Combine(baseFolder, "SimpleMergeModule.wixproj");
95
96 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
97 result.AssertSuccess();
98
99 var warnings = result.Output.Where(line => line.Contains(": warning"));
100 Assert.Empty(warnings);
101
102 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
103 .Select(s => s.Substring(baseFolder.Length + 1))
104 .OrderBy(s => s)
105 .ToArray();
106 WixAssert.CompareLineByLine(new[]
107 {
108 @"bin\x86\Release\SimpleMergeModule.msm",
109 @"bin\x86\Release\SimpleMergeModule.wixpdb",
110 }, paths);
111 }
112 }
113
114 [Theory]
115 [InlineData(BuildSystem.DotNetCoreSdk)]
116 [InlineData(BuildSystem.MSBuild)]
117 [InlineData(BuildSystem.MSBuild64)]
118 public void CanBuildSimpleMsiPackage(BuildSystem buildSystem)
119 {
120 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
121
122 using (var fs = new TestDataFolderFileSystem())
123 {
124 fs.Initialize(sourceFolder);
125 var baseFolder = fs.BaseFolder;
126 var binFolder = Path.Combine(baseFolder, @"bin\");
127 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
128
129 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
130 result.AssertSuccess();
131
132 var platformSwitches = result.Output.Where(line => line.Contains("-platform x86"));
133 Assert.Single(platformSwitches);
134
135 var warnings = result.Output.Where(line => line.Contains(": warning"));
136 Assert.Equal(4, warnings.Count());
137
138 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
139 .Select(s => s.Substring(baseFolder.Length + 1))
140 .OrderBy(s => s)
141 .ToArray();
142 WixAssert.CompareLineByLine(new[]
143 {
144 @"bin\x86\Release\en-US\cab1.cab",
145 @"bin\x86\Release\en-US\MsiPackage.msi",
146 @"bin\x86\Release\en-US\MsiPackage.wixpdb",
147 }, paths);
148 }
149 }
150
151 [Theory]
152 [InlineData(BuildSystem.DotNetCoreSdk)]
153 [InlineData(BuildSystem.MSBuild)]
154 [InlineData(BuildSystem.MSBuild64)]
155 public void CanBuildSimpleMsiPackageWithMergeModule(BuildSystem buildSystem)
156 {
157 var sourceFolder = TestData.Get(@"TestData\MergeModule");
158
159 using (var fs = new TestDataFolderFileSystem())
160 {
161 fs.Initialize(sourceFolder);
162 var baseFolder = Path.Combine(fs.BaseFolder, "MergeMsiPackage");
163 var binFolder = Path.Combine(baseFolder, @"bin\");
164 var projectPath = Path.Combine(baseFolder, "MergeMsiPackage.wixproj");
165
166 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
167 result.AssertSuccess();
168
169 var warnings = result.Output.Where(line => line.Contains(": warning"));
170 Assert.Empty(warnings);
171
172 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
173 .Select(s => s.Substring(baseFolder.Length + 1))
174 .OrderBy(s => s)
175 .ToArray();
176 WixAssert.CompareLineByLine(new[]
177 {
178 @"bin\x86\Release\cab1.cab",
179 @"bin\x86\Release\MergeMsiPackage.msi",
180 @"bin\x86\Release\MergeMsiPackage.wixpdb",
181 }, paths);
182 }
183 }
184
185 [Theory]
186 [InlineData(BuildSystem.DotNetCoreSdk)]
187 [InlineData(BuildSystem.MSBuild)]
188 [InlineData(BuildSystem.MSBuild64)]
189 public void CanBuildWithDefaultAndExplicitlyFullWixpdbs(BuildSystem buildSystem)
190 {
191 var expectedOutputs = new[]
192 {
193 @"bin\x86\Release\en-US\cab1.cab",
194 @"bin\x86\Release\en-US\MsiPackage.msi",
195 @"bin\x86\Release\en-US\MsiPackage.wixpdb",
196 };
197
198 this.AssertWixpdb(buildSystem, null, expectedOutputs);
199 this.AssertWixpdb(buildSystem, "Full", expectedOutputs);
200 }
201
202 [Theory]
203 [InlineData(BuildSystem.DotNetCoreSdk)]
204 [InlineData(BuildSystem.MSBuild)]
205 [InlineData(BuildSystem.MSBuild64)]
206 public void CanBuildWithNoWixpdb(BuildSystem buildSystem)
207 {
208 this.AssertWixpdb(buildSystem, "NONE", new[]
209 {
210 @"bin\x86\Release\en-US\cab1.cab",
211 @"bin\x86\Release\en-US\MsiPackage.msi",
212 });
213 }
214
215 private void AssertWixpdb(BuildSystem buildSystem, string wixpdbType, string[] expectedOutputFiles)
216 {
217 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
218
219 using (var fs = new TestDataFolderFileSystem())
220 {
221 fs.Initialize(sourceFolder);
222 var baseFolder = fs.BaseFolder;
223 var binFolder = Path.Combine(baseFolder, @"bin\");
224 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
225
226 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
227 {
228 wixpdbType == null ? String.Empty : $"-p:WixPdbType={wixpdbType}",
229 });
230 result.AssertSuccess();
231
232 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
233 .Select(s => s.Substring(baseFolder.Length + 1))
234 .OrderBy(s => s)
235 .ToArray();
236 WixAssert.CompareLineByLine(expectedOutputFiles, paths);
237 }
238 }
239
240 [Theory]
241 [InlineData(BuildSystem.DotNetCoreSdk)]
242 [InlineData(BuildSystem.MSBuild)]
243 [InlineData(BuildSystem.MSBuild64)]
244 public void CanBuild64BitMsiPackage(BuildSystem buildSystem)
245 {
246 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
247
248 using (var fs = new TestDataFolderFileSystem())
249 {
250 fs.Initialize(sourceFolder);
251 var baseFolder = fs.BaseFolder;
252 var binFolder = Path.Combine(baseFolder, @"bin\");
253 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
254
255 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
256 {
257 $"-p:Platform=x64",
258 });
259 result.AssertSuccess();
260
261 var platformSwitches = result.Output.Where(line => line.Contains("-platform x64"));
262 Assert.Single(platformSwitches);
263
264 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
265 .Select(s => s.Substring(baseFolder.Length + 1))
266 .OrderBy(s => s)
267 .ToArray();
268 WixAssert.CompareLineByLine(new[]
269 {
270 @"bin\x64\Release\en-US\cab1.cab",
271 @"bin\x64\Release\en-US\MsiPackage.msi",
272 @"bin\x64\Release\en-US\MsiPackage.wixpdb",
273 }, paths);
274 }
275 }
276
277 [Theory]
278 [InlineData(BuildSystem.DotNetCoreSdk)]
279 [InlineData(BuildSystem.MSBuild)]
280 [InlineData(BuildSystem.MSBuild64)]
281 public void CanBuildSimpleMsiPackageWithIceSuppressions(BuildSystem buildSystem)
282 {
283 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
284
285 using (var fs = new TestDataFolderFileSystem())
286 {
287 fs.Initialize(sourceFolder);
288 var baseFolder = fs.BaseFolder;
289 var binFolder = Path.Combine(baseFolder, @"bin\");
290 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
291
292 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
293 {
294 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "SuppressIces", "ICE45;ICE46"),
295 });
296 result.AssertSuccess();
297 }
298 }
299
300 [Theory]
301 [InlineData(BuildSystem.DotNetCoreSdk)]
302 [InlineData(BuildSystem.MSBuild)]
303 [InlineData(BuildSystem.MSBuild64)]
304 public void CanBuildSimpleMsiPackageWithWarningSuppressions(BuildSystem buildSystem)
305 {
306 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
307
308 using (var fs = new TestDataFolderFileSystem())
309 {
310 fs.Initialize(sourceFolder);
311 var baseFolder = fs.BaseFolder;
312 var binFolder = Path.Combine(baseFolder, @"bin\");
313 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
314
315 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
316 {
317 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "SuppressSpecificWarnings", "1118;1102"),
318 });
319 result.AssertSuccess();
320
321 var warnings = result.Output.Where(line => line.Contains(": warning"));
322 Assert.Empty(warnings);
323 }
324 }
325
326 [Theory]
327 [InlineData(BuildSystem.DotNetCoreSdk, null)]
328 [InlineData(BuildSystem.DotNetCoreSdk, true)]
329 [InlineData(BuildSystem.MSBuild, null)]
330 [InlineData(BuildSystem.MSBuild, true)]
331 [InlineData(BuildSystem.MSBuild64, null)]
332 [InlineData(BuildSystem.MSBuild64, true)]
333 public void CanBuildSimpleMsiPackageAsWixipl(BuildSystem buildSystem, bool? outOfProc)
334 {
335 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
336
337 using (var fs = new TestDataFolderFileSystem())
338 {
339 fs.Initialize(sourceFolder);
340 var baseFolder = fs.BaseFolder;
341 var binFolder = Path.Combine(baseFolder, @"bin\");
342 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
343
344 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
345 {
346 "-p:OutputType=IntermediatePostLink",
347 }, outOfProc: outOfProc);
348 result.AssertSuccess();
349
350 var wixBuildCommands = MsbuildUtilities.GetToolCommandLines(result, "wix", "build", buildSystem, outOfProc);
351 Assert.Single(wixBuildCommands);
352
353 var path = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
354 .Select(s => s.Substring(baseFolder.Length + 1))
355 .Single();
356 Assert.Equal(@"bin\x86\Release\MsiPackage.wixipl", path);
357 }
358 }
359
360 [Theory]
361 [InlineData(BuildSystem.DotNetCoreSdk)]
362 [InlineData(BuildSystem.MSBuild)]
363 [InlineData(BuildSystem.MSBuild64)]
364 public void CanBuildAndCleanSimpleMsiPackage(BuildSystem buildSystem)
365 {
366 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
367
368 using (var fs = new TestDataFolderFileSystem())
369 {
370 fs.Initialize(sourceFolder);
371 var baseFolder = fs.BaseFolder;
372 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
373
374 // Build
375 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, verbosityLevel: "diag");
376 result.AssertSuccess();
377
378 var buildOutput = String.Join("\r\n", result.Output);
379
380 var createdPaths = Directory.EnumerateFiles(baseFolder, @"*.*", SearchOption.AllDirectories)
381 .Select(s => s.Substring(baseFolder.Length + 1))
382 .OrderBy(s => s)
383 .ToArray();
384 Assert.NotEmpty(createdPaths);
385
386 // Clean
387 result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
388 {
389 "-t:Clean",
390 }, verbosityLevel: "diag");
391 result.AssertSuccess();
392
393 var cleanOutput = String.Join("\r\n", result.Output);
394
395 // Clean is only expected to delete the files listed in {Project}.FileListAbsolute.txt,
396 // so this is not quite right but close enough.
397 var allowedFiles = new HashSet<string>
398 {
399 "MsiPackage.wixproj",
400 "Package.en-us.wxl",
401 "Package.wxs",
402 "PackageComponents.wxs",
403 @"data\test.txt",
404 @"obj\x86\Release\MsiPackage.wixproj.FileListAbsolute.txt",
405 };
406
407 var remainingPaths = Directory.EnumerateFiles(baseFolder, @"*.*", SearchOption.AllDirectories)
408 .Select(s => s.Substring(baseFolder.Length + 1))
409 .Where(s => !allowedFiles.Contains(s))
410 .OrderBy(s => s)
411 .ToArray();
412 Assert.Empty(remainingPaths);
413 }
414 }
415
416 [Theory]
417 [InlineData(BuildSystem.DotNetCoreSdk)]
418 [InlineData(BuildSystem.MSBuild)]
419 [InlineData(BuildSystem.MSBuild64)]
420 public void ReportsInnerExceptionForUnexpectedExceptions(BuildSystem buildSystem)
421 {
422 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
423
424 using (var fs = new TestDataFolderFileSystem())
425 {
426 fs.Initialize(sourceFolder);
427 var baseFolder = fs.BaseFolder;
428 var binFolder = Path.Combine(baseFolder, @"bin\");
429 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
430
431 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
432 {
433 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixToolDir", Path.Combine(MsbuildUtilities.WixMsbuildPath, "broken", "net461")),
434 }, outOfProc: true);
435 Assert.Equal(1, result.ExitCode);
436
437 var expectedMessage = "System.PlatformNotSupportedException: Could not find platform specific 'wixnative.exe' ---> System.IO.FileNotFoundException: Could not find internal piece of WiX Toolset from";
438 Assert.Contains(result.Output, m => m.Contains(expectedMessage));
439 }
440 }
441 }
442}
diff --git a/src/wix/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs b/src/wix/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs
new file mode 100644
index 00000000..8b2e8e3d
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs
@@ -0,0 +1,375 @@
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
3namespace WixToolsetTest.Sdk
4{
5 using System;
6 using System.Collections.Generic;
7 using System.IO;
8 using System.Linq;
9 using WixBuildTools.TestSupport;
10 using WixToolset.Core.TestPackage;
11 using WixToolset.Data;
12 using WixToolset.Data.Symbols;
13 using Xunit;
14
15 public class MsbuildHeatFixture
16 {
17 [Theory]
18 [InlineData(BuildSystem.DotNetCoreSdk)]
19 [InlineData(BuildSystem.MSBuild)]
20 [InlineData(BuildSystem.MSBuild64)]
21 public void CanBuildHeatFilePackage(BuildSystem buildSystem)
22 {
23 var sourceFolder = TestData.Get(@"TestData\HeatFilePackage");
24
25 using (var fs = new TestDataFolderFileSystem())
26 {
27 fs.Initialize(sourceFolder);
28 var baseFolder = fs.BaseFolder;
29 var binFolder = Path.Combine(baseFolder, @"bin\");
30 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
31 var projectPath = Path.Combine(baseFolder, "HeatFilePackage.wixproj");
32
33 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
34 result.AssertSuccess();
35
36 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true);
37 Assert.Single(heatCommandLines);
38
39 var warnings = result.Output.Where(line => line.Contains(": warning"));
40 Assert.Empty(warnings);
41
42 var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs");
43 Assert.True(File.Exists(generatedFilePath));
44
45 var generatedContents = File.ReadAllText(generatedFilePath);
46 var testXml = generatedContents.GetTestXml();
47 Assert.Equal(@"<Wix>" +
48 "<Fragment>" +
49 "<DirectoryRef Id='INSTALLFOLDER'>" +
50 "<Component Id='HeatFilePackage.wixproj' Guid='*'>" +
51 "<File Id='HeatFilePackage.wixproj' KeyPath='yes' Source='SourceDir\\HeatFilePackage.wixproj' />" +
52 "</Component>" +
53 "</DirectoryRef>" +
54 "</Fragment>" +
55 "<Fragment>" +
56 "<ComponentGroup Id='ProductComponents'>" +
57 "<ComponentRef Id='HeatFilePackage.wixproj' />" +
58 "</ComponentGroup>" +
59 "</Fragment>" +
60 "</Wix>", testXml);
61
62 var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatFilePackage.wixpdb");
63 Assert.True(File.Exists(pdbPath));
64
65 var intermediate = Intermediate.Load(pdbPath);
66 var section = intermediate.Sections.Single();
67
68 var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
69 Assert.Equal(@"SourceDir\HeatFilePackage.wixproj", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath()?.Path);
70 }
71 }
72
73 [Theory]
74 [InlineData(BuildSystem.DotNetCoreSdk)]
75 [InlineData(BuildSystem.MSBuild)]
76 [InlineData(BuildSystem.MSBuild64)]
77 public void CanBuildHeatFileWithMultipleFilesPackage(BuildSystem buildSystem)
78 {
79 var sourceFolder = TestData.Get(@"TestData\HeatFileMultipleFilesSameFileName");
80
81 using (var fs = new TestDataFolderFileSystem())
82 {
83 fs.Initialize(sourceFolder);
84 var baseFolder = fs.BaseFolder;
85 var binFolder = Path.Combine(baseFolder, @"bin\");
86 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
87 var projectPath = Path.Combine(baseFolder, "HeatFileMultipleFilesSameFileName.wixproj");
88
89 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
90 result.AssertSuccess();
91
92 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true);
93 Assert.Equal(2, heatCommandLines.Count());
94
95 var warnings = result.Output.Where(line => line.Contains(": warning"));
96 Assert.Empty(warnings);
97
98 var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs");
99 Assert.True(File.Exists(generatedFilePath));
100
101 var generatedContents = File.ReadAllText(generatedFilePath);
102 var testXml = generatedContents.GetTestXml();
103 Assert.Equal("<Wix>" +
104 "<Fragment>" +
105 "<DirectoryRef Id='INSTALLFOLDER'>" +
106 "<Component Id='MyProgram.txt' Guid='*'>" +
107 @"<File Id='MyProgram.txt' KeyPath='yes' Source='SourceDir\MyProgram.txt' />" +
108 "</Component>" +
109 "</DirectoryRef>" +
110 "</Fragment>" +
111 "<Fragment>" +
112 "<ComponentGroup Id='TxtProductComponents'>" +
113 "<ComponentRef Id='MyProgram.txt' />" +
114 "</ComponentGroup>" +
115 "</Fragment>" +
116 "</Wix>", testXml);
117
118 generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs");
119 Assert.True(File.Exists(generatedFilePath));
120
121 generatedContents = File.ReadAllText(generatedFilePath);
122 testXml = generatedContents.GetTestXml();
123 Assert.Equal("<Wix>" +
124 "<Fragment>" +
125 "<DirectoryRef Id='INSTALLFOLDER'>" +
126 "<Component Id='MyProgram.json' Guid='*'>" +
127 @"<File Id='MyProgram.json' KeyPath='yes' Source='SourceDir\MyProgram.json' />" +
128 "</Component>" +
129 "</DirectoryRef>" +
130 "</Fragment>" +
131 "<Fragment>" +
132 "<ComponentGroup Id='JsonProductComponents'>" +
133 "<ComponentRef Id='MyProgram.json' />" +
134 "</ComponentGroup>" +
135 "</Fragment>" +
136 "</Wix>", testXml);
137
138 var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatFileMultipleFilesSameFileName.wixpdb");
139 Assert.True(File.Exists(pdbPath));
140
141 var intermediate = Intermediate.Load(pdbPath);
142 var section = intermediate.Sections.Single();
143
144 var fileSymbols = section.Symbols.OfType<FileSymbol>().ToArray();
145 Assert.Equal(@"SourceDir\MyProgram.txt", fileSymbols[0][FileSymbolFields.Source].PreviousValue.AsPath()?.Path);
146 Assert.Equal(@"SourceDir\MyProgram.json", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath()?.Path);
147 }
148 }
149
150 [Theory]
151 [InlineData(BuildSystem.DotNetCoreSdk, true)]
152 [InlineData(BuildSystem.DotNetCoreSdk, false)]
153 [InlineData(BuildSystem.MSBuild, true)]
154 [InlineData(BuildSystem.MSBuild, false)]
155 [InlineData(BuildSystem.MSBuild64, true)]
156 [InlineData(BuildSystem.MSBuild64, false)]
157 public void CanBuildHeatProjectPreSdkStyle(BuildSystem buildSystem, bool useToolsVersion)
158 {
159 var sourceFolder = TestData.Get(@"TestData\HeatProject");
160
161 using (var fs = new TestDataFolderFileSystem())
162 {
163 fs.Initialize(sourceFolder);
164 var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectPreSdkStyle");
165 var binFolder = Path.Combine(baseFolder, @"bin\");
166 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
167 var projectPath = Path.Combine(baseFolder, "HeatProjectPreSdkStyle.wixproj");
168
169 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
170 {
171 useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty,
172 });
173 result.AssertSuccess();
174
175 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true);
176 var heatCommandLine = Assert.Single(heatCommandLines);
177
178 if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk)
179 {
180 Assert.Contains("-usetoolsversion", heatCommandLine);
181 }
182 else
183 {
184 Assert.DoesNotContain("-usetoolsversion", heatCommandLine);
185 }
186
187 var warnings = result.Output.Where(line => line.Contains(": warning"));
188 Assert.Empty(warnings);
189
190 var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_ToolsVersion4Cs.wxs");
191 Assert.True(File.Exists(generatedFilePath));
192
193 var generatedContents = File.ReadAllText(generatedFilePath);
194 var testXml = generatedContents.GetTestXml();
195 Assert.Equal(@"<Wix>" +
196 "<Fragment>" +
197 "<DirectoryRef Id='ToolsVersion4Cs.Binaries'>" +
198 "<Component Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' Guid='*'>" +
199 "<File Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' Source='$(var.ToolsVersion4Cs.TargetDir)\\ToolsVersion4Cs.dll' />" +
200 "</Component>" +
201 "</DirectoryRef>" +
202 "</Fragment>" +
203 "<Fragment>" +
204 "<ComponentGroup Id='ToolsVersion4Cs.Binaries'>" +
205 "<ComponentRef Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' />" +
206 "</ComponentGroup>" +
207 "</Fragment>" +
208 "<Fragment>" +
209 "<DirectoryRef Id='ToolsVersion4Cs.Symbols'>" +
210 "<Component Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' Guid='*'>" +
211 "<File Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' Source='$(var.ToolsVersion4Cs.TargetDir)\\ToolsVersion4Cs.pdb' />" +
212 "</Component>" +
213 "</DirectoryRef>" +
214 "</Fragment>" +
215 "<Fragment>" +
216 "<ComponentGroup Id='ToolsVersion4Cs.Symbols'>" +
217 "<ComponentRef Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' />" +
218 "</ComponentGroup>" +
219 "</Fragment>" +
220 "<Fragment>" +
221 "<DirectoryRef Id='ToolsVersion4Cs.Sources'>" +
222 "<Component Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' Guid='*'>" +
223 "<File Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' Source='$(var.ToolsVersion4Cs.ProjectDir)\\ToolsVersion4Cs.csproj' />" +
224 "</Component>" +
225 "<Directory Id='ToolsVersion4Cs.Sources.Properties' Name='Properties'>" +
226 "<Component Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' Guid='*'>" +
227 "<File Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' Source='$(var.ToolsVersion4Cs.ProjectDir)\\Properties\\AssemblyInfo.cs' />" +
228 "</Component>" +
229 "</Directory>" +
230 "</DirectoryRef>" +
231 "</Fragment>" +
232 "<Fragment>" +
233 "<ComponentGroup Id='ToolsVersion4Cs.Sources'>" +
234 "<ComponentRef Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' />" +
235 "<ComponentRef Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' />" +
236 "</ComponentGroup>" +
237 "</Fragment>" +
238 "<Fragment>" +
239 "<ComponentGroup Id='ToolsVersion4Cs.Content' />" +
240 "</Fragment>" +
241 "<Fragment>" +
242 "<ComponentGroup Id='ToolsVersion4Cs.Satellites' />" +
243 "</Fragment>" +
244 "<Fragment>" +
245 "<ComponentGroup Id='ToolsVersion4Cs.Documents' />" +
246 "</Fragment>" +
247 "</Wix>", testXml);
248
249 var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatProjectPreSdkStyle.wixpdb");
250 Assert.True(File.Exists(pdbPath));
251
252 var intermediate = Intermediate.Load(pdbPath);
253 var section = intermediate.Sections.Single();
254
255 var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
256 Assert.Equal(Path.Combine(fs.BaseFolder, "ToolsVersion4Cs", "bin", "Release\\\\ToolsVersion4Cs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path);
257 }
258 }
259
260 [Theory]
261 [InlineData(BuildSystem.DotNetCoreSdk, true)]
262 [InlineData(BuildSystem.DotNetCoreSdk, false)]
263 [InlineData(BuildSystem.MSBuild, true)]
264 [InlineData(BuildSystem.MSBuild, false)]
265 [InlineData(BuildSystem.MSBuild64, true)]
266 [InlineData(BuildSystem.MSBuild64, false)]
267 public void CanBuildHeatProjectSdkStyle(BuildSystem buildSystem, bool useToolsVersion)
268 {
269 var sourceFolder = TestData.Get(@"TestData\HeatProject");
270
271 using (var fs = new TestDataFolderFileSystem())
272 {
273 fs.Initialize(sourceFolder);
274 var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectSdkStyle");
275 var binFolder = Path.Combine(baseFolder, @"bin\");
276 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
277 var projectPath = Path.Combine(baseFolder, "HeatProjectSdkStyle.wixproj");
278 var referencedProjectPath = Path.Combine(fs.BaseFolder, "SdkStyleCs", "SdkStyleCs.csproj");
279
280 var result = MsbuildUtilities.BuildProject(buildSystem, referencedProjectPath, new[]
281 {
282 "-t:restore",
283 });
284 result.AssertSuccess();
285
286 result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
287 {
288 useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty,
289 });
290 result.AssertSuccess();
291
292 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true);
293 var heatCommandLine = Assert.Single(heatCommandLines);
294
295 if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk)
296 {
297 Assert.Contains("-usetoolsversion", heatCommandLine);
298 }
299 else
300 {
301 Assert.DoesNotContain("-usetoolsversion", heatCommandLine);
302 }
303
304 var warnings = result.Output.Where(line => line.Contains(": warning"));
305 Assert.Empty(warnings);
306
307 var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_SdkStyleCs.wxs");
308 Assert.True(File.Exists(generatedFilePath));
309
310 var generatedContents = File.ReadAllText(generatedFilePath);
311 var testXml = generatedContents.GetTestXml();
312 Assert.Equal(@"<Wix>" +
313 "<Fragment>" +
314 "<DirectoryRef Id='SdkStyleCs.Binaries'>" +
315 "<Component Id='SdkStyleCs.Binaries.SdkStyleCs.dll' Guid='*'>" +
316 "<File Id='SdkStyleCs.Binaries.SdkStyleCs.dll' Source='$(var.SdkStyleCs.TargetDir)\\SdkStyleCs.dll' />" +
317 "</Component>" +
318 "</DirectoryRef>" +
319 "</Fragment>" +
320 "<Fragment>" +
321 "<ComponentGroup Id='SdkStyleCs.Binaries'>" +
322 "<ComponentRef Id='SdkStyleCs.Binaries.SdkStyleCs.dll' />" +
323 "</ComponentGroup>" +
324 "</Fragment>" +
325 "<Fragment>" +
326 "<DirectoryRef Id='SdkStyleCs.Symbols'>" +
327 "<Component Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' Guid='*'>" +
328 "<File Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' Source='$(var.SdkStyleCs.TargetDir)\\SdkStyleCs.pdb' />" +
329 "</Component>" +
330 "</DirectoryRef>" +
331 "</Fragment>" +
332 "<Fragment>" +
333 "<ComponentGroup Id='SdkStyleCs.Symbols'>" +
334 "<ComponentRef Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' />" +
335 "</ComponentGroup>" +
336 "</Fragment>" +
337 "<Fragment>" +
338 "<DirectoryRef Id='SdkStyleCs.Sources'>" +
339 "<Component Id='SdkStyleCs.Sources.SdkStyleCs.cs' Guid='*'>" +
340 "<File Id='SdkStyleCs.Sources.SdkStyleCs.cs' Source='$(var.SdkStyleCs.ProjectDir)\\SdkStyleCs.cs' />" +
341 "</Component>" +
342 "<Component Id='SdkStyleCs.Sources.SdkStyleCs.csproj' Guid='*'>" +
343 "<File Id='SdkStyleCs.Sources.SdkStyleCs.csproj' Source='$(var.SdkStyleCs.ProjectDir)\\SdkStyleCs.csproj' />" +
344 "</Component>" +
345 "</DirectoryRef>" +
346 "</Fragment>" +
347 "<Fragment>" +
348 "<ComponentGroup Id='SdkStyleCs.Sources'>" +
349 "<ComponentRef Id='SdkStyleCs.Sources.SdkStyleCs.cs' />" +
350 "<ComponentRef Id='SdkStyleCs.Sources.SdkStyleCs.csproj' />" +
351 "</ComponentGroup>" +
352 "</Fragment>" +
353 "<Fragment>" +
354 "<ComponentGroup Id='SdkStyleCs.Content' />" +
355 "</Fragment>" +
356 "<Fragment>" +
357 "<ComponentGroup Id='SdkStyleCs.Satellites' />" +
358 "</Fragment>" +
359 "<Fragment>" +
360 "<ComponentGroup Id='SdkStyleCs.Documents' />" +
361 "</Fragment>" +
362 "</Wix>", testXml);
363
364 var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatProjectSdkStyle.wixpdb");
365 Assert.True(File.Exists(pdbPath));
366
367 var intermediate = Intermediate.Load(pdbPath);
368 var section = intermediate.Sections.Single();
369
370 var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
371 Assert.Equal(Path.Combine(fs.BaseFolder, "SdkStyleCs", "bin", "Release", "netstandard2.0\\\\SdkStyleCs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path);
372 }
373 }
374 }
375}
diff --git a/src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs b/src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs
new file mode 100644
index 00000000..2e07af3a
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs
@@ -0,0 +1,98 @@
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
3namespace WixToolsetTest.Sdk
4{
5 using System;
6 using System.Collections.Generic;
7 using System.IO;
8 using System.Linq;
9 using WixBuildTools.TestSupport;
10
11 public enum BuildSystem
12 {
13 DotNetCoreSdk,
14 MSBuild,
15 MSBuild64,
16 }
17
18 public static class MsbuildUtilities
19 {
20 public static readonly string WixMsbuildPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildUtilities).Assembly.CodeBase).AbsolutePath), "..", "publish", "WixToolset.Sdk");
21 public static readonly string WixPropsPath = Path.Combine(WixMsbuildPath, "build", "WixToolset.Sdk.props");
22
23 public static MsbuildRunnerResult BuildProject(BuildSystem buildSystem, string projectPath, string[] arguments = null, string configuration = "Release", bool? outOfProc = null, string verbosityLevel = "normal")
24 {
25 var allArgs = new List<string>
26 {
27 $"-verbosity:{verbosityLevel}",
28 $"-p:Configuration={configuration}",
29 GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildUtilities.WixPropsPath),
30 // Node reuse means that child msbuild processes can stay around after the build completes.
31 // Under that scenario, the root msbuild does not reliably close its streams which causes us to hang.
32 "-nr:false",
33 };
34
35 if (outOfProc.HasValue)
36 {
37 allArgs.Add($"-p:RunWixToolsOutOfProc={outOfProc.Value}");
38 }
39
40 if (arguments != null)
41 {
42 allArgs.AddRange(arguments);
43 }
44
45 switch (buildSystem)
46 {
47 case BuildSystem.DotNetCoreSdk:
48 {
49 allArgs.Add(projectPath);
50 var result = DotnetRunner.Execute("msbuild", allArgs.ToArray());
51 return new MsbuildRunnerResult
52 {
53 ExitCode = result.ExitCode,
54 Output = result.StandardOutput,
55 };
56 }
57 case BuildSystem.MSBuild:
58 case BuildSystem.MSBuild64:
59 {
60 return MsbuildRunner.Execute(projectPath, allArgs.ToArray(), buildSystem == BuildSystem.MSBuild64);
61 }
62 default:
63 {
64 throw new NotImplementedException();
65 }
66 }
67 }
68
69 public static string GetQuotedPropertySwitch(BuildSystem buildSystem, string propertyName, string valueToQuote)
70 {
71 switch (buildSystem)
72 {
73 case BuildSystem.DotNetCoreSdk:
74 {
75 return $"-p:{propertyName}=\\\"{valueToQuote}\\\"";
76 }
77 case BuildSystem.MSBuild:
78 case BuildSystem.MSBuild64:
79 {
80 return $"-p:{propertyName}=\"{valueToQuote}\"";
81 }
82 default:
83 {
84 throw new NotImplementedException();
85 }
86 }
87 }
88
89 public static IEnumerable<string> GetToolCommandLines(MsbuildRunnerResult result, string toolName, string operation, BuildSystem buildSystem, bool? outOfProc = null)
90 {
91 var expectedOutOfProc = buildSystem == BuildSystem.DotNetCoreSdk || outOfProc.HasValue && outOfProc.Value;
92 var expectedToolExe = !expectedOutOfProc ? $"({toolName}.exe)" :
93 buildSystem == BuildSystem.DotNetCoreSdk ? $"{toolName}.dll\"" : $"{toolName}.exe";
94 var expectedToolCommand = $"{expectedToolExe} {operation}";
95 return result.Output.Where(line => line.Contains(expectedToolCommand));
96 }
97 }
98}
diff --git a/src/wix/test/WixToolsetTest.Sdk/README.md b/src/wix/test/WixToolsetTest.Sdk/README.md
new file mode 100644
index 00000000..7faf34b9
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/README.md
@@ -0,0 +1,5 @@
1In order to properly test wix.targets,
2all of the supported architectures for WixToolset.BuildTasks need to be available in the layout used in the Nuget package.
3Making this happen on every build for the solution takes too long,
4so this project relies on manually running appveyor.cmd to publish everything before the tests can be run.
5appveyor.cmd needs to be ran again every time changes are made in other projects, including the targets themselves. \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj
new file mode 100644
index 00000000..7d751319
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj
@@ -0,0 +1,58 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid>
11 </PropertyGroup>
12
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
14 <PlatformName>$(Platform)</PlatformName>
15 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
16 <DefineConstants>Debug</DefineConstants>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
19 <PlatformName>$(Platform)</PlatformName>
20 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
23 <PlatformName>$(Platform)</PlatformName>
24 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
25 <DefineConstants>Debug</DefineConstants>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
28 <PlatformName>$(Platform)</PlatformName>
29 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
30 </PropertyGroup>
31
32 <ItemGroup>
33 <Compile Include="Package.wxs" />
34 </ItemGroup>
35
36 <ItemGroup>
37 <BindInputPaths Include="." />
38 </ItemGroup>
39
40 <PropertyGroup>
41 <HarvestFileSuppressUniqueIds>true</HarvestFileSuppressUniqueIds>
42 </PropertyGroup>
43
44 <ItemGroup>
45 <HarvestFile Include="MyProgram.txt">
46 <ComponentGroupName>TxtProductComponents</ComponentGroupName>
47 <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
48 <SuppressRootDirectory>true</SuppressRootDirectory>
49 </HarvestFile>
50 <HarvestFile Include="MyProgram.json">
51 <ComponentGroupName>JsonProductComponents</ComponentGroupName>
52 <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
53 <SuppressRootDirectory>true</SuppressRootDirectory>
54 </HarvestFile>
55 </ItemGroup>
56
57 <Import Project="$(WixTargetsPath)" />
58</Project> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json
new file mode 100644
index 00000000..5f282702
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json
@@ -0,0 +1 @@
 \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt
new file mode 100644
index 00000000..5f282702
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt
@@ -0,0 +1 @@
 \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs
new file mode 100644
index 00000000..5abcee9f
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs
@@ -0,0 +1,18 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Package Name="HeatFilePackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" Compressed="yes" InstallerVersion="200">
3
4
5 <MediaTemplate />
6
7 <Feature Id="ProductFeature" Title="HeatFileFeature">
8 <ComponentGroupRef Id="TxtProductComponents" />
9 <ComponentGroupRef Id="JsonProductComponents" />
10 </Feature>
11 </Package>
12
13 <Fragment>
14 <StandardDirectory Id="ProgramFilesFolder">
15 <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
16 </StandardDirectory>
17 </Fragment>
18</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj
new file mode 100644
index 00000000..3988acaf
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj
@@ -0,0 +1,53 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid>
11 </PropertyGroup>
12
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
14 <PlatformName>$(Platform)</PlatformName>
15 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
16 <DefineConstants>Debug</DefineConstants>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
19 <PlatformName>$(Platform)</PlatformName>
20 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
23 <PlatformName>$(Platform)</PlatformName>
24 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
25 <DefineConstants>Debug</DefineConstants>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
28 <PlatformName>$(Platform)</PlatformName>
29 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
30 </PropertyGroup>
31
32 <ItemGroup>
33 <Compile Include="Package.wxs" />
34 </ItemGroup>
35
36 <ItemGroup>
37 <BindInputPaths Include="." />
38 </ItemGroup>
39
40 <PropertyGroup>
41 <HarvestFileSuppressUniqueIds>true</HarvestFileSuppressUniqueIds>
42 </PropertyGroup>
43
44 <ItemGroup>
45 <HarvestFile Include="HeatFilePackage.wixproj">
46 <ComponentGroupName>ProductComponents</ComponentGroupName>
47 <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
48 <SuppressRootDirectory>true</SuppressRootDirectory>
49 </HarvestFile>
50 </ItemGroup>
51
52 <Import Project="$(WixTargetsPath)" />
53</Project> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs
new file mode 100644
index 00000000..f5fa8cf6
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs
@@ -0,0 +1,17 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Package Name="HeatFilePackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" Compressed="yes" InstallerVersion="200">
3
4
5 <MediaTemplate />
6
7 <Feature Id="ProductFeature" Title="HeatFileFeature">
8 <ComponentGroupRef Id="ProductComponents" />
9 </Feature>
10 </Package>
11
12 <Fragment>
13 <StandardDirectory Id="ProgramFilesFolder">
14 <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
15 </StandardDirectory>
16</Fragment>
17</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj
new file mode 100644
index 00000000..c569e8ac
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj
@@ -0,0 +1,50 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>BB919765-DD69-41E7-91C5-415A69BE923E</ProjectGuid>
11 </PropertyGroup>
12
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
14 <PlatformName>$(Platform)</PlatformName>
15 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
16 <DefineConstants>Debug</DefineConstants>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
19 <PlatformName>$(Platform)</PlatformName>
20 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
23 <PlatformName>$(Platform)</PlatformName>
24 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
25 <DefineConstants>Debug</DefineConstants>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
28 <PlatformName>$(Platform)</PlatformName>
29 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
30 </PropertyGroup>
31
32 <ItemGroup>
33 <Compile Include="Package.wxs" />
34 </ItemGroup>
35
36 <ItemGroup>
37 <BindInputPaths Include="." />
38 </ItemGroup>
39
40 <PropertyGroup>
41 <EnableProjectHarvesting>true</EnableProjectHarvesting>
42 <HarvestProjectsSuppressUniqueIds>true</HarvestProjectsSuppressUniqueIds>
43 </PropertyGroup>
44
45 <ItemGroup>
46 <ProjectReference Include="..\ToolsVersion4Cs\ToolsVersion4Cs.csproj" />
47 </ItemGroup>
48
49 <Import Project="$(WixTargetsPath)" />
50</Project> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs
new file mode 100644
index 00000000..6c12861b
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs
@@ -0,0 +1,17 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Package Name="HeatProjectPreSdkStyle" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5622BB42-89F6-4810-A2A3-98AFF28282FE" Compressed="yes" InstallerVersion="200">
3
4
5 <MediaTemplate />
6
7 <Feature Id="ProductFeature" Title="HeatProjectFeature">
8 <ComponentGroupRef Id="ToolsVersion4Cs.Binaries" />
9 </Feature>
10 </Package>
11
12 <Fragment>
13 <StandardDirectory Id="ProgramFilesFolder">
14 <Directory Id="ToolsVersion4Cs.Binaries" Name="MsiPackage" />
15 </StandardDirectory>
16 </Fragment>
17</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj
new file mode 100644
index 00000000..907f0bb0
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj
@@ -0,0 +1,50 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>CE998A54-9BEC-4268-BFA2-8E3DAE5831C8</ProjectGuid>
11 </PropertyGroup>
12
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
14 <PlatformName>$(Platform)</PlatformName>
15 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
16 <DefineConstants>Debug</DefineConstants>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
19 <PlatformName>$(Platform)</PlatformName>
20 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
23 <PlatformName>$(Platform)</PlatformName>
24 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
25 <DefineConstants>Debug</DefineConstants>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
28 <PlatformName>$(Platform)</PlatformName>
29 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
30 </PropertyGroup>
31
32 <ItemGroup>
33 <Compile Include="Package.wxs" />
34 </ItemGroup>
35
36 <ItemGroup>
37 <BindInputPaths Include="." />
38 </ItemGroup>
39
40 <PropertyGroup>
41 <EnableProjectHarvesting>true</EnableProjectHarvesting>
42 <HarvestProjectsSuppressUniqueIds>true</HarvestProjectsSuppressUniqueIds>
43 </PropertyGroup>
44
45 <ItemGroup>
46 <ProjectReference Include="..\SdkStyleCs\SdkStyleCs.csproj" />
47 </ItemGroup>
48
49 <Import Project="$(WixTargetsPath)" />
50</Project> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs
new file mode 100644
index 00000000..d30218f3
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs
@@ -0,0 +1,17 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Package Name="HeatProjectSdkStyle" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="D2AF3276-A68E-40DE-85A1-4BCD5B35D432" Compressed="yes" InstallerVersion="200">
3
4
5 <MediaTemplate />
6
7 <Feature Id="ProductFeature" Title="HeatProjectFeature">
8 <ComponentGroupRef Id="SdkStyleCs.Binaries" />
9 </Feature>
10 </Package>
11
12 <Fragment>
13 <StandardDirectory Id="ProgramFilesFolder">
14 <Directory Id="SdkStyleCs.Binaries" Name="MsiPackage" />
15 </StandardDirectory>
16 </Fragment>
17</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs
new file mode 100644
index 00000000..2b2c5be2
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs
@@ -0,0 +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
3namespace SdkStyleCs
4{
5 public class SdkStyleCs
6 {
7 }
8}
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj
new file mode 100644
index 00000000..755976bc
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj
@@ -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 Sdk="Microsoft.NET.Sdk">
5 <PropertyGroup>
6 <TargetFramework>netstandard2.0</TargetFramework>
7 </PropertyGroup>
8</Project>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..c29a2303
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs
@@ -0,0 +1,11 @@
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
3using System;
4using System.Reflection;
5using System.Runtime.InteropServices;
6
7[assembly: AssemblyTitle("ToolsVersion4Cs")]
8[assembly: AssemblyDescription("ToolsVersion4Cs")]
9[assembly: AssemblyProduct("WiX Toolset")]
10[assembly: AssemblyCompany("WiX Toolset Team")]
11[assembly: AssemblyCopyright("Copyright (c) .NET Foundation and contributors. All rights reserved.")]
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj
new file mode 100644
index 00000000..9c55f7a5
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj
@@ -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
5<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 <PropertyGroup>
7 <ProjectGuid>{8B19578A-816A-48A1-A6C4-58067334EB79}</ProjectGuid>
8 <AssemblyName>ToolsVersion4Cs</AssemblyName>
9 <OutputType>Library</OutputType>
10 <RootNamespace>ToolsVersion4Cs</RootNamespace>
11 <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
12 </PropertyGroup>
13 <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
14 <DebugSymbols>true</DebugSymbols>
15 <Optimize>false</Optimize>
16 <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
17 <OutputPath>bin\Debug\</OutputPath>
18 </PropertyGroup>
19 <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
20 <DebugSymbols>true</DebugSymbols>
21 <Optimize>true</Optimize>
22 <DefineConstants>$(DefineConstants);TRACE</DefineConstants>
23 <OutputPath>bin\Release\</OutputPath>
24 </PropertyGroup>
25 <ItemGroup>
26 <Compile Include="Properties\AssemblyInfo.cs" />
27 </ItemGroup>
28 <ItemGroup>
29 <Reference Include="System" />
30 <Reference Include="System.Configuration" />
31 <Reference Include="System.Data" />
32 <Reference Include="System.Xml" />
33 </ItemGroup>
34
35 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
36</Project> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/MergeMsiPackage.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/MergeMsiPackage.wixproj
new file mode 100644
index 00000000..77ee4420
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/MergeMsiPackage.wixproj
@@ -0,0 +1,44 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>{B00939D5-7952-4ADF-BEB1-507D227B2FE2}</ProjectGuid>
11 </PropertyGroup>
12
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
14 <PlatformName>$(Platform)</PlatformName>
15 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
16 <DefineConstants>Debug</DefineConstants>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
19 <PlatformName>$(Platform)</PlatformName>
20 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
23 <PlatformName>$(Platform)</PlatformName>
24 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
25 <DefineConstants>Debug</DefineConstants>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
28 <PlatformName>$(Platform)</PlatformName>
29 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
30 </PropertyGroup>
31
32 <ItemGroup>
33 <Compile Include="Package.wxs" />
34 </ItemGroup>
35
36 <ItemGroup>
37 <ProjectReference Include="..\SimpleMergeModule\SimpleMergeModule.wixproj">
38 <Name>SimpleMergeModule</Name>
39 <Project>{9F84998B-7F45-4CB3-8795-915801DBBB74}</Project>
40 </ProjectReference>
41 </ItemGroup>
42
43 <Import Project="$(WixTargetsPath)" />
44</Project> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs
new file mode 100644
index 00000000..ef62c31b
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs
@@ -0,0 +1,17 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" Compressed="yes" InstallerVersion="200">
3 <MediaTemplate />
4
5 <Feature Id="ProductFeature" Title="ATitle">
6 <MergeRef Id="SimpleMM" />
7 </Feature>
8 </Package>
9
10 <Fragment>
11 <StandardDirectory Id="ProgramFilesFolder">
12 <Directory Id="INSTALLFOLDER" Name="MsiPackage">
13 <Merge Id="SimpleMM" Language="1033" SourceFile="$(var.SimpleMergeModule.TargetPath)" DiskId="1" />
14 </Directory>
15 </StandardDirectory>
16 </Fragment>
17</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs
new file mode 100644
index 00000000..b892debd
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs
@@ -0,0 +1,19 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Module Id="SimpleMM" Language="1033" Version="1.0.0.0" Guid="86FB9E91-ACF3-4EDF-B711-72DAF2443692" InstallerVersion="200">
3 <SummaryInformation Manufacturer="Example Corporation" />
4
5 <ComponentGroupRef Id="ProductComponents" />
6 </Module>
7
8 <Fragment>
9 <Directory Id="MergeRedirectFolder" />
10 </Fragment>
11
12 <Fragment>
13 <ComponentGroup Id="ProductComponents" Directory="MergeRedirectFolder">
14 <Component Id="MMtxt" Guid="2D93B748-4926-4185-BC84-9F1D6883AF20">
15 <File Source="MergeModule.txt" />
16 </Component>
17 </ComponentGroup>
18 </Fragment>
19</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/SimpleMergeModule.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/SimpleMergeModule.wixproj
new file mode 100644
index 00000000..91579790
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/SimpleMergeModule.wixproj
@@ -0,0 +1,42 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 <OutputType>Module</OutputType>
8 </PropertyGroup>
9
10 <PropertyGroup>
11 <ProjectGuid>{9F84998B-7F45-4CB3-8795-915801DBBB74}</ProjectGuid>
12 </PropertyGroup>
13
14 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
15 <PlatformName>$(Platform)</PlatformName>
16 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
17 <DefineConstants>Debug</DefineConstants>
18 </PropertyGroup>
19 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
20 <PlatformName>$(Platform)</PlatformName>
21 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
22 </PropertyGroup>
23 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
24 <PlatformName>$(Platform)</PlatformName>
25 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
26 <DefineConstants>Debug</DefineConstants>
27 </PropertyGroup>
28 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
29 <PlatformName>$(Platform)</PlatformName>
30 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
31 </PropertyGroup>
32
33 <ItemGroup>
34 <Compile Include="MergeModule.wxs" />
35 </ItemGroup>
36
37 <ItemGroup>
38 <BindInputPaths Include="data" />
39 </ItemGroup>
40
41 <Import Project="$(WixTargetsPath)" />
42</Project> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/data/MergeModule.txt b/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/data/MergeModule.txt
new file mode 100644
index 00000000..cd0db0e1
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/data/MergeModule.txt
@@ -0,0 +1 @@
This is test.txt. \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj
new file mode 100644
index 00000000..555addbe
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj
@@ -0,0 +1,50 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 <ProductVersion>0.9</ProductVersion>
8 <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid>
9 <OutputName>MsiPackage</OutputName>
10 <OutputType>Package</OutputType>
11 <Name>MsiPackage</Name>
12 <RootNamespace>MsiPackage</RootNamespace>
13 <Cultures>en-US,en;de-DE</Cultures>
14 </PropertyGroup>
15
16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
17 <PlatformName>$(Platform)</PlatformName>
18 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
19 <DefineConstants>Debug</DefineConstants>
20 </PropertyGroup>
21 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
22 <PlatformName>$(Platform)</PlatformName>
23 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
26 <PlatformName>$(Platform)</PlatformName>
27 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
28 <DefineConstants>Debug</DefineConstants>
29 </PropertyGroup>
30 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
31 <PlatformName>$(Platform)</PlatformName>
32 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
33 </PropertyGroup>
34
35 <ItemGroup>
36 <Compile Include="Package.wxs" />
37 <Compile Include="PackageComponents.wxs" />
38 </ItemGroup>
39
40 <ItemGroup>
41 <EmbeddedResource Include="Package.en-us.wxl" />
42 <EmbeddedResource Include="Package.de-de.wxl" />
43 </ItemGroup>
44
45 <ItemGroup>
46 <BindInputPaths Include="data" />
47 </ItemGroup>
48
49 <Import Project="$(WixTargetsPath)" />
50</Project>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl
new file mode 100644
index 00000000..23493ace
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This file contains the declaration of all the localizable strings.
5-->
6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="de-DE">
7
8 <String Id="DowngradeError">German DowngradeError</String>
9 <String Id="FeatureTitle">German FeatureTitle</String>
10
11</WixLocalization>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl
new file mode 100644
index 00000000..38c12ac1
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This 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>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs
new file mode 100644
index 00000000..df24aa33
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs
@@ -0,0 +1,16 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" Compressed="yes" InstallerVersion="200">
3 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
4 <MediaTemplate />
5
6 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
7 <ComponentGroupRef Id="ProductComponents" />
8 </Feature>
9 </Package>
10
11 <Fragment>
12 <StandardDirectory Id="ProgramFilesFolder">
13 <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
14 </StandardDirectory>
15 </Fragment>
16</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/PackageComponents.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/PackageComponents.wxs
new file mode 100644
index 00000000..e26c4509
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/PackageComponents.wxs
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
5 <Component>
6 <File Source="test.txt" />
7 </Component>
8 </ComponentGroup>
9 </Fragment>
10</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/data/test.txt b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/data/test.txt
new file mode 100644
index 00000000..cd0db0e1
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/data/test.txt
@@ -0,0 +1 @@
This is test.txt. \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MultiCulturalMsiPackage.sln b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MultiCulturalMsiPackage.sln
new file mode 100644
index 00000000..2c88704e
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MultiCulturalMsiPackage.sln
@@ -0,0 +1,31 @@
1
2Microsoft Visual Studio Solution File, Format Version 12.00
3# Visual Studio 15
4VisualStudioVersion = 15.0.26730.8
5MinimumVisualStudioVersion = 10.0.40219.1
6Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "MsiPackage", "MsiPackage\MsiPackage.wixproj", "{7FB77005-C6E0-454F-8C2D-0A4A79C918BA}"
7EndProject
8Global
9 GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 Debug|x64 = Debug|x64
11 Debug|x86 = Debug|x86
12 Release|x64 = Release|x64
13 Release|x86 = Release|x86
14 EndGlobalSection
15 GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x64.ActiveCfg = Debug|x64
17 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x64.Build.0 = Debug|x64
18 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x86.ActiveCfg = Debug|x86
19 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x86.Build.0 = Debug|x86
20 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x64.ActiveCfg = Release|x64
21 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x64.Build.0 = Release|x64
22 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x86.ActiveCfg = Release|x86
23 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x86.Build.0 = Release|x86
24 EndGlobalSection
25 GlobalSection(SolutionProperties) = preSolution
26 HideSolutionNode = FALSE
27 EndGlobalSection
28 GlobalSection(ExtensibilityGlobals) = postSolution
29 SolutionGuid = {585B0599-4EB5-4AB6-BC66-819CC78B63D5}
30 EndGlobalSection
31EndGlobal
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj
new file mode 100644
index 00000000..18ae08b2
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj
@@ -0,0 +1,46 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid>
11 </PropertyGroup>
12
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
14 <PlatformName>$(Platform)</PlatformName>
15 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
16 <DefineConstants>Debug</DefineConstants>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
19 <PlatformName>$(Platform)</PlatformName>
20 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
23 <PlatformName>$(Platform)</PlatformName>
24 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
25 <DefineConstants>Debug</DefineConstants>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
28 <PlatformName>$(Platform)</PlatformName>
29 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
30 </PropertyGroup>
31
32 <ItemGroup>
33 <Compile Include="Package.wxs" />
34 <Compile Include="PackageComponents.wxs" />
35 </ItemGroup>
36
37 <ItemGroup>
38 <EmbeddedResource Include="Package.en-us.wxl" />
39 </ItemGroup>
40
41 <ItemGroup>
42 <BindInputPaths Include="data" />
43 </ItemGroup>
44
45 <Import Project="$(WixTargetsPath)" />
46</Project> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.en-us.wxl b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.en-us.wxl
new file mode 100644
index 00000000..38c12ac1
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.en-us.wxl
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This 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>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs
new file mode 100644
index 00000000..0a133c7d
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs
@@ -0,0 +1,19 @@
1<?define Variable = "Value" ?>
2<?define Variable = "DifferentValue" ?>
3
4<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5 <Package Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a" Compressed="yes" InstallerVersion="200">
6
7 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
8
9 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
10 <ComponentGroupRef Id="ProductComponents" />
11 </Feature>
12 </Package>
13
14 <Fragment>
15 <StandardDirectory Id="ProgramFilesFolder">
16 <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
17 </StandardDirectory>
18 </Fragment>
19</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/PackageComponents.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/PackageComponents.wxs
new file mode 100644
index 00000000..ddb95faf
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/PackageComponents.wxs
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
5 <Component>
6 <File Source="test.txt" DefaultLanguage="1033" />
7 </Component>
8 </ComponentGroup>
9 </Fragment>
10</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/data/test.txt b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/data/test.txt
new file mode 100644
index 00000000..cd0db0e1
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/data/test.txt
@@ -0,0 +1 @@
This is test.txt. \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/Bundle.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/Bundle.wxs
new file mode 100644
index 00000000..3b4a9d6a
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/Bundle.wxs
@@ -0,0 +1,11 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Bundle Name="SimpleBundle" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="6670d5c9-bbec-4828-ab60-4a1c0ffeb97d">
3 <BootstrapperApplication>
4 <BootstrapperApplicationDll SourceFile="test.txt" />
5 </BootstrapperApplication>
6
7 <Chain>
8 <ExePackage Permanent="yes" DetectCondition="no" SourceFile="test.txt" />
9 </Chain>
10 </Bundle>
11</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj
new file mode 100644
index 00000000..199eb6d9
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj
@@ -0,0 +1,42 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>6670d5c9-bbec-4828-ab60-4a1c0ffeb97d</ProjectGuid>
11 <OutputType>Bundle</OutputType>
12 </PropertyGroup>
13
14 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
15 <PlatformName>$(Platform)</PlatformName>
16 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
17 <DefineConstants>Debug</DefineConstants>
18 </PropertyGroup>
19 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
20 <PlatformName>$(Platform)</PlatformName>
21 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
22 </PropertyGroup>
23 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
24 <PlatformName>$(Platform)</PlatformName>
25 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
26 <DefineConstants>Debug</DefineConstants>
27 </PropertyGroup>
28 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
29 <PlatformName>$(Platform)</PlatformName>
30 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
31 </PropertyGroup>
32
33 <ItemGroup>
34 <Compile Include="Bundle.wxs" />
35 </ItemGroup>
36
37 <ItemGroup>
38 <BindInputPaths Include="..\MsiPackage\data" />
39 </ItemGroup>
40
41 <Import Project="$(WixTargetsPath)" />
42</Project> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleMsiPackage.sln b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleMsiPackage.sln
new file mode 100644
index 00000000..dd21489d
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleMsiPackage.sln
@@ -0,0 +1,39 @@
1
2Microsoft Visual Studio Solution File, Format Version 12.00
3# Visual Studio Version 16
4VisualStudioVersion = 16.0.30011.22
5MinimumVisualStudioVersion = 10.0.40219.1
6Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "MsiPackage", "MsiPackage\MsiPackage.wixproj", "{7FB77005-C6E0-454F-8C2D-0A4A79C918BA}"
7EndProject
8Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SimpleBundle", "SimpleBundle\SimpleBundle.wixproj", "{6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}"
9EndProject
10Global
11 GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 Debug|x64 = Debug|x64
13 Debug|x86 = Debug|x86
14 Release|x64 = Release|x64
15 Release|x86 = Release|x86
16 EndGlobalSection
17 GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x64.ActiveCfg = Debug|x64
19 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x64.Build.0 = Debug|x64
20 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x86.ActiveCfg = Debug|x86
21 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x86.Build.0 = Debug|x86
22 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x64.ActiveCfg = Release|x64
23 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x64.Build.0 = Release|x64
24 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x86.ActiveCfg = Release|x86
25 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x86.Build.0 = Release|x86
26 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Debug|x64.ActiveCfg = Debug|x86
27 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Debug|x86.ActiveCfg = Debug|x86
28 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Debug|x86.Build.0 = Debug|x86
29 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Release|x64.ActiveCfg = Release|x86
30 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Release|x86.ActiveCfg = Release|x86
31 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Release|x86.Build.0 = Release|x86
32 EndGlobalSection
33 GlobalSection(SolutionProperties) = preSolution
34 HideSolutionNode = FALSE
35 EndGlobalSection
36 GlobalSection(ExtensibilityGlobals) = postSolution
37 SolutionGuid = {585B0599-4EB5-4AB6-BC66-819CC78B63D5}
38 EndGlobalSection
39EndGlobal
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/Bundle.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/Bundle.wxs
new file mode 100644
index 00000000..6ab9a016
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/Bundle.wxs
@@ -0,0 +1,11 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Bundle Name="UncompressedBundle" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{AB04C2A5-8312-4464-AE01-7F3A3D9C2BCF}" Compressed="no">
3 <BootstrapperApplication>
4 <BootstrapperApplicationDll SourceFile="test.txt" />
5 </BootstrapperApplication>
6
7 <Chain>
8 <ExePackage Permanent="yes" DetectCondition="none" SourceFile="test.txt" />
9 </Chain>
10 </Bundle>
11</Wix>
diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/UncompressedBundle.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/UncompressedBundle.wixproj
new file mode 100644
index 00000000..199eb6d9
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/UncompressedBundle/UncompressedBundle.wixproj
@@ -0,0 +1,42 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>6670d5c9-bbec-4828-ab60-4a1c0ffeb97d</ProjectGuid>
11 <OutputType>Bundle</OutputType>
12 </PropertyGroup>
13
14 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
15 <PlatformName>$(Platform)</PlatformName>
16 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
17 <DefineConstants>Debug</DefineConstants>
18 </PropertyGroup>
19 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
20 <PlatformName>$(Platform)</PlatformName>
21 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
22 </PropertyGroup>
23 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
24 <PlatformName>$(Platform)</PlatformName>
25 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
26 <DefineConstants>Debug</DefineConstants>
27 </PropertyGroup>
28 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
29 <PlatformName>$(Platform)</PlatformName>
30 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
31 </PropertyGroup>
32
33 <ItemGroup>
34 <Compile Include="Bundle.wxs" />
35 </ItemGroup>
36
37 <ItemGroup>
38 <BindInputPaths Include="..\MsiPackage\data" />
39 </ItemGroup>
40
41 <Import Project="$(WixTargetsPath)" />
42</Project> \ No newline at end of file
diff --git a/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj b/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj
new file mode 100644
index 00000000..35ed053a
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj
@@ -0,0 +1,59 @@
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>net461</TargetFramework>
7 <IsPackable>false</IsPackable>
8 <DebugType>embedded</DebugType>
9 <DefaultItemExcludes>TestData\**;$(DefaultItemExcludes)</DefaultItemExcludes>
10 </PropertyGroup>
11
12 <ItemGroup>
13 <Content Include="TestData\HeatFilePackage\HeatFilePackage.wixproj" CopyToOutputDirectory="PreserveNewest" />
14 <Content Include="TestData\HeatFilePackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
15 <Content Include="TestData\HeatFileMultipleFilesSameFileName\HeatFileMultipleFilesSameFileName.wixproj" CopyToOutputDirectory="PreserveNewest" />
16 <Content Include="TestData\HeatFileMultipleFilesSameFileName\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
17 <Content Include="TestData\HeatFileMultipleFilesSameFileName\MyProgram.txt" CopyToOutputDirectory="PreserveNewest" />
18 <Content Include="TestData\HeatFileMultipleFilesSameFileName\MyProgram.json" CopyToOutputDirectory="PreserveNewest" />
19 <Content Include="TestData\HeatProject\HeatProjectPreSdkStyle\HeatProjectPreSdkStyle.wixproj" CopyToOutputDirectory="PreserveNewest" />
20 <Content Include="TestData\HeatProject\HeatProjectPreSdkStyle\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
21 <Content Include="TestData\HeatProject\HeatProjectSdkStyle\HeatProjectSdkStyle.wixproj" CopyToOutputDirectory="PreserveNewest" />
22 <Content Include="TestData\HeatProject\HeatProjectSdkStyle\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
23 <Content Include="TestData\HeatProject\SdkStyleCs\SdkStyleCs.cs" CopyToOutputDirectory="PreserveNewest" />
24 <Content Include="TestData\HeatProject\SdkStyleCs\SdkStyleCs.csproj" CopyToOutputDirectory="PreserveNewest" />
25 <Content Include="TestData\HeatProject\ToolsVersion4Cs\Properties\AssemblyInfo.cs" CopyToOutputDirectory="PreserveNewest" />
26 <Content Include="TestData\HeatProject\ToolsVersion4Cs\ToolsVersion4Cs.csproj" CopyToOutputDirectory="PreserveNewest" />
27 <Content Include="TestData\MergeModule\MergeMsiPackage\MergeMsiPackage.wixproj" CopyToOutputDirectory="PreserveNewest" />
28 <Content Include="TestData\MergeModule\MergeMsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
29 <Content Include="TestData\MergeModule\SimpleMergeModule\data\MergeModule.txt" CopyToOutputDirectory="PreserveNewest" />
30 <Content Include="TestData\MergeModule\SimpleMergeModule\MergeModule.wxs" CopyToOutputDirectory="PreserveNewest" />
31 <Content Include="TestData\MergeModule\SimpleMergeModule\SimpleMergeModule.wixproj" CopyToOutputDirectory="PreserveNewest" />
32 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\MsiPackage.wixproj" CopyToOutputDirectory="PreserveNewest" />
33 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\Package.de-de.wxl" CopyToOutputDirectory="PreserveNewest" />
34 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
35 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
36 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
37 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
38 <Content Include="TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj" CopyToOutputDirectory="PreserveNewest" />
39 <Content Include="TestData\SimpleMsiPackage\MsiPackage\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
40 <Content Include="TestData\SimpleMsiPackage\MsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
41 <Content Include="TestData\SimpleMsiPackage\MsiPackage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
42 <Content Include="TestData\SimpleMsiPackage\MsiPackage\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
43 <Content Include="TestData\SimpleMsiPackage\UncompressedBundle\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" />
44 <Content Include="TestData\SimpleMsiPackage\UncompressedBundle\UncompressedBundle.wixproj" CopyToOutputDirectory="PreserveNewest" />
45 <Content Include="TestData\SimpleMsiPackage\SimpleBundle\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" />
46 <Content Include="TestData\SimpleMsiPackage\SimpleBundle\SimpleBundle.wixproj" CopyToOutputDirectory="PreserveNewest" />
47 </ItemGroup>
48
49 <ItemGroup>
50 <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
51 <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" />
52 </ItemGroup>
53
54 <ItemGroup>
55 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
56 <PackageReference Include="xunit" Version="2.4.1" />
57 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" />
58 </ItemGroup>
59</Project>
diff --git a/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.v3.ncrunchproject b/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.v3.ncrunchproject
new file mode 100644
index 00000000..f1d03cd7
--- /dev/null
+++ b/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.v3.ncrunchproject
@@ -0,0 +1,8 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 <IgnoredTests>
5 <AllTestsSelector />
6 </IgnoredTests>
7 </Settings>
8</ProjectConfiguration> \ No newline at end of file
diff --git a/src/wix/wix/ConsoleMessageListener.cs b/src/wix/wix/ConsoleMessageListener.cs
new file mode 100644
index 00000000..ebf1622b
--- /dev/null
+++ b/src/wix/wix/ConsoleMessageListener.cs
@@ -0,0 +1,90 @@
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
3namespace WixToolset.Tools.Core
4{
5 using System;
6 using System.Collections.Generic;
7 using System.Globalization;
8 using System.Text;
9 using System.Threading;
10 using WixToolset.Data;
11 using WixToolset.Extensibility;
12 using WixToolset.Extensibility.Services;
13
14 public sealed class ConsoleMessageListener : IMessageListener
15 {
16 public ConsoleMessageListener(string prefix, string appName)
17 {
18 this.Prefix = prefix;
19 this.AppName = appName;
20
21 PrepareConsoleForLocalization();
22 }
23
24 public string AppName { get; }
25
26 public string Prefix { get; }
27
28 public void Write(Message message)
29 {
30 var filename = message.SourceLineNumbers?.FileName ?? this.AppName;
31 var type = message.Level.ToString().ToLowerInvariant();
32 var output = message.Level >= MessageLevel.Warning ? Console.Out : Console.Error;
33
34 if (message.SourceLineNumbers?.LineNumber.HasValue == true)
35 {
36 filename = String.Concat(filename, "(", message.SourceLineNumbers?.LineNumber.Value, ")");
37 }
38
39 output.WriteLine("{0} : {1} {2}{3:0000}: {4}", filename, type, this.Prefix, message.Id, message.ToString());
40
41 var fileNames = GetFileNames(message.SourceLineNumbers);
42 if (fileNames.Count > 1)
43 {
44 foreach (var fileName in fileNames)
45 {
46 output.WriteLine("Source trace: {0}", fileName);
47 }
48 }
49 }
50
51 public void Write(string message) => Console.Out.WriteLine(message);
52
53 public MessageLevel CalculateMessageLevel(IMessaging messaging, Message message, MessageLevel defaultMessageLevel) => defaultMessageLevel;
54
55 private static IList<string> GetFileNames(SourceLineNumber sourceLineNumbers)
56 {
57 var fileNames = new List<string>();
58
59 for (var sln = sourceLineNumbers; null != sln; sln = sln.Parent)
60 {
61 if (String.IsNullOrEmpty(sln.FileName))
62 {
63 continue;
64 }
65 else if (sln.LineNumber.HasValue)
66 {
67 fileNames.Add(String.Format(CultureInfo.CurrentUICulture, "{0}: line {1}", sln.FileName, sln.LineNumber));
68 }
69 else
70 {
71 fileNames.Add(sln.FileName);
72 }
73 }
74
75 return fileNames;
76 }
77
78 private static void PrepareConsoleForLocalization()
79 {
80 Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture.GetConsoleFallbackUICulture();
81
82 if (Console.OutputEncoding.CodePage != Encoding.UTF8.CodePage &&
83 Console.OutputEncoding.CodePage != Thread.CurrentThread.CurrentUICulture.TextInfo.OEMCodePage &&
84 Console.OutputEncoding.CodePage != Thread.CurrentThread.CurrentUICulture.TextInfo.ANSICodePage)
85 {
86 Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
87 }
88 }
89 }
90}
diff --git a/src/wix/wix/Program.cs b/src/wix/wix/Program.cs
new file mode 100644
index 00000000..d1818df0
--- /dev/null
+++ b/src/wix/wix/Program.cs
@@ -0,0 +1,92 @@
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
3namespace WixToolset.Tools
4{
5 using System;
6 using System.Runtime.InteropServices;
7 using System.Threading;
8 using System.Threading.Tasks;
9 using WixToolset.Converters;
10 using WixToolset.Core;
11 using WixToolset.Core.Burn;
12 using WixToolset.Core.ExtensionCache;
13 using WixToolset.Core.WindowsInstaller;
14 using WixToolset.Data;
15 using WixToolset.Extensibility;
16 using WixToolset.Extensibility.Services;
17 using WixToolset.Tools.Core;
18
19 /// <summary>
20 /// Wix Toolset Command-Line Interface.
21 /// </summary>
22 public sealed class Program
23 {
24 /// <summary>
25 /// The main entry point for wix command-line interface.
26 /// </summary>
27 /// <param name="args">Commandline arguments for the application.</param>
28 /// <returns>Returns the application error code.</returns>
29 [MTAThread]
30 public static async Task<int> Main(string[] args)
31 {
32 var cts = new CancellationTokenSource();
33 var listener = new ConsoleMessageListener("WIX", "wix.exe");
34
35 Console.CancelKeyPress += (s, e) =>
36 {
37 cts.Cancel();
38 e.Cancel = true;
39 };
40
41 try
42 {
43 var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider()
44 .AddWindowsInstallerBackend()
45 .AddBundleBackend()
46 .AddExtensionCacheManager()
47 .AddConverter();
48
49 return await Run(serviceProvider, listener, args, cts.Token);
50 }
51 catch (OperationCanceledException)
52 {
53 return -1;
54 }
55 catch (WixException e)
56 {
57 listener.Write(e.Error);
58
59 return e.Error.Id;
60 }
61 catch (Exception e)
62 {
63 listener.Write(ErrorMessages.UnexpectedException(e));
64
65 if (e is NullReferenceException || e is SEHException)
66 {
67 throw;
68 }
69
70 return e.HResult;
71 }
72 }
73
74 /// <summary>
75 /// Executes the wix command-line interface.
76 /// </summary>
77 /// <param name="serviceProvider">Service provider to use throughout this execution.</param>
78 /// <param name="listener">Listener to use for the messaging system.</param>
79 /// <param name="args">Command-line arguments to execute.</param>
80 /// <param name="cancellationToken">Cancellation token.</param>
81 /// <returns>Returns the application error code.</returns>
82 public static Task<int> Run(IServiceProvider serviceProvider, IMessageListener listener, string[] args, CancellationToken cancellationToken)
83 {
84 var messaging = serviceProvider.GetService<IMessaging>();
85 messaging.SetListener(listener);
86
87 var commandLine = serviceProvider.GetService<ICommandLine>();
88 var command = commandLine.CreateCommand(args);
89 return command?.ExecuteAsync(cancellationToken) ?? Task.FromResult(1);
90 }
91 }
92}
diff --git a/src/wix/wix/app.config b/src/wix/wix/app.config
new file mode 100644
index 00000000..081fea2c
--- /dev/null
+++ b/src/wix/wix/app.config
@@ -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<configuration>
4 <runtime>
5 <loadFromRemoteSources enabled="true"/>
6 <AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false;Switch.System.IO.BlockLongPaths=false" />
7 </runtime>
8</configuration>
diff --git a/src/wix/wix/wix.csproj b/src/wix/wix/wix.csproj
new file mode 100644
index 00000000..7fac5e95
--- /dev/null
+++ b/src/wix/wix/wix.csproj
@@ -0,0 +1,39 @@
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 <TargetFrameworks>netcoreapp3.1;net461</TargetFrameworks>
7 <OutputType>Exe</OutputType>
8 <Description>Compiler</Description>
9 <Title>WiX Toolset Compiler</Title>
10 <DebugType>embedded</DebugType>
11 <PublishRepositoryUrl>true</PublishRepositoryUrl>
12 <!-- <PackAsTool>true</PackAsTool> -->
13 <RuntimeIdentifier Condition=" '$(RuntimeIdentifier)'=='' and '$(TargetFramework)'!='netcoreapp3.1' ">win-x86</RuntimeIdentifier>
14 <AppConfig>app.config</AppConfig>
15 <ApplicationManifest>wix.exe.manifest</ApplicationManifest>
16 <RollForward>Major</RollForward>
17 </PropertyGroup>
18
19 <PropertyGroup>
20 <NoWarn>NU1701</NoWarn>
21 </PropertyGroup>
22
23 <ItemGroup Condition="'$(TargetFramework)'=='net461' and '$(OS)' != 'Windows_NT'">
24 <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" PrivateAssets="All" Version="1.0.0" />
25 </ItemGroup>
26
27 <ItemGroup>
28 <PackageReference Include="WixToolset.Converters" Version="4.0.*" />
29 <PackageReference Include="WixToolset.Core" Version="4.0.*" />
30 <PackageReference Include="WixToolset.Core.Burn" Version="4.0.*" />
31 <PackageReference Include="WixToolset.Core.ExtensionCache" Version="4.0.*" />
32 <PackageReference Include="WixToolset.Core.WindowsInstaller" Version="4.0.*" />
33 </ItemGroup>
34
35 <ItemGroup>
36 <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
37 <PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
38 </ItemGroup>
39</Project>
diff --git a/src/wix/wix/wix.exe.manifest b/src/wix/wix/wix.exe.manifest
new file mode 100644
index 00000000..f35b5534
--- /dev/null
+++ b/src/wix/wix/wix.exe.manifest
@@ -0,0 +1,18 @@
1<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
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<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
4 <assemblyIdentity name="WixToolset.Tools.Wix" version="4.0.0.0" processorArchitecture="x86" type="win32"/>
5 <description>WiX Toolset Compiler</description>
6 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
7 <security>
8 <requestedPrivileges>
9 <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
10 </requestedPrivileges>
11 </security>
12 </trustInfo>
13 <application xmlns="urn:schemas-microsoft-com:asm.v3">
14 <windowsSettings xmlns:ws2="http://schemas.microsoft.com/SMI/2016/WindowsSettings">
15 <ws2:longPathAware>true</ws2:longPathAware>
16 </windowsSettings>
17 </application>
18</assembly>
diff --git a/src/wix/wix/wix.net461.v3.ncrunchproject b/src/wix/wix/wix.net461.v3.ncrunchproject
new file mode 100644
index 00000000..cf22dfa9
--- /dev/null
+++ b/src/wix/wix/wix.net461.v3.ncrunchproject
@@ -0,0 +1,5 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file
diff --git a/src/wix/wix/wix.netcoreapp2.1.v3.ncrunchproject b/src/wix/wix/wix.netcoreapp2.1.v3.ncrunchproject
new file mode 100644
index 00000000..cf22dfa9
--- /dev/null
+++ b/src/wix/wix/wix.netcoreapp2.1.v3.ncrunchproject
@@ -0,0 +1,5 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file