summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/Directory.Build.props4
-rw-r--r--src/tools/WixToolset.Heat/WixToolset.Heat.csproj12
-rw-r--r--src/tools/WixToolset.Heat/WixToolset.Heat.nuspec20
-rw-r--r--src/tools/WixToolset.Heat/WixToolset.Heat.targets516
-rw-r--r--src/tools/WixToolset.HeatTasks/HeatDirectory.cs47
-rw-r--r--src/tools/WixToolset.HeatTasks/HeatFile.cs44
-rw-r--r--src/tools/WixToolset.HeatTasks/HeatProject.cs72
-rw-r--r--src/tools/WixToolset.HeatTasks/HeatTask.cs176
-rw-r--r--src/tools/WixToolset.HeatTasks/RefreshBundleGeneratedFile.cs104
-rw-r--r--src/tools/WixToolset.HeatTasks/RefreshGeneratedFile.cs91
-rw-r--r--src/tools/WixToolset.HeatTasks/RefreshTask.cs59
-rw-r--r--src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs56
-rw-r--r--src/tools/WixToolset.HeatTasks/WixToolset.HeatTasks.csproj17
-rw-r--r--src/tools/heat/AssemblyHarvester.cs41
-rw-r--r--src/tools/heat/ConsoleMessageListener.cs90
-rw-r--r--src/tools/heat/Data/HarvesterErrors.cs205
-rw-r--r--src/tools/heat/Data/HarvesterVerboses.cs62
-rw-r--r--src/tools/heat/Data/HarvesterWarnings.cs79
-rw-r--r--src/tools/heat/Data/HeatCommandLineOption.cs31
-rw-r--r--src/tools/heat/Data/IHeatCommandLine.cs12
-rw-r--r--src/tools/heat/DirectoryHarvester.cs308
-rw-r--r--src/tools/heat/DllHarvester.cs106
-rw-r--r--src/tools/heat/Extensibility/BaseHarvesterExtension.cs26
-rw-r--r--src/tools/heat/Extensibility/BaseHeatExtension.cs55
-rw-r--r--src/tools/heat/Extensibility/BaseMutatorExtension.cs202
-rw-r--r--src/tools/heat/Extensibility/IHarvester.cs31
-rw-r--r--src/tools/heat/Extensibility/IHarvesterCore.cs51
-rw-r--r--src/tools/heat/Extensibility/IHarvesterExtension.cs14
-rw-r--r--src/tools/heat/Extensibility/IHeatCore.cs29
-rw-r--r--src/tools/heat/Extensibility/IHeatExtension.cs16
-rw-r--r--src/tools/heat/Extensibility/IMutator.cs44
-rw-r--r--src/tools/heat/Extensibility/IMutatorExtension.cs18
-rw-r--r--src/tools/heat/FileHarvester.cs156
-rw-r--r--src/tools/heat/Harvester.cs65
-rw-r--r--src/tools/heat/HarvesterCore.cs76
-rw-r--r--src/tools/heat/HeatCommand.cs277
-rw-r--r--src/tools/heat/HeatCommandLine.cs91
-rw-r--r--src/tools/heat/HeatCommandLineFactory.cs27
-rw-r--r--src/tools/heat/HeatCore.cs45
-rw-r--r--src/tools/heat/HelpCommand.cs106
-rw-r--r--src/tools/heat/IIsFinalizeHarvesterMutator.cs160
-rw-r--r--src/tools/heat/IIsHarvesterMutator.cs429
-rw-r--r--src/tools/heat/IIsHeatExtension.cs80
-rw-r--r--src/tools/heat/IIsWebSiteHarvester.cs439
-rw-r--r--src/tools/heat/Mutator.cs93
-rw-r--r--src/tools/heat/PerformanceCategoryHarvester.cs207
-rw-r--r--src/tools/heat/Program.cs84
-rw-r--r--src/tools/heat/RegFileHarvester.cs438
-rw-r--r--src/tools/heat/RegistryHarvester.cs477
-rw-r--r--src/tools/heat/Serialize/CodeDomInterfaces.cs96
-rw-r--r--src/tools/heat/Serialize/CodeDomReader.cs162
-rw-r--r--src/tools/heat/Serialize/ElementCollection.cs618
-rw-r--r--src/tools/heat/Serialize/WixHarvesterStrings.Designer.cs153
-rw-r--r--src/tools/heat/Serialize/WixHarvesterStrings.resx150
-rw-r--r--src/tools/heat/Serialize/iis.cs5915
-rw-r--r--src/tools/heat/Serialize/util.cs11462
-rw-r--r--src/tools/heat/Serialize/vs.cs1574
-rw-r--r--src/tools/heat/Serialize/wix.cs57736
-rw-r--r--src/tools/heat/TypeLibraryHarvester.cs93
-rw-r--r--src/tools/heat/UtilFinalizeHarvesterMutator.cs1185
-rw-r--r--src/tools/heat/UtilHarvesterMutator.cs218
-rw-r--r--src/tools/heat/UtilHeatExtension.cs389
-rw-r--r--src/tools/heat/UtilMutator.cs633
-rw-r--r--src/tools/heat/UtilTransformMutator.cs77
-rw-r--r--src/tools/heat/VSHeatExtension.cs229
-rw-r--r--src/tools/heat/VSProjectHarvester.cs1455
-rw-r--r--src/tools/heat/app.config10
-rw-r--r--src/tools/heat/heat.csproj43
-rw-r--r--src/tools/heat/heat.exe.manifest20
-rw-r--r--src/tools/heat/heat.net461.v3.ncrunchproject5
-rw-r--r--src/tools/heat/heat.netcoreapp2.1.v3.ncrunchproject5
-rw-r--r--src/tools/publish_t.proj36
-rw-r--r--src/tools/test/Directory.Build.props10
-rw-r--r--src/tools/test/WixToolsetTest.Heat/HeatRunner.cs92
-rw-r--r--src/tools/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj20
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs410
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/EnsureWixSdkCached/EnsureWixSdkCached.wixproj4
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj26
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json1
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt1
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/Package.wxs18
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFilePackage/HeatFilePackage.wixproj21
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFilePackage/Package.wxs17
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj18
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs17
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj18
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs17
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs8
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj8
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs11
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj36
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.csproj28
-rw-r--r--src/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.v3.ncrunchproject5
-rw-r--r--src/tools/thmviewer/thmviewer.v3.ncrunchproject1
-rw-r--r--src/tools/tools.cmd29
-rw-r--r--src/tools/tools.sln52
-rw-r--r--src/tools/tools.v3.ncrunchsolution6
97 files changed, 89019 insertions, 7 deletions
diff --git a/src/tools/Directory.Build.props b/src/tools/Directory.Build.props
index 3fdc6553..bfa668d6 100644
--- a/src/tools/Directory.Build.props
+++ b/src/tools/Directory.Build.props
@@ -7,4 +7,8 @@
7 </PropertyGroup> 7 </PropertyGroup>
8 8
9 <Import Project="..\Directory.Build.props" /> 9 <Import Project="..\Directory.Build.props" />
10
11 <PropertyGroup>
12 <PublishRoot>$(OutputPath)publish\</PublishRoot>
13 </PropertyGroup>
10</Project> 14</Project>
diff --git a/src/tools/WixToolset.Heat/WixToolset.Heat.csproj b/src/tools/WixToolset.Heat/WixToolset.Heat.csproj
new file mode 100644
index 00000000..a3e0eb41
--- /dev/null
+++ b/src/tools/WixToolset.Heat/WixToolset.Heat.csproj
@@ -0,0 +1,12 @@
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</TargetFrameworks>
7 <Description>WiX Toolset Heat MSBuild integration</Description>
8 <PublishDir>$(PublishRoot)WixToolset.Heat\</PublishDir>
9 <NuspecFile>$(MSBuildThisFileName).nuspec</NuspecFile>
10 <NuspecBasePath>$(PublishDir)</NuspecBasePath>
11 </PropertyGroup>
12</Project>
diff --git a/src/tools/WixToolset.Heat/WixToolset.Heat.nuspec b/src/tools/WixToolset.Heat/WixToolset.Heat.nuspec
new file mode 100644
index 00000000..5242773b
--- /dev/null
+++ b/src/tools/WixToolset.Heat/WixToolset.Heat.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 <title>$title$</title>
7 <description>$description$</description>
8 <authors>$authors$</authors>
9 <license type="expression">MS-RL</license>
10 <requireLicenseAcceptance>false</requireLicenseAcceptance>
11 <copyright>$copyright$</copyright>
12 <projectUrl>$projectUrl$</projectUrl>
13 <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" />
14 </metadata>
15
16 <files>
17 <file src="$projectFolder$\$id$.targets" target="build" />
18 <file src="tools\**\*" target="tools" />
19 </files>
20</package>
diff --git a/src/tools/WixToolset.Heat/WixToolset.Heat.targets b/src/tools/WixToolset.Heat/WixToolset.Heat.targets
new file mode 100644
index 00000000..ba854459
--- /dev/null
+++ b/src/tools/WixToolset.Heat/WixToolset.Heat.targets
@@ -0,0 +1,516 @@
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 <WixHeatBinDir Condition=" '$(WixHeatBinDir)' == '' and '$(MSBuildRuntimeType)' == 'Core' ">$(MSBuildThisFileDirectory)..\tools\netcoreapp3.1\</WixHeatBinDir>
9 <WixHeatBinDir Condition=" '$(WixHeatBinDir)' == '' ">$(MSBuildThisFileDirectory)..\tools\net472\</WixHeatBinDir>
10 <WixHeatTasksPath Condition=" '$(WixHeatTasksPath)' == '' ">$(WixHeatBinDir)WixToolset.HeatTasks.dll</WixHeatTasksPath>
11
12 <!--
13 For backwards compatibility, the MSBuild tasks always default to the x86 heat.exe even though a x64 heat.exe is available.
14 For "dotnet.exe build" the Heat tasks calculate the command-line to start heat.dll in .NET Core.
15 -->
16 <HeatToolDir Condition=" '$(HeatToolDir)' == '' and '$(MSBuildRuntimeType)' != 'Core' ">$(MSBuildThisFileDirectory)..\tools\net472\x86\</HeatToolDir>
17
18 <HeatExe Condition=" '$(HeatExe)' == '' ">$(MSBuildThisFileDirectory)..\tools\net472\x86\heat.exe</HeatExe>
19 <HeatExe64 Condition=" '$(HeatExe64)' == '' ">$(MSBuildThisFileDirectory)..\tools\net472\x64\heat.exe</HeatExe64>
20 </PropertyGroup>
21
22 <!-- These tasks are extensions for harvesting WiX source code from other sources. -->
23 <UsingTask TaskName="HeatFile" AssemblyFile="$(WixHeatTasksPath)" />
24 <UsingTask TaskName="HeatDirectory" AssemblyFile="$(WixHeatTasksPath)" />
25 <UsingTask TaskName="HeatProject" AssemblyFile="$(WixHeatTasksPath)" />
26
27 <UsingTask TaskName="RefreshGeneratedFile" AssemblyFile="$(WixHeatTasksPath)"/>
28 <UsingTask TaskName="RefreshBundleGeneratedFile" AssemblyFile="$(WixHeatTasksPath)"/>
29
30 <!-- Default Harvester properties-->
31 <PropertyGroup>
32 <HarvestNoLogo Condition=" '$(HarvestNoLogo)' == '' ">$(NoLogo)</HarvestNoLogo>
33 <HarvestSuppressAllWarnings Condition=" '$(HarvestSuppressAllWarnings)' == '' ">$(SuppressAllWarnings)</HarvestSuppressAllWarnings>
34 <HarvestSuppressSpecificWarnings Condition=" '$(HarvestSuppressSpecificWarnings)' == '' ">$(SuppressSpecificWarnings)</HarvestSuppressSpecificWarnings>
35 <HarvestTreatWarningsAsErrors Condition=" '$(HarvestTreatWarningsAsErrors)' == '' ">$(TreatWarningsAsErrors)</HarvestTreatWarningsAsErrors>
36 <HarvestTreatSpecificWarningsAsErrors Condition=" '$(HarvestTreatSpecificWarningsAsErrors)' == '' ">$(TreatSpecificWarningsAsErrors)</HarvestTreatSpecificWarningsAsErrors>
37 <HarvestVerboseOutput Condition=" '$(HarvestVerboseOutput)' == '' ">$(VerboseOutput)</HarvestVerboseOutput>
38 <HarvestAutogenerateGuids Condition=" '$(HarvestAutogenerateGuids)' == '' ">true</HarvestAutogenerateGuids>
39 <HarvestGenerateGuidsNow Condition=" '$(HarvestGenerateGuidsNow)' == '' ">false</HarvestGenerateGuidsNow>
40 <HarvestSuppressFragments Condition=" '$(HarvestSuppressFragments)' == '' ">true</HarvestSuppressFragments>
41 <HarvestSuppressUniqueIds Condition=" '$(HarvestSuppressUniqueIds)' == '' ">false</HarvestSuppressUniqueIds>
42 </PropertyGroup>
43
44 <!-- Default HarvestProjects properties -->
45 <PropertyGroup>
46 <!-- Project harvesting is defaulted to off until it works more consistently. -->
47 <EnableProjectHarvesting Condition=" '$(EnableProjectHarvesting)'=='' ">false</EnableProjectHarvesting>
48
49 <HarvestProjectsNoLogo Condition=" '$(HarvestProjectsNoLogo)' == '' ">$(HarvestNoLogo)</HarvestProjectsNoLogo>
50 <HarvestProjectsSuppressAllWarnings Condition=" '$(HarvestProjectsSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestProjectsSuppressAllWarnings>
51 <HarvestProjectsSuppressSpecificWarnings Condition=" '$(HarvestProjectsSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestProjectsSuppressSpecificWarnings>
52 <HarvestProjectsTreatWarningsAsErrors Condition=" '$(HarvestProjectsTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestProjectsTreatWarningsAsErrors>
53 <HarvestProjectsTreatSpecificWarningsAsErrors Condition=" '$(HarvestProjectsTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestProjectsTreatSpecificWarningsAsErrors>
54 <HarvestProjectsVerboseOutput Condition=" '$(HarvestProjectsVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestProjectsVerboseOutput>
55 <HarvestProjectsAutogenerateGuids Condition=" '$(HarvestProjectsAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestProjectsAutogenerateGuids>
56 <HarvestProjectsGenerateGuidsNow Condition=" '$(HarvestProjectsGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestProjectsGenerateGuidsNow>
57 <HarvestProjectsSuppressFragments Condition=" '$(HarvestProjectsSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestProjectsSuppressFragments>
58 <HarvestProjectsSuppressUniqueIds Condition=" '$(HarvestProjectsSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestProjectsSuppressUniqueIds>
59 <HarvestProjectsTransforms Condition=" '$(HarvestProjectsTransforms)' == '' ">$(HarvestTransforms)</HarvestProjectsTransforms>
60 <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' != 'Bundle' ">$(IntermediateOutputPath)Product.Generated.wxs</HarvestProjectsGeneratedFile>
61 <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' == 'Bundle' ">$(IntermediateOutputPath)Bundle.Generated.wxs</HarvestProjectsGeneratedFile>
62 <HarvestProjectsMsbuildBinPath Condition=" '$(HarvestProjectsMsbuildBinPath)' == '' ">$(MSBuildBinPath)</HarvestProjectsMsbuildBinPath>
63 </PropertyGroup>
64
65 <!-- Default HarvestDirectory properties -->
66 <PropertyGroup>
67 <HarvestDirectoryNoLogo Condition=" '$(HarvestDirectoryNoLogo)' == '' ">$(HarvestNoLogo)</HarvestDirectoryNoLogo>
68 <HarvestDirectorySuppressAllWarnings Condition=" '$(HarvestDirectorySuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestDirectorySuppressAllWarnings>
69 <HarvestDirectorySuppressSpecificWarnings Condition=" '$(HarvestDirectorySuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestDirectorySuppressSpecificWarnings>
70 <HarvestDirectoryTreatWarningsAsErrors Condition=" '$(HarvestDirectoryTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestDirectoryTreatWarningsAsErrors>
71 <HarvestDirectoryTreatSpecificWarningsAsErrors Condition=" '$(HarvestDirectoryTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestDirectoryTreatSpecificWarningsAsErrors>
72 <HarvestDirectoryVerboseOutput Condition=" '$(HarvestDirectoryVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestDirectoryVerboseOutput>
73 <HarvestDirectoryAutogenerateGuids Condition=" '$(HarvestDirectoryAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestDirectoryAutogenerateGuids>
74 <HarvestDirectoryGenerateGuidsNow Condition=" '$(HarvestDirectoryGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestDirectoryGenerateGuidsNow>
75 <HarvestDirectorySuppressFragments Condition=" '$(HarvestDirectorySuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestDirectorySuppressFragments>
76 <HarvestDirectorySuppressUniqueIds Condition=" '$(HarvestDirectorySuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestDirectorySuppressUniqueIds>
77 <HarvestDirectoryTransforms Condition=" '$(HarvestDirectoryTransforms)' == '' ">$(HarvestTransforms)</HarvestDirectoryTransforms>
78 </PropertyGroup>
79
80 <!-- Default HarvestFile properties -->
81 <PropertyGroup>
82 <HarvestFileNoLogo Condition=" '$(HarvestFileNoLogo)' == '' ">$(HarvestNoLogo)</HarvestFileNoLogo>
83 <HarvestFileSuppressAllWarnings Condition=" '$(HarvestFileSuppressAllWarnings)' == '' ">$(HarvestSuppressAllWarnings)</HarvestFileSuppressAllWarnings>
84 <HarvestFileSuppressSpecificWarnings Condition=" '$(HarvestFileSuppressSpecificWarnings)' == '' ">$(HarvestSuppressSpecificWarnings)</HarvestFileSuppressSpecificWarnings>
85 <HarvestFileTreatWarningsAsErrors Condition=" '$(HarvestFileTreatWarningsAsErrors)' == '' ">$(HarvestTreatWarningsAsErrors)</HarvestFileTreatWarningsAsErrors>
86 <HarvestFileTreatSpecificWarningsAsErrors Condition=" '$(HarvestFileTreatSpecificWarningsAsErrors)' == '' ">$(HarvestTreatSpecificWarningsAsErrors)</HarvestFileTreatSpecificWarningsAsErrors>
87 <HarvestFileVerboseOutput Condition=" '$(HarvestFileVerboseOutput)' == '' ">$(HarvestVerboseOutput)</HarvestFileVerboseOutput>
88 <HarvestFileAutogenerateGuids Condition=" '$(HarvestFileAutogenerateGuids)' == '' ">$(HarvestAutogenerateGuids)</HarvestFileAutogenerateGuids>
89 <HarvestFileGenerateGuidsNow Condition=" '$(HarvestFileGenerateGuidsNow)' == '' ">$(HarvestGenerateGuidsNow)</HarvestFileGenerateGuidsNow>
90 <HarvestFileSuppressFragments Condition=" '$(HarvestFileSuppressFragments)' == '' ">$(HarvestSuppressFragments)</HarvestFileSuppressFragments>
91 <HarvestFileSuppressUniqueIds Condition=" '$(HarvestFileSuppressUniqueIds)' == '' ">$(HarvestSuppressUniqueIds)</HarvestFileSuppressUniqueIds>
92 <HarvestFileTransforms Condition=" '$(HarvestFileTransforms)' == '' ">$(HarvestTransforms)</HarvestFileTransforms>
93 </PropertyGroup>
94
95 <!--
96 ==================================================================================================
97 Harvest
98 ==================================================================================================
99 -->
100 <PropertyGroup>
101 <CoreCompileDependsOn>
102 $(CoreCompileDependsOn);
103 Harvest
104 </CoreCompileDependsOn>
105 <HarvestDependsOn>
106 ConvertReferences;
107 ConvertBundleReferences;
108 HarvestProjects;
109 HarvestDirectory;
110 HarvestFile;
111 GenerateCode;
112 </HarvestDependsOn>
113 </PropertyGroup>
114 <Target
115 Name="Harvest"
116 DependsOnTargets="$(HarvestDependsOn)" />
117
118 <!--
119 ==================================================================================================
120 GenerateCode
121 ==================================================================================================
122 -->
123 <PropertyGroup>
124 <GenerateCodeDependsOn>
125 RefreshGeneratedFile;
126 RefreshBundleGeneratedFile
127 </GenerateCodeDependsOn>
128 </PropertyGroup>
129 <Target
130 Name="GenerateCode"
131 DependsOnTargets="$(GenerateCodeDependsOn)" />
132
133 <!--
134 ================================================================================================
135 ConvertReferences
136
137 Converts project references to HeatProject items to auto generate authoring.
138 ================================================================================================
139 -->
140 <Target
141 Name="ConvertReferences"
142 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module') ">
143
144 <ItemGroup>
145 <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' ">
146 <DirectoryIds>%(_MSBuildProjectReferenceExistent.RefTargetDir)</DirectoryIds>
147 <ProjectOutputGroups>Binaries;Symbols;Sources;Content;Satellites;Documents</ProjectOutputGroups>
148 <ProjectName>%(_MSBuildProjectReferenceExistent.Name)</ProjectName>
149 <HeatOutput>$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs</HeatOutput>
150 </_HeatProjectReference>
151 <HeatProject Include="@(_HeatProjectReference)" />
152 </ItemGroup>
153
154 <ItemGroup>
155 <!-- Unconditionally generate Compile items so they are always linked in. -->
156 <Compile Include="$(HarvestProjectsGeneratedFile)" />
157 <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" />
158 </ItemGroup>
159
160 </Target>
161
162 <!--
163 ================================================================================================
164 ConvertBundleReferences
165
166 Converts project references in Bundle projects to HeatProject items to auto generate authoring.
167 ================================================================================================
168 -->
169 <Target
170 Name="ConvertBundleReferences"
171 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Bundle') ">
172
173 <ItemGroup>
174 <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' ">
175 <ProjectOutputGroups>Binaries;Symbols;Sources;Content;Satellites;Documents</ProjectOutputGroups>
176 <GenerateType>payloadgroup</GenerateType>
177 <HeatOutput>$(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs</HeatOutput>
178 </_HeatProjectReference>
179 <HeatProject Include="@(_HeatProjectReference)" />
180 </ItemGroup>
181
182 <ItemGroup>
183 <!-- Unconditionally generate Compile items so they are always linked in. -->
184 <Compile Include="$(HarvestProjectsGeneratedFile)" />
185 <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" />
186 </ItemGroup>
187
188 </Target>
189
190 <!--
191 ================================================================================================
192 CombineHarvestProjects
193
194 Combines HeatProject and HarvestProject items together and ensures each has HeatOutput metadata.
195 ================================================================================================
196 -->
197 <Target
198 Name="CombineHarvestProjects"
199 Condition=" '@(HeatProject)' != '' or '@(HarvestProject)' != '' ">
200
201 <!-- Add default HeatOutputs for those without one specified -->
202 <CreateItem Include="@(HeatProject)" Condition= " '%(HeatProject.HeatOutput)' == '' "
203 AdditionalMetadata="HeatOutput=$(IntermediateOutputPath)_%(HeatProject.Filename).wxs">
204 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
205 </CreateItem>
206 <CreateItem Include="@(HarvestProject)" Condition= " '%(HarvestProject.HeatOutput)' == '' "
207 AdditionalMetadata="HeatOutput=$(IntermediateOutputPath)_%(HarvestProject.Filename).wxs">
208 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
209 </CreateItem>
210
211
212 <CreateItem Include="@(HeatProject)" Condition= " '%(HeatProject.HeatOutput)' != '' ">
213 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
214 </CreateItem>
215 <CreateItem Include="@(HarvestProject)" Condition= " '%(HarvestProject.HeatOutput)' != '' ">
216 <Output TaskParameter="Include" ItemName="_AllHeatProjects" />
217 </CreateItem>
218
219 </Target>
220
221 <!--
222 ================================================================================================
223 HarvestProjects
224
225 Harvests outputs of other MSBuild projects files using the VS project extension to heat.exe.
226
227 [IN]
228 @(HarvestProject)
229 @(HeatProject)
230 - The list of projects to harvest. HeatProject is provided for backward compatibility.
231 You should use HarvestProject instead.
232
233 %(HarvestProject.Transforms)
234 %(HeatProject.Transforms)
235 - XSL transforms to apply to the harvested WiX.
236
237 %(HarvestProject.ProjectOutputGroups)
238 %(HeatProjects.ProjectOutputGroups)
239 - The project output groups to harvest
240
241 [OUT]
242 %(HeatOutput)
243 - The generated .wxs files which are added to the @(Compile) item list.
244 ================================================================================================
245 -->
246 <ItemDefinitionGroup>
247 <HeatProject>
248 <Transforms>$(HarvestProjectsTransforms)</Transforms>
249 <ProjectOutputGroups>$(HarvestProjectsProjectOutputGroups)</ProjectOutputGroups>
250 <DirectoryIds>$(HarvestProjectsDirectoryIds)</DirectoryIds>
251 </HeatProject>
252 <HarvestProject>
253 <Transforms>$(HarvestProjectsTransforms)</Transforms>
254 <ProjectOutputGroups>$(HarvestProjectsProjectOutputGroups)</ProjectOutputGroups>
255 <DirectoryIds>$(HarvestProjectsDirectoryIds)</DirectoryIds>
256 </HarvestProject>
257 </ItemDefinitionGroup>
258
259 <PropertyGroup>
260 <HarvestProjectsDependsOn>CombineHarvestProjects</HarvestProjectsDependsOn>
261 </PropertyGroup>
262 <Target Name="HarvestProjects"
263 DependsOnTargets="$(HarvestProjectsDependsOn)"
264 Inputs="@(_AllHeatProjects);%(_AllHeatProjects.Transforms);$(ProjectPath)"
265 Outputs="@(_AllHeatProjects -> '%(HeatOutput)')"
266 Condition=" $(EnableProjectHarvesting) and ('@(HeatProject)' != '' or '@(HarvestProject)' != '') ">
267
268 <HeatProject
269 NoLogo="true"
270 SuppressAllWarnings="$(HarvestProjectsSuppressAllWarnings)"
271 SuppressSpecificWarnings="$(HarvestProjectsSuppressSpecificWarnings)"
272 TreatWarningsAsErrors="$(HarvestProjectsTreatWarningsAsErrors)"
273 TreatSpecificWarningsAsErrors="$(HarvestProjectsTreatSpecificWarningsAsErrors)"
274 VerboseOutput="$(HarvestProjectsVerboseOutput)"
275 AutogenerateGuids="$(HarvestProjectsAutogenerateGuids)"
276 GenerateGuidsNow="$(HarvestProjectsGenerateGuidsNow)"
277 OutputFile="%(_AllHeatProjects.HeatOutput)"
278 SuppressFragments="$(HarvestProjectsSuppressFragments)"
279 SuppressUniqueIds="$(HarvestProjectsSuppressUniqueIds)"
280 Transforms="%(_AllHeatProjects.Transforms)"
281 Project="%(_AllHeatProjects.FullPath)"
282 ProjectOutputGroups="%(_AllHeatProjects.ProjectOutputGroups)"
283 GenerateType="%(_AllHeatProjects.GenerateType)"
284 MsbuildBinPath="$(HarvestProjectsMsbuildBinPath)"
285 DirectoryIds="%(_AllHeatProjects.DirectoryIds)"
286 ProjectName="%(_AllHeatProjects.ProjectName)"
287 Configuration="%(_AllHeatProjects.Configuration)"
288 Platform="%(_AllHeatProjects.Platform)"
289 GenerateWixVariables="$(HarvestProjectsGenerateWixVariables)"
290 UseToolsVersion="$(HarvestProjectsUseToolsVersion)"
291 AdditionalOptions="$(HarvestProjectsAdditionalOptions)"
292 ToolPath="$(HeatToolDir)">
293
294 <Output TaskParameter="OutputFile" ItemName="Compile" />
295 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
296
297 </HeatProject>
298
299 </Target>
300
301 <!--
302 ================================================================================================
303 HarvestDirectory
304
305 Harvests directories using heat.exe.
306
307 [IN]
308 @(HarvestDirectory) - The list of directories to harvest.
309 %(HarvestDirectory.Transforms) - XSL transforms to apply to the harvested WiX.
310 %(HarvestDirectory.ComponentGroupName) - The name of the ComponentGroup to create.
311 %(HarvestDirectory.DirectoryRefId) - The ID of the directory to reference instead of TARGETDIR.
312 %(HarvestDirectory.KeepEmptyDirectories) - Whether to create Directory entries for empty directories.
313 %(HarvestDirectory.PreprocessorVariable) - Substitute SourceDir for another variable name (ex: var.Dir).
314 %(HarvestDirectory.SuppressCom) - Suppress COM elements.
315 %(HarvestDirectory.SuppressRootDirectory) - Suppress a Directory element for the root directory.
316 $(HarvestDirectory.SuppressRegistry) - Suppress registry harvesting.
317
318 [OUT]
319 $(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs
320 - The generated .wxs files which are added to the @(Compile) item list.
321 ================================================================================================
322 -->
323
324 <ItemDefinitionGroup>
325 <HarvestDirectory>
326 <Transforms>$(HarvestDirectoryTransforms)</Transforms>
327 <ComponentGroupName>$(HarvestDirectoryComponentGroupName)</ComponentGroupName>
328 <DirectoryRefId>$(HarvestDirectoryDirectoryRefId)</DirectoryRefId>
329 <KeepEmptyDirectories>$(HarvestDirectoryKeepEmptyDirectories)</KeepEmptyDirectories>
330 <PreprocessorVariable>$(HarvestDirectoryPreprocessorVariable)</PreprocessorVariable>
331 <SuppressCom>$(HarvestDirectorySuppressCom)</SuppressCom>
332 <SuppressRootDirectory>$(HarvestDirectorySuppressRootDirectory)</SuppressRootDirectory>
333 <SuppressRegistry>$(HarvestDirectorySuppressRegistry)</SuppressRegistry>
334 </HarvestDirectory>
335 </ItemDefinitionGroup>
336
337 <PropertyGroup>
338 <HarvestDirectoryDependsOn>
339 GetHarvestDirectoryContent
340 </HarvestDirectoryDependsOn>
341 </PropertyGroup>
342
343 <!-- Creates items to include content since wildcards will not work in Target/@Inputs. -->
344 <Target Name="GetHarvestDirectoryContent">
345 <CreateItem Include="@(HarvestDirectory->'%(FullPath)\**\*')">
346 <Output TaskParameter="Include" ItemName="_HarvestDirectoryContent" />
347 </CreateItem>
348 </Target>
349
350 <Target Name="HarvestDirectory"
351 DependsOnTargets="$(HarvestDirectoryDependsOn)"
352 Inputs="@(_HarvestDirectoryContent);%(HarvestDirectory.Transforms)"
353 Outputs="$(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs"
354 Condition=" '@(HarvestDirectory)' != '' ">
355
356 <HeatDirectory
357 NoLogo="true"
358 SuppressAllWarnings="$(HarvestDirectorySuppressAllWarnings)"
359 SuppressSpecificWarnings="$(HarvestDirectorySuppressSpecificWarnings)"
360 TreatWarningsAsErrors="$(HarvestDirectoryTreatWarningsAsErrors)"
361 TreatSpecificWarningsAsErrors="$(HarvestDirectoryTreatSpecificWarningsAsErrors)"
362 VerboseOutput="$(HarvestDirectoryVerboseOutput)"
363 AutogenerateGuids="$(HarvestDirectoryAutogenerateGuids)"
364 GenerateGuidsNow="$(HarvestDirectoryGenerateGuidsNow)"
365 OutputFile="$(IntermediateOutputPath)_%(HarvestDirectory.ComponentGroupName)_dir.wxs"
366 SuppressFragments="$(HarvestDirectorySuppressFragments)"
367 SuppressUniqueIds="$(HarvestDirectorySuppressUniqueIds)"
368 Transforms="%(HarvestDirectory.Transforms)"
369 Directory="@(HarvestDirectory)"
370 ComponentGroupName="%(HarvestDirectory.ComponentGroupName)"
371 DirectoryRefId="%(HarvestDirectory.DirectoryRefId)"
372 KeepEmptyDirectories="%(HarvestDirectory.KeepEmptyDirectories)"
373 PreprocessorVariable="%(HarvestDirectory.PreprocessorVariable)"
374 SuppressCom="%(HarvestDirectory.SuppressCom)"
375 SuppressRootDirectory="%(HarvestDirectory.SuppressRootDirectory)"
376 SuppressRegistry="%(HarvestDirectory.SuppressRegistry)"
377 AdditionalOptions="$(HarvestDirectoryAdditionalOptions)"
378 ToolPath="$(HeatToolDir)">
379
380 <Output TaskParameter="OutputFile" ItemName="Compile" />
381 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
382
383 </HeatDirectory>
384
385 </Target>
386
387 <!--
388 ================================================================================================
389 HarvestFile
390
391 Harvests files of different types using heat.exe. This can harvest registry from
392 self-registering files, files with typelibs, and more.
393
394 [IN]
395 @(HarvestFile) - The list of files to harvest.
396 %(HarvestFile.Transforms) - XSL transforms to apply to the harvested WiX.
397 %(HarvestFile.ComponentGroupName) - The name of the ComponentGroup to create.
398 %(HarvestFile.DirectoryRefId) - The ID of the directory to reference instead of TARGETDIR.
399 %(HarvestFile.PreprocessorVariable) - Substitute SourceDir for another variable name (ex: var.Dir).
400 %(HarvestFile.SuppressCom) - Suppress COM elements.
401 %(HarvestFile.SuppressRootDirectory) - Suppress a Directory element for the root directory.
402 $(HarvestFile.SuppressRegistry) - Suppress registry harvesting.
403
404 [OUT]
405 $(IntermediateOutputPath)_%(HarvestFile.Filename)_file.wxs
406 - The generated .wxs files which are added to the @(Compile) item list.
407 ================================================================================================
408 -->
409
410 <ItemDefinitionGroup>
411 <HarvestFile>
412 <Transforms>$(HarvestFileTransforms)</Transforms>
413 <ComponentGroupName>$(HarvestFileComponentGroupName)</ComponentGroupName>
414 <DirectoryRefId>$(HarvestFileDirectoryRefId)</DirectoryRefId>
415 <PreprocessorVariable>$(HarvestFilePreprocessorVariable)</PreprocessorVariable>
416 <SuppressCom>$(HarvestFileSuppressCom)</SuppressCom>
417 <SuppressRegistry>$(HarvestFileSuppressRegistry)</SuppressRegistry>
418 <SuppressRootDirectory>$(HarvestFileSuppressRootDirectory)</SuppressRootDirectory>
419 </HarvestFile>
420 </ItemDefinitionGroup>
421
422 <PropertyGroup>
423 <HarvestFileDependsOn></HarvestFileDependsOn>
424 </PropertyGroup>
425 <Target Name="HarvestFile"
426 DependsOnTargets="$(HarvestFileDependsOn)"
427 Inputs="@(HarvestFile);%(HarvestFile.Transforms)"
428 Outputs="@(HarvestFile->'$(IntermediateOutputPath)_%(ComponentGroupName)_%(DirectoryRefId)_%(Filename)%(Extension)_file.wxs')"
429 Condition=" '@(HarvestFile)' != '' ">
430
431 <HeatFile
432 NoLogo="true"
433 SuppressAllWarnings="$(HarvestFileSuppressAllWarnings)"
434 SuppressSpecificWarnings="$(HarvestFileSuppressSpecificWarnings)"
435 TreatWarningsAsErrors="$(HarvestFileTreatWarningsAsErrors)"
436 TreatSpecificWarningsAsErrors="$(HarvestFileTreatSpecificWarningsAsErrors)"
437 VerboseOutput="$(HarvestFileVerboseOutput)"
438 AutogenerateGuids="$(HarvestFileAutogenerateGuids)"
439 GenerateGuidsNow="$(HarvestFileGenerateGuidsNow)"
440 OutputFile="$(IntermediateOutputPath)_%(HarvestFile.ComponentGroupName)_%(HarvestFile.DirectoryRefId)_%(HarvestFile.Filename)%(HarvestFile.Extension)_file.wxs"
441 SuppressFragments="$(HarvestFileSuppressFragments)"
442 SuppressUniqueIds="$(HarvestFileSuppressUniqueIds)"
443 Transforms="%(HarvestFile.Transforms)"
444 File="@(HarvestFile)"
445 ComponentGroupName="%(HarvestFile.ComponentGroupName)"
446 DirectoryRefId="%(HarvestFile.DirectoryRefId)"
447 PreprocessorVariable="%(HarvestFile.PreprocessorVariable)"
448 SuppressCom="%(HarvestFile.SuppressCom)"
449 SuppressRegistry="%(HarvestFile.SuppressRegistry)"
450 SuppressRootDirectory="%(HarvestFile.SuppressRootDirectory)"
451 AdditionalOptions="$(HarvestFileAdditionalOptions)"
452 ToolPath="$(HeatToolDir)">
453
454 <Output TaskParameter="OutputFile" ItemName="Compile" />
455 <Output TaskParameter="OutputFile" ItemName="FileWrites" />
456
457 </HeatFile>
458
459 </Target>
460
461 <!--
462 ================================================================================================
463 RefreshGeneratedFile
464
465 Generates code based on metadata defined in project references.
466
467 [IN]
468 @(_MSBuildResolvedProjectReferencePaths) - The list of MSBuildable project references.
469
470 [OUT]
471 @(_GeneratedFiles) - The generated source file.
472 ================================================================================================
473 -->
474 <PropertyGroup>
475 <RefreshGeneratedFileDependsOn></RefreshGeneratedFileDependsOn>
476 </PropertyGroup>
477 <Target Name="RefreshGeneratedFile"
478 DependsOnTargets="$(RefreshGeneratedFileDependsOn)"
479 Inputs="@(_MSBuildResolvedProjectReferencePaths);@(Compile);$(ProjectPath)"
480 Outputs="@(_GeneratedFiles)"
481 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Package' or '$(OutputType)' == 'PatchCreation' or '$(OutputType)' == 'Module') and '@(_GeneratedFiles)' != '' ">
482
483 <RefreshGeneratedFile
484 GeneratedFiles="@(_GeneratedFiles)"
485 ProjectReferencePaths="@(_MSBuildResolvedProjectReferencePaths)" />
486
487 </Target>
488
489 <!--
490 ================================================================================================
491 RefreshBundleGeneratedFile
492
493 Generates code for bundle projects based on metadata defined in project references.
494
495 [IN]
496 @(_MSBuildResolvedProjectReferencePaths) - The list of MSBuildable project references.
497
498 [OUT]
499 @(_GeneratedFiles) - The generated source file.
500 ================================================================================================
501 -->
502 <PropertyGroup>
503 <RefreshBundleGeneratedFileDependsOn></RefreshBundleGeneratedFileDependsOn>
504 </PropertyGroup>
505 <Target Name="RefreshBundleGeneratedFile"
506 DependsOnTargets="$(RefreshBundleGeneratedFileDependsOn)"
507 Inputs="@(_MSBuildResolvedProjectReferencePaths);@(Compile);$(ProjectPath)"
508 Outputs="@(_GeneratedFiles)"
509 Condition=" $(EnableProjectHarvesting) and ('$(OutputType)' == 'Bundle' and '@(_GeneratedFiles)' != '') ">
510
511 <RefreshBundleGeneratedFile
512 GeneratedFiles="@(_GeneratedFiles)"
513 ProjectReferencePaths="@(_MSBuildResolvedProjectReferencePaths)" />
514 </Target>
515
516</Project>
diff --git a/src/tools/WixToolset.HeatTasks/HeatDirectory.cs b/src/tools/WixToolset.HeatTasks/HeatDirectory.cs
new file mode 100644
index 00000000..8a169055
--- /dev/null
+++ b/src/tools/WixToolset.HeatTasks/HeatDirectory.cs
@@ -0,0 +1,47 @@
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.HeatTasks
4{
5 using Microsoft.Build.Framework;
6
7 public sealed class HeatDirectory : HeatTask
8 {
9 public string ComponentGroupName { get; set; }
10
11 [Required]
12 public string Directory { get; set; }
13
14 public string DirectoryRefId { get; set; }
15
16 public bool KeepEmptyDirectories { get; set; }
17
18 public string PreprocessorVariable { get; set; }
19
20 public bool SuppressCom { get; set; }
21
22 public bool SuppressRootDirectory { get; set; }
23
24 public bool SuppressRegistry { get; set; }
25
26 public string Template { get; set; }
27
28 protected override string OperationName => "dir";
29
30 protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
31 {
32 commandLineBuilder.AppendSwitch(this.OperationName);
33 commandLineBuilder.AppendFileNameIfNotNull(this.Directory);
34
35 commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName);
36 commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId);
37 commandLineBuilder.AppendIfTrue("-ke", this.KeepEmptyDirectories);
38 commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom);
39 commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry);
40 commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory);
41 commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template);
42 commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable);
43
44 base.BuildCommandLine(commandLineBuilder);
45 }
46 }
47}
diff --git a/src/tools/WixToolset.HeatTasks/HeatFile.cs b/src/tools/WixToolset.HeatTasks/HeatFile.cs
new file mode 100644
index 00000000..83cbc4d1
--- /dev/null
+++ b/src/tools/WixToolset.HeatTasks/HeatFile.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.HeatTasks
4{
5 using Microsoft.Build.Framework;
6
7 public sealed class HeatFile : HeatTask
8 {
9 public string ComponentGroupName { get; set; }
10
11 public string DirectoryRefId { get; set; }
12
13 [Required]
14 public string File { get; set; }
15
16 public string PreprocessorVariable { get; set; }
17
18 public bool SuppressCom { get; set; }
19
20 public bool SuppressRegistry { get; set; }
21
22 public bool SuppressRootDirectory { get; set; }
23
24 public string Template { get; set; }
25
26 protected override string OperationName => "file";
27
28 protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
29 {
30 commandLineBuilder.AppendSwitch(this.OperationName);
31 commandLineBuilder.AppendFileNameIfNotNull(this.File);
32
33 commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName);
34 commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId);
35 commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom);
36 commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory);
37 commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry);
38 commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template);
39 commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable);
40
41 base.BuildCommandLine(commandLineBuilder);
42 }
43 }
44}
diff --git a/src/tools/WixToolset.HeatTasks/HeatProject.cs b/src/tools/WixToolset.HeatTasks/HeatProject.cs
new file mode 100644
index 00000000..d54f6ad1
--- /dev/null
+++ b/src/tools/WixToolset.HeatTasks/HeatProject.cs
@@ -0,0 +1,72 @@
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.HeatTasks
4{
5 using Microsoft.Build.Framework;
6
7 public sealed class HeatProject : HeatTask
8 {
9 private string[] projectOutputGroups;
10
11 public string Configuration { get; set; }
12
13 public string DirectoryIds { get; set; }
14
15 public bool GenerateWixVariables { get; set; }
16
17 public string GenerateType { get; set; }
18
19 public string MsbuildBinPath { get; set; }
20
21 public string Platform { get; set; }
22
23 [Required]
24 public string Project { get; set; }
25
26 public string ProjectName { get; set; }
27
28 public string[] ProjectOutputGroups
29 {
30 get
31 {
32 return this.projectOutputGroups;
33 }
34 set
35 {
36 this.projectOutputGroups = value;
37
38 // If it's just one string and it contains semicolons, let's
39 // split it into separate items.
40 if (this.projectOutputGroups.Length == 1)
41 {
42 this.projectOutputGroups = this.projectOutputGroups[0].Split(new char[] { ';' });
43 }
44 }
45 }
46
47 public bool UseToolsVersion { get; set; }
48
49 protected override string OperationName => "project";
50
51 protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
52 {
53 commandLineBuilder.AppendSwitch(this.OperationName);
54 commandLineBuilder.AppendFileNameIfNotNull(this.Project);
55
56 commandLineBuilder.AppendSwitchIfNotNull("-configuration ", this.Configuration);
57 commandLineBuilder.AppendSwitchIfNotNull("-directoryid ", this.DirectoryIds);
58 commandLineBuilder.AppendSwitchIfNotNull("-generate ", this.GenerateType);
59 commandLineBuilder.AppendSwitchIfNotNull("-msbuildbinpath ", this.MsbuildBinPath);
60 commandLineBuilder.AppendSwitchIfNotNull("-platform ", this.Platform);
61 commandLineBuilder.AppendArrayIfNotNull("-pog ", this.ProjectOutputGroups);
62 commandLineBuilder.AppendSwitchIfNotNull("-projectname ", this.ProjectName);
63 commandLineBuilder.AppendIfTrue("-wixvar", this.GenerateWixVariables);
64
65#if !NETCOREAPP
66 commandLineBuilder.AppendIfTrue("-usetoolsversion", this.UseToolsVersion);
67#endif
68
69 base.BuildCommandLine(commandLineBuilder);
70 }
71 }
72}
diff --git a/src/tools/WixToolset.HeatTasks/HeatTask.cs b/src/tools/WixToolset.HeatTasks/HeatTask.cs
new file mode 100644
index 00000000..8942a7e1
--- /dev/null
+++ b/src/tools/WixToolset.HeatTasks/HeatTask.cs
@@ -0,0 +1,176 @@
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.HeatTasks
4{
5 using System;
6 using System.IO;
7 using System.Runtime.InteropServices;
8 using Microsoft.Build.Framework;
9 using Microsoft.Build.Utilities;
10
11 /// <summary>
12 /// A base MSBuild task to run the WiX harvester.
13 /// Specific harvester tasks should extend this class.
14 /// </summary>
15 public abstract partial class HeatTask : ToolTask
16 {
17 private static readonly string ThisDllPath = new Uri(typeof(HeatTask).Assembly.CodeBase).AbsolutePath;
18
19 /// <summary>
20 /// Gets or sets additional options that are appended the the tool command-line.
21 /// </summary>
22 /// <remarks>
23 /// This allows the task to support extended options in the tool which are not
24 /// explicitly implemented as properties on the task.
25 /// </remarks>
26 public string AdditionalOptions { get; set; }
27
28 /// <summary>
29 /// Gets or sets whether to display the logo.
30 /// </summary>
31 public bool NoLogo { get; set; }
32
33 /// <summary>
34 /// Gets or sets whether all warnings should be suppressed.
35 /// </summary>
36 public bool SuppressAllWarnings { get; set; }
37
38 /// <summary>
39 /// Gets or sets a list of specific warnings to be suppressed.
40 /// </summary>
41 public string[] SuppressSpecificWarnings { get; set; }
42
43 /// <summary>
44 /// Gets or sets whether all warnings should be treated as errors.
45 /// </summary>
46 public bool TreatWarningsAsErrors { get; set; }
47
48 /// <summary>
49 /// Gets or sets a list of specific warnings to treat as errors.
50 /// </summary>
51 public string[] TreatSpecificWarningsAsErrors { get; set; }
52
53 /// <summary>
54 /// Gets or sets whether to display verbose output.
55 /// </summary>
56 public bool VerboseOutput { get; set; }
57
58 public bool AutogenerateGuids { get; set; }
59
60 public bool GenerateGuidsNow { get; set; }
61
62 [Required]
63 [Output]
64 public ITaskItem OutputFile { get; set; }
65
66 public bool SuppressFragments { get; set; }
67
68 public bool SuppressUniqueIds { get; set; }
69
70 public string[] Transforms { get; set; }
71
72 protected sealed override string ToolName => "heat.exe";
73
74 /// <summary>
75 /// Gets the name of the heat operation performed by the task.
76 /// </summary>
77 /// <remarks>This is the first parameter passed on the heat.exe command-line.</remarks>
78 /// <value>The name of the heat operation performed by the task.</value>
79 protected abstract string OperationName { get; }
80
81 private string ToolFullPath
82 {
83 get
84 {
85 if (String.IsNullOrEmpty(this.ToolPath))
86 {
87 return Path.Combine(Path.GetDirectoryName(ThisDllPath), this.ToolExe);
88 }
89
90 return Path.Combine(this.ToolPath, this.ToolExe);
91 }
92 }
93
94 /// <summary>
95 /// Get the path to the executable.
96 /// </summary>
97 /// <remarks>
98 /// ToolTask only calls GenerateFullPathToTool when the ToolPath property is not set.
99 /// WiX never sets the ToolPath property, but the user can through $(HeatToolDir).
100 /// If we return only a file name, ToolTask will search the system paths for it.
101 /// </remarks>
102 protected sealed override string GenerateFullPathToTool()
103 {
104#if NETCOREAPP
105 // If we're not using heat.exe, use dotnet.exe to exec heat.dll.
106 // See this.GenerateCommandLine() where "exec heat.dll" is added.
107 if (!IsSelfExecutable(this.ToolFullPath, out var toolFullPath))
108 {
109 return DotnetFullPath;
110 }
111
112 return toolFullPath;
113#else
114 return this.ToolFullPath;
115#endif
116 }
117
118 protected sealed override string GenerateCommandLineCommands()
119 {
120 var commandLineBuilder = new WixCommandLineBuilder();
121
122#if NETCOREAPP
123 // If we're using dotnet.exe as the target executable, see this.GenerateFullPathToTool(),
124 // then add "exec heat.dll" to the beginning of the command-line.
125 if (!IsSelfExecutable(this.ToolFullPath, out var toolFullPath))
126 {
127 //commandLineBuilder.AppendSwitchIfNotNull("exec ", toolFullPath);
128 commandLineBuilder.AppendSwitch($"exec \"{toolFullPath}\"");
129 }
130#endif
131
132 this.BuildCommandLine(commandLineBuilder);
133 return commandLineBuilder.ToString();
134 }
135
136 /// <summary>
137 /// Builds a command line from options in this task.
138 /// </summary>
139 protected virtual void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
140 {
141 commandLineBuilder.AppendIfTrue("-nologo", this.NoLogo);
142 commandLineBuilder.AppendArrayIfNotNull("-sw", this.SuppressSpecificWarnings);
143 commandLineBuilder.AppendIfTrue("-sw", this.SuppressAllWarnings);
144 commandLineBuilder.AppendIfTrue("-v", this.VerboseOutput);
145 commandLineBuilder.AppendArrayIfNotNull("-wx", this.TreatSpecificWarningsAsErrors);
146 commandLineBuilder.AppendIfTrue("-wx", this.TreatWarningsAsErrors);
147
148 commandLineBuilder.AppendIfTrue("-ag", this.AutogenerateGuids);
149 commandLineBuilder.AppendIfTrue("-gg", this.GenerateGuidsNow);
150 commandLineBuilder.AppendIfTrue("-sfrag", this.SuppressFragments);
151 commandLineBuilder.AppendIfTrue("-suid", this.SuppressUniqueIds);
152 commandLineBuilder.AppendArrayIfNotNull("-t ", this.Transforms);
153 commandLineBuilder.AppendTextIfNotNull(this.AdditionalOptions);
154 commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile);
155 }
156
157#if NETCOREAPP
158 private static readonly string DotnetFullPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH") ?? "dotnet";
159
160 private static bool IsSelfExecutable(string proposedToolFullPath, out string toolFullPath)
161 {
162 var toolFullPathWithoutExtension = Path.Combine(Path.GetDirectoryName(proposedToolFullPath), Path.GetFileNameWithoutExtension(proposedToolFullPath));
163 var exeExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : String.Empty;
164 var exeToolFullPath = $"{toolFullPathWithoutExtension}{exeExtension}";
165 if (File.Exists(exeToolFullPath))
166 {
167 toolFullPath = exeToolFullPath;
168 return true;
169 }
170
171 toolFullPath = $"{toolFullPathWithoutExtension}.dll";
172 return false;
173 }
174#endif
175 }
176}
diff --git a/src/tools/WixToolset.HeatTasks/RefreshBundleGeneratedFile.cs b/src/tools/WixToolset.HeatTasks/RefreshBundleGeneratedFile.cs
new file mode 100644
index 00000000..8f1ad167
--- /dev/null
+++ b/src/tools/WixToolset.HeatTasks/RefreshBundleGeneratedFile.cs
@@ -0,0 +1,104 @@
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.HeatTasks
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
12 /// <summary>
13 /// This task refreshes the generated file for bundle projects.
14 /// </summary>
15 public class RefreshBundleGeneratedFile : RefreshTask
16 {
17 /// <summary>
18 /// Gets a complete list of external cabs referenced by the given installer database file.
19 /// </summary>
20 /// <returns>True upon completion of the task execution.</returns>
21 public override bool Execute()
22 {
23 var payloadGroupRefs = new ArrayList();
24 var packageGroupRefs = new ArrayList();
25 for (var i = 0; i < this.ProjectReferencePaths.Length; i++)
26 {
27 var item = this.ProjectReferencePaths[i];
28
29 if (!String.IsNullOrEmpty(item.GetMetadata(DoNotHarvest)))
30 {
31 continue;
32 }
33
34 var projectPath = item.GetMetadata("MSBuildSourceProjectFile");
35 var projectName = Path.GetFileNameWithoutExtension(projectPath);
36 var referenceName = GetIdentifierFromName(GetMetadataOrDefault(item, "Name", projectName));
37
38 var pogs = item.GetMetadata("RefProjectOutputGroups").Split(';');
39 foreach (var pog in pogs)
40 {
41 if (!String.IsNullOrEmpty(pog))
42 {
43 // TODO: Add payload group references and package group references once heat is generating them
44 ////payloadGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog));
45 packageGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog));
46 }
47 }
48 }
49
50 var doc = new XmlDocument();
51
52 var head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
53 doc.AppendChild(head);
54
55 var rootElement = doc.CreateElement("Wix");
56 rootElement.SetAttribute("xmlns", "http://wixtoolset.org/schemas/v4/wxs");
57 doc.AppendChild(rootElement);
58
59 var fragment = doc.CreateElement("Fragment");
60 rootElement.AppendChild(fragment);
61
62 var payloadGroup = doc.CreateElement("PayloadGroup");
63 payloadGroup.SetAttribute("Id", "Bundle.Generated.Payloads");
64 fragment.AppendChild(payloadGroup);
65
66 var packageGroup = doc.CreateElement("PackageGroup");
67 packageGroup.SetAttribute("Id", "Bundle.Generated.Packages");
68 fragment.AppendChild(packageGroup);
69
70 foreach (string payloadGroupRef in payloadGroupRefs)
71 {
72 var payloadGroupRefElement = doc.CreateElement("PayloadGroupRef");
73 payloadGroupRefElement.SetAttribute("Id", payloadGroupRef);
74 payloadGroup.AppendChild(payloadGroupRefElement);
75 }
76
77 foreach (string packageGroupRef in packageGroupRefs)
78 {
79 var packageGroupRefElement = doc.CreateElement("PackageGroupRef");
80 packageGroupRefElement.SetAttribute("Id", packageGroupRef);
81 packageGroup.AppendChild(packageGroupRefElement);
82 }
83
84 foreach (var item in this.GeneratedFiles)
85 {
86 var fullPath = item.GetMetadata("FullPath");
87
88 payloadGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath) + ".Payloads");
89 packageGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath) + ".Packages");
90 try
91 {
92 doc.Save(fullPath);
93 }
94 catch (Exception e)
95 {
96 // e.Message will be something like: "Access to the path 'fullPath' is denied."
97 this.Log.LogMessage(MessageImportance.High, "Unable to save generated file to '{0}'. {1}", fullPath, e.Message);
98 }
99 }
100
101 return true;
102 }
103 }
104}
diff --git a/src/tools/WixToolset.HeatTasks/RefreshGeneratedFile.cs b/src/tools/WixToolset.HeatTasks/RefreshGeneratedFile.cs
new file mode 100644
index 00000000..1e43cc1f
--- /dev/null
+++ b/src/tools/WixToolset.HeatTasks/RefreshGeneratedFile.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.HeatTasks
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
12 /// <summary>
13 /// This task refreshes the generated file that contains ComponentGroupRefs
14 /// to harvested output.
15 /// </summary>
16 public class RefreshGeneratedFile : RefreshTask
17 {
18 /// <summary>
19 /// Gets a complete list of external cabs referenced by the given installer database file.
20 /// </summary>
21 /// <returns>True upon completion of the task execution.</returns>
22 public override bool Execute()
23 {
24 var componentGroupRefs = new ArrayList();
25
26 for (var i = 0; i < this.ProjectReferencePaths.Length; i++)
27 {
28 var item = this.ProjectReferencePaths[i];
29
30 if (!String.IsNullOrEmpty(item.GetMetadata(DoNotHarvest)))
31 {
32 continue;
33 }
34
35 var projectPath = item.GetMetadata("MSBuildSourceProjectFile");
36 var projectName = Path.GetFileNameWithoutExtension(projectPath);
37 var referenceName = GetIdentifierFromName(GetMetadataOrDefault(item, "Name", projectName));
38
39 var pogs = item.GetMetadata("RefProjectOutputGroups").Split(';');
40 foreach (var pog in pogs)
41 {
42 if (!String.IsNullOrEmpty(pog))
43 {
44 componentGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog));
45 }
46 }
47 }
48
49 var doc = new XmlDocument();
50
51 var head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
52 doc.AppendChild(head);
53
54 var rootElement = doc.CreateElement("Wix");
55 rootElement.SetAttribute("xmlns", "http://wixtoolset.org/schemas/v4/wxs");
56 doc.AppendChild(rootElement);
57
58 var fragment = doc.CreateElement("Fragment");
59 rootElement.AppendChild(fragment);
60
61 var componentGroup = doc.CreateElement("ComponentGroup");
62 componentGroup.SetAttribute("Id", "Product.Generated");
63 fragment.AppendChild(componentGroup);
64
65 foreach (string componentGroupRef in componentGroupRefs)
66 {
67 var componentGroupRefElement = doc.CreateElement("ComponentGroupRef");
68 componentGroupRefElement.SetAttribute("Id", componentGroupRef);
69 componentGroup.AppendChild(componentGroupRefElement);
70 }
71
72 foreach (var item in this.GeneratedFiles)
73 {
74 var fullPath = item.GetMetadata("FullPath");
75
76 componentGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath));
77 try
78 {
79 doc.Save(fullPath);
80 }
81 catch (Exception e)
82 {
83 // e.Message will be something like: "Access to the path 'fullPath' is denied."
84 this.Log.LogMessage(MessageImportance.High, "Unable to save generated file to '{0}'. {1}", fullPath, e.Message);
85 }
86 }
87
88 return true;
89 }
90 }
91}
diff --git a/src/tools/WixToolset.HeatTasks/RefreshTask.cs b/src/tools/WixToolset.HeatTasks/RefreshTask.cs
new file mode 100644
index 00000000..0b378272
--- /dev/null
+++ b/src/tools/WixToolset.HeatTasks/RefreshTask.cs
@@ -0,0 +1,59 @@
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.HeatTasks
4{
5 using System;
6 using System.Text.RegularExpressions;
7 using Microsoft.Build.Framework;
8 using Microsoft.Build.Utilities;
9
10 /// <summary>
11 /// A base MSBuild task to refresh generated files.
12 /// </summary>
13 public abstract class RefreshTask : Task
14 {
15 private static readonly Regex AddPrefix = new Regex(@"^[^a-zA-Z_]");
16 private static readonly Regex IllegalIdentifierCharacters = new Regex(@"[^A-Za-z0-9_\.]|\.{2,}"); // non 'words' and assorted valid characters
17
18 /// <summary>Metadata key name to turn off harvesting of project references.</summary>
19 protected const string DoNotHarvest = "DoNotHarvest";
20
21 /// <summary>
22 /// The list of files to generate.
23 /// </summary>
24 [Required]
25 public ITaskItem[] GeneratedFiles { get; set; }
26
27 /// <summary>
28 /// All the project references in the project.
29 /// </summary>
30 [Required]
31 public ITaskItem[] ProjectReferencePaths { get; set; }
32
33 /// <summary>
34 /// Return an identifier based on passed file/directory name
35 /// </summary>
36 /// <param name="name">File/directory name to generate identifer from</param>
37 /// <returns>A version of the name that is a legal identifier.</returns>
38 /// <remarks>This is duplicated from WiX's Common class.</remarks>
39 protected static string GetIdentifierFromName(string name)
40 {
41 var result = IllegalIdentifierCharacters.Replace(name, "_"); // replace illegal characters with "_".
42
43 // MSI identifiers must begin with an alphabetic character or an
44 // underscore. Prefix all other values with an underscore.
45 if (AddPrefix.IsMatch(name))
46 {
47 result = String.Concat("_", result);
48 }
49
50 return result;
51 }
52
53 protected static string GetMetadataOrDefault(ITaskItem item, string metadataName, string defaultValue)
54 {
55 var value = item.GetMetadata(metadataName);
56 return String.IsNullOrWhiteSpace(value) ? defaultValue : value;
57 }
58 }
59}
diff --git a/src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs b/src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs
new file mode 100644
index 00000000..c3989902
--- /dev/null
+++ b/src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.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.HeatTasks
4{
5 using System;
6 using System.Collections.Generic;
7 using Microsoft.Build.Utilities;
8
9 /// <summary>
10 /// Helper class for appending the command line arguments.
11 /// </summary>
12 public class WixCommandLineBuilder : CommandLineBuilder
13 {
14 /// <summary>
15 /// Append a switch to the command line if the condition is true.
16 /// </summary>
17 /// <param name="switchName">Switch to append.</param>
18 /// <param name="condition">Condition specified by the user.</param>
19 public void AppendIfTrue(string switchName, bool condition)
20 {
21 if (condition)
22 {
23 this.AppendSwitch(switchName);
24 }
25 }
26
27 /// <summary>
28 /// Append a switch to the command line if any values in the array have been specified.
29 /// </summary>
30 /// <param name="switchName">Switch to append.</param>
31 /// <param name="values">Values specified by the user.</param>
32 public void AppendArrayIfNotNull(string switchName, IEnumerable<string> values)
33 {
34 if (values != null)
35 {
36 foreach (var value in values)
37 {
38 this.AppendSwitchIfNotNull(switchName, value);
39 }
40 }
41 }
42
43 /// <summary>
44 /// Append arbitrary text to the command-line if specified.
45 /// </summary>
46 /// <param name="textToAppend">Text to append.</param>
47 public void AppendTextIfNotNull(string textToAppend)
48 {
49 if (!String.IsNullOrWhiteSpace(textToAppend))
50 {
51 this.AppendSpaceIfNotEmpty();
52 this.AppendTextUnquoted(textToAppend);
53 }
54 }
55 }
56}
diff --git a/src/tools/WixToolset.HeatTasks/WixToolset.HeatTasks.csproj b/src/tools/WixToolset.HeatTasks/WixToolset.HeatTasks.csproj
new file mode 100644
index 00000000..ea52bdfa
--- /dev/null
+++ b/src/tools/WixToolset.HeatTasks/WixToolset.HeatTasks.csproj
@@ -0,0 +1,17 @@
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;net472</TargetFrameworks>
7 <Title>WiX Toolset Heat MSBuild Tasks</Title>
8 <DebugType>embedded</DebugType>
9 <PublishRepositoryUrl>true</PublishRepositoryUrl>
10 <!-- https://github.com/Microsoft/msbuild/issues/2360 -->
11 <PlatformTarget>AnyCPU</PlatformTarget>
12 </PropertyGroup>
13
14 <ItemGroup>
15 <PackageReference Include="Microsoft.Build.Tasks.Core" />
16 </ItemGroup>
17</Project>
diff --git a/src/tools/heat/AssemblyHarvester.cs b/src/tools/heat/AssemblyHarvester.cs
new file mode 100644
index 00000000..2304d827
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/ConsoleMessageListener.cs b/src/tools/heat/ConsoleMessageListener.cs
new file mode 100644
index 00000000..ebf1622b
--- /dev/null
+++ b/src/tools/heat/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/tools/heat/Data/HarvesterErrors.cs b/src/tools/heat/Data/HarvesterErrors.cs
new file mode 100644
index 00000000..a8a3055a
--- /dev/null
+++ b/src/tools/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/tools/heat/Data/HarvesterVerboses.cs b/src/tools/heat/Data/HarvesterVerboses.cs
new file mode 100644
index 00000000..72de2351
--- /dev/null
+++ b/src/tools/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/tools/heat/Data/HarvesterWarnings.cs b/src/tools/heat/Data/HarvesterWarnings.cs
new file mode 100644
index 00000000..80ee5c31
--- /dev/null
+++ b/src/tools/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/tools/heat/Data/HeatCommandLineOption.cs b/src/tools/heat/Data/HeatCommandLineOption.cs
new file mode 100644
index 00000000..5815abf0
--- /dev/null
+++ b/src/tools/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/tools/heat/Data/IHeatCommandLine.cs b/src/tools/heat/Data/IHeatCommandLine.cs
new file mode 100644
index 00000000..9198468d
--- /dev/null
+++ b/src/tools/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/tools/heat/DirectoryHarvester.cs b/src/tools/heat/DirectoryHarvester.cs
new file mode 100644
index 00000000..c1cc3edb
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/DllHarvester.cs b/src/tools/heat/DllHarvester.cs
new file mode 100644
index 00000000..e8c5ae40
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/Extensibility/BaseHarvesterExtension.cs b/src/tools/heat/Extensibility/BaseHarvesterExtension.cs
new file mode 100644
index 00000000..02696d5b
--- /dev/null
+++ b/src/tools/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/tools/heat/Extensibility/BaseHeatExtension.cs b/src/tools/heat/Extensibility/BaseHeatExtension.cs
new file mode 100644
index 00000000..b76aaf62
--- /dev/null
+++ b/src/tools/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/tools/heat/Extensibility/BaseMutatorExtension.cs b/src/tools/heat/Extensibility/BaseMutatorExtension.cs
new file mode 100644
index 00000000..c36a8ed1
--- /dev/null
+++ b/src/tools/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/tools/heat/Extensibility/IHarvester.cs b/src/tools/heat/Extensibility/IHarvester.cs
new file mode 100644
index 00000000..6d363b50
--- /dev/null
+++ b/src/tools/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/tools/heat/Extensibility/IHarvesterCore.cs b/src/tools/heat/Extensibility/IHarvesterCore.cs
new file mode 100644
index 00000000..3c34b8a1
--- /dev/null
+++ b/src/tools/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/tools/heat/Extensibility/IHarvesterExtension.cs b/src/tools/heat/Extensibility/IHarvesterExtension.cs
new file mode 100644
index 00000000..5125ea32
--- /dev/null
+++ b/src/tools/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/tools/heat/Extensibility/IHeatCore.cs b/src/tools/heat/Extensibility/IHeatCore.cs
new file mode 100644
index 00000000..0aa01b62
--- /dev/null
+++ b/src/tools/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/tools/heat/Extensibility/IHeatExtension.cs b/src/tools/heat/Extensibility/IHeatExtension.cs
new file mode 100644
index 00000000..8a00da37
--- /dev/null
+++ b/src/tools/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/tools/heat/Extensibility/IMutator.cs b/src/tools/heat/Extensibility/IMutator.cs
new file mode 100644
index 00000000..c936339e
--- /dev/null
+++ b/src/tools/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/tools/heat/Extensibility/IMutatorExtension.cs b/src/tools/heat/Extensibility/IMutatorExtension.cs
new file mode 100644
index 00000000..b81f586e
--- /dev/null
+++ b/src/tools/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/tools/heat/FileHarvester.cs b/src/tools/heat/FileHarvester.cs
new file mode 100644
index 00000000..886b942a
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/Harvester.cs b/src/tools/heat/Harvester.cs
new file mode 100644
index 00000000..791c1cb2
--- /dev/null
+++ b/src/tools/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/tools/heat/HarvesterCore.cs b/src/tools/heat/HarvesterCore.cs
new file mode 100644
index 00000000..92b34ab0
--- /dev/null
+++ b/src/tools/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/tools/heat/HeatCommand.cs b/src/tools/heat/HeatCommand.cs
new file mode 100644
index 00000000..56277004
--- /dev/null
+++ b/src/tools/heat/HeatCommand.cs
@@ -0,0 +1,277 @@
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 public bool ShowHelp { get; set; }
32
33 public bool ShowLogo { get; set; }
34
35 public bool StopParsing { get; private set; }
36
37 private string ExtensionArgument { get; set; }
38
39 private List<string> ExtensionOptions { get; } = new List<string>();
40
41 private string ExtensionType { get; }
42
43 private IList<IHeatExtension> Extensions { get; }
44
45 private int Indent { get; set; } = 4;
46
47 private IMessaging Messaging { get; }
48
49 private string OutputFile { get; set; }
50
51 private IServiceProvider ServiceProvider { get; }
52
53 public Task<int> ExecuteAsync(CancellationToken cancellationToken)
54 {
55 var exitCode = this.Harvest();
56 return Task.FromResult(exitCode);
57 }
58
59 public bool TryParseArgument(ICommandLineParser parser, string arg)
60 {
61 if (this.ExtensionArgument == null)
62 {
63 this.ExtensionArgument = arg;
64 }
65 else if ('-' == arg[0] || '/' == arg[0])
66 {
67 string parameter = arg.Substring(1);
68 if ("nologo" == parameter)
69 {
70 this.ShowLogo = false;
71 }
72 else if ("o" == parameter || "out" == parameter)
73 {
74 this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg);
75
76 if (String.IsNullOrEmpty(this.OutputFile))
77 {
78 return false;
79 }
80 }
81 else if ("swall" == parameter)
82 {
83 this.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("swall", "sw"));
84 this.Messaging.SuppressAllWarnings = true;
85 }
86 else if (parameter.StartsWith("sw"))
87 {
88 string paramArg = parameter.Substring(2);
89 try
90 {
91 if (0 == paramArg.Length)
92 {
93 this.Messaging.SuppressAllWarnings = true;
94 }
95 else
96 {
97 int suppressWarning = Convert.ToInt32(paramArg, CultureInfo.InvariantCulture.NumberFormat);
98 if (0 >= suppressWarning)
99 {
100 this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg));
101 }
102
103 this.Messaging.SuppressWarningMessage(suppressWarning);
104 }
105 }
106 catch (FormatException)
107 {
108 this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg));
109 }
110 catch (OverflowException)
111 {
112 this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg));
113 }
114 }
115 else if ("wxall" == parameter)
116 {
117 this.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("wxall", "wx"));
118 this.Messaging.WarningsAsError = true;
119 }
120 else if (parameter.StartsWith("wx"))
121 {
122 string paramArg = parameter.Substring(2);
123 try
124 {
125 if (0 == paramArg.Length)
126 {
127 this.Messaging.WarningsAsError = true;
128 }
129 else
130 {
131 int elevateWarning = Convert.ToInt32(paramArg, CultureInfo.InvariantCulture.NumberFormat);
132 if (0 >= elevateWarning)
133 {
134 this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg));
135 }
136
137 this.Messaging.ElevateWarningMessage(elevateWarning);
138 }
139 }
140 catch (FormatException)
141 {
142 this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg));
143 }
144 catch (OverflowException)
145 {
146 this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg));
147 }
148 }
149 else if ("v" == parameter)
150 {
151 this.Messaging.ShowVerboseMessages = true;
152 }
153 else if ("indent" == parameter)
154 {
155 try
156 {
157 this.Indent = Int32.Parse(parser.GetNextArgumentOrError(arg), CultureInfo.InvariantCulture);
158 }
159 catch
160 {
161 throw new ArgumentException("Invalid numeric argument.", parameter);
162 }
163 }
164 }
165
166 this.ExtensionOptions.Add(arg);
167 return true;
168 }
169
170 private int Harvest()
171 {
172 try
173 {
174 if (String.IsNullOrEmpty(this.ExtensionArgument))
175 {
176 this.Messaging.Write(ErrorMessages.HarvestSourceNotSpecified());
177 }
178 else if (String.IsNullOrEmpty(this.OutputFile))
179 {
180 this.Messaging.Write(ErrorMessages.OutputTargetNotSpecified());
181 }
182
183 // exit if there was an error parsing the core command line
184 if (this.Messaging.EncounteredError)
185 {
186 return this.Messaging.LastErrorNumber;
187 }
188
189 if (this.ShowLogo)
190 {
191 HelpCommand.DisplayToolHeader();
192 }
193
194 var heatCore = new HeatCore(this.ServiceProvider, this.ExtensionArgument);
195
196 // parse the extension's command line arguments
197 var extensionOptionsArray = this.ExtensionOptions.ToArray();
198 foreach (var heatExtension in this.Extensions)
199 {
200 heatExtension.Core = heatCore;
201 heatExtension.ParseOptions(this.ExtensionType, extensionOptionsArray);
202 }
203
204 // exit if there was an error parsing the command line (otherwise the logo appears after error messages)
205 if (this.Messaging.EncounteredError)
206 {
207 return this.Messaging.LastErrorNumber;
208 }
209
210 // harvest the output
211 Wix.Wix wix = heatCore.Harvester.Harvest(this.ExtensionArgument);
212 if (null == wix)
213 {
214 return this.Messaging.LastErrorNumber;
215 }
216
217 // mutate the output
218 if (!heatCore.Mutator.Mutate(wix))
219 {
220 return this.Messaging.LastErrorNumber;
221 }
222
223 XmlWriterSettings xmlSettings = new XmlWriterSettings();
224 xmlSettings.Indent = true;
225 xmlSettings.IndentChars = new string(' ', this.Indent);
226 xmlSettings.OmitXmlDeclaration = true;
227
228 string wixString;
229 using (StringWriter stringWriter = new StringWriter())
230 {
231 using (XmlWriter xmlWriter = XmlWriter.Create(stringWriter, xmlSettings))
232 {
233 wix.OutputXml(xmlWriter);
234 }
235
236 wixString = stringWriter.ToString();
237 }
238
239 string mutatedWixString = heatCore.Mutator.Mutate(wixString);
240 if (String.IsNullOrEmpty(mutatedWixString))
241 {
242 return this.Messaging.LastErrorNumber;
243 }
244
245 Directory.CreateDirectory(Path.GetDirectoryName(this.OutputFile));
246
247 using (StreamWriter streamWriter = new StreamWriter(this.OutputFile, false, System.Text.Encoding.UTF8))
248 {
249 xmlSettings.OmitXmlDeclaration = false;
250 xmlSettings.Encoding = System.Text.Encoding.UTF8;
251 using (XmlWriter xmlWriter = XmlWriter.Create(streamWriter, xmlSettings))
252 {
253 xmlWriter.WriteStartDocument();
254 xmlWriter.Flush();
255 }
256
257 streamWriter.WriteLine();
258 streamWriter.Write(mutatedWixString);
259 }
260 }
261 catch (WixException we)
262 {
263 this.Messaging.Write(we.Error);
264 }
265 catch (Exception e)
266 {
267 this.Messaging.Write(ErrorMessages.UnexpectedException(e));
268 if (e is NullReferenceException || e is SEHException)
269 {
270 throw;
271 }
272 }
273
274 return this.Messaging.LastErrorNumber;
275 }
276 }
277}
diff --git a/src/tools/heat/HeatCommandLine.cs b/src/tools/heat/HeatCommandLine.cs
new file mode 100644
index 00000000..b11dda4e
--- /dev/null
+++ b/src/tools/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/tools/heat/HeatCommandLineFactory.cs b/src/tools/heat/HeatCommandLineFactory.cs
new file mode 100644
index 00000000..44291e48
--- /dev/null
+++ b/src/tools/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/tools/heat/HeatCore.cs b/src/tools/heat/HeatCore.cs
new file mode 100644
index 00000000..578c4aab
--- /dev/null
+++ b/src/tools/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/tools/heat/HelpCommand.cs b/src/tools/heat/HelpCommand.cs
new file mode 100644
index 00000000..d991b4fa
--- /dev/null
+++ b/src/tools/heat/HelpCommand.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.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 ShowHelp { get; set; }
28
29 public bool ShowLogo
30 {
31 get => false;
32 set { }
33 }
34
35 public bool StopParsing => true;
36
37 public Task<int> ExecuteAsync(CancellationToken cancellationToken)
38 {
39 var exitCode = this.DisplayHelp();
40 return Task.FromResult(exitCode);
41 }
42
43 public static void DisplayToolHeader()
44 {
45 var wixcopAssembly = typeof(HelpCommand).Assembly;
46 var fv = FileVersionInfo.GetVersionInfo(wixcopAssembly.Location);
47
48 Console.WriteLine("WiX Toolset Harvester version {0}", fv.ProductVersion);
49 Console.WriteLine("Copyright (C) .NET Foundation and contributors. All rights reserved.");
50 Console.WriteLine();
51 }
52
53 public bool TryParseArgument(ICommandLineParser parser, string argument)
54 {
55 return true;
56 }
57
58 private int DisplayHelp()
59 {
60 DisplayToolHeader();
61
62 // output the harvest types alphabetically
63 SortedList harvestOptions = new SortedList();
64 foreach (var heatExtension in this.Extensions)
65 {
66 foreach (HeatCommandLineOption commandLineOption in heatExtension.CommandLineTypes)
67 {
68 harvestOptions.Add(commandLineOption.Option, commandLineOption);
69 }
70 }
71
72 harvestOptions.Add("-nologo", new HeatCommandLineOption("-nologo", "skip printing heat logo information"));
73 harvestOptions.Add("-indent <N>", new HeatCommandLineOption("-indent <N>", "indentation multiple (overrides default of 4)"));
74 harvestOptions.Add("-o[ut]", new HeatCommandLineOption("-out", "specify output file (default: write to current directory)"));
75 harvestOptions.Add("-sw<N>", new HeatCommandLineOption("-sw<N>", "suppress all warnings or a specific message ID\r\n (example: -sw1011 -sw1012)"));
76 harvestOptions.Add("-swall", new HeatCommandLineOption("-swall", "suppress all warnings (deprecated)"));
77 harvestOptions.Add("-v", new HeatCommandLineOption("-v", "verbose output"));
78 harvestOptions.Add("-wx[N]", new HeatCommandLineOption("-wx[N]", "treat all warnings or a specific message ID as an error\r\n (example: -wx1011 -wx1012)"));
79 harvestOptions.Add("-wxall", new HeatCommandLineOption("-wxall", "treat all warnings as errors (deprecated)"));
80
81 foreach (HeatCommandLineOption commandLineOption in harvestOptions.Values)
82 {
83 if (!commandLineOption.Option.StartsWith("-"))
84 {
85 Console.WriteLine(HelpMessageOptionFormat, commandLineOption.Option, commandLineOption.Description);
86 }
87 }
88
89 Console.WriteLine();
90 Console.WriteLine("Options:");
91
92 foreach (HeatCommandLineOption commandLineOption in harvestOptions.Values)
93 {
94 if (commandLineOption.Option.StartsWith("-"))
95 {
96 Console.WriteLine(HelpMessageOptionFormat, commandLineOption.Option, commandLineOption.Description);
97 }
98 }
99
100 Console.WriteLine(HelpMessageOptionFormat, "-? | -help", "this help information");
101 Console.WriteLine("For more information see: https://wixtoolset.org/");
102
103 return 0;
104 }
105 }
106}
diff --git a/src/tools/heat/IIsFinalizeHarvesterMutator.cs b/src/tools/heat/IIsFinalizeHarvesterMutator.cs
new file mode 100644
index 00000000..cfe90272
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/IIsHarvesterMutator.cs b/src/tools/heat/IIsHarvesterMutator.cs
new file mode 100644
index 00000000..a0147d0f
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/IIsHeatExtension.cs b/src/tools/heat/IIsHeatExtension.cs
new file mode 100644
index 00000000..be998370
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/IIsWebSiteHarvester.cs b/src/tools/heat/IIsWebSiteHarvester.cs
new file mode 100644
index 00000000..6e5e29c7
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/Mutator.cs b/src/tools/heat/Mutator.cs
new file mode 100644
index 00000000..8c63882d
--- /dev/null
+++ b/src/tools/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/tools/heat/PerformanceCategoryHarvester.cs b/src/tools/heat/PerformanceCategoryHarvester.cs
new file mode 100644
index 00000000..6be3401b
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/Program.cs b/src/tools/heat/Program.cs
new file mode 100644
index 00000000..f74def8f
--- /dev/null
+++ b/src/tools/heat/Program.cs
@@ -0,0 +1,84 @@
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.Data;
11 using WixToolset.Extensibility;
12 using WixToolset.Extensibility.Data;
13 using WixToolset.Extensibility.Services;
14 using WixToolset.Harvesters;
15 using WixToolset.Harvesters.Extensibility;
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 var listener = new ConsoleMessageListener("HEAT", "heat.exe");
33
34 try
35 {
36 var program = new Program();
37 return await program.Run(serviceProvider, listener, args);
38 }
39 catch (WixException e)
40 {
41 listener.Write(e.Error);
42
43 return e.Error.Id;
44 }
45 catch (Exception e)
46 {
47 listener.Write(ErrorMessages.UnexpectedException(e));
48
49 if (e is NullReferenceException || e is SEHException)
50 {
51 throw;
52 }
53
54 return e.HResult;
55 }
56 }
57
58 /// <summary>
59 /// Run the application with the given arguments.
60 /// </summary>
61 /// <param name="serviceProvider">Service provider to use throughout this execution.</param>
62 /// <param name="args">The commandline arguments.</param>
63 /// <returns>Returns the application error code.</returns>
64 public Task<int> Run(IServiceProvider serviceProvider, IMessageListener listener, string[] args)
65 {
66 var messaging = serviceProvider.GetService<IMessaging>();
67 messaging.SetListener(listener);
68
69 var arguments = serviceProvider.GetService<ICommandLineArguments>();
70 arguments.Populate(args);
71
72 var extensionManager = serviceProvider.GetService<IExtensionManager>();
73 foreach (var extension in arguments.Extensions)
74 {
75 extensionManager.Load(extension);
76 }
77 var heatExtensions = extensionManager.GetServices<IHeatExtension>();
78
79 var commandLine = HeatCommandLineFactory.CreateCommandLine(serviceProvider, heatExtensions);
80 var command = commandLine.ParseStandardCommandLine(arguments);
81 return command?.ExecuteAsync(CancellationToken.None) ?? Task.FromResult(1);
82 }
83 }
84}
diff --git a/src/tools/heat/RegFileHarvester.cs b/src/tools/heat/RegFileHarvester.cs
new file mode 100644
index 00000000..b7ad8c7b
--- /dev/null
+++ b/src/tools/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 public sealed 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 var registryKey = new Wix.RegistryKey
145 {
146 Root = root,
147 Key = line
148 };
149
150 while (this.GetValue(sr, ref name, ref value, out var 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/tools/heat/RegistryHarvester.cs b/src/tools/heat/RegistryHarvester.cs
new file mode 100644
index 00000000..0dfd3a29
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/Serialize/CodeDomInterfaces.cs b/src/tools/heat/Serialize/CodeDomInterfaces.cs
new file mode 100644
index 00000000..bd674db6
--- /dev/null
+++ b/src/tools/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/tools/heat/Serialize/CodeDomReader.cs b/src/tools/heat/Serialize/CodeDomReader.cs
new file mode 100644
index 00000000..0741bf68
--- /dev/null
+++ b/src/tools/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/tools/heat/Serialize/ElementCollection.cs b/src/tools/heat/Serialize/ElementCollection.cs
new file mode 100644
index 00000000..bacbafbd
--- /dev/null
+++ b/src/tools/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/tools/heat/Serialize/WixHarvesterStrings.Designer.cs b/src/tools/heat/Serialize/WixHarvesterStrings.Designer.cs
new file mode 100644
index 00000000..cc16e57a
--- /dev/null
+++ b/src/tools/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("heat.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/tools/heat/Serialize/WixHarvesterStrings.resx b/src/tools/heat/Serialize/WixHarvesterStrings.resx
new file mode 100644
index 00000000..5894a190
--- /dev/null
+++ b/src/tools/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/tools/heat/Serialize/iis.cs b/src/tools/heat/Serialize/iis.cs
new file mode 100644
index 00000000..3f2943f8
--- /dev/null
+++ b/src/tools/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/tools/heat/Serialize/util.cs b/src/tools/heat/Serialize/util.cs
new file mode 100644
index 00000000..84f56eb0
--- /dev/null
+++ b/src/tools/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/tools/heat/Serialize/vs.cs b/src/tools/heat/Serialize/vs.cs
new file mode 100644
index 00000000..8f926efc
--- /dev/null
+++ b/src/tools/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/tools/heat/Serialize/wix.cs b/src/tools/heat/Serialize/wix.cs
new file mode 100644
index 00000000..b881fb92
--- /dev/null
+++ b/src/tools/heat/Serialize/wix.cs
@@ -0,0 +1,57736 @@
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 BundleCacheType from a string.
259 /// </summary>
260 public static BundleCacheType ParseBundleCacheType(string value)
261 {
262 Enums.TryBundleCacheType(value, out var parsedValue);
263 return parsedValue;
264 }
265
266 /// <summary>
267 /// Tries to parse a YesNoAlwaysType from a string.
268 /// </summary>
269 public static bool TryBundleCacheType(string value, out BundleCacheType parsedValue)
270 {
271 parsedValue = BundleCacheType.NotSet;
272 if (string.IsNullOrEmpty(value))
273 {
274 return false;
275 }
276
277 if (("force" == value))
278 {
279 parsedValue = BundleCacheType.force;
280 }
281 else
282 {
283 if (("remove" == value))
284 {
285 parsedValue = BundleCacheType.remove;
286 }
287 else
288 {
289 if (("keep" == value))
290 {
291 parsedValue = BundleCacheType.keep;
292 }
293 else
294 {
295 return false;
296 }
297 }
298 }
299 return true;
300 }
301
302 /// <summary>
303 /// Parses a RegistryRootType from a string.
304 /// </summary>
305 public static RegistryRootType ParseRegistryRootType(string value)
306 {
307 RegistryRootType parsedValue;
308 Enums.TryParseRegistryRootType(value, out parsedValue);
309 return parsedValue;
310 }
311
312 /// <summary>
313 /// Tries to parse a RegistryRootType from a string.
314 /// </summary>
315 public static bool TryParseRegistryRootType(string value, out RegistryRootType parsedValue)
316 {
317 parsedValue = RegistryRootType.NotSet;
318 if (string.IsNullOrEmpty(value))
319 {
320 return false;
321 }
322 if (("HKMU" == value))
323 {
324 parsedValue = RegistryRootType.HKMU;
325 }
326 else
327 {
328 if (("HKCR" == value))
329 {
330 parsedValue = RegistryRootType.HKCR;
331 }
332 else
333 {
334 if (("HKCU" == value))
335 {
336 parsedValue = RegistryRootType.HKCU;
337 }
338 else
339 {
340 if (("HKLM" == value))
341 {
342 parsedValue = RegistryRootType.HKLM;
343 }
344 else
345 {
346 if (("HKU" == value))
347 {
348 parsedValue = RegistryRootType.HKU;
349 }
350 else
351 {
352 parsedValue = RegistryRootType.IllegalValue;
353 return false;
354 }
355 }
356 }
357 }
358 }
359 return true;
360 }
361
362 /// <summary>
363 /// Parses a ExitType from a string.
364 /// </summary>
365 public static ExitType ParseExitType(string value)
366 {
367 ExitType parsedValue;
368 Enums.TryParseExitType(value, out parsedValue);
369 return parsedValue;
370 }
371
372 /// <summary>
373 /// Tries to parse a ExitType from a string.
374 /// </summary>
375 public static bool TryParseExitType(string value, out ExitType parsedValue)
376 {
377 parsedValue = ExitType.NotSet;
378 if (string.IsNullOrEmpty(value))
379 {
380 return false;
381 }
382 if (("success" == value))
383 {
384 parsedValue = ExitType.success;
385 }
386 else
387 {
388 if (("cancel" == value))
389 {
390 parsedValue = ExitType.cancel;
391 }
392 else
393 {
394 if (("error" == value))
395 {
396 parsedValue = ExitType.error;
397 }
398 else
399 {
400 if (("suspend" == value))
401 {
402 parsedValue = ExitType.suspend;
403 }
404 else
405 {
406 parsedValue = ExitType.IllegalValue;
407 return false;
408 }
409 }
410 }
411 }
412 return true;
413 }
414
415 /// <summary>
416 /// Parses a InstallUninstallType from a string.
417 /// </summary>
418 public static InstallUninstallType ParseInstallUninstallType(string value)
419 {
420 InstallUninstallType parsedValue;
421 Enums.TryParseInstallUninstallType(value, out parsedValue);
422 return parsedValue;
423 }
424
425 /// <summary>
426 /// Tries to parse a InstallUninstallType from a string.
427 /// </summary>
428 public static bool TryParseInstallUninstallType(string value, out InstallUninstallType parsedValue)
429 {
430 parsedValue = InstallUninstallType.NotSet;
431 if (string.IsNullOrEmpty(value))
432 {
433 return false;
434 }
435 if (("install" == value))
436 {
437 parsedValue = InstallUninstallType.install;
438 }
439 else
440 {
441 if (("uninstall" == value))
442 {
443 parsedValue = InstallUninstallType.uninstall;
444 }
445 else
446 {
447 if (("both" == value))
448 {
449 parsedValue = InstallUninstallType.both;
450 }
451 else
452 {
453 parsedValue = InstallUninstallType.IllegalValue;
454 return false;
455 }
456 }
457 }
458 return true;
459 }
460
461 /// <summary>
462 /// Parses a SequenceType from a string.
463 /// </summary>
464 public static SequenceType ParseSequenceType(string value)
465 {
466 SequenceType parsedValue;
467 Enums.TryParseSequenceType(value, out parsedValue);
468 return parsedValue;
469 }
470
471 /// <summary>
472 /// Tries to parse a SequenceType from a string.
473 /// </summary>
474 public static bool TryParseSequenceType(string value, out SequenceType parsedValue)
475 {
476 parsedValue = SequenceType.NotSet;
477 if (string.IsNullOrEmpty(value))
478 {
479 return false;
480 }
481 if (("both" == value))
482 {
483 parsedValue = SequenceType.both;
484 }
485 else
486 {
487 if (("first" == value))
488 {
489 parsedValue = SequenceType.first;
490 }
491 else
492 {
493 if (("execute" == value))
494 {
495 parsedValue = SequenceType.execute;
496 }
497 else
498 {
499 if (("ui" == value))
500 {
501 parsedValue = SequenceType.ui;
502 }
503 else
504 {
505 parsedValue = SequenceType.IllegalValue;
506 return false;
507 }
508 }
509 }
510 }
511 return true;
512 }
513
514 /// <summary>
515 /// Parses a CompressionLevelType from a string.
516 /// </summary>
517 public static CompressionLevelType ParseCompressionLevelType(string value)
518 {
519 CompressionLevelType parsedValue;
520 Enums.TryParseCompressionLevelType(value, out parsedValue);
521 return parsedValue;
522 }
523
524 /// <summary>
525 /// Tries to parse a CompressionLevelType from a string.
526 /// </summary>
527 public static bool TryParseCompressionLevelType(string value, out CompressionLevelType parsedValue)
528 {
529 parsedValue = CompressionLevelType.NotSet;
530 if (string.IsNullOrEmpty(value))
531 {
532 return false;
533 }
534 if (("high" == value))
535 {
536 parsedValue = CompressionLevelType.high;
537 }
538 else
539 {
540 if (("low" == value))
541 {
542 parsedValue = CompressionLevelType.low;
543 }
544 else
545 {
546 if (("medium" == value))
547 {
548 parsedValue = CompressionLevelType.medium;
549 }
550 else
551 {
552 if (("mszip" == value))
553 {
554 parsedValue = CompressionLevelType.mszip;
555 }
556 else
557 {
558 if (("none" == value))
559 {
560 parsedValue = CompressionLevelType.none;
561 }
562 else
563 {
564 parsedValue = CompressionLevelType.IllegalValue;
565 return false;
566 }
567 }
568 }
569 }
570 }
571 return true;
572 }
573 }
574
575 /// <summary>
576 /// The list of communcation protocols with executable packages Burn supports.
577 /// </summary>
578 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
579 public enum BurnExeProtocolType
580 {
581
582 IllegalValue = int.MaxValue,
583
584 NotSet = -1,
585
586 /// <summary>
587 /// The executable package does not support a communication protocol.
588 /// </summary>
589 none,
590
591 /// <summary>
592 /// The executable package is another Burn bundle and supports the Burn communication protocol.
593 /// </summary>
594 burn,
595
596 /// <summary>
597 /// The executable package implements the .NET Framework v4.0 communication protocol.
598 /// </summary>
599 netfx4,
600 }
601
602 /// <summary>
603 /// Values of this type will either be "yes" or "no".
604 /// </summary>
605 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
606 public enum YesNoType
607 {
608
609 IllegalValue = int.MaxValue,
610
611 NotSet = -1,
612
613 no,
614
615 yes,
616 }
617
618 /// <summary>
619 /// Values of this type will either be "button", "yes" or "no".
620 /// </summary>
621 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
622 public enum YesNoButtonType
623 {
624
625 IllegalValue = int.MaxValue,
626
627 NotSet = -1,
628
629 no,
630
631 yes,
632
633 button,
634 }
635
636 /// <summary>
637 /// Values of this type will either be "default", "yes", or "no".
638 /// </summary>
639 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
640 public enum YesNoDefaultType
641 {
642
643 IllegalValue = int.MaxValue,
644
645 NotSet = -1,
646
647 @default,
648
649 no,
650
651 yes,
652 }
653
654 /// <summary>
655 /// Values of this type will either be "always", "yes", or "no".
656 /// </summary>
657 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
658 public enum BundleCacheType
659 {
660 NotSet = -1,
661
662 force,
663
664 remove,
665
666 keep,
667 }
668
669 /// <summary>
670 /// Values of this type represent possible registry roots.
671 /// </summary>
672 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
673 public enum RegistryRootType
674 {
675
676 IllegalValue = int.MaxValue,
677
678 NotSet = -1,
679
680 /// <summary>
681 /// A per-user installation will make the operation occur under HKEY_CURRENT_USER.
682 /// A per-machine installation will make the operation occur under HKEY_LOCAL_MACHINE.
683 /// </summary>
684 HKMU,
685
686 /// <summary>
687 /// Operation occurs under HKEY_CLASSES_ROOT. When using Windows 2000 or later, the installer writes or removes the value
688 /// from the HKCU\Software\Classes hive during per-user installations. When using Windows 2000 or later operating systems,
689 /// the installer writes or removes the value from the HKLM\Software\Classes hive during per-machine installations.
690 /// </summary>
691 HKCR,
692
693 /// <summary>
694 /// Operation occurs under HKEY_CURRENT_USER. It is recommended to set the KeyPath='yes' attribute when setting this value for writing values
695 /// in order to ensure that the installer writes the necessary registry entries when there are multiple users on the same computer.
696 /// </summary>
697 HKCU,
698
699 /// <summary>
700 /// Operation occurs under HKEY_LOCAL_MACHINE.
701 /// </summary>
702 HKLM,
703
704 /// <summary>
705 /// Operation occurs under HKEY_USERS.
706 /// </summary>
707 HKU,
708 }
709
710 /// <summary>
711 /// 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.
712 /// Multiple actions can have exit types assigned, but every action and exit type must be different. Exit types are typically used with dialog boxes.
713 /// </summary>
714 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
715 public enum ExitType
716 {
717
718 IllegalValue = int.MaxValue,
719
720 NotSet = -1,
721
722 success,
723
724 cancel,
725
726 error,
727
728 suspend,
729 }
730
731 /// <summary>
732 /// Specifies whether an action occur on install, uninstall or both.
733 /// </summary>
734 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
735 public enum InstallUninstallType
736 {
737
738 IllegalValue = int.MaxValue,
739
740 NotSet = -1,
741
742 /// <summary>
743 /// The action should happen during install (msiInstallStateLocal or msiInstallStateSource).
744 /// </summary>
745 install,
746
747 /// <summary>
748 /// The action should happen during uninstall (msiInstallStateAbsent).
749 /// </summary>
750 uninstall,
751
752 /// <summary>
753 /// The action should happen during both install and uninstall.
754 /// </summary>
755 both,
756 }
757
758 /// <summary>
759 /// Controls which sequences the item assignment is sequenced in.
760 /// </summary>
761 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
762 public enum SequenceType
763 {
764
765 IllegalValue = int.MaxValue,
766
767 NotSet = -1,
768
769 /// <summary>
770 /// Schedules the assignment in the InstallUISequence and the InstallExecuteSequence.
771 /// </summary>
772 both,
773
774 /// <summary>
775 /// Schedules the assignment to run in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped.
776 /// </summary>
777 first,
778
779 /// <summary>
780 /// Schedules the assignment only in the the InstallExecuteSequence.
781 /// </summary>
782 execute,
783
784 /// <summary>
785 /// Schedules the assignment only in the the InstallUISequence.
786 /// </summary>
787 ui,
788 }
789
790 /// <summary>
791 /// Indicates the compression level for a cabinet.
792 /// </summary>
793 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
794 public enum CompressionLevelType
795 {
796
797 IllegalValue = int.MaxValue,
798
799 NotSet = -1,
800
801 high,
802
803 low,
804
805 medium,
806
807 mszip,
808
809 none,
810 }
811
812 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
813 public abstract class ActionModuleSequenceType : ISchemaElement, ISetAttributes
814 {
815
816 private string afterField;
817
818 private bool afterFieldSet;
819
820 private string beforeField;
821
822 private bool beforeFieldSet;
823
824 private YesNoType overridableField;
825
826 private bool overridableFieldSet;
827
828 private int sequenceField;
829
830 private bool sequenceFieldSet;
831
832 private YesNoType suppressField;
833
834 private bool suppressFieldSet;
835
836 private string contentField;
837
838 private bool contentFieldSet;
839
840 private ISchemaElement parentElement;
841
842 /// <summary>
843 /// The name of an action that this action should come after.
844 /// </summary>
845 public string After
846 {
847 get
848 {
849 return this.afterField;
850 }
851 set
852 {
853 this.afterFieldSet = true;
854 this.afterField = value;
855 }
856 }
857
858 /// <summary>
859 /// The name of an action that this action should come before.
860 /// </summary>
861 public string Before
862 {
863 get
864 {
865 return this.beforeField;
866 }
867 set
868 {
869 this.beforeFieldSet = true;
870 this.beforeField = value;
871 }
872 }
873
874 /// <summary>
875 /// If "yes", the sequencing of this action may be overridden by sequencing elsewhere.
876 /// </summary>
877 public YesNoType Overridable
878 {
879 get
880 {
881 return this.overridableField;
882 }
883 set
884 {
885 this.overridableFieldSet = true;
886 this.overridableField = value;
887 }
888 }
889
890 /// <summary>
891 /// A value used to indicate the position of this action in a sequence.
892 /// </summary>
893 public int Sequence
894 {
895 get
896 {
897 return this.sequenceField;
898 }
899 set
900 {
901 this.sequenceFieldSet = true;
902 this.sequenceField = value;
903 }
904 }
905
906 /// <summary>
907 /// If yes, this action will not occur.
908 /// </summary>
909 public YesNoType Suppress
910 {
911 get
912 {
913 return this.suppressField;
914 }
915 set
916 {
917 this.suppressFieldSet = true;
918 this.suppressField = value;
919 }
920 }
921
922 /// <summary>
923 /// Text node specifies the condition of the action.
924 /// </summary>
925 public string Content
926 {
927 get
928 {
929 return this.contentField;
930 }
931 set
932 {
933 this.contentFieldSet = true;
934 this.contentField = value;
935 }
936 }
937
938 public virtual ISchemaElement ParentElement
939 {
940 get
941 {
942 return this.parentElement;
943 }
944 set
945 {
946 this.parentElement = value;
947 }
948 }
949
950 /// <summary>
951 /// Processes this element and all child elements into an XmlWriter.
952 /// </summary>
953 public virtual void OutputXml(XmlWriter writer)
954 {
955 if ((null == writer))
956 {
957 throw new ArgumentNullException("writer");
958 }
959 if (this.afterFieldSet)
960 {
961 writer.WriteAttributeString("After", this.afterField);
962 }
963 if (this.beforeFieldSet)
964 {
965 writer.WriteAttributeString("Before", this.beforeField);
966 }
967 if (this.overridableFieldSet)
968 {
969 if ((this.overridableField == YesNoType.no))
970 {
971 writer.WriteAttributeString("Overridable", "no");
972 }
973 if ((this.overridableField == YesNoType.yes))
974 {
975 writer.WriteAttributeString("Overridable", "yes");
976 }
977 }
978 if (this.sequenceFieldSet)
979 {
980 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
981 }
982 if (this.suppressFieldSet)
983 {
984 if ((this.suppressField == YesNoType.no))
985 {
986 writer.WriteAttributeString("Suppress", "no");
987 }
988 if ((this.suppressField == YesNoType.yes))
989 {
990 writer.WriteAttributeString("Suppress", "yes");
991 }
992 }
993 if (this.contentFieldSet)
994 {
995 writer.WriteString(this.contentField);
996 }
997 }
998
999 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1000 void ISetAttributes.SetAttribute(string name, string value)
1001 {
1002 if (String.IsNullOrEmpty(name))
1003 {
1004 throw new ArgumentNullException("name");
1005 }
1006 if (("After" == name))
1007 {
1008 this.afterField = value;
1009 this.afterFieldSet = true;
1010 }
1011 if (("Before" == name))
1012 {
1013 this.beforeField = value;
1014 this.beforeFieldSet = true;
1015 }
1016 if (("Overridable" == name))
1017 {
1018 this.overridableField = Enums.ParseYesNoType(value);
1019 this.overridableFieldSet = true;
1020 }
1021 if (("Sequence" == name))
1022 {
1023 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1024 this.sequenceFieldSet = true;
1025 }
1026 if (("Suppress" == name))
1027 {
1028 this.suppressField = Enums.ParseYesNoType(value);
1029 this.suppressFieldSet = true;
1030 }
1031 if (("Content" == name))
1032 {
1033 this.contentField = value;
1034 this.contentFieldSet = true;
1035 }
1036 }
1037 }
1038
1039 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1040 public abstract class ActionSequenceType : ISchemaElement, ISetAttributes
1041 {
1042
1043 private int sequenceField;
1044
1045 private bool sequenceFieldSet;
1046
1047 private YesNoType suppressField;
1048
1049 private bool suppressFieldSet;
1050
1051 private string contentField;
1052
1053 private bool contentFieldSet;
1054
1055 private ISchemaElement parentElement;
1056
1057 /// <summary>
1058 /// A value used to indicate the position of this action in a sequence.
1059 /// </summary>
1060 public int Sequence
1061 {
1062 get
1063 {
1064 return this.sequenceField;
1065 }
1066 set
1067 {
1068 this.sequenceFieldSet = true;
1069 this.sequenceField = value;
1070 }
1071 }
1072
1073 /// <summary>
1074 /// If yes, this action will not occur.
1075 /// </summary>
1076 public YesNoType Suppress
1077 {
1078 get
1079 {
1080 return this.suppressField;
1081 }
1082 set
1083 {
1084 this.suppressFieldSet = true;
1085 this.suppressField = value;
1086 }
1087 }
1088
1089 public string Content
1090 {
1091 get
1092 {
1093 return this.contentField;
1094 }
1095 set
1096 {
1097 this.contentFieldSet = true;
1098 this.contentField = value;
1099 }
1100 }
1101
1102 public virtual ISchemaElement ParentElement
1103 {
1104 get
1105 {
1106 return this.parentElement;
1107 }
1108 set
1109 {
1110 this.parentElement = value;
1111 }
1112 }
1113
1114 /// <summary>
1115 /// Processes this element and all child elements into an XmlWriter.
1116 /// </summary>
1117 public virtual void OutputXml(XmlWriter writer)
1118 {
1119 if ((null == writer))
1120 {
1121 throw new ArgumentNullException("writer");
1122 }
1123 if (this.sequenceFieldSet)
1124 {
1125 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
1126 }
1127 if (this.suppressFieldSet)
1128 {
1129 if ((this.suppressField == YesNoType.no))
1130 {
1131 writer.WriteAttributeString("Suppress", "no");
1132 }
1133 if ((this.suppressField == YesNoType.yes))
1134 {
1135 writer.WriteAttributeString("Suppress", "yes");
1136 }
1137 }
1138 if (this.contentFieldSet)
1139 {
1140 writer.WriteString(this.contentField);
1141 }
1142 }
1143
1144 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1145 void ISetAttributes.SetAttribute(string name, string value)
1146 {
1147 if (String.IsNullOrEmpty(name))
1148 {
1149 throw new ArgumentNullException("name");
1150 }
1151 if (("Sequence" == name))
1152 {
1153 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
1154 this.sequenceFieldSet = true;
1155 }
1156 if (("Suppress" == name))
1157 {
1158 this.suppressField = Enums.ParseYesNoType(value);
1159 this.suppressFieldSet = true;
1160 }
1161 if (("Content" == name))
1162 {
1163 this.contentField = value;
1164 this.contentFieldSet = true;
1165 }
1166 }
1167 }
1168
1169 /// <summary>
1170 /// This is the top-level container element for every wxs file. Among the possible children,
1171 /// the Bundle, Package, Module, Patch, and PatchCreation elements are analogous to the main function in a C program.
1172 /// There can only be one of these present when linking occurs. Package compiles into an msi file,
1173 /// Module compiles into an msm file, PatchCreation compiles into a pcp file. The Fragment element
1174 /// is an atomic unit which ultimately links into either a Package, Module, or PatchCreation. The
1175 /// Fragment can either be completely included or excluded during linking.
1176 /// </summary>
1177 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1178 public class Wix : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
1179 {
1180
1181 private ElementCollection children;
1182
1183 private string requiredVersionField;
1184
1185 private bool requiredVersionFieldSet;
1186
1187 private ISchemaElement parentElement;
1188
1189 public Wix()
1190 {
1191 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
1192 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence);
1193 ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Choice);
1194 childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Bundle)));
1195 childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Package)));
1196 childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Module)));
1197 childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Patch)));
1198 childCollection1.AddCollection(childCollection2);
1199 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(Fragment)));
1200 childCollection0.AddCollection(childCollection1);
1201 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCreation)));
1202 this.children = childCollection0;
1203 }
1204
1205 public virtual IEnumerable Children
1206 {
1207 get
1208 {
1209 return this.children;
1210 }
1211 }
1212
1213 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
1214 public virtual IEnumerable this[System.Type childType]
1215 {
1216 get
1217 {
1218 return this.children.Filter(childType);
1219 }
1220 }
1221
1222 /// <summary>
1223 /// Required version of the WiX toolset to compile this input file.
1224 /// </summary>
1225 public string RequiredVersion
1226 {
1227 get
1228 {
1229 return this.requiredVersionField;
1230 }
1231 set
1232 {
1233 this.requiredVersionFieldSet = true;
1234 this.requiredVersionField = value;
1235 }
1236 }
1237
1238 public virtual ISchemaElement ParentElement
1239 {
1240 get
1241 {
1242 return this.parentElement;
1243 }
1244 set
1245 {
1246 this.parentElement = value;
1247 }
1248 }
1249
1250 public virtual void AddChild(ISchemaElement child)
1251 {
1252 if ((null == child))
1253 {
1254 throw new ArgumentNullException("child");
1255 }
1256 this.children.AddElement(child);
1257 child.ParentElement = this;
1258 }
1259
1260 public virtual void RemoveChild(ISchemaElement child)
1261 {
1262 if ((null == child))
1263 {
1264 throw new ArgumentNullException("child");
1265 }
1266 this.children.RemoveElement(child);
1267 child.ParentElement = null;
1268 }
1269
1270 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1271 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
1272 ISchemaElement ICreateChildren.CreateChild(string childName)
1273 {
1274 if (String.IsNullOrEmpty(childName))
1275 {
1276 throw new ArgumentNullException("childName");
1277 }
1278 ISchemaElement childValue = null;
1279 if (("Bundle" == childName))
1280 {
1281 childValue = new Bundle();
1282 }
1283 if (("Package" == childName))
1284 {
1285 childValue = new Package();
1286 }
1287 if (("Module" == childName))
1288 {
1289 childValue = new Module();
1290 }
1291 if (("Patch" == childName))
1292 {
1293 childValue = new Patch();
1294 }
1295 if (("Fragment" == childName))
1296 {
1297 childValue = new Fragment();
1298 }
1299 if (("PatchCreation" == childName))
1300 {
1301 childValue = new PatchCreation();
1302 }
1303 if ((null == childValue))
1304 {
1305 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
1306 }
1307 return childValue;
1308 }
1309
1310 /// <summary>
1311 /// Processes this element and all child elements into an XmlWriter.
1312 /// </summary>
1313 public virtual void OutputXml(XmlWriter writer)
1314 {
1315 if ((null == writer))
1316 {
1317 throw new ArgumentNullException("writer");
1318 }
1319 writer.WriteStartElement("Wix", "http://wixtoolset.org/schemas/v4/wxs");
1320 if (this.requiredVersionFieldSet)
1321 {
1322 writer.WriteAttributeString("RequiredVersion", this.requiredVersionField);
1323 }
1324 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
1325 {
1326 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
1327 childElement.OutputXml(writer);
1328 }
1329 writer.WriteEndElement();
1330 }
1331
1332 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1333 void ISetAttributes.SetAttribute(string name, string value)
1334 {
1335 if (String.IsNullOrEmpty(name))
1336 {
1337 throw new ArgumentNullException("name");
1338 }
1339 if (("RequiredVersion" == name))
1340 {
1341 this.requiredVersionField = value;
1342 this.requiredVersionFieldSet = true;
1343 }
1344 }
1345 }
1346
1347 /// <summary>
1348 /// This is the top-level container element for every wxi file.
1349 /// </summary>
1350 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1351 public class Include : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
1352 {
1353
1354 private ElementCollection children;
1355
1356 private ISchemaElement parentElement;
1357
1358 public Include()
1359 {
1360 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
1361 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
1362 this.children = childCollection0;
1363 }
1364
1365 public virtual IEnumerable Children
1366 {
1367 get
1368 {
1369 return this.children;
1370 }
1371 }
1372
1373 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
1374 public virtual IEnumerable this[System.Type childType]
1375 {
1376 get
1377 {
1378 return this.children.Filter(childType);
1379 }
1380 }
1381
1382 public virtual ISchemaElement ParentElement
1383 {
1384 get
1385 {
1386 return this.parentElement;
1387 }
1388 set
1389 {
1390 this.parentElement = value;
1391 }
1392 }
1393
1394 public virtual void AddChild(ISchemaElement child)
1395 {
1396 if ((null == child))
1397 {
1398 throw new ArgumentNullException("child");
1399 }
1400 this.children.AddElement(child);
1401 child.ParentElement = this;
1402 }
1403
1404 public virtual void RemoveChild(ISchemaElement child)
1405 {
1406 if ((null == child))
1407 {
1408 throw new ArgumentNullException("child");
1409 }
1410 this.children.RemoveElement(child);
1411 child.ParentElement = null;
1412 }
1413
1414 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1415 ISchemaElement ICreateChildren.CreateChild(string childName)
1416 {
1417 if (String.IsNullOrEmpty(childName))
1418 {
1419 throw new ArgumentNullException("childName");
1420 }
1421 ISchemaElement childValue = null;
1422 if ((null == childValue))
1423 {
1424 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
1425 }
1426 return childValue;
1427 }
1428
1429 /// <summary>
1430 /// Processes this element and all child elements into an XmlWriter.
1431 /// </summary>
1432 public virtual void OutputXml(XmlWriter writer)
1433 {
1434 if ((null == writer))
1435 {
1436 throw new ArgumentNullException("writer");
1437 }
1438 writer.WriteStartElement("Include", "http://wixtoolset.org/schemas/v4/wxs");
1439 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
1440 {
1441 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
1442 childElement.OutputXml(writer);
1443 }
1444 writer.WriteEndElement();
1445 }
1446
1447 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1448 void ISetAttributes.SetAttribute(string name, string value)
1449 {
1450 if (String.IsNullOrEmpty(name))
1451 {
1452 throw new ArgumentNullException("name");
1453 }
1454 }
1455 }
1456
1457 /// <summary>
1458 /// The root element for creating bundled packages.
1459 /// </summary>
1460 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
1461 public class Bundle : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
1462 {
1463
1464 private ElementCollection children;
1465
1466 private string aboutUrlField;
1467
1468 private bool aboutUrlFieldSet;
1469
1470 private string copyrightField;
1471
1472 private bool copyrightFieldSet;
1473
1474 private YesNoDefaultType compressedField;
1475
1476 private bool compressedFieldSet;
1477
1478 private YesNoButtonType disableModifyField;
1479
1480 private bool disableModifyFieldSet;
1481
1482 private YesNoType disableRemoveField;
1483
1484 private bool disableRemoveFieldSet;
1485
1486 private YesNoType disableRepairField;
1487
1488 private bool disableRepairFieldSet;
1489
1490 private string helpTelephoneField;
1491
1492 private bool helpTelephoneFieldSet;
1493
1494 private string helpUrlField;
1495
1496 private bool helpUrlFieldSet;
1497
1498 private string iconSourceFileField;
1499
1500 private bool iconSourceFileFieldSet;
1501
1502 private string manufacturerField;
1503
1504 private bool manufacturerFieldSet;
1505
1506 private string nameField;
1507
1508 private bool nameFieldSet;
1509
1510 private string parentNameField;
1511
1512 private bool parentNameFieldSet;
1513
1514 private string splashScreenSourceFileField;
1515
1516 private bool splashScreenSourceFileFieldSet;
1517
1518 private string tagField;
1519
1520 private bool tagFieldSet;
1521
1522 private string updateUrlField;
1523
1524 private bool updateUrlFieldSet;
1525
1526 private string upgradeCodeField;
1527
1528 private bool upgradeCodeFieldSet;
1529
1530 private string versionField;
1531
1532 private bool versionFieldSet;
1533
1534 private string conditionField;
1535
1536 private bool conditionFieldSet;
1537
1538 private ISchemaElement parentElement;
1539
1540 public Bundle()
1541 {
1542 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
1543 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ApprovedExeForElevation)));
1544 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Log)));
1545 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Catalog)));
1546 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplication)));
1547 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplicationRef)));
1548 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(OptionalUpdateRegistration)));
1549 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Chain)));
1550 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Container)));
1551 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ContainerRef)));
1552 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroup)));
1553 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
1554 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RelatedBundle)));
1555 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Update)));
1556 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Variable)));
1557 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable)));
1558 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
1559 this.children = childCollection0;
1560 }
1561
1562 public virtual IEnumerable Children
1563 {
1564 get
1565 {
1566 return this.children;
1567 }
1568 }
1569
1570 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
1571 public virtual IEnumerable this[System.Type childType]
1572 {
1573 get
1574 {
1575 return this.children.Filter(childType);
1576 }
1577 }
1578
1579 /// <summary>
1580 /// A URL for more information about the bundle to display in Programs and Features (also
1581 /// known as Add/Remove Programs).
1582 /// </summary>
1583 public string AboutUrl
1584 {
1585 get
1586 {
1587 return this.aboutUrlField;
1588 }
1589 set
1590 {
1591 this.aboutUrlFieldSet = true;
1592 this.aboutUrlField = value;
1593 }
1594 }
1595
1596 /// <summary>
1597 /// The legal copyright found in the version resources of final bundle executable. If
1598 /// this attribute is not provided the copyright will be set to "Copyright (c) [Bundle/@Manufacturer]. All rights reserved.".
1599 /// </summary>
1600 public string Copyright
1601 {
1602 get
1603 {
1604 return this.copyrightField;
1605 }
1606 set
1607 {
1608 this.copyrightFieldSet = true;
1609 this.copyrightField = value;
1610 }
1611 }
1612
1613 /// <summary>
1614 /// 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.
1615 /// </summary>
1616 public YesNoDefaultType Compressed
1617 {
1618 get
1619 {
1620 return this.compressedField;
1621 }
1622 set
1623 {
1624 this.compressedFieldSet = true;
1625 this.compressedField = value;
1626 }
1627 }
1628
1629 /// <summary>
1630 /// Determines whether the bundle can be modified via the Programs and Features (also known as
1631 /// Add/Remove Programs). If the value is "button" then Programs and Features will show a single
1632 /// "Uninstall/Change" button. If the value is "yes" then Programs and Features will only show
1633 /// the "Uninstall" button". If the value is "no", the default, then a "Change" button is shown.
1634 /// See the DisableRemove attribute for information how to not display the bundle in Programs
1635 /// and Features.
1636 /// </summary>
1637 public YesNoButtonType DisableModify
1638 {
1639 get
1640 {
1641 return this.disableModifyField;
1642 }
1643 set
1644 {
1645 this.disableModifyFieldSet = true;
1646 this.disableModifyField = value;
1647 }
1648 }
1649
1650 /// <summary>
1651 /// Determines whether the bundle can be removed via the Programs and Features (also
1652 /// known as Add/Remove Programs). If the value is "yes" then the "Uninstall" button will
1653 /// not be displayed. The default is "no" which ensures there is an "Uninstall" button to
1654 /// remove the bundle. If the "DisableModify" attribute is also "yes" or "button" then the
1655 /// bundle will not be displayed in Progams and Features and another mechanism (such as
1656 /// registering as a related bundle addon) must be used to ensure the bundle can be removed.
1657 /// </summary>
1658 public YesNoType DisableRemove
1659 {
1660 get
1661 {
1662 return this.disableRemoveField;
1663 }
1664 set
1665 {
1666 this.disableRemoveFieldSet = true;
1667 this.disableRemoveField = value;
1668 }
1669 }
1670
1671 public YesNoType DisableRepair
1672 {
1673 get
1674 {
1675 return this.disableRepairField;
1676 }
1677 set
1678 {
1679 this.disableRepairFieldSet = true;
1680 this.disableRepairField = value;
1681 }
1682 }
1683
1684 /// <summary>
1685 /// A telephone number for help to display in Programs and Features (also known as
1686 /// Add/Remove Programs).
1687 /// </summary>
1688 public string HelpTelephone
1689 {
1690 get
1691 {
1692 return this.helpTelephoneField;
1693 }
1694 set
1695 {
1696 this.helpTelephoneFieldSet = true;
1697 this.helpTelephoneField = value;
1698 }
1699 }
1700
1701 /// <summary>
1702 /// A URL to the help for the bundle to display in Programs and Features (also known as
1703 /// Add/Remove Programs).
1704 /// </summary>
1705 public string HelpUrl
1706 {
1707 get
1708 {
1709 return this.helpUrlField;
1710 }
1711 set
1712 {
1713 this.helpUrlFieldSet = true;
1714 this.helpUrlField = value;
1715 }
1716 }
1717
1718 /// <summary>
1719 /// Path to an icon that will replace the default icon in the final Bundle executable.
1720 /// This icon will also be displayed in Programs and Features (also known as Add/Remove
1721 /// Programs).
1722 /// </summary>
1723 public string IconSourceFile
1724 {
1725 get
1726 {
1727 return this.iconSourceFileField;
1728 }
1729 set
1730 {
1731 this.iconSourceFileFieldSet = true;
1732 this.iconSourceFileField = value;
1733 }
1734 }
1735
1736 /// <summary>
1737 /// The publisher of the bundle to display in Programs and Features (also known as
1738 /// Add/Remove Programs).
1739 /// </summary>
1740 public string Manufacturer
1741 {
1742 get
1743 {
1744 return this.manufacturerField;
1745 }
1746 set
1747 {
1748 this.manufacturerFieldSet = true;
1749 this.manufacturerField = value;
1750 }
1751 }
1752
1753 /// <summary>
1754 /// The name of the bundle to display in Programs and Features (also known as Add/Remove
1755 /// Programs). This name can be accessed and overwritten by a BootstrapperApplication
1756 /// using the WixBundleName bundle variable.
1757 /// </summary>
1758 public string Name
1759 {
1760 get
1761 {
1762 return this.nameField;
1763 }
1764 set
1765 {
1766 this.nameFieldSet = true;
1767 this.nameField = value;
1768 }
1769 }
1770
1771 /// <summary>
1772 /// The name of the parent bundle to display in Installed Updates (also known as Add/Remove
1773 /// Programs). This name is used to nest or group bundles that will appear as updates.
1774 /// If the parent name does not actually exist, a virtual parent is created automatically.
1775 /// </summary>
1776 public string ParentName
1777 {
1778 get
1779 {
1780 return this.parentNameField;
1781 }
1782 set
1783 {
1784 this.parentNameFieldSet = true;
1785 this.parentNameField = value;
1786 }
1787 }
1788
1789 /// <summary>
1790 /// 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.
1791 /// </summary>
1792 public string SplashScreenSourceFile
1793 {
1794 get
1795 {
1796 return this.splashScreenSourceFileField;
1797 }
1798 set
1799 {
1800 this.splashScreenSourceFileFieldSet = true;
1801 this.splashScreenSourceFileField = value;
1802 }
1803 }
1804
1805 /// <summary>
1806 /// 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.
1807 /// </summary>
1808 public string Tag
1809 {
1810 get
1811 {
1812 return this.tagField;
1813 }
1814 set
1815 {
1816 this.tagFieldSet = true;
1817 this.tagField = value;
1818 }
1819 }
1820
1821 /// <summary>
1822 /// A URL for updates of the bundle to display in Programs and Features (also
1823 /// known as Add/Remove Programs).
1824 /// </summary>
1825 public string UpdateUrl
1826 {
1827 get
1828 {
1829 return this.updateUrlField;
1830 }
1831 set
1832 {
1833 this.updateUrlFieldSet = true;
1834 this.updateUrlField = value;
1835 }
1836 }
1837
1838 /// <summary>
1839 /// Unique identifier for a family of bundles. If two bundles have the same UpgradeCode the
1840 /// bundle with the highest version will be installed.
1841 /// </summary>
1842 public string UpgradeCode
1843 {
1844 get
1845 {
1846 return this.upgradeCodeField;
1847 }
1848 set
1849 {
1850 this.upgradeCodeFieldSet = true;
1851 this.upgradeCodeField = value;
1852 }
1853 }
1854
1855 /// <summary>
1856 /// The version of the bundle. Newer versions upgrade earlier versions of the bundles
1857 /// with matching UpgradeCodes. If the bundle is registered in Programs and Features
1858 /// then this attribute will be displayed in the Programs and Features user interface.
1859 /// </summary>
1860 public string Version
1861 {
1862 get
1863 {
1864 return this.versionField;
1865 }
1866 set
1867 {
1868 this.versionFieldSet = true;
1869 this.versionField = value;
1870 }
1871 }
1872
1873 /// <summary>
1874 /// The condition of the bundle. If the condition is not met, the bundle will
1875 /// refuse to run. Conditions are checked before the bootstrapper application is loaded
1876 /// (before detect), and thus can only reference built-in variables such as
1877 /// variables which indicate the version of the OS.
1878 /// </summary>
1879 public string Condition
1880 {
1881 get
1882 {
1883 return this.conditionField;
1884 }
1885 set
1886 {
1887 this.conditionFieldSet = true;
1888 this.conditionField = value;
1889 }
1890 }
1891
1892 public virtual ISchemaElement ParentElement
1893 {
1894 get
1895 {
1896 return this.parentElement;
1897 }
1898 set
1899 {
1900 this.parentElement = value;
1901 }
1902 }
1903
1904 public virtual void AddChild(ISchemaElement child)
1905 {
1906 if ((null == child))
1907 {
1908 throw new ArgumentNullException("child");
1909 }
1910 this.children.AddElement(child);
1911 child.ParentElement = this;
1912 }
1913
1914 public virtual void RemoveChild(ISchemaElement child)
1915 {
1916 if ((null == child))
1917 {
1918 throw new ArgumentNullException("child");
1919 }
1920 this.children.RemoveElement(child);
1921 child.ParentElement = null;
1922 }
1923
1924 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
1925 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
1926 ISchemaElement ICreateChildren.CreateChild(string childName)
1927 {
1928 if (String.IsNullOrEmpty(childName))
1929 {
1930 throw new ArgumentNullException("childName");
1931 }
1932 ISchemaElement childValue = null;
1933 if (("ApprovedExeForElevation" == childName))
1934 {
1935 childValue = new ApprovedExeForElevation();
1936 }
1937 if (("Log" == childName))
1938 {
1939 childValue = new Log();
1940 }
1941 if (("Catalog" == childName))
1942 {
1943 childValue = new Catalog();
1944 }
1945 if (("BootstrapperApplication" == childName))
1946 {
1947 childValue = new BootstrapperApplication();
1948 }
1949 if (("BootstrapperApplicationRef" == childName))
1950 {
1951 childValue = new BootstrapperApplicationRef();
1952 }
1953 if (("OptionalUpdateRegistration" == childName))
1954 {
1955 childValue = new OptionalUpdateRegistration();
1956 }
1957 if (("Chain" == childName))
1958 {
1959 childValue = new Chain();
1960 }
1961 if (("Container" == childName))
1962 {
1963 childValue = new Container();
1964 }
1965 if (("ContainerRef" == childName))
1966 {
1967 childValue = new ContainerRef();
1968 }
1969 if (("PayloadGroup" == childName))
1970 {
1971 childValue = new PayloadGroup();
1972 }
1973 if (("PayloadGroupRef" == childName))
1974 {
1975 childValue = new PayloadGroupRef();
1976 }
1977 if (("RelatedBundle" == childName))
1978 {
1979 childValue = new RelatedBundle();
1980 }
1981 if (("Update" == childName))
1982 {
1983 childValue = new Update();
1984 }
1985 if (("Variable" == childName))
1986 {
1987 childValue = new Variable();
1988 }
1989 if (("WixVariable" == childName))
1990 {
1991 childValue = new WixVariable();
1992 }
1993 if ((null == childValue))
1994 {
1995 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
1996 }
1997 return childValue;
1998 }
1999
2000 /// <summary>
2001 /// Processes this element and all child elements into an XmlWriter.
2002 /// </summary>
2003 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
2004 public virtual void OutputXml(XmlWriter writer)
2005 {
2006 if ((null == writer))
2007 {
2008 throw new ArgumentNullException("writer");
2009 }
2010 writer.WriteStartElement("Bundle", "http://wixtoolset.org/schemas/v4/wxs");
2011 if (this.aboutUrlFieldSet)
2012 {
2013 writer.WriteAttributeString("AboutUrl", this.aboutUrlField);
2014 }
2015 if (this.copyrightFieldSet)
2016 {
2017 writer.WriteAttributeString("Copyright", this.copyrightField);
2018 }
2019 if (this.compressedFieldSet)
2020 {
2021 if ((this.compressedField == YesNoDefaultType.@default))
2022 {
2023 writer.WriteAttributeString("Compressed", "default");
2024 }
2025 if ((this.compressedField == YesNoDefaultType.no))
2026 {
2027 writer.WriteAttributeString("Compressed", "no");
2028 }
2029 if ((this.compressedField == YesNoDefaultType.yes))
2030 {
2031 writer.WriteAttributeString("Compressed", "yes");
2032 }
2033 }
2034 if (this.disableModifyFieldSet)
2035 {
2036 if ((this.disableModifyField == YesNoButtonType.no))
2037 {
2038 writer.WriteAttributeString("DisableModify", "no");
2039 }
2040 if ((this.disableModifyField == YesNoButtonType.yes))
2041 {
2042 writer.WriteAttributeString("DisableModify", "yes");
2043 }
2044 if ((this.disableModifyField == YesNoButtonType.button))
2045 {
2046 writer.WriteAttributeString("DisableModify", "button");
2047 }
2048 }
2049 if (this.disableRemoveFieldSet)
2050 {
2051 if ((this.disableRemoveField == YesNoType.no))
2052 {
2053 writer.WriteAttributeString("DisableRemove", "no");
2054 }
2055 if ((this.disableRemoveField == YesNoType.yes))
2056 {
2057 writer.WriteAttributeString("DisableRemove", "yes");
2058 }
2059 }
2060 if (this.disableRepairFieldSet)
2061 {
2062 if ((this.disableRepairField == YesNoType.no))
2063 {
2064 writer.WriteAttributeString("DisableRepair", "no");
2065 }
2066 if ((this.disableRepairField == YesNoType.yes))
2067 {
2068 writer.WriteAttributeString("DisableRepair", "yes");
2069 }
2070 }
2071 if (this.helpTelephoneFieldSet)
2072 {
2073 writer.WriteAttributeString("HelpTelephone", this.helpTelephoneField);
2074 }
2075 if (this.helpUrlFieldSet)
2076 {
2077 writer.WriteAttributeString("HelpUrl", this.helpUrlField);
2078 }
2079 if (this.iconSourceFileFieldSet)
2080 {
2081 writer.WriteAttributeString("IconSourceFile", this.iconSourceFileField);
2082 }
2083 if (this.manufacturerFieldSet)
2084 {
2085 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
2086 }
2087 if (this.nameFieldSet)
2088 {
2089 writer.WriteAttributeString("Name", this.nameField);
2090 }
2091 if (this.parentNameFieldSet)
2092 {
2093 writer.WriteAttributeString("ParentName", this.parentNameField);
2094 }
2095 if (this.splashScreenSourceFileFieldSet)
2096 {
2097 writer.WriteAttributeString("SplashScreenSourceFile", this.splashScreenSourceFileField);
2098 }
2099 if (this.tagFieldSet)
2100 {
2101 writer.WriteAttributeString("Tag", this.tagField);
2102 }
2103 if (this.updateUrlFieldSet)
2104 {
2105 writer.WriteAttributeString("UpdateUrl", this.updateUrlField);
2106 }
2107 if (this.upgradeCodeFieldSet)
2108 {
2109 writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField);
2110 }
2111 if (this.versionFieldSet)
2112 {
2113 writer.WriteAttributeString("Version", this.versionField);
2114 }
2115 if (this.conditionFieldSet)
2116 {
2117 writer.WriteAttributeString("Condition", this.conditionField);
2118 }
2119 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
2120 {
2121 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
2122 childElement.OutputXml(writer);
2123 }
2124 writer.WriteEndElement();
2125 }
2126
2127 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2128 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
2129 void ISetAttributes.SetAttribute(string name, string value)
2130 {
2131 if (String.IsNullOrEmpty(name))
2132 {
2133 throw new ArgumentNullException("name");
2134 }
2135 if (("AboutUrl" == name))
2136 {
2137 this.aboutUrlField = value;
2138 this.aboutUrlFieldSet = true;
2139 }
2140 if (("Copyright" == name))
2141 {
2142 this.copyrightField = value;
2143 this.copyrightFieldSet = true;
2144 }
2145 if (("Compressed" == name))
2146 {
2147 this.compressedField = Enums.ParseYesNoDefaultType(value);
2148 this.compressedFieldSet = true;
2149 }
2150 if (("DisableModify" == name))
2151 {
2152 this.disableModifyField = Enums.ParseYesNoButtonType(value);
2153 this.disableModifyFieldSet = true;
2154 }
2155 if (("DisableRemove" == name))
2156 {
2157 this.disableRemoveField = Enums.ParseYesNoType(value);
2158 this.disableRemoveFieldSet = true;
2159 }
2160 if (("DisableRepair" == name))
2161 {
2162 this.disableRepairField = Enums.ParseYesNoType(value);
2163 this.disableRepairFieldSet = true;
2164 }
2165 if (("HelpTelephone" == name))
2166 {
2167 this.helpTelephoneField = value;
2168 this.helpTelephoneFieldSet = true;
2169 }
2170 if (("HelpUrl" == name))
2171 {
2172 this.helpUrlField = value;
2173 this.helpUrlFieldSet = true;
2174 }
2175 if (("IconSourceFile" == name))
2176 {
2177 this.iconSourceFileField = value;
2178 this.iconSourceFileFieldSet = true;
2179 }
2180 if (("Manufacturer" == name))
2181 {
2182 this.manufacturerField = value;
2183 this.manufacturerFieldSet = true;
2184 }
2185 if (("Name" == name))
2186 {
2187 this.nameField = value;
2188 this.nameFieldSet = true;
2189 }
2190 if (("ParentName" == name))
2191 {
2192 this.parentNameField = value;
2193 this.parentNameFieldSet = true;
2194 }
2195 if (("SplashScreenSourceFile" == name))
2196 {
2197 this.splashScreenSourceFileField = value;
2198 this.splashScreenSourceFileFieldSet = true;
2199 }
2200 if (("Tag" == name))
2201 {
2202 this.tagField = value;
2203 this.tagFieldSet = true;
2204 }
2205 if (("UpdateUrl" == name))
2206 {
2207 this.updateUrlField = value;
2208 this.updateUrlFieldSet = true;
2209 }
2210 if (("UpgradeCode" == name))
2211 {
2212 this.upgradeCodeField = value;
2213 this.upgradeCodeFieldSet = true;
2214 }
2215 if (("Version" == name))
2216 {
2217 this.versionField = value;
2218 this.versionFieldSet = true;
2219 }
2220 if (("Condition" == name))
2221 {
2222 this.conditionField = value;
2223 this.conditionFieldSet = true;
2224 }
2225 }
2226 }
2227
2228 /// <summary>
2229 /// Provides information about an .exe so that the BA can request the engine to run it elevated from any secure location.
2230 /// </summary>
2231 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2232 public class ApprovedExeForElevation : ISchemaElement, ISetAttributes
2233 {
2234
2235 private string idField;
2236
2237 private bool idFieldSet;
2238
2239 private string keyField;
2240
2241 private bool keyFieldSet;
2242
2243 private string valueField;
2244
2245 private bool valueFieldSet;
2246
2247 private YesNoType win64Field;
2248
2249 private bool win64FieldSet;
2250
2251 private ISchemaElement parentElement;
2252
2253 /// <summary>
2254 /// The identifier of the ApprovedExeForElevation element.
2255 /// </summary>
2256 public string Id
2257 {
2258 get
2259 {
2260 return this.idField;
2261 }
2262 set
2263 {
2264 this.idFieldSet = true;
2265 this.idField = value;
2266 }
2267 }
2268
2269 /// <summary>
2270 /// The key path.
2271 /// For security purposes, the root key will be HKLM and Variables are not supported.
2272 /// </summary>
2273 public string Key
2274 {
2275 get
2276 {
2277 return this.keyField;
2278 }
2279 set
2280 {
2281 this.keyFieldSet = true;
2282 this.keyField = value;
2283 }
2284 }
2285
2286 /// <summary>
2287 /// The value name.
2288 /// For security purposes, Variables are not supported.
2289 /// </summary>
2290 public string Value
2291 {
2292 get
2293 {
2294 return this.valueField;
2295 }
2296 set
2297 {
2298 this.valueFieldSet = true;
2299 this.valueField = value;
2300 }
2301 }
2302
2303 /// <summary>
2304 /// Instructs the search to look in the 64-bit registry when the value is 'yes'.
2305 /// When the value is 'no', the search looks in the 32-bit registry.
2306 /// The default value is 'no'.
2307 /// </summary>
2308 public YesNoType Win64
2309 {
2310 get
2311 {
2312 return this.win64Field;
2313 }
2314 set
2315 {
2316 this.win64FieldSet = true;
2317 this.win64Field = value;
2318 }
2319 }
2320
2321 public virtual ISchemaElement ParentElement
2322 {
2323 get
2324 {
2325 return this.parentElement;
2326 }
2327 set
2328 {
2329 this.parentElement = value;
2330 }
2331 }
2332
2333 /// <summary>
2334 /// Processes this element and all child elements into an XmlWriter.
2335 /// </summary>
2336 public virtual void OutputXml(XmlWriter writer)
2337 {
2338 if ((null == writer))
2339 {
2340 throw new ArgumentNullException("writer");
2341 }
2342 writer.WriteStartElement("ApprovedExeForElevation", "http://wixtoolset.org/schemas/v4/wxs");
2343 if (this.idFieldSet)
2344 {
2345 writer.WriteAttributeString("Id", this.idField);
2346 }
2347 if (this.keyFieldSet)
2348 {
2349 writer.WriteAttributeString("Key", this.keyField);
2350 }
2351 if (this.valueFieldSet)
2352 {
2353 writer.WriteAttributeString("Value", this.valueField);
2354 }
2355 if (this.win64FieldSet)
2356 {
2357 if ((this.win64Field == YesNoType.no))
2358 {
2359 writer.WriteAttributeString("Win64", "no");
2360 }
2361 if ((this.win64Field == YesNoType.yes))
2362 {
2363 writer.WriteAttributeString("Win64", "yes");
2364 }
2365 }
2366 writer.WriteEndElement();
2367 }
2368
2369 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2370 void ISetAttributes.SetAttribute(string name, string value)
2371 {
2372 if (String.IsNullOrEmpty(name))
2373 {
2374 throw new ArgumentNullException("name");
2375 }
2376 if (("Id" == name))
2377 {
2378 this.idField = value;
2379 this.idFieldSet = true;
2380 }
2381 if (("Key" == name))
2382 {
2383 this.keyField = value;
2384 this.keyFieldSet = true;
2385 }
2386 if (("Value" == name))
2387 {
2388 this.valueField = value;
2389 this.valueFieldSet = true;
2390 }
2391 if (("Win64" == name))
2392 {
2393 this.win64Field = Enums.ParseYesNoType(value);
2394 this.win64FieldSet = true;
2395 }
2396 }
2397 }
2398
2399 /// <summary>
2400 /// Overrides the default log settings for a bundle.
2401 /// </summary>
2402 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2403 public class Log : ISchemaElement, ISetAttributes
2404 {
2405
2406 private YesNoType disableField;
2407
2408 private bool disableFieldSet;
2409
2410 private string pathVariableField;
2411
2412 private bool pathVariableFieldSet;
2413
2414 private string prefixField;
2415
2416 private bool prefixFieldSet;
2417
2418 private string extensionField;
2419
2420 private bool extensionFieldSet;
2421
2422 private ISchemaElement parentElement;
2423
2424 /// <summary>
2425 /// Disables the default logging in the Bundle. The end user can still generate a
2426 /// log file by specifying the "-l" command-line argument when installing the
2427 /// Bundle.
2428 /// </summary>
2429 public YesNoType Disable
2430 {
2431 get
2432 {
2433 return this.disableField;
2434 }
2435 set
2436 {
2437 this.disableFieldSet = true;
2438 this.disableField = value;
2439 }
2440 }
2441
2442 /// <summary>
2443 /// Name of a Variable that will hold the path to the log file. An empty value
2444 /// will cause the variable to not be set. The default is "WixBundleLog".
2445 /// </summary>
2446 public string PathVariable
2447 {
2448 get
2449 {
2450 return this.pathVariableField;
2451 }
2452 set
2453 {
2454 this.pathVariableFieldSet = true;
2455 this.pathVariableField = value;
2456 }
2457 }
2458
2459 /// <summary>
2460 /// File name and optionally a relative path to use as the prefix for the log file. The
2461 /// default is to use the Bundle/@Name or, if Bundle/@Name is not specified, the value
2462 /// "Setup".
2463 /// </summary>
2464 public string Prefix
2465 {
2466 get
2467 {
2468 return this.prefixField;
2469 }
2470 set
2471 {
2472 this.prefixFieldSet = true;
2473 this.prefixField = value;
2474 }
2475 }
2476
2477 /// <summary>
2478 /// The extension to use for the log. The default is ".log".
2479 /// </summary>
2480 public string Extension
2481 {
2482 get
2483 {
2484 return this.extensionField;
2485 }
2486 set
2487 {
2488 this.extensionFieldSet = true;
2489 this.extensionField = value;
2490 }
2491 }
2492
2493 public virtual ISchemaElement ParentElement
2494 {
2495 get
2496 {
2497 return this.parentElement;
2498 }
2499 set
2500 {
2501 this.parentElement = value;
2502 }
2503 }
2504
2505 /// <summary>
2506 /// Processes this element and all child elements into an XmlWriter.
2507 /// </summary>
2508 public virtual void OutputXml(XmlWriter writer)
2509 {
2510 if ((null == writer))
2511 {
2512 throw new ArgumentNullException("writer");
2513 }
2514 writer.WriteStartElement("Log", "http://wixtoolset.org/schemas/v4/wxs");
2515 if (this.disableFieldSet)
2516 {
2517 if ((this.disableField == YesNoType.no))
2518 {
2519 writer.WriteAttributeString("Disable", "no");
2520 }
2521 if ((this.disableField == YesNoType.yes))
2522 {
2523 writer.WriteAttributeString("Disable", "yes");
2524 }
2525 }
2526 if (this.pathVariableFieldSet)
2527 {
2528 writer.WriteAttributeString("PathVariable", this.pathVariableField);
2529 }
2530 if (this.prefixFieldSet)
2531 {
2532 writer.WriteAttributeString("Prefix", this.prefixField);
2533 }
2534 if (this.extensionFieldSet)
2535 {
2536 writer.WriteAttributeString("Extension", this.extensionField);
2537 }
2538 writer.WriteEndElement();
2539 }
2540
2541 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2542 void ISetAttributes.SetAttribute(string name, string value)
2543 {
2544 if (String.IsNullOrEmpty(name))
2545 {
2546 throw new ArgumentNullException("name");
2547 }
2548 if (("Disable" == name))
2549 {
2550 this.disableField = Enums.ParseYesNoType(value);
2551 this.disableFieldSet = true;
2552 }
2553 if (("PathVariable" == name))
2554 {
2555 this.pathVariableField = value;
2556 this.pathVariableFieldSet = true;
2557 }
2558 if (("Prefix" == name))
2559 {
2560 this.prefixField = value;
2561 this.prefixFieldSet = true;
2562 }
2563 if (("Extension" == name))
2564 {
2565 this.extensionField = value;
2566 this.extensionFieldSet = true;
2567 }
2568 }
2569 }
2570
2571 /// <summary>
2572 /// Specify one or more catalog files that will be used to verify the contents of the bundle.
2573 /// </summary>
2574 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2575 public class Catalog : ISchemaElement, ISetAttributes
2576 {
2577
2578 private string idField;
2579
2580 private bool idFieldSet;
2581
2582 private string sourceFileField;
2583
2584 private bool sourceFileFieldSet;
2585
2586 private ISchemaElement parentElement;
2587
2588 /// <summary>
2589 /// The identifier of the catalog element.
2590 /// </summary>
2591 public string Id
2592 {
2593 get
2594 {
2595 return this.idField;
2596 }
2597 set
2598 {
2599 this.idFieldSet = true;
2600 this.idField = value;
2601 }
2602 }
2603
2604 /// <summary>
2605 /// The catalog file
2606 /// </summary>
2607 public string SourceFile
2608 {
2609 get
2610 {
2611 return this.sourceFileField;
2612 }
2613 set
2614 {
2615 this.sourceFileFieldSet = true;
2616 this.sourceFileField = value;
2617 }
2618 }
2619
2620 public virtual ISchemaElement ParentElement
2621 {
2622 get
2623 {
2624 return this.parentElement;
2625 }
2626 set
2627 {
2628 this.parentElement = value;
2629 }
2630 }
2631
2632 /// <summary>
2633 /// Processes this element and all child elements into an XmlWriter.
2634 /// </summary>
2635 public virtual void OutputXml(XmlWriter writer)
2636 {
2637 if ((null == writer))
2638 {
2639 throw new ArgumentNullException("writer");
2640 }
2641 writer.WriteStartElement("Catalog", "http://wixtoolset.org/schemas/v4/wxs");
2642 if (this.idFieldSet)
2643 {
2644 writer.WriteAttributeString("Id", this.idField);
2645 }
2646 if (this.sourceFileFieldSet)
2647 {
2648 writer.WriteAttributeString("SourceFile", this.sourceFileField);
2649 }
2650 writer.WriteEndElement();
2651 }
2652
2653 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2654 void ISetAttributes.SetAttribute(string name, string value)
2655 {
2656 if (String.IsNullOrEmpty(name))
2657 {
2658 throw new ArgumentNullException("name");
2659 }
2660 if (("Id" == name))
2661 {
2662 this.idField = value;
2663 this.idFieldSet = true;
2664 }
2665 if (("SourceFile" == name))
2666 {
2667 this.sourceFileField = value;
2668 this.sourceFileFieldSet = true;
2669 }
2670 }
2671 }
2672
2673 /// <summary>
2674 /// Contains all the relevant information about the setup UI.
2675 /// </summary>
2676 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2677 public class BootstrapperApplication : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
2678 {
2679
2680 private ElementCollection children;
2681
2682 private string idField;
2683
2684 private bool idFieldSet;
2685
2686 private string sourceFileField;
2687
2688 private bool sourceFileFieldSet;
2689
2690 private string nameField;
2691
2692 private bool nameFieldSet;
2693
2694 private ISchemaElement parentElement;
2695
2696 public BootstrapperApplication()
2697 {
2698 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
2699 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
2700 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
2701 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
2702 this.children = childCollection0;
2703 }
2704
2705 public virtual IEnumerable Children
2706 {
2707 get
2708 {
2709 return this.children;
2710 }
2711 }
2712
2713 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
2714 public virtual IEnumerable this[System.Type childType]
2715 {
2716 get
2717 {
2718 return this.children.Filter(childType);
2719 }
2720 }
2721
2722 /// <summary>
2723 /// The identifier of the BootstrapperApplication element. Only required if you want to reference this element using a BootstrapperApplicationRef element.
2724 /// </summary>
2725 public string Id
2726 {
2727 get
2728 {
2729 return this.idField;
2730 }
2731 set
2732 {
2733 this.idFieldSet = true;
2734 this.idField = value;
2735 }
2736 }
2737
2738 /// <summary>
2739 /// The DLL with the bootstrapper application entry function.
2740 /// </summary>
2741 public string SourceFile
2742 {
2743 get
2744 {
2745 return this.sourceFileField;
2746 }
2747 set
2748 {
2749 this.sourceFileFieldSet = true;
2750 this.sourceFileField = value;
2751 }
2752 }
2753
2754 /// <summary>
2755 /// 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.
2756 /// </summary>
2757 public string Name
2758 {
2759 get
2760 {
2761 return this.nameField;
2762 }
2763 set
2764 {
2765 this.nameFieldSet = true;
2766 this.nameField = value;
2767 }
2768 }
2769
2770 public virtual ISchemaElement ParentElement
2771 {
2772 get
2773 {
2774 return this.parentElement;
2775 }
2776 set
2777 {
2778 this.parentElement = value;
2779 }
2780 }
2781
2782 public virtual void AddChild(ISchemaElement child)
2783 {
2784 if ((null == child))
2785 {
2786 throw new ArgumentNullException("child");
2787 }
2788 this.children.AddElement(child);
2789 child.ParentElement = this;
2790 }
2791
2792 public virtual void RemoveChild(ISchemaElement child)
2793 {
2794 if ((null == child))
2795 {
2796 throw new ArgumentNullException("child");
2797 }
2798 this.children.RemoveElement(child);
2799 child.ParentElement = null;
2800 }
2801
2802 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2803 ISchemaElement ICreateChildren.CreateChild(string childName)
2804 {
2805 if (String.IsNullOrEmpty(childName))
2806 {
2807 throw new ArgumentNullException("childName");
2808 }
2809 ISchemaElement childValue = null;
2810 if (("Payload" == childName))
2811 {
2812 childValue = new Payload();
2813 }
2814 if (("PayloadGroupRef" == childName))
2815 {
2816 childValue = new PayloadGroupRef();
2817 }
2818 if ((null == childValue))
2819 {
2820 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
2821 }
2822 return childValue;
2823 }
2824
2825 /// <summary>
2826 /// Processes this element and all child elements into an XmlWriter.
2827 /// </summary>
2828 public virtual void OutputXml(XmlWriter writer)
2829 {
2830 if ((null == writer))
2831 {
2832 throw new ArgumentNullException("writer");
2833 }
2834 writer.WriteStartElement("BootstrapperApplication", "http://wixtoolset.org/schemas/v4/wxs");
2835 if (this.idFieldSet)
2836 {
2837 writer.WriteAttributeString("Id", this.idField);
2838 }
2839 if (this.sourceFileFieldSet)
2840 {
2841 writer.WriteAttributeString("SourceFile", this.sourceFileField);
2842 }
2843 if (this.nameFieldSet)
2844 {
2845 writer.WriteAttributeString("Name", this.nameField);
2846 }
2847 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
2848 {
2849 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
2850 childElement.OutputXml(writer);
2851 }
2852 writer.WriteEndElement();
2853 }
2854
2855 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2856 void ISetAttributes.SetAttribute(string name, string value)
2857 {
2858 if (String.IsNullOrEmpty(name))
2859 {
2860 throw new ArgumentNullException("name");
2861 }
2862 if (("Id" == name))
2863 {
2864 this.idField = value;
2865 this.idFieldSet = true;
2866 }
2867 if (("SourceFile" == name))
2868 {
2869 this.sourceFileField = value;
2870 this.sourceFileFieldSet = true;
2871 }
2872 if (("Name" == name))
2873 {
2874 this.nameField = value;
2875 this.nameFieldSet = true;
2876 }
2877 }
2878 }
2879
2880 /// <summary>
2881 /// Used to reference a BootstrapperApplication element and optionally add additional payloads to the bootstrapper application.
2882 /// </summary>
2883 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
2884 public class BootstrapperApplicationRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
2885 {
2886
2887 private ElementCollection children;
2888
2889 private string idField;
2890
2891 private bool idFieldSet;
2892
2893 private ISchemaElement parentElement;
2894
2895 public BootstrapperApplicationRef()
2896 {
2897 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
2898 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
2899 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
2900 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
2901 this.children = childCollection0;
2902 }
2903
2904 public virtual IEnumerable Children
2905 {
2906 get
2907 {
2908 return this.children;
2909 }
2910 }
2911
2912 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
2913 public virtual IEnumerable this[System.Type childType]
2914 {
2915 get
2916 {
2917 return this.children.Filter(childType);
2918 }
2919 }
2920
2921 /// <summary>
2922 /// The identifier of the BootstrapperApplication element to reference.
2923 /// </summary>
2924 public string Id
2925 {
2926 get
2927 {
2928 return this.idField;
2929 }
2930 set
2931 {
2932 this.idFieldSet = true;
2933 this.idField = value;
2934 }
2935 }
2936
2937 public virtual ISchemaElement ParentElement
2938 {
2939 get
2940 {
2941 return this.parentElement;
2942 }
2943 set
2944 {
2945 this.parentElement = value;
2946 }
2947 }
2948
2949 public virtual void AddChild(ISchemaElement child)
2950 {
2951 if ((null == child))
2952 {
2953 throw new ArgumentNullException("child");
2954 }
2955 this.children.AddElement(child);
2956 child.ParentElement = this;
2957 }
2958
2959 public virtual void RemoveChild(ISchemaElement child)
2960 {
2961 if ((null == child))
2962 {
2963 throw new ArgumentNullException("child");
2964 }
2965 this.children.RemoveElement(child);
2966 child.ParentElement = null;
2967 }
2968
2969 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
2970 ISchemaElement ICreateChildren.CreateChild(string childName)
2971 {
2972 if (String.IsNullOrEmpty(childName))
2973 {
2974 throw new ArgumentNullException("childName");
2975 }
2976 ISchemaElement childValue = null;
2977 if (("Payload" == childName))
2978 {
2979 childValue = new Payload();
2980 }
2981 if (("PayloadGroupRef" == childName))
2982 {
2983 childValue = new PayloadGroupRef();
2984 }
2985 if ((null == childValue))
2986 {
2987 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
2988 }
2989 return childValue;
2990 }
2991
2992 /// <summary>
2993 /// Processes this element and all child elements into an XmlWriter.
2994 /// </summary>
2995 public virtual void OutputXml(XmlWriter writer)
2996 {
2997 if ((null == writer))
2998 {
2999 throw new ArgumentNullException("writer");
3000 }
3001 writer.WriteStartElement("BootstrapperApplicationRef", "http://wixtoolset.org/schemas/v4/wxs");
3002 if (this.idFieldSet)
3003 {
3004 writer.WriteAttributeString("Id", this.idField);
3005 }
3006 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
3007 {
3008 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
3009 childElement.OutputXml(writer);
3010 }
3011 writer.WriteEndElement();
3012 }
3013
3014 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3015 void ISetAttributes.SetAttribute(string name, string value)
3016 {
3017 if (String.IsNullOrEmpty(name))
3018 {
3019 throw new ArgumentNullException("name");
3020 }
3021 if (("Id" == name))
3022 {
3023 this.idField = value;
3024 this.idFieldSet = true;
3025 }
3026 }
3027 }
3028
3029 /// <summary>
3030 /// This element has been deprecated. Use the BootstrapperApplication element instead.
3031 /// </summary>
3032 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3033 public class UX : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
3034 {
3035
3036 private ElementCollection children;
3037
3038 private string sourceFileField;
3039
3040 private bool sourceFileFieldSet;
3041
3042 private string nameField;
3043
3044 private bool nameFieldSet;
3045
3046 private string splashScreenSourceFileField;
3047
3048 private bool splashScreenSourceFileFieldSet;
3049
3050 private ISchemaElement parentElement;
3051
3052 public UX()
3053 {
3054 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
3055 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
3056 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
3057 this.children = childCollection0;
3058 }
3059
3060 public virtual IEnumerable Children
3061 {
3062 get
3063 {
3064 return this.children;
3065 }
3066 }
3067
3068 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
3069 public virtual IEnumerable this[System.Type childType]
3070 {
3071 get
3072 {
3073 return this.children.Filter(childType);
3074 }
3075 }
3076
3077 /// <summary>
3078 /// See the BootstrapperApplication instead.
3079 /// </summary>
3080 public string SourceFile
3081 {
3082 get
3083 {
3084 return this.sourceFileField;
3085 }
3086 set
3087 {
3088 this.sourceFileFieldSet = true;
3089 this.sourceFileField = value;
3090 }
3091 }
3092
3093 /// <summary>
3094 /// See the BootstrapperApplication instead.
3095 /// </summary>
3096 public string Name
3097 {
3098 get
3099 {
3100 return this.nameField;
3101 }
3102 set
3103 {
3104 this.nameFieldSet = true;
3105 this.nameField = value;
3106 }
3107 }
3108
3109 /// <summary>
3110 /// See the BootstrapperApplication instead.
3111 /// </summary>
3112 public string SplashScreenSourceFile
3113 {
3114 get
3115 {
3116 return this.splashScreenSourceFileField;
3117 }
3118 set
3119 {
3120 this.splashScreenSourceFileFieldSet = true;
3121 this.splashScreenSourceFileField = value;
3122 }
3123 }
3124
3125 public virtual ISchemaElement ParentElement
3126 {
3127 get
3128 {
3129 return this.parentElement;
3130 }
3131 set
3132 {
3133 this.parentElement = value;
3134 }
3135 }
3136
3137 public virtual void AddChild(ISchemaElement child)
3138 {
3139 if ((null == child))
3140 {
3141 throw new ArgumentNullException("child");
3142 }
3143 this.children.AddElement(child);
3144 child.ParentElement = this;
3145 }
3146
3147 public virtual void RemoveChild(ISchemaElement child)
3148 {
3149 if ((null == child))
3150 {
3151 throw new ArgumentNullException("child");
3152 }
3153 this.children.RemoveElement(child);
3154 child.ParentElement = null;
3155 }
3156
3157 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3158 ISchemaElement ICreateChildren.CreateChild(string childName)
3159 {
3160 if (String.IsNullOrEmpty(childName))
3161 {
3162 throw new ArgumentNullException("childName");
3163 }
3164 ISchemaElement childValue = null;
3165 if (("Payload" == childName))
3166 {
3167 childValue = new Payload();
3168 }
3169 if (("PayloadGroupRef" == childName))
3170 {
3171 childValue = new PayloadGroupRef();
3172 }
3173 if ((null == childValue))
3174 {
3175 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
3176 }
3177 return childValue;
3178 }
3179
3180 /// <summary>
3181 /// Processes this element and all child elements into an XmlWriter.
3182 /// </summary>
3183 public virtual void OutputXml(XmlWriter writer)
3184 {
3185 if ((null == writer))
3186 {
3187 throw new ArgumentNullException("writer");
3188 }
3189 writer.WriteStartElement("UX", "http://wixtoolset.org/schemas/v4/wxs");
3190 if (this.sourceFileFieldSet)
3191 {
3192 writer.WriteAttributeString("SourceFile", this.sourceFileField);
3193 }
3194 if (this.nameFieldSet)
3195 {
3196 writer.WriteAttributeString("Name", this.nameField);
3197 }
3198 if (this.splashScreenSourceFileFieldSet)
3199 {
3200 writer.WriteAttributeString("SplashScreenSourceFile", this.splashScreenSourceFileField);
3201 }
3202 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
3203 {
3204 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
3205 childElement.OutputXml(writer);
3206 }
3207 writer.WriteEndElement();
3208 }
3209
3210 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3211 void ISetAttributes.SetAttribute(string name, string value)
3212 {
3213 if (String.IsNullOrEmpty(name))
3214 {
3215 throw new ArgumentNullException("name");
3216 }
3217 if (("SourceFile" == name))
3218 {
3219 this.sourceFileField = value;
3220 this.sourceFileFieldSet = true;
3221 }
3222 if (("Name" == name))
3223 {
3224 this.nameField = value;
3225 this.nameFieldSet = true;
3226 }
3227 if (("SplashScreenSourceFile" == name))
3228 {
3229 this.splashScreenSourceFileField = value;
3230 this.splashScreenSourceFileFieldSet = true;
3231 }
3232 }
3233 }
3234
3235 /// <summary>
3236 /// Writes additional information to the Windows registry that can be used to detect the bundle.
3237 /// This registration is intended primarily for update to an existing product.
3238 /// </summary>
3239 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3240 public class OptionalUpdateRegistration : ISchemaElement, ISetAttributes
3241 {
3242
3243 private string manufacturerField;
3244
3245 private bool manufacturerFieldSet;
3246
3247 private string departmentField;
3248
3249 private bool departmentFieldSet;
3250
3251 private string productFamilyField;
3252
3253 private bool productFamilyFieldSet;
3254
3255 private string nameField;
3256
3257 private bool nameFieldSet;
3258
3259 private string classificationField;
3260
3261 private bool classificationFieldSet;
3262
3263 private ISchemaElement parentElement;
3264
3265 /// <summary>
3266 /// The name of the manufacturer. The default is the Bundle/@Manufacturer attribute,
3267 /// but may also be a short form, ex: Acme instead of Acme Corporation.
3268 /// An error is generated at build time if neither attribute is specified.
3269 /// </summary>
3270 public string Manufacturer
3271 {
3272 get
3273 {
3274 return this.manufacturerField;
3275 }
3276 set
3277 {
3278 this.manufacturerFieldSet = true;
3279 this.manufacturerField = value;
3280 }
3281 }
3282
3283 /// <summary>
3284 /// The name of the department or division publishing the update bundle.
3285 /// The PublishingGroup registry value is not written if this attribute is not specified.
3286 /// </summary>
3287 public string Department
3288 {
3289 get
3290 {
3291 return this.departmentField;
3292 }
3293 set
3294 {
3295 this.departmentFieldSet = true;
3296 this.departmentField = value;
3297 }
3298 }
3299
3300 /// <summary>
3301 /// The name of the family of products being updated. The default is the Bundle/@ParentName attribute.
3302 /// The corresponding registry key is not created if neither attribute is specified.
3303 /// </summary>
3304 public string ProductFamily
3305 {
3306 get
3307 {
3308 return this.productFamilyField;
3309 }
3310 set
3311 {
3312 this.productFamilyFieldSet = true;
3313 this.productFamilyField = value;
3314 }
3315 }
3316
3317 /// <summary>
3318 /// The name of the bundle. The default is the Bundle/@Name attribute,
3319 /// but may also be a short form, ex: KB12345 instead of Update to Product (KB12345).
3320 /// An error is generated at build time if neither attribute is specified.
3321 /// </summary>
3322 public string Name
3323 {
3324 get
3325 {
3326 return this.nameField;
3327 }
3328 set
3329 {
3330 this.nameFieldSet = true;
3331 this.nameField = value;
3332 }
3333 }
3334
3335 /// <summary>
3336 /// The release type of the update bundle, such as Update, Security Update, Service Pack, etc.
3337 /// The default value is Update.
3338 /// </summary>
3339 public string Classification
3340 {
3341 get
3342 {
3343 return this.classificationField;
3344 }
3345 set
3346 {
3347 this.classificationFieldSet = true;
3348 this.classificationField = value;
3349 }
3350 }
3351
3352 public virtual ISchemaElement ParentElement
3353 {
3354 get
3355 {
3356 return this.parentElement;
3357 }
3358 set
3359 {
3360 this.parentElement = value;
3361 }
3362 }
3363
3364 /// <summary>
3365 /// Processes this element and all child elements into an XmlWriter.
3366 /// </summary>
3367 public virtual void OutputXml(XmlWriter writer)
3368 {
3369 if ((null == writer))
3370 {
3371 throw new ArgumentNullException("writer");
3372 }
3373 writer.WriteStartElement("OptionalUpdateRegistration", "http://wixtoolset.org/schemas/v4/wxs");
3374 if (this.manufacturerFieldSet)
3375 {
3376 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
3377 }
3378 if (this.departmentFieldSet)
3379 {
3380 writer.WriteAttributeString("Department", this.departmentField);
3381 }
3382 if (this.productFamilyFieldSet)
3383 {
3384 writer.WriteAttributeString("ProductFamily", this.productFamilyField);
3385 }
3386 if (this.nameFieldSet)
3387 {
3388 writer.WriteAttributeString("Name", this.nameField);
3389 }
3390 if (this.classificationFieldSet)
3391 {
3392 writer.WriteAttributeString("Classification", this.classificationField);
3393 }
3394 writer.WriteEndElement();
3395 }
3396
3397 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3398 void ISetAttributes.SetAttribute(string name, string value)
3399 {
3400 if (String.IsNullOrEmpty(name))
3401 {
3402 throw new ArgumentNullException("name");
3403 }
3404 if (("Manufacturer" == name))
3405 {
3406 this.manufacturerField = value;
3407 this.manufacturerFieldSet = true;
3408 }
3409 if (("Department" == name))
3410 {
3411 this.departmentField = value;
3412 this.departmentFieldSet = true;
3413 }
3414 if (("ProductFamily" == name))
3415 {
3416 this.productFamilyField = value;
3417 this.productFamilyFieldSet = true;
3418 }
3419 if (("Name" == name))
3420 {
3421 this.nameField = value;
3422 this.nameFieldSet = true;
3423 }
3424 if (("Classification" == name))
3425 {
3426 this.classificationField = value;
3427 this.classificationFieldSet = true;
3428 }
3429 }
3430 }
3431
3432 /// <summary>
3433 /// Contains the chain of packages to install.
3434 /// </summary>
3435 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3436 public class Chain : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
3437 {
3438
3439 private ElementCollection children;
3440
3441 private YesNoType disableRollbackField;
3442
3443 private bool disableRollbackFieldSet;
3444
3445 private YesNoType disableSystemRestoreField;
3446
3447 private bool disableSystemRestoreFieldSet;
3448
3449 private YesNoType parallelCacheField;
3450
3451 private bool parallelCacheFieldSet;
3452
3453 private ISchemaElement parentElement;
3454
3455 public Chain()
3456 {
3457 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
3458 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPackage)));
3459 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MspPackage)));
3460 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackage)));
3461 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackage)));
3462 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RollbackBoundary)));
3463 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef)));
3464 this.children = childCollection0;
3465 }
3466
3467 public virtual IEnumerable Children
3468 {
3469 get
3470 {
3471 return this.children;
3472 }
3473 }
3474
3475 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
3476 public virtual IEnumerable this[System.Type childType]
3477 {
3478 get
3479 {
3480 return this.children.Filter(childType);
3481 }
3482 }
3483
3484 /// <summary>
3485 /// Specifies whether the bundle will attempt to rollback packages
3486 /// executed in the chain. If "yes" is specified then when a vital
3487 /// package fails to install only that package will rollback and the
3488 /// chain will stop with the error. The default is "no" which
3489 /// indicates all packages executed during the chain will be
3490 /// rolledback to their previous state when a vital package fails.
3491 /// </summary>
3492 public YesNoType DisableRollback
3493 {
3494 get
3495 {
3496 return this.disableRollbackField;
3497 }
3498 set
3499 {
3500 this.disableRollbackFieldSet = true;
3501 this.disableRollbackField = value;
3502 }
3503 }
3504
3505 /// <summary>
3506 /// Specifies whether the bundle will attempt to create a system
3507 /// restore point when executing the chain. If "yes" is specified then
3508 /// a system restore point will not be created. The default is "no" which
3509 /// indicates a system restore point will be created when the bundle is
3510 /// installed, uninstalled, repaired, modified, etc. If the system restore
3511 /// point cannot be created, the bundle will log the issue and continue.
3512 /// </summary>
3513 public YesNoType DisableSystemRestore
3514 {
3515 get
3516 {
3517 return this.disableSystemRestoreField;
3518 }
3519 set
3520 {
3521 this.disableSystemRestoreFieldSet = true;
3522 this.disableSystemRestoreField = value;
3523 }
3524 }
3525
3526 /// <summary>
3527 /// Specifies whether the bundle will start installing packages
3528 /// while other packages are still being cached. If "yes",
3529 /// packages will start executing when a rollback boundary is
3530 /// encountered. The default is "no" which dictates all packages
3531 /// must be cached before any packages will start to be installed.
3532 /// </summary>
3533 public YesNoType ParallelCache
3534 {
3535 get
3536 {
3537 return this.parallelCacheField;
3538 }
3539 set
3540 {
3541 this.parallelCacheFieldSet = true;
3542 this.parallelCacheField = value;
3543 }
3544 }
3545
3546 public virtual ISchemaElement ParentElement
3547 {
3548 get
3549 {
3550 return this.parentElement;
3551 }
3552 set
3553 {
3554 this.parentElement = value;
3555 }
3556 }
3557
3558 public virtual void AddChild(ISchemaElement child)
3559 {
3560 if ((null == child))
3561 {
3562 throw new ArgumentNullException("child");
3563 }
3564 this.children.AddElement(child);
3565 child.ParentElement = this;
3566 }
3567
3568 public virtual void RemoveChild(ISchemaElement child)
3569 {
3570 if ((null == child))
3571 {
3572 throw new ArgumentNullException("child");
3573 }
3574 this.children.RemoveElement(child);
3575 child.ParentElement = null;
3576 }
3577
3578 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3579 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
3580 ISchemaElement ICreateChildren.CreateChild(string childName)
3581 {
3582 if (String.IsNullOrEmpty(childName))
3583 {
3584 throw new ArgumentNullException("childName");
3585 }
3586 ISchemaElement childValue = null;
3587 if (("MsiPackage" == childName))
3588 {
3589 childValue = new MsiPackage();
3590 }
3591 if (("MspPackage" == childName))
3592 {
3593 childValue = new MspPackage();
3594 }
3595 if (("MsuPackage" == childName))
3596 {
3597 childValue = new MsuPackage();
3598 }
3599 if (("ExePackage" == childName))
3600 {
3601 childValue = new ExePackage();
3602 }
3603 if (("RollbackBoundary" == childName))
3604 {
3605 childValue = new RollbackBoundary();
3606 }
3607 if (("PackageGroupRef" == childName))
3608 {
3609 childValue = new PackageGroupRef();
3610 }
3611 if ((null == childValue))
3612 {
3613 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
3614 }
3615 return childValue;
3616 }
3617
3618 /// <summary>
3619 /// Processes this element and all child elements into an XmlWriter.
3620 /// </summary>
3621 public virtual void OutputXml(XmlWriter writer)
3622 {
3623 if ((null == writer))
3624 {
3625 throw new ArgumentNullException("writer");
3626 }
3627 writer.WriteStartElement("Chain", "http://wixtoolset.org/schemas/v4/wxs");
3628 if (this.disableRollbackFieldSet)
3629 {
3630 if ((this.disableRollbackField == YesNoType.no))
3631 {
3632 writer.WriteAttributeString("DisableRollback", "no");
3633 }
3634 if ((this.disableRollbackField == YesNoType.yes))
3635 {
3636 writer.WriteAttributeString("DisableRollback", "yes");
3637 }
3638 }
3639 if (this.disableSystemRestoreFieldSet)
3640 {
3641 if ((this.disableSystemRestoreField == YesNoType.no))
3642 {
3643 writer.WriteAttributeString("DisableSystemRestore", "no");
3644 }
3645 if ((this.disableSystemRestoreField == YesNoType.yes))
3646 {
3647 writer.WriteAttributeString("DisableSystemRestore", "yes");
3648 }
3649 }
3650 if (this.parallelCacheFieldSet)
3651 {
3652 if ((this.parallelCacheField == YesNoType.no))
3653 {
3654 writer.WriteAttributeString("ParallelCache", "no");
3655 }
3656 if ((this.parallelCacheField == YesNoType.yes))
3657 {
3658 writer.WriteAttributeString("ParallelCache", "yes");
3659 }
3660 }
3661 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
3662 {
3663 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
3664 childElement.OutputXml(writer);
3665 }
3666 writer.WriteEndElement();
3667 }
3668
3669 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
3670 void ISetAttributes.SetAttribute(string name, string value)
3671 {
3672 if (String.IsNullOrEmpty(name))
3673 {
3674 throw new ArgumentNullException("name");
3675 }
3676 if (("DisableRollback" == name))
3677 {
3678 this.disableRollbackField = Enums.ParseYesNoType(value);
3679 this.disableRollbackFieldSet = true;
3680 }
3681 if (("DisableSystemRestore" == name))
3682 {
3683 this.disableSystemRestoreField = Enums.ParseYesNoType(value);
3684 this.disableSystemRestoreFieldSet = true;
3685 }
3686 if (("ParallelCache" == name))
3687 {
3688 this.parallelCacheField = Enums.ParseYesNoType(value);
3689 this.parallelCacheFieldSet = true;
3690 }
3691 }
3692 }
3693
3694 /// <summary>
3695 /// Describes a single msi package to install.
3696 /// </summary>
3697 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
3698 public class MsiPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
3699 {
3700
3701 private ElementCollection children;
3702
3703 private string sourceFileField;
3704
3705 private bool sourceFileFieldSet;
3706
3707 private string nameField;
3708
3709 private bool nameFieldSet;
3710
3711 private string downloadUrlField;
3712
3713 private bool downloadUrlFieldSet;
3714
3715 private string idField;
3716
3717 private bool idFieldSet;
3718
3719 private string afterField;
3720
3721 private bool afterFieldSet;
3722
3723 private string installSizeField;
3724
3725 private bool installSizeFieldSet;
3726
3727 private string installConditionField;
3728
3729 private bool installConditionFieldSet;
3730
3731 private BundleCacheType cacheField;
3732
3733 private bool cacheFieldSet;
3734
3735 private string cacheIdField;
3736
3737 private bool cacheIdFieldSet;
3738
3739 private string displayNameField;
3740
3741 private bool displayNameFieldSet;
3742
3743 private string descriptionField;
3744
3745 private bool descriptionFieldSet;
3746
3747 private string logPathVariableField;
3748
3749 private bool logPathVariableFieldSet;
3750
3751 private string rollbackLogPathVariableField;
3752
3753 private bool rollbackLogPathVariableFieldSet;
3754
3755 private YesNoType permanentField;
3756
3757 private bool permanentFieldSet;
3758
3759 private YesNoType vitalField;
3760
3761 private bool vitalFieldSet;
3762
3763 private YesNoDefaultType compressedField;
3764
3765 private bool compressedFieldSet;
3766
3767 private YesNoType enableSignatureVerificationField;
3768
3769 private bool enableSignatureVerificationFieldSet;
3770
3771 private YesNoType enableFeatureSelectionField;
3772
3773 private bool enableFeatureSelectionFieldSet;
3774
3775 private YesNoType forcePerMachineField;
3776
3777 private bool forcePerMachineFieldSet;
3778
3779 private YesNoType suppressLooseFilePayloadGenerationField;
3780
3781 private bool suppressLooseFilePayloadGenerationFieldSet;
3782
3783 private YesNoType visibleField;
3784
3785 private bool visibleFieldSet;
3786
3787 private ISchemaElement parentElement;
3788
3789 public MsiPackage()
3790 {
3791 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
3792 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiProperty)));
3793 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SlipstreamMsp)));
3794 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
3795 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
3796 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
3797 this.children = childCollection0;
3798 }
3799
3800 public virtual IEnumerable Children
3801 {
3802 get
3803 {
3804 return this.children;
3805 }
3806 }
3807
3808 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
3809 public virtual IEnumerable this[System.Type childType]
3810 {
3811 get
3812 {
3813 return this.children.Filter(childType);
3814 }
3815 }
3816
3817 /// <summary>
3818 /// Location of the package to add to the bundle. The default value is the Name attribute, if provided.
3819 /// At a minimum, the SourceFile or Name attribute must be specified.
3820 /// </summary>
3821 public string SourceFile
3822 {
3823 get
3824 {
3825 return this.sourceFileField;
3826 }
3827 set
3828 {
3829 this.sourceFileFieldSet = true;
3830 this.sourceFileField = value;
3831 }
3832 }
3833
3834 /// <summary>
3835 /// The destination path and file name for this chain payload. Use this attribute to rename the
3836 /// chain entry point or extract it into a subfolder. The default value is the file name from the
3837 /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified.
3838 /// The use of '..' directories is not allowed.
3839 /// </summary>
3840 public string Name
3841 {
3842 get
3843 {
3844 return this.nameField;
3845 }
3846 set
3847 {
3848 this.nameFieldSet = true;
3849 this.nameField = value;
3850 }
3851 }
3852
3853 public string DownloadUrl
3854 {
3855 get
3856 {
3857 return this.downloadUrlField;
3858 }
3859 set
3860 {
3861 this.downloadUrlFieldSet = true;
3862 this.downloadUrlField = value;
3863 }
3864 }
3865
3866 /// <summary>
3867 /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute
3868 /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores).
3869 /// </summary>
3870 public string Id
3871 {
3872 get
3873 {
3874 return this.idField;
3875 }
3876 set
3877 {
3878 this.idFieldSet = true;
3879 this.idField = value;
3880 }
3881 }
3882
3883 /// <summary>
3884 /// The identifier of another package that this one should be installed after. By default the After
3885 /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this
3886 /// attribute is specified ensure that a cycle is not created explicitly or implicitly.
3887 /// </summary>
3888 public string After
3889 {
3890 get
3891 {
3892 return this.afterField;
3893 }
3894 set
3895 {
3896 this.afterFieldSet = true;
3897 this.afterField = value;
3898 }
3899 }
3900
3901 /// <summary>
3902 /// The size this package will take on disk in bytes after it is installed. By default, the binder will
3903 /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs)
3904 /// and use the total for the install size of the package.
3905 /// </summary>
3906 public string InstallSize
3907 {
3908 get
3909 {
3910 return this.installSizeField;
3911 }
3912 set
3913 {
3914 this.installSizeFieldSet = true;
3915 this.installSizeField = value;
3916 }
3917 }
3918
3919 /// <summary>
3920 /// 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.
3921 /// </summary>
3922 public string InstallCondition
3923 {
3924 get
3925 {
3926 return this.installConditionField;
3927 }
3928 set
3929 {
3930 this.installConditionFieldSet = true;
3931 this.installConditionField = value;
3932 }
3933 }
3934
3935 /// <summary>
3936 /// Whether to cache the package. The default is "yes".
3937 /// </summary>
3938 public BundleCacheType Cache
3939 {
3940 get
3941 {
3942 return this.cacheField;
3943 }
3944 set
3945 {
3946 this.cacheFieldSet = true;
3947 this.cacheField = value;
3948 }
3949 }
3950
3951 /// <summary>
3952 /// The identifier to use when caching the package.
3953 /// </summary>
3954 public string CacheId
3955 {
3956 get
3957 {
3958 return this.cacheIdField;
3959 }
3960 set
3961 {
3962 this.cacheIdFieldSet = true;
3963 this.cacheIdField = value;
3964 }
3965 }
3966
3967 /// <summary>
3968 /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages
3969 /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use
3970 /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the
3971 /// bootstrapper application data manifest.
3972 /// </summary>
3973 public string DisplayName
3974 {
3975 get
3976 {
3977 return this.displayNameField;
3978 }
3979 set
3980 {
3981 this.displayNameFieldSet = true;
3982 this.displayNameField = value;
3983 }
3984 }
3985
3986 /// <summary>
3987 /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages
3988 /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use
3989 /// the Description patch metadata property. Other package types must use this attribute to define a description in the
3990 /// bootstrapper application data manifest.
3991 /// </summary>
3992 public string Description
3993 {
3994 get
3995 {
3996 return this.descriptionField;
3997 }
3998 set
3999 {
4000 this.descriptionFieldSet = true;
4001 this.descriptionField = value;
4002 }
4003 }
4004
4005 /// <summary>
4006 /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not
4007 /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging.
4008 /// </summary>
4009 public string LogPathVariable
4010 {
4011 get
4012 {
4013 return this.logPathVariableField;
4014 }
4015 set
4016 {
4017 this.logPathVariableFieldSet = true;
4018 this.logPathVariableField = value;
4019 }
4020 }
4021
4022 /// <summary>
4023 /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause
4024 /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which
4025 /// default to no logging.
4026 /// </summary>
4027 public string RollbackLogPathVariable
4028 {
4029 get
4030 {
4031 return this.rollbackLogPathVariableField;
4032 }
4033 set
4034 {
4035 this.rollbackLogPathVariableFieldSet = true;
4036 this.rollbackLogPathVariableField = value;
4037 }
4038 }
4039
4040 /// <summary>
4041 /// Specifies whether the package can be uninstalled. The default is "no".
4042 /// </summary>
4043 public YesNoType Permanent
4044 {
4045 get
4046 {
4047 return this.permanentField;
4048 }
4049 set
4050 {
4051 this.permanentFieldSet = true;
4052 this.permanentField = value;
4053 }
4054 }
4055
4056 /// <summary>
4057 /// Specifies whether the package must succeed for the chain to continue. The default "yes"
4058 /// indicates that if the package fails then the chain will fail and rollback or stop. If
4059 /// "no" is specified then the chain will continue even if the package reports failure.
4060 /// </summary>
4061 public YesNoType Vital
4062 {
4063 get
4064 {
4065 return this.vitalField;
4066 }
4067 set
4068 {
4069 this.vitalFieldSet = true;
4070 this.vitalField = value;
4071 }
4072 }
4073
4074 /// <summary>
4075 /// Whether the package payload should be embedded in a container or left as an external payload.
4076 /// </summary>
4077 public YesNoDefaultType Compressed
4078 {
4079 get
4080 {
4081 return this.compressedField;
4082 }
4083 set
4084 {
4085 this.compressedFieldSet = true;
4086 this.compressedField = value;
4087 }
4088 }
4089
4090 /// <summary>
4091 /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
4092 /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
4093 /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
4094 /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
4095 /// </summary>
4096 public YesNoType EnableSignatureVerification
4097 {
4098 get
4099 {
4100 return this.enableSignatureVerificationField;
4101 }
4102 set
4103 {
4104 this.enableSignatureVerificationFieldSet = true;
4105 this.enableSignatureVerificationField = value;
4106 }
4107 }
4108
4109 /// <summary>
4110 /// Specifies whether the bundle will allow individual control over the installation state of Features inside
4111 /// the msi package. Managing feature selection requires special care to ensure the install, modify, update and
4112 /// uninstall behavior of the package is always correct. The default is "no".
4113 /// </summary>
4114 public YesNoType EnableFeatureSelection
4115 {
4116 get
4117 {
4118 return this.enableFeatureSelectionField;
4119 }
4120 set
4121 {
4122 this.enableFeatureSelectionFieldSet = true;
4123 this.enableFeatureSelectionField = value;
4124 }
4125 }
4126
4127 /// <summary>
4128 /// Override the automatic per-machine detection of MSI packages and force the package to be per-machine.
4129 /// The default is "no", which allows the tools to detect the expected value.
4130 /// </summary>
4131 public YesNoType ForcePerMachine
4132 {
4133 get
4134 {
4135 return this.forcePerMachineField;
4136 }
4137 set
4138 {
4139 this.forcePerMachineFieldSet = true;
4140 this.forcePerMachineField = value;
4141 }
4142 }
4143
4144 /// <summary>
4145 /// This attribute has been deprecated. When the value is "yes", the Binder will not read the MSI package
4146 /// to detect uncompressed files that would otherwise be automatically included in the Bundle as Payloads.
4147 /// The resulting Bundle may not be able to install the MSI package correctly. The default is "no".
4148 /// </summary>
4149 public YesNoType SuppressLooseFilePayloadGeneration
4150 {
4151 get
4152 {
4153 return this.suppressLooseFilePayloadGenerationField;
4154 }
4155 set
4156 {
4157 this.suppressLooseFilePayloadGenerationFieldSet = true;
4158 this.suppressLooseFilePayloadGenerationField = value;
4159 }
4160 }
4161
4162 /// <summary>
4163 /// Specifies whether the MSI will be displayed in Programs and Features (also known as Add/Remove Programs). If "yes" is
4164 /// specified the MSI package information will be displayed in Programs and Features. The default "no" indicates the MSI
4165 /// will not be displayed.
4166 /// </summary>
4167 public YesNoType Visible
4168 {
4169 get
4170 {
4171 return this.visibleField;
4172 }
4173 set
4174 {
4175 this.visibleFieldSet = true;
4176 this.visibleField = value;
4177 }
4178 }
4179
4180 public virtual ISchemaElement ParentElement
4181 {
4182 get
4183 {
4184 return this.parentElement;
4185 }
4186 set
4187 {
4188 this.parentElement = value;
4189 }
4190 }
4191
4192 public virtual void AddChild(ISchemaElement child)
4193 {
4194 if ((null == child))
4195 {
4196 throw new ArgumentNullException("child");
4197 }
4198 this.children.AddElement(child);
4199 child.ParentElement = this;
4200 }
4201
4202 public virtual void RemoveChild(ISchemaElement child)
4203 {
4204 if ((null == child))
4205 {
4206 throw new ArgumentNullException("child");
4207 }
4208 this.children.RemoveElement(child);
4209 child.ParentElement = null;
4210 }
4211
4212 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4213 ISchemaElement ICreateChildren.CreateChild(string childName)
4214 {
4215 if (String.IsNullOrEmpty(childName))
4216 {
4217 throw new ArgumentNullException("childName");
4218 }
4219 ISchemaElement childValue = null;
4220 if (("MsiProperty" == childName))
4221 {
4222 childValue = new MsiProperty();
4223 }
4224 if (("SlipstreamMsp" == childName))
4225 {
4226 childValue = new SlipstreamMsp();
4227 }
4228 if (("Payload" == childName))
4229 {
4230 childValue = new Payload();
4231 }
4232 if (("PayloadGroupRef" == childName))
4233 {
4234 childValue = new PayloadGroupRef();
4235 }
4236 if ((null == childValue))
4237 {
4238 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
4239 }
4240 return childValue;
4241 }
4242
4243 /// <summary>
4244 /// Processes this element and all child elements into an XmlWriter.
4245 /// </summary>
4246 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
4247 public virtual void OutputXml(XmlWriter writer)
4248 {
4249 if ((null == writer))
4250 {
4251 throw new ArgumentNullException("writer");
4252 }
4253 writer.WriteStartElement("MsiPackage", "http://wixtoolset.org/schemas/v4/wxs");
4254 if (this.sourceFileFieldSet)
4255 {
4256 writer.WriteAttributeString("SourceFile", this.sourceFileField);
4257 }
4258 if (this.nameFieldSet)
4259 {
4260 writer.WriteAttributeString("Name", this.nameField);
4261 }
4262 if (this.downloadUrlFieldSet)
4263 {
4264 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
4265 }
4266 if (this.idFieldSet)
4267 {
4268 writer.WriteAttributeString("Id", this.idField);
4269 }
4270 if (this.afterFieldSet)
4271 {
4272 writer.WriteAttributeString("After", this.afterField);
4273 }
4274 if (this.installSizeFieldSet)
4275 {
4276 writer.WriteAttributeString("InstallSize", this.installSizeField);
4277 }
4278 if (this.installConditionFieldSet)
4279 {
4280 writer.WriteAttributeString("InstallCondition", this.installConditionField);
4281 }
4282 if (this.cacheFieldSet)
4283 {
4284 if ((this.cacheField == BundleCacheType.force))
4285 {
4286 writer.WriteAttributeString("Cache", "force");
4287 }
4288 if ((this.cacheField == BundleCacheType.remove))
4289 {
4290 writer.WriteAttributeString("Cache", "remove");
4291 }
4292 if ((this.cacheField == BundleCacheType.keep))
4293 {
4294 writer.WriteAttributeString("Cache", "keep");
4295 }
4296 }
4297 if (this.cacheIdFieldSet)
4298 {
4299 writer.WriteAttributeString("CacheId", this.cacheIdField);
4300 }
4301 if (this.displayNameFieldSet)
4302 {
4303 writer.WriteAttributeString("DisplayName", this.displayNameField);
4304 }
4305 if (this.descriptionFieldSet)
4306 {
4307 writer.WriteAttributeString("Description", this.descriptionField);
4308 }
4309 if (this.logPathVariableFieldSet)
4310 {
4311 writer.WriteAttributeString("LogPathVariable", this.logPathVariableField);
4312 }
4313 if (this.rollbackLogPathVariableFieldSet)
4314 {
4315 writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField);
4316 }
4317 if (this.permanentFieldSet)
4318 {
4319 if ((this.permanentField == YesNoType.no))
4320 {
4321 writer.WriteAttributeString("Permanent", "no");
4322 }
4323 if ((this.permanentField == YesNoType.yes))
4324 {
4325 writer.WriteAttributeString("Permanent", "yes");
4326 }
4327 }
4328 if (this.vitalFieldSet)
4329 {
4330 if ((this.vitalField == YesNoType.no))
4331 {
4332 writer.WriteAttributeString("Vital", "no");
4333 }
4334 if ((this.vitalField == YesNoType.yes))
4335 {
4336 writer.WriteAttributeString("Vital", "yes");
4337 }
4338 }
4339 if (this.compressedFieldSet)
4340 {
4341 if ((this.compressedField == YesNoDefaultType.@default))
4342 {
4343 writer.WriteAttributeString("Compressed", "default");
4344 }
4345 if ((this.compressedField == YesNoDefaultType.no))
4346 {
4347 writer.WriteAttributeString("Compressed", "no");
4348 }
4349 if ((this.compressedField == YesNoDefaultType.yes))
4350 {
4351 writer.WriteAttributeString("Compressed", "yes");
4352 }
4353 }
4354 if (this.enableSignatureVerificationFieldSet)
4355 {
4356 if ((this.enableSignatureVerificationField == YesNoType.no))
4357 {
4358 writer.WriteAttributeString("EnableSignatureVerification", "no");
4359 }
4360 if ((this.enableSignatureVerificationField == YesNoType.yes))
4361 {
4362 writer.WriteAttributeString("EnableSignatureVerification", "yes");
4363 }
4364 }
4365 if (this.enableFeatureSelectionFieldSet)
4366 {
4367 if ((this.enableFeatureSelectionField == YesNoType.no))
4368 {
4369 writer.WriteAttributeString("EnableFeatureSelection", "no");
4370 }
4371 if ((this.enableFeatureSelectionField == YesNoType.yes))
4372 {
4373 writer.WriteAttributeString("EnableFeatureSelection", "yes");
4374 }
4375 }
4376 if (this.forcePerMachineFieldSet)
4377 {
4378 if ((this.forcePerMachineField == YesNoType.no))
4379 {
4380 writer.WriteAttributeString("ForcePerMachine", "no");
4381 }
4382 if ((this.forcePerMachineField == YesNoType.yes))
4383 {
4384 writer.WriteAttributeString("ForcePerMachine", "yes");
4385 }
4386 }
4387 if (this.suppressLooseFilePayloadGenerationFieldSet)
4388 {
4389 if ((this.suppressLooseFilePayloadGenerationField == YesNoType.no))
4390 {
4391 writer.WriteAttributeString("SuppressLooseFilePayloadGeneration", "no");
4392 }
4393 if ((this.suppressLooseFilePayloadGenerationField == YesNoType.yes))
4394 {
4395 writer.WriteAttributeString("SuppressLooseFilePayloadGeneration", "yes");
4396 }
4397 }
4398 if (this.visibleFieldSet)
4399 {
4400 if ((this.visibleField == YesNoType.no))
4401 {
4402 writer.WriteAttributeString("Visible", "no");
4403 }
4404 if ((this.visibleField == YesNoType.yes))
4405 {
4406 writer.WriteAttributeString("Visible", "yes");
4407 }
4408 }
4409 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
4410 {
4411 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
4412 childElement.OutputXml(writer);
4413 }
4414 writer.WriteEndElement();
4415 }
4416
4417 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
4418 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
4419 void ISetAttributes.SetAttribute(string name, string value)
4420 {
4421 if (String.IsNullOrEmpty(name))
4422 {
4423 throw new ArgumentNullException("name");
4424 }
4425 if (("SourceFile" == name))
4426 {
4427 this.sourceFileField = value;
4428 this.sourceFileFieldSet = true;
4429 }
4430 if (("Name" == name))
4431 {
4432 this.nameField = value;
4433 this.nameFieldSet = true;
4434 }
4435 if (("DownloadUrl" == name))
4436 {
4437 this.downloadUrlField = value;
4438 this.downloadUrlFieldSet = true;
4439 }
4440 if (("Id" == name))
4441 {
4442 this.idField = value;
4443 this.idFieldSet = true;
4444 }
4445 if (("After" == name))
4446 {
4447 this.afterField = value;
4448 this.afterFieldSet = true;
4449 }
4450 if (("InstallSize" == name))
4451 {
4452 this.installSizeField = value;
4453 this.installSizeFieldSet = true;
4454 }
4455 if (("InstallCondition" == name))
4456 {
4457 this.installConditionField = value;
4458 this.installConditionFieldSet = true;
4459 }
4460 if (("Cache" == name))
4461 {
4462 this.cacheField = Enums.ParseBundleCacheType(value);
4463 this.cacheFieldSet = true;
4464 }
4465 if (("CacheId" == name))
4466 {
4467 this.cacheIdField = value;
4468 this.cacheIdFieldSet = true;
4469 }
4470 if (("DisplayName" == name))
4471 {
4472 this.displayNameField = value;
4473 this.displayNameFieldSet = true;
4474 }
4475 if (("Description" == name))
4476 {
4477 this.descriptionField = value;
4478 this.descriptionFieldSet = true;
4479 }
4480 if (("LogPathVariable" == name))
4481 {
4482 this.logPathVariableField = value;
4483 this.logPathVariableFieldSet = true;
4484 }
4485 if (("RollbackLogPathVariable" == name))
4486 {
4487 this.rollbackLogPathVariableField = value;
4488 this.rollbackLogPathVariableFieldSet = true;
4489 }
4490 if (("Permanent" == name))
4491 {
4492 this.permanentField = Enums.ParseYesNoType(value);
4493 this.permanentFieldSet = true;
4494 }
4495 if (("Vital" == name))
4496 {
4497 this.vitalField = Enums.ParseYesNoType(value);
4498 this.vitalFieldSet = true;
4499 }
4500 if (("Compressed" == name))
4501 {
4502 this.compressedField = Enums.ParseYesNoDefaultType(value);
4503 this.compressedFieldSet = true;
4504 }
4505 if (("EnableSignatureVerification" == name))
4506 {
4507 this.enableSignatureVerificationField = Enums.ParseYesNoType(value);
4508 this.enableSignatureVerificationFieldSet = true;
4509 }
4510 if (("EnableFeatureSelection" == name))
4511 {
4512 this.enableFeatureSelectionField = Enums.ParseYesNoType(value);
4513 this.enableFeatureSelectionFieldSet = true;
4514 }
4515 if (("ForcePerMachine" == name))
4516 {
4517 this.forcePerMachineField = Enums.ParseYesNoType(value);
4518 this.forcePerMachineFieldSet = true;
4519 }
4520 if (("SuppressLooseFilePayloadGeneration" == name))
4521 {
4522 this.suppressLooseFilePayloadGenerationField = Enums.ParseYesNoType(value);
4523 this.suppressLooseFilePayloadGenerationFieldSet = true;
4524 }
4525 if (("Visible" == name))
4526 {
4527 this.visibleField = Enums.ParseYesNoType(value);
4528 this.visibleFieldSet = true;
4529 }
4530 }
4531 }
4532
4533 /// <summary>
4534 /// Describes a single msp package to install.
4535 /// </summary>
4536 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
4537 public class MspPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
4538 {
4539
4540 private ElementCollection children;
4541
4542 private string sourceFileField;
4543
4544 private bool sourceFileFieldSet;
4545
4546 private string nameField;
4547
4548 private bool nameFieldSet;
4549
4550 private string downloadUrlField;
4551
4552 private bool downloadUrlFieldSet;
4553
4554 private string idField;
4555
4556 private bool idFieldSet;
4557
4558 private string afterField;
4559
4560 private bool afterFieldSet;
4561
4562 private string installSizeField;
4563
4564 private bool installSizeFieldSet;
4565
4566 private string installConditionField;
4567
4568 private bool installConditionFieldSet;
4569
4570 private BundleCacheType cacheField;
4571
4572 private bool cacheFieldSet;
4573
4574 private string cacheIdField;
4575
4576 private bool cacheIdFieldSet;
4577
4578 private string displayNameField;
4579
4580 private bool displayNameFieldSet;
4581
4582 private string descriptionField;
4583
4584 private bool descriptionFieldSet;
4585
4586 private string logPathVariableField;
4587
4588 private bool logPathVariableFieldSet;
4589
4590 private string rollbackLogPathVariableField;
4591
4592 private bool rollbackLogPathVariableFieldSet;
4593
4594 private YesNoType permanentField;
4595
4596 private bool permanentFieldSet;
4597
4598 private YesNoType vitalField;
4599
4600 private bool vitalFieldSet;
4601
4602 private YesNoDefaultType compressedField;
4603
4604 private bool compressedFieldSet;
4605
4606 private YesNoType enableSignatureVerificationField;
4607
4608 private bool enableSignatureVerificationFieldSet;
4609
4610 private YesNoDefaultType perMachineField;
4611
4612 private bool perMachineFieldSet;
4613
4614 private YesNoType slipstreamField;
4615
4616 private bool slipstreamFieldSet;
4617
4618 private ISchemaElement parentElement;
4619
4620 public MspPackage()
4621 {
4622 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
4623 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiProperty)));
4624 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
4625 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
4626 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
4627 this.children = childCollection0;
4628 }
4629
4630 public virtual IEnumerable Children
4631 {
4632 get
4633 {
4634 return this.children;
4635 }
4636 }
4637
4638 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
4639 public virtual IEnumerable this[System.Type childType]
4640 {
4641 get
4642 {
4643 return this.children.Filter(childType);
4644 }
4645 }
4646
4647 /// <summary>
4648 /// Location of the package to add to the bundle. The default value is the Name attribute, if provided.
4649 /// At a minimum, the SourceFile or Name attribute must be specified.
4650 /// </summary>
4651 public string SourceFile
4652 {
4653 get
4654 {
4655 return this.sourceFileField;
4656 }
4657 set
4658 {
4659 this.sourceFileFieldSet = true;
4660 this.sourceFileField = value;
4661 }
4662 }
4663
4664 /// <summary>
4665 /// The destination path and file name for this chain payload. Use this attribute to rename the
4666 /// chain entry point or extract it into a subfolder. The default value is the file name from the
4667 /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified.
4668 /// The use of '..' directories is not allowed.
4669 /// </summary>
4670 public string Name
4671 {
4672 get
4673 {
4674 return this.nameField;
4675 }
4676 set
4677 {
4678 this.nameFieldSet = true;
4679 this.nameField = value;
4680 }
4681 }
4682
4683 public string DownloadUrl
4684 {
4685 get
4686 {
4687 return this.downloadUrlField;
4688 }
4689 set
4690 {
4691 this.downloadUrlFieldSet = true;
4692 this.downloadUrlField = value;
4693 }
4694 }
4695
4696 /// <summary>
4697 /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute
4698 /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores).
4699 /// </summary>
4700 public string Id
4701 {
4702 get
4703 {
4704 return this.idField;
4705 }
4706 set
4707 {
4708 this.idFieldSet = true;
4709 this.idField = value;
4710 }
4711 }
4712
4713 /// <summary>
4714 /// The identifier of another package that this one should be installed after. By default the After
4715 /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this
4716 /// attribute is specified ensure that a cycle is not created explicitly or implicitly.
4717 /// </summary>
4718 public string After
4719 {
4720 get
4721 {
4722 return this.afterField;
4723 }
4724 set
4725 {
4726 this.afterFieldSet = true;
4727 this.afterField = value;
4728 }
4729 }
4730
4731 /// <summary>
4732 /// The size this package will take on disk in bytes after it is installed. By default, the binder will
4733 /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs)
4734 /// and use the total for the install size of the package.
4735 /// </summary>
4736 public string InstallSize
4737 {
4738 get
4739 {
4740 return this.installSizeField;
4741 }
4742 set
4743 {
4744 this.installSizeFieldSet = true;
4745 this.installSizeField = value;
4746 }
4747 }
4748
4749 /// <summary>
4750 /// 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.
4751 /// </summary>
4752 public string InstallCondition
4753 {
4754 get
4755 {
4756 return this.installConditionField;
4757 }
4758 set
4759 {
4760 this.installConditionFieldSet = true;
4761 this.installConditionField = value;
4762 }
4763 }
4764
4765 /// <summary>
4766 /// Whether to cache the package. The default is "keep".
4767 /// </summary>
4768 public BundleCacheType Cache
4769 {
4770 get
4771 {
4772 return this.cacheField;
4773 }
4774 set
4775 {
4776 this.cacheFieldSet = true;
4777 this.cacheField = value;
4778 }
4779 }
4780
4781 /// <summary>
4782 /// The identifier to use when caching the package.
4783 /// </summary>
4784 public string CacheId
4785 {
4786 get
4787 {
4788 return this.cacheIdField;
4789 }
4790 set
4791 {
4792 this.cacheIdFieldSet = true;
4793 this.cacheIdField = value;
4794 }
4795 }
4796
4797 /// <summary>
4798 /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages
4799 /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use
4800 /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the
4801 /// bootstrapper application data manifest.
4802 /// </summary>
4803 public string DisplayName
4804 {
4805 get
4806 {
4807 return this.displayNameField;
4808 }
4809 set
4810 {
4811 this.displayNameFieldSet = true;
4812 this.displayNameField = value;
4813 }
4814 }
4815
4816 /// <summary>
4817 /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages
4818 /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use
4819 /// the Description patch metadata property. Other package types must use this attribute to define a description in the
4820 /// bootstrapper application data manifest.
4821 /// </summary>
4822 public string Description
4823 {
4824 get
4825 {
4826 return this.descriptionField;
4827 }
4828 set
4829 {
4830 this.descriptionFieldSet = true;
4831 this.descriptionField = value;
4832 }
4833 }
4834
4835 /// <summary>
4836 /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not
4837 /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging.
4838 /// </summary>
4839 public string LogPathVariable
4840 {
4841 get
4842 {
4843 return this.logPathVariableField;
4844 }
4845 set
4846 {
4847 this.logPathVariableFieldSet = true;
4848 this.logPathVariableField = value;
4849 }
4850 }
4851
4852 /// <summary>
4853 /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause
4854 /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which
4855 /// default to no logging.
4856 /// </summary>
4857 public string RollbackLogPathVariable
4858 {
4859 get
4860 {
4861 return this.rollbackLogPathVariableField;
4862 }
4863 set
4864 {
4865 this.rollbackLogPathVariableFieldSet = true;
4866 this.rollbackLogPathVariableField = value;
4867 }
4868 }
4869
4870 /// <summary>
4871 /// Specifies whether the package can be uninstalled. The default is "no".
4872 /// </summary>
4873 public YesNoType Permanent
4874 {
4875 get
4876 {
4877 return this.permanentField;
4878 }
4879 set
4880 {
4881 this.permanentFieldSet = true;
4882 this.permanentField = value;
4883 }
4884 }
4885
4886 /// <summary>
4887 /// Specifies whether the package must succeed for the chain to continue. The default "yes"
4888 /// indicates that if the package fails then the chain will fail and rollback or stop. If
4889 /// "no" is specified then the chain will continue even if the package reports failure.
4890 /// </summary>
4891 public YesNoType Vital
4892 {
4893 get
4894 {
4895 return this.vitalField;
4896 }
4897 set
4898 {
4899 this.vitalFieldSet = true;
4900 this.vitalField = value;
4901 }
4902 }
4903
4904 /// <summary>
4905 /// Whether the package payload should be embedded in a container or left as an external payload.
4906 /// </summary>
4907 public YesNoDefaultType Compressed
4908 {
4909 get
4910 {
4911 return this.compressedField;
4912 }
4913 set
4914 {
4915 this.compressedFieldSet = true;
4916 this.compressedField = value;
4917 }
4918 }
4919
4920 /// <summary>
4921 /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
4922 /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
4923 /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
4924 /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
4925 /// </summary>
4926 public YesNoType EnableSignatureVerification
4927 {
4928 get
4929 {
4930 return this.enableSignatureVerificationField;
4931 }
4932 set
4933 {
4934 this.enableSignatureVerificationFieldSet = true;
4935 this.enableSignatureVerificationField = value;
4936 }
4937 }
4938
4939 /// <summary>
4940 /// Indicates the package must be executed elevated. The default is "no".
4941 /// </summary>
4942 public YesNoDefaultType PerMachine
4943 {
4944 get
4945 {
4946 return this.perMachineField;
4947 }
4948 set
4949 {
4950 this.perMachineFieldSet = true;
4951 this.perMachineField = value;
4952 }
4953 }
4954
4955 /// <summary>
4956 /// Specifies whether to automatically slipstream the patch for any target msi packages in the chain. The default is "no".
4957 /// Even when the value is "no", you can still author the SlipstreamMsp element under MsiPackage elements as desired.
4958 /// </summary>
4959 public YesNoType Slipstream
4960 {
4961 get
4962 {
4963 return this.slipstreamField;
4964 }
4965 set
4966 {
4967 this.slipstreamFieldSet = true;
4968 this.slipstreamField = value;
4969 }
4970 }
4971
4972 public virtual ISchemaElement ParentElement
4973 {
4974 get
4975 {
4976 return this.parentElement;
4977 }
4978 set
4979 {
4980 this.parentElement = value;
4981 }
4982 }
4983
4984 public virtual void AddChild(ISchemaElement child)
4985 {
4986 if ((null == child))
4987 {
4988 throw new ArgumentNullException("child");
4989 }
4990 this.children.AddElement(child);
4991 child.ParentElement = this;
4992 }
4993
4994 public virtual void RemoveChild(ISchemaElement child)
4995 {
4996 if ((null == child))
4997 {
4998 throw new ArgumentNullException("child");
4999 }
5000 this.children.RemoveElement(child);
5001 child.ParentElement = null;
5002 }
5003
5004 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5005 ISchemaElement ICreateChildren.CreateChild(string childName)
5006 {
5007 if (String.IsNullOrEmpty(childName))
5008 {
5009 throw new ArgumentNullException("childName");
5010 }
5011 ISchemaElement childValue = null;
5012 if (("MsiProperty" == childName))
5013 {
5014 childValue = new MsiProperty();
5015 }
5016 if (("Payload" == childName))
5017 {
5018 childValue = new Payload();
5019 }
5020 if (("PayloadGroupRef" == childName))
5021 {
5022 childValue = new PayloadGroupRef();
5023 }
5024 if ((null == childValue))
5025 {
5026 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
5027 }
5028 return childValue;
5029 }
5030
5031 /// <summary>
5032 /// Processes this element and all child elements into an XmlWriter.
5033 /// </summary>
5034 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5035 public virtual void OutputXml(XmlWriter writer)
5036 {
5037 if ((null == writer))
5038 {
5039 throw new ArgumentNullException("writer");
5040 }
5041 writer.WriteStartElement("MspPackage", "http://wixtoolset.org/schemas/v4/wxs");
5042 if (this.sourceFileFieldSet)
5043 {
5044 writer.WriteAttributeString("SourceFile", this.sourceFileField);
5045 }
5046 if (this.nameFieldSet)
5047 {
5048 writer.WriteAttributeString("Name", this.nameField);
5049 }
5050 if (this.downloadUrlFieldSet)
5051 {
5052 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
5053 }
5054 if (this.idFieldSet)
5055 {
5056 writer.WriteAttributeString("Id", this.idField);
5057 }
5058 if (this.afterFieldSet)
5059 {
5060 writer.WriteAttributeString("After", this.afterField);
5061 }
5062 if (this.installSizeFieldSet)
5063 {
5064 writer.WriteAttributeString("InstallSize", this.installSizeField);
5065 }
5066 if (this.installConditionFieldSet)
5067 {
5068 writer.WriteAttributeString("InstallCondition", this.installConditionField);
5069 }
5070 if (this.cacheFieldSet)
5071 {
5072 if ((this.cacheField == BundleCacheType.force))
5073 {
5074 writer.WriteAttributeString("Cache", "force");
5075 }
5076 if ((this.cacheField == BundleCacheType.remove))
5077 {
5078 writer.WriteAttributeString("Cache", "remove");
5079 }
5080 if ((this.cacheField == BundleCacheType.keep))
5081 {
5082 writer.WriteAttributeString("Cache", "keep");
5083 }
5084 }
5085 if (this.cacheIdFieldSet)
5086 {
5087 writer.WriteAttributeString("CacheId", this.cacheIdField);
5088 }
5089 if (this.displayNameFieldSet)
5090 {
5091 writer.WriteAttributeString("DisplayName", this.displayNameField);
5092 }
5093 if (this.descriptionFieldSet)
5094 {
5095 writer.WriteAttributeString("Description", this.descriptionField);
5096 }
5097 if (this.logPathVariableFieldSet)
5098 {
5099 writer.WriteAttributeString("LogPathVariable", this.logPathVariableField);
5100 }
5101 if (this.rollbackLogPathVariableFieldSet)
5102 {
5103 writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField);
5104 }
5105 if (this.permanentFieldSet)
5106 {
5107 if ((this.permanentField == YesNoType.no))
5108 {
5109 writer.WriteAttributeString("Permanent", "no");
5110 }
5111 if ((this.permanentField == YesNoType.yes))
5112 {
5113 writer.WriteAttributeString("Permanent", "yes");
5114 }
5115 }
5116 if (this.vitalFieldSet)
5117 {
5118 if ((this.vitalField == YesNoType.no))
5119 {
5120 writer.WriteAttributeString("Vital", "no");
5121 }
5122 if ((this.vitalField == YesNoType.yes))
5123 {
5124 writer.WriteAttributeString("Vital", "yes");
5125 }
5126 }
5127 if (this.compressedFieldSet)
5128 {
5129 if ((this.compressedField == YesNoDefaultType.@default))
5130 {
5131 writer.WriteAttributeString("Compressed", "default");
5132 }
5133 if ((this.compressedField == YesNoDefaultType.no))
5134 {
5135 writer.WriteAttributeString("Compressed", "no");
5136 }
5137 if ((this.compressedField == YesNoDefaultType.yes))
5138 {
5139 writer.WriteAttributeString("Compressed", "yes");
5140 }
5141 }
5142 if (this.enableSignatureVerificationFieldSet)
5143 {
5144 if ((this.enableSignatureVerificationField == YesNoType.no))
5145 {
5146 writer.WriteAttributeString("EnableSignatureVerification", "no");
5147 }
5148 if ((this.enableSignatureVerificationField == YesNoType.yes))
5149 {
5150 writer.WriteAttributeString("EnableSignatureVerification", "yes");
5151 }
5152 }
5153 if (this.perMachineFieldSet)
5154 {
5155 if ((this.perMachineField == YesNoDefaultType.@default))
5156 {
5157 writer.WriteAttributeString("PerMachine", "default");
5158 }
5159 if ((this.perMachineField == YesNoDefaultType.no))
5160 {
5161 writer.WriteAttributeString("PerMachine", "no");
5162 }
5163 if ((this.perMachineField == YesNoDefaultType.yes))
5164 {
5165 writer.WriteAttributeString("PerMachine", "yes");
5166 }
5167 }
5168 if (this.slipstreamFieldSet)
5169 {
5170 if ((this.slipstreamField == YesNoType.no))
5171 {
5172 writer.WriteAttributeString("Slipstream", "no");
5173 }
5174 if ((this.slipstreamField == YesNoType.yes))
5175 {
5176 writer.WriteAttributeString("Slipstream", "yes");
5177 }
5178 }
5179 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
5180 {
5181 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
5182 childElement.OutputXml(writer);
5183 }
5184 writer.WriteEndElement();
5185 }
5186
5187 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5188 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5189 void ISetAttributes.SetAttribute(string name, string value)
5190 {
5191 if (String.IsNullOrEmpty(name))
5192 {
5193 throw new ArgumentNullException("name");
5194 }
5195 if (("SourceFile" == name))
5196 {
5197 this.sourceFileField = value;
5198 this.sourceFileFieldSet = true;
5199 }
5200 if (("Name" == name))
5201 {
5202 this.nameField = value;
5203 this.nameFieldSet = true;
5204 }
5205 if (("DownloadUrl" == name))
5206 {
5207 this.downloadUrlField = value;
5208 this.downloadUrlFieldSet = true;
5209 }
5210 if (("Id" == name))
5211 {
5212 this.idField = value;
5213 this.idFieldSet = true;
5214 }
5215 if (("After" == name))
5216 {
5217 this.afterField = value;
5218 this.afterFieldSet = true;
5219 }
5220 if (("InstallSize" == name))
5221 {
5222 this.installSizeField = value;
5223 this.installSizeFieldSet = true;
5224 }
5225 if (("InstallCondition" == name))
5226 {
5227 this.installConditionField = value;
5228 this.installConditionFieldSet = true;
5229 }
5230 if (("Cache" == name))
5231 {
5232 this.cacheField = Enums.ParseBundleCacheType(value);
5233 this.cacheFieldSet = true;
5234 }
5235 if (("CacheId" == name))
5236 {
5237 this.cacheIdField = value;
5238 this.cacheIdFieldSet = true;
5239 }
5240 if (("DisplayName" == name))
5241 {
5242 this.displayNameField = value;
5243 this.displayNameFieldSet = true;
5244 }
5245 if (("Description" == name))
5246 {
5247 this.descriptionField = value;
5248 this.descriptionFieldSet = true;
5249 }
5250 if (("LogPathVariable" == name))
5251 {
5252 this.logPathVariableField = value;
5253 this.logPathVariableFieldSet = true;
5254 }
5255 if (("RollbackLogPathVariable" == name))
5256 {
5257 this.rollbackLogPathVariableField = value;
5258 this.rollbackLogPathVariableFieldSet = true;
5259 }
5260 if (("Permanent" == name))
5261 {
5262 this.permanentField = Enums.ParseYesNoType(value);
5263 this.permanentFieldSet = true;
5264 }
5265 if (("Vital" == name))
5266 {
5267 this.vitalField = Enums.ParseYesNoType(value);
5268 this.vitalFieldSet = true;
5269 }
5270 if (("Compressed" == name))
5271 {
5272 this.compressedField = Enums.ParseYesNoDefaultType(value);
5273 this.compressedFieldSet = true;
5274 }
5275 if (("EnableSignatureVerification" == name))
5276 {
5277 this.enableSignatureVerificationField = Enums.ParseYesNoType(value);
5278 this.enableSignatureVerificationFieldSet = true;
5279 }
5280 if (("PerMachine" == name))
5281 {
5282 this.perMachineField = Enums.ParseYesNoDefaultType(value);
5283 this.perMachineFieldSet = true;
5284 }
5285 if (("Slipstream" == name))
5286 {
5287 this.slipstreamField = Enums.ParseYesNoType(value);
5288 this.slipstreamFieldSet = true;
5289 }
5290 }
5291 }
5292
5293 /// <summary>
5294 /// Describes a single msu package to install.
5295 /// </summary>
5296 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
5297 public class MsuPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
5298 {
5299
5300 private ElementCollection children;
5301
5302 private string sourceFileField;
5303
5304 private bool sourceFileFieldSet;
5305
5306 private string nameField;
5307
5308 private bool nameFieldSet;
5309
5310 private string downloadUrlField;
5311
5312 private bool downloadUrlFieldSet;
5313
5314 private string idField;
5315
5316 private bool idFieldSet;
5317
5318 private string afterField;
5319
5320 private bool afterFieldSet;
5321
5322 private string installSizeField;
5323
5324 private bool installSizeFieldSet;
5325
5326 private string installConditionField;
5327
5328 private bool installConditionFieldSet;
5329
5330 private BundleCacheType cacheField;
5331
5332 private bool cacheFieldSet;
5333
5334 private string cacheIdField;
5335
5336 private bool cacheIdFieldSet;
5337
5338 private string displayNameField;
5339
5340 private bool displayNameFieldSet;
5341
5342 private string descriptionField;
5343
5344 private bool descriptionFieldSet;
5345
5346 private string logPathVariableField;
5347
5348 private bool logPathVariableFieldSet;
5349
5350 private string rollbackLogPathVariableField;
5351
5352 private bool rollbackLogPathVariableFieldSet;
5353
5354 private YesNoType permanentField;
5355
5356 private bool permanentFieldSet;
5357
5358 private YesNoType vitalField;
5359
5360 private bool vitalFieldSet;
5361
5362 private YesNoDefaultType compressedField;
5363
5364 private bool compressedFieldSet;
5365
5366 private YesNoType enableSignatureVerificationField;
5367
5368 private bool enableSignatureVerificationFieldSet;
5369
5370 private string detectConditionField;
5371
5372 private bool detectConditionFieldSet;
5373
5374 private string kBField;
5375
5376 private bool kBFieldSet;
5377
5378 private ISchemaElement parentElement;
5379
5380 public MsuPackage()
5381 {
5382 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
5383 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
5384 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
5385 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackagePayload)));
5386 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
5387 this.children = childCollection0;
5388 }
5389
5390 public virtual IEnumerable Children
5391 {
5392 get
5393 {
5394 return this.children;
5395 }
5396 }
5397
5398 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
5399 public virtual IEnumerable this[System.Type childType]
5400 {
5401 get
5402 {
5403 return this.children.Filter(childType);
5404 }
5405 }
5406
5407 /// <summary>
5408 /// Location of the package to add to the bundle. The default value is the Name attribute, if provided.
5409 /// At a minimum, the SourceFile or Name attribute must be specified.
5410 /// </summary>
5411 public string SourceFile
5412 {
5413 get
5414 {
5415 return this.sourceFileField;
5416 }
5417 set
5418 {
5419 this.sourceFileFieldSet = true;
5420 this.sourceFileField = value;
5421 }
5422 }
5423
5424 /// <summary>
5425 /// The destination path and file name for this chain payload. Use this attribute to rename the
5426 /// chain entry point or extract it into a subfolder. The default value is the file name from the
5427 /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified.
5428 /// The use of '..' directories is not allowed.
5429 /// </summary>
5430 public string Name
5431 {
5432 get
5433 {
5434 return this.nameField;
5435 }
5436 set
5437 {
5438 this.nameFieldSet = true;
5439 this.nameField = value;
5440 }
5441 }
5442
5443 public string DownloadUrl
5444 {
5445 get
5446 {
5447 return this.downloadUrlField;
5448 }
5449 set
5450 {
5451 this.downloadUrlFieldSet = true;
5452 this.downloadUrlField = value;
5453 }
5454 }
5455
5456 /// <summary>
5457 /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute
5458 /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores).
5459 /// </summary>
5460 public string Id
5461 {
5462 get
5463 {
5464 return this.idField;
5465 }
5466 set
5467 {
5468 this.idFieldSet = true;
5469 this.idField = value;
5470 }
5471 }
5472
5473 /// <summary>
5474 /// The identifier of another package that this one should be installed after. By default the After
5475 /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this
5476 /// attribute is specified ensure that a cycle is not created explicitly or implicitly.
5477 /// </summary>
5478 public string After
5479 {
5480 get
5481 {
5482 return this.afterField;
5483 }
5484 set
5485 {
5486 this.afterFieldSet = true;
5487 this.afterField = value;
5488 }
5489 }
5490
5491 /// <summary>
5492 /// The size this package will take on disk in bytes after it is installed. By default, the binder will
5493 /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs)
5494 /// and use the total for the install size of the package.
5495 /// </summary>
5496 public string InstallSize
5497 {
5498 get
5499 {
5500 return this.installSizeField;
5501 }
5502 set
5503 {
5504 this.installSizeFieldSet = true;
5505 this.installSizeField = value;
5506 }
5507 }
5508
5509 /// <summary>
5510 /// 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.
5511 /// </summary>
5512 public string InstallCondition
5513 {
5514 get
5515 {
5516 return this.installConditionField;
5517 }
5518 set
5519 {
5520 this.installConditionFieldSet = true;
5521 this.installConditionField = value;
5522 }
5523 }
5524
5525 /// <summary>
5526 /// Whether to cache the package. The default is "yes".
5527 /// </summary>
5528 public BundleCacheType Cache
5529 {
5530 get
5531 {
5532 return this.cacheField;
5533 }
5534 set
5535 {
5536 this.cacheFieldSet = true;
5537 this.cacheField = value;
5538 }
5539 }
5540
5541 /// <summary>
5542 /// The identifier to use when caching the package.
5543 /// </summary>
5544 public string CacheId
5545 {
5546 get
5547 {
5548 return this.cacheIdField;
5549 }
5550 set
5551 {
5552 this.cacheIdFieldSet = true;
5553 this.cacheIdField = value;
5554 }
5555 }
5556
5557 /// <summary>
5558 /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages
5559 /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use
5560 /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the
5561 /// bootstrapper application data manifest.
5562 /// </summary>
5563 public string DisplayName
5564 {
5565 get
5566 {
5567 return this.displayNameField;
5568 }
5569 set
5570 {
5571 this.displayNameFieldSet = true;
5572 this.displayNameField = value;
5573 }
5574 }
5575
5576 /// <summary>
5577 /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages
5578 /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use
5579 /// the Description patch metadata property. Other package types must use this attribute to define a description in the
5580 /// bootstrapper application data manifest.
5581 /// </summary>
5582 public string Description
5583 {
5584 get
5585 {
5586 return this.descriptionField;
5587 }
5588 set
5589 {
5590 this.descriptionFieldSet = true;
5591 this.descriptionField = value;
5592 }
5593 }
5594
5595 /// <summary>
5596 /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not
5597 /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging.
5598 /// </summary>
5599 public string LogPathVariable
5600 {
5601 get
5602 {
5603 return this.logPathVariableField;
5604 }
5605 set
5606 {
5607 this.logPathVariableFieldSet = true;
5608 this.logPathVariableField = value;
5609 }
5610 }
5611
5612 /// <summary>
5613 /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause
5614 /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which
5615 /// default to no logging.
5616 /// </summary>
5617 public string RollbackLogPathVariable
5618 {
5619 get
5620 {
5621 return this.rollbackLogPathVariableField;
5622 }
5623 set
5624 {
5625 this.rollbackLogPathVariableFieldSet = true;
5626 this.rollbackLogPathVariableField = value;
5627 }
5628 }
5629
5630 /// <summary>
5631 /// Specifies whether the package can be uninstalled. The default is "no".
5632 /// </summary>
5633 public YesNoType Permanent
5634 {
5635 get
5636 {
5637 return this.permanentField;
5638 }
5639 set
5640 {
5641 this.permanentFieldSet = true;
5642 this.permanentField = value;
5643 }
5644 }
5645
5646 /// <summary>
5647 /// Specifies whether the package must succeed for the chain to continue. The default "yes"
5648 /// indicates that if the package fails then the chain will fail and rollback or stop. If
5649 /// "no" is specified then the chain will continue even if the package reports failure.
5650 /// </summary>
5651 public YesNoType Vital
5652 {
5653 get
5654 {
5655 return this.vitalField;
5656 }
5657 set
5658 {
5659 this.vitalFieldSet = true;
5660 this.vitalField = value;
5661 }
5662 }
5663
5664 /// <summary>
5665 /// Whether the package payload should be embedded in a container or left as an external payload.
5666 /// </summary>
5667 public YesNoDefaultType Compressed
5668 {
5669 get
5670 {
5671 return this.compressedField;
5672 }
5673 set
5674 {
5675 this.compressedFieldSet = true;
5676 this.compressedField = value;
5677 }
5678 }
5679
5680 /// <summary>
5681 /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
5682 /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
5683 /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
5684 /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
5685 /// </summary>
5686 public YesNoType EnableSignatureVerification
5687 {
5688 get
5689 {
5690 return this.enableSignatureVerificationField;
5691 }
5692 set
5693 {
5694 this.enableSignatureVerificationFieldSet = true;
5695 this.enableSignatureVerificationField = value;
5696 }
5697 }
5698
5699 /// <summary>
5700 /// A condition that determines if the package is present on the target system. This condition can use built-in
5701 /// variables and variables returned by searches. This condition is necessary because Windows doesn't provide a
5702 /// method to detect the presence of an MsuPackage. Burn uses this condition to determine how to treat this
5703 /// package during a bundle action; for example, if this condition is false or omitted and the bundle is being
5704 /// installed, Burn will install this package.
5705 /// </summary>
5706 public string DetectCondition
5707 {
5708 get
5709 {
5710 return this.detectConditionField;
5711 }
5712 set
5713 {
5714 this.detectConditionFieldSet = true;
5715 this.detectConditionField = value;
5716 }
5717 }
5718
5719 /// <summary>
5720 /// The knowledge base identifier for the MSU. The KB attribute must be specified to enable the MSU package to
5721 /// be uninstalled. Even then MSU uninstallation is only supported on Windows 7 and later. When the KB attribute
5722 /// is specified, the Permanent attribute will the control whether the package is uninstalled.
5723 /// </summary>
5724 public string KB
5725 {
5726 get
5727 {
5728 return this.kBField;
5729 }
5730 set
5731 {
5732 this.kBFieldSet = true;
5733 this.kBField = value;
5734 }
5735 }
5736
5737 public virtual ISchemaElement ParentElement
5738 {
5739 get
5740 {
5741 return this.parentElement;
5742 }
5743 set
5744 {
5745 this.parentElement = value;
5746 }
5747 }
5748
5749 public virtual void AddChild(ISchemaElement child)
5750 {
5751 if ((null == child))
5752 {
5753 throw new ArgumentNullException("child");
5754 }
5755 this.children.AddElement(child);
5756 child.ParentElement = this;
5757 }
5758
5759 public virtual void RemoveChild(ISchemaElement child)
5760 {
5761 if ((null == child))
5762 {
5763 throw new ArgumentNullException("child");
5764 }
5765 this.children.RemoveElement(child);
5766 child.ParentElement = null;
5767 }
5768
5769 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5770 ISchemaElement ICreateChildren.CreateChild(string childName)
5771 {
5772 if (String.IsNullOrEmpty(childName))
5773 {
5774 throw new ArgumentNullException("childName");
5775 }
5776 ISchemaElement childValue = null;
5777 if (("Payload" == childName))
5778 {
5779 childValue = new Payload();
5780 }
5781 if (("PayloadGroupRef" == childName))
5782 {
5783 childValue = new PayloadGroupRef();
5784 }
5785 if (("MsuPackagePayload" == childName))
5786 {
5787 childValue = new MsuPackagePayload();
5788 }
5789 if ((null == childValue))
5790 {
5791 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
5792 }
5793 return childValue;
5794 }
5795
5796 /// <summary>
5797 /// Processes this element and all child elements into an XmlWriter.
5798 /// </summary>
5799 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5800 public virtual void OutputXml(XmlWriter writer)
5801 {
5802 if ((null == writer))
5803 {
5804 throw new ArgumentNullException("writer");
5805 }
5806 writer.WriteStartElement("MsuPackage", "http://wixtoolset.org/schemas/v4/wxs");
5807 if (this.sourceFileFieldSet)
5808 {
5809 writer.WriteAttributeString("SourceFile", this.sourceFileField);
5810 }
5811 if (this.nameFieldSet)
5812 {
5813 writer.WriteAttributeString("Name", this.nameField);
5814 }
5815 if (this.downloadUrlFieldSet)
5816 {
5817 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
5818 }
5819 if (this.idFieldSet)
5820 {
5821 writer.WriteAttributeString("Id", this.idField);
5822 }
5823 if (this.afterFieldSet)
5824 {
5825 writer.WriteAttributeString("After", this.afterField);
5826 }
5827 if (this.installSizeFieldSet)
5828 {
5829 writer.WriteAttributeString("InstallSize", this.installSizeField);
5830 }
5831 if (this.installConditionFieldSet)
5832 {
5833 writer.WriteAttributeString("InstallCondition", this.installConditionField);
5834 }
5835 if (this.cacheFieldSet)
5836 {
5837 if ((this.cacheField == BundleCacheType.force))
5838 {
5839 writer.WriteAttributeString("Cache", "force");
5840 }
5841 if ((this.cacheField == BundleCacheType.remove))
5842 {
5843 writer.WriteAttributeString("Cache", "remove");
5844 }
5845 if ((this.cacheField == BundleCacheType.keep))
5846 {
5847 writer.WriteAttributeString("Cache", "keep");
5848 }
5849 }
5850 if (this.cacheIdFieldSet)
5851 {
5852 writer.WriteAttributeString("CacheId", this.cacheIdField);
5853 }
5854 if (this.displayNameFieldSet)
5855 {
5856 writer.WriteAttributeString("DisplayName", this.displayNameField);
5857 }
5858 if (this.descriptionFieldSet)
5859 {
5860 writer.WriteAttributeString("Description", this.descriptionField);
5861 }
5862 if (this.logPathVariableFieldSet)
5863 {
5864 writer.WriteAttributeString("LogPathVariable", this.logPathVariableField);
5865 }
5866 if (this.rollbackLogPathVariableFieldSet)
5867 {
5868 writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField);
5869 }
5870 if (this.permanentFieldSet)
5871 {
5872 if ((this.permanentField == YesNoType.no))
5873 {
5874 writer.WriteAttributeString("Permanent", "no");
5875 }
5876 if ((this.permanentField == YesNoType.yes))
5877 {
5878 writer.WriteAttributeString("Permanent", "yes");
5879 }
5880 }
5881 if (this.vitalFieldSet)
5882 {
5883 if ((this.vitalField == YesNoType.no))
5884 {
5885 writer.WriteAttributeString("Vital", "no");
5886 }
5887 if ((this.vitalField == YesNoType.yes))
5888 {
5889 writer.WriteAttributeString("Vital", "yes");
5890 }
5891 }
5892 if (this.compressedFieldSet)
5893 {
5894 if ((this.compressedField == YesNoDefaultType.@default))
5895 {
5896 writer.WriteAttributeString("Compressed", "default");
5897 }
5898 if ((this.compressedField == YesNoDefaultType.no))
5899 {
5900 writer.WriteAttributeString("Compressed", "no");
5901 }
5902 if ((this.compressedField == YesNoDefaultType.yes))
5903 {
5904 writer.WriteAttributeString("Compressed", "yes");
5905 }
5906 }
5907 if (this.enableSignatureVerificationFieldSet)
5908 {
5909 if ((this.enableSignatureVerificationField == YesNoType.no))
5910 {
5911 writer.WriteAttributeString("EnableSignatureVerification", "no");
5912 }
5913 if ((this.enableSignatureVerificationField == YesNoType.yes))
5914 {
5915 writer.WriteAttributeString("EnableSignatureVerification", "yes");
5916 }
5917 }
5918 if (this.detectConditionFieldSet)
5919 {
5920 writer.WriteAttributeString("DetectCondition", this.detectConditionField);
5921 }
5922 if (this.kBFieldSet)
5923 {
5924 writer.WriteAttributeString("KB", this.kBField);
5925 }
5926 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
5927 {
5928 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
5929 childElement.OutputXml(writer);
5930 }
5931 writer.WriteEndElement();
5932 }
5933
5934 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
5935 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
5936 void ISetAttributes.SetAttribute(string name, string value)
5937 {
5938 if (String.IsNullOrEmpty(name))
5939 {
5940 throw new ArgumentNullException("name");
5941 }
5942 if (("SourceFile" == name))
5943 {
5944 this.sourceFileField = value;
5945 this.sourceFileFieldSet = true;
5946 }
5947 if (("Name" == name))
5948 {
5949 this.nameField = value;
5950 this.nameFieldSet = true;
5951 }
5952 if (("DownloadUrl" == name))
5953 {
5954 this.downloadUrlField = value;
5955 this.downloadUrlFieldSet = true;
5956 }
5957 if (("Id" == name))
5958 {
5959 this.idField = value;
5960 this.idFieldSet = true;
5961 }
5962 if (("After" == name))
5963 {
5964 this.afterField = value;
5965 this.afterFieldSet = true;
5966 }
5967 if (("InstallSize" == name))
5968 {
5969 this.installSizeField = value;
5970 this.installSizeFieldSet = true;
5971 }
5972 if (("InstallCondition" == name))
5973 {
5974 this.installConditionField = value;
5975 this.installConditionFieldSet = true;
5976 }
5977 if (("Cache" == name))
5978 {
5979 this.cacheField = Enums.ParseBundleCacheType(value);
5980 this.cacheFieldSet = true;
5981 }
5982 if (("CacheId" == name))
5983 {
5984 this.cacheIdField = value;
5985 this.cacheIdFieldSet = true;
5986 }
5987 if (("DisplayName" == name))
5988 {
5989 this.displayNameField = value;
5990 this.displayNameFieldSet = true;
5991 }
5992 if (("Description" == name))
5993 {
5994 this.descriptionField = value;
5995 this.descriptionFieldSet = true;
5996 }
5997 if (("LogPathVariable" == name))
5998 {
5999 this.logPathVariableField = value;
6000 this.logPathVariableFieldSet = true;
6001 }
6002 if (("RollbackLogPathVariable" == name))
6003 {
6004 this.rollbackLogPathVariableField = value;
6005 this.rollbackLogPathVariableFieldSet = true;
6006 }
6007 if (("Permanent" == name))
6008 {
6009 this.permanentField = Enums.ParseYesNoType(value);
6010 this.permanentFieldSet = true;
6011 }
6012 if (("Vital" == name))
6013 {
6014 this.vitalField = Enums.ParseYesNoType(value);
6015 this.vitalFieldSet = true;
6016 }
6017 if (("Compressed" == name))
6018 {
6019 this.compressedField = Enums.ParseYesNoDefaultType(value);
6020 this.compressedFieldSet = true;
6021 }
6022 if (("EnableSignatureVerification" == name))
6023 {
6024 this.enableSignatureVerificationField = Enums.ParseYesNoType(value);
6025 this.enableSignatureVerificationFieldSet = true;
6026 }
6027 if (("DetectCondition" == name))
6028 {
6029 this.detectConditionField = value;
6030 this.detectConditionFieldSet = true;
6031 }
6032 if (("KB" == name))
6033 {
6034 this.kBField = value;
6035 this.kBFieldSet = true;
6036 }
6037 }
6038 }
6039
6040 /// <summary>
6041 /// Describes a single exe package to install.
6042 /// </summary>
6043 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
6044 public class ExePackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
6045 {
6046
6047 private ElementCollection children;
6048
6049 private string sourceFileField;
6050
6051 private bool sourceFileFieldSet;
6052
6053 private string nameField;
6054
6055 private bool nameFieldSet;
6056
6057 private string downloadUrlField;
6058
6059 private bool downloadUrlFieldSet;
6060
6061 private string idField;
6062
6063 private bool idFieldSet;
6064
6065 private string afterField;
6066
6067 private bool afterFieldSet;
6068
6069 private string installSizeField;
6070
6071 private bool installSizeFieldSet;
6072
6073 private string installConditionField;
6074
6075 private bool installConditionFieldSet;
6076
6077 private BundleCacheType cacheField;
6078
6079 private bool cacheFieldSet;
6080
6081 private string cacheIdField;
6082
6083 private bool cacheIdFieldSet;
6084
6085 private string displayNameField;
6086
6087 private bool displayNameFieldSet;
6088
6089 private string descriptionField;
6090
6091 private bool descriptionFieldSet;
6092
6093 private string logPathVariableField;
6094
6095 private bool logPathVariableFieldSet;
6096
6097 private string rollbackLogPathVariableField;
6098
6099 private bool rollbackLogPathVariableFieldSet;
6100
6101 private YesNoType permanentField;
6102
6103 private bool permanentFieldSet;
6104
6105 private YesNoType vitalField;
6106
6107 private bool vitalFieldSet;
6108
6109 private YesNoDefaultType compressedField;
6110
6111 private bool compressedFieldSet;
6112
6113 private YesNoType enableSignatureVerificationField;
6114
6115 private bool enableSignatureVerificationFieldSet;
6116
6117 private string detectConditionField;
6118
6119 private bool detectConditionFieldSet;
6120
6121 private string installCommandField;
6122
6123 private bool installCommandFieldSet;
6124
6125 private string repairCommandField;
6126
6127 private bool repairCommandFieldSet;
6128
6129 private string uninstallCommandField;
6130
6131 private bool uninstallCommandFieldSet;
6132
6133 private YesNoDefaultType perMachineField;
6134
6135 private bool perMachineFieldSet;
6136
6137 private BurnExeProtocolType protocolField;
6138
6139 private bool protocolFieldSet;
6140
6141 private ISchemaElement parentElement;
6142
6143 public ExePackage()
6144 {
6145 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
6146 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
6147 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
6148 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackagePayload)));
6149 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExitCode)));
6150 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CommandLine)));
6151 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
6152 this.children = childCollection0;
6153 }
6154
6155 public virtual IEnumerable Children
6156 {
6157 get
6158 {
6159 return this.children;
6160 }
6161 }
6162
6163 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
6164 public virtual IEnumerable this[System.Type childType]
6165 {
6166 get
6167 {
6168 return this.children.Filter(childType);
6169 }
6170 }
6171
6172 /// <summary>
6173 /// Location of the package to add to the bundle. The default value is the Name attribute, if provided.
6174 /// At a minimum, the SourceFile or Name attribute must be specified.
6175 /// </summary>
6176 public string SourceFile
6177 {
6178 get
6179 {
6180 return this.sourceFileField;
6181 }
6182 set
6183 {
6184 this.sourceFileFieldSet = true;
6185 this.sourceFileField = value;
6186 }
6187 }
6188
6189 /// <summary>
6190 /// The destination path and file name for this chain payload. Use this attribute to rename the
6191 /// chain entry point or extract it into a subfolder. The default value is the file name from the
6192 /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified.
6193 /// The use of '..' directories is not allowed.
6194 /// </summary>
6195 public string Name
6196 {
6197 get
6198 {
6199 return this.nameField;
6200 }
6201 set
6202 {
6203 this.nameFieldSet = true;
6204 this.nameField = value;
6205 }
6206 }
6207
6208 public string DownloadUrl
6209 {
6210 get
6211 {
6212 return this.downloadUrlField;
6213 }
6214 set
6215 {
6216 this.downloadUrlFieldSet = true;
6217 this.downloadUrlField = value;
6218 }
6219 }
6220
6221 /// <summary>
6222 /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute
6223 /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores).
6224 /// </summary>
6225 public string Id
6226 {
6227 get
6228 {
6229 return this.idField;
6230 }
6231 set
6232 {
6233 this.idFieldSet = true;
6234 this.idField = value;
6235 }
6236 }
6237
6238 /// <summary>
6239 /// The identifier of another package that this one should be installed after. By default the After
6240 /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this
6241 /// attribute is specified ensure that a cycle is not created explicitly or implicitly.
6242 /// </summary>
6243 public string After
6244 {
6245 get
6246 {
6247 return this.afterField;
6248 }
6249 set
6250 {
6251 this.afterFieldSet = true;
6252 this.afterField = value;
6253 }
6254 }
6255
6256 /// <summary>
6257 /// The size this package will take on disk in bytes after it is installed. By default, the binder will
6258 /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs)
6259 /// and use the total for the install size of the package.
6260 /// </summary>
6261 public string InstallSize
6262 {
6263 get
6264 {
6265 return this.installSizeField;
6266 }
6267 set
6268 {
6269 this.installSizeFieldSet = true;
6270 this.installSizeField = value;
6271 }
6272 }
6273
6274 /// <summary>
6275 /// 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.
6276 /// </summary>
6277 public string InstallCondition
6278 {
6279 get
6280 {
6281 return this.installConditionField;
6282 }
6283 set
6284 {
6285 this.installConditionFieldSet = true;
6286 this.installConditionField = value;
6287 }
6288 }
6289
6290 /// <summary>
6291 /// Whether to cache the package. The default is "yes".
6292 /// </summary>
6293 public BundleCacheType Cache
6294 {
6295 get
6296 {
6297 return this.cacheField;
6298 }
6299 set
6300 {
6301 this.cacheFieldSet = true;
6302 this.cacheField = value;
6303 }
6304 }
6305
6306 /// <summary>
6307 /// The identifier to use when caching the package.
6308 /// </summary>
6309 public string CacheId
6310 {
6311 get
6312 {
6313 return this.cacheIdField;
6314 }
6315 set
6316 {
6317 this.cacheIdFieldSet = true;
6318 this.cacheIdField = value;
6319 }
6320 }
6321
6322 /// <summary>
6323 /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages
6324 /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use
6325 /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the
6326 /// bootstrapper application data manifest.
6327 /// </summary>
6328 public string DisplayName
6329 {
6330 get
6331 {
6332 return this.displayNameField;
6333 }
6334 set
6335 {
6336 this.displayNameFieldSet = true;
6337 this.displayNameField = value;
6338 }
6339 }
6340
6341 /// <summary>
6342 /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages
6343 /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use
6344 /// the Description patch metadata property. Other package types must use this attribute to define a description in the
6345 /// bootstrapper application data manifest.
6346 /// </summary>
6347 public string Description
6348 {
6349 get
6350 {
6351 return this.descriptionField;
6352 }
6353 set
6354 {
6355 this.descriptionFieldSet = true;
6356 this.descriptionField = value;
6357 }
6358 }
6359
6360 /// <summary>
6361 /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not
6362 /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging.
6363 /// </summary>
6364 public string LogPathVariable
6365 {
6366 get
6367 {
6368 return this.logPathVariableField;
6369 }
6370 set
6371 {
6372 this.logPathVariableFieldSet = true;
6373 this.logPathVariableField = value;
6374 }
6375 }
6376
6377 /// <summary>
6378 /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause
6379 /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which
6380 /// default to no logging.
6381 /// </summary>
6382 public string RollbackLogPathVariable
6383 {
6384 get
6385 {
6386 return this.rollbackLogPathVariableField;
6387 }
6388 set
6389 {
6390 this.rollbackLogPathVariableFieldSet = true;
6391 this.rollbackLogPathVariableField = value;
6392 }
6393 }
6394
6395 /// <summary>
6396 /// Specifies whether the package can be uninstalled. The default is "no".
6397 /// </summary>
6398 public YesNoType Permanent
6399 {
6400 get
6401 {
6402 return this.permanentField;
6403 }
6404 set
6405 {
6406 this.permanentFieldSet = true;
6407 this.permanentField = value;
6408 }
6409 }
6410
6411 /// <summary>
6412 /// Specifies whether the package must succeed for the chain to continue. The default "yes"
6413 /// indicates that if the package fails then the chain will fail and rollback or stop. If
6414 /// "no" is specified then the chain will continue even if the package reports failure.
6415 /// </summary>
6416 public YesNoType Vital
6417 {
6418 get
6419 {
6420 return this.vitalField;
6421 }
6422 set
6423 {
6424 this.vitalFieldSet = true;
6425 this.vitalField = value;
6426 }
6427 }
6428
6429 /// <summary>
6430 /// Whether the package payload should be embedded in a container or left as an external payload.
6431 /// </summary>
6432 public YesNoDefaultType Compressed
6433 {
6434 get
6435 {
6436 return this.compressedField;
6437 }
6438 set
6439 {
6440 this.compressedFieldSet = true;
6441 this.compressedField = value;
6442 }
6443 }
6444
6445 /// <summary>
6446 /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
6447 /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
6448 /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
6449 /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
6450 /// </summary>
6451 public YesNoType EnableSignatureVerification
6452 {
6453 get
6454 {
6455 return this.enableSignatureVerificationField;
6456 }
6457 set
6458 {
6459 this.enableSignatureVerificationFieldSet = true;
6460 this.enableSignatureVerificationField = value;
6461 }
6462 }
6463
6464 /// <summary>
6465 /// A condition that determines if the package is present on the target system. This condition can use built-in
6466 /// variables and variables returned by searches. This condition is necessary because Windows doesn't provide a
6467 /// method to detect the presence of an ExePackage. Burn uses this condition to determine how to treat this
6468 /// package during a bundle action; for example, if this condition is false or omitted and the bundle is being
6469 /// installed, Burn will install this package.
6470 /// </summary>
6471 public string DetectCondition
6472 {
6473 get
6474 {
6475 return this.detectConditionField;
6476 }
6477 set
6478 {
6479 this.detectConditionFieldSet = true;
6480 this.detectConditionField = value;
6481 }
6482 }
6483
6484 /// <summary>
6485 /// 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.
6486 /// </summary>
6487 public string InstallCommand
6488 {
6489 get
6490 {
6491 return this.installCommandField;
6492 }
6493 set
6494 {
6495 this.installCommandFieldSet = true;
6496 this.installCommandField = value;
6497 }
6498 }
6499
6500 /// <summary>
6501 /// The command-line arguments to specify to indicate a repair. If the executable package can be repaired but
6502 /// does not require any special command-line arguments to do so then set the attribute's value to blank. To
6503 /// indicate that the package does not support repair, omit this attribute.
6504 /// </summary>
6505 public string RepairCommand
6506 {
6507 get
6508 {
6509 return this.repairCommandField;
6510 }
6511 set
6512 {
6513 this.repairCommandFieldSet = true;
6514 this.repairCommandField = value;
6515 }
6516 }
6517
6518 /// <summary>
6519 /// 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".
6520 /// </summary>
6521 public string UninstallCommand
6522 {
6523 get
6524 {
6525 return this.uninstallCommandField;
6526 }
6527 set
6528 {
6529 this.uninstallCommandFieldSet = true;
6530 this.uninstallCommandField = value;
6531 }
6532 }
6533
6534 /// <summary>
6535 /// Indicates the package must be executed elevated. The default is "no".
6536 /// </summary>
6537 public YesNoDefaultType PerMachine
6538 {
6539 get
6540 {
6541 return this.perMachineField;
6542 }
6543 set
6544 {
6545 this.perMachineFieldSet = true;
6546 this.perMachineField = value;
6547 }
6548 }
6549
6550 /// <summary>
6551 /// Indicates the communication protocol the package supports for extended progress and error reporting. The default is "none".
6552 /// </summary>
6553 public BurnExeProtocolType Protocol
6554 {
6555 get
6556 {
6557 return this.protocolField;
6558 }
6559 set
6560 {
6561 this.protocolFieldSet = true;
6562 this.protocolField = value;
6563 }
6564 }
6565
6566 public virtual ISchemaElement ParentElement
6567 {
6568 get
6569 {
6570 return this.parentElement;
6571 }
6572 set
6573 {
6574 this.parentElement = value;
6575 }
6576 }
6577
6578 public virtual void AddChild(ISchemaElement child)
6579 {
6580 if ((null == child))
6581 {
6582 throw new ArgumentNullException("child");
6583 }
6584 this.children.AddElement(child);
6585 child.ParentElement = this;
6586 }
6587
6588 public virtual void RemoveChild(ISchemaElement child)
6589 {
6590 if ((null == child))
6591 {
6592 throw new ArgumentNullException("child");
6593 }
6594 this.children.RemoveElement(child);
6595 child.ParentElement = null;
6596 }
6597
6598 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
6599 ISchemaElement ICreateChildren.CreateChild(string childName)
6600 {
6601 if (String.IsNullOrEmpty(childName))
6602 {
6603 throw new ArgumentNullException("childName");
6604 }
6605 ISchemaElement childValue = null;
6606 if (("Payload" == childName))
6607 {
6608 childValue = new Payload();
6609 }
6610 if (("PayloadGroupRef" == childName))
6611 {
6612 childValue = new PayloadGroupRef();
6613 }
6614 if (("ExePackagePayload" == childName))
6615 {
6616 childValue = new ExePackagePayload();
6617 }
6618 if (("ExitCode" == childName))
6619 {
6620 childValue = new ExitCode();
6621 }
6622 if (("CommandLine" == childName))
6623 {
6624 childValue = new CommandLine();
6625 }
6626 if ((null == childValue))
6627 {
6628 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
6629 }
6630 return childValue;
6631 }
6632
6633 /// <summary>
6634 /// Processes this element and all child elements into an XmlWriter.
6635 /// </summary>
6636 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
6637 public virtual void OutputXml(XmlWriter writer)
6638 {
6639 if ((null == writer))
6640 {
6641 throw new ArgumentNullException("writer");
6642 }
6643 writer.WriteStartElement("ExePackage", "http://wixtoolset.org/schemas/v4/wxs");
6644 if (this.sourceFileFieldSet)
6645 {
6646 writer.WriteAttributeString("SourceFile", this.sourceFileField);
6647 }
6648 if (this.nameFieldSet)
6649 {
6650 writer.WriteAttributeString("Name", this.nameField);
6651 }
6652 if (this.downloadUrlFieldSet)
6653 {
6654 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
6655 }
6656 if (this.idFieldSet)
6657 {
6658 writer.WriteAttributeString("Id", this.idField);
6659 }
6660 if (this.afterFieldSet)
6661 {
6662 writer.WriteAttributeString("After", this.afterField);
6663 }
6664 if (this.installSizeFieldSet)
6665 {
6666 writer.WriteAttributeString("InstallSize", this.installSizeField);
6667 }
6668 if (this.installConditionFieldSet)
6669 {
6670 writer.WriteAttributeString("InstallCondition", this.installConditionField);
6671 }
6672 if (this.cacheFieldSet)
6673 {
6674 if ((this.cacheField == BundleCacheType.force))
6675 {
6676 writer.WriteAttributeString("Cache", "force");
6677 }
6678 if ((this.cacheField == BundleCacheType.remove))
6679 {
6680 writer.WriteAttributeString("Cache", "remove");
6681 }
6682 if ((this.cacheField == BundleCacheType.keep))
6683 {
6684 writer.WriteAttributeString("Cache", "keep");
6685 }
6686 }
6687 if (this.cacheIdFieldSet)
6688 {
6689 writer.WriteAttributeString("CacheId", this.cacheIdField);
6690 }
6691 if (this.displayNameFieldSet)
6692 {
6693 writer.WriteAttributeString("DisplayName", this.displayNameField);
6694 }
6695 if (this.descriptionFieldSet)
6696 {
6697 writer.WriteAttributeString("Description", this.descriptionField);
6698 }
6699 if (this.logPathVariableFieldSet)
6700 {
6701 writer.WriteAttributeString("LogPathVariable", this.logPathVariableField);
6702 }
6703 if (this.rollbackLogPathVariableFieldSet)
6704 {
6705 writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField);
6706 }
6707 if (this.permanentFieldSet)
6708 {
6709 if ((this.permanentField == YesNoType.no))
6710 {
6711 writer.WriteAttributeString("Permanent", "no");
6712 }
6713 if ((this.permanentField == YesNoType.yes))
6714 {
6715 writer.WriteAttributeString("Permanent", "yes");
6716 }
6717 }
6718 if (this.vitalFieldSet)
6719 {
6720 if ((this.vitalField == YesNoType.no))
6721 {
6722 writer.WriteAttributeString("Vital", "no");
6723 }
6724 if ((this.vitalField == YesNoType.yes))
6725 {
6726 writer.WriteAttributeString("Vital", "yes");
6727 }
6728 }
6729 if (this.compressedFieldSet)
6730 {
6731 if ((this.compressedField == YesNoDefaultType.@default))
6732 {
6733 writer.WriteAttributeString("Compressed", "default");
6734 }
6735 if ((this.compressedField == YesNoDefaultType.no))
6736 {
6737 writer.WriteAttributeString("Compressed", "no");
6738 }
6739 if ((this.compressedField == YesNoDefaultType.yes))
6740 {
6741 writer.WriteAttributeString("Compressed", "yes");
6742 }
6743 }
6744 if (this.enableSignatureVerificationFieldSet)
6745 {
6746 if ((this.enableSignatureVerificationField == YesNoType.no))
6747 {
6748 writer.WriteAttributeString("EnableSignatureVerification", "no");
6749 }
6750 if ((this.enableSignatureVerificationField == YesNoType.yes))
6751 {
6752 writer.WriteAttributeString("EnableSignatureVerification", "yes");
6753 }
6754 }
6755 if (this.detectConditionFieldSet)
6756 {
6757 writer.WriteAttributeString("DetectCondition", this.detectConditionField);
6758 }
6759 if (this.installCommandFieldSet)
6760 {
6761 writer.WriteAttributeString("InstallCommand", this.installCommandField);
6762 }
6763 if (this.repairCommandFieldSet)
6764 {
6765 writer.WriteAttributeString("RepairCommand", this.repairCommandField);
6766 }
6767 if (this.uninstallCommandFieldSet)
6768 {
6769 writer.WriteAttributeString("UninstallCommand", this.uninstallCommandField);
6770 }
6771 if (this.perMachineFieldSet)
6772 {
6773 if ((this.perMachineField == YesNoDefaultType.@default))
6774 {
6775 writer.WriteAttributeString("PerMachine", "default");
6776 }
6777 if ((this.perMachineField == YesNoDefaultType.no))
6778 {
6779 writer.WriteAttributeString("PerMachine", "no");
6780 }
6781 if ((this.perMachineField == YesNoDefaultType.yes))
6782 {
6783 writer.WriteAttributeString("PerMachine", "yes");
6784 }
6785 }
6786 if (this.protocolFieldSet)
6787 {
6788 if ((this.protocolField == BurnExeProtocolType.none))
6789 {
6790 writer.WriteAttributeString("Protocol", "none");
6791 }
6792 if ((this.protocolField == BurnExeProtocolType.burn))
6793 {
6794 writer.WriteAttributeString("Protocol", "burn");
6795 }
6796 if ((this.protocolField == BurnExeProtocolType.netfx4))
6797 {
6798 writer.WriteAttributeString("Protocol", "netfx4");
6799 }
6800 }
6801 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
6802 {
6803 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
6804 childElement.OutputXml(writer);
6805 }
6806 writer.WriteEndElement();
6807 }
6808
6809 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
6810 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
6811 void ISetAttributes.SetAttribute(string name, string value)
6812 {
6813 if (String.IsNullOrEmpty(name))
6814 {
6815 throw new ArgumentNullException("name");
6816 }
6817 if (("SourceFile" == name))
6818 {
6819 this.sourceFileField = value;
6820 this.sourceFileFieldSet = true;
6821 }
6822 if (("Name" == name))
6823 {
6824 this.nameField = value;
6825 this.nameFieldSet = true;
6826 }
6827 if (("DownloadUrl" == name))
6828 {
6829 this.downloadUrlField = value;
6830 this.downloadUrlFieldSet = true;
6831 }
6832 if (("Id" == name))
6833 {
6834 this.idField = value;
6835 this.idFieldSet = true;
6836 }
6837 if (("After" == name))
6838 {
6839 this.afterField = value;
6840 this.afterFieldSet = true;
6841 }
6842 if (("InstallSize" == name))
6843 {
6844 this.installSizeField = value;
6845 this.installSizeFieldSet = true;
6846 }
6847 if (("InstallCondition" == name))
6848 {
6849 this.installConditionField = value;
6850 this.installConditionFieldSet = true;
6851 }
6852 if (("Cache" == name))
6853 {
6854 this.cacheField = Enums.ParseBundleCacheType(value);
6855 this.cacheFieldSet = true;
6856 }
6857 if (("CacheId" == name))
6858 {
6859 this.cacheIdField = value;
6860 this.cacheIdFieldSet = true;
6861 }
6862 if (("DisplayName" == name))
6863 {
6864 this.displayNameField = value;
6865 this.displayNameFieldSet = true;
6866 }
6867 if (("Description" == name))
6868 {
6869 this.descriptionField = value;
6870 this.descriptionFieldSet = true;
6871 }
6872 if (("LogPathVariable" == name))
6873 {
6874 this.logPathVariableField = value;
6875 this.logPathVariableFieldSet = true;
6876 }
6877 if (("RollbackLogPathVariable" == name))
6878 {
6879 this.rollbackLogPathVariableField = value;
6880 this.rollbackLogPathVariableFieldSet = true;
6881 }
6882 if (("Permanent" == name))
6883 {
6884 this.permanentField = Enums.ParseYesNoType(value);
6885 this.permanentFieldSet = true;
6886 }
6887 if (("Vital" == name))
6888 {
6889 this.vitalField = Enums.ParseYesNoType(value);
6890 this.vitalFieldSet = true;
6891 }
6892 if (("Compressed" == name))
6893 {
6894 this.compressedField = Enums.ParseYesNoDefaultType(value);
6895 this.compressedFieldSet = true;
6896 }
6897 if (("EnableSignatureVerification" == name))
6898 {
6899 this.enableSignatureVerificationField = Enums.ParseYesNoType(value);
6900 this.enableSignatureVerificationFieldSet = true;
6901 }
6902 if (("DetectCondition" == name))
6903 {
6904 this.detectConditionField = value;
6905 this.detectConditionFieldSet = true;
6906 }
6907 if (("InstallCommand" == name))
6908 {
6909 this.installCommandField = value;
6910 this.installCommandFieldSet = true;
6911 }
6912 if (("RepairCommand" == name))
6913 {
6914 this.repairCommandField = value;
6915 this.repairCommandFieldSet = true;
6916 }
6917 if (("UninstallCommand" == name))
6918 {
6919 this.uninstallCommandField = value;
6920 this.uninstallCommandFieldSet = true;
6921 }
6922 if (("PerMachine" == name))
6923 {
6924 this.perMachineField = Enums.ParseYesNoDefaultType(value);
6925 this.perMachineFieldSet = true;
6926 }
6927 if (("Protocol" == name))
6928 {
6929 this.protocolField = Enums.ParseBurnExeProtocolType(value);
6930 this.protocolFieldSet = true;
6931 }
6932 }
6933 }
6934
6935 /// <summary>
6936 /// Describes a rollback boundary in the chain.
6937 /// </summary>
6938 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
6939 public class RollbackBoundary : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
6940 {
6941
6942 private ElementCollection children;
6943
6944 private string idField;
6945
6946 private bool idFieldSet;
6947
6948 private YesNoType vitalField;
6949
6950 private bool vitalFieldSet;
6951
6952 private YesNoType transactionField;
6953
6954 private bool transactionFieldSet;
6955
6956 private ISchemaElement parentElement;
6957
6958 public RollbackBoundary()
6959 {
6960 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
6961 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
6962 this.children = childCollection0;
6963 }
6964
6965 public virtual IEnumerable Children
6966 {
6967 get
6968 {
6969 return this.children;
6970 }
6971 }
6972
6973 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
6974 public virtual IEnumerable this[System.Type childType]
6975 {
6976 get
6977 {
6978 return this.children.Filter(childType);
6979 }
6980 }
6981
6982 /// <summary>
6983 /// Identifier for this rollback boundary, for ordering and cross-referencing. If this attribute is
6984 /// not provided a stable identifier will be generated.
6985 /// </summary>
6986 public string Id
6987 {
6988 get
6989 {
6990 return this.idField;
6991 }
6992 set
6993 {
6994 this.idFieldSet = true;
6995 this.idField = value;
6996 }
6997 }
6998
6999 /// <summary>
7000 /// Specifies whether the rollback boundary aborts the chain. The default "yes" indicates that if
7001 /// the rollback boundary is encountered then the chain will fail and rollback or stop. If "no"
7002 /// is specified then the chain should continue successfuly at the next rollback boundary.
7003 /// </summary>
7004 public YesNoType Vital
7005 {
7006 get
7007 {
7008 return this.vitalField;
7009 }
7010 set
7011 {
7012 this.vitalFieldSet = true;
7013 this.vitalField = value;
7014 }
7015 }
7016
7017 /// <summary>
7018 /// Specifies whether the rollback boundary is wrapped in an MSI transaction. The default is "no"
7019 /// </summary>
7020 public YesNoType Transaction
7021 {
7022 get
7023 {
7024 return this.transactionField;
7025 }
7026 set
7027 {
7028 this.transactionFieldSet = true;
7029 this.transactionField = value;
7030 }
7031 }
7032
7033 public virtual ISchemaElement ParentElement
7034 {
7035 get
7036 {
7037 return this.parentElement;
7038 }
7039 set
7040 {
7041 this.parentElement = value;
7042 }
7043 }
7044
7045 public virtual void AddChild(ISchemaElement child)
7046 {
7047 if ((null == child))
7048 {
7049 throw new ArgumentNullException("child");
7050 }
7051 this.children.AddElement(child);
7052 child.ParentElement = this;
7053 }
7054
7055 public virtual void RemoveChild(ISchemaElement child)
7056 {
7057 if ((null == child))
7058 {
7059 throw new ArgumentNullException("child");
7060 }
7061 this.children.RemoveElement(child);
7062 child.ParentElement = null;
7063 }
7064
7065 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7066 ISchemaElement ICreateChildren.CreateChild(string childName)
7067 {
7068 if (String.IsNullOrEmpty(childName))
7069 {
7070 throw new ArgumentNullException("childName");
7071 }
7072 ISchemaElement childValue = null;
7073 if ((null == childValue))
7074 {
7075 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
7076 }
7077 return childValue;
7078 }
7079
7080 /// <summary>
7081 /// Processes this element and all child elements into an XmlWriter.
7082 /// </summary>
7083 public virtual void OutputXml(XmlWriter writer)
7084 {
7085 if ((null == writer))
7086 {
7087 throw new ArgumentNullException("writer");
7088 }
7089 writer.WriteStartElement("RollbackBoundary", "http://wixtoolset.org/schemas/v4/wxs");
7090 if (this.idFieldSet)
7091 {
7092 writer.WriteAttributeString("Id", this.idField);
7093 }
7094 if (this.vitalFieldSet)
7095 {
7096 if ((this.vitalField == YesNoType.no))
7097 {
7098 writer.WriteAttributeString("Vital", "no");
7099 }
7100 if ((this.vitalField == YesNoType.yes))
7101 {
7102 writer.WriteAttributeString("Vital", "yes");
7103 }
7104 }
7105 if (this.transactionFieldSet)
7106 {
7107 if ((this.transactionField == YesNoType.no))
7108 {
7109 writer.WriteAttributeString("Transaction", "no");
7110 }
7111 if ((this.transactionField == YesNoType.yes))
7112 {
7113 writer.WriteAttributeString("Transaction", "yes");
7114 }
7115 }
7116 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
7117 {
7118 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
7119 childElement.OutputXml(writer);
7120 }
7121 writer.WriteEndElement();
7122 }
7123
7124 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7125 void ISetAttributes.SetAttribute(string name, string value)
7126 {
7127 if (String.IsNullOrEmpty(name))
7128 {
7129 throw new ArgumentNullException("name");
7130 }
7131 if (("Id" == name))
7132 {
7133 this.idField = value;
7134 this.idFieldSet = true;
7135 }
7136 if (("Vital" == name))
7137 {
7138 this.vitalField = Enums.ParseYesNoType(value);
7139 this.vitalFieldSet = true;
7140 }
7141 if (("Transaction" == name))
7142 {
7143 this.transactionField = Enums.ParseYesNoType(value);
7144 this.transactionFieldSet = true;
7145 }
7146 }
7147 }
7148
7149 /// <summary>
7150 /// Describes a package group to a bootstrapper.
7151 /// </summary>
7152 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7153 public class PackageGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
7154 {
7155
7156 private ElementCollection children;
7157
7158 private string idField;
7159
7160 private bool idFieldSet;
7161
7162 private ISchemaElement parentElement;
7163
7164 public PackageGroup()
7165 {
7166 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
7167 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPackage)));
7168 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MspPackage)));
7169 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackage)));
7170 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackage)));
7171 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RollbackBoundary)));
7172 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef)));
7173 this.children = childCollection0;
7174 }
7175
7176 public virtual IEnumerable Children
7177 {
7178 get
7179 {
7180 return this.children;
7181 }
7182 }
7183
7184 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
7185 public virtual IEnumerable this[System.Type childType]
7186 {
7187 get
7188 {
7189 return this.children.Filter(childType);
7190 }
7191 }
7192
7193 /// <summary>
7194 /// Identifier for package group.
7195 /// </summary>
7196 public string Id
7197 {
7198 get
7199 {
7200 return this.idField;
7201 }
7202 set
7203 {
7204 this.idFieldSet = true;
7205 this.idField = value;
7206 }
7207 }
7208
7209 public virtual ISchemaElement ParentElement
7210 {
7211 get
7212 {
7213 return this.parentElement;
7214 }
7215 set
7216 {
7217 this.parentElement = value;
7218 }
7219 }
7220
7221 public virtual void AddChild(ISchemaElement child)
7222 {
7223 if ((null == child))
7224 {
7225 throw new ArgumentNullException("child");
7226 }
7227 this.children.AddElement(child);
7228 child.ParentElement = this;
7229 }
7230
7231 public virtual void RemoveChild(ISchemaElement child)
7232 {
7233 if ((null == child))
7234 {
7235 throw new ArgumentNullException("child");
7236 }
7237 this.children.RemoveElement(child);
7238 child.ParentElement = null;
7239 }
7240
7241 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7242 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
7243 ISchemaElement ICreateChildren.CreateChild(string childName)
7244 {
7245 if (String.IsNullOrEmpty(childName))
7246 {
7247 throw new ArgumentNullException("childName");
7248 }
7249 ISchemaElement childValue = null;
7250 if (("MsiPackage" == childName))
7251 {
7252 childValue = new MsiPackage();
7253 }
7254 if (("MspPackage" == childName))
7255 {
7256 childValue = new MspPackage();
7257 }
7258 if (("MsuPackage" == childName))
7259 {
7260 childValue = new MsuPackage();
7261 }
7262 if (("ExePackage" == childName))
7263 {
7264 childValue = new ExePackage();
7265 }
7266 if (("RollbackBoundary" == childName))
7267 {
7268 childValue = new RollbackBoundary();
7269 }
7270 if (("PackageGroupRef" == childName))
7271 {
7272 childValue = new PackageGroupRef();
7273 }
7274 if ((null == childValue))
7275 {
7276 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
7277 }
7278 return childValue;
7279 }
7280
7281 /// <summary>
7282 /// Processes this element and all child elements into an XmlWriter.
7283 /// </summary>
7284 public virtual void OutputXml(XmlWriter writer)
7285 {
7286 if ((null == writer))
7287 {
7288 throw new ArgumentNullException("writer");
7289 }
7290 writer.WriteStartElement("PackageGroup", "http://wixtoolset.org/schemas/v4/wxs");
7291 if (this.idFieldSet)
7292 {
7293 writer.WriteAttributeString("Id", this.idField);
7294 }
7295 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
7296 {
7297 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
7298 childElement.OutputXml(writer);
7299 }
7300 writer.WriteEndElement();
7301 }
7302
7303 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7304 void ISetAttributes.SetAttribute(string name, string value)
7305 {
7306 if (String.IsNullOrEmpty(name))
7307 {
7308 throw new ArgumentNullException("name");
7309 }
7310 if (("Id" == name))
7311 {
7312 this.idField = value;
7313 this.idFieldSet = true;
7314 }
7315 }
7316 }
7317
7318 /// <summary>
7319 /// Create a reference to PackageGroup element that exists inside a Bundle or Fragment element.
7320 /// </summary>
7321 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7322 public class PackageGroupRef : ISchemaElement, ISetAttributes
7323 {
7324
7325 private string idField;
7326
7327 private bool idFieldSet;
7328
7329 private string afterField;
7330
7331 private bool afterFieldSet;
7332
7333 private ISchemaElement parentElement;
7334
7335 /// <summary>
7336 /// The identifier of the PackageGroup element to reference.
7337 /// </summary>
7338 public string Id
7339 {
7340 get
7341 {
7342 return this.idField;
7343 }
7344 set
7345 {
7346 this.idFieldSet = true;
7347 this.idField = value;
7348 }
7349 }
7350
7351 /// <summary>
7352 /// The identifier of a package that this group should be installed after.
7353 /// </summary>
7354 public string After
7355 {
7356 get
7357 {
7358 return this.afterField;
7359 }
7360 set
7361 {
7362 this.afterFieldSet = true;
7363 this.afterField = value;
7364 }
7365 }
7366
7367 public virtual ISchemaElement ParentElement
7368 {
7369 get
7370 {
7371 return this.parentElement;
7372 }
7373 set
7374 {
7375 this.parentElement = value;
7376 }
7377 }
7378
7379 /// <summary>
7380 /// Processes this element and all child elements into an XmlWriter.
7381 /// </summary>
7382 public virtual void OutputXml(XmlWriter writer)
7383 {
7384 if ((null == writer))
7385 {
7386 throw new ArgumentNullException("writer");
7387 }
7388 writer.WriteStartElement("PackageGroupRef", "http://wixtoolset.org/schemas/v4/wxs");
7389 if (this.idFieldSet)
7390 {
7391 writer.WriteAttributeString("Id", this.idField);
7392 }
7393 if (this.afterFieldSet)
7394 {
7395 writer.WriteAttributeString("After", this.afterField);
7396 }
7397 writer.WriteEndElement();
7398 }
7399
7400 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7401 void ISetAttributes.SetAttribute(string name, string value)
7402 {
7403 if (String.IsNullOrEmpty(name))
7404 {
7405 throw new ArgumentNullException("name");
7406 }
7407 if (("Id" == name))
7408 {
7409 this.idField = value;
7410 this.idFieldSet = true;
7411 }
7412 if (("After" == name))
7413 {
7414 this.afterField = value;
7415 this.afterFieldSet = true;
7416 }
7417 }
7418 }
7419
7420 /// <summary>
7421 /// Allows an MSI property to be set based on the value of a burn engine expression.
7422 /// </summary>
7423 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7424 public class MsiProperty : ISchemaElement, ISetAttributes
7425 {
7426
7427 private string nameField;
7428
7429 private bool nameFieldSet;
7430
7431 private string valueField;
7432
7433 private bool valueFieldSet;
7434
7435 private ISchemaElement parentElement;
7436
7437 /// <summary>
7438 /// 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
7439 /// </summary>
7440 public string Name
7441 {
7442 get
7443 {
7444 return this.nameField;
7445 }
7446 set
7447 {
7448 this.nameFieldSet = true;
7449 this.nameField = value;
7450 }
7451 }
7452
7453 /// <summary>
7454 /// 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.
7455 /// </summary>
7456 public string Value
7457 {
7458 get
7459 {
7460 return this.valueField;
7461 }
7462 set
7463 {
7464 this.valueFieldSet = true;
7465 this.valueField = value;
7466 }
7467 }
7468
7469 public virtual ISchemaElement ParentElement
7470 {
7471 get
7472 {
7473 return this.parentElement;
7474 }
7475 set
7476 {
7477 this.parentElement = value;
7478 }
7479 }
7480
7481 /// <summary>
7482 /// Processes this element and all child elements into an XmlWriter.
7483 /// </summary>
7484 public virtual void OutputXml(XmlWriter writer)
7485 {
7486 if ((null == writer))
7487 {
7488 throw new ArgumentNullException("writer");
7489 }
7490 writer.WriteStartElement("MsiProperty", "http://wixtoolset.org/schemas/v4/wxs");
7491 if (this.nameFieldSet)
7492 {
7493 writer.WriteAttributeString("Name", this.nameField);
7494 }
7495 if (this.valueFieldSet)
7496 {
7497 writer.WriteAttributeString("Value", this.valueField);
7498 }
7499 writer.WriteEndElement();
7500 }
7501
7502 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7503 void ISetAttributes.SetAttribute(string name, string value)
7504 {
7505 if (String.IsNullOrEmpty(name))
7506 {
7507 throw new ArgumentNullException("name");
7508 }
7509 if (("Name" == name))
7510 {
7511 this.nameField = value;
7512 this.nameFieldSet = true;
7513 }
7514 if (("Value" == name))
7515 {
7516 this.valueField = value;
7517 this.valueFieldSet = true;
7518 }
7519 }
7520 }
7521
7522 /// <summary>
7523 /// Specifies a patch included in the same bundle that is installed when the parent MSI package is installed.
7524 /// </summary>
7525 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7526 public class SlipstreamMsp : ISchemaElement, ISetAttributes
7527 {
7528
7529 private string idField;
7530
7531 private bool idFieldSet;
7532
7533 private ISchemaElement parentElement;
7534
7535 /// <summary>
7536 /// The identifier for a MspPackage in the bundle.
7537 /// </summary>
7538 public string Id
7539 {
7540 get
7541 {
7542 return this.idField;
7543 }
7544 set
7545 {
7546 this.idFieldSet = true;
7547 this.idField = value;
7548 }
7549 }
7550
7551 public virtual ISchemaElement ParentElement
7552 {
7553 get
7554 {
7555 return this.parentElement;
7556 }
7557 set
7558 {
7559 this.parentElement = value;
7560 }
7561 }
7562
7563 /// <summary>
7564 /// Processes this element and all child elements into an XmlWriter.
7565 /// </summary>
7566 public virtual void OutputXml(XmlWriter writer)
7567 {
7568 if ((null == writer))
7569 {
7570 throw new ArgumentNullException("writer");
7571 }
7572 writer.WriteStartElement("SlipstreamMsp", "http://wixtoolset.org/schemas/v4/wxs");
7573 if (this.idFieldSet)
7574 {
7575 writer.WriteAttributeString("Id", this.idField);
7576 }
7577 writer.WriteEndElement();
7578 }
7579
7580 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7581 void ISetAttributes.SetAttribute(string name, string value)
7582 {
7583 if (String.IsNullOrEmpty(name))
7584 {
7585 throw new ArgumentNullException("name");
7586 }
7587 if (("Id" == name))
7588 {
7589 this.idField = value;
7590 this.idFieldSet = true;
7591 }
7592 }
7593 }
7594
7595 /// <summary>
7596 /// Describes a burn engine variable to define.
7597 /// </summary>
7598 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7599 public class Variable : ISchemaElement, ISetAttributes
7600 {
7601
7602 private YesNoType hiddenField;
7603
7604 private bool hiddenFieldSet;
7605
7606 private string nameField;
7607
7608 private bool nameFieldSet;
7609
7610 private YesNoType persistedField;
7611
7612 private bool persistedFieldSet;
7613
7614 private string valueField;
7615
7616 private bool valueFieldSet;
7617
7618 private TypeType typeField;
7619
7620 private bool typeFieldSet;
7621
7622 private ISchemaElement parentElement;
7623
7624 /// <summary>
7625 /// Whether the value of the variable should be hidden.
7626 /// </summary>
7627 public YesNoType Hidden
7628 {
7629 get
7630 {
7631 return this.hiddenField;
7632 }
7633 set
7634 {
7635 this.hiddenFieldSet = true;
7636 this.hiddenField = value;
7637 }
7638 }
7639
7640 /// <summary>
7641 /// The name for the variable.
7642 /// </summary>
7643 public string Name
7644 {
7645 get
7646 {
7647 return this.nameField;
7648 }
7649 set
7650 {
7651 this.nameFieldSet = true;
7652 this.nameField = value;
7653 }
7654 }
7655
7656 /// <summary>
7657 /// Whether the variable should be persisted.
7658 /// </summary>
7659 public YesNoType Persisted
7660 {
7661 get
7662 {
7663 return this.persistedField;
7664 }
7665 set
7666 {
7667 this.persistedFieldSet = true;
7668 this.persistedField = value;
7669 }
7670 }
7671
7672 /// <summary>
7673 /// Starting value for the variable.
7674 /// </summary>
7675 public string Value
7676 {
7677 get
7678 {
7679 return this.valueField;
7680 }
7681 set
7682 {
7683 this.valueFieldSet = true;
7684 this.valueField = value;
7685 }
7686 }
7687
7688 /// <summary>
7689 /// Type of the variable, inferred from the value if not specified.
7690 /// </summary>
7691 public TypeType Type
7692 {
7693 get
7694 {
7695 return this.typeField;
7696 }
7697 set
7698 {
7699 this.typeFieldSet = true;
7700 this.typeField = value;
7701 }
7702 }
7703
7704 public virtual ISchemaElement ParentElement
7705 {
7706 get
7707 {
7708 return this.parentElement;
7709 }
7710 set
7711 {
7712 this.parentElement = value;
7713 }
7714 }
7715
7716 /// <summary>
7717 /// Parses a TypeType from a string.
7718 /// </summary>
7719 public static TypeType ParseTypeType(string value)
7720 {
7721 TypeType parsedValue;
7722 Variable.TryParseTypeType(value, out parsedValue);
7723 return parsedValue;
7724 }
7725
7726 /// <summary>
7727 /// Tries to parse a TypeType from a string.
7728 /// </summary>
7729 public static bool TryParseTypeType(string value, out TypeType parsedValue)
7730 {
7731 parsedValue = TypeType.NotSet;
7732 if (string.IsNullOrEmpty(value))
7733 {
7734 return false;
7735 }
7736 if (("string" == value))
7737 {
7738 parsedValue = TypeType.@string;
7739 }
7740 else
7741 {
7742 if (("numeric" == value))
7743 {
7744 parsedValue = TypeType.numeric;
7745 }
7746 else
7747 {
7748 if (("version" == value))
7749 {
7750 parsedValue = TypeType.version;
7751 }
7752 else
7753 {
7754 parsedValue = TypeType.IllegalValue;
7755 return false;
7756 }
7757 }
7758 }
7759 return true;
7760 }
7761
7762 /// <summary>
7763 /// Processes this element and all child elements into an XmlWriter.
7764 /// </summary>
7765 public virtual void OutputXml(XmlWriter writer)
7766 {
7767 if ((null == writer))
7768 {
7769 throw new ArgumentNullException("writer");
7770 }
7771 writer.WriteStartElement("Variable", "http://wixtoolset.org/schemas/v4/wxs");
7772 if (this.hiddenFieldSet)
7773 {
7774 if ((this.hiddenField == YesNoType.no))
7775 {
7776 writer.WriteAttributeString("Hidden", "no");
7777 }
7778 if ((this.hiddenField == YesNoType.yes))
7779 {
7780 writer.WriteAttributeString("Hidden", "yes");
7781 }
7782 }
7783 if (this.nameFieldSet)
7784 {
7785 writer.WriteAttributeString("Name", this.nameField);
7786 }
7787 if (this.persistedFieldSet)
7788 {
7789 if ((this.persistedField == YesNoType.no))
7790 {
7791 writer.WriteAttributeString("Persisted", "no");
7792 }
7793 if ((this.persistedField == YesNoType.yes))
7794 {
7795 writer.WriteAttributeString("Persisted", "yes");
7796 }
7797 }
7798 if (this.valueFieldSet)
7799 {
7800 writer.WriteAttributeString("Value", this.valueField);
7801 }
7802 if (this.typeFieldSet)
7803 {
7804 if ((this.typeField == TypeType.@string))
7805 {
7806 writer.WriteAttributeString("Type", "string");
7807 }
7808 if ((this.typeField == TypeType.numeric))
7809 {
7810 writer.WriteAttributeString("Type", "numeric");
7811 }
7812 if ((this.typeField == TypeType.version))
7813 {
7814 writer.WriteAttributeString("Type", "version");
7815 }
7816 }
7817 writer.WriteEndElement();
7818 }
7819
7820 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
7821 void ISetAttributes.SetAttribute(string name, string value)
7822 {
7823 if (String.IsNullOrEmpty(name))
7824 {
7825 throw new ArgumentNullException("name");
7826 }
7827 if (("Hidden" == name))
7828 {
7829 this.hiddenField = Enums.ParseYesNoType(value);
7830 this.hiddenFieldSet = true;
7831 }
7832 if (("Name" == name))
7833 {
7834 this.nameField = value;
7835 this.nameFieldSet = true;
7836 }
7837 if (("Persisted" == name))
7838 {
7839 this.persistedField = Enums.ParseYesNoType(value);
7840 this.persistedFieldSet = true;
7841 }
7842 if (("Value" == name))
7843 {
7844 this.valueField = value;
7845 this.valueFieldSet = true;
7846 }
7847 if (("Type" == name))
7848 {
7849 this.typeField = Variable.ParseTypeType(value);
7850 this.typeFieldSet = true;
7851 }
7852 }
7853
7854 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7855 public enum TypeType
7856 {
7857
7858 IllegalValue = int.MaxValue,
7859
7860 NotSet = -1,
7861
7862 @string,
7863
7864 numeric,
7865
7866 version,
7867 }
7868 }
7869
7870 /// <summary>
7871 /// Representation of a file that contains one or more files.
7872 /// </summary>
7873 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
7874 public class Container : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
7875 {
7876
7877 private ElementCollection children;
7878
7879 private string downloadUrlField;
7880
7881 private bool downloadUrlFieldSet;
7882
7883 private string idField;
7884
7885 private bool idFieldSet;
7886
7887 private string nameField;
7888
7889 private bool nameFieldSet;
7890
7891 private BurnContainerType typeField;
7892
7893 private bool typeFieldSet;
7894
7895 private ISchemaElement parentElement;
7896
7897 public Container()
7898 {
7899 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
7900 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef)));
7901 this.children = childCollection0;
7902 }
7903
7904 public virtual IEnumerable Children
7905 {
7906 get
7907 {
7908 return this.children;
7909 }
7910 }
7911
7912 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
7913 public virtual IEnumerable this[System.Type childType]
7914 {
7915 get
7916 {
7917 return this.children.Filter(childType);
7918 }
7919 }
7920
7921 public string DownloadUrl
7922 {
7923 get
7924 {
7925 return this.downloadUrlField;
7926 }
7927 set
7928 {
7929 this.downloadUrlFieldSet = true;
7930 this.downloadUrlField = value;
7931 }
7932 }
7933
7934 /// <summary>
7935 /// The unique identifier for the container. If this attribute is not specified the Name attribute will be used.
7936 /// </summary>
7937 public string Id
7938 {
7939 get
7940 {
7941 return this.idField;
7942 }
7943 set
7944 {
7945 this.idFieldSet = true;
7946 this.idField = value;
7947 }
7948 }
7949
7950 /// <summary>
7951 /// The file name for this container. A relative path may be provided to place the container in a sub-folder of the bundle.
7952 /// </summary>
7953 public string Name
7954 {
7955 get
7956 {
7957 return this.nameField;
7958 }
7959 set
7960 {
7961 this.nameFieldSet = true;
7962 this.nameField = value;
7963 }
7964 }
7965
7966 /// <summary>
7967 /// Indicates whether the container is "attached" to the bundle executable or placed external to the bundle extecutable as "detached". If
7968 /// this attribute is not specified, the default is to create a detached container.
7969 /// </summary>
7970 public BurnContainerType Type
7971 {
7972 get
7973 {
7974 return this.typeField;
7975 }
7976 set
7977 {
7978 this.typeFieldSet = true;
7979 this.typeField = value;
7980 }
7981 }
7982
7983 public virtual ISchemaElement ParentElement
7984 {
7985 get
7986 {
7987 return this.parentElement;
7988 }
7989 set
7990 {
7991 this.parentElement = value;
7992 }
7993 }
7994
7995 public virtual void AddChild(ISchemaElement child)
7996 {
7997 if ((null == child))
7998 {
7999 throw new ArgumentNullException("child");
8000 }
8001 this.children.AddElement(child);
8002 child.ParentElement = this;
8003 }
8004
8005 public virtual void RemoveChild(ISchemaElement child)
8006 {
8007 if ((null == child))
8008 {
8009 throw new ArgumentNullException("child");
8010 }
8011 this.children.RemoveElement(child);
8012 child.ParentElement = null;
8013 }
8014
8015 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8016 ISchemaElement ICreateChildren.CreateChild(string childName)
8017 {
8018 if (String.IsNullOrEmpty(childName))
8019 {
8020 throw new ArgumentNullException("childName");
8021 }
8022 ISchemaElement childValue = null;
8023 if (("PackageGroupRef" == childName))
8024 {
8025 childValue = new PackageGroupRef();
8026 }
8027 if ((null == childValue))
8028 {
8029 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
8030 }
8031 return childValue;
8032 }
8033
8034 /// <summary>
8035 /// Processes this element and all child elements into an XmlWriter.
8036 /// </summary>
8037 public virtual void OutputXml(XmlWriter writer)
8038 {
8039 if ((null == writer))
8040 {
8041 throw new ArgumentNullException("writer");
8042 }
8043 writer.WriteStartElement("Container", "http://wixtoolset.org/schemas/v4/wxs");
8044 if (this.downloadUrlFieldSet)
8045 {
8046 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
8047 }
8048 if (this.idFieldSet)
8049 {
8050 writer.WriteAttributeString("Id", this.idField);
8051 }
8052 if (this.nameFieldSet)
8053 {
8054 writer.WriteAttributeString("Name", this.nameField);
8055 }
8056 if (this.typeFieldSet)
8057 {
8058 if ((this.typeField == BurnContainerType.attached))
8059 {
8060 writer.WriteAttributeString("Type", "attached");
8061 }
8062 if ((this.typeField == BurnContainerType.detached))
8063 {
8064 writer.WriteAttributeString("Type", "detached");
8065 }
8066 }
8067 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
8068 {
8069 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
8070 childElement.OutputXml(writer);
8071 }
8072 writer.WriteEndElement();
8073 }
8074
8075 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8076 void ISetAttributes.SetAttribute(string name, string value)
8077 {
8078 if (String.IsNullOrEmpty(name))
8079 {
8080 throw new ArgumentNullException("name");
8081 }
8082 if (("DownloadUrl" == name))
8083 {
8084 this.downloadUrlField = value;
8085 this.downloadUrlFieldSet = true;
8086 }
8087 if (("Id" == name))
8088 {
8089 this.idField = value;
8090 this.idFieldSet = true;
8091 }
8092 if (("Name" == name))
8093 {
8094 this.nameField = value;
8095 this.nameFieldSet = true;
8096 }
8097 if (("Type" == name))
8098 {
8099 this.typeField = Enums.ParseBurnContainerType(value);
8100 this.typeFieldSet = true;
8101 }
8102 }
8103 }
8104
8105 /// <summary>
8106 /// Create a reference to an existing Container element.
8107 /// </summary>
8108 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8109 public class ContainerRef : ISchemaElement, ISetAttributes
8110 {
8111
8112 private string idField;
8113
8114 private bool idFieldSet;
8115
8116 private ISchemaElement parentElement;
8117
8118 /// <summary>
8119 /// The identifier of Container element to reference.
8120 /// </summary>
8121 public string Id
8122 {
8123 get
8124 {
8125 return this.idField;
8126 }
8127 set
8128 {
8129 this.idFieldSet = true;
8130 this.idField = value;
8131 }
8132 }
8133
8134 public virtual ISchemaElement ParentElement
8135 {
8136 get
8137 {
8138 return this.parentElement;
8139 }
8140 set
8141 {
8142 this.parentElement = value;
8143 }
8144 }
8145
8146 /// <summary>
8147 /// Processes this element and all child elements into an XmlWriter.
8148 /// </summary>
8149 public virtual void OutputXml(XmlWriter writer)
8150 {
8151 if ((null == writer))
8152 {
8153 throw new ArgumentNullException("writer");
8154 }
8155 writer.WriteStartElement("ContainerRef", "http://wixtoolset.org/schemas/v4/wxs");
8156 if (this.idFieldSet)
8157 {
8158 writer.WriteAttributeString("Id", this.idField);
8159 }
8160 writer.WriteEndElement();
8161 }
8162
8163 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8164 void ISetAttributes.SetAttribute(string name, string value)
8165 {
8166 if (String.IsNullOrEmpty(name))
8167 {
8168 throw new ArgumentNullException("name");
8169 }
8170 if (("Id" == name))
8171 {
8172 this.idField = value;
8173 this.idFieldSet = true;
8174 }
8175 }
8176 }
8177
8178 /// <summary>
8179 /// Describes map of exit code returned from executable package to a bootstrapper behavior.
8180 /// </summary>
8181 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8182 public class ExitCode : ISchemaElement, ISetAttributes
8183 {
8184
8185 private int valueField;
8186
8187 private bool valueFieldSet;
8188
8189 private BehaviorType behaviorField;
8190
8191 private bool behaviorFieldSet;
8192
8193 private ISchemaElement parentElement;
8194
8195 /// <summary>
8196 /// Exit code returned from executable package. If no value is provided it means all values not explicitly set default to this behavior.
8197 /// </summary>
8198 public int Value
8199 {
8200 get
8201 {
8202 return this.valueField;
8203 }
8204 set
8205 {
8206 this.valueFieldSet = true;
8207 this.valueField = value;
8208 }
8209 }
8210
8211 /// <summary>
8212 /// Choose one of the supported behaviors error codes: success, error, scheduleReboot, forceReboot.
8213 /// </summary>
8214 public BehaviorType Behavior
8215 {
8216 get
8217 {
8218 return this.behaviorField;
8219 }
8220 set
8221 {
8222 this.behaviorFieldSet = true;
8223 this.behaviorField = value;
8224 }
8225 }
8226
8227 public virtual ISchemaElement ParentElement
8228 {
8229 get
8230 {
8231 return this.parentElement;
8232 }
8233 set
8234 {
8235 this.parentElement = value;
8236 }
8237 }
8238
8239 /// <summary>
8240 /// Parses a BehaviorType from a string.
8241 /// </summary>
8242 public static BehaviorType ParseBehaviorType(string value)
8243 {
8244 BehaviorType parsedValue;
8245 ExitCode.TryParseBehaviorType(value, out parsedValue);
8246 return parsedValue;
8247 }
8248
8249 /// <summary>
8250 /// Tries to parse a BehaviorType from a string.
8251 /// </summary>
8252 public static bool TryParseBehaviorType(string value, out BehaviorType parsedValue)
8253 {
8254 parsedValue = BehaviorType.NotSet;
8255 if (string.IsNullOrEmpty(value))
8256 {
8257 return false;
8258 }
8259 if (("success" == value))
8260 {
8261 parsedValue = BehaviorType.success;
8262 }
8263 else
8264 {
8265 if (("error" == value))
8266 {
8267 parsedValue = BehaviorType.error;
8268 }
8269 else
8270 {
8271 if (("scheduleReboot" == value))
8272 {
8273 parsedValue = BehaviorType.scheduleReboot;
8274 }
8275 else
8276 {
8277 if (("forceReboot" == value))
8278 {
8279 parsedValue = BehaviorType.forceReboot;
8280 }
8281 else
8282 {
8283 parsedValue = BehaviorType.IllegalValue;
8284 return false;
8285 }
8286 }
8287 }
8288 }
8289 return true;
8290 }
8291
8292 /// <summary>
8293 /// Processes this element and all child elements into an XmlWriter.
8294 /// </summary>
8295 public virtual void OutputXml(XmlWriter writer)
8296 {
8297 if ((null == writer))
8298 {
8299 throw new ArgumentNullException("writer");
8300 }
8301 writer.WriteStartElement("ExitCode", "http://wixtoolset.org/schemas/v4/wxs");
8302 if (this.valueFieldSet)
8303 {
8304 writer.WriteAttributeString("Value", this.valueField.ToString(CultureInfo.InvariantCulture));
8305 }
8306 if (this.behaviorFieldSet)
8307 {
8308 if ((this.behaviorField == BehaviorType.success))
8309 {
8310 writer.WriteAttributeString("Behavior", "success");
8311 }
8312 if ((this.behaviorField == BehaviorType.error))
8313 {
8314 writer.WriteAttributeString("Behavior", "error");
8315 }
8316 if ((this.behaviorField == BehaviorType.scheduleReboot))
8317 {
8318 writer.WriteAttributeString("Behavior", "scheduleReboot");
8319 }
8320 if ((this.behaviorField == BehaviorType.forceReboot))
8321 {
8322 writer.WriteAttributeString("Behavior", "forceReboot");
8323 }
8324 }
8325 writer.WriteEndElement();
8326 }
8327
8328 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8329 void ISetAttributes.SetAttribute(string name, string value)
8330 {
8331 if (String.IsNullOrEmpty(name))
8332 {
8333 throw new ArgumentNullException("name");
8334 }
8335 if (("Value" == name))
8336 {
8337 this.valueField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
8338 this.valueFieldSet = true;
8339 }
8340 if (("Behavior" == name))
8341 {
8342 this.behaviorField = ExitCode.ParseBehaviorType(value);
8343 this.behaviorFieldSet = true;
8344 }
8345 }
8346
8347 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8348 public enum BehaviorType
8349 {
8350
8351 IllegalValue = int.MaxValue,
8352
8353 NotSet = -1,
8354
8355 success,
8356
8357 error,
8358
8359 scheduleReboot,
8360
8361 forceReboot,
8362 }
8363 }
8364
8365 /// <summary>
8366 /// Describes additional, conditional command-line arguments for an ExePackage.
8367 /// </summary>
8368 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8369 public class CommandLine : ISchemaElement, ISetAttributes
8370 {
8371
8372 private string installArgumentField;
8373
8374 private bool installArgumentFieldSet;
8375
8376 private string uninstallArgumentField;
8377
8378 private bool uninstallArgumentFieldSet;
8379
8380 private string repairArgumentField;
8381
8382 private bool repairArgumentFieldSet;
8383
8384 private string conditionField;
8385
8386 private bool conditionFieldSet;
8387
8388 private ISchemaElement parentElement;
8389
8390 /// <summary>
8391 /// Additional command-line arguments to apply during package installation if Condition is true.
8392 /// </summary>
8393 public string InstallArgument
8394 {
8395 get
8396 {
8397 return this.installArgumentField;
8398 }
8399 set
8400 {
8401 this.installArgumentFieldSet = true;
8402 this.installArgumentField = value;
8403 }
8404 }
8405
8406 /// <summary>
8407 /// Additional command-line arguments to apply during package uninstallation if Condition is true.
8408 /// </summary>
8409 public string UninstallArgument
8410 {
8411 get
8412 {
8413 return this.uninstallArgumentField;
8414 }
8415 set
8416 {
8417 this.uninstallArgumentFieldSet = true;
8418 this.uninstallArgumentField = value;
8419 }
8420 }
8421
8422 /// <summary>
8423 /// Additional command-line arguments to apply during package repair if Condition is true.
8424 /// </summary>
8425 public string RepairArgument
8426 {
8427 get
8428 {
8429 return this.repairArgumentField;
8430 }
8431 set
8432 {
8433 this.repairArgumentFieldSet = true;
8434 this.repairArgumentField = value;
8435 }
8436 }
8437
8438 /// <summary>
8439 /// The condition that controls whether the command-line arguments specified in the
8440 /// InstallArgument, UninstallArgument, or RepairArgument attributes are appended to the
8441 /// command line passed to the ExePackage. Which attribute is used depends on the
8442 /// action being applied to the ExePackage. For example, when the ExePackage is
8443 /// being installed, the InstallArgument attribute value is appended to the command
8444 /// line when the ExePackage is executed.
8445 /// </summary>
8446 public string Condition
8447 {
8448 get
8449 {
8450 return this.conditionField;
8451 }
8452 set
8453 {
8454 this.conditionFieldSet = true;
8455 this.conditionField = value;
8456 }
8457 }
8458
8459 public virtual ISchemaElement ParentElement
8460 {
8461 get
8462 {
8463 return this.parentElement;
8464 }
8465 set
8466 {
8467 this.parentElement = value;
8468 }
8469 }
8470
8471 /// <summary>
8472 /// Processes this element and all child elements into an XmlWriter.
8473 /// </summary>
8474 public virtual void OutputXml(XmlWriter writer)
8475 {
8476 if ((null == writer))
8477 {
8478 throw new ArgumentNullException("writer");
8479 }
8480 writer.WriteStartElement("CommandLine", "http://wixtoolset.org/schemas/v4/wxs");
8481 if (this.installArgumentFieldSet)
8482 {
8483 writer.WriteAttributeString("InstallArgument", this.installArgumentField);
8484 }
8485 if (this.uninstallArgumentFieldSet)
8486 {
8487 writer.WriteAttributeString("UninstallArgument", this.uninstallArgumentField);
8488 }
8489 if (this.repairArgumentFieldSet)
8490 {
8491 writer.WriteAttributeString("RepairArgument", this.repairArgumentField);
8492 }
8493 if (this.conditionFieldSet)
8494 {
8495 writer.WriteAttributeString("Condition", this.conditionField);
8496 }
8497 writer.WriteEndElement();
8498 }
8499
8500 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8501 void ISetAttributes.SetAttribute(string name, string value)
8502 {
8503 if (String.IsNullOrEmpty(name))
8504 {
8505 throw new ArgumentNullException("name");
8506 }
8507 if (("InstallArgument" == name))
8508 {
8509 this.installArgumentField = value;
8510 this.installArgumentFieldSet = true;
8511 }
8512 if (("UninstallArgument" == name))
8513 {
8514 this.uninstallArgumentField = value;
8515 this.uninstallArgumentFieldSet = true;
8516 }
8517 if (("RepairArgument" == name))
8518 {
8519 this.repairArgumentField = value;
8520 this.repairArgumentFieldSet = true;
8521 }
8522 if (("Condition" == name))
8523 {
8524 this.conditionField = value;
8525 this.conditionFieldSet = true;
8526 }
8527 }
8528 }
8529
8530 /// <summary>
8531 /// Describes a payload to a bootstrapper.
8532 /// </summary>
8533 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8534 public class Payload : ISchemaElement, ISetAttributes
8535 {
8536
8537 private string idField;
8538
8539 private bool idFieldSet;
8540
8541 private YesNoDefaultType compressedField;
8542
8543 private bool compressedFieldSet;
8544
8545 private string sourceFileField;
8546
8547 private bool sourceFileFieldSet;
8548
8549 private string nameField;
8550
8551 private bool nameFieldSet;
8552
8553 private string downloadUrlField;
8554
8555 private bool downloadUrlFieldSet;
8556
8557 private YesNoType enableSignatureVerificationField;
8558
8559 private bool enableSignatureVerificationFieldSet;
8560
8561 private ISchemaElement parentElement;
8562
8563 /// <summary>
8564 /// The identifier of Payload element.
8565 /// </summary>
8566 public string Id
8567 {
8568 get
8569 {
8570 return this.idField;
8571 }
8572 set
8573 {
8574 this.idFieldSet = true;
8575 this.idField = value;
8576 }
8577 }
8578
8579 /// <summary>
8580 /// Whether the payload should be embedded in a container or left as an external payload.
8581 /// </summary>
8582 public YesNoDefaultType Compressed
8583 {
8584 get
8585 {
8586 return this.compressedField;
8587 }
8588 set
8589 {
8590 this.compressedFieldSet = true;
8591 this.compressedField = value;
8592 }
8593 }
8594
8595 /// <summary>
8596 /// Location of the source file.
8597 /// </summary>
8598 public string SourceFile
8599 {
8600 get
8601 {
8602 return this.sourceFileField;
8603 }
8604 set
8605 {
8606 this.sourceFileFieldSet = true;
8607 this.sourceFileField = value;
8608 }
8609 }
8610
8611 /// <summary>
8612 /// The destination path and file name for this payload. The default is the source file name. The use of '..' directories is not allowed.
8613 /// </summary>
8614 public string Name
8615 {
8616 get
8617 {
8618 return this.nameField;
8619 }
8620 set
8621 {
8622 this.nameFieldSet = true;
8623 this.nameField = value;
8624 }
8625 }
8626
8627 public string DownloadUrl
8628 {
8629 get
8630 {
8631 return this.downloadUrlField;
8632 }
8633 set
8634 {
8635 this.downloadUrlFieldSet = true;
8636 this.downloadUrlField = value;
8637 }
8638 }
8639
8640 /// <summary>
8641 /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes"
8642 /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the
8643 /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures.
8644 /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no".
8645 /// </summary>
8646 public YesNoType EnableSignatureVerification
8647 {
8648 get
8649 {
8650 return this.enableSignatureVerificationField;
8651 }
8652 set
8653 {
8654 this.enableSignatureVerificationFieldSet = true;
8655 this.enableSignatureVerificationField = value;
8656 }
8657 }
8658
8659 public virtual ISchemaElement ParentElement
8660 {
8661 get
8662 {
8663 return this.parentElement;
8664 }
8665 set
8666 {
8667 this.parentElement = value;
8668 }
8669 }
8670
8671 /// <summary>
8672 /// Processes this element and all child elements into an XmlWriter.
8673 /// </summary>
8674 public virtual void OutputXml(XmlWriter writer)
8675 {
8676 if ((null == writer))
8677 {
8678 throw new ArgumentNullException("writer");
8679 }
8680 writer.WriteStartElement("Payload", "http://wixtoolset.org/schemas/v4/wxs");
8681 if (this.idFieldSet)
8682 {
8683 writer.WriteAttributeString("Id", this.idField);
8684 }
8685 if (this.compressedFieldSet)
8686 {
8687 if ((this.compressedField == YesNoDefaultType.@default))
8688 {
8689 writer.WriteAttributeString("Compressed", "default");
8690 }
8691 if ((this.compressedField == YesNoDefaultType.no))
8692 {
8693 writer.WriteAttributeString("Compressed", "no");
8694 }
8695 if ((this.compressedField == YesNoDefaultType.yes))
8696 {
8697 writer.WriteAttributeString("Compressed", "yes");
8698 }
8699 }
8700 if (this.sourceFileFieldSet)
8701 {
8702 writer.WriteAttributeString("SourceFile", this.sourceFileField);
8703 }
8704 if (this.nameFieldSet)
8705 {
8706 writer.WriteAttributeString("Name", this.nameField);
8707 }
8708 if (this.downloadUrlFieldSet)
8709 {
8710 writer.WriteAttributeString("DownloadUrl", this.downloadUrlField);
8711 }
8712 if (this.enableSignatureVerificationFieldSet)
8713 {
8714 if ((this.enableSignatureVerificationField == YesNoType.no))
8715 {
8716 writer.WriteAttributeString("EnableSignatureVerification", "no");
8717 }
8718 if ((this.enableSignatureVerificationField == YesNoType.yes))
8719 {
8720 writer.WriteAttributeString("EnableSignatureVerification", "yes");
8721 }
8722 }
8723 writer.WriteEndElement();
8724 }
8725
8726 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8727 void ISetAttributes.SetAttribute(string name, string value)
8728 {
8729 if (String.IsNullOrEmpty(name))
8730 {
8731 throw new ArgumentNullException("name");
8732 }
8733 if (("Id" == name))
8734 {
8735 this.idField = value;
8736 this.idFieldSet = true;
8737 }
8738 if (("Compressed" == name))
8739 {
8740 this.compressedField = Enums.ParseYesNoDefaultType(value);
8741 this.compressedFieldSet = true;
8742 }
8743 if (("SourceFile" == name))
8744 {
8745 this.sourceFileField = value;
8746 this.sourceFileFieldSet = true;
8747 }
8748 if (("Name" == name))
8749 {
8750 this.nameField = value;
8751 this.nameFieldSet = true;
8752 }
8753 if (("DownloadUrl" == name))
8754 {
8755 this.downloadUrlField = value;
8756 this.downloadUrlFieldSet = true;
8757 }
8758 if (("EnableSignatureVerification" == name))
8759 {
8760 this.enableSignatureVerificationField = Enums.ParseYesNoType(value);
8761 this.enableSignatureVerificationFieldSet = true;
8762 }
8763 }
8764 }
8765
8766 /// <summary>
8767 /// Describes a payload group to a bootstrapper. PayloadGroups referenced from within a Bundle are tied to the Bundle.
8768 /// PayloadGroups referenced from a Fragment are tied to the context of whatever references them such as an ExePackage or MsiPackage.
8769 /// It is possible to share a PayloadGroup between multiple Packages and/or a Bundle by creating multiple references to it.
8770 /// </summary>
8771 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8772 public class PayloadGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
8773 {
8774
8775 private ElementCollection children;
8776
8777 private string idField;
8778
8779 private bool idFieldSet;
8780
8781 private ISchemaElement parentElement;
8782
8783 public PayloadGroup()
8784 {
8785 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
8786 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload)));
8787 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef)));
8788 this.children = childCollection0;
8789 }
8790
8791 public virtual IEnumerable Children
8792 {
8793 get
8794 {
8795 return this.children;
8796 }
8797 }
8798
8799 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
8800 public virtual IEnumerable this[System.Type childType]
8801 {
8802 get
8803 {
8804 return this.children.Filter(childType);
8805 }
8806 }
8807
8808 /// <summary>
8809 /// Identifier for payload group.
8810 /// </summary>
8811 public string Id
8812 {
8813 get
8814 {
8815 return this.idField;
8816 }
8817 set
8818 {
8819 this.idFieldSet = true;
8820 this.idField = value;
8821 }
8822 }
8823
8824 public virtual ISchemaElement ParentElement
8825 {
8826 get
8827 {
8828 return this.parentElement;
8829 }
8830 set
8831 {
8832 this.parentElement = value;
8833 }
8834 }
8835
8836 public virtual void AddChild(ISchemaElement child)
8837 {
8838 if ((null == child))
8839 {
8840 throw new ArgumentNullException("child");
8841 }
8842 this.children.AddElement(child);
8843 child.ParentElement = this;
8844 }
8845
8846 public virtual void RemoveChild(ISchemaElement child)
8847 {
8848 if ((null == child))
8849 {
8850 throw new ArgumentNullException("child");
8851 }
8852 this.children.RemoveElement(child);
8853 child.ParentElement = null;
8854 }
8855
8856 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8857 ISchemaElement ICreateChildren.CreateChild(string childName)
8858 {
8859 if (String.IsNullOrEmpty(childName))
8860 {
8861 throw new ArgumentNullException("childName");
8862 }
8863 ISchemaElement childValue = null;
8864 if (("Payload" == childName))
8865 {
8866 childValue = new Payload();
8867 }
8868 if (("PayloadGroupRef" == childName))
8869 {
8870 childValue = new PayloadGroupRef();
8871 }
8872 if ((null == childValue))
8873 {
8874 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
8875 }
8876 return childValue;
8877 }
8878
8879 /// <summary>
8880 /// Processes this element and all child elements into an XmlWriter.
8881 /// </summary>
8882 public virtual void OutputXml(XmlWriter writer)
8883 {
8884 if ((null == writer))
8885 {
8886 throw new ArgumentNullException("writer");
8887 }
8888 writer.WriteStartElement("PayloadGroup", "http://wixtoolset.org/schemas/v4/wxs");
8889 if (this.idFieldSet)
8890 {
8891 writer.WriteAttributeString("Id", this.idField);
8892 }
8893 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
8894 {
8895 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
8896 childElement.OutputXml(writer);
8897 }
8898 writer.WriteEndElement();
8899 }
8900
8901 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8902 void ISetAttributes.SetAttribute(string name, string value)
8903 {
8904 if (String.IsNullOrEmpty(name))
8905 {
8906 throw new ArgumentNullException("name");
8907 }
8908 if (("Id" == name))
8909 {
8910 this.idField = value;
8911 this.idFieldSet = true;
8912 }
8913 }
8914 }
8915
8916 /// <summary>
8917 /// Create a reference to PayloadGroup element that exists inside a Bundle or Fragment element.
8918 /// </summary>
8919 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
8920 public class PayloadGroupRef : ISchemaElement, ISetAttributes
8921 {
8922
8923 private string idField;
8924
8925 private bool idFieldSet;
8926
8927 private ISchemaElement parentElement;
8928
8929 /// <summary>
8930 /// The identifier of the PayloadGroup element to reference.
8931 /// </summary>
8932 public string Id
8933 {
8934 get
8935 {
8936 return this.idField;
8937 }
8938 set
8939 {
8940 this.idFieldSet = true;
8941 this.idField = value;
8942 }
8943 }
8944
8945 public virtual ISchemaElement ParentElement
8946 {
8947 get
8948 {
8949 return this.parentElement;
8950 }
8951 set
8952 {
8953 this.parentElement = value;
8954 }
8955 }
8956
8957 /// <summary>
8958 /// Processes this element and all child elements into an XmlWriter.
8959 /// </summary>
8960 public virtual void OutputXml(XmlWriter writer)
8961 {
8962 if ((null == writer))
8963 {
8964 throw new ArgumentNullException("writer");
8965 }
8966 writer.WriteStartElement("PayloadGroupRef", "http://wixtoolset.org/schemas/v4/wxs");
8967 if (this.idFieldSet)
8968 {
8969 writer.WriteAttributeString("Id", this.idField);
8970 }
8971 writer.WriteEndElement();
8972 }
8973
8974 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
8975 void ISetAttributes.SetAttribute(string name, string value)
8976 {
8977 if (String.IsNullOrEmpty(name))
8978 {
8979 throw new ArgumentNullException("name");
8980 }
8981 if (("Id" == name))
8982 {
8983 this.idField = value;
8984 this.idFieldSet = true;
8985 }
8986 }
8987 }
8988
8989 public class ExePackagePayload : RemotePayload
8990 {
8991 public ExePackagePayload() : base("ExePackagePayload") { }
8992 }
8993
8994 public class MsuPackagePayload : RemotePayload
8995 {
8996 public MsuPackagePayload() : base("MsuPackagePayload") { }
8997 }
8998
8999 /// <summary>
9000 /// Describes information about a remote file payload that is not available at the time of building the bundle.
9001 /// The parent must specify DownloadUrl and must not specify SourceFile when using this element.
9002 /// </summary>
9003 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9004 public abstract class RemotePayload : ISchemaElement, ISetAttributes
9005 {
9006 private string elementName;
9007
9008 public RemotePayload(string elementName)
9009 {
9010 this.elementName = elementName;
9011 }
9012
9013 private string descriptionField;
9014
9015 private bool descriptionFieldSet;
9016
9017 private string hashField;
9018
9019 private bool hashFieldSet;
9020
9021 private string productNameField;
9022
9023 private bool productNameFieldSet;
9024
9025 private long sizeField;
9026
9027 private bool sizeFieldSet;
9028
9029 private string versionField;
9030
9031 private bool versionFieldSet;
9032
9033 private ISchemaElement parentElement;
9034
9035 /// <summary>
9036 /// Description of the file from version resources.
9037 /// </summary>
9038 public string Description
9039 {
9040 get
9041 {
9042 return this.descriptionField;
9043 }
9044 set
9045 {
9046 this.descriptionFieldSet = true;
9047 this.descriptionField = value;
9048 }
9049 }
9050
9051 /// <summary>
9052 /// SHA-1 hash of the RemotePayload. Include this attribute if the remote file is unsigned or SuppressSignatureVerification is set to Yes.
9053 /// </summary>
9054 public string Hash
9055 {
9056 get
9057 {
9058 return this.hashField;
9059 }
9060 set
9061 {
9062 this.hashFieldSet = true;
9063 this.hashField = value;
9064 }
9065 }
9066
9067 /// <summary>
9068 /// Product name of the file from version resouces.
9069 /// </summary>
9070 public string ProductName
9071 {
9072 get
9073 {
9074 return this.productNameField;
9075 }
9076 set
9077 {
9078 this.productNameFieldSet = true;
9079 this.productNameField = value;
9080 }
9081 }
9082
9083 /// <summary>
9084 /// Size of the remote file in bytes.
9085 /// </summary>
9086 public long Size
9087 {
9088 get
9089 {
9090 return this.sizeField;
9091 }
9092 set
9093 {
9094 this.sizeFieldSet = true;
9095 this.sizeField = value;
9096 }
9097 }
9098
9099 /// <summary>
9100 /// Version of the remote file
9101 /// </summary>
9102 public string Version
9103 {
9104 get
9105 {
9106 return this.versionField;
9107 }
9108 set
9109 {
9110 this.versionFieldSet = true;
9111 this.versionField = value;
9112 }
9113 }
9114
9115 public virtual ISchemaElement ParentElement
9116 {
9117 get
9118 {
9119 return this.parentElement;
9120 }
9121 set
9122 {
9123 this.parentElement = value;
9124 }
9125 }
9126
9127 /// <summary>
9128 /// Processes this element and all child elements into an XmlWriter.
9129 /// </summary>
9130 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
9131 public virtual void OutputXml(XmlWriter writer)
9132 {
9133 if ((null == writer))
9134 {
9135 throw new ArgumentNullException("writer");
9136 }
9137 writer.WriteStartElement(this.elementName, "http://wixtoolset.org/schemas/v4/wxs");
9138 if (this.descriptionFieldSet)
9139 {
9140 writer.WriteAttributeString("Description", this.descriptionField);
9141 }
9142 if (this.hashFieldSet)
9143 {
9144 writer.WriteAttributeString("Hash", this.hashField);
9145 }
9146 if (this.productNameFieldSet)
9147 {
9148 writer.WriteAttributeString("ProductName", this.productNameField);
9149 }
9150 if (this.sizeFieldSet)
9151 {
9152 writer.WriteAttributeString("Size", this.sizeField.ToString(CultureInfo.InvariantCulture));
9153 }
9154 if (this.versionFieldSet)
9155 {
9156 writer.WriteAttributeString("Version", this.versionField);
9157 }
9158 writer.WriteEndElement();
9159 }
9160
9161 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9162 void ISetAttributes.SetAttribute(string name, string value)
9163 {
9164 if (String.IsNullOrEmpty(name))
9165 {
9166 throw new ArgumentNullException("name");
9167 }
9168 if (("Description" == name))
9169 {
9170 this.descriptionField = value;
9171 this.descriptionFieldSet = true;
9172 }
9173 if (("Hash" == name))
9174 {
9175 this.hashField = value;
9176 this.hashFieldSet = true;
9177 }
9178 if (("ProductName" == name))
9179 {
9180 this.productNameField = value;
9181 this.productNameFieldSet = true;
9182 }
9183 if (("Size" == name))
9184 {
9185 this.sizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
9186 this.sizeFieldSet = true;
9187 }
9188 if (("Version" == name))
9189 {
9190 this.versionField = value;
9191 this.versionFieldSet = true;
9192 }
9193 }
9194 }
9195
9196 /// <summary>
9197 /// Create a RelatedBundle element.
9198 /// </summary>
9199 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9200 public class RelatedBundle : ISchemaElement, ISetAttributes
9201 {
9202
9203 private string idField;
9204
9205 private bool idFieldSet;
9206
9207 private ActionType actionField;
9208
9209 private bool actionFieldSet;
9210
9211 private ISchemaElement parentElement;
9212
9213 /// <summary>
9214 /// The identifier of the RelatedBundle group.
9215 /// </summary>
9216 public string Id
9217 {
9218 get
9219 {
9220 return this.idField;
9221 }
9222 set
9223 {
9224 this.idFieldSet = true;
9225 this.idField = value;
9226 }
9227 }
9228
9229 /// <summary>
9230 /// The action to take on bundles related to this one. Detect is the default.
9231 /// </summary>
9232 public ActionType Action
9233 {
9234 get
9235 {
9236 return this.actionField;
9237 }
9238 set
9239 {
9240 this.actionFieldSet = true;
9241 this.actionField = value;
9242 }
9243 }
9244
9245 public virtual ISchemaElement ParentElement
9246 {
9247 get
9248 {
9249 return this.parentElement;
9250 }
9251 set
9252 {
9253 this.parentElement = value;
9254 }
9255 }
9256
9257 /// <summary>
9258 /// Parses a ActionType from a string.
9259 /// </summary>
9260 public static ActionType ParseActionType(string value)
9261 {
9262 ActionType parsedValue;
9263 RelatedBundle.TryParseActionType(value, out parsedValue);
9264 return parsedValue;
9265 }
9266
9267 /// <summary>
9268 /// Tries to parse a ActionType from a string.
9269 /// </summary>
9270 public static bool TryParseActionType(string value, out ActionType parsedValue)
9271 {
9272 parsedValue = ActionType.NotSet;
9273 if (string.IsNullOrEmpty(value))
9274 {
9275 return false;
9276 }
9277 if (("Detect" == value))
9278 {
9279 parsedValue = ActionType.Detect;
9280 }
9281 else
9282 {
9283 if (("Upgrade" == value))
9284 {
9285 parsedValue = ActionType.Upgrade;
9286 }
9287 else
9288 {
9289 if (("Addon" == value))
9290 {
9291 parsedValue = ActionType.Addon;
9292 }
9293 else
9294 {
9295 if (("Patch" == value))
9296 {
9297 parsedValue = ActionType.Patch;
9298 }
9299 else
9300 {
9301 parsedValue = ActionType.IllegalValue;
9302 return false;
9303 }
9304 }
9305 }
9306 }
9307 return true;
9308 }
9309
9310 /// <summary>
9311 /// Processes this element and all child elements into an XmlWriter.
9312 /// </summary>
9313 public virtual void OutputXml(XmlWriter writer)
9314 {
9315 if ((null == writer))
9316 {
9317 throw new ArgumentNullException("writer");
9318 }
9319 writer.WriteStartElement("RelatedBundle", "http://wixtoolset.org/schemas/v4/wxs");
9320 if (this.idFieldSet)
9321 {
9322 writer.WriteAttributeString("Id", this.idField);
9323 }
9324 if (this.actionFieldSet)
9325 {
9326 if ((this.actionField == ActionType.Detect))
9327 {
9328 writer.WriteAttributeString("Action", "Detect");
9329 }
9330 if ((this.actionField == ActionType.Upgrade))
9331 {
9332 writer.WriteAttributeString("Action", "Upgrade");
9333 }
9334 if ((this.actionField == ActionType.Addon))
9335 {
9336 writer.WriteAttributeString("Action", "Addon");
9337 }
9338 if ((this.actionField == ActionType.Patch))
9339 {
9340 writer.WriteAttributeString("Action", "Patch");
9341 }
9342 }
9343 writer.WriteEndElement();
9344 }
9345
9346 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9347 void ISetAttributes.SetAttribute(string name, string value)
9348 {
9349 if (String.IsNullOrEmpty(name))
9350 {
9351 throw new ArgumentNullException("name");
9352 }
9353 if (("Id" == name))
9354 {
9355 this.idField = value;
9356 this.idFieldSet = true;
9357 }
9358 if (("Action" == name))
9359 {
9360 this.actionField = RelatedBundle.ParseActionType(value);
9361 this.actionFieldSet = true;
9362 }
9363 }
9364
9365 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9366 public enum ActionType
9367 {
9368
9369 IllegalValue = int.MaxValue,
9370
9371 NotSet = -1,
9372
9373 Detect,
9374
9375 Upgrade,
9376
9377 Addon,
9378
9379 Patch,
9380 }
9381 }
9382
9383 /// <summary>
9384 /// Defines the update for a Bundle.
9385 /// </summary>
9386 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9387 public class Update : ISchemaElement, ISetAttributes
9388 {
9389
9390 private string locationField;
9391
9392 private bool locationFieldSet;
9393
9394 private ISchemaElement parentElement;
9395
9396 /// <summary>
9397 /// The absolute path or URL to check for an update bundle. Currently the engine provides this value
9398 /// in the IBootstrapperApplication::OnDetectUpdateBegin() and otherwise ignores the value. In the
9399 /// future the engine will be able to acquire an update bundle from the location and determine if it
9400 /// is newer than the current executing bundle.
9401 /// </summary>
9402 public string Location
9403 {
9404 get
9405 {
9406 return this.locationField;
9407 }
9408 set
9409 {
9410 this.locationFieldSet = true;
9411 this.locationField = value;
9412 }
9413 }
9414
9415 public virtual ISchemaElement ParentElement
9416 {
9417 get
9418 {
9419 return this.parentElement;
9420 }
9421 set
9422 {
9423 this.parentElement = value;
9424 }
9425 }
9426
9427 /// <summary>
9428 /// Processes this element and all child elements into an XmlWriter.
9429 /// </summary>
9430 public virtual void OutputXml(XmlWriter writer)
9431 {
9432 if ((null == writer))
9433 {
9434 throw new ArgumentNullException("writer");
9435 }
9436 writer.WriteStartElement("Update", "http://wixtoolset.org/schemas/v4/wxs");
9437 if (this.locationFieldSet)
9438 {
9439 writer.WriteAttributeString("Location", this.locationField);
9440 }
9441 writer.WriteEndElement();
9442 }
9443
9444 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9445 void ISetAttributes.SetAttribute(string name, string value)
9446 {
9447 if (String.IsNullOrEmpty(name))
9448 {
9449 throw new ArgumentNullException("name");
9450 }
9451 if (("Location" == name))
9452 {
9453 this.locationField = value;
9454 this.locationFieldSet = true;
9455 }
9456 }
9457 }
9458
9459 /// <summary>
9460 /// The Package element is analogous to the main function in a C program. When linking, only one Package section
9461 /// can be given to the linker to produce a successful result. Using this element creates an msi file.
9462 /// </summary>
9463 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9464 public class Package : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
9465 {
9466
9467 private ElementCollection children;
9468
9469 private string idField;
9470
9471 private bool idFieldSet;
9472
9473 private string codepageField;
9474
9475 private bool codepageFieldSet;
9476
9477 private string languageField;
9478
9479 private bool languageFieldSet;
9480
9481 private string manufacturerField;
9482
9483 private bool manufacturerFieldSet;
9484
9485 private string nameField;
9486
9487 private bool nameFieldSet;
9488
9489 private string upgradeCodeField;
9490
9491 private bool upgradeCodeFieldSet;
9492
9493 private string versionField;
9494
9495 private bool versionFieldSet;
9496
9497 private ISchemaElement parentElement;
9498
9499 public Package()
9500 {
9501 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
9502 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SummaryInformation)));
9503 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
9504 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
9505 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Binary)));
9506 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComplianceCheck)));
9507 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
9508 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroup)));
9509 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Condition)));
9510 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction)));
9511 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef)));
9512 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable)));
9513 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Directory)));
9514 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef)));
9515 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer)));
9516 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef)));
9517 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable)));
9518 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Feature)));
9519 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
9520 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef)));
9521 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Icon)));
9522 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(InstanceTransforms)));
9523 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(MajorUpgrade)));
9524 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Media)));
9525 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(MediaTemplate)));
9526 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PackageCertificates)));
9527 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCertificates)));
9528 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Property)));
9529 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef)));
9530 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory)));
9531 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty)));
9532 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog)));
9533 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
9534 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UI)));
9535 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef)));
9536 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Upgrade)));
9537 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable)));
9538 ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Sequence);
9539 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence)));
9540 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence)));
9541 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence)));
9542 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence)));
9543 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence)));
9544 childCollection1.AddCollection(childCollection2);
9545 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
9546 childCollection0.AddCollection(childCollection1);
9547 this.children = childCollection0;
9548 }
9549
9550 public virtual IEnumerable Children
9551 {
9552 get
9553 {
9554 return this.children;
9555 }
9556 }
9557
9558 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
9559 public virtual IEnumerable this[System.Type childType]
9560 {
9561 get
9562 {
9563 return this.children.Filter(childType);
9564 }
9565 }
9566
9567 /// <summary>
9568 /// The product code GUID for the product.
9569 /// </summary>
9570 public string Id
9571 {
9572 get
9573 {
9574 return this.idField;
9575 }
9576 set
9577 {
9578 this.idFieldSet = true;
9579 this.idField = value;
9580 }
9581 }
9582
9583 /// <summary>
9584 /// The code page integer value or web name for the resulting MSI. See remarks for more information.
9585 /// </summary>
9586 public string Codepage
9587 {
9588 get
9589 {
9590 return this.codepageField;
9591 }
9592 set
9593 {
9594 this.codepageFieldSet = true;
9595 this.codepageField = value;
9596 }
9597 }
9598
9599 /// <summary>
9600 /// The decimal language ID (LCID) for the product.
9601 /// </summary>
9602 public string Language
9603 {
9604 get
9605 {
9606 return this.languageField;
9607 }
9608 set
9609 {
9610 this.languageFieldSet = true;
9611 this.languageField = value;
9612 }
9613 }
9614
9615 /// <summary>
9616 /// The manufacturer of the product.
9617 /// </summary>
9618 public string Manufacturer
9619 {
9620 get
9621 {
9622 return this.manufacturerField;
9623 }
9624 set
9625 {
9626 this.manufacturerFieldSet = true;
9627 this.manufacturerField = value;
9628 }
9629 }
9630
9631 /// <summary>
9632 /// The descriptive name of the product.
9633 /// </summary>
9634 public string Name
9635 {
9636 get
9637 {
9638 return this.nameField;
9639 }
9640 set
9641 {
9642 this.nameFieldSet = true;
9643 this.nameField = value;
9644 }
9645 }
9646
9647 /// <summary>
9648 /// The upgrade code GUID for the product.
9649 /// </summary>
9650 public string UpgradeCode
9651 {
9652 get
9653 {
9654 return this.upgradeCodeField;
9655 }
9656 set
9657 {
9658 this.upgradeCodeFieldSet = true;
9659 this.upgradeCodeField = value;
9660 }
9661 }
9662
9663 /// <summary>
9664 /// The product's version string.
9665 /// </summary>
9666 public string Version
9667 {
9668 get
9669 {
9670 return this.versionField;
9671 }
9672 set
9673 {
9674 this.versionFieldSet = true;
9675 this.versionField = value;
9676 }
9677 }
9678
9679 public virtual ISchemaElement ParentElement
9680 {
9681 get
9682 {
9683 return this.parentElement;
9684 }
9685 set
9686 {
9687 this.parentElement = value;
9688 }
9689 }
9690
9691 public virtual void AddChild(ISchemaElement child)
9692 {
9693 if ((null == child))
9694 {
9695 throw new ArgumentNullException("child");
9696 }
9697 this.children.AddElement(child);
9698 child.ParentElement = this;
9699 }
9700
9701 public virtual void RemoveChild(ISchemaElement child)
9702 {
9703 if ((null == child))
9704 {
9705 throw new ArgumentNullException("child");
9706 }
9707 this.children.RemoveElement(child);
9708 child.ParentElement = null;
9709 }
9710
9711 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9712 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
9713 ISchemaElement ICreateChildren.CreateChild(string childName)
9714 {
9715 if (String.IsNullOrEmpty(childName))
9716 {
9717 throw new ArgumentNullException("childName");
9718 }
9719 ISchemaElement childValue = null;
9720 if (("SummaryInformation" == childName))
9721 {
9722 childValue = new SummaryInformation();
9723 }
9724 if (("AppId" == childName))
9725 {
9726 childValue = new AppId();
9727 }
9728 if (("Binary" == childName))
9729 {
9730 childValue = new Binary();
9731 }
9732 if (("ComplianceCheck" == childName))
9733 {
9734 childValue = new ComplianceCheck();
9735 }
9736 if (("Component" == childName))
9737 {
9738 childValue = new Component();
9739 }
9740 if (("ComponentGroup" == childName))
9741 {
9742 childValue = new ComponentGroup();
9743 }
9744 if (("Condition" == childName))
9745 {
9746 childValue = new Condition();
9747 }
9748 if (("CustomAction" == childName))
9749 {
9750 childValue = new CustomAction();
9751 }
9752 if (("CustomActionRef" == childName))
9753 {
9754 childValue = new CustomActionRef();
9755 }
9756 if (("CustomTable" == childName))
9757 {
9758 childValue = new CustomTable();
9759 }
9760 if (("Directory" == childName))
9761 {
9762 childValue = new Directory();
9763 }
9764 if (("DirectoryRef" == childName))
9765 {
9766 childValue = new DirectoryRef();
9767 }
9768 if (("EmbeddedChainer" == childName))
9769 {
9770 childValue = new EmbeddedChainer();
9771 }
9772 if (("EmbeddedChainerRef" == childName))
9773 {
9774 childValue = new EmbeddedChainerRef();
9775 }
9776 if (("EnsureTable" == childName))
9777 {
9778 childValue = new EnsureTable();
9779 }
9780 if (("Feature" == childName))
9781 {
9782 childValue = new Feature();
9783 }
9784 if (("FeatureRef" == childName))
9785 {
9786 childValue = new FeatureRef();
9787 }
9788 if (("FeatureGroupRef" == childName))
9789 {
9790 childValue = new FeatureGroupRef();
9791 }
9792 if (("Icon" == childName))
9793 {
9794 childValue = new Icon();
9795 }
9796 if (("InstanceTransforms" == childName))
9797 {
9798 childValue = new InstanceTransforms();
9799 }
9800 if (("MajorUpgrade" == childName))
9801 {
9802 childValue = new MajorUpgrade();
9803 }
9804 if (("Media" == childName))
9805 {
9806 childValue = new Media();
9807 }
9808 if (("MediaTemplate" == childName))
9809 {
9810 childValue = new MediaTemplate();
9811 }
9812 if (("PackageCertificates" == childName))
9813 {
9814 childValue = new PackageCertificates();
9815 }
9816 if (("PatchCertificates" == childName))
9817 {
9818 childValue = new PatchCertificates();
9819 }
9820 if (("Property" == childName))
9821 {
9822 childValue = new Property();
9823 }
9824 if (("PropertyRef" == childName))
9825 {
9826 childValue = new PropertyRef();
9827 }
9828 if (("SetDirectory" == childName))
9829 {
9830 childValue = new SetDirectory();
9831 }
9832 if (("SetProperty" == childName))
9833 {
9834 childValue = new SetProperty();
9835 }
9836 if (("SFPCatalog" == childName))
9837 {
9838 childValue = new SFPCatalog();
9839 }
9840 if (("SymbolPath" == childName))
9841 {
9842 childValue = new SymbolPath();
9843 }
9844 if (("UI" == childName))
9845 {
9846 childValue = new UI();
9847 }
9848 if (("UIRef" == childName))
9849 {
9850 childValue = new UIRef();
9851 }
9852 if (("Upgrade" == childName))
9853 {
9854 childValue = new Upgrade();
9855 }
9856 if (("WixVariable" == childName))
9857 {
9858 childValue = new WixVariable();
9859 }
9860 if (("InstallExecuteSequence" == childName))
9861 {
9862 childValue = new InstallExecuteSequence();
9863 }
9864 if (("InstallUISequence" == childName))
9865 {
9866 childValue = new InstallUISequence();
9867 }
9868 if (("AdminExecuteSequence" == childName))
9869 {
9870 childValue = new AdminExecuteSequence();
9871 }
9872 if (("AdminUISequence" == childName))
9873 {
9874 childValue = new AdminUISequence();
9875 }
9876 if (("AdvertiseExecuteSequence" == childName))
9877 {
9878 childValue = new AdvertiseExecuteSequence();
9879 }
9880 if ((null == childValue))
9881 {
9882 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
9883 }
9884 return childValue;
9885 }
9886
9887 /// <summary>
9888 /// Processes this element and all child elements into an XmlWriter.
9889 /// </summary>
9890 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
9891 public virtual void OutputXml(XmlWriter writer)
9892 {
9893 if ((null == writer))
9894 {
9895 throw new ArgumentNullException("writer");
9896 }
9897 writer.WriteStartElement("Package", "http://wixtoolset.org/schemas/v4/wxs");
9898 if (this.idFieldSet)
9899 {
9900 writer.WriteAttributeString("Id", this.idField);
9901 }
9902 if (this.codepageFieldSet)
9903 {
9904 writer.WriteAttributeString("Codepage", this.codepageField);
9905 }
9906 if (this.languageFieldSet)
9907 {
9908 writer.WriteAttributeString("Language", this.languageField);
9909 }
9910 if (this.manufacturerFieldSet)
9911 {
9912 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
9913 }
9914 if (this.nameFieldSet)
9915 {
9916 writer.WriteAttributeString("Name", this.nameField);
9917 }
9918 if (this.upgradeCodeFieldSet)
9919 {
9920 writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField);
9921 }
9922 if (this.versionFieldSet)
9923 {
9924 writer.WriteAttributeString("Version", this.versionField);
9925 }
9926 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
9927 {
9928 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
9929 childElement.OutputXml(writer);
9930 }
9931 writer.WriteEndElement();
9932 }
9933
9934 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
9935 void ISetAttributes.SetAttribute(string name, string value)
9936 {
9937 if (String.IsNullOrEmpty(name))
9938 {
9939 throw new ArgumentNullException("name");
9940 }
9941 if (("Id" == name))
9942 {
9943 this.idField = value;
9944 this.idFieldSet = true;
9945 }
9946 if (("Codepage" == name))
9947 {
9948 this.codepageField = value;
9949 this.codepageFieldSet = true;
9950 }
9951 if (("Language" == name))
9952 {
9953 this.languageField = value;
9954 this.languageFieldSet = true;
9955 }
9956 if (("Manufacturer" == name))
9957 {
9958 this.manufacturerField = value;
9959 this.manufacturerFieldSet = true;
9960 }
9961 if (("Name" == name))
9962 {
9963 this.nameField = value;
9964 this.nameFieldSet = true;
9965 }
9966 if (("UpgradeCode" == name))
9967 {
9968 this.upgradeCodeField = value;
9969 this.upgradeCodeFieldSet = true;
9970 }
9971 if (("Version" == name))
9972 {
9973 this.versionField = value;
9974 this.versionFieldSet = true;
9975 }
9976 }
9977 }
9978
9979 /// <summary>
9980 /// The Module element is analogous to the main function in a C program. When linking, only
9981 /// one Module section can be given to the linker to produce a successful result. Using this
9982 /// element creates an msm file.
9983 /// </summary>
9984 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
9985 public class Module : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
9986 {
9987
9988 private ElementCollection children;
9989
9990 private string idField;
9991
9992 private bool idFieldSet;
9993
9994 private string codepageField;
9995
9996 private bool codepageFieldSet;
9997
9998 private string guidField;
9999
10000 private bool guidFieldSet;
10001
10002 private string languageField;
10003
10004 private bool languageFieldSet;
10005
10006 private string versionField;
10007
10008 private bool versionFieldSet;
10009
10010 private ISchemaElement parentElement;
10011
10012 public Module()
10013 {
10014 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
10015 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SummaryInformation)));
10016 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
10017 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
10018 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Binary)));
10019 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
10020 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef)));
10021 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
10022 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Configuration)));
10023 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction)));
10024 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef)));
10025 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable)));
10026 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Dependency)));
10027 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Directory)));
10028 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef)));
10029 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer)));
10030 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef)));
10031 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable)));
10032 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Exclusion)));
10033 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Icon)));
10034 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreModularization)));
10035 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreTable)));
10036 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Property)));
10037 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef)));
10038 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory)));
10039 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty)));
10040 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog)));
10041 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Substitution)));
10042 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UI)));
10043 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef)));
10044 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable)));
10045 ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Sequence);
10046 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence)));
10047 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence)));
10048 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence)));
10049 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence)));
10050 childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence)));
10051 childCollection1.AddCollection(childCollection2);
10052 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
10053 childCollection0.AddCollection(childCollection1);
10054 this.children = childCollection0;
10055 }
10056
10057 public virtual IEnumerable Children
10058 {
10059 get
10060 {
10061 return this.children;
10062 }
10063 }
10064
10065 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
10066 public virtual IEnumerable this[System.Type childType]
10067 {
10068 get
10069 {
10070 return this.children.Filter(childType);
10071 }
10072 }
10073
10074 /// <summary>
10075 /// The name of the merge module (not the file name).
10076 /// </summary>
10077 public string Id
10078 {
10079 get
10080 {
10081 return this.idField;
10082 }
10083 set
10084 {
10085 this.idFieldSet = true;
10086 this.idField = value;
10087 }
10088 }
10089
10090 /// <summary>
10091 /// The code page integer value or web name for the resulting MSM. See remarks for more information.
10092 /// </summary>
10093 public string Codepage
10094 {
10095 get
10096 {
10097 return this.codepageField;
10098 }
10099 set
10100 {
10101 this.codepageFieldSet = true;
10102 this.codepageField = value;
10103 }
10104 }
10105
10106 /// <summary>
10107 /// The modularizaion Guid.
10108 /// </summary>
10109 public string Guid
10110 {
10111 get
10112 {
10113 return this.guidField;
10114 }
10115 set
10116 {
10117 this.guidFieldSet = true;
10118 this.guidField = value;
10119 }
10120 }
10121
10122 /// <summary>
10123 /// The decimal language ID (LCID) of the merge module.
10124 /// </summary>
10125 public string Language
10126 {
10127 get
10128 {
10129 return this.languageField;
10130 }
10131 set
10132 {
10133 this.languageFieldSet = true;
10134 this.languageField = value;
10135 }
10136 }
10137
10138 /// <summary>
10139 /// The major and minor versions of the merge module.
10140 /// </summary>
10141 public string Version
10142 {
10143 get
10144 {
10145 return this.versionField;
10146 }
10147 set
10148 {
10149 this.versionFieldSet = true;
10150 this.versionField = value;
10151 }
10152 }
10153
10154 public virtual ISchemaElement ParentElement
10155 {
10156 get
10157 {
10158 return this.parentElement;
10159 }
10160 set
10161 {
10162 this.parentElement = value;
10163 }
10164 }
10165
10166 public virtual void AddChild(ISchemaElement child)
10167 {
10168 if ((null == child))
10169 {
10170 throw new ArgumentNullException("child");
10171 }
10172 this.children.AddElement(child);
10173 child.ParentElement = this;
10174 }
10175
10176 public virtual void RemoveChild(ISchemaElement child)
10177 {
10178 if ((null == child))
10179 {
10180 throw new ArgumentNullException("child");
10181 }
10182 this.children.RemoveElement(child);
10183 child.ParentElement = null;
10184 }
10185
10186 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
10187 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
10188 ISchemaElement ICreateChildren.CreateChild(string childName)
10189 {
10190 if (String.IsNullOrEmpty(childName))
10191 {
10192 throw new ArgumentNullException("childName");
10193 }
10194 ISchemaElement childValue = null;
10195 if (("SummaryInformation" == childName))
10196 {
10197 childValue = new SummaryInformation();
10198 }
10199 if (("AppId" == childName))
10200 {
10201 childValue = new AppId();
10202 }
10203 if (("Binary" == childName))
10204 {
10205 childValue = new Binary();
10206 }
10207 if (("Component" == childName))
10208 {
10209 childValue = new Component();
10210 }
10211 if (("ComponentGroupRef" == childName))
10212 {
10213 childValue = new ComponentGroupRef();
10214 }
10215 if (("ComponentRef" == childName))
10216 {
10217 childValue = new ComponentRef();
10218 }
10219 if (("Configuration" == childName))
10220 {
10221 childValue = new Configuration();
10222 }
10223 if (("CustomAction" == childName))
10224 {
10225 childValue = new CustomAction();
10226 }
10227 if (("CustomActionRef" == childName))
10228 {
10229 childValue = new CustomActionRef();
10230 }
10231 if (("CustomTable" == childName))
10232 {
10233 childValue = new CustomTable();
10234 }
10235 if (("Dependency" == childName))
10236 {
10237 childValue = new Dependency();
10238 }
10239 if (("Directory" == childName))
10240 {
10241 childValue = new Directory();
10242 }
10243 if (("DirectoryRef" == childName))
10244 {
10245 childValue = new DirectoryRef();
10246 }
10247 if (("EmbeddedChainer" == childName))
10248 {
10249 childValue = new EmbeddedChainer();
10250 }
10251 if (("EmbeddedChainerRef" == childName))
10252 {
10253 childValue = new EmbeddedChainerRef();
10254 }
10255 if (("EnsureTable" == childName))
10256 {
10257 childValue = new EnsureTable();
10258 }
10259 if (("Exclusion" == childName))
10260 {
10261 childValue = new Exclusion();
10262 }
10263 if (("Icon" == childName))
10264 {
10265 childValue = new Icon();
10266 }
10267 if (("IgnoreModularization" == childName))
10268 {
10269 childValue = new IgnoreModularization();
10270 }
10271 if (("IgnoreTable" == childName))
10272 {
10273 childValue = new IgnoreTable();
10274 }
10275 if (("Property" == childName))
10276 {
10277 childValue = new Property();
10278 }
10279 if (("PropertyRef" == childName))
10280 {
10281 childValue = new PropertyRef();
10282 }
10283 if (("SetDirectory" == childName))
10284 {
10285 childValue = new SetDirectory();
10286 }
10287 if (("SetProperty" == childName))
10288 {
10289 childValue = new SetProperty();
10290 }
10291 if (("SFPCatalog" == childName))
10292 {
10293 childValue = new SFPCatalog();
10294 }
10295 if (("Substitution" == childName))
10296 {
10297 childValue = new Substitution();
10298 }
10299 if (("UI" == childName))
10300 {
10301 childValue = new UI();
10302 }
10303 if (("UIRef" == childName))
10304 {
10305 childValue = new UIRef();
10306 }
10307 if (("WixVariable" == childName))
10308 {
10309 childValue = new WixVariable();
10310 }
10311 if (("InstallExecuteSequence" == childName))
10312 {
10313 childValue = new InstallExecuteSequence();
10314 }
10315 if (("InstallUISequence" == childName))
10316 {
10317 childValue = new InstallUISequence();
10318 }
10319 if (("AdminExecuteSequence" == childName))
10320 {
10321 childValue = new AdminExecuteSequence();
10322 }
10323 if (("AdminUISequence" == childName))
10324 {
10325 childValue = new AdminUISequence();
10326 }
10327 if (("AdvertiseExecuteSequence" == childName))
10328 {
10329 childValue = new AdvertiseExecuteSequence();
10330 }
10331 if ((null == childValue))
10332 {
10333 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
10334 }
10335 return childValue;
10336 }
10337
10338 /// <summary>
10339 /// Processes this element and all child elements into an XmlWriter.
10340 /// </summary>
10341 public virtual void OutputXml(XmlWriter writer)
10342 {
10343 if ((null == writer))
10344 {
10345 throw new ArgumentNullException("writer");
10346 }
10347 writer.WriteStartElement("Module", "http://wixtoolset.org/schemas/v4/wxs");
10348 if (this.idFieldSet)
10349 {
10350 writer.WriteAttributeString("Id", this.idField);
10351 }
10352 if (this.codepageFieldSet)
10353 {
10354 writer.WriteAttributeString("Codepage", this.codepageField);
10355 }
10356 if (this.guidFieldSet)
10357 {
10358 writer.WriteAttributeString("Guid", this.guidField);
10359 }
10360 if (this.languageFieldSet)
10361 {
10362 writer.WriteAttributeString("Language", this.languageField);
10363 }
10364 if (this.versionFieldSet)
10365 {
10366 writer.WriteAttributeString("Version", this.versionField);
10367 }
10368 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
10369 {
10370 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
10371 childElement.OutputXml(writer);
10372 }
10373 writer.WriteEndElement();
10374 }
10375
10376 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
10377 void ISetAttributes.SetAttribute(string name, string value)
10378 {
10379 if (String.IsNullOrEmpty(name))
10380 {
10381 throw new ArgumentNullException("name");
10382 }
10383 if (("Id" == name))
10384 {
10385 this.idField = value;
10386 this.idFieldSet = true;
10387 }
10388 if (("Codepage" == name))
10389 {
10390 this.codepageField = value;
10391 this.codepageFieldSet = true;
10392 }
10393 if (("Guid" == name))
10394 {
10395 this.guidField = value;
10396 this.guidFieldSet = true;
10397 }
10398 if (("Language" == name))
10399 {
10400 this.languageField = value;
10401 this.languageFieldSet = true;
10402 }
10403 if (("Version" == name))
10404 {
10405 this.versionField = value;
10406 this.versionFieldSet = true;
10407 }
10408 }
10409 }
10410
10411 /// <summary>
10412 /// Declares a dependency on another merge module.
10413 /// </summary>
10414 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
10415 public class Dependency : ISchemaElement, ISetAttributes
10416 {
10417
10418 private string requiredIdField;
10419
10420 private bool requiredIdFieldSet;
10421
10422 private int requiredLanguageField;
10423
10424 private bool requiredLanguageFieldSet;
10425
10426 private string requiredVersionField;
10427
10428 private bool requiredVersionFieldSet;
10429
10430 private ISchemaElement parentElement;
10431
10432 /// <summary>
10433 /// Identifier of the merge module required by the merge module.
10434 /// </summary>
10435 public string RequiredId
10436 {
10437 get
10438 {
10439 return this.requiredIdField;
10440 }
10441 set
10442 {
10443 this.requiredIdFieldSet = true;
10444 this.requiredIdField = value;
10445 }
10446 }
10447
10448 /// <summary>
10449 /// Numeric language ID of the merge module in RequiredID.
10450 /// </summary>
10451 public int RequiredLanguage
10452 {
10453 get
10454 {
10455 return this.requiredLanguageField;
10456 }
10457 set
10458 {
10459 this.requiredLanguageFieldSet = true;
10460 this.requiredLanguageField = value;
10461 }
10462 }
10463
10464 /// <summary>
10465 /// Version of the merge module in RequiredID.
10466 /// </summary>
10467 public string RequiredVersion
10468 {
10469 get
10470 {
10471 return this.requiredVersionField;
10472 }
10473 set
10474 {
10475 this.requiredVersionFieldSet = true;
10476 this.requiredVersionField = value;
10477 }
10478 }
10479
10480 public virtual ISchemaElement ParentElement
10481 {
10482 get
10483 {
10484 return this.parentElement;
10485 }
10486 set
10487 {
10488 this.parentElement = value;
10489 }
10490 }
10491
10492 /// <summary>
10493 /// Processes this element and all child elements into an XmlWriter.
10494 /// </summary>
10495 public virtual void OutputXml(XmlWriter writer)
10496 {
10497 if ((null == writer))
10498 {
10499 throw new ArgumentNullException("writer");
10500 }
10501 writer.WriteStartElement("Dependency", "http://wixtoolset.org/schemas/v4/wxs");
10502 if (this.requiredIdFieldSet)
10503 {
10504 writer.WriteAttributeString("RequiredId", this.requiredIdField);
10505 }
10506 if (this.requiredLanguageFieldSet)
10507 {
10508 writer.WriteAttributeString("RequiredLanguage", this.requiredLanguageField.ToString(CultureInfo.InvariantCulture));
10509 }
10510 if (this.requiredVersionFieldSet)
10511 {
10512 writer.WriteAttributeString("RequiredVersion", this.requiredVersionField);
10513 }
10514 writer.WriteEndElement();
10515 }
10516
10517 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
10518 void ISetAttributes.SetAttribute(string name, string value)
10519 {
10520 if (String.IsNullOrEmpty(name))
10521 {
10522 throw new ArgumentNullException("name");
10523 }
10524 if (("RequiredId" == name))
10525 {
10526 this.requiredIdField = value;
10527 this.requiredIdFieldSet = true;
10528 }
10529 if (("RequiredLanguage" == name))
10530 {
10531 this.requiredLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
10532 this.requiredLanguageFieldSet = true;
10533 }
10534 if (("RequiredVersion" == name))
10535 {
10536 this.requiredVersionField = value;
10537 this.requiredVersionFieldSet = true;
10538 }
10539 }
10540 }
10541
10542 /// <summary>
10543 /// Declares a merge module with which this merge module is incompatible.
10544 /// </summary>
10545 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
10546 public class Exclusion : ISchemaElement, ISetAttributes
10547 {
10548
10549 private string excludedIdField;
10550
10551 private bool excludedIdFieldSet;
10552
10553 private int excludeExceptLanguageField;
10554
10555 private bool excludeExceptLanguageFieldSet;
10556
10557 private int excludeLanguageField;
10558
10559 private bool excludeLanguageFieldSet;
10560
10561 private string excludedMinVersionField;
10562
10563 private bool excludedMinVersionFieldSet;
10564
10565 private string excludedMaxVersionField;
10566
10567 private bool excludedMaxVersionFieldSet;
10568
10569 private ISchemaElement parentElement;
10570
10571 /// <summary>
10572 /// Identifier of the merge module that is incompatible.
10573 /// </summary>
10574 public string ExcludedId
10575 {
10576 get
10577 {
10578 return this.excludedIdField;
10579 }
10580 set
10581 {
10582 this.excludedIdFieldSet = true;
10583 this.excludedIdField = value;
10584 }
10585 }
10586
10587 /// <summary>
10588 /// 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.
10589 /// </summary>
10590 public int ExcludeExceptLanguage
10591 {
10592 get
10593 {
10594 return this.excludeExceptLanguageField;
10595 }
10596 set
10597 {
10598 this.excludeExceptLanguageFieldSet = true;
10599 this.excludeExceptLanguageField = value;
10600 }
10601 }
10602
10603 /// <summary>
10604 /// Numeric language ID of the merge module in ExcludedID. The specified language will be excluded. Only one of ExcludeExceptLanguage and ExcludeLanguage may be specified.
10605 /// </summary>
10606 public int ExcludeLanguage
10607 {
10608 get
10609 {
10610 return this.excludeLanguageField;
10611 }
10612 set
10613 {
10614 this.excludeLanguageFieldSet = true;
10615 this.excludeLanguageField = value;
10616 }
10617 }
10618
10619 /// <summary>
10620 /// 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.
10621 /// </summary>
10622 public string ExcludedMinVersion
10623 {
10624 get
10625 {
10626 return this.excludedMinVersionField;
10627 }
10628 set
10629 {
10630 this.excludedMinVersionFieldSet = true;
10631 this.excludedMinVersionField = value;
10632 }
10633 }
10634
10635 /// <summary>
10636 /// 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.
10637 /// </summary>
10638 public string ExcludedMaxVersion
10639 {
10640 get
10641 {
10642 return this.excludedMaxVersionField;
10643 }
10644 set
10645 {
10646 this.excludedMaxVersionFieldSet = true;
10647 this.excludedMaxVersionField = value;
10648 }
10649 }
10650
10651 public virtual ISchemaElement ParentElement
10652 {
10653 get
10654 {
10655 return this.parentElement;
10656 }
10657 set
10658 {
10659 this.parentElement = value;
10660 }
10661 }
10662
10663 /// <summary>
10664 /// Processes this element and all child elements into an XmlWriter.
10665 /// </summary>
10666 public virtual void OutputXml(XmlWriter writer)
10667 {
10668 if ((null == writer))
10669 {
10670 throw new ArgumentNullException("writer");
10671 }
10672 writer.WriteStartElement("Exclusion", "http://wixtoolset.org/schemas/v4/wxs");
10673 if (this.excludedIdFieldSet)
10674 {
10675 writer.WriteAttributeString("ExcludedId", this.excludedIdField);
10676 }
10677 if (this.excludeExceptLanguageFieldSet)
10678 {
10679 writer.WriteAttributeString("ExcludeExceptLanguage", this.excludeExceptLanguageField.ToString(CultureInfo.InvariantCulture));
10680 }
10681 if (this.excludeLanguageFieldSet)
10682 {
10683 writer.WriteAttributeString("ExcludeLanguage", this.excludeLanguageField.ToString(CultureInfo.InvariantCulture));
10684 }
10685 if (this.excludedMinVersionFieldSet)
10686 {
10687 writer.WriteAttributeString("ExcludedMinVersion", this.excludedMinVersionField);
10688 }
10689 if (this.excludedMaxVersionFieldSet)
10690 {
10691 writer.WriteAttributeString("ExcludedMaxVersion", this.excludedMaxVersionField);
10692 }
10693 writer.WriteEndElement();
10694 }
10695
10696 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
10697 void ISetAttributes.SetAttribute(string name, string value)
10698 {
10699 if (String.IsNullOrEmpty(name))
10700 {
10701 throw new ArgumentNullException("name");
10702 }
10703 if (("ExcludedId" == name))
10704 {
10705 this.excludedIdField = value;
10706 this.excludedIdFieldSet = true;
10707 }
10708 if (("ExcludeExceptLanguage" == name))
10709 {
10710 this.excludeExceptLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
10711 this.excludeExceptLanguageFieldSet = true;
10712 }
10713 if (("ExcludeLanguage" == name))
10714 {
10715 this.excludeLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
10716 this.excludeLanguageFieldSet = true;
10717 }
10718 if (("ExcludedMinVersion" == name))
10719 {
10720 this.excludedMinVersionField = value;
10721 this.excludedMinVersionFieldSet = true;
10722 }
10723 if (("ExcludedMaxVersion" == name))
10724 {
10725 this.excludedMaxVersionField = value;
10726 this.excludedMaxVersionFieldSet = true;
10727 }
10728 }
10729 }
10730
10731 /// <summary>
10732 /// Defines the configurable attributes of merge module.
10733 /// </summary>
10734 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
10735 public class Configuration : ISchemaElement, ISetAttributes
10736 {
10737
10738 private string nameField;
10739
10740 private bool nameFieldSet;
10741
10742 private FormatType formatField;
10743
10744 private bool formatFieldSet;
10745
10746 private string typeField;
10747
10748 private bool typeFieldSet;
10749
10750 private string contextDataField;
10751
10752 private bool contextDataFieldSet;
10753
10754 private string defaultValueField;
10755
10756 private bool defaultValueFieldSet;
10757
10758 private YesNoType keyNoOrphanField;
10759
10760 private bool keyNoOrphanFieldSet;
10761
10762 private YesNoType nonNullableField;
10763
10764 private bool nonNullableFieldSet;
10765
10766 private string displayNameField;
10767
10768 private bool displayNameFieldSet;
10769
10770 private string descriptionField;
10771
10772 private bool descriptionFieldSet;
10773
10774 private string helpLocationField;
10775
10776 private bool helpLocationFieldSet;
10777
10778 private string helpKeywordField;
10779
10780 private bool helpKeywordFieldSet;
10781
10782 private ISchemaElement parentElement;
10783
10784 /// <summary>
10785 /// Defines the name of the configurable item.
10786 /// </summary>
10787 public string Name
10788 {
10789 get
10790 {
10791 return this.nameField;
10792 }
10793 set
10794 {
10795 this.nameFieldSet = true;
10796 this.nameField = value;
10797 }
10798 }
10799
10800 /// <summary>
10801 /// Specifies the format of the data being changed.
10802 /// </summary>
10803 public FormatType Format
10804 {
10805 get
10806 {
10807 return this.formatField;
10808 }
10809 set
10810 {
10811 this.formatFieldSet = true;
10812 this.formatField = value;
10813 }
10814 }
10815
10816 /// <summary>
10817 /// Specifies the type of the data being changed.
10818 /// </summary>
10819 public string Type
10820 {
10821 get
10822 {
10823 return this.typeField;
10824 }
10825 set
10826 {
10827 this.typeFieldSet = true;
10828 this.typeField = value;
10829 }
10830 }
10831
10832 /// <summary>
10833 /// Specifies a semantic context for the requested data.
10834 /// </summary>
10835 public string ContextData
10836 {
10837 get
10838 {
10839 return this.contextDataField;
10840 }
10841 set
10842 {
10843 this.contextDataFieldSet = true;
10844 this.contextDataField = value;
10845 }
10846 }
10847
10848 /// <summary>
10849 /// Specifies a default value for the item in this record if the merge tool declines to provide a value.
10850 /// </summary>
10851 public string DefaultValue
10852 {
10853 get
10854 {
10855 return this.defaultValueField;
10856 }
10857 set
10858 {
10859 this.defaultValueFieldSet = true;
10860 this.defaultValueField = value;
10861 }
10862 }
10863
10864 /// <summary>
10865 /// Does not merge rule according to rules in MSI SDK.
10866 /// </summary>
10867 public YesNoType KeyNoOrphan
10868 {
10869 get
10870 {
10871 return this.keyNoOrphanField;
10872 }
10873 set
10874 {
10875 this.keyNoOrphanFieldSet = true;
10876 this.keyNoOrphanField = value;
10877 }
10878 }
10879
10880 /// <summary>
10881 /// If yes, null is not a valid entry.
10882 /// </summary>
10883 public YesNoType NonNullable
10884 {
10885 get
10886 {
10887 return this.nonNullableField;
10888 }
10889 set
10890 {
10891 this.nonNullableFieldSet = true;
10892 this.nonNullableField = value;
10893 }
10894 }
10895
10896 /// <summary>
10897 /// Display name for authoring.
10898 /// </summary>
10899 public string DisplayName
10900 {
10901 get
10902 {
10903 return this.displayNameField;
10904 }
10905 set
10906 {
10907 this.displayNameFieldSet = true;
10908 this.displayNameField = value;
10909 }
10910 }
10911
10912 /// <summary>
10913 /// Description for authoring.
10914 /// </summary>
10915 public string Description
10916 {
10917 get
10918 {
10919 return this.descriptionField;
10920 }
10921 set
10922 {
10923 this.descriptionFieldSet = true;
10924 this.descriptionField = value;
10925 }
10926 }
10927
10928 /// <summary>
10929 /// Location of chm file for authoring.
10930 /// </summary>
10931 public string HelpLocation
10932 {
10933 get
10934 {
10935 return this.helpLocationField;
10936 }
10937 set
10938 {
10939 this.helpLocationFieldSet = true;
10940 this.helpLocationField = value;
10941 }
10942 }
10943
10944 /// <summary>
10945 /// Keyword into chm file for authoring.
10946 /// </summary>
10947 public string HelpKeyword
10948 {
10949 get
10950 {
10951 return this.helpKeywordField;
10952 }
10953 set
10954 {
10955 this.helpKeywordFieldSet = true;
10956 this.helpKeywordField = value;
10957 }
10958 }
10959
10960 public virtual ISchemaElement ParentElement
10961 {
10962 get
10963 {
10964 return this.parentElement;
10965 }
10966 set
10967 {
10968 this.parentElement = value;
10969 }
10970 }
10971
10972 /// <summary>
10973 /// Parses a FormatType from a string.
10974 /// </summary>
10975 public static FormatType ParseFormatType(string value)
10976 {
10977 FormatType parsedValue;
10978 Configuration.TryParseFormatType(value, out parsedValue);
10979 return parsedValue;
10980 }
10981
10982 /// <summary>
10983 /// Tries to parse a FormatType from a string.
10984 /// </summary>
10985 public static bool TryParseFormatType(string value, out FormatType parsedValue)
10986 {
10987 parsedValue = FormatType.NotSet;
10988 if (string.IsNullOrEmpty(value))
10989 {
10990 return false;
10991 }
10992 if (("Text" == value))
10993 {
10994 parsedValue = FormatType.Text;
10995 }
10996 else
10997 {
10998 if (("Key" == value))
10999 {
11000 parsedValue = FormatType.Key;
11001 }
11002 else
11003 {
11004 if (("Integer" == value))
11005 {
11006 parsedValue = FormatType.Integer;
11007 }
11008 else
11009 {
11010 if (("Bitfield" == value))
11011 {
11012 parsedValue = FormatType.Bitfield;
11013 }
11014 else
11015 {
11016 parsedValue = FormatType.IllegalValue;
11017 return false;
11018 }
11019 }
11020 }
11021 }
11022 return true;
11023 }
11024
11025 /// <summary>
11026 /// Processes this element and all child elements into an XmlWriter.
11027 /// </summary>
11028 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
11029 public virtual void OutputXml(XmlWriter writer)
11030 {
11031 if ((null == writer))
11032 {
11033 throw new ArgumentNullException("writer");
11034 }
11035 writer.WriteStartElement("Configuration", "http://wixtoolset.org/schemas/v4/wxs");
11036 if (this.nameFieldSet)
11037 {
11038 writer.WriteAttributeString("Name", this.nameField);
11039 }
11040 if (this.formatFieldSet)
11041 {
11042 if ((this.formatField == FormatType.Text))
11043 {
11044 writer.WriteAttributeString("Format", "Text");
11045 }
11046 if ((this.formatField == FormatType.Key))
11047 {
11048 writer.WriteAttributeString("Format", "Key");
11049 }
11050 if ((this.formatField == FormatType.Integer))
11051 {
11052 writer.WriteAttributeString("Format", "Integer");
11053 }
11054 if ((this.formatField == FormatType.Bitfield))
11055 {
11056 writer.WriteAttributeString("Format", "Bitfield");
11057 }
11058 }
11059 if (this.typeFieldSet)
11060 {
11061 writer.WriteAttributeString("Type", this.typeField);
11062 }
11063 if (this.contextDataFieldSet)
11064 {
11065 writer.WriteAttributeString("ContextData", this.contextDataField);
11066 }
11067 if (this.defaultValueFieldSet)
11068 {
11069 writer.WriteAttributeString("DefaultValue", this.defaultValueField);
11070 }
11071 if (this.keyNoOrphanFieldSet)
11072 {
11073 if ((this.keyNoOrphanField == YesNoType.no))
11074 {
11075 writer.WriteAttributeString("KeyNoOrphan", "no");
11076 }
11077 if ((this.keyNoOrphanField == YesNoType.yes))
11078 {
11079 writer.WriteAttributeString("KeyNoOrphan", "yes");
11080 }
11081 }
11082 if (this.nonNullableFieldSet)
11083 {
11084 if ((this.nonNullableField == YesNoType.no))
11085 {
11086 writer.WriteAttributeString("NonNullable", "no");
11087 }
11088 if ((this.nonNullableField == YesNoType.yes))
11089 {
11090 writer.WriteAttributeString("NonNullable", "yes");
11091 }
11092 }
11093 if (this.displayNameFieldSet)
11094 {
11095 writer.WriteAttributeString("DisplayName", this.displayNameField);
11096 }
11097 if (this.descriptionFieldSet)
11098 {
11099 writer.WriteAttributeString("Description", this.descriptionField);
11100 }
11101 if (this.helpLocationFieldSet)
11102 {
11103 writer.WriteAttributeString("HelpLocation", this.helpLocationField);
11104 }
11105 if (this.helpKeywordFieldSet)
11106 {
11107 writer.WriteAttributeString("HelpKeyword", this.helpKeywordField);
11108 }
11109 writer.WriteEndElement();
11110 }
11111
11112 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11113 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
11114 void ISetAttributes.SetAttribute(string name, string value)
11115 {
11116 if (String.IsNullOrEmpty(name))
11117 {
11118 throw new ArgumentNullException("name");
11119 }
11120 if (("Name" == name))
11121 {
11122 this.nameField = value;
11123 this.nameFieldSet = true;
11124 }
11125 if (("Format" == name))
11126 {
11127 this.formatField = Configuration.ParseFormatType(value);
11128 this.formatFieldSet = true;
11129 }
11130 if (("Type" == name))
11131 {
11132 this.typeField = value;
11133 this.typeFieldSet = true;
11134 }
11135 if (("ContextData" == name))
11136 {
11137 this.contextDataField = value;
11138 this.contextDataFieldSet = true;
11139 }
11140 if (("DefaultValue" == name))
11141 {
11142 this.defaultValueField = value;
11143 this.defaultValueFieldSet = true;
11144 }
11145 if (("KeyNoOrphan" == name))
11146 {
11147 this.keyNoOrphanField = Enums.ParseYesNoType(value);
11148 this.keyNoOrphanFieldSet = true;
11149 }
11150 if (("NonNullable" == name))
11151 {
11152 this.nonNullableField = Enums.ParseYesNoType(value);
11153 this.nonNullableFieldSet = true;
11154 }
11155 if (("DisplayName" == name))
11156 {
11157 this.displayNameField = value;
11158 this.displayNameFieldSet = true;
11159 }
11160 if (("Description" == name))
11161 {
11162 this.descriptionField = value;
11163 this.descriptionFieldSet = true;
11164 }
11165 if (("HelpLocation" == name))
11166 {
11167 this.helpLocationField = value;
11168 this.helpLocationFieldSet = true;
11169 }
11170 if (("HelpKeyword" == name))
11171 {
11172 this.helpKeywordField = value;
11173 this.helpKeywordFieldSet = true;
11174 }
11175 }
11176
11177 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
11178 public enum FormatType
11179 {
11180
11181 IllegalValue = int.MaxValue,
11182
11183 NotSet = -1,
11184
11185 Text,
11186
11187 Key,
11188
11189 Integer,
11190
11191 Bitfield,
11192 }
11193 }
11194
11195 /// <summary>
11196 /// Specifies the configurable fields of a module database and provides a template for the configuration of each field.
11197 /// </summary>
11198 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
11199 public class Substitution : ISchemaElement, ISetAttributes
11200 {
11201
11202 private string tableField;
11203
11204 private bool tableFieldSet;
11205
11206 private string rowField;
11207
11208 private bool rowFieldSet;
11209
11210 private string columnField;
11211
11212 private bool columnFieldSet;
11213
11214 private string valueField;
11215
11216 private bool valueFieldSet;
11217
11218 private ISchemaElement parentElement;
11219
11220 /// <summary>
11221 /// Specifies the name of the table being modified in the module database.
11222 /// </summary>
11223 public string Table
11224 {
11225 get
11226 {
11227 return this.tableField;
11228 }
11229 set
11230 {
11231 this.tableFieldSet = true;
11232 this.tableField = value;
11233 }
11234 }
11235
11236 /// <summary>
11237 /// Specifies the primary keys of the target row in the table named in the Table column. If multiple keys, separated by semicolons.
11238 /// </summary>
11239 public string Row
11240 {
11241 get
11242 {
11243 return this.rowField;
11244 }
11245 set
11246 {
11247 this.rowFieldSet = true;
11248 this.rowField = value;
11249 }
11250 }
11251
11252 /// <summary>
11253 /// Specifies the target column in the row named in the Row column.
11254 /// </summary>
11255 public string Column
11256 {
11257 get
11258 {
11259 return this.columnField;
11260 }
11261 set
11262 {
11263 this.columnFieldSet = true;
11264 this.columnField = value;
11265 }
11266 }
11267
11268 /// <summary>
11269 /// Provides a formatting template for the data being substituted into the target field specified by Table, Row, and Column.
11270 /// </summary>
11271 public string Value
11272 {
11273 get
11274 {
11275 return this.valueField;
11276 }
11277 set
11278 {
11279 this.valueFieldSet = true;
11280 this.valueField = value;
11281 }
11282 }
11283
11284 public virtual ISchemaElement ParentElement
11285 {
11286 get
11287 {
11288 return this.parentElement;
11289 }
11290 set
11291 {
11292 this.parentElement = value;
11293 }
11294 }
11295
11296 /// <summary>
11297 /// Processes this element and all child elements into an XmlWriter.
11298 /// </summary>
11299 public virtual void OutputXml(XmlWriter writer)
11300 {
11301 if ((null == writer))
11302 {
11303 throw new ArgumentNullException("writer");
11304 }
11305 writer.WriteStartElement("Substitution", "http://wixtoolset.org/schemas/v4/wxs");
11306 if (this.tableFieldSet)
11307 {
11308 writer.WriteAttributeString("Table", this.tableField);
11309 }
11310 if (this.rowFieldSet)
11311 {
11312 writer.WriteAttributeString("Row", this.rowField);
11313 }
11314 if (this.columnFieldSet)
11315 {
11316 writer.WriteAttributeString("Column", this.columnField);
11317 }
11318 if (this.valueFieldSet)
11319 {
11320 writer.WriteAttributeString("Value", this.valueField);
11321 }
11322 writer.WriteEndElement();
11323 }
11324
11325 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11326 void ISetAttributes.SetAttribute(string name, string value)
11327 {
11328 if (String.IsNullOrEmpty(name))
11329 {
11330 throw new ArgumentNullException("name");
11331 }
11332 if (("Table" == name))
11333 {
11334 this.tableField = value;
11335 this.tableFieldSet = true;
11336 }
11337 if (("Row" == name))
11338 {
11339 this.rowField = value;
11340 this.rowFieldSet = true;
11341 }
11342 if (("Column" == name))
11343 {
11344 this.columnField = value;
11345 this.columnFieldSet = true;
11346 }
11347 if (("Value" == name))
11348 {
11349 this.valueField = value;
11350 this.valueFieldSet = true;
11351 }
11352 }
11353 }
11354
11355 /// <summary>
11356 /// Specifies a table from the merge module that is not merged into an .msi file.
11357 /// If the table already exists in an .msi file, it is not modified by the merge.
11358 /// The specified table can therefore contain data that is unneeded after the merge.
11359 /// To minimize the size of the .msm file, it is recommended that developers remove
11360 /// unused tables from modules intended for redistribution rather than creating
11361 /// IgnoreTable elements for those tables.
11362 /// </summary>
11363 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
11364 public class IgnoreTable : ISchemaElement, ISetAttributes
11365 {
11366
11367 private string idField;
11368
11369 private bool idFieldSet;
11370
11371 private ISchemaElement parentElement;
11372
11373 /// <summary>
11374 /// The name of the table in the merge module that is not to be merged into the .msi file.
11375 /// </summary>
11376 public string Id
11377 {
11378 get
11379 {
11380 return this.idField;
11381 }
11382 set
11383 {
11384 this.idFieldSet = true;
11385 this.idField = value;
11386 }
11387 }
11388
11389 public virtual ISchemaElement ParentElement
11390 {
11391 get
11392 {
11393 return this.parentElement;
11394 }
11395 set
11396 {
11397 this.parentElement = value;
11398 }
11399 }
11400
11401 /// <summary>
11402 /// Processes this element and all child elements into an XmlWriter.
11403 /// </summary>
11404 public virtual void OutputXml(XmlWriter writer)
11405 {
11406 if ((null == writer))
11407 {
11408 throw new ArgumentNullException("writer");
11409 }
11410 writer.WriteStartElement("IgnoreTable", "http://wixtoolset.org/schemas/v4/wxs");
11411 if (this.idFieldSet)
11412 {
11413 writer.WriteAttributeString("Id", this.idField);
11414 }
11415 writer.WriteEndElement();
11416 }
11417
11418 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11419 void ISetAttributes.SetAttribute(string name, string value)
11420 {
11421 if (String.IsNullOrEmpty(name))
11422 {
11423 throw new ArgumentNullException("name");
11424 }
11425 if (("Id" == name))
11426 {
11427 this.idField = value;
11428 this.idFieldSet = true;
11429 }
11430 }
11431 }
11432
11433 /// <summary>
11434 /// The Fragment element is the building block of creating an installer database in WiX. Once defined,
11435 /// the Fragment becomes an immutable, atomic unit which can either be completely included or excluded
11436 /// from a product. The contents of a Fragment element can be linked into a product by utilizing one
11437 /// of the many *Ref elements. When linking in a Fragment, it will be necessary to link in all of its
11438 /// individual units. For instance, if a given Fragment contains two Component elements, you must link
11439 /// both under features using ComponentRef for each linked Component. Otherwise, you will get a linker
11440 /// warning and have a floating Component that does not appear under any Feature.
11441 /// </summary>
11442 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
11443 public class Fragment : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
11444 {
11445
11446 private ElementCollection children;
11447
11448 private string idField;
11449
11450 private bool idFieldSet;
11451
11452 private ISchemaElement parentElement;
11453
11454 public Fragment()
11455 {
11456 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
11457 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
11458 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Binary)));
11459 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplication)));
11460 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplicationRef)));
11461 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComplianceCheck)));
11462 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
11463 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroup)));
11464 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition)));
11465 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Container)));
11466 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction)));
11467 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef)));
11468 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable)));
11469 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory)));
11470 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef)));
11471 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer)));
11472 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef)));
11473 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable)));
11474 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature)));
11475 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroup)));
11476 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
11477 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Icon)));
11478 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreModularization)));
11479 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Media)));
11480 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MediaTemplate)));
11481 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroup)));
11482 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageCertificates)));
11483 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCertificates)));
11484 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily)));
11485 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroup)));
11486 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroup)));
11487 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property)));
11488 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef)));
11489 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RelatedBundle)));
11490 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory)));
11491 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty)));
11492 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog)));
11493 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UI)));
11494 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef)));
11495 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Upgrade)));
11496 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Variable)));
11497 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable)));
11498 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence);
11499 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence)));
11500 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence)));
11501 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence)));
11502 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence)));
11503 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence)));
11504 childCollection0.AddCollection(childCollection1);
11505 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
11506 this.children = childCollection0;
11507 }
11508
11509 public virtual IEnumerable Children
11510 {
11511 get
11512 {
11513 return this.children;
11514 }
11515 }
11516
11517 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
11518 public virtual IEnumerable this[System.Type childType]
11519 {
11520 get
11521 {
11522 return this.children.Filter(childType);
11523 }
11524 }
11525
11526 /// <summary>
11527 /// Optional identifier for a Fragment. Should only be set by advanced users to tag sections.
11528 /// </summary>
11529 public string Id
11530 {
11531 get
11532 {
11533 return this.idField;
11534 }
11535 set
11536 {
11537 this.idFieldSet = true;
11538 this.idField = value;
11539 }
11540 }
11541
11542 public virtual ISchemaElement ParentElement
11543 {
11544 get
11545 {
11546 return this.parentElement;
11547 }
11548 set
11549 {
11550 this.parentElement = value;
11551 }
11552 }
11553
11554 public virtual void AddChild(ISchemaElement child)
11555 {
11556 if ((null == child))
11557 {
11558 throw new ArgumentNullException("child");
11559 }
11560 this.children.AddElement(child);
11561 child.ParentElement = this;
11562 }
11563
11564 public virtual void RemoveChild(ISchemaElement child)
11565 {
11566 if ((null == child))
11567 {
11568 throw new ArgumentNullException("child");
11569 }
11570 this.children.RemoveElement(child);
11571 child.ParentElement = null;
11572 }
11573
11574 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11575 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
11576 ISchemaElement ICreateChildren.CreateChild(string childName)
11577 {
11578 if (String.IsNullOrEmpty(childName))
11579 {
11580 throw new ArgumentNullException("childName");
11581 }
11582 ISchemaElement childValue = null;
11583 if (("AppId" == childName))
11584 {
11585 childValue = new AppId();
11586 }
11587 if (("Binary" == childName))
11588 {
11589 childValue = new Binary();
11590 }
11591 if (("BootstrapperApplication" == childName))
11592 {
11593 childValue = new BootstrapperApplication();
11594 }
11595 if (("BootstrapperApplicationRef" == childName))
11596 {
11597 childValue = new BootstrapperApplicationRef();
11598 }
11599 if (("ComplianceCheck" == childName))
11600 {
11601 childValue = new ComplianceCheck();
11602 }
11603 if (("Component" == childName))
11604 {
11605 childValue = new Component();
11606 }
11607 if (("ComponentGroup" == childName))
11608 {
11609 childValue = new ComponentGroup();
11610 }
11611 if (("Condition" == childName))
11612 {
11613 childValue = new Condition();
11614 }
11615 if (("Container" == childName))
11616 {
11617 childValue = new Container();
11618 }
11619 if (("CustomAction" == childName))
11620 {
11621 childValue = new CustomAction();
11622 }
11623 if (("CustomActionRef" == childName))
11624 {
11625 childValue = new CustomActionRef();
11626 }
11627 if (("CustomTable" == childName))
11628 {
11629 childValue = new CustomTable();
11630 }
11631 if (("Directory" == childName))
11632 {
11633 childValue = new Directory();
11634 }
11635 if (("DirectoryRef" == childName))
11636 {
11637 childValue = new DirectoryRef();
11638 }
11639 if (("EmbeddedChainer" == childName))
11640 {
11641 childValue = new EmbeddedChainer();
11642 }
11643 if (("EmbeddedChainerRef" == childName))
11644 {
11645 childValue = new EmbeddedChainerRef();
11646 }
11647 if (("EnsureTable" == childName))
11648 {
11649 childValue = new EnsureTable();
11650 }
11651 if (("Feature" == childName))
11652 {
11653 childValue = new Feature();
11654 }
11655 if (("FeatureGroup" == childName))
11656 {
11657 childValue = new FeatureGroup();
11658 }
11659 if (("FeatureRef" == childName))
11660 {
11661 childValue = new FeatureRef();
11662 }
11663 if (("Icon" == childName))
11664 {
11665 childValue = new Icon();
11666 }
11667 if (("IgnoreModularization" == childName))
11668 {
11669 childValue = new IgnoreModularization();
11670 }
11671 if (("Media" == childName))
11672 {
11673 childValue = new Media();
11674 }
11675 if (("MediaTemplate" == childName))
11676 {
11677 childValue = new MediaTemplate();
11678 }
11679 if (("PackageGroup" == childName))
11680 {
11681 childValue = new PackageGroup();
11682 }
11683 if (("PackageCertificates" == childName))
11684 {
11685 childValue = new PackageCertificates();
11686 }
11687 if (("PatchCertificates" == childName))
11688 {
11689 childValue = new PatchCertificates();
11690 }
11691 if (("PatchFamily" == childName))
11692 {
11693 childValue = new PatchFamily();
11694 }
11695 if (("PatchFamilyGroup" == childName))
11696 {
11697 childValue = new PatchFamilyGroup();
11698 }
11699 if (("PayloadGroup" == childName))
11700 {
11701 childValue = new PayloadGroup();
11702 }
11703 if (("Property" == childName))
11704 {
11705 childValue = new Property();
11706 }
11707 if (("PropertyRef" == childName))
11708 {
11709 childValue = new PropertyRef();
11710 }
11711 if (("RelatedBundle" == childName))
11712 {
11713 childValue = new RelatedBundle();
11714 }
11715 if (("SetDirectory" == childName))
11716 {
11717 childValue = new SetDirectory();
11718 }
11719 if (("SetProperty" == childName))
11720 {
11721 childValue = new SetProperty();
11722 }
11723 if (("SFPCatalog" == childName))
11724 {
11725 childValue = new SFPCatalog();
11726 }
11727 if (("UI" == childName))
11728 {
11729 childValue = new UI();
11730 }
11731 if (("UIRef" == childName))
11732 {
11733 childValue = new UIRef();
11734 }
11735 if (("Upgrade" == childName))
11736 {
11737 childValue = new Upgrade();
11738 }
11739 if (("Variable" == childName))
11740 {
11741 childValue = new Variable();
11742 }
11743 if (("WixVariable" == childName))
11744 {
11745 childValue = new WixVariable();
11746 }
11747 if (("InstallExecuteSequence" == childName))
11748 {
11749 childValue = new InstallExecuteSequence();
11750 }
11751 if (("InstallUISequence" == childName))
11752 {
11753 childValue = new InstallUISequence();
11754 }
11755 if (("AdminExecuteSequence" == childName))
11756 {
11757 childValue = new AdminExecuteSequence();
11758 }
11759 if (("AdminUISequence" == childName))
11760 {
11761 childValue = new AdminUISequence();
11762 }
11763 if (("AdvertiseExecuteSequence" == childName))
11764 {
11765 childValue = new AdvertiseExecuteSequence();
11766 }
11767 if ((null == childValue))
11768 {
11769 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
11770 }
11771 return childValue;
11772 }
11773
11774 /// <summary>
11775 /// Processes this element and all child elements into an XmlWriter.
11776 /// </summary>
11777 public virtual void OutputXml(XmlWriter writer)
11778 {
11779 if ((null == writer))
11780 {
11781 throw new ArgumentNullException("writer");
11782 }
11783 writer.WriteStartElement("Fragment", "http://wixtoolset.org/schemas/v4/wxs");
11784 if (this.idFieldSet)
11785 {
11786 writer.WriteAttributeString("Id", this.idField);
11787 }
11788 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
11789 {
11790 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
11791 childElement.OutputXml(writer);
11792 }
11793 writer.WriteEndElement();
11794 }
11795
11796 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
11797 void ISetAttributes.SetAttribute(string name, string value)
11798 {
11799 if (String.IsNullOrEmpty(name))
11800 {
11801 throw new ArgumentNullException("name");
11802 }
11803 if (("Id" == name))
11804 {
11805 this.idField = value;
11806 this.idFieldSet = true;
11807 }
11808 }
11809 }
11810
11811 /// <summary>
11812 /// The Patch element is analogous to the main function in a C program. When linking, only one Patch section
11813 /// can be given to the linker to produce a successful result. Using this element creates an MSP file.
11814 /// </summary>
11815 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
11816 public class Patch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
11817 {
11818
11819 private ElementCollection children;
11820
11821 private string idField;
11822
11823 private bool idFieldSet;
11824
11825 private string codepageField;
11826
11827 private bool codepageFieldSet;
11828
11829 private YesNoType allowRemovalField;
11830
11831 private bool allowRemovalFieldSet;
11832
11833 private string classificationField;
11834
11835 private bool classificationFieldSet;
11836
11837 private string clientPatchIdField;
11838
11839 private bool clientPatchIdFieldSet;
11840
11841 private YesNoType apiPatchingSymbolNoImagehlpFlagField;
11842
11843 private bool apiPatchingSymbolNoImagehlpFlagFieldSet;
11844
11845 private YesNoType apiPatchingSymbolNoFailuresFlagField;
11846
11847 private bool apiPatchingSymbolNoFailuresFlagFieldSet;
11848
11849 private YesNoType apiPatchingSymbolUndecoratedTooFlagField;
11850
11851 private bool apiPatchingSymbolUndecoratedTooFlagFieldSet;
11852
11853 private string descriptionField;
11854
11855 private bool descriptionFieldSet;
11856
11857 private string displayNameField;
11858
11859 private bool displayNameFieldSet;
11860
11861 private string commentsField;
11862
11863 private bool commentsFieldSet;
11864
11865 private string manufacturerField;
11866
11867 private bool manufacturerFieldSet;
11868
11869 private YesNoType minorUpdateTargetRTMField;
11870
11871 private bool minorUpdateTargetRTMFieldSet;
11872
11873 private string moreInfoURLField;
11874
11875 private bool moreInfoURLFieldSet;
11876
11877 private YesNoType optimizedInstallModeField;
11878
11879 private bool optimizedInstallModeFieldSet;
11880
11881 private string targetProductNameField;
11882
11883 private bool targetProductNameFieldSet;
11884
11885 private YesNoType optimizePatchSizeForLargeFilesField;
11886
11887 private bool optimizePatchSizeForLargeFilesFieldSet;
11888
11889 private ISchemaElement parentElement;
11890
11891 public Patch()
11892 {
11893 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
11894 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
11895 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchInformation)));
11896 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Media)));
11897 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(OptimizeCustomActions)));
11898 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily)));
11899 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyRef)));
11900 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroup)));
11901 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroupRef)));
11902 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchProperty)));
11903 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCodes)));
11904 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
11905 childCollection0.AddCollection(childCollection1);
11906 this.children = childCollection0;
11907 }
11908
11909 public virtual IEnumerable Children
11910 {
11911 get
11912 {
11913 return this.children;
11914 }
11915 }
11916
11917 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
11918 public virtual IEnumerable this[System.Type childType]
11919 {
11920 get
11921 {
11922 return this.children.Filter(childType);
11923 }
11924 }
11925
11926 /// <summary>
11927 /// Patch code for this patch.
11928 /// </summary>
11929 public string Id
11930 {
11931 get
11932 {
11933 return this.idField;
11934 }
11935 set
11936 {
11937 this.idFieldSet = true;
11938 this.idField = value;
11939 }
11940 }
11941
11942 /// <summary>
11943 /// The code page integer value or web name for the resulting MSP. See remarks for more information.
11944 /// </summary>
11945 public string Codepage
11946 {
11947 get
11948 {
11949 return this.codepageField;
11950 }
11951 set
11952 {
11953 this.codepageFieldSet = true;
11954 this.codepageField = value;
11955 }
11956 }
11957
11958 /// <summary>
11959 /// Whether this is an uninstallable patch.
11960 /// </summary>
11961 public YesNoType AllowRemoval
11962 {
11963 get
11964 {
11965 return this.allowRemovalField;
11966 }
11967 set
11968 {
11969 this.allowRemovalFieldSet = true;
11970 this.allowRemovalField = value;
11971 }
11972 }
11973
11974 /// <summary>
11975 /// Category of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup.
11976 /// </summary>
11977 public string Classification
11978 {
11979 get
11980 {
11981 return this.classificationField;
11982 }
11983 set
11984 {
11985 this.classificationFieldSet = true;
11986 this.classificationField = value;
11987 }
11988 }
11989
11990 /// <summary>
11991 /// An easily referenced identity unique to a patch that can be used in product authoring. See remarks for more information.
11992 /// </summary>
11993 public string ClientPatchId
11994 {
11995 get
11996 {
11997 return this.clientPatchIdField;
11998 }
11999 set
12000 {
12001 this.clientPatchIdFieldSet = true;
12002 this.clientPatchIdField = value;
12003 }
12004 }
12005
12006 /// <summary>
12007 /// Flag used when creating a binary file patch. Default is "no". Don't use imagehlp.dll.
12008 /// </summary>
12009 public YesNoType ApiPatchingSymbolNoImagehlpFlag
12010 {
12011 get
12012 {
12013 return this.apiPatchingSymbolNoImagehlpFlagField;
12014 }
12015 set
12016 {
12017 this.apiPatchingSymbolNoImagehlpFlagFieldSet = true;
12018 this.apiPatchingSymbolNoImagehlpFlagField = value;
12019 }
12020 }
12021
12022 /// <summary>
12023 /// Flag used when creating a binary file patch. Default is "no". Don't fail patch due to imagehlp failures.
12024 /// </summary>
12025 public YesNoType ApiPatchingSymbolNoFailuresFlag
12026 {
12027 get
12028 {
12029 return this.apiPatchingSymbolNoFailuresFlagField;
12030 }
12031 set
12032 {
12033 this.apiPatchingSymbolNoFailuresFlagFieldSet = true;
12034 this.apiPatchingSymbolNoFailuresFlagField = value;
12035 }
12036 }
12037
12038 /// <summary>
12039 /// Flag used when creating a binary file patch. Default is "no". After matching decorated symbols, try to match remaining by undecorated names.
12040 /// </summary>
12041 public YesNoType ApiPatchingSymbolUndecoratedTooFlag
12042 {
12043 get
12044 {
12045 return this.apiPatchingSymbolUndecoratedTooFlagField;
12046 }
12047 set
12048 {
12049 this.apiPatchingSymbolUndecoratedTooFlagFieldSet = true;
12050 this.apiPatchingSymbolUndecoratedTooFlagField = value;
12051 }
12052 }
12053
12054 /// <summary>
12055 /// Description of the patch.
12056 /// </summary>
12057 public string Description
12058 {
12059 get
12060 {
12061 return this.descriptionField;
12062 }
12063 set
12064 {
12065 this.descriptionFieldSet = true;
12066 this.descriptionField = value;
12067 }
12068 }
12069
12070 /// <summary>
12071 /// A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on.
12072 /// </summary>
12073 public string DisplayName
12074 {
12075 get
12076 {
12077 return this.displayNameField;
12078 }
12079 set
12080 {
12081 this.displayNameFieldSet = true;
12082 this.displayNameField = value;
12083 }
12084 }
12085
12086 /// <summary>
12087 /// Optional comments for browsing.
12088 /// </summary>
12089 public string Comments
12090 {
12091 get
12092 {
12093 return this.commentsField;
12094 }
12095 set
12096 {
12097 this.commentsFieldSet = true;
12098 this.commentsField = value;
12099 }
12100 }
12101
12102 /// <summary>
12103 /// Vendor releasing the package
12104 /// </summary>
12105 public string Manufacturer
12106 {
12107 get
12108 {
12109 return this.manufacturerField;
12110 }
12111 set
12112 {
12113 this.manufacturerFieldSet = true;
12114 this.manufacturerField = value;
12115 }
12116 }
12117
12118 /// <summary>
12119 /// Indicates that the patch targets the RTM version of the product or the most recent major
12120 /// upgrade patch. Author this optional property in minor update patches that contain sequencing
12121 /// information to indicate that the patch removes all patches up to the RTM version of the
12122 /// product, or up to the most recent major upgrade patch. This property is available beginning
12123 /// with Windows Installer 3.1.
12124 /// </summary>
12125 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
12126 public YesNoType MinorUpdateTargetRTM
12127 {
12128 get
12129 {
12130 return this.minorUpdateTargetRTMField;
12131 }
12132 set
12133 {
12134 this.minorUpdateTargetRTMFieldSet = true;
12135 this.minorUpdateTargetRTMField = value;
12136 }
12137 }
12138
12139 /// <summary>
12140 /// A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on.
12141 /// </summary>
12142 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
12143 public string MoreInfoURL
12144 {
12145 get
12146 {
12147 return this.moreInfoURLField;
12148 }
12149 set
12150 {
12151 this.moreInfoURLFieldSet = true;
12152 this.moreInfoURLField = value;
12153 }
12154 }
12155
12156 /// <summary>
12157 /// If this attribute is set to 'yes' in all the patches to be applied in a transaction, the
12158 /// application of the patch is optimized if possible. Available beginning with Windows Installer 3.1.
12159 /// </summary>
12160 public YesNoType OptimizedInstallMode
12161 {
12162 get
12163 {
12164 return this.optimizedInstallModeField;
12165 }
12166 set
12167 {
12168 this.optimizedInstallModeFieldSet = true;
12169 this.optimizedInstallModeField = value;
12170 }
12171 }
12172
12173 /// <summary>
12174 /// Name of the application or target product suite.
12175 /// </summary>
12176 public string TargetProductName
12177 {
12178 get
12179 {
12180 return this.targetProductNameField;
12181 }
12182 set
12183 {
12184 this.targetProductNameFieldSet = true;
12185 this.targetProductNameField = value;
12186 }
12187 }
12188
12189 /// <summary>
12190 /// When this attribute is set, patches for files greater than approximately 4 MB in size may be made smaller.
12191 /// </summary>
12192 public YesNoType OptimizePatchSizeForLargeFiles
12193 {
12194 get
12195 {
12196 return this.optimizePatchSizeForLargeFilesField;
12197 }
12198 set
12199 {
12200 this.optimizePatchSizeForLargeFilesFieldSet = true;
12201 this.optimizePatchSizeForLargeFilesField = value;
12202 }
12203 }
12204
12205 public virtual ISchemaElement ParentElement
12206 {
12207 get
12208 {
12209 return this.parentElement;
12210 }
12211 set
12212 {
12213 this.parentElement = value;
12214 }
12215 }
12216
12217 public virtual void AddChild(ISchemaElement child)
12218 {
12219 if ((null == child))
12220 {
12221 throw new ArgumentNullException("child");
12222 }
12223 this.children.AddElement(child);
12224 child.ParentElement = this;
12225 }
12226
12227 public virtual void RemoveChild(ISchemaElement child)
12228 {
12229 if ((null == child))
12230 {
12231 throw new ArgumentNullException("child");
12232 }
12233 this.children.RemoveElement(child);
12234 child.ParentElement = null;
12235 }
12236
12237 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
12238 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
12239 ISchemaElement ICreateChildren.CreateChild(string childName)
12240 {
12241 if (String.IsNullOrEmpty(childName))
12242 {
12243 throw new ArgumentNullException("childName");
12244 }
12245 ISchemaElement childValue = null;
12246 if (("PatchInformation" == childName))
12247 {
12248 childValue = new PatchInformation();
12249 }
12250 if (("Media" == childName))
12251 {
12252 childValue = new Media();
12253 }
12254 if (("OptimizeCustomActions" == childName))
12255 {
12256 childValue = new OptimizeCustomActions();
12257 }
12258 if (("PatchFamily" == childName))
12259 {
12260 childValue = new PatchFamily();
12261 }
12262 if (("PatchFamilyRef" == childName))
12263 {
12264 childValue = new PatchFamilyRef();
12265 }
12266 if (("PatchFamilyGroup" == childName))
12267 {
12268 childValue = new PatchFamilyGroup();
12269 }
12270 if (("PatchFamilyGroupRef" == childName))
12271 {
12272 childValue = new PatchFamilyGroupRef();
12273 }
12274 if (("PatchProperty" == childName))
12275 {
12276 childValue = new PatchProperty();
12277 }
12278 if (("TargetProductCodes" == childName))
12279 {
12280 childValue = new TargetProductCodes();
12281 }
12282 if ((null == childValue))
12283 {
12284 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
12285 }
12286 return childValue;
12287 }
12288
12289 /// <summary>
12290 /// Processes this element and all child elements into an XmlWriter.
12291 /// </summary>
12292 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
12293 public virtual void OutputXml(XmlWriter writer)
12294 {
12295 if ((null == writer))
12296 {
12297 throw new ArgumentNullException("writer");
12298 }
12299 writer.WriteStartElement("Patch", "http://wixtoolset.org/schemas/v4/wxs");
12300 if (this.idFieldSet)
12301 {
12302 writer.WriteAttributeString("Id", this.idField);
12303 }
12304 if (this.codepageFieldSet)
12305 {
12306 writer.WriteAttributeString("Codepage", this.codepageField);
12307 }
12308 if (this.allowRemovalFieldSet)
12309 {
12310 if ((this.allowRemovalField == YesNoType.no))
12311 {
12312 writer.WriteAttributeString("AllowRemoval", "no");
12313 }
12314 if ((this.allowRemovalField == YesNoType.yes))
12315 {
12316 writer.WriteAttributeString("AllowRemoval", "yes");
12317 }
12318 }
12319 if (this.classificationFieldSet)
12320 {
12321 writer.WriteAttributeString("Classification", this.classificationField);
12322 }
12323 if (this.clientPatchIdFieldSet)
12324 {
12325 writer.WriteAttributeString("ClientPatchId", this.clientPatchIdField);
12326 }
12327 if (this.apiPatchingSymbolNoImagehlpFlagFieldSet)
12328 {
12329 if ((this.apiPatchingSymbolNoImagehlpFlagField == YesNoType.no))
12330 {
12331 writer.WriteAttributeString("ApiPatchingSymbolNoImagehlpFlag", "no");
12332 }
12333 if ((this.apiPatchingSymbolNoImagehlpFlagField == YesNoType.yes))
12334 {
12335 writer.WriteAttributeString("ApiPatchingSymbolNoImagehlpFlag", "yes");
12336 }
12337 }
12338 if (this.apiPatchingSymbolNoFailuresFlagFieldSet)
12339 {
12340 if ((this.apiPatchingSymbolNoFailuresFlagField == YesNoType.no))
12341 {
12342 writer.WriteAttributeString("ApiPatchingSymbolNoFailuresFlag", "no");
12343 }
12344 if ((this.apiPatchingSymbolNoFailuresFlagField == YesNoType.yes))
12345 {
12346 writer.WriteAttributeString("ApiPatchingSymbolNoFailuresFlag", "yes");
12347 }
12348 }
12349 if (this.apiPatchingSymbolUndecoratedTooFlagFieldSet)
12350 {
12351 if ((this.apiPatchingSymbolUndecoratedTooFlagField == YesNoType.no))
12352 {
12353 writer.WriteAttributeString("ApiPatchingSymbolUndecoratedTooFlag", "no");
12354 }
12355 if ((this.apiPatchingSymbolUndecoratedTooFlagField == YesNoType.yes))
12356 {
12357 writer.WriteAttributeString("ApiPatchingSymbolUndecoratedTooFlag", "yes");
12358 }
12359 }
12360 if (this.descriptionFieldSet)
12361 {
12362 writer.WriteAttributeString("Description", this.descriptionField);
12363 }
12364 if (this.displayNameFieldSet)
12365 {
12366 writer.WriteAttributeString("DisplayName", this.displayNameField);
12367 }
12368 if (this.commentsFieldSet)
12369 {
12370 writer.WriteAttributeString("Comments", this.commentsField);
12371 }
12372 if (this.manufacturerFieldSet)
12373 {
12374 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
12375 }
12376 if (this.minorUpdateTargetRTMFieldSet)
12377 {
12378 if ((this.minorUpdateTargetRTMField == YesNoType.no))
12379 {
12380 writer.WriteAttributeString("MinorUpdateTargetRTM", "no");
12381 }
12382 if ((this.minorUpdateTargetRTMField == YesNoType.yes))
12383 {
12384 writer.WriteAttributeString("MinorUpdateTargetRTM", "yes");
12385 }
12386 }
12387 if (this.moreInfoURLFieldSet)
12388 {
12389 writer.WriteAttributeString("MoreInfoURL", this.moreInfoURLField);
12390 }
12391 if (this.optimizedInstallModeFieldSet)
12392 {
12393 if ((this.optimizedInstallModeField == YesNoType.no))
12394 {
12395 writer.WriteAttributeString("OptimizedInstallMode", "no");
12396 }
12397 if ((this.optimizedInstallModeField == YesNoType.yes))
12398 {
12399 writer.WriteAttributeString("OptimizedInstallMode", "yes");
12400 }
12401 }
12402 if (this.targetProductNameFieldSet)
12403 {
12404 writer.WriteAttributeString("TargetProductName", this.targetProductNameField);
12405 }
12406 if (this.optimizePatchSizeForLargeFilesFieldSet)
12407 {
12408 if ((this.optimizePatchSizeForLargeFilesField == YesNoType.no))
12409 {
12410 writer.WriteAttributeString("OptimizePatchSizeForLargeFiles", "no");
12411 }
12412 if ((this.optimizePatchSizeForLargeFilesField == YesNoType.yes))
12413 {
12414 writer.WriteAttributeString("OptimizePatchSizeForLargeFiles", "yes");
12415 }
12416 }
12417 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
12418 {
12419 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
12420 childElement.OutputXml(writer);
12421 }
12422 writer.WriteEndElement();
12423 }
12424
12425 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
12426 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
12427 void ISetAttributes.SetAttribute(string name, string value)
12428 {
12429 if (String.IsNullOrEmpty(name))
12430 {
12431 throw new ArgumentNullException("name");
12432 }
12433 if (("Id" == name))
12434 {
12435 this.idField = value;
12436 this.idFieldSet = true;
12437 }
12438 if (("Codepage" == name))
12439 {
12440 this.codepageField = value;
12441 this.codepageFieldSet = true;
12442 }
12443 if (("AllowRemoval" == name))
12444 {
12445 this.allowRemovalField = Enums.ParseYesNoType(value);
12446 this.allowRemovalFieldSet = true;
12447 }
12448 if (("Classification" == name))
12449 {
12450 this.classificationField = value;
12451 this.classificationFieldSet = true;
12452 }
12453 if (("ClientPatchId" == name))
12454 {
12455 this.clientPatchIdField = value;
12456 this.clientPatchIdFieldSet = true;
12457 }
12458 if (("ApiPatchingSymbolNoImagehlpFlag" == name))
12459 {
12460 this.apiPatchingSymbolNoImagehlpFlagField = Enums.ParseYesNoType(value);
12461 this.apiPatchingSymbolNoImagehlpFlagFieldSet = true;
12462 }
12463 if (("ApiPatchingSymbolNoFailuresFlag" == name))
12464 {
12465 this.apiPatchingSymbolNoFailuresFlagField = Enums.ParseYesNoType(value);
12466 this.apiPatchingSymbolNoFailuresFlagFieldSet = true;
12467 }
12468 if (("ApiPatchingSymbolUndecoratedTooFlag" == name))
12469 {
12470 this.apiPatchingSymbolUndecoratedTooFlagField = Enums.ParseYesNoType(value);
12471 this.apiPatchingSymbolUndecoratedTooFlagFieldSet = true;
12472 }
12473 if (("Description" == name))
12474 {
12475 this.descriptionField = value;
12476 this.descriptionFieldSet = true;
12477 }
12478 if (("DisplayName" == name))
12479 {
12480 this.displayNameField = value;
12481 this.displayNameFieldSet = true;
12482 }
12483 if (("Comments" == name))
12484 {
12485 this.commentsField = value;
12486 this.commentsFieldSet = true;
12487 }
12488 if (("Manufacturer" == name))
12489 {
12490 this.manufacturerField = value;
12491 this.manufacturerFieldSet = true;
12492 }
12493 if (("MinorUpdateTargetRTM" == name))
12494 {
12495 this.minorUpdateTargetRTMField = Enums.ParseYesNoType(value);
12496 this.minorUpdateTargetRTMFieldSet = true;
12497 }
12498 if (("MoreInfoURL" == name))
12499 {
12500 this.moreInfoURLField = value;
12501 this.moreInfoURLFieldSet = true;
12502 }
12503 if (("OptimizedInstallMode" == name))
12504 {
12505 this.optimizedInstallModeField = Enums.ParseYesNoType(value);
12506 this.optimizedInstallModeFieldSet = true;
12507 }
12508 if (("TargetProductName" == name))
12509 {
12510 this.targetProductNameField = value;
12511 this.targetProductNameFieldSet = true;
12512 }
12513 if (("OptimizePatchSizeForLargeFiles" == name))
12514 {
12515 this.optimizePatchSizeForLargeFilesField = Enums.ParseYesNoType(value);
12516 this.optimizePatchSizeForLargeFilesFieldSet = true;
12517 }
12518 }
12519 }
12520
12521 /// <summary>
12522 /// 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.
12523 /// </summary>
12524 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
12525 public class Validate : ISchemaElement, ISetAttributes
12526 {
12527
12528 private YesNoType productIdField;
12529
12530 private bool productIdFieldSet;
12531
12532 private YesNoType productLanguageField;
12533
12534 private bool productLanguageFieldSet;
12535
12536 private ProductVersionType productVersionField;
12537
12538 private bool productVersionFieldSet;
12539
12540 private ProductVersionOperatorType productVersionOperatorField;
12541
12542 private bool productVersionOperatorFieldSet;
12543
12544 private YesNoType upgradeCodeField;
12545
12546 private bool upgradeCodeFieldSet;
12547
12548 private YesNoType ignoreAddExistingRowField;
12549
12550 private bool ignoreAddExistingRowFieldSet;
12551
12552 private YesNoType ignoreAddExistingTableField;
12553
12554 private bool ignoreAddExistingTableFieldSet;
12555
12556 private YesNoType ignoreDeleteMissingRowField;
12557
12558 private bool ignoreDeleteMissingRowFieldSet;
12559
12560 private YesNoType ignoreDeleteMissingTableField;
12561
12562 private bool ignoreDeleteMissingTableFieldSet;
12563
12564 private YesNoType ignoreUpdateMissingRowField;
12565
12566 private bool ignoreUpdateMissingRowFieldSet;
12567
12568 private YesNoType ignoreChangingCodePageField;
12569
12570 private bool ignoreChangingCodePageFieldSet;
12571
12572 private ISchemaElement parentElement;
12573
12574 /// <summary>
12575 /// Requires that the installed ProductCode match the target ProductCode used to create the transform. The default is 'yes'.
12576 /// </summary>
12577 public YesNoType ProductId
12578 {
12579 get
12580 {
12581 return this.productIdField;
12582 }
12583 set
12584 {
12585 this.productIdFieldSet = true;
12586 this.productIdField = value;
12587 }
12588 }
12589
12590 /// <summary>
12591 /// Requires that the installed ProductLanguage match the target ProductLanguage used to create the transform. The default is 'no'.
12592 /// </summary>
12593 public YesNoType ProductLanguage
12594 {
12595 get
12596 {
12597 return this.productLanguageField;
12598 }
12599 set
12600 {
12601 this.productLanguageFieldSet = true;
12602 this.productLanguageField = value;
12603 }
12604 }
12605
12606 /// <summary>
12607 /// Determines how many fields of the installed ProductVersion to compare. See remarks for more information. The default is 'Update'.
12608 /// </summary>
12609 public ProductVersionType ProductVersion
12610 {
12611 get
12612 {
12613 return this.productVersionField;
12614 }
12615 set
12616 {
12617 this.productVersionFieldSet = true;
12618 this.productVersionField = value;
12619 }
12620 }
12621
12622 /// <summary>
12623 /// 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'.
12624 /// </summary>
12625 public ProductVersionOperatorType ProductVersionOperator
12626 {
12627 get
12628 {
12629 return this.productVersionOperatorField;
12630 }
12631 set
12632 {
12633 this.productVersionOperatorFieldSet = true;
12634 this.productVersionOperatorField = value;
12635 }
12636 }
12637
12638 /// <summary>
12639 /// Requires that the installed UpgradeCode match the target UpgradeCode used to create the transform. The default is 'yes'.
12640 /// </summary>
12641 public YesNoType UpgradeCode
12642 {
12643 get
12644 {
12645 return this.upgradeCodeField;
12646 }
12647 set
12648 {
12649 this.upgradeCodeFieldSet = true;
12650 this.upgradeCodeField = value;
12651 }
12652 }
12653
12654 /// <summary>
12655 /// Ignore errors when adding existing rows. The default is 'yes'.
12656 /// </summary>
12657 public YesNoType IgnoreAddExistingRow
12658 {
12659 get
12660 {
12661 return this.ignoreAddExistingRowField;
12662 }
12663 set
12664 {
12665 this.ignoreAddExistingRowFieldSet = true;
12666 this.ignoreAddExistingRowField = value;
12667 }
12668 }
12669
12670 /// <summary>
12671 /// Ignore errors when adding existing tables. The default is 'yes'.
12672 /// </summary>
12673 public YesNoType IgnoreAddExistingTable
12674 {
12675 get
12676 {
12677 return this.ignoreAddExistingTableField;
12678 }
12679 set
12680 {
12681 this.ignoreAddExistingTableFieldSet = true;
12682 this.ignoreAddExistingTableField = value;
12683 }
12684 }
12685
12686 /// <summary>
12687 /// Ignore errors when deleting missing rows. The default is 'yes'.
12688 /// </summary>
12689 public YesNoType IgnoreDeleteMissingRow
12690 {
12691 get
12692 {
12693 return this.ignoreDeleteMissingRowField;
12694 }
12695 set
12696 {
12697 this.ignoreDeleteMissingRowFieldSet = true;
12698 this.ignoreDeleteMissingRowField = value;
12699 }
12700 }
12701
12702 /// <summary>
12703 /// Ignore errors when deleting missing tables. The default is 'yes'.
12704 /// </summary>
12705 public YesNoType IgnoreDeleteMissingTable
12706 {
12707 get
12708 {
12709 return this.ignoreDeleteMissingTableField;
12710 }
12711 set
12712 {
12713 this.ignoreDeleteMissingTableFieldSet = true;
12714 this.ignoreDeleteMissingTableField = value;
12715 }
12716 }
12717
12718 /// <summary>
12719 /// Ignore errors when updating missing rows. The default is 'yes'.
12720 /// </summary>
12721 public YesNoType IgnoreUpdateMissingRow
12722 {
12723 get
12724 {
12725 return this.ignoreUpdateMissingRowField;
12726 }
12727 set
12728 {
12729 this.ignoreUpdateMissingRowFieldSet = true;
12730 this.ignoreUpdateMissingRowField = value;
12731 }
12732 }
12733
12734 /// <summary>
12735 /// Ignore errors when changing the database code page. The default is 'no'.
12736 /// </summary>
12737 public YesNoType IgnoreChangingCodePage
12738 {
12739 get
12740 {
12741 return this.ignoreChangingCodePageField;
12742 }
12743 set
12744 {
12745 this.ignoreChangingCodePageFieldSet = true;
12746 this.ignoreChangingCodePageField = value;
12747 }
12748 }
12749
12750 public virtual ISchemaElement ParentElement
12751 {
12752 get
12753 {
12754 return this.parentElement;
12755 }
12756 set
12757 {
12758 this.parentElement = value;
12759 }
12760 }
12761
12762 /// <summary>
12763 /// Parses a ProductVersionType from a string.
12764 /// </summary>
12765 public static ProductVersionType ParseProductVersionType(string value)
12766 {
12767 ProductVersionType parsedValue;
12768 Validate.TryParseProductVersionType(value, out parsedValue);
12769 return parsedValue;
12770 }
12771
12772 /// <summary>
12773 /// Tries to parse a ProductVersionType from a string.
12774 /// </summary>
12775 public static bool TryParseProductVersionType(string value, out ProductVersionType parsedValue)
12776 {
12777 parsedValue = ProductVersionType.NotSet;
12778 if (string.IsNullOrEmpty(value))
12779 {
12780 return false;
12781 }
12782 if (("Major" == value))
12783 {
12784 parsedValue = ProductVersionType.Major;
12785 }
12786 else
12787 {
12788 if (("Minor" == value))
12789 {
12790 parsedValue = ProductVersionType.Minor;
12791 }
12792 else
12793 {
12794 if (("Update" == value))
12795 {
12796 parsedValue = ProductVersionType.Update;
12797 }
12798 else
12799 {
12800 parsedValue = ProductVersionType.IllegalValue;
12801 return false;
12802 }
12803 }
12804 }
12805 return true;
12806 }
12807
12808 /// <summary>
12809 /// Parses a ProductVersionOperatorType from a string.
12810 /// </summary>
12811 public static ProductVersionOperatorType ParseProductVersionOperatorType(string value)
12812 {
12813 ProductVersionOperatorType parsedValue;
12814 Validate.TryParseProductVersionOperatorType(value, out parsedValue);
12815 return parsedValue;
12816 }
12817
12818 /// <summary>
12819 /// Tries to parse a ProductVersionOperatorType from a string.
12820 /// </summary>
12821 public static bool TryParseProductVersionOperatorType(string value, out ProductVersionOperatorType parsedValue)
12822 {
12823 parsedValue = ProductVersionOperatorType.NotSet;
12824 if (string.IsNullOrEmpty(value))
12825 {
12826 return false;
12827 }
12828 if (("Lesser" == value))
12829 {
12830 parsedValue = ProductVersionOperatorType.Lesser;
12831 }
12832 else
12833 {
12834 if (("LesserOrEqual" == value))
12835 {
12836 parsedValue = ProductVersionOperatorType.LesserOrEqual;
12837 }
12838 else
12839 {
12840 if (("Equal" == value))
12841 {
12842 parsedValue = ProductVersionOperatorType.Equal;
12843 }
12844 else
12845 {
12846 if (("GreaterOrEqual" == value))
12847 {
12848 parsedValue = ProductVersionOperatorType.GreaterOrEqual;
12849 }
12850 else
12851 {
12852 if (("Greater" == value))
12853 {
12854 parsedValue = ProductVersionOperatorType.Greater;
12855 }
12856 else
12857 {
12858 parsedValue = ProductVersionOperatorType.IllegalValue;
12859 return false;
12860 }
12861 }
12862 }
12863 }
12864 }
12865 return true;
12866 }
12867
12868 /// <summary>
12869 /// Processes this element and all child elements into an XmlWriter.
12870 /// </summary>
12871 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
12872 public virtual void OutputXml(XmlWriter writer)
12873 {
12874 if ((null == writer))
12875 {
12876 throw new ArgumentNullException("writer");
12877 }
12878 writer.WriteStartElement("Validate", "http://wixtoolset.org/schemas/v4/wxs");
12879 if (this.productIdFieldSet)
12880 {
12881 if ((this.productIdField == YesNoType.no))
12882 {
12883 writer.WriteAttributeString("ProductId", "no");
12884 }
12885 if ((this.productIdField == YesNoType.yes))
12886 {
12887 writer.WriteAttributeString("ProductId", "yes");
12888 }
12889 }
12890 if (this.productLanguageFieldSet)
12891 {
12892 if ((this.productLanguageField == YesNoType.no))
12893 {
12894 writer.WriteAttributeString("ProductLanguage", "no");
12895 }
12896 if ((this.productLanguageField == YesNoType.yes))
12897 {
12898 writer.WriteAttributeString("ProductLanguage", "yes");
12899 }
12900 }
12901 if (this.productVersionFieldSet)
12902 {
12903 if ((this.productVersionField == ProductVersionType.Major))
12904 {
12905 writer.WriteAttributeString("ProductVersion", "Major");
12906 }
12907 if ((this.productVersionField == ProductVersionType.Minor))
12908 {
12909 writer.WriteAttributeString("ProductVersion", "Minor");
12910 }
12911 if ((this.productVersionField == ProductVersionType.Update))
12912 {
12913 writer.WriteAttributeString("ProductVersion", "Update");
12914 }
12915 }
12916 if (this.productVersionOperatorFieldSet)
12917 {
12918 if ((this.productVersionOperatorField == ProductVersionOperatorType.Lesser))
12919 {
12920 writer.WriteAttributeString("ProductVersionOperator", "Lesser");
12921 }
12922 if ((this.productVersionOperatorField == ProductVersionOperatorType.LesserOrEqual))
12923 {
12924 writer.WriteAttributeString("ProductVersionOperator", "LesserOrEqual");
12925 }
12926 if ((this.productVersionOperatorField == ProductVersionOperatorType.Equal))
12927 {
12928 writer.WriteAttributeString("ProductVersionOperator", "Equal");
12929 }
12930 if ((this.productVersionOperatorField == ProductVersionOperatorType.GreaterOrEqual))
12931 {
12932 writer.WriteAttributeString("ProductVersionOperator", "GreaterOrEqual");
12933 }
12934 if ((this.productVersionOperatorField == ProductVersionOperatorType.Greater))
12935 {
12936 writer.WriteAttributeString("ProductVersionOperator", "Greater");
12937 }
12938 }
12939 if (this.upgradeCodeFieldSet)
12940 {
12941 if ((this.upgradeCodeField == YesNoType.no))
12942 {
12943 writer.WriteAttributeString("UpgradeCode", "no");
12944 }
12945 if ((this.upgradeCodeField == YesNoType.yes))
12946 {
12947 writer.WriteAttributeString("UpgradeCode", "yes");
12948 }
12949 }
12950 if (this.ignoreAddExistingRowFieldSet)
12951 {
12952 if ((this.ignoreAddExistingRowField == YesNoType.no))
12953 {
12954 writer.WriteAttributeString("IgnoreAddExistingRow", "no");
12955 }
12956 if ((this.ignoreAddExistingRowField == YesNoType.yes))
12957 {
12958 writer.WriteAttributeString("IgnoreAddExistingRow", "yes");
12959 }
12960 }
12961 if (this.ignoreAddExistingTableFieldSet)
12962 {
12963 if ((this.ignoreAddExistingTableField == YesNoType.no))
12964 {
12965 writer.WriteAttributeString("IgnoreAddExistingTable", "no");
12966 }
12967 if ((this.ignoreAddExistingTableField == YesNoType.yes))
12968 {
12969 writer.WriteAttributeString("IgnoreAddExistingTable", "yes");
12970 }
12971 }
12972 if (this.ignoreDeleteMissingRowFieldSet)
12973 {
12974 if ((this.ignoreDeleteMissingRowField == YesNoType.no))
12975 {
12976 writer.WriteAttributeString("IgnoreDeleteMissingRow", "no");
12977 }
12978 if ((this.ignoreDeleteMissingRowField == YesNoType.yes))
12979 {
12980 writer.WriteAttributeString("IgnoreDeleteMissingRow", "yes");
12981 }
12982 }
12983 if (this.ignoreDeleteMissingTableFieldSet)
12984 {
12985 if ((this.ignoreDeleteMissingTableField == YesNoType.no))
12986 {
12987 writer.WriteAttributeString("IgnoreDeleteMissingTable", "no");
12988 }
12989 if ((this.ignoreDeleteMissingTableField == YesNoType.yes))
12990 {
12991 writer.WriteAttributeString("IgnoreDeleteMissingTable", "yes");
12992 }
12993 }
12994 if (this.ignoreUpdateMissingRowFieldSet)
12995 {
12996 if ((this.ignoreUpdateMissingRowField == YesNoType.no))
12997 {
12998 writer.WriteAttributeString("IgnoreUpdateMissingRow", "no");
12999 }
13000 if ((this.ignoreUpdateMissingRowField == YesNoType.yes))
13001 {
13002 writer.WriteAttributeString("IgnoreUpdateMissingRow", "yes");
13003 }
13004 }
13005 if (this.ignoreChangingCodePageFieldSet)
13006 {
13007 if ((this.ignoreChangingCodePageField == YesNoType.no))
13008 {
13009 writer.WriteAttributeString("IgnoreChangingCodePage", "no");
13010 }
13011 if ((this.ignoreChangingCodePageField == YesNoType.yes))
13012 {
13013 writer.WriteAttributeString("IgnoreChangingCodePage", "yes");
13014 }
13015 }
13016 writer.WriteEndElement();
13017 }
13018
13019 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13020 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
13021 void ISetAttributes.SetAttribute(string name, string value)
13022 {
13023 if (String.IsNullOrEmpty(name))
13024 {
13025 throw new ArgumentNullException("name");
13026 }
13027 if (("ProductId" == name))
13028 {
13029 this.productIdField = Enums.ParseYesNoType(value);
13030 this.productIdFieldSet = true;
13031 }
13032 if (("ProductLanguage" == name))
13033 {
13034 this.productLanguageField = Enums.ParseYesNoType(value);
13035 this.productLanguageFieldSet = true;
13036 }
13037 if (("ProductVersion" == name))
13038 {
13039 this.productVersionField = Validate.ParseProductVersionType(value);
13040 this.productVersionFieldSet = true;
13041 }
13042 if (("ProductVersionOperator" == name))
13043 {
13044 this.productVersionOperatorField = Validate.ParseProductVersionOperatorType(value);
13045 this.productVersionOperatorFieldSet = true;
13046 }
13047 if (("UpgradeCode" == name))
13048 {
13049 this.upgradeCodeField = Enums.ParseYesNoType(value);
13050 this.upgradeCodeFieldSet = true;
13051 }
13052 if (("IgnoreAddExistingRow" == name))
13053 {
13054 this.ignoreAddExistingRowField = Enums.ParseYesNoType(value);
13055 this.ignoreAddExistingRowFieldSet = true;
13056 }
13057 if (("IgnoreAddExistingTable" == name))
13058 {
13059 this.ignoreAddExistingTableField = Enums.ParseYesNoType(value);
13060 this.ignoreAddExistingTableFieldSet = true;
13061 }
13062 if (("IgnoreDeleteMissingRow" == name))
13063 {
13064 this.ignoreDeleteMissingRowField = Enums.ParseYesNoType(value);
13065 this.ignoreDeleteMissingRowFieldSet = true;
13066 }
13067 if (("IgnoreDeleteMissingTable" == name))
13068 {
13069 this.ignoreDeleteMissingTableField = Enums.ParseYesNoType(value);
13070 this.ignoreDeleteMissingTableFieldSet = true;
13071 }
13072 if (("IgnoreUpdateMissingRow" == name))
13073 {
13074 this.ignoreUpdateMissingRowField = Enums.ParseYesNoType(value);
13075 this.ignoreUpdateMissingRowFieldSet = true;
13076 }
13077 if (("IgnoreChangingCodePage" == name))
13078 {
13079 this.ignoreChangingCodePageField = Enums.ParseYesNoType(value);
13080 this.ignoreChangingCodePageFieldSet = true;
13081 }
13082 }
13083
13084 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13085 public enum ProductVersionType
13086 {
13087
13088 IllegalValue = int.MaxValue,
13089
13090 NotSet = -1,
13091
13092 /// <summary>
13093 /// Checks the major version.
13094 /// </summary>
13095 Major,
13096
13097 /// <summary>
13098 /// Checks the major and minor versions.
13099 /// </summary>
13100 Minor,
13101
13102 /// <summary>
13103 /// Checks the major, minor, and update versions.
13104 /// </summary>
13105 Update,
13106 }
13107
13108 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13109 public enum ProductVersionOperatorType
13110 {
13111
13112 IllegalValue = int.MaxValue,
13113
13114 NotSet = -1,
13115
13116 /// <summary>
13117 /// Installed ProductVersion &lt; target ProductVersion.
13118 /// </summary>
13119 Lesser,
13120
13121 /// <summary>
13122 /// Installed ProductVersion &lt;= target ProductVersion.
13123 /// </summary>
13124 LesserOrEqual,
13125
13126 /// <summary>
13127 /// Installed ProductVersion = target ProductVersion.
13128 /// </summary>
13129 Equal,
13130
13131 /// <summary>
13132 /// Installed ProductVersion &gt;= target ProductVersion.
13133 /// </summary>
13134 GreaterOrEqual,
13135
13136 /// <summary>
13137 /// Installed ProductVersion &gt; target ProductVersion.
13138 /// </summary>
13139 Greater,
13140 }
13141 }
13142
13143 /// <summary>
13144 /// Indicates whether custom actions can be skipped when applying the patch.
13145 /// </summary>
13146 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13147 public class OptimizeCustomActions : ISchemaElement, ISetAttributes
13148 {
13149
13150 private YesNoType skipAssignmentField;
13151
13152 private bool skipAssignmentFieldSet;
13153
13154 private YesNoType skipImmediateField;
13155
13156 private bool skipImmediateFieldSet;
13157
13158 private YesNoType skipDeferredField;
13159
13160 private bool skipDeferredFieldSet;
13161
13162 private ISchemaElement parentElement;
13163
13164 /// <summary>
13165 /// Skip property (type 51) and directory (type 35) assignment custom actions.
13166 /// </summary>
13167 public YesNoType SkipAssignment
13168 {
13169 get
13170 {
13171 return this.skipAssignmentField;
13172 }
13173 set
13174 {
13175 this.skipAssignmentFieldSet = true;
13176 this.skipAssignmentField = value;
13177 }
13178 }
13179
13180 /// <summary>
13181 /// Skip immediate custom actions that are not property or directory assignment custom actions.
13182 /// </summary>
13183 public YesNoType SkipImmediate
13184 {
13185 get
13186 {
13187 return this.skipImmediateField;
13188 }
13189 set
13190 {
13191 this.skipImmediateFieldSet = true;
13192 this.skipImmediateField = value;
13193 }
13194 }
13195
13196 /// <summary>
13197 /// Skip custom actions that run within the script.
13198 /// </summary>
13199 public YesNoType SkipDeferred
13200 {
13201 get
13202 {
13203 return this.skipDeferredField;
13204 }
13205 set
13206 {
13207 this.skipDeferredFieldSet = true;
13208 this.skipDeferredField = value;
13209 }
13210 }
13211
13212 public virtual ISchemaElement ParentElement
13213 {
13214 get
13215 {
13216 return this.parentElement;
13217 }
13218 set
13219 {
13220 this.parentElement = value;
13221 }
13222 }
13223
13224 /// <summary>
13225 /// Processes this element and all child elements into an XmlWriter.
13226 /// </summary>
13227 public virtual void OutputXml(XmlWriter writer)
13228 {
13229 if ((null == writer))
13230 {
13231 throw new ArgumentNullException("writer");
13232 }
13233 writer.WriteStartElement("OptimizeCustomActions", "http://wixtoolset.org/schemas/v4/wxs");
13234 if (this.skipAssignmentFieldSet)
13235 {
13236 if ((this.skipAssignmentField == YesNoType.no))
13237 {
13238 writer.WriteAttributeString("SkipAssignment", "no");
13239 }
13240 if ((this.skipAssignmentField == YesNoType.yes))
13241 {
13242 writer.WriteAttributeString("SkipAssignment", "yes");
13243 }
13244 }
13245 if (this.skipImmediateFieldSet)
13246 {
13247 if ((this.skipImmediateField == YesNoType.no))
13248 {
13249 writer.WriteAttributeString("SkipImmediate", "no");
13250 }
13251 if ((this.skipImmediateField == YesNoType.yes))
13252 {
13253 writer.WriteAttributeString("SkipImmediate", "yes");
13254 }
13255 }
13256 if (this.skipDeferredFieldSet)
13257 {
13258 if ((this.skipDeferredField == YesNoType.no))
13259 {
13260 writer.WriteAttributeString("SkipDeferred", "no");
13261 }
13262 if ((this.skipDeferredField == YesNoType.yes))
13263 {
13264 writer.WriteAttributeString("SkipDeferred", "yes");
13265 }
13266 }
13267 writer.WriteEndElement();
13268 }
13269
13270 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13271 void ISetAttributes.SetAttribute(string name, string value)
13272 {
13273 if (String.IsNullOrEmpty(name))
13274 {
13275 throw new ArgumentNullException("name");
13276 }
13277 if (("SkipAssignment" == name))
13278 {
13279 this.skipAssignmentField = Enums.ParseYesNoType(value);
13280 this.skipAssignmentFieldSet = true;
13281 }
13282 if (("SkipImmediate" == name))
13283 {
13284 this.skipImmediateField = Enums.ParseYesNoType(value);
13285 this.skipImmediateFieldSet = true;
13286 }
13287 if (("SkipDeferred" == name))
13288 {
13289 this.skipDeferredField = Enums.ParseYesNoType(value);
13290 this.skipDeferredFieldSet = true;
13291 }
13292 }
13293 }
13294
13295 /// <summary>
13296 /// Identifies a set of product versions.
13297 /// </summary>
13298 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13299 public class PatchBaseline : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
13300 {
13301
13302 private ElementCollection children;
13303
13304 private string idField;
13305
13306 private bool idFieldSet;
13307
13308 private ISchemaElement parentElement;
13309
13310 public PatchBaseline()
13311 {
13312 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
13313 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Validate)));
13314 this.children = childCollection0;
13315 }
13316
13317 public virtual IEnumerable Children
13318 {
13319 get
13320 {
13321 return this.children;
13322 }
13323 }
13324
13325 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
13326 public virtual IEnumerable this[System.Type childType]
13327 {
13328 get
13329 {
13330 return this.children.Filter(childType);
13331 }
13332 }
13333
13334 /// <summary>
13335 /// Identifier for a set of product versions.
13336 /// </summary>
13337 public string Id
13338 {
13339 get
13340 {
13341 return this.idField;
13342 }
13343 set
13344 {
13345 this.idFieldSet = true;
13346 this.idField = value;
13347 }
13348 }
13349
13350 public virtual ISchemaElement ParentElement
13351 {
13352 get
13353 {
13354 return this.parentElement;
13355 }
13356 set
13357 {
13358 this.parentElement = value;
13359 }
13360 }
13361
13362 public virtual void AddChild(ISchemaElement child)
13363 {
13364 if ((null == child))
13365 {
13366 throw new ArgumentNullException("child");
13367 }
13368 this.children.AddElement(child);
13369 child.ParentElement = this;
13370 }
13371
13372 public virtual void RemoveChild(ISchemaElement child)
13373 {
13374 if ((null == child))
13375 {
13376 throw new ArgumentNullException("child");
13377 }
13378 this.children.RemoveElement(child);
13379 child.ParentElement = null;
13380 }
13381
13382 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13383 ISchemaElement ICreateChildren.CreateChild(string childName)
13384 {
13385 if (String.IsNullOrEmpty(childName))
13386 {
13387 throw new ArgumentNullException("childName");
13388 }
13389 ISchemaElement childValue = null;
13390 if (("Validate" == childName))
13391 {
13392 childValue = new Validate();
13393 }
13394 if ((null == childValue))
13395 {
13396 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
13397 }
13398 return childValue;
13399 }
13400
13401 /// <summary>
13402 /// Processes this element and all child elements into an XmlWriter.
13403 /// </summary>
13404 public virtual void OutputXml(XmlWriter writer)
13405 {
13406 if ((null == writer))
13407 {
13408 throw new ArgumentNullException("writer");
13409 }
13410 writer.WriteStartElement("PatchBaseline", "http://wixtoolset.org/schemas/v4/wxs");
13411 if (this.idFieldSet)
13412 {
13413 writer.WriteAttributeString("Id", this.idField);
13414 }
13415 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
13416 {
13417 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
13418 childElement.OutputXml(writer);
13419 }
13420 writer.WriteEndElement();
13421 }
13422
13423 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13424 void ISetAttributes.SetAttribute(string name, string value)
13425 {
13426 if (String.IsNullOrEmpty(name))
13427 {
13428 throw new ArgumentNullException("name");
13429 }
13430 if (("Id" == name))
13431 {
13432 this.idField = value;
13433 this.idFieldSet = true;
13434 }
13435 }
13436 }
13437
13438 /// <summary>
13439 /// Collection of items that should be kept from the differences between two products.
13440 /// </summary>
13441 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13442 public class PatchFamily : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
13443 {
13444
13445 private ElementCollection children;
13446
13447 private string idField;
13448
13449 private bool idFieldSet;
13450
13451 private string productCodeField;
13452
13453 private bool productCodeFieldSet;
13454
13455 private string versionField;
13456
13457 private bool versionFieldSet;
13458
13459 private YesNoType supersedeField;
13460
13461 private bool supersedeFieldSet;
13462
13463 private ISchemaElement parentElement;
13464
13465 public PatchFamily()
13466 {
13467 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
13468 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
13469 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(All)));
13470 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(BinaryRef)));
13471 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
13472 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef)));
13473 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificateRef)));
13474 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef)));
13475 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
13476 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IconRef)));
13477 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef)));
13478 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef)));
13479 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
13480 childCollection0.AddCollection(childCollection1);
13481 this.children = childCollection0;
13482 }
13483
13484 public virtual IEnumerable Children
13485 {
13486 get
13487 {
13488 return this.children;
13489 }
13490 }
13491
13492 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
13493 public virtual IEnumerable this[System.Type childType]
13494 {
13495 get
13496 {
13497 return this.children.Filter(childType);
13498 }
13499 }
13500
13501 /// <summary>
13502 /// Identifier which indicates a sequence family to which this patch belongs.
13503 /// </summary>
13504 public string Id
13505 {
13506 get
13507 {
13508 return this.idField;
13509 }
13510 set
13511 {
13512 this.idFieldSet = true;
13513 this.idField = value;
13514 }
13515 }
13516
13517 /// <summary>
13518 /// Specifies the ProductCode of the product that this family applies to.
13519 /// </summary>
13520 public string ProductCode
13521 {
13522 get
13523 {
13524 return this.productCodeField;
13525 }
13526 set
13527 {
13528 this.productCodeFieldSet = true;
13529 this.productCodeField = value;
13530 }
13531 }
13532
13533 /// <summary>
13534 /// 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.
13535 /// </summary>
13536 public string Version
13537 {
13538 get
13539 {
13540 return this.versionField;
13541 }
13542 set
13543 {
13544 this.versionFieldSet = true;
13545 this.versionField = value;
13546 }
13547 }
13548
13549 /// <summary>
13550 /// Set this value to 'yes' to indicate that this patch will supersede all previous patches in this patch family.
13551 /// The default value is 'no'.
13552 /// </summary>
13553 public YesNoType Supersede
13554 {
13555 get
13556 {
13557 return this.supersedeField;
13558 }
13559 set
13560 {
13561 this.supersedeFieldSet = true;
13562 this.supersedeField = value;
13563 }
13564 }
13565
13566 public virtual ISchemaElement ParentElement
13567 {
13568 get
13569 {
13570 return this.parentElement;
13571 }
13572 set
13573 {
13574 this.parentElement = value;
13575 }
13576 }
13577
13578 public virtual void AddChild(ISchemaElement child)
13579 {
13580 if ((null == child))
13581 {
13582 throw new ArgumentNullException("child");
13583 }
13584 this.children.AddElement(child);
13585 child.ParentElement = this;
13586 }
13587
13588 public virtual void RemoveChild(ISchemaElement child)
13589 {
13590 if ((null == child))
13591 {
13592 throw new ArgumentNullException("child");
13593 }
13594 this.children.RemoveElement(child);
13595 child.ParentElement = null;
13596 }
13597
13598 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13599 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
13600 ISchemaElement ICreateChildren.CreateChild(string childName)
13601 {
13602 if (String.IsNullOrEmpty(childName))
13603 {
13604 throw new ArgumentNullException("childName");
13605 }
13606 ISchemaElement childValue = null;
13607 if (("All" == childName))
13608 {
13609 childValue = new All();
13610 }
13611 if (("BinaryRef" == childName))
13612 {
13613 childValue = new BinaryRef();
13614 }
13615 if (("ComponentRef" == childName))
13616 {
13617 childValue = new ComponentRef();
13618 }
13619 if (("CustomActionRef" == childName))
13620 {
13621 childValue = new CustomActionRef();
13622 }
13623 if (("DigitalCertificateRef" == childName))
13624 {
13625 childValue = new DigitalCertificateRef();
13626 }
13627 if (("DirectoryRef" == childName))
13628 {
13629 childValue = new DirectoryRef();
13630 }
13631 if (("FeatureRef" == childName))
13632 {
13633 childValue = new FeatureRef();
13634 }
13635 if (("IconRef" == childName))
13636 {
13637 childValue = new IconRef();
13638 }
13639 if (("PropertyRef" == childName))
13640 {
13641 childValue = new PropertyRef();
13642 }
13643 if (("UIRef" == childName))
13644 {
13645 childValue = new UIRef();
13646 }
13647 if ((null == childValue))
13648 {
13649 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
13650 }
13651 return childValue;
13652 }
13653
13654 /// <summary>
13655 /// Processes this element and all child elements into an XmlWriter.
13656 /// </summary>
13657 public virtual void OutputXml(XmlWriter writer)
13658 {
13659 if ((null == writer))
13660 {
13661 throw new ArgumentNullException("writer");
13662 }
13663 writer.WriteStartElement("PatchFamily", "http://wixtoolset.org/schemas/v4/wxs");
13664 if (this.idFieldSet)
13665 {
13666 writer.WriteAttributeString("Id", this.idField);
13667 }
13668 if (this.productCodeFieldSet)
13669 {
13670 writer.WriteAttributeString("ProductCode", this.productCodeField);
13671 }
13672 if (this.versionFieldSet)
13673 {
13674 writer.WriteAttributeString("Version", this.versionField);
13675 }
13676 if (this.supersedeFieldSet)
13677 {
13678 if ((this.supersedeField == YesNoType.no))
13679 {
13680 writer.WriteAttributeString("Supersede", "no");
13681 }
13682 if ((this.supersedeField == YesNoType.yes))
13683 {
13684 writer.WriteAttributeString("Supersede", "yes");
13685 }
13686 }
13687 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
13688 {
13689 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
13690 childElement.OutputXml(writer);
13691 }
13692 writer.WriteEndElement();
13693 }
13694
13695 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13696 void ISetAttributes.SetAttribute(string name, string value)
13697 {
13698 if (String.IsNullOrEmpty(name))
13699 {
13700 throw new ArgumentNullException("name");
13701 }
13702 if (("Id" == name))
13703 {
13704 this.idField = value;
13705 this.idFieldSet = true;
13706 }
13707 if (("ProductCode" == name))
13708 {
13709 this.productCodeField = value;
13710 this.productCodeFieldSet = true;
13711 }
13712 if (("Version" == name))
13713 {
13714 this.versionField = value;
13715 this.versionFieldSet = true;
13716 }
13717 if (("Supersede" == name))
13718 {
13719 this.supersedeField = Enums.ParseYesNoType(value);
13720 this.supersedeFieldSet = true;
13721 }
13722 }
13723 }
13724
13725 /// <summary>
13726 /// Groups together multiple patch families to be used in other locations.
13727 /// </summary>
13728 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13729 public class PatchFamilyGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
13730 {
13731
13732 private ElementCollection children;
13733
13734 private string idField;
13735
13736 private bool idFieldSet;
13737
13738 private ISchemaElement parentElement;
13739
13740 public PatchFamilyGroup()
13741 {
13742 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
13743 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily)));
13744 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyRef)));
13745 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroupRef)));
13746 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
13747 this.children = childCollection0;
13748 }
13749
13750 public virtual IEnumerable Children
13751 {
13752 get
13753 {
13754 return this.children;
13755 }
13756 }
13757
13758 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
13759 public virtual IEnumerable this[System.Type childType]
13760 {
13761 get
13762 {
13763 return this.children.Filter(childType);
13764 }
13765 }
13766
13767 /// <summary>
13768 /// Identifier for the PatchFamilyGroup.
13769 /// </summary>
13770 public string Id
13771 {
13772 get
13773 {
13774 return this.idField;
13775 }
13776 set
13777 {
13778 this.idFieldSet = true;
13779 this.idField = value;
13780 }
13781 }
13782
13783 public virtual ISchemaElement ParentElement
13784 {
13785 get
13786 {
13787 return this.parentElement;
13788 }
13789 set
13790 {
13791 this.parentElement = value;
13792 }
13793 }
13794
13795 public virtual void AddChild(ISchemaElement child)
13796 {
13797 if ((null == child))
13798 {
13799 throw new ArgumentNullException("child");
13800 }
13801 this.children.AddElement(child);
13802 child.ParentElement = this;
13803 }
13804
13805 public virtual void RemoveChild(ISchemaElement child)
13806 {
13807 if ((null == child))
13808 {
13809 throw new ArgumentNullException("child");
13810 }
13811 this.children.RemoveElement(child);
13812 child.ParentElement = null;
13813 }
13814
13815 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13816 ISchemaElement ICreateChildren.CreateChild(string childName)
13817 {
13818 if (String.IsNullOrEmpty(childName))
13819 {
13820 throw new ArgumentNullException("childName");
13821 }
13822 ISchemaElement childValue = null;
13823 if (("PatchFamily" == childName))
13824 {
13825 childValue = new PatchFamily();
13826 }
13827 if (("PatchFamilyRef" == childName))
13828 {
13829 childValue = new PatchFamilyRef();
13830 }
13831 if (("PatchFamilyGroupRef" == childName))
13832 {
13833 childValue = new PatchFamilyGroupRef();
13834 }
13835 if ((null == childValue))
13836 {
13837 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
13838 }
13839 return childValue;
13840 }
13841
13842 /// <summary>
13843 /// Processes this element and all child elements into an XmlWriter.
13844 /// </summary>
13845 public virtual void OutputXml(XmlWriter writer)
13846 {
13847 if ((null == writer))
13848 {
13849 throw new ArgumentNullException("writer");
13850 }
13851 writer.WriteStartElement("PatchFamilyGroup", "http://wixtoolset.org/schemas/v4/wxs");
13852 if (this.idFieldSet)
13853 {
13854 writer.WriteAttributeString("Id", this.idField);
13855 }
13856 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
13857 {
13858 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
13859 childElement.OutputXml(writer);
13860 }
13861 writer.WriteEndElement();
13862 }
13863
13864 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13865 void ISetAttributes.SetAttribute(string name, string value)
13866 {
13867 if (String.IsNullOrEmpty(name))
13868 {
13869 throw new ArgumentNullException("name");
13870 }
13871 if (("Id" == name))
13872 {
13873 this.idField = value;
13874 this.idFieldSet = true;
13875 }
13876 }
13877 }
13878
13879 /// <summary>
13880 /// Create a reference to a PatchFamilyGroup in another Fragment.
13881 /// </summary>
13882 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13883 public class PatchFamilyGroupRef : ISchemaElement, ISetAttributes
13884 {
13885
13886 private string idField;
13887
13888 private bool idFieldSet;
13889
13890 private ISchemaElement parentElement;
13891
13892 /// <summary>
13893 /// The identifier of the PatchFamilyGroup to reference.
13894 /// </summary>
13895 public string Id
13896 {
13897 get
13898 {
13899 return this.idField;
13900 }
13901 set
13902 {
13903 this.idFieldSet = true;
13904 this.idField = value;
13905 }
13906 }
13907
13908 public virtual ISchemaElement ParentElement
13909 {
13910 get
13911 {
13912 return this.parentElement;
13913 }
13914 set
13915 {
13916 this.parentElement = value;
13917 }
13918 }
13919
13920 /// <summary>
13921 /// Processes this element and all child elements into an XmlWriter.
13922 /// </summary>
13923 public virtual void OutputXml(XmlWriter writer)
13924 {
13925 if ((null == writer))
13926 {
13927 throw new ArgumentNullException("writer");
13928 }
13929 writer.WriteStartElement("PatchFamilyGroupRef", "http://wixtoolset.org/schemas/v4/wxs");
13930 if (this.idFieldSet)
13931 {
13932 writer.WriteAttributeString("Id", this.idField);
13933 }
13934 writer.WriteEndElement();
13935 }
13936
13937 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
13938 void ISetAttributes.SetAttribute(string name, string value)
13939 {
13940 if (String.IsNullOrEmpty(name))
13941 {
13942 throw new ArgumentNullException("name");
13943 }
13944 if (("Id" == name))
13945 {
13946 this.idField = value;
13947 this.idFieldSet = true;
13948 }
13949 }
13950 }
13951
13952 /// <summary>
13953 /// The PatchCreation element is analogous to the main function in a C program. When linking, only one PatchCreation section
13954 /// can be given to the linker to produce a successful result. Using this element creates a pcp file.
13955 /// </summary>
13956 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
13957 public class PatchCreation : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
13958 {
13959
13960 private ElementCollection children;
13961
13962 private string idField;
13963
13964 private bool idFieldSet;
13965
13966 private YesNoType allowMajorVersionMismatchesField;
13967
13968 private bool allowMajorVersionMismatchesFieldSet;
13969
13970 private YesNoType allowProductCodeMismatchesField;
13971
13972 private bool allowProductCodeMismatchesFieldSet;
13973
13974 private YesNoType cleanWorkingFolderField;
13975
13976 private bool cleanWorkingFolderFieldSet;
13977
13978 private string codepageField;
13979
13980 private bool codepageFieldSet;
13981
13982 private string outputPathField;
13983
13984 private bool outputPathFieldSet;
13985
13986 private string sourceListField;
13987
13988 private bool sourceListFieldSet;
13989
13990 private int symbolFlagsField;
13991
13992 private bool symbolFlagsFieldSet;
13993
13994 private YesNoType wholeFilesOnlyField;
13995
13996 private bool wholeFilesOnlyFieldSet;
13997
13998 private ISchemaElement parentElement;
13999
14000 public PatchCreation()
14001 {
14002 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
14003 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PatchInformation)));
14004 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PatchMetadata)));
14005 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Family)));
14006 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
14007 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchProperty)));
14008 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchSequence)));
14009 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ReplacePatch)));
14010 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCode)));
14011 childCollection0.AddCollection(childCollection1);
14012 this.children = childCollection0;
14013 }
14014
14015 public virtual IEnumerable Children
14016 {
14017 get
14018 {
14019 return this.children;
14020 }
14021 }
14022
14023 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
14024 public virtual IEnumerable this[System.Type childType]
14025 {
14026 get
14027 {
14028 return this.children.Filter(childType);
14029 }
14030 }
14031
14032 /// <summary>
14033 /// PatchCreation identifier; this is the primary key for identifying patches.
14034 /// </summary>
14035 public string Id
14036 {
14037 get
14038 {
14039 return this.idField;
14040 }
14041 set
14042 {
14043 this.idFieldSet = true;
14044 this.idField = value;
14045 }
14046 }
14047
14048 /// <summary>
14049 /// Use this to set whether the major versions between the upgrade and target images match. See
14050 /// </summary>
14051 public YesNoType AllowMajorVersionMismatches
14052 {
14053 get
14054 {
14055 return this.allowMajorVersionMismatchesField;
14056 }
14057 set
14058 {
14059 this.allowMajorVersionMismatchesFieldSet = true;
14060 this.allowMajorVersionMismatchesField = value;
14061 }
14062 }
14063
14064 /// <summary>
14065 /// Use this to set whether the product code between the upgrade and target images match. See
14066 /// </summary>
14067 public YesNoType AllowProductCodeMismatches
14068 {
14069 get
14070 {
14071 return this.allowProductCodeMismatchesField;
14072 }
14073 set
14074 {
14075 this.allowProductCodeMismatchesFieldSet = true;
14076 this.allowProductCodeMismatchesField = value;
14077 }
14078 }
14079
14080 /// <summary>
14081 /// Use this to set whether Patchwiz should clean the temp folder when finished. See
14082 /// </summary>
14083 public YesNoType CleanWorkingFolder
14084 {
14085 get
14086 {
14087 return this.cleanWorkingFolderField;
14088 }
14089 set
14090 {
14091 this.cleanWorkingFolderFieldSet = true;
14092 this.cleanWorkingFolderField = value;
14093 }
14094 }
14095
14096 /// <summary>
14097 /// The code page integer value or web name for the resulting PCP. See remarks for more information.
14098 /// </summary>
14099 public string Codepage
14100 {
14101 get
14102 {
14103 return this.codepageField;
14104 }
14105 set
14106 {
14107 this.codepageFieldSet = true;
14108 this.codepageField = value;
14109 }
14110 }
14111
14112 /// <summary>
14113 /// The full path, including file name, of the patch package file that is to be generated. See
14114 /// </summary>
14115 public string OutputPath
14116 {
14117 get
14118 {
14119 return this.outputPathField;
14120 }
14121 set
14122 {
14123 this.outputPathFieldSet = true;
14124 this.outputPathField = value;
14125 }
14126 }
14127
14128 /// <summary>
14129 /// Used to locate the .msp file for the patch if the cached copy is unavailable. See
14130 /// </summary>
14131 public string SourceList
14132 {
14133 get
14134 {
14135 return this.sourceListField;
14136 }
14137 set
14138 {
14139 this.sourceListFieldSet = true;
14140 this.sourceListField = value;
14141 }
14142 }
14143
14144 /// <summary>
14145 /// An 8-digit hex integer representing the combination of patch symbol usage flags to use when creating a binary file patch. See
14146 /// </summary>
14147 public int SymbolFlags
14148 {
14149 get
14150 {
14151 return this.symbolFlagsField;
14152 }
14153 set
14154 {
14155 this.symbolFlagsFieldSet = true;
14156 this.symbolFlagsField = value;
14157 }
14158 }
14159
14160 /// <summary>
14161 /// Use this to set whether changing files should be included in their entirety. See
14162 /// </summary>
14163 public YesNoType WholeFilesOnly
14164 {
14165 get
14166 {
14167 return this.wholeFilesOnlyField;
14168 }
14169 set
14170 {
14171 this.wholeFilesOnlyFieldSet = true;
14172 this.wholeFilesOnlyField = value;
14173 }
14174 }
14175
14176 public virtual ISchemaElement ParentElement
14177 {
14178 get
14179 {
14180 return this.parentElement;
14181 }
14182 set
14183 {
14184 this.parentElement = value;
14185 }
14186 }
14187
14188 public virtual void AddChild(ISchemaElement child)
14189 {
14190 if ((null == child))
14191 {
14192 throw new ArgumentNullException("child");
14193 }
14194 this.children.AddElement(child);
14195 child.ParentElement = this;
14196 }
14197
14198 public virtual void RemoveChild(ISchemaElement child)
14199 {
14200 if ((null == child))
14201 {
14202 throw new ArgumentNullException("child");
14203 }
14204 this.children.RemoveElement(child);
14205 child.ParentElement = null;
14206 }
14207
14208 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
14209 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
14210 ISchemaElement ICreateChildren.CreateChild(string childName)
14211 {
14212 if (String.IsNullOrEmpty(childName))
14213 {
14214 throw new ArgumentNullException("childName");
14215 }
14216 ISchemaElement childValue = null;
14217 if (("PatchInformation" == childName))
14218 {
14219 childValue = new PatchInformation();
14220 }
14221 if (("PatchMetadata" == childName))
14222 {
14223 childValue = new PatchMetadata();
14224 }
14225 if (("Family" == childName))
14226 {
14227 childValue = new Family();
14228 }
14229 if (("PatchProperty" == childName))
14230 {
14231 childValue = new PatchProperty();
14232 }
14233 if (("PatchSequence" == childName))
14234 {
14235 childValue = new PatchSequence();
14236 }
14237 if (("ReplacePatch" == childName))
14238 {
14239 childValue = new ReplacePatch();
14240 }
14241 if (("TargetProductCode" == childName))
14242 {
14243 childValue = new TargetProductCode();
14244 }
14245 if ((null == childValue))
14246 {
14247 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
14248 }
14249 return childValue;
14250 }
14251
14252 /// <summary>
14253 /// Processes this element and all child elements into an XmlWriter.
14254 /// </summary>
14255 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
14256 public virtual void OutputXml(XmlWriter writer)
14257 {
14258 if ((null == writer))
14259 {
14260 throw new ArgumentNullException("writer");
14261 }
14262 writer.WriteStartElement("PatchCreation", "http://wixtoolset.org/schemas/v4/wxs");
14263 if (this.idFieldSet)
14264 {
14265 writer.WriteAttributeString("Id", this.idField);
14266 }
14267 if (this.allowMajorVersionMismatchesFieldSet)
14268 {
14269 if ((this.allowMajorVersionMismatchesField == YesNoType.no))
14270 {
14271 writer.WriteAttributeString("AllowMajorVersionMismatches", "no");
14272 }
14273 if ((this.allowMajorVersionMismatchesField == YesNoType.yes))
14274 {
14275 writer.WriteAttributeString("AllowMajorVersionMismatches", "yes");
14276 }
14277 }
14278 if (this.allowProductCodeMismatchesFieldSet)
14279 {
14280 if ((this.allowProductCodeMismatchesField == YesNoType.no))
14281 {
14282 writer.WriteAttributeString("AllowProductCodeMismatches", "no");
14283 }
14284 if ((this.allowProductCodeMismatchesField == YesNoType.yes))
14285 {
14286 writer.WriteAttributeString("AllowProductCodeMismatches", "yes");
14287 }
14288 }
14289 if (this.cleanWorkingFolderFieldSet)
14290 {
14291 if ((this.cleanWorkingFolderField == YesNoType.no))
14292 {
14293 writer.WriteAttributeString("CleanWorkingFolder", "no");
14294 }
14295 if ((this.cleanWorkingFolderField == YesNoType.yes))
14296 {
14297 writer.WriteAttributeString("CleanWorkingFolder", "yes");
14298 }
14299 }
14300 if (this.codepageFieldSet)
14301 {
14302 writer.WriteAttributeString("Codepage", this.codepageField);
14303 }
14304 if (this.outputPathFieldSet)
14305 {
14306 writer.WriteAttributeString("OutputPath", this.outputPathField);
14307 }
14308 if (this.sourceListFieldSet)
14309 {
14310 writer.WriteAttributeString("SourceList", this.sourceListField);
14311 }
14312 if (this.symbolFlagsFieldSet)
14313 {
14314 writer.WriteAttributeString("SymbolFlags", this.symbolFlagsField.ToString(CultureInfo.InvariantCulture));
14315 }
14316 if (this.wholeFilesOnlyFieldSet)
14317 {
14318 if ((this.wholeFilesOnlyField == YesNoType.no))
14319 {
14320 writer.WriteAttributeString("WholeFilesOnly", "no");
14321 }
14322 if ((this.wholeFilesOnlyField == YesNoType.yes))
14323 {
14324 writer.WriteAttributeString("WholeFilesOnly", "yes");
14325 }
14326 }
14327 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
14328 {
14329 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
14330 childElement.OutputXml(writer);
14331 }
14332 writer.WriteEndElement();
14333 }
14334
14335 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
14336 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
14337 void ISetAttributes.SetAttribute(string name, string value)
14338 {
14339 if (String.IsNullOrEmpty(name))
14340 {
14341 throw new ArgumentNullException("name");
14342 }
14343 if (("Id" == name))
14344 {
14345 this.idField = value;
14346 this.idFieldSet = true;
14347 }
14348 if (("AllowMajorVersionMismatches" == name))
14349 {
14350 this.allowMajorVersionMismatchesField = Enums.ParseYesNoType(value);
14351 this.allowMajorVersionMismatchesFieldSet = true;
14352 }
14353 if (("AllowProductCodeMismatches" == name))
14354 {
14355 this.allowProductCodeMismatchesField = Enums.ParseYesNoType(value);
14356 this.allowProductCodeMismatchesFieldSet = true;
14357 }
14358 if (("CleanWorkingFolder" == name))
14359 {
14360 this.cleanWorkingFolderField = Enums.ParseYesNoType(value);
14361 this.cleanWorkingFolderFieldSet = true;
14362 }
14363 if (("Codepage" == name))
14364 {
14365 this.codepageField = value;
14366 this.codepageFieldSet = true;
14367 }
14368 if (("OutputPath" == name))
14369 {
14370 this.outputPathField = value;
14371 this.outputPathFieldSet = true;
14372 }
14373 if (("SourceList" == name))
14374 {
14375 this.sourceListField = value;
14376 this.sourceListFieldSet = true;
14377 }
14378 if (("SymbolFlags" == name))
14379 {
14380 this.symbolFlagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
14381 this.symbolFlagsFieldSet = true;
14382 }
14383 if (("WholeFilesOnly" == name))
14384 {
14385 this.wholeFilesOnlyField = Enums.ParseYesNoType(value);
14386 this.wholeFilesOnlyFieldSet = true;
14387 }
14388 }
14389 }
14390
14391 /// <summary>
14392 /// 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.
14393 /// </summary>
14394 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
14395 public class PatchInformation : ISchemaElement, ISetAttributes
14396 {
14397
14398 private string descriptionField;
14399
14400 private bool descriptionFieldSet;
14401
14402 private string platformsField;
14403
14404 private bool platformsFieldSet;
14405
14406 private string languagesField;
14407
14408 private bool languagesFieldSet;
14409
14410 private string manufacturerField;
14411
14412 private bool manufacturerFieldSet;
14413
14414 private string keywordsField;
14415
14416 private bool keywordsFieldSet;
14417
14418 private string commentsField;
14419
14420 private bool commentsFieldSet;
14421
14422 private YesNoDefaultType readOnlyField;
14423
14424 private bool readOnlyFieldSet;
14425
14426 private string summaryCodepageField;
14427
14428 private bool summaryCodepageFieldSet;
14429
14430 private YesNoType shortNamesField;
14431
14432 private bool shortNamesFieldSet;
14433
14434 private YesNoType compressedField;
14435
14436 private bool compressedFieldSet;
14437
14438 private YesNoType adminImageField;
14439
14440 private bool adminImageFieldSet;
14441
14442 private ISchemaElement parentElement;
14443
14444 /// <summary>
14445 /// A short description of the patch that includes the name of the product.
14446 /// </summary>
14447 public string Description
14448 {
14449 get
14450 {
14451 return this.descriptionField;
14452 }
14453 set
14454 {
14455 this.descriptionFieldSet = true;
14456 this.descriptionField = value;
14457 }
14458 }
14459
14460 public string Platforms
14461 {
14462 get
14463 {
14464 return this.platformsField;
14465 }
14466 set
14467 {
14468 this.platformsFieldSet = true;
14469 this.platformsField = value;
14470 }
14471 }
14472
14473 public string Languages
14474 {
14475 get
14476 {
14477 return this.languagesField;
14478 }
14479 set
14480 {
14481 this.languagesFieldSet = true;
14482 this.languagesField = value;
14483 }
14484 }
14485
14486 /// <summary>
14487 /// The name of the manufacturer of the patch package.
14488 /// </summary>
14489 public string Manufacturer
14490 {
14491 get
14492 {
14493 return this.manufacturerField;
14494 }
14495 set
14496 {
14497 this.manufacturerFieldSet = true;
14498 this.manufacturerField = value;
14499 }
14500 }
14501
14502 /// <summary>
14503 /// A semicolon-delimited list of network or URL locations for alternate sources of the patch. The default is "Installer,Patching,PCP,Database".
14504 /// </summary>
14505 public string Keywords
14506 {
14507 get
14508 {
14509 return this.keywordsField;
14510 }
14511 set
14512 {
14513 this.keywordsFieldSet = true;
14514 this.keywordsField = value;
14515 }
14516 }
14517
14518 /// <summary>
14519 /// General purpose of the patch package. For example, "This patch contains the logic and data required to install
14520 /// </summary>
14521 public string Comments
14522 {
14523 get
14524 {
14525 return this.commentsField;
14526 }
14527 set
14528 {
14529 this.commentsFieldSet = true;
14530 this.commentsField = value;
14531 }
14532 }
14533
14534 /// <summary>
14535 /// The value of this attribute conveys whether the package should be opened as read-only.
14536 /// A database editing tool should not modify a read-only enforced database and should
14537 /// issue a warning at attempts to modify a read-only recommended database.
14538 /// </summary>
14539 public YesNoDefaultType ReadOnly
14540 {
14541 get
14542 {
14543 return this.readOnlyField;
14544 }
14545 set
14546 {
14547 this.readOnlyFieldSet = true;
14548 this.readOnlyField = value;
14549 }
14550 }
14551
14552 /// <summary>
14553 /// The code page integer value or web name for summary info strings only. The default is 1252. See remarks for more information.
14554 /// </summary>
14555 public string SummaryCodepage
14556 {
14557 get
14558 {
14559 return this.summaryCodepageField;
14560 }
14561 set
14562 {
14563 this.summaryCodepageFieldSet = true;
14564 this.summaryCodepageField = value;
14565 }
14566 }
14567
14568 public YesNoType ShortNames
14569 {
14570 get
14571 {
14572 return this.shortNamesField;
14573 }
14574 set
14575 {
14576 this.shortNamesFieldSet = true;
14577 this.shortNamesField = value;
14578 }
14579 }
14580
14581 public YesNoType Compressed
14582 {
14583 get
14584 {
14585 return this.compressedField;
14586 }
14587 set
14588 {
14589 this.compressedFieldSet = true;
14590 this.compressedField = value;
14591 }
14592 }
14593
14594 public YesNoType AdminImage
14595 {
14596 get
14597 {
14598 return this.adminImageField;
14599 }
14600 set
14601 {
14602 this.adminImageFieldSet = true;
14603 this.adminImageField = value;
14604 }
14605 }
14606
14607 public virtual ISchemaElement ParentElement
14608 {
14609 get
14610 {
14611 return this.parentElement;
14612 }
14613 set
14614 {
14615 this.parentElement = value;
14616 }
14617 }
14618
14619 /// <summary>
14620 /// Processes this element and all child elements into an XmlWriter.
14621 /// </summary>
14622 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
14623 public virtual void OutputXml(XmlWriter writer)
14624 {
14625 if ((null == writer))
14626 {
14627 throw new ArgumentNullException("writer");
14628 }
14629 writer.WriteStartElement("PatchInformation", "http://wixtoolset.org/schemas/v4/wxs");
14630 if (this.descriptionFieldSet)
14631 {
14632 writer.WriteAttributeString("Description", this.descriptionField);
14633 }
14634 if (this.platformsFieldSet)
14635 {
14636 writer.WriteAttributeString("Platforms", this.platformsField);
14637 }
14638 if (this.languagesFieldSet)
14639 {
14640 writer.WriteAttributeString("Languages", this.languagesField);
14641 }
14642 if (this.manufacturerFieldSet)
14643 {
14644 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
14645 }
14646 if (this.keywordsFieldSet)
14647 {
14648 writer.WriteAttributeString("Keywords", this.keywordsField);
14649 }
14650 if (this.commentsFieldSet)
14651 {
14652 writer.WriteAttributeString("Comments", this.commentsField);
14653 }
14654 if (this.readOnlyFieldSet)
14655 {
14656 if ((this.readOnlyField == YesNoDefaultType.@default))
14657 {
14658 writer.WriteAttributeString("ReadOnly", "default");
14659 }
14660 if ((this.readOnlyField == YesNoDefaultType.no))
14661 {
14662 writer.WriteAttributeString("ReadOnly", "no");
14663 }
14664 if ((this.readOnlyField == YesNoDefaultType.yes))
14665 {
14666 writer.WriteAttributeString("ReadOnly", "yes");
14667 }
14668 }
14669 if (this.summaryCodepageFieldSet)
14670 {
14671 writer.WriteAttributeString("SummaryCodepage", this.summaryCodepageField);
14672 }
14673 if (this.shortNamesFieldSet)
14674 {
14675 if ((this.shortNamesField == YesNoType.no))
14676 {
14677 writer.WriteAttributeString("ShortNames", "no");
14678 }
14679 if ((this.shortNamesField == YesNoType.yes))
14680 {
14681 writer.WriteAttributeString("ShortNames", "yes");
14682 }
14683 }
14684 if (this.compressedFieldSet)
14685 {
14686 if ((this.compressedField == YesNoType.no))
14687 {
14688 writer.WriteAttributeString("Compressed", "no");
14689 }
14690 if ((this.compressedField == YesNoType.yes))
14691 {
14692 writer.WriteAttributeString("Compressed", "yes");
14693 }
14694 }
14695 if (this.adminImageFieldSet)
14696 {
14697 if ((this.adminImageField == YesNoType.no))
14698 {
14699 writer.WriteAttributeString("AdminImage", "no");
14700 }
14701 if ((this.adminImageField == YesNoType.yes))
14702 {
14703 writer.WriteAttributeString("AdminImage", "yes");
14704 }
14705 }
14706 writer.WriteEndElement();
14707 }
14708
14709 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
14710 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
14711 void ISetAttributes.SetAttribute(string name, string value)
14712 {
14713 if (String.IsNullOrEmpty(name))
14714 {
14715 throw new ArgumentNullException("name");
14716 }
14717 if (("Description" == name))
14718 {
14719 this.descriptionField = value;
14720 this.descriptionFieldSet = true;
14721 }
14722 if (("Platforms" == name))
14723 {
14724 this.platformsField = value;
14725 this.platformsFieldSet = true;
14726 }
14727 if (("Languages" == name))
14728 {
14729 this.languagesField = value;
14730 this.languagesFieldSet = true;
14731 }
14732 if (("Manufacturer" == name))
14733 {
14734 this.manufacturerField = value;
14735 this.manufacturerFieldSet = true;
14736 }
14737 if (("Keywords" == name))
14738 {
14739 this.keywordsField = value;
14740 this.keywordsFieldSet = true;
14741 }
14742 if (("Comments" == name))
14743 {
14744 this.commentsField = value;
14745 this.commentsFieldSet = true;
14746 }
14747 if (("ReadOnly" == name))
14748 {
14749 this.readOnlyField = Enums.ParseYesNoDefaultType(value);
14750 this.readOnlyFieldSet = true;
14751 }
14752 if (("SummaryCodepage" == name))
14753 {
14754 this.summaryCodepageField = value;
14755 this.summaryCodepageFieldSet = true;
14756 }
14757 if (("ShortNames" == name))
14758 {
14759 this.shortNamesField = Enums.ParseYesNoType(value);
14760 this.shortNamesFieldSet = true;
14761 }
14762 if (("Compressed" == name))
14763 {
14764 this.compressedField = Enums.ParseYesNoType(value);
14765 this.compressedFieldSet = true;
14766 }
14767 if (("AdminImage" == name))
14768 {
14769 this.adminImageField = Enums.ParseYesNoType(value);
14770 this.adminImageFieldSet = true;
14771 }
14772 }
14773 }
14774
14775 /// <summary>
14776 /// Properties about the patch to be placed in the PatchMetadata table.
14777 /// </summary>
14778 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
14779 public class PatchMetadata : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
14780 {
14781
14782 private ElementCollection children;
14783
14784 private YesNoType allowRemovalField;
14785
14786 private bool allowRemovalFieldSet;
14787
14788 private string classificationField;
14789
14790 private bool classificationFieldSet;
14791
14792 private string creationTimeUTCField;
14793
14794 private bool creationTimeUTCFieldSet;
14795
14796 private string descriptionField;
14797
14798 private bool descriptionFieldSet;
14799
14800 private string displayNameField;
14801
14802 private bool displayNameFieldSet;
14803
14804 private string manufacturerNameField;
14805
14806 private bool manufacturerNameFieldSet;
14807
14808 private string minorUpdateTargetRTMField;
14809
14810 private bool minorUpdateTargetRTMFieldSet;
14811
14812 private string moreInfoURLField;
14813
14814 private bool moreInfoURLFieldSet;
14815
14816 private YesNoType optimizedInstallModeField;
14817
14818 private bool optimizedInstallModeFieldSet;
14819
14820 private string targetProductNameField;
14821
14822 private bool targetProductNameFieldSet;
14823
14824 private ISchemaElement parentElement;
14825
14826 public PatchMetadata()
14827 {
14828 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
14829 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
14830 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomProperty)));
14831 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(OptimizeCustomActions)));
14832 childCollection0.AddCollection(childCollection1);
14833 this.children = childCollection0;
14834 }
14835
14836 public virtual IEnumerable Children
14837 {
14838 get
14839 {
14840 return this.children;
14841 }
14842 }
14843
14844 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
14845 public virtual IEnumerable this[System.Type childType]
14846 {
14847 get
14848 {
14849 return this.children.Filter(childType);
14850 }
14851 }
14852
14853 /// <summary>
14854 /// Whether this is an uninstallable patch.
14855 /// </summary>
14856 public YesNoType AllowRemoval
14857 {
14858 get
14859 {
14860 return this.allowRemovalField;
14861 }
14862 set
14863 {
14864 this.allowRemovalFieldSet = true;
14865 this.allowRemovalField = value;
14866 }
14867 }
14868
14869 /// <summary>
14870 /// Category of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup.
14871 /// </summary>
14872 public string Classification
14873 {
14874 get
14875 {
14876 return this.classificationField;
14877 }
14878 set
14879 {
14880 this.classificationFieldSet = true;
14881 this.classificationField = value;
14882 }
14883 }
14884
14885 /// <summary>
14886 /// Creation time of the .msp file in the form mm-dd-yy HH:MM (month-day-year hour:minute).
14887 /// </summary>
14888 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
14889 public string CreationTimeUTC
14890 {
14891 get
14892 {
14893 return this.creationTimeUTCField;
14894 }
14895 set
14896 {
14897 this.creationTimeUTCFieldSet = true;
14898 this.creationTimeUTCField = value;
14899 }
14900 }
14901
14902 /// <summary>
14903 /// Description of the patch.
14904 /// </summary>
14905 public string Description
14906 {
14907 get
14908 {
14909 return this.descriptionField;
14910 }
14911 set
14912 {
14913 this.descriptionFieldSet = true;
14914 this.descriptionField = value;
14915 }
14916 }
14917
14918 /// <summary>
14919 /// A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on.
14920 /// </summary>
14921 public string DisplayName
14922 {
14923 get
14924 {
14925 return this.displayNameField;
14926 }
14927 set
14928 {
14929 this.displayNameFieldSet = true;
14930 this.displayNameField = value;
14931 }
14932 }
14933
14934 /// <summary>
14935 /// Name of the manufacturer.
14936 /// </summary>
14937 public string ManufacturerName
14938 {
14939 get
14940 {
14941 return this.manufacturerNameField;
14942 }
14943 set
14944 {
14945 this.manufacturerNameFieldSet = true;
14946 this.manufacturerNameField = value;
14947 }
14948 }
14949
14950 /// <summary>
14951 /// Indicates that the patch targets the RTM version of the product or the most recent major
14952 /// upgrade patch. Author this optional property in minor update patches that contain sequencing
14953 /// information to indicate that the patch removes all patches up to the RTM version of the
14954 /// product, or up to the most recent major upgrade patch. This property is available beginning
14955 /// with Windows Installer 3.1.
14956 /// </summary>
14957 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
14958 public string MinorUpdateTargetRTM
14959 {
14960 get
14961 {
14962 return this.minorUpdateTargetRTMField;
14963 }
14964 set
14965 {
14966 this.minorUpdateTargetRTMFieldSet = true;
14967 this.minorUpdateTargetRTMField = value;
14968 }
14969 }
14970
14971 /// <summary>
14972 /// A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on.
14973 /// </summary>
14974 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
14975 public string MoreInfoURL
14976 {
14977 get
14978 {
14979 return this.moreInfoURLField;
14980 }
14981 set
14982 {
14983 this.moreInfoURLFieldSet = true;
14984 this.moreInfoURLField = value;
14985 }
14986 }
14987
14988 /// <summary>
14989 /// If this attribute is set to 'yes' in all the patches to be applied in a transaction, the
14990 /// application of the patch is optimized if possible. Available beginning with Windows Installer 3.1.
14991 /// </summary>
14992 public YesNoType OptimizedInstallMode
14993 {
14994 get
14995 {
14996 return this.optimizedInstallModeField;
14997 }
14998 set
14999 {
15000 this.optimizedInstallModeFieldSet = true;
15001 this.optimizedInstallModeField = value;
15002 }
15003 }
15004
15005 /// <summary>
15006 /// Name of the application or target product suite.
15007 /// </summary>
15008 public string TargetProductName
15009 {
15010 get
15011 {
15012 return this.targetProductNameField;
15013 }
15014 set
15015 {
15016 this.targetProductNameFieldSet = true;
15017 this.targetProductNameField = value;
15018 }
15019 }
15020
15021 public virtual ISchemaElement ParentElement
15022 {
15023 get
15024 {
15025 return this.parentElement;
15026 }
15027 set
15028 {
15029 this.parentElement = value;
15030 }
15031 }
15032
15033 public virtual void AddChild(ISchemaElement child)
15034 {
15035 if ((null == child))
15036 {
15037 throw new ArgumentNullException("child");
15038 }
15039 this.children.AddElement(child);
15040 child.ParentElement = this;
15041 }
15042
15043 public virtual void RemoveChild(ISchemaElement child)
15044 {
15045 if ((null == child))
15046 {
15047 throw new ArgumentNullException("child");
15048 }
15049 this.children.RemoveElement(child);
15050 child.ParentElement = null;
15051 }
15052
15053 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15054 ISchemaElement ICreateChildren.CreateChild(string childName)
15055 {
15056 if (String.IsNullOrEmpty(childName))
15057 {
15058 throw new ArgumentNullException("childName");
15059 }
15060 ISchemaElement childValue = null;
15061 if (("CustomProperty" == childName))
15062 {
15063 childValue = new CustomProperty();
15064 }
15065 if (("OptimizeCustomActions" == childName))
15066 {
15067 childValue = new OptimizeCustomActions();
15068 }
15069 if ((null == childValue))
15070 {
15071 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
15072 }
15073 return childValue;
15074 }
15075
15076 /// <summary>
15077 /// Processes this element and all child elements into an XmlWriter.
15078 /// </summary>
15079 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
15080 public virtual void OutputXml(XmlWriter writer)
15081 {
15082 if ((null == writer))
15083 {
15084 throw new ArgumentNullException("writer");
15085 }
15086 writer.WriteStartElement("PatchMetadata", "http://wixtoolset.org/schemas/v4/wxs");
15087 if (this.allowRemovalFieldSet)
15088 {
15089 if ((this.allowRemovalField == YesNoType.no))
15090 {
15091 writer.WriteAttributeString("AllowRemoval", "no");
15092 }
15093 if ((this.allowRemovalField == YesNoType.yes))
15094 {
15095 writer.WriteAttributeString("AllowRemoval", "yes");
15096 }
15097 }
15098 if (this.classificationFieldSet)
15099 {
15100 writer.WriteAttributeString("Classification", this.classificationField);
15101 }
15102 if (this.creationTimeUTCFieldSet)
15103 {
15104 writer.WriteAttributeString("CreationTimeUTC", this.creationTimeUTCField);
15105 }
15106 if (this.descriptionFieldSet)
15107 {
15108 writer.WriteAttributeString("Description", this.descriptionField);
15109 }
15110 if (this.displayNameFieldSet)
15111 {
15112 writer.WriteAttributeString("DisplayName", this.displayNameField);
15113 }
15114 if (this.manufacturerNameFieldSet)
15115 {
15116 writer.WriteAttributeString("ManufacturerName", this.manufacturerNameField);
15117 }
15118 if (this.minorUpdateTargetRTMFieldSet)
15119 {
15120 writer.WriteAttributeString("MinorUpdateTargetRTM", this.minorUpdateTargetRTMField);
15121 }
15122 if (this.moreInfoURLFieldSet)
15123 {
15124 writer.WriteAttributeString("MoreInfoURL", this.moreInfoURLField);
15125 }
15126 if (this.optimizedInstallModeFieldSet)
15127 {
15128 if ((this.optimizedInstallModeField == YesNoType.no))
15129 {
15130 writer.WriteAttributeString("OptimizedInstallMode", "no");
15131 }
15132 if ((this.optimizedInstallModeField == YesNoType.yes))
15133 {
15134 writer.WriteAttributeString("OptimizedInstallMode", "yes");
15135 }
15136 }
15137 if (this.targetProductNameFieldSet)
15138 {
15139 writer.WriteAttributeString("TargetProductName", this.targetProductNameField);
15140 }
15141 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
15142 {
15143 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
15144 childElement.OutputXml(writer);
15145 }
15146 writer.WriteEndElement();
15147 }
15148
15149 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15150 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
15151 void ISetAttributes.SetAttribute(string name, string value)
15152 {
15153 if (String.IsNullOrEmpty(name))
15154 {
15155 throw new ArgumentNullException("name");
15156 }
15157 if (("AllowRemoval" == name))
15158 {
15159 this.allowRemovalField = Enums.ParseYesNoType(value);
15160 this.allowRemovalFieldSet = true;
15161 }
15162 if (("Classification" == name))
15163 {
15164 this.classificationField = value;
15165 this.classificationFieldSet = true;
15166 }
15167 if (("CreationTimeUTC" == name))
15168 {
15169 this.creationTimeUTCField = value;
15170 this.creationTimeUTCFieldSet = true;
15171 }
15172 if (("Description" == name))
15173 {
15174 this.descriptionField = value;
15175 this.descriptionFieldSet = true;
15176 }
15177 if (("DisplayName" == name))
15178 {
15179 this.displayNameField = value;
15180 this.displayNameFieldSet = true;
15181 }
15182 if (("ManufacturerName" == name))
15183 {
15184 this.manufacturerNameField = value;
15185 this.manufacturerNameFieldSet = true;
15186 }
15187 if (("MinorUpdateTargetRTM" == name))
15188 {
15189 this.minorUpdateTargetRTMField = value;
15190 this.minorUpdateTargetRTMFieldSet = true;
15191 }
15192 if (("MoreInfoURL" == name))
15193 {
15194 this.moreInfoURLField = value;
15195 this.moreInfoURLFieldSet = true;
15196 }
15197 if (("OptimizedInstallMode" == name))
15198 {
15199 this.optimizedInstallModeField = Enums.ParseYesNoType(value);
15200 this.optimizedInstallModeFieldSet = true;
15201 }
15202 if (("TargetProductName" == name))
15203 {
15204 this.targetProductNameField = value;
15205 this.targetProductNameFieldSet = true;
15206 }
15207 }
15208 }
15209
15210 /// <summary>
15211 /// A custom property for the PatchMetadata table.
15212 /// </summary>
15213 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15214 public class CustomProperty : ISchemaElement, ISetAttributes
15215 {
15216
15217 private string companyField;
15218
15219 private bool companyFieldSet;
15220
15221 private string propertyField;
15222
15223 private bool propertyFieldSet;
15224
15225 private string valueField;
15226
15227 private bool valueFieldSet;
15228
15229 private ISchemaElement parentElement;
15230
15231 /// <summary>
15232 /// The name of the company.
15233 /// </summary>
15234 public string Company
15235 {
15236 get
15237 {
15238 return this.companyField;
15239 }
15240 set
15241 {
15242 this.companyFieldSet = true;
15243 this.companyField = value;
15244 }
15245 }
15246
15247 /// <summary>
15248 /// The name of the metadata property.
15249 /// </summary>
15250 public string Property
15251 {
15252 get
15253 {
15254 return this.propertyField;
15255 }
15256 set
15257 {
15258 this.propertyFieldSet = true;
15259 this.propertyField = value;
15260 }
15261 }
15262
15263 /// <summary>
15264 /// Value of the metadata property.
15265 /// </summary>
15266 public string Value
15267 {
15268 get
15269 {
15270 return this.valueField;
15271 }
15272 set
15273 {
15274 this.valueFieldSet = true;
15275 this.valueField = value;
15276 }
15277 }
15278
15279 public virtual ISchemaElement ParentElement
15280 {
15281 get
15282 {
15283 return this.parentElement;
15284 }
15285 set
15286 {
15287 this.parentElement = value;
15288 }
15289 }
15290
15291 /// <summary>
15292 /// Processes this element and all child elements into an XmlWriter.
15293 /// </summary>
15294 public virtual void OutputXml(XmlWriter writer)
15295 {
15296 if ((null == writer))
15297 {
15298 throw new ArgumentNullException("writer");
15299 }
15300 writer.WriteStartElement("CustomProperty", "http://wixtoolset.org/schemas/v4/wxs");
15301 if (this.companyFieldSet)
15302 {
15303 writer.WriteAttributeString("Company", this.companyField);
15304 }
15305 if (this.propertyFieldSet)
15306 {
15307 writer.WriteAttributeString("Property", this.propertyField);
15308 }
15309 if (this.valueFieldSet)
15310 {
15311 writer.WriteAttributeString("Value", this.valueField);
15312 }
15313 writer.WriteEndElement();
15314 }
15315
15316 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15317 void ISetAttributes.SetAttribute(string name, string value)
15318 {
15319 if (String.IsNullOrEmpty(name))
15320 {
15321 throw new ArgumentNullException("name");
15322 }
15323 if (("Company" == name))
15324 {
15325 this.companyField = value;
15326 this.companyFieldSet = true;
15327 }
15328 if (("Property" == name))
15329 {
15330 this.propertyField = value;
15331 this.propertyFieldSet = true;
15332 }
15333 if (("Value" == name))
15334 {
15335 this.valueField = value;
15336 this.valueFieldSet = true;
15337 }
15338 }
15339 }
15340
15341 /// <summary>
15342 /// A patch that is deprecated by this patch.
15343 /// </summary>
15344 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15345 public class ReplacePatch : ISchemaElement, ISetAttributes
15346 {
15347
15348 private string idField;
15349
15350 private bool idFieldSet;
15351
15352 private ISchemaElement parentElement;
15353
15354 /// <summary>
15355 /// Patch GUID to be unregistered if it exists on the machine targeted by this patch.
15356 /// </summary>
15357 public string Id
15358 {
15359 get
15360 {
15361 return this.idField;
15362 }
15363 set
15364 {
15365 this.idFieldSet = true;
15366 this.idField = value;
15367 }
15368 }
15369
15370 public virtual ISchemaElement ParentElement
15371 {
15372 get
15373 {
15374 return this.parentElement;
15375 }
15376 set
15377 {
15378 this.parentElement = value;
15379 }
15380 }
15381
15382 /// <summary>
15383 /// Processes this element and all child elements into an XmlWriter.
15384 /// </summary>
15385 public virtual void OutputXml(XmlWriter writer)
15386 {
15387 if ((null == writer))
15388 {
15389 throw new ArgumentNullException("writer");
15390 }
15391 writer.WriteStartElement("ReplacePatch", "http://wixtoolset.org/schemas/v4/wxs");
15392 if (this.idFieldSet)
15393 {
15394 writer.WriteAttributeString("Id", this.idField);
15395 }
15396 writer.WriteEndElement();
15397 }
15398
15399 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15400 void ISetAttributes.SetAttribute(string name, string value)
15401 {
15402 if (String.IsNullOrEmpty(name))
15403 {
15404 throw new ArgumentNullException("name");
15405 }
15406 if (("Id" == name))
15407 {
15408 this.idField = value;
15409 this.idFieldSet = true;
15410 }
15411 }
15412 }
15413
15414 /// <summary>
15415 /// The product codes for products that can accept the patch.
15416 /// </summary>
15417 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15418 public class TargetProductCodes : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
15419 {
15420
15421 private ElementCollection children;
15422
15423 private YesNoType replaceField;
15424
15425 private bool replaceFieldSet;
15426
15427 private ISchemaElement parentElement;
15428
15429 public TargetProductCodes()
15430 {
15431 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
15432 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCode)));
15433 this.children = childCollection0;
15434 }
15435
15436 public virtual IEnumerable Children
15437 {
15438 get
15439 {
15440 return this.children;
15441 }
15442 }
15443
15444 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
15445 public virtual IEnumerable this[System.Type childType]
15446 {
15447 get
15448 {
15449 return this.children.Filter(childType);
15450 }
15451 }
15452
15453 /// <summary>
15454 /// Whether to replace the product codes that can accept the patch from the target packages with the child elements.
15455 /// </summary>
15456 public YesNoType Replace
15457 {
15458 get
15459 {
15460 return this.replaceField;
15461 }
15462 set
15463 {
15464 this.replaceFieldSet = true;
15465 this.replaceField = value;
15466 }
15467 }
15468
15469 public virtual ISchemaElement ParentElement
15470 {
15471 get
15472 {
15473 return this.parentElement;
15474 }
15475 set
15476 {
15477 this.parentElement = value;
15478 }
15479 }
15480
15481 public virtual void AddChild(ISchemaElement child)
15482 {
15483 if ((null == child))
15484 {
15485 throw new ArgumentNullException("child");
15486 }
15487 this.children.AddElement(child);
15488 child.ParentElement = this;
15489 }
15490
15491 public virtual void RemoveChild(ISchemaElement child)
15492 {
15493 if ((null == child))
15494 {
15495 throw new ArgumentNullException("child");
15496 }
15497 this.children.RemoveElement(child);
15498 child.ParentElement = null;
15499 }
15500
15501 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15502 ISchemaElement ICreateChildren.CreateChild(string childName)
15503 {
15504 if (String.IsNullOrEmpty(childName))
15505 {
15506 throw new ArgumentNullException("childName");
15507 }
15508 ISchemaElement childValue = null;
15509 if (("TargetProductCode" == childName))
15510 {
15511 childValue = new TargetProductCode();
15512 }
15513 if ((null == childValue))
15514 {
15515 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
15516 }
15517 return childValue;
15518 }
15519
15520 /// <summary>
15521 /// Processes this element and all child elements into an XmlWriter.
15522 /// </summary>
15523 public virtual void OutputXml(XmlWriter writer)
15524 {
15525 if ((null == writer))
15526 {
15527 throw new ArgumentNullException("writer");
15528 }
15529 writer.WriteStartElement("TargetProductCodes", "http://wixtoolset.org/schemas/v4/wxs");
15530 if (this.replaceFieldSet)
15531 {
15532 if ((this.replaceField == YesNoType.no))
15533 {
15534 writer.WriteAttributeString("Replace", "no");
15535 }
15536 if ((this.replaceField == YesNoType.yes))
15537 {
15538 writer.WriteAttributeString("Replace", "yes");
15539 }
15540 }
15541 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
15542 {
15543 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
15544 childElement.OutputXml(writer);
15545 }
15546 writer.WriteEndElement();
15547 }
15548
15549 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15550 void ISetAttributes.SetAttribute(string name, string value)
15551 {
15552 if (String.IsNullOrEmpty(name))
15553 {
15554 throw new ArgumentNullException("name");
15555 }
15556 if (("Replace" == name))
15557 {
15558 this.replaceField = Enums.ParseYesNoType(value);
15559 this.replaceFieldSet = true;
15560 }
15561 }
15562 }
15563
15564 /// <summary>
15565 /// A product code for a product that can accept the patch.
15566 /// </summary>
15567 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15568 public class TargetProductCode : ISchemaElement, ISetAttributes
15569 {
15570
15571 private string idField;
15572
15573 private bool idFieldSet;
15574
15575 private ISchemaElement parentElement;
15576
15577 /// <summary>
15578 /// The product code for a product that can accept the patch. This can be '*'. See remarks for more information.
15579 /// </summary>
15580 public string Id
15581 {
15582 get
15583 {
15584 return this.idField;
15585 }
15586 set
15587 {
15588 this.idFieldSet = true;
15589 this.idField = value;
15590 }
15591 }
15592
15593 public virtual ISchemaElement ParentElement
15594 {
15595 get
15596 {
15597 return this.parentElement;
15598 }
15599 set
15600 {
15601 this.parentElement = value;
15602 }
15603 }
15604
15605 /// <summary>
15606 /// Processes this element and all child elements into an XmlWriter.
15607 /// </summary>
15608 public virtual void OutputXml(XmlWriter writer)
15609 {
15610 if ((null == writer))
15611 {
15612 throw new ArgumentNullException("writer");
15613 }
15614 writer.WriteStartElement("TargetProductCode", "http://wixtoolset.org/schemas/v4/wxs");
15615 if (this.idFieldSet)
15616 {
15617 writer.WriteAttributeString("Id", this.idField);
15618 }
15619 writer.WriteEndElement();
15620 }
15621
15622 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15623 void ISetAttributes.SetAttribute(string name, string value)
15624 {
15625 if (String.IsNullOrEmpty(name))
15626 {
15627 throw new ArgumentNullException("name");
15628 }
15629 if (("Id" == name))
15630 {
15631 this.idField = value;
15632 this.idFieldSet = true;
15633 }
15634 }
15635 }
15636
15637 /// <summary>
15638 /// A property for this patch database.
15639 /// </summary>
15640 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15641 public class PatchProperty : ISchemaElement, ISetAttributes
15642 {
15643
15644 private string companyField;
15645
15646 private bool companyFieldSet;
15647
15648 private string nameField;
15649
15650 private bool nameFieldSet;
15651
15652 private string valueField;
15653
15654 private bool valueFieldSet;
15655
15656 private ISchemaElement parentElement;
15657
15658 /// <summary>
15659 /// Name of the company for a custom metadata property.
15660 /// </summary>
15661 public string Company
15662 {
15663 get
15664 {
15665 return this.companyField;
15666 }
15667 set
15668 {
15669 this.companyFieldSet = true;
15670 this.companyField = value;
15671 }
15672 }
15673
15674 /// <summary>
15675 /// Name of the patch property.
15676 /// </summary>
15677 public string Name
15678 {
15679 get
15680 {
15681 return this.nameField;
15682 }
15683 set
15684 {
15685 this.nameFieldSet = true;
15686 this.nameField = value;
15687 }
15688 }
15689
15690 /// <summary>
15691 /// Value of the patch property.
15692 /// </summary>
15693 public string Value
15694 {
15695 get
15696 {
15697 return this.valueField;
15698 }
15699 set
15700 {
15701 this.valueFieldSet = true;
15702 this.valueField = value;
15703 }
15704 }
15705
15706 public virtual ISchemaElement ParentElement
15707 {
15708 get
15709 {
15710 return this.parentElement;
15711 }
15712 set
15713 {
15714 this.parentElement = value;
15715 }
15716 }
15717
15718 /// <summary>
15719 /// Processes this element and all child elements into an XmlWriter.
15720 /// </summary>
15721 public virtual void OutputXml(XmlWriter writer)
15722 {
15723 if ((null == writer))
15724 {
15725 throw new ArgumentNullException("writer");
15726 }
15727 writer.WriteStartElement("PatchProperty", "http://wixtoolset.org/schemas/v4/wxs");
15728 if (this.companyFieldSet)
15729 {
15730 writer.WriteAttributeString("Company", this.companyField);
15731 }
15732 if (this.nameFieldSet)
15733 {
15734 writer.WriteAttributeString("Name", this.nameField);
15735 }
15736 if (this.valueFieldSet)
15737 {
15738 writer.WriteAttributeString("Value", this.valueField);
15739 }
15740 writer.WriteEndElement();
15741 }
15742
15743 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15744 void ISetAttributes.SetAttribute(string name, string value)
15745 {
15746 if (String.IsNullOrEmpty(name))
15747 {
15748 throw new ArgumentNullException("name");
15749 }
15750 if (("Company" == name))
15751 {
15752 this.companyField = value;
15753 this.companyFieldSet = true;
15754 }
15755 if (("Name" == name))
15756 {
15757 this.nameField = value;
15758 this.nameFieldSet = true;
15759 }
15760 if (("Value" == name))
15761 {
15762 this.valueField = value;
15763 this.valueFieldSet = true;
15764 }
15765 }
15766 }
15767
15768 /// <summary>
15769 /// Sequence information for this patch database. Sequence information is generated automatically in most cases, and rarely needs to be set explicitly.
15770 /// </summary>
15771 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15772 public class PatchSequence : ISchemaElement, ISetAttributes
15773 {
15774
15775 private string patchFamilyField;
15776
15777 private bool patchFamilyFieldSet;
15778
15779 private string productCodeField;
15780
15781 private bool productCodeFieldSet;
15782
15783 private string sequenceField;
15784
15785 private bool sequenceFieldSet;
15786
15787 private YesNoType supersedeField;
15788
15789 private bool supersedeFieldSet;
15790
15791 private string targetField;
15792
15793 private bool targetFieldSet;
15794
15795 private string targetImageField;
15796
15797 private bool targetImageFieldSet;
15798
15799 private ISchemaElement parentElement;
15800
15801 /// <summary>
15802 /// Identifier which indicates a sequence family to which this patch belongs.
15803 /// </summary>
15804 public string PatchFamily
15805 {
15806 get
15807 {
15808 return this.patchFamilyField;
15809 }
15810 set
15811 {
15812 this.patchFamilyFieldSet = true;
15813 this.patchFamilyField = value;
15814 }
15815 }
15816
15817 /// <summary>
15818 /// Specifies the ProductCode of the product that this family applies to.
15819 /// This attribute cannot the specified if the TargetImage attribute is specified.
15820 /// </summary>
15821 public string ProductCode
15822 {
15823 get
15824 {
15825 return this.productCodeField;
15826 }
15827 set
15828 {
15829 this.productCodeFieldSet = true;
15830 this.productCodeField = value;
15831 }
15832 }
15833
15834 /// <summary>
15835 /// 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.
15836 /// </summary>
15837 public string Sequence
15838 {
15839 get
15840 {
15841 return this.sequenceField;
15842 }
15843 set
15844 {
15845 this.sequenceFieldSet = true;
15846 this.sequenceField = value;
15847 }
15848 }
15849
15850 /// <summary>
15851 /// Set this value to 'yes' to indicate that this patch will supersede all previous patches in this patch family.
15852 /// The default value is 'no'.
15853 /// </summary>
15854 public YesNoType Supersede
15855 {
15856 get
15857 {
15858 return this.supersedeField;
15859 }
15860 set
15861 {
15862 this.supersedeFieldSet = true;
15863 this.supersedeField = value;
15864 }
15865 }
15866
15867 public string Target
15868 {
15869 get
15870 {
15871 return this.targetField;
15872 }
15873 set
15874 {
15875 this.targetFieldSet = true;
15876 this.targetField = value;
15877 }
15878 }
15879
15880 /// <summary>
15881 /// Specifies the TargetImage that this family applies to.
15882 /// This attribute cannot the specified if the ProductCode attribute is specified.
15883 /// </summary>
15884 public string TargetImage
15885 {
15886 get
15887 {
15888 return this.targetImageField;
15889 }
15890 set
15891 {
15892 this.targetImageFieldSet = true;
15893 this.targetImageField = value;
15894 }
15895 }
15896
15897 public virtual ISchemaElement ParentElement
15898 {
15899 get
15900 {
15901 return this.parentElement;
15902 }
15903 set
15904 {
15905 this.parentElement = value;
15906 }
15907 }
15908
15909 /// <summary>
15910 /// Processes this element and all child elements into an XmlWriter.
15911 /// </summary>
15912 public virtual void OutputXml(XmlWriter writer)
15913 {
15914 if ((null == writer))
15915 {
15916 throw new ArgumentNullException("writer");
15917 }
15918 writer.WriteStartElement("PatchSequence", "http://wixtoolset.org/schemas/v4/wxs");
15919 if (this.patchFamilyFieldSet)
15920 {
15921 writer.WriteAttributeString("PatchFamily", this.patchFamilyField);
15922 }
15923 if (this.productCodeFieldSet)
15924 {
15925 writer.WriteAttributeString("ProductCode", this.productCodeField);
15926 }
15927 if (this.sequenceFieldSet)
15928 {
15929 writer.WriteAttributeString("Sequence", this.sequenceField);
15930 }
15931 if (this.supersedeFieldSet)
15932 {
15933 if ((this.supersedeField == YesNoType.no))
15934 {
15935 writer.WriteAttributeString("Supersede", "no");
15936 }
15937 if ((this.supersedeField == YesNoType.yes))
15938 {
15939 writer.WriteAttributeString("Supersede", "yes");
15940 }
15941 }
15942 if (this.targetFieldSet)
15943 {
15944 writer.WriteAttributeString("Target", this.targetField);
15945 }
15946 if (this.targetImageFieldSet)
15947 {
15948 writer.WriteAttributeString("TargetImage", this.targetImageField);
15949 }
15950 writer.WriteEndElement();
15951 }
15952
15953 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
15954 void ISetAttributes.SetAttribute(string name, string value)
15955 {
15956 if (String.IsNullOrEmpty(name))
15957 {
15958 throw new ArgumentNullException("name");
15959 }
15960 if (("PatchFamily" == name))
15961 {
15962 this.patchFamilyField = value;
15963 this.patchFamilyFieldSet = true;
15964 }
15965 if (("ProductCode" == name))
15966 {
15967 this.productCodeField = value;
15968 this.productCodeFieldSet = true;
15969 }
15970 if (("Sequence" == name))
15971 {
15972 this.sequenceField = value;
15973 this.sequenceFieldSet = true;
15974 }
15975 if (("Supersede" == name))
15976 {
15977 this.supersedeField = Enums.ParseYesNoType(value);
15978 this.supersedeFieldSet = true;
15979 }
15980 if (("Target" == name))
15981 {
15982 this.targetField = value;
15983 this.targetFieldSet = true;
15984 }
15985 if (("TargetImage" == name))
15986 {
15987 this.targetImageField = value;
15988 this.targetImageFieldSet = true;
15989 }
15990 }
15991 }
15992
15993 /// <summary>
15994 /// Group of one or more upgraded images of a product.
15995 /// </summary>
15996 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
15997 public class Family : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
15998 {
15999
16000 private ElementCollection children;
16001
16002 private string diskIdField;
16003
16004 private bool diskIdFieldSet;
16005
16006 private string diskPromptField;
16007
16008 private bool diskPromptFieldSet;
16009
16010 private string mediaSrcPropField;
16011
16012 private bool mediaSrcPropFieldSet;
16013
16014 private string nameField;
16015
16016 private bool nameFieldSet;
16017
16018 private int sequenceStartField;
16019
16020 private bool sequenceStartFieldSet;
16021
16022 private string volumeLabelField;
16023
16024 private bool volumeLabelFieldSet;
16025
16026 private ISchemaElement parentElement;
16027
16028 public Family()
16029 {
16030 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
16031 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(UpgradeImage)));
16032 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
16033 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ExternalFile)));
16034 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectFile)));
16035 childCollection0.AddCollection(childCollection1);
16036 this.children = childCollection0;
16037 }
16038
16039 public virtual IEnumerable Children
16040 {
16041 get
16042 {
16043 return this.children;
16044 }
16045 }
16046
16047 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
16048 public virtual IEnumerable this[System.Type childType]
16049 {
16050 get
16051 {
16052 return this.children.Filter(childType);
16053 }
16054 }
16055
16056 /// <summary>
16057 /// Entered into the DiskId field of the new Media table record.
16058 /// </summary>
16059 public string DiskId
16060 {
16061 get
16062 {
16063 return this.diskIdField;
16064 }
16065 set
16066 {
16067 this.diskIdFieldSet = true;
16068 this.diskIdField = value;
16069 }
16070 }
16071
16072 /// <summary>
16073 /// Value to display in the "[1]" of the DiskPrompt Property. Using this attribute will require you to define a DiskPrompt Property.
16074 /// </summary>
16075 public string DiskPrompt
16076 {
16077 get
16078 {
16079 return this.diskPromptField;
16080 }
16081 set
16082 {
16083 this.diskPromptFieldSet = true;
16084 this.diskPromptField = value;
16085 }
16086 }
16087
16088 /// <summary>
16089 /// Entered into the Source field of the new Media table entry of the upgraded image.
16090 /// </summary>
16091 public string MediaSrcProp
16092 {
16093 get
16094 {
16095 return this.mediaSrcPropField;
16096 }
16097 set
16098 {
16099 this.mediaSrcPropFieldSet = true;
16100 this.mediaSrcPropField = value;
16101 }
16102 }
16103
16104 /// <summary>
16105 /// Identifier for the family.
16106 /// </summary>
16107 public string Name
16108 {
16109 get
16110 {
16111 return this.nameField;
16112 }
16113 set
16114 {
16115 this.nameFieldSet = true;
16116 this.nameField = value;
16117 }
16118 }
16119
16120 /// <summary>
16121 /// Sequence number for the starting file.
16122 /// </summary>
16123 public int SequenceStart
16124 {
16125 get
16126 {
16127 return this.sequenceStartField;
16128 }
16129 set
16130 {
16131 this.sequenceStartFieldSet = true;
16132 this.sequenceStartField = value;
16133 }
16134 }
16135
16136 /// <summary>
16137 /// Entered into the VolumeLabel field of the new Media table record.
16138 /// </summary>
16139 public string VolumeLabel
16140 {
16141 get
16142 {
16143 return this.volumeLabelField;
16144 }
16145 set
16146 {
16147 this.volumeLabelFieldSet = true;
16148 this.volumeLabelField = value;
16149 }
16150 }
16151
16152 public virtual ISchemaElement ParentElement
16153 {
16154 get
16155 {
16156 return this.parentElement;
16157 }
16158 set
16159 {
16160 this.parentElement = value;
16161 }
16162 }
16163
16164 public virtual void AddChild(ISchemaElement child)
16165 {
16166 if ((null == child))
16167 {
16168 throw new ArgumentNullException("child");
16169 }
16170 this.children.AddElement(child);
16171 child.ParentElement = this;
16172 }
16173
16174 public virtual void RemoveChild(ISchemaElement child)
16175 {
16176 if ((null == child))
16177 {
16178 throw new ArgumentNullException("child");
16179 }
16180 this.children.RemoveElement(child);
16181 child.ParentElement = null;
16182 }
16183
16184 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16185 ISchemaElement ICreateChildren.CreateChild(string childName)
16186 {
16187 if (String.IsNullOrEmpty(childName))
16188 {
16189 throw new ArgumentNullException("childName");
16190 }
16191 ISchemaElement childValue = null;
16192 if (("UpgradeImage" == childName))
16193 {
16194 childValue = new UpgradeImage();
16195 }
16196 if (("ExternalFile" == childName))
16197 {
16198 childValue = new ExternalFile();
16199 }
16200 if (("ProtectFile" == childName))
16201 {
16202 childValue = new ProtectFile();
16203 }
16204 if ((null == childValue))
16205 {
16206 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
16207 }
16208 return childValue;
16209 }
16210
16211 /// <summary>
16212 /// Processes this element and all child elements into an XmlWriter.
16213 /// </summary>
16214 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
16215 public virtual void OutputXml(XmlWriter writer)
16216 {
16217 if ((null == writer))
16218 {
16219 throw new ArgumentNullException("writer");
16220 }
16221 writer.WriteStartElement("Family", "http://wixtoolset.org/schemas/v4/wxs");
16222 if (this.diskIdFieldSet)
16223 {
16224 writer.WriteAttributeString("DiskId", this.diskIdField);
16225 }
16226 if (this.diskPromptFieldSet)
16227 {
16228 writer.WriteAttributeString("DiskPrompt", this.diskPromptField);
16229 }
16230 if (this.mediaSrcPropFieldSet)
16231 {
16232 writer.WriteAttributeString("MediaSrcProp", this.mediaSrcPropField);
16233 }
16234 if (this.nameFieldSet)
16235 {
16236 writer.WriteAttributeString("Name", this.nameField);
16237 }
16238 if (this.sequenceStartFieldSet)
16239 {
16240 writer.WriteAttributeString("SequenceStart", this.sequenceStartField.ToString(CultureInfo.InvariantCulture));
16241 }
16242 if (this.volumeLabelFieldSet)
16243 {
16244 writer.WriteAttributeString("VolumeLabel", this.volumeLabelField);
16245 }
16246 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
16247 {
16248 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
16249 childElement.OutputXml(writer);
16250 }
16251 writer.WriteEndElement();
16252 }
16253
16254 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16255 void ISetAttributes.SetAttribute(string name, string value)
16256 {
16257 if (String.IsNullOrEmpty(name))
16258 {
16259 throw new ArgumentNullException("name");
16260 }
16261 if (("DiskId" == name))
16262 {
16263 this.diskIdField = value;
16264 this.diskIdFieldSet = true;
16265 }
16266 if (("DiskPrompt" == name))
16267 {
16268 this.diskPromptField = value;
16269 this.diskPromptFieldSet = true;
16270 }
16271 if (("MediaSrcProp" == name))
16272 {
16273 this.mediaSrcPropField = value;
16274 this.mediaSrcPropFieldSet = true;
16275 }
16276 if (("Name" == name))
16277 {
16278 this.nameField = value;
16279 this.nameFieldSet = true;
16280 }
16281 if (("SequenceStart" == name))
16282 {
16283 this.sequenceStartField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
16284 this.sequenceStartFieldSet = true;
16285 }
16286 if (("VolumeLabel" == name))
16287 {
16288 this.volumeLabelField = value;
16289 this.volumeLabelFieldSet = true;
16290 }
16291 }
16292 }
16293
16294 /// <summary>
16295 /// Contains information about the upgraded images of the product.
16296 /// </summary>
16297 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
16298 public class UpgradeImage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
16299 {
16300
16301 private ElementCollection children;
16302
16303 private string idField;
16304
16305 private bool idFieldSet;
16306
16307 private string sourceFileField;
16308
16309 private bool sourceFileFieldSet;
16310
16311 private string srcField;
16312
16313 private bool srcFieldSet;
16314
16315 private string sourcePatchField;
16316
16317 private bool sourcePatchFieldSet;
16318
16319 private string srcPatchField;
16320
16321 private bool srcPatchFieldSet;
16322
16323 private ISchemaElement parentElement;
16324
16325 public UpgradeImage()
16326 {
16327 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
16328 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(TargetImage)));
16329 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
16330 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
16331 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UpgradeFile)));
16332 childCollection0.AddCollection(childCollection1);
16333 this.children = childCollection0;
16334 }
16335
16336 public virtual IEnumerable Children
16337 {
16338 get
16339 {
16340 return this.children;
16341 }
16342 }
16343
16344 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
16345 public virtual IEnumerable this[System.Type childType]
16346 {
16347 get
16348 {
16349 return this.children.Filter(childType);
16350 }
16351 }
16352
16353 /// <summary>
16354 /// Identifier to connect target images with upgraded image.
16355 /// </summary>
16356 public string Id
16357 {
16358 get
16359 {
16360 return this.idField;
16361 }
16362 set
16363 {
16364 this.idFieldSet = true;
16365 this.idField = value;
16366 }
16367 }
16368
16369 /// <summary>
16370 /// Full path to location of msi file for upgraded image.
16371 /// </summary>
16372 public string SourceFile
16373 {
16374 get
16375 {
16376 return this.sourceFileField;
16377 }
16378 set
16379 {
16380 this.sourceFileFieldSet = true;
16381 this.sourceFileField = value;
16382 }
16383 }
16384
16385 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
16386 public string src
16387 {
16388 get
16389 {
16390 return this.srcField;
16391 }
16392 set
16393 {
16394 this.srcFieldSet = true;
16395 this.srcField = value;
16396 }
16397 }
16398
16399 /// <summary>
16400 /// Modified copy of the upgraded installation database that contains additional authoring specific to patching.
16401 /// </summary>
16402 public string SourcePatch
16403 {
16404 get
16405 {
16406 return this.sourcePatchField;
16407 }
16408 set
16409 {
16410 this.sourcePatchFieldSet = true;
16411 this.sourcePatchField = value;
16412 }
16413 }
16414
16415 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
16416 public string srcPatch
16417 {
16418 get
16419 {
16420 return this.srcPatchField;
16421 }
16422 set
16423 {
16424 this.srcPatchFieldSet = true;
16425 this.srcPatchField = value;
16426 }
16427 }
16428
16429 public virtual ISchemaElement ParentElement
16430 {
16431 get
16432 {
16433 return this.parentElement;
16434 }
16435 set
16436 {
16437 this.parentElement = value;
16438 }
16439 }
16440
16441 public virtual void AddChild(ISchemaElement child)
16442 {
16443 if ((null == child))
16444 {
16445 throw new ArgumentNullException("child");
16446 }
16447 this.children.AddElement(child);
16448 child.ParentElement = this;
16449 }
16450
16451 public virtual void RemoveChild(ISchemaElement child)
16452 {
16453 if ((null == child))
16454 {
16455 throw new ArgumentNullException("child");
16456 }
16457 this.children.RemoveElement(child);
16458 child.ParentElement = null;
16459 }
16460
16461 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16462 ISchemaElement ICreateChildren.CreateChild(string childName)
16463 {
16464 if (String.IsNullOrEmpty(childName))
16465 {
16466 throw new ArgumentNullException("childName");
16467 }
16468 ISchemaElement childValue = null;
16469 if (("TargetImage" == childName))
16470 {
16471 childValue = new TargetImage();
16472 }
16473 if (("SymbolPath" == childName))
16474 {
16475 childValue = new SymbolPath();
16476 }
16477 if (("UpgradeFile" == childName))
16478 {
16479 childValue = new UpgradeFile();
16480 }
16481 if ((null == childValue))
16482 {
16483 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
16484 }
16485 return childValue;
16486 }
16487
16488 /// <summary>
16489 /// Processes this element and all child elements into an XmlWriter.
16490 /// </summary>
16491 public virtual void OutputXml(XmlWriter writer)
16492 {
16493 if ((null == writer))
16494 {
16495 throw new ArgumentNullException("writer");
16496 }
16497 writer.WriteStartElement("UpgradeImage", "http://wixtoolset.org/schemas/v4/wxs");
16498 if (this.idFieldSet)
16499 {
16500 writer.WriteAttributeString("Id", this.idField);
16501 }
16502 if (this.sourceFileFieldSet)
16503 {
16504 writer.WriteAttributeString("SourceFile", this.sourceFileField);
16505 }
16506 if (this.srcFieldSet)
16507 {
16508 writer.WriteAttributeString("src", this.srcField);
16509 }
16510 if (this.sourcePatchFieldSet)
16511 {
16512 writer.WriteAttributeString("SourcePatch", this.sourcePatchField);
16513 }
16514 if (this.srcPatchFieldSet)
16515 {
16516 writer.WriteAttributeString("srcPatch", this.srcPatchField);
16517 }
16518 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
16519 {
16520 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
16521 childElement.OutputXml(writer);
16522 }
16523 writer.WriteEndElement();
16524 }
16525
16526 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16527 void ISetAttributes.SetAttribute(string name, string value)
16528 {
16529 if (String.IsNullOrEmpty(name))
16530 {
16531 throw new ArgumentNullException("name");
16532 }
16533 if (("Id" == name))
16534 {
16535 this.idField = value;
16536 this.idFieldSet = true;
16537 }
16538 if (("SourceFile" == name))
16539 {
16540 this.sourceFileField = value;
16541 this.sourceFileFieldSet = true;
16542 }
16543 if (("src" == name))
16544 {
16545 this.srcField = value;
16546 this.srcFieldSet = true;
16547 }
16548 if (("SourcePatch" == name))
16549 {
16550 this.sourcePatchField = value;
16551 this.sourcePatchFieldSet = true;
16552 }
16553 if (("srcPatch" == name))
16554 {
16555 this.srcPatchField = value;
16556 this.srcPatchFieldSet = true;
16557 }
16558 }
16559 }
16560
16561 /// <summary>
16562 /// Contains information about the target images of the product.
16563 /// </summary>
16564 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
16565 public class TargetImage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
16566 {
16567
16568 private ElementCollection children;
16569
16570 private string idField;
16571
16572 private bool idFieldSet;
16573
16574 private string sourceFileField;
16575
16576 private bool sourceFileFieldSet;
16577
16578 private string srcField;
16579
16580 private bool srcFieldSet;
16581
16582 private int orderField;
16583
16584 private bool orderFieldSet;
16585
16586 private string validationField;
16587
16588 private bool validationFieldSet;
16589
16590 private YesNoType ignoreMissingFilesField;
16591
16592 private bool ignoreMissingFilesFieldSet;
16593
16594 private ISchemaElement parentElement;
16595
16596 public TargetImage()
16597 {
16598 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
16599 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
16600 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TargetFile)));
16601 this.children = childCollection0;
16602 }
16603
16604 public virtual IEnumerable Children
16605 {
16606 get
16607 {
16608 return this.children;
16609 }
16610 }
16611
16612 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
16613 public virtual IEnumerable this[System.Type childType]
16614 {
16615 get
16616 {
16617 return this.children.Filter(childType);
16618 }
16619 }
16620
16621 /// <summary>
16622 /// Identifier for the target image.
16623 /// </summary>
16624 public string Id
16625 {
16626 get
16627 {
16628 return this.idField;
16629 }
16630 set
16631 {
16632 this.idFieldSet = true;
16633 this.idField = value;
16634 }
16635 }
16636
16637 /// <summary>
16638 /// Full path to the location of the msi file for the target image.
16639 /// </summary>
16640 public string SourceFile
16641 {
16642 get
16643 {
16644 return this.sourceFileField;
16645 }
16646 set
16647 {
16648 this.sourceFileFieldSet = true;
16649 this.sourceFileField = value;
16650 }
16651 }
16652
16653 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
16654 public string src
16655 {
16656 get
16657 {
16658 return this.srcField;
16659 }
16660 set
16661 {
16662 this.srcFieldSet = true;
16663 this.srcField = value;
16664 }
16665 }
16666
16667 /// <summary>
16668 /// Relative order of the target image.
16669 /// </summary>
16670 public int Order
16671 {
16672 get
16673 {
16674 return this.orderField;
16675 }
16676 set
16677 {
16678 this.orderFieldSet = true;
16679 this.orderField = value;
16680 }
16681 }
16682
16683 /// <summary>
16684 /// Product checking to avoid applying irrelevant transforms.
16685 /// </summary>
16686 public string Validation
16687 {
16688 get
16689 {
16690 return this.validationField;
16691 }
16692 set
16693 {
16694 this.validationFieldSet = true;
16695 this.validationField = value;
16696 }
16697 }
16698
16699 /// <summary>
16700 /// Files missing from the target image are ignored by the installer.
16701 /// </summary>
16702 public YesNoType IgnoreMissingFiles
16703 {
16704 get
16705 {
16706 return this.ignoreMissingFilesField;
16707 }
16708 set
16709 {
16710 this.ignoreMissingFilesFieldSet = true;
16711 this.ignoreMissingFilesField = value;
16712 }
16713 }
16714
16715 public virtual ISchemaElement ParentElement
16716 {
16717 get
16718 {
16719 return this.parentElement;
16720 }
16721 set
16722 {
16723 this.parentElement = value;
16724 }
16725 }
16726
16727 public virtual void AddChild(ISchemaElement child)
16728 {
16729 if ((null == child))
16730 {
16731 throw new ArgumentNullException("child");
16732 }
16733 this.children.AddElement(child);
16734 child.ParentElement = this;
16735 }
16736
16737 public virtual void RemoveChild(ISchemaElement child)
16738 {
16739 if ((null == child))
16740 {
16741 throw new ArgumentNullException("child");
16742 }
16743 this.children.RemoveElement(child);
16744 child.ParentElement = null;
16745 }
16746
16747 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16748 ISchemaElement ICreateChildren.CreateChild(string childName)
16749 {
16750 if (String.IsNullOrEmpty(childName))
16751 {
16752 throw new ArgumentNullException("childName");
16753 }
16754 ISchemaElement childValue = null;
16755 if (("SymbolPath" == childName))
16756 {
16757 childValue = new SymbolPath();
16758 }
16759 if (("TargetFile" == childName))
16760 {
16761 childValue = new TargetFile();
16762 }
16763 if ((null == childValue))
16764 {
16765 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
16766 }
16767 return childValue;
16768 }
16769
16770 /// <summary>
16771 /// Processes this element and all child elements into an XmlWriter.
16772 /// </summary>
16773 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
16774 public virtual void OutputXml(XmlWriter writer)
16775 {
16776 if ((null == writer))
16777 {
16778 throw new ArgumentNullException("writer");
16779 }
16780 writer.WriteStartElement("TargetImage", "http://wixtoolset.org/schemas/v4/wxs");
16781 if (this.idFieldSet)
16782 {
16783 writer.WriteAttributeString("Id", this.idField);
16784 }
16785 if (this.sourceFileFieldSet)
16786 {
16787 writer.WriteAttributeString("SourceFile", this.sourceFileField);
16788 }
16789 if (this.srcFieldSet)
16790 {
16791 writer.WriteAttributeString("src", this.srcField);
16792 }
16793 if (this.orderFieldSet)
16794 {
16795 writer.WriteAttributeString("Order", this.orderField.ToString(CultureInfo.InvariantCulture));
16796 }
16797 if (this.validationFieldSet)
16798 {
16799 writer.WriteAttributeString("Validation", this.validationField);
16800 }
16801 if (this.ignoreMissingFilesFieldSet)
16802 {
16803 if ((this.ignoreMissingFilesField == YesNoType.no))
16804 {
16805 writer.WriteAttributeString("IgnoreMissingFiles", "no");
16806 }
16807 if ((this.ignoreMissingFilesField == YesNoType.yes))
16808 {
16809 writer.WriteAttributeString("IgnoreMissingFiles", "yes");
16810 }
16811 }
16812 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
16813 {
16814 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
16815 childElement.OutputXml(writer);
16816 }
16817 writer.WriteEndElement();
16818 }
16819
16820 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16821 void ISetAttributes.SetAttribute(string name, string value)
16822 {
16823 if (String.IsNullOrEmpty(name))
16824 {
16825 throw new ArgumentNullException("name");
16826 }
16827 if (("Id" == name))
16828 {
16829 this.idField = value;
16830 this.idFieldSet = true;
16831 }
16832 if (("SourceFile" == name))
16833 {
16834 this.sourceFileField = value;
16835 this.sourceFileFieldSet = true;
16836 }
16837 if (("src" == name))
16838 {
16839 this.srcField = value;
16840 this.srcFieldSet = true;
16841 }
16842 if (("Order" == name))
16843 {
16844 this.orderField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
16845 this.orderFieldSet = true;
16846 }
16847 if (("Validation" == name))
16848 {
16849 this.validationField = value;
16850 this.validationFieldSet = true;
16851 }
16852 if (("IgnoreMissingFiles" == name))
16853 {
16854 this.ignoreMissingFilesField = Enums.ParseYesNoType(value);
16855 this.ignoreMissingFilesFieldSet = true;
16856 }
16857 }
16858 }
16859
16860 /// <summary>
16861 /// Information about specific files in a target image.
16862 /// </summary>
16863 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
16864 public class TargetFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
16865 {
16866
16867 private ElementCollection children;
16868
16869 private string idField;
16870
16871 private bool idFieldSet;
16872
16873 private ISchemaElement parentElement;
16874
16875 public TargetFile()
16876 {
16877 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
16878 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SymbolPath)));
16879 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
16880 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreRange)));
16881 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectRange)));
16882 childCollection0.AddCollection(childCollection1);
16883 this.children = childCollection0;
16884 }
16885
16886 public virtual IEnumerable Children
16887 {
16888 get
16889 {
16890 return this.children;
16891 }
16892 }
16893
16894 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
16895 public virtual IEnumerable this[System.Type childType]
16896 {
16897 get
16898 {
16899 return this.children.Filter(childType);
16900 }
16901 }
16902
16903 /// <summary>
16904 /// Foreign key into the File table.
16905 /// </summary>
16906 public string Id
16907 {
16908 get
16909 {
16910 return this.idField;
16911 }
16912 set
16913 {
16914 this.idFieldSet = true;
16915 this.idField = value;
16916 }
16917 }
16918
16919 public virtual ISchemaElement ParentElement
16920 {
16921 get
16922 {
16923 return this.parentElement;
16924 }
16925 set
16926 {
16927 this.parentElement = value;
16928 }
16929 }
16930
16931 public virtual void AddChild(ISchemaElement child)
16932 {
16933 if ((null == child))
16934 {
16935 throw new ArgumentNullException("child");
16936 }
16937 this.children.AddElement(child);
16938 child.ParentElement = this;
16939 }
16940
16941 public virtual void RemoveChild(ISchemaElement child)
16942 {
16943 if ((null == child))
16944 {
16945 throw new ArgumentNullException("child");
16946 }
16947 this.children.RemoveElement(child);
16948 child.ParentElement = null;
16949 }
16950
16951 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
16952 ISchemaElement ICreateChildren.CreateChild(string childName)
16953 {
16954 if (String.IsNullOrEmpty(childName))
16955 {
16956 throw new ArgumentNullException("childName");
16957 }
16958 ISchemaElement childValue = null;
16959 if (("SymbolPath" == childName))
16960 {
16961 childValue = new SymbolPath();
16962 }
16963 if (("IgnoreRange" == childName))
16964 {
16965 childValue = new IgnoreRange();
16966 }
16967 if (("ProtectRange" == childName))
16968 {
16969 childValue = new ProtectRange();
16970 }
16971 if ((null == childValue))
16972 {
16973 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
16974 }
16975 return childValue;
16976 }
16977
16978 /// <summary>
16979 /// Processes this element and all child elements into an XmlWriter.
16980 /// </summary>
16981 public virtual void OutputXml(XmlWriter writer)
16982 {
16983 if ((null == writer))
16984 {
16985 throw new ArgumentNullException("writer");
16986 }
16987 writer.WriteStartElement("TargetFile", "http://wixtoolset.org/schemas/v4/wxs");
16988 if (this.idFieldSet)
16989 {
16990 writer.WriteAttributeString("Id", this.idField);
16991 }
16992 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
16993 {
16994 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
16995 childElement.OutputXml(writer);
16996 }
16997 writer.WriteEndElement();
16998 }
16999
17000 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17001 void ISetAttributes.SetAttribute(string name, string value)
17002 {
17003 if (String.IsNullOrEmpty(name))
17004 {
17005 throw new ArgumentNullException("name");
17006 }
17007 if (("Id" == name))
17008 {
17009 this.idField = value;
17010 this.idFieldSet = true;
17011 }
17012 }
17013 }
17014
17015 /// <summary>
17016 /// Specifies part of a file that is to be ignored during patching.
17017 /// </summary>
17018 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17019 public class IgnoreRange : ISchemaElement, ISetAttributes
17020 {
17021
17022 private int offsetField;
17023
17024 private bool offsetFieldSet;
17025
17026 private int lengthField;
17027
17028 private bool lengthFieldSet;
17029
17030 private ISchemaElement parentElement;
17031
17032 /// <summary>
17033 /// Offset of the start of the range.
17034 /// </summary>
17035 public int Offset
17036 {
17037 get
17038 {
17039 return this.offsetField;
17040 }
17041 set
17042 {
17043 this.offsetFieldSet = true;
17044 this.offsetField = value;
17045 }
17046 }
17047
17048 /// <summary>
17049 /// Length of the range.
17050 /// </summary>
17051 public int Length
17052 {
17053 get
17054 {
17055 return this.lengthField;
17056 }
17057 set
17058 {
17059 this.lengthFieldSet = true;
17060 this.lengthField = value;
17061 }
17062 }
17063
17064 public virtual ISchemaElement ParentElement
17065 {
17066 get
17067 {
17068 return this.parentElement;
17069 }
17070 set
17071 {
17072 this.parentElement = value;
17073 }
17074 }
17075
17076 /// <summary>
17077 /// Processes this element and all child elements into an XmlWriter.
17078 /// </summary>
17079 public virtual void OutputXml(XmlWriter writer)
17080 {
17081 if ((null == writer))
17082 {
17083 throw new ArgumentNullException("writer");
17084 }
17085 writer.WriteStartElement("IgnoreRange", "http://wixtoolset.org/schemas/v4/wxs");
17086 if (this.offsetFieldSet)
17087 {
17088 writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture));
17089 }
17090 if (this.lengthFieldSet)
17091 {
17092 writer.WriteAttributeString("Length", this.lengthField.ToString(CultureInfo.InvariantCulture));
17093 }
17094 writer.WriteEndElement();
17095 }
17096
17097 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17098 void ISetAttributes.SetAttribute(string name, string value)
17099 {
17100 if (String.IsNullOrEmpty(name))
17101 {
17102 throw new ArgumentNullException("name");
17103 }
17104 if (("Offset" == name))
17105 {
17106 this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
17107 this.offsetFieldSet = true;
17108 }
17109 if (("Length" == name))
17110 {
17111 this.lengthField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
17112 this.lengthFieldSet = true;
17113 }
17114 }
17115 }
17116
17117 /// <summary>
17118 /// Specifies part of a file that cannot be overwritten during patching.
17119 /// </summary>
17120 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17121 public class ProtectRange : ISchemaElement, ISetAttributes
17122 {
17123
17124 private int offsetField;
17125
17126 private bool offsetFieldSet;
17127
17128 private int lengthField;
17129
17130 private bool lengthFieldSet;
17131
17132 private ISchemaElement parentElement;
17133
17134 /// <summary>
17135 /// Offset of the start of the range.
17136 /// </summary>
17137 public int Offset
17138 {
17139 get
17140 {
17141 return this.offsetField;
17142 }
17143 set
17144 {
17145 this.offsetFieldSet = true;
17146 this.offsetField = value;
17147 }
17148 }
17149
17150 /// <summary>
17151 /// Length of the range.
17152 /// </summary>
17153 public int Length
17154 {
17155 get
17156 {
17157 return this.lengthField;
17158 }
17159 set
17160 {
17161 this.lengthFieldSet = true;
17162 this.lengthField = value;
17163 }
17164 }
17165
17166 public virtual ISchemaElement ParentElement
17167 {
17168 get
17169 {
17170 return this.parentElement;
17171 }
17172 set
17173 {
17174 this.parentElement = value;
17175 }
17176 }
17177
17178 /// <summary>
17179 /// Processes this element and all child elements into an XmlWriter.
17180 /// </summary>
17181 public virtual void OutputXml(XmlWriter writer)
17182 {
17183 if ((null == writer))
17184 {
17185 throw new ArgumentNullException("writer");
17186 }
17187 writer.WriteStartElement("ProtectRange", "http://wixtoolset.org/schemas/v4/wxs");
17188 if (this.offsetFieldSet)
17189 {
17190 writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture));
17191 }
17192 if (this.lengthFieldSet)
17193 {
17194 writer.WriteAttributeString("Length", this.lengthField.ToString(CultureInfo.InvariantCulture));
17195 }
17196 writer.WriteEndElement();
17197 }
17198
17199 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17200 void ISetAttributes.SetAttribute(string name, string value)
17201 {
17202 if (String.IsNullOrEmpty(name))
17203 {
17204 throw new ArgumentNullException("name");
17205 }
17206 if (("Offset" == name))
17207 {
17208 this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
17209 this.offsetFieldSet = true;
17210 }
17211 if (("Length" == name))
17212 {
17213 this.lengthField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
17214 this.lengthFieldSet = true;
17215 }
17216 }
17217 }
17218
17219 /// <summary>
17220 /// Specifies a file to be protected.
17221 /// </summary>
17222 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17223 public class ProtectFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
17224 {
17225
17226 private ElementCollection children;
17227
17228 private string fileField;
17229
17230 private bool fileFieldSet;
17231
17232 private ISchemaElement parentElement;
17233
17234 public ProtectFile()
17235 {
17236 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
17237 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectRange)));
17238 this.children = childCollection0;
17239 }
17240
17241 public virtual IEnumerable Children
17242 {
17243 get
17244 {
17245 return this.children;
17246 }
17247 }
17248
17249 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
17250 public virtual IEnumerable this[System.Type childType]
17251 {
17252 get
17253 {
17254 return this.children.Filter(childType);
17255 }
17256 }
17257
17258 /// <summary>
17259 /// Foreign key into the File table.
17260 /// </summary>
17261 public string File
17262 {
17263 get
17264 {
17265 return this.fileField;
17266 }
17267 set
17268 {
17269 this.fileFieldSet = true;
17270 this.fileField = value;
17271 }
17272 }
17273
17274 public virtual ISchemaElement ParentElement
17275 {
17276 get
17277 {
17278 return this.parentElement;
17279 }
17280 set
17281 {
17282 this.parentElement = value;
17283 }
17284 }
17285
17286 public virtual void AddChild(ISchemaElement child)
17287 {
17288 if ((null == child))
17289 {
17290 throw new ArgumentNullException("child");
17291 }
17292 this.children.AddElement(child);
17293 child.ParentElement = this;
17294 }
17295
17296 public virtual void RemoveChild(ISchemaElement child)
17297 {
17298 if ((null == child))
17299 {
17300 throw new ArgumentNullException("child");
17301 }
17302 this.children.RemoveElement(child);
17303 child.ParentElement = null;
17304 }
17305
17306 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17307 ISchemaElement ICreateChildren.CreateChild(string childName)
17308 {
17309 if (String.IsNullOrEmpty(childName))
17310 {
17311 throw new ArgumentNullException("childName");
17312 }
17313 ISchemaElement childValue = null;
17314 if (("ProtectRange" == childName))
17315 {
17316 childValue = new ProtectRange();
17317 }
17318 if ((null == childValue))
17319 {
17320 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
17321 }
17322 return childValue;
17323 }
17324
17325 /// <summary>
17326 /// Processes this element and all child elements into an XmlWriter.
17327 /// </summary>
17328 public virtual void OutputXml(XmlWriter writer)
17329 {
17330 if ((null == writer))
17331 {
17332 throw new ArgumentNullException("writer");
17333 }
17334 writer.WriteStartElement("ProtectFile", "http://wixtoolset.org/schemas/v4/wxs");
17335 if (this.fileFieldSet)
17336 {
17337 writer.WriteAttributeString("File", this.fileField);
17338 }
17339 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
17340 {
17341 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
17342 childElement.OutputXml(writer);
17343 }
17344 writer.WriteEndElement();
17345 }
17346
17347 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17348 void ISetAttributes.SetAttribute(string name, string value)
17349 {
17350 if (String.IsNullOrEmpty(name))
17351 {
17352 throw new ArgumentNullException("name");
17353 }
17354 if (("File" == name))
17355 {
17356 this.fileField = value;
17357 this.fileFieldSet = true;
17358 }
17359 }
17360 }
17361
17362 /// <summary>
17363 /// Contains information about specific files that are not part of a regular target image.
17364 /// </summary>
17365 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17366 public class ExternalFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
17367 {
17368
17369 private ElementCollection children;
17370
17371 private string fileField;
17372
17373 private bool fileFieldSet;
17374
17375 private string sourceField;
17376
17377 private bool sourceFieldSet;
17378
17379 private string srcField;
17380
17381 private bool srcFieldSet;
17382
17383 private int orderField;
17384
17385 private bool orderFieldSet;
17386
17387 private ISchemaElement parentElement;
17388
17389 public ExternalFile()
17390 {
17391 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
17392 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ProtectRange)));
17393 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SymbolPath)));
17394 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
17395 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreRange)));
17396 childCollection0.AddCollection(childCollection1);
17397 this.children = childCollection0;
17398 }
17399
17400 public virtual IEnumerable Children
17401 {
17402 get
17403 {
17404 return this.children;
17405 }
17406 }
17407
17408 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
17409 public virtual IEnumerable this[System.Type childType]
17410 {
17411 get
17412 {
17413 return this.children.Filter(childType);
17414 }
17415 }
17416
17417 /// <summary>
17418 /// Foreign key into the File table.
17419 /// </summary>
17420 public string File
17421 {
17422 get
17423 {
17424 return this.fileField;
17425 }
17426 set
17427 {
17428 this.fileFieldSet = true;
17429 this.fileField = value;
17430 }
17431 }
17432
17433 /// <summary>
17434 /// Full path of the external file.
17435 /// </summary>
17436 public string Source
17437 {
17438 get
17439 {
17440 return this.sourceField;
17441 }
17442 set
17443 {
17444 this.sourceFieldSet = true;
17445 this.sourceField = value;
17446 }
17447 }
17448
17449 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
17450 public string src
17451 {
17452 get
17453 {
17454 return this.srcField;
17455 }
17456 set
17457 {
17458 this.srcFieldSet = true;
17459 this.srcField = value;
17460 }
17461 }
17462
17463 /// <summary>
17464 /// Specifies the order of the external files to use when creating the patch.
17465 /// </summary>
17466 public int Order
17467 {
17468 get
17469 {
17470 return this.orderField;
17471 }
17472 set
17473 {
17474 this.orderFieldSet = true;
17475 this.orderField = value;
17476 }
17477 }
17478
17479 public virtual ISchemaElement ParentElement
17480 {
17481 get
17482 {
17483 return this.parentElement;
17484 }
17485 set
17486 {
17487 this.parentElement = value;
17488 }
17489 }
17490
17491 public virtual void AddChild(ISchemaElement child)
17492 {
17493 if ((null == child))
17494 {
17495 throw new ArgumentNullException("child");
17496 }
17497 this.children.AddElement(child);
17498 child.ParentElement = this;
17499 }
17500
17501 public virtual void RemoveChild(ISchemaElement child)
17502 {
17503 if ((null == child))
17504 {
17505 throw new ArgumentNullException("child");
17506 }
17507 this.children.RemoveElement(child);
17508 child.ParentElement = null;
17509 }
17510
17511 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17512 ISchemaElement ICreateChildren.CreateChild(string childName)
17513 {
17514 if (String.IsNullOrEmpty(childName))
17515 {
17516 throw new ArgumentNullException("childName");
17517 }
17518 ISchemaElement childValue = null;
17519 if (("ProtectRange" == childName))
17520 {
17521 childValue = new ProtectRange();
17522 }
17523 if (("SymbolPath" == childName))
17524 {
17525 childValue = new SymbolPath();
17526 }
17527 if (("IgnoreRange" == childName))
17528 {
17529 childValue = new IgnoreRange();
17530 }
17531 if ((null == childValue))
17532 {
17533 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
17534 }
17535 return childValue;
17536 }
17537
17538 /// <summary>
17539 /// Processes this element and all child elements into an XmlWriter.
17540 /// </summary>
17541 public virtual void OutputXml(XmlWriter writer)
17542 {
17543 if ((null == writer))
17544 {
17545 throw new ArgumentNullException("writer");
17546 }
17547 writer.WriteStartElement("ExternalFile", "http://wixtoolset.org/schemas/v4/wxs");
17548 if (this.fileFieldSet)
17549 {
17550 writer.WriteAttributeString("File", this.fileField);
17551 }
17552 if (this.sourceFieldSet)
17553 {
17554 writer.WriteAttributeString("Source", this.sourceField);
17555 }
17556 if (this.srcFieldSet)
17557 {
17558 writer.WriteAttributeString("src", this.srcField);
17559 }
17560 if (this.orderFieldSet)
17561 {
17562 writer.WriteAttributeString("Order", this.orderField.ToString(CultureInfo.InvariantCulture));
17563 }
17564 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
17565 {
17566 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
17567 childElement.OutputXml(writer);
17568 }
17569 writer.WriteEndElement();
17570 }
17571
17572 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17573 void ISetAttributes.SetAttribute(string name, string value)
17574 {
17575 if (String.IsNullOrEmpty(name))
17576 {
17577 throw new ArgumentNullException("name");
17578 }
17579 if (("File" == name))
17580 {
17581 this.fileField = value;
17582 this.fileFieldSet = true;
17583 }
17584 if (("Source" == name))
17585 {
17586 this.sourceField = value;
17587 this.sourceFieldSet = true;
17588 }
17589 if (("src" == name))
17590 {
17591 this.srcField = value;
17592 this.srcFieldSet = true;
17593 }
17594 if (("Order" == name))
17595 {
17596 this.orderField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
17597 this.orderFieldSet = true;
17598 }
17599 }
17600 }
17601
17602 /// <summary>
17603 /// Specifies files to either ignore or to specify optional data about a file.
17604 /// </summary>
17605 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17606 public class UpgradeFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
17607 {
17608
17609 private ElementCollection children;
17610
17611 private string fileField;
17612
17613 private bool fileFieldSet;
17614
17615 private YesNoType ignoreField;
17616
17617 private bool ignoreFieldSet;
17618
17619 private YesNoType allowIgnoreOnErrorField;
17620
17621 private bool allowIgnoreOnErrorFieldSet;
17622
17623 private YesNoType wholeFileField;
17624
17625 private bool wholeFileFieldSet;
17626
17627 private ISchemaElement parentElement;
17628
17629 public UpgradeFile()
17630 {
17631 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
17632 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
17633 this.children = childCollection0;
17634 }
17635
17636 public virtual IEnumerable Children
17637 {
17638 get
17639 {
17640 return this.children;
17641 }
17642 }
17643
17644 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
17645 public virtual IEnumerable this[System.Type childType]
17646 {
17647 get
17648 {
17649 return this.children.Filter(childType);
17650 }
17651 }
17652
17653 /// <summary>
17654 /// Foreign key into the File table.
17655 /// </summary>
17656 public string File
17657 {
17658 get
17659 {
17660 return this.fileField;
17661 }
17662 set
17663 {
17664 this.fileFieldSet = true;
17665 this.fileField = value;
17666 }
17667 }
17668
17669 /// <summary>
17670 /// If yes, the file is ignored during patching, and the next two attributes are ignored.
17671 /// </summary>
17672 public YesNoType Ignore
17673 {
17674 get
17675 {
17676 return this.ignoreField;
17677 }
17678 set
17679 {
17680 this.ignoreFieldSet = true;
17681 this.ignoreField = value;
17682 }
17683 }
17684
17685 /// <summary>
17686 /// Specifies whether patching this file is vital.
17687 /// </summary>
17688 public YesNoType AllowIgnoreOnError
17689 {
17690 get
17691 {
17692 return this.allowIgnoreOnErrorField;
17693 }
17694 set
17695 {
17696 this.allowIgnoreOnErrorFieldSet = true;
17697 this.allowIgnoreOnErrorField = value;
17698 }
17699 }
17700
17701 /// <summary>
17702 /// Whether the whole file should be installed, rather than creating a binary patch.
17703 /// </summary>
17704 public YesNoType WholeFile
17705 {
17706 get
17707 {
17708 return this.wholeFileField;
17709 }
17710 set
17711 {
17712 this.wholeFileFieldSet = true;
17713 this.wholeFileField = value;
17714 }
17715 }
17716
17717 public virtual ISchemaElement ParentElement
17718 {
17719 get
17720 {
17721 return this.parentElement;
17722 }
17723 set
17724 {
17725 this.parentElement = value;
17726 }
17727 }
17728
17729 public virtual void AddChild(ISchemaElement child)
17730 {
17731 if ((null == child))
17732 {
17733 throw new ArgumentNullException("child");
17734 }
17735 this.children.AddElement(child);
17736 child.ParentElement = this;
17737 }
17738
17739 public virtual void RemoveChild(ISchemaElement child)
17740 {
17741 if ((null == child))
17742 {
17743 throw new ArgumentNullException("child");
17744 }
17745 this.children.RemoveElement(child);
17746 child.ParentElement = null;
17747 }
17748
17749 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17750 ISchemaElement ICreateChildren.CreateChild(string childName)
17751 {
17752 if (String.IsNullOrEmpty(childName))
17753 {
17754 throw new ArgumentNullException("childName");
17755 }
17756 ISchemaElement childValue = null;
17757 if (("SymbolPath" == childName))
17758 {
17759 childValue = new SymbolPath();
17760 }
17761 if ((null == childValue))
17762 {
17763 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
17764 }
17765 return childValue;
17766 }
17767
17768 /// <summary>
17769 /// Processes this element and all child elements into an XmlWriter.
17770 /// </summary>
17771 public virtual void OutputXml(XmlWriter writer)
17772 {
17773 if ((null == writer))
17774 {
17775 throw new ArgumentNullException("writer");
17776 }
17777 writer.WriteStartElement("UpgradeFile", "http://wixtoolset.org/schemas/v4/wxs");
17778 if (this.fileFieldSet)
17779 {
17780 writer.WriteAttributeString("File", this.fileField);
17781 }
17782 if (this.ignoreFieldSet)
17783 {
17784 if ((this.ignoreField == YesNoType.no))
17785 {
17786 writer.WriteAttributeString("Ignore", "no");
17787 }
17788 if ((this.ignoreField == YesNoType.yes))
17789 {
17790 writer.WriteAttributeString("Ignore", "yes");
17791 }
17792 }
17793 if (this.allowIgnoreOnErrorFieldSet)
17794 {
17795 if ((this.allowIgnoreOnErrorField == YesNoType.no))
17796 {
17797 writer.WriteAttributeString("AllowIgnoreOnError", "no");
17798 }
17799 if ((this.allowIgnoreOnErrorField == YesNoType.yes))
17800 {
17801 writer.WriteAttributeString("AllowIgnoreOnError", "yes");
17802 }
17803 }
17804 if (this.wholeFileFieldSet)
17805 {
17806 if ((this.wholeFileField == YesNoType.no))
17807 {
17808 writer.WriteAttributeString("WholeFile", "no");
17809 }
17810 if ((this.wholeFileField == YesNoType.yes))
17811 {
17812 writer.WriteAttributeString("WholeFile", "yes");
17813 }
17814 }
17815 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
17816 {
17817 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
17818 childElement.OutputXml(writer);
17819 }
17820 writer.WriteEndElement();
17821 }
17822
17823 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17824 void ISetAttributes.SetAttribute(string name, string value)
17825 {
17826 if (String.IsNullOrEmpty(name))
17827 {
17828 throw new ArgumentNullException("name");
17829 }
17830 if (("File" == name))
17831 {
17832 this.fileField = value;
17833 this.fileFieldSet = true;
17834 }
17835 if (("Ignore" == name))
17836 {
17837 this.ignoreField = Enums.ParseYesNoType(value);
17838 this.ignoreFieldSet = true;
17839 }
17840 if (("AllowIgnoreOnError" == name))
17841 {
17842 this.allowIgnoreOnErrorField = Enums.ParseYesNoType(value);
17843 this.allowIgnoreOnErrorFieldSet = true;
17844 }
17845 if (("WholeFile" == name))
17846 {
17847 this.wholeFileField = Enums.ParseYesNoType(value);
17848 this.wholeFileFieldSet = true;
17849 }
17850 }
17851 }
17852
17853 /// <summary>
17854 /// A path to symbols.
17855 /// </summary>
17856 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17857 public class SymbolPath : ISchemaElement, ISetAttributes
17858 {
17859
17860 private string pathField;
17861
17862 private bool pathFieldSet;
17863
17864 private ISchemaElement parentElement;
17865
17866 /// <summary>
17867 /// The path.
17868 /// </summary>
17869 public string Path
17870 {
17871 get
17872 {
17873 return this.pathField;
17874 }
17875 set
17876 {
17877 this.pathFieldSet = true;
17878 this.pathField = value;
17879 }
17880 }
17881
17882 public virtual ISchemaElement ParentElement
17883 {
17884 get
17885 {
17886 return this.parentElement;
17887 }
17888 set
17889 {
17890 this.parentElement = value;
17891 }
17892 }
17893
17894 /// <summary>
17895 /// Processes this element and all child elements into an XmlWriter.
17896 /// </summary>
17897 public virtual void OutputXml(XmlWriter writer)
17898 {
17899 if ((null == writer))
17900 {
17901 throw new ArgumentNullException("writer");
17902 }
17903 writer.WriteStartElement("SymbolPath", "http://wixtoolset.org/schemas/v4/wxs");
17904 if (this.pathFieldSet)
17905 {
17906 writer.WriteAttributeString("Path", this.pathField);
17907 }
17908 writer.WriteEndElement();
17909 }
17910
17911 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
17912 void ISetAttributes.SetAttribute(string name, string value)
17913 {
17914 if (String.IsNullOrEmpty(name))
17915 {
17916 throw new ArgumentNullException("name");
17917 }
17918 if (("Path" == name))
17919 {
17920 this.pathField = value;
17921 this.pathFieldSet = true;
17922 }
17923 }
17924 }
17925
17926 /// <summary>
17927 /// Properties about the package to be placed in the Summary Information Stream. These are
17928 /// visible from COM through the IStream interface, and these properties can be seen on the package in Explorer.
17929 /// </summary>
17930 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
17931 public class SummaryInformation : ISchemaElement, ISetAttributes
17932 {
17933
17934 private string idField;
17935
17936 private bool idFieldSet;
17937
17938 private YesNoType adminImageField;
17939
17940 private bool adminImageFieldSet;
17941
17942 private string commentsField;
17943
17944 private bool commentsFieldSet;
17945
17946 private YesNoType compressedField;
17947
17948 private bool compressedFieldSet;
17949
17950 private string descriptionField;
17951
17952 private bool descriptionFieldSet;
17953
17954 private InstallPrivilegesType installPrivilegesField;
17955
17956 private bool installPrivilegesFieldSet;
17957
17958 private InstallScopeType installScopeField;
17959
17960 private bool installScopeFieldSet;
17961
17962 private int installerVersionField;
17963
17964 private bool installerVersionFieldSet;
17965
17966 private string keywordsField;
17967
17968 private bool keywordsFieldSet;
17969
17970 private string languagesField;
17971
17972 private bool languagesFieldSet;
17973
17974 private string manufacturerField;
17975
17976 private bool manufacturerFieldSet;
17977
17978 private string platformsField;
17979
17980 private bool platformsFieldSet;
17981
17982 private PlatformType platformField;
17983
17984 private bool platformFieldSet;
17985
17986 private YesNoDefaultType readOnlyField;
17987
17988 private bool readOnlyFieldSet;
17989
17990 private YesNoType shortNamesField;
17991
17992 private bool shortNamesFieldSet;
17993
17994 private string summaryCodepageField;
17995
17996 private bool summaryCodepageFieldSet;
17997
17998 private ISchemaElement parentElement;
17999
18000 /// <summary>
18001 /// The package code GUID for a product or merge module.
18002 /// When compiling a product, this attribute should not be set in order to allow the package
18003 /// code to be generated for each build.
18004 /// When compiling a merge module, this attribute must be set to the modularization guid.
18005 /// </summary>
18006 public string Id
18007 {
18008 get
18009 {
18010 return this.idField;
18011 }
18012 set
18013 {
18014 this.idFieldSet = true;
18015 this.idField = value;
18016 }
18017 }
18018
18019 /// <summary>
18020 /// Set to 'yes' if the source is an admin image.
18021 /// </summary>
18022 public YesNoType AdminImage
18023 {
18024 get
18025 {
18026 return this.adminImageField;
18027 }
18028 set
18029 {
18030 this.adminImageFieldSet = true;
18031 this.adminImageField = value;
18032 }
18033 }
18034
18035 /// <summary>
18036 /// Optional comments for browsing.
18037 /// </summary>
18038 public string Comments
18039 {
18040 get
18041 {
18042 return this.commentsField;
18043 }
18044 set
18045 {
18046 this.commentsFieldSet = true;
18047 this.commentsField = value;
18048 }
18049 }
18050
18051 /// <summary>
18052 /// Set to 'yes' to have compressed files in the source.
18053 /// This attribute cannot be set for merge modules.
18054 /// </summary>
18055 public YesNoType Compressed
18056 {
18057 get
18058 {
18059 return this.compressedField;
18060 }
18061 set
18062 {
18063 this.compressedFieldSet = true;
18064 this.compressedField = value;
18065 }
18066 }
18067
18068 /// <summary>
18069 /// The product full name or description.
18070 /// </summary>
18071 public string Description
18072 {
18073 get
18074 {
18075 return this.descriptionField;
18076 }
18077 set
18078 {
18079 this.descriptionFieldSet = true;
18080 this.descriptionField = value;
18081 }
18082 }
18083
18084 /// <summary>
18085 /// Use this attribute to specify the priviliges required to install the package on Windows Vista and above.
18086 /// </summary>
18087 public InstallPrivilegesType InstallPrivileges
18088 {
18089 get
18090 {
18091 return this.installPrivilegesField;
18092 }
18093 set
18094 {
18095 this.installPrivilegesFieldSet = true;
18096 this.installPrivilegesField = value;
18097 }
18098 }
18099
18100 /// <summary>
18101 /// Use this attribute to specify the installation scope of this package: per-machine or per-user.
18102 /// </summary>
18103 public InstallScopeType InstallScope
18104 {
18105 get
18106 {
18107 return this.installScopeField;
18108 }
18109 set
18110 {
18111 this.installScopeFieldSet = true;
18112 this.installScopeField = value;
18113 }
18114 }
18115
18116 /// <summary>
18117 /// The minimum version of the Windows Installer required to install this package. Take the major version of the required Windows Installer
18118 /// and multiply by a 100 then add the minor version of the Windows Installer. For example, "200" would represent Windows Installer 2.0 and
18119 /// "405" would represent Windows Installer 4.5. For 64-bit Windows Installer packages, this property is set to 200 by default as
18120 /// Windows Installer 2.0 was the first version to support 64-bit packages.
18121 /// </summary>
18122 public int InstallerVersion
18123 {
18124 get
18125 {
18126 return this.installerVersionField;
18127 }
18128 set
18129 {
18130 this.installerVersionFieldSet = true;
18131 this.installerVersionField = value;
18132 }
18133 }
18134
18135 /// <summary>
18136 /// Optional keywords for browsing.
18137 /// </summary>
18138 public string Keywords
18139 {
18140 get
18141 {
18142 return this.keywordsField;
18143 }
18144 set
18145 {
18146 this.keywordsFieldSet = true;
18147 this.keywordsField = value;
18148 }
18149 }
18150
18151 /// <summary>
18152 /// The list of language IDs (LCIDs) supported in the package.
18153 /// </summary>
18154 public string Languages
18155 {
18156 get
18157 {
18158 return this.languagesField;
18159 }
18160 set
18161 {
18162 this.languagesFieldSet = true;
18163 this.languagesField = value;
18164 }
18165 }
18166
18167 /// <summary>
18168 /// The vendor releasing the package.
18169 /// </summary>
18170 public string Manufacturer
18171 {
18172 get
18173 {
18174 return this.manufacturerField;
18175 }
18176 set
18177 {
18178 this.manufacturerFieldSet = true;
18179 this.manufacturerField = value;
18180 }
18181 }
18182
18183 /// <summary>
18184 /// The list of platforms supported by the package. This attribute has been deprecated.
18185 /// Specify the -arch switch at the candle.exe command line or the InstallerPlatform
18186 /// property in a .wixproj MSBuild project.
18187 /// </summary>
18188 public string Platforms
18189 {
18190 get
18191 {
18192 return this.platformsField;
18193 }
18194 set
18195 {
18196 this.platformsFieldSet = true;
18197 this.platformsField = value;
18198 }
18199 }
18200
18201 /// <summary>
18202 /// The platform supported by the package. Use of this attribute is discouraged; instead,
18203 /// specify the -arch switch at the candle.exe command line or the InstallerPlatform
18204 /// property in a .wixproj MSBuild project.
18205 /// </summary>
18206 public PlatformType Platform
18207 {
18208 get
18209 {
18210 return this.platformField;
18211 }
18212 set
18213 {
18214 this.platformFieldSet = true;
18215 this.platformField = value;
18216 }
18217 }
18218
18219 /// <summary>
18220 /// The value of this attribute conveys whether the package should be opened as read-only.
18221 /// A database editing tool should not modify a read-only enforced database and should
18222 /// issue a warning at attempts to modify a read-only recommended database.
18223 /// </summary>
18224 public YesNoDefaultType ReadOnly
18225 {
18226 get
18227 {
18228 return this.readOnlyField;
18229 }
18230 set
18231 {
18232 this.readOnlyFieldSet = true;
18233 this.readOnlyField = value;
18234 }
18235 }
18236
18237 /// <summary>
18238 /// Set to 'yes' to have short filenames in the source.
18239 /// </summary>
18240 public YesNoType ShortNames
18241 {
18242 get
18243 {
18244 return this.shortNamesField;
18245 }
18246 set
18247 {
18248 this.shortNamesFieldSet = true;
18249 this.shortNamesField = value;
18250 }
18251 }
18252
18253 /// <summary>
18254 /// The code page integer value or web name for summary info strings only. See remarks for more information.
18255 /// </summary>
18256 public string SummaryCodepage
18257 {
18258 get
18259 {
18260 return this.summaryCodepageField;
18261 }
18262 set
18263 {
18264 this.summaryCodepageFieldSet = true;
18265 this.summaryCodepageField = value;
18266 }
18267 }
18268
18269 public virtual ISchemaElement ParentElement
18270 {
18271 get
18272 {
18273 return this.parentElement;
18274 }
18275 set
18276 {
18277 this.parentElement = value;
18278 }
18279 }
18280
18281 /// <summary>
18282 /// Parses a InstallPrivilegesType from a string.
18283 /// </summary>
18284 public static InstallPrivilegesType ParseInstallPrivilegesType(string value)
18285 {
18286 InstallPrivilegesType parsedValue;
18287 SummaryInformation.TryParseInstallPrivilegesType(value, out parsedValue);
18288 return parsedValue;
18289 }
18290
18291 /// <summary>
18292 /// Tries to parse a InstallPrivilegesType from a string.
18293 /// </summary>
18294 public static bool TryParseInstallPrivilegesType(string value, out InstallPrivilegesType parsedValue)
18295 {
18296 parsedValue = InstallPrivilegesType.NotSet;
18297 if (string.IsNullOrEmpty(value))
18298 {
18299 return false;
18300 }
18301 if (("limited" == value))
18302 {
18303 parsedValue = InstallPrivilegesType.limited;
18304 }
18305 else
18306 {
18307 if (("elevated" == value))
18308 {
18309 parsedValue = InstallPrivilegesType.elevated;
18310 }
18311 else
18312 {
18313 parsedValue = InstallPrivilegesType.IllegalValue;
18314 return false;
18315 }
18316 }
18317 return true;
18318 }
18319
18320 /// <summary>
18321 /// Parses a InstallScopeType from a string.
18322 /// </summary>
18323 public static InstallScopeType ParseInstallScopeType(string value)
18324 {
18325 InstallScopeType parsedValue;
18326 SummaryInformation.TryParseInstallScopeType(value, out parsedValue);
18327 return parsedValue;
18328 }
18329
18330 /// <summary>
18331 /// Tries to parse a InstallScopeType from a string.
18332 /// </summary>
18333 public static bool TryParseInstallScopeType(string value, out InstallScopeType parsedValue)
18334 {
18335 parsedValue = InstallScopeType.NotSet;
18336 if (string.IsNullOrEmpty(value))
18337 {
18338 return false;
18339 }
18340 if (("perMachine" == value))
18341 {
18342 parsedValue = InstallScopeType.perMachine;
18343 }
18344 else
18345 {
18346 if (("perUser" == value))
18347 {
18348 parsedValue = InstallScopeType.perUser;
18349 }
18350 else
18351 {
18352 parsedValue = InstallScopeType.IllegalValue;
18353 return false;
18354 }
18355 }
18356 return true;
18357 }
18358
18359 /// <summary>
18360 /// Parses a PlatformType from a string.
18361 /// </summary>
18362 public static PlatformType ParsePlatformType(string value)
18363 {
18364 PlatformType parsedValue;
18365 SummaryInformation.TryParsePlatformType(value, out parsedValue);
18366 return parsedValue;
18367 }
18368
18369 /// <summary>
18370 /// Tries to parse a PlatformType from a string.
18371 /// </summary>
18372 public static bool TryParsePlatformType(string value, out PlatformType parsedValue)
18373 {
18374 parsedValue = PlatformType.NotSet;
18375 if (string.IsNullOrEmpty(value))
18376 {
18377 return false;
18378 }
18379 if (("x86" == value))
18380 {
18381 parsedValue = PlatformType.x86;
18382 }
18383 else
18384 {
18385 if (("ia64" == value))
18386 {
18387 parsedValue = PlatformType.ia64;
18388 }
18389 else
18390 {
18391 if (("x64" == value))
18392 {
18393 parsedValue = PlatformType.x64;
18394 }
18395 else
18396 {
18397 if (("arm" == value))
18398 {
18399 parsedValue = PlatformType.arm;
18400 }
18401 else
18402 {
18403 if (("intel" == value))
18404 {
18405 parsedValue = PlatformType.intel;
18406 }
18407 else
18408 {
18409 if (("intel64" == value))
18410 {
18411 parsedValue = PlatformType.intel64;
18412 }
18413 else
18414 {
18415 parsedValue = PlatformType.IllegalValue;
18416 return false;
18417 }
18418 }
18419 }
18420 }
18421 }
18422 }
18423 return true;
18424 }
18425
18426 /// <summary>
18427 /// Processes this element and all child elements into an XmlWriter.
18428 /// </summary>
18429 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
18430 public virtual void OutputXml(XmlWriter writer)
18431 {
18432 if ((null == writer))
18433 {
18434 throw new ArgumentNullException("writer");
18435 }
18436 writer.WriteStartElement("SummaryInformation", "http://wixtoolset.org/schemas/v4/wxs");
18437 if (this.idFieldSet)
18438 {
18439 writer.WriteAttributeString("Id", this.idField);
18440 }
18441 if (this.adminImageFieldSet)
18442 {
18443 if ((this.adminImageField == YesNoType.no))
18444 {
18445 writer.WriteAttributeString("AdminImage", "no");
18446 }
18447 if ((this.adminImageField == YesNoType.yes))
18448 {
18449 writer.WriteAttributeString("AdminImage", "yes");
18450 }
18451 }
18452 if (this.commentsFieldSet)
18453 {
18454 writer.WriteAttributeString("Comments", this.commentsField);
18455 }
18456 if (this.compressedFieldSet)
18457 {
18458 if ((this.compressedField == YesNoType.no))
18459 {
18460 writer.WriteAttributeString("Compressed", "no");
18461 }
18462 if ((this.compressedField == YesNoType.yes))
18463 {
18464 writer.WriteAttributeString("Compressed", "yes");
18465 }
18466 }
18467 if (this.descriptionFieldSet)
18468 {
18469 writer.WriteAttributeString("Description", this.descriptionField);
18470 }
18471 if (this.installPrivilegesFieldSet)
18472 {
18473 if ((this.installPrivilegesField == InstallPrivilegesType.limited))
18474 {
18475 writer.WriteAttributeString("InstallPrivileges", "limited");
18476 }
18477 if ((this.installPrivilegesField == InstallPrivilegesType.elevated))
18478 {
18479 writer.WriteAttributeString("InstallPrivileges", "elevated");
18480 }
18481 }
18482 if (this.installScopeFieldSet)
18483 {
18484 if ((this.installScopeField == InstallScopeType.perMachine))
18485 {
18486 writer.WriteAttributeString("InstallScope", "perMachine");
18487 }
18488 if ((this.installScopeField == InstallScopeType.perUser))
18489 {
18490 writer.WriteAttributeString("InstallScope", "perUser");
18491 }
18492 }
18493 if (this.installerVersionFieldSet)
18494 {
18495 writer.WriteAttributeString("InstallerVersion", this.installerVersionField.ToString(CultureInfo.InvariantCulture));
18496 }
18497 if (this.keywordsFieldSet)
18498 {
18499 writer.WriteAttributeString("Keywords", this.keywordsField);
18500 }
18501 if (this.languagesFieldSet)
18502 {
18503 writer.WriteAttributeString("Languages", this.languagesField);
18504 }
18505 if (this.manufacturerFieldSet)
18506 {
18507 writer.WriteAttributeString("Manufacturer", this.manufacturerField);
18508 }
18509 if (this.platformsFieldSet)
18510 {
18511 writer.WriteAttributeString("Platforms", this.platformsField);
18512 }
18513 if (this.platformFieldSet)
18514 {
18515 if ((this.platformField == PlatformType.x86))
18516 {
18517 writer.WriteAttributeString("Platform", "x86");
18518 }
18519 if ((this.platformField == PlatformType.ia64))
18520 {
18521 writer.WriteAttributeString("Platform", "ia64");
18522 }
18523 if ((this.platformField == PlatformType.x64))
18524 {
18525 writer.WriteAttributeString("Platform", "x64");
18526 }
18527 if ((this.platformField == PlatformType.arm))
18528 {
18529 writer.WriteAttributeString("Platform", "arm");
18530 }
18531 if ((this.platformField == PlatformType.intel))
18532 {
18533 writer.WriteAttributeString("Platform", "intel");
18534 }
18535 if ((this.platformField == PlatformType.intel64))
18536 {
18537 writer.WriteAttributeString("Platform", "intel64");
18538 }
18539 }
18540 if (this.readOnlyFieldSet)
18541 {
18542 if ((this.readOnlyField == YesNoDefaultType.@default))
18543 {
18544 writer.WriteAttributeString("ReadOnly", "default");
18545 }
18546 if ((this.readOnlyField == YesNoDefaultType.no))
18547 {
18548 writer.WriteAttributeString("ReadOnly", "no");
18549 }
18550 if ((this.readOnlyField == YesNoDefaultType.yes))
18551 {
18552 writer.WriteAttributeString("ReadOnly", "yes");
18553 }
18554 }
18555 if (this.shortNamesFieldSet)
18556 {
18557 if ((this.shortNamesField == YesNoType.no))
18558 {
18559 writer.WriteAttributeString("ShortNames", "no");
18560 }
18561 if ((this.shortNamesField == YesNoType.yes))
18562 {
18563 writer.WriteAttributeString("ShortNames", "yes");
18564 }
18565 }
18566 if (this.summaryCodepageFieldSet)
18567 {
18568 writer.WriteAttributeString("SummaryCodepage", this.summaryCodepageField);
18569 }
18570 writer.WriteEndElement();
18571 }
18572
18573 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
18574 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
18575 void ISetAttributes.SetAttribute(string name, string value)
18576 {
18577 if (String.IsNullOrEmpty(name))
18578 {
18579 throw new ArgumentNullException("name");
18580 }
18581 if (("Id" == name))
18582 {
18583 this.idField = value;
18584 this.idFieldSet = true;
18585 }
18586 if (("AdminImage" == name))
18587 {
18588 this.adminImageField = Enums.ParseYesNoType(value);
18589 this.adminImageFieldSet = true;
18590 }
18591 if (("Comments" == name))
18592 {
18593 this.commentsField = value;
18594 this.commentsFieldSet = true;
18595 }
18596 if (("Compressed" == name))
18597 {
18598 this.compressedField = Enums.ParseYesNoType(value);
18599 this.compressedFieldSet = true;
18600 }
18601 if (("Description" == name))
18602 {
18603 this.descriptionField = value;
18604 this.descriptionFieldSet = true;
18605 }
18606 if (("InstallPrivileges" == name))
18607 {
18608 this.installPrivilegesField = SummaryInformation.ParseInstallPrivilegesType(value);
18609 this.installPrivilegesFieldSet = true;
18610 }
18611 if (("InstallScope" == name))
18612 {
18613 this.installScopeField = SummaryInformation.ParseInstallScopeType(value);
18614 this.installScopeFieldSet = true;
18615 }
18616 if (("InstallerVersion" == name))
18617 {
18618 this.installerVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
18619 this.installerVersionFieldSet = true;
18620 }
18621 if (("Keywords" == name))
18622 {
18623 this.keywordsField = value;
18624 this.keywordsFieldSet = true;
18625 }
18626 if (("Languages" == name))
18627 {
18628 this.languagesField = value;
18629 this.languagesFieldSet = true;
18630 }
18631 if (("Manufacturer" == name))
18632 {
18633 this.manufacturerField = value;
18634 this.manufacturerFieldSet = true;
18635 }
18636 if (("Platforms" == name))
18637 {
18638 this.platformsField = value;
18639 this.platformsFieldSet = true;
18640 }
18641 if (("Platform" == name))
18642 {
18643 this.platformField = SummaryInformation.ParsePlatformType(value);
18644 this.platformFieldSet = true;
18645 }
18646 if (("ReadOnly" == name))
18647 {
18648 this.readOnlyField = Enums.ParseYesNoDefaultType(value);
18649 this.readOnlyFieldSet = true;
18650 }
18651 if (("ShortNames" == name))
18652 {
18653 this.shortNamesField = Enums.ParseYesNoType(value);
18654 this.shortNamesFieldSet = true;
18655 }
18656 if (("SummaryCodepage" == name))
18657 {
18658 this.summaryCodepageField = value;
18659 this.summaryCodepageFieldSet = true;
18660 }
18661 }
18662
18663 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18664 public enum InstallPrivilegesType
18665 {
18666
18667 IllegalValue = int.MaxValue,
18668
18669 NotSet = -1,
18670
18671 /// <summary>
18672 /// Set this value to declare that the package does not require elevated privileges to install.
18673 /// </summary>
18674 limited,
18675
18676 /// <summary>
18677 /// Set this value to declare that the package requires elevated privileges to install.
18678 /// This is the default value.
18679 /// </summary>
18680 elevated,
18681 }
18682
18683 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18684 public enum InstallScopeType
18685 {
18686
18687 IllegalValue = int.MaxValue,
18688
18689 NotSet = -1,
18690
18691 /// <summary>
18692 /// Set this value to declare that the package is a per-machine installation and requires elevated privileges to install.
18693 /// Sets the ALLUSERS property to 1.
18694 /// </summary>
18695 perMachine,
18696
18697 /// <summary>
18698 /// Set this value to declare that the package is a per-user installation and does not require elevated privileges to install.
18699 /// Sets the package's InstallPrivileges attribute to "limited."
18700 /// </summary>
18701 perUser,
18702 }
18703
18704 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18705 public enum PlatformType
18706 {
18707
18708 IllegalValue = int.MaxValue,
18709
18710 NotSet = -1,
18711
18712 /// <summary>
18713 /// Set this value to declare that the package is an x86 package.
18714 /// </summary>
18715 x86,
18716
18717 /// <summary>
18718 /// Set this value to declare that the package is an ia64 package.
18719 /// This value requires that the InstallerVersion property be set to 200 or greater.
18720 /// </summary>
18721 ia64,
18722
18723 /// <summary>
18724 /// Set this value to declare that the package is an x64 package.
18725 /// This value requires that the InstallerVersion property be set to 200 or greater.
18726 /// </summary>
18727 x64,
18728
18729 /// <summary>
18730 /// Set this value to declare that the package is an arm package.
18731 /// This value requires that the InstallerVersion property be set to 500 or greater.
18732 /// </summary>
18733 arm,
18734
18735 /// <summary>
18736 /// This value has been deprecated. Use "x86" instead.
18737 /// </summary>
18738 intel,
18739
18740 /// <summary>
18741 /// This value has been deprecated. Use "ia64" instead.
18742 /// </summary>
18743 intel64,
18744 }
18745 }
18746
18747 /// <summary>
18748 /// The MsiAssemblyName table specifies the schema for the elements of a strong assembly cache name for a .NET Framework or Win32 assembly.
18749 /// Consider using the Assembly attribute on File element to have the toolset populate these entries automatically.
18750 /// </summary>
18751 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18752 public class AssemblyName : ISchemaElement, ISetAttributes
18753 {
18754
18755 private string idField;
18756
18757 private bool idFieldSet;
18758
18759 private string valueField;
18760
18761 private bool valueFieldSet;
18762
18763 private ISchemaElement parentElement;
18764
18765 /// <summary>
18766 /// Name of the attribute associated with the value specified in the Value column.
18767 /// </summary>
18768 public string Id
18769 {
18770 get
18771 {
18772 return this.idField;
18773 }
18774 set
18775 {
18776 this.idFieldSet = true;
18777 this.idField = value;
18778 }
18779 }
18780
18781 /// <summary>
18782 /// Value associated with the name specified in the Name column.
18783 /// </summary>
18784 public string Value
18785 {
18786 get
18787 {
18788 return this.valueField;
18789 }
18790 set
18791 {
18792 this.valueFieldSet = true;
18793 this.valueField = value;
18794 }
18795 }
18796
18797 public virtual ISchemaElement ParentElement
18798 {
18799 get
18800 {
18801 return this.parentElement;
18802 }
18803 set
18804 {
18805 this.parentElement = value;
18806 }
18807 }
18808
18809 /// <summary>
18810 /// Processes this element and all child elements into an XmlWriter.
18811 /// </summary>
18812 public virtual void OutputXml(XmlWriter writer)
18813 {
18814 if ((null == writer))
18815 {
18816 throw new ArgumentNullException("writer");
18817 }
18818 writer.WriteStartElement("AssemblyName", "http://wixtoolset.org/schemas/v4/wxs");
18819 if (this.idFieldSet)
18820 {
18821 writer.WriteAttributeString("Id", this.idField);
18822 }
18823 if (this.valueFieldSet)
18824 {
18825 writer.WriteAttributeString("Value", this.valueField);
18826 }
18827 writer.WriteEndElement();
18828 }
18829
18830 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
18831 void ISetAttributes.SetAttribute(string name, string value)
18832 {
18833 if (String.IsNullOrEmpty(name))
18834 {
18835 throw new ArgumentNullException("name");
18836 }
18837 if (("Id" == name))
18838 {
18839 this.idField = value;
18840 this.idFieldSet = true;
18841 }
18842 if (("Value" == name))
18843 {
18844 this.valueField = value;
18845 this.valueFieldSet = true;
18846 }
18847 }
18848 }
18849
18850 /// <summary>
18851 /// Identifies the possible signer certificates used to digitally sign patches.
18852 /// </summary>
18853 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18854 public class PatchCertificates : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
18855 {
18856
18857 private ElementCollection children;
18858
18859 private ISchemaElement parentElement;
18860
18861 public PatchCertificates()
18862 {
18863 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
18864 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate)));
18865 this.children = childCollection0;
18866 }
18867
18868 public virtual IEnumerable Children
18869 {
18870 get
18871 {
18872 return this.children;
18873 }
18874 }
18875
18876 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
18877 public virtual IEnumerable this[System.Type childType]
18878 {
18879 get
18880 {
18881 return this.children.Filter(childType);
18882 }
18883 }
18884
18885 public virtual ISchemaElement ParentElement
18886 {
18887 get
18888 {
18889 return this.parentElement;
18890 }
18891 set
18892 {
18893 this.parentElement = value;
18894 }
18895 }
18896
18897 public virtual void AddChild(ISchemaElement child)
18898 {
18899 if ((null == child))
18900 {
18901 throw new ArgumentNullException("child");
18902 }
18903 this.children.AddElement(child);
18904 child.ParentElement = this;
18905 }
18906
18907 public virtual void RemoveChild(ISchemaElement child)
18908 {
18909 if ((null == child))
18910 {
18911 throw new ArgumentNullException("child");
18912 }
18913 this.children.RemoveElement(child);
18914 child.ParentElement = null;
18915 }
18916
18917 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
18918 ISchemaElement ICreateChildren.CreateChild(string childName)
18919 {
18920 if (String.IsNullOrEmpty(childName))
18921 {
18922 throw new ArgumentNullException("childName");
18923 }
18924 ISchemaElement childValue = null;
18925 if (("DigitalCertificate" == childName))
18926 {
18927 childValue = new DigitalCertificate();
18928 }
18929 if ((null == childValue))
18930 {
18931 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
18932 }
18933 return childValue;
18934 }
18935
18936 /// <summary>
18937 /// Processes this element and all child elements into an XmlWriter.
18938 /// </summary>
18939 public virtual void OutputXml(XmlWriter writer)
18940 {
18941 if ((null == writer))
18942 {
18943 throw new ArgumentNullException("writer");
18944 }
18945 writer.WriteStartElement("PatchCertificates", "http://wixtoolset.org/schemas/v4/wxs");
18946 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
18947 {
18948 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
18949 childElement.OutputXml(writer);
18950 }
18951 writer.WriteEndElement();
18952 }
18953
18954 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
18955 void ISetAttributes.SetAttribute(string name, string value)
18956 {
18957 if (String.IsNullOrEmpty(name))
18958 {
18959 throw new ArgumentNullException("name");
18960 }
18961 }
18962 }
18963
18964 /// <summary>
18965 /// Digital signatures that identify installation packages in a multi-product transaction.
18966 /// </summary>
18967 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
18968 public class PackageCertificates : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
18969 {
18970
18971 private ElementCollection children;
18972
18973 private ISchemaElement parentElement;
18974
18975 public PackageCertificates()
18976 {
18977 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
18978 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate)));
18979 this.children = childCollection0;
18980 }
18981
18982 public virtual IEnumerable Children
18983 {
18984 get
18985 {
18986 return this.children;
18987 }
18988 }
18989
18990 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
18991 public virtual IEnumerable this[System.Type childType]
18992 {
18993 get
18994 {
18995 return this.children.Filter(childType);
18996 }
18997 }
18998
18999 public virtual ISchemaElement ParentElement
19000 {
19001 get
19002 {
19003 return this.parentElement;
19004 }
19005 set
19006 {
19007 this.parentElement = value;
19008 }
19009 }
19010
19011 public virtual void AddChild(ISchemaElement child)
19012 {
19013 if ((null == child))
19014 {
19015 throw new ArgumentNullException("child");
19016 }
19017 this.children.AddElement(child);
19018 child.ParentElement = this;
19019 }
19020
19021 public virtual void RemoveChild(ISchemaElement child)
19022 {
19023 if ((null == child))
19024 {
19025 throw new ArgumentNullException("child");
19026 }
19027 this.children.RemoveElement(child);
19028 child.ParentElement = null;
19029 }
19030
19031 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19032 ISchemaElement ICreateChildren.CreateChild(string childName)
19033 {
19034 if (String.IsNullOrEmpty(childName))
19035 {
19036 throw new ArgumentNullException("childName");
19037 }
19038 ISchemaElement childValue = null;
19039 if (("DigitalCertificate" == childName))
19040 {
19041 childValue = new DigitalCertificate();
19042 }
19043 if ((null == childValue))
19044 {
19045 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
19046 }
19047 return childValue;
19048 }
19049
19050 /// <summary>
19051 /// Processes this element and all child elements into an XmlWriter.
19052 /// </summary>
19053 public virtual void OutputXml(XmlWriter writer)
19054 {
19055 if ((null == writer))
19056 {
19057 throw new ArgumentNullException("writer");
19058 }
19059 writer.WriteStartElement("PackageCertificates", "http://wixtoolset.org/schemas/v4/wxs");
19060 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
19061 {
19062 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
19063 childElement.OutputXml(writer);
19064 }
19065 writer.WriteEndElement();
19066 }
19067
19068 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19069 void ISetAttributes.SetAttribute(string name, string value)
19070 {
19071 if (String.IsNullOrEmpty(name))
19072 {
19073 throw new ArgumentNullException("name");
19074 }
19075 }
19076 }
19077
19078 /// <summary>
19079 /// Adds a digital certificate.
19080 /// </summary>
19081 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19082 public class DigitalCertificate : ISchemaElement, ISetAttributes
19083 {
19084
19085 private string idField;
19086
19087 private bool idFieldSet;
19088
19089 private string sourceFileField;
19090
19091 private bool sourceFileFieldSet;
19092
19093 private ISchemaElement parentElement;
19094
19095 /// <summary>
19096 /// Identifier for a certificate file.
19097 /// </summary>
19098 public string Id
19099 {
19100 get
19101 {
19102 return this.idField;
19103 }
19104 set
19105 {
19106 this.idFieldSet = true;
19107 this.idField = value;
19108 }
19109 }
19110
19111 /// <summary>
19112 /// The path to the certificate file.
19113 /// </summary>
19114 public string SourceFile
19115 {
19116 get
19117 {
19118 return this.sourceFileField;
19119 }
19120 set
19121 {
19122 this.sourceFileFieldSet = true;
19123 this.sourceFileField = value;
19124 }
19125 }
19126
19127 public virtual ISchemaElement ParentElement
19128 {
19129 get
19130 {
19131 return this.parentElement;
19132 }
19133 set
19134 {
19135 this.parentElement = value;
19136 }
19137 }
19138
19139 /// <summary>
19140 /// Processes this element and all child elements into an XmlWriter.
19141 /// </summary>
19142 public virtual void OutputXml(XmlWriter writer)
19143 {
19144 if ((null == writer))
19145 {
19146 throw new ArgumentNullException("writer");
19147 }
19148 writer.WriteStartElement("DigitalCertificate", "http://wixtoolset.org/schemas/v4/wxs");
19149 if (this.idFieldSet)
19150 {
19151 writer.WriteAttributeString("Id", this.idField);
19152 }
19153 if (this.sourceFileFieldSet)
19154 {
19155 writer.WriteAttributeString("SourceFile", this.sourceFileField);
19156 }
19157 writer.WriteEndElement();
19158 }
19159
19160 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19161 void ISetAttributes.SetAttribute(string name, string value)
19162 {
19163 if (String.IsNullOrEmpty(name))
19164 {
19165 throw new ArgumentNullException("name");
19166 }
19167 if (("Id" == name))
19168 {
19169 this.idField = value;
19170 this.idFieldSet = true;
19171 }
19172 if (("SourceFile" == name))
19173 {
19174 this.sourceFileField = value;
19175 this.sourceFileFieldSet = true;
19176 }
19177 }
19178 }
19179
19180 /// <summary>
19181 /// Reference to a DigitalCertificate element. This will force the entire referenced Fragment's contents
19182 /// to be included in the installer database. This is only used for references when patching.
19183 /// </summary>
19184 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19185 public class DigitalCertificateRef : ISchemaElement, ISetAttributes
19186 {
19187
19188 private string idField;
19189
19190 private bool idFieldSet;
19191
19192 private ISchemaElement parentElement;
19193
19194 public string Id
19195 {
19196 get
19197 {
19198 return this.idField;
19199 }
19200 set
19201 {
19202 this.idFieldSet = true;
19203 this.idField = value;
19204 }
19205 }
19206
19207 public virtual ISchemaElement ParentElement
19208 {
19209 get
19210 {
19211 return this.parentElement;
19212 }
19213 set
19214 {
19215 this.parentElement = value;
19216 }
19217 }
19218
19219 /// <summary>
19220 /// Processes this element and all child elements into an XmlWriter.
19221 /// </summary>
19222 public virtual void OutputXml(XmlWriter writer)
19223 {
19224 if ((null == writer))
19225 {
19226 throw new ArgumentNullException("writer");
19227 }
19228 writer.WriteStartElement("DigitalCertificateRef", "http://wixtoolset.org/schemas/v4/wxs");
19229 if (this.idFieldSet)
19230 {
19231 writer.WriteAttributeString("Id", this.idField);
19232 }
19233 writer.WriteEndElement();
19234 }
19235
19236 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19237 void ISetAttributes.SetAttribute(string name, string value)
19238 {
19239 if (String.IsNullOrEmpty(name))
19240 {
19241 throw new ArgumentNullException("name");
19242 }
19243 if (("Id" == name))
19244 {
19245 this.idField = value;
19246 this.idFieldSet = true;
19247 }
19248 }
19249 }
19250
19251 /// <summary>
19252 /// Adds a digital signature.
19253 /// </summary>
19254 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19255 public class DigitalSignature : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
19256 {
19257
19258 private ElementCollection children;
19259
19260 private string sourceFileField;
19261
19262 private bool sourceFileFieldSet;
19263
19264 private ISchemaElement parentElement;
19265
19266 public DigitalSignature()
19267 {
19268 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
19269 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate)));
19270 this.children = childCollection0;
19271 }
19272
19273 public virtual IEnumerable Children
19274 {
19275 get
19276 {
19277 return this.children;
19278 }
19279 }
19280
19281 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
19282 public virtual IEnumerable this[System.Type childType]
19283 {
19284 get
19285 {
19286 return this.children.Filter(childType);
19287 }
19288 }
19289
19290 /// <summary>
19291 /// The path to signature's optional hash file.
19292 /// </summary>
19293 public string SourceFile
19294 {
19295 get
19296 {
19297 return this.sourceFileField;
19298 }
19299 set
19300 {
19301 this.sourceFileFieldSet = true;
19302 this.sourceFileField = value;
19303 }
19304 }
19305
19306 public virtual ISchemaElement ParentElement
19307 {
19308 get
19309 {
19310 return this.parentElement;
19311 }
19312 set
19313 {
19314 this.parentElement = value;
19315 }
19316 }
19317
19318 public virtual void AddChild(ISchemaElement child)
19319 {
19320 if ((null == child))
19321 {
19322 throw new ArgumentNullException("child");
19323 }
19324 this.children.AddElement(child);
19325 child.ParentElement = this;
19326 }
19327
19328 public virtual void RemoveChild(ISchemaElement child)
19329 {
19330 if ((null == child))
19331 {
19332 throw new ArgumentNullException("child");
19333 }
19334 this.children.RemoveElement(child);
19335 child.ParentElement = null;
19336 }
19337
19338 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19339 ISchemaElement ICreateChildren.CreateChild(string childName)
19340 {
19341 if (String.IsNullOrEmpty(childName))
19342 {
19343 throw new ArgumentNullException("childName");
19344 }
19345 ISchemaElement childValue = null;
19346 if (("DigitalCertificate" == childName))
19347 {
19348 childValue = new DigitalCertificate();
19349 }
19350 if ((null == childValue))
19351 {
19352 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
19353 }
19354 return childValue;
19355 }
19356
19357 /// <summary>
19358 /// Processes this element and all child elements into an XmlWriter.
19359 /// </summary>
19360 public virtual void OutputXml(XmlWriter writer)
19361 {
19362 if ((null == writer))
19363 {
19364 throw new ArgumentNullException("writer");
19365 }
19366 writer.WriteStartElement("DigitalSignature", "http://wixtoolset.org/schemas/v4/wxs");
19367 if (this.sourceFileFieldSet)
19368 {
19369 writer.WriteAttributeString("SourceFile", this.sourceFileField);
19370 }
19371 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
19372 {
19373 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
19374 childElement.OutputXml(writer);
19375 }
19376 writer.WriteEndElement();
19377 }
19378
19379 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19380 void ISetAttributes.SetAttribute(string name, string value)
19381 {
19382 if (String.IsNullOrEmpty(name))
19383 {
19384 throw new ArgumentNullException("name");
19385 }
19386 if (("SourceFile" == name))
19387 {
19388 this.sourceFileField = value;
19389 this.sourceFileFieldSet = true;
19390 }
19391 }
19392 }
19393
19394 /// <summary>
19395 /// Adds a system file protection update catalog file
19396 /// </summary>
19397 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19398 public class SFPCatalog : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
19399 {
19400
19401 private ElementCollection children;
19402
19403 private string nameField;
19404
19405 private bool nameFieldSet;
19406
19407 private string dependencyField;
19408
19409 private bool dependencyFieldSet;
19410
19411 private string sourceFileField;
19412
19413 private bool sourceFileFieldSet;
19414
19415 private ISchemaElement parentElement;
19416
19417 public SFPCatalog()
19418 {
19419 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
19420 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog)));
19421 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPFile)));
19422 this.children = childCollection0;
19423 }
19424
19425 public virtual IEnumerable Children
19426 {
19427 get
19428 {
19429 return this.children;
19430 }
19431 }
19432
19433 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
19434 public virtual IEnumerable this[System.Type childType]
19435 {
19436 get
19437 {
19438 return this.children.Filter(childType);
19439 }
19440 }
19441
19442 /// <summary>
19443 /// Filename for catalog file when installed.
19444 /// </summary>
19445 public string Name
19446 {
19447 get
19448 {
19449 return this.nameField;
19450 }
19451 set
19452 {
19453 this.nameFieldSet = true;
19454 this.nameField = value;
19455 }
19456 }
19457
19458 /// <summary>
19459 /// Used to define dependency outside of the package.
19460 /// </summary>
19461 public string Dependency
19462 {
19463 get
19464 {
19465 return this.dependencyField;
19466 }
19467 set
19468 {
19469 this.dependencyFieldSet = true;
19470 this.dependencyField = value;
19471 }
19472 }
19473
19474 /// <summary>
19475 /// Path to catalog file in binary.
19476 /// </summary>
19477 public string SourceFile
19478 {
19479 get
19480 {
19481 return this.sourceFileField;
19482 }
19483 set
19484 {
19485 this.sourceFileFieldSet = true;
19486 this.sourceFileField = value;
19487 }
19488 }
19489
19490 public virtual ISchemaElement ParentElement
19491 {
19492 get
19493 {
19494 return this.parentElement;
19495 }
19496 set
19497 {
19498 this.parentElement = value;
19499 }
19500 }
19501
19502 public virtual void AddChild(ISchemaElement child)
19503 {
19504 if ((null == child))
19505 {
19506 throw new ArgumentNullException("child");
19507 }
19508 this.children.AddElement(child);
19509 child.ParentElement = this;
19510 }
19511
19512 public virtual void RemoveChild(ISchemaElement child)
19513 {
19514 if ((null == child))
19515 {
19516 throw new ArgumentNullException("child");
19517 }
19518 this.children.RemoveElement(child);
19519 child.ParentElement = null;
19520 }
19521
19522 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19523 ISchemaElement ICreateChildren.CreateChild(string childName)
19524 {
19525 if (String.IsNullOrEmpty(childName))
19526 {
19527 throw new ArgumentNullException("childName");
19528 }
19529 ISchemaElement childValue = null;
19530 if (("SFPCatalog" == childName))
19531 {
19532 childValue = new SFPCatalog();
19533 }
19534 if (("SFPFile" == childName))
19535 {
19536 childValue = new SFPFile();
19537 }
19538 if ((null == childValue))
19539 {
19540 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
19541 }
19542 return childValue;
19543 }
19544
19545 /// <summary>
19546 /// Processes this element and all child elements into an XmlWriter.
19547 /// </summary>
19548 public virtual void OutputXml(XmlWriter writer)
19549 {
19550 if ((null == writer))
19551 {
19552 throw new ArgumentNullException("writer");
19553 }
19554 writer.WriteStartElement("SFPCatalog", "http://wixtoolset.org/schemas/v4/wxs");
19555 if (this.nameFieldSet)
19556 {
19557 writer.WriteAttributeString("Name", this.nameField);
19558 }
19559 if (this.dependencyFieldSet)
19560 {
19561 writer.WriteAttributeString("Dependency", this.dependencyField);
19562 }
19563 if (this.sourceFileFieldSet)
19564 {
19565 writer.WriteAttributeString("SourceFile", this.sourceFileField);
19566 }
19567 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
19568 {
19569 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
19570 childElement.OutputXml(writer);
19571 }
19572 writer.WriteEndElement();
19573 }
19574
19575 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19576 void ISetAttributes.SetAttribute(string name, string value)
19577 {
19578 if (String.IsNullOrEmpty(name))
19579 {
19580 throw new ArgumentNullException("name");
19581 }
19582 if (("Name" == name))
19583 {
19584 this.nameField = value;
19585 this.nameFieldSet = true;
19586 }
19587 if (("Dependency" == name))
19588 {
19589 this.dependencyField = value;
19590 this.dependencyFieldSet = true;
19591 }
19592 if (("SourceFile" == name))
19593 {
19594 this.sourceFileField = value;
19595 this.sourceFileFieldSet = true;
19596 }
19597 }
19598 }
19599
19600 /// <summary>
19601 /// Provides a many-to-many mapping from the SFPCatalog table to the File table
19602 /// </summary>
19603 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19604 public class SFPFile : ISchemaElement, ISetAttributes
19605 {
19606
19607 private string idField;
19608
19609 private bool idFieldSet;
19610
19611 private ISchemaElement parentElement;
19612
19613 /// <summary>
19614 /// Primary Key to File Table.
19615 /// </summary>
19616 public string Id
19617 {
19618 get
19619 {
19620 return this.idField;
19621 }
19622 set
19623 {
19624 this.idFieldSet = true;
19625 this.idField = value;
19626 }
19627 }
19628
19629 public virtual ISchemaElement ParentElement
19630 {
19631 get
19632 {
19633 return this.parentElement;
19634 }
19635 set
19636 {
19637 this.parentElement = value;
19638 }
19639 }
19640
19641 /// <summary>
19642 /// Processes this element and all child elements into an XmlWriter.
19643 /// </summary>
19644 public virtual void OutputXml(XmlWriter writer)
19645 {
19646 if ((null == writer))
19647 {
19648 throw new ArgumentNullException("writer");
19649 }
19650 writer.WriteStartElement("SFPFile", "http://wixtoolset.org/schemas/v4/wxs");
19651 if (this.idFieldSet)
19652 {
19653 writer.WriteAttributeString("Id", this.idField);
19654 }
19655 writer.WriteEndElement();
19656 }
19657
19658 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19659 void ISetAttributes.SetAttribute(string name, string value)
19660 {
19661 if (String.IsNullOrEmpty(name))
19662 {
19663 throw new ArgumentNullException("name");
19664 }
19665 if (("Id" == name))
19666 {
19667 this.idField = value;
19668 this.idFieldSet = true;
19669 }
19670 }
19671 }
19672
19673 /// <summary>
19674 /// Adds or removes .ini file entries.
19675 /// </summary>
19676 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
19677 public class IniFile : ISchemaElement, ISetAttributes
19678 {
19679
19680 private string idField;
19681
19682 private bool idFieldSet;
19683
19684 private ActionType actionField;
19685
19686 private bool actionFieldSet;
19687
19688 private string directoryField;
19689
19690 private bool directoryFieldSet;
19691
19692 private string keyField;
19693
19694 private bool keyFieldSet;
19695
19696 private string nameField;
19697
19698 private bool nameFieldSet;
19699
19700 private string sectionField;
19701
19702 private bool sectionFieldSet;
19703
19704 private string shortNameField;
19705
19706 private bool shortNameFieldSet;
19707
19708 private string valueField;
19709
19710 private bool valueFieldSet;
19711
19712 private ISchemaElement parentElement;
19713
19714 /// <summary>
19715 /// Identifier for ini file.
19716 /// </summary>
19717 public string Id
19718 {
19719 get
19720 {
19721 return this.idField;
19722 }
19723 set
19724 {
19725 this.idFieldSet = true;
19726 this.idField = value;
19727 }
19728 }
19729
19730 /// <summary>
19731 /// The type of modification to be made.
19732 /// </summary>
19733 public ActionType Action
19734 {
19735 get
19736 {
19737 return this.actionField;
19738 }
19739 set
19740 {
19741 this.actionFieldSet = true;
19742 this.actionField = value;
19743 }
19744 }
19745
19746 /// <summary>
19747 /// 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.
19748 /// </summary>
19749 public string Directory
19750 {
19751 get
19752 {
19753 return this.directoryField;
19754 }
19755 set
19756 {
19757 this.directoryFieldSet = true;
19758 this.directoryField = value;
19759 }
19760 }
19761
19762 /// <summary>
19763 /// The localizable .ini file key within the section.
19764 /// </summary>
19765 public string Key
19766 {
19767 get
19768 {
19769 return this.keyField;
19770 }
19771 set
19772 {
19773 this.keyFieldSet = true;
19774 this.keyField = value;
19775 }
19776 }
19777
19778 /// <summary>
19779 /// In prior versions of the WiX toolset, this attribute specified the short name.
19780 /// This attribute's value may now be either a short or long name.
19781 /// If a short name is specified, the ShortName attribute may not be specified.
19782 /// Also, if this value is a long name, the ShortName attribute may be omitted to
19783 /// allow WiX to attempt to generate a unique short name.
19784 /// However, if this name collides with another file or you wish to manually specify
19785 /// the short name, then the ShortName attribute may be specified.
19786 /// </summary>
19787 public string Name
19788 {
19789 get
19790 {
19791 return this.nameField;
19792 }
19793 set
19794 {
19795 this.nameFieldSet = true;
19796 this.nameField = value;
19797 }
19798 }
19799
19800 /// <summary>
19801 /// The localizable .ini file section.
19802 /// </summary>
19803 public string Section
19804 {
19805 get
19806 {
19807 return this.sectionField;
19808 }
19809 set
19810 {
19811 this.sectionFieldSet = true;
19812 this.sectionField = value;
19813 }
19814 }
19815
19816 /// <summary>
19817 /// The short name of the in 8.3 format.
19818 /// This attribute should only be set if there is a conflict between generated short names
19819 /// or the user wants to manually specify the short name.
19820 /// </summary>
19821 public string ShortName
19822 {
19823 get
19824 {
19825 return this.shortNameField;
19826 }
19827 set
19828 {
19829 this.shortNameFieldSet = true;
19830 this.shortNameField = value;
19831 }
19832 }
19833
19834 /// <summary>
19835 /// The localizable value to be written or deleted. This attribute must be set if
19836 /// the Action attribute's value is "addLine", "addTag", or "createLine".
19837 /// </summary>
19838 public string Value
19839 {
19840 get
19841 {
19842 return this.valueField;
19843 }
19844 set
19845 {
19846 this.valueFieldSet = true;
19847 this.valueField = value;
19848 }
19849 }
19850
19851 public virtual ISchemaElement ParentElement
19852 {
19853 get
19854 {
19855 return this.parentElement;
19856 }
19857 set
19858 {
19859 this.parentElement = value;
19860 }
19861 }
19862
19863 /// <summary>
19864 /// Parses a ActionType from a string.
19865 /// </summary>
19866 public static ActionType ParseActionType(string value)
19867 {
19868 ActionType parsedValue;
19869 IniFile.TryParseActionType(value, out parsedValue);
19870 return parsedValue;
19871 }
19872
19873 /// <summary>
19874 /// Tries to parse a ActionType from a string.
19875 /// </summary>
19876 public static bool TryParseActionType(string value, out ActionType parsedValue)
19877 {
19878 parsedValue = ActionType.NotSet;
19879 if (string.IsNullOrEmpty(value))
19880 {
19881 return false;
19882 }
19883 if (("addLine" == value))
19884 {
19885 parsedValue = ActionType.addLine;
19886 }
19887 else
19888 {
19889 if (("addTag" == value))
19890 {
19891 parsedValue = ActionType.addTag;
19892 }
19893 else
19894 {
19895 if (("createLine" == value))
19896 {
19897 parsedValue = ActionType.createLine;
19898 }
19899 else
19900 {
19901 if (("removeLine" == value))
19902 {
19903 parsedValue = ActionType.removeLine;
19904 }
19905 else
19906 {
19907 if (("removeTag" == value))
19908 {
19909 parsedValue = ActionType.removeTag;
19910 }
19911 else
19912 {
19913 parsedValue = ActionType.IllegalValue;
19914 return false;
19915 }
19916 }
19917 }
19918 }
19919 }
19920 return true;
19921 }
19922
19923 /// <summary>
19924 /// Processes this element and all child elements into an XmlWriter.
19925 /// </summary>
19926 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
19927 public virtual void OutputXml(XmlWriter writer)
19928 {
19929 if ((null == writer))
19930 {
19931 throw new ArgumentNullException("writer");
19932 }
19933 writer.WriteStartElement("IniFile", "http://wixtoolset.org/schemas/v4/wxs");
19934 if (this.idFieldSet)
19935 {
19936 writer.WriteAttributeString("Id", this.idField);
19937 }
19938 if (this.actionFieldSet)
19939 {
19940 if ((this.actionField == ActionType.addLine))
19941 {
19942 writer.WriteAttributeString("Action", "addLine");
19943 }
19944 if ((this.actionField == ActionType.addTag))
19945 {
19946 writer.WriteAttributeString("Action", "addTag");
19947 }
19948 if ((this.actionField == ActionType.createLine))
19949 {
19950 writer.WriteAttributeString("Action", "createLine");
19951 }
19952 if ((this.actionField == ActionType.removeLine))
19953 {
19954 writer.WriteAttributeString("Action", "removeLine");
19955 }
19956 if ((this.actionField == ActionType.removeTag))
19957 {
19958 writer.WriteAttributeString("Action", "removeTag");
19959 }
19960 }
19961 if (this.directoryFieldSet)
19962 {
19963 writer.WriteAttributeString("Directory", this.directoryField);
19964 }
19965 if (this.keyFieldSet)
19966 {
19967 writer.WriteAttributeString("Key", this.keyField);
19968 }
19969 if (this.nameFieldSet)
19970 {
19971 writer.WriteAttributeString("Name", this.nameField);
19972 }
19973 if (this.sectionFieldSet)
19974 {
19975 writer.WriteAttributeString("Section", this.sectionField);
19976 }
19977 if (this.shortNameFieldSet)
19978 {
19979 writer.WriteAttributeString("ShortName", this.shortNameField);
19980 }
19981 if (this.valueFieldSet)
19982 {
19983 writer.WriteAttributeString("Value", this.valueField);
19984 }
19985 writer.WriteEndElement();
19986 }
19987
19988 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
19989 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
19990 void ISetAttributes.SetAttribute(string name, string value)
19991 {
19992 if (String.IsNullOrEmpty(name))
19993 {
19994 throw new ArgumentNullException("name");
19995 }
19996 if (("Id" == name))
19997 {
19998 this.idField = value;
19999 this.idFieldSet = true;
20000 }
20001 if (("Action" == name))
20002 {
20003 this.actionField = IniFile.ParseActionType(value);
20004 this.actionFieldSet = true;
20005 }
20006 if (("Directory" == name))
20007 {
20008 this.directoryField = value;
20009 this.directoryFieldSet = true;
20010 }
20011 if (("Key" == name))
20012 {
20013 this.keyField = value;
20014 this.keyFieldSet = true;
20015 }
20016 if (("Name" == name))
20017 {
20018 this.nameField = value;
20019 this.nameFieldSet = true;
20020 }
20021 if (("Section" == name))
20022 {
20023 this.sectionField = value;
20024 this.sectionFieldSet = true;
20025 }
20026 if (("ShortName" == name))
20027 {
20028 this.shortNameField = value;
20029 this.shortNameFieldSet = true;
20030 }
20031 if (("Value" == name))
20032 {
20033 this.valueField = value;
20034 this.valueFieldSet = true;
20035 }
20036 }
20037
20038 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20039 public enum ActionType
20040 {
20041
20042 IllegalValue = int.MaxValue,
20043
20044 NotSet = -1,
20045
20046 /// <summary>
20047 /// Creates or updates an .ini entry.
20048 /// </summary>
20049 addLine,
20050
20051 /// <summary>
20052 /// Creates a new entry or appends a new comma-separated value to an existing entry.
20053 /// </summary>
20054 addTag,
20055
20056 /// <summary>
20057 /// Creates an .ini entry only if the entry does no already exist.
20058 /// </summary>
20059 createLine,
20060
20061 /// <summary>
20062 /// Removes an .ini entry.
20063 /// </summary>
20064 removeLine,
20065
20066 /// <summary>
20067 /// Removes a tag from an .ini entry.
20068 /// </summary>
20069 removeTag,
20070 }
20071 }
20072
20073 /// <summary>
20074 /// ODBCDataSource for a Component
20075 /// </summary>
20076 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20077 public class ODBCDataSource : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
20078 {
20079
20080 private ElementCollection children;
20081
20082 private string idField;
20083
20084 private bool idFieldSet;
20085
20086 private string nameField;
20087
20088 private bool nameFieldSet;
20089
20090 private string driverNameField;
20091
20092 private bool driverNameFieldSet;
20093
20094 private RegistrationType registrationField;
20095
20096 private bool registrationFieldSet;
20097
20098 private YesNoType keyPathField;
20099
20100 private bool keyPathFieldSet;
20101
20102 private ISchemaElement parentElement;
20103
20104 public ODBCDataSource()
20105 {
20106 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
20107 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property)));
20108 this.children = childCollection0;
20109 }
20110
20111 public virtual IEnumerable Children
20112 {
20113 get
20114 {
20115 return this.children;
20116 }
20117 }
20118
20119 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
20120 public virtual IEnumerable this[System.Type childType]
20121 {
20122 get
20123 {
20124 return this.children.Filter(childType);
20125 }
20126 }
20127
20128 /// <summary>
20129 /// Identifier of the data source.
20130 /// </summary>
20131 public string Id
20132 {
20133 get
20134 {
20135 return this.idField;
20136 }
20137 set
20138 {
20139 this.idFieldSet = true;
20140 this.idField = value;
20141 }
20142 }
20143
20144 /// <summary>
20145 /// Name for the data source.
20146 /// </summary>
20147 public string Name
20148 {
20149 get
20150 {
20151 return this.nameField;
20152 }
20153 set
20154 {
20155 this.nameFieldSet = true;
20156 this.nameField = value;
20157 }
20158 }
20159
20160 /// <summary>
20161 /// Required if not found as child of ODBCDriver element
20162 /// </summary>
20163 public string DriverName
20164 {
20165 get
20166 {
20167 return this.driverNameField;
20168 }
20169 set
20170 {
20171 this.driverNameFieldSet = true;
20172 this.driverNameField = value;
20173 }
20174 }
20175
20176 /// <summary>
20177 /// Scope for which the data source should be registered.
20178 /// </summary>
20179 public RegistrationType Registration
20180 {
20181 get
20182 {
20183 return this.registrationField;
20184 }
20185 set
20186 {
20187 this.registrationFieldSet = true;
20188 this.registrationField = value;
20189 }
20190 }
20191
20192 /// <summary>
20193 /// Set 'yes' to force this file to be key path for parent Component
20194 /// </summary>
20195 public YesNoType KeyPath
20196 {
20197 get
20198 {
20199 return this.keyPathField;
20200 }
20201 set
20202 {
20203 this.keyPathFieldSet = true;
20204 this.keyPathField = value;
20205 }
20206 }
20207
20208 public virtual ISchemaElement ParentElement
20209 {
20210 get
20211 {
20212 return this.parentElement;
20213 }
20214 set
20215 {
20216 this.parentElement = value;
20217 }
20218 }
20219
20220 public virtual void AddChild(ISchemaElement child)
20221 {
20222 if ((null == child))
20223 {
20224 throw new ArgumentNullException("child");
20225 }
20226 this.children.AddElement(child);
20227 child.ParentElement = this;
20228 }
20229
20230 public virtual void RemoveChild(ISchemaElement child)
20231 {
20232 if ((null == child))
20233 {
20234 throw new ArgumentNullException("child");
20235 }
20236 this.children.RemoveElement(child);
20237 child.ParentElement = null;
20238 }
20239
20240 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
20241 ISchemaElement ICreateChildren.CreateChild(string childName)
20242 {
20243 if (String.IsNullOrEmpty(childName))
20244 {
20245 throw new ArgumentNullException("childName");
20246 }
20247 ISchemaElement childValue = null;
20248 if (("Property" == childName))
20249 {
20250 childValue = new Property();
20251 }
20252 if ((null == childValue))
20253 {
20254 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
20255 }
20256 return childValue;
20257 }
20258
20259 /// <summary>
20260 /// Parses a RegistrationType from a string.
20261 /// </summary>
20262 public static RegistrationType ParseRegistrationType(string value)
20263 {
20264 RegistrationType parsedValue;
20265 ODBCDataSource.TryParseRegistrationType(value, out parsedValue);
20266 return parsedValue;
20267 }
20268
20269 /// <summary>
20270 /// Tries to parse a RegistrationType from a string.
20271 /// </summary>
20272 public static bool TryParseRegistrationType(string value, out RegistrationType parsedValue)
20273 {
20274 parsedValue = RegistrationType.NotSet;
20275 if (string.IsNullOrEmpty(value))
20276 {
20277 return false;
20278 }
20279 if (("machine" == value))
20280 {
20281 parsedValue = RegistrationType.machine;
20282 }
20283 else
20284 {
20285 if (("user" == value))
20286 {
20287 parsedValue = RegistrationType.user;
20288 }
20289 else
20290 {
20291 parsedValue = RegistrationType.IllegalValue;
20292 return false;
20293 }
20294 }
20295 return true;
20296 }
20297
20298 /// <summary>
20299 /// Processes this element and all child elements into an XmlWriter.
20300 /// </summary>
20301 public virtual void OutputXml(XmlWriter writer)
20302 {
20303 if ((null == writer))
20304 {
20305 throw new ArgumentNullException("writer");
20306 }
20307 writer.WriteStartElement("ODBCDataSource", "http://wixtoolset.org/schemas/v4/wxs");
20308 if (this.idFieldSet)
20309 {
20310 writer.WriteAttributeString("Id", this.idField);
20311 }
20312 if (this.nameFieldSet)
20313 {
20314 writer.WriteAttributeString("Name", this.nameField);
20315 }
20316 if (this.driverNameFieldSet)
20317 {
20318 writer.WriteAttributeString("DriverName", this.driverNameField);
20319 }
20320 if (this.registrationFieldSet)
20321 {
20322 if ((this.registrationField == RegistrationType.machine))
20323 {
20324 writer.WriteAttributeString("Registration", "machine");
20325 }
20326 if ((this.registrationField == RegistrationType.user))
20327 {
20328 writer.WriteAttributeString("Registration", "user");
20329 }
20330 }
20331 if (this.keyPathFieldSet)
20332 {
20333 if ((this.keyPathField == YesNoType.no))
20334 {
20335 writer.WriteAttributeString("KeyPath", "no");
20336 }
20337 if ((this.keyPathField == YesNoType.yes))
20338 {
20339 writer.WriteAttributeString("KeyPath", "yes");
20340 }
20341 }
20342 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
20343 {
20344 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
20345 childElement.OutputXml(writer);
20346 }
20347 writer.WriteEndElement();
20348 }
20349
20350 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
20351 void ISetAttributes.SetAttribute(string name, string value)
20352 {
20353 if (String.IsNullOrEmpty(name))
20354 {
20355 throw new ArgumentNullException("name");
20356 }
20357 if (("Id" == name))
20358 {
20359 this.idField = value;
20360 this.idFieldSet = true;
20361 }
20362 if (("Name" == name))
20363 {
20364 this.nameField = value;
20365 this.nameFieldSet = true;
20366 }
20367 if (("DriverName" == name))
20368 {
20369 this.driverNameField = value;
20370 this.driverNameFieldSet = true;
20371 }
20372 if (("Registration" == name))
20373 {
20374 this.registrationField = ODBCDataSource.ParseRegistrationType(value);
20375 this.registrationFieldSet = true;
20376 }
20377 if (("KeyPath" == name))
20378 {
20379 this.keyPathField = Enums.ParseYesNoType(value);
20380 this.keyPathFieldSet = true;
20381 }
20382 }
20383
20384 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20385 public enum RegistrationType
20386 {
20387
20388 IllegalValue = int.MaxValue,
20389
20390 NotSet = -1,
20391
20392 /// <summary>
20393 /// Data source is registered per machine.
20394 /// </summary>
20395 machine,
20396
20397 /// <summary>
20398 /// Data source is registered per user.
20399 /// </summary>
20400 user,
20401 }
20402 }
20403
20404 /// <summary>
20405 /// ODBCDriver for a Component
20406 /// </summary>
20407 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20408 public class ODBCDriver : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
20409 {
20410
20411 private ElementCollection children;
20412
20413 private string idField;
20414
20415 private bool idFieldSet;
20416
20417 private string nameField;
20418
20419 private bool nameFieldSet;
20420
20421 private string fileField;
20422
20423 private bool fileFieldSet;
20424
20425 private string setupFileField;
20426
20427 private bool setupFileFieldSet;
20428
20429 private ISchemaElement parentElement;
20430
20431 public ODBCDriver()
20432 {
20433 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
20434 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property)));
20435 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ODBCDataSource)));
20436 this.children = childCollection0;
20437 }
20438
20439 public virtual IEnumerable Children
20440 {
20441 get
20442 {
20443 return this.children;
20444 }
20445 }
20446
20447 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
20448 public virtual IEnumerable this[System.Type childType]
20449 {
20450 get
20451 {
20452 return this.children.Filter(childType);
20453 }
20454 }
20455
20456 /// <summary>
20457 /// Identifier for the driver.
20458 /// </summary>
20459 public string Id
20460 {
20461 get
20462 {
20463 return this.idField;
20464 }
20465 set
20466 {
20467 this.idFieldSet = true;
20468 this.idField = value;
20469 }
20470 }
20471
20472 /// <summary>
20473 /// Name for the driver.
20474 /// </summary>
20475 public string Name
20476 {
20477 get
20478 {
20479 return this.nameField;
20480 }
20481 set
20482 {
20483 this.nameFieldSet = true;
20484 this.nameField = value;
20485 }
20486 }
20487
20488 /// <summary>
20489 /// Required if not found as child of File element
20490 /// </summary>
20491 public string File
20492 {
20493 get
20494 {
20495 return this.fileField;
20496 }
20497 set
20498 {
20499 this.fileFieldSet = true;
20500 this.fileField = value;
20501 }
20502 }
20503
20504 /// <summary>
20505 /// Required if not found as child of File element or different from File attribute above
20506 /// </summary>
20507 public string SetupFile
20508 {
20509 get
20510 {
20511 return this.setupFileField;
20512 }
20513 set
20514 {
20515 this.setupFileFieldSet = true;
20516 this.setupFileField = value;
20517 }
20518 }
20519
20520 public virtual ISchemaElement ParentElement
20521 {
20522 get
20523 {
20524 return this.parentElement;
20525 }
20526 set
20527 {
20528 this.parentElement = value;
20529 }
20530 }
20531
20532 public virtual void AddChild(ISchemaElement child)
20533 {
20534 if ((null == child))
20535 {
20536 throw new ArgumentNullException("child");
20537 }
20538 this.children.AddElement(child);
20539 child.ParentElement = this;
20540 }
20541
20542 public virtual void RemoveChild(ISchemaElement child)
20543 {
20544 if ((null == child))
20545 {
20546 throw new ArgumentNullException("child");
20547 }
20548 this.children.RemoveElement(child);
20549 child.ParentElement = null;
20550 }
20551
20552 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
20553 ISchemaElement ICreateChildren.CreateChild(string childName)
20554 {
20555 if (String.IsNullOrEmpty(childName))
20556 {
20557 throw new ArgumentNullException("childName");
20558 }
20559 ISchemaElement childValue = null;
20560 if (("Property" == childName))
20561 {
20562 childValue = new Property();
20563 }
20564 if (("ODBCDataSource" == childName))
20565 {
20566 childValue = new ODBCDataSource();
20567 }
20568 if ((null == childValue))
20569 {
20570 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
20571 }
20572 return childValue;
20573 }
20574
20575 /// <summary>
20576 /// Processes this element and all child elements into an XmlWriter.
20577 /// </summary>
20578 public virtual void OutputXml(XmlWriter writer)
20579 {
20580 if ((null == writer))
20581 {
20582 throw new ArgumentNullException("writer");
20583 }
20584 writer.WriteStartElement("ODBCDriver", "http://wixtoolset.org/schemas/v4/wxs");
20585 if (this.idFieldSet)
20586 {
20587 writer.WriteAttributeString("Id", this.idField);
20588 }
20589 if (this.nameFieldSet)
20590 {
20591 writer.WriteAttributeString("Name", this.nameField);
20592 }
20593 if (this.fileFieldSet)
20594 {
20595 writer.WriteAttributeString("File", this.fileField);
20596 }
20597 if (this.setupFileFieldSet)
20598 {
20599 writer.WriteAttributeString("SetupFile", this.setupFileField);
20600 }
20601 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
20602 {
20603 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
20604 childElement.OutputXml(writer);
20605 }
20606 writer.WriteEndElement();
20607 }
20608
20609 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
20610 void ISetAttributes.SetAttribute(string name, string value)
20611 {
20612 if (String.IsNullOrEmpty(name))
20613 {
20614 throw new ArgumentNullException("name");
20615 }
20616 if (("Id" == name))
20617 {
20618 this.idField = value;
20619 this.idFieldSet = true;
20620 }
20621 if (("Name" == name))
20622 {
20623 this.nameField = value;
20624 this.nameFieldSet = true;
20625 }
20626 if (("File" == name))
20627 {
20628 this.fileField = value;
20629 this.fileFieldSet = true;
20630 }
20631 if (("SetupFile" == name))
20632 {
20633 this.setupFileField = value;
20634 this.setupFileFieldSet = true;
20635 }
20636 }
20637 }
20638
20639 /// <summary>
20640 /// ODBCTranslator for a Component
20641 /// </summary>
20642 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20643 public class ODBCTranslator : ISchemaElement, ISetAttributes
20644 {
20645
20646 private string idField;
20647
20648 private bool idFieldSet;
20649
20650 private string nameField;
20651
20652 private bool nameFieldSet;
20653
20654 private string fileField;
20655
20656 private bool fileFieldSet;
20657
20658 private string setupFileField;
20659
20660 private bool setupFileFieldSet;
20661
20662 private ISchemaElement parentElement;
20663
20664 /// <summary>
20665 /// Identifier for the translator.
20666 /// </summary>
20667 public string Id
20668 {
20669 get
20670 {
20671 return this.idField;
20672 }
20673 set
20674 {
20675 this.idFieldSet = true;
20676 this.idField = value;
20677 }
20678 }
20679
20680 /// <summary>
20681 /// Name for the translator.
20682 /// </summary>
20683 public string Name
20684 {
20685 get
20686 {
20687 return this.nameField;
20688 }
20689 set
20690 {
20691 this.nameFieldSet = true;
20692 this.nameField = value;
20693 }
20694 }
20695
20696 /// <summary>
20697 /// Required if not found as child of File element
20698 /// </summary>
20699 public string File
20700 {
20701 get
20702 {
20703 return this.fileField;
20704 }
20705 set
20706 {
20707 this.fileFieldSet = true;
20708 this.fileField = value;
20709 }
20710 }
20711
20712 /// <summary>
20713 /// Required if not found as child of File element or different from File attribute above
20714 /// </summary>
20715 public string SetupFile
20716 {
20717 get
20718 {
20719 return this.setupFileField;
20720 }
20721 set
20722 {
20723 this.setupFileFieldSet = true;
20724 this.setupFileField = value;
20725 }
20726 }
20727
20728 public virtual ISchemaElement ParentElement
20729 {
20730 get
20731 {
20732 return this.parentElement;
20733 }
20734 set
20735 {
20736 this.parentElement = value;
20737 }
20738 }
20739
20740 /// <summary>
20741 /// Processes this element and all child elements into an XmlWriter.
20742 /// </summary>
20743 public virtual void OutputXml(XmlWriter writer)
20744 {
20745 if ((null == writer))
20746 {
20747 throw new ArgumentNullException("writer");
20748 }
20749 writer.WriteStartElement("ODBCTranslator", "http://wixtoolset.org/schemas/v4/wxs");
20750 if (this.idFieldSet)
20751 {
20752 writer.WriteAttributeString("Id", this.idField);
20753 }
20754 if (this.nameFieldSet)
20755 {
20756 writer.WriteAttributeString("Name", this.nameField);
20757 }
20758 if (this.fileFieldSet)
20759 {
20760 writer.WriteAttributeString("File", this.fileField);
20761 }
20762 if (this.setupFileFieldSet)
20763 {
20764 writer.WriteAttributeString("SetupFile", this.setupFileField);
20765 }
20766 writer.WriteEndElement();
20767 }
20768
20769 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
20770 void ISetAttributes.SetAttribute(string name, string value)
20771 {
20772 if (String.IsNullOrEmpty(name))
20773 {
20774 throw new ArgumentNullException("name");
20775 }
20776 if (("Id" == name))
20777 {
20778 this.idField = value;
20779 this.idFieldSet = true;
20780 }
20781 if (("Name" == name))
20782 {
20783 this.nameField = value;
20784 this.nameFieldSet = true;
20785 }
20786 if (("File" == name))
20787 {
20788 this.fileField = value;
20789 this.fileFieldSet = true;
20790 }
20791 if (("SetupFile" == name))
20792 {
20793 this.setupFileField = value;
20794 this.setupFileFieldSet = true;
20795 }
20796 }
20797 }
20798
20799 /// <summary>
20800 /// Searches for file and assigns to fullpath value of parent Property
20801 /// </summary>
20802 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
20803 public class FileSearch : ISchemaElement, ISetAttributes
20804 {
20805
20806 private string idField;
20807
20808 private bool idFieldSet;
20809
20810 private string nameField;
20811
20812 private bool nameFieldSet;
20813
20814 private string shortNameField;
20815
20816 private bool shortNameFieldSet;
20817
20818 private int minSizeField;
20819
20820 private bool minSizeFieldSet;
20821
20822 private int maxSizeField;
20823
20824 private bool maxSizeFieldSet;
20825
20826 private string minVersionField;
20827
20828 private bool minVersionFieldSet;
20829
20830 private string maxVersionField;
20831
20832 private bool maxVersionFieldSet;
20833
20834 private DateTime minDateField;
20835
20836 private bool minDateFieldSet;
20837
20838 private DateTime maxDateField;
20839
20840 private bool maxDateFieldSet;
20841
20842 private string languagesField;
20843
20844 private bool languagesFieldSet;
20845
20846 private ISchemaElement parentElement;
20847
20848 /// <summary>
20849 /// 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.
20850 /// </summary>
20851 public string Id
20852 {
20853 get
20854 {
20855 return this.idField;
20856 }
20857 set
20858 {
20859 this.idFieldSet = true;
20860 this.idField = value;
20861 }
20862 }
20863
20864 /// <summary>
20865 /// In prior versions of the WiX toolset, this attribute specified the short file name.
20866 /// This attribute's value may now be either a short or long file name.
20867 /// If a short file name is specified, the ShortName attribute may not be specified.
20868 /// If you wish to manually specify the short file name, then the ShortName
20869 /// attribute may be specified.
20870 /// </summary>
20871 public string Name
20872 {
20873 get
20874 {
20875 return this.nameField;
20876 }
20877 set
20878 {
20879 this.nameFieldSet = true;
20880 this.nameField = value;
20881 }
20882 }
20883
20884 /// <summary>
20885 /// The short file name of the file in 8.3 format.
20886 /// There is a Windows Installer bug which prevents the FileSearch functionality from working
20887 /// if both a short and long file name are specified. Since the Name attribute allows either
20888 /// a short or long name to be specified, it is the only attribute related to file names which
20889 /// should be specified.
20890 /// </summary>
20891 public string ShortName
20892 {
20893 get
20894 {
20895 return this.shortNameField;
20896 }
20897 set
20898 {
20899 this.shortNameFieldSet = true;
20900 this.shortNameField = value;
20901 }
20902 }
20903
20904 /// <summary>
20905 /// The minimum size of the file.
20906 /// </summary>
20907 public int MinSize
20908 {
20909 get
20910 {
20911 return this.minSizeField;
20912 }
20913 set
20914 {
20915 this.minSizeFieldSet = true;
20916 this.minSizeField = value;
20917 }
20918 }
20919
20920 /// <summary>
20921 /// The maximum size of the file.
20922 /// </summary>
20923 public int MaxSize
20924 {
20925 get
20926 {
20927 return this.maxSizeField;
20928 }
20929 set
20930 {
20931 this.maxSizeFieldSet = true;
20932 this.maxSizeField = value;
20933 }
20934 }
20935
20936 /// <summary>
20937 /// The minimum version of the file.
20938 /// </summary>
20939 public string MinVersion
20940 {
20941 get
20942 {
20943 return this.minVersionField;
20944 }
20945 set
20946 {
20947 this.minVersionFieldSet = true;
20948 this.minVersionField = value;
20949 }
20950 }
20951
20952 /// <summary>
20953 /// The maximum version of the file.
20954 /// </summary>
20955 public string MaxVersion
20956 {
20957 get
20958 {
20959 return this.maxVersionField;
20960 }
20961 set
20962 {
20963 this.maxVersionFieldSet = true;
20964 this.maxVersionField = value;
20965 }
20966 }
20967
20968 /// <summary>
20969 /// 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.
20970 /// </summary>
20971 public DateTime MinDate
20972 {
20973 get
20974 {
20975 return this.minDateField;
20976 }
20977 set
20978 {
20979 this.minDateFieldSet = true;
20980 this.minDateField = value;
20981 }
20982 }
20983
20984 /// <summary>
20985 /// 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.
20986 /// </summary>
20987 public DateTime MaxDate
20988 {
20989 get
20990 {
20991 return this.maxDateField;
20992 }
20993 set
20994 {
20995 this.maxDateFieldSet = true;
20996 this.maxDateField = value;
20997 }
20998 }
20999
21000 /// <summary>
21001 /// The languages supported by the file.
21002 /// </summary>
21003 public string Languages
21004 {
21005 get
21006 {
21007 return this.languagesField;
21008 }
21009 set
21010 {
21011 this.languagesFieldSet = true;
21012 this.languagesField = value;
21013 }
21014 }
21015
21016 public virtual ISchemaElement ParentElement
21017 {
21018 get
21019 {
21020 return this.parentElement;
21021 }
21022 set
21023 {
21024 this.parentElement = value;
21025 }
21026 }
21027
21028 /// <summary>
21029 /// Processes this element and all child elements into an XmlWriter.
21030 /// </summary>
21031 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
21032 public virtual void OutputXml(XmlWriter writer)
21033 {
21034 if ((null == writer))
21035 {
21036 throw new ArgumentNullException("writer");
21037 }
21038 writer.WriteStartElement("FileSearch", "http://wixtoolset.org/schemas/v4/wxs");
21039 if (this.idFieldSet)
21040 {
21041 writer.WriteAttributeString("Id", this.idField);
21042 }
21043 if (this.nameFieldSet)
21044 {
21045 writer.WriteAttributeString("Name", this.nameField);
21046 }
21047 if (this.shortNameFieldSet)
21048 {
21049 writer.WriteAttributeString("ShortName", this.shortNameField);
21050 }
21051 if (this.minSizeFieldSet)
21052 {
21053 writer.WriteAttributeString("MinSize", this.minSizeField.ToString(CultureInfo.InvariantCulture));
21054 }
21055 if (this.maxSizeFieldSet)
21056 {
21057 writer.WriteAttributeString("MaxSize", this.maxSizeField.ToString(CultureInfo.InvariantCulture));
21058 }
21059 if (this.minVersionFieldSet)
21060 {
21061 writer.WriteAttributeString("MinVersion", this.minVersionField);
21062 }
21063 if (this.maxVersionFieldSet)
21064 {
21065 writer.WriteAttributeString("MaxVersion", this.maxVersionField);
21066 }
21067 if (this.minDateFieldSet)
21068 {
21069 writer.WriteAttributeString("MinDate", this.minDateField.ToString("yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture.DateTimeFormat));
21070 }
21071 if (this.maxDateFieldSet)
21072 {
21073 writer.WriteAttributeString("MaxDate", this.maxDateField.ToString("yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture.DateTimeFormat));
21074 }
21075 if (this.languagesFieldSet)
21076 {
21077 writer.WriteAttributeString("Languages", this.languagesField);
21078 }
21079 writer.WriteEndElement();
21080 }
21081
21082 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21083 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
21084 void ISetAttributes.SetAttribute(string name, string value)
21085 {
21086 if (String.IsNullOrEmpty(name))
21087 {
21088 throw new ArgumentNullException("name");
21089 }
21090 if (("Id" == name))
21091 {
21092 this.idField = value;
21093 this.idFieldSet = true;
21094 }
21095 if (("Name" == name))
21096 {
21097 this.nameField = value;
21098 this.nameFieldSet = true;
21099 }
21100 if (("ShortName" == name))
21101 {
21102 this.shortNameField = value;
21103 this.shortNameFieldSet = true;
21104 }
21105 if (("MinSize" == name))
21106 {
21107 this.minSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
21108 this.minSizeFieldSet = true;
21109 }
21110 if (("MaxSize" == name))
21111 {
21112 this.maxSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
21113 this.maxSizeFieldSet = true;
21114 }
21115 if (("MinVersion" == name))
21116 {
21117 this.minVersionField = value;
21118 this.minVersionFieldSet = true;
21119 }
21120 if (("MaxVersion" == name))
21121 {
21122 this.maxVersionField = value;
21123 this.maxVersionFieldSet = true;
21124 }
21125 if (("MinDate" == name))
21126 {
21127 this.minDateField = Convert.ToDateTime(value, CultureInfo.InvariantCulture);
21128 this.minDateFieldSet = true;
21129 }
21130 if (("MaxDate" == name))
21131 {
21132 this.maxDateField = Convert.ToDateTime(value, CultureInfo.InvariantCulture);
21133 this.maxDateFieldSet = true;
21134 }
21135 if (("Languages" == name))
21136 {
21137 this.languagesField = value;
21138 this.languagesFieldSet = true;
21139 }
21140 }
21141 }
21142
21143 /// <summary>
21144 /// References an existing FileSearch element.
21145 /// </summary>
21146 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21147 public class FileSearchRef : ISchemaElement, ISetAttributes
21148 {
21149
21150 private string idField;
21151
21152 private bool idFieldSet;
21153
21154 private ISchemaElement parentElement;
21155
21156 /// <summary>
21157 /// Specify the Id to the FileSearch to reference.
21158 /// </summary>
21159 public string Id
21160 {
21161 get
21162 {
21163 return this.idField;
21164 }
21165 set
21166 {
21167 this.idFieldSet = true;
21168 this.idField = value;
21169 }
21170 }
21171
21172 public virtual ISchemaElement ParentElement
21173 {
21174 get
21175 {
21176 return this.parentElement;
21177 }
21178 set
21179 {
21180 this.parentElement = value;
21181 }
21182 }
21183
21184 /// <summary>
21185 /// Processes this element and all child elements into an XmlWriter.
21186 /// </summary>
21187 public virtual void OutputXml(XmlWriter writer)
21188 {
21189 if ((null == writer))
21190 {
21191 throw new ArgumentNullException("writer");
21192 }
21193 writer.WriteStartElement("FileSearchRef", "http://wixtoolset.org/schemas/v4/wxs");
21194 if (this.idFieldSet)
21195 {
21196 writer.WriteAttributeString("Id", this.idField);
21197 }
21198 writer.WriteEndElement();
21199 }
21200
21201 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21202 void ISetAttributes.SetAttribute(string name, string value)
21203 {
21204 if (String.IsNullOrEmpty(name))
21205 {
21206 throw new ArgumentNullException("name");
21207 }
21208 if (("Id" == name))
21209 {
21210 this.idField = value;
21211 this.idFieldSet = true;
21212 }
21213 }
21214 }
21215
21216 /// <summary>
21217 /// Searches for directory and assigns to value of parent Property.
21218 /// </summary>
21219 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21220 public class DirectorySearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
21221 {
21222
21223 private ElementCollection children;
21224
21225 private string idField;
21226
21227 private bool idFieldSet;
21228
21229 private string pathField;
21230
21231 private bool pathFieldSet;
21232
21233 private int depthField;
21234
21235 private bool depthFieldSet;
21236
21237 private YesNoType assignToPropertyField;
21238
21239 private bool assignToPropertyFieldSet;
21240
21241 private ISchemaElement parentElement;
21242
21243 public DirectorySearch()
21244 {
21245 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
21246 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
21247 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
21248 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch)));
21249 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef)));
21250 this.children = childCollection0;
21251 }
21252
21253 public virtual IEnumerable Children
21254 {
21255 get
21256 {
21257 return this.children;
21258 }
21259 }
21260
21261 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
21262 public virtual IEnumerable this[System.Type childType]
21263 {
21264 get
21265 {
21266 return this.children.Filter(childType);
21267 }
21268 }
21269
21270 /// <summary>
21271 /// Unique identifier for the directory search.
21272 /// </summary>
21273 public string Id
21274 {
21275 get
21276 {
21277 return this.idField;
21278 }
21279 set
21280 {
21281 this.idFieldSet = true;
21282 this.idField = value;
21283 }
21284 }
21285
21286 /// <summary>
21287 /// Path on the user's system. Either absolute, or relative to containing directories.
21288 /// </summary>
21289 public string Path
21290 {
21291 get
21292 {
21293 return this.pathField;
21294 }
21295 set
21296 {
21297 this.pathFieldSet = true;
21298 this.pathField = value;
21299 }
21300 }
21301
21302 /// <summary>
21303 /// Depth below the path that the installer searches for the file or directory specified by the search. See remarks for more information.
21304 /// </summary>
21305 public int Depth
21306 {
21307 get
21308 {
21309 return this.depthField;
21310 }
21311 set
21312 {
21313 this.depthFieldSet = true;
21314 this.depthField = value;
21315 }
21316 }
21317
21318 /// <summary>
21319 /// Set the value of the outer Property to the result of this search. See remarks for more information.
21320 /// </summary>
21321 public YesNoType AssignToProperty
21322 {
21323 get
21324 {
21325 return this.assignToPropertyField;
21326 }
21327 set
21328 {
21329 this.assignToPropertyFieldSet = true;
21330 this.assignToPropertyField = value;
21331 }
21332 }
21333
21334 public virtual ISchemaElement ParentElement
21335 {
21336 get
21337 {
21338 return this.parentElement;
21339 }
21340 set
21341 {
21342 this.parentElement = value;
21343 }
21344 }
21345
21346 public virtual void AddChild(ISchemaElement child)
21347 {
21348 if ((null == child))
21349 {
21350 throw new ArgumentNullException("child");
21351 }
21352 this.children.AddElement(child);
21353 child.ParentElement = this;
21354 }
21355
21356 public virtual void RemoveChild(ISchemaElement child)
21357 {
21358 if ((null == child))
21359 {
21360 throw new ArgumentNullException("child");
21361 }
21362 this.children.RemoveElement(child);
21363 child.ParentElement = null;
21364 }
21365
21366 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21367 ISchemaElement ICreateChildren.CreateChild(string childName)
21368 {
21369 if (String.IsNullOrEmpty(childName))
21370 {
21371 throw new ArgumentNullException("childName");
21372 }
21373 ISchemaElement childValue = null;
21374 if (("DirectorySearch" == childName))
21375 {
21376 childValue = new DirectorySearch();
21377 }
21378 if (("DirectorySearchRef" == childName))
21379 {
21380 childValue = new DirectorySearchRef();
21381 }
21382 if (("FileSearch" == childName))
21383 {
21384 childValue = new FileSearch();
21385 }
21386 if (("FileSearchRef" == childName))
21387 {
21388 childValue = new FileSearchRef();
21389 }
21390 if ((null == childValue))
21391 {
21392 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
21393 }
21394 return childValue;
21395 }
21396
21397 /// <summary>
21398 /// Processes this element and all child elements into an XmlWriter.
21399 /// </summary>
21400 public virtual void OutputXml(XmlWriter writer)
21401 {
21402 if ((null == writer))
21403 {
21404 throw new ArgumentNullException("writer");
21405 }
21406 writer.WriteStartElement("DirectorySearch", "http://wixtoolset.org/schemas/v4/wxs");
21407 if (this.idFieldSet)
21408 {
21409 writer.WriteAttributeString("Id", this.idField);
21410 }
21411 if (this.pathFieldSet)
21412 {
21413 writer.WriteAttributeString("Path", this.pathField);
21414 }
21415 if (this.depthFieldSet)
21416 {
21417 writer.WriteAttributeString("Depth", this.depthField.ToString(CultureInfo.InvariantCulture));
21418 }
21419 if (this.assignToPropertyFieldSet)
21420 {
21421 if ((this.assignToPropertyField == YesNoType.no))
21422 {
21423 writer.WriteAttributeString("AssignToProperty", "no");
21424 }
21425 if ((this.assignToPropertyField == YesNoType.yes))
21426 {
21427 writer.WriteAttributeString("AssignToProperty", "yes");
21428 }
21429 }
21430 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
21431 {
21432 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
21433 childElement.OutputXml(writer);
21434 }
21435 writer.WriteEndElement();
21436 }
21437
21438 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21439 void ISetAttributes.SetAttribute(string name, string value)
21440 {
21441 if (String.IsNullOrEmpty(name))
21442 {
21443 throw new ArgumentNullException("name");
21444 }
21445 if (("Id" == name))
21446 {
21447 this.idField = value;
21448 this.idFieldSet = true;
21449 }
21450 if (("Path" == name))
21451 {
21452 this.pathField = value;
21453 this.pathFieldSet = true;
21454 }
21455 if (("Depth" == name))
21456 {
21457 this.depthField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
21458 this.depthFieldSet = true;
21459 }
21460 if (("AssignToProperty" == name))
21461 {
21462 this.assignToPropertyField = Enums.ParseYesNoType(value);
21463 this.assignToPropertyFieldSet = true;
21464 }
21465 }
21466 }
21467
21468 /// <summary>
21469 /// References an existing DirectorySearch element.
21470 /// </summary>
21471 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21472 public class DirectorySearchRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
21473 {
21474
21475 private ElementCollection children;
21476
21477 private string idField;
21478
21479 private bool idFieldSet;
21480
21481 private string parentField;
21482
21483 private bool parentFieldSet;
21484
21485 private string pathField;
21486
21487 private bool pathFieldSet;
21488
21489 private ISchemaElement parentElement;
21490
21491 public DirectorySearchRef()
21492 {
21493 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
21494 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
21495 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
21496 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch)));
21497 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef)));
21498 this.children = childCollection0;
21499 }
21500
21501 public virtual IEnumerable Children
21502 {
21503 get
21504 {
21505 return this.children;
21506 }
21507 }
21508
21509 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
21510 public virtual IEnumerable this[System.Type childType]
21511 {
21512 get
21513 {
21514 return this.children.Filter(childType);
21515 }
21516 }
21517
21518 /// <summary>
21519 /// Id of the search being referred to.
21520 /// </summary>
21521 public string Id
21522 {
21523 get
21524 {
21525 return this.idField;
21526 }
21527 set
21528 {
21529 this.idFieldSet = true;
21530 this.idField = value;
21531 }
21532 }
21533
21534 /// <summary>
21535 /// 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.
21536 /// </summary>
21537 public string Parent
21538 {
21539 get
21540 {
21541 return this.parentField;
21542 }
21543 set
21544 {
21545 this.parentFieldSet = true;
21546 this.parentField = value;
21547 }
21548 }
21549
21550 /// <summary>
21551 /// Path on the user's system. Either absolute, or relative to containing directories.
21552 /// </summary>
21553 public string Path
21554 {
21555 get
21556 {
21557 return this.pathField;
21558 }
21559 set
21560 {
21561 this.pathFieldSet = true;
21562 this.pathField = value;
21563 }
21564 }
21565
21566 public virtual ISchemaElement ParentElement
21567 {
21568 get
21569 {
21570 return this.parentElement;
21571 }
21572 set
21573 {
21574 this.parentElement = value;
21575 }
21576 }
21577
21578 public virtual void AddChild(ISchemaElement child)
21579 {
21580 if ((null == child))
21581 {
21582 throw new ArgumentNullException("child");
21583 }
21584 this.children.AddElement(child);
21585 child.ParentElement = this;
21586 }
21587
21588 public virtual void RemoveChild(ISchemaElement child)
21589 {
21590 if ((null == child))
21591 {
21592 throw new ArgumentNullException("child");
21593 }
21594 this.children.RemoveElement(child);
21595 child.ParentElement = null;
21596 }
21597
21598 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21599 ISchemaElement ICreateChildren.CreateChild(string childName)
21600 {
21601 if (String.IsNullOrEmpty(childName))
21602 {
21603 throw new ArgumentNullException("childName");
21604 }
21605 ISchemaElement childValue = null;
21606 if (("DirectorySearch" == childName))
21607 {
21608 childValue = new DirectorySearch();
21609 }
21610 if (("DirectorySearchRef" == childName))
21611 {
21612 childValue = new DirectorySearchRef();
21613 }
21614 if (("FileSearch" == childName))
21615 {
21616 childValue = new FileSearch();
21617 }
21618 if (("FileSearchRef" == childName))
21619 {
21620 childValue = new FileSearchRef();
21621 }
21622 if ((null == childValue))
21623 {
21624 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
21625 }
21626 return childValue;
21627 }
21628
21629 /// <summary>
21630 /// Processes this element and all child elements into an XmlWriter.
21631 /// </summary>
21632 public virtual void OutputXml(XmlWriter writer)
21633 {
21634 if ((null == writer))
21635 {
21636 throw new ArgumentNullException("writer");
21637 }
21638 writer.WriteStartElement("DirectorySearchRef", "http://wixtoolset.org/schemas/v4/wxs");
21639 if (this.idFieldSet)
21640 {
21641 writer.WriteAttributeString("Id", this.idField);
21642 }
21643 if (this.parentFieldSet)
21644 {
21645 writer.WriteAttributeString("Parent", this.parentField);
21646 }
21647 if (this.pathFieldSet)
21648 {
21649 writer.WriteAttributeString("Path", this.pathField);
21650 }
21651 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
21652 {
21653 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
21654 childElement.OutputXml(writer);
21655 }
21656 writer.WriteEndElement();
21657 }
21658
21659 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21660 void ISetAttributes.SetAttribute(string name, string value)
21661 {
21662 if (String.IsNullOrEmpty(name))
21663 {
21664 throw new ArgumentNullException("name");
21665 }
21666 if (("Id" == name))
21667 {
21668 this.idField = value;
21669 this.idFieldSet = true;
21670 }
21671 if (("Parent" == name))
21672 {
21673 this.parentField = value;
21674 this.parentFieldSet = true;
21675 }
21676 if (("Path" == name))
21677 {
21678 this.pathField = value;
21679 this.pathFieldSet = true;
21680 }
21681 }
21682 }
21683
21684 /// <summary>
21685 /// Searches for file or directory and assigns to value of parent Property.
21686 /// </summary>
21687 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21688 public class ComponentSearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
21689 {
21690
21691 private ElementCollection children;
21692
21693 private string idField;
21694
21695 private bool idFieldSet;
21696
21697 private string guidField;
21698
21699 private bool guidFieldSet;
21700
21701 private TypeType typeField;
21702
21703 private bool typeFieldSet;
21704
21705 private ISchemaElement parentElement;
21706
21707 public ComponentSearch()
21708 {
21709 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
21710 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
21711 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
21712 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch)));
21713 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef)));
21714 this.children = childCollection0;
21715 }
21716
21717 public virtual IEnumerable Children
21718 {
21719 get
21720 {
21721 return this.children;
21722 }
21723 }
21724
21725 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
21726 public virtual IEnumerable this[System.Type childType]
21727 {
21728 get
21729 {
21730 return this.children.Filter(childType);
21731 }
21732 }
21733
21734 public string Id
21735 {
21736 get
21737 {
21738 return this.idField;
21739 }
21740 set
21741 {
21742 this.idFieldSet = true;
21743 this.idField = value;
21744 }
21745 }
21746
21747 /// <summary>
21748 /// The component ID of the component whose key path is to be used for the search.
21749 /// </summary>
21750 public string Guid
21751 {
21752 get
21753 {
21754 return this.guidField;
21755 }
21756 set
21757 {
21758 this.guidFieldSet = true;
21759 this.guidField = value;
21760 }
21761 }
21762
21763 /// <summary>
21764 /// Must be file if last child is FileSearch element and must be directory if last child is DirectorySearch element.
21765 /// </summary>
21766 public TypeType Type
21767 {
21768 get
21769 {
21770 return this.typeField;
21771 }
21772 set
21773 {
21774 this.typeFieldSet = true;
21775 this.typeField = value;
21776 }
21777 }
21778
21779 public virtual ISchemaElement ParentElement
21780 {
21781 get
21782 {
21783 return this.parentElement;
21784 }
21785 set
21786 {
21787 this.parentElement = value;
21788 }
21789 }
21790
21791 public virtual void AddChild(ISchemaElement child)
21792 {
21793 if ((null == child))
21794 {
21795 throw new ArgumentNullException("child");
21796 }
21797 this.children.AddElement(child);
21798 child.ParentElement = this;
21799 }
21800
21801 public virtual void RemoveChild(ISchemaElement child)
21802 {
21803 if ((null == child))
21804 {
21805 throw new ArgumentNullException("child");
21806 }
21807 this.children.RemoveElement(child);
21808 child.ParentElement = null;
21809 }
21810
21811 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21812 ISchemaElement ICreateChildren.CreateChild(string childName)
21813 {
21814 if (String.IsNullOrEmpty(childName))
21815 {
21816 throw new ArgumentNullException("childName");
21817 }
21818 ISchemaElement childValue = null;
21819 if (("DirectorySearch" == childName))
21820 {
21821 childValue = new DirectorySearch();
21822 }
21823 if (("DirectorySearchRef" == childName))
21824 {
21825 childValue = new DirectorySearchRef();
21826 }
21827 if (("FileSearch" == childName))
21828 {
21829 childValue = new FileSearch();
21830 }
21831 if (("FileSearchRef" == childName))
21832 {
21833 childValue = new FileSearchRef();
21834 }
21835 if ((null == childValue))
21836 {
21837 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
21838 }
21839 return childValue;
21840 }
21841
21842 /// <summary>
21843 /// Parses a TypeType from a string.
21844 /// </summary>
21845 public static TypeType ParseTypeType(string value)
21846 {
21847 TypeType parsedValue;
21848 ComponentSearch.TryParseTypeType(value, out parsedValue);
21849 return parsedValue;
21850 }
21851
21852 /// <summary>
21853 /// Tries to parse a TypeType from a string.
21854 /// </summary>
21855 public static bool TryParseTypeType(string value, out TypeType parsedValue)
21856 {
21857 parsedValue = TypeType.NotSet;
21858 if (string.IsNullOrEmpty(value))
21859 {
21860 return false;
21861 }
21862 if (("directory" == value))
21863 {
21864 parsedValue = TypeType.directory;
21865 }
21866 else
21867 {
21868 if (("file" == value))
21869 {
21870 parsedValue = TypeType.file;
21871 }
21872 else
21873 {
21874 parsedValue = TypeType.IllegalValue;
21875 return false;
21876 }
21877 }
21878 return true;
21879 }
21880
21881 /// <summary>
21882 /// Processes this element and all child elements into an XmlWriter.
21883 /// </summary>
21884 public virtual void OutputXml(XmlWriter writer)
21885 {
21886 if ((null == writer))
21887 {
21888 throw new ArgumentNullException("writer");
21889 }
21890 writer.WriteStartElement("ComponentSearch", "http://wixtoolset.org/schemas/v4/wxs");
21891 if (this.idFieldSet)
21892 {
21893 writer.WriteAttributeString("Id", this.idField);
21894 }
21895 if (this.guidFieldSet)
21896 {
21897 writer.WriteAttributeString("Guid", this.guidField);
21898 }
21899 if (this.typeFieldSet)
21900 {
21901 if ((this.typeField == TypeType.directory))
21902 {
21903 writer.WriteAttributeString("Type", "directory");
21904 }
21905 if ((this.typeField == TypeType.file))
21906 {
21907 writer.WriteAttributeString("Type", "file");
21908 }
21909 }
21910 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
21911 {
21912 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
21913 childElement.OutputXml(writer);
21914 }
21915 writer.WriteEndElement();
21916 }
21917
21918 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
21919 void ISetAttributes.SetAttribute(string name, string value)
21920 {
21921 if (String.IsNullOrEmpty(name))
21922 {
21923 throw new ArgumentNullException("name");
21924 }
21925 if (("Id" == name))
21926 {
21927 this.idField = value;
21928 this.idFieldSet = true;
21929 }
21930 if (("Guid" == name))
21931 {
21932 this.guidField = value;
21933 this.guidFieldSet = true;
21934 }
21935 if (("Type" == name))
21936 {
21937 this.typeField = ComponentSearch.ParseTypeType(value);
21938 this.typeFieldSet = true;
21939 }
21940 }
21941
21942 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21943 public enum TypeType
21944 {
21945
21946 IllegalValue = int.MaxValue,
21947
21948 NotSet = -1,
21949
21950 /// <summary>
21951 /// The key path of the component is a directory.
21952 /// </summary>
21953 directory,
21954
21955 /// <summary>
21956 /// The key path of the component is a file. This is the default value.
21957 /// </summary>
21958 file,
21959 }
21960 }
21961
21962 /// <summary>
21963 /// Searches for file, directory or registry key and assigns to value of parent Property
21964 /// </summary>
21965 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
21966 public class IniFileSearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
21967 {
21968
21969 private ElementCollection children;
21970
21971 private string idField;
21972
21973 private bool idFieldSet;
21974
21975 private int fieldField;
21976
21977 private bool fieldFieldSet;
21978
21979 private string keyField;
21980
21981 private bool keyFieldSet;
21982
21983 private string nameField;
21984
21985 private bool nameFieldSet;
21986
21987 private string sectionField;
21988
21989 private bool sectionFieldSet;
21990
21991 private string shortNameField;
21992
21993 private bool shortNameFieldSet;
21994
21995 private TypeType typeField;
21996
21997 private bool typeFieldSet;
21998
21999 private ISchemaElement parentElement;
22000
22001 public IniFileSearch()
22002 {
22003 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
22004 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
22005 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
22006 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch)));
22007 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef)));
22008 this.children = childCollection0;
22009 }
22010
22011 public virtual IEnumerable Children
22012 {
22013 get
22014 {
22015 return this.children;
22016 }
22017 }
22018
22019 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
22020 public virtual IEnumerable this[System.Type childType]
22021 {
22022 get
22023 {
22024 return this.children.Filter(childType);
22025 }
22026 }
22027
22028 /// <summary>
22029 /// External key into the Signature table.
22030 /// </summary>
22031 public string Id
22032 {
22033 get
22034 {
22035 return this.idField;
22036 }
22037 set
22038 {
22039 this.idFieldSet = true;
22040 this.idField = value;
22041 }
22042 }
22043
22044 /// <summary>
22045 /// The field in the .ini line. If field is Null or 0, the entire line is read.
22046 /// </summary>
22047 public int Field
22048 {
22049 get
22050 {
22051 return this.fieldField;
22052 }
22053 set
22054 {
22055 this.fieldFieldSet = true;
22056 this.fieldField = value;
22057 }
22058 }
22059
22060 /// <summary>
22061 /// The key value within the section.
22062 /// </summary>
22063 public string Key
22064 {
22065 get
22066 {
22067 return this.keyField;
22068 }
22069 set
22070 {
22071 this.keyFieldSet = true;
22072 this.keyField = value;
22073 }
22074 }
22075
22076 /// <summary>
22077 /// In prior versions of the WiX toolset, this attribute specified the short name.
22078 /// This attribute's value may now be either a short or long name.
22079 /// If a short name is specified, the ShortName attribute may not be specified.
22080 /// Also, if this value is a long name, the ShortName attribute may be omitted to
22081 /// allow WiX to attempt to generate a unique short name.
22082 /// However, if you wish to manually specify the short name, then the ShortName
22083 /// attribute may be specified.
22084 /// </summary>
22085 public string Name
22086 {
22087 get
22088 {
22089 return this.nameField;
22090 }
22091 set
22092 {
22093 this.nameFieldSet = true;
22094 this.nameField = value;
22095 }
22096 }
22097
22098 /// <summary>
22099 /// The localizable .ini file section.
22100 /// </summary>
22101 public string Section
22102 {
22103 get
22104 {
22105 return this.sectionField;
22106 }
22107 set
22108 {
22109 this.sectionFieldSet = true;
22110 this.sectionField = value;
22111 }
22112 }
22113
22114 /// <summary>
22115 /// The short name of the file in 8.3 format.
22116 /// This attribute should only be set if the user wants to manually specify the short name.
22117 /// </summary>
22118 public string ShortName
22119 {
22120 get
22121 {
22122 return this.shortNameField;
22123 }
22124 set
22125 {
22126 this.shortNameFieldSet = true;
22127 this.shortNameField = value;
22128 }
22129 }
22130
22131 /// <summary>
22132 /// Must be file if last child is FileSearch element and must be directory if last child is DirectorySearch element.
22133 /// </summary>
22134 public TypeType Type
22135 {
22136 get
22137 {
22138 return this.typeField;
22139 }
22140 set
22141 {
22142 this.typeFieldSet = true;
22143 this.typeField = value;
22144 }
22145 }
22146
22147 public virtual ISchemaElement ParentElement
22148 {
22149 get
22150 {
22151 return this.parentElement;
22152 }
22153 set
22154 {
22155 this.parentElement = value;
22156 }
22157 }
22158
22159 public virtual void AddChild(ISchemaElement child)
22160 {
22161 if ((null == child))
22162 {
22163 throw new ArgumentNullException("child");
22164 }
22165 this.children.AddElement(child);
22166 child.ParentElement = this;
22167 }
22168
22169 public virtual void RemoveChild(ISchemaElement child)
22170 {
22171 if ((null == child))
22172 {
22173 throw new ArgumentNullException("child");
22174 }
22175 this.children.RemoveElement(child);
22176 child.ParentElement = null;
22177 }
22178
22179 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
22180 ISchemaElement ICreateChildren.CreateChild(string childName)
22181 {
22182 if (String.IsNullOrEmpty(childName))
22183 {
22184 throw new ArgumentNullException("childName");
22185 }
22186 ISchemaElement childValue = null;
22187 if (("DirectorySearch" == childName))
22188 {
22189 childValue = new DirectorySearch();
22190 }
22191 if (("DirectorySearchRef" == childName))
22192 {
22193 childValue = new DirectorySearchRef();
22194 }
22195 if (("FileSearch" == childName))
22196 {
22197 childValue = new FileSearch();
22198 }
22199 if (("FileSearchRef" == childName))
22200 {
22201 childValue = new FileSearchRef();
22202 }
22203 if ((null == childValue))
22204 {
22205 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
22206 }
22207 return childValue;
22208 }
22209
22210 /// <summary>
22211 /// Parses a TypeType from a string.
22212 /// </summary>
22213 public static TypeType ParseTypeType(string value)
22214 {
22215 TypeType parsedValue;
22216 IniFileSearch.TryParseTypeType(value, out parsedValue);
22217 return parsedValue;
22218 }
22219
22220 /// <summary>
22221 /// Tries to parse a TypeType from a string.
22222 /// </summary>
22223 public static bool TryParseTypeType(string value, out TypeType parsedValue)
22224 {
22225 parsedValue = TypeType.NotSet;
22226 if (string.IsNullOrEmpty(value))
22227 {
22228 return false;
22229 }
22230 if (("directory" == value))
22231 {
22232 parsedValue = TypeType.directory;
22233 }
22234 else
22235 {
22236 if (("file" == value))
22237 {
22238 parsedValue = TypeType.file;
22239 }
22240 else
22241 {
22242 if (("raw" == value))
22243 {
22244 parsedValue = TypeType.raw;
22245 }
22246 else
22247 {
22248 parsedValue = TypeType.IllegalValue;
22249 return false;
22250 }
22251 }
22252 }
22253 return true;
22254 }
22255
22256 /// <summary>
22257 /// Processes this element and all child elements into an XmlWriter.
22258 /// </summary>
22259 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
22260 public virtual void OutputXml(XmlWriter writer)
22261 {
22262 if ((null == writer))
22263 {
22264 throw new ArgumentNullException("writer");
22265 }
22266 writer.WriteStartElement("IniFileSearch", "http://wixtoolset.org/schemas/v4/wxs");
22267 if (this.idFieldSet)
22268 {
22269 writer.WriteAttributeString("Id", this.idField);
22270 }
22271 if (this.fieldFieldSet)
22272 {
22273 writer.WriteAttributeString("Field", this.fieldField.ToString(CultureInfo.InvariantCulture));
22274 }
22275 if (this.keyFieldSet)
22276 {
22277 writer.WriteAttributeString("Key", this.keyField);
22278 }
22279 if (this.nameFieldSet)
22280 {
22281 writer.WriteAttributeString("Name", this.nameField);
22282 }
22283 if (this.sectionFieldSet)
22284 {
22285 writer.WriteAttributeString("Section", this.sectionField);
22286 }
22287 if (this.shortNameFieldSet)
22288 {
22289 writer.WriteAttributeString("ShortName", this.shortNameField);
22290 }
22291 if (this.typeFieldSet)
22292 {
22293 if ((this.typeField == TypeType.directory))
22294 {
22295 writer.WriteAttributeString("Type", "directory");
22296 }
22297 if ((this.typeField == TypeType.file))
22298 {
22299 writer.WriteAttributeString("Type", "file");
22300 }
22301 if ((this.typeField == TypeType.raw))
22302 {
22303 writer.WriteAttributeString("Type", "raw");
22304 }
22305 }
22306 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
22307 {
22308 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
22309 childElement.OutputXml(writer);
22310 }
22311 writer.WriteEndElement();
22312 }
22313
22314 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
22315 void ISetAttributes.SetAttribute(string name, string value)
22316 {
22317 if (String.IsNullOrEmpty(name))
22318 {
22319 throw new ArgumentNullException("name");
22320 }
22321 if (("Id" == name))
22322 {
22323 this.idField = value;
22324 this.idFieldSet = true;
22325 }
22326 if (("Field" == name))
22327 {
22328 this.fieldField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
22329 this.fieldFieldSet = true;
22330 }
22331 if (("Key" == name))
22332 {
22333 this.keyField = value;
22334 this.keyFieldSet = true;
22335 }
22336 if (("Name" == name))
22337 {
22338 this.nameField = value;
22339 this.nameFieldSet = true;
22340 }
22341 if (("Section" == name))
22342 {
22343 this.sectionField = value;
22344 this.sectionFieldSet = true;
22345 }
22346 if (("ShortName" == name))
22347 {
22348 this.shortNameField = value;
22349 this.shortNameFieldSet = true;
22350 }
22351 if (("Type" == name))
22352 {
22353 this.typeField = IniFileSearch.ParseTypeType(value);
22354 this.typeFieldSet = true;
22355 }
22356 }
22357
22358 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22359 public enum TypeType
22360 {
22361
22362 IllegalValue = int.MaxValue,
22363
22364 NotSet = -1,
22365
22366 /// <summary>
22367 /// A directory location.
22368 /// </summary>
22369 directory,
22370
22371 /// <summary>
22372 /// A file location. This is the default value.
22373 /// </summary>
22374 file,
22375
22376 /// <summary>
22377 /// A raw .ini value.
22378 /// </summary>
22379 raw,
22380 }
22381 }
22382
22383 /// <summary>
22384 /// Searches for file, directory or registry key and assigns to value of parent Property
22385 /// </summary>
22386 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22387 public class RegistrySearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
22388 {
22389
22390 private ElementCollection children;
22391
22392 private string idField;
22393
22394 private bool idFieldSet;
22395
22396 private RootType rootField;
22397
22398 private bool rootFieldSet;
22399
22400 private string keyField;
22401
22402 private bool keyFieldSet;
22403
22404 private string nameField;
22405
22406 private bool nameFieldSet;
22407
22408 private TypeType typeField;
22409
22410 private bool typeFieldSet;
22411
22412 private YesNoType win64Field;
22413
22414 private bool win64FieldSet;
22415
22416 private ISchemaElement parentElement;
22417
22418 public RegistrySearch()
22419 {
22420 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
22421 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
22422 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
22423 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch)));
22424 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef)));
22425 this.children = childCollection0;
22426 }
22427
22428 public virtual IEnumerable Children
22429 {
22430 get
22431 {
22432 return this.children;
22433 }
22434 }
22435
22436 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
22437 public virtual IEnumerable this[System.Type childType]
22438 {
22439 get
22440 {
22441 return this.children.Filter(childType);
22442 }
22443 }
22444
22445 /// <summary>
22446 /// Signature to be used for the file, directory or registry key being searched for.
22447 /// </summary>
22448 public string Id
22449 {
22450 get
22451 {
22452 return this.idField;
22453 }
22454 set
22455 {
22456 this.idFieldSet = true;
22457 this.idField = value;
22458 }
22459 }
22460
22461 /// <summary>
22462 /// Root key for the registry value.
22463 /// </summary>
22464 public RootType Root
22465 {
22466 get
22467 {
22468 return this.rootField;
22469 }
22470 set
22471 {
22472 this.rootFieldSet = true;
22473 this.rootField = value;
22474 }
22475 }
22476
22477 /// <summary>
22478 /// Key for the registry value.
22479 /// </summary>
22480 public string Key
22481 {
22482 get
22483 {
22484 return this.keyField;
22485 }
22486 set
22487 {
22488 this.keyFieldSet = true;
22489 this.keyField = value;
22490 }
22491 }
22492
22493 /// <summary>
22494 /// Registry value name. If this value is null, then the value from the key's unnamed or default value, if any, is retrieved.
22495 /// </summary>
22496 public string Name
22497 {
22498 get
22499 {
22500 return this.nameField;
22501 }
22502 set
22503 {
22504 this.nameFieldSet = true;
22505 this.nameField = value;
22506 }
22507 }
22508
22509 /// <summary>
22510 /// The value must be 'file' if the child is a FileSearch element, and must be 'directory' if child is a DirectorySearch element.
22511 /// </summary>
22512 public TypeType Type
22513 {
22514 get
22515 {
22516 return this.typeField;
22517 }
22518 set
22519 {
22520 this.typeFieldSet = true;
22521 this.typeField = value;
22522 }
22523 }
22524
22525 /// <summary>
22526 /// 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.
22527 /// The default value is based on the platform set by the -arch switch to candle.exe
22528 /// or the InstallerPlatform property in a .wixproj MSBuild project:
22529 /// For x86 and ARM, the default value is 'no'.
22530 /// For x64 and IA64, the default value is 'yes'.
22531 /// </summary>
22532 public YesNoType Win64
22533 {
22534 get
22535 {
22536 return this.win64Field;
22537 }
22538 set
22539 {
22540 this.win64FieldSet = true;
22541 this.win64Field = value;
22542 }
22543 }
22544
22545 public virtual ISchemaElement ParentElement
22546 {
22547 get
22548 {
22549 return this.parentElement;
22550 }
22551 set
22552 {
22553 this.parentElement = value;
22554 }
22555 }
22556
22557 public virtual void AddChild(ISchemaElement child)
22558 {
22559 if ((null == child))
22560 {
22561 throw new ArgumentNullException("child");
22562 }
22563 this.children.AddElement(child);
22564 child.ParentElement = this;
22565 }
22566
22567 public virtual void RemoveChild(ISchemaElement child)
22568 {
22569 if ((null == child))
22570 {
22571 throw new ArgumentNullException("child");
22572 }
22573 this.children.RemoveElement(child);
22574 child.ParentElement = null;
22575 }
22576
22577 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
22578 ISchemaElement ICreateChildren.CreateChild(string childName)
22579 {
22580 if (String.IsNullOrEmpty(childName))
22581 {
22582 throw new ArgumentNullException("childName");
22583 }
22584 ISchemaElement childValue = null;
22585 if (("DirectorySearch" == childName))
22586 {
22587 childValue = new DirectorySearch();
22588 }
22589 if (("DirectorySearchRef" == childName))
22590 {
22591 childValue = new DirectorySearchRef();
22592 }
22593 if (("FileSearch" == childName))
22594 {
22595 childValue = new FileSearch();
22596 }
22597 if (("FileSearchRef" == childName))
22598 {
22599 childValue = new FileSearchRef();
22600 }
22601 if ((null == childValue))
22602 {
22603 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
22604 }
22605 return childValue;
22606 }
22607
22608 /// <summary>
22609 /// Parses a RootType from a string.
22610 /// </summary>
22611 public static RootType ParseRootType(string value)
22612 {
22613 RootType parsedValue;
22614 RegistrySearch.TryParseRootType(value, out parsedValue);
22615 return parsedValue;
22616 }
22617
22618 /// <summary>
22619 /// Tries to parse a RootType from a string.
22620 /// </summary>
22621 public static bool TryParseRootType(string value, out RootType parsedValue)
22622 {
22623 parsedValue = RootType.NotSet;
22624 if (string.IsNullOrEmpty(value))
22625 {
22626 return false;
22627 }
22628 if (("HKCR" == value))
22629 {
22630 parsedValue = RootType.HKCR;
22631 }
22632 else
22633 {
22634 if (("HKCU" == value))
22635 {
22636 parsedValue = RootType.HKCU;
22637 }
22638 else
22639 {
22640 if (("HKLM" == value))
22641 {
22642 parsedValue = RootType.HKLM;
22643 }
22644 else
22645 {
22646 if (("HKU" == value))
22647 {
22648 parsedValue = RootType.HKU;
22649 }
22650 else
22651 {
22652 parsedValue = RootType.IllegalValue;
22653 return false;
22654 }
22655 }
22656 }
22657 }
22658 return true;
22659 }
22660
22661 /// <summary>
22662 /// Parses a TypeType from a string.
22663 /// </summary>
22664 public static TypeType ParseTypeType(string value)
22665 {
22666 TypeType parsedValue;
22667 RegistrySearch.TryParseTypeType(value, out parsedValue);
22668 return parsedValue;
22669 }
22670
22671 /// <summary>
22672 /// Tries to parse a TypeType from a string.
22673 /// </summary>
22674 public static bool TryParseTypeType(string value, out TypeType parsedValue)
22675 {
22676 parsedValue = TypeType.NotSet;
22677 if (string.IsNullOrEmpty(value))
22678 {
22679 return false;
22680 }
22681 if (("directory" == value))
22682 {
22683 parsedValue = TypeType.directory;
22684 }
22685 else
22686 {
22687 if (("file" == value))
22688 {
22689 parsedValue = TypeType.file;
22690 }
22691 else
22692 {
22693 if (("raw" == value))
22694 {
22695 parsedValue = TypeType.raw;
22696 }
22697 else
22698 {
22699 parsedValue = TypeType.IllegalValue;
22700 return false;
22701 }
22702 }
22703 }
22704 return true;
22705 }
22706
22707 /// <summary>
22708 /// Processes this element and all child elements into an XmlWriter.
22709 /// </summary>
22710 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
22711 public virtual void OutputXml(XmlWriter writer)
22712 {
22713 if ((null == writer))
22714 {
22715 throw new ArgumentNullException("writer");
22716 }
22717 writer.WriteStartElement("RegistrySearch", "http://wixtoolset.org/schemas/v4/wxs");
22718 if (this.idFieldSet)
22719 {
22720 writer.WriteAttributeString("Id", this.idField);
22721 }
22722 if (this.rootFieldSet)
22723 {
22724 if ((this.rootField == RootType.HKCR))
22725 {
22726 writer.WriteAttributeString("Root", "HKCR");
22727 }
22728 if ((this.rootField == RootType.HKCU))
22729 {
22730 writer.WriteAttributeString("Root", "HKCU");
22731 }
22732 if ((this.rootField == RootType.HKLM))
22733 {
22734 writer.WriteAttributeString("Root", "HKLM");
22735 }
22736 if ((this.rootField == RootType.HKU))
22737 {
22738 writer.WriteAttributeString("Root", "HKU");
22739 }
22740 }
22741 if (this.keyFieldSet)
22742 {
22743 writer.WriteAttributeString("Key", this.keyField);
22744 }
22745 if (this.nameFieldSet)
22746 {
22747 writer.WriteAttributeString("Name", this.nameField);
22748 }
22749 if (this.typeFieldSet)
22750 {
22751 if ((this.typeField == TypeType.directory))
22752 {
22753 writer.WriteAttributeString("Type", "directory");
22754 }
22755 if ((this.typeField == TypeType.file))
22756 {
22757 writer.WriteAttributeString("Type", "file");
22758 }
22759 if ((this.typeField == TypeType.raw))
22760 {
22761 writer.WriteAttributeString("Type", "raw");
22762 }
22763 }
22764 if (this.win64FieldSet)
22765 {
22766 if ((this.win64Field == YesNoType.no))
22767 {
22768 writer.WriteAttributeString("Win64", "no");
22769 }
22770 if ((this.win64Field == YesNoType.yes))
22771 {
22772 writer.WriteAttributeString("Win64", "yes");
22773 }
22774 }
22775 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
22776 {
22777 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
22778 childElement.OutputXml(writer);
22779 }
22780 writer.WriteEndElement();
22781 }
22782
22783 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
22784 void ISetAttributes.SetAttribute(string name, string value)
22785 {
22786 if (String.IsNullOrEmpty(name))
22787 {
22788 throw new ArgumentNullException("name");
22789 }
22790 if (("Id" == name))
22791 {
22792 this.idField = value;
22793 this.idFieldSet = true;
22794 }
22795 if (("Root" == name))
22796 {
22797 this.rootField = RegistrySearch.ParseRootType(value);
22798 this.rootFieldSet = true;
22799 }
22800 if (("Key" == name))
22801 {
22802 this.keyField = value;
22803 this.keyFieldSet = true;
22804 }
22805 if (("Name" == name))
22806 {
22807 this.nameField = value;
22808 this.nameFieldSet = true;
22809 }
22810 if (("Type" == name))
22811 {
22812 this.typeField = RegistrySearch.ParseTypeType(value);
22813 this.typeFieldSet = true;
22814 }
22815 if (("Win64" == name))
22816 {
22817 this.win64Field = Enums.ParseYesNoType(value);
22818 this.win64FieldSet = true;
22819 }
22820 }
22821
22822 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22823 public enum RootType
22824 {
22825
22826 IllegalValue = int.MaxValue,
22827
22828 NotSet = -1,
22829
22830 /// <summary>
22831 /// HKEY_CLASSES_ROOT
22832 /// </summary>
22833 HKCR,
22834
22835 /// <summary>
22836 /// HKEY_CURRENT_USER
22837 /// </summary>
22838 HKCU,
22839
22840 /// <summary>
22841 /// HKEY_LOCAL_MACHINE
22842 /// </summary>
22843 HKLM,
22844
22845 /// <summary>
22846 /// HKEY_USERS
22847 /// </summary>
22848 HKU,
22849 }
22850
22851 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22852 public enum TypeType
22853 {
22854
22855 IllegalValue = int.MaxValue,
22856
22857 NotSet = -1,
22858
22859 /// <summary>
22860 /// The registry value contains the path to a directory.
22861 /// </summary>
22862 directory,
22863
22864 /// <summary>
22865 /// 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.
22866 /// </summary>
22867 file,
22868
22869 /// <summary>
22870 /// Sets the raw value from the registry value. Please note that this value will contain a prefix as follows:
22871 /// </summary>
22872 raw,
22873 }
22874 }
22875
22876 /// <summary>
22877 /// References an existing RegistrySearch element.
22878 /// </summary>
22879 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22880 public class RegistrySearchRef : ISchemaElement, ISetAttributes
22881 {
22882
22883 private string idField;
22884
22885 private bool idFieldSet;
22886
22887 private ISchemaElement parentElement;
22888
22889 /// <summary>
22890 /// Specify the Id of the RegistrySearch to reference.
22891 /// </summary>
22892 public string Id
22893 {
22894 get
22895 {
22896 return this.idField;
22897 }
22898 set
22899 {
22900 this.idFieldSet = true;
22901 this.idField = value;
22902 }
22903 }
22904
22905 public virtual ISchemaElement ParentElement
22906 {
22907 get
22908 {
22909 return this.parentElement;
22910 }
22911 set
22912 {
22913 this.parentElement = value;
22914 }
22915 }
22916
22917 /// <summary>
22918 /// Processes this element and all child elements into an XmlWriter.
22919 /// </summary>
22920 public virtual void OutputXml(XmlWriter writer)
22921 {
22922 if ((null == writer))
22923 {
22924 throw new ArgumentNullException("writer");
22925 }
22926 writer.WriteStartElement("RegistrySearchRef", "http://wixtoolset.org/schemas/v4/wxs");
22927 if (this.idFieldSet)
22928 {
22929 writer.WriteAttributeString("Id", this.idField);
22930 }
22931 writer.WriteEndElement();
22932 }
22933
22934 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
22935 void ISetAttributes.SetAttribute(string name, string value)
22936 {
22937 if (String.IsNullOrEmpty(name))
22938 {
22939 throw new ArgumentNullException("name");
22940 }
22941 if (("Id" == name))
22942 {
22943 this.idField = value;
22944 this.idFieldSet = true;
22945 }
22946 }
22947 }
22948
22949 /// <summary>
22950 /// Sets the parent of a nested DirectorySearch element to CCP_DRIVE.
22951 /// </summary>
22952 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
22953 public class ComplianceDrive : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
22954 {
22955
22956 private ElementCollection children;
22957
22958 private ISchemaElement parentElement;
22959
22960 public ComplianceDrive()
22961 {
22962 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
22963 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch)));
22964 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef)));
22965 this.children = childCollection0;
22966 }
22967
22968 public virtual IEnumerable Children
22969 {
22970 get
22971 {
22972 return this.children;
22973 }
22974 }
22975
22976 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
22977 public virtual IEnumerable this[System.Type childType]
22978 {
22979 get
22980 {
22981 return this.children.Filter(childType);
22982 }
22983 }
22984
22985 public virtual ISchemaElement ParentElement
22986 {
22987 get
22988 {
22989 return this.parentElement;
22990 }
22991 set
22992 {
22993 this.parentElement = value;
22994 }
22995 }
22996
22997 public virtual void AddChild(ISchemaElement child)
22998 {
22999 if ((null == child))
23000 {
23001 throw new ArgumentNullException("child");
23002 }
23003 this.children.AddElement(child);
23004 child.ParentElement = this;
23005 }
23006
23007 public virtual void RemoveChild(ISchemaElement child)
23008 {
23009 if ((null == child))
23010 {
23011 throw new ArgumentNullException("child");
23012 }
23013 this.children.RemoveElement(child);
23014 child.ParentElement = null;
23015 }
23016
23017 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23018 ISchemaElement ICreateChildren.CreateChild(string childName)
23019 {
23020 if (String.IsNullOrEmpty(childName))
23021 {
23022 throw new ArgumentNullException("childName");
23023 }
23024 ISchemaElement childValue = null;
23025 if (("DirectorySearch" == childName))
23026 {
23027 childValue = new DirectorySearch();
23028 }
23029 if (("DirectorySearchRef" == childName))
23030 {
23031 childValue = new DirectorySearchRef();
23032 }
23033 if ((null == childValue))
23034 {
23035 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
23036 }
23037 return childValue;
23038 }
23039
23040 /// <summary>
23041 /// Processes this element and all child elements into an XmlWriter.
23042 /// </summary>
23043 public virtual void OutputXml(XmlWriter writer)
23044 {
23045 if ((null == writer))
23046 {
23047 throw new ArgumentNullException("writer");
23048 }
23049 writer.WriteStartElement("ComplianceDrive", "http://wixtoolset.org/schemas/v4/wxs");
23050 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
23051 {
23052 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
23053 childElement.OutputXml(writer);
23054 }
23055 writer.WriteEndElement();
23056 }
23057
23058 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23059 void ISetAttributes.SetAttribute(string name, string value)
23060 {
23061 if (String.IsNullOrEmpty(name))
23062 {
23063 throw new ArgumentNullException("name");
23064 }
23065 }
23066 }
23067
23068 /// <summary>
23069 /// Adds a row to the CCPSearch table.
23070 /// </summary>
23071 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
23072 public class ComplianceCheck : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
23073 {
23074
23075 private ElementCollection children;
23076
23077 private ISchemaElement parentElement;
23078
23079 public ComplianceCheck()
23080 {
23081 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
23082 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence);
23083 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComplianceDrive)));
23084 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComponentSearch)));
23085 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearch)));
23086 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(IniFileSearch)));
23087 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearch)));
23088 childCollection0.AddCollection(childCollection1);
23089 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
23090 this.children = childCollection0;
23091 }
23092
23093 public virtual IEnumerable Children
23094 {
23095 get
23096 {
23097 return this.children;
23098 }
23099 }
23100
23101 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
23102 public virtual IEnumerable this[System.Type childType]
23103 {
23104 get
23105 {
23106 return this.children.Filter(childType);
23107 }
23108 }
23109
23110 public virtual ISchemaElement ParentElement
23111 {
23112 get
23113 {
23114 return this.parentElement;
23115 }
23116 set
23117 {
23118 this.parentElement = value;
23119 }
23120 }
23121
23122 public virtual void AddChild(ISchemaElement child)
23123 {
23124 if ((null == child))
23125 {
23126 throw new ArgumentNullException("child");
23127 }
23128 this.children.AddElement(child);
23129 child.ParentElement = this;
23130 }
23131
23132 public virtual void RemoveChild(ISchemaElement child)
23133 {
23134 if ((null == child))
23135 {
23136 throw new ArgumentNullException("child");
23137 }
23138 this.children.RemoveElement(child);
23139 child.ParentElement = null;
23140 }
23141
23142 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23143 ISchemaElement ICreateChildren.CreateChild(string childName)
23144 {
23145 if (String.IsNullOrEmpty(childName))
23146 {
23147 throw new ArgumentNullException("childName");
23148 }
23149 ISchemaElement childValue = null;
23150 if (("ComplianceDrive" == childName))
23151 {
23152 childValue = new ComplianceDrive();
23153 }
23154 if (("ComponentSearch" == childName))
23155 {
23156 childValue = new ComponentSearch();
23157 }
23158 if (("RegistrySearch" == childName))
23159 {
23160 childValue = new RegistrySearch();
23161 }
23162 if (("IniFileSearch" == childName))
23163 {
23164 childValue = new IniFileSearch();
23165 }
23166 if (("DirectorySearch" == childName))
23167 {
23168 childValue = new DirectorySearch();
23169 }
23170 if ((null == childValue))
23171 {
23172 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
23173 }
23174 return childValue;
23175 }
23176
23177 /// <summary>
23178 /// Processes this element and all child elements into an XmlWriter.
23179 /// </summary>
23180 public virtual void OutputXml(XmlWriter writer)
23181 {
23182 if ((null == writer))
23183 {
23184 throw new ArgumentNullException("writer");
23185 }
23186 writer.WriteStartElement("ComplianceCheck", "http://wixtoolset.org/schemas/v4/wxs");
23187 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
23188 {
23189 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
23190 childElement.OutputXml(writer);
23191 }
23192 writer.WriteEndElement();
23193 }
23194
23195 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23196 void ISetAttributes.SetAttribute(string name, string value)
23197 {
23198 if (String.IsNullOrEmpty(name))
23199 {
23200 throw new ArgumentNullException("name");
23201 }
23202 }
23203 }
23204
23205 /// <summary>
23206 /// Property value for a Package or Module.
23207 /// </summary>
23208 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
23209 public class Property : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
23210 {
23211
23212 private ElementCollection children;
23213
23214 private string idField;
23215
23216 private bool idFieldSet;
23217
23218 private string valueField;
23219
23220 private bool valueFieldSet;
23221
23222 private YesNoType complianceCheckField;
23223
23224 private bool complianceCheckFieldSet;
23225
23226 private YesNoType adminField;
23227
23228 private bool adminFieldSet;
23229
23230 private YesNoType secureField;
23231
23232 private bool secureFieldSet;
23233
23234 private YesNoType hiddenField;
23235
23236 private bool hiddenFieldSet;
23237
23238 private YesNoType suppressModularizationField;
23239
23240 private bool suppressModularizationFieldSet;
23241
23242 private ISchemaElement parentElement;
23243
23244 public Property()
23245 {
23246 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
23247 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence);
23248 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComplianceDrive)));
23249 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComponentSearch)));
23250 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearch)));
23251 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearchRef)));
23252 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(IniFileSearch)));
23253 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearch)));
23254 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearchRef)));
23255 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ProductSearch)));
23256 childCollection0.AddCollection(childCollection1);
23257 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
23258 this.children = childCollection0;
23259 }
23260
23261 public virtual IEnumerable Children
23262 {
23263 get
23264 {
23265 return this.children;
23266 }
23267 }
23268
23269 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
23270 public virtual IEnumerable this[System.Type childType]
23271 {
23272 get
23273 {
23274 return this.children.Filter(childType);
23275 }
23276 }
23277
23278 /// <summary>
23279 /// Unique identifier for Property.
23280 /// </summary>
23281 public string Id
23282 {
23283 get
23284 {
23285 return this.idField;
23286 }
23287 set
23288 {
23289 this.idFieldSet = true;
23290 this.idField = value;
23291 }
23292 }
23293
23294 /// <summary>
23295 /// Sets a default value for the property. The value will be overwritten if the Property is used for a search.
23296 /// </summary>
23297 public string Value
23298 {
23299 get
23300 {
23301 return this.valueField;
23302 }
23303 set
23304 {
23305 this.valueFieldSet = true;
23306 this.valueField = value;
23307 }
23308 }
23309
23310 /// <summary>
23311 /// Adds a row to the CCPSearch table. This attribute is only valid when this Property contains a search element.
23312 /// </summary>
23313 public YesNoType ComplianceCheck
23314 {
23315 get
23316 {
23317 return this.complianceCheckField;
23318 }
23319 set
23320 {
23321 this.complianceCheckFieldSet = true;
23322 this.complianceCheckField = value;
23323 }
23324 }
23325
23326 /// <summary>
23327 /// Denotes that the Property is saved during
23328 /// </summary>
23329 public YesNoType Admin
23330 {
23331 get
23332 {
23333 return this.adminField;
23334 }
23335 set
23336 {
23337 this.adminFieldSet = true;
23338 this.adminField = value;
23339 }
23340 }
23341
23342 /// <summary>
23343 /// Denotes that the Property can be passed to the server side when doing a managed installation with elevated privileges. See the
23344 /// </summary>
23345 public YesNoType Secure
23346 {
23347 get
23348 {
23349 return this.secureField;
23350 }
23351 set
23352 {
23353 this.secureFieldSet = true;
23354 this.secureField = value;
23355 }
23356 }
23357
23358 /// <summary>
23359 /// Denotes that the Property is not logged during installation. See the
23360 /// </summary>
23361 public YesNoType Hidden
23362 {
23363 get
23364 {
23365 return this.hiddenField;
23366 }
23367 set
23368 {
23369 this.hiddenFieldSet = true;
23370 this.hiddenField = value;
23371 }
23372 }
23373
23374 /// <summary>
23375 /// Use to suppress modularization of this property identifier in merge modules.
23376 /// Using this functionality is strongly discouraged; it should only be
23377 /// necessary as a workaround of last resort in rare scenarios.
23378 /// </summary>
23379 public YesNoType SuppressModularization
23380 {
23381 get
23382 {
23383 return this.suppressModularizationField;
23384 }
23385 set
23386 {
23387 this.suppressModularizationFieldSet = true;
23388 this.suppressModularizationField = value;
23389 }
23390 }
23391
23392 public virtual ISchemaElement ParentElement
23393 {
23394 get
23395 {
23396 return this.parentElement;
23397 }
23398 set
23399 {
23400 this.parentElement = value;
23401 }
23402 }
23403
23404 public virtual void AddChild(ISchemaElement child)
23405 {
23406 if ((null == child))
23407 {
23408 throw new ArgumentNullException("child");
23409 }
23410 this.children.AddElement(child);
23411 child.ParentElement = this;
23412 }
23413
23414 public virtual void RemoveChild(ISchemaElement child)
23415 {
23416 if ((null == child))
23417 {
23418 throw new ArgumentNullException("child");
23419 }
23420 this.children.RemoveElement(child);
23421 child.ParentElement = null;
23422 }
23423
23424 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23425 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
23426 ISchemaElement ICreateChildren.CreateChild(string childName)
23427 {
23428 if (String.IsNullOrEmpty(childName))
23429 {
23430 throw new ArgumentNullException("childName");
23431 }
23432 ISchemaElement childValue = null;
23433 if (("ComplianceDrive" == childName))
23434 {
23435 childValue = new ComplianceDrive();
23436 }
23437 if (("ComponentSearch" == childName))
23438 {
23439 childValue = new ComponentSearch();
23440 }
23441 if (("RegistrySearch" == childName))
23442 {
23443 childValue = new RegistrySearch();
23444 }
23445 if (("RegistrySearchRef" == childName))
23446 {
23447 childValue = new RegistrySearchRef();
23448 }
23449 if (("IniFileSearch" == childName))
23450 {
23451 childValue = new IniFileSearch();
23452 }
23453 if (("DirectorySearch" == childName))
23454 {
23455 childValue = new DirectorySearch();
23456 }
23457 if (("DirectorySearchRef" == childName))
23458 {
23459 childValue = new DirectorySearchRef();
23460 }
23461 if (("ProductSearch" == childName))
23462 {
23463 childValue = new ProductSearch();
23464 }
23465 if ((null == childValue))
23466 {
23467 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
23468 }
23469 return childValue;
23470 }
23471
23472 /// <summary>
23473 /// Processes this element and all child elements into an XmlWriter.
23474 /// </summary>
23475 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
23476 public virtual void OutputXml(XmlWriter writer)
23477 {
23478 if ((null == writer))
23479 {
23480 throw new ArgumentNullException("writer");
23481 }
23482 writer.WriteStartElement("Property", "http://wixtoolset.org/schemas/v4/wxs");
23483 if (this.idFieldSet)
23484 {
23485 writer.WriteAttributeString("Id", this.idField);
23486 }
23487 if (this.valueFieldSet)
23488 {
23489 writer.WriteAttributeString("Value", this.valueField);
23490 }
23491 if (this.complianceCheckFieldSet)
23492 {
23493 if ((this.complianceCheckField == YesNoType.no))
23494 {
23495 writer.WriteAttributeString("ComplianceCheck", "no");
23496 }
23497 if ((this.complianceCheckField == YesNoType.yes))
23498 {
23499 writer.WriteAttributeString("ComplianceCheck", "yes");
23500 }
23501 }
23502 if (this.adminFieldSet)
23503 {
23504 if ((this.adminField == YesNoType.no))
23505 {
23506 writer.WriteAttributeString("Admin", "no");
23507 }
23508 if ((this.adminField == YesNoType.yes))
23509 {
23510 writer.WriteAttributeString("Admin", "yes");
23511 }
23512 }
23513 if (this.secureFieldSet)
23514 {
23515 if ((this.secureField == YesNoType.no))
23516 {
23517 writer.WriteAttributeString("Secure", "no");
23518 }
23519 if ((this.secureField == YesNoType.yes))
23520 {
23521 writer.WriteAttributeString("Secure", "yes");
23522 }
23523 }
23524 if (this.hiddenFieldSet)
23525 {
23526 if ((this.hiddenField == YesNoType.no))
23527 {
23528 writer.WriteAttributeString("Hidden", "no");
23529 }
23530 if ((this.hiddenField == YesNoType.yes))
23531 {
23532 writer.WriteAttributeString("Hidden", "yes");
23533 }
23534 }
23535 if (this.suppressModularizationFieldSet)
23536 {
23537 if ((this.suppressModularizationField == YesNoType.no))
23538 {
23539 writer.WriteAttributeString("SuppressModularization", "no");
23540 }
23541 if ((this.suppressModularizationField == YesNoType.yes))
23542 {
23543 writer.WriteAttributeString("SuppressModularization", "yes");
23544 }
23545 }
23546 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
23547 {
23548 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
23549 childElement.OutputXml(writer);
23550 }
23551 writer.WriteEndElement();
23552 }
23553
23554 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23555 void ISetAttributes.SetAttribute(string name, string value)
23556 {
23557 if (String.IsNullOrEmpty(name))
23558 {
23559 throw new ArgumentNullException("name");
23560 }
23561 if (("Id" == name))
23562 {
23563 this.idField = value;
23564 this.idFieldSet = true;
23565 }
23566 if (("Value" == name))
23567 {
23568 this.valueField = value;
23569 this.valueFieldSet = true;
23570 }
23571 if (("ComplianceCheck" == name))
23572 {
23573 this.complianceCheckField = Enums.ParseYesNoType(value);
23574 this.complianceCheckFieldSet = true;
23575 }
23576 if (("Admin" == name))
23577 {
23578 this.adminField = Enums.ParseYesNoType(value);
23579 this.adminFieldSet = true;
23580 }
23581 if (("Secure" == name))
23582 {
23583 this.secureField = Enums.ParseYesNoType(value);
23584 this.secureFieldSet = true;
23585 }
23586 if (("Hidden" == name))
23587 {
23588 this.hiddenField = Enums.ParseYesNoType(value);
23589 this.hiddenFieldSet = true;
23590 }
23591 if (("SuppressModularization" == name))
23592 {
23593 this.suppressModularizationField = Enums.ParseYesNoType(value);
23594 this.suppressModularizationFieldSet = true;
23595 }
23596 }
23597 }
23598
23599 /// <summary>
23600 /// Reference to a Property value.
23601 /// </summary>
23602 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
23603 public class PropertyRef : ISchemaElement, ISetAttributes
23604 {
23605
23606 private string idField;
23607
23608 private bool idFieldSet;
23609
23610 private ISchemaElement parentElement;
23611
23612 /// <summary>
23613 /// Identifier of Property to reference.
23614 /// </summary>
23615 public string Id
23616 {
23617 get
23618 {
23619 return this.idField;
23620 }
23621 set
23622 {
23623 this.idFieldSet = true;
23624 this.idField = value;
23625 }
23626 }
23627
23628 public virtual ISchemaElement ParentElement
23629 {
23630 get
23631 {
23632 return this.parentElement;
23633 }
23634 set
23635 {
23636 this.parentElement = value;
23637 }
23638 }
23639
23640 /// <summary>
23641 /// Processes this element and all child elements into an XmlWriter.
23642 /// </summary>
23643 public virtual void OutputXml(XmlWriter writer)
23644 {
23645 if ((null == writer))
23646 {
23647 throw new ArgumentNullException("writer");
23648 }
23649 writer.WriteStartElement("PropertyRef", "http://wixtoolset.org/schemas/v4/wxs");
23650 if (this.idFieldSet)
23651 {
23652 writer.WriteAttributeString("Id", this.idField);
23653 }
23654 writer.WriteEndElement();
23655 }
23656
23657 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
23658 void ISetAttributes.SetAttribute(string name, string value)
23659 {
23660 if (String.IsNullOrEmpty(name))
23661 {
23662 throw new ArgumentNullException("name");
23663 }
23664 if (("Id" == name))
23665 {
23666 this.idField = value;
23667 this.idFieldSet = true;
23668 }
23669 }
23670 }
23671
23672 /// <summary>
23673 /// Shortcut, default target is parent File, CreateFolder, or Component's Directory
23674 /// </summary>
23675 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
23676 public class Shortcut : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
23677 {
23678
23679 private ElementCollection children;
23680
23681 private string idField;
23682
23683 private bool idFieldSet;
23684
23685 private string directoryField;
23686
23687 private bool directoryFieldSet;
23688
23689 private string nameField;
23690
23691 private bool nameFieldSet;
23692
23693 private string shortNameField;
23694
23695 private bool shortNameFieldSet;
23696
23697 private string targetField;
23698
23699 private bool targetFieldSet;
23700
23701 private string descriptionField;
23702
23703 private bool descriptionFieldSet;
23704
23705 private string argumentsField;
23706
23707 private bool argumentsFieldSet;
23708
23709 private int hotkeyField;
23710
23711 private bool hotkeyFieldSet;
23712
23713 private string iconField;
23714
23715 private bool iconFieldSet;
23716
23717 private int iconIndexField;
23718
23719 private bool iconIndexFieldSet;
23720
23721 private ShowType showField;
23722
23723 private bool showFieldSet;
23724
23725 private string workingDirectoryField;
23726
23727 private bool workingDirectoryFieldSet;
23728
23729 private YesNoType advertiseField;
23730
23731 private bool advertiseFieldSet;
23732
23733 private string displayResourceDllField;
23734
23735 private bool displayResourceDllFieldSet;
23736
23737 private int displayResourceIdField;
23738
23739 private bool displayResourceIdFieldSet;
23740
23741 private string descriptionResourceDllField;
23742
23743 private bool descriptionResourceDllFieldSet;
23744
23745 private int descriptionResourceIdField;
23746
23747 private bool descriptionResourceIdFieldSet;
23748
23749 private ISchemaElement parentElement;
23750
23751 public Shortcut()
23752 {
23753 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
23754 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Icon)));
23755 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ShortcutProperty)));
23756 this.children = childCollection0;
23757 }
23758
23759 public virtual IEnumerable Children
23760 {
23761 get
23762 {
23763 return this.children;
23764 }
23765 }
23766
23767 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
23768 public virtual IEnumerable this[System.Type childType]
23769 {
23770 get
23771 {
23772 return this.children.Filter(childType);
23773 }
23774 }
23775
23776 /// <summary>
23777 /// Unique identifier for the shortcut. This value will serve as the primary key for the row.
23778 /// </summary>
23779 public string Id
23780 {
23781 get
23782 {
23783 return this.idField;
23784 }
23785 set
23786 {
23787 this.idFieldSet = true;
23788 this.idField = value;
23789 }
23790 }
23791
23792 /// <summary>
23793 /// 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.
23794 /// </summary>
23795 public string Directory
23796 {
23797 get
23798 {
23799 return this.directoryField;
23800 }
23801 set
23802 {
23803 this.directoryFieldSet = true;
23804 this.directoryField = value;
23805 }
23806 }
23807
23808 /// <summary>
23809 /// In prior versions of the WiX toolset, this attribute specified the short name.
23810 /// This attribute's value may now be either a short or long name.
23811 /// If a short name is specified, the ShortName attribute may not be specified.
23812 /// Also, if this value is a long name, the ShortName attribute may be omitted to
23813 /// allow WiX to attempt to generate a unique short name.
23814 /// However, if this name collides with another shortcut or you wish to manually specify
23815 /// the short name, then the ShortName attribute may be specified.
23816 /// </summary>
23817 public string Name
23818 {
23819 get
23820 {
23821 return this.nameField;
23822 }
23823 set
23824 {
23825 this.nameFieldSet = true;
23826 this.nameField = value;
23827 }
23828 }
23829
23830 /// <summary>
23831 /// The short name of the shortcut in 8.3 format.
23832 /// This attribute should only be set if there is a conflict between generated short names
23833 /// or the user wants to manually specify the short name.
23834 /// </summary>
23835 public string ShortName
23836 {
23837 get
23838 {
23839 return this.shortNameField;
23840 }
23841 set
23842 {
23843 this.shortNameFieldSet = true;
23844 this.shortNameField = value;
23845 }
23846 }
23847
23848 /// <summary>
23849 /// This attribute can only be set if this Shortcut element is nested under a Component element.
23850 /// When nested under a Component element, this attribute's value will default to the parent directory.
23851 /// This attribute's value is the target for a non-advertised shortcut.
23852 /// This attribute is not valid for advertised shortcuts.
23853 /// 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.
23854 /// </summary>
23855 public string Target
23856 {
23857 get
23858 {
23859 return this.targetField;
23860 }
23861 set
23862 {
23863 this.targetFieldSet = true;
23864 this.targetField = value;
23865 }
23866 }
23867
23868 /// <summary>
23869 /// The localizable description for the shortcut.
23870 /// </summary>
23871 public string Description
23872 {
23873 get
23874 {
23875 return this.descriptionField;
23876 }
23877 set
23878 {
23879 this.descriptionFieldSet = true;
23880 this.descriptionField = value;
23881 }
23882 }
23883
23884 /// <summary>
23885 /// The command-line arguments for the shortcut. Note that the resolution of properties
23886 /// in the Arguments field is limited. A property formatted as [Property] in this field can only be resolved if the
23887 /// property already has the intended value when the component owning the shortcut is installed. For example, for the
23888 /// argument "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and
23889 /// the component that owns the shortcut.
23890 /// </summary>
23891 public string Arguments
23892 {
23893 get
23894 {
23895 return this.argumentsField;
23896 }
23897 set
23898 {
23899 this.argumentsFieldSet = true;
23900 this.argumentsField = value;
23901 }
23902 }
23903
23904 /// <summary>
23905 /// The hotkey for the shortcut. The low-order byte contains the virtual-key code for
23906 /// the key, and the high-order byte contains modifier flags. This must be a non-negative number. Authors of
23907 /// installation packages are generally recommend not to set this option, because this can add duplicate hotkeys to a
23908 /// users desktop. In addition, the practice of assigning hotkeys to shortcuts can be problematic for users using hotkeys
23909 /// for accessibility.
23910 /// </summary>
23911 public int Hotkey
23912 {
23913 get
23914 {
23915 return this.hotkeyField;
23916 }
23917 set
23918 {
23919 this.hotkeyFieldSet = true;
23920 this.hotkeyField = value;
23921 }
23922 }
23923
23924 /// <summary>
23925 /// Identifier reference to Icon element. The Icon identifier should have the same extension
23926 /// as the file that it points at. For example, a shortcut to an executable (e.g. "my.exe") should reference an Icon with identifier
23927 /// like "MyIcon.exe"
23928 /// </summary>
23929 public string Icon
23930 {
23931 get
23932 {
23933 return this.iconField;
23934 }
23935 set
23936 {
23937 this.iconFieldSet = true;
23938 this.iconField = value;
23939 }
23940 }
23941
23942 /// <summary>
23943 /// Identifier reference to Icon element.
23944 /// </summary>
23945 public int IconIndex
23946 {
23947 get
23948 {
23949 return this.iconIndexField;
23950 }
23951 set
23952 {
23953 this.iconIndexFieldSet = true;
23954 this.iconIndexField = value;
23955 }
23956 }
23957
23958 public ShowType Show
23959 {
23960 get
23961 {
23962 return this.showField;
23963 }
23964 set
23965 {
23966 this.showFieldSet = true;
23967 this.showField = value;
23968 }
23969 }
23970
23971 /// <summary>
23972 /// Directory identifier (or Property identifier that resolves to a directory) that resolves
23973 /// to the path of the working directory for the shortcut.
23974 /// </summary>
23975 public string WorkingDirectory
23976 {
23977 get
23978 {
23979 return this.workingDirectoryField;
23980 }
23981 set
23982 {
23983 this.workingDirectoryFieldSet = true;
23984 this.workingDirectoryField = value;
23985 }
23986 }
23987
23988 /// <summary>
23989 /// Specifies if the shortcut should be advertised or not. Note that advertised shortcuts
23990 /// always point at a particular application, identified by a ProductCode, and should not be shared between applications.
23991 /// Advertised shortcuts only work for the most recently installed application, and are removed when that application is
23992 /// removed. The default value is 'no'.
23993 /// </summary>
23994 public YesNoType Advertise
23995 {
23996 get
23997 {
23998 return this.advertiseField;
23999 }
24000 set
24001 {
24002 this.advertiseFieldSet = true;
24003 this.advertiseField = value;
24004 }
24005 }
24006
24007 /// <summary>
24008 /// The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally
24009 /// authored using [#filekey] form. When this attribute is specified, the DisplayResourceId attribute must also
24010 /// be provided.
24011 ///
24012 /// This attribute is only used on Windows Vista and above. If this attribute is not populated and the install
24013 /// is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and
24014 /// the install is running on Vista and above, the value in the Name attribute is ignored.
24015 /// </summary>
24016 public string DisplayResourceDll
24017 {
24018 get
24019 {
24020 return this.displayResourceDllField;
24021 }
24022 set
24023 {
24024 this.displayResourceDllFieldSet = true;
24025 this.displayResourceDllField = value;
24026 }
24027 }
24028
24029 /// <summary>
24030 /// The display name index for the shortcut. This must be a non-negative number. When this attribute is specified, the
24031 /// DisplayResourceDll attribute must also be provided.
24032 ///
24033 /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install
24034 /// is running on Vista and above, the value in the Name attribute is used. If this attribute is specified and
24035 /// the install is running on Vista and above, the value in the Name attribute is ignored.
24036 /// </summary>
24037 public int DisplayResourceId
24038 {
24039 get
24040 {
24041 return this.displayResourceIdField;
24042 }
24043 set
24044 {
24045 this.displayResourceIdFieldSet = true;
24046 this.displayResourceIdField = value;
24047 }
24048 }
24049
24050 /// <summary>
24051 /// The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally
24052 /// authored using [#filekey] form. When this attribute is specified, the DescriptionResourceId attribute must also
24053 /// be provided.
24054 ///
24055 /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install
24056 /// is running on Vista and above, the value in the Name attribute is used. If this attribute is provided and
24057 /// the install is running on Vista and above, the value in the Name attribute is ignored.
24058 /// </summary>
24059 public string DescriptionResourceDll
24060 {
24061 get
24062 {
24063 return this.descriptionResourceDllField;
24064 }
24065 set
24066 {
24067 this.descriptionResourceDllFieldSet = true;
24068 this.descriptionResourceDllField = value;
24069 }
24070 }
24071
24072 /// <summary>
24073 /// The description name index for the shortcut. This must be a non-negative number. When this attribute is specified,
24074 /// the DescriptionResourceDll attribute must also be populated.
24075 ///
24076 /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install
24077 /// is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and the
24078 /// install is running on Vista and above, the value in the Name attribute is ignored.
24079 /// </summary>
24080 public int DescriptionResourceId
24081 {
24082 get
24083 {
24084 return this.descriptionResourceIdField;
24085 }
24086 set
24087 {
24088 this.descriptionResourceIdFieldSet = true;
24089 this.descriptionResourceIdField = value;
24090 }
24091 }
24092
24093 public virtual ISchemaElement ParentElement
24094 {
24095 get
24096 {
24097 return this.parentElement;
24098 }
24099 set
24100 {
24101 this.parentElement = value;
24102 }
24103 }
24104
24105 public virtual void AddChild(ISchemaElement child)
24106 {
24107 if ((null == child))
24108 {
24109 throw new ArgumentNullException("child");
24110 }
24111 this.children.AddElement(child);
24112 child.ParentElement = this;
24113 }
24114
24115 public virtual void RemoveChild(ISchemaElement child)
24116 {
24117 if ((null == child))
24118 {
24119 throw new ArgumentNullException("child");
24120 }
24121 this.children.RemoveElement(child);
24122 child.ParentElement = null;
24123 }
24124
24125 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
24126 ISchemaElement ICreateChildren.CreateChild(string childName)
24127 {
24128 if (String.IsNullOrEmpty(childName))
24129 {
24130 throw new ArgumentNullException("childName");
24131 }
24132 ISchemaElement childValue = null;
24133 if (("Icon" == childName))
24134 {
24135 childValue = new Icon();
24136 }
24137 if (("ShortcutProperty" == childName))
24138 {
24139 childValue = new ShortcutProperty();
24140 }
24141 if ((null == childValue))
24142 {
24143 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
24144 }
24145 return childValue;
24146 }
24147
24148 /// <summary>
24149 /// Parses a ShowType from a string.
24150 /// </summary>
24151 public static ShowType ParseShowType(string value)
24152 {
24153 ShowType parsedValue;
24154 Shortcut.TryParseShowType(value, out parsedValue);
24155 return parsedValue;
24156 }
24157
24158 /// <summary>
24159 /// Tries to parse a ShowType from a string.
24160 /// </summary>
24161 public static bool TryParseShowType(string value, out ShowType parsedValue)
24162 {
24163 parsedValue = ShowType.NotSet;
24164 if (string.IsNullOrEmpty(value))
24165 {
24166 return false;
24167 }
24168 if (("normal" == value))
24169 {
24170 parsedValue = ShowType.normal;
24171 }
24172 else
24173 {
24174 if (("minimized" == value))
24175 {
24176 parsedValue = ShowType.minimized;
24177 }
24178 else
24179 {
24180 if (("maximized" == value))
24181 {
24182 parsedValue = ShowType.maximized;
24183 }
24184 else
24185 {
24186 parsedValue = ShowType.IllegalValue;
24187 return false;
24188 }
24189 }
24190 }
24191 return true;
24192 }
24193
24194 /// <summary>
24195 /// Processes this element and all child elements into an XmlWriter.
24196 /// </summary>
24197 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
24198 public virtual void OutputXml(XmlWriter writer)
24199 {
24200 if ((null == writer))
24201 {
24202 throw new ArgumentNullException("writer");
24203 }
24204 writer.WriteStartElement("Shortcut", "http://wixtoolset.org/schemas/v4/wxs");
24205 if (this.idFieldSet)
24206 {
24207 writer.WriteAttributeString("Id", this.idField);
24208 }
24209 if (this.directoryFieldSet)
24210 {
24211 writer.WriteAttributeString("Directory", this.directoryField);
24212 }
24213 if (this.nameFieldSet)
24214 {
24215 writer.WriteAttributeString("Name", this.nameField);
24216 }
24217 if (this.shortNameFieldSet)
24218 {
24219 writer.WriteAttributeString("ShortName", this.shortNameField);
24220 }
24221 if (this.targetFieldSet)
24222 {
24223 writer.WriteAttributeString("Target", this.targetField);
24224 }
24225 if (this.descriptionFieldSet)
24226 {
24227 writer.WriteAttributeString("Description", this.descriptionField);
24228 }
24229 if (this.argumentsFieldSet)
24230 {
24231 writer.WriteAttributeString("Arguments", this.argumentsField);
24232 }
24233 if (this.hotkeyFieldSet)
24234 {
24235 writer.WriteAttributeString("Hotkey", this.hotkeyField.ToString(CultureInfo.InvariantCulture));
24236 }
24237 if (this.iconFieldSet)
24238 {
24239 writer.WriteAttributeString("Icon", this.iconField);
24240 }
24241 if (this.iconIndexFieldSet)
24242 {
24243 writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture));
24244 }
24245 if (this.showFieldSet)
24246 {
24247 if ((this.showField == ShowType.normal))
24248 {
24249 writer.WriteAttributeString("Show", "normal");
24250 }
24251 if ((this.showField == ShowType.minimized))
24252 {
24253 writer.WriteAttributeString("Show", "minimized");
24254 }
24255 if ((this.showField == ShowType.maximized))
24256 {
24257 writer.WriteAttributeString("Show", "maximized");
24258 }
24259 }
24260 if (this.workingDirectoryFieldSet)
24261 {
24262 writer.WriteAttributeString("WorkingDirectory", this.workingDirectoryField);
24263 }
24264 if (this.advertiseFieldSet)
24265 {
24266 if ((this.advertiseField == YesNoType.no))
24267 {
24268 writer.WriteAttributeString("Advertise", "no");
24269 }
24270 if ((this.advertiseField == YesNoType.yes))
24271 {
24272 writer.WriteAttributeString("Advertise", "yes");
24273 }
24274 }
24275 if (this.displayResourceDllFieldSet)
24276 {
24277 writer.WriteAttributeString("DisplayResourceDll", this.displayResourceDllField);
24278 }
24279 if (this.displayResourceIdFieldSet)
24280 {
24281 writer.WriteAttributeString("DisplayResourceId", this.displayResourceIdField.ToString(CultureInfo.InvariantCulture));
24282 }
24283 if (this.descriptionResourceDllFieldSet)
24284 {
24285 writer.WriteAttributeString("DescriptionResourceDll", this.descriptionResourceDllField);
24286 }
24287 if (this.descriptionResourceIdFieldSet)
24288 {
24289 writer.WriteAttributeString("DescriptionResourceId", this.descriptionResourceIdField.ToString(CultureInfo.InvariantCulture));
24290 }
24291 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
24292 {
24293 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
24294 childElement.OutputXml(writer);
24295 }
24296 writer.WriteEndElement();
24297 }
24298
24299 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
24300 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
24301 void ISetAttributes.SetAttribute(string name, string value)
24302 {
24303 if (String.IsNullOrEmpty(name))
24304 {
24305 throw new ArgumentNullException("name");
24306 }
24307 if (("Id" == name))
24308 {
24309 this.idField = value;
24310 this.idFieldSet = true;
24311 }
24312 if (("Directory" == name))
24313 {
24314 this.directoryField = value;
24315 this.directoryFieldSet = true;
24316 }
24317 if (("Name" == name))
24318 {
24319 this.nameField = value;
24320 this.nameFieldSet = true;
24321 }
24322 if (("ShortName" == name))
24323 {
24324 this.shortNameField = value;
24325 this.shortNameFieldSet = true;
24326 }
24327 if (("Target" == name))
24328 {
24329 this.targetField = value;
24330 this.targetFieldSet = true;
24331 }
24332 if (("Description" == name))
24333 {
24334 this.descriptionField = value;
24335 this.descriptionFieldSet = true;
24336 }
24337 if (("Arguments" == name))
24338 {
24339 this.argumentsField = value;
24340 this.argumentsFieldSet = true;
24341 }
24342 if (("Hotkey" == name))
24343 {
24344 this.hotkeyField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
24345 this.hotkeyFieldSet = true;
24346 }
24347 if (("Icon" == name))
24348 {
24349 this.iconField = value;
24350 this.iconFieldSet = true;
24351 }
24352 if (("IconIndex" == name))
24353 {
24354 this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
24355 this.iconIndexFieldSet = true;
24356 }
24357 if (("Show" == name))
24358 {
24359 this.showField = Shortcut.ParseShowType(value);
24360 this.showFieldSet = true;
24361 }
24362 if (("WorkingDirectory" == name))
24363 {
24364 this.workingDirectoryField = value;
24365 this.workingDirectoryFieldSet = true;
24366 }
24367 if (("Advertise" == name))
24368 {
24369 this.advertiseField = Enums.ParseYesNoType(value);
24370 this.advertiseFieldSet = true;
24371 }
24372 if (("DisplayResourceDll" == name))
24373 {
24374 this.displayResourceDllField = value;
24375 this.displayResourceDllFieldSet = true;
24376 }
24377 if (("DisplayResourceId" == name))
24378 {
24379 this.displayResourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
24380 this.displayResourceIdFieldSet = true;
24381 }
24382 if (("DescriptionResourceDll" == name))
24383 {
24384 this.descriptionResourceDllField = value;
24385 this.descriptionResourceDllFieldSet = true;
24386 }
24387 if (("DescriptionResourceId" == name))
24388 {
24389 this.descriptionResourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
24390 this.descriptionResourceIdFieldSet = true;
24391 }
24392 }
24393
24394 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
24395 public enum ShowType
24396 {
24397
24398 IllegalValue = int.MaxValue,
24399
24400 NotSet = -1,
24401
24402 /// <summary>
24403 /// The shortcut target will be displayed using the SW_SHOWNORMAL attribute.
24404 /// </summary>
24405 normal,
24406
24407 /// <summary>
24408 /// The shortcut target will be displayed using the SW_SHOWMINNOACTIVE attribute.
24409 /// </summary>
24410 minimized,
24411
24412 /// <summary>
24413 /// The shortcut target will be displayed using the SW_SHOWMAXIMIZED attribute.
24414 /// </summary>
24415 maximized,
24416 }
24417 }
24418
24419 /// <summary>
24420 /// Property values for a shortcut. This element's functionality is available starting with MSI 5.0.
24421 /// </summary>
24422 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
24423 public class ShortcutProperty : ISchemaElement, ISetAttributes
24424 {
24425
24426 private string idField;
24427
24428 private bool idFieldSet;
24429
24430 private string keyField;
24431
24432 private bool keyFieldSet;
24433
24434 private string valueField;
24435
24436 private bool valueFieldSet;
24437
24438 private ISchemaElement parentElement;
24439
24440 /// <summary>
24441 /// Unique identifier for MsiShortcutProperty table. If omitted, a stable identifier will be generated from the parent shortcut identifier and Key value.
24442 /// </summary>
24443 public string Id
24444 {
24445 get
24446 {
24447 return this.idField;
24448 }
24449 set
24450 {
24451 this.idFieldSet = true;
24452 this.idField = value;
24453 }
24454 }
24455
24456 /// <summary>
24457 /// A formatted string identifying the property to be set.
24458 /// </summary>
24459 public string Key
24460 {
24461 get
24462 {
24463 return this.keyField;
24464 }
24465 set
24466 {
24467 this.keyFieldSet = true;
24468 this.keyField = value;
24469 }
24470 }
24471
24472 /// <summary>
24473 /// A formatted string supplying the value of the property.
24474 /// </summary>
24475 public string Value
24476 {
24477 get
24478 {
24479 return this.valueField;
24480 }
24481 set
24482 {
24483 this.valueFieldSet = true;
24484 this.valueField = value;
24485 }
24486 }
24487
24488 public virtual ISchemaElement ParentElement
24489 {
24490 get
24491 {
24492 return this.parentElement;
24493 }
24494 set
24495 {
24496 this.parentElement = value;
24497 }
24498 }
24499
24500 /// <summary>
24501 /// Processes this element and all child elements into an XmlWriter.
24502 /// </summary>
24503 public virtual void OutputXml(XmlWriter writer)
24504 {
24505 if ((null == writer))
24506 {
24507 throw new ArgumentNullException("writer");
24508 }
24509 writer.WriteStartElement("ShortcutProperty", "http://wixtoolset.org/schemas/v4/wxs");
24510 if (this.idFieldSet)
24511 {
24512 writer.WriteAttributeString("Id", this.idField);
24513 }
24514 if (this.keyFieldSet)
24515 {
24516 writer.WriteAttributeString("Key", this.keyField);
24517 }
24518 if (this.valueFieldSet)
24519 {
24520 writer.WriteAttributeString("Value", this.valueField);
24521 }
24522 writer.WriteEndElement();
24523 }
24524
24525 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
24526 void ISetAttributes.SetAttribute(string name, string value)
24527 {
24528 if (String.IsNullOrEmpty(name))
24529 {
24530 throw new ArgumentNullException("name");
24531 }
24532 if (("Id" == name))
24533 {
24534 this.idField = value;
24535 this.idFieldSet = true;
24536 }
24537 if (("Key" == name))
24538 {
24539 this.keyField = value;
24540 this.keyFieldSet = true;
24541 }
24542 if (("Value" == name))
24543 {
24544 this.valueField = value;
24545 this.valueFieldSet = true;
24546 }
24547 }
24548 }
24549
24550 /// <summary>
24551 /// Sets ACLs on File, Registry, or CreateFolder. When under a Registry element, this cannot be used
24552 /// if the Action attribute's value is remove or removeKeyOnInstall. This element has no Id attribute.
24553 /// The table and key are taken from the parent element.
24554 /// </summary>
24555 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
24556 public class Permission : ISchemaElement, ISetAttributes
24557 {
24558
24559 private string domainField;
24560
24561 private bool domainFieldSet;
24562
24563 private string userField;
24564
24565 private bool userFieldSet;
24566
24567 private YesNoType readField;
24568
24569 private bool readFieldSet;
24570
24571 private YesNoType deleteField;
24572
24573 private bool deleteFieldSet;
24574
24575 private YesNoType readPermissionField;
24576
24577 private bool readPermissionFieldSet;
24578
24579 private YesNoType changePermissionField;
24580
24581 private bool changePermissionFieldSet;
24582
24583 private YesNoType takeOwnershipField;
24584
24585 private bool takeOwnershipFieldSet;
24586
24587 private YesNoType specificRightsAllField;
24588
24589 private bool specificRightsAllFieldSet;
24590
24591 private YesNoType readAttributesField;
24592
24593 private bool readAttributesFieldSet;
24594
24595 private YesNoType writeAttributesField;
24596
24597 private bool writeAttributesFieldSet;
24598
24599 private YesNoType readExtendedAttributesField;
24600
24601 private bool readExtendedAttributesFieldSet;
24602
24603 private YesNoType writeExtendedAttributesField;
24604
24605 private bool writeExtendedAttributesFieldSet;
24606
24607 private YesNoType synchronizeField;
24608
24609 private bool synchronizeFieldSet;
24610
24611 private YesNoType createFileField;
24612
24613 private bool createFileFieldSet;
24614
24615 private YesNoType createChildField;
24616
24617 private bool createChildFieldSet;
24618
24619 private YesNoType deleteChildField;
24620
24621 private bool deleteChildFieldSet;
24622
24623 private YesNoType traverseField;
24624
24625 private bool traverseFieldSet;
24626
24627 private YesNoType appendField;
24628
24629 private bool appendFieldSet;
24630
24631 private YesNoType executeField;
24632
24633 private bool executeFieldSet;
24634
24635 private YesNoType fileAllRightsField;
24636
24637 private bool fileAllRightsFieldSet;
24638
24639 private YesNoType writeField;
24640
24641 private bool writeFieldSet;
24642
24643 private YesNoType createSubkeysField;
24644
24645 private bool createSubkeysFieldSet;
24646
24647 private YesNoType enumerateSubkeysField;
24648
24649 private bool enumerateSubkeysFieldSet;
24650
24651 private YesNoType notifyField;
24652
24653 private bool notifyFieldSet;
24654
24655 private YesNoType createLinkField;
24656
24657 private bool createLinkFieldSet;
24658
24659 private YesNoType genericAllField;
24660
24661 private bool genericAllFieldSet;
24662
24663 private YesNoType genericExecuteField;
24664
24665 private bool genericExecuteFieldSet;
24666
24667 private YesNoType genericWriteField;
24668
24669 private bool genericWriteFieldSet;
24670
24671 private YesNoType genericReadField;
24672
24673 private bool genericReadFieldSet;
24674
24675 private ISchemaElement parentElement;
24676
24677 public string Domain
24678 {
24679 get
24680 {
24681 return this.domainField;
24682 }
24683 set
24684 {
24685 this.domainFieldSet = true;
24686 this.domainField = value;
24687 }
24688 }
24689
24690 public string User
24691 {
24692 get
24693 {
24694 return this.userField;
24695 }
24696 set
24697 {
24698 this.userFieldSet = true;
24699 this.userField = value;
24700 }
24701 }
24702
24703 public YesNoType Read
24704 {
24705 get
24706 {
24707 return this.readField;
24708 }
24709 set
24710 {
24711 this.readFieldSet = true;
24712 this.readField = value;
24713 }
24714 }
24715
24716 public YesNoType Delete
24717 {
24718 get
24719 {
24720 return this.deleteField;
24721 }
24722 set
24723 {
24724 this.deleteFieldSet = true;
24725 this.deleteField = value;
24726 }
24727 }
24728
24729 public YesNoType ReadPermission
24730 {
24731 get
24732 {
24733 return this.readPermissionField;
24734 }
24735 set
24736 {
24737 this.readPermissionFieldSet = true;
24738 this.readPermissionField = value;
24739 }
24740 }
24741
24742 public YesNoType ChangePermission
24743 {
24744 get
24745 {
24746 return this.changePermissionField;
24747 }
24748 set
24749 {
24750 this.changePermissionFieldSet = true;
24751 this.changePermissionField = value;
24752 }
24753 }
24754
24755 public YesNoType TakeOwnership
24756 {
24757 get
24758 {
24759 return this.takeOwnershipField;
24760 }
24761 set
24762 {
24763 this.takeOwnershipFieldSet = true;
24764 this.takeOwnershipField = value;
24765 }
24766 }
24767
24768 /// <summary>
24769 /// Bit mask for SPECIFIC_RIGHTS_ALL from WinNT.h (0x0000FFFF).
24770 /// </summary>
24771 public YesNoType SpecificRightsAll
24772 {
24773 get
24774 {
24775 return this.specificRightsAllField;
24776 }
24777 set
24778 {
24779 this.specificRightsAllFieldSet = true;
24780 this.specificRightsAllField = value;
24781 }
24782 }
24783
24784 public YesNoType ReadAttributes
24785 {
24786 get
24787 {
24788 return this.readAttributesField;
24789 }
24790 set
24791 {
24792 this.readAttributesFieldSet = true;
24793 this.readAttributesField = value;
24794 }
24795 }
24796
24797 public YesNoType WriteAttributes
24798 {
24799 get
24800 {
24801 return this.writeAttributesField;
24802 }
24803 set
24804 {
24805 this.writeAttributesFieldSet = true;
24806 this.writeAttributesField = value;
24807 }
24808 }
24809
24810 public YesNoType ReadExtendedAttributes
24811 {
24812 get
24813 {
24814 return this.readExtendedAttributesField;
24815 }
24816 set
24817 {
24818 this.readExtendedAttributesFieldSet = true;
24819 this.readExtendedAttributesField = value;
24820 }
24821 }
24822
24823 public YesNoType WriteExtendedAttributes
24824 {
24825 get
24826 {
24827 return this.writeExtendedAttributesField;
24828 }
24829 set
24830 {
24831 this.writeExtendedAttributesFieldSet = true;
24832 this.writeExtendedAttributesField = value;
24833 }
24834 }
24835
24836 public YesNoType Synchronize
24837 {
24838 get
24839 {
24840 return this.synchronizeField;
24841 }
24842 set
24843 {
24844 this.synchronizeFieldSet = true;
24845 this.synchronizeField = value;
24846 }
24847 }
24848
24849 /// <summary>
24850 /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent.
24851 /// </summary>
24852 public YesNoType CreateFile
24853 {
24854 get
24855 {
24856 return this.createFileField;
24857 }
24858 set
24859 {
24860 this.createFileFieldSet = true;
24861 this.createFileField = value;
24862 }
24863 }
24864
24865 /// <summary>
24866 /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent.
24867 /// </summary>
24868 public YesNoType CreateChild
24869 {
24870 get
24871 {
24872 return this.createChildField;
24873 }
24874 set
24875 {
24876 this.createChildFieldSet = true;
24877 this.createChildField = value;
24878 }
24879 }
24880
24881 /// <summary>
24882 /// 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.
24883 /// </summary>
24884 public YesNoType DeleteChild
24885 {
24886 get
24887 {
24888 return this.deleteChildField;
24889 }
24890 set
24891 {
24892 this.deleteChildFieldSet = true;
24893 this.deleteChildField = value;
24894 }
24895 }
24896
24897 /// <summary>
24898 /// 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.
24899 /// </summary>
24900 public YesNoType Traverse
24901 {
24902 get
24903 {
24904 return this.traverseField;
24905 }
24906 set
24907 {
24908 this.traverseFieldSet = true;
24909 this.traverseField = value;
24910 }
24911 }
24912
24913 public YesNoType Append
24914 {
24915 get
24916 {
24917 return this.appendField;
24918 }
24919 set
24920 {
24921 this.appendFieldSet = true;
24922 this.appendField = value;
24923 }
24924 }
24925
24926 public YesNoType Execute
24927 {
24928 get
24929 {
24930 return this.executeField;
24931 }
24932 set
24933 {
24934 this.executeFieldSet = true;
24935 this.executeField = value;
24936 }
24937 }
24938
24939 /// <summary>
24940 /// Bit mask for FILE_ALL_ACCESS from WinNT.h (0x001F01FF).
24941 /// </summary>
24942 public YesNoType FileAllRights
24943 {
24944 get
24945 {
24946 return this.fileAllRightsField;
24947 }
24948 set
24949 {
24950 this.fileAllRightsFieldSet = true;
24951 this.fileAllRightsField = value;
24952 }
24953 }
24954
24955 public YesNoType Write
24956 {
24957 get
24958 {
24959 return this.writeField;
24960 }
24961 set
24962 {
24963 this.writeFieldSet = true;
24964 this.writeField = value;
24965 }
24966 }
24967
24968 public YesNoType CreateSubkeys
24969 {
24970 get
24971 {
24972 return this.createSubkeysField;
24973 }
24974 set
24975 {
24976 this.createSubkeysFieldSet = true;
24977 this.createSubkeysField = value;
24978 }
24979 }
24980
24981 public YesNoType EnumerateSubkeys
24982 {
24983 get
24984 {
24985 return this.enumerateSubkeysField;
24986 }
24987 set
24988 {
24989 this.enumerateSubkeysFieldSet = true;
24990 this.enumerateSubkeysField = value;
24991 }
24992 }
24993
24994 public YesNoType Notify
24995 {
24996 get
24997 {
24998 return this.notifyField;
24999 }
25000 set
25001 {
25002 this.notifyFieldSet = true;
25003 this.notifyField = value;
25004 }
25005 }
25006
25007 public YesNoType CreateLink
25008 {
25009 get
25010 {
25011 return this.createLinkField;
25012 }
25013 set
25014 {
25015 this.createLinkFieldSet = true;
25016 this.createLinkField = value;
25017 }
25018 }
25019
25020 public YesNoType GenericAll
25021 {
25022 get
25023 {
25024 return this.genericAllField;
25025 }
25026 set
25027 {
25028 this.genericAllFieldSet = true;
25029 this.genericAllField = value;
25030 }
25031 }
25032
25033 public YesNoType GenericExecute
25034 {
25035 get
25036 {
25037 return this.genericExecuteField;
25038 }
25039 set
25040 {
25041 this.genericExecuteFieldSet = true;
25042 this.genericExecuteField = value;
25043 }
25044 }
25045
25046 public YesNoType GenericWrite
25047 {
25048 get
25049 {
25050 return this.genericWriteField;
25051 }
25052 set
25053 {
25054 this.genericWriteFieldSet = true;
25055 this.genericWriteField = value;
25056 }
25057 }
25058
25059 /// <summary>
25060 /// specifying this will fail to grant read access
25061 /// </summary>
25062 public YesNoType GenericRead
25063 {
25064 get
25065 {
25066 return this.genericReadField;
25067 }
25068 set
25069 {
25070 this.genericReadFieldSet = true;
25071 this.genericReadField = value;
25072 }
25073 }
25074
25075 public virtual ISchemaElement ParentElement
25076 {
25077 get
25078 {
25079 return this.parentElement;
25080 }
25081 set
25082 {
25083 this.parentElement = value;
25084 }
25085 }
25086
25087 /// <summary>
25088 /// Processes this element and all child elements into an XmlWriter.
25089 /// </summary>
25090 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
25091 public virtual void OutputXml(XmlWriter writer)
25092 {
25093 if ((null == writer))
25094 {
25095 throw new ArgumentNullException("writer");
25096 }
25097 writer.WriteStartElement("Permission", "http://wixtoolset.org/schemas/v4/wxs");
25098 if (this.domainFieldSet)
25099 {
25100 writer.WriteAttributeString("Domain", this.domainField);
25101 }
25102 if (this.userFieldSet)
25103 {
25104 writer.WriteAttributeString("User", this.userField);
25105 }
25106 if (this.readFieldSet)
25107 {
25108 if ((this.readField == YesNoType.no))
25109 {
25110 writer.WriteAttributeString("Read", "no");
25111 }
25112 if ((this.readField == YesNoType.yes))
25113 {
25114 writer.WriteAttributeString("Read", "yes");
25115 }
25116 }
25117 if (this.deleteFieldSet)
25118 {
25119 if ((this.deleteField == YesNoType.no))
25120 {
25121 writer.WriteAttributeString("Delete", "no");
25122 }
25123 if ((this.deleteField == YesNoType.yes))
25124 {
25125 writer.WriteAttributeString("Delete", "yes");
25126 }
25127 }
25128 if (this.readPermissionFieldSet)
25129 {
25130 if ((this.readPermissionField == YesNoType.no))
25131 {
25132 writer.WriteAttributeString("ReadPermission", "no");
25133 }
25134 if ((this.readPermissionField == YesNoType.yes))
25135 {
25136 writer.WriteAttributeString("ReadPermission", "yes");
25137 }
25138 }
25139 if (this.changePermissionFieldSet)
25140 {
25141 if ((this.changePermissionField == YesNoType.no))
25142 {
25143 writer.WriteAttributeString("ChangePermission", "no");
25144 }
25145 if ((this.changePermissionField == YesNoType.yes))
25146 {
25147 writer.WriteAttributeString("ChangePermission", "yes");
25148 }
25149 }
25150 if (this.takeOwnershipFieldSet)
25151 {
25152 if ((this.takeOwnershipField == YesNoType.no))
25153 {
25154 writer.WriteAttributeString("TakeOwnership", "no");
25155 }
25156 if ((this.takeOwnershipField == YesNoType.yes))
25157 {
25158 writer.WriteAttributeString("TakeOwnership", "yes");
25159 }
25160 }
25161 if (this.specificRightsAllFieldSet)
25162 {
25163 if ((this.specificRightsAllField == YesNoType.no))
25164 {
25165 writer.WriteAttributeString("SpecificRightsAll", "no");
25166 }
25167 if ((this.specificRightsAllField == YesNoType.yes))
25168 {
25169 writer.WriteAttributeString("SpecificRightsAll", "yes");
25170 }
25171 }
25172 if (this.readAttributesFieldSet)
25173 {
25174 if ((this.readAttributesField == YesNoType.no))
25175 {
25176 writer.WriteAttributeString("ReadAttributes", "no");
25177 }
25178 if ((this.readAttributesField == YesNoType.yes))
25179 {
25180 writer.WriteAttributeString("ReadAttributes", "yes");
25181 }
25182 }
25183 if (this.writeAttributesFieldSet)
25184 {
25185 if ((this.writeAttributesField == YesNoType.no))
25186 {
25187 writer.WriteAttributeString("WriteAttributes", "no");
25188 }
25189 if ((this.writeAttributesField == YesNoType.yes))
25190 {
25191 writer.WriteAttributeString("WriteAttributes", "yes");
25192 }
25193 }
25194 if (this.readExtendedAttributesFieldSet)
25195 {
25196 if ((this.readExtendedAttributesField == YesNoType.no))
25197 {
25198 writer.WriteAttributeString("ReadExtendedAttributes", "no");
25199 }
25200 if ((this.readExtendedAttributesField == YesNoType.yes))
25201 {
25202 writer.WriteAttributeString("ReadExtendedAttributes", "yes");
25203 }
25204 }
25205 if (this.writeExtendedAttributesFieldSet)
25206 {
25207 if ((this.writeExtendedAttributesField == YesNoType.no))
25208 {
25209 writer.WriteAttributeString("WriteExtendedAttributes", "no");
25210 }
25211 if ((this.writeExtendedAttributesField == YesNoType.yes))
25212 {
25213 writer.WriteAttributeString("WriteExtendedAttributes", "yes");
25214 }
25215 }
25216 if (this.synchronizeFieldSet)
25217 {
25218 if ((this.synchronizeField == YesNoType.no))
25219 {
25220 writer.WriteAttributeString("Synchronize", "no");
25221 }
25222 if ((this.synchronizeField == YesNoType.yes))
25223 {
25224 writer.WriteAttributeString("Synchronize", "yes");
25225 }
25226 }
25227 if (this.createFileFieldSet)
25228 {
25229 if ((this.createFileField == YesNoType.no))
25230 {
25231 writer.WriteAttributeString("CreateFile", "no");
25232 }
25233 if ((this.createFileField == YesNoType.yes))
25234 {
25235 writer.WriteAttributeString("CreateFile", "yes");
25236 }
25237 }
25238 if (this.createChildFieldSet)
25239 {
25240 if ((this.createChildField == YesNoType.no))
25241 {
25242 writer.WriteAttributeString("CreateChild", "no");
25243 }
25244 if ((this.createChildField == YesNoType.yes))
25245 {
25246 writer.WriteAttributeString("CreateChild", "yes");
25247 }
25248 }
25249 if (this.deleteChildFieldSet)
25250 {
25251 if ((this.deleteChildField == YesNoType.no))
25252 {
25253 writer.WriteAttributeString("DeleteChild", "no");
25254 }
25255 if ((this.deleteChildField == YesNoType.yes))
25256 {
25257 writer.WriteAttributeString("DeleteChild", "yes");
25258 }
25259 }
25260 if (this.traverseFieldSet)
25261 {
25262 if ((this.traverseField == YesNoType.no))
25263 {
25264 writer.WriteAttributeString("Traverse", "no");
25265 }
25266 if ((this.traverseField == YesNoType.yes))
25267 {
25268 writer.WriteAttributeString("Traverse", "yes");
25269 }
25270 }
25271 if (this.appendFieldSet)
25272 {
25273 if ((this.appendField == YesNoType.no))
25274 {
25275 writer.WriteAttributeString("Append", "no");
25276 }
25277 if ((this.appendField == YesNoType.yes))
25278 {
25279 writer.WriteAttributeString("Append", "yes");
25280 }
25281 }
25282 if (this.executeFieldSet)
25283 {
25284 if ((this.executeField == YesNoType.no))
25285 {
25286 writer.WriteAttributeString("Execute", "no");
25287 }
25288 if ((this.executeField == YesNoType.yes))
25289 {
25290 writer.WriteAttributeString("Execute", "yes");
25291 }
25292 }
25293 if (this.fileAllRightsFieldSet)
25294 {
25295 if ((this.fileAllRightsField == YesNoType.no))
25296 {
25297 writer.WriteAttributeString("FileAllRights", "no");
25298 }
25299 if ((this.fileAllRightsField == YesNoType.yes))
25300 {
25301 writer.WriteAttributeString("FileAllRights", "yes");
25302 }
25303 }
25304 if (this.writeFieldSet)
25305 {
25306 if ((this.writeField == YesNoType.no))
25307 {
25308 writer.WriteAttributeString("Write", "no");
25309 }
25310 if ((this.writeField == YesNoType.yes))
25311 {
25312 writer.WriteAttributeString("Write", "yes");
25313 }
25314 }
25315 if (this.createSubkeysFieldSet)
25316 {
25317 if ((this.createSubkeysField == YesNoType.no))
25318 {
25319 writer.WriteAttributeString("CreateSubkeys", "no");
25320 }
25321 if ((this.createSubkeysField == YesNoType.yes))
25322 {
25323 writer.WriteAttributeString("CreateSubkeys", "yes");
25324 }
25325 }
25326 if (this.enumerateSubkeysFieldSet)
25327 {
25328 if ((this.enumerateSubkeysField == YesNoType.no))
25329 {
25330 writer.WriteAttributeString("EnumerateSubkeys", "no");
25331 }
25332 if ((this.enumerateSubkeysField == YesNoType.yes))
25333 {
25334 writer.WriteAttributeString("EnumerateSubkeys", "yes");
25335 }
25336 }
25337 if (this.notifyFieldSet)
25338 {
25339 if ((this.notifyField == YesNoType.no))
25340 {
25341 writer.WriteAttributeString("Notify", "no");
25342 }
25343 if ((this.notifyField == YesNoType.yes))
25344 {
25345 writer.WriteAttributeString("Notify", "yes");
25346 }
25347 }
25348 if (this.createLinkFieldSet)
25349 {
25350 if ((this.createLinkField == YesNoType.no))
25351 {
25352 writer.WriteAttributeString("CreateLink", "no");
25353 }
25354 if ((this.createLinkField == YesNoType.yes))
25355 {
25356 writer.WriteAttributeString("CreateLink", "yes");
25357 }
25358 }
25359 if (this.genericAllFieldSet)
25360 {
25361 if ((this.genericAllField == YesNoType.no))
25362 {
25363 writer.WriteAttributeString("GenericAll", "no");
25364 }
25365 if ((this.genericAllField == YesNoType.yes))
25366 {
25367 writer.WriteAttributeString("GenericAll", "yes");
25368 }
25369 }
25370 if (this.genericExecuteFieldSet)
25371 {
25372 if ((this.genericExecuteField == YesNoType.no))
25373 {
25374 writer.WriteAttributeString("GenericExecute", "no");
25375 }
25376 if ((this.genericExecuteField == YesNoType.yes))
25377 {
25378 writer.WriteAttributeString("GenericExecute", "yes");
25379 }
25380 }
25381 if (this.genericWriteFieldSet)
25382 {
25383 if ((this.genericWriteField == YesNoType.no))
25384 {
25385 writer.WriteAttributeString("GenericWrite", "no");
25386 }
25387 if ((this.genericWriteField == YesNoType.yes))
25388 {
25389 writer.WriteAttributeString("GenericWrite", "yes");
25390 }
25391 }
25392 if (this.genericReadFieldSet)
25393 {
25394 if ((this.genericReadField == YesNoType.no))
25395 {
25396 writer.WriteAttributeString("GenericRead", "no");
25397 }
25398 if ((this.genericReadField == YesNoType.yes))
25399 {
25400 writer.WriteAttributeString("GenericRead", "yes");
25401 }
25402 }
25403 writer.WriteEndElement();
25404 }
25405
25406 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
25407 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
25408 void ISetAttributes.SetAttribute(string name, string value)
25409 {
25410 if (String.IsNullOrEmpty(name))
25411 {
25412 throw new ArgumentNullException("name");
25413 }
25414 if (("Domain" == name))
25415 {
25416 this.domainField = value;
25417 this.domainFieldSet = true;
25418 }
25419 if (("User" == name))
25420 {
25421 this.userField = value;
25422 this.userFieldSet = true;
25423 }
25424 if (("Read" == name))
25425 {
25426 this.readField = Enums.ParseYesNoType(value);
25427 this.readFieldSet = true;
25428 }
25429 if (("Delete" == name))
25430 {
25431 this.deleteField = Enums.ParseYesNoType(value);
25432 this.deleteFieldSet = true;
25433 }
25434 if (("ReadPermission" == name))
25435 {
25436 this.readPermissionField = Enums.ParseYesNoType(value);
25437 this.readPermissionFieldSet = true;
25438 }
25439 if (("ChangePermission" == name))
25440 {
25441 this.changePermissionField = Enums.ParseYesNoType(value);
25442 this.changePermissionFieldSet = true;
25443 }
25444 if (("TakeOwnership" == name))
25445 {
25446 this.takeOwnershipField = Enums.ParseYesNoType(value);
25447 this.takeOwnershipFieldSet = true;
25448 }
25449 if (("SpecificRightsAll" == name))
25450 {
25451 this.specificRightsAllField = Enums.ParseYesNoType(value);
25452 this.specificRightsAllFieldSet = true;
25453 }
25454 if (("ReadAttributes" == name))
25455 {
25456 this.readAttributesField = Enums.ParseYesNoType(value);
25457 this.readAttributesFieldSet = true;
25458 }
25459 if (("WriteAttributes" == name))
25460 {
25461 this.writeAttributesField = Enums.ParseYesNoType(value);
25462 this.writeAttributesFieldSet = true;
25463 }
25464 if (("ReadExtendedAttributes" == name))
25465 {
25466 this.readExtendedAttributesField = Enums.ParseYesNoType(value);
25467 this.readExtendedAttributesFieldSet = true;
25468 }
25469 if (("WriteExtendedAttributes" == name))
25470 {
25471 this.writeExtendedAttributesField = Enums.ParseYesNoType(value);
25472 this.writeExtendedAttributesFieldSet = true;
25473 }
25474 if (("Synchronize" == name))
25475 {
25476 this.synchronizeField = Enums.ParseYesNoType(value);
25477 this.synchronizeFieldSet = true;
25478 }
25479 if (("CreateFile" == name))
25480 {
25481 this.createFileField = Enums.ParseYesNoType(value);
25482 this.createFileFieldSet = true;
25483 }
25484 if (("CreateChild" == name))
25485 {
25486 this.createChildField = Enums.ParseYesNoType(value);
25487 this.createChildFieldSet = true;
25488 }
25489 if (("DeleteChild" == name))
25490 {
25491 this.deleteChildField = Enums.ParseYesNoType(value);
25492 this.deleteChildFieldSet = true;
25493 }
25494 if (("Traverse" == name))
25495 {
25496 this.traverseField = Enums.ParseYesNoType(value);
25497 this.traverseFieldSet = true;
25498 }
25499 if (("Append" == name))
25500 {
25501 this.appendField = Enums.ParseYesNoType(value);
25502 this.appendFieldSet = true;
25503 }
25504 if (("Execute" == name))
25505 {
25506 this.executeField = Enums.ParseYesNoType(value);
25507 this.executeFieldSet = true;
25508 }
25509 if (("FileAllRights" == name))
25510 {
25511 this.fileAllRightsField = Enums.ParseYesNoType(value);
25512 this.fileAllRightsFieldSet = true;
25513 }
25514 if (("Write" == name))
25515 {
25516 this.writeField = Enums.ParseYesNoType(value);
25517 this.writeFieldSet = true;
25518 }
25519 if (("CreateSubkeys" == name))
25520 {
25521 this.createSubkeysField = Enums.ParseYesNoType(value);
25522 this.createSubkeysFieldSet = true;
25523 }
25524 if (("EnumerateSubkeys" == name))
25525 {
25526 this.enumerateSubkeysField = Enums.ParseYesNoType(value);
25527 this.enumerateSubkeysFieldSet = true;
25528 }
25529 if (("Notify" == name))
25530 {
25531 this.notifyField = Enums.ParseYesNoType(value);
25532 this.notifyFieldSet = true;
25533 }
25534 if (("CreateLink" == name))
25535 {
25536 this.createLinkField = Enums.ParseYesNoType(value);
25537 this.createLinkFieldSet = true;
25538 }
25539 if (("GenericAll" == name))
25540 {
25541 this.genericAllField = Enums.ParseYesNoType(value);
25542 this.genericAllFieldSet = true;
25543 }
25544 if (("GenericExecute" == name))
25545 {
25546 this.genericExecuteField = Enums.ParseYesNoType(value);
25547 this.genericExecuteFieldSet = true;
25548 }
25549 if (("GenericWrite" == name))
25550 {
25551 this.genericWriteField = Enums.ParseYesNoType(value);
25552 this.genericWriteFieldSet = true;
25553 }
25554 if (("GenericRead" == name))
25555 {
25556 this.genericReadField = Enums.ParseYesNoType(value);
25557 this.genericReadFieldSet = true;
25558 }
25559 }
25560 }
25561
25562 /// <summary>
25563 /// Sets ACLs on File, Registry, or CreateFolder. When under a Registry element, this cannot be used
25564 /// if the Action attribute's value is remove or removeKeyOnInstall. This element is only available
25565 /// when installing with MSI 5.0. For downlevel support, see the PermissionEx element from the
25566 /// WixUtilExtension.
25567 /// </summary>
25568 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
25569 public class PermissionEx : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
25570 {
25571
25572 private ElementCollection children;
25573
25574 private string idField;
25575
25576 private bool idFieldSet;
25577
25578 private string sddlField;
25579
25580 private bool sddlFieldSet;
25581
25582 private ISchemaElement parentElement;
25583
25584 public PermissionEx()
25585 {
25586 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
25587 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Condition)));
25588 this.children = childCollection0;
25589 }
25590
25591 public virtual IEnumerable Children
25592 {
25593 get
25594 {
25595 return this.children;
25596 }
25597 }
25598
25599 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
25600 public virtual IEnumerable this[System.Type childType]
25601 {
25602 get
25603 {
25604 return this.children.Filter(childType);
25605 }
25606 }
25607
25608 /// <summary>
25609 /// Primary key used to identify this particular entry. If this is not specified the parent element's Id attribute
25610 /// will be used instead.
25611 /// </summary>
25612 public string Id
25613 {
25614 get
25615 {
25616 return this.idField;
25617 }
25618 set
25619 {
25620 this.idFieldSet = true;
25621 this.idField = value;
25622 }
25623 }
25624
25625 /// <summary>
25626 /// Security descriptor to apply to parent object.
25627 /// </summary>
25628 public string Sddl
25629 {
25630 get
25631 {
25632 return this.sddlField;
25633 }
25634 set
25635 {
25636 this.sddlFieldSet = true;
25637 this.sddlField = value;
25638 }
25639 }
25640
25641 public virtual ISchemaElement ParentElement
25642 {
25643 get
25644 {
25645 return this.parentElement;
25646 }
25647 set
25648 {
25649 this.parentElement = value;
25650 }
25651 }
25652
25653 public virtual void AddChild(ISchemaElement child)
25654 {
25655 if ((null == child))
25656 {
25657 throw new ArgumentNullException("child");
25658 }
25659 this.children.AddElement(child);
25660 child.ParentElement = this;
25661 }
25662
25663 public virtual void RemoveChild(ISchemaElement child)
25664 {
25665 if ((null == child))
25666 {
25667 throw new ArgumentNullException("child");
25668 }
25669 this.children.RemoveElement(child);
25670 child.ParentElement = null;
25671 }
25672
25673 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
25674 ISchemaElement ICreateChildren.CreateChild(string childName)
25675 {
25676 if (String.IsNullOrEmpty(childName))
25677 {
25678 throw new ArgumentNullException("childName");
25679 }
25680 ISchemaElement childValue = null;
25681 if (("Condition" == childName))
25682 {
25683 childValue = new Condition();
25684 }
25685 if ((null == childValue))
25686 {
25687 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
25688 }
25689 return childValue;
25690 }
25691
25692 /// <summary>
25693 /// Processes this element and all child elements into an XmlWriter.
25694 /// </summary>
25695 public virtual void OutputXml(XmlWriter writer)
25696 {
25697 if ((null == writer))
25698 {
25699 throw new ArgumentNullException("writer");
25700 }
25701 writer.WriteStartElement("PermissionEx", "http://wixtoolset.org/schemas/v4/wxs");
25702 if (this.idFieldSet)
25703 {
25704 writer.WriteAttributeString("Id", this.idField);
25705 }
25706 if (this.sddlFieldSet)
25707 {
25708 writer.WriteAttributeString("Sddl", this.sddlField);
25709 }
25710 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
25711 {
25712 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
25713 childElement.OutputXml(writer);
25714 }
25715 writer.WriteEndElement();
25716 }
25717
25718 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
25719 void ISetAttributes.SetAttribute(string name, string value)
25720 {
25721 if (String.IsNullOrEmpty(name))
25722 {
25723 throw new ArgumentNullException("name");
25724 }
25725 if (("Id" == name))
25726 {
25727 this.idField = value;
25728 this.idFieldSet = true;
25729 }
25730 if (("Sddl" == name))
25731 {
25732 this.sddlField = value;
25733 this.sddlFieldSet = true;
25734 }
25735 }
25736 }
25737
25738 /// <summary>
25739 /// Copy or move an existing file on the target machine, or copy a file that is being installed, to another destination. When
25740 /// this element is nested under a File element, the parent file will be installed, then copied to the specified destination
25741 /// if the parent component of the file is selected for installation or removal. When this element is nested under
25742 /// a Component element and no FileId attribute is specified, the file to copy or move must already be on the target machine.
25743 /// When this element is nested under a Component element and the FileId attribute is specified, the specified file is installed,
25744 /// then copied to the specified destination if the parent component is selected for installation or removal (use
25745 /// this option to control the copy of a file in a different component by the parent component's installation state). If the
25746 /// specified destination directory is the same as the directory containing the original file and the name for the proposed source
25747 /// file is the same as the original, then no action takes place.
25748 /// </summary>
25749 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
25750 public class CopyFile : ISchemaElement, ISetAttributes
25751 {
25752
25753 private string idField;
25754
25755 private bool idFieldSet;
25756
25757 private string fileIdField;
25758
25759 private bool fileIdFieldSet;
25760
25761 private string sourceDirectoryField;
25762
25763 private bool sourceDirectoryFieldSet;
25764
25765 private string sourcePropertyField;
25766
25767 private bool sourcePropertyFieldSet;
25768
25769 private string sourceNameField;
25770
25771 private bool sourceNameFieldSet;
25772
25773 private string destinationDirectoryField;
25774
25775 private bool destinationDirectoryFieldSet;
25776
25777 private string destinationPropertyField;
25778
25779 private bool destinationPropertyFieldSet;
25780
25781 private string destinationNameField;
25782
25783 private bool destinationNameFieldSet;
25784
25785 private string destinationShortNameField;
25786
25787 private bool destinationShortNameFieldSet;
25788
25789 private YesNoType deleteField;
25790
25791 private bool deleteFieldSet;
25792
25793 private ISchemaElement parentElement;
25794
25795 /// <summary>
25796 /// Primary key used to identify this particular entry.
25797 /// </summary>
25798 public string Id
25799 {
25800 get
25801 {
25802 return this.idField;
25803 }
25804 set
25805 {
25806 this.idFieldSet = true;
25807 this.idField = value;
25808 }
25809 }
25810
25811 /// <summary>
25812 /// This attribute cannot be specified if the element is nested under a File element. Set this attribute's value to the identifier
25813 /// of a file from a different component to copy it based on the install state of the parent component.
25814 /// </summary>
25815 public string FileId
25816 {
25817 get
25818 {
25819 return this.fileIdField;
25820 }
25821 set
25822 {
25823 this.fileIdFieldSet = true;
25824 this.fileIdField = value;
25825 }
25826 }
25827
25828 /// <summary>
25829 /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set
25830 /// this value to the source directory from which to copy or move an existing file on the target machine. This Directory must
25831 /// exist in the installer database at creation time. This attribute cannot be specified in conjunction with SourceProperty.
25832 /// </summary>
25833 public string SourceDirectory
25834 {
25835 get
25836 {
25837 return this.sourceDirectoryField;
25838 }
25839 set
25840 {
25841 this.sourceDirectoryFieldSet = true;
25842 this.sourceDirectoryField = value;
25843 }
25844 }
25845
25846 /// <summary>
25847 /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set
25848 /// this value to a property that will have a value that resolves to the full path of the source directory (or full path
25849 /// including file name if SourceName is not specified). The property does not have to exist in the installer database at
25850 /// creation time; it could be created at installation time by a custom action, on the command line, etc. This attribute
25851 /// cannot be specified in conjunction with SourceDirectory.
25852 /// </summary>
25853 public string SourceProperty
25854 {
25855 get
25856 {
25857 return this.sourcePropertyField;
25858 }
25859 set
25860 {
25861 this.sourcePropertyFieldSet = true;
25862 this.sourcePropertyField = value;
25863 }
25864 }
25865
25866 /// <summary>
25867 /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set
25868 /// this value to the localizable name of the file(s) to be copied or moved. All of the files that
25869 /// match the wild card will be removed from the specified directory. The value is a filename that may also
25870 /// contain the wild card characters "?" for any single character or "*" for zero or more occurrences of any character. If this
25871 /// attribute is not specified (and this element is not nested under a File element or specify a FileId attribute) then the
25872 /// SourceProperty attribute should be set to the name of a property that will resolve to the full path of the source filename.
25873 /// If the value of this attribute contains a "*" wildcard and the DestinationName attribute is specified, all moved or copied
25874 /// files retain the file names from their sources.
25875 /// </summary>
25876 public string SourceName
25877 {
25878 get
25879 {
25880 return this.sourceNameField;
25881 }
25882 set
25883 {
25884 this.sourceNameFieldSet = true;
25885 this.sourceNameField = value;
25886 }
25887 }
25888
25889 /// <summary>
25890 /// Set this value to the destination directory where an existing file on the target machine should be moved or copied to. This
25891 /// Directory must exist in the installer database at creation time. This attribute cannot be specified in conjunction with
25892 /// DestinationProperty.
25893 /// </summary>
25894 public string DestinationDirectory
25895 {
25896 get
25897 {
25898 return this.destinationDirectoryField;
25899 }
25900 set
25901 {
25902 this.destinationDirectoryFieldSet = true;
25903 this.destinationDirectoryField = value;
25904 }
25905 }
25906
25907 /// <summary>
25908 /// Set this value to a property that will have a value that resolves to the full path of the destination directory. The property
25909 /// does not have to exist in the installer database at creation time; it could be created at installation time by a custom
25910 /// action, on the command line, etc. This attribute cannot be specified in conjunction with DestinationDirectory.
25911 /// </summary>
25912 public string DestinationProperty
25913 {
25914 get
25915 {
25916 return this.destinationPropertyField;
25917 }
25918 set
25919 {
25920 this.destinationPropertyFieldSet = true;
25921 this.destinationPropertyField = value;
25922 }
25923 }
25924
25925 /// <summary>
25926 /// In prior versions of the WiX toolset, this attribute specified the short file name.
25927 /// Now set this value to the localizable name to be given to the original file after it is moved or copied.
25928 /// If this attribute is not specified, then the destination file is given the same name as the source file.
25929 /// If a short file name is specified, the DestinationShortName attribute may not be specified.
25930 /// Also, if this value is a long file name, the DestinationShortName attribute may be omitted to
25931 /// allow WiX to attempt to generate a unique short file name.
25932 /// However, if this name collides with another file or you wish to manually specify
25933 /// the short file name, then the DestinationShortName attribute may be specified.
25934 /// </summary>
25935 public string DestinationName
25936 {
25937 get
25938 {
25939 return this.destinationNameField;
25940 }
25941 set
25942 {
25943 this.destinationNameFieldSet = true;
25944 this.destinationNameField = value;
25945 }
25946 }
25947
25948 /// <summary>
25949 /// The short file name of the file in 8.3 format.
25950 /// This attribute should only be set if there is a conflict between generated short file names
25951 /// or you wish to manually specify the short file name.
25952 /// </summary>
25953 public string DestinationShortName
25954 {
25955 get
25956 {
25957 return this.destinationShortNameField;
25958 }
25959 set
25960 {
25961 this.destinationShortNameFieldSet = true;
25962 this.destinationShortNameField = value;
25963 }
25964 }
25965
25966 /// <summary>
25967 /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. In other
25968 /// cases, if the attribute is not specified, the default value is "no" and the file is copied, not moved. Set the value to "yes"
25969 /// in order to move the file (thus deleting the source file) instead of copying it.
25970 /// </summary>
25971 public YesNoType Delete
25972 {
25973 get
25974 {
25975 return this.deleteField;
25976 }
25977 set
25978 {
25979 this.deleteFieldSet = true;
25980 this.deleteField = value;
25981 }
25982 }
25983
25984 public virtual ISchemaElement ParentElement
25985 {
25986 get
25987 {
25988 return this.parentElement;
25989 }
25990 set
25991 {
25992 this.parentElement = value;
25993 }
25994 }
25995
25996 /// <summary>
25997 /// Processes this element and all child elements into an XmlWriter.
25998 /// </summary>
25999 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
26000 public virtual void OutputXml(XmlWriter writer)
26001 {
26002 if ((null == writer))
26003 {
26004 throw new ArgumentNullException("writer");
26005 }
26006 writer.WriteStartElement("CopyFile", "http://wixtoolset.org/schemas/v4/wxs");
26007 if (this.idFieldSet)
26008 {
26009 writer.WriteAttributeString("Id", this.idField);
26010 }
26011 if (this.fileIdFieldSet)
26012 {
26013 writer.WriteAttributeString("FileId", this.fileIdField);
26014 }
26015 if (this.sourceDirectoryFieldSet)
26016 {
26017 writer.WriteAttributeString("SourceDirectory", this.sourceDirectoryField);
26018 }
26019 if (this.sourcePropertyFieldSet)
26020 {
26021 writer.WriteAttributeString("SourceProperty", this.sourcePropertyField);
26022 }
26023 if (this.sourceNameFieldSet)
26024 {
26025 writer.WriteAttributeString("SourceName", this.sourceNameField);
26026 }
26027 if (this.destinationDirectoryFieldSet)
26028 {
26029 writer.WriteAttributeString("DestinationDirectory", this.destinationDirectoryField);
26030 }
26031 if (this.destinationPropertyFieldSet)
26032 {
26033 writer.WriteAttributeString("DestinationProperty", this.destinationPropertyField);
26034 }
26035 if (this.destinationNameFieldSet)
26036 {
26037 writer.WriteAttributeString("DestinationName", this.destinationNameField);
26038 }
26039 if (this.destinationShortNameFieldSet)
26040 {
26041 writer.WriteAttributeString("DestinationShortName", this.destinationShortNameField);
26042 }
26043 if (this.deleteFieldSet)
26044 {
26045 if ((this.deleteField == YesNoType.no))
26046 {
26047 writer.WriteAttributeString("Delete", "no");
26048 }
26049 if ((this.deleteField == YesNoType.yes))
26050 {
26051 writer.WriteAttributeString("Delete", "yes");
26052 }
26053 }
26054 writer.WriteEndElement();
26055 }
26056
26057 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
26058 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
26059 void ISetAttributes.SetAttribute(string name, string value)
26060 {
26061 if (String.IsNullOrEmpty(name))
26062 {
26063 throw new ArgumentNullException("name");
26064 }
26065 if (("Id" == name))
26066 {
26067 this.idField = value;
26068 this.idFieldSet = true;
26069 }
26070 if (("FileId" == name))
26071 {
26072 this.fileIdField = value;
26073 this.fileIdFieldSet = true;
26074 }
26075 if (("SourceDirectory" == name))
26076 {
26077 this.sourceDirectoryField = value;
26078 this.sourceDirectoryFieldSet = true;
26079 }
26080 if (("SourceProperty" == name))
26081 {
26082 this.sourcePropertyField = value;
26083 this.sourcePropertyFieldSet = true;
26084 }
26085 if (("SourceName" == name))
26086 {
26087 this.sourceNameField = value;
26088 this.sourceNameFieldSet = true;
26089 }
26090 if (("DestinationDirectory" == name))
26091 {
26092 this.destinationDirectoryField = value;
26093 this.destinationDirectoryFieldSet = true;
26094 }
26095 if (("DestinationProperty" == name))
26096 {
26097 this.destinationPropertyField = value;
26098 this.destinationPropertyFieldSet = true;
26099 }
26100 if (("DestinationName" == name))
26101 {
26102 this.destinationNameField = value;
26103 this.destinationNameFieldSet = true;
26104 }
26105 if (("DestinationShortName" == name))
26106 {
26107 this.destinationShortNameField = value;
26108 this.destinationShortNameFieldSet = true;
26109 }
26110 if (("Delete" == name))
26111 {
26112 this.deleteField = Enums.ParseYesNoType(value);
26113 this.deleteFieldSet = true;
26114 }
26115 }
26116 }
26117
26118 /// <summary>
26119 /// File specification for File table, must be child node of Component.
26120 /// </summary>
26121 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
26122 public class File : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
26123 {
26124
26125 private ElementCollection children;
26126
26127 private string idField;
26128
26129 private bool idFieldSet;
26130
26131 private string companionFileField;
26132
26133 private bool companionFileFieldSet;
26134
26135 private string nameField;
26136
26137 private bool nameFieldSet;
26138
26139 private YesNoType keyPathField;
26140
26141 private bool keyPathFieldSet;
26142
26143 private string shortNameField;
26144
26145 private bool shortNameFieldSet;
26146
26147 private YesNoType readOnlyField;
26148
26149 private bool readOnlyFieldSet;
26150
26151 private YesNoType hiddenField;
26152
26153 private bool hiddenFieldSet;
26154
26155 private YesNoType systemField;
26156
26157 private bool systemFieldSet;
26158
26159 private YesNoType vitalField;
26160
26161 private bool vitalFieldSet;
26162
26163 private YesNoType checksumField;
26164
26165 private bool checksumFieldSet;
26166
26167 private YesNoDefaultType compressedField;
26168
26169 private bool compressedFieldSet;
26170
26171 private string bindPathField;
26172
26173 private bool bindPathFieldSet;
26174
26175 private int selfRegCostField;
26176
26177 private bool selfRegCostFieldSet;
26178
26179 private YesNoType trueTypeField;
26180
26181 private bool trueTypeFieldSet;
26182
26183 private string fontTitleField;
26184
26185 private bool fontTitleFieldSet;
26186
26187 private string defaultLanguageField;
26188
26189 private bool defaultLanguageFieldSet;
26190
26191 private int defaultSizeField;
26192
26193 private bool defaultSizeFieldSet;
26194
26195 private string defaultVersionField;
26196
26197 private bool defaultVersionFieldSet;
26198
26199 private AssemblyType assemblyField;
26200
26201 private bool assemblyFieldSet;
26202
26203 private string assemblyManifestField;
26204
26205 private bool assemblyManifestFieldSet;
26206
26207 private string assemblyApplicationField;
26208
26209 private bool assemblyApplicationFieldSet;
26210
26211 private ProcessorArchitectureType processorArchitectureField;
26212
26213 private bool processorArchitectureFieldSet;
26214
26215 private string diskIdField;
26216
26217 private bool diskIdFieldSet;
26218
26219 private string sourceField;
26220
26221 private bool sourceFieldSet;
26222
26223 private string srcField;
26224
26225 private bool srcFieldSet;
26226
26227 private int patchGroupField;
26228
26229 private bool patchGroupFieldSet;
26230
26231 private YesNoType patchIgnoreField;
26232
26233 private bool patchIgnoreFieldSet;
26234
26235 private YesNoType patchAllowIgnoreOnErrorField;
26236
26237 private bool patchAllowIgnoreOnErrorFieldSet;
26238
26239 private YesNoType patchWholeFileField;
26240
26241 private bool patchWholeFileFieldSet;
26242
26243 private ISchemaElement parentElement;
26244
26245 public File()
26246 {
26247 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
26248 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AssemblyName)));
26249 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission)));
26250 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
26251 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CopyFile)));
26252 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut)));
26253 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDriver)));
26254 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCTranslator)));
26255 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
26256 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class)));
26257 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
26258 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TypeLib)));
26259 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
26260 this.children = childCollection0;
26261 }
26262
26263 public virtual IEnumerable Children
26264 {
26265 get
26266 {
26267 return this.children;
26268 }
26269 }
26270
26271 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
26272 public virtual IEnumerable this[System.Type childType]
26273 {
26274 get
26275 {
26276 return this.children.Filter(childType);
26277 }
26278 }
26279
26280 /// <summary>
26281 /// 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].
26282 /// </summary>
26283 public string Id
26284 {
26285 get
26286 {
26287 return this.idField;
26288 }
26289 set
26290 {
26291 this.idFieldSet = true;
26292 this.idField = value;
26293 }
26294 }
26295
26296 /// <summary>
26297 /// Set this attribute to make this file a companion child of another file. The installation
26298 /// state of a companion file depends not on its own file versioning information, but on the versioning of its
26299 /// companion parent. A file that is the key path for its component can not be a companion file (that means
26300 /// this attribute cannot be set if KeyPath="yes" for this file). The Version attribute cannot be set along
26301 /// with this attribute since companion files are not installed based on their own version.
26302 /// </summary>
26303 public string CompanionFile
26304 {
26305 get
26306 {
26307 return this.companionFileField;
26308 }
26309 set
26310 {
26311 this.companionFileFieldSet = true;
26312 this.companionFileField = value;
26313 }
26314 }
26315
26316 /// <summary>
26317 /// In prior versions of the WiX toolset, this attribute specified the short file name.
26318 /// This attribute's value may now be either a short or long file name.
26319 /// If a short file name is specified, the ShortName attribute may not be specified.
26320 /// Also, if this value is a long file name, the ShortName attribute may be omitted to
26321 /// allow WiX to attempt to generate a unique short file name.
26322 /// However, if this name collides with another file or you wish to manually specify
26323 /// the short file name, then the ShortName attribute may be specified.
26324 /// Finally, if this attribute is omitted then its default value is the file name portion
26325 /// of the Source attribute, if one is specified, or the value of the Id attribute, if
26326 /// the Source attribute is omitted or doesn't contain a file name.
26327 /// </summary>
26328 public string Name
26329 {
26330 get
26331 {
26332 return this.nameField;
26333 }
26334 set
26335 {
26336 this.nameFieldSet = true;
26337 this.nameField = value;
26338 }
26339 }
26340
26341 /// <summary>
26342 /// Set to yes in order to force this file to be the key path for the parent component.
26343 /// </summary>
26344 public YesNoType KeyPath
26345 {
26346 get
26347 {
26348 return this.keyPathField;
26349 }
26350 set
26351 {
26352 this.keyPathFieldSet = true;
26353 this.keyPathField = value;
26354 }
26355 }
26356
26357 /// <summary>
26358 /// The short file name of the file in 8.3 format.
26359 /// This attribute should only be set if there is a conflict between generated short file names
26360 /// or the user wants to manually specify the short file name.
26361 /// </summary>
26362 public string ShortName
26363 {
26364 get
26365 {
26366 return this.shortNameField;
26367 }
26368 set
26369 {
26370 this.shortNameFieldSet = true;
26371 this.shortNameField = value;
26372 }
26373 }
26374
26375 /// <summary>
26376 /// Set to yes in order to have the file's read-only attribute set when it is installed on the target machine.
26377 /// </summary>
26378 public YesNoType ReadOnly
26379 {
26380 get
26381 {
26382 return this.readOnlyField;
26383 }
26384 set
26385 {
26386 this.readOnlyFieldSet = true;
26387 this.readOnlyField = value;
26388 }
26389 }
26390
26391 /// <summary>
26392 /// Set to yes in order to have the file's hidden attribute set when it is installed on the target machine.
26393 /// </summary>
26394 public YesNoType Hidden
26395 {
26396 get
26397 {
26398 return this.hiddenField;
26399 }
26400 set
26401 {
26402 this.hiddenFieldSet = true;
26403 this.hiddenField = value;
26404 }
26405 }
26406
26407 /// <summary>
26408 /// Set to yes in order to have the file's system attribute set when it is installed on the target machine.
26409 /// </summary>
26410 public YesNoType System
26411 {
26412 get
26413 {
26414 return this.systemField;
26415 }
26416 set
26417 {
26418 this.systemFieldSet = true;
26419 this.systemField = value;
26420 }
26421 }
26422
26423 /// <summary>
26424 /// 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.
26425 /// </summary>
26426 public YesNoType Vital
26427 {
26428 get
26429 {
26430 return this.vitalField;
26431 }
26432 set
26433 {
26434 this.vitalFieldSet = true;
26435 this.vitalField = value;
26436 }
26437 }
26438
26439 /// <summary>
26440 /// 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.
26441 /// </summary>
26442 public YesNoType Checksum
26443 {
26444 get
26445 {
26446 return this.checksumField;
26447 }
26448 set
26449 {
26450 this.checksumFieldSet = true;
26451 this.checksumField = value;
26452 }
26453 }
26454
26455 /// <summary>
26456 /// Sets the file's source type compression. A setting of "yes" or "no" will override the setting in the Word Count Summary Property.
26457 /// </summary>
26458 public YesNoDefaultType Compressed
26459 {
26460 get
26461 {
26462 return this.compressedField;
26463 }
26464 set
26465 {
26466 this.compressedFieldSet = true;
26467 this.compressedField = value;
26468 }
26469 }
26470
26471 /// <summary>
26472 /// 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.
26473 /// </summary>
26474 public string BindPath
26475 {
26476 get
26477 {
26478 return this.bindPathField;
26479 }
26480 set
26481 {
26482 this.bindPathFieldSet = true;
26483 this.bindPathField = value;
26484 }
26485 }
26486
26487 /// <summary>
26488 /// 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.
26489 /// </summary>
26490 public int SelfRegCost
26491 {
26492 get
26493 {
26494 return this.selfRegCostField;
26495 }
26496 set
26497 {
26498 this.selfRegCostFieldSet = true;
26499 this.selfRegCostField = value;
26500 }
26501 }
26502
26503 /// <summary>
26504 /// 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.
26505 /// </summary>
26506 public YesNoType TrueType
26507 {
26508 get
26509 {
26510 return this.trueTypeField;
26511 }
26512 set
26513 {
26514 this.trueTypeFieldSet = true;
26515 this.trueTypeField = value;
26516 }
26517 }
26518
26519 /// <summary>
26520 /// 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.
26521 /// </summary>
26522 public string FontTitle
26523 {
26524 get
26525 {
26526 return this.fontTitleField;
26527 }
26528 set
26529 {
26530 this.fontTitleFieldSet = true;
26531 this.fontTitleField = value;
26532 }
26533 }
26534
26535 /// <summary>
26536 /// 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.
26537 /// </summary>
26538 public string DefaultLanguage
26539 {
26540 get
26541 {
26542 return this.defaultLanguageField;
26543 }
26544 set
26545 {
26546 this.defaultLanguageFieldSet = true;
26547 this.defaultLanguageField = value;
26548 }
26549 }
26550
26551 /// <summary>
26552 /// 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.
26553 /// </summary>
26554 public int DefaultSize
26555 {
26556 get
26557 {
26558 return this.defaultSizeField;
26559 }
26560 set
26561 {
26562 this.defaultSizeFieldSet = true;
26563 this.defaultSizeField = value;
26564 }
26565 }
26566
26567 /// <summary>
26568 /// 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.
26569 /// </summary>
26570 public string DefaultVersion
26571 {
26572 get
26573 {
26574 return this.defaultVersionField;
26575 }
26576 set
26577 {
26578 this.defaultVersionFieldSet = true;
26579 this.defaultVersionField = value;
26580 }
26581 }
26582
26583 /// <summary>
26584 /// Specifies if this File is a Win32 Assembly or .NET Assembly that needs to be installed into the
26585 /// Global Assembly Cache (GAC). If the value is '.net' or 'win32', this file must also be the key path of the Component.
26586 /// </summary>
26587 public AssemblyType Assembly
26588 {
26589 get
26590 {
26591 return this.assemblyField;
26592 }
26593 set
26594 {
26595 this.assemblyFieldSet = true;
26596 this.assemblyField = value;
26597 }
26598 }
26599
26600 /// <summary>
26601 /// Specifies the file identifier of the manifest file that describes this assembly.
26602 /// The manifest file should be in the same component as the assembly it describes.
26603 /// This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'.
26604 /// </summary>
26605 public string AssemblyManifest
26606 {
26607 get
26608 {
26609 return this.assemblyManifestField;
26610 }
26611 set
26612 {
26613 this.assemblyManifestFieldSet = true;
26614 this.assemblyManifestField = value;
26615 }
26616 }
26617
26618 /// <summary>
26619 /// Specifies the file identifier of the application file. This assembly will be isolated
26620 /// to the same directory as the application file.
26621 /// If this attribute is absent, the assembly will be installed to the Global Assembly Cache (GAC).
26622 /// This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'.
26623 /// </summary>
26624 public string AssemblyApplication
26625 {
26626 get
26627 {
26628 return this.assemblyApplicationField;
26629 }
26630 set
26631 {
26632 this.assemblyApplicationFieldSet = true;
26633 this.assemblyApplicationField = value;
26634 }
26635 }
26636
26637 /// <summary>
26638 /// Specifies the architecture for this assembly. This attribute should only be used on .NET Framework 2.0 or higher assemblies.
26639 /// </summary>
26640 public ProcessorArchitectureType ProcessorArchitecture
26641 {
26642 get
26643 {
26644 return this.processorArchitectureField;
26645 }
26646 set
26647 {
26648 this.processorArchitectureFieldSet = true;
26649 this.processorArchitectureField = value;
26650 }
26651 }
26652
26653 /// <summary>
26654 /// The value of this attribute should correspond to the Id attribute of a Media
26655 /// element authored elsewhere. By creating this connection between a file and
26656 /// its media, you set the packaging options to the values specified in the Media
26657 /// element (values such as compression level, cab embedding, etc...). Specifying
26658 /// the DiskId attribute on the File element overrides the default DiskId attribute
26659 /// from the parent Component element. If no DiskId attribute is specified,
26660 /// the default is "1". This DiskId attribute is ignored when creating a merge module
26661 /// because merge modules do not have media.
26662 /// </summary>
26663 public string DiskId
26664 {
26665 get
26666 {
26667 return this.diskIdField;
26668 }
26669 set
26670 {
26671 this.diskIdFieldSet = true;
26672 this.diskIdField = value;
26673 }
26674 }
26675
26676 /// <summary>
26677 /// 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
26678 /// </summary>
26679 public string Source
26680 {
26681 get
26682 {
26683 return this.sourceField;
26684 }
26685 set
26686 {
26687 this.sourceFieldSet = true;
26688 this.sourceField = value;
26689 }
26690 }
26691
26692 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
26693 public string src
26694 {
26695 get
26696 {
26697 return this.srcField;
26698 }
26699 set
26700 {
26701 this.srcFieldSet = true;
26702 this.srcField = value;
26703 }
26704 }
26705
26706 /// <summary>
26707 /// This attribute must be set for patch-added files. Each patch should be assigned a different patch group number. Patch groups
26708 /// numbers must be greater 0 and should be assigned consecutively. For example, the first patch should use PatchGroup='1', the
26709 /// second patch will have PatchGroup='2', etc...
26710 /// </summary>
26711 public int PatchGroup
26712 {
26713 get
26714 {
26715 return this.patchGroupField;
26716 }
26717 set
26718 {
26719 this.patchGroupFieldSet = true;
26720 this.patchGroupField = value;
26721 }
26722 }
26723
26724 /// <summary>
26725 /// Prevents the updating of the file that is in fact changed in the upgraded image relative to the target images.
26726 /// </summary>
26727 public YesNoType PatchIgnore
26728 {
26729 get
26730 {
26731 return this.patchIgnoreField;
26732 }
26733 set
26734 {
26735 this.patchIgnoreFieldSet = true;
26736 this.patchIgnoreField = value;
26737 }
26738 }
26739
26740 /// <summary>
26741 /// Set to indicate that the patch is non-vital.
26742 /// </summary>
26743 public YesNoType PatchAllowIgnoreOnError
26744 {
26745 get
26746 {
26747 return this.patchAllowIgnoreOnErrorField;
26748 }
26749 set
26750 {
26751 this.patchAllowIgnoreOnErrorFieldSet = true;
26752 this.patchAllowIgnoreOnErrorField = value;
26753 }
26754 }
26755
26756 /// <summary>
26757 /// Set if the entire file should be installed rather than creating a binary patch.
26758 /// </summary>
26759 public YesNoType PatchWholeFile
26760 {
26761 get
26762 {
26763 return this.patchWholeFileField;
26764 }
26765 set
26766 {
26767 this.patchWholeFileFieldSet = true;
26768 this.patchWholeFileField = value;
26769 }
26770 }
26771
26772 public virtual ISchemaElement ParentElement
26773 {
26774 get
26775 {
26776 return this.parentElement;
26777 }
26778 set
26779 {
26780 this.parentElement = value;
26781 }
26782 }
26783
26784 public virtual void AddChild(ISchemaElement child)
26785 {
26786 if ((null == child))
26787 {
26788 throw new ArgumentNullException("child");
26789 }
26790 this.children.AddElement(child);
26791 child.ParentElement = this;
26792 }
26793
26794 public virtual void RemoveChild(ISchemaElement child)
26795 {
26796 if ((null == child))
26797 {
26798 throw new ArgumentNullException("child");
26799 }
26800 this.children.RemoveElement(child);
26801 child.ParentElement = null;
26802 }
26803
26804 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
26805 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
26806 ISchemaElement ICreateChildren.CreateChild(string childName)
26807 {
26808 if (String.IsNullOrEmpty(childName))
26809 {
26810 throw new ArgumentNullException("childName");
26811 }
26812 ISchemaElement childValue = null;
26813 if (("AssemblyName" == childName))
26814 {
26815 childValue = new AssemblyName();
26816 }
26817 if (("Permission" == childName))
26818 {
26819 childValue = new Permission();
26820 }
26821 if (("PermissionEx" == childName))
26822 {
26823 childValue = new PermissionEx();
26824 }
26825 if (("CopyFile" == childName))
26826 {
26827 childValue = new CopyFile();
26828 }
26829 if (("Shortcut" == childName))
26830 {
26831 childValue = new Shortcut();
26832 }
26833 if (("ODBCDriver" == childName))
26834 {
26835 childValue = new ODBCDriver();
26836 }
26837 if (("ODBCTranslator" == childName))
26838 {
26839 childValue = new ODBCTranslator();
26840 }
26841 if (("SymbolPath" == childName))
26842 {
26843 childValue = new SymbolPath();
26844 }
26845 if (("Class" == childName))
26846 {
26847 childValue = new Class();
26848 }
26849 if (("AppId" == childName))
26850 {
26851 childValue = new AppId();
26852 }
26853 if (("TypeLib" == childName))
26854 {
26855 childValue = new TypeLib();
26856 }
26857 if ((null == childValue))
26858 {
26859 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
26860 }
26861 return childValue;
26862 }
26863
26864 /// <summary>
26865 /// Parses a AssemblyType from a string.
26866 /// </summary>
26867 public static AssemblyType ParseAssemblyType(string value)
26868 {
26869 AssemblyType parsedValue;
26870 File.TryParseAssemblyType(value, out parsedValue);
26871 return parsedValue;
26872 }
26873
26874 /// <summary>
26875 /// Tries to parse a AssemblyType from a string.
26876 /// </summary>
26877 public static bool TryParseAssemblyType(string value, out AssemblyType parsedValue)
26878 {
26879 parsedValue = AssemblyType.NotSet;
26880 if (string.IsNullOrEmpty(value))
26881 {
26882 return false;
26883 }
26884 if ((".net" == value))
26885 {
26886 parsedValue = AssemblyType.net;
26887 }
26888 else
26889 {
26890 if (("no" == value))
26891 {
26892 parsedValue = AssemblyType.no;
26893 }
26894 else
26895 {
26896 if (("win32" == value))
26897 {
26898 parsedValue = AssemblyType.win32;
26899 }
26900 else
26901 {
26902 parsedValue = AssemblyType.IllegalValue;
26903 return false;
26904 }
26905 }
26906 }
26907 return true;
26908 }
26909
26910 /// <summary>
26911 /// Parses a ProcessorArchitectureType from a string.
26912 /// </summary>
26913 public static ProcessorArchitectureType ParseProcessorArchitectureType(string value)
26914 {
26915 ProcessorArchitectureType parsedValue;
26916 File.TryParseProcessorArchitectureType(value, out parsedValue);
26917 return parsedValue;
26918 }
26919
26920 /// <summary>
26921 /// Tries to parse a ProcessorArchitectureType from a string.
26922 /// </summary>
26923 public static bool TryParseProcessorArchitectureType(string value, out ProcessorArchitectureType parsedValue)
26924 {
26925 parsedValue = ProcessorArchitectureType.NotSet;
26926 if (string.IsNullOrEmpty(value))
26927 {
26928 return false;
26929 }
26930 if (("msil" == value))
26931 {
26932 parsedValue = ProcessorArchitectureType.msil;
26933 }
26934 else
26935 {
26936 if (("x86" == value))
26937 {
26938 parsedValue = ProcessorArchitectureType.x86;
26939 }
26940 else
26941 {
26942 if (("x64" == value))
26943 {
26944 parsedValue = ProcessorArchitectureType.x64;
26945 }
26946 else
26947 {
26948 if (("ia64" == value))
26949 {
26950 parsedValue = ProcessorArchitectureType.ia64;
26951 }
26952 else
26953 {
26954 parsedValue = ProcessorArchitectureType.IllegalValue;
26955 return false;
26956 }
26957 }
26958 }
26959 }
26960 return true;
26961 }
26962
26963 /// <summary>
26964 /// Processes this element and all child elements into an XmlWriter.
26965 /// </summary>
26966 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
26967 public virtual void OutputXml(XmlWriter writer)
26968 {
26969 if ((null == writer))
26970 {
26971 throw new ArgumentNullException("writer");
26972 }
26973 writer.WriteStartElement("File", "http://wixtoolset.org/schemas/v4/wxs");
26974 if (this.idFieldSet)
26975 {
26976 writer.WriteAttributeString("Id", this.idField);
26977 }
26978 if (this.companionFileFieldSet)
26979 {
26980 writer.WriteAttributeString("CompanionFile", this.companionFileField);
26981 }
26982 if (this.nameFieldSet)
26983 {
26984 writer.WriteAttributeString("Name", this.nameField);
26985 }
26986 if (this.keyPathFieldSet)
26987 {
26988 if ((this.keyPathField == YesNoType.no))
26989 {
26990 writer.WriteAttributeString("KeyPath", "no");
26991 }
26992 if ((this.keyPathField == YesNoType.yes))
26993 {
26994 writer.WriteAttributeString("KeyPath", "yes");
26995 }
26996 }
26997 if (this.shortNameFieldSet)
26998 {
26999 writer.WriteAttributeString("ShortName", this.shortNameField);
27000 }
27001 if (this.readOnlyFieldSet)
27002 {
27003 if ((this.readOnlyField == YesNoType.no))
27004 {
27005 writer.WriteAttributeString("ReadOnly", "no");
27006 }
27007 if ((this.readOnlyField == YesNoType.yes))
27008 {
27009 writer.WriteAttributeString("ReadOnly", "yes");
27010 }
27011 }
27012 if (this.hiddenFieldSet)
27013 {
27014 if ((this.hiddenField == YesNoType.no))
27015 {
27016 writer.WriteAttributeString("Hidden", "no");
27017 }
27018 if ((this.hiddenField == YesNoType.yes))
27019 {
27020 writer.WriteAttributeString("Hidden", "yes");
27021 }
27022 }
27023 if (this.systemFieldSet)
27024 {
27025 if ((this.systemField == YesNoType.no))
27026 {
27027 writer.WriteAttributeString("System", "no");
27028 }
27029 if ((this.systemField == YesNoType.yes))
27030 {
27031 writer.WriteAttributeString("System", "yes");
27032 }
27033 }
27034 if (this.vitalFieldSet)
27035 {
27036 if ((this.vitalField == YesNoType.no))
27037 {
27038 writer.WriteAttributeString("Vital", "no");
27039 }
27040 if ((this.vitalField == YesNoType.yes))
27041 {
27042 writer.WriteAttributeString("Vital", "yes");
27043 }
27044 }
27045 if (this.checksumFieldSet)
27046 {
27047 if ((this.checksumField == YesNoType.no))
27048 {
27049 writer.WriteAttributeString("Checksum", "no");
27050 }
27051 if ((this.checksumField == YesNoType.yes))
27052 {
27053 writer.WriteAttributeString("Checksum", "yes");
27054 }
27055 }
27056 if (this.compressedFieldSet)
27057 {
27058 if ((this.compressedField == YesNoDefaultType.@default))
27059 {
27060 writer.WriteAttributeString("Compressed", "default");
27061 }
27062 if ((this.compressedField == YesNoDefaultType.no))
27063 {
27064 writer.WriteAttributeString("Compressed", "no");
27065 }
27066 if ((this.compressedField == YesNoDefaultType.yes))
27067 {
27068 writer.WriteAttributeString("Compressed", "yes");
27069 }
27070 }
27071 if (this.bindPathFieldSet)
27072 {
27073 writer.WriteAttributeString("BindPath", this.bindPathField);
27074 }
27075 if (this.selfRegCostFieldSet)
27076 {
27077 writer.WriteAttributeString("SelfRegCost", this.selfRegCostField.ToString(CultureInfo.InvariantCulture));
27078 }
27079 if (this.trueTypeFieldSet)
27080 {
27081 if ((this.trueTypeField == YesNoType.no))
27082 {
27083 writer.WriteAttributeString("TrueType", "no");
27084 }
27085 if ((this.trueTypeField == YesNoType.yes))
27086 {
27087 writer.WriteAttributeString("TrueType", "yes");
27088 }
27089 }
27090 if (this.fontTitleFieldSet)
27091 {
27092 writer.WriteAttributeString("FontTitle", this.fontTitleField);
27093 }
27094 if (this.defaultLanguageFieldSet)
27095 {
27096 writer.WriteAttributeString("DefaultLanguage", this.defaultLanguageField);
27097 }
27098 if (this.defaultSizeFieldSet)
27099 {
27100 writer.WriteAttributeString("DefaultSize", this.defaultSizeField.ToString(CultureInfo.InvariantCulture));
27101 }
27102 if (this.defaultVersionFieldSet)
27103 {
27104 writer.WriteAttributeString("DefaultVersion", this.defaultVersionField);
27105 }
27106 if (this.assemblyFieldSet)
27107 {
27108 if ((this.assemblyField == AssemblyType.net))
27109 {
27110 writer.WriteAttributeString("Assembly", ".net");
27111 }
27112 if ((this.assemblyField == AssemblyType.no))
27113 {
27114 writer.WriteAttributeString("Assembly", "no");
27115 }
27116 if ((this.assemblyField == AssemblyType.win32))
27117 {
27118 writer.WriteAttributeString("Assembly", "win32");
27119 }
27120 }
27121 if (this.assemblyManifestFieldSet)
27122 {
27123 writer.WriteAttributeString("AssemblyManifest", this.assemblyManifestField);
27124 }
27125 if (this.assemblyApplicationFieldSet)
27126 {
27127 writer.WriteAttributeString("AssemblyApplication", this.assemblyApplicationField);
27128 }
27129 if (this.processorArchitectureFieldSet)
27130 {
27131 if ((this.processorArchitectureField == ProcessorArchitectureType.msil))
27132 {
27133 writer.WriteAttributeString("ProcessorArchitecture", "msil");
27134 }
27135 if ((this.processorArchitectureField == ProcessorArchitectureType.x86))
27136 {
27137 writer.WriteAttributeString("ProcessorArchitecture", "x86");
27138 }
27139 if ((this.processorArchitectureField == ProcessorArchitectureType.x64))
27140 {
27141 writer.WriteAttributeString("ProcessorArchitecture", "x64");
27142 }
27143 if ((this.processorArchitectureField == ProcessorArchitectureType.ia64))
27144 {
27145 writer.WriteAttributeString("ProcessorArchitecture", "ia64");
27146 }
27147 }
27148 if (this.diskIdFieldSet)
27149 {
27150 writer.WriteAttributeString("DiskId", this.diskIdField);
27151 }
27152 if (this.sourceFieldSet)
27153 {
27154 writer.WriteAttributeString("Source", this.sourceField);
27155 }
27156 if (this.srcFieldSet)
27157 {
27158 writer.WriteAttributeString("src", this.srcField);
27159 }
27160 if (this.patchGroupFieldSet)
27161 {
27162 writer.WriteAttributeString("PatchGroup", this.patchGroupField.ToString(CultureInfo.InvariantCulture));
27163 }
27164 if (this.patchIgnoreFieldSet)
27165 {
27166 if ((this.patchIgnoreField == YesNoType.no))
27167 {
27168 writer.WriteAttributeString("PatchIgnore", "no");
27169 }
27170 if ((this.patchIgnoreField == YesNoType.yes))
27171 {
27172 writer.WriteAttributeString("PatchIgnore", "yes");
27173 }
27174 }
27175 if (this.patchAllowIgnoreOnErrorFieldSet)
27176 {
27177 if ((this.patchAllowIgnoreOnErrorField == YesNoType.no))
27178 {
27179 writer.WriteAttributeString("PatchAllowIgnoreOnError", "no");
27180 }
27181 if ((this.patchAllowIgnoreOnErrorField == YesNoType.yes))
27182 {
27183 writer.WriteAttributeString("PatchAllowIgnoreOnError", "yes");
27184 }
27185 }
27186 if (this.patchWholeFileFieldSet)
27187 {
27188 if ((this.patchWholeFileField == YesNoType.no))
27189 {
27190 writer.WriteAttributeString("PatchWholeFile", "no");
27191 }
27192 if ((this.patchWholeFileField == YesNoType.yes))
27193 {
27194 writer.WriteAttributeString("PatchWholeFile", "yes");
27195 }
27196 }
27197 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
27198 {
27199 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
27200 childElement.OutputXml(writer);
27201 }
27202 writer.WriteEndElement();
27203 }
27204
27205 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
27206 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
27207 void ISetAttributes.SetAttribute(string name, string value)
27208 {
27209 if (String.IsNullOrEmpty(name))
27210 {
27211 throw new ArgumentNullException("name");
27212 }
27213 if (("Id" == name))
27214 {
27215 this.idField = value;
27216 this.idFieldSet = true;
27217 }
27218 if (("CompanionFile" == name))
27219 {
27220 this.companionFileField = value;
27221 this.companionFileFieldSet = true;
27222 }
27223 if (("Name" == name))
27224 {
27225 this.nameField = value;
27226 this.nameFieldSet = true;
27227 }
27228 if (("KeyPath" == name))
27229 {
27230 this.keyPathField = Enums.ParseYesNoType(value);
27231 this.keyPathFieldSet = true;
27232 }
27233 if (("ShortName" == name))
27234 {
27235 this.shortNameField = value;
27236 this.shortNameFieldSet = true;
27237 }
27238 if (("ReadOnly" == name))
27239 {
27240 this.readOnlyField = Enums.ParseYesNoType(value);
27241 this.readOnlyFieldSet = true;
27242 }
27243 if (("Hidden" == name))
27244 {
27245 this.hiddenField = Enums.ParseYesNoType(value);
27246 this.hiddenFieldSet = true;
27247 }
27248 if (("System" == name))
27249 {
27250 this.systemField = Enums.ParseYesNoType(value);
27251 this.systemFieldSet = true;
27252 }
27253 if (("Vital" == name))
27254 {
27255 this.vitalField = Enums.ParseYesNoType(value);
27256 this.vitalFieldSet = true;
27257 }
27258 if (("Checksum" == name))
27259 {
27260 this.checksumField = Enums.ParseYesNoType(value);
27261 this.checksumFieldSet = true;
27262 }
27263 if (("Compressed" == name))
27264 {
27265 this.compressedField = Enums.ParseYesNoDefaultType(value);
27266 this.compressedFieldSet = true;
27267 }
27268 if (("BindPath" == name))
27269 {
27270 this.bindPathField = value;
27271 this.bindPathFieldSet = true;
27272 }
27273 if (("SelfRegCost" == name))
27274 {
27275 this.selfRegCostField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
27276 this.selfRegCostFieldSet = true;
27277 }
27278 if (("TrueType" == name))
27279 {
27280 this.trueTypeField = Enums.ParseYesNoType(value);
27281 this.trueTypeFieldSet = true;
27282 }
27283 if (("FontTitle" == name))
27284 {
27285 this.fontTitleField = value;
27286 this.fontTitleFieldSet = true;
27287 }
27288 if (("DefaultLanguage" == name))
27289 {
27290 this.defaultLanguageField = value;
27291 this.defaultLanguageFieldSet = true;
27292 }
27293 if (("DefaultSize" == name))
27294 {
27295 this.defaultSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
27296 this.defaultSizeFieldSet = true;
27297 }
27298 if (("DefaultVersion" == name))
27299 {
27300 this.defaultVersionField = value;
27301 this.defaultVersionFieldSet = true;
27302 }
27303 if (("Assembly" == name))
27304 {
27305 this.assemblyField = File.ParseAssemblyType(value);
27306 this.assemblyFieldSet = true;
27307 }
27308 if (("AssemblyManifest" == name))
27309 {
27310 this.assemblyManifestField = value;
27311 this.assemblyManifestFieldSet = true;
27312 }
27313 if (("AssemblyApplication" == name))
27314 {
27315 this.assemblyApplicationField = value;
27316 this.assemblyApplicationFieldSet = true;
27317 }
27318 if (("ProcessorArchitecture" == name))
27319 {
27320 this.processorArchitectureField = File.ParseProcessorArchitectureType(value);
27321 this.processorArchitectureFieldSet = true;
27322 }
27323 if (("DiskId" == name))
27324 {
27325 this.diskIdField = value;
27326 this.diskIdFieldSet = true;
27327 }
27328 if (("Source" == name))
27329 {
27330 this.sourceField = value;
27331 this.sourceFieldSet = true;
27332 }
27333 if (("src" == name))
27334 {
27335 this.srcField = value;
27336 this.srcFieldSet = true;
27337 }
27338 if (("PatchGroup" == name))
27339 {
27340 this.patchGroupField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
27341 this.patchGroupFieldSet = true;
27342 }
27343 if (("PatchIgnore" == name))
27344 {
27345 this.patchIgnoreField = Enums.ParseYesNoType(value);
27346 this.patchIgnoreFieldSet = true;
27347 }
27348 if (("PatchAllowIgnoreOnError" == name))
27349 {
27350 this.patchAllowIgnoreOnErrorField = Enums.ParseYesNoType(value);
27351 this.patchAllowIgnoreOnErrorFieldSet = true;
27352 }
27353 if (("PatchWholeFile" == name))
27354 {
27355 this.patchWholeFileField = Enums.ParseYesNoType(value);
27356 this.patchWholeFileFieldSet = true;
27357 }
27358 }
27359
27360 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27361 public enum AssemblyType
27362 {
27363
27364 IllegalValue = int.MaxValue,
27365
27366 NotSet = -1,
27367
27368 /// <summary>
27369 /// The file is a .NET Framework assembly.
27370 /// </summary>
27371 net,
27372
27373 /// <summary>
27374 /// The file is not a .NET Framework or Win32 assembly. This is the default value.
27375 /// </summary>
27376 no,
27377
27378 /// <summary>
27379 /// The file is a Win32 assembly.
27380 /// </summary>
27381 win32,
27382 }
27383
27384 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27385 public enum ProcessorArchitectureType
27386 {
27387
27388 IllegalValue = int.MaxValue,
27389
27390 NotSet = -1,
27391
27392 /// <summary>
27393 /// The file is a .NET Framework assembly that is processor-neutral.
27394 /// </summary>
27395 msil,
27396
27397 /// <summary>
27398 /// The file is a .NET Framework assembly for the x86 processor.
27399 /// </summary>
27400 x86,
27401
27402 /// <summary>
27403 /// The file is a .NET Framework assembly for the x64 processor.
27404 /// </summary>
27405 x64,
27406
27407 /// <summary>
27408 /// The file is a .NET Framework assembly for the ia64 processor.
27409 /// </summary>
27410 ia64,
27411 }
27412 }
27413
27414 /// <summary>
27415 /// Use several of these elements to specify each registry value in a multiString registry value. This element
27416 /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The
27417 /// values should go in the text area of the MultiStringValue element.
27418 /// </summary>
27419 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27420 public class MultiStringValue : ISetAttributes, ISchemaElement
27421 {
27422
27423 private ISchemaElement parentElement;
27424
27425 private string contentField;
27426
27427 private bool contentFieldSet;
27428
27429 public virtual ISchemaElement ParentElement
27430 {
27431 get
27432 {
27433 return this.parentElement;
27434 }
27435 set
27436 {
27437 this.parentElement = value;
27438 }
27439 }
27440
27441 /// <summary>
27442 /// Use several of these elements to specify each registry value in a multiString registry value. This element
27443 /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The
27444 /// values should go in the text area of the MultiStringValue element.
27445 /// </summary>
27446 public string Content
27447 {
27448 get
27449 {
27450 return this.contentField;
27451 }
27452 set
27453 {
27454 this.contentFieldSet = true;
27455 this.contentField = value;
27456 }
27457 }
27458
27459 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
27460 void ISetAttributes.SetAttribute(string name, string value)
27461 {
27462 if (String.IsNullOrEmpty(name))
27463 {
27464 throw new ArgumentNullException("name");
27465 }
27466 if (("Content" == name))
27467 {
27468 this.contentField = value;
27469 this.contentFieldSet = true;
27470 }
27471 }
27472
27473 /// <summary>
27474 /// Processes this element and all child elements into an XmlWriter.
27475 /// </summary>
27476 public virtual void OutputXml(XmlWriter writer)
27477 {
27478 if ((null == writer))
27479 {
27480 throw new ArgumentNullException("writer");
27481 }
27482 writer.WriteStartElement("MultiStringValue", "http://wixtoolset.org/schemas/v4/wxs");
27483 if (this.contentFieldSet)
27484 {
27485 writer.WriteString(this.contentField);
27486 }
27487 writer.WriteEndElement();
27488 }
27489 }
27490
27491 /// <summary>
27492 /// Used for organization of child RegistryValue elements or to create a registry key
27493 /// (and optionally remove it during uninstallation).
27494 /// </summary>
27495 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27496 public class RegistryKey : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
27497 {
27498
27499 private ElementCollection children;
27500
27501 private string idField;
27502
27503 private bool idFieldSet;
27504
27505 private ActionType actionField;
27506
27507 private bool actionFieldSet;
27508
27509 private YesNoType forceCreateOnInstallField;
27510
27511 private bool forceCreateOnInstallFieldSet;
27512
27513 private YesNoType forceDeleteOnUninstallField;
27514
27515 private bool forceDeleteOnUninstallFieldSet;
27516
27517 private string keyField;
27518
27519 private bool keyFieldSet;
27520
27521 private RegistryRootType rootField;
27522
27523 private bool rootFieldSet;
27524
27525 private ISchemaElement parentElement;
27526
27527 public RegistryKey()
27528 {
27529 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
27530 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryKey)));
27531 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue)));
27532 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission)));
27533 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
27534 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
27535 this.children = childCollection0;
27536 }
27537
27538 public virtual IEnumerable Children
27539 {
27540 get
27541 {
27542 return this.children;
27543 }
27544 }
27545
27546 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
27547 public virtual IEnumerable this[System.Type childType]
27548 {
27549 get
27550 {
27551 return this.children.Filter(childType);
27552 }
27553 }
27554
27555 /// <summary>
27556 /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be
27557 /// generated by hashing the parent Component identifier, Root, Key, and Name.
27558 /// </summary>
27559 public string Id
27560 {
27561 get
27562 {
27563 return this.idField;
27564 }
27565 set
27566 {
27567 this.idFieldSet = true;
27568 this.idField = value;
27569 }
27570 }
27571
27572 /// <summary>
27573 /// The Action attribute has been deprecated. In most cases, you can simply omit @Action. If you need to force Windows Installer
27574 /// to create an empty key or recursively delete the key, use the ForceCreateOnInstall or ForceDeleteOnUninstall attributes instead.
27575 /// </summary>
27576 public ActionType Action
27577 {
27578 get
27579 {
27580 return this.actionField;
27581 }
27582 set
27583 {
27584 this.actionFieldSet = true;
27585 this.actionField = value;
27586 }
27587 }
27588
27589 /// <summary>
27590 /// Set this attribute to 'yes' to create an empty key, if absent, when the parent component is installed.
27591 /// This value is needed only to create an empty key with no subkeys or values. Windows Installer creates
27592 /// keys as needed to store subkeys and values. The default is "no".
27593 /// </summary>
27594 public YesNoType ForceCreateOnInstall
27595 {
27596 get
27597 {
27598 return this.forceCreateOnInstallField;
27599 }
27600 set
27601 {
27602 this.forceCreateOnInstallFieldSet = true;
27603 this.forceCreateOnInstallField = value;
27604 }
27605 }
27606
27607 /// <summary>
27608 /// Set this attribute to 'yes' to remove the key with all its values and subkeys when the parent component is uninstalled.
27609 /// 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
27610 /// removes all values and subkeys that it creates, so this option just adds additional overhead to uninstall.
27611 /// The default is "no".
27612 /// </summary>
27613 public YesNoType ForceDeleteOnUninstall
27614 {
27615 get
27616 {
27617 return this.forceDeleteOnUninstallField;
27618 }
27619 set
27620 {
27621 this.forceDeleteOnUninstallFieldSet = true;
27622 this.forceDeleteOnUninstallField = value;
27623 }
27624 }
27625
27626 /// <summary>
27627 /// The localizable key for the registry value.
27628 /// If the parent element is a RegistryKey, this value may be omitted to use the
27629 /// path of the parent, or if its specified it will be appended to the path of the parent.
27630 /// </summary>
27631 public string Key
27632 {
27633 get
27634 {
27635 return this.keyField;
27636 }
27637 set
27638 {
27639 this.keyFieldSet = true;
27640 this.keyField = value;
27641 }
27642 }
27643
27644 /// <summary>
27645 /// The predefined root key for the registry value.
27646 /// </summary>
27647 public RegistryRootType Root
27648 {
27649 get
27650 {
27651 return this.rootField;
27652 }
27653 set
27654 {
27655 this.rootFieldSet = true;
27656 this.rootField = value;
27657 }
27658 }
27659
27660 public virtual ISchemaElement ParentElement
27661 {
27662 get
27663 {
27664 return this.parentElement;
27665 }
27666 set
27667 {
27668 this.parentElement = value;
27669 }
27670 }
27671
27672 public virtual void AddChild(ISchemaElement child)
27673 {
27674 if ((null == child))
27675 {
27676 throw new ArgumentNullException("child");
27677 }
27678 this.children.AddElement(child);
27679 child.ParentElement = this;
27680 }
27681
27682 public virtual void RemoveChild(ISchemaElement child)
27683 {
27684 if ((null == child))
27685 {
27686 throw new ArgumentNullException("child");
27687 }
27688 this.children.RemoveElement(child);
27689 child.ParentElement = null;
27690 }
27691
27692 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
27693 ISchemaElement ICreateChildren.CreateChild(string childName)
27694 {
27695 if (String.IsNullOrEmpty(childName))
27696 {
27697 throw new ArgumentNullException("childName");
27698 }
27699 ISchemaElement childValue = null;
27700 if (("RegistryKey" == childName))
27701 {
27702 childValue = new RegistryKey();
27703 }
27704 if (("RegistryValue" == childName))
27705 {
27706 childValue = new RegistryValue();
27707 }
27708 if (("Permission" == childName))
27709 {
27710 childValue = new Permission();
27711 }
27712 if (("PermissionEx" == childName))
27713 {
27714 childValue = new PermissionEx();
27715 }
27716 if ((null == childValue))
27717 {
27718 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
27719 }
27720 return childValue;
27721 }
27722
27723 /// <summary>
27724 /// Parses a ActionType from a string.
27725 /// </summary>
27726 public static ActionType ParseActionType(string value)
27727 {
27728 ActionType parsedValue;
27729 RegistryKey.TryParseActionType(value, out parsedValue);
27730 return parsedValue;
27731 }
27732
27733 /// <summary>
27734 /// Tries to parse a ActionType from a string.
27735 /// </summary>
27736 public static bool TryParseActionType(string value, out ActionType parsedValue)
27737 {
27738 parsedValue = ActionType.NotSet;
27739 if (string.IsNullOrEmpty(value))
27740 {
27741 return false;
27742 }
27743 if (("create" == value))
27744 {
27745 parsedValue = ActionType.create;
27746 }
27747 else
27748 {
27749 if (("createAndRemoveOnUninstall" == value))
27750 {
27751 parsedValue = ActionType.createAndRemoveOnUninstall;
27752 }
27753 else
27754 {
27755 if (("none" == value))
27756 {
27757 parsedValue = ActionType.none;
27758 }
27759 else
27760 {
27761 parsedValue = ActionType.IllegalValue;
27762 return false;
27763 }
27764 }
27765 }
27766 return true;
27767 }
27768
27769 /// <summary>
27770 /// Processes this element and all child elements into an XmlWriter.
27771 /// </summary>
27772 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
27773 public virtual void OutputXml(XmlWriter writer)
27774 {
27775 if ((null == writer))
27776 {
27777 throw new ArgumentNullException("writer");
27778 }
27779 writer.WriteStartElement("RegistryKey", "http://wixtoolset.org/schemas/v4/wxs");
27780 if (this.idFieldSet)
27781 {
27782 writer.WriteAttributeString("Id", this.idField);
27783 }
27784 if (this.actionFieldSet)
27785 {
27786 if ((this.actionField == ActionType.create))
27787 {
27788 writer.WriteAttributeString("Action", "create");
27789 }
27790 if ((this.actionField == ActionType.createAndRemoveOnUninstall))
27791 {
27792 writer.WriteAttributeString("Action", "createAndRemoveOnUninstall");
27793 }
27794 if ((this.actionField == ActionType.none))
27795 {
27796 writer.WriteAttributeString("Action", "none");
27797 }
27798 }
27799 if (this.forceCreateOnInstallFieldSet)
27800 {
27801 if ((this.forceCreateOnInstallField == YesNoType.no))
27802 {
27803 writer.WriteAttributeString("ForceCreateOnInstall", "no");
27804 }
27805 if ((this.forceCreateOnInstallField == YesNoType.yes))
27806 {
27807 writer.WriteAttributeString("ForceCreateOnInstall", "yes");
27808 }
27809 }
27810 if (this.forceDeleteOnUninstallFieldSet)
27811 {
27812 if ((this.forceDeleteOnUninstallField == YesNoType.no))
27813 {
27814 writer.WriteAttributeString("ForceDeleteOnUninstall", "no");
27815 }
27816 if ((this.forceDeleteOnUninstallField == YesNoType.yes))
27817 {
27818 writer.WriteAttributeString("ForceDeleteOnUninstall", "yes");
27819 }
27820 }
27821 if (this.keyFieldSet)
27822 {
27823 writer.WriteAttributeString("Key", this.keyField);
27824 }
27825 if (this.rootFieldSet)
27826 {
27827 if ((this.rootField == RegistryRootType.HKMU))
27828 {
27829 writer.WriteAttributeString("Root", "HKMU");
27830 }
27831 if ((this.rootField == RegistryRootType.HKCR))
27832 {
27833 writer.WriteAttributeString("Root", "HKCR");
27834 }
27835 if ((this.rootField == RegistryRootType.HKCU))
27836 {
27837 writer.WriteAttributeString("Root", "HKCU");
27838 }
27839 if ((this.rootField == RegistryRootType.HKLM))
27840 {
27841 writer.WriteAttributeString("Root", "HKLM");
27842 }
27843 if ((this.rootField == RegistryRootType.HKU))
27844 {
27845 writer.WriteAttributeString("Root", "HKU");
27846 }
27847 }
27848 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
27849 {
27850 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
27851 childElement.OutputXml(writer);
27852 }
27853 writer.WriteEndElement();
27854 }
27855
27856 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
27857 void ISetAttributes.SetAttribute(string name, string value)
27858 {
27859 if (String.IsNullOrEmpty(name))
27860 {
27861 throw new ArgumentNullException("name");
27862 }
27863 if (("Id" == name))
27864 {
27865 this.idField = value;
27866 this.idFieldSet = true;
27867 }
27868 if (("Action" == name))
27869 {
27870 this.actionField = RegistryKey.ParseActionType(value);
27871 this.actionFieldSet = true;
27872 }
27873 if (("ForceCreateOnInstall" == name))
27874 {
27875 this.forceCreateOnInstallField = Enums.ParseYesNoType(value);
27876 this.forceCreateOnInstallFieldSet = true;
27877 }
27878 if (("ForceDeleteOnUninstall" == name))
27879 {
27880 this.forceDeleteOnUninstallField = Enums.ParseYesNoType(value);
27881 this.forceDeleteOnUninstallFieldSet = true;
27882 }
27883 if (("Key" == name))
27884 {
27885 this.keyField = value;
27886 this.keyFieldSet = true;
27887 }
27888 if (("Root" == name))
27889 {
27890 this.rootField = Enums.ParseRegistryRootType(value);
27891 this.rootFieldSet = true;
27892 }
27893 }
27894
27895 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27896 public enum ActionType
27897 {
27898
27899 IllegalValue = int.MaxValue,
27900
27901 NotSet = -1,
27902
27903 /// <summary>
27904 /// Creates the key, if absent, when the parent component is installed.
27905 /// </summary>
27906 create,
27907
27908 /// <summary>
27909 /// 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.
27910 /// 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
27911 /// removes all values and subkeys that it creates, so this option just adds additional overhead to uninstall.
27912 /// </summary>
27913 createAndRemoveOnUninstall,
27914
27915 /// <summary>
27916 /// Does nothing; this element is used merely in WiX authoring for organization and does nothing to the final output.
27917 /// This is the default value.
27918 /// </summary>
27919 none,
27920 }
27921 }
27922
27923 /// <summary>
27924 /// Used to create a registry value. For multi-string values, this can be used to prepend or append values.
27925 ///
27926 /// For legacy authoring: Use several of these elements to specify each registry value in a multiString registry value. This element
27927 /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The
27928 /// values should go in the text area of the RegistryValue element.
27929 /// </summary>
27930 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
27931 public class RegistryValue : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
27932 {
27933
27934 private ElementCollection children;
27935
27936 private string idField;
27937
27938 private bool idFieldSet;
27939
27940 private RegistryRootType rootField;
27941
27942 private bool rootFieldSet;
27943
27944 private string keyField;
27945
27946 private bool keyFieldSet;
27947
27948 private string nameField;
27949
27950 private bool nameFieldSet;
27951
27952 private string valueField;
27953
27954 private bool valueFieldSet;
27955
27956 private TypeType typeField;
27957
27958 private bool typeFieldSet;
27959
27960 private ActionType actionField;
27961
27962 private bool actionFieldSet;
27963
27964 private YesNoType keyPathField;
27965
27966 private bool keyPathFieldSet;
27967
27968 private ISchemaElement parentElement;
27969
27970 public RegistryValue()
27971 {
27972 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
27973 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission)));
27974 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
27975 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MultiStringValue)));
27976 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
27977 this.children = childCollection0;
27978 }
27979
27980 public virtual IEnumerable Children
27981 {
27982 get
27983 {
27984 return this.children;
27985 }
27986 }
27987
27988 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
27989 public virtual IEnumerable this[System.Type childType]
27990 {
27991 get
27992 {
27993 return this.children.Filter(childType);
27994 }
27995 }
27996
27997 /// <summary>
27998 /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be
27999 /// generated by hashing the parent Component identifier, Root, Key, and Name.
28000 /// </summary>
28001 public string Id
28002 {
28003 get
28004 {
28005 return this.idField;
28006 }
28007 set
28008 {
28009 this.idFieldSet = true;
28010 this.idField = value;
28011 }
28012 }
28013
28014 /// <summary>
28015 /// The predefined root key for the registry value.
28016 /// </summary>
28017 public RegistryRootType Root
28018 {
28019 get
28020 {
28021 return this.rootField;
28022 }
28023 set
28024 {
28025 this.rootFieldSet = true;
28026 this.rootField = value;
28027 }
28028 }
28029
28030 /// <summary>
28031 /// The localizable key for the registry value.
28032 /// If the parent element is a RegistryKey, this value may be omitted to use the
28033 /// path of the parent, or if its specified it will be appended to the path of the parent.
28034 /// </summary>
28035 public string Key
28036 {
28037 get
28038 {
28039 return this.keyField;
28040 }
28041 set
28042 {
28043 this.keyFieldSet = true;
28044 this.keyField = value;
28045 }
28046 }
28047
28048 /// <summary>
28049 /// The localizable registry value name. If this attribute is not provided the default value for the registry key will
28050 /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not
28051 /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior.
28052 /// </summary>
28053 public string Name
28054 {
28055 get
28056 {
28057 return this.nameField;
28058 }
28059 set
28060 {
28061 this.nameFieldSet = true;
28062 this.nameField = value;
28063 }
28064 }
28065
28066 /// <summary>
28067 /// Set this attribute to the localizable registry value. This value is formatted. The Windows Installer allows
28068 /// several special values to be set for this attribute. You should not use them in WiX. Instead use appropriate
28069 /// values in the Type attribute to get the desired behavior.
28070 /// </summary>
28071 public string Value
28072 {
28073 get
28074 {
28075 return this.valueField;
28076 }
28077 set
28078 {
28079 this.valueFieldSet = true;
28080 this.valueField = value;
28081 }
28082 }
28083
28084 /// <summary>
28085 /// Set this attribute to the type of the desired registry key. This attribute must be specified whenever the Value
28086 /// attribute or a child RegistryValue element is specified. This attribute
28087 /// should only be set when the value of the Action attribute does not include the word 'remove'.
28088 /// </summary>
28089 public TypeType Type
28090 {
28091 get
28092 {
28093 return this.typeField;
28094 }
28095 set
28096 {
28097 this.typeFieldSet = true;
28098 this.typeField = value;
28099 }
28100 }
28101
28102 /// <summary>
28103 /// This is the action that will be taken for this registry value.
28104 /// </summary>
28105 public ActionType Action
28106 {
28107 get
28108 {
28109 return this.actionField;
28110 }
28111 set
28112 {
28113 this.actionFieldSet = true;
28114 this.actionField = value;
28115 }
28116 }
28117
28118 /// <summary>
28119 /// Set this attribute to 'yes' to make this registry key the KeyPath of the parent component.
28120 /// Only one resource (registry, file, etc) can be the KeyPath of a component.
28121 /// </summary>
28122 public YesNoType KeyPath
28123 {
28124 get
28125 {
28126 return this.keyPathField;
28127 }
28128 set
28129 {
28130 this.keyPathFieldSet = true;
28131 this.keyPathField = value;
28132 }
28133 }
28134
28135 public virtual ISchemaElement ParentElement
28136 {
28137 get
28138 {
28139 return this.parentElement;
28140 }
28141 set
28142 {
28143 this.parentElement = value;
28144 }
28145 }
28146
28147 public virtual void AddChild(ISchemaElement child)
28148 {
28149 if ((null == child))
28150 {
28151 throw new ArgumentNullException("child");
28152 }
28153 this.children.AddElement(child);
28154 child.ParentElement = this;
28155 }
28156
28157 public virtual void RemoveChild(ISchemaElement child)
28158 {
28159 if ((null == child))
28160 {
28161 throw new ArgumentNullException("child");
28162 }
28163 this.children.RemoveElement(child);
28164 child.ParentElement = null;
28165 }
28166
28167 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
28168 ISchemaElement ICreateChildren.CreateChild(string childName)
28169 {
28170 if (String.IsNullOrEmpty(childName))
28171 {
28172 throw new ArgumentNullException("childName");
28173 }
28174 ISchemaElement childValue = null;
28175 if (("Permission" == childName))
28176 {
28177 childValue = new Permission();
28178 }
28179 if (("PermissionEx" == childName))
28180 {
28181 childValue = new PermissionEx();
28182 }
28183 if (("MultiStringValue" == childName))
28184 {
28185 childValue = new MultiStringValue();
28186 }
28187 if ((null == childValue))
28188 {
28189 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
28190 }
28191 return childValue;
28192 }
28193
28194 /// <summary>
28195 /// Parses a TypeType from a string.
28196 /// </summary>
28197 public static TypeType ParseTypeType(string value)
28198 {
28199 TypeType parsedValue;
28200 RegistryValue.TryParseTypeType(value, out parsedValue);
28201 return parsedValue;
28202 }
28203
28204 /// <summary>
28205 /// Tries to parse a TypeType from a string.
28206 /// </summary>
28207 public static bool TryParseTypeType(string value, out TypeType parsedValue)
28208 {
28209 parsedValue = TypeType.NotSet;
28210 if (string.IsNullOrEmpty(value))
28211 {
28212 return false;
28213 }
28214 if (("string" == value))
28215 {
28216 parsedValue = TypeType.@string;
28217 }
28218 else
28219 {
28220 if (("integer" == value))
28221 {
28222 parsedValue = TypeType.integer;
28223 }
28224 else
28225 {
28226 if (("binary" == value))
28227 {
28228 parsedValue = TypeType.binary;
28229 }
28230 else
28231 {
28232 if (("expandable" == value))
28233 {
28234 parsedValue = TypeType.expandable;
28235 }
28236 else
28237 {
28238 if (("multiString" == value))
28239 {
28240 parsedValue = TypeType.multiString;
28241 }
28242 else
28243 {
28244 parsedValue = TypeType.IllegalValue;
28245 return false;
28246 }
28247 }
28248 }
28249 }
28250 }
28251 return true;
28252 }
28253
28254 /// <summary>
28255 /// Parses a ActionType from a string.
28256 /// </summary>
28257 public static ActionType ParseActionType(string value)
28258 {
28259 ActionType parsedValue;
28260 RegistryValue.TryParseActionType(value, out parsedValue);
28261 return parsedValue;
28262 }
28263
28264 /// <summary>
28265 /// Tries to parse a ActionType from a string.
28266 /// </summary>
28267 public static bool TryParseActionType(string value, out ActionType parsedValue)
28268 {
28269 parsedValue = ActionType.NotSet;
28270 if (string.IsNullOrEmpty(value))
28271 {
28272 return false;
28273 }
28274 if (("append" == value))
28275 {
28276 parsedValue = ActionType.append;
28277 }
28278 else
28279 {
28280 if (("prepend" == value))
28281 {
28282 parsedValue = ActionType.prepend;
28283 }
28284 else
28285 {
28286 if (("write" == value))
28287 {
28288 parsedValue = ActionType.write;
28289 }
28290 else
28291 {
28292 parsedValue = ActionType.IllegalValue;
28293 return false;
28294 }
28295 }
28296 }
28297 return true;
28298 }
28299
28300 /// <summary>
28301 /// Processes this element and all child elements into an XmlWriter.
28302 /// </summary>
28303 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
28304 public virtual void OutputXml(XmlWriter writer)
28305 {
28306 if ((null == writer))
28307 {
28308 throw new ArgumentNullException("writer");
28309 }
28310 writer.WriteStartElement("RegistryValue", "http://wixtoolset.org/schemas/v4/wxs");
28311 if (this.idFieldSet)
28312 {
28313 writer.WriteAttributeString("Id", this.idField);
28314 }
28315 if (this.rootFieldSet)
28316 {
28317 if ((this.rootField == RegistryRootType.HKMU))
28318 {
28319 writer.WriteAttributeString("Root", "HKMU");
28320 }
28321 if ((this.rootField == RegistryRootType.HKCR))
28322 {
28323 writer.WriteAttributeString("Root", "HKCR");
28324 }
28325 if ((this.rootField == RegistryRootType.HKCU))
28326 {
28327 writer.WriteAttributeString("Root", "HKCU");
28328 }
28329 if ((this.rootField == RegistryRootType.HKLM))
28330 {
28331 writer.WriteAttributeString("Root", "HKLM");
28332 }
28333 if ((this.rootField == RegistryRootType.HKU))
28334 {
28335 writer.WriteAttributeString("Root", "HKU");
28336 }
28337 }
28338 if (this.keyFieldSet)
28339 {
28340 writer.WriteAttributeString("Key", this.keyField);
28341 }
28342 if (this.nameFieldSet)
28343 {
28344 writer.WriteAttributeString("Name", this.nameField);
28345 }
28346 if (this.valueFieldSet)
28347 {
28348 writer.WriteAttributeString("Value", this.valueField);
28349 }
28350 if (this.typeFieldSet)
28351 {
28352 if ((this.typeField == TypeType.@string))
28353 {
28354 writer.WriteAttributeString("Type", "string");
28355 }
28356 if ((this.typeField == TypeType.integer))
28357 {
28358 writer.WriteAttributeString("Type", "integer");
28359 }
28360 if ((this.typeField == TypeType.binary))
28361 {
28362 writer.WriteAttributeString("Type", "binary");
28363 }
28364 if ((this.typeField == TypeType.expandable))
28365 {
28366 writer.WriteAttributeString("Type", "expandable");
28367 }
28368 if ((this.typeField == TypeType.multiString))
28369 {
28370 writer.WriteAttributeString("Type", "multiString");
28371 }
28372 }
28373 if (this.actionFieldSet)
28374 {
28375 if ((this.actionField == ActionType.append))
28376 {
28377 writer.WriteAttributeString("Action", "append");
28378 }
28379 if ((this.actionField == ActionType.prepend))
28380 {
28381 writer.WriteAttributeString("Action", "prepend");
28382 }
28383 if ((this.actionField == ActionType.write))
28384 {
28385 writer.WriteAttributeString("Action", "write");
28386 }
28387 }
28388 if (this.keyPathFieldSet)
28389 {
28390 if ((this.keyPathField == YesNoType.no))
28391 {
28392 writer.WriteAttributeString("KeyPath", "no");
28393 }
28394 if ((this.keyPathField == YesNoType.yes))
28395 {
28396 writer.WriteAttributeString("KeyPath", "yes");
28397 }
28398 }
28399 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
28400 {
28401 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
28402 childElement.OutputXml(writer);
28403 }
28404 writer.WriteEndElement();
28405 }
28406
28407 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
28408 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
28409 void ISetAttributes.SetAttribute(string name, string value)
28410 {
28411 if (String.IsNullOrEmpty(name))
28412 {
28413 throw new ArgumentNullException("name");
28414 }
28415 if (("Id" == name))
28416 {
28417 this.idField = value;
28418 this.idFieldSet = true;
28419 }
28420 if (("Root" == name))
28421 {
28422 this.rootField = Enums.ParseRegistryRootType(value);
28423 this.rootFieldSet = true;
28424 }
28425 if (("Key" == name))
28426 {
28427 this.keyField = value;
28428 this.keyFieldSet = true;
28429 }
28430 if (("Name" == name))
28431 {
28432 this.nameField = value;
28433 this.nameFieldSet = true;
28434 }
28435 if (("Value" == name))
28436 {
28437 this.valueField = value;
28438 this.valueFieldSet = true;
28439 }
28440 if (("Type" == name))
28441 {
28442 this.typeField = RegistryValue.ParseTypeType(value);
28443 this.typeFieldSet = true;
28444 }
28445 if (("Action" == name))
28446 {
28447 this.actionField = RegistryValue.ParseActionType(value);
28448 this.actionFieldSet = true;
28449 }
28450 if (("KeyPath" == name))
28451 {
28452 this.keyPathField = Enums.ParseYesNoType(value);
28453 this.keyPathFieldSet = true;
28454 }
28455 }
28456
28457 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28458 public enum TypeType
28459 {
28460
28461 IllegalValue = int.MaxValue,
28462
28463 NotSet = -1,
28464
28465 /// <summary>
28466 /// The value is interpreted and stored as a string (REG_SZ).
28467 /// </summary>
28468 @string,
28469
28470 /// <summary>
28471 /// The value is interpreted and stored as an integer (REG_DWORD).
28472 /// </summary>
28473 integer,
28474
28475 /// <summary>
28476 /// The value is interpreted and stored as a hexadecimal value (REG_BINARY).
28477 /// </summary>
28478 binary,
28479
28480 /// <summary>
28481 /// The value is interpreted and stored as an expandable string (REG_EXPAND_SZ).
28482 /// </summary>
28483 expandable,
28484
28485 /// <summary>
28486 /// The value is interpreted and stored as a multiple strings (REG_MULTI_SZ).
28487 /// Please note that this value will only result in a multi-string value if there is more than one registry value
28488 /// or the Action attribute's value is 'append' or 'prepend'. Otherwise a string value will be created.
28489 /// </summary>
28490 multiString,
28491 }
28492
28493 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28494 public enum ActionType
28495 {
28496
28497 IllegalValue = int.MaxValue,
28498
28499 NotSet = -1,
28500
28501 /// <summary>
28502 /// Appends the specified value(s) to a multiString registry value.
28503 /// </summary>
28504 append,
28505
28506 /// <summary>
28507 /// Prepends the specified value(s) to a multiString registry value.
28508 /// </summary>
28509 prepend,
28510
28511 /// <summary>
28512 /// Writes a registry value. This is the default value.
28513 /// </summary>
28514 write,
28515 }
28516 }
28517
28518 /// <summary>
28519 /// Used for removing registry keys and all child keys either during install or uninstall.
28520 /// </summary>
28521 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28522 public class RemoveRegistryKey : ISchemaElement, ISetAttributes
28523 {
28524
28525 private string idField;
28526
28527 private bool idFieldSet;
28528
28529 private ActionType actionField;
28530
28531 private bool actionFieldSet;
28532
28533 private string keyField;
28534
28535 private bool keyFieldSet;
28536
28537 private RegistryRootType rootField;
28538
28539 private bool rootFieldSet;
28540
28541 private ISchemaElement parentElement;
28542
28543 /// <summary>
28544 /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be
28545 /// generated by hashing the parent Component identifier, Root, Key, and Name.
28546 /// </summary>
28547 public string Id
28548 {
28549 get
28550 {
28551 return this.idField;
28552 }
28553 set
28554 {
28555 this.idFieldSet = true;
28556 this.idField = value;
28557 }
28558 }
28559
28560 /// <summary>
28561 /// This is the action that will be taken for this registry value.
28562 /// </summary>
28563 public ActionType Action
28564 {
28565 get
28566 {
28567 return this.actionField;
28568 }
28569 set
28570 {
28571 this.actionFieldSet = true;
28572 this.actionField = value;
28573 }
28574 }
28575
28576 /// <summary>
28577 /// The localizable key for the registry value.
28578 /// </summary>
28579 public string Key
28580 {
28581 get
28582 {
28583 return this.keyField;
28584 }
28585 set
28586 {
28587 this.keyFieldSet = true;
28588 this.keyField = value;
28589 }
28590 }
28591
28592 /// <summary>
28593 /// The predefined root key for the registry value.
28594 /// </summary>
28595 public RegistryRootType Root
28596 {
28597 get
28598 {
28599 return this.rootField;
28600 }
28601 set
28602 {
28603 this.rootFieldSet = true;
28604 this.rootField = value;
28605 }
28606 }
28607
28608 public virtual ISchemaElement ParentElement
28609 {
28610 get
28611 {
28612 return this.parentElement;
28613 }
28614 set
28615 {
28616 this.parentElement = value;
28617 }
28618 }
28619
28620 /// <summary>
28621 /// Parses a ActionType from a string.
28622 /// </summary>
28623 public static ActionType ParseActionType(string value)
28624 {
28625 ActionType parsedValue;
28626 RemoveRegistryKey.TryParseActionType(value, out parsedValue);
28627 return parsedValue;
28628 }
28629
28630 /// <summary>
28631 /// Tries to parse a ActionType from a string.
28632 /// </summary>
28633 public static bool TryParseActionType(string value, out ActionType parsedValue)
28634 {
28635 parsedValue = ActionType.NotSet;
28636 if (string.IsNullOrEmpty(value))
28637 {
28638 return false;
28639 }
28640 if (("removeOnInstall" == value))
28641 {
28642 parsedValue = ActionType.removeOnInstall;
28643 }
28644 else
28645 {
28646 if (("removeOnUninstall" == value))
28647 {
28648 parsedValue = ActionType.removeOnUninstall;
28649 }
28650 else
28651 {
28652 parsedValue = ActionType.IllegalValue;
28653 return false;
28654 }
28655 }
28656 return true;
28657 }
28658
28659 /// <summary>
28660 /// Processes this element and all child elements into an XmlWriter.
28661 /// </summary>
28662 public virtual void OutputXml(XmlWriter writer)
28663 {
28664 if ((null == writer))
28665 {
28666 throw new ArgumentNullException("writer");
28667 }
28668 writer.WriteStartElement("RemoveRegistryKey", "http://wixtoolset.org/schemas/v4/wxs");
28669 if (this.idFieldSet)
28670 {
28671 writer.WriteAttributeString("Id", this.idField);
28672 }
28673 if (this.actionFieldSet)
28674 {
28675 if ((this.actionField == ActionType.removeOnInstall))
28676 {
28677 writer.WriteAttributeString("Action", "removeOnInstall");
28678 }
28679 if ((this.actionField == ActionType.removeOnUninstall))
28680 {
28681 writer.WriteAttributeString("Action", "removeOnUninstall");
28682 }
28683 }
28684 if (this.keyFieldSet)
28685 {
28686 writer.WriteAttributeString("Key", this.keyField);
28687 }
28688 if (this.rootFieldSet)
28689 {
28690 if ((this.rootField == RegistryRootType.HKMU))
28691 {
28692 writer.WriteAttributeString("Root", "HKMU");
28693 }
28694 if ((this.rootField == RegistryRootType.HKCR))
28695 {
28696 writer.WriteAttributeString("Root", "HKCR");
28697 }
28698 if ((this.rootField == RegistryRootType.HKCU))
28699 {
28700 writer.WriteAttributeString("Root", "HKCU");
28701 }
28702 if ((this.rootField == RegistryRootType.HKLM))
28703 {
28704 writer.WriteAttributeString("Root", "HKLM");
28705 }
28706 if ((this.rootField == RegistryRootType.HKU))
28707 {
28708 writer.WriteAttributeString("Root", "HKU");
28709 }
28710 }
28711 writer.WriteEndElement();
28712 }
28713
28714 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
28715 void ISetAttributes.SetAttribute(string name, string value)
28716 {
28717 if (String.IsNullOrEmpty(name))
28718 {
28719 throw new ArgumentNullException("name");
28720 }
28721 if (("Id" == name))
28722 {
28723 this.idField = value;
28724 this.idFieldSet = true;
28725 }
28726 if (("Action" == name))
28727 {
28728 this.actionField = RemoveRegistryKey.ParseActionType(value);
28729 this.actionFieldSet = true;
28730 }
28731 if (("Key" == name))
28732 {
28733 this.keyField = value;
28734 this.keyFieldSet = true;
28735 }
28736 if (("Root" == name))
28737 {
28738 this.rootField = Enums.ParseRegistryRootType(value);
28739 this.rootFieldSet = true;
28740 }
28741 }
28742
28743 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28744 public enum ActionType
28745 {
28746
28747 IllegalValue = int.MaxValue,
28748
28749 NotSet = -1,
28750
28751 /// <summary>
28752 /// Removes a key with all its values and subkeys when the parent component is installed.
28753 /// </summary>
28754 removeOnInstall,
28755
28756 /// <summary>
28757 /// Removes a key with all its values and subkeys when the parent component is uninstalled.
28758 /// </summary>
28759 removeOnUninstall,
28760 }
28761 }
28762
28763 /// <summary>
28764 /// Used to remove a registry value during installation.
28765 /// There is no standard way to remove a single registry value during uninstall (but you can remove an entire key with RemoveRegistryKey).
28766 /// </summary>
28767 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28768 public class RemoveRegistryValue : ISchemaElement, ISetAttributes
28769 {
28770
28771 private string idField;
28772
28773 private bool idFieldSet;
28774
28775 private string keyField;
28776
28777 private bool keyFieldSet;
28778
28779 private string nameField;
28780
28781 private bool nameFieldSet;
28782
28783 private RegistryRootType rootField;
28784
28785 private bool rootFieldSet;
28786
28787 private ISchemaElement parentElement;
28788
28789 /// <summary>
28790 /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be
28791 /// generated by hashing the parent Component identifier, Root, Key, and Name.
28792 /// </summary>
28793 public string Id
28794 {
28795 get
28796 {
28797 return this.idField;
28798 }
28799 set
28800 {
28801 this.idFieldSet = true;
28802 this.idField = value;
28803 }
28804 }
28805
28806 /// <summary>
28807 /// The localizable key for the registry value.
28808 /// If the parent element is a RegistryKey, this value may be omitted to use the
28809 /// path of the parent, or if its specified it will be appended to the path of the parent.
28810 /// </summary>
28811 public string Key
28812 {
28813 get
28814 {
28815 return this.keyField;
28816 }
28817 set
28818 {
28819 this.keyFieldSet = true;
28820 this.keyField = value;
28821 }
28822 }
28823
28824 /// <summary>
28825 /// The localizable registry value name. If this attribute is not provided the default value for the registry key will
28826 /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not
28827 /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior.
28828 /// </summary>
28829 public string Name
28830 {
28831 get
28832 {
28833 return this.nameField;
28834 }
28835 set
28836 {
28837 this.nameFieldSet = true;
28838 this.nameField = value;
28839 }
28840 }
28841
28842 /// <summary>
28843 /// The predefined root key for the registry value.
28844 /// </summary>
28845 public RegistryRootType Root
28846 {
28847 get
28848 {
28849 return this.rootField;
28850 }
28851 set
28852 {
28853 this.rootFieldSet = true;
28854 this.rootField = value;
28855 }
28856 }
28857
28858 public virtual ISchemaElement ParentElement
28859 {
28860 get
28861 {
28862 return this.parentElement;
28863 }
28864 set
28865 {
28866 this.parentElement = value;
28867 }
28868 }
28869
28870 /// <summary>
28871 /// Processes this element and all child elements into an XmlWriter.
28872 /// </summary>
28873 public virtual void OutputXml(XmlWriter writer)
28874 {
28875 if ((null == writer))
28876 {
28877 throw new ArgumentNullException("writer");
28878 }
28879 writer.WriteStartElement("RemoveRegistryValue", "http://wixtoolset.org/schemas/v4/wxs");
28880 if (this.idFieldSet)
28881 {
28882 writer.WriteAttributeString("Id", this.idField);
28883 }
28884 if (this.keyFieldSet)
28885 {
28886 writer.WriteAttributeString("Key", this.keyField);
28887 }
28888 if (this.nameFieldSet)
28889 {
28890 writer.WriteAttributeString("Name", this.nameField);
28891 }
28892 if (this.rootFieldSet)
28893 {
28894 if ((this.rootField == RegistryRootType.HKMU))
28895 {
28896 writer.WriteAttributeString("Root", "HKMU");
28897 }
28898 if ((this.rootField == RegistryRootType.HKCR))
28899 {
28900 writer.WriteAttributeString("Root", "HKCR");
28901 }
28902 if ((this.rootField == RegistryRootType.HKCU))
28903 {
28904 writer.WriteAttributeString("Root", "HKCU");
28905 }
28906 if ((this.rootField == RegistryRootType.HKLM))
28907 {
28908 writer.WriteAttributeString("Root", "HKLM");
28909 }
28910 if ((this.rootField == RegistryRootType.HKU))
28911 {
28912 writer.WriteAttributeString("Root", "HKU");
28913 }
28914 }
28915 writer.WriteEndElement();
28916 }
28917
28918 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
28919 void ISetAttributes.SetAttribute(string name, string value)
28920 {
28921 if (String.IsNullOrEmpty(name))
28922 {
28923 throw new ArgumentNullException("name");
28924 }
28925 if (("Id" == name))
28926 {
28927 this.idField = value;
28928 this.idFieldSet = true;
28929 }
28930 if (("Key" == name))
28931 {
28932 this.keyField = value;
28933 this.keyFieldSet = true;
28934 }
28935 if (("Name" == name))
28936 {
28937 this.nameField = value;
28938 this.nameFieldSet = true;
28939 }
28940 if (("Root" == name))
28941 {
28942 this.rootField = Enums.ParseRegistryRootType(value);
28943 this.rootFieldSet = true;
28944 }
28945 }
28946 }
28947
28948 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
28949 public class Registry : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
28950 {
28951
28952 private ElementCollection children;
28953
28954 private string idField;
28955
28956 private bool idFieldSet;
28957
28958 private ActionType actionField;
28959
28960 private bool actionFieldSet;
28961
28962 private string keyField;
28963
28964 private bool keyFieldSet;
28965
28966 private YesNoType keyPathField;
28967
28968 private bool keyPathFieldSet;
28969
28970 private string nameField;
28971
28972 private bool nameFieldSet;
28973
28974 private RegistryRootType rootField;
28975
28976 private bool rootFieldSet;
28977
28978 private TypeType typeField;
28979
28980 private bool typeFieldSet;
28981
28982 private string valueField;
28983
28984 private bool valueFieldSet;
28985
28986 private ISchemaElement parentElement;
28987
28988 public Registry()
28989 {
28990 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
28991 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission)));
28992 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
28993 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue)));
28994 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Registry)));
28995 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
28996 this.children = childCollection0;
28997 }
28998
28999 public virtual IEnumerable Children
29000 {
29001 get
29002 {
29003 return this.children;
29004 }
29005 }
29006
29007 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
29008 public virtual IEnumerable this[System.Type childType]
29009 {
29010 get
29011 {
29012 return this.children.Filter(childType);
29013 }
29014 }
29015
29016 /// <summary>
29017 /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be
29018 /// generated by hashing the parent Component identifier, Root, Key, and Name.
29019 /// </summary>
29020 public string Id
29021 {
29022 get
29023 {
29024 return this.idField;
29025 }
29026 set
29027 {
29028 this.idFieldSet = true;
29029 this.idField = value;
29030 }
29031 }
29032
29033 /// <summary>
29034 /// This is the action that will be taken for this registry key.
29035 /// </summary>
29036 public ActionType Action
29037 {
29038 get
29039 {
29040 return this.actionField;
29041 }
29042 set
29043 {
29044 this.actionFieldSet = true;
29045 this.actionField = value;
29046 }
29047 }
29048
29049 /// <summary>
29050 /// The localizable key for the registry value.
29051 /// </summary>
29052 public string Key
29053 {
29054 get
29055 {
29056 return this.keyField;
29057 }
29058 set
29059 {
29060 this.keyFieldSet = true;
29061 this.keyField = value;
29062 }
29063 }
29064
29065 /// <summary>
29066 /// Set this attribute to 'yes' to make this registry key the KeyPath of the parent component. Only one resource (registry,
29067 /// file, etc) can be the KeyPath of a component.
29068 /// </summary>
29069 public YesNoType KeyPath
29070 {
29071 get
29072 {
29073 return this.keyPathField;
29074 }
29075 set
29076 {
29077 this.keyPathFieldSet = true;
29078 this.keyPathField = value;
29079 }
29080 }
29081
29082 /// <summary>
29083 /// The localizable registry value name. If this attribute is not provided the default value for the registry key will
29084 /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not
29085 /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior.
29086 /// </summary>
29087 public string Name
29088 {
29089 get
29090 {
29091 return this.nameField;
29092 }
29093 set
29094 {
29095 this.nameFieldSet = true;
29096 this.nameField = value;
29097 }
29098 }
29099
29100 /// <summary>
29101 /// The predefined root key for the registry value.
29102 /// </summary>
29103 public RegistryRootType Root
29104 {
29105 get
29106 {
29107 return this.rootField;
29108 }
29109 set
29110 {
29111 this.rootFieldSet = true;
29112 this.rootField = value;
29113 }
29114 }
29115
29116 /// <summary>
29117 /// Set this attribute to the type of the desired registry key. This attribute must be specified whenever the Value
29118 /// attribute or a child RegistryValue element is specified. This attribute
29119 /// should only be set when the value of the Action attribute does not include the word 'remove'.
29120 /// </summary>
29121 public TypeType Type
29122 {
29123 get
29124 {
29125 return this.typeField;
29126 }
29127 set
29128 {
29129 this.typeFieldSet = true;
29130 this.typeField = value;
29131 }
29132 }
29133
29134 /// <summary>
29135 /// Set this attribute to the localizable registry value. This value is formatted. The Windows Installer allows
29136 /// several special values to be set for this attribute. You should not use them in WiX. Instead use appropriate
29137 /// values in the Type attribute to get the desired behavior. This attribute cannot be specified if the Action
29138 /// attribute's value contains the word 'remove'.
29139 /// </summary>
29140 public string Value
29141 {
29142 get
29143 {
29144 return this.valueField;
29145 }
29146 set
29147 {
29148 this.valueFieldSet = true;
29149 this.valueField = value;
29150 }
29151 }
29152
29153 public virtual ISchemaElement ParentElement
29154 {
29155 get
29156 {
29157 return this.parentElement;
29158 }
29159 set
29160 {
29161 this.parentElement = value;
29162 }
29163 }
29164
29165 public virtual void AddChild(ISchemaElement child)
29166 {
29167 if ((null == child))
29168 {
29169 throw new ArgumentNullException("child");
29170 }
29171 this.children.AddElement(child);
29172 child.ParentElement = this;
29173 }
29174
29175 public virtual void RemoveChild(ISchemaElement child)
29176 {
29177 if ((null == child))
29178 {
29179 throw new ArgumentNullException("child");
29180 }
29181 this.children.RemoveElement(child);
29182 child.ParentElement = null;
29183 }
29184
29185 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
29186 ISchemaElement ICreateChildren.CreateChild(string childName)
29187 {
29188 if (String.IsNullOrEmpty(childName))
29189 {
29190 throw new ArgumentNullException("childName");
29191 }
29192 ISchemaElement childValue = null;
29193 if (("Permission" == childName))
29194 {
29195 childValue = new Permission();
29196 }
29197 if (("PermissionEx" == childName))
29198 {
29199 childValue = new PermissionEx();
29200 }
29201 if (("RegistryValue" == childName))
29202 {
29203 childValue = new RegistryValue();
29204 }
29205 if (("Registry" == childName))
29206 {
29207 childValue = new Registry();
29208 }
29209 if ((null == childValue))
29210 {
29211 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
29212 }
29213 return childValue;
29214 }
29215
29216 /// <summary>
29217 /// Parses a ActionType from a string.
29218 /// </summary>
29219 public static ActionType ParseActionType(string value)
29220 {
29221 ActionType parsedValue;
29222 Registry.TryParseActionType(value, out parsedValue);
29223 return parsedValue;
29224 }
29225
29226 /// <summary>
29227 /// Tries to parse a ActionType from a string.
29228 /// </summary>
29229 public static bool TryParseActionType(string value, out ActionType parsedValue)
29230 {
29231 parsedValue = ActionType.NotSet;
29232 if (string.IsNullOrEmpty(value))
29233 {
29234 return false;
29235 }
29236 if (("append" == value))
29237 {
29238 parsedValue = ActionType.append;
29239 }
29240 else
29241 {
29242 if (("createKey" == value))
29243 {
29244 parsedValue = ActionType.createKey;
29245 }
29246 else
29247 {
29248 if (("createKeyAndRemoveKeyOnUninstall" == value))
29249 {
29250 parsedValue = ActionType.createKeyAndRemoveKeyOnUninstall;
29251 }
29252 else
29253 {
29254 if (("prepend" == value))
29255 {
29256 parsedValue = ActionType.prepend;
29257 }
29258 else
29259 {
29260 if (("remove" == value))
29261 {
29262 parsedValue = ActionType.remove;
29263 }
29264 else
29265 {
29266 if (("removeKeyOnInstall" == value))
29267 {
29268 parsedValue = ActionType.removeKeyOnInstall;
29269 }
29270 else
29271 {
29272 if (("removeKeyOnUninstall" == value))
29273 {
29274 parsedValue = ActionType.removeKeyOnUninstall;
29275 }
29276 else
29277 {
29278 if (("write" == value))
29279 {
29280 parsedValue = ActionType.write;
29281 }
29282 else
29283 {
29284 parsedValue = ActionType.IllegalValue;
29285 return false;
29286 }
29287 }
29288 }
29289 }
29290 }
29291 }
29292 }
29293 }
29294 return true;
29295 }
29296
29297 /// <summary>
29298 /// Parses a TypeType from a string.
29299 /// </summary>
29300 public static TypeType ParseTypeType(string value)
29301 {
29302 TypeType parsedValue;
29303 Registry.TryParseTypeType(value, out parsedValue);
29304 return parsedValue;
29305 }
29306
29307 /// <summary>
29308 /// Tries to parse a TypeType from a string.
29309 /// </summary>
29310 public static bool TryParseTypeType(string value, out TypeType parsedValue)
29311 {
29312 parsedValue = TypeType.NotSet;
29313 if (string.IsNullOrEmpty(value))
29314 {
29315 return false;
29316 }
29317 if (("string" == value))
29318 {
29319 parsedValue = TypeType.@string;
29320 }
29321 else
29322 {
29323 if (("integer" == value))
29324 {
29325 parsedValue = TypeType.integer;
29326 }
29327 else
29328 {
29329 if (("binary" == value))
29330 {
29331 parsedValue = TypeType.binary;
29332 }
29333 else
29334 {
29335 if (("expandable" == value))
29336 {
29337 parsedValue = TypeType.expandable;
29338 }
29339 else
29340 {
29341 if (("multiString" == value))
29342 {
29343 parsedValue = TypeType.multiString;
29344 }
29345 else
29346 {
29347 parsedValue = TypeType.IllegalValue;
29348 return false;
29349 }
29350 }
29351 }
29352 }
29353 }
29354 return true;
29355 }
29356
29357 /// <summary>
29358 /// Processes this element and all child elements into an XmlWriter.
29359 /// </summary>
29360 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
29361 public virtual void OutputXml(XmlWriter writer)
29362 {
29363 if ((null == writer))
29364 {
29365 throw new ArgumentNullException("writer");
29366 }
29367 writer.WriteStartElement("Registry", "http://wixtoolset.org/schemas/v4/wxs");
29368 if (this.idFieldSet)
29369 {
29370 writer.WriteAttributeString("Id", this.idField);
29371 }
29372 if (this.actionFieldSet)
29373 {
29374 if ((this.actionField == ActionType.append))
29375 {
29376 writer.WriteAttributeString("Action", "append");
29377 }
29378 if ((this.actionField == ActionType.createKey))
29379 {
29380 writer.WriteAttributeString("Action", "createKey");
29381 }
29382 if ((this.actionField == ActionType.createKeyAndRemoveKeyOnUninstall))
29383 {
29384 writer.WriteAttributeString("Action", "createKeyAndRemoveKeyOnUninstall");
29385 }
29386 if ((this.actionField == ActionType.prepend))
29387 {
29388 writer.WriteAttributeString("Action", "prepend");
29389 }
29390 if ((this.actionField == ActionType.remove))
29391 {
29392 writer.WriteAttributeString("Action", "remove");
29393 }
29394 if ((this.actionField == ActionType.removeKeyOnInstall))
29395 {
29396 writer.WriteAttributeString("Action", "removeKeyOnInstall");
29397 }
29398 if ((this.actionField == ActionType.removeKeyOnUninstall))
29399 {
29400 writer.WriteAttributeString("Action", "removeKeyOnUninstall");
29401 }
29402 if ((this.actionField == ActionType.write))
29403 {
29404 writer.WriteAttributeString("Action", "write");
29405 }
29406 }
29407 if (this.keyFieldSet)
29408 {
29409 writer.WriteAttributeString("Key", this.keyField);
29410 }
29411 if (this.keyPathFieldSet)
29412 {
29413 if ((this.keyPathField == YesNoType.no))
29414 {
29415 writer.WriteAttributeString("KeyPath", "no");
29416 }
29417 if ((this.keyPathField == YesNoType.yes))
29418 {
29419 writer.WriteAttributeString("KeyPath", "yes");
29420 }
29421 }
29422 if (this.nameFieldSet)
29423 {
29424 writer.WriteAttributeString("Name", this.nameField);
29425 }
29426 if (this.rootFieldSet)
29427 {
29428 if ((this.rootField == RegistryRootType.HKMU))
29429 {
29430 writer.WriteAttributeString("Root", "HKMU");
29431 }
29432 if ((this.rootField == RegistryRootType.HKCR))
29433 {
29434 writer.WriteAttributeString("Root", "HKCR");
29435 }
29436 if ((this.rootField == RegistryRootType.HKCU))
29437 {
29438 writer.WriteAttributeString("Root", "HKCU");
29439 }
29440 if ((this.rootField == RegistryRootType.HKLM))
29441 {
29442 writer.WriteAttributeString("Root", "HKLM");
29443 }
29444 if ((this.rootField == RegistryRootType.HKU))
29445 {
29446 writer.WriteAttributeString("Root", "HKU");
29447 }
29448 }
29449 if (this.typeFieldSet)
29450 {
29451 if ((this.typeField == TypeType.@string))
29452 {
29453 writer.WriteAttributeString("Type", "string");
29454 }
29455 if ((this.typeField == TypeType.integer))
29456 {
29457 writer.WriteAttributeString("Type", "integer");
29458 }
29459 if ((this.typeField == TypeType.binary))
29460 {
29461 writer.WriteAttributeString("Type", "binary");
29462 }
29463 if ((this.typeField == TypeType.expandable))
29464 {
29465 writer.WriteAttributeString("Type", "expandable");
29466 }
29467 if ((this.typeField == TypeType.multiString))
29468 {
29469 writer.WriteAttributeString("Type", "multiString");
29470 }
29471 }
29472 if (this.valueFieldSet)
29473 {
29474 writer.WriteAttributeString("Value", this.valueField);
29475 }
29476 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
29477 {
29478 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
29479 childElement.OutputXml(writer);
29480 }
29481 writer.WriteEndElement();
29482 }
29483
29484 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
29485 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
29486 void ISetAttributes.SetAttribute(string name, string value)
29487 {
29488 if (String.IsNullOrEmpty(name))
29489 {
29490 throw new ArgumentNullException("name");
29491 }
29492 if (("Id" == name))
29493 {
29494 this.idField = value;
29495 this.idFieldSet = true;
29496 }
29497 if (("Action" == name))
29498 {
29499 this.actionField = Registry.ParseActionType(value);
29500 this.actionFieldSet = true;
29501 }
29502 if (("Key" == name))
29503 {
29504 this.keyField = value;
29505 this.keyFieldSet = true;
29506 }
29507 if (("KeyPath" == name))
29508 {
29509 this.keyPathField = Enums.ParseYesNoType(value);
29510 this.keyPathFieldSet = true;
29511 }
29512 if (("Name" == name))
29513 {
29514 this.nameField = value;
29515 this.nameFieldSet = true;
29516 }
29517 if (("Root" == name))
29518 {
29519 this.rootField = Enums.ParseRegistryRootType(value);
29520 this.rootFieldSet = true;
29521 }
29522 if (("Type" == name))
29523 {
29524 this.typeField = Registry.ParseTypeType(value);
29525 this.typeFieldSet = true;
29526 }
29527 if (("Value" == name))
29528 {
29529 this.valueField = value;
29530 this.valueFieldSet = true;
29531 }
29532 }
29533
29534 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
29535 public enum ActionType
29536 {
29537
29538 IllegalValue = int.MaxValue,
29539
29540 NotSet = -1,
29541
29542 /// <summary>
29543 /// Appends the specified value(s) to a multiString registry key.
29544 /// </summary>
29545 append,
29546
29547 /// <summary>
29548 /// Creates the key, if absent, when the parent component is installed.
29549 /// </summary>
29550 createKey,
29551
29552 /// <summary>
29553 /// 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.
29554 /// </summary>
29555 createKeyAndRemoveKeyOnUninstall,
29556
29557 /// <summary>
29558 /// Prepends the specified value(s) to a multiString registry key.
29559 /// </summary>
29560 prepend,
29561
29562 /// <summary>
29563 /// Removes a registry name when the parent component is installed.
29564 /// </summary>
29565 remove,
29566
29567 /// <summary>
29568 /// Removes a key with all its values and subkeys when the parent component is installed.
29569 /// </summary>
29570 removeKeyOnInstall,
29571
29572 /// <summary>
29573 /// Removes a key with all its values and subkeys when the parent component is uninstalled.
29574 /// </summary>
29575 removeKeyOnUninstall,
29576
29577 /// <summary>
29578 /// Writes a registry value.
29579 /// </summary>
29580 write,
29581 }
29582
29583 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
29584 public enum TypeType
29585 {
29586
29587 IllegalValue = int.MaxValue,
29588
29589 NotSet = -1,
29590
29591 /// <summary>
29592 /// The value is interpreted and stored as a string (REG_SZ).
29593 /// </summary>
29594 @string,
29595
29596 /// <summary>
29597 /// The value is interpreted and stored as an integer (REG_DWORD).
29598 /// </summary>
29599 integer,
29600
29601 /// <summary>
29602 /// The value is interpreted and stored as a hexadecimal value (REG_BINARY).
29603 /// </summary>
29604 binary,
29605
29606 /// <summary>
29607 /// The value is interpreted and stored as an expandable string (REG_EXPAND_SZ).
29608 /// </summary>
29609 expandable,
29610
29611 /// <summary>
29612 /// The value is interpreted and stored as a multiple strings (REG_MULTI_SZ).
29613 /// Please note that this value will only result in a multi-string value if there is more than one registry value
29614 /// or the Action attribute's value is 'append' or 'prepend'. Otherwise a string value will be created.
29615 /// </summary>
29616 multiString,
29617 }
29618 }
29619
29620 /// <summary>
29621 /// Remove a file(s) if the parent component is selected for installation or removal. Multiple files can be removed
29622 /// by specifying a wildcard for the value of the Name attribute. By default, the source
29623 /// directory of the file is the directory of the parent component. This can be overridden by specifying the
29624 /// Directory attribute with a value corresponding to the Id of the source directory, or by specifying the Property
29625 /// attribute with a value corresponding to a property that will have a value that resolves to the full path
29626 /// to the source directory.
29627 /// </summary>
29628 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
29629 public class RemoveFile : ISchemaElement, ISetAttributes
29630 {
29631
29632 private string idField;
29633
29634 private bool idFieldSet;
29635
29636 private string directoryField;
29637
29638 private bool directoryFieldSet;
29639
29640 private string propertyField;
29641
29642 private bool propertyFieldSet;
29643
29644 private string nameField;
29645
29646 private bool nameFieldSet;
29647
29648 private string shortNameField;
29649
29650 private bool shortNameFieldSet;
29651
29652 private InstallUninstallType onField;
29653
29654 private bool onFieldSet;
29655
29656 private ISchemaElement parentElement;
29657
29658 /// <summary>
29659 /// Primary key used to identify this particular entry.
29660 /// </summary>
29661 public string Id
29662 {
29663 get
29664 {
29665 return this.idField;
29666 }
29667 set
29668 {
29669 this.idFieldSet = true;
29670 this.idField = value;
29671 }
29672 }
29673
29674 /// <summary>
29675 /// Overrides the directory of the parent component with a specific Directory. This Directory must exist in the
29676 /// installer database at creation time. This attribute cannot be specified in conjunction with the Property attribute.
29677 /// </summary>
29678 public string Directory
29679 {
29680 get
29681 {
29682 return this.directoryField;
29683 }
29684 set
29685 {
29686 this.directoryFieldSet = true;
29687 this.directoryField = value;
29688 }
29689 }
29690
29691 /// <summary>
29692 /// Overrides the directory of the parent component with the value of the specified property. The property
29693 /// should have a value that resolves to the full path of the source directory. The property does not have
29694 /// to exist in the installer database at creation time; it could be created at installation time by a custom
29695 /// action, on the command line, etc. This attribute cannot be specified in conjunction with the Directory attribute.
29696 /// </summary>
29697 public string Property
29698 {
29699 get
29700 {
29701 return this.propertyField;
29702 }
29703 set
29704 {
29705 this.propertyFieldSet = true;
29706 this.propertyField = value;
29707 }
29708 }
29709
29710 /// <summary>
29711 /// This value should be set to the localizable name of the file(s) to be removed. All of the files that
29712 /// match the wild card will be removed from the specified directory. The value is a filename that may also
29713 /// contain the wild card characters "?" for any single character or "*" for zero or more occurrences of any character.
29714 /// In prior versions of the WiX toolset, this attribute specified the short file name.
29715 /// This attribute's value may now be either a short or long file name.
29716 /// If a short file name is specified, the ShortName attribute may not be specified.
29717 /// Also, if this value is a long file name, the ShortName attribute may be omitted to
29718 /// allow WiX to attempt to generate a unique short file name.
29719 /// However, if you wish to manually specify the short file name, then the ShortName attribute may be specified.
29720 /// </summary>
29721 public string Name
29722 {
29723 get
29724 {
29725 return this.nameField;
29726 }
29727 set
29728 {
29729 this.nameFieldSet = true;
29730 this.nameField = value;
29731 }
29732 }
29733
29734 /// <summary>
29735 /// The short file name of the file in 8.3 format.
29736 /// This attribute should only be set if you want to manually specify the short file name.
29737 /// </summary>
29738 public string ShortName
29739 {
29740 get
29741 {
29742 return this.shortNameField;
29743 }
29744 set
29745 {
29746 this.shortNameFieldSet = true;
29747 this.shortNameField = value;
29748 }
29749 }
29750
29751 /// <summary>
29752 /// This value determines the time at which the file(s) may be removed. For 'install', the file will
29753 /// be removed only when the parent component is being installed (msiInstallStateLocal or
29754 /// msiInstallStateSource); for 'uninstall', the file will be removed only when the parent component
29755 /// is being removed (msiInstallStateAbsent); for 'both', the file will be removed in both cases.
29756 /// </summary>
29757 public InstallUninstallType On
29758 {
29759 get
29760 {
29761 return this.onField;
29762 }
29763 set
29764 {
29765 this.onFieldSet = true;
29766 this.onField = value;
29767 }
29768 }
29769
29770 public virtual ISchemaElement ParentElement
29771 {
29772 get
29773 {
29774 return this.parentElement;
29775 }
29776 set
29777 {
29778 this.parentElement = value;
29779 }
29780 }
29781
29782 /// <summary>
29783 /// Processes this element and all child elements into an XmlWriter.
29784 /// </summary>
29785 public virtual void OutputXml(XmlWriter writer)
29786 {
29787 if ((null == writer))
29788 {
29789 throw new ArgumentNullException("writer");
29790 }
29791 writer.WriteStartElement("RemoveFile", "http://wixtoolset.org/schemas/v4/wxs");
29792 if (this.idFieldSet)
29793 {
29794 writer.WriteAttributeString("Id", this.idField);
29795 }
29796 if (this.directoryFieldSet)
29797 {
29798 writer.WriteAttributeString("Directory", this.directoryField);
29799 }
29800 if (this.propertyFieldSet)
29801 {
29802 writer.WriteAttributeString("Property", this.propertyField);
29803 }
29804 if (this.nameFieldSet)
29805 {
29806 writer.WriteAttributeString("Name", this.nameField);
29807 }
29808 if (this.shortNameFieldSet)
29809 {
29810 writer.WriteAttributeString("ShortName", this.shortNameField);
29811 }
29812 if (this.onFieldSet)
29813 {
29814 if ((this.onField == InstallUninstallType.install))
29815 {
29816 writer.WriteAttributeString("On", "install");
29817 }
29818 if ((this.onField == InstallUninstallType.uninstall))
29819 {
29820 writer.WriteAttributeString("On", "uninstall");
29821 }
29822 if ((this.onField == InstallUninstallType.both))
29823 {
29824 writer.WriteAttributeString("On", "both");
29825 }
29826 }
29827 writer.WriteEndElement();
29828 }
29829
29830 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
29831 void ISetAttributes.SetAttribute(string name, string value)
29832 {
29833 if (String.IsNullOrEmpty(name))
29834 {
29835 throw new ArgumentNullException("name");
29836 }
29837 if (("Id" == name))
29838 {
29839 this.idField = value;
29840 this.idFieldSet = true;
29841 }
29842 if (("Directory" == name))
29843 {
29844 this.directoryField = value;
29845 this.directoryFieldSet = true;
29846 }
29847 if (("Property" == name))
29848 {
29849 this.propertyField = value;
29850 this.propertyFieldSet = true;
29851 }
29852 if (("Name" == name))
29853 {
29854 this.nameField = value;
29855 this.nameFieldSet = true;
29856 }
29857 if (("ShortName" == name))
29858 {
29859 this.shortNameField = value;
29860 this.shortNameFieldSet = true;
29861 }
29862 if (("On" == name))
29863 {
29864 this.onField = Enums.ParseInstallUninstallType(value);
29865 this.onFieldSet = true;
29866 }
29867 }
29868 }
29869
29870 /// <summary>
29871 /// Remove an empty folder if the parent component is selected for installation or removal. By default, the folder
29872 /// is the directory of the parent component. This can be overridden by specifying the Directory attribute
29873 /// with a value corresponding to the Id of the directory, or by specifying the Property attribute with a value
29874 /// corresponding to a property that will have a value that resolves to the full path of the folder.
29875 /// </summary>
29876 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
29877 public class RemoveFolder : ISchemaElement, ISetAttributes
29878 {
29879
29880 private string idField;
29881
29882 private bool idFieldSet;
29883
29884 private string directoryField;
29885
29886 private bool directoryFieldSet;
29887
29888 private string propertyField;
29889
29890 private bool propertyFieldSet;
29891
29892 private InstallUninstallType onField;
29893
29894 private bool onFieldSet;
29895
29896 private ISchemaElement parentElement;
29897
29898 /// <summary>
29899 /// Primary key used to identify this particular entry.
29900 /// </summary>
29901 public string Id
29902 {
29903 get
29904 {
29905 return this.idField;
29906 }
29907 set
29908 {
29909 this.idFieldSet = true;
29910 this.idField = value;
29911 }
29912 }
29913
29914 /// <summary>
29915 /// Overrides the directory of the parent component with a specific Directory. This Directory must exist in the
29916 /// installer database at creation time. This attribute cannot be specified in conjunction with the Property attribute.
29917 /// </summary>
29918 public string Directory
29919 {
29920 get
29921 {
29922 return this.directoryField;
29923 }
29924 set
29925 {
29926 this.directoryFieldSet = true;
29927 this.directoryField = value;
29928 }
29929 }
29930
29931 /// <summary>
29932 /// Overrides the directory of the parent component with the value of the specified property. The property
29933 /// should have a value that resolves to the full path of the source directory. The property does not have
29934 /// to exist in the installer database at creation time; it could be created at installation time by a custom
29935 /// action, on the command line, etc. This attribute cannot be specified in conjunction with the Directory attribute.
29936 /// </summary>
29937 public string Property
29938 {
29939 get
29940 {
29941 return this.propertyField;
29942 }
29943 set
29944 {
29945 this.propertyFieldSet = true;
29946 this.propertyField = value;
29947 }
29948 }
29949
29950 /// <summary>
29951 /// This value determines the time at which the folder may be removed, based on the install/uninstall of the parent component.
29952 /// For 'install', the folder will be removed only when the parent component is being installed (msiInstallStateLocal or
29953 /// msiInstallStateSource); for 'uninstall', the folder will be removed only when the parent component
29954 /// is being removed (msiInstallStateAbsent); for 'both', the folder will be removed in both cases.
29955 /// </summary>
29956 public InstallUninstallType On
29957 {
29958 get
29959 {
29960 return this.onField;
29961 }
29962 set
29963 {
29964 this.onFieldSet = true;
29965 this.onField = value;
29966 }
29967 }
29968
29969 public virtual ISchemaElement ParentElement
29970 {
29971 get
29972 {
29973 return this.parentElement;
29974 }
29975 set
29976 {
29977 this.parentElement = value;
29978 }
29979 }
29980
29981 /// <summary>
29982 /// Processes this element and all child elements into an XmlWriter.
29983 /// </summary>
29984 public virtual void OutputXml(XmlWriter writer)
29985 {
29986 if ((null == writer))
29987 {
29988 throw new ArgumentNullException("writer");
29989 }
29990 writer.WriteStartElement("RemoveFolder", "http://wixtoolset.org/schemas/v4/wxs");
29991 if (this.idFieldSet)
29992 {
29993 writer.WriteAttributeString("Id", this.idField);
29994 }
29995 if (this.directoryFieldSet)
29996 {
29997 writer.WriteAttributeString("Directory", this.directoryField);
29998 }
29999 if (this.propertyFieldSet)
30000 {
30001 writer.WriteAttributeString("Property", this.propertyField);
30002 }
30003 if (this.onFieldSet)
30004 {
30005 if ((this.onField == InstallUninstallType.install))
30006 {
30007 writer.WriteAttributeString("On", "install");
30008 }
30009 if ((this.onField == InstallUninstallType.uninstall))
30010 {
30011 writer.WriteAttributeString("On", "uninstall");
30012 }
30013 if ((this.onField == InstallUninstallType.both))
30014 {
30015 writer.WriteAttributeString("On", "both");
30016 }
30017 }
30018 writer.WriteEndElement();
30019 }
30020
30021 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30022 void ISetAttributes.SetAttribute(string name, string value)
30023 {
30024 if (String.IsNullOrEmpty(name))
30025 {
30026 throw new ArgumentNullException("name");
30027 }
30028 if (("Id" == name))
30029 {
30030 this.idField = value;
30031 this.idFieldSet = true;
30032 }
30033 if (("Directory" == name))
30034 {
30035 this.directoryField = value;
30036 this.directoryFieldSet = true;
30037 }
30038 if (("Property" == name))
30039 {
30040 this.propertyField = value;
30041 this.propertyFieldSet = true;
30042 }
30043 if (("On" == name))
30044 {
30045 this.onField = Enums.ParseInstallUninstallType(value);
30046 this.onFieldSet = true;
30047 }
30048 }
30049 }
30050
30051 /// <summary>
30052 /// Create folder as part of parent Component.
30053 /// </summary>
30054 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30055 public class CreateFolder : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
30056 {
30057
30058 private ElementCollection children;
30059
30060 private string directoryField;
30061
30062 private bool directoryFieldSet;
30063
30064 private ISchemaElement parentElement;
30065
30066 public CreateFolder()
30067 {
30068 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
30069 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut)));
30070 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission)));
30071 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
30072 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
30073 this.children = childCollection0;
30074 }
30075
30076 public virtual IEnumerable Children
30077 {
30078 get
30079 {
30080 return this.children;
30081 }
30082 }
30083
30084 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
30085 public virtual IEnumerable this[System.Type childType]
30086 {
30087 get
30088 {
30089 return this.children.Filter(childType);
30090 }
30091 }
30092
30093 /// <summary>
30094 /// Identifier of Directory to create. Defaults to Directory of parent Component.
30095 /// </summary>
30096 public string Directory
30097 {
30098 get
30099 {
30100 return this.directoryField;
30101 }
30102 set
30103 {
30104 this.directoryFieldSet = true;
30105 this.directoryField = value;
30106 }
30107 }
30108
30109 public virtual ISchemaElement ParentElement
30110 {
30111 get
30112 {
30113 return this.parentElement;
30114 }
30115 set
30116 {
30117 this.parentElement = value;
30118 }
30119 }
30120
30121 public virtual void AddChild(ISchemaElement child)
30122 {
30123 if ((null == child))
30124 {
30125 throw new ArgumentNullException("child");
30126 }
30127 this.children.AddElement(child);
30128 child.ParentElement = this;
30129 }
30130
30131 public virtual void RemoveChild(ISchemaElement child)
30132 {
30133 if ((null == child))
30134 {
30135 throw new ArgumentNullException("child");
30136 }
30137 this.children.RemoveElement(child);
30138 child.ParentElement = null;
30139 }
30140
30141 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30142 ISchemaElement ICreateChildren.CreateChild(string childName)
30143 {
30144 if (String.IsNullOrEmpty(childName))
30145 {
30146 throw new ArgumentNullException("childName");
30147 }
30148 ISchemaElement childValue = null;
30149 if (("Shortcut" == childName))
30150 {
30151 childValue = new Shortcut();
30152 }
30153 if (("Permission" == childName))
30154 {
30155 childValue = new Permission();
30156 }
30157 if (("PermissionEx" == childName))
30158 {
30159 childValue = new PermissionEx();
30160 }
30161 if ((null == childValue))
30162 {
30163 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
30164 }
30165 return childValue;
30166 }
30167
30168 /// <summary>
30169 /// Processes this element and all child elements into an XmlWriter.
30170 /// </summary>
30171 public virtual void OutputXml(XmlWriter writer)
30172 {
30173 if ((null == writer))
30174 {
30175 throw new ArgumentNullException("writer");
30176 }
30177 writer.WriteStartElement("CreateFolder", "http://wixtoolset.org/schemas/v4/wxs");
30178 if (this.directoryFieldSet)
30179 {
30180 writer.WriteAttributeString("Directory", this.directoryField);
30181 }
30182 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
30183 {
30184 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
30185 childElement.OutputXml(writer);
30186 }
30187 writer.WriteEndElement();
30188 }
30189
30190 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30191 void ISetAttributes.SetAttribute(string name, string value)
30192 {
30193 if (String.IsNullOrEmpty(name))
30194 {
30195 throw new ArgumentNullException("name");
30196 }
30197 if (("Directory" == name))
30198 {
30199 this.directoryField = value;
30200 this.directoryFieldSet = true;
30201 }
30202 }
30203 }
30204
30205 /// <summary>
30206 /// Optional way for defining AppData, generally used for complex CDATA.
30207 /// </summary>
30208 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30209 public class AppData : ISetAttributes, ISchemaElement
30210 {
30211
30212 private ISchemaElement parentElement;
30213
30214 private string contentField;
30215
30216 private bool contentFieldSet;
30217
30218 public virtual ISchemaElement ParentElement
30219 {
30220 get
30221 {
30222 return this.parentElement;
30223 }
30224 set
30225 {
30226 this.parentElement = value;
30227 }
30228 }
30229
30230 /// <summary>
30231 /// Optional way for defining AppData, generally used for complex CDATA.
30232 /// </summary>
30233 public string Content
30234 {
30235 get
30236 {
30237 return this.contentField;
30238 }
30239 set
30240 {
30241 this.contentFieldSet = true;
30242 this.contentField = value;
30243 }
30244 }
30245
30246 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30247 void ISetAttributes.SetAttribute(string name, string value)
30248 {
30249 if (String.IsNullOrEmpty(name))
30250 {
30251 throw new ArgumentNullException("name");
30252 }
30253 if (("Content" == name))
30254 {
30255 this.contentField = value;
30256 this.contentFieldSet = true;
30257 }
30258 }
30259
30260 /// <summary>
30261 /// Processes this element and all child elements into an XmlWriter.
30262 /// </summary>
30263 public virtual void OutputXml(XmlWriter writer)
30264 {
30265 if ((null == writer))
30266 {
30267 throw new ArgumentNullException("writer");
30268 }
30269 writer.WriteStartElement("AppData", "http://wixtoolset.org/schemas/v4/wxs");
30270 if (this.contentFieldSet)
30271 {
30272 writer.WriteString(this.contentField);
30273 }
30274 writer.WriteEndElement();
30275 }
30276 }
30277
30278 /// <summary>
30279 /// Qualified published component for parent Component
30280 /// </summary>
30281 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30282 public class Category : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
30283 {
30284
30285 private ElementCollection children;
30286
30287 private string idField;
30288
30289 private bool idFieldSet;
30290
30291 private string qualifierField;
30292
30293 private bool qualifierFieldSet;
30294
30295 private string appDataField;
30296
30297 private bool appDataFieldSet;
30298
30299 private string featureField;
30300
30301 private bool featureFieldSet;
30302
30303 private ISchemaElement parentElement;
30304
30305 public Category()
30306 {
30307 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
30308 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(AppData)));
30309 this.children = childCollection0;
30310 }
30311
30312 public virtual IEnumerable Children
30313 {
30314 get
30315 {
30316 return this.children;
30317 }
30318 }
30319
30320 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
30321 public virtual IEnumerable this[System.Type childType]
30322 {
30323 get
30324 {
30325 return this.children.Filter(childType);
30326 }
30327 }
30328
30329 /// <summary>
30330 /// A string GUID that represents the category of components being grouped together.
30331 /// </summary>
30332 public string Id
30333 {
30334 get
30335 {
30336 return this.idField;
30337 }
30338 set
30339 {
30340 this.idFieldSet = true;
30341 this.idField = value;
30342 }
30343 }
30344
30345 /// <summary>
30346 /// 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.
30347 /// </summary>
30348 public string Qualifier
30349 {
30350 get
30351 {
30352 return this.qualifierField;
30353 }
30354 set
30355 {
30356 this.qualifierFieldSet = true;
30357 this.qualifierField = value;
30358 }
30359 }
30360
30361 /// <summary>
30362 /// 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.
30363 /// </summary>
30364 public string AppData
30365 {
30366 get
30367 {
30368 return this.appDataField;
30369 }
30370 set
30371 {
30372 this.appDataFieldSet = true;
30373 this.appDataField = value;
30374 }
30375 }
30376
30377 /// <summary>
30378 /// Feature that controls the advertisement of the category. Defaults to the primary Feature for the parent Component .
30379 /// </summary>
30380 public string Feature
30381 {
30382 get
30383 {
30384 return this.featureField;
30385 }
30386 set
30387 {
30388 this.featureFieldSet = true;
30389 this.featureField = value;
30390 }
30391 }
30392
30393 public virtual ISchemaElement ParentElement
30394 {
30395 get
30396 {
30397 return this.parentElement;
30398 }
30399 set
30400 {
30401 this.parentElement = value;
30402 }
30403 }
30404
30405 public virtual void AddChild(ISchemaElement child)
30406 {
30407 if ((null == child))
30408 {
30409 throw new ArgumentNullException("child");
30410 }
30411 this.children.AddElement(child);
30412 child.ParentElement = this;
30413 }
30414
30415 public virtual void RemoveChild(ISchemaElement child)
30416 {
30417 if ((null == child))
30418 {
30419 throw new ArgumentNullException("child");
30420 }
30421 this.children.RemoveElement(child);
30422 child.ParentElement = null;
30423 }
30424
30425 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30426 ISchemaElement ICreateChildren.CreateChild(string childName)
30427 {
30428 if (String.IsNullOrEmpty(childName))
30429 {
30430 throw new ArgumentNullException("childName");
30431 }
30432 ISchemaElement childValue = null;
30433 if (("AppData" == childName))
30434 {
30435 childValue = new AppData();
30436 }
30437 if ((null == childValue))
30438 {
30439 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
30440 }
30441 return childValue;
30442 }
30443
30444 /// <summary>
30445 /// Processes this element and all child elements into an XmlWriter.
30446 /// </summary>
30447 public virtual void OutputXml(XmlWriter writer)
30448 {
30449 if ((null == writer))
30450 {
30451 throw new ArgumentNullException("writer");
30452 }
30453 writer.WriteStartElement("Category", "http://wixtoolset.org/schemas/v4/wxs");
30454 if (this.idFieldSet)
30455 {
30456 writer.WriteAttributeString("Id", this.idField);
30457 }
30458 if (this.qualifierFieldSet)
30459 {
30460 writer.WriteAttributeString("Qualifier", this.qualifierField);
30461 }
30462 if (this.appDataFieldSet)
30463 {
30464 writer.WriteAttributeString("AppData", this.appDataField);
30465 }
30466 if (this.featureFieldSet)
30467 {
30468 writer.WriteAttributeString("Feature", this.featureField);
30469 }
30470 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
30471 {
30472 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
30473 childElement.OutputXml(writer);
30474 }
30475 writer.WriteEndElement();
30476 }
30477
30478 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30479 void ISetAttributes.SetAttribute(string name, string value)
30480 {
30481 if (String.IsNullOrEmpty(name))
30482 {
30483 throw new ArgumentNullException("name");
30484 }
30485 if (("Id" == name))
30486 {
30487 this.idField = value;
30488 this.idFieldSet = true;
30489 }
30490 if (("Qualifier" == name))
30491 {
30492 this.qualifierField = value;
30493 this.qualifierFieldSet = true;
30494 }
30495 if (("AppData" == name))
30496 {
30497 this.appDataField = value;
30498 this.appDataFieldSet = true;
30499 }
30500 if (("Feature" == name))
30501 {
30502 this.featureField = value;
30503 this.featureFieldSet = true;
30504 }
30505 }
30506 }
30507
30508 /// <summary>
30509 /// MIME content-type for an Extension
30510 /// </summary>
30511 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30512 public class MIME : ISchemaElement, ISetAttributes
30513 {
30514
30515 private YesNoType advertiseField;
30516
30517 private bool advertiseFieldSet;
30518
30519 private string contentTypeField;
30520
30521 private bool contentTypeFieldSet;
30522
30523 private string classField;
30524
30525 private bool classFieldSet;
30526
30527 private YesNoType defaultField;
30528
30529 private bool defaultFieldSet;
30530
30531 private ISchemaElement parentElement;
30532
30533 /// <summary>
30534 /// 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.
30535 /// </summary>
30536 public YesNoType Advertise
30537 {
30538 get
30539 {
30540 return this.advertiseField;
30541 }
30542 set
30543 {
30544 this.advertiseFieldSet = true;
30545 this.advertiseField = value;
30546 }
30547 }
30548
30549 /// <summary>
30550 /// This is the identifier for the MIME content. It is commonly written in the form of type/format.
30551 /// </summary>
30552 public string ContentType
30553 {
30554 get
30555 {
30556 return this.contentTypeField;
30557 }
30558 set
30559 {
30560 this.contentTypeFieldSet = true;
30561 this.contentTypeField = value;
30562 }
30563 }
30564
30565 /// <summary>
30566 /// Class ID for the COM server that is to be associated with the MIME content.
30567 /// </summary>
30568 public string Class
30569 {
30570 get
30571 {
30572 return this.classField;
30573 }
30574 set
30575 {
30576 this.classFieldSet = true;
30577 this.classField = value;
30578 }
30579 }
30580
30581 /// <summary>
30582 /// If 'yes', become the content type for the parent Extension. The default value is 'no'.
30583 /// </summary>
30584 public YesNoType Default
30585 {
30586 get
30587 {
30588 return this.defaultField;
30589 }
30590 set
30591 {
30592 this.defaultFieldSet = true;
30593 this.defaultField = value;
30594 }
30595 }
30596
30597 public virtual ISchemaElement ParentElement
30598 {
30599 get
30600 {
30601 return this.parentElement;
30602 }
30603 set
30604 {
30605 this.parentElement = value;
30606 }
30607 }
30608
30609 /// <summary>
30610 /// Processes this element and all child elements into an XmlWriter.
30611 /// </summary>
30612 public virtual void OutputXml(XmlWriter writer)
30613 {
30614 if ((null == writer))
30615 {
30616 throw new ArgumentNullException("writer");
30617 }
30618 writer.WriteStartElement("MIME", "http://wixtoolset.org/schemas/v4/wxs");
30619 if (this.advertiseFieldSet)
30620 {
30621 if ((this.advertiseField == YesNoType.no))
30622 {
30623 writer.WriteAttributeString("Advertise", "no");
30624 }
30625 if ((this.advertiseField == YesNoType.yes))
30626 {
30627 writer.WriteAttributeString("Advertise", "yes");
30628 }
30629 }
30630 if (this.contentTypeFieldSet)
30631 {
30632 writer.WriteAttributeString("ContentType", this.contentTypeField);
30633 }
30634 if (this.classFieldSet)
30635 {
30636 writer.WriteAttributeString("Class", this.classField);
30637 }
30638 if (this.defaultFieldSet)
30639 {
30640 if ((this.defaultField == YesNoType.no))
30641 {
30642 writer.WriteAttributeString("Default", "no");
30643 }
30644 if ((this.defaultField == YesNoType.yes))
30645 {
30646 writer.WriteAttributeString("Default", "yes");
30647 }
30648 }
30649 writer.WriteEndElement();
30650 }
30651
30652 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30653 void ISetAttributes.SetAttribute(string name, string value)
30654 {
30655 if (String.IsNullOrEmpty(name))
30656 {
30657 throw new ArgumentNullException("name");
30658 }
30659 if (("Advertise" == name))
30660 {
30661 this.advertiseField = Enums.ParseYesNoType(value);
30662 this.advertiseFieldSet = true;
30663 }
30664 if (("ContentType" == name))
30665 {
30666 this.contentTypeField = value;
30667 this.contentTypeFieldSet = true;
30668 }
30669 if (("Class" == name))
30670 {
30671 this.classField = value;
30672 this.classFieldSet = true;
30673 }
30674 if (("Default" == name))
30675 {
30676 this.defaultField = Enums.ParseYesNoType(value);
30677 this.defaultFieldSet = true;
30678 }
30679 }
30680 }
30681
30682 /// <summary>
30683 /// Verb definition for an Extension. When advertised, this element creates a row in the
30684 /// </summary>
30685 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30686 public class Verb : ISchemaElement, ISetAttributes
30687 {
30688
30689 private string idField;
30690
30691 private bool idFieldSet;
30692
30693 private string commandField;
30694
30695 private bool commandFieldSet;
30696
30697 private string argumentField;
30698
30699 private bool argumentFieldSet;
30700
30701 private int sequenceField;
30702
30703 private bool sequenceFieldSet;
30704
30705 private string targetField;
30706
30707 private bool targetFieldSet;
30708
30709 private string targetFileField;
30710
30711 private bool targetFileFieldSet;
30712
30713 private string targetPropertyField;
30714
30715 private bool targetPropertyFieldSet;
30716
30717 private ISchemaElement parentElement;
30718
30719 /// <summary>
30720 /// The verb for the command.
30721 /// </summary>
30722 public string Id
30723 {
30724 get
30725 {
30726 return this.idField;
30727 }
30728 set
30729 {
30730 this.idFieldSet = true;
30731 this.idField = value;
30732 }
30733 }
30734
30735 /// <summary>
30736 /// The localized text displayed on the context menu.
30737 /// </summary>
30738 public string Command
30739 {
30740 get
30741 {
30742 return this.commandField;
30743 }
30744 set
30745 {
30746 this.commandFieldSet = true;
30747 this.commandField = value;
30748 }
30749 }
30750
30751 /// <summary>
30752 /// Value for the command arguments. Note that the resolution of properties in the
30753 /// Argument field is limited. A property formatted as [Property] in this field can only be resolved if the property
30754 /// already has the intended value when the component owning the verb is installed. For example, for the argument
30755 /// "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and the
30756 /// component that owns the verb.
30757 /// </summary>
30758 public string Argument
30759 {
30760 get
30761 {
30762 return this.argumentField;
30763 }
30764 set
30765 {
30766 this.argumentFieldSet = true;
30767 this.argumentField = value;
30768 }
30769 }
30770
30771 /// <summary>
30772 /// The sequence of the commands. Only verbs for which the Sequence is specified
30773 /// are used to prepare an ordered list for the default value of the shell key. The Verb with the lowest value in this
30774 /// column becomes the default verb. Used only for Advertised verbs.
30775 /// </summary>
30776 public int Sequence
30777 {
30778 get
30779 {
30780 return this.sequenceField;
30781 }
30782 set
30783 {
30784 this.sequenceFieldSet = true;
30785 this.sequenceField = value;
30786 }
30787 }
30788
30789 public string Target
30790 {
30791 get
30792 {
30793 return this.targetField;
30794 }
30795 set
30796 {
30797 this.targetFieldSet = true;
30798 this.targetField = value;
30799 }
30800 }
30801
30802 /// <summary>
30803 /// Either this attribute or the TargetProperty attribute must be specified for a non-advertised verb.
30804 /// The value should be the identifier of the target file to be executed for the verb.
30805 /// </summary>
30806 public string TargetFile
30807 {
30808 get
30809 {
30810 return this.targetFileField;
30811 }
30812 set
30813 {
30814 this.targetFileFieldSet = true;
30815 this.targetFileField = value;
30816 }
30817 }
30818
30819 /// <summary>
30820 /// Either this attribute or the TargetFile attribute must be specified for a non-advertised verb.
30821 /// 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.
30822 /// </summary>
30823 public string TargetProperty
30824 {
30825 get
30826 {
30827 return this.targetPropertyField;
30828 }
30829 set
30830 {
30831 this.targetPropertyFieldSet = true;
30832 this.targetPropertyField = value;
30833 }
30834 }
30835
30836 public virtual ISchemaElement ParentElement
30837 {
30838 get
30839 {
30840 return this.parentElement;
30841 }
30842 set
30843 {
30844 this.parentElement = value;
30845 }
30846 }
30847
30848 /// <summary>
30849 /// Processes this element and all child elements into an XmlWriter.
30850 /// </summary>
30851 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
30852 public virtual void OutputXml(XmlWriter writer)
30853 {
30854 if ((null == writer))
30855 {
30856 throw new ArgumentNullException("writer");
30857 }
30858 writer.WriteStartElement("Verb", "http://wixtoolset.org/schemas/v4/wxs");
30859 if (this.idFieldSet)
30860 {
30861 writer.WriteAttributeString("Id", this.idField);
30862 }
30863 if (this.commandFieldSet)
30864 {
30865 writer.WriteAttributeString("Command", this.commandField);
30866 }
30867 if (this.argumentFieldSet)
30868 {
30869 writer.WriteAttributeString("Argument", this.argumentField);
30870 }
30871 if (this.sequenceFieldSet)
30872 {
30873 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
30874 }
30875 if (this.targetFieldSet)
30876 {
30877 writer.WriteAttributeString("Target", this.targetField);
30878 }
30879 if (this.targetFileFieldSet)
30880 {
30881 writer.WriteAttributeString("TargetFile", this.targetFileField);
30882 }
30883 if (this.targetPropertyFieldSet)
30884 {
30885 writer.WriteAttributeString("TargetProperty", this.targetPropertyField);
30886 }
30887 writer.WriteEndElement();
30888 }
30889
30890 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
30891 void ISetAttributes.SetAttribute(string name, string value)
30892 {
30893 if (String.IsNullOrEmpty(name))
30894 {
30895 throw new ArgumentNullException("name");
30896 }
30897 if (("Id" == name))
30898 {
30899 this.idField = value;
30900 this.idFieldSet = true;
30901 }
30902 if (("Command" == name))
30903 {
30904 this.commandField = value;
30905 this.commandFieldSet = true;
30906 }
30907 if (("Argument" == name))
30908 {
30909 this.argumentField = value;
30910 this.argumentFieldSet = true;
30911 }
30912 if (("Sequence" == name))
30913 {
30914 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
30915 this.sequenceFieldSet = true;
30916 }
30917 if (("Target" == name))
30918 {
30919 this.targetField = value;
30920 this.targetFieldSet = true;
30921 }
30922 if (("TargetFile" == name))
30923 {
30924 this.targetFileField = value;
30925 this.targetFileFieldSet = true;
30926 }
30927 if (("TargetProperty" == name))
30928 {
30929 this.targetPropertyField = value;
30930 this.targetPropertyFieldSet = true;
30931 }
30932 }
30933 }
30934
30935 /// <summary>
30936 /// Extension for a Component
30937 /// </summary>
30938 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
30939 public class Extension : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
30940 {
30941
30942 private ElementCollection children;
30943
30944 private string idField;
30945
30946 private bool idFieldSet;
30947
30948 private string contentTypeField;
30949
30950 private bool contentTypeFieldSet;
30951
30952 private YesNoType advertiseField;
30953
30954 private bool advertiseFieldSet;
30955
30956 private ISchemaElement parentElement;
30957
30958 public Extension()
30959 {
30960 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
30961 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MIME)));
30962 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Verb)));
30963 this.children = childCollection0;
30964 }
30965
30966 public virtual IEnumerable Children
30967 {
30968 get
30969 {
30970 return this.children;
30971 }
30972 }
30973
30974 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
30975 public virtual IEnumerable this[System.Type childType]
30976 {
30977 get
30978 {
30979 return this.children.Filter(childType);
30980 }
30981 }
30982
30983 /// <summary>
30984 /// This is simply the file extension, like "doc" or "xml". Do not include the preceding period.
30985 /// </summary>
30986 public string Id
30987 {
30988 get
30989 {
30990 return this.idField;
30991 }
30992 set
30993 {
30994 this.idFieldSet = true;
30995 this.idField = value;
30996 }
30997 }
30998
30999 /// <summary>
31000 /// The MIME type that is to be written.
31001 /// </summary>
31002 public string ContentType
31003 {
31004 get
31005 {
31006 return this.contentTypeField;
31007 }
31008 set
31009 {
31010 this.contentTypeFieldSet = true;
31011 this.contentTypeField = value;
31012 }
31013 }
31014
31015 /// <summary>
31016 /// Whether this extension is to be advertised. The default is "no".
31017 /// </summary>
31018 public YesNoType Advertise
31019 {
31020 get
31021 {
31022 return this.advertiseField;
31023 }
31024 set
31025 {
31026 this.advertiseFieldSet = true;
31027 this.advertiseField = value;
31028 }
31029 }
31030
31031 public virtual ISchemaElement ParentElement
31032 {
31033 get
31034 {
31035 return this.parentElement;
31036 }
31037 set
31038 {
31039 this.parentElement = value;
31040 }
31041 }
31042
31043 public virtual void AddChild(ISchemaElement child)
31044 {
31045 if ((null == child))
31046 {
31047 throw new ArgumentNullException("child");
31048 }
31049 this.children.AddElement(child);
31050 child.ParentElement = this;
31051 }
31052
31053 public virtual void RemoveChild(ISchemaElement child)
31054 {
31055 if ((null == child))
31056 {
31057 throw new ArgumentNullException("child");
31058 }
31059 this.children.RemoveElement(child);
31060 child.ParentElement = null;
31061 }
31062
31063 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31064 ISchemaElement ICreateChildren.CreateChild(string childName)
31065 {
31066 if (String.IsNullOrEmpty(childName))
31067 {
31068 throw new ArgumentNullException("childName");
31069 }
31070 ISchemaElement childValue = null;
31071 if (("MIME" == childName))
31072 {
31073 childValue = new MIME();
31074 }
31075 if (("Verb" == childName))
31076 {
31077 childValue = new Verb();
31078 }
31079 if ((null == childValue))
31080 {
31081 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
31082 }
31083 return childValue;
31084 }
31085
31086 /// <summary>
31087 /// Processes this element and all child elements into an XmlWriter.
31088 /// </summary>
31089 public virtual void OutputXml(XmlWriter writer)
31090 {
31091 if ((null == writer))
31092 {
31093 throw new ArgumentNullException("writer");
31094 }
31095 writer.WriteStartElement("Extension", "http://wixtoolset.org/schemas/v4/wxs");
31096 if (this.idFieldSet)
31097 {
31098 writer.WriteAttributeString("Id", this.idField);
31099 }
31100 if (this.contentTypeFieldSet)
31101 {
31102 writer.WriteAttributeString("ContentType", this.contentTypeField);
31103 }
31104 if (this.advertiseFieldSet)
31105 {
31106 if ((this.advertiseField == YesNoType.no))
31107 {
31108 writer.WriteAttributeString("Advertise", "no");
31109 }
31110 if ((this.advertiseField == YesNoType.yes))
31111 {
31112 writer.WriteAttributeString("Advertise", "yes");
31113 }
31114 }
31115 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
31116 {
31117 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
31118 childElement.OutputXml(writer);
31119 }
31120 writer.WriteEndElement();
31121 }
31122
31123 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31124 void ISetAttributes.SetAttribute(string name, string value)
31125 {
31126 if (String.IsNullOrEmpty(name))
31127 {
31128 throw new ArgumentNullException("name");
31129 }
31130 if (("Id" == name))
31131 {
31132 this.idField = value;
31133 this.idFieldSet = true;
31134 }
31135 if (("ContentType" == name))
31136 {
31137 this.contentTypeField = value;
31138 this.contentTypeFieldSet = true;
31139 }
31140 if (("Advertise" == name))
31141 {
31142 this.advertiseField = Enums.ParseYesNoType(value);
31143 this.advertiseFieldSet = true;
31144 }
31145 }
31146 }
31147
31148 /// <summary>
31149 /// Register a type library (TypeLib). Please note that in order to properly use this
31150 /// non-advertised, you will need use this element with Advertise='no' and also author the
31151 /// appropriate child Interface elements by extracting them from the type library itself.
31152 /// </summary>
31153 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
31154 public class TypeLib : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
31155 {
31156
31157 private ElementCollection children;
31158
31159 private string idField;
31160
31161 private bool idFieldSet;
31162
31163 private YesNoType advertiseField;
31164
31165 private bool advertiseFieldSet;
31166
31167 private YesNoType controlField;
31168
31169 private bool controlFieldSet;
31170
31171 private int costField;
31172
31173 private bool costFieldSet;
31174
31175 private string descriptionField;
31176
31177 private bool descriptionFieldSet;
31178
31179 private YesNoType hasDiskImageField;
31180
31181 private bool hasDiskImageFieldSet;
31182
31183 private string helpDirectoryField;
31184
31185 private bool helpDirectoryFieldSet;
31186
31187 private YesNoType hiddenField;
31188
31189 private bool hiddenFieldSet;
31190
31191 private int languageField;
31192
31193 private bool languageFieldSet;
31194
31195 private int majorVersionField;
31196
31197 private bool majorVersionFieldSet;
31198
31199 private int minorVersionField;
31200
31201 private bool minorVersionFieldSet;
31202
31203 private int resourceIdField;
31204
31205 private bool resourceIdFieldSet;
31206
31207 private YesNoType restrictedField;
31208
31209 private bool restrictedFieldSet;
31210
31211 private ISchemaElement parentElement;
31212
31213 public TypeLib()
31214 {
31215 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
31216 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
31217 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class)));
31218 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface)));
31219 this.children = childCollection0;
31220 }
31221
31222 public virtual IEnumerable Children
31223 {
31224 get
31225 {
31226 return this.children;
31227 }
31228 }
31229
31230 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
31231 public virtual IEnumerable this[System.Type childType]
31232 {
31233 get
31234 {
31235 return this.children.Filter(childType);
31236 }
31237 }
31238
31239 /// <summary>
31240 /// The GUID that identifes the type library.
31241 /// </summary>
31242 public string Id
31243 {
31244 get
31245 {
31246 return this.idField;
31247 }
31248 set
31249 {
31250 this.idFieldSet = true;
31251 this.idField = value;
31252 }
31253 }
31254
31255 /// <summary>
31256 /// Value of 'yes' will create a row in the TypeLib table.
31257 /// Value of 'no' will create rows in the Registry table.
31258 /// The default value is 'no'.
31259 /// </summary>
31260 public YesNoType Advertise
31261 {
31262 get
31263 {
31264 return this.advertiseField;
31265 }
31266 set
31267 {
31268 this.advertiseFieldSet = true;
31269 this.advertiseField = value;
31270 }
31271 }
31272
31273 /// <summary>
31274 /// Value of 'yes' means the type library describes controls, and should not be displayed in type browsers intended for nonvisual objects.
31275 /// This attribute can only be set if Advertise='no'.
31276 /// </summary>
31277 public YesNoType Control
31278 {
31279 get
31280 {
31281 return this.controlField;
31282 }
31283 set
31284 {
31285 this.controlFieldSet = true;
31286 this.controlField = value;
31287 }
31288 }
31289
31290 /// <summary>
31291 /// The cost associated with the registration of the type library in bytes. This attribute cannot be set if Advertise='no'.
31292 /// </summary>
31293 public int Cost
31294 {
31295 get
31296 {
31297 return this.costField;
31298 }
31299 set
31300 {
31301 this.costFieldSet = true;
31302 this.costField = value;
31303 }
31304 }
31305
31306 /// <summary>
31307 /// The localizable description of the type library.
31308 /// </summary>
31309 public string Description
31310 {
31311 get
31312 {
31313 return this.descriptionField;
31314 }
31315 set
31316 {
31317 this.descriptionFieldSet = true;
31318 this.descriptionField = value;
31319 }
31320 }
31321
31322 /// <summary>
31323 /// Value of 'yes' means the type library exists in a persisted form on disk. This attribute can only be set if Advertise='no'.
31324 /// </summary>
31325 public YesNoType HasDiskImage
31326 {
31327 get
31328 {
31329 return this.hasDiskImageField;
31330 }
31331 set
31332 {
31333 this.hasDiskImageFieldSet = true;
31334 this.hasDiskImageField = value;
31335 }
31336 }
31337
31338 /// <summary>
31339 /// The identifier of the Directory element for the help directory.
31340 /// </summary>
31341 public string HelpDirectory
31342 {
31343 get
31344 {
31345 return this.helpDirectoryField;
31346 }
31347 set
31348 {
31349 this.helpDirectoryFieldSet = true;
31350 this.helpDirectoryField = value;
31351 }
31352 }
31353
31354 /// <summary>
31355 /// Value of 'yes' means the type library should not be displayed to users, although its use is not restricted.
31356 /// Should be used by controls. Hosts should create a new type library that wraps the control with extended properties.
31357 /// This attribute can only be set if Advertise='no'.
31358 /// </summary>
31359 public YesNoType Hidden
31360 {
31361 get
31362 {
31363 return this.hiddenField;
31364 }
31365 set
31366 {
31367 this.hiddenFieldSet = true;
31368 this.hiddenField = value;
31369 }
31370 }
31371
31372 /// <summary>
31373 /// The language of the type library. This must be a non-negative integer.
31374 /// </summary>
31375 public int Language
31376 {
31377 get
31378 {
31379 return this.languageField;
31380 }
31381 set
31382 {
31383 this.languageFieldSet = true;
31384 this.languageField = value;
31385 }
31386 }
31387
31388 /// <summary>
31389 /// The major version of the type library. The value should be an integer from 0 - 255.
31390 /// </summary>
31391 public int MajorVersion
31392 {
31393 get
31394 {
31395 return this.majorVersionField;
31396 }
31397 set
31398 {
31399 this.majorVersionFieldSet = true;
31400 this.majorVersionField = value;
31401 }
31402 }
31403
31404 /// <summary>
31405 /// The minor version of the type library. The value should be an integer from 0 - 255.
31406 /// </summary>
31407 public int MinorVersion
31408 {
31409 get
31410 {
31411 return this.minorVersionField;
31412 }
31413 set
31414 {
31415 this.minorVersionFieldSet = true;
31416 this.minorVersionField = value;
31417 }
31418 }
31419
31420 /// <summary>
31421 /// The resource id of a typelib. The value is appended to the end of the typelib path in the registry.
31422 /// </summary>
31423 public int ResourceId
31424 {
31425 get
31426 {
31427 return this.resourceIdField;
31428 }
31429 set
31430 {
31431 this.resourceIdFieldSet = true;
31432 this.resourceIdField = value;
31433 }
31434 }
31435
31436 /// <summary>
31437 /// 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'.
31438 /// </summary>
31439 public YesNoType Restricted
31440 {
31441 get
31442 {
31443 return this.restrictedField;
31444 }
31445 set
31446 {
31447 this.restrictedFieldSet = true;
31448 this.restrictedField = value;
31449 }
31450 }
31451
31452 public virtual ISchemaElement ParentElement
31453 {
31454 get
31455 {
31456 return this.parentElement;
31457 }
31458 set
31459 {
31460 this.parentElement = value;
31461 }
31462 }
31463
31464 public virtual void AddChild(ISchemaElement child)
31465 {
31466 if ((null == child))
31467 {
31468 throw new ArgumentNullException("child");
31469 }
31470 this.children.AddElement(child);
31471 child.ParentElement = this;
31472 }
31473
31474 public virtual void RemoveChild(ISchemaElement child)
31475 {
31476 if ((null == child))
31477 {
31478 throw new ArgumentNullException("child");
31479 }
31480 this.children.RemoveElement(child);
31481 child.ParentElement = null;
31482 }
31483
31484 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31485 ISchemaElement ICreateChildren.CreateChild(string childName)
31486 {
31487 if (String.IsNullOrEmpty(childName))
31488 {
31489 throw new ArgumentNullException("childName");
31490 }
31491 ISchemaElement childValue = null;
31492 if (("AppId" == childName))
31493 {
31494 childValue = new AppId();
31495 }
31496 if (("Class" == childName))
31497 {
31498 childValue = new Class();
31499 }
31500 if (("Interface" == childName))
31501 {
31502 childValue = new Interface();
31503 }
31504 if ((null == childValue))
31505 {
31506 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
31507 }
31508 return childValue;
31509 }
31510
31511 /// <summary>
31512 /// Processes this element and all child elements into an XmlWriter.
31513 /// </summary>
31514 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
31515 public virtual void OutputXml(XmlWriter writer)
31516 {
31517 if ((null == writer))
31518 {
31519 throw new ArgumentNullException("writer");
31520 }
31521 writer.WriteStartElement("TypeLib", "http://wixtoolset.org/schemas/v4/wxs");
31522 if (this.idFieldSet)
31523 {
31524 writer.WriteAttributeString("Id", this.idField);
31525 }
31526 if (this.advertiseFieldSet)
31527 {
31528 if ((this.advertiseField == YesNoType.no))
31529 {
31530 writer.WriteAttributeString("Advertise", "no");
31531 }
31532 if ((this.advertiseField == YesNoType.yes))
31533 {
31534 writer.WriteAttributeString("Advertise", "yes");
31535 }
31536 }
31537 if (this.controlFieldSet)
31538 {
31539 if ((this.controlField == YesNoType.no))
31540 {
31541 writer.WriteAttributeString("Control", "no");
31542 }
31543 if ((this.controlField == YesNoType.yes))
31544 {
31545 writer.WriteAttributeString("Control", "yes");
31546 }
31547 }
31548 if (this.costFieldSet)
31549 {
31550 writer.WriteAttributeString("Cost", this.costField.ToString(CultureInfo.InvariantCulture));
31551 }
31552 if (this.descriptionFieldSet)
31553 {
31554 writer.WriteAttributeString("Description", this.descriptionField);
31555 }
31556 if (this.hasDiskImageFieldSet)
31557 {
31558 if ((this.hasDiskImageField == YesNoType.no))
31559 {
31560 writer.WriteAttributeString("HasDiskImage", "no");
31561 }
31562 if ((this.hasDiskImageField == YesNoType.yes))
31563 {
31564 writer.WriteAttributeString("HasDiskImage", "yes");
31565 }
31566 }
31567 if (this.helpDirectoryFieldSet)
31568 {
31569 writer.WriteAttributeString("HelpDirectory", this.helpDirectoryField);
31570 }
31571 if (this.hiddenFieldSet)
31572 {
31573 if ((this.hiddenField == YesNoType.no))
31574 {
31575 writer.WriteAttributeString("Hidden", "no");
31576 }
31577 if ((this.hiddenField == YesNoType.yes))
31578 {
31579 writer.WriteAttributeString("Hidden", "yes");
31580 }
31581 }
31582 if (this.languageFieldSet)
31583 {
31584 writer.WriteAttributeString("Language", this.languageField.ToString(CultureInfo.InvariantCulture));
31585 }
31586 if (this.majorVersionFieldSet)
31587 {
31588 writer.WriteAttributeString("MajorVersion", this.majorVersionField.ToString(CultureInfo.InvariantCulture));
31589 }
31590 if (this.minorVersionFieldSet)
31591 {
31592 writer.WriteAttributeString("MinorVersion", this.minorVersionField.ToString(CultureInfo.InvariantCulture));
31593 }
31594 if (this.resourceIdFieldSet)
31595 {
31596 writer.WriteAttributeString("ResourceId", this.resourceIdField.ToString(CultureInfo.InvariantCulture));
31597 }
31598 if (this.restrictedFieldSet)
31599 {
31600 if ((this.restrictedField == YesNoType.no))
31601 {
31602 writer.WriteAttributeString("Restricted", "no");
31603 }
31604 if ((this.restrictedField == YesNoType.yes))
31605 {
31606 writer.WriteAttributeString("Restricted", "yes");
31607 }
31608 }
31609 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
31610 {
31611 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
31612 childElement.OutputXml(writer);
31613 }
31614 writer.WriteEndElement();
31615 }
31616
31617 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31618 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
31619 void ISetAttributes.SetAttribute(string name, string value)
31620 {
31621 if (String.IsNullOrEmpty(name))
31622 {
31623 throw new ArgumentNullException("name");
31624 }
31625 if (("Id" == name))
31626 {
31627 this.idField = value;
31628 this.idFieldSet = true;
31629 }
31630 if (("Advertise" == name))
31631 {
31632 this.advertiseField = Enums.ParseYesNoType(value);
31633 this.advertiseFieldSet = true;
31634 }
31635 if (("Control" == name))
31636 {
31637 this.controlField = Enums.ParseYesNoType(value);
31638 this.controlFieldSet = true;
31639 }
31640 if (("Cost" == name))
31641 {
31642 this.costField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31643 this.costFieldSet = true;
31644 }
31645 if (("Description" == name))
31646 {
31647 this.descriptionField = value;
31648 this.descriptionFieldSet = true;
31649 }
31650 if (("HasDiskImage" == name))
31651 {
31652 this.hasDiskImageField = Enums.ParseYesNoType(value);
31653 this.hasDiskImageFieldSet = true;
31654 }
31655 if (("HelpDirectory" == name))
31656 {
31657 this.helpDirectoryField = value;
31658 this.helpDirectoryFieldSet = true;
31659 }
31660 if (("Hidden" == name))
31661 {
31662 this.hiddenField = Enums.ParseYesNoType(value);
31663 this.hiddenFieldSet = true;
31664 }
31665 if (("Language" == name))
31666 {
31667 this.languageField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31668 this.languageFieldSet = true;
31669 }
31670 if (("MajorVersion" == name))
31671 {
31672 this.majorVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31673 this.majorVersionFieldSet = true;
31674 }
31675 if (("MinorVersion" == name))
31676 {
31677 this.minorVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31678 this.minorVersionFieldSet = true;
31679 }
31680 if (("ResourceId" == name))
31681 {
31682 this.resourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31683 this.resourceIdFieldSet = true;
31684 }
31685 if (("Restricted" == name))
31686 {
31687 this.restrictedField = Enums.ParseYesNoType(value);
31688 this.restrictedFieldSet = true;
31689 }
31690 }
31691 }
31692
31693 /// <summary>
31694 /// ProgId registration for parent Component. If ProgId has an associated Class, it must be a child of that element.
31695 /// </summary>
31696 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
31697 public class ProgId : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
31698 {
31699
31700 private ElementCollection children;
31701
31702 private string idField;
31703
31704 private bool idFieldSet;
31705
31706 private string descriptionField;
31707
31708 private bool descriptionFieldSet;
31709
31710 private string iconField;
31711
31712 private bool iconFieldSet;
31713
31714 private int iconIndexField;
31715
31716 private bool iconIndexFieldSet;
31717
31718 private YesNoType advertiseField;
31719
31720 private bool advertiseFieldSet;
31721
31722 private string noOpenField;
31723
31724 private bool noOpenFieldSet;
31725
31726 private ISchemaElement parentElement;
31727
31728 public ProgId()
31729 {
31730 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
31731 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ProgId)));
31732 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Extension)));
31733 this.children = childCollection0;
31734 }
31735
31736 public virtual IEnumerable Children
31737 {
31738 get
31739 {
31740 return this.children;
31741 }
31742 }
31743
31744 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
31745 public virtual IEnumerable this[System.Type childType]
31746 {
31747 get
31748 {
31749 return this.children.Filter(childType);
31750 }
31751 }
31752
31753 public string Id
31754 {
31755 get
31756 {
31757 return this.idField;
31758 }
31759 set
31760 {
31761 this.idFieldSet = true;
31762 this.idField = value;
31763 }
31764 }
31765
31766 public string Description
31767 {
31768 get
31769 {
31770 return this.descriptionField;
31771 }
31772 set
31773 {
31774 this.descriptionFieldSet = true;
31775 this.descriptionField = value;
31776 }
31777 }
31778
31779 /// <summary>
31780 /// 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.
31781 /// </summary>
31782 public string Icon
31783 {
31784 get
31785 {
31786 return this.iconField;
31787 }
31788 set
31789 {
31790 this.iconFieldSet = true;
31791 this.iconField = value;
31792 }
31793 }
31794
31795 public int IconIndex
31796 {
31797 get
31798 {
31799 return this.iconIndexField;
31800 }
31801 set
31802 {
31803 this.iconIndexFieldSet = true;
31804 this.iconIndexField = value;
31805 }
31806 }
31807
31808 public YesNoType Advertise
31809 {
31810 get
31811 {
31812 return this.advertiseField;
31813 }
31814 set
31815 {
31816 this.advertiseFieldSet = true;
31817 this.advertiseField = value;
31818 }
31819 }
31820
31821 /// <summary>
31822 /// 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.
31823 /// </summary>
31824 public string NoOpen
31825 {
31826 get
31827 {
31828 return this.noOpenField;
31829 }
31830 set
31831 {
31832 this.noOpenFieldSet = true;
31833 this.noOpenField = value;
31834 }
31835 }
31836
31837 public virtual ISchemaElement ParentElement
31838 {
31839 get
31840 {
31841 return this.parentElement;
31842 }
31843 set
31844 {
31845 this.parentElement = value;
31846 }
31847 }
31848
31849 public virtual void AddChild(ISchemaElement child)
31850 {
31851 if ((null == child))
31852 {
31853 throw new ArgumentNullException("child");
31854 }
31855 this.children.AddElement(child);
31856 child.ParentElement = this;
31857 }
31858
31859 public virtual void RemoveChild(ISchemaElement child)
31860 {
31861 if ((null == child))
31862 {
31863 throw new ArgumentNullException("child");
31864 }
31865 this.children.RemoveElement(child);
31866 child.ParentElement = null;
31867 }
31868
31869 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31870 ISchemaElement ICreateChildren.CreateChild(string childName)
31871 {
31872 if (String.IsNullOrEmpty(childName))
31873 {
31874 throw new ArgumentNullException("childName");
31875 }
31876 ISchemaElement childValue = null;
31877 if (("ProgId" == childName))
31878 {
31879 childValue = new ProgId();
31880 }
31881 if (("Extension" == childName))
31882 {
31883 childValue = new Extension();
31884 }
31885 if ((null == childValue))
31886 {
31887 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
31888 }
31889 return childValue;
31890 }
31891
31892 /// <summary>
31893 /// Processes this element and all child elements into an XmlWriter.
31894 /// </summary>
31895 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
31896 public virtual void OutputXml(XmlWriter writer)
31897 {
31898 if ((null == writer))
31899 {
31900 throw new ArgumentNullException("writer");
31901 }
31902 writer.WriteStartElement("ProgId", "http://wixtoolset.org/schemas/v4/wxs");
31903 if (this.idFieldSet)
31904 {
31905 writer.WriteAttributeString("Id", this.idField);
31906 }
31907 if (this.descriptionFieldSet)
31908 {
31909 writer.WriteAttributeString("Description", this.descriptionField);
31910 }
31911 if (this.iconFieldSet)
31912 {
31913 writer.WriteAttributeString("Icon", this.iconField);
31914 }
31915 if (this.iconIndexFieldSet)
31916 {
31917 writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture));
31918 }
31919 if (this.advertiseFieldSet)
31920 {
31921 if ((this.advertiseField == YesNoType.no))
31922 {
31923 writer.WriteAttributeString("Advertise", "no");
31924 }
31925 if ((this.advertiseField == YesNoType.yes))
31926 {
31927 writer.WriteAttributeString("Advertise", "yes");
31928 }
31929 }
31930 if (this.noOpenFieldSet)
31931 {
31932 writer.WriteAttributeString("NoOpen", this.noOpenField);
31933 }
31934 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
31935 {
31936 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
31937 childElement.OutputXml(writer);
31938 }
31939 writer.WriteEndElement();
31940 }
31941
31942 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
31943 void ISetAttributes.SetAttribute(string name, string value)
31944 {
31945 if (String.IsNullOrEmpty(name))
31946 {
31947 throw new ArgumentNullException("name");
31948 }
31949 if (("Id" == name))
31950 {
31951 this.idField = value;
31952 this.idFieldSet = true;
31953 }
31954 if (("Description" == name))
31955 {
31956 this.descriptionField = value;
31957 this.descriptionFieldSet = true;
31958 }
31959 if (("Icon" == name))
31960 {
31961 this.iconField = value;
31962 this.iconFieldSet = true;
31963 }
31964 if (("IconIndex" == name))
31965 {
31966 this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
31967 this.iconIndexFieldSet = true;
31968 }
31969 if (("Advertise" == name))
31970 {
31971 this.advertiseField = Enums.ParseYesNoType(value);
31972 this.advertiseFieldSet = true;
31973 }
31974 if (("NoOpen" == name))
31975 {
31976 this.noOpenField = value;
31977 this.noOpenFieldSet = true;
31978 }
31979 }
31980 }
31981
31982 /// <summary>
31983 /// Application ID containing DCOM information for the associated application GUID.
31984 /// If this element is nested under a Fragment, Module, or Package element, it must be
31985 /// advertised.
31986 /// </summary>
31987 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
31988 public class AppId : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
31989 {
31990
31991 private ElementCollection children;
31992
31993 private YesNoType activateAtStorageField;
31994
31995 private bool activateAtStorageFieldSet;
31996
31997 private YesNoType advertiseField;
31998
31999 private bool advertiseFieldSet;
32000
32001 private string descriptionField;
32002
32003 private bool descriptionFieldSet;
32004
32005 private string dllSurrogateField;
32006
32007 private bool dllSurrogateFieldSet;
32008
32009 private string idField;
32010
32011 private bool idFieldSet;
32012
32013 private string localServiceField;
32014
32015 private bool localServiceFieldSet;
32016
32017 private string remoteServerNameField;
32018
32019 private bool remoteServerNameFieldSet;
32020
32021 private YesNoType runAsInteractiveUserField;
32022
32023 private bool runAsInteractiveUserFieldSet;
32024
32025 private string serviceParametersField;
32026
32027 private bool serviceParametersFieldSet;
32028
32029 private ISchemaElement parentElement;
32030
32031 public AppId()
32032 {
32033 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
32034 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class)));
32035 this.children = childCollection0;
32036 }
32037
32038 public virtual IEnumerable Children
32039 {
32040 get
32041 {
32042 return this.children;
32043 }
32044 }
32045
32046 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
32047 public virtual IEnumerable this[System.Type childType]
32048 {
32049 get
32050 {
32051 return this.children.Filter(childType);
32052 }
32053 }
32054
32055 /// <summary>
32056 /// Set this value to 'yes' to configure the client to activate on the same system as persistent storage.
32057 /// </summary>
32058 public YesNoType ActivateAtStorage
32059 {
32060 get
32061 {
32062 return this.activateAtStorageField;
32063 }
32064 set
32065 {
32066 this.activateAtStorageFieldSet = true;
32067 this.activateAtStorageField = value;
32068 }
32069 }
32070
32071 /// <summary>
32072 /// Set this value to 'yes' in order to create a normal AppId table row. Set this value to 'no' in order to
32073 /// generate Registry rows that perform similar registration (without the often problematic Windows Installer
32074 /// advertising behavior).
32075 /// </summary>
32076 public YesNoType Advertise
32077 {
32078 get
32079 {
32080 return this.advertiseField;
32081 }
32082 set
32083 {
32084 this.advertiseFieldSet = true;
32085 this.advertiseField = value;
32086 }
32087 }
32088
32089 /// <summary>
32090 /// Set this value to the description of the AppId. It can only be specified when the AppId is not being advertised.
32091 /// </summary>
32092 public string Description
32093 {
32094 get
32095 {
32096 return this.descriptionField;
32097 }
32098 set
32099 {
32100 this.descriptionFieldSet = true;
32101 this.descriptionField = value;
32102 }
32103 }
32104
32105 /// <summary>
32106 /// Set this value to specify that the class is a DLL that is to be activated in a surrogate EXE
32107 /// process, and the surrogate process to be used is the path of a surrogate EXE file specified by the value.
32108 /// </summary>
32109 public string DllSurrogate
32110 {
32111 get
32112 {
32113 return this.dllSurrogateField;
32114 }
32115 set
32116 {
32117 this.dllSurrogateFieldSet = true;
32118 this.dllSurrogateField = value;
32119 }
32120 }
32121
32122 /// <summary>
32123 /// Set this value to the AppID GUID that corresponds to the named executable.
32124 /// </summary>
32125 public string Id
32126 {
32127 get
32128 {
32129 return this.idField;
32130 }
32131 set
32132 {
32133 this.idFieldSet = true;
32134 this.idField = value;
32135 }
32136 }
32137
32138 /// <summary>
32139 /// Set this value to the name of a service to allow the object to be installed as a Win32 service.
32140 /// </summary>
32141 public string LocalService
32142 {
32143 get
32144 {
32145 return this.localServiceField;
32146 }
32147 set
32148 {
32149 this.localServiceFieldSet = true;
32150 this.localServiceField = value;
32151 }
32152 }
32153
32154 /// <summary>
32155 /// Set this value to the name of the remote server to configure the client to request the object
32156 /// be run at a particular machine whenever an activation function is called for which a COSERVERINFO
32157 /// structure is not specified.
32158 /// </summary>
32159 public string RemoteServerName
32160 {
32161 get
32162 {
32163 return this.remoteServerNameField;
32164 }
32165 set
32166 {
32167 this.remoteServerNameFieldSet = true;
32168 this.remoteServerNameField = value;
32169 }
32170 }
32171
32172 /// <summary>
32173 /// Set this value to 'yes' to configure a class to run under the identity of the user currently
32174 /// logged on and connected to the interactive desktop when activated by a remote client without
32175 /// being written as a Win32 service.
32176 /// </summary>
32177 public YesNoType RunAsInteractiveUser
32178 {
32179 get
32180 {
32181 return this.runAsInteractiveUserField;
32182 }
32183 set
32184 {
32185 this.runAsInteractiveUserFieldSet = true;
32186 this.runAsInteractiveUserField = value;
32187 }
32188 }
32189
32190 /// <summary>
32191 /// Set this value to the parameters to be passed to a LocalService on invocation.
32192 /// </summary>
32193 public string ServiceParameters
32194 {
32195 get
32196 {
32197 return this.serviceParametersField;
32198 }
32199 set
32200 {
32201 this.serviceParametersFieldSet = true;
32202 this.serviceParametersField = value;
32203 }
32204 }
32205
32206 public virtual ISchemaElement ParentElement
32207 {
32208 get
32209 {
32210 return this.parentElement;
32211 }
32212 set
32213 {
32214 this.parentElement = value;
32215 }
32216 }
32217
32218 public virtual void AddChild(ISchemaElement child)
32219 {
32220 if ((null == child))
32221 {
32222 throw new ArgumentNullException("child");
32223 }
32224 this.children.AddElement(child);
32225 child.ParentElement = this;
32226 }
32227
32228 public virtual void RemoveChild(ISchemaElement child)
32229 {
32230 if ((null == child))
32231 {
32232 throw new ArgumentNullException("child");
32233 }
32234 this.children.RemoveElement(child);
32235 child.ParentElement = null;
32236 }
32237
32238 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
32239 ISchemaElement ICreateChildren.CreateChild(string childName)
32240 {
32241 if (String.IsNullOrEmpty(childName))
32242 {
32243 throw new ArgumentNullException("childName");
32244 }
32245 ISchemaElement childValue = null;
32246 if (("Class" == childName))
32247 {
32248 childValue = new Class();
32249 }
32250 if ((null == childValue))
32251 {
32252 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
32253 }
32254 return childValue;
32255 }
32256
32257 /// <summary>
32258 /// Processes this element and all child elements into an XmlWriter.
32259 /// </summary>
32260 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
32261 public virtual void OutputXml(XmlWriter writer)
32262 {
32263 if ((null == writer))
32264 {
32265 throw new ArgumentNullException("writer");
32266 }
32267 writer.WriteStartElement("AppId", "http://wixtoolset.org/schemas/v4/wxs");
32268 if (this.activateAtStorageFieldSet)
32269 {
32270 if ((this.activateAtStorageField == YesNoType.no))
32271 {
32272 writer.WriteAttributeString("ActivateAtStorage", "no");
32273 }
32274 if ((this.activateAtStorageField == YesNoType.yes))
32275 {
32276 writer.WriteAttributeString("ActivateAtStorage", "yes");
32277 }
32278 }
32279 if (this.advertiseFieldSet)
32280 {
32281 if ((this.advertiseField == YesNoType.no))
32282 {
32283 writer.WriteAttributeString("Advertise", "no");
32284 }
32285 if ((this.advertiseField == YesNoType.yes))
32286 {
32287 writer.WriteAttributeString("Advertise", "yes");
32288 }
32289 }
32290 if (this.descriptionFieldSet)
32291 {
32292 writer.WriteAttributeString("Description", this.descriptionField);
32293 }
32294 if (this.dllSurrogateFieldSet)
32295 {
32296 writer.WriteAttributeString("DllSurrogate", this.dllSurrogateField);
32297 }
32298 if (this.idFieldSet)
32299 {
32300 writer.WriteAttributeString("Id", this.idField);
32301 }
32302 if (this.localServiceFieldSet)
32303 {
32304 writer.WriteAttributeString("LocalService", this.localServiceField);
32305 }
32306 if (this.remoteServerNameFieldSet)
32307 {
32308 writer.WriteAttributeString("RemoteServerName", this.remoteServerNameField);
32309 }
32310 if (this.runAsInteractiveUserFieldSet)
32311 {
32312 if ((this.runAsInteractiveUserField == YesNoType.no))
32313 {
32314 writer.WriteAttributeString("RunAsInteractiveUser", "no");
32315 }
32316 if ((this.runAsInteractiveUserField == YesNoType.yes))
32317 {
32318 writer.WriteAttributeString("RunAsInteractiveUser", "yes");
32319 }
32320 }
32321 if (this.serviceParametersFieldSet)
32322 {
32323 writer.WriteAttributeString("ServiceParameters", this.serviceParametersField);
32324 }
32325 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
32326 {
32327 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
32328 childElement.OutputXml(writer);
32329 }
32330 writer.WriteEndElement();
32331 }
32332
32333 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
32334 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
32335 void ISetAttributes.SetAttribute(string name, string value)
32336 {
32337 if (String.IsNullOrEmpty(name))
32338 {
32339 throw new ArgumentNullException("name");
32340 }
32341 if (("ActivateAtStorage" == name))
32342 {
32343 this.activateAtStorageField = Enums.ParseYesNoType(value);
32344 this.activateAtStorageFieldSet = true;
32345 }
32346 if (("Advertise" == name))
32347 {
32348 this.advertiseField = Enums.ParseYesNoType(value);
32349 this.advertiseFieldSet = true;
32350 }
32351 if (("Description" == name))
32352 {
32353 this.descriptionField = value;
32354 this.descriptionFieldSet = true;
32355 }
32356 if (("DllSurrogate" == name))
32357 {
32358 this.dllSurrogateField = value;
32359 this.dllSurrogateFieldSet = true;
32360 }
32361 if (("Id" == name))
32362 {
32363 this.idField = value;
32364 this.idFieldSet = true;
32365 }
32366 if (("LocalService" == name))
32367 {
32368 this.localServiceField = value;
32369 this.localServiceFieldSet = true;
32370 }
32371 if (("RemoteServerName" == name))
32372 {
32373 this.remoteServerNameField = value;
32374 this.remoteServerNameFieldSet = true;
32375 }
32376 if (("RunAsInteractiveUser" == name))
32377 {
32378 this.runAsInteractiveUserField = Enums.ParseYesNoType(value);
32379 this.runAsInteractiveUserFieldSet = true;
32380 }
32381 if (("ServiceParameters" == name))
32382 {
32383 this.serviceParametersField = value;
32384 this.serviceParametersFieldSet = true;
32385 }
32386 }
32387 }
32388
32389 /// <summary>
32390 /// COM Class registration for parent Component.
32391 /// </summary>
32392 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
32393 public class Class : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
32394 {
32395
32396 private ElementCollection children;
32397
32398 private string idField;
32399
32400 private bool idFieldSet;
32401
32402 private ContextType contextField;
32403
32404 private bool contextFieldSet;
32405
32406 private string descriptionField;
32407
32408 private bool descriptionFieldSet;
32409
32410 private string appIdField;
32411
32412 private bool appIdFieldSet;
32413
32414 private string iconField;
32415
32416 private bool iconFieldSet;
32417
32418 private int iconIndexField;
32419
32420 private bool iconIndexFieldSet;
32421
32422 private string handlerField;
32423
32424 private bool handlerFieldSet;
32425
32426 private string argumentField;
32427
32428 private bool argumentFieldSet;
32429
32430 private YesNoType relativePathField;
32431
32432 private bool relativePathFieldSet;
32433
32434 private YesNoType advertiseField;
32435
32436 private bool advertiseFieldSet;
32437
32438 private ThreadingModelType threadingModelField;
32439
32440 private bool threadingModelFieldSet;
32441
32442 private string versionField;
32443
32444 private bool versionFieldSet;
32445
32446 private YesNoType insertableField;
32447
32448 private bool insertableFieldSet;
32449
32450 private YesNoType programmableField;
32451
32452 private bool programmableFieldSet;
32453
32454 private string foreignServerField;
32455
32456 private bool foreignServerFieldSet;
32457
32458 private string serverField;
32459
32460 private bool serverFieldSet;
32461
32462 private YesNoType shortPathField;
32463
32464 private bool shortPathFieldSet;
32465
32466 private YesNoType safeForScriptingField;
32467
32468 private bool safeForScriptingFieldSet;
32469
32470 private YesNoType safeForInitializingField;
32471
32472 private bool safeForInitializingFieldSet;
32473
32474 private YesNoType controlField;
32475
32476 private bool controlFieldSet;
32477
32478 private ISchemaElement parentElement;
32479
32480 public Class()
32481 {
32482 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
32483 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgId)));
32484 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileTypeMask)));
32485 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface)));
32486 this.children = childCollection0;
32487 }
32488
32489 public virtual IEnumerable Children
32490 {
32491 get
32492 {
32493 return this.children;
32494 }
32495 }
32496
32497 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
32498 public virtual IEnumerable this[System.Type childType]
32499 {
32500 get
32501 {
32502 return this.children.Filter(childType);
32503 }
32504 }
32505
32506 /// <summary>
32507 /// The Class identifier (CLSID) of a COM server.
32508 /// </summary>
32509 public string Id
32510 {
32511 get
32512 {
32513 return this.idField;
32514 }
32515 set
32516 {
32517 this.idFieldSet = true;
32518 this.idField = value;
32519 }
32520 }
32521
32522 /// <summary>
32523 /// The server context(s) for this COM server. This attribute is optional for VB6 libraries that are marked "PublicNotCreateable".
32524 /// Class elements marked Advertised must specify at least one server context. It is most common for there to be a single value
32525 /// for the Context attribute.
32526 /// </summary>
32527 public ContextType Context
32528 {
32529 get
32530 {
32531 return this.contextField;
32532 }
32533 set
32534 {
32535 this.contextFieldSet = true;
32536 this.contextField = value;
32537 }
32538 }
32539
32540 /// <summary>
32541 /// Localized description associated with the Class ID and Program ID.
32542 /// </summary>
32543 public string Description
32544 {
32545 get
32546 {
32547 return this.descriptionField;
32548 }
32549 set
32550 {
32551 this.descriptionFieldSet = true;
32552 this.descriptionField = value;
32553 }
32554 }
32555
32556 /// <summary>
32557 /// This attribute is only allowed when a Class is advertised. Using this attribute will reference an Application ID
32558 /// containing DCOM information for the associated application GUID. The value must correspond to an AppId/@Id of an
32559 /// AppId element nested under a Fragment, Module, or Package element. To associate an AppId with a non-advertised
32560 /// class, nest the class within a parent AppId element.
32561 /// </summary>
32562 public string AppId
32563 {
32564 get
32565 {
32566 return this.appIdField;
32567 }
32568 set
32569 {
32570 this.appIdFieldSet = true;
32571 this.appIdField = value;
32572 }
32573 }
32574
32575 /// <summary>
32576 /// The file providing the icon associated with this CLSID. Reference to an Icon element
32577 /// (should match the Id attribute of an Icon element). This is currently not supported if the
32578 /// value of the Advertise attribute is "no".
32579 /// </summary>
32580 public string Icon
32581 {
32582 get
32583 {
32584 return this.iconField;
32585 }
32586 set
32587 {
32588 this.iconFieldSet = true;
32589 this.iconField = value;
32590 }
32591 }
32592
32593 /// <summary>
32594 /// Icon index into the icon file.
32595 /// </summary>
32596 public int IconIndex
32597 {
32598 get
32599 {
32600 return this.iconIndexField;
32601 }
32602 set
32603 {
32604 this.iconIndexFieldSet = true;
32605 this.iconIndexField = value;
32606 }
32607 }
32608
32609 /// <summary>
32610 /// The default inproc handler. May be optionally provided only for Context = LocalServer or
32611 /// LocalServer32. Value of "1" creates a 16-bit InprocHandler (appearing as the InprocHandler
32612 /// value). Value of "2" creates a 32-bit InprocHandler (appearing as the InprocHandler32 value).
32613 /// Value of "3" creates 16-bit as well as 32-bit InprocHandlers. A non-numeric value is treated
32614 /// as a system file that serves as the 32-bit InprocHandler (appearing as the InprocHandler32 value).
32615 /// </summary>
32616 public string Handler
32617 {
32618 get
32619 {
32620 return this.handlerField;
32621 }
32622 set
32623 {
32624 this.handlerFieldSet = true;
32625 this.handlerField = value;
32626 }
32627 }
32628
32629 /// <summary>
32630 /// This column is optional only when the Context column is set to "LocalServer"
32631 /// or "LocalServer32" server context. The text is registered as the argument against
32632 /// the OLE server and is used by OLE for invoking the server. Note that the resolution
32633 /// of properties in the Argument field is limited. A property formatted as [Property] in
32634 /// this field can only be resolved if the property already has the intended value when
32635 /// the component owning the class is installed. For example, for the argument "[#MyDoc.doc]"
32636 /// to resolve to the correct value, the same process must be installing the file MyDoc.doc and the
32637 /// component that owns the class.
32638 /// </summary>
32639 public string Argument
32640 {
32641 get
32642 {
32643 return this.argumentField;
32644 }
32645 set
32646 {
32647 this.argumentFieldSet = true;
32648 this.argumentField = value;
32649 }
32650 }
32651
32652 /// <summary>
32653 /// When the value is "yes", the bare file name can be used for COM servers. The installer
32654 /// registers the file name only instead of the complete path. This enables the server in
32655 /// the current directory to take precedence and allows multiple copies of the same component.
32656 /// </summary>
32657 public YesNoType RelativePath
32658 {
32659 get
32660 {
32661 return this.relativePathField;
32662 }
32663 set
32664 {
32665 this.relativePathFieldSet = true;
32666 this.relativePathField = value;
32667 }
32668 }
32669
32670 /// <summary>
32671 /// Set this value to "yes" in order to create a normal Class table row. Set this value to
32672 /// "no" in order to generate Registry rows that perform similar registration (without the
32673 /// often problematic Windows Installer advertising behavior).
32674 /// </summary>
32675 public YesNoType Advertise
32676 {
32677 get
32678 {
32679 return this.advertiseField;
32680 }
32681 set
32682 {
32683 this.advertiseFieldSet = true;
32684 this.advertiseField = value;
32685 }
32686 }
32687
32688 /// <summary>
32689 /// Threading model for the CLSID.
32690 /// </summary>
32691 public ThreadingModelType ThreadingModel
32692 {
32693 get
32694 {
32695 return this.threadingModelField;
32696 }
32697 set
32698 {
32699 this.threadingModelFieldSet = true;
32700 this.threadingModelField = value;
32701 }
32702 }
32703
32704 /// <summary>
32705 /// Version for the CLSID.
32706 /// </summary>
32707 public string Version
32708 {
32709 get
32710 {
32711 return this.versionField;
32712 }
32713 set
32714 {
32715 this.versionFieldSet = true;
32716 this.versionField = value;
32717 }
32718 }
32719
32720 /// <summary>
32721 /// Specifies the CLSID may be insertable.
32722 /// </summary>
32723 public YesNoType Insertable
32724 {
32725 get
32726 {
32727 return this.insertableField;
32728 }
32729 set
32730 {
32731 this.insertableFieldSet = true;
32732 this.insertableField = value;
32733 }
32734 }
32735
32736 /// <summary>
32737 /// Specifies the CLSID may be programmable.
32738 /// </summary>
32739 public YesNoType Programmable
32740 {
32741 get
32742 {
32743 return this.programmableField;
32744 }
32745 set
32746 {
32747 this.programmableFieldSet = true;
32748 this.programmableField = value;
32749 }
32750 }
32751
32752 /// <summary>
32753 /// May only be specified if the value of the Advertise attribute is "no" and Server has not been specified. In addition, it may only
32754 /// be used when the Class element is directly under the Component element. The value can be
32755 /// that of an registry type (REG_SZ). This attribute should be used to specify foreign servers, such as mscoree.dll if needed.
32756 /// </summary>
32757 public string ForeignServer
32758 {
32759 get
32760 {
32761 return this.foreignServerField;
32762 }
32763 set
32764 {
32765 this.foreignServerFieldSet = true;
32766 this.foreignServerField = value;
32767 }
32768 }
32769
32770 /// <summary>
32771 /// May only be specified if the value of the Advertise attribute is "no" and the ForeignServer attribute is not specified. File Id of the
32772 /// COM server file. If this element is nested under a File element, this value defaults to
32773 /// the value of the parent File/@Id.
32774 /// </summary>
32775 public string Server
32776 {
32777 get
32778 {
32779 return this.serverField;
32780 }
32781 set
32782 {
32783 this.serverFieldSet = true;
32784 this.serverField = value;
32785 }
32786 }
32787
32788 /// <summary>
32789 /// 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.
32790 /// </summary>
32791 public YesNoType ShortPath
32792 {
32793 get
32794 {
32795 return this.shortPathField;
32796 }
32797 set
32798 {
32799 this.shortPathFieldSet = true;
32800 this.shortPathField = value;
32801 }
32802 }
32803
32804 /// <summary>
32805 /// May only be specified if the value of the Advertise attribute is "no".
32806 /// </summary>
32807 public YesNoType SafeForScripting
32808 {
32809 get
32810 {
32811 return this.safeForScriptingField;
32812 }
32813 set
32814 {
32815 this.safeForScriptingFieldSet = true;
32816 this.safeForScriptingField = value;
32817 }
32818 }
32819
32820 /// <summary>
32821 /// May only be specified if the value of the Advertise attribute is "no".
32822 /// </summary>
32823 public YesNoType SafeForInitializing
32824 {
32825 get
32826 {
32827 return this.safeForInitializingField;
32828 }
32829 set
32830 {
32831 this.safeForInitializingFieldSet = true;
32832 this.safeForInitializingField = value;
32833 }
32834 }
32835
32836 /// <summary>
32837 /// Set this attribute's value to 'yes' to identify an object as an ActiveX Control. The default value is 'no'.
32838 /// </summary>
32839 public YesNoType Control
32840 {
32841 get
32842 {
32843 return this.controlField;
32844 }
32845 set
32846 {
32847 this.controlFieldSet = true;
32848 this.controlField = value;
32849 }
32850 }
32851
32852 public virtual ISchemaElement ParentElement
32853 {
32854 get
32855 {
32856 return this.parentElement;
32857 }
32858 set
32859 {
32860 this.parentElement = value;
32861 }
32862 }
32863
32864 public virtual void AddChild(ISchemaElement child)
32865 {
32866 if ((null == child))
32867 {
32868 throw new ArgumentNullException("child");
32869 }
32870 this.children.AddElement(child);
32871 child.ParentElement = this;
32872 }
32873
32874 public virtual void RemoveChild(ISchemaElement child)
32875 {
32876 if ((null == child))
32877 {
32878 throw new ArgumentNullException("child");
32879 }
32880 this.children.RemoveElement(child);
32881 child.ParentElement = null;
32882 }
32883
32884 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
32885 ISchemaElement ICreateChildren.CreateChild(string childName)
32886 {
32887 if (String.IsNullOrEmpty(childName))
32888 {
32889 throw new ArgumentNullException("childName");
32890 }
32891 ISchemaElement childValue = null;
32892 if (("ProgId" == childName))
32893 {
32894 childValue = new ProgId();
32895 }
32896 if (("FileTypeMask" == childName))
32897 {
32898 childValue = new FileTypeMask();
32899 }
32900 if (("Interface" == childName))
32901 {
32902 childValue = new Interface();
32903 }
32904 if ((null == childValue))
32905 {
32906 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
32907 }
32908 return childValue;
32909 }
32910
32911 /// <summary>
32912 /// Tries to parse a ContextType from a string.
32913 /// </summary>
32914 public static bool TryParseContextType(string value, out ContextType parsedValue)
32915 {
32916 parsedValue = ContextType.None;
32917 if (string.IsNullOrEmpty(value))
32918 {
32919 return false;
32920 }
32921 string[] splitValue = value.Split(" \t\r\n".ToCharArray(), System.StringSplitOptions.RemoveEmptyEntries);
32922 for (System.Collections.IEnumerator enumerator = splitValue.GetEnumerator(); enumerator.MoveNext();
32923 )
32924 {
32925 string currentValue = ((string)(enumerator.Current));
32926 if (("LocalServer" == currentValue))
32927 {
32928 parsedValue = (parsedValue | ContextType.LocalServer);
32929 }
32930 else
32931 {
32932 if (("LocalServer32" == currentValue))
32933 {
32934 parsedValue = (parsedValue | ContextType.LocalServer32);
32935 }
32936 else
32937 {
32938 if (("InprocServer" == currentValue))
32939 {
32940 parsedValue = (parsedValue | ContextType.InprocServer);
32941 }
32942 else
32943 {
32944 if (("InprocServer32" == currentValue))
32945 {
32946 parsedValue = (parsedValue | ContextType.InprocServer32);
32947 }
32948 else
32949 {
32950 parsedValue = ContextType.None;
32951 return false;
32952 }
32953 }
32954 }
32955 }
32956 }
32957 return true;
32958 }
32959
32960 /// <summary>
32961 /// Parses a ThreadingModelType from a string.
32962 /// </summary>
32963 public static ThreadingModelType ParseThreadingModelType(string value)
32964 {
32965 ThreadingModelType parsedValue;
32966 Class.TryParseThreadingModelType(value, out parsedValue);
32967 return parsedValue;
32968 }
32969
32970 /// <summary>
32971 /// Tries to parse a ThreadingModelType from a string.
32972 /// </summary>
32973 public static bool TryParseThreadingModelType(string value, out ThreadingModelType parsedValue)
32974 {
32975 parsedValue = ThreadingModelType.NotSet;
32976 if (string.IsNullOrEmpty(value))
32977 {
32978 return false;
32979 }
32980 if (("apartment" == value))
32981 {
32982 parsedValue = ThreadingModelType.apartment;
32983 }
32984 else
32985 {
32986 if (("free" == value))
32987 {
32988 parsedValue = ThreadingModelType.free;
32989 }
32990 else
32991 {
32992 if (("both" == value))
32993 {
32994 parsedValue = ThreadingModelType.both;
32995 }
32996 else
32997 {
32998 if (("neutral" == value))
32999 {
33000 parsedValue = ThreadingModelType.neutral;
33001 }
33002 else
33003 {
33004 if (("single" == value))
33005 {
33006 parsedValue = ThreadingModelType.single;
33007 }
33008 else
33009 {
33010 if (("rental" == value))
33011 {
33012 parsedValue = ThreadingModelType.rental;
33013 }
33014 else
33015 {
33016 parsedValue = ThreadingModelType.IllegalValue;
33017 return false;
33018 }
33019 }
33020 }
33021 }
33022 }
33023 }
33024 return true;
33025 }
33026
33027 /// <summary>
33028 /// Processes this element and all child elements into an XmlWriter.
33029 /// </summary>
33030 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
33031 public virtual void OutputXml(XmlWriter writer)
33032 {
33033 if ((null == writer))
33034 {
33035 throw new ArgumentNullException("writer");
33036 }
33037 writer.WriteStartElement("Class", "http://wixtoolset.org/schemas/v4/wxs");
33038 if (this.idFieldSet)
33039 {
33040 writer.WriteAttributeString("Id", this.idField);
33041 }
33042 if (this.contextFieldSet)
33043 {
33044 string outputValue = "";
33045 if (((this.contextField & ContextType.LocalServer)
33046 != 0))
33047 {
33048 if ((outputValue.Length != 0))
33049 {
33050 outputValue = (outputValue + " ");
33051 }
33052 outputValue = (outputValue + "LocalServer");
33053 }
33054 if (((this.contextField & ContextType.LocalServer32)
33055 != 0))
33056 {
33057 if ((outputValue.Length != 0))
33058 {
33059 outputValue = (outputValue + " ");
33060 }
33061 outputValue = (outputValue + "LocalServer32");
33062 }
33063 if (((this.contextField & ContextType.InprocServer)
33064 != 0))
33065 {
33066 if ((outputValue.Length != 0))
33067 {
33068 outputValue = (outputValue + " ");
33069 }
33070 outputValue = (outputValue + "InprocServer");
33071 }
33072 if (((this.contextField & ContextType.InprocServer32)
33073 != 0))
33074 {
33075 if ((outputValue.Length != 0))
33076 {
33077 outputValue = (outputValue + " ");
33078 }
33079 outputValue = (outputValue + "InprocServer32");
33080 }
33081 writer.WriteAttributeString("Context", outputValue);
33082 }
33083 if (this.descriptionFieldSet)
33084 {
33085 writer.WriteAttributeString("Description", this.descriptionField);
33086 }
33087 if (this.appIdFieldSet)
33088 {
33089 writer.WriteAttributeString("AppId", this.appIdField);
33090 }
33091 if (this.iconFieldSet)
33092 {
33093 writer.WriteAttributeString("Icon", this.iconField);
33094 }
33095 if (this.iconIndexFieldSet)
33096 {
33097 writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture));
33098 }
33099 if (this.handlerFieldSet)
33100 {
33101 writer.WriteAttributeString("Handler", this.handlerField);
33102 }
33103 if (this.argumentFieldSet)
33104 {
33105 writer.WriteAttributeString("Argument", this.argumentField);
33106 }
33107 if (this.relativePathFieldSet)
33108 {
33109 if ((this.relativePathField == YesNoType.no))
33110 {
33111 writer.WriteAttributeString("RelativePath", "no");
33112 }
33113 if ((this.relativePathField == YesNoType.yes))
33114 {
33115 writer.WriteAttributeString("RelativePath", "yes");
33116 }
33117 }
33118 if (this.advertiseFieldSet)
33119 {
33120 if ((this.advertiseField == YesNoType.no))
33121 {
33122 writer.WriteAttributeString("Advertise", "no");
33123 }
33124 if ((this.advertiseField == YesNoType.yes))
33125 {
33126 writer.WriteAttributeString("Advertise", "yes");
33127 }
33128 }
33129 if (this.threadingModelFieldSet)
33130 {
33131 if ((this.threadingModelField == ThreadingModelType.apartment))
33132 {
33133 writer.WriteAttributeString("ThreadingModel", "apartment");
33134 }
33135 if ((this.threadingModelField == ThreadingModelType.free))
33136 {
33137 writer.WriteAttributeString("ThreadingModel", "free");
33138 }
33139 if ((this.threadingModelField == ThreadingModelType.both))
33140 {
33141 writer.WriteAttributeString("ThreadingModel", "both");
33142 }
33143 if ((this.threadingModelField == ThreadingModelType.neutral))
33144 {
33145 writer.WriteAttributeString("ThreadingModel", "neutral");
33146 }
33147 if ((this.threadingModelField == ThreadingModelType.single))
33148 {
33149 writer.WriteAttributeString("ThreadingModel", "single");
33150 }
33151 if ((this.threadingModelField == ThreadingModelType.rental))
33152 {
33153 writer.WriteAttributeString("ThreadingModel", "rental");
33154 }
33155 }
33156 if (this.versionFieldSet)
33157 {
33158 writer.WriteAttributeString("Version", this.versionField);
33159 }
33160 if (this.insertableFieldSet)
33161 {
33162 if ((this.insertableField == YesNoType.no))
33163 {
33164 writer.WriteAttributeString("Insertable", "no");
33165 }
33166 if ((this.insertableField == YesNoType.yes))
33167 {
33168 writer.WriteAttributeString("Insertable", "yes");
33169 }
33170 }
33171 if (this.programmableFieldSet)
33172 {
33173 if ((this.programmableField == YesNoType.no))
33174 {
33175 writer.WriteAttributeString("Programmable", "no");
33176 }
33177 if ((this.programmableField == YesNoType.yes))
33178 {
33179 writer.WriteAttributeString("Programmable", "yes");
33180 }
33181 }
33182 if (this.foreignServerFieldSet)
33183 {
33184 writer.WriteAttributeString("ForeignServer", this.foreignServerField);
33185 }
33186 if (this.serverFieldSet)
33187 {
33188 writer.WriteAttributeString("Server", this.serverField);
33189 }
33190 if (this.shortPathFieldSet)
33191 {
33192 if ((this.shortPathField == YesNoType.no))
33193 {
33194 writer.WriteAttributeString("ShortPath", "no");
33195 }
33196 if ((this.shortPathField == YesNoType.yes))
33197 {
33198 writer.WriteAttributeString("ShortPath", "yes");
33199 }
33200 }
33201 if (this.safeForScriptingFieldSet)
33202 {
33203 if ((this.safeForScriptingField == YesNoType.no))
33204 {
33205 writer.WriteAttributeString("SafeForScripting", "no");
33206 }
33207 if ((this.safeForScriptingField == YesNoType.yes))
33208 {
33209 writer.WriteAttributeString("SafeForScripting", "yes");
33210 }
33211 }
33212 if (this.safeForInitializingFieldSet)
33213 {
33214 if ((this.safeForInitializingField == YesNoType.no))
33215 {
33216 writer.WriteAttributeString("SafeForInitializing", "no");
33217 }
33218 if ((this.safeForInitializingField == YesNoType.yes))
33219 {
33220 writer.WriteAttributeString("SafeForInitializing", "yes");
33221 }
33222 }
33223 if (this.controlFieldSet)
33224 {
33225 if ((this.controlField == YesNoType.no))
33226 {
33227 writer.WriteAttributeString("Control", "no");
33228 }
33229 if ((this.controlField == YesNoType.yes))
33230 {
33231 writer.WriteAttributeString("Control", "yes");
33232 }
33233 }
33234 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
33235 {
33236 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
33237 childElement.OutputXml(writer);
33238 }
33239 writer.WriteEndElement();
33240 }
33241
33242 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
33243 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
33244 void ISetAttributes.SetAttribute(string name, string value)
33245 {
33246 if (String.IsNullOrEmpty(name))
33247 {
33248 throw new ArgumentNullException("name");
33249 }
33250 if (("Id" == name))
33251 {
33252 this.idField = value;
33253 this.idFieldSet = true;
33254 }
33255 if (("Context" == name))
33256 {
33257 Class.TryParseContextType(value, out this.contextField);
33258 this.contextFieldSet = true;
33259 }
33260 if (("Description" == name))
33261 {
33262 this.descriptionField = value;
33263 this.descriptionFieldSet = true;
33264 }
33265 if (("AppId" == name))
33266 {
33267 this.appIdField = value;
33268 this.appIdFieldSet = true;
33269 }
33270 if (("Icon" == name))
33271 {
33272 this.iconField = value;
33273 this.iconFieldSet = true;
33274 }
33275 if (("IconIndex" == name))
33276 {
33277 this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
33278 this.iconIndexFieldSet = true;
33279 }
33280 if (("Handler" == name))
33281 {
33282 this.handlerField = value;
33283 this.handlerFieldSet = true;
33284 }
33285 if (("Argument" == name))
33286 {
33287 this.argumentField = value;
33288 this.argumentFieldSet = true;
33289 }
33290 if (("RelativePath" == name))
33291 {
33292 this.relativePathField = Enums.ParseYesNoType(value);
33293 this.relativePathFieldSet = true;
33294 }
33295 if (("Advertise" == name))
33296 {
33297 this.advertiseField = Enums.ParseYesNoType(value);
33298 this.advertiseFieldSet = true;
33299 }
33300 if (("ThreadingModel" == name))
33301 {
33302 this.threadingModelField = Class.ParseThreadingModelType(value);
33303 this.threadingModelFieldSet = true;
33304 }
33305 if (("Version" == name))
33306 {
33307 this.versionField = value;
33308 this.versionFieldSet = true;
33309 }
33310 if (("Insertable" == name))
33311 {
33312 this.insertableField = Enums.ParseYesNoType(value);
33313 this.insertableFieldSet = true;
33314 }
33315 if (("Programmable" == name))
33316 {
33317 this.programmableField = Enums.ParseYesNoType(value);
33318 this.programmableFieldSet = true;
33319 }
33320 if (("ForeignServer" == name))
33321 {
33322 this.foreignServerField = value;
33323 this.foreignServerFieldSet = true;
33324 }
33325 if (("Server" == name))
33326 {
33327 this.serverField = value;
33328 this.serverFieldSet = true;
33329 }
33330 if (("ShortPath" == name))
33331 {
33332 this.shortPathField = Enums.ParseYesNoType(value);
33333 this.shortPathFieldSet = true;
33334 }
33335 if (("SafeForScripting" == name))
33336 {
33337 this.safeForScriptingField = Enums.ParseYesNoType(value);
33338 this.safeForScriptingFieldSet = true;
33339 }
33340 if (("SafeForInitializing" == name))
33341 {
33342 this.safeForInitializingField = Enums.ParseYesNoType(value);
33343 this.safeForInitializingFieldSet = true;
33344 }
33345 if (("Control" == name))
33346 {
33347 this.controlField = Enums.ParseYesNoType(value);
33348 this.controlFieldSet = true;
33349 }
33350 }
33351
33352 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33353 [Flags()]
33354 public enum ContextType
33355 {
33356
33357 None = 0,
33358
33359 /// <summary>
33360 /// A 16-bit local server application.
33361 /// </summary>
33362 LocalServer = 1,
33363
33364 /// <summary>
33365 /// A 32-bit local server application.
33366 /// </summary>
33367 LocalServer32 = 2,
33368
33369 /// <summary>
33370 /// A 16-bit in-process server DLL.
33371 /// </summary>
33372 InprocServer = 4,
33373
33374 /// <summary>
33375 /// A 32-bit in-process server DLL.
33376 /// </summary>
33377 InprocServer32 = 8,
33378 }
33379
33380 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33381 public enum ThreadingModelType
33382 {
33383
33384 IllegalValue = int.MaxValue,
33385
33386 NotSet = -1,
33387
33388 apartment,
33389
33390 free,
33391
33392 both,
33393
33394 neutral,
33395
33396 single,
33397
33398 rental,
33399 }
33400 }
33401
33402 /// <summary>
33403 /// COM Interface registration for parent TypeLib.
33404 /// </summary>
33405 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33406 public class Interface : ISchemaElement, ISetAttributes
33407 {
33408
33409 private string idField;
33410
33411 private bool idFieldSet;
33412
33413 private string nameField;
33414
33415 private bool nameFieldSet;
33416
33417 private string baseInterfaceField;
33418
33419 private bool baseInterfaceFieldSet;
33420
33421 private string proxyStubClassIdField;
33422
33423 private bool proxyStubClassIdFieldSet;
33424
33425 private string proxyStubClassId32Field;
33426
33427 private bool proxyStubClassId32FieldSet;
33428
33429 private int numMethodsField;
33430
33431 private bool numMethodsFieldSet;
33432
33433 private YesNoType versionedField;
33434
33435 private bool versionedFieldSet;
33436
33437 private ISchemaElement parentElement;
33438
33439 /// <summary>
33440 /// GUID identifier for COM Interface.
33441 /// </summary>
33442 public string Id
33443 {
33444 get
33445 {
33446 return this.idField;
33447 }
33448 set
33449 {
33450 this.idFieldSet = true;
33451 this.idField = value;
33452 }
33453 }
33454
33455 /// <summary>
33456 /// Name for COM Interface.
33457 /// </summary>
33458 public string Name
33459 {
33460 get
33461 {
33462 return this.nameField;
33463 }
33464 set
33465 {
33466 this.nameFieldSet = true;
33467 this.nameField = value;
33468 }
33469 }
33470
33471 /// <summary>
33472 /// Identifies the interface from which the current interface is derived.
33473 /// </summary>
33474 public string BaseInterface
33475 {
33476 get
33477 {
33478 return this.baseInterfaceField;
33479 }
33480 set
33481 {
33482 this.baseInterfaceFieldSet = true;
33483 this.baseInterfaceField = value;
33484 }
33485 }
33486
33487 /// <summary>
33488 /// GUID CLSID for proxy stub to COM Interface.
33489 /// </summary>
33490 public string ProxyStubClassId
33491 {
33492 get
33493 {
33494 return this.proxyStubClassIdField;
33495 }
33496 set
33497 {
33498 this.proxyStubClassIdFieldSet = true;
33499 this.proxyStubClassIdField = value;
33500 }
33501 }
33502
33503 /// <summary>
33504 /// GUID CLSID for 32-bit proxy stub to COM Interface.
33505 /// </summary>
33506 public string ProxyStubClassId32
33507 {
33508 get
33509 {
33510 return this.proxyStubClassId32Field;
33511 }
33512 set
33513 {
33514 this.proxyStubClassId32FieldSet = true;
33515 this.proxyStubClassId32Field = value;
33516 }
33517 }
33518
33519 /// <summary>
33520 /// Number of methods implemented on COM Interface.
33521 /// </summary>
33522 public int NumMethods
33523 {
33524 get
33525 {
33526 return this.numMethodsField;
33527 }
33528 set
33529 {
33530 this.numMethodsFieldSet = true;
33531 this.numMethodsField = value;
33532 }
33533 }
33534
33535 /// <summary>
33536 /// Determines whether a Typelib version entry should be created with the other COM Interface registry keys. Default is 'yes'.
33537 /// </summary>
33538 public YesNoType Versioned
33539 {
33540 get
33541 {
33542 return this.versionedField;
33543 }
33544 set
33545 {
33546 this.versionedFieldSet = true;
33547 this.versionedField = value;
33548 }
33549 }
33550
33551 public virtual ISchemaElement ParentElement
33552 {
33553 get
33554 {
33555 return this.parentElement;
33556 }
33557 set
33558 {
33559 this.parentElement = value;
33560 }
33561 }
33562
33563 /// <summary>
33564 /// Processes this element and all child elements into an XmlWriter.
33565 /// </summary>
33566 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
33567 public virtual void OutputXml(XmlWriter writer)
33568 {
33569 if ((null == writer))
33570 {
33571 throw new ArgumentNullException("writer");
33572 }
33573 writer.WriteStartElement("Interface", "http://wixtoolset.org/schemas/v4/wxs");
33574 if (this.idFieldSet)
33575 {
33576 writer.WriteAttributeString("Id", this.idField);
33577 }
33578 if (this.nameFieldSet)
33579 {
33580 writer.WriteAttributeString("Name", this.nameField);
33581 }
33582 if (this.baseInterfaceFieldSet)
33583 {
33584 writer.WriteAttributeString("BaseInterface", this.baseInterfaceField);
33585 }
33586 if (this.proxyStubClassIdFieldSet)
33587 {
33588 writer.WriteAttributeString("ProxyStubClassId", this.proxyStubClassIdField);
33589 }
33590 if (this.proxyStubClassId32FieldSet)
33591 {
33592 writer.WriteAttributeString("ProxyStubClassId32", this.proxyStubClassId32Field);
33593 }
33594 if (this.numMethodsFieldSet)
33595 {
33596 writer.WriteAttributeString("NumMethods", this.numMethodsField.ToString(CultureInfo.InvariantCulture));
33597 }
33598 if (this.versionedFieldSet)
33599 {
33600 if ((this.versionedField == YesNoType.no))
33601 {
33602 writer.WriteAttributeString("Versioned", "no");
33603 }
33604 if ((this.versionedField == YesNoType.yes))
33605 {
33606 writer.WriteAttributeString("Versioned", "yes");
33607 }
33608 }
33609 writer.WriteEndElement();
33610 }
33611
33612 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
33613 void ISetAttributes.SetAttribute(string name, string value)
33614 {
33615 if (String.IsNullOrEmpty(name))
33616 {
33617 throw new ArgumentNullException("name");
33618 }
33619 if (("Id" == name))
33620 {
33621 this.idField = value;
33622 this.idFieldSet = true;
33623 }
33624 if (("Name" == name))
33625 {
33626 this.nameField = value;
33627 this.nameFieldSet = true;
33628 }
33629 if (("BaseInterface" == name))
33630 {
33631 this.baseInterfaceField = value;
33632 this.baseInterfaceFieldSet = true;
33633 }
33634 if (("ProxyStubClassId" == name))
33635 {
33636 this.proxyStubClassIdField = value;
33637 this.proxyStubClassIdFieldSet = true;
33638 }
33639 if (("ProxyStubClassId32" == name))
33640 {
33641 this.proxyStubClassId32Field = value;
33642 this.proxyStubClassId32FieldSet = true;
33643 }
33644 if (("NumMethods" == name))
33645 {
33646 this.numMethodsField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
33647 this.numMethodsFieldSet = true;
33648 }
33649 if (("Versioned" == name))
33650 {
33651 this.versionedField = Enums.ParseYesNoType(value);
33652 this.versionedFieldSet = true;
33653 }
33654 }
33655 }
33656
33657 /// <summary>
33658 /// FileType data for class Id registration.
33659 /// </summary>
33660 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33661 public class FileTypeMask : ISchemaElement, ISetAttributes
33662 {
33663
33664 private int offsetField;
33665
33666 private bool offsetFieldSet;
33667
33668 private string maskField;
33669
33670 private bool maskFieldSet;
33671
33672 private string valueField;
33673
33674 private bool valueFieldSet;
33675
33676 private ISchemaElement parentElement;
33677
33678 /// <summary>
33679 /// Offset into file. If positive, offset is from the beginning; if negative, offset is from the end.
33680 /// </summary>
33681 public int Offset
33682 {
33683 get
33684 {
33685 return this.offsetField;
33686 }
33687 set
33688 {
33689 this.offsetFieldSet = true;
33690 this.offsetField = value;
33691 }
33692 }
33693
33694 /// <summary>
33695 /// Hex value that is AND'd against the bytes in the file at Offset.
33696 /// </summary>
33697 public string Mask
33698 {
33699 get
33700 {
33701 return this.maskField;
33702 }
33703 set
33704 {
33705 this.maskFieldSet = true;
33706 this.maskField = value;
33707 }
33708 }
33709
33710 /// <summary>
33711 /// 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.
33712 /// </summary>
33713 public string Value
33714 {
33715 get
33716 {
33717 return this.valueField;
33718 }
33719 set
33720 {
33721 this.valueFieldSet = true;
33722 this.valueField = value;
33723 }
33724 }
33725
33726 public virtual ISchemaElement ParentElement
33727 {
33728 get
33729 {
33730 return this.parentElement;
33731 }
33732 set
33733 {
33734 this.parentElement = value;
33735 }
33736 }
33737
33738 /// <summary>
33739 /// Processes this element and all child elements into an XmlWriter.
33740 /// </summary>
33741 public virtual void OutputXml(XmlWriter writer)
33742 {
33743 if ((null == writer))
33744 {
33745 throw new ArgumentNullException("writer");
33746 }
33747 writer.WriteStartElement("FileTypeMask", "http://wixtoolset.org/schemas/v4/wxs");
33748 if (this.offsetFieldSet)
33749 {
33750 writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture));
33751 }
33752 if (this.maskFieldSet)
33753 {
33754 writer.WriteAttributeString("Mask", this.maskField);
33755 }
33756 if (this.valueFieldSet)
33757 {
33758 writer.WriteAttributeString("Value", this.valueField);
33759 }
33760 writer.WriteEndElement();
33761 }
33762
33763 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
33764 void ISetAttributes.SetAttribute(string name, string value)
33765 {
33766 if (String.IsNullOrEmpty(name))
33767 {
33768 throw new ArgumentNullException("name");
33769 }
33770 if (("Offset" == name))
33771 {
33772 this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
33773 this.offsetFieldSet = true;
33774 }
33775 if (("Mask" == name))
33776 {
33777 this.maskField = value;
33778 this.maskFieldSet = true;
33779 }
33780 if (("Value" == name))
33781 {
33782 this.valueField = value;
33783 this.valueFieldSet = true;
33784 }
33785 }
33786 }
33787
33788 /// <summary>
33789 /// Service or group of services that must start before the parent service.
33790 /// </summary>
33791 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33792 public class ServiceDependency : ISchemaElement, ISetAttributes
33793 {
33794
33795 private string idField;
33796
33797 private bool idFieldSet;
33798
33799 private YesNoType groupField;
33800
33801 private bool groupFieldSet;
33802
33803 private ISchemaElement parentElement;
33804
33805 /// <summary>
33806 /// The value of this attribute should be one of the following:
33807 /// </summary>
33808 public string Id
33809 {
33810 get
33811 {
33812 return this.idField;
33813 }
33814 set
33815 {
33816 this.idFieldSet = true;
33817 this.idField = value;
33818 }
33819 }
33820
33821 /// <summary>
33822 /// Set to 'yes' to indicate that the value in the Id attribute is the name of a group of services.
33823 /// </summary>
33824 public YesNoType Group
33825 {
33826 get
33827 {
33828 return this.groupField;
33829 }
33830 set
33831 {
33832 this.groupFieldSet = true;
33833 this.groupField = value;
33834 }
33835 }
33836
33837 public virtual ISchemaElement ParentElement
33838 {
33839 get
33840 {
33841 return this.parentElement;
33842 }
33843 set
33844 {
33845 this.parentElement = value;
33846 }
33847 }
33848
33849 /// <summary>
33850 /// Processes this element and all child elements into an XmlWriter.
33851 /// </summary>
33852 public virtual void OutputXml(XmlWriter writer)
33853 {
33854 if ((null == writer))
33855 {
33856 throw new ArgumentNullException("writer");
33857 }
33858 writer.WriteStartElement("ServiceDependency", "http://wixtoolset.org/schemas/v4/wxs");
33859 if (this.idFieldSet)
33860 {
33861 writer.WriteAttributeString("Id", this.idField);
33862 }
33863 if (this.groupFieldSet)
33864 {
33865 if ((this.groupField == YesNoType.no))
33866 {
33867 writer.WriteAttributeString("Group", "no");
33868 }
33869 if ((this.groupField == YesNoType.yes))
33870 {
33871 writer.WriteAttributeString("Group", "yes");
33872 }
33873 }
33874 writer.WriteEndElement();
33875 }
33876
33877 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
33878 void ISetAttributes.SetAttribute(string name, string value)
33879 {
33880 if (String.IsNullOrEmpty(name))
33881 {
33882 throw new ArgumentNullException("name");
33883 }
33884 if (("Id" == name))
33885 {
33886 this.idField = value;
33887 this.idFieldSet = true;
33888 }
33889 if (("Group" == name))
33890 {
33891 this.groupField = Enums.ParseYesNoType(value);
33892 this.groupFieldSet = true;
33893 }
33894 }
33895 }
33896
33897 /// <summary>
33898 /// Adds services for parent Component. Use the ServiceControl element to remove services.
33899 /// </summary>
33900 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
33901 public class ServiceInstall : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
33902 {
33903
33904 private ElementCollection children;
33905
33906 private string idField;
33907
33908 private bool idFieldSet;
33909
33910 private string nameField;
33911
33912 private bool nameFieldSet;
33913
33914 private string displayNameField;
33915
33916 private bool displayNameFieldSet;
33917
33918 private TypeType typeField;
33919
33920 private bool typeFieldSet;
33921
33922 private YesNoType interactiveField;
33923
33924 private bool interactiveFieldSet;
33925
33926 private StartType startField;
33927
33928 private bool startFieldSet;
33929
33930 private ErrorControlType errorControlField;
33931
33932 private bool errorControlFieldSet;
33933
33934 private YesNoType vitalField;
33935
33936 private bool vitalFieldSet;
33937
33938 private string loadOrderGroupField;
33939
33940 private bool loadOrderGroupFieldSet;
33941
33942 private string accountField;
33943
33944 private bool accountFieldSet;
33945
33946 private string passwordField;
33947
33948 private bool passwordFieldSet;
33949
33950 private string argumentsField;
33951
33952 private bool argumentsFieldSet;
33953
33954 private string descriptionField;
33955
33956 private bool descriptionFieldSet;
33957
33958 private YesNoType eraseDescriptionField;
33959
33960 private bool eraseDescriptionFieldSet;
33961
33962 private ISchemaElement parentElement;
33963
33964 public ServiceInstall()
33965 {
33966 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
33967 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx)));
33968 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceDependency)));
33969 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfig)));
33970 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfigFailureActions)));
33971 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
33972 this.children = childCollection0;
33973 }
33974
33975 public virtual IEnumerable Children
33976 {
33977 get
33978 {
33979 return this.children;
33980 }
33981 }
33982
33983 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
33984 public virtual IEnumerable this[System.Type childType]
33985 {
33986 get
33987 {
33988 return this.children.Filter(childType);
33989 }
33990 }
33991
33992 /// <summary>
33993 /// Unique identifier for this service configuration. This value will default to the Name attribute if not
33994 /// specified.
33995 /// </summary>
33996 public string Id
33997 {
33998 get
33999 {
34000 return this.idField;
34001 }
34002 set
34003 {
34004 this.idFieldSet = true;
34005 this.idField = value;
34006 }
34007 }
34008
34009 /// <summary>
34010 /// This column is the string that gives the service name to install.
34011 /// </summary>
34012 public string Name
34013 {
34014 get
34015 {
34016 return this.nameField;
34017 }
34018 set
34019 {
34020 this.nameFieldSet = true;
34021 this.nameField = value;
34022 }
34023 }
34024
34025 /// <summary>
34026 /// This column is the localizable string that user interface programs use to identify the service.
34027 /// </summary>
34028 public string DisplayName
34029 {
34030 get
34031 {
34032 return this.displayNameField;
34033 }
34034 set
34035 {
34036 this.displayNameFieldSet = true;
34037 this.displayNameField = value;
34038 }
34039 }
34040
34041 /// <summary>
34042 /// The Windows Installer does not currently support kernelDriver or systemDriver.
34043 /// </summary>
34044 public TypeType Type
34045 {
34046 get
34047 {
34048 return this.typeField;
34049 }
34050 set
34051 {
34052 this.typeFieldSet = true;
34053 this.typeField = value;
34054 }
34055 }
34056
34057 /// <summary>
34058 /// Whether or not the service interacts with the desktop.
34059 /// </summary>
34060 public YesNoType Interactive
34061 {
34062 get
34063 {
34064 return this.interactiveField;
34065 }
34066 set
34067 {
34068 this.interactiveFieldSet = true;
34069 this.interactiveField = value;
34070 }
34071 }
34072
34073 /// <summary>
34074 /// Determines when the service should be started. The Windows Installer does not support boot or system.
34075 /// </summary>
34076 public StartType Start
34077 {
34078 get
34079 {
34080 return this.startField;
34081 }
34082 set
34083 {
34084 this.startFieldSet = true;
34085 this.startField = value;
34086 }
34087 }
34088
34089 /// <summary>
34090 /// Determines what action should be taken on an error.
34091 /// </summary>
34092 public ErrorControlType ErrorControl
34093 {
34094 get
34095 {
34096 return this.errorControlField;
34097 }
34098 set
34099 {
34100 this.errorControlFieldSet = true;
34101 this.errorControlField = value;
34102 }
34103 }
34104
34105 /// <summary>
34106 /// The overall install should fail if this service fails to install.
34107 /// </summary>
34108 public YesNoType Vital
34109 {
34110 get
34111 {
34112 return this.vitalField;
34113 }
34114 set
34115 {
34116 this.vitalFieldSet = true;
34117 this.vitalField = value;
34118 }
34119 }
34120
34121 /// <summary>
34122 /// The load ordering group that this service should be a part of.
34123 /// </summary>
34124 public string LoadOrderGroup
34125 {
34126 get
34127 {
34128 return this.loadOrderGroupField;
34129 }
34130 set
34131 {
34132 this.loadOrderGroupFieldSet = true;
34133 this.loadOrderGroupField = value;
34134 }
34135 }
34136
34137 /// <summary>
34138 /// Fully qualified names must be used even for local accounts, e.g.: ".\LOCAL_ACCOUNT". Valid only when ServiceType is ownProcess.
34139 /// </summary>
34140 public string Account
34141 {
34142 get
34143 {
34144 return this.accountField;
34145 }
34146 set
34147 {
34148 this.accountFieldSet = true;
34149 this.accountField = value;
34150 }
34151 }
34152
34153 /// <summary>
34154 /// The password for the account. Valid only when the account has a password.
34155 /// </summary>
34156 public string Password
34157 {
34158 get
34159 {
34160 return this.passwordField;
34161 }
34162 set
34163 {
34164 this.passwordFieldSet = true;
34165 this.passwordField = value;
34166 }
34167 }
34168
34169 /// <summary>
34170 /// Contains any command line arguments or properties required to run the service.
34171 /// </summary>
34172 public string Arguments
34173 {
34174 get
34175 {
34176 return this.argumentsField;
34177 }
34178 set
34179 {
34180 this.argumentsFieldSet = true;
34181 this.argumentsField = value;
34182 }
34183 }
34184
34185 /// <summary>
34186 /// Sets the description of the service.
34187 /// </summary>
34188 public string Description
34189 {
34190 get
34191 {
34192 return this.descriptionField;
34193 }
34194 set
34195 {
34196 this.descriptionFieldSet = true;
34197 this.descriptionField = value;
34198 }
34199 }
34200
34201 /// <summary>
34202 /// Determines whether the existing service description will be ignored. If 'yes', the service description will be null, even if the Description attribute is set.
34203 /// </summary>
34204 public YesNoType EraseDescription
34205 {
34206 get
34207 {
34208 return this.eraseDescriptionField;
34209 }
34210 set
34211 {
34212 this.eraseDescriptionFieldSet = true;
34213 this.eraseDescriptionField = value;
34214 }
34215 }
34216
34217 public virtual ISchemaElement ParentElement
34218 {
34219 get
34220 {
34221 return this.parentElement;
34222 }
34223 set
34224 {
34225 this.parentElement = value;
34226 }
34227 }
34228
34229 public virtual void AddChild(ISchemaElement child)
34230 {
34231 if ((null == child))
34232 {
34233 throw new ArgumentNullException("child");
34234 }
34235 this.children.AddElement(child);
34236 child.ParentElement = this;
34237 }
34238
34239 public virtual void RemoveChild(ISchemaElement child)
34240 {
34241 if ((null == child))
34242 {
34243 throw new ArgumentNullException("child");
34244 }
34245 this.children.RemoveElement(child);
34246 child.ParentElement = null;
34247 }
34248
34249 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
34250 ISchemaElement ICreateChildren.CreateChild(string childName)
34251 {
34252 if (String.IsNullOrEmpty(childName))
34253 {
34254 throw new ArgumentNullException("childName");
34255 }
34256 ISchemaElement childValue = null;
34257 if (("PermissionEx" == childName))
34258 {
34259 childValue = new PermissionEx();
34260 }
34261 if (("ServiceDependency" == childName))
34262 {
34263 childValue = new ServiceDependency();
34264 }
34265 if (("ServiceConfig" == childName))
34266 {
34267 childValue = new ServiceConfig();
34268 }
34269 if (("ServiceConfigFailureActions" == childName))
34270 {
34271 childValue = new ServiceConfigFailureActions();
34272 }
34273 if ((null == childValue))
34274 {
34275 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
34276 }
34277 return childValue;
34278 }
34279
34280 /// <summary>
34281 /// Parses a TypeType from a string.
34282 /// </summary>
34283 public static TypeType ParseTypeType(string value)
34284 {
34285 TypeType parsedValue;
34286 ServiceInstall.TryParseTypeType(value, out parsedValue);
34287 return parsedValue;
34288 }
34289
34290 /// <summary>
34291 /// Tries to parse a TypeType from a string.
34292 /// </summary>
34293 public static bool TryParseTypeType(string value, out TypeType parsedValue)
34294 {
34295 parsedValue = TypeType.NotSet;
34296 if (string.IsNullOrEmpty(value))
34297 {
34298 return false;
34299 }
34300 if (("ownProcess" == value))
34301 {
34302 parsedValue = TypeType.ownProcess;
34303 }
34304 else
34305 {
34306 if (("shareProcess" == value))
34307 {
34308 parsedValue = TypeType.shareProcess;
34309 }
34310 else
34311 {
34312 if (("kernelDriver" == value))
34313 {
34314 parsedValue = TypeType.kernelDriver;
34315 }
34316 else
34317 {
34318 if (("systemDriver" == value))
34319 {
34320 parsedValue = TypeType.systemDriver;
34321 }
34322 else
34323 {
34324 parsedValue = TypeType.IllegalValue;
34325 return false;
34326 }
34327 }
34328 }
34329 }
34330 return true;
34331 }
34332
34333 /// <summary>
34334 /// Parses a StartType from a string.
34335 /// </summary>
34336 public static StartType ParseStartType(string value)
34337 {
34338 StartType parsedValue;
34339 ServiceInstall.TryParseStartType(value, out parsedValue);
34340 return parsedValue;
34341 }
34342
34343 /// <summary>
34344 /// Tries to parse a StartType from a string.
34345 /// </summary>
34346 public static bool TryParseStartType(string value, out StartType parsedValue)
34347 {
34348 parsedValue = StartType.NotSet;
34349 if (string.IsNullOrEmpty(value))
34350 {
34351 return false;
34352 }
34353 if (("auto" == value))
34354 {
34355 parsedValue = StartType.auto;
34356 }
34357 else
34358 {
34359 if (("demand" == value))
34360 {
34361 parsedValue = StartType.demand;
34362 }
34363 else
34364 {
34365 if (("disabled" == value))
34366 {
34367 parsedValue = StartType.disabled;
34368 }
34369 else
34370 {
34371 if (("boot" == value))
34372 {
34373 parsedValue = StartType.boot;
34374 }
34375 else
34376 {
34377 if (("system" == value))
34378 {
34379 parsedValue = StartType.system;
34380 }
34381 else
34382 {
34383 parsedValue = StartType.IllegalValue;
34384 return false;
34385 }
34386 }
34387 }
34388 }
34389 }
34390 return true;
34391 }
34392
34393 /// <summary>
34394 /// Parses a ErrorControlType from a string.
34395 /// </summary>
34396 public static ErrorControlType ParseErrorControlType(string value)
34397 {
34398 ErrorControlType parsedValue;
34399 ServiceInstall.TryParseErrorControlType(value, out parsedValue);
34400 return parsedValue;
34401 }
34402
34403 /// <summary>
34404 /// Tries to parse a ErrorControlType from a string.
34405 /// </summary>
34406 public static bool TryParseErrorControlType(string value, out ErrorControlType parsedValue)
34407 {
34408 parsedValue = ErrorControlType.NotSet;
34409 if (string.IsNullOrEmpty(value))
34410 {
34411 return false;
34412 }
34413 if (("ignore" == value))
34414 {
34415 parsedValue = ErrorControlType.ignore;
34416 }
34417 else
34418 {
34419 if (("normal" == value))
34420 {
34421 parsedValue = ErrorControlType.normal;
34422 }
34423 else
34424 {
34425 if (("critical" == value))
34426 {
34427 parsedValue = ErrorControlType.critical;
34428 }
34429 else
34430 {
34431 parsedValue = ErrorControlType.IllegalValue;
34432 return false;
34433 }
34434 }
34435 }
34436 return true;
34437 }
34438
34439 /// <summary>
34440 /// Processes this element and all child elements into an XmlWriter.
34441 /// </summary>
34442 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
34443 public virtual void OutputXml(XmlWriter writer)
34444 {
34445 if ((null == writer))
34446 {
34447 throw new ArgumentNullException("writer");
34448 }
34449 writer.WriteStartElement("ServiceInstall", "http://wixtoolset.org/schemas/v4/wxs");
34450 if (this.idFieldSet)
34451 {
34452 writer.WriteAttributeString("Id", this.idField);
34453 }
34454 if (this.nameFieldSet)
34455 {
34456 writer.WriteAttributeString("Name", this.nameField);
34457 }
34458 if (this.displayNameFieldSet)
34459 {
34460 writer.WriteAttributeString("DisplayName", this.displayNameField);
34461 }
34462 if (this.typeFieldSet)
34463 {
34464 if ((this.typeField == TypeType.ownProcess))
34465 {
34466 writer.WriteAttributeString("Type", "ownProcess");
34467 }
34468 if ((this.typeField == TypeType.shareProcess))
34469 {
34470 writer.WriteAttributeString("Type", "shareProcess");
34471 }
34472 if ((this.typeField == TypeType.kernelDriver))
34473 {
34474 writer.WriteAttributeString("Type", "kernelDriver");
34475 }
34476 if ((this.typeField == TypeType.systemDriver))
34477 {
34478 writer.WriteAttributeString("Type", "systemDriver");
34479 }
34480 }
34481 if (this.interactiveFieldSet)
34482 {
34483 if ((this.interactiveField == YesNoType.no))
34484 {
34485 writer.WriteAttributeString("Interactive", "no");
34486 }
34487 if ((this.interactiveField == YesNoType.yes))
34488 {
34489 writer.WriteAttributeString("Interactive", "yes");
34490 }
34491 }
34492 if (this.startFieldSet)
34493 {
34494 if ((this.startField == StartType.auto))
34495 {
34496 writer.WriteAttributeString("Start", "auto");
34497 }
34498 if ((this.startField == StartType.demand))
34499 {
34500 writer.WriteAttributeString("Start", "demand");
34501 }
34502 if ((this.startField == StartType.disabled))
34503 {
34504 writer.WriteAttributeString("Start", "disabled");
34505 }
34506 if ((this.startField == StartType.boot))
34507 {
34508 writer.WriteAttributeString("Start", "boot");
34509 }
34510 if ((this.startField == StartType.system))
34511 {
34512 writer.WriteAttributeString("Start", "system");
34513 }
34514 }
34515 if (this.errorControlFieldSet)
34516 {
34517 if ((this.errorControlField == ErrorControlType.ignore))
34518 {
34519 writer.WriteAttributeString("ErrorControl", "ignore");
34520 }
34521 if ((this.errorControlField == ErrorControlType.normal))
34522 {
34523 writer.WriteAttributeString("ErrorControl", "normal");
34524 }
34525 if ((this.errorControlField == ErrorControlType.critical))
34526 {
34527 writer.WriteAttributeString("ErrorControl", "critical");
34528 }
34529 }
34530 if (this.vitalFieldSet)
34531 {
34532 if ((this.vitalField == YesNoType.no))
34533 {
34534 writer.WriteAttributeString("Vital", "no");
34535 }
34536 if ((this.vitalField == YesNoType.yes))
34537 {
34538 writer.WriteAttributeString("Vital", "yes");
34539 }
34540 }
34541 if (this.loadOrderGroupFieldSet)
34542 {
34543 writer.WriteAttributeString("LoadOrderGroup", this.loadOrderGroupField);
34544 }
34545 if (this.accountFieldSet)
34546 {
34547 writer.WriteAttributeString("Account", this.accountField);
34548 }
34549 if (this.passwordFieldSet)
34550 {
34551 writer.WriteAttributeString("Password", this.passwordField);
34552 }
34553 if (this.argumentsFieldSet)
34554 {
34555 writer.WriteAttributeString("Arguments", this.argumentsField);
34556 }
34557 if (this.descriptionFieldSet)
34558 {
34559 writer.WriteAttributeString("Description", this.descriptionField);
34560 }
34561 if (this.eraseDescriptionFieldSet)
34562 {
34563 if ((this.eraseDescriptionField == YesNoType.no))
34564 {
34565 writer.WriteAttributeString("EraseDescription", "no");
34566 }
34567 if ((this.eraseDescriptionField == YesNoType.yes))
34568 {
34569 writer.WriteAttributeString("EraseDescription", "yes");
34570 }
34571 }
34572 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
34573 {
34574 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
34575 childElement.OutputXml(writer);
34576 }
34577 writer.WriteEndElement();
34578 }
34579
34580 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
34581 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
34582 void ISetAttributes.SetAttribute(string name, string value)
34583 {
34584 if (String.IsNullOrEmpty(name))
34585 {
34586 throw new ArgumentNullException("name");
34587 }
34588 if (("Id" == name))
34589 {
34590 this.idField = value;
34591 this.idFieldSet = true;
34592 }
34593 if (("Name" == name))
34594 {
34595 this.nameField = value;
34596 this.nameFieldSet = true;
34597 }
34598 if (("DisplayName" == name))
34599 {
34600 this.displayNameField = value;
34601 this.displayNameFieldSet = true;
34602 }
34603 if (("Type" == name))
34604 {
34605 this.typeField = ServiceInstall.ParseTypeType(value);
34606 this.typeFieldSet = true;
34607 }
34608 if (("Interactive" == name))
34609 {
34610 this.interactiveField = Enums.ParseYesNoType(value);
34611 this.interactiveFieldSet = true;
34612 }
34613 if (("Start" == name))
34614 {
34615 this.startField = ServiceInstall.ParseStartType(value);
34616 this.startFieldSet = true;
34617 }
34618 if (("ErrorControl" == name))
34619 {
34620 this.errorControlField = ServiceInstall.ParseErrorControlType(value);
34621 this.errorControlFieldSet = true;
34622 }
34623 if (("Vital" == name))
34624 {
34625 this.vitalField = Enums.ParseYesNoType(value);
34626 this.vitalFieldSet = true;
34627 }
34628 if (("LoadOrderGroup" == name))
34629 {
34630 this.loadOrderGroupField = value;
34631 this.loadOrderGroupFieldSet = true;
34632 }
34633 if (("Account" == name))
34634 {
34635 this.accountField = value;
34636 this.accountFieldSet = true;
34637 }
34638 if (("Password" == name))
34639 {
34640 this.passwordField = value;
34641 this.passwordFieldSet = true;
34642 }
34643 if (("Arguments" == name))
34644 {
34645 this.argumentsField = value;
34646 this.argumentsFieldSet = true;
34647 }
34648 if (("Description" == name))
34649 {
34650 this.descriptionField = value;
34651 this.descriptionFieldSet = true;
34652 }
34653 if (("EraseDescription" == name))
34654 {
34655 this.eraseDescriptionField = Enums.ParseYesNoType(value);
34656 this.eraseDescriptionFieldSet = true;
34657 }
34658 }
34659
34660 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
34661 public enum TypeType
34662 {
34663
34664 IllegalValue = int.MaxValue,
34665
34666 NotSet = -1,
34667
34668 /// <summary>
34669 /// A Win32 service that runs its own process.
34670 /// </summary>
34671 ownProcess,
34672
34673 /// <summary>
34674 /// A Win32 service that shares a process.
34675 /// </summary>
34676 shareProcess,
34677
34678 /// <summary>
34679 /// A kernel driver service. This value is not currently supported by the Windows Installer.
34680 /// </summary>
34681 kernelDriver,
34682
34683 /// <summary>
34684 /// A file system driver service. This value is not currently supported by the Windows Installer.
34685 /// </summary>
34686 systemDriver,
34687 }
34688
34689 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
34690 public enum StartType
34691 {
34692
34693 IllegalValue = int.MaxValue,
34694
34695 NotSet = -1,
34696
34697 /// <summary>
34698 /// The service will start during startup of the system.
34699 /// </summary>
34700 auto,
34701
34702 /// <summary>
34703 /// The service will start when the service control manager calls the StartService function.
34704 /// </summary>
34705 demand,
34706
34707 /// <summary>
34708 /// The service can no longer be started.
34709 /// </summary>
34710 disabled,
34711
34712 /// <summary>
34713 /// 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.
34714 /// </summary>
34715 boot,
34716
34717 /// <summary>
34718 /// The service is a device driver that will be started by the IoInitSystem function. This value is not currently supported by the Windows Installer.
34719 /// </summary>
34720 system,
34721 }
34722
34723 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
34724 public enum ErrorControlType
34725 {
34726
34727 IllegalValue = int.MaxValue,
34728
34729 NotSet = -1,
34730
34731 /// <summary>
34732 /// Logs the error and continues with the startup operation.
34733 /// </summary>
34734 ignore,
34735
34736 /// <summary>
34737 /// Logs the error, displays a message box and continues the startup operation.
34738 /// </summary>
34739 normal,
34740
34741 /// <summary>
34742 /// 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.
34743 /// </summary>
34744 critical,
34745 }
34746 }
34747
34748 /// <summary>
34749 /// Argument used in ServiceControl parent
34750 /// </summary>
34751 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
34752 public class ServiceArgument : ISetAttributes, ISchemaElement
34753 {
34754
34755 private ISchemaElement parentElement;
34756
34757 private string contentField;
34758
34759 private bool contentFieldSet;
34760
34761 public virtual ISchemaElement ParentElement
34762 {
34763 get
34764 {
34765 return this.parentElement;
34766 }
34767 set
34768 {
34769 this.parentElement = value;
34770 }
34771 }
34772
34773 /// <summary>
34774 /// Argument used in ServiceControl parent
34775 /// </summary>
34776 public string Content
34777 {
34778 get
34779 {
34780 return this.contentField;
34781 }
34782 set
34783 {
34784 this.contentFieldSet = true;
34785 this.contentField = value;
34786 }
34787 }
34788
34789 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
34790 void ISetAttributes.SetAttribute(string name, string value)
34791 {
34792 if (String.IsNullOrEmpty(name))
34793 {
34794 throw new ArgumentNullException("name");
34795 }
34796 if (("Content" == name))
34797 {
34798 this.contentField = value;
34799 this.contentFieldSet = true;
34800 }
34801 }
34802
34803 /// <summary>
34804 /// Processes this element and all child elements into an XmlWriter.
34805 /// </summary>
34806 public virtual void OutputXml(XmlWriter writer)
34807 {
34808 if ((null == writer))
34809 {
34810 throw new ArgumentNullException("writer");
34811 }
34812 writer.WriteStartElement("ServiceArgument", "http://wixtoolset.org/schemas/v4/wxs");
34813 if (this.contentFieldSet)
34814 {
34815 writer.WriteString(this.contentField);
34816 }
34817 writer.WriteEndElement();
34818 }
34819 }
34820
34821 /// <summary>
34822 /// Starts, stops, and removes services for parent Component. This element is used to control the state
34823 /// of a service installed by the MSI or MSM file by using the start, stop and remove attributes.
34824 /// For example, Start='install' Stop='both' Remove='uninstall' would mean: start the service on install,
34825 /// remove the service when the product is uninstalled, and stop the service both on install and uninstall.
34826 /// </summary>
34827 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
34828 public class ServiceControl : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
34829 {
34830
34831 private ElementCollection children;
34832
34833 private string idField;
34834
34835 private bool idFieldSet;
34836
34837 private string nameField;
34838
34839 private bool nameFieldSet;
34840
34841 private InstallUninstallType startField;
34842
34843 private bool startFieldSet;
34844
34845 private InstallUninstallType stopField;
34846
34847 private bool stopFieldSet;
34848
34849 private InstallUninstallType removeField;
34850
34851 private bool removeFieldSet;
34852
34853 private YesNoType waitField;
34854
34855 private bool waitFieldSet;
34856
34857 private ISchemaElement parentElement;
34858
34859 public ServiceControl()
34860 {
34861 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
34862 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ServiceArgument)));
34863 this.children = childCollection0;
34864 }
34865
34866 public virtual IEnumerable Children
34867 {
34868 get
34869 {
34870 return this.children;
34871 }
34872 }
34873
34874 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
34875 public virtual IEnumerable this[System.Type childType]
34876 {
34877 get
34878 {
34879 return this.children.Filter(childType);
34880 }
34881 }
34882
34883 public string Id
34884 {
34885 get
34886 {
34887 return this.idField;
34888 }
34889 set
34890 {
34891 this.idFieldSet = true;
34892 this.idField = value;
34893 }
34894 }
34895
34896 /// <summary>
34897 /// Name of the service.
34898 /// </summary>
34899 public string Name
34900 {
34901 get
34902 {
34903 return this.nameField;
34904 }
34905 set
34906 {
34907 this.nameFieldSet = true;
34908 this.nameField = value;
34909 }
34910 }
34911
34912 /// <summary>
34913 /// Specifies whether the service should be started by the StartServices action on install, uninstall or both.
34914 /// For 'install', the service will be started only when the parent component is being installed (msiInstallStateLocal or
34915 /// msiInstallStateSource); for 'uninstall', the service will be started only when the parent component
34916 /// is being removed (msiInstallStateAbsent); for 'both', the service will be started in both cases.
34917 /// </summary>
34918 public InstallUninstallType Start
34919 {
34920 get
34921 {
34922 return this.startField;
34923 }
34924 set
34925 {
34926 this.startFieldSet = true;
34927 this.startField = value;
34928 }
34929 }
34930
34931 /// <summary>
34932 /// Specifies whether the service should be stopped by the StopServices action on install, uninstall or both.
34933 /// For 'install', the service will be stopped only when the parent component is being installed (msiInstallStateLocal or
34934 /// msiInstallStateSource); for 'uninstall', the service will be stopped only when the parent component
34935 /// is being removed (msiInstallStateAbsent); for 'both', the service will be stopped in both cases.
34936 /// </summary>
34937 public InstallUninstallType Stop
34938 {
34939 get
34940 {
34941 return this.stopField;
34942 }
34943 set
34944 {
34945 this.stopFieldSet = true;
34946 this.stopField = value;
34947 }
34948 }
34949
34950 /// <summary>
34951 /// Specifies whether the service should be removed by the DeleteServices action on install, uninstall or both.
34952 /// For 'install', the service will be removed only when the parent component is being installed (msiInstallStateLocal or
34953 /// msiInstallStateSource); for 'uninstall', the service will be removed only when the parent component
34954 /// is being removed (msiInstallStateAbsent); for 'both', the service will be removed in both cases.
34955 /// </summary>
34956 public InstallUninstallType Remove
34957 {
34958 get
34959 {
34960 return this.removeField;
34961 }
34962 set
34963 {
34964 this.removeFieldSet = true;
34965 this.removeField = value;
34966 }
34967 }
34968
34969 /// <summary>
34970 /// Specifies whether or not to wait for the service to complete before continuing. The default is 'yes'.
34971 /// </summary>
34972 public YesNoType Wait
34973 {
34974 get
34975 {
34976 return this.waitField;
34977 }
34978 set
34979 {
34980 this.waitFieldSet = true;
34981 this.waitField = value;
34982 }
34983 }
34984
34985 public virtual ISchemaElement ParentElement
34986 {
34987 get
34988 {
34989 return this.parentElement;
34990 }
34991 set
34992 {
34993 this.parentElement = value;
34994 }
34995 }
34996
34997 public virtual void AddChild(ISchemaElement child)
34998 {
34999 if ((null == child))
35000 {
35001 throw new ArgumentNullException("child");
35002 }
35003 this.children.AddElement(child);
35004 child.ParentElement = this;
35005 }
35006
35007 public virtual void RemoveChild(ISchemaElement child)
35008 {
35009 if ((null == child))
35010 {
35011 throw new ArgumentNullException("child");
35012 }
35013 this.children.RemoveElement(child);
35014 child.ParentElement = null;
35015 }
35016
35017 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35018 ISchemaElement ICreateChildren.CreateChild(string childName)
35019 {
35020 if (String.IsNullOrEmpty(childName))
35021 {
35022 throw new ArgumentNullException("childName");
35023 }
35024 ISchemaElement childValue = null;
35025 if (("ServiceArgument" == childName))
35026 {
35027 childValue = new ServiceArgument();
35028 }
35029 if ((null == childValue))
35030 {
35031 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
35032 }
35033 return childValue;
35034 }
35035
35036 /// <summary>
35037 /// Processes this element and all child elements into an XmlWriter.
35038 /// </summary>
35039 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
35040 public virtual void OutputXml(XmlWriter writer)
35041 {
35042 if ((null == writer))
35043 {
35044 throw new ArgumentNullException("writer");
35045 }
35046 writer.WriteStartElement("ServiceControl", "http://wixtoolset.org/schemas/v4/wxs");
35047 if (this.idFieldSet)
35048 {
35049 writer.WriteAttributeString("Id", this.idField);
35050 }
35051 if (this.nameFieldSet)
35052 {
35053 writer.WriteAttributeString("Name", this.nameField);
35054 }
35055 if (this.startFieldSet)
35056 {
35057 if ((this.startField == InstallUninstallType.install))
35058 {
35059 writer.WriteAttributeString("Start", "install");
35060 }
35061 if ((this.startField == InstallUninstallType.uninstall))
35062 {
35063 writer.WriteAttributeString("Start", "uninstall");
35064 }
35065 if ((this.startField == InstallUninstallType.both))
35066 {
35067 writer.WriteAttributeString("Start", "both");
35068 }
35069 }
35070 if (this.stopFieldSet)
35071 {
35072 if ((this.stopField == InstallUninstallType.install))
35073 {
35074 writer.WriteAttributeString("Stop", "install");
35075 }
35076 if ((this.stopField == InstallUninstallType.uninstall))
35077 {
35078 writer.WriteAttributeString("Stop", "uninstall");
35079 }
35080 if ((this.stopField == InstallUninstallType.both))
35081 {
35082 writer.WriteAttributeString("Stop", "both");
35083 }
35084 }
35085 if (this.removeFieldSet)
35086 {
35087 if ((this.removeField == InstallUninstallType.install))
35088 {
35089 writer.WriteAttributeString("Remove", "install");
35090 }
35091 if ((this.removeField == InstallUninstallType.uninstall))
35092 {
35093 writer.WriteAttributeString("Remove", "uninstall");
35094 }
35095 if ((this.removeField == InstallUninstallType.both))
35096 {
35097 writer.WriteAttributeString("Remove", "both");
35098 }
35099 }
35100 if (this.waitFieldSet)
35101 {
35102 if ((this.waitField == YesNoType.no))
35103 {
35104 writer.WriteAttributeString("Wait", "no");
35105 }
35106 if ((this.waitField == YesNoType.yes))
35107 {
35108 writer.WriteAttributeString("Wait", "yes");
35109 }
35110 }
35111 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
35112 {
35113 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
35114 childElement.OutputXml(writer);
35115 }
35116 writer.WriteEndElement();
35117 }
35118
35119 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35120 void ISetAttributes.SetAttribute(string name, string value)
35121 {
35122 if (String.IsNullOrEmpty(name))
35123 {
35124 throw new ArgumentNullException("name");
35125 }
35126 if (("Id" == name))
35127 {
35128 this.idField = value;
35129 this.idFieldSet = true;
35130 }
35131 if (("Name" == name))
35132 {
35133 this.nameField = value;
35134 this.nameFieldSet = true;
35135 }
35136 if (("Start" == name))
35137 {
35138 this.startField = Enums.ParseInstallUninstallType(value);
35139 this.startFieldSet = true;
35140 }
35141 if (("Stop" == name))
35142 {
35143 this.stopField = Enums.ParseInstallUninstallType(value);
35144 this.stopFieldSet = true;
35145 }
35146 if (("Remove" == name))
35147 {
35148 this.removeField = Enums.ParseInstallUninstallType(value);
35149 this.removeFieldSet = true;
35150 }
35151 if (("Wait" == name))
35152 {
35153 this.waitField = Enums.ParseYesNoType(value);
35154 this.waitFieldSet = true;
35155 }
35156 }
35157 }
35158
35159 /// <summary>
35160 /// Privilege required by service configured by ServiceConfig parent. Valid values are a
35161 /// </summary>
35162 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
35163 public class RequiredPrivilege : ISetAttributes, ISchemaElement
35164 {
35165
35166 private ISchemaElement parentElement;
35167
35168 private string contentField;
35169
35170 private bool contentFieldSet;
35171
35172 public virtual ISchemaElement ParentElement
35173 {
35174 get
35175 {
35176 return this.parentElement;
35177 }
35178 set
35179 {
35180 this.parentElement = value;
35181 }
35182 }
35183
35184 /// <summary>
35185 /// Privilege required by service configured by ServiceConfig parent. Valid values are a
35186 /// </summary>
35187 public string Content
35188 {
35189 get
35190 {
35191 return this.contentField;
35192 }
35193 set
35194 {
35195 this.contentFieldSet = true;
35196 this.contentField = value;
35197 }
35198 }
35199
35200 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35201 void ISetAttributes.SetAttribute(string name, string value)
35202 {
35203 if (String.IsNullOrEmpty(name))
35204 {
35205 throw new ArgumentNullException("name");
35206 }
35207 if (("Content" == name))
35208 {
35209 this.contentField = value;
35210 this.contentFieldSet = true;
35211 }
35212 }
35213
35214 /// <summary>
35215 /// Processes this element and all child elements into an XmlWriter.
35216 /// </summary>
35217 public virtual void OutputXml(XmlWriter writer)
35218 {
35219 if ((null == writer))
35220 {
35221 throw new ArgumentNullException("writer");
35222 }
35223 writer.WriteStartElement("RequiredPrivilege", "http://wixtoolset.org/schemas/v4/wxs");
35224 if (this.contentFieldSet)
35225 {
35226 writer.WriteString(this.contentField);
35227 }
35228 writer.WriteEndElement();
35229 }
35230 }
35231
35232 /// <summary>
35233 /// Configures a service being installed or one that already exists. This element's functionality is available starting with MSI 5.0.
35234 /// </summary>
35235 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
35236 public class ServiceConfig : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
35237 {
35238
35239 private ElementCollection children;
35240
35241 private string idField;
35242
35243 private bool idFieldSet;
35244
35245 private string delayedAutoStartField;
35246
35247 private bool delayedAutoStartFieldSet;
35248
35249 private string failureActionsWhenField;
35250
35251 private bool failureActionsWhenFieldSet;
35252
35253 private string preShutdownDelayField;
35254
35255 private bool preShutdownDelayFieldSet;
35256
35257 private YesNoType onInstallField;
35258
35259 private bool onInstallFieldSet;
35260
35261 private YesNoType onReinstallField;
35262
35263 private bool onReinstallFieldSet;
35264
35265 private YesNoType onUninstallField;
35266
35267 private bool onUninstallFieldSet;
35268
35269 private string serviceNameField;
35270
35271 private bool serviceNameFieldSet;
35272
35273 private string serviceSidField;
35274
35275 private bool serviceSidFieldSet;
35276
35277 private ISchemaElement parentElement;
35278
35279 public ServiceConfig()
35280 {
35281 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
35282 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RequiredPrivilege)));
35283 this.children = childCollection0;
35284 }
35285
35286 public virtual IEnumerable Children
35287 {
35288 get
35289 {
35290 return this.children;
35291 }
35292 }
35293
35294 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
35295 public virtual IEnumerable this[System.Type childType]
35296 {
35297 get
35298 {
35299 return this.children.Filter(childType);
35300 }
35301 }
35302
35303 /// <summary>
35304 /// Unique identifier for this service configuration. This value will default to the ServiceName attribute if not
35305 /// specified.
35306 /// </summary>
35307 public string Id
35308 {
35309 get
35310 {
35311 return this.idField;
35312 }
35313 set
35314 {
35315 this.idFieldSet = true;
35316 this.idField = value;
35317 }
35318 }
35319
35320 /// <summary>
35321 /// This attribute specifies whether an auto-start service should delay its start until after all other auto-start
35322 /// services. This attribute only affects auto-start services. Allowed values are "yes", "no" or a Formatted property that
35323 /// resolves to "1" (for "yes") or "0" (for "no"). If this attribute is not present the setting is not configured.
35324 /// </summary>
35325 public string DelayedAutoStart
35326 {
35327 get
35328 {
35329 return this.delayedAutoStartField;
35330 }
35331 set
35332 {
35333 this.delayedAutoStartFieldSet = true;
35334 this.delayedAutoStartField = value;
35335 }
35336 }
35337
35338 /// <summary>
35339 /// This attribute specifies when failure actions should be applied. Allowed values are "failedToStop", "failedToStopOrReturnedError"
35340 /// or a Formatted property that resolves to "1" (for "failedToStopOrReturnedError") or "0" (for "failedToStop"). If this attribute
35341 /// is not present the setting is not configured.
35342 /// </summary>
35343 public string FailureActionsWhen
35344 {
35345 get
35346 {
35347 return this.failureActionsWhenField;
35348 }
35349 set
35350 {
35351 this.failureActionsWhenFieldSet = true;
35352 this.failureActionsWhenField = value;
35353 }
35354 }
35355
35356 /// <summary>
35357 /// This attribute specifies time in milliseconds that the Service Control Manager (SCM) waits after notifying the service of a system
35358 /// shutdown. If this attribute is not present the default value, 3 minutes, is used.
35359 /// </summary>
35360 public string PreShutdownDelay
35361 {
35362 get
35363 {
35364 return this.preShutdownDelayField;
35365 }
35366 set
35367 {
35368 this.preShutdownDelayFieldSet = true;
35369 this.preShutdownDelayField = value;
35370 }
35371 }
35372
35373 /// <summary>
35374 /// Specifies whether to configure the service when the parent Component is installed. This attribute may be combined with OnReinstall
35375 /// and OnUninstall.
35376 /// </summary>
35377 public YesNoType OnInstall
35378 {
35379 get
35380 {
35381 return this.onInstallField;
35382 }
35383 set
35384 {
35385 this.onInstallFieldSet = true;
35386 this.onInstallField = value;
35387 }
35388 }
35389
35390 /// <summary>
35391 /// Specifies whether to configure the service when the parent Component is reinstalled. This attribute may be combined with OnInstall
35392 /// and OnUninstall.
35393 /// </summary>
35394 public YesNoType OnReinstall
35395 {
35396 get
35397 {
35398 return this.onReinstallField;
35399 }
35400 set
35401 {
35402 this.onReinstallFieldSet = true;
35403 this.onReinstallField = value;
35404 }
35405 }
35406
35407 /// <summary>
35408 /// Specifies whether to configure the service when the parent Component is uninstalled. This attribute may be combined with OnInstall
35409 /// and OnReinstall.
35410 /// </summary>
35411 public YesNoType OnUninstall
35412 {
35413 get
35414 {
35415 return this.onUninstallField;
35416 }
35417 set
35418 {
35419 this.onUninstallFieldSet = true;
35420 this.onUninstallField = value;
35421 }
35422 }
35423
35424 /// <summary>
35425 /// Specifies the name of the service to configure. This value will default to the ServiceInstall/@Name attribute when nested under
35426 /// a ServiceInstall element.
35427 /// </summary>
35428 public string ServiceName
35429 {
35430 get
35431 {
35432 return this.serviceNameField;
35433 }
35434 set
35435 {
35436 this.serviceNameFieldSet = true;
35437 this.serviceNameField = value;
35438 }
35439 }
35440
35441 /// <summary>
35442 /// Specifies the service SID to apply to the service. Valid values are "none", "restricted", "unrestricted" or a Formatted property
35443 /// that resolves to "0" (for "none"), "3" (for "restricted") or "1" (for "unrestricted"). If this attribute is not present the
35444 /// setting is not configured.
35445 /// </summary>
35446 public string ServiceSid
35447 {
35448 get
35449 {
35450 return this.serviceSidField;
35451 }
35452 set
35453 {
35454 this.serviceSidFieldSet = true;
35455 this.serviceSidField = value;
35456 }
35457 }
35458
35459 public virtual ISchemaElement ParentElement
35460 {
35461 get
35462 {
35463 return this.parentElement;
35464 }
35465 set
35466 {
35467 this.parentElement = value;
35468 }
35469 }
35470
35471 public virtual void AddChild(ISchemaElement child)
35472 {
35473 if ((null == child))
35474 {
35475 throw new ArgumentNullException("child");
35476 }
35477 this.children.AddElement(child);
35478 child.ParentElement = this;
35479 }
35480
35481 public virtual void RemoveChild(ISchemaElement child)
35482 {
35483 if ((null == child))
35484 {
35485 throw new ArgumentNullException("child");
35486 }
35487 this.children.RemoveElement(child);
35488 child.ParentElement = null;
35489 }
35490
35491 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35492 ISchemaElement ICreateChildren.CreateChild(string childName)
35493 {
35494 if (String.IsNullOrEmpty(childName))
35495 {
35496 throw new ArgumentNullException("childName");
35497 }
35498 ISchemaElement childValue = null;
35499 if (("RequiredPrivilege" == childName))
35500 {
35501 childValue = new RequiredPrivilege();
35502 }
35503 if ((null == childValue))
35504 {
35505 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
35506 }
35507 return childValue;
35508 }
35509
35510 /// <summary>
35511 /// Processes this element and all child elements into an XmlWriter.
35512 /// </summary>
35513 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
35514 public virtual void OutputXml(XmlWriter writer)
35515 {
35516 if ((null == writer))
35517 {
35518 throw new ArgumentNullException("writer");
35519 }
35520 writer.WriteStartElement("ServiceConfig", "http://wixtoolset.org/schemas/v4/wxs");
35521 if (this.idFieldSet)
35522 {
35523 writer.WriteAttributeString("Id", this.idField);
35524 }
35525 if (this.delayedAutoStartFieldSet)
35526 {
35527 writer.WriteAttributeString("DelayedAutoStart", this.delayedAutoStartField);
35528 }
35529 if (this.failureActionsWhenFieldSet)
35530 {
35531 writer.WriteAttributeString("FailureActionsWhen", this.failureActionsWhenField);
35532 }
35533 if (this.preShutdownDelayFieldSet)
35534 {
35535 writer.WriteAttributeString("PreShutdownDelay", this.preShutdownDelayField);
35536 }
35537 if (this.onInstallFieldSet)
35538 {
35539 if ((this.onInstallField == YesNoType.no))
35540 {
35541 writer.WriteAttributeString("OnInstall", "no");
35542 }
35543 if ((this.onInstallField == YesNoType.yes))
35544 {
35545 writer.WriteAttributeString("OnInstall", "yes");
35546 }
35547 }
35548 if (this.onReinstallFieldSet)
35549 {
35550 if ((this.onReinstallField == YesNoType.no))
35551 {
35552 writer.WriteAttributeString("OnReinstall", "no");
35553 }
35554 if ((this.onReinstallField == YesNoType.yes))
35555 {
35556 writer.WriteAttributeString("OnReinstall", "yes");
35557 }
35558 }
35559 if (this.onUninstallFieldSet)
35560 {
35561 if ((this.onUninstallField == YesNoType.no))
35562 {
35563 writer.WriteAttributeString("OnUninstall", "no");
35564 }
35565 if ((this.onUninstallField == YesNoType.yes))
35566 {
35567 writer.WriteAttributeString("OnUninstall", "yes");
35568 }
35569 }
35570 if (this.serviceNameFieldSet)
35571 {
35572 writer.WriteAttributeString("ServiceName", this.serviceNameField);
35573 }
35574 if (this.serviceSidFieldSet)
35575 {
35576 writer.WriteAttributeString("ServiceSid", this.serviceSidField);
35577 }
35578 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
35579 {
35580 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
35581 childElement.OutputXml(writer);
35582 }
35583 writer.WriteEndElement();
35584 }
35585
35586 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35587 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
35588 void ISetAttributes.SetAttribute(string name, string value)
35589 {
35590 if (String.IsNullOrEmpty(name))
35591 {
35592 throw new ArgumentNullException("name");
35593 }
35594 if (("Id" == name))
35595 {
35596 this.idField = value;
35597 this.idFieldSet = true;
35598 }
35599 if (("DelayedAutoStart" == name))
35600 {
35601 this.delayedAutoStartField = value;
35602 this.delayedAutoStartFieldSet = true;
35603 }
35604 if (("FailureActionsWhen" == name))
35605 {
35606 this.failureActionsWhenField = value;
35607 this.failureActionsWhenFieldSet = true;
35608 }
35609 if (("PreShutdownDelay" == name))
35610 {
35611 this.preShutdownDelayField = value;
35612 this.preShutdownDelayFieldSet = true;
35613 }
35614 if (("OnInstall" == name))
35615 {
35616 this.onInstallField = Enums.ParseYesNoType(value);
35617 this.onInstallFieldSet = true;
35618 }
35619 if (("OnReinstall" == name))
35620 {
35621 this.onReinstallField = Enums.ParseYesNoType(value);
35622 this.onReinstallFieldSet = true;
35623 }
35624 if (("OnUninstall" == name))
35625 {
35626 this.onUninstallField = Enums.ParseYesNoType(value);
35627 this.onUninstallFieldSet = true;
35628 }
35629 if (("ServiceName" == name))
35630 {
35631 this.serviceNameField = value;
35632 this.serviceNameFieldSet = true;
35633 }
35634 if (("ServiceSid" == name))
35635 {
35636 this.serviceSidField = value;
35637 this.serviceSidFieldSet = true;
35638 }
35639 }
35640 }
35641
35642 /// <summary>
35643 /// Failure action for a ServiceConfigFailureActions element.
35644 /// </summary>
35645 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
35646 public class Failure : ISchemaElement, ISetAttributes
35647 {
35648
35649 private string actionField;
35650
35651 private bool actionFieldSet;
35652
35653 private string delayField;
35654
35655 private bool delayFieldSet;
35656
35657 private ISchemaElement parentElement;
35658
35659 /// <summary>
35660 /// Specifies the action to take when the service fails. Valid values are "none", "restartComputer", "restartService", "runCommand" or a Formatted property
35661 /// that resolves to "0" (for "none"), "1" (for "restartService"), "2" (for "restartComputer") or "3" (for "runCommand").
35662 /// </summary>
35663 public string Action
35664 {
35665 get
35666 {
35667 return this.actionField;
35668 }
35669 set
35670 {
35671 this.actionFieldSet = true;
35672 this.actionField = value;
35673 }
35674 }
35675
35676 /// <summary>
35677 /// Specifies the time in milliseconds to wait before performing the value from the Action attribute.
35678 /// </summary>
35679 public string Delay
35680 {
35681 get
35682 {
35683 return this.delayField;
35684 }
35685 set
35686 {
35687 this.delayFieldSet = true;
35688 this.delayField = value;
35689 }
35690 }
35691
35692 public virtual ISchemaElement ParentElement
35693 {
35694 get
35695 {
35696 return this.parentElement;
35697 }
35698 set
35699 {
35700 this.parentElement = value;
35701 }
35702 }
35703
35704 /// <summary>
35705 /// Processes this element and all child elements into an XmlWriter.
35706 /// </summary>
35707 public virtual void OutputXml(XmlWriter writer)
35708 {
35709 if ((null == writer))
35710 {
35711 throw new ArgumentNullException("writer");
35712 }
35713 writer.WriteStartElement("Failure", "http://wixtoolset.org/schemas/v4/wxs");
35714 if (this.actionFieldSet)
35715 {
35716 writer.WriteAttributeString("Action", this.actionField);
35717 }
35718 if (this.delayFieldSet)
35719 {
35720 writer.WriteAttributeString("Delay", this.delayField);
35721 }
35722 writer.WriteEndElement();
35723 }
35724
35725 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35726 void ISetAttributes.SetAttribute(string name, string value)
35727 {
35728 if (String.IsNullOrEmpty(name))
35729 {
35730 throw new ArgumentNullException("name");
35731 }
35732 if (("Action" == name))
35733 {
35734 this.actionField = value;
35735 this.actionFieldSet = true;
35736 }
35737 if (("Delay" == name))
35738 {
35739 this.delayField = value;
35740 this.delayFieldSet = true;
35741 }
35742 }
35743 }
35744
35745 /// <summary>
35746 /// 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.
35747 /// </summary>
35748 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
35749 public class ServiceConfigFailureActions : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
35750 {
35751
35752 private ElementCollection children;
35753
35754 private string idField;
35755
35756 private bool idFieldSet;
35757
35758 private string commandField;
35759
35760 private bool commandFieldSet;
35761
35762 private YesNoType onInstallField;
35763
35764 private bool onInstallFieldSet;
35765
35766 private YesNoType onReinstallField;
35767
35768 private bool onReinstallFieldSet;
35769
35770 private YesNoType onUninstallField;
35771
35772 private bool onUninstallFieldSet;
35773
35774 private string rebootMessageField;
35775
35776 private bool rebootMessageFieldSet;
35777
35778 private string resetPeriodField;
35779
35780 private bool resetPeriodFieldSet;
35781
35782 private string serviceNameField;
35783
35784 private bool serviceNameFieldSet;
35785
35786 private ISchemaElement parentElement;
35787
35788 public ServiceConfigFailureActions()
35789 {
35790 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
35791 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Failure)));
35792 this.children = childCollection0;
35793 }
35794
35795 public virtual IEnumerable Children
35796 {
35797 get
35798 {
35799 return this.children;
35800 }
35801 }
35802
35803 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
35804 public virtual IEnumerable this[System.Type childType]
35805 {
35806 get
35807 {
35808 return this.children.Filter(childType);
35809 }
35810 }
35811
35812 /// <summary>
35813 /// Unique identifier for this service configuration. This value will default to the ServiceName attribute if not
35814 /// specified.
35815 /// </summary>
35816 public string Id
35817 {
35818 get
35819 {
35820 return this.idField;
35821 }
35822 set
35823 {
35824 this.idFieldSet = true;
35825 this.idField = value;
35826 }
35827 }
35828
35829 /// <summary>
35830 /// This attribute specifies command to execute when a "runCommand" failure action hit. If an empty string is provided it clears
35831 /// the existing command. If this attribute is not present the setting is not changed.
35832 /// </summary>
35833 public string Command
35834 {
35835 get
35836 {
35837 return this.commandField;
35838 }
35839 set
35840 {
35841 this.commandFieldSet = true;
35842 this.commandField = value;
35843 }
35844 }
35845
35846 /// <summary>
35847 /// Specifies whether to configure the service when the parent Component is installed. This attribute may be combined with OnReinstall
35848 /// and OnUninstall.
35849 /// </summary>
35850 public YesNoType OnInstall
35851 {
35852 get
35853 {
35854 return this.onInstallField;
35855 }
35856 set
35857 {
35858 this.onInstallFieldSet = true;
35859 this.onInstallField = value;
35860 }
35861 }
35862
35863 /// <summary>
35864 /// Specifies whether to configure the service when the parent Component is reinstalled. This attribute may be combined with OnInstall
35865 /// and OnUninstall.
35866 /// </summary>
35867 public YesNoType OnReinstall
35868 {
35869 get
35870 {
35871 return this.onReinstallField;
35872 }
35873 set
35874 {
35875 this.onReinstallFieldSet = true;
35876 this.onReinstallField = value;
35877 }
35878 }
35879
35880 /// <summary>
35881 /// Specifies whether to configure the service when the parent Component is uninstalled. This attribute may be combined with OnInstall
35882 /// and OnReinstall.
35883 /// </summary>
35884 public YesNoType OnUninstall
35885 {
35886 get
35887 {
35888 return this.onUninstallField;
35889 }
35890 set
35891 {
35892 this.onUninstallFieldSet = true;
35893 this.onUninstallField = value;
35894 }
35895 }
35896
35897 /// <summary>
35898 /// Specifies the message to show for a reboot failure action. If an empty string is provided it clears any existing reboot message. If this
35899 /// attribute is not present the setting is not changed.
35900 /// </summary>
35901 public string RebootMessage
35902 {
35903 get
35904 {
35905 return this.rebootMessageField;
35906 }
35907 set
35908 {
35909 this.rebootMessageFieldSet = true;
35910 this.rebootMessageField = value;
35911 }
35912 }
35913
35914 /// <summary>
35915 /// Specifies the time in seconds to reset the failure count. If this attribute is not present the failure count will not be reset.
35916 /// </summary>
35917 public string ResetPeriod
35918 {
35919 get
35920 {
35921 return this.resetPeriodField;
35922 }
35923 set
35924 {
35925 this.resetPeriodFieldSet = true;
35926 this.resetPeriodField = value;
35927 }
35928 }
35929
35930 /// <summary>
35931 /// Specifies the name of the service to configure. This value will default to the ServiceInstall/@Name attribute when nested under
35932 /// a ServiceInstall element.
35933 /// </summary>
35934 public string ServiceName
35935 {
35936 get
35937 {
35938 return this.serviceNameField;
35939 }
35940 set
35941 {
35942 this.serviceNameFieldSet = true;
35943 this.serviceNameField = value;
35944 }
35945 }
35946
35947 public virtual ISchemaElement ParentElement
35948 {
35949 get
35950 {
35951 return this.parentElement;
35952 }
35953 set
35954 {
35955 this.parentElement = value;
35956 }
35957 }
35958
35959 public virtual void AddChild(ISchemaElement child)
35960 {
35961 if ((null == child))
35962 {
35963 throw new ArgumentNullException("child");
35964 }
35965 this.children.AddElement(child);
35966 child.ParentElement = this;
35967 }
35968
35969 public virtual void RemoveChild(ISchemaElement child)
35970 {
35971 if ((null == child))
35972 {
35973 throw new ArgumentNullException("child");
35974 }
35975 this.children.RemoveElement(child);
35976 child.ParentElement = null;
35977 }
35978
35979 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
35980 ISchemaElement ICreateChildren.CreateChild(string childName)
35981 {
35982 if (String.IsNullOrEmpty(childName))
35983 {
35984 throw new ArgumentNullException("childName");
35985 }
35986 ISchemaElement childValue = null;
35987 if (("Failure" == childName))
35988 {
35989 childValue = new Failure();
35990 }
35991 if ((null == childValue))
35992 {
35993 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
35994 }
35995 return childValue;
35996 }
35997
35998 /// <summary>
35999 /// Processes this element and all child elements into an XmlWriter.
36000 /// </summary>
36001 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
36002 public virtual void OutputXml(XmlWriter writer)
36003 {
36004 if ((null == writer))
36005 {
36006 throw new ArgumentNullException("writer");
36007 }
36008 writer.WriteStartElement("ServiceConfigFailureActions", "http://wixtoolset.org/schemas/v4/wxs");
36009 if (this.idFieldSet)
36010 {
36011 writer.WriteAttributeString("Id", this.idField);
36012 }
36013 if (this.commandFieldSet)
36014 {
36015 writer.WriteAttributeString("Command", this.commandField);
36016 }
36017 if (this.onInstallFieldSet)
36018 {
36019 if ((this.onInstallField == YesNoType.no))
36020 {
36021 writer.WriteAttributeString("OnInstall", "no");
36022 }
36023 if ((this.onInstallField == YesNoType.yes))
36024 {
36025 writer.WriteAttributeString("OnInstall", "yes");
36026 }
36027 }
36028 if (this.onReinstallFieldSet)
36029 {
36030 if ((this.onReinstallField == YesNoType.no))
36031 {
36032 writer.WriteAttributeString("OnReinstall", "no");
36033 }
36034 if ((this.onReinstallField == YesNoType.yes))
36035 {
36036 writer.WriteAttributeString("OnReinstall", "yes");
36037 }
36038 }
36039 if (this.onUninstallFieldSet)
36040 {
36041 if ((this.onUninstallField == YesNoType.no))
36042 {
36043 writer.WriteAttributeString("OnUninstall", "no");
36044 }
36045 if ((this.onUninstallField == YesNoType.yes))
36046 {
36047 writer.WriteAttributeString("OnUninstall", "yes");
36048 }
36049 }
36050 if (this.rebootMessageFieldSet)
36051 {
36052 writer.WriteAttributeString("RebootMessage", this.rebootMessageField);
36053 }
36054 if (this.resetPeriodFieldSet)
36055 {
36056 writer.WriteAttributeString("ResetPeriod", this.resetPeriodField);
36057 }
36058 if (this.serviceNameFieldSet)
36059 {
36060 writer.WriteAttributeString("ServiceName", this.serviceNameField);
36061 }
36062 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
36063 {
36064 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
36065 childElement.OutputXml(writer);
36066 }
36067 writer.WriteEndElement();
36068 }
36069
36070 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
36071 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
36072 void ISetAttributes.SetAttribute(string name, string value)
36073 {
36074 if (String.IsNullOrEmpty(name))
36075 {
36076 throw new ArgumentNullException("name");
36077 }
36078 if (("Id" == name))
36079 {
36080 this.idField = value;
36081 this.idFieldSet = true;
36082 }
36083 if (("Command" == name))
36084 {
36085 this.commandField = value;
36086 this.commandFieldSet = true;
36087 }
36088 if (("OnInstall" == name))
36089 {
36090 this.onInstallField = Enums.ParseYesNoType(value);
36091 this.onInstallFieldSet = true;
36092 }
36093 if (("OnReinstall" == name))
36094 {
36095 this.onReinstallField = Enums.ParseYesNoType(value);
36096 this.onReinstallFieldSet = true;
36097 }
36098 if (("OnUninstall" == name))
36099 {
36100 this.onUninstallField = Enums.ParseYesNoType(value);
36101 this.onUninstallFieldSet = true;
36102 }
36103 if (("RebootMessage" == name))
36104 {
36105 this.rebootMessageField = value;
36106 this.rebootMessageFieldSet = true;
36107 }
36108 if (("ResetPeriod" == name))
36109 {
36110 this.resetPeriodField = value;
36111 this.resetPeriodFieldSet = true;
36112 }
36113 if (("ServiceName" == name))
36114 {
36115 this.serviceNameField = value;
36116 this.serviceNameFieldSet = true;
36117 }
36118 }
36119 }
36120
36121 /// <summary>
36122 /// Environment variables added or removed for the parent component.
36123 /// </summary>
36124 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36125 public class Environment : ISchemaElement, ISetAttributes
36126 {
36127
36128 private string idField;
36129
36130 private bool idFieldSet;
36131
36132 private string nameField;
36133
36134 private bool nameFieldSet;
36135
36136 private string valueField;
36137
36138 private bool valueFieldSet;
36139
36140 private string separatorField;
36141
36142 private bool separatorFieldSet;
36143
36144 private ActionType actionField;
36145
36146 private bool actionFieldSet;
36147
36148 private PartType partField;
36149
36150 private bool partFieldSet;
36151
36152 private YesNoType permanentField;
36153
36154 private bool permanentFieldSet;
36155
36156 private YesNoType systemField;
36157
36158 private bool systemFieldSet;
36159
36160 private ISchemaElement parentElement;
36161
36162 /// <summary>
36163 /// Unique identifier for environment entry.
36164 /// </summary>
36165 public string Id
36166 {
36167 get
36168 {
36169 return this.idField;
36170 }
36171 set
36172 {
36173 this.idFieldSet = true;
36174 this.idField = value;
36175 }
36176 }
36177
36178 /// <summary>
36179 /// Name of the environment variable.
36180 /// </summary>
36181 public string Name
36182 {
36183 get
36184 {
36185 return this.nameField;
36186 }
36187 set
36188 {
36189 this.nameFieldSet = true;
36190 this.nameField = value;
36191 }
36192 }
36193
36194 /// <summary>
36195 /// The value to set into the environment variable.
36196 /// If this attribute is not set, the environment variable is removed during installation if it exists on the machine.
36197 /// </summary>
36198 public string Value
36199 {
36200 get
36201 {
36202 return this.valueField;
36203 }
36204 set
36205 {
36206 this.valueFieldSet = true;
36207 this.valueField = value;
36208 }
36209 }
36210
36211 /// <summary>
36212 /// Optional attribute to change the separator used between values. By default a semicolon is used.
36213 /// </summary>
36214 public string Separator
36215 {
36216 get
36217 {
36218 return this.separatorField;
36219 }
36220 set
36221 {
36222 this.separatorFieldSet = true;
36223 this.separatorField = value;
36224 }
36225 }
36226
36227 /// <summary>
36228 /// Specfies whether the environmental variable should be created, set or removed when the parent component is installed.
36229 /// </summary>
36230 public ActionType Action
36231 {
36232 get
36233 {
36234 return this.actionField;
36235 }
36236 set
36237 {
36238 this.actionFieldSet = true;
36239 this.actionField = value;
36240 }
36241 }
36242
36243 public PartType Part
36244 {
36245 get
36246 {
36247 return this.partField;
36248 }
36249 set
36250 {
36251 this.partFieldSet = true;
36252 this.partField = value;
36253 }
36254 }
36255
36256 /// <summary>
36257 /// Specifies that the environment variable should not be removed on uninstall.
36258 /// </summary>
36259 public YesNoType Permanent
36260 {
36261 get
36262 {
36263 return this.permanentField;
36264 }
36265 set
36266 {
36267 this.permanentFieldSet = true;
36268 this.permanentField = value;
36269 }
36270 }
36271
36272 /// <summary>
36273 /// Specifies that the environment variable should be added to the system environment space. The default
36274 /// is 'no' which indicates the environment variable is added to the user environment space.
36275 /// </summary>
36276 public YesNoType System
36277 {
36278 get
36279 {
36280 return this.systemField;
36281 }
36282 set
36283 {
36284 this.systemFieldSet = true;
36285 this.systemField = value;
36286 }
36287 }
36288
36289 public virtual ISchemaElement ParentElement
36290 {
36291 get
36292 {
36293 return this.parentElement;
36294 }
36295 set
36296 {
36297 this.parentElement = value;
36298 }
36299 }
36300
36301 /// <summary>
36302 /// Parses a ActionType from a string.
36303 /// </summary>
36304 public static ActionType ParseActionType(string value)
36305 {
36306 ActionType parsedValue;
36307 Environment.TryParseActionType(value, out parsedValue);
36308 return parsedValue;
36309 }
36310
36311 /// <summary>
36312 /// Tries to parse a ActionType from a string.
36313 /// </summary>
36314 public static bool TryParseActionType(string value, out ActionType parsedValue)
36315 {
36316 parsedValue = ActionType.NotSet;
36317 if (string.IsNullOrEmpty(value))
36318 {
36319 return false;
36320 }
36321 if (("create" == value))
36322 {
36323 parsedValue = ActionType.create;
36324 }
36325 else
36326 {
36327 if (("set" == value))
36328 {
36329 parsedValue = ActionType.set;
36330 }
36331 else
36332 {
36333 if (("remove" == value))
36334 {
36335 parsedValue = ActionType.remove;
36336 }
36337 else
36338 {
36339 parsedValue = ActionType.IllegalValue;
36340 return false;
36341 }
36342 }
36343 }
36344 return true;
36345 }
36346
36347 /// <summary>
36348 /// Parses a PartType from a string.
36349 /// </summary>
36350 public static PartType ParsePartType(string value)
36351 {
36352 PartType parsedValue;
36353 Environment.TryParsePartType(value, out parsedValue);
36354 return parsedValue;
36355 }
36356
36357 /// <summary>
36358 /// Tries to parse a PartType from a string.
36359 /// </summary>
36360 public static bool TryParsePartType(string value, out PartType parsedValue)
36361 {
36362 parsedValue = PartType.NotSet;
36363 if (string.IsNullOrEmpty(value))
36364 {
36365 return false;
36366 }
36367 if (("all" == value))
36368 {
36369 parsedValue = PartType.all;
36370 }
36371 else
36372 {
36373 if (("first" == value))
36374 {
36375 parsedValue = PartType.first;
36376 }
36377 else
36378 {
36379 if (("last" == value))
36380 {
36381 parsedValue = PartType.last;
36382 }
36383 else
36384 {
36385 parsedValue = PartType.IllegalValue;
36386 return false;
36387 }
36388 }
36389 }
36390 return true;
36391 }
36392
36393 /// <summary>
36394 /// Processes this element and all child elements into an XmlWriter.
36395 /// </summary>
36396 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
36397 public virtual void OutputXml(XmlWriter writer)
36398 {
36399 if ((null == writer))
36400 {
36401 throw new ArgumentNullException("writer");
36402 }
36403 writer.WriteStartElement("Environment", "http://wixtoolset.org/schemas/v4/wxs");
36404 if (this.idFieldSet)
36405 {
36406 writer.WriteAttributeString("Id", this.idField);
36407 }
36408 if (this.nameFieldSet)
36409 {
36410 writer.WriteAttributeString("Name", this.nameField);
36411 }
36412 if (this.valueFieldSet)
36413 {
36414 writer.WriteAttributeString("Value", this.valueField);
36415 }
36416 if (this.separatorFieldSet)
36417 {
36418 writer.WriteAttributeString("Separator", this.separatorField);
36419 }
36420 if (this.actionFieldSet)
36421 {
36422 if ((this.actionField == ActionType.create))
36423 {
36424 writer.WriteAttributeString("Action", "create");
36425 }
36426 if ((this.actionField == ActionType.set))
36427 {
36428 writer.WriteAttributeString("Action", "set");
36429 }
36430 if ((this.actionField == ActionType.remove))
36431 {
36432 writer.WriteAttributeString("Action", "remove");
36433 }
36434 }
36435 if (this.partFieldSet)
36436 {
36437 if ((this.partField == PartType.all))
36438 {
36439 writer.WriteAttributeString("Part", "all");
36440 }
36441 if ((this.partField == PartType.first))
36442 {
36443 writer.WriteAttributeString("Part", "first");
36444 }
36445 if ((this.partField == PartType.last))
36446 {
36447 writer.WriteAttributeString("Part", "last");
36448 }
36449 }
36450 if (this.permanentFieldSet)
36451 {
36452 if ((this.permanentField == YesNoType.no))
36453 {
36454 writer.WriteAttributeString("Permanent", "no");
36455 }
36456 if ((this.permanentField == YesNoType.yes))
36457 {
36458 writer.WriteAttributeString("Permanent", "yes");
36459 }
36460 }
36461 if (this.systemFieldSet)
36462 {
36463 if ((this.systemField == YesNoType.no))
36464 {
36465 writer.WriteAttributeString("System", "no");
36466 }
36467 if ((this.systemField == YesNoType.yes))
36468 {
36469 writer.WriteAttributeString("System", "yes");
36470 }
36471 }
36472 writer.WriteEndElement();
36473 }
36474
36475 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
36476 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
36477 void ISetAttributes.SetAttribute(string name, string value)
36478 {
36479 if (String.IsNullOrEmpty(name))
36480 {
36481 throw new ArgumentNullException("name");
36482 }
36483 if (("Id" == name))
36484 {
36485 this.idField = value;
36486 this.idFieldSet = true;
36487 }
36488 if (("Name" == name))
36489 {
36490 this.nameField = value;
36491 this.nameFieldSet = true;
36492 }
36493 if (("Value" == name))
36494 {
36495 this.valueField = value;
36496 this.valueFieldSet = true;
36497 }
36498 if (("Separator" == name))
36499 {
36500 this.separatorField = value;
36501 this.separatorFieldSet = true;
36502 }
36503 if (("Action" == name))
36504 {
36505 this.actionField = Environment.ParseActionType(value);
36506 this.actionFieldSet = true;
36507 }
36508 if (("Part" == name))
36509 {
36510 this.partField = Environment.ParsePartType(value);
36511 this.partFieldSet = true;
36512 }
36513 if (("Permanent" == name))
36514 {
36515 this.permanentField = Enums.ParseYesNoType(value);
36516 this.permanentFieldSet = true;
36517 }
36518 if (("System" == name))
36519 {
36520 this.systemField = Enums.ParseYesNoType(value);
36521 this.systemFieldSet = true;
36522 }
36523 }
36524
36525 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36526 public enum ActionType
36527 {
36528
36529 IllegalValue = int.MaxValue,
36530
36531 NotSet = -1,
36532
36533 /// <summary>
36534 /// 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.
36535 /// </summary>
36536 create,
36537
36538 /// <summary>
36539 /// 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.
36540 /// </summary>
36541 set,
36542
36543 /// <summary>
36544 /// Removes the environment variable during an installation.
36545 /// The installer only removes an environment variable during an installation if the name and value
36546 /// of the variable match the entries in the Name and Value attributes.
36547 /// If you want to remove an environment variable, regardless of its value, do not set the Value attribute.
36548 /// </summary>
36549 remove,
36550 }
36551
36552 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36553 public enum PartType
36554 {
36555
36556 IllegalValue = int.MaxValue,
36557
36558 NotSet = -1,
36559
36560 /// <summary>
36561 /// This value is the entire environmental variable. This is the default.
36562 /// </summary>
36563 all,
36564
36565 /// <summary>
36566 /// This value is prefixed.
36567 /// </summary>
36568 first,
36569
36570 /// <summary>
36571 /// This value is appended.
36572 /// </summary>
36573 last,
36574 }
36575 }
36576
36577 /// <summary>
36578 /// Conditions for components, controls, features, and products. The condition is specified in the inner text of the element.
36579 /// </summary>
36580 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36581 public class Condition : ISchemaElement, ISetAttributes
36582 {
36583
36584 private ActionType actionField;
36585
36586 private bool actionFieldSet;
36587
36588 private int levelField;
36589
36590 private bool levelFieldSet;
36591
36592 private string messageField;
36593
36594 private bool messageFieldSet;
36595
36596 private string contentField;
36597
36598 private bool contentFieldSet;
36599
36600 private ISchemaElement parentElement;
36601
36602 /// <summary>
36603 /// Used only under Control elements and is required. Allows specific actions to be applied to a control based
36604 /// on the result of this condition.
36605 /// </summary>
36606 public ActionType Action
36607 {
36608 get
36609 {
36610 return this.actionField;
36611 }
36612 set
36613 {
36614 this.actionFieldSet = true;
36615 this.actionField = value;
36616 }
36617 }
36618
36619 /// <summary>
36620 /// Used only under Feature elements and is required. Allows modifying the level of a Feature based on the
36621 /// result of this condition.
36622 /// </summary>
36623 public int Level
36624 {
36625 get
36626 {
36627 return this.levelField;
36628 }
36629 set
36630 {
36631 this.levelFieldSet = true;
36632 this.levelField = value;
36633 }
36634 }
36635
36636 /// <summary>
36637 /// Used only under Fragment or Package elements and is required. Set the value to the text to display when the
36638 /// condition fails and the installation must be terminated.
36639 /// </summary>
36640 public string Message
36641 {
36642 get
36643 {
36644 return this.messageField;
36645 }
36646 set
36647 {
36648 this.messageFieldSet = true;
36649 this.messageField = value;
36650 }
36651 }
36652
36653 /// <summary>
36654 /// Under a Component element, the condition becomes the condition of the component. Under a Control element,
36655 /// the condition becomes a ControlCondition entry. Under a Feature element, the condition becomes a Condition
36656 /// entry. Under a Fragment or Package element, the condition becomes a LaunchCondition entry.
36657 /// </summary>
36658 public string Content
36659 {
36660 get
36661 {
36662 return this.contentField;
36663 }
36664 set
36665 {
36666 this.contentFieldSet = true;
36667 this.contentField = value;
36668 }
36669 }
36670
36671 public virtual ISchemaElement ParentElement
36672 {
36673 get
36674 {
36675 return this.parentElement;
36676 }
36677 set
36678 {
36679 this.parentElement = value;
36680 }
36681 }
36682
36683 /// <summary>
36684 /// Parses a ActionType from a string.
36685 /// </summary>
36686 public static ActionType ParseActionType(string value)
36687 {
36688 ActionType parsedValue;
36689 Condition.TryParseActionType(value, out parsedValue);
36690 return parsedValue;
36691 }
36692
36693 /// <summary>
36694 /// Tries to parse a ActionType from a string.
36695 /// </summary>
36696 public static bool TryParseActionType(string value, out ActionType parsedValue)
36697 {
36698 parsedValue = ActionType.NotSet;
36699 if (string.IsNullOrEmpty(value))
36700 {
36701 return false;
36702 }
36703 if (("default" == value))
36704 {
36705 parsedValue = ActionType.@default;
36706 }
36707 else
36708 {
36709 if (("enable" == value))
36710 {
36711 parsedValue = ActionType.enable;
36712 }
36713 else
36714 {
36715 if (("disable" == value))
36716 {
36717 parsedValue = ActionType.disable;
36718 }
36719 else
36720 {
36721 if (("hide" == value))
36722 {
36723 parsedValue = ActionType.hide;
36724 }
36725 else
36726 {
36727 if (("show" == value))
36728 {
36729 parsedValue = ActionType.show;
36730 }
36731 else
36732 {
36733 parsedValue = ActionType.IllegalValue;
36734 return false;
36735 }
36736 }
36737 }
36738 }
36739 }
36740 return true;
36741 }
36742
36743 /// <summary>
36744 /// Processes this element and all child elements into an XmlWriter.
36745 /// </summary>
36746 public virtual void OutputXml(XmlWriter writer)
36747 {
36748 if ((null == writer))
36749 {
36750 throw new ArgumentNullException("writer");
36751 }
36752 writer.WriteStartElement("Condition", "http://wixtoolset.org/schemas/v4/wxs");
36753 if (this.actionFieldSet)
36754 {
36755 if ((this.actionField == ActionType.@default))
36756 {
36757 writer.WriteAttributeString("Action", "default");
36758 }
36759 if ((this.actionField == ActionType.enable))
36760 {
36761 writer.WriteAttributeString("Action", "enable");
36762 }
36763 if ((this.actionField == ActionType.disable))
36764 {
36765 writer.WriteAttributeString("Action", "disable");
36766 }
36767 if ((this.actionField == ActionType.hide))
36768 {
36769 writer.WriteAttributeString("Action", "hide");
36770 }
36771 if ((this.actionField == ActionType.show))
36772 {
36773 writer.WriteAttributeString("Action", "show");
36774 }
36775 }
36776 if (this.levelFieldSet)
36777 {
36778 writer.WriteAttributeString("Level", this.levelField.ToString(CultureInfo.InvariantCulture));
36779 }
36780 if (this.messageFieldSet)
36781 {
36782 writer.WriteAttributeString("Message", this.messageField);
36783 }
36784 if (this.contentFieldSet)
36785 {
36786 writer.WriteString(this.contentField);
36787 }
36788 writer.WriteEndElement();
36789 }
36790
36791 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
36792 void ISetAttributes.SetAttribute(string name, string value)
36793 {
36794 if (String.IsNullOrEmpty(name))
36795 {
36796 throw new ArgumentNullException("name");
36797 }
36798 if (("Action" == name))
36799 {
36800 this.actionField = Condition.ParseActionType(value);
36801 this.actionFieldSet = true;
36802 }
36803 if (("Level" == name))
36804 {
36805 this.levelField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
36806 this.levelFieldSet = true;
36807 }
36808 if (("Message" == name))
36809 {
36810 this.messageField = value;
36811 this.messageFieldSet = true;
36812 }
36813 if (("Content" == name))
36814 {
36815 this.contentField = value;
36816 this.contentFieldSet = true;
36817 }
36818 }
36819
36820 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36821 public enum ActionType
36822 {
36823
36824 IllegalValue = int.MaxValue,
36825
36826 NotSet = -1,
36827
36828 /// <summary>
36829 /// Set the Control as the default. Only used under Control elements.
36830 /// </summary>
36831 @default,
36832
36833 /// <summary>
36834 /// Enable the Control. Only used under Control elements.
36835 /// </summary>
36836 enable,
36837
36838 /// <summary>
36839 /// Disable the Control. Only used under Control elements.
36840 /// </summary>
36841 disable,
36842
36843 /// <summary>
36844 /// Hide the Control. Only used under Control elements.
36845 /// </summary>
36846 hide,
36847
36848 /// <summary>
36849 /// Display the Control. Only used under Control elements.
36850 /// </summary>
36851 show,
36852 }
36853 }
36854
36855 /// <summary>
36856 /// Shared Component to be privately replicated in folder of parent Component
36857 /// </summary>
36858 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36859 public class IsolateComponent : ISchemaElement, ISetAttributes
36860 {
36861
36862 private string sharedField;
36863
36864 private bool sharedFieldSet;
36865
36866 private ISchemaElement parentElement;
36867
36868 /// <summary>
36869 /// Shared Component for this application Component.
36870 /// </summary>
36871 public string Shared
36872 {
36873 get
36874 {
36875 return this.sharedField;
36876 }
36877 set
36878 {
36879 this.sharedFieldSet = true;
36880 this.sharedField = value;
36881 }
36882 }
36883
36884 public virtual ISchemaElement ParentElement
36885 {
36886 get
36887 {
36888 return this.parentElement;
36889 }
36890 set
36891 {
36892 this.parentElement = value;
36893 }
36894 }
36895
36896 /// <summary>
36897 /// Processes this element and all child elements into an XmlWriter.
36898 /// </summary>
36899 public virtual void OutputXml(XmlWriter writer)
36900 {
36901 if ((null == writer))
36902 {
36903 throw new ArgumentNullException("writer");
36904 }
36905 writer.WriteStartElement("IsolateComponent", "http://wixtoolset.org/schemas/v4/wxs");
36906 if (this.sharedFieldSet)
36907 {
36908 writer.WriteAttributeString("Shared", this.sharedField);
36909 }
36910 writer.WriteEndElement();
36911 }
36912
36913 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
36914 void ISetAttributes.SetAttribute(string name, string value)
36915 {
36916 if (String.IsNullOrEmpty(name))
36917 {
36918 throw new ArgumentNullException("name");
36919 }
36920 if (("Shared" == name))
36921 {
36922 this.sharedField = value;
36923 this.sharedFieldSet = true;
36924 }
36925 }
36926 }
36927
36928 /// <summary>
36929 /// Disk cost to reserve in a folder for running locally and/or from source.
36930 /// </summary>
36931 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
36932 public class ReserveCost : ISchemaElement, ISetAttributes
36933 {
36934
36935 private string idField;
36936
36937 private bool idFieldSet;
36938
36939 private string directoryField;
36940
36941 private bool directoryFieldSet;
36942
36943 private int runFromSourceField;
36944
36945 private bool runFromSourceFieldSet;
36946
36947 private int runLocalField;
36948
36949 private bool runLocalFieldSet;
36950
36951 private ISchemaElement parentElement;
36952
36953 /// <summary>
36954 /// A primary key that uniquely identifies this ReserveCost entry.
36955 /// </summary>
36956 public string Id
36957 {
36958 get
36959 {
36960 return this.idField;
36961 }
36962 set
36963 {
36964 this.idFieldSet = true;
36965 this.idField = value;
36966 }
36967 }
36968
36969 /// <summary>
36970 /// Adds the amount of disk space specified in RunFromSource or RunLocal to the volume cost of the device containing the directory.
36971 /// If this attribute is not set, it will default to the directory of parent component.
36972 /// </summary>
36973 public string Directory
36974 {
36975 get
36976 {
36977 return this.directoryField;
36978 }
36979 set
36980 {
36981 this.directoryFieldSet = true;
36982 this.directoryField = value;
36983 }
36984 }
36985
36986 /// <summary>
36987 /// The number of bytes of disk space to reserve if the component is installed to run from source.
36988 /// </summary>
36989 public int RunFromSource
36990 {
36991 get
36992 {
36993 return this.runFromSourceField;
36994 }
36995 set
36996 {
36997 this.runFromSourceFieldSet = true;
36998 this.runFromSourceField = value;
36999 }
37000 }
37001
37002 /// <summary>
37003 /// The number of bytes of disk space to reserve if the component is installed to run locally.
37004 /// </summary>
37005 public int RunLocal
37006 {
37007 get
37008 {
37009 return this.runLocalField;
37010 }
37011 set
37012 {
37013 this.runLocalFieldSet = true;
37014 this.runLocalField = value;
37015 }
37016 }
37017
37018 public virtual ISchemaElement ParentElement
37019 {
37020 get
37021 {
37022 return this.parentElement;
37023 }
37024 set
37025 {
37026 this.parentElement = value;
37027 }
37028 }
37029
37030 /// <summary>
37031 /// Processes this element and all child elements into an XmlWriter.
37032 /// </summary>
37033 public virtual void OutputXml(XmlWriter writer)
37034 {
37035 if ((null == writer))
37036 {
37037 throw new ArgumentNullException("writer");
37038 }
37039 writer.WriteStartElement("ReserveCost", "http://wixtoolset.org/schemas/v4/wxs");
37040 if (this.idFieldSet)
37041 {
37042 writer.WriteAttributeString("Id", this.idField);
37043 }
37044 if (this.directoryFieldSet)
37045 {
37046 writer.WriteAttributeString("Directory", this.directoryField);
37047 }
37048 if (this.runFromSourceFieldSet)
37049 {
37050 writer.WriteAttributeString("RunFromSource", this.runFromSourceField.ToString(CultureInfo.InvariantCulture));
37051 }
37052 if (this.runLocalFieldSet)
37053 {
37054 writer.WriteAttributeString("RunLocal", this.runLocalField.ToString(CultureInfo.InvariantCulture));
37055 }
37056 writer.WriteEndElement();
37057 }
37058
37059 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
37060 void ISetAttributes.SetAttribute(string name, string value)
37061 {
37062 if (String.IsNullOrEmpty(name))
37063 {
37064 throw new ArgumentNullException("name");
37065 }
37066 if (("Id" == name))
37067 {
37068 this.idField = value;
37069 this.idFieldSet = true;
37070 }
37071 if (("Directory" == name))
37072 {
37073 this.directoryField = value;
37074 this.directoryFieldSet = true;
37075 }
37076 if (("RunFromSource" == name))
37077 {
37078 this.runFromSourceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
37079 this.runFromSourceFieldSet = true;
37080 }
37081 if (("RunLocal" == name))
37082 {
37083 this.runLocalField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
37084 this.runLocalFieldSet = true;
37085 }
37086 }
37087 }
37088
37089 /// <summary>
37090 /// Component for parent Directory
37091 /// </summary>
37092 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
37093 public class Component : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
37094 {
37095
37096 private ElementCollection children;
37097
37098 private string idField;
37099
37100 private bool idFieldSet;
37101
37102 private int comPlusFlagsField;
37103
37104 private bool comPlusFlagsFieldSet;
37105
37106 private YesNoType disableRegistryReflectionField;
37107
37108 private bool disableRegistryReflectionFieldSet;
37109
37110 private string directoryField;
37111
37112 private bool directoryFieldSet;
37113
37114 private string diskIdField;
37115
37116 private bool diskIdFieldSet;
37117
37118 private string featureField;
37119
37120 private bool featureFieldSet;
37121
37122 private string guidField;
37123
37124 private bool guidFieldSet;
37125
37126 private YesNoType keyPathField;
37127
37128 private bool keyPathFieldSet;
37129
37130 private LocationType locationField;
37131
37132 private bool locationFieldSet;
37133
37134 private YesNoType multiInstanceField;
37135
37136 private bool multiInstanceFieldSet;
37137
37138 private YesNoType neverOverwriteField;
37139
37140 private bool neverOverwriteFieldSet;
37141
37142 private YesNoType permanentField;
37143
37144 private bool permanentFieldSet;
37145
37146 private YesNoType sharedField;
37147
37148 private bool sharedFieldSet;
37149
37150 private YesNoType sharedDllRefCountField;
37151
37152 private bool sharedDllRefCountFieldSet;
37153
37154 private YesNoType transitiveField;
37155
37156 private bool transitiveFieldSet;
37157
37158 private YesNoType uninstallWhenSupersededField;
37159
37160 private bool uninstallWhenSupersededFieldSet;
37161
37162 private YesNoType win64Field;
37163
37164 private bool win64FieldSet;
37165
37166 private ISchemaElement parentElement;
37167
37168 public Component()
37169 {
37170 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
37171 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId)));
37172 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Category)));
37173 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class)));
37174 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition)));
37175 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CopyFile)));
37176 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateFolder)));
37177 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Environment)));
37178 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Extension)));
37179 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(File)));
37180 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IniFile)));
37181 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface)));
37182 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponent)));
37183 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDataSource)));
37184 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDriver)));
37185 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCTranslator)));
37186 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgId)));
37187 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Registry)));
37188 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryKey)));
37189 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue)));
37190 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFile)));
37191 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFolder)));
37192 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryKey)));
37193 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryValue)));
37194 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ReserveCost)));
37195 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceControl)));
37196 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfig)));
37197 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfigFailureActions)));
37198 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceInstall)));
37199 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut)));
37200 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
37201 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TypeLib)));
37202 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
37203 this.children = childCollection0;
37204 }
37205
37206 public virtual IEnumerable Children
37207 {
37208 get
37209 {
37210 return this.children;
37211 }
37212 }
37213
37214 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
37215 public virtual IEnumerable this[System.Type childType]
37216 {
37217 get
37218 {
37219 return this.children.Filter(childType);
37220 }
37221 }
37222
37223 /// <summary>
37224 /// Component identifier; this is the primary key for identifying components. If omitted,
37225 /// the compiler defaults the identifier to the identifier of the resource that is the
37226 /// explicit keypath of the component (for example, a child File element with KeyPath
37227 /// attribute with value 'yes'.
37228 /// </summary>
37229 public string Id
37230 {
37231 get
37232 {
37233 return this.idField;
37234 }
37235 set
37236 {
37237 this.idFieldSet = true;
37238 this.idField = value;
37239 }
37240 }
37241
37242 /// <summary>
37243 /// Set this attribute to create a ComPlus entry. The value should be the export flags used
37244 /// during the generation of the .msi file. For more information see the COM+ documentation
37245 /// in the Platform SDK.
37246 /// </summary>
37247 public int ComPlusFlags
37248 {
37249 get
37250 {
37251 return this.comPlusFlagsField;
37252 }
37253 set
37254 {
37255 this.comPlusFlagsFieldSet = true;
37256 this.comPlusFlagsField = value;
37257 }
37258 }
37259
37260 /// <summary>
37261 /// Set this attribute to 'yes' in order to disable registry reflection on all existing and
37262 /// new registry keys affected by this component.
37263 /// When set to 'yes', the Windows Installer calls the RegDisableReflectionKey on each key
37264 /// being accessed by the component.
37265 /// This bit is available with Windows Installer version 4.0 and is ignored on 32-bit systems.
37266 /// </summary>
37267 public YesNoType DisableRegistryReflection
37268 {
37269 get
37270 {
37271 return this.disableRegistryReflectionField;
37272 }
37273 set
37274 {
37275 this.disableRegistryReflectionFieldSet = true;
37276 this.disableRegistryReflectionField = value;
37277 }
37278 }
37279
37280 /// <summary>
37281 /// Sets the Directory of the Component. If this element is nested under a Directory element,
37282 /// this value defaults to the value of the parent Directory/@Id.
37283 /// </summary>
37284 public string Directory
37285 {
37286 get
37287 {
37288 return this.directoryField;
37289 }
37290 set
37291 {
37292 this.directoryFieldSet = true;
37293 this.directoryField = value;
37294 }
37295 }
37296
37297 /// <summary>
37298 /// This attribute provides a default DiskId attribute for all child File elements. Specifying
37299 /// the DiskId on a Component element will override any DiskId attributes set by parent Directory
37300 /// or DirectoryRef elements. See the File element's DiskId attribute for more information about
37301 /// the purpose of the DiskId.
37302 /// </summary>
37303 public string DiskId
37304 {
37305 get
37306 {
37307 return this.diskIdField;
37308 }
37309 set
37310 {
37311 this.diskIdFieldSet = true;
37312 this.diskIdField = value;
37313 }
37314 }
37315
37316 /// <summary>
37317 /// Identifies a feature to which this component belongs, as a shorthand for a child
37318 /// ComponentRef element of the Feature element. The value of this attribute should
37319 /// correspond to the Id attribute of a Feature element authored elsewhere. Note that
37320 /// a single component can belong to multiple features but this attribute allows you
37321 /// to specify only a single feature.
37322 /// </summary>
37323 public string Feature
37324 {
37325 get
37326 {
37327 return this.featureField;
37328 }
37329 set
37330 {
37331 this.featureFieldSet = true;
37332 this.featureField = value;
37333 }
37334 }
37335
37336 /// <summary>
37337 /// This value should be a guid that uniquely identifies this component's contents, language, platform, and version.
37338 /// If omitted, the default value is '*' which indicates that the linker should generate a stable guid.
37339 /// Generatable guids are supported only for components with a single file as the component's keypath
37340 /// or no files and a registry value as the keypath.
37341 /// It's also possible to set the value to an empty string to specify an unmanaged component.
37342 /// Unmanaged components are a security vulnerability because the component cannot be removed or repaired
37343 /// by Windows Installer (it is essentially an unpatchable, permanent component). Therefore, a guid should
37344 /// always be specified for any component which contains resources that may need to be patched in the future.
37345 /// </summary>
37346 public string Guid
37347 {
37348 get
37349 {
37350 return this.guidField;
37351 }
37352 set
37353 {
37354 this.guidFieldSet = true;
37355 this.guidField = value;
37356 }
37357 }
37358
37359 /// <summary>
37360 /// If this attribute's value is set to 'yes', then the Directory of this Component is used
37361 /// as the KeyPath. To set a Registry value or File as the KeyPath of a component, set the
37362 /// KeyPath attribute to 'yes' on one of those child elements. If KeyPath is not set to 'yes' for the
37363 /// Component or for a child Registry value or File, WiX will look at the child elements under the
37364 /// Component in sequential order and try to automatically select one of them as a key path. Allowing
37365 /// WiX to automatically select a key path can be dangerous because adding or removing child elements
37366 /// under the Component can inadvertantly cause the key path to change, which can lead to
37367 /// installation problems.
37368 /// </summary>
37369 public YesNoType KeyPath
37370 {
37371 get
37372 {
37373 return this.keyPathField;
37374 }
37375 set
37376 {
37377 this.keyPathFieldSet = true;
37378 this.keyPathField = value;
37379 }
37380 }
37381
37382 /// <summary>
37383 /// Optional value that specifies the location that the component can be run from.
37384 /// </summary>
37385 public LocationType Location
37386 {
37387 get
37388 {
37389 return this.locationField;
37390 }
37391 set
37392 {
37393 this.locationFieldSet = true;
37394 this.locationField = value;
37395 }
37396 }
37397
37398 /// <summary>
37399 /// If this attribute is set to 'yes', a new Component/@Guid will be generated for each
37400 /// instance transform. Ensure that all of the resources contained in a multi-instance
37401 /// Component will be installed to different paths based on the instance Property; otherwise,
37402 /// the Component Rules will be violated.
37403 /// </summary>
37404 public YesNoType MultiInstance
37405 {
37406 get
37407 {
37408 return this.multiInstanceField;
37409 }
37410 set
37411 {
37412 this.multiInstanceFieldSet = true;
37413 this.multiInstanceField = value;
37414 }
37415 }
37416
37417 /// <summary>
37418 /// If this attribute is set to 'yes', the installer does not install or reinstall the
37419 /// component if a key path file or a key path registry entry for the component already
37420 /// exists. The application does register itself as a client of the component. Use this
37421 /// flag only for components that are being registered by the Registry table. Do not use
37422 /// this flag for components registered by the AppId, Class, Extension, ProgId, MIME, and
37423 /// Verb tables.
37424 /// </summary>
37425 public YesNoType NeverOverwrite
37426 {
37427 get
37428 {
37429 return this.neverOverwriteField;
37430 }
37431 set
37432 {
37433 this.neverOverwriteFieldSet = true;
37434 this.neverOverwriteField = value;
37435 }
37436 }
37437
37438 /// <summary>
37439 /// If this attribute is set to 'yes', the installer does not remove the component during
37440 /// an uninstall. The installer registers an extra system client for the component in
37441 /// the Windows Installer registry settings (which basically just means that at least one
37442 /// product is always referencing this component). Note that this option differs from the
37443 /// behavior of not setting a guid because although the component is permanent, it is still
37444 /// patchable (because Windows Installer still tracks it), it's just not uninstallable.
37445 /// </summary>
37446 public YesNoType Permanent
37447 {
37448 get
37449 {
37450 return this.permanentField;
37451 }
37452 set
37453 {
37454 this.permanentFieldSet = true;
37455 this.permanentField = value;
37456 }
37457 }
37458
37459 /// <summary>
37460 /// If this attribute's value is set to 'yes', enables advanced patching semantics for
37461 /// Components that are shared across multiple Products. Specifically, the Windows Installer
37462 /// will cache the shared files to improve patch uninstall. This functionality is available
37463 /// in Windows Installer 4.5 and later.
37464 /// </summary>
37465 public YesNoType Shared
37466 {
37467 get
37468 {
37469 return this.sharedField;
37470 }
37471 set
37472 {
37473 this.sharedFieldSet = true;
37474 this.sharedField = value;
37475 }
37476 }
37477
37478 /// <summary>
37479 /// If this attribute's value is set to 'yes', the installer increments the reference count
37480 /// in the shared DLL registry of the component's key file. If this bit is not set, the
37481 /// installer increments the reference count only if the reference count already exists.
37482 /// </summary>
37483 public YesNoType SharedDllRefCount
37484 {
37485 get
37486 {
37487 return this.sharedDllRefCountField;
37488 }
37489 set
37490 {
37491 this.sharedDllRefCountFieldSet = true;
37492 this.sharedDllRefCountField = value;
37493 }
37494 }
37495
37496 /// <summary>
37497 /// If this attribute is set to 'yes', the installer reevaluates the value of the statement
37498 /// in the Condition upon a reinstall. If the value was previously False and has changed to
37499 /// True, the installer installs the component. If the value was previously True and has
37500 /// changed to False, the installer removes the component even if the component has other
37501 /// products as clients.
37502 /// </summary>
37503 public YesNoType Transitive
37504 {
37505 get
37506 {
37507 return this.transitiveField;
37508 }
37509 set
37510 {
37511 this.transitiveFieldSet = true;
37512 this.transitiveField = value;
37513 }
37514 }
37515
37516 /// <summary>
37517 /// If this attribute is set to 'yes', the installer will uninstall the Component's files
37518 /// and registry keys when it is superseded by a patch. This functionality is available in
37519 /// Windows Installer 4.5 and later.
37520 /// </summary>
37521 public YesNoType UninstallWhenSuperseded
37522 {
37523 get
37524 {
37525 return this.uninstallWhenSupersededField;
37526 }
37527 set
37528 {
37529 this.uninstallWhenSupersededFieldSet = true;
37530 this.uninstallWhenSupersededField = value;
37531 }
37532 }
37533
37534 /// <summary>
37535 /// Set this attribute to 'yes' to mark this as a 64-bit component. This attribute facilitates
37536 /// the installation of packages that include both 32-bit and 64-bit components. If this is a 64-bit
37537 /// component replacing a 32-bit component, set this attribute to 'yes' and assign a new GUID in the Guid attribute.
37538 /// The default value is based on the platform set by the -arch switch to candle.exe
37539 /// or the InstallerPlatform property in a .wixproj MSBuild project:
37540 /// For x86 and ARM, the default value is 'no'.
37541 /// For x64 and IA64, the default value is 'yes'.
37542 /// </summary>
37543 public YesNoType Win64
37544 {
37545 get
37546 {
37547 return this.win64Field;
37548 }
37549 set
37550 {
37551 this.win64FieldSet = true;
37552 this.win64Field = value;
37553 }
37554 }
37555
37556 public virtual ISchemaElement ParentElement
37557 {
37558 get
37559 {
37560 return this.parentElement;
37561 }
37562 set
37563 {
37564 this.parentElement = value;
37565 }
37566 }
37567
37568 public virtual void AddChild(ISchemaElement child)
37569 {
37570 if ((null == child))
37571 {
37572 throw new ArgumentNullException("child");
37573 }
37574 this.children.AddElement(child);
37575 child.ParentElement = this;
37576 }
37577
37578 public virtual void RemoveChild(ISchemaElement child)
37579 {
37580 if ((null == child))
37581 {
37582 throw new ArgumentNullException("child");
37583 }
37584 this.children.RemoveElement(child);
37585 child.ParentElement = null;
37586 }
37587
37588 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
37589 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
37590 ISchemaElement ICreateChildren.CreateChild(string childName)
37591 {
37592 if (String.IsNullOrEmpty(childName))
37593 {
37594 throw new ArgumentNullException("childName");
37595 }
37596 ISchemaElement childValue = null;
37597 if (("AppId" == childName))
37598 {
37599 childValue = new AppId();
37600 }
37601 if (("Category" == childName))
37602 {
37603 childValue = new Category();
37604 }
37605 if (("Class" == childName))
37606 {
37607 childValue = new Class();
37608 }
37609 if (("Condition" == childName))
37610 {
37611 childValue = new Condition();
37612 }
37613 if (("CopyFile" == childName))
37614 {
37615 childValue = new CopyFile();
37616 }
37617 if (("CreateFolder" == childName))
37618 {
37619 childValue = new CreateFolder();
37620 }
37621 if (("Environment" == childName))
37622 {
37623 childValue = new Environment();
37624 }
37625 if (("Extension" == childName))
37626 {
37627 childValue = new Extension();
37628 }
37629 if (("File" == childName))
37630 {
37631 childValue = new File();
37632 }
37633 if (("IniFile" == childName))
37634 {
37635 childValue = new IniFile();
37636 }
37637 if (("Interface" == childName))
37638 {
37639 childValue = new Interface();
37640 }
37641 if (("IsolateComponent" == childName))
37642 {
37643 childValue = new IsolateComponent();
37644 }
37645 if (("ODBCDataSource" == childName))
37646 {
37647 childValue = new ODBCDataSource();
37648 }
37649 if (("ODBCDriver" == childName))
37650 {
37651 childValue = new ODBCDriver();
37652 }
37653 if (("ODBCTranslator" == childName))
37654 {
37655 childValue = new ODBCTranslator();
37656 }
37657 if (("ProgId" == childName))
37658 {
37659 childValue = new ProgId();
37660 }
37661 if (("Registry" == childName))
37662 {
37663 childValue = new Registry();
37664 }
37665 if (("RegistryKey" == childName))
37666 {
37667 childValue = new RegistryKey();
37668 }
37669 if (("RegistryValue" == childName))
37670 {
37671 childValue = new RegistryValue();
37672 }
37673 if (("RemoveFile" == childName))
37674 {
37675 childValue = new RemoveFile();
37676 }
37677 if (("RemoveFolder" == childName))
37678 {
37679 childValue = new RemoveFolder();
37680 }
37681 if (("RemoveRegistryKey" == childName))
37682 {
37683 childValue = new RemoveRegistryKey();
37684 }
37685 if (("RemoveRegistryValue" == childName))
37686 {
37687 childValue = new RemoveRegistryValue();
37688 }
37689 if (("ReserveCost" == childName))
37690 {
37691 childValue = new ReserveCost();
37692 }
37693 if (("ServiceControl" == childName))
37694 {
37695 childValue = new ServiceControl();
37696 }
37697 if (("ServiceConfig" == childName))
37698 {
37699 childValue = new ServiceConfig();
37700 }
37701 if (("ServiceConfigFailureActions" == childName))
37702 {
37703 childValue = new ServiceConfigFailureActions();
37704 }
37705 if (("ServiceInstall" == childName))
37706 {
37707 childValue = new ServiceInstall();
37708 }
37709 if (("Shortcut" == childName))
37710 {
37711 childValue = new Shortcut();
37712 }
37713 if (("SymbolPath" == childName))
37714 {
37715 childValue = new SymbolPath();
37716 }
37717 if (("TypeLib" == childName))
37718 {
37719 childValue = new TypeLib();
37720 }
37721 if ((null == childValue))
37722 {
37723 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
37724 }
37725 return childValue;
37726 }
37727
37728 /// <summary>
37729 /// Parses a LocationType from a string.
37730 /// </summary>
37731 public static LocationType ParseLocationType(string value)
37732 {
37733 LocationType parsedValue;
37734 Component.TryParseLocationType(value, out parsedValue);
37735 return parsedValue;
37736 }
37737
37738 /// <summary>
37739 /// Tries to parse a LocationType from a string.
37740 /// </summary>
37741 public static bool TryParseLocationType(string value, out LocationType parsedValue)
37742 {
37743 parsedValue = LocationType.NotSet;
37744 if (string.IsNullOrEmpty(value))
37745 {
37746 return false;
37747 }
37748 if (("local" == value))
37749 {
37750 parsedValue = LocationType.local;
37751 }
37752 else
37753 {
37754 if (("source" == value))
37755 {
37756 parsedValue = LocationType.source;
37757 }
37758 else
37759 {
37760 if (("either" == value))
37761 {
37762 parsedValue = LocationType.either;
37763 }
37764 else
37765 {
37766 parsedValue = LocationType.IllegalValue;
37767 return false;
37768 }
37769 }
37770 }
37771 return true;
37772 }
37773
37774 /// <summary>
37775 /// Processes this element and all child elements into an XmlWriter.
37776 /// </summary>
37777 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
37778 public virtual void OutputXml(XmlWriter writer)
37779 {
37780 if ((null == writer))
37781 {
37782 throw new ArgumentNullException("writer");
37783 }
37784 writer.WriteStartElement("Component", "http://wixtoolset.org/schemas/v4/wxs");
37785 if (this.idFieldSet)
37786 {
37787 writer.WriteAttributeString("Id", this.idField);
37788 }
37789 if (this.comPlusFlagsFieldSet)
37790 {
37791 writer.WriteAttributeString("ComPlusFlags", this.comPlusFlagsField.ToString(CultureInfo.InvariantCulture));
37792 }
37793 if (this.disableRegistryReflectionFieldSet)
37794 {
37795 if ((this.disableRegistryReflectionField == YesNoType.no))
37796 {
37797 writer.WriteAttributeString("DisableRegistryReflection", "no");
37798 }
37799 if ((this.disableRegistryReflectionField == YesNoType.yes))
37800 {
37801 writer.WriteAttributeString("DisableRegistryReflection", "yes");
37802 }
37803 }
37804 if (this.directoryFieldSet)
37805 {
37806 writer.WriteAttributeString("Directory", this.directoryField);
37807 }
37808 if (this.diskIdFieldSet)
37809 {
37810 writer.WriteAttributeString("DiskId", this.diskIdField);
37811 }
37812 if (this.featureFieldSet)
37813 {
37814 writer.WriteAttributeString("Feature", this.featureField);
37815 }
37816 if (this.guidFieldSet)
37817 {
37818 writer.WriteAttributeString("Guid", this.guidField);
37819 }
37820 if (this.keyPathFieldSet)
37821 {
37822 if ((this.keyPathField == YesNoType.no))
37823 {
37824 writer.WriteAttributeString("KeyPath", "no");
37825 }
37826 if ((this.keyPathField == YesNoType.yes))
37827 {
37828 writer.WriteAttributeString("KeyPath", "yes");
37829 }
37830 }
37831 if (this.locationFieldSet)
37832 {
37833 if ((this.locationField == LocationType.local))
37834 {
37835 writer.WriteAttributeString("Location", "local");
37836 }
37837 if ((this.locationField == LocationType.source))
37838 {
37839 writer.WriteAttributeString("Location", "source");
37840 }
37841 if ((this.locationField == LocationType.either))
37842 {
37843 writer.WriteAttributeString("Location", "either");
37844 }
37845 }
37846 if (this.multiInstanceFieldSet)
37847 {
37848 if ((this.multiInstanceField == YesNoType.no))
37849 {
37850 writer.WriteAttributeString("MultiInstance", "no");
37851 }
37852 if ((this.multiInstanceField == YesNoType.yes))
37853 {
37854 writer.WriteAttributeString("MultiInstance", "yes");
37855 }
37856 }
37857 if (this.neverOverwriteFieldSet)
37858 {
37859 if ((this.neverOverwriteField == YesNoType.no))
37860 {
37861 writer.WriteAttributeString("NeverOverwrite", "no");
37862 }
37863 if ((this.neverOverwriteField == YesNoType.yes))
37864 {
37865 writer.WriteAttributeString("NeverOverwrite", "yes");
37866 }
37867 }
37868 if (this.permanentFieldSet)
37869 {
37870 if ((this.permanentField == YesNoType.no))
37871 {
37872 writer.WriteAttributeString("Permanent", "no");
37873 }
37874 if ((this.permanentField == YesNoType.yes))
37875 {
37876 writer.WriteAttributeString("Permanent", "yes");
37877 }
37878 }
37879 if (this.sharedFieldSet)
37880 {
37881 if ((this.sharedField == YesNoType.no))
37882 {
37883 writer.WriteAttributeString("Shared", "no");
37884 }
37885 if ((this.sharedField == YesNoType.yes))
37886 {
37887 writer.WriteAttributeString("Shared", "yes");
37888 }
37889 }
37890 if (this.sharedDllRefCountFieldSet)
37891 {
37892 if ((this.sharedDllRefCountField == YesNoType.no))
37893 {
37894 writer.WriteAttributeString("SharedDllRefCount", "no");
37895 }
37896 if ((this.sharedDllRefCountField == YesNoType.yes))
37897 {
37898 writer.WriteAttributeString("SharedDllRefCount", "yes");
37899 }
37900 }
37901 if (this.transitiveFieldSet)
37902 {
37903 if ((this.transitiveField == YesNoType.no))
37904 {
37905 writer.WriteAttributeString("Transitive", "no");
37906 }
37907 if ((this.transitiveField == YesNoType.yes))
37908 {
37909 writer.WriteAttributeString("Transitive", "yes");
37910 }
37911 }
37912 if (this.uninstallWhenSupersededFieldSet)
37913 {
37914 if ((this.uninstallWhenSupersededField == YesNoType.no))
37915 {
37916 writer.WriteAttributeString("UninstallWhenSuperseded", "no");
37917 }
37918 if ((this.uninstallWhenSupersededField == YesNoType.yes))
37919 {
37920 writer.WriteAttributeString("UninstallWhenSuperseded", "yes");
37921 }
37922 }
37923 if (this.win64FieldSet)
37924 {
37925 if ((this.win64Field == YesNoType.no))
37926 {
37927 writer.WriteAttributeString("Win64", "no");
37928 }
37929 if ((this.win64Field == YesNoType.yes))
37930 {
37931 writer.WriteAttributeString("Win64", "yes");
37932 }
37933 }
37934 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
37935 {
37936 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
37937 childElement.OutputXml(writer);
37938 }
37939 writer.WriteEndElement();
37940 }
37941
37942 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
37943 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
37944 void ISetAttributes.SetAttribute(string name, string value)
37945 {
37946 if (String.IsNullOrEmpty(name))
37947 {
37948 throw new ArgumentNullException("name");
37949 }
37950 if (("Id" == name))
37951 {
37952 this.idField = value;
37953 this.idFieldSet = true;
37954 }
37955 if (("ComPlusFlags" == name))
37956 {
37957 this.comPlusFlagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
37958 this.comPlusFlagsFieldSet = true;
37959 }
37960 if (("DisableRegistryReflection" == name))
37961 {
37962 this.disableRegistryReflectionField = Enums.ParseYesNoType(value);
37963 this.disableRegistryReflectionFieldSet = true;
37964 }
37965 if (("Directory" == name))
37966 {
37967 this.directoryField = value;
37968 this.directoryFieldSet = true;
37969 }
37970 if (("DiskId" == name))
37971 {
37972 this.diskIdField = value;
37973 this.diskIdFieldSet = true;
37974 }
37975 if (("Feature" == name))
37976 {
37977 this.featureField = value;
37978 this.featureFieldSet = true;
37979 }
37980 if (("Guid" == name))
37981 {
37982 this.guidField = value;
37983 this.guidFieldSet = true;
37984 }
37985 if (("KeyPath" == name))
37986 {
37987 this.keyPathField = Enums.ParseYesNoType(value);
37988 this.keyPathFieldSet = true;
37989 }
37990 if (("Location" == name))
37991 {
37992 this.locationField = Component.ParseLocationType(value);
37993 this.locationFieldSet = true;
37994 }
37995 if (("MultiInstance" == name))
37996 {
37997 this.multiInstanceField = Enums.ParseYesNoType(value);
37998 this.multiInstanceFieldSet = true;
37999 }
38000 if (("NeverOverwrite" == name))
38001 {
38002 this.neverOverwriteField = Enums.ParseYesNoType(value);
38003 this.neverOverwriteFieldSet = true;
38004 }
38005 if (("Permanent" == name))
38006 {
38007 this.permanentField = Enums.ParseYesNoType(value);
38008 this.permanentFieldSet = true;
38009 }
38010 if (("Shared" == name))
38011 {
38012 this.sharedField = Enums.ParseYesNoType(value);
38013 this.sharedFieldSet = true;
38014 }
38015 if (("SharedDllRefCount" == name))
38016 {
38017 this.sharedDllRefCountField = Enums.ParseYesNoType(value);
38018 this.sharedDllRefCountFieldSet = true;
38019 }
38020 if (("Transitive" == name))
38021 {
38022 this.transitiveField = Enums.ParseYesNoType(value);
38023 this.transitiveFieldSet = true;
38024 }
38025 if (("UninstallWhenSuperseded" == name))
38026 {
38027 this.uninstallWhenSupersededField = Enums.ParseYesNoType(value);
38028 this.uninstallWhenSupersededFieldSet = true;
38029 }
38030 if (("Win64" == name))
38031 {
38032 this.win64Field = Enums.ParseYesNoType(value);
38033 this.win64FieldSet = true;
38034 }
38035 }
38036
38037 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38038 public enum LocationType
38039 {
38040
38041 IllegalValue = int.MaxValue,
38042
38043 NotSet = -1,
38044
38045 /// <summary>
38046 /// Prevents the component from running from the source or the network (this is the default behavior if this attribute is not set).
38047 /// </summary>
38048 local,
38049
38050 /// <summary>
38051 /// Enforces that the component can only be run from the source (it cannot be run from the user's computer).
38052 /// </summary>
38053 source,
38054
38055 /// <summary>
38056 /// Allows the component to run from source or locally.
38057 /// </summary>
38058 either,
38059 }
38060 }
38061
38062 /// <summary>
38063 /// Groups together multiple components to be used in other locations.
38064 /// </summary>
38065 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38066 public class ComponentGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
38067 {
38068
38069 private ElementCollection children;
38070
38071 private string idField;
38072
38073 private bool idFieldSet;
38074
38075 private string directoryField;
38076
38077 private bool directoryFieldSet;
38078
38079 private string sourceField;
38080
38081 private bool sourceFieldSet;
38082
38083 private ISchemaElement parentElement;
38084
38085 public ComponentGroup()
38086 {
38087 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
38088 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
38089 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef)));
38090 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
38091 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
38092 this.children = childCollection0;
38093 }
38094
38095 public virtual IEnumerable Children
38096 {
38097 get
38098 {
38099 return this.children;
38100 }
38101 }
38102
38103 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
38104 public virtual IEnumerable this[System.Type childType]
38105 {
38106 get
38107 {
38108 return this.children.Filter(childType);
38109 }
38110 }
38111
38112 /// <summary>
38113 /// Identifier for the ComponentGroup.
38114 /// </summary>
38115 public string Id
38116 {
38117 get
38118 {
38119 return this.idField;
38120 }
38121 set
38122 {
38123 this.idFieldSet = true;
38124 this.idField = value;
38125 }
38126 }
38127
38128 /// <summary>
38129 /// Sets the default directory identifier for child Component elements.
38130 /// </summary>
38131 public string Directory
38132 {
38133 get
38134 {
38135 return this.directoryField;
38136 }
38137 set
38138 {
38139 this.directoryFieldSet = true;
38140 this.directoryField = value;
38141 }
38142 }
38143
38144 /// <summary>
38145 /// Used to set the default file system source for child Component elements. For more information, see
38146 /// </summary>
38147 public string Source
38148 {
38149 get
38150 {
38151 return this.sourceField;
38152 }
38153 set
38154 {
38155 this.sourceFieldSet = true;
38156 this.sourceField = value;
38157 }
38158 }
38159
38160 public virtual ISchemaElement ParentElement
38161 {
38162 get
38163 {
38164 return this.parentElement;
38165 }
38166 set
38167 {
38168 this.parentElement = value;
38169 }
38170 }
38171
38172 public virtual void AddChild(ISchemaElement child)
38173 {
38174 if ((null == child))
38175 {
38176 throw new ArgumentNullException("child");
38177 }
38178 this.children.AddElement(child);
38179 child.ParentElement = this;
38180 }
38181
38182 public virtual void RemoveChild(ISchemaElement child)
38183 {
38184 if ((null == child))
38185 {
38186 throw new ArgumentNullException("child");
38187 }
38188 this.children.RemoveElement(child);
38189 child.ParentElement = null;
38190 }
38191
38192 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38193 ISchemaElement ICreateChildren.CreateChild(string childName)
38194 {
38195 if (String.IsNullOrEmpty(childName))
38196 {
38197 throw new ArgumentNullException("childName");
38198 }
38199 ISchemaElement childValue = null;
38200 if (("Component" == childName))
38201 {
38202 childValue = new Component();
38203 }
38204 if (("ComponentGroupRef" == childName))
38205 {
38206 childValue = new ComponentGroupRef();
38207 }
38208 if (("ComponentRef" == childName))
38209 {
38210 childValue = new ComponentRef();
38211 }
38212 if ((null == childValue))
38213 {
38214 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
38215 }
38216 return childValue;
38217 }
38218
38219 /// <summary>
38220 /// Processes this element and all child elements into an XmlWriter.
38221 /// </summary>
38222 public virtual void OutputXml(XmlWriter writer)
38223 {
38224 if ((null == writer))
38225 {
38226 throw new ArgumentNullException("writer");
38227 }
38228 writer.WriteStartElement("ComponentGroup", "http://wixtoolset.org/schemas/v4/wxs");
38229 if (this.idFieldSet)
38230 {
38231 writer.WriteAttributeString("Id", this.idField);
38232 }
38233 if (this.directoryFieldSet)
38234 {
38235 writer.WriteAttributeString("Directory", this.directoryField);
38236 }
38237 if (this.sourceFieldSet)
38238 {
38239 writer.WriteAttributeString("Source", this.sourceField);
38240 }
38241 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
38242 {
38243 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
38244 childElement.OutputXml(writer);
38245 }
38246 writer.WriteEndElement();
38247 }
38248
38249 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38250 void ISetAttributes.SetAttribute(string name, string value)
38251 {
38252 if (String.IsNullOrEmpty(name))
38253 {
38254 throw new ArgumentNullException("name");
38255 }
38256 if (("Id" == name))
38257 {
38258 this.idField = value;
38259 this.idFieldSet = true;
38260 }
38261 if (("Directory" == name))
38262 {
38263 this.directoryField = value;
38264 this.directoryFieldSet = true;
38265 }
38266 if (("Source" == name))
38267 {
38268 this.sourceField = value;
38269 this.sourceFieldSet = true;
38270 }
38271 }
38272 }
38273
38274 /// <summary>
38275 /// Create a reference to a ComponentGroup in another Fragment.
38276 /// </summary>
38277 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38278 public class ComponentGroupRef : ISchemaElement, ISetAttributes
38279 {
38280
38281 private string idField;
38282
38283 private bool idFieldSet;
38284
38285 private YesNoType primaryField;
38286
38287 private bool primaryFieldSet;
38288
38289 private ISchemaElement parentElement;
38290
38291 /// <summary>
38292 /// The identifier of the ComponentGroup to reference.
38293 /// </summary>
38294 public string Id
38295 {
38296 get
38297 {
38298 return this.idField;
38299 }
38300 set
38301 {
38302 this.idFieldSet = true;
38303 this.idField = value;
38304 }
38305 }
38306
38307 /// <summary>
38308 /// Set this attribute to 'yes' in order to make the parent feature of this component
38309 /// the primary feature for this component. Components may belong to multiple features.
38310 /// By designating a feature as the primary feature of a component, you ensure that
38311 /// whenever a component is selected for install-on-demand (IOD), the primary feature
38312 /// will be the one to install it. This attribute should only be set if a component
38313 /// actually nests under multiple features. If a component nests under only one feature,
38314 /// that feature is the primary feature for the component. You cannot set more than one
38315 /// feature as the primary feature of a given component.
38316 /// </summary>
38317 public YesNoType Primary
38318 {
38319 get
38320 {
38321 return this.primaryField;
38322 }
38323 set
38324 {
38325 this.primaryFieldSet = true;
38326 this.primaryField = value;
38327 }
38328 }
38329
38330 public virtual ISchemaElement ParentElement
38331 {
38332 get
38333 {
38334 return this.parentElement;
38335 }
38336 set
38337 {
38338 this.parentElement = value;
38339 }
38340 }
38341
38342 /// <summary>
38343 /// Processes this element and all child elements into an XmlWriter.
38344 /// </summary>
38345 public virtual void OutputXml(XmlWriter writer)
38346 {
38347 if ((null == writer))
38348 {
38349 throw new ArgumentNullException("writer");
38350 }
38351 writer.WriteStartElement("ComponentGroupRef", "http://wixtoolset.org/schemas/v4/wxs");
38352 if (this.idFieldSet)
38353 {
38354 writer.WriteAttributeString("Id", this.idField);
38355 }
38356 if (this.primaryFieldSet)
38357 {
38358 if ((this.primaryField == YesNoType.no))
38359 {
38360 writer.WriteAttributeString("Primary", "no");
38361 }
38362 if ((this.primaryField == YesNoType.yes))
38363 {
38364 writer.WriteAttributeString("Primary", "yes");
38365 }
38366 }
38367 writer.WriteEndElement();
38368 }
38369
38370 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38371 void ISetAttributes.SetAttribute(string name, string value)
38372 {
38373 if (String.IsNullOrEmpty(name))
38374 {
38375 throw new ArgumentNullException("name");
38376 }
38377 if (("Id" == name))
38378 {
38379 this.idField = value;
38380 this.idFieldSet = true;
38381 }
38382 if (("Primary" == name))
38383 {
38384 this.primaryField = Enums.ParseYesNoType(value);
38385 this.primaryFieldSet = true;
38386 }
38387 }
38388 }
38389
38390 /// <summary>
38391 /// Used only for PatchFamilies to include all changes between the baseline and upgraded packages in a patch.
38392 /// </summary>
38393 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38394 public class All : ISetAttributes, ISchemaElement
38395 {
38396
38397 private ISchemaElement parentElement;
38398
38399 private string contentField;
38400
38401 private bool contentFieldSet;
38402
38403 public virtual ISchemaElement ParentElement
38404 {
38405 get
38406 {
38407 return this.parentElement;
38408 }
38409 set
38410 {
38411 this.parentElement = value;
38412 }
38413 }
38414
38415 /// <summary>
38416 /// Used only for PatchFamilies to include all changes between the baseline and upgraded packages in a patch.
38417 /// </summary>
38418 public string Content
38419 {
38420 get
38421 {
38422 return this.contentField;
38423 }
38424 set
38425 {
38426 this.contentFieldSet = true;
38427 this.contentField = value;
38428 }
38429 }
38430
38431 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38432 void ISetAttributes.SetAttribute(string name, string value)
38433 {
38434 if (String.IsNullOrEmpty(name))
38435 {
38436 throw new ArgumentNullException("name");
38437 }
38438 if (("Content" == name))
38439 {
38440 this.contentField = value;
38441 this.contentFieldSet = true;
38442 }
38443 }
38444
38445 /// <summary>
38446 /// Processes this element and all child elements into an XmlWriter.
38447 /// </summary>
38448 public virtual void OutputXml(XmlWriter writer)
38449 {
38450 if ((null == writer))
38451 {
38452 throw new ArgumentNullException("writer");
38453 }
38454 writer.WriteStartElement("All", "http://wixtoolset.org/schemas/v4/wxs");
38455 if (this.contentFieldSet)
38456 {
38457 writer.WriteString(this.contentField);
38458 }
38459 writer.WriteEndElement();
38460 }
38461 }
38462
38463 /// <summary>
38464 /// Used only for PatchFamilies to include only a binary table entry in a patch.
38465 /// </summary>
38466 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38467 public class BinaryRef : ISchemaElement, ISetAttributes
38468 {
38469
38470 private string idField;
38471
38472 private bool idFieldSet;
38473
38474 private ISchemaElement parentElement;
38475
38476 /// <summary>
38477 /// The identifier of the Binary element to reference.
38478 /// </summary>
38479 public string Id
38480 {
38481 get
38482 {
38483 return this.idField;
38484 }
38485 set
38486 {
38487 this.idFieldSet = true;
38488 this.idField = value;
38489 }
38490 }
38491
38492 public virtual ISchemaElement ParentElement
38493 {
38494 get
38495 {
38496 return this.parentElement;
38497 }
38498 set
38499 {
38500 this.parentElement = value;
38501 }
38502 }
38503
38504 /// <summary>
38505 /// Processes this element and all child elements into an XmlWriter.
38506 /// </summary>
38507 public virtual void OutputXml(XmlWriter writer)
38508 {
38509 if ((null == writer))
38510 {
38511 throw new ArgumentNullException("writer");
38512 }
38513 writer.WriteStartElement("BinaryRef", "http://wixtoolset.org/schemas/v4/wxs");
38514 if (this.idFieldSet)
38515 {
38516 writer.WriteAttributeString("Id", this.idField);
38517 }
38518 writer.WriteEndElement();
38519 }
38520
38521 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38522 void ISetAttributes.SetAttribute(string name, string value)
38523 {
38524 if (String.IsNullOrEmpty(name))
38525 {
38526 throw new ArgumentNullException("name");
38527 }
38528 if (("Id" == name))
38529 {
38530 this.idField = value;
38531 this.idFieldSet = true;
38532 }
38533 }
38534 }
38535
38536 /// <summary>
38537 /// Used only for PatchFamilies to include only a icon table entry in a patch.
38538 /// </summary>
38539 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38540 public class IconRef : ISchemaElement, ISetAttributes
38541 {
38542
38543 private string idField;
38544
38545 private bool idFieldSet;
38546
38547 private ISchemaElement parentElement;
38548
38549 /// <summary>
38550 /// The identifier of the Icon element to reference.
38551 /// </summary>
38552 public string Id
38553 {
38554 get
38555 {
38556 return this.idField;
38557 }
38558 set
38559 {
38560 this.idFieldSet = true;
38561 this.idField = value;
38562 }
38563 }
38564
38565 public virtual ISchemaElement ParentElement
38566 {
38567 get
38568 {
38569 return this.parentElement;
38570 }
38571 set
38572 {
38573 this.parentElement = value;
38574 }
38575 }
38576
38577 /// <summary>
38578 /// Processes this element and all child elements into an XmlWriter.
38579 /// </summary>
38580 public virtual void OutputXml(XmlWriter writer)
38581 {
38582 if ((null == writer))
38583 {
38584 throw new ArgumentNullException("writer");
38585 }
38586 writer.WriteStartElement("IconRef", "http://wixtoolset.org/schemas/v4/wxs");
38587 if (this.idFieldSet)
38588 {
38589 writer.WriteAttributeString("Id", this.idField);
38590 }
38591 writer.WriteEndElement();
38592 }
38593
38594 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38595 void ISetAttributes.SetAttribute(string name, string value)
38596 {
38597 if (String.IsNullOrEmpty(name))
38598 {
38599 throw new ArgumentNullException("name");
38600 }
38601 if (("Id" == name))
38602 {
38603 this.idField = value;
38604 this.idFieldSet = true;
38605 }
38606 }
38607 }
38608
38609 /// <summary>
38610 /// Create a reference to a Feature element in another Fragment.
38611 /// </summary>
38612 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38613 public class ComponentRef : ISchemaElement, ISetAttributes
38614 {
38615
38616 private string idField;
38617
38618 private bool idFieldSet;
38619
38620 private YesNoType primaryField;
38621
38622 private bool primaryFieldSet;
38623
38624 private ISchemaElement parentElement;
38625
38626 /// <summary>
38627 /// The identifier of the Component element to reference.
38628 /// </summary>
38629 public string Id
38630 {
38631 get
38632 {
38633 return this.idField;
38634 }
38635 set
38636 {
38637 this.idFieldSet = true;
38638 this.idField = value;
38639 }
38640 }
38641
38642 /// <summary>
38643 /// Set this attribute to 'yes' in order to make the parent feature of this component
38644 /// the primary feature for this component. Components may belong to multiple features.
38645 /// By designating a feature as the primary feature of a component, you ensure that
38646 /// whenever a component is selected for install-on-demand (IOD), the primary feature
38647 /// will be the one to install it. This attribute should only be set if a component
38648 /// actually nests under multiple features. If a component nests under only one feature,
38649 /// that feature is the primary feature for the component. You cannot set more than one
38650 /// feature as the primary feature of a given component.
38651 /// </summary>
38652 public YesNoType Primary
38653 {
38654 get
38655 {
38656 return this.primaryField;
38657 }
38658 set
38659 {
38660 this.primaryFieldSet = true;
38661 this.primaryField = value;
38662 }
38663 }
38664
38665 public virtual ISchemaElement ParentElement
38666 {
38667 get
38668 {
38669 return this.parentElement;
38670 }
38671 set
38672 {
38673 this.parentElement = value;
38674 }
38675 }
38676
38677 /// <summary>
38678 /// Processes this element and all child elements into an XmlWriter.
38679 /// </summary>
38680 public virtual void OutputXml(XmlWriter writer)
38681 {
38682 if ((null == writer))
38683 {
38684 throw new ArgumentNullException("writer");
38685 }
38686 writer.WriteStartElement("ComponentRef", "http://wixtoolset.org/schemas/v4/wxs");
38687 if (this.idFieldSet)
38688 {
38689 writer.WriteAttributeString("Id", this.idField);
38690 }
38691 if (this.primaryFieldSet)
38692 {
38693 if ((this.primaryField == YesNoType.no))
38694 {
38695 writer.WriteAttributeString("Primary", "no");
38696 }
38697 if ((this.primaryField == YesNoType.yes))
38698 {
38699 writer.WriteAttributeString("Primary", "yes");
38700 }
38701 }
38702 writer.WriteEndElement();
38703 }
38704
38705 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38706 void ISetAttributes.SetAttribute(string name, string value)
38707 {
38708 if (String.IsNullOrEmpty(name))
38709 {
38710 throw new ArgumentNullException("name");
38711 }
38712 if (("Id" == name))
38713 {
38714 this.idField = value;
38715 this.idFieldSet = true;
38716 }
38717 if (("Primary" == name))
38718 {
38719 this.primaryField = Enums.ParseYesNoType(value);
38720 this.primaryFieldSet = true;
38721 }
38722 }
38723 }
38724
38725 /// <summary>
38726 /// Merge directive to bring in a merge module that will be redirected to the parent directory.
38727 /// </summary>
38728 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
38729 public class Merge : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
38730 {
38731
38732 private ElementCollection children;
38733
38734 private string idField;
38735
38736 private bool idFieldSet;
38737
38738 private string diskIdField;
38739
38740 private bool diskIdFieldSet;
38741
38742 private YesNoType fileCompressionField;
38743
38744 private bool fileCompressionFieldSet;
38745
38746 private string languageField;
38747
38748 private bool languageFieldSet;
38749
38750 private string sourceFileField;
38751
38752 private bool sourceFileFieldSet;
38753
38754 private string srcField;
38755
38756 private bool srcFieldSet;
38757
38758 private ISchemaElement parentElement;
38759
38760 public Merge()
38761 {
38762 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
38763 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ConfigurationData)));
38764 this.children = childCollection0;
38765 }
38766
38767 public virtual IEnumerable Children
38768 {
38769 get
38770 {
38771 return this.children;
38772 }
38773 }
38774
38775 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
38776 public virtual IEnumerable this[System.Type childType]
38777 {
38778 get
38779 {
38780 return this.children.Filter(childType);
38781 }
38782 }
38783
38784 /// <summary>
38785 /// The unique identifier for the Merge element in the source code. Referenced by the MergeRef/@Id.
38786 /// </summary>
38787 public string Id
38788 {
38789 get
38790 {
38791 return this.idField;
38792 }
38793 set
38794 {
38795 this.idFieldSet = true;
38796 this.idField = value;
38797 }
38798 }
38799
38800 /// <summary>
38801 /// The value of this attribute should correspond to the Id attribute of a
38802 /// Media element authored elsewhere. By creating this connection between the merge module and Media
38803 /// element, you set the packaging options to the values specified in the Media
38804 /// element (values such as compression level, cab embedding, etc...).
38805 /// </summary>
38806 public string DiskId
38807 {
38808 get
38809 {
38810 return this.diskIdField;
38811 }
38812 set
38813 {
38814 this.diskIdFieldSet = true;
38815 this.diskIdField = value;
38816 }
38817 }
38818
38819 /// <summary>
38820 /// Specifies if the files in the merge module should be compressed.
38821 /// </summary>
38822 public YesNoType FileCompression
38823 {
38824 get
38825 {
38826 return this.fileCompressionField;
38827 }
38828 set
38829 {
38830 this.fileCompressionFieldSet = true;
38831 this.fileCompressionField = value;
38832 }
38833 }
38834
38835 /// <summary>
38836 /// Specifies the decimal LCID or localization token for the language to merge the Module in as.
38837 /// </summary>
38838 public string Language
38839 {
38840 get
38841 {
38842 return this.languageField;
38843 }
38844 set
38845 {
38846 this.languageFieldSet = true;
38847 this.languageField = value;
38848 }
38849 }
38850
38851 /// <summary>
38852 /// Path to the source location of the merge module.
38853 /// </summary>
38854 public string SourceFile
38855 {
38856 get
38857 {
38858 return this.sourceFileField;
38859 }
38860 set
38861 {
38862 this.sourceFileFieldSet = true;
38863 this.sourceFileField = value;
38864 }
38865 }
38866
38867 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
38868 public string src
38869 {
38870 get
38871 {
38872 return this.srcField;
38873 }
38874 set
38875 {
38876 this.srcFieldSet = true;
38877 this.srcField = value;
38878 }
38879 }
38880
38881 public virtual ISchemaElement ParentElement
38882 {
38883 get
38884 {
38885 return this.parentElement;
38886 }
38887 set
38888 {
38889 this.parentElement = value;
38890 }
38891 }
38892
38893 public virtual void AddChild(ISchemaElement child)
38894 {
38895 if ((null == child))
38896 {
38897 throw new ArgumentNullException("child");
38898 }
38899 this.children.AddElement(child);
38900 child.ParentElement = this;
38901 }
38902
38903 public virtual void RemoveChild(ISchemaElement child)
38904 {
38905 if ((null == child))
38906 {
38907 throw new ArgumentNullException("child");
38908 }
38909 this.children.RemoveElement(child);
38910 child.ParentElement = null;
38911 }
38912
38913 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38914 ISchemaElement ICreateChildren.CreateChild(string childName)
38915 {
38916 if (String.IsNullOrEmpty(childName))
38917 {
38918 throw new ArgumentNullException("childName");
38919 }
38920 ISchemaElement childValue = null;
38921 if (("ConfigurationData" == childName))
38922 {
38923 childValue = new ConfigurationData();
38924 }
38925 if ((null == childValue))
38926 {
38927 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
38928 }
38929 return childValue;
38930 }
38931
38932 /// <summary>
38933 /// Processes this element and all child elements into an XmlWriter.
38934 /// </summary>
38935 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
38936 public virtual void OutputXml(XmlWriter writer)
38937 {
38938 if ((null == writer))
38939 {
38940 throw new ArgumentNullException("writer");
38941 }
38942 writer.WriteStartElement("Merge", "http://wixtoolset.org/schemas/v4/wxs");
38943 if (this.idFieldSet)
38944 {
38945 writer.WriteAttributeString("Id", this.idField);
38946 }
38947 if (this.diskIdFieldSet)
38948 {
38949 writer.WriteAttributeString("DiskId", this.diskIdField);
38950 }
38951 if (this.fileCompressionFieldSet)
38952 {
38953 if ((this.fileCompressionField == YesNoType.no))
38954 {
38955 writer.WriteAttributeString("FileCompression", "no");
38956 }
38957 if ((this.fileCompressionField == YesNoType.yes))
38958 {
38959 writer.WriteAttributeString("FileCompression", "yes");
38960 }
38961 }
38962 if (this.languageFieldSet)
38963 {
38964 writer.WriteAttributeString("Language", this.languageField);
38965 }
38966 if (this.sourceFileFieldSet)
38967 {
38968 writer.WriteAttributeString("SourceFile", this.sourceFileField);
38969 }
38970 if (this.srcFieldSet)
38971 {
38972 writer.WriteAttributeString("src", this.srcField);
38973 }
38974 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
38975 {
38976 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
38977 childElement.OutputXml(writer);
38978 }
38979 writer.WriteEndElement();
38980 }
38981
38982 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
38983 void ISetAttributes.SetAttribute(string name, string value)
38984 {
38985 if (String.IsNullOrEmpty(name))
38986 {
38987 throw new ArgumentNullException("name");
38988 }
38989 if (("Id" == name))
38990 {
38991 this.idField = value;
38992 this.idFieldSet = true;
38993 }
38994 if (("DiskId" == name))
38995 {
38996 this.diskIdField = value;
38997 this.diskIdFieldSet = true;
38998 }
38999 if (("FileCompression" == name))
39000 {
39001 this.fileCompressionField = Enums.ParseYesNoType(value);
39002 this.fileCompressionFieldSet = true;
39003 }
39004 if (("Language" == name))
39005 {
39006 this.languageField = value;
39007 this.languageFieldSet = true;
39008 }
39009 if (("SourceFile" == name))
39010 {
39011 this.sourceFileField = value;
39012 this.sourceFileFieldSet = true;
39013 }
39014 if (("src" == name))
39015 {
39016 this.srcField = value;
39017 this.srcFieldSet = true;
39018 }
39019 }
39020 }
39021
39022 /// <summary>
39023 /// Merge reference to connect a Merge Module to parent Feature
39024 /// </summary>
39025 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
39026 public class MergeRef : ISchemaElement, ISetAttributes
39027 {
39028
39029 private string idField;
39030
39031 private bool idFieldSet;
39032
39033 private YesNoType primaryField;
39034
39035 private bool primaryFieldSet;
39036
39037 private ISchemaElement parentElement;
39038
39039 /// <summary>
39040 /// The unique identifier for the Merge element to be referenced.
39041 /// </summary>
39042 public string Id
39043 {
39044 get
39045 {
39046 return this.idField;
39047 }
39048 set
39049 {
39050 this.idFieldSet = true;
39051 this.idField = value;
39052 }
39053 }
39054
39055 /// <summary>
39056 /// Specifies whether the feature containing this MergeRef is the primary feature for advertising the merge module's components.
39057 /// </summary>
39058 public YesNoType Primary
39059 {
39060 get
39061 {
39062 return this.primaryField;
39063 }
39064 set
39065 {
39066 this.primaryFieldSet = true;
39067 this.primaryField = value;
39068 }
39069 }
39070
39071 public virtual ISchemaElement ParentElement
39072 {
39073 get
39074 {
39075 return this.parentElement;
39076 }
39077 set
39078 {
39079 this.parentElement = value;
39080 }
39081 }
39082
39083 /// <summary>
39084 /// Processes this element and all child elements into an XmlWriter.
39085 /// </summary>
39086 public virtual void OutputXml(XmlWriter writer)
39087 {
39088 if ((null == writer))
39089 {
39090 throw new ArgumentNullException("writer");
39091 }
39092 writer.WriteStartElement("MergeRef", "http://wixtoolset.org/schemas/v4/wxs");
39093 if (this.idFieldSet)
39094 {
39095 writer.WriteAttributeString("Id", this.idField);
39096 }
39097 if (this.primaryFieldSet)
39098 {
39099 if ((this.primaryField == YesNoType.no))
39100 {
39101 writer.WriteAttributeString("Primary", "no");
39102 }
39103 if ((this.primaryField == YesNoType.yes))
39104 {
39105 writer.WriteAttributeString("Primary", "yes");
39106 }
39107 }
39108 writer.WriteEndElement();
39109 }
39110
39111 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39112 void ISetAttributes.SetAttribute(string name, string value)
39113 {
39114 if (String.IsNullOrEmpty(name))
39115 {
39116 throw new ArgumentNullException("name");
39117 }
39118 if (("Id" == name))
39119 {
39120 this.idField = value;
39121 this.idFieldSet = true;
39122 }
39123 if (("Primary" == name))
39124 {
39125 this.primaryField = Enums.ParseYesNoType(value);
39126 this.primaryFieldSet = true;
39127 }
39128 }
39129 }
39130
39131 /// <summary>
39132 /// Data to use as input to a configurable merge module.
39133 /// </summary>
39134 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
39135 public class ConfigurationData : ISchemaElement, ISetAttributes
39136 {
39137
39138 private string nameField;
39139
39140 private bool nameFieldSet;
39141
39142 private string valueField;
39143
39144 private bool valueFieldSet;
39145
39146 private ISchemaElement parentElement;
39147
39148 /// <summary>
39149 /// Name of the item in the ModuleConfiguration table.
39150 /// </summary>
39151 public string Name
39152 {
39153 get
39154 {
39155 return this.nameField;
39156 }
39157 set
39158 {
39159 this.nameFieldSet = true;
39160 this.nameField = value;
39161 }
39162 }
39163
39164 /// <summary>
39165 /// Value to be passed to configurable merge module.
39166 /// </summary>
39167 public string Value
39168 {
39169 get
39170 {
39171 return this.valueField;
39172 }
39173 set
39174 {
39175 this.valueFieldSet = true;
39176 this.valueField = value;
39177 }
39178 }
39179
39180 public virtual ISchemaElement ParentElement
39181 {
39182 get
39183 {
39184 return this.parentElement;
39185 }
39186 set
39187 {
39188 this.parentElement = value;
39189 }
39190 }
39191
39192 /// <summary>
39193 /// Processes this element and all child elements into an XmlWriter.
39194 /// </summary>
39195 public virtual void OutputXml(XmlWriter writer)
39196 {
39197 if ((null == writer))
39198 {
39199 throw new ArgumentNullException("writer");
39200 }
39201 writer.WriteStartElement("ConfigurationData", "http://wixtoolset.org/schemas/v4/wxs");
39202 if (this.nameFieldSet)
39203 {
39204 writer.WriteAttributeString("Name", this.nameField);
39205 }
39206 if (this.valueFieldSet)
39207 {
39208 writer.WriteAttributeString("Value", this.valueField);
39209 }
39210 writer.WriteEndElement();
39211 }
39212
39213 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39214 void ISetAttributes.SetAttribute(string name, string value)
39215 {
39216 if (String.IsNullOrEmpty(name))
39217 {
39218 throw new ArgumentNullException("name");
39219 }
39220 if (("Name" == name))
39221 {
39222 this.nameField = value;
39223 this.nameFieldSet = true;
39224 }
39225 if (("Value" == name))
39226 {
39227 this.valueField = value;
39228 this.valueFieldSet = true;
39229 }
39230 }
39231 }
39232
39233 /// <summary>
39234 /// Directory layout for the product. Also specifies the mappings between source and target directories.
39235 /// </summary>
39236 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
39237 public class Directory : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
39238 {
39239
39240 private ElementCollection children;
39241
39242 private string idField;
39243
39244 private bool idFieldSet;
39245
39246 private string componentGuidGenerationSeedField;
39247
39248 private bool componentGuidGenerationSeedFieldSet;
39249
39250 private string diskIdField;
39251
39252 private bool diskIdFieldSet;
39253
39254 private string fileSourceField;
39255
39256 private bool fileSourceFieldSet;
39257
39258 private string nameField;
39259
39260 private bool nameFieldSet;
39261
39262 private string shortNameField;
39263
39264 private bool shortNameFieldSet;
39265
39266 private string shortSourceNameField;
39267
39268 private bool shortSourceNameFieldSet;
39269
39270 private string sourceNameField;
39271
39272 private bool sourceNameFieldSet;
39273
39274 private string srcField;
39275
39276 private bool srcFieldSet;
39277
39278 private ISchemaElement parentElement;
39279
39280 public Directory()
39281 {
39282 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
39283 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
39284 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory)));
39285 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Merge)));
39286 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
39287 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
39288 this.children = childCollection0;
39289 }
39290
39291 public virtual IEnumerable Children
39292 {
39293 get
39294 {
39295 return this.children;
39296 }
39297 }
39298
39299 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
39300 public virtual IEnumerable this[System.Type childType]
39301 {
39302 get
39303 {
39304 return this.children.Filter(childType);
39305 }
39306 }
39307
39308 /// <summary>
39309 /// This value is the unique identifier of the directory entry.
39310 /// </summary>
39311 public string Id
39312 {
39313 get
39314 {
39315 return this.idField;
39316 }
39317 set
39318 {
39319 this.idFieldSet = true;
39320 this.idField = value;
39321 }
39322 }
39323
39324 /// <summary>
39325 /// The Component Guid Generation Seed is a guid that must be used when a Component with the generate guid directive ("*")
39326 /// is not rooted in a standard Windows Installer directory (for example, ProgramFilesFolder or CommonFilesFolder).
39327 /// It is recommended that this attribute be avoided and that developers install their Components under standard
39328 /// directories with unique names instead (for example, "ProgramFilesFolder\Company Name Product Name Version"). It is
39329 /// important to note that once a directory is assigned a Component Guid Generation Seed the value must not change until
39330 /// (and must be changed when) the path to that directory, including itself and all parent directories, changes.
39331 /// </summary>
39332 public string ComponentGuidGenerationSeed
39333 {
39334 get
39335 {
39336 return this.componentGuidGenerationSeedField;
39337 }
39338 set
39339 {
39340 this.componentGuidGenerationSeedFieldSet = true;
39341 this.componentGuidGenerationSeedField = value;
39342 }
39343 }
39344
39345 /// <summary>
39346 /// Sets the default disk identifier for the files contained in this directory.
39347 /// This attribute's value may be overridden by a child Component, Directory,
39348 /// Merge or File element. See the File or Merge elements' DiskId attribute for
39349 /// more information.
39350 /// </summary>
39351 public string DiskId
39352 {
39353 get
39354 {
39355 return this.diskIdField;
39356 }
39357 set
39358 {
39359 this.diskIdFieldSet = true;
39360 this.diskIdField = value;
39361 }
39362 }
39363
39364 /// <summary>
39365 /// Used to set the file system source for this directory's child elements. For more information, see
39366 /// </summary>
39367 public string FileSource
39368 {
39369 get
39370 {
39371 return this.fileSourceField;
39372 }
39373 set
39374 {
39375 this.fileSourceFieldSet = true;
39376 this.fileSourceField = value;
39377 }
39378 }
39379
39380 /// <summary>
39381 /// The name of the directory.
39382 ///
39383 /// Do not specify this attribute if this directory represents
39384 /// the same directory as the parent (see the Windows Installer SDK's
39385 /// </summary>
39386 public string Name
39387 {
39388 get
39389 {
39390 return this.nameField;
39391 }
39392 set
39393 {
39394 this.nameFieldSet = true;
39395 this.nameField = value;
39396 }
39397 }
39398
39399 /// <summary>
39400 /// The short name of the directory in 8.3 format.
39401 /// This attribute should only be set if there is a conflict between generated short directory names
39402 /// or the user wants to manually specify the short directory name.
39403 /// </summary>
39404 public string ShortName
39405 {
39406 get
39407 {
39408 return this.shortNameField;
39409 }
39410 set
39411 {
39412 this.shortNameFieldSet = true;
39413 this.shortNameField = value;
39414 }
39415 }
39416
39417 /// <summary>
39418 /// The short name of the directory on the source media in 8.3 format.
39419 /// This attribute should only be set if there is a conflict between generated short directory names
39420 /// or the user wants to manually specify the short source directory name.
39421 /// </summary>
39422 public string ShortSourceName
39423 {
39424 get
39425 {
39426 return this.shortSourceNameField;
39427 }
39428 set
39429 {
39430 this.shortSourceNameFieldSet = true;
39431 this.shortSourceNameField = value;
39432 }
39433 }
39434
39435 /// <summary>
39436 /// The name of the directory on the source media.
39437 /// If this attribute is not specified, Windows Installer will default to the Name attribute.
39438 ///
39439 /// In prior versions of the WiX toolset, this attribute specified the short source directory name.
39440 /// This attribute's value may now be either a short or long directory name.
39441 /// If a short directory name is specified, the ShortSourceName attribute may not be specified.
39442 /// If a long directory name is specified, the LongSource attribute may not be specified.
39443 /// Also, if this value is a long directory name, the ShortSourceName attribute may be omitted to
39444 /// allow WiX to attempt to generate a unique short directory name.
39445 /// However, if this name collides with another directory or you wish to manually specify
39446 /// the short directory name, then the ShortSourceName attribute may be specified.
39447 /// </summary>
39448 public string SourceName
39449 {
39450 get
39451 {
39452 return this.sourceNameField;
39453 }
39454 set
39455 {
39456 this.sourceNameFieldSet = true;
39457 this.sourceNameField = value;
39458 }
39459 }
39460
39461 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
39462 public string src
39463 {
39464 get
39465 {
39466 return this.srcField;
39467 }
39468 set
39469 {
39470 this.srcFieldSet = true;
39471 this.srcField = value;
39472 }
39473 }
39474
39475 public virtual ISchemaElement ParentElement
39476 {
39477 get
39478 {
39479 return this.parentElement;
39480 }
39481 set
39482 {
39483 this.parentElement = value;
39484 }
39485 }
39486
39487 public virtual void AddChild(ISchemaElement child)
39488 {
39489 if ((null == child))
39490 {
39491 throw new ArgumentNullException("child");
39492 }
39493 this.children.AddElement(child);
39494 child.ParentElement = this;
39495 }
39496
39497 public virtual void RemoveChild(ISchemaElement child)
39498 {
39499 if ((null == child))
39500 {
39501 throw new ArgumentNullException("child");
39502 }
39503 this.children.RemoveElement(child);
39504 child.ParentElement = null;
39505 }
39506
39507 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39508 ISchemaElement ICreateChildren.CreateChild(string childName)
39509 {
39510 if (String.IsNullOrEmpty(childName))
39511 {
39512 throw new ArgumentNullException("childName");
39513 }
39514 ISchemaElement childValue = null;
39515 if (("Component" == childName))
39516 {
39517 childValue = new Component();
39518 }
39519 if (("Directory" == childName))
39520 {
39521 childValue = new Directory();
39522 }
39523 if (("Merge" == childName))
39524 {
39525 childValue = new Merge();
39526 }
39527 if (("SymbolPath" == childName))
39528 {
39529 childValue = new SymbolPath();
39530 }
39531 if ((null == childValue))
39532 {
39533 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
39534 }
39535 return childValue;
39536 }
39537
39538 /// <summary>
39539 /// Processes this element and all child elements into an XmlWriter.
39540 /// </summary>
39541 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
39542 public virtual void OutputXml(XmlWriter writer)
39543 {
39544 if ((null == writer))
39545 {
39546 throw new ArgumentNullException("writer");
39547 }
39548 writer.WriteStartElement("Directory", "http://wixtoolset.org/schemas/v4/wxs");
39549 if (this.idFieldSet)
39550 {
39551 writer.WriteAttributeString("Id", this.idField);
39552 }
39553 if (this.componentGuidGenerationSeedFieldSet)
39554 {
39555 writer.WriteAttributeString("ComponentGuidGenerationSeed", this.componentGuidGenerationSeedField);
39556 }
39557 if (this.diskIdFieldSet)
39558 {
39559 writer.WriteAttributeString("DiskId", this.diskIdField);
39560 }
39561 if (this.fileSourceFieldSet)
39562 {
39563 writer.WriteAttributeString("FileSource", this.fileSourceField);
39564 }
39565 if (this.nameFieldSet)
39566 {
39567 writer.WriteAttributeString("Name", this.nameField);
39568 }
39569 if (this.shortNameFieldSet)
39570 {
39571 writer.WriteAttributeString("ShortName", this.shortNameField);
39572 }
39573 if (this.shortSourceNameFieldSet)
39574 {
39575 writer.WriteAttributeString("ShortSourceName", this.shortSourceNameField);
39576 }
39577 if (this.sourceNameFieldSet)
39578 {
39579 writer.WriteAttributeString("SourceName", this.sourceNameField);
39580 }
39581 if (this.srcFieldSet)
39582 {
39583 writer.WriteAttributeString("src", this.srcField);
39584 }
39585 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
39586 {
39587 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
39588 childElement.OutputXml(writer);
39589 }
39590 writer.WriteEndElement();
39591 }
39592
39593 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39594 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
39595 void ISetAttributes.SetAttribute(string name, string value)
39596 {
39597 if (String.IsNullOrEmpty(name))
39598 {
39599 throw new ArgumentNullException("name");
39600 }
39601 if (("Id" == name))
39602 {
39603 this.idField = value;
39604 this.idFieldSet = true;
39605 }
39606 if (("ComponentGuidGenerationSeed" == name))
39607 {
39608 this.componentGuidGenerationSeedField = value;
39609 this.componentGuidGenerationSeedFieldSet = true;
39610 }
39611 if (("DiskId" == name))
39612 {
39613 this.diskIdField = value;
39614 this.diskIdFieldSet = true;
39615 }
39616 if (("FileSource" == name))
39617 {
39618 this.fileSourceField = value;
39619 this.fileSourceFieldSet = true;
39620 }
39621 if (("Name" == name))
39622 {
39623 this.nameField = value;
39624 this.nameFieldSet = true;
39625 }
39626 if (("ShortName" == name))
39627 {
39628 this.shortNameField = value;
39629 this.shortNameFieldSet = true;
39630 }
39631 if (("ShortSourceName" == name))
39632 {
39633 this.shortSourceNameField = value;
39634 this.shortSourceNameFieldSet = true;
39635 }
39636 if (("SourceName" == name))
39637 {
39638 this.sourceNameField = value;
39639 this.sourceNameFieldSet = true;
39640 }
39641 if (("src" == name))
39642 {
39643 this.srcField = value;
39644 this.srcFieldSet = true;
39645 }
39646 }
39647 }
39648
39649 /// <summary>
39650 /// Create a reference to a Directory element in another Fragment.
39651 /// </summary>
39652 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
39653 public class DirectoryRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
39654 {
39655
39656 private ElementCollection children;
39657
39658 private string idField;
39659
39660 private bool idFieldSet;
39661
39662 private string diskIdField;
39663
39664 private bool diskIdFieldSet;
39665
39666 private string fileSourceField;
39667
39668 private bool fileSourceFieldSet;
39669
39670 private string srcField;
39671
39672 private bool srcFieldSet;
39673
39674 private ISchemaElement parentElement;
39675
39676 public DirectoryRef()
39677 {
39678 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
39679 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
39680 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory)));
39681 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Merge)));
39682 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
39683 this.children = childCollection0;
39684 }
39685
39686 public virtual IEnumerable Children
39687 {
39688 get
39689 {
39690 return this.children;
39691 }
39692 }
39693
39694 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
39695 public virtual IEnumerable this[System.Type childType]
39696 {
39697 get
39698 {
39699 return this.children.Filter(childType);
39700 }
39701 }
39702
39703 /// <summary>
39704 /// The identifier of the Directory element to reference.
39705 /// </summary>
39706 public string Id
39707 {
39708 get
39709 {
39710 return this.idField;
39711 }
39712 set
39713 {
39714 this.idFieldSet = true;
39715 this.idField = value;
39716 }
39717 }
39718
39719 /// <summary>
39720 /// Sets the default disk identifier for the files contained in this directory.
39721 /// This attribute's value may be overridden by a child Component, Directory,
39722 /// Merge or File element. See the File or Merge elements' DiskId attribute for
39723 /// more information.
39724 /// </summary>
39725 public string DiskId
39726 {
39727 get
39728 {
39729 return this.diskIdField;
39730 }
39731 set
39732 {
39733 this.diskIdFieldSet = true;
39734 this.diskIdField = value;
39735 }
39736 }
39737
39738 /// <summary>
39739 /// Used to set the file system source for this DirectoryRef's child elements. For more information, see
39740 /// </summary>
39741 public string FileSource
39742 {
39743 get
39744 {
39745 return this.fileSourceField;
39746 }
39747 set
39748 {
39749 this.fileSourceFieldSet = true;
39750 this.fileSourceField = value;
39751 }
39752 }
39753
39754 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
39755 public string src
39756 {
39757 get
39758 {
39759 return this.srcField;
39760 }
39761 set
39762 {
39763 this.srcFieldSet = true;
39764 this.srcField = value;
39765 }
39766 }
39767
39768 public virtual ISchemaElement ParentElement
39769 {
39770 get
39771 {
39772 return this.parentElement;
39773 }
39774 set
39775 {
39776 this.parentElement = value;
39777 }
39778 }
39779
39780 public virtual void AddChild(ISchemaElement child)
39781 {
39782 if ((null == child))
39783 {
39784 throw new ArgumentNullException("child");
39785 }
39786 this.children.AddElement(child);
39787 child.ParentElement = this;
39788 }
39789
39790 public virtual void RemoveChild(ISchemaElement child)
39791 {
39792 if ((null == child))
39793 {
39794 throw new ArgumentNullException("child");
39795 }
39796 this.children.RemoveElement(child);
39797 child.ParentElement = null;
39798 }
39799
39800 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39801 ISchemaElement ICreateChildren.CreateChild(string childName)
39802 {
39803 if (String.IsNullOrEmpty(childName))
39804 {
39805 throw new ArgumentNullException("childName");
39806 }
39807 ISchemaElement childValue = null;
39808 if (("Component" == childName))
39809 {
39810 childValue = new Component();
39811 }
39812 if (("Directory" == childName))
39813 {
39814 childValue = new Directory();
39815 }
39816 if (("Merge" == childName))
39817 {
39818 childValue = new Merge();
39819 }
39820 if ((null == childValue))
39821 {
39822 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
39823 }
39824 return childValue;
39825 }
39826
39827 /// <summary>
39828 /// Processes this element and all child elements into an XmlWriter.
39829 /// </summary>
39830 public virtual void OutputXml(XmlWriter writer)
39831 {
39832 if ((null == writer))
39833 {
39834 throw new ArgumentNullException("writer");
39835 }
39836 writer.WriteStartElement("DirectoryRef", "http://wixtoolset.org/schemas/v4/wxs");
39837 if (this.idFieldSet)
39838 {
39839 writer.WriteAttributeString("Id", this.idField);
39840 }
39841 if (this.diskIdFieldSet)
39842 {
39843 writer.WriteAttributeString("DiskId", this.diskIdField);
39844 }
39845 if (this.fileSourceFieldSet)
39846 {
39847 writer.WriteAttributeString("FileSource", this.fileSourceField);
39848 }
39849 if (this.srcFieldSet)
39850 {
39851 writer.WriteAttributeString("src", this.srcField);
39852 }
39853 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
39854 {
39855 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
39856 childElement.OutputXml(writer);
39857 }
39858 writer.WriteEndElement();
39859 }
39860
39861 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
39862 void ISetAttributes.SetAttribute(string name, string value)
39863 {
39864 if (String.IsNullOrEmpty(name))
39865 {
39866 throw new ArgumentNullException("name");
39867 }
39868 if (("Id" == name))
39869 {
39870 this.idField = value;
39871 this.idFieldSet = true;
39872 }
39873 if (("DiskId" == name))
39874 {
39875 this.diskIdField = value;
39876 this.diskIdFieldSet = true;
39877 }
39878 if (("FileSource" == name))
39879 {
39880 this.fileSourceField = value;
39881 this.fileSourceFieldSet = true;
39882 }
39883 if (("src" == name))
39884 {
39885 this.srcField = value;
39886 this.srcFieldSet = true;
39887 }
39888 }
39889 }
39890
39891 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
39892 public class UpgradeVersion : ISchemaElement, ISetAttributes
39893 {
39894
39895 private string minimumField;
39896
39897 private bool minimumFieldSet;
39898
39899 private string maximumField;
39900
39901 private bool maximumFieldSet;
39902
39903 private string languageField;
39904
39905 private bool languageFieldSet;
39906
39907 private string removeFeaturesField;
39908
39909 private bool removeFeaturesFieldSet;
39910
39911 private string propertyField;
39912
39913 private bool propertyFieldSet;
39914
39915 private YesNoType migrateFeaturesField;
39916
39917 private bool migrateFeaturesFieldSet;
39918
39919 private YesNoType onlyDetectField;
39920
39921 private bool onlyDetectFieldSet;
39922
39923 private YesNoType ignoreRemoveFailureField;
39924
39925 private bool ignoreRemoveFailureFieldSet;
39926
39927 private YesNoType includeMinimumField;
39928
39929 private bool includeMinimumFieldSet;
39930
39931 private YesNoType includeMaximumField;
39932
39933 private bool includeMaximumFieldSet;
39934
39935 private YesNoType excludeLanguagesField;
39936
39937 private bool excludeLanguagesFieldSet;
39938
39939 private string contentField;
39940
39941 private bool contentFieldSet;
39942
39943 private ISchemaElement parentElement;
39944
39945 /// <summary>
39946 /// Specifies the lower bound on the range of product versions to be detected by FindRelatedProducts.
39947 /// </summary>
39948 public string Minimum
39949 {
39950 get
39951 {
39952 return this.minimumField;
39953 }
39954 set
39955 {
39956 this.minimumFieldSet = true;
39957 this.minimumField = value;
39958 }
39959 }
39960
39961 /// <summary>
39962 /// Specifies the upper boundary of the range of product versions detected by FindRelatedProducts.
39963 /// </summary>
39964 public string Maximum
39965 {
39966 get
39967 {
39968 return this.maximumField;
39969 }
39970 set
39971 {
39972 this.maximumFieldSet = true;
39973 this.maximumField = value;
39974 }
39975 }
39976
39977 /// <summary>
39978 /// 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.
39979 /// </summary>
39980 public string Language
39981 {
39982 get
39983 {
39984 return this.languageField;
39985 }
39986 set
39987 {
39988 this.languageFieldSet = true;
39989 this.languageField = value;
39990 }
39991 }
39992
39993 /// <summary>
39994 /// 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.
39995 /// </summary>
39996 public string RemoveFeatures
39997 {
39998 get
39999 {
40000 return this.removeFeaturesField;
40001 }
40002 set
40003 {
40004 this.removeFeaturesFieldSet = true;
40005 this.removeFeaturesField = value;
40006 }
40007 }
40008
40009 /// <summary>
40010 /// 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
40011 /// </summary>
40012 public string Property
40013 {
40014 get
40015 {
40016 return this.propertyField;
40017 }
40018 set
40019 {
40020 this.propertyFieldSet = true;
40021 this.propertyField = value;
40022 }
40023 }
40024
40025 /// <summary>
40026 /// Set to "yes" to migrate feature states from upgraded products by enabling the logic in the MigrateFeatureStates action.
40027 /// </summary>
40028 public YesNoType MigrateFeatures
40029 {
40030 get
40031 {
40032 return this.migrateFeaturesField;
40033 }
40034 set
40035 {
40036 this.migrateFeaturesFieldSet = true;
40037 this.migrateFeaturesField = value;
40038 }
40039 }
40040
40041 /// <summary>
40042 /// Set to "yes" to detect products and applications but do not uninstall.
40043 /// </summary>
40044 public YesNoType OnlyDetect
40045 {
40046 get
40047 {
40048 return this.onlyDetectField;
40049 }
40050 set
40051 {
40052 this.onlyDetectFieldSet = true;
40053 this.onlyDetectField = value;
40054 }
40055 }
40056
40057 /// <summary>
40058 /// Set to "yes" to continue installation upon failure to remove a product or application.
40059 /// </summary>
40060 public YesNoType IgnoreRemoveFailure
40061 {
40062 get
40063 {
40064 return this.ignoreRemoveFailureField;
40065 }
40066 set
40067 {
40068 this.ignoreRemoveFailureFieldSet = true;
40069 this.ignoreRemoveFailureField = value;
40070 }
40071 }
40072
40073 /// <summary>
40074 /// Set to "no" to make the range of versions detected exclude the value specified in Minimum. This attribute is "yes" by default.
40075 /// </summary>
40076 public YesNoType IncludeMinimum
40077 {
40078 get
40079 {
40080 return this.includeMinimumField;
40081 }
40082 set
40083 {
40084 this.includeMinimumFieldSet = true;
40085 this.includeMinimumField = value;
40086 }
40087 }
40088
40089 /// <summary>
40090 /// Set to "yes" to make the range of versions detected include the value specified in Maximum.
40091 /// </summary>
40092 public YesNoType IncludeMaximum
40093 {
40094 get
40095 {
40096 return this.includeMaximumField;
40097 }
40098 set
40099 {
40100 this.includeMaximumFieldSet = true;
40101 this.includeMaximumField = value;
40102 }
40103 }
40104
40105 /// <summary>
40106 /// Set to "yes" to detect all languages, excluding the languages listed in the Language attribute.
40107 /// </summary>
40108 public YesNoType ExcludeLanguages
40109 {
40110 get
40111 {
40112 return this.excludeLanguagesField;
40113 }
40114 set
40115 {
40116 this.excludeLanguagesFieldSet = true;
40117 this.excludeLanguagesField = value;
40118 }
40119 }
40120
40121 public string Content
40122 {
40123 get
40124 {
40125 return this.contentField;
40126 }
40127 set
40128 {
40129 this.contentFieldSet = true;
40130 this.contentField = value;
40131 }
40132 }
40133
40134 public virtual ISchemaElement ParentElement
40135 {
40136 get
40137 {
40138 return this.parentElement;
40139 }
40140 set
40141 {
40142 this.parentElement = value;
40143 }
40144 }
40145
40146 /// <summary>
40147 /// Processes this element and all child elements into an XmlWriter.
40148 /// </summary>
40149 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
40150 public virtual void OutputXml(XmlWriter writer)
40151 {
40152 if ((null == writer))
40153 {
40154 throw new ArgumentNullException("writer");
40155 }
40156 writer.WriteStartElement("UpgradeVersion", "http://wixtoolset.org/schemas/v4/wxs");
40157 if (this.minimumFieldSet)
40158 {
40159 writer.WriteAttributeString("Minimum", this.minimumField);
40160 }
40161 if (this.maximumFieldSet)
40162 {
40163 writer.WriteAttributeString("Maximum", this.maximumField);
40164 }
40165 if (this.languageFieldSet)
40166 {
40167 writer.WriteAttributeString("Language", this.languageField);
40168 }
40169 if (this.removeFeaturesFieldSet)
40170 {
40171 writer.WriteAttributeString("RemoveFeatures", this.removeFeaturesField);
40172 }
40173 if (this.propertyFieldSet)
40174 {
40175 writer.WriteAttributeString("Property", this.propertyField);
40176 }
40177 if (this.migrateFeaturesFieldSet)
40178 {
40179 if ((this.migrateFeaturesField == YesNoType.no))
40180 {
40181 writer.WriteAttributeString("MigrateFeatures", "no");
40182 }
40183 if ((this.migrateFeaturesField == YesNoType.yes))
40184 {
40185 writer.WriteAttributeString("MigrateFeatures", "yes");
40186 }
40187 }
40188 if (this.onlyDetectFieldSet)
40189 {
40190 if ((this.onlyDetectField == YesNoType.no))
40191 {
40192 writer.WriteAttributeString("OnlyDetect", "no");
40193 }
40194 if ((this.onlyDetectField == YesNoType.yes))
40195 {
40196 writer.WriteAttributeString("OnlyDetect", "yes");
40197 }
40198 }
40199 if (this.ignoreRemoveFailureFieldSet)
40200 {
40201 if ((this.ignoreRemoveFailureField == YesNoType.no))
40202 {
40203 writer.WriteAttributeString("IgnoreRemoveFailure", "no");
40204 }
40205 if ((this.ignoreRemoveFailureField == YesNoType.yes))
40206 {
40207 writer.WriteAttributeString("IgnoreRemoveFailure", "yes");
40208 }
40209 }
40210 if (this.includeMinimumFieldSet)
40211 {
40212 if ((this.includeMinimumField == YesNoType.no))
40213 {
40214 writer.WriteAttributeString("IncludeMinimum", "no");
40215 }
40216 if ((this.includeMinimumField == YesNoType.yes))
40217 {
40218 writer.WriteAttributeString("IncludeMinimum", "yes");
40219 }
40220 }
40221 if (this.includeMaximumFieldSet)
40222 {
40223 if ((this.includeMaximumField == YesNoType.no))
40224 {
40225 writer.WriteAttributeString("IncludeMaximum", "no");
40226 }
40227 if ((this.includeMaximumField == YesNoType.yes))
40228 {
40229 writer.WriteAttributeString("IncludeMaximum", "yes");
40230 }
40231 }
40232 if (this.excludeLanguagesFieldSet)
40233 {
40234 if ((this.excludeLanguagesField == YesNoType.no))
40235 {
40236 writer.WriteAttributeString("ExcludeLanguages", "no");
40237 }
40238 if ((this.excludeLanguagesField == YesNoType.yes))
40239 {
40240 writer.WriteAttributeString("ExcludeLanguages", "yes");
40241 }
40242 }
40243 if (this.contentFieldSet)
40244 {
40245 writer.WriteString(this.contentField);
40246 }
40247 writer.WriteEndElement();
40248 }
40249
40250 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
40251 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
40252 void ISetAttributes.SetAttribute(string name, string value)
40253 {
40254 if (String.IsNullOrEmpty(name))
40255 {
40256 throw new ArgumentNullException("name");
40257 }
40258 if (("Minimum" == name))
40259 {
40260 this.minimumField = value;
40261 this.minimumFieldSet = true;
40262 }
40263 if (("Maximum" == name))
40264 {
40265 this.maximumField = value;
40266 this.maximumFieldSet = true;
40267 }
40268 if (("Language" == name))
40269 {
40270 this.languageField = value;
40271 this.languageFieldSet = true;
40272 }
40273 if (("RemoveFeatures" == name))
40274 {
40275 this.removeFeaturesField = value;
40276 this.removeFeaturesFieldSet = true;
40277 }
40278 if (("Property" == name))
40279 {
40280 this.propertyField = value;
40281 this.propertyFieldSet = true;
40282 }
40283 if (("MigrateFeatures" == name))
40284 {
40285 this.migrateFeaturesField = Enums.ParseYesNoType(value);
40286 this.migrateFeaturesFieldSet = true;
40287 }
40288 if (("OnlyDetect" == name))
40289 {
40290 this.onlyDetectField = Enums.ParseYesNoType(value);
40291 this.onlyDetectFieldSet = true;
40292 }
40293 if (("IgnoreRemoveFailure" == name))
40294 {
40295 this.ignoreRemoveFailureField = Enums.ParseYesNoType(value);
40296 this.ignoreRemoveFailureFieldSet = true;
40297 }
40298 if (("IncludeMinimum" == name))
40299 {
40300 this.includeMinimumField = Enums.ParseYesNoType(value);
40301 this.includeMinimumFieldSet = true;
40302 }
40303 if (("IncludeMaximum" == name))
40304 {
40305 this.includeMaximumField = Enums.ParseYesNoType(value);
40306 this.includeMaximumFieldSet = true;
40307 }
40308 if (("ExcludeLanguages" == name))
40309 {
40310 this.excludeLanguagesField = Enums.ParseYesNoType(value);
40311 this.excludeLanguagesFieldSet = true;
40312 }
40313 if (("Content" == name))
40314 {
40315 this.contentField = value;
40316 this.contentFieldSet = true;
40317 }
40318 }
40319 }
40320
40321 /// <summary>
40322 /// Upgrade info for a particular UpgradeCode
40323 /// </summary>
40324 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
40325 public class Upgrade : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
40326 {
40327
40328 private ElementCollection children;
40329
40330 private string idField;
40331
40332 private bool idFieldSet;
40333
40334 private ISchemaElement parentElement;
40335
40336 public Upgrade()
40337 {
40338 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
40339 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UpgradeVersion)));
40340 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property)));
40341 this.children = childCollection0;
40342 }
40343
40344 public virtual IEnumerable Children
40345 {
40346 get
40347 {
40348 return this.children;
40349 }
40350 }
40351
40352 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
40353 public virtual IEnumerable this[System.Type childType]
40354 {
40355 get
40356 {
40357 return this.children.Filter(childType);
40358 }
40359 }
40360
40361 /// <summary>
40362 /// This value specifies the upgrade code for the products that are to be detected by the FindRelatedProducts action.
40363 /// </summary>
40364 public string Id
40365 {
40366 get
40367 {
40368 return this.idField;
40369 }
40370 set
40371 {
40372 this.idFieldSet = true;
40373 this.idField = value;
40374 }
40375 }
40376
40377 public virtual ISchemaElement ParentElement
40378 {
40379 get
40380 {
40381 return this.parentElement;
40382 }
40383 set
40384 {
40385 this.parentElement = value;
40386 }
40387 }
40388
40389 public virtual void AddChild(ISchemaElement child)
40390 {
40391 if ((null == child))
40392 {
40393 throw new ArgumentNullException("child");
40394 }
40395 this.children.AddElement(child);
40396 child.ParentElement = this;
40397 }
40398
40399 public virtual void RemoveChild(ISchemaElement child)
40400 {
40401 if ((null == child))
40402 {
40403 throw new ArgumentNullException("child");
40404 }
40405 this.children.RemoveElement(child);
40406 child.ParentElement = null;
40407 }
40408
40409 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
40410 ISchemaElement ICreateChildren.CreateChild(string childName)
40411 {
40412 if (String.IsNullOrEmpty(childName))
40413 {
40414 throw new ArgumentNullException("childName");
40415 }
40416 ISchemaElement childValue = null;
40417 if (("UpgradeVersion" == childName))
40418 {
40419 childValue = new UpgradeVersion();
40420 }
40421 if (("Property" == childName))
40422 {
40423 childValue = new Property();
40424 }
40425 if ((null == childValue))
40426 {
40427 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
40428 }
40429 return childValue;
40430 }
40431
40432 /// <summary>
40433 /// Processes this element and all child elements into an XmlWriter.
40434 /// </summary>
40435 public virtual void OutputXml(XmlWriter writer)
40436 {
40437 if ((null == writer))
40438 {
40439 throw new ArgumentNullException("writer");
40440 }
40441 writer.WriteStartElement("Upgrade", "http://wixtoolset.org/schemas/v4/wxs");
40442 if (this.idFieldSet)
40443 {
40444 writer.WriteAttributeString("Id", this.idField);
40445 }
40446 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
40447 {
40448 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
40449 childElement.OutputXml(writer);
40450 }
40451 writer.WriteEndElement();
40452 }
40453
40454 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
40455 void ISetAttributes.SetAttribute(string name, string value)
40456 {
40457 if (String.IsNullOrEmpty(name))
40458 {
40459 throw new ArgumentNullException("name");
40460 }
40461 if (("Id" == name))
40462 {
40463 this.idField = value;
40464 this.idFieldSet = true;
40465 }
40466 }
40467 }
40468
40469 /// <summary>
40470 /// A feature for the Feature table. Features are the smallest installable unit. See msi.chm for more
40471 /// detailed information on the myriad installation options for a feature.
40472 /// </summary>
40473 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
40474 public class Feature : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
40475 {
40476
40477 private ElementCollection children;
40478
40479 private string idField;
40480
40481 private bool idFieldSet;
40482
40483 private AbsentType absentField;
40484
40485 private bool absentFieldSet;
40486
40487 private AllowAdvertiseType allowAdvertiseField;
40488
40489 private bool allowAdvertiseFieldSet;
40490
40491 private string configurableDirectoryField;
40492
40493 private bool configurableDirectoryFieldSet;
40494
40495 private string descriptionField;
40496
40497 private bool descriptionFieldSet;
40498
40499 private string displayField;
40500
40501 private bool displayFieldSet;
40502
40503 private InstallDefaultType installDefaultField;
40504
40505 private bool installDefaultFieldSet;
40506
40507 private int levelField;
40508
40509 private bool levelFieldSet;
40510
40511 private string titleField;
40512
40513 private bool titleFieldSet;
40514
40515 private TypicalDefaultType typicalDefaultField;
40516
40517 private bool typicalDefaultFieldSet;
40518
40519 private ISchemaElement parentElement;
40520
40521 public Feature()
40522 {
40523 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
40524 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
40525 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef)));
40526 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
40527 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition)));
40528 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature)));
40529 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef)));
40530 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
40531 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef)));
40532 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
40533 this.children = childCollection0;
40534 }
40535
40536 public virtual IEnumerable Children
40537 {
40538 get
40539 {
40540 return this.children;
40541 }
40542 }
40543
40544 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
40545 public virtual IEnumerable this[System.Type childType]
40546 {
40547 get
40548 {
40549 return this.children.Filter(childType);
40550 }
40551 }
40552
40553 /// <summary>
40554 /// Unique identifier of the feature.
40555 /// </summary>
40556 public string Id
40557 {
40558 get
40559 {
40560 return this.idField;
40561 }
40562 set
40563 {
40564 this.idFieldSet = true;
40565 this.idField = value;
40566 }
40567 }
40568
40569 /// <summary>
40570 /// This attribute determines if a user will have the option to set a feature to absent in the user interface.
40571 /// </summary>
40572 public AbsentType Absent
40573 {
40574 get
40575 {
40576 return this.absentField;
40577 }
40578 set
40579 {
40580 this.absentFieldSet = true;
40581 this.absentField = value;
40582 }
40583 }
40584
40585 /// <summary>
40586 /// This attribute determines the possible advertise states for this feature.
40587 /// </summary>
40588 public AllowAdvertiseType AllowAdvertise
40589 {
40590 get
40591 {
40592 return this.allowAdvertiseField;
40593 }
40594 set
40595 {
40596 this.allowAdvertiseFieldSet = true;
40597 this.allowAdvertiseField = value;
40598 }
40599 }
40600
40601 /// <summary>
40602 /// Specify the Id of a Directory that can be configured by the user at installation time. This identifier
40603 /// must be a public property and therefore completely uppercase.
40604 /// </summary>
40605 public string ConfigurableDirectory
40606 {
40607 get
40608 {
40609 return this.configurableDirectoryField;
40610 }
40611 set
40612 {
40613 this.configurableDirectoryFieldSet = true;
40614 this.configurableDirectoryField = value;
40615 }
40616 }
40617
40618 /// <summary>
40619 /// Longer string of text describing the feature. This localizable string is displayed by the
40620 /// Text Control of the Selection Dialog.
40621 /// </summary>
40622 public string Description
40623 {
40624 get
40625 {
40626 return this.descriptionField;
40627 }
40628 set
40629 {
40630 this.descriptionFieldSet = true;
40631 this.descriptionField = value;
40632 }
40633 }
40634
40635 /// <summary>
40636 /// Determines the initial display of this feature in the feature tree.
40637 /// This attribute's value should be one of the following:
40638 /// </summary>
40639 public string Display
40640 {
40641 get
40642 {
40643 return this.displayField;
40644 }
40645 set
40646 {
40647 this.displayFieldSet = true;
40648 this.displayField = value;
40649 }
40650 }
40651
40652 /// <summary>
40653 /// This attribute determines the default install/run location of a feature. This attribute cannot be specified
40654 /// if the value of the FollowParent attribute is 'yes' since that would ask the installer to force this feature
40655 /// to follow the parent installation state and simultaneously favor a particular installation state just for this feature.
40656 /// </summary>
40657 public InstallDefaultType InstallDefault
40658 {
40659 get
40660 {
40661 return this.installDefaultField;
40662 }
40663 set
40664 {
40665 this.installDefaultFieldSet = true;
40666 this.installDefaultField = value;
40667 }
40668 }
40669
40670 /// <summary>
40671 /// Sets the install level of this feature. A value of 0 will disable the feature. Processing the
40672 /// Condition Table can modify the level value (this is set via the Condition child element). The
40673 /// default value is "1".
40674 /// </summary>
40675 public int Level
40676 {
40677 get
40678 {
40679 return this.levelField;
40680 }
40681 set
40682 {
40683 this.levelFieldSet = true;
40684 this.levelField = value;
40685 }
40686 }
40687
40688 /// <summary>
40689 /// Short string of text identifying the feature. This string is listed as an item by the
40690 /// SelectionTree control of the Selection Dialog.
40691 /// </summary>
40692 public string Title
40693 {
40694 get
40695 {
40696 return this.titleField;
40697 }
40698 set
40699 {
40700 this.titleFieldSet = true;
40701 this.titleField = value;
40702 }
40703 }
40704
40705 /// <summary>
40706 /// This attribute determines the default advertise state of the feature.
40707 /// </summary>
40708 public TypicalDefaultType TypicalDefault
40709 {
40710 get
40711 {
40712 return this.typicalDefaultField;
40713 }
40714 set
40715 {
40716 this.typicalDefaultFieldSet = true;
40717 this.typicalDefaultField = value;
40718 }
40719 }
40720
40721 public virtual ISchemaElement ParentElement
40722 {
40723 get
40724 {
40725 return this.parentElement;
40726 }
40727 set
40728 {
40729 this.parentElement = value;
40730 }
40731 }
40732
40733 public virtual void AddChild(ISchemaElement child)
40734 {
40735 if ((null == child))
40736 {
40737 throw new ArgumentNullException("child");
40738 }
40739 this.children.AddElement(child);
40740 child.ParentElement = this;
40741 }
40742
40743 public virtual void RemoveChild(ISchemaElement child)
40744 {
40745 if ((null == child))
40746 {
40747 throw new ArgumentNullException("child");
40748 }
40749 this.children.RemoveElement(child);
40750 child.ParentElement = null;
40751 }
40752
40753 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
40754 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
40755 ISchemaElement ICreateChildren.CreateChild(string childName)
40756 {
40757 if (String.IsNullOrEmpty(childName))
40758 {
40759 throw new ArgumentNullException("childName");
40760 }
40761 ISchemaElement childValue = null;
40762 if (("Component" == childName))
40763 {
40764 childValue = new Component();
40765 }
40766 if (("ComponentGroupRef" == childName))
40767 {
40768 childValue = new ComponentGroupRef();
40769 }
40770 if (("ComponentRef" == childName))
40771 {
40772 childValue = new ComponentRef();
40773 }
40774 if (("Condition" == childName))
40775 {
40776 childValue = new Condition();
40777 }
40778 if (("Feature" == childName))
40779 {
40780 childValue = new Feature();
40781 }
40782 if (("FeatureGroupRef" == childName))
40783 {
40784 childValue = new FeatureGroupRef();
40785 }
40786 if (("FeatureRef" == childName))
40787 {
40788 childValue = new FeatureRef();
40789 }
40790 if (("MergeRef" == childName))
40791 {
40792 childValue = new MergeRef();
40793 }
40794 if ((null == childValue))
40795 {
40796 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
40797 }
40798 return childValue;
40799 }
40800
40801 /// <summary>
40802 /// Parses a AbsentType from a string.
40803 /// </summary>
40804 public static AbsentType ParseAbsentType(string value)
40805 {
40806 AbsentType parsedValue;
40807 Feature.TryParseAbsentType(value, out parsedValue);
40808 return parsedValue;
40809 }
40810
40811 /// <summary>
40812 /// Tries to parse a AbsentType from a string.
40813 /// </summary>
40814 public static bool TryParseAbsentType(string value, out AbsentType parsedValue)
40815 {
40816 parsedValue = AbsentType.NotSet;
40817 if (string.IsNullOrEmpty(value))
40818 {
40819 return false;
40820 }
40821 if (("allow" == value))
40822 {
40823 parsedValue = AbsentType.allow;
40824 }
40825 else
40826 {
40827 if (("disallow" == value))
40828 {
40829 parsedValue = AbsentType.disallow;
40830 }
40831 else
40832 {
40833 parsedValue = AbsentType.IllegalValue;
40834 return false;
40835 }
40836 }
40837 return true;
40838 }
40839
40840 /// <summary>
40841 /// Parses a AllowAdvertiseType from a string.
40842 /// </summary>
40843 public static AllowAdvertiseType ParseAllowAdvertiseType(string value)
40844 {
40845 AllowAdvertiseType parsedValue;
40846 Feature.TryParseAllowAdvertiseType(value, out parsedValue);
40847 return parsedValue;
40848 }
40849
40850 /// <summary>
40851 /// Tries to parse a AllowAdvertiseType from a string.
40852 /// </summary>
40853 public static bool TryParseAllowAdvertiseType(string value, out AllowAdvertiseType parsedValue)
40854 {
40855 parsedValue = AllowAdvertiseType.NotSet;
40856 if (string.IsNullOrEmpty(value))
40857 {
40858 return false;
40859 }
40860 if (("no" == value))
40861 {
40862 parsedValue = AllowAdvertiseType.no;
40863 }
40864 else
40865 {
40866 if (("system" == value))
40867 {
40868 parsedValue = AllowAdvertiseType.system;
40869 }
40870 else
40871 {
40872 if (("yes" == value))
40873 {
40874 parsedValue = AllowAdvertiseType.yes;
40875 }
40876 else
40877 {
40878 parsedValue = AllowAdvertiseType.IllegalValue;
40879 return false;
40880 }
40881 }
40882 }
40883 return true;
40884 }
40885
40886 /// <summary>
40887 /// Parses a InstallDefaultType from a string.
40888 /// </summary>
40889 public static InstallDefaultType ParseInstallDefaultType(string value)
40890 {
40891 InstallDefaultType parsedValue;
40892 Feature.TryParseInstallDefaultType(value, out parsedValue);
40893 return parsedValue;
40894 }
40895
40896 /// <summary>
40897 /// Tries to parse a InstallDefaultType from a string.
40898 /// </summary>
40899 public static bool TryParseInstallDefaultType(string value, out InstallDefaultType parsedValue)
40900 {
40901 parsedValue = InstallDefaultType.NotSet;
40902 if (string.IsNullOrEmpty(value))
40903 {
40904 return false;
40905 }
40906 if (("followParent" == value))
40907 {
40908 parsedValue = InstallDefaultType.followParent;
40909 }
40910 else
40911 {
40912 if (("local" == value))
40913 {
40914 parsedValue = InstallDefaultType.local;
40915 }
40916 else
40917 {
40918 if (("source" == value))
40919 {
40920 parsedValue = InstallDefaultType.source;
40921 }
40922 else
40923 {
40924 parsedValue = InstallDefaultType.IllegalValue;
40925 return false;
40926 }
40927 }
40928 }
40929 return true;
40930 }
40931
40932 /// <summary>
40933 /// Parses a TypicalDefaultType from a string.
40934 /// </summary>
40935 public static TypicalDefaultType ParseTypicalDefaultType(string value)
40936 {
40937 TypicalDefaultType parsedValue;
40938 Feature.TryParseTypicalDefaultType(value, out parsedValue);
40939 return parsedValue;
40940 }
40941
40942 /// <summary>
40943 /// Tries to parse a TypicalDefaultType from a string.
40944 /// </summary>
40945 public static bool TryParseTypicalDefaultType(string value, out TypicalDefaultType parsedValue)
40946 {
40947 parsedValue = TypicalDefaultType.NotSet;
40948 if (string.IsNullOrEmpty(value))
40949 {
40950 return false;
40951 }
40952 if (("advertise" == value))
40953 {
40954 parsedValue = TypicalDefaultType.advertise;
40955 }
40956 else
40957 {
40958 if (("install" == value))
40959 {
40960 parsedValue = TypicalDefaultType.install;
40961 }
40962 else
40963 {
40964 parsedValue = TypicalDefaultType.IllegalValue;
40965 return false;
40966 }
40967 }
40968 return true;
40969 }
40970
40971 /// <summary>
40972 /// Processes this element and all child elements into an XmlWriter.
40973 /// </summary>
40974 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
40975 public virtual void OutputXml(XmlWriter writer)
40976 {
40977 if ((null == writer))
40978 {
40979 throw new ArgumentNullException("writer");
40980 }
40981 writer.WriteStartElement("Feature", "http://wixtoolset.org/schemas/v4/wxs");
40982 if (this.idFieldSet)
40983 {
40984 writer.WriteAttributeString("Id", this.idField);
40985 }
40986 if (this.absentFieldSet)
40987 {
40988 if ((this.absentField == AbsentType.allow))
40989 {
40990 writer.WriteAttributeString("Absent", "allow");
40991 }
40992 if ((this.absentField == AbsentType.disallow))
40993 {
40994 writer.WriteAttributeString("Absent", "disallow");
40995 }
40996 }
40997 if (this.allowAdvertiseFieldSet)
40998 {
40999 if ((this.allowAdvertiseField == AllowAdvertiseType.no))
41000 {
41001 writer.WriteAttributeString("AllowAdvertise", "no");
41002 }
41003 if ((this.allowAdvertiseField == AllowAdvertiseType.system))
41004 {
41005 writer.WriteAttributeString("AllowAdvertise", "system");
41006 }
41007 if ((this.allowAdvertiseField == AllowAdvertiseType.yes))
41008 {
41009 writer.WriteAttributeString("AllowAdvertise", "yes");
41010 }
41011 }
41012 if (this.configurableDirectoryFieldSet)
41013 {
41014 writer.WriteAttributeString("ConfigurableDirectory", this.configurableDirectoryField);
41015 }
41016 if (this.descriptionFieldSet)
41017 {
41018 writer.WriteAttributeString("Description", this.descriptionField);
41019 }
41020 if (this.displayFieldSet)
41021 {
41022 writer.WriteAttributeString("Display", this.displayField);
41023 }
41024 if (this.installDefaultFieldSet)
41025 {
41026 if ((this.installDefaultField == InstallDefaultType.followParent))
41027 {
41028 writer.WriteAttributeString("InstallDefault", "followParent");
41029 }
41030 if ((this.installDefaultField == InstallDefaultType.local))
41031 {
41032 writer.WriteAttributeString("InstallDefault", "local");
41033 }
41034 if ((this.installDefaultField == InstallDefaultType.source))
41035 {
41036 writer.WriteAttributeString("InstallDefault", "source");
41037 }
41038 }
41039 if (this.levelFieldSet)
41040 {
41041 writer.WriteAttributeString("Level", this.levelField.ToString(CultureInfo.InvariantCulture));
41042 }
41043 if (this.titleFieldSet)
41044 {
41045 writer.WriteAttributeString("Title", this.titleField);
41046 }
41047 if (this.typicalDefaultFieldSet)
41048 {
41049 if ((this.typicalDefaultField == TypicalDefaultType.advertise))
41050 {
41051 writer.WriteAttributeString("TypicalDefault", "advertise");
41052 }
41053 if ((this.typicalDefaultField == TypicalDefaultType.install))
41054 {
41055 writer.WriteAttributeString("TypicalDefault", "install");
41056 }
41057 }
41058 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
41059 {
41060 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
41061 childElement.OutputXml(writer);
41062 }
41063 writer.WriteEndElement();
41064 }
41065
41066 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41067 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
41068 void ISetAttributes.SetAttribute(string name, string value)
41069 {
41070 if (String.IsNullOrEmpty(name))
41071 {
41072 throw new ArgumentNullException("name");
41073 }
41074 if (("Id" == name))
41075 {
41076 this.idField = value;
41077 this.idFieldSet = true;
41078 }
41079 if (("Absent" == name))
41080 {
41081 this.absentField = Feature.ParseAbsentType(value);
41082 this.absentFieldSet = true;
41083 }
41084 if (("AllowAdvertise" == name))
41085 {
41086 this.allowAdvertiseField = Feature.ParseAllowAdvertiseType(value);
41087 this.allowAdvertiseFieldSet = true;
41088 }
41089 if (("ConfigurableDirectory" == name))
41090 {
41091 this.configurableDirectoryField = value;
41092 this.configurableDirectoryFieldSet = true;
41093 }
41094 if (("Description" == name))
41095 {
41096 this.descriptionField = value;
41097 this.descriptionFieldSet = true;
41098 }
41099 if (("Display" == name))
41100 {
41101 this.displayField = value;
41102 this.displayFieldSet = true;
41103 }
41104 if (("InstallDefault" == name))
41105 {
41106 this.installDefaultField = Feature.ParseInstallDefaultType(value);
41107 this.installDefaultFieldSet = true;
41108 }
41109 if (("Level" == name))
41110 {
41111 this.levelField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
41112 this.levelFieldSet = true;
41113 }
41114 if (("Title" == name))
41115 {
41116 this.titleField = value;
41117 this.titleFieldSet = true;
41118 }
41119 if (("TypicalDefault" == name))
41120 {
41121 this.typicalDefaultField = Feature.ParseTypicalDefaultType(value);
41122 this.typicalDefaultFieldSet = true;
41123 }
41124 }
41125
41126 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41127 public enum AbsentType
41128 {
41129
41130 IllegalValue = int.MaxValue,
41131
41132 NotSet = -1,
41133
41134 /// <summary>
41135 /// Allows the user interface to display an option to change the feature state to Absent.
41136 /// </summary>
41137 allow,
41138
41139 /// <summary>
41140 /// Prevents the user interface from displaying an option to change the feature state
41141 /// to Absent by setting the msidbFeatureAttributesUIDisallowAbsent attribute. This will force the feature
41142 /// to the installation state, whether or not the feature is visible in the UI.
41143 /// </summary>
41144 disallow,
41145 }
41146
41147 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41148 public enum AllowAdvertiseType
41149 {
41150
41151 IllegalValue = int.MaxValue,
41152
41153 NotSet = -1,
41154
41155 /// <summary>
41156 /// Prevents this feature from being advertised by setting the msidbFeatureAttributesDisallowAdvertise attribute.
41157 /// </summary>
41158 no,
41159
41160 /// <summary>
41161 /// Prevents advertising for this feature if the operating system shell does not support Windows Installer
41162 /// descriptors by setting the msidbFeatureAttributesNoUnsupportedAdvertise attribute.
41163 /// </summary>
41164 system,
41165
41166 /// <summary>
41167 /// Allows the feature to be advertised.
41168 /// </summary>
41169 yes,
41170 }
41171
41172 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41173 public enum InstallDefaultType
41174 {
41175
41176 IllegalValue = int.MaxValue,
41177
41178 NotSet = -1,
41179
41180 /// <summary>
41181 /// Forces the feature to follow the same installation state as its parent feature.
41182 /// </summary>
41183 followParent,
41184
41185 /// <summary>
41186 /// Favors installing this feature locally by setting the msidbFeatureAttributesFavorLocal attribute.
41187 /// </summary>
41188 local,
41189
41190 /// <summary>
41191 /// Favors running this feature from source by setting the msidbFeatureAttributesFavorSource attribute.
41192 /// </summary>
41193 source,
41194 }
41195
41196 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41197 public enum TypicalDefaultType
41198 {
41199
41200 IllegalValue = int.MaxValue,
41201
41202 NotSet = -1,
41203
41204 /// <summary>
41205 /// Sets the feature to be advertised by setting the msidbFeatureAttributesFavorAdvertise attribute.
41206 /// This value cannot be set if the value of the AllowAdvertise attribute is 'no' since that would ask the installer to
41207 /// disallow the advertised state for this feature while at the same time favoring it.
41208 /// </summary>
41209 advertise,
41210
41211 /// <summary>
41212 /// Sets the feature to the default non-advertised installation option.
41213 /// </summary>
41214 install,
41215 }
41216 }
41217
41218 /// <summary>
41219 /// Groups together multiple components, features, and merges to be used in other locations.
41220 /// </summary>
41221 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41222 public class FeatureGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
41223 {
41224
41225 private ElementCollection children;
41226
41227 private string idField;
41228
41229 private bool idFieldSet;
41230
41231 private ISchemaElement parentElement;
41232
41233 public FeatureGroup()
41234 {
41235 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
41236 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
41237 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef)));
41238 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
41239 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature)));
41240 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef)));
41241 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
41242 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef)));
41243 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
41244 this.children = childCollection0;
41245 }
41246
41247 public virtual IEnumerable Children
41248 {
41249 get
41250 {
41251 return this.children;
41252 }
41253 }
41254
41255 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
41256 public virtual IEnumerable this[System.Type childType]
41257 {
41258 get
41259 {
41260 return this.children.Filter(childType);
41261 }
41262 }
41263
41264 /// <summary>
41265 /// Identifier for the FeatureGroup.
41266 /// </summary>
41267 public string Id
41268 {
41269 get
41270 {
41271 return this.idField;
41272 }
41273 set
41274 {
41275 this.idFieldSet = true;
41276 this.idField = value;
41277 }
41278 }
41279
41280 public virtual ISchemaElement ParentElement
41281 {
41282 get
41283 {
41284 return this.parentElement;
41285 }
41286 set
41287 {
41288 this.parentElement = value;
41289 }
41290 }
41291
41292 public virtual void AddChild(ISchemaElement child)
41293 {
41294 if ((null == child))
41295 {
41296 throw new ArgumentNullException("child");
41297 }
41298 this.children.AddElement(child);
41299 child.ParentElement = this;
41300 }
41301
41302 public virtual void RemoveChild(ISchemaElement child)
41303 {
41304 if ((null == child))
41305 {
41306 throw new ArgumentNullException("child");
41307 }
41308 this.children.RemoveElement(child);
41309 child.ParentElement = null;
41310 }
41311
41312 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41313 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
41314 ISchemaElement ICreateChildren.CreateChild(string childName)
41315 {
41316 if (String.IsNullOrEmpty(childName))
41317 {
41318 throw new ArgumentNullException("childName");
41319 }
41320 ISchemaElement childValue = null;
41321 if (("Component" == childName))
41322 {
41323 childValue = new Component();
41324 }
41325 if (("ComponentGroupRef" == childName))
41326 {
41327 childValue = new ComponentGroupRef();
41328 }
41329 if (("ComponentRef" == childName))
41330 {
41331 childValue = new ComponentRef();
41332 }
41333 if (("Feature" == childName))
41334 {
41335 childValue = new Feature();
41336 }
41337 if (("FeatureGroupRef" == childName))
41338 {
41339 childValue = new FeatureGroupRef();
41340 }
41341 if (("FeatureRef" == childName))
41342 {
41343 childValue = new FeatureRef();
41344 }
41345 if (("MergeRef" == childName))
41346 {
41347 childValue = new MergeRef();
41348 }
41349 if ((null == childValue))
41350 {
41351 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
41352 }
41353 return childValue;
41354 }
41355
41356 /// <summary>
41357 /// Processes this element and all child elements into an XmlWriter.
41358 /// </summary>
41359 public virtual void OutputXml(XmlWriter writer)
41360 {
41361 if ((null == writer))
41362 {
41363 throw new ArgumentNullException("writer");
41364 }
41365 writer.WriteStartElement("FeatureGroup", "http://wixtoolset.org/schemas/v4/wxs");
41366 if (this.idFieldSet)
41367 {
41368 writer.WriteAttributeString("Id", this.idField);
41369 }
41370 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
41371 {
41372 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
41373 childElement.OutputXml(writer);
41374 }
41375 writer.WriteEndElement();
41376 }
41377
41378 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41379 void ISetAttributes.SetAttribute(string name, string value)
41380 {
41381 if (String.IsNullOrEmpty(name))
41382 {
41383 throw new ArgumentNullException("name");
41384 }
41385 if (("Id" == name))
41386 {
41387 this.idField = value;
41388 this.idFieldSet = true;
41389 }
41390 }
41391 }
41392
41393 /// <summary>
41394 /// Create a reference to a FeatureGroup in another Fragment.
41395 /// </summary>
41396 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41397 public class FeatureGroupRef : ISchemaElement, ISetAttributes
41398 {
41399
41400 private string idField;
41401
41402 private bool idFieldSet;
41403
41404 private YesNoType ignoreParentField;
41405
41406 private bool ignoreParentFieldSet;
41407
41408 private YesNoType primaryField;
41409
41410 private bool primaryFieldSet;
41411
41412 private ISchemaElement parentElement;
41413
41414 /// <summary>
41415 /// The identifier of the FeatureGroup to reference.
41416 /// </summary>
41417 public string Id
41418 {
41419 get
41420 {
41421 return this.idField;
41422 }
41423 set
41424 {
41425 this.idFieldSet = true;
41426 this.idField = value;
41427 }
41428 }
41429
41430 /// <summary>
41431 /// Normally feature group references that end up nested under a parent element create a
41432 /// connection to that parent. This behavior is undesirable when trying to simply reference
41433 /// to a FeatureGroup in a different Fragment. Specify 'yes' to have this feature group
41434 /// reference not create a connection to its parent. The default is 'no'.
41435 /// </summary>
41436 public YesNoType IgnoreParent
41437 {
41438 get
41439 {
41440 return this.ignoreParentField;
41441 }
41442 set
41443 {
41444 this.ignoreParentFieldSet = true;
41445 this.ignoreParentField = value;
41446 }
41447 }
41448
41449 /// <summary>
41450 /// Set this attribute to 'yes' in order to make the parent feature of this group
41451 /// the primary feature for any components and merges contained in the group.
41452 /// Features may belong to multiple features. By designating a feature as the
41453 /// primary feature of a component or merge, you ensure that whenever a component is
41454 /// selected for install-on-demand (IOD), the primary feature will be the one to install
41455 /// it. This attribute should only be set if a component actually nests under multiple
41456 /// features. If a component nests under only one feature, that feature is the primary
41457 /// feature for the component. You cannot set more than one feature as the primary
41458 /// feature of a given component.
41459 /// </summary>
41460 public YesNoType Primary
41461 {
41462 get
41463 {
41464 return this.primaryField;
41465 }
41466 set
41467 {
41468 this.primaryFieldSet = true;
41469 this.primaryField = value;
41470 }
41471 }
41472
41473 public virtual ISchemaElement ParentElement
41474 {
41475 get
41476 {
41477 return this.parentElement;
41478 }
41479 set
41480 {
41481 this.parentElement = value;
41482 }
41483 }
41484
41485 /// <summary>
41486 /// Processes this element and all child elements into an XmlWriter.
41487 /// </summary>
41488 public virtual void OutputXml(XmlWriter writer)
41489 {
41490 if ((null == writer))
41491 {
41492 throw new ArgumentNullException("writer");
41493 }
41494 writer.WriteStartElement("FeatureGroupRef", "http://wixtoolset.org/schemas/v4/wxs");
41495 if (this.idFieldSet)
41496 {
41497 writer.WriteAttributeString("Id", this.idField);
41498 }
41499 if (this.ignoreParentFieldSet)
41500 {
41501 if ((this.ignoreParentField == YesNoType.no))
41502 {
41503 writer.WriteAttributeString("IgnoreParent", "no");
41504 }
41505 if ((this.ignoreParentField == YesNoType.yes))
41506 {
41507 writer.WriteAttributeString("IgnoreParent", "yes");
41508 }
41509 }
41510 if (this.primaryFieldSet)
41511 {
41512 if ((this.primaryField == YesNoType.no))
41513 {
41514 writer.WriteAttributeString("Primary", "no");
41515 }
41516 if ((this.primaryField == YesNoType.yes))
41517 {
41518 writer.WriteAttributeString("Primary", "yes");
41519 }
41520 }
41521 writer.WriteEndElement();
41522 }
41523
41524 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41525 void ISetAttributes.SetAttribute(string name, string value)
41526 {
41527 if (String.IsNullOrEmpty(name))
41528 {
41529 throw new ArgumentNullException("name");
41530 }
41531 if (("Id" == name))
41532 {
41533 this.idField = value;
41534 this.idFieldSet = true;
41535 }
41536 if (("IgnoreParent" == name))
41537 {
41538 this.ignoreParentField = Enums.ParseYesNoType(value);
41539 this.ignoreParentFieldSet = true;
41540 }
41541 if (("Primary" == name))
41542 {
41543 this.primaryField = Enums.ParseYesNoType(value);
41544 this.primaryFieldSet = true;
41545 }
41546 }
41547 }
41548
41549 /// <summary>
41550 /// Create a reference to a Feature element in another Fragment.
41551 /// </summary>
41552 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41553 public class FeatureRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
41554 {
41555
41556 private ElementCollection children;
41557
41558 private string idField;
41559
41560 private bool idFieldSet;
41561
41562 private YesNoType ignoreParentField;
41563
41564 private bool ignoreParentFieldSet;
41565
41566 private ISchemaElement parentElement;
41567
41568 public FeatureRef()
41569 {
41570 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
41571 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component)));
41572 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef)));
41573 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef)));
41574 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature)));
41575 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef)));
41576 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroup)));
41577 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef)));
41578 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef)));
41579 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
41580 this.children = childCollection0;
41581 }
41582
41583 public virtual IEnumerable Children
41584 {
41585 get
41586 {
41587 return this.children;
41588 }
41589 }
41590
41591 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
41592 public virtual IEnumerable this[System.Type childType]
41593 {
41594 get
41595 {
41596 return this.children.Filter(childType);
41597 }
41598 }
41599
41600 /// <summary>
41601 /// The identifier of the Feature element to reference.
41602 /// </summary>
41603 public string Id
41604 {
41605 get
41606 {
41607 return this.idField;
41608 }
41609 set
41610 {
41611 this.idFieldSet = true;
41612 this.idField = value;
41613 }
41614 }
41615
41616 /// <summary>
41617 /// Normally feature references that are nested under a parent element create a connection to that
41618 /// parent. This behavior is undesirable when trying to simply reference a Feature in a different
41619 /// Fragment. Specify 'yes' to have this feature reference not create a connection to its parent.
41620 /// The default is 'no'.
41621 /// </summary>
41622 public YesNoType IgnoreParent
41623 {
41624 get
41625 {
41626 return this.ignoreParentField;
41627 }
41628 set
41629 {
41630 this.ignoreParentFieldSet = true;
41631 this.ignoreParentField = value;
41632 }
41633 }
41634
41635 public virtual ISchemaElement ParentElement
41636 {
41637 get
41638 {
41639 return this.parentElement;
41640 }
41641 set
41642 {
41643 this.parentElement = value;
41644 }
41645 }
41646
41647 public virtual void AddChild(ISchemaElement child)
41648 {
41649 if ((null == child))
41650 {
41651 throw new ArgumentNullException("child");
41652 }
41653 this.children.AddElement(child);
41654 child.ParentElement = this;
41655 }
41656
41657 public virtual void RemoveChild(ISchemaElement child)
41658 {
41659 if ((null == child))
41660 {
41661 throw new ArgumentNullException("child");
41662 }
41663 this.children.RemoveElement(child);
41664 child.ParentElement = null;
41665 }
41666
41667 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41668 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
41669 ISchemaElement ICreateChildren.CreateChild(string childName)
41670 {
41671 if (String.IsNullOrEmpty(childName))
41672 {
41673 throw new ArgumentNullException("childName");
41674 }
41675 ISchemaElement childValue = null;
41676 if (("Component" == childName))
41677 {
41678 childValue = new Component();
41679 }
41680 if (("ComponentGroupRef" == childName))
41681 {
41682 childValue = new ComponentGroupRef();
41683 }
41684 if (("ComponentRef" == childName))
41685 {
41686 childValue = new ComponentRef();
41687 }
41688 if (("Feature" == childName))
41689 {
41690 childValue = new Feature();
41691 }
41692 if (("FeatureRef" == childName))
41693 {
41694 childValue = new FeatureRef();
41695 }
41696 if (("FeatureGroup" == childName))
41697 {
41698 childValue = new FeatureGroup();
41699 }
41700 if (("FeatureGroupRef" == childName))
41701 {
41702 childValue = new FeatureGroupRef();
41703 }
41704 if (("MergeRef" == childName))
41705 {
41706 childValue = new MergeRef();
41707 }
41708 if ((null == childValue))
41709 {
41710 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
41711 }
41712 return childValue;
41713 }
41714
41715 /// <summary>
41716 /// Processes this element and all child elements into an XmlWriter.
41717 /// </summary>
41718 public virtual void OutputXml(XmlWriter writer)
41719 {
41720 if ((null == writer))
41721 {
41722 throw new ArgumentNullException("writer");
41723 }
41724 writer.WriteStartElement("FeatureRef", "http://wixtoolset.org/schemas/v4/wxs");
41725 if (this.idFieldSet)
41726 {
41727 writer.WriteAttributeString("Id", this.idField);
41728 }
41729 if (this.ignoreParentFieldSet)
41730 {
41731 if ((this.ignoreParentField == YesNoType.no))
41732 {
41733 writer.WriteAttributeString("IgnoreParent", "no");
41734 }
41735 if ((this.ignoreParentField == YesNoType.yes))
41736 {
41737 writer.WriteAttributeString("IgnoreParent", "yes");
41738 }
41739 }
41740 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
41741 {
41742 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
41743 childElement.OutputXml(writer);
41744 }
41745 writer.WriteEndElement();
41746 }
41747
41748 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
41749 void ISetAttributes.SetAttribute(string name, string value)
41750 {
41751 if (String.IsNullOrEmpty(name))
41752 {
41753 throw new ArgumentNullException("name");
41754 }
41755 if (("Id" == name))
41756 {
41757 this.idField = value;
41758 this.idFieldSet = true;
41759 }
41760 if (("IgnoreParent" == name))
41761 {
41762 this.ignoreParentField = Enums.ParseYesNoType(value);
41763 this.ignoreParentFieldSet = true;
41764 }
41765 }
41766 }
41767
41768 /// <summary>
41769 /// Media element describes a disk that makes up the source media for the installation.
41770 /// </summary>
41771 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
41772 public class Media : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
41773 {
41774
41775 private ElementCollection children;
41776
41777 private string idField;
41778
41779 private bool idFieldSet;
41780
41781 private string cabinetField;
41782
41783 private bool cabinetFieldSet;
41784
41785 private CompressionLevelType compressionLevelField;
41786
41787 private bool compressionLevelFieldSet;
41788
41789 private string diskPromptField;
41790
41791 private bool diskPromptFieldSet;
41792
41793 private YesNoType embedCabField;
41794
41795 private bool embedCabFieldSet;
41796
41797 private string layoutField;
41798
41799 private bool layoutFieldSet;
41800
41801 private string srcField;
41802
41803 private bool srcFieldSet;
41804
41805 private string volumeLabelField;
41806
41807 private bool volumeLabelFieldSet;
41808
41809 private string sourceField;
41810
41811 private bool sourceFieldSet;
41812
41813 private ISchemaElement parentElement;
41814
41815 public Media()
41816 {
41817 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
41818 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
41819 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalSignature)));
41820 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchBaseline)));
41821 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath)));
41822 childCollection0.AddCollection(childCollection1);
41823 this.children = childCollection0;
41824 }
41825
41826 public virtual IEnumerable Children
41827 {
41828 get
41829 {
41830 return this.children;
41831 }
41832 }
41833
41834 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
41835 public virtual IEnumerable this[System.Type childType]
41836 {
41837 get
41838 {
41839 return this.children.Filter(childType);
41840 }
41841 }
41842
41843 /// <summary>
41844 /// Disk identifier for Media table. This number must be equal to or greater than 1.
41845 /// </summary>
41846 public string Id
41847 {
41848 get
41849 {
41850 return this.idField;
41851 }
41852 set
41853 {
41854 this.idFieldSet = true;
41855 this.idField = value;
41856 }
41857 }
41858
41859 /// <summary>
41860 /// 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.
41861 /// </summary>
41862 public string Cabinet
41863 {
41864 get
41865 {
41866 return this.cabinetField;
41867 }
41868 set
41869 {
41870 this.cabinetFieldSet = true;
41871 this.cabinetField = value;
41872 }
41873 }
41874
41875 /// <summary>
41876 /// Indicates the compression level for the Media's cabinet. This attribute can
41877 /// only be used in conjunction with the Cabinet attribute. The default is 'mszip'.
41878 /// </summary>
41879 public CompressionLevelType CompressionLevel
41880 {
41881 get
41882 {
41883 return this.compressionLevelField;
41884 }
41885 set
41886 {
41887 this.compressionLevelFieldSet = true;
41888 this.compressionLevelField = value;
41889 }
41890 }
41891
41892 /// <summary>
41893 /// 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.
41894 /// </summary>
41895 public string DiskPrompt
41896 {
41897 get
41898 {
41899 return this.diskPromptField;
41900 }
41901 set
41902 {
41903 this.diskPromptFieldSet = true;
41904 this.diskPromptField = value;
41905 }
41906 }
41907
41908 /// <summary>
41909 /// Instructs the binder to embed the cabinet in the product if 'yes'. This attribute can only be specified in conjunction with the Cabinet attribute.
41910 /// </summary>
41911 public YesNoType EmbedCab
41912 {
41913 get
41914 {
41915 return this.embedCabField;
41916 }
41917 set
41918 {
41919 this.embedCabFieldSet = true;
41920 this.embedCabField = value;
41921 }
41922 }
41923
41924 /// <summary>
41925 /// This attribute specifies the root directory for the uncompressed files that
41926 /// are a part of this Media element. By default, the src will be the output
41927 /// directory for the final image. The default value ensures the binder generates
41928 /// an installable image. If a relative path is specified in the src attribute,
41929 /// the value will be appended to the image's output directory. If an absolute
41930 /// path is provided, that path will be used without modification. The latter two
41931 /// options are provided to ease the layout of an image onto multiple medias (CDs/DVDs).
41932 /// </summary>
41933 public string Layout
41934 {
41935 get
41936 {
41937 return this.layoutField;
41938 }
41939 set
41940 {
41941 this.layoutFieldSet = true;
41942 this.layoutField = value;
41943 }
41944 }
41945
41946 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
41947 public string src
41948 {
41949 get
41950 {
41951 return this.srcField;
41952 }
41953 set
41954 {
41955 this.srcFieldSet = true;
41956 this.srcField = value;
41957 }
41958 }
41959
41960 /// <summary>
41961 /// The label attributed to the volume. This is the volume label returned
41962 /// by the GetVolumeInformation function. If the SourceDir property refers
41963 /// to a removable (floppy or CD-ROM) volume, then this volume label is
41964 /// used to verify that the proper disk is in the drive before attempting
41965 /// to install files. The entry in this column must match the volume label
41966 /// of the physical media.
41967 /// </summary>
41968 public string VolumeLabel
41969 {
41970 get
41971 {
41972 return this.volumeLabelField;
41973 }
41974 set
41975 {
41976 this.volumeLabelFieldSet = true;
41977 this.volumeLabelField = value;
41978 }
41979 }
41980
41981 /// <summary>
41982 /// Optional property that identifies the source of the embedded cabinet.
41983 /// If a cabinet is specified for a patch, this property should be defined
41984 /// and unique to each patch so that the embedded cabinet containing patched
41985 /// and new files can be located in the patch package. If the cabinet is not
41986 /// embedded - this is not typical - the cabinet can be found in the directory
41987 /// referenced in this column. If empty, the external cabinet must be located
41988 /// in the SourceDir directory.
41989 /// </summary>
41990 public string Source
41991 {
41992 get
41993 {
41994 return this.sourceField;
41995 }
41996 set
41997 {
41998 this.sourceFieldSet = true;
41999 this.sourceField = value;
42000 }
42001 }
42002
42003 public virtual ISchemaElement ParentElement
42004 {
42005 get
42006 {
42007 return this.parentElement;
42008 }
42009 set
42010 {
42011 this.parentElement = value;
42012 }
42013 }
42014
42015 public virtual void AddChild(ISchemaElement child)
42016 {
42017 if ((null == child))
42018 {
42019 throw new ArgumentNullException("child");
42020 }
42021 this.children.AddElement(child);
42022 child.ParentElement = this;
42023 }
42024
42025 public virtual void RemoveChild(ISchemaElement child)
42026 {
42027 if ((null == child))
42028 {
42029 throw new ArgumentNullException("child");
42030 }
42031 this.children.RemoveElement(child);
42032 child.ParentElement = null;
42033 }
42034
42035 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
42036 ISchemaElement ICreateChildren.CreateChild(string childName)
42037 {
42038 if (String.IsNullOrEmpty(childName))
42039 {
42040 throw new ArgumentNullException("childName");
42041 }
42042 ISchemaElement childValue = null;
42043 if (("DigitalSignature" == childName))
42044 {
42045 childValue = new DigitalSignature();
42046 }
42047 if (("PatchBaseline" == childName))
42048 {
42049 childValue = new PatchBaseline();
42050 }
42051 if (("SymbolPath" == childName))
42052 {
42053 childValue = new SymbolPath();
42054 }
42055 if ((null == childValue))
42056 {
42057 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
42058 }
42059 return childValue;
42060 }
42061
42062 /// <summary>
42063 /// Processes this element and all child elements into an XmlWriter.
42064 /// </summary>
42065 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
42066 public virtual void OutputXml(XmlWriter writer)
42067 {
42068 if ((null == writer))
42069 {
42070 throw new ArgumentNullException("writer");
42071 }
42072 writer.WriteStartElement("Media", "http://wixtoolset.org/schemas/v4/wxs");
42073 if (this.idFieldSet)
42074 {
42075 writer.WriteAttributeString("Id", this.idField);
42076 }
42077 if (this.cabinetFieldSet)
42078 {
42079 writer.WriteAttributeString("Cabinet", this.cabinetField);
42080 }
42081 if (this.compressionLevelFieldSet)
42082 {
42083 if ((this.compressionLevelField == CompressionLevelType.high))
42084 {
42085 writer.WriteAttributeString("CompressionLevel", "high");
42086 }
42087 if ((this.compressionLevelField == CompressionLevelType.low))
42088 {
42089 writer.WriteAttributeString("CompressionLevel", "low");
42090 }
42091 if ((this.compressionLevelField == CompressionLevelType.medium))
42092 {
42093 writer.WriteAttributeString("CompressionLevel", "medium");
42094 }
42095 if ((this.compressionLevelField == CompressionLevelType.mszip))
42096 {
42097 writer.WriteAttributeString("CompressionLevel", "mszip");
42098 }
42099 if ((this.compressionLevelField == CompressionLevelType.none))
42100 {
42101 writer.WriteAttributeString("CompressionLevel", "none");
42102 }
42103 }
42104 if (this.diskPromptFieldSet)
42105 {
42106 writer.WriteAttributeString("DiskPrompt", this.diskPromptField);
42107 }
42108 if (this.embedCabFieldSet)
42109 {
42110 if ((this.embedCabField == YesNoType.no))
42111 {
42112 writer.WriteAttributeString("EmbedCab", "no");
42113 }
42114 if ((this.embedCabField == YesNoType.yes))
42115 {
42116 writer.WriteAttributeString("EmbedCab", "yes");
42117 }
42118 }
42119 if (this.layoutFieldSet)
42120 {
42121 writer.WriteAttributeString("Layout", this.layoutField);
42122 }
42123 if (this.srcFieldSet)
42124 {
42125 writer.WriteAttributeString("src", this.srcField);
42126 }
42127 if (this.volumeLabelFieldSet)
42128 {
42129 writer.WriteAttributeString("VolumeLabel", this.volumeLabelField);
42130 }
42131 if (this.sourceFieldSet)
42132 {
42133 writer.WriteAttributeString("Source", this.sourceField);
42134 }
42135 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
42136 {
42137 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
42138 childElement.OutputXml(writer);
42139 }
42140 writer.WriteEndElement();
42141 }
42142
42143 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
42144 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
42145 void ISetAttributes.SetAttribute(string name, string value)
42146 {
42147 if (String.IsNullOrEmpty(name))
42148 {
42149 throw new ArgumentNullException("name");
42150 }
42151 if (("Id" == name))
42152 {
42153 this.idField = value;
42154 this.idFieldSet = true;
42155 }
42156 if (("Cabinet" == name))
42157 {
42158 this.cabinetField = value;
42159 this.cabinetFieldSet = true;
42160 }
42161 if (("CompressionLevel" == name))
42162 {
42163 this.compressionLevelField = Enums.ParseCompressionLevelType(value);
42164 this.compressionLevelFieldSet = true;
42165 }
42166 if (("DiskPrompt" == name))
42167 {
42168 this.diskPromptField = value;
42169 this.diskPromptFieldSet = true;
42170 }
42171 if (("EmbedCab" == name))
42172 {
42173 this.embedCabField = Enums.ParseYesNoType(value);
42174 this.embedCabFieldSet = true;
42175 }
42176 if (("Layout" == name))
42177 {
42178 this.layoutField = value;
42179 this.layoutFieldSet = true;
42180 }
42181 if (("src" == name))
42182 {
42183 this.srcField = value;
42184 this.srcFieldSet = true;
42185 }
42186 if (("VolumeLabel" == name))
42187 {
42188 this.volumeLabelField = value;
42189 this.volumeLabelFieldSet = true;
42190 }
42191 if (("Source" == name))
42192 {
42193 this.sourceField = value;
42194 this.sourceFieldSet = true;
42195 }
42196 }
42197 }
42198
42199 /// <summary>
42200 /// MediaTeplate element describes information to automatically assign files to cabinets.
42201 /// A maximumum number of cabinets created is 999.
42202 /// </summary>
42203 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
42204 public class MediaTemplate : ISchemaElement, ISetAttributes
42205 {
42206
42207 private string cabinetTemplateField;
42208
42209 private bool cabinetTemplateFieldSet;
42210
42211 private CompressionLevelType compressionLevelField;
42212
42213 private bool compressionLevelFieldSet;
42214
42215 private string diskPromptField;
42216
42217 private bool diskPromptFieldSet;
42218
42219 private YesNoType embedCabField;
42220
42221 private bool embedCabFieldSet;
42222
42223 private string volumeLabelField;
42224
42225 private bool volumeLabelFieldSet;
42226
42227 private int maximumUncompressedMediaSizeField;
42228
42229 private bool maximumUncompressedMediaSizeFieldSet;
42230
42231 private int maximumCabinetSizeForLargeFileSplittingField;
42232
42233 private bool maximumCabinetSizeForLargeFileSplittingFieldSet;
42234
42235 private ISchemaElement parentElement;
42236
42237 /// <summary>
42238 /// Templated name of the cabinet if some or all of the files stored on the media are in
42239 /// a cabinet file. This name must begin with either a letter or an underscore, contain
42240 /// maximum of five characters and {0} in the cabinet name part and must end three character extension.
42241 /// The default is cab{0}.cab.
42242 /// </summary>
42243 public string CabinetTemplate
42244 {
42245 get
42246 {
42247 return this.cabinetTemplateField;
42248 }
42249 set
42250 {
42251 this.cabinetTemplateFieldSet = true;
42252 this.cabinetTemplateField = value;
42253 }
42254 }
42255
42256 /// <summary>
42257 /// Indicates the compression level for the Media's cabinet. This attribute can
42258 /// only be used in conjunction with the Cabinet attribute. The default is 'mszip'.
42259 /// </summary>
42260 public CompressionLevelType CompressionLevel
42261 {
42262 get
42263 {
42264 return this.compressionLevelField;
42265 }
42266 set
42267 {
42268 this.compressionLevelFieldSet = true;
42269 this.compressionLevelField = value;
42270 }
42271 }
42272
42273 /// <summary>
42274 /// The disk name, which is usually the visible text printed on the disk. This localizable text is used
42275 /// to prompt the user when this disk needs to be inserted. This value will be used in the "[1]" of the
42276 /// DiskPrompt Property. Using this attribute will require you to define a DiskPrompt Property.
42277 /// </summary>
42278 public string DiskPrompt
42279 {
42280 get
42281 {
42282 return this.diskPromptField;
42283 }
42284 set
42285 {
42286 this.diskPromptFieldSet = true;
42287 this.diskPromptField = value;
42288 }
42289 }
42290
42291 /// <summary>
42292 /// Instructs the binder to embed the cabinets in the product if 'yes'.
42293 /// </summary>
42294 public YesNoType EmbedCab
42295 {
42296 get
42297 {
42298 return this.embedCabField;
42299 }
42300 set
42301 {
42302 this.embedCabFieldSet = true;
42303 this.embedCabField = value;
42304 }
42305 }
42306
42307 /// <summary>
42308 /// The label attributed to the volume. This is the volume label returned
42309 /// by the GetVolumeInformation function. If the SourceDir property refers
42310 /// to a removable (floppy or CD-ROM) volume, then this volume label is
42311 /// used to verify that the proper disk is in the drive before attempting
42312 /// to install files. The entry in this column must match the volume label
42313 /// of the physical media.
42314 /// </summary>
42315 public string VolumeLabel
42316 {
42317 get
42318 {
42319 return this.volumeLabelField;
42320 }
42321 set
42322 {
42323 this.volumeLabelFieldSet = true;
42324 this.volumeLabelField = value;
42325 }
42326 }
42327
42328 /// <summary>
42329 /// Size of uncompressed files in each cabinet, in megabytes. WIX_MUMS environment variable
42330 /// can be used to override this value. Default value is 200 MB.
42331 /// </summary>
42332 public int MaximumUncompressedMediaSize
42333 {
42334 get
42335 {
42336 return this.maximumUncompressedMediaSizeField;
42337 }
42338 set
42339 {
42340 this.maximumUncompressedMediaSizeFieldSet = true;
42341 this.maximumUncompressedMediaSizeField = value;
42342 }
42343 }
42344
42345 /// <summary>
42346 /// Maximum size of cabinet files in megabytes for large files. This attribute is used for packaging
42347 /// files that are larger than MaximumUncompressedMediaSize into smaller cabinets. If cabinet size
42348 /// exceed this value, then setting this attribute will cause the file to be split into multiple
42349 /// cabinets of this maximum size. For simply controlling cabinet size without file splitting use
42350 /// MaximumUncompressedMediaSize attribute. Setting this attribute will disable smart cabbing feature
42351 /// for this Fragment / Package. Setting WIX_MCSLFS environment variable can be used to override this
42352 /// value. Minimum allowed value of this attribute is 20 MB. Maximum allowed value and the Default
42353 /// value of this attribute is 2048 MB (2 GB).
42354 /// </summary>
42355 public int MaximumCabinetSizeForLargeFileSplitting
42356 {
42357 get
42358 {
42359 return this.maximumCabinetSizeForLargeFileSplittingField;
42360 }
42361 set
42362 {
42363 this.maximumCabinetSizeForLargeFileSplittingFieldSet = true;
42364 this.maximumCabinetSizeForLargeFileSplittingField = value;
42365 }
42366 }
42367
42368 public virtual ISchemaElement ParentElement
42369 {
42370 get
42371 {
42372 return this.parentElement;
42373 }
42374 set
42375 {
42376 this.parentElement = value;
42377 }
42378 }
42379
42380 /// <summary>
42381 /// Parses a CompressionLevelType from a string.
42382 /// </summary>
42383 public static CompressionLevelType ParseCompressionLevelType(string value)
42384 {
42385 CompressionLevelType parsedValue;
42386 MediaTemplate.TryParseCompressionLevelType(value, out parsedValue);
42387 return parsedValue;
42388 }
42389
42390 /// <summary>
42391 /// Tries to parse a CompressionLevelType from a string.
42392 /// </summary>
42393 public static bool TryParseCompressionLevelType(string value, out CompressionLevelType parsedValue)
42394 {
42395 parsedValue = CompressionLevelType.NotSet;
42396 if (string.IsNullOrEmpty(value))
42397 {
42398 return false;
42399 }
42400 if (("high" == value))
42401 {
42402 parsedValue = CompressionLevelType.high;
42403 }
42404 else
42405 {
42406 if (("low" == value))
42407 {
42408 parsedValue = CompressionLevelType.low;
42409 }
42410 else
42411 {
42412 if (("medium" == value))
42413 {
42414 parsedValue = CompressionLevelType.medium;
42415 }
42416 else
42417 {
42418 if (("mszip" == value))
42419 {
42420 parsedValue = CompressionLevelType.mszip;
42421 }
42422 else
42423 {
42424 if (("none" == value))
42425 {
42426 parsedValue = CompressionLevelType.none;
42427 }
42428 else
42429 {
42430 parsedValue = CompressionLevelType.IllegalValue;
42431 return false;
42432 }
42433 }
42434 }
42435 }
42436 }
42437 return true;
42438 }
42439
42440 /// <summary>
42441 /// Processes this element and all child elements into an XmlWriter.
42442 /// </summary>
42443 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
42444 public virtual void OutputXml(XmlWriter writer)
42445 {
42446 if ((null == writer))
42447 {
42448 throw new ArgumentNullException("writer");
42449 }
42450 writer.WriteStartElement("MediaTemplate", "http://wixtoolset.org/schemas/v4/wxs");
42451 if (this.cabinetTemplateFieldSet)
42452 {
42453 writer.WriteAttributeString("CabinetTemplate", this.cabinetTemplateField);
42454 }
42455 if (this.compressionLevelFieldSet)
42456 {
42457 if ((this.compressionLevelField == CompressionLevelType.high))
42458 {
42459 writer.WriteAttributeString("CompressionLevel", "high");
42460 }
42461 if ((this.compressionLevelField == CompressionLevelType.low))
42462 {
42463 writer.WriteAttributeString("CompressionLevel", "low");
42464 }
42465 if ((this.compressionLevelField == CompressionLevelType.medium))
42466 {
42467 writer.WriteAttributeString("CompressionLevel", "medium");
42468 }
42469 if ((this.compressionLevelField == CompressionLevelType.mszip))
42470 {
42471 writer.WriteAttributeString("CompressionLevel", "mszip");
42472 }
42473 if ((this.compressionLevelField == CompressionLevelType.none))
42474 {
42475 writer.WriteAttributeString("CompressionLevel", "none");
42476 }
42477 }
42478 if (this.diskPromptFieldSet)
42479 {
42480 writer.WriteAttributeString("DiskPrompt", this.diskPromptField);
42481 }
42482 if (this.embedCabFieldSet)
42483 {
42484 if ((this.embedCabField == YesNoType.no))
42485 {
42486 writer.WriteAttributeString("EmbedCab", "no");
42487 }
42488 if ((this.embedCabField == YesNoType.yes))
42489 {
42490 writer.WriteAttributeString("EmbedCab", "yes");
42491 }
42492 }
42493 if (this.volumeLabelFieldSet)
42494 {
42495 writer.WriteAttributeString("VolumeLabel", this.volumeLabelField);
42496 }
42497 if (this.maximumUncompressedMediaSizeFieldSet)
42498 {
42499 writer.WriteAttributeString("MaximumUncompressedMediaSize", this.maximumUncompressedMediaSizeField.ToString(CultureInfo.InvariantCulture));
42500 }
42501 if (this.maximumCabinetSizeForLargeFileSplittingFieldSet)
42502 {
42503 writer.WriteAttributeString("MaximumCabinetSizeForLargeFileSplitting", this.maximumCabinetSizeForLargeFileSplittingField.ToString(CultureInfo.InvariantCulture));
42504 }
42505 writer.WriteEndElement();
42506 }
42507
42508 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
42509 void ISetAttributes.SetAttribute(string name, string value)
42510 {
42511 if (String.IsNullOrEmpty(name))
42512 {
42513 throw new ArgumentNullException("name");
42514 }
42515 if (("CabinetTemplate" == name))
42516 {
42517 this.cabinetTemplateField = value;
42518 this.cabinetTemplateFieldSet = true;
42519 }
42520 if (("CompressionLevel" == name))
42521 {
42522 this.compressionLevelField = MediaTemplate.ParseCompressionLevelType(value);
42523 this.compressionLevelFieldSet = true;
42524 }
42525 if (("DiskPrompt" == name))
42526 {
42527 this.diskPromptField = value;
42528 this.diskPromptFieldSet = true;
42529 }
42530 if (("EmbedCab" == name))
42531 {
42532 this.embedCabField = Enums.ParseYesNoType(value);
42533 this.embedCabFieldSet = true;
42534 }
42535 if (("VolumeLabel" == name))
42536 {
42537 this.volumeLabelField = value;
42538 this.volumeLabelFieldSet = true;
42539 }
42540 if (("MaximumUncompressedMediaSize" == name))
42541 {
42542 this.maximumUncompressedMediaSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
42543 this.maximumUncompressedMediaSizeFieldSet = true;
42544 }
42545 if (("MaximumCabinetSizeForLargeFileSplitting" == name))
42546 {
42547 this.maximumCabinetSizeForLargeFileSplittingField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
42548 this.maximumCabinetSizeForLargeFileSplittingFieldSet = true;
42549 }
42550 }
42551
42552 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
42553 public enum CompressionLevelType
42554 {
42555
42556 IllegalValue = int.MaxValue,
42557
42558 NotSet = -1,
42559
42560 high,
42561
42562 low,
42563
42564 medium,
42565
42566 mszip,
42567
42568 none,
42569 }
42570 }
42571
42572 /// <summary>
42573 /// This element has been deprecated.
42574 /// Use the Binary/@SuppressModularization, CustomAction/@SuppressModularization, or Property/@SuppressModularization attributes instead.
42575 /// </summary>
42576 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
42577 public class IgnoreModularization : ISchemaElement, ISetAttributes
42578 {
42579
42580 private string nameField;
42581
42582 private bool nameFieldSet;
42583
42584 private TypeType typeField;
42585
42586 private bool typeFieldSet;
42587
42588 private ISchemaElement parentElement;
42589
42590 /// <summary>
42591 /// The name of the item to ignore modularization for.
42592 /// </summary>
42593 public string Name
42594 {
42595 get
42596 {
42597 return this.nameField;
42598 }
42599 set
42600 {
42601 this.nameFieldSet = true;
42602 this.nameField = value;
42603 }
42604 }
42605
42606 /// <summary>
42607 /// The type of the item to ignore modularization for.
42608 /// </summary>
42609 public TypeType Type
42610 {
42611 get
42612 {
42613 return this.typeField;
42614 }
42615 set
42616 {
42617 this.typeFieldSet = true;
42618 this.typeField = value;
42619 }
42620 }
42621
42622 public virtual ISchemaElement ParentElement
42623 {
42624 get
42625 {
42626 return this.parentElement;
42627 }
42628 set
42629 {
42630 this.parentElement = value;
42631 }
42632 }
42633
42634 /// <summary>
42635 /// Parses a TypeType from a string.
42636 /// </summary>
42637 public static TypeType ParseTypeType(string value)
42638 {
42639 TypeType parsedValue;
42640 IgnoreModularization.TryParseTypeType(value, out parsedValue);
42641 return parsedValue;
42642 }
42643
42644 /// <summary>
42645 /// Tries to parse a TypeType from a string.
42646 /// </summary>
42647 public static bool TryParseTypeType(string value, out TypeType parsedValue)
42648 {
42649 parsedValue = TypeType.NotSet;
42650 if (string.IsNullOrEmpty(value))
42651 {
42652 return false;
42653 }
42654 if (("Action" == value))
42655 {
42656 parsedValue = TypeType.Action;
42657 }
42658 else
42659 {
42660 if (("Property" == value))
42661 {
42662 parsedValue = TypeType.Property;
42663 }
42664 else
42665 {
42666 if (("Directory" == value))
42667 {
42668 parsedValue = TypeType.Directory;
42669 }
42670 else
42671 {
42672 parsedValue = TypeType.IllegalValue;
42673 return false;
42674 }
42675 }
42676 }
42677 return true;
42678 }
42679
42680 /// <summary>
42681 /// Processes this element and all child elements into an XmlWriter.
42682 /// </summary>
42683 public virtual void OutputXml(XmlWriter writer)
42684 {
42685 if ((null == writer))
42686 {
42687 throw new ArgumentNullException("writer");
42688 }
42689 writer.WriteStartElement("IgnoreModularization", "http://wixtoolset.org/schemas/v4/wxs");
42690 if (this.nameFieldSet)
42691 {
42692 writer.WriteAttributeString("Name", this.nameField);
42693 }
42694 if (this.typeFieldSet)
42695 {
42696 if ((this.typeField == TypeType.Action))
42697 {
42698 writer.WriteAttributeString("Type", "Action");
42699 }
42700 if ((this.typeField == TypeType.Property))
42701 {
42702 writer.WriteAttributeString("Type", "Property");
42703 }
42704 if ((this.typeField == TypeType.Directory))
42705 {
42706 writer.WriteAttributeString("Type", "Directory");
42707 }
42708 }
42709 writer.WriteEndElement();
42710 }
42711
42712 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
42713 void ISetAttributes.SetAttribute(string name, string value)
42714 {
42715 if (String.IsNullOrEmpty(name))
42716 {
42717 throw new ArgumentNullException("name");
42718 }
42719 if (("Name" == name))
42720 {
42721 this.nameField = value;
42722 this.nameFieldSet = true;
42723 }
42724 if (("Type" == name))
42725 {
42726 this.typeField = IgnoreModularization.ParseTypeType(value);
42727 this.typeFieldSet = true;
42728 }
42729 }
42730
42731 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
42732 public enum TypeType
42733 {
42734
42735 IllegalValue = int.MaxValue,
42736
42737 NotSet = -1,
42738
42739 Action,
42740
42741 Property,
42742
42743 Directory,
42744 }
42745 }
42746
42747 /// <summary>
42748 /// Specifies a custom action to be added to the MSI CustomAction table. Various combinations of the attributes for this element
42749 /// correspond to different custom action types. For more information about custom actions see the
42750 /// </summary>
42751 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
42752 public class CustomAction : ISchemaElement, ISetAttributes
42753 {
42754
42755 private string idField;
42756
42757 private bool idFieldSet;
42758
42759 private string binaryKeyField;
42760
42761 private bool binaryKeyFieldSet;
42762
42763 private string fileKeyField;
42764
42765 private bool fileKeyFieldSet;
42766
42767 private string propertyField;
42768
42769 private bool propertyFieldSet;
42770
42771 private string directoryField;
42772
42773 private bool directoryFieldSet;
42774
42775 private string dllEntryField;
42776
42777 private bool dllEntryFieldSet;
42778
42779 private string exeCommandField;
42780
42781 private bool exeCommandFieldSet;
42782
42783 private string jScriptCallField;
42784
42785 private bool jScriptCallFieldSet;
42786
42787 private string vBScriptCallField;
42788
42789 private bool vBScriptCallFieldSet;
42790
42791 private ScriptType scriptField;
42792
42793 private bool scriptFieldSet;
42794
42795 private YesNoType suppressModularizationField;
42796
42797 private bool suppressModularizationFieldSet;
42798
42799 private string valueField;
42800
42801 private bool valueFieldSet;
42802
42803 private string errorField;
42804
42805 private bool errorFieldSet;
42806
42807 private ReturnType returnField;
42808
42809 private bool returnFieldSet;
42810
42811 private ExecuteType executeField;
42812
42813 private bool executeFieldSet;
42814
42815 private YesNoType impersonateField;
42816
42817 private bool impersonateFieldSet;
42818
42819 private YesNoType patchUninstallField;
42820
42821 private bool patchUninstallFieldSet;
42822
42823 private YesNoType win64Field;
42824
42825 private bool win64FieldSet;
42826
42827 private YesNoType terminalServerAwareField;
42828
42829 private bool terminalServerAwareFieldSet;
42830
42831 private YesNoType hideTargetField;
42832
42833 private bool hideTargetFieldSet;
42834
42835 private string contentField;
42836
42837 private bool contentFieldSet;
42838
42839 private ISchemaElement parentElement;
42840
42841 /// <summary>
42842 /// The identifier of the custom action.
42843 /// </summary>
42844 public string Id
42845 {
42846 get
42847 {
42848 return this.idField;
42849 }
42850 set
42851 {
42852 this.idFieldSet = true;
42853 this.idField = value;
42854 }
42855 }
42856
42857 /// <summary>
42858 /// This attribute is a reference to a Binary element with matching Id attribute. That binary stream contains
42859 /// the custom action for use during install. The custom action will not be installed into a target directory. This attribute is
42860 /// typically used with the DllEntry attribute to specify the custom action DLL to use for a type 1 custom action, with the ExeCommand
42861 /// attribute to specify a type 17 custom action that runs an embedded executable, or with the VBScriptCall or JScriptCall attributes
42862 /// to specify a type 5 or 6 custom action.
42863 /// </summary>
42864 public string BinaryKey
42865 {
42866 get
42867 {
42868 return this.binaryKeyField;
42869 }
42870 set
42871 {
42872 this.binaryKeyFieldSet = true;
42873 this.binaryKeyField = value;
42874 }
42875 }
42876
42877 /// <summary>
42878 /// This attribute specifies a reference to a File element with matching Id attribute that
42879 /// will execute the custom action code in the file after the file is installed. This
42880 /// attribute is typically used with the ExeCommand attribute to specify a type 18 custom action
42881 /// that runs an installed executable, with the DllEntry attribute to specify an installed custom
42882 /// action DLL to use for a type 17 custom action, or with the VBScriptCall or JScriptCall
42883 /// attributes to specify a type 21 or 22 custom action.
42884 /// </summary>
42885 public string FileKey
42886 {
42887 get
42888 {
42889 return this.fileKeyField;
42890 }
42891 set
42892 {
42893 this.fileKeyFieldSet = true;
42894 this.fileKeyField = value;
42895 }
42896 }
42897
42898 /// <summary>
42899 /// This attribute specifies a reference to a Property element with matching Id attribute that specifies the Property
42900 /// to be used or updated on execution of this custom action. This attribute is
42901 /// typically used with the Value attribute to create a type 51 custom action that parses
42902 /// the text in Value and places it into the specified Property. This attribute is also used with
42903 /// the ExeCommand attribute to create a type 50 custom action that uses the value of the
42904 /// given property to specify the path to the executable. Type 51 custom actions are often useful to
42905 /// pass values to a deferred custom action.
42906 /// See
42907 /// </summary>
42908 public string Property
42909 {
42910 get
42911 {
42912 return this.propertyField;
42913 }
42914 set
42915 {
42916 this.propertyFieldSet = true;
42917 this.propertyField = value;
42918 }
42919 }
42920
42921 /// <summary>
42922 /// This attribute specifies a reference to a Directory element with matching Id attribute containing a directory path.
42923 /// This attribute is typically used with the ExeCommand attribute to specify the source executable for a type 34
42924 /// custom action, or with the Value attribute to specify a formatted string to place in the specified Directory
42925 /// table entry in a type 35 custom action.
42926 /// </summary>
42927 public string Directory
42928 {
42929 get
42930 {
42931 return this.directoryField;
42932 }
42933 set
42934 {
42935 this.directoryFieldSet = true;
42936 this.directoryField = value;
42937 }
42938 }
42939
42940 /// <summary>
42941 /// This attribute specifies the name of a function in a custom action to execute.
42942 /// This attribute is used with the BinaryKey attribute to create a type 1 custom
42943 /// action, or with the FileKey attribute to create a type 17 custom action.
42944 /// </summary>
42945 public string DllEntry
42946 {
42947 get
42948 {
42949 return this.dllEntryField;
42950 }
42951 set
42952 {
42953 this.dllEntryFieldSet = true;
42954 this.dllEntryField = value;
42955 }
42956 }
42957
42958 /// <summary>
42959 /// This attribute specifies the command line parameters to supply to an externally
42960 /// run executable. This attribute is typically used with the BinaryKey attribute for a type 2 custom action,
42961 /// the FileKey attribute for a type 18 custom action, the Property attribute for a type 50 custom action,
42962 /// or the Directory attribute for a type 34 custom action that specify the executable to run.
42963 /// </summary>
42964 public string ExeCommand
42965 {
42966 get
42967 {
42968 return this.exeCommandField;
42969 }
42970 set
42971 {
42972 this.exeCommandFieldSet = true;
42973 this.exeCommandField = value;
42974 }
42975 }
42976
42977 /// <summary>
42978 /// This attribute specifies the name of the JScript function to execute in a script. The script must be
42979 /// provided in a Binary element identified by the BinaryKey attribute described above. In other words, this
42980 /// attribute must be specified in conjunction with the BinaryKey attribute.
42981 /// </summary>
42982 public string JScriptCall
42983 {
42984 get
42985 {
42986 return this.jScriptCallField;
42987 }
42988 set
42989 {
42990 this.jScriptCallFieldSet = true;
42991 this.jScriptCallField = value;
42992 }
42993 }
42994
42995 /// <summary>
42996 /// This attribute specifies the name of the VBScript Subroutine to execute in a script. The script must be
42997 /// provided in a Binary element identified by the BinaryKey attribute described above. In other words, this
42998 /// attribute must be specified in conjunction with the BinaryKey attribute.
42999 /// </summary>
43000 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
43001 public string VBScriptCall
43002 {
43003 get
43004 {
43005 return this.vBScriptCallField;
43006 }
43007 set
43008 {
43009 this.vBScriptCallFieldSet = true;
43010 this.vBScriptCallField = value;
43011 }
43012 }
43013
43014 /// <summary>
43015 /// Creates a type 37 or 38 custom action. The text of the element should contain the script to be embedded in the package.
43016 /// </summary>
43017 public ScriptType Script
43018 {
43019 get
43020 {
43021 return this.scriptField;
43022 }
43023 set
43024 {
43025 this.scriptFieldSet = true;
43026 this.scriptField = value;
43027 }
43028 }
43029
43030 /// <summary>
43031 /// Use to suppress modularization of this custom action name in merge modules.
43032 /// This should only be necessary for table-driven custom actions because the
43033 /// table name which they interact with cannot be modularized, so there can only
43034 /// be one instance of the table.
43035 /// </summary>
43036 public YesNoType SuppressModularization
43037 {
43038 get
43039 {
43040 return this.suppressModularizationField;
43041 }
43042 set
43043 {
43044 this.suppressModularizationFieldSet = true;
43045 this.suppressModularizationField = value;
43046 }
43047 }
43048
43049 /// <summary>
43050 /// This attribute specifies a string value to use in the custom action. This attribute
43051 /// must be used with the Property attribute to set the property as part of a
43052 /// type 51 custom action or with the Directory attribute to set a directory path in that
43053 /// table in a type 35 custom action. The value can be a literal value or derived from a
43054 /// Property element using the
43055 /// </summary>
43056 public string Value
43057 {
43058 get
43059 {
43060 return this.valueField;
43061 }
43062 set
43063 {
43064 this.valueFieldSet = true;
43065 this.valueField = value;
43066 }
43067 }
43068
43069 /// <summary>
43070 /// This attribute specifies an index in the MSI Error table to use as an error message for a
43071 /// type 19 custom action that displays the error message and aborts a product's installation.
43072 /// </summary>
43073 public string Error
43074 {
43075 get
43076 {
43077 return this.errorField;
43078 }
43079 set
43080 {
43081 this.errorFieldSet = true;
43082 this.errorField = value;
43083 }
43084 }
43085
43086 /// <summary>
43087 /// Set this attribute to set the return behavior of the custom action.
43088 /// </summary>
43089 public ReturnType Return
43090 {
43091 get
43092 {
43093 return this.returnField;
43094 }
43095 set
43096 {
43097 this.returnFieldSet = true;
43098 this.returnField = value;
43099 }
43100 }
43101
43102 /// <summary>
43103 /// This attribute indicates the scheduling of the custom action.
43104 /// </summary>
43105 public ExecuteType Execute
43106 {
43107 get
43108 {
43109 return this.executeField;
43110 }
43111 set
43112 {
43113 this.executeFieldSet = true;
43114 this.executeField = value;
43115 }
43116 }
43117
43118 /// <summary>
43119 /// This attribute specifies whether the Windows Installer, which executes as LocalSystem,
43120 /// should impersonate the user context of the installing user when executing this custom action.
43121 /// Typically the value should be 'yes', except when the custom action needs elevated privileges
43122 /// to apply changes to the machine.
43123 /// </summary>
43124 public YesNoType Impersonate
43125 {
43126 get
43127 {
43128 return this.impersonateField;
43129 }
43130 set
43131 {
43132 this.impersonateFieldSet = true;
43133 this.impersonateField = value;
43134 }
43135 }
43136
43137 /// <summary>
43138 /// This attribute specifies that the Windows Installer, execute the custom action only when
43139 /// a patch is being uninstalled. These custom actions should also be conditioned using the
43140 /// MSIPATCHREMOVE property to ensure proper down level (less than Windows Installer 4.5)
43141 /// behavior.
43142 /// </summary>
43143 public YesNoType PatchUninstall
43144 {
43145 get
43146 {
43147 return this.patchUninstallField;
43148 }
43149 set
43150 {
43151 this.patchUninstallFieldSet = true;
43152 this.patchUninstallField = value;
43153 }
43154 }
43155
43156 /// <summary>
43157 /// Specifies that a script custom action targets a 64-bit platform. Valid only when used with
43158 /// the Script, VBScriptCall, and JScriptCall attributes.
43159 /// The default value is based on the platform set by the -arch switch to candle.exe
43160 /// or the InstallerPlatform property in a .wixproj MSBuild project:
43161 /// For x86 and ARM, the default value is 'no'.
43162 /// For x64 and IA64, the default value is 'yes'.
43163 /// </summary>
43164 public YesNoType Win64
43165 {
43166 get
43167 {
43168 return this.win64Field;
43169 }
43170 set
43171 {
43172 this.win64FieldSet = true;
43173 this.win64Field = value;
43174 }
43175 }
43176
43177 /// <summary>
43178 /// This attribute specifies controls whether the custom action will impersonate the
43179 /// installing user during per-machine installs on Terminal Server machines.
43180 /// Deferred execution custom actions that do not specify this attribute, or explicitly set it 'no',
43181 /// will run with no user impersonation on Terminal Server machines during
43182 /// per-machine installations. This attribute is only applicable when installing on the
43183 /// Windows Server 2003 family.
43184 /// </summary>
43185 public YesNoType TerminalServerAware
43186 {
43187 get
43188 {
43189 return this.terminalServerAwareField;
43190 }
43191 set
43192 {
43193 this.terminalServerAwareFieldSet = true;
43194 this.terminalServerAwareField = value;
43195 }
43196 }
43197
43198 /// <summary>
43199 /// Ensures the installer does not log the CustomActionData for the deferred custom action.
43200 /// </summary>
43201 public YesNoType HideTarget
43202 {
43203 get
43204 {
43205 return this.hideTargetField;
43206 }
43207 set
43208 {
43209 this.hideTargetFieldSet = true;
43210 this.hideTargetField = value;
43211 }
43212 }
43213
43214 /// <summary>
43215 /// The text node is only valid if the Script attribute is specified. In that case, the text node contains the script to embed.
43216 /// </summary>
43217 public string Content
43218 {
43219 get
43220 {
43221 return this.contentField;
43222 }
43223 set
43224 {
43225 this.contentFieldSet = true;
43226 this.contentField = value;
43227 }
43228 }
43229
43230 public virtual ISchemaElement ParentElement
43231 {
43232 get
43233 {
43234 return this.parentElement;
43235 }
43236 set
43237 {
43238 this.parentElement = value;
43239 }
43240 }
43241
43242 /// <summary>
43243 /// Parses a ScriptType from a string.
43244 /// </summary>
43245 public static ScriptType ParseScriptType(string value)
43246 {
43247 ScriptType parsedValue;
43248 CustomAction.TryParseScriptType(value, out parsedValue);
43249 return parsedValue;
43250 }
43251
43252 /// <summary>
43253 /// Tries to parse a ScriptType from a string.
43254 /// </summary>
43255 public static bool TryParseScriptType(string value, out ScriptType parsedValue)
43256 {
43257 parsedValue = ScriptType.NotSet;
43258 if (string.IsNullOrEmpty(value))
43259 {
43260 return false;
43261 }
43262 if (("jscript" == value))
43263 {
43264 parsedValue = ScriptType.jscript;
43265 }
43266 else
43267 {
43268 if (("vbscript" == value))
43269 {
43270 parsedValue = ScriptType.vbscript;
43271 }
43272 else
43273 {
43274 parsedValue = ScriptType.IllegalValue;
43275 return false;
43276 }
43277 }
43278 return true;
43279 }
43280
43281 /// <summary>
43282 /// Parses a ReturnType from a string.
43283 /// </summary>
43284 public static ReturnType ParseReturnType(string value)
43285 {
43286 ReturnType parsedValue;
43287 CustomAction.TryParseReturnType(value, out parsedValue);
43288 return parsedValue;
43289 }
43290
43291 /// <summary>
43292 /// Tries to parse a ReturnType from a string.
43293 /// </summary>
43294 public static bool TryParseReturnType(string value, out ReturnType parsedValue)
43295 {
43296 parsedValue = ReturnType.NotSet;
43297 if (string.IsNullOrEmpty(value))
43298 {
43299 return false;
43300 }
43301 if (("asyncNoWait" == value))
43302 {
43303 parsedValue = ReturnType.asyncNoWait;
43304 }
43305 else
43306 {
43307 if (("asyncWait" == value))
43308 {
43309 parsedValue = ReturnType.asyncWait;
43310 }
43311 else
43312 {
43313 if (("check" == value))
43314 {
43315 parsedValue = ReturnType.check;
43316 }
43317 else
43318 {
43319 if (("ignore" == value))
43320 {
43321 parsedValue = ReturnType.ignore;
43322 }
43323 else
43324 {
43325 parsedValue = ReturnType.IllegalValue;
43326 return false;
43327 }
43328 }
43329 }
43330 }
43331 return true;
43332 }
43333
43334 /// <summary>
43335 /// Parses a ExecuteType from a string.
43336 /// </summary>
43337 public static ExecuteType ParseExecuteType(string value)
43338 {
43339 ExecuteType parsedValue;
43340 CustomAction.TryParseExecuteType(value, out parsedValue);
43341 return parsedValue;
43342 }
43343
43344 /// <summary>
43345 /// Tries to parse a ExecuteType from a string.
43346 /// </summary>
43347 public static bool TryParseExecuteType(string value, out ExecuteType parsedValue)
43348 {
43349 parsedValue = ExecuteType.NotSet;
43350 if (string.IsNullOrEmpty(value))
43351 {
43352 return false;
43353 }
43354 if (("commit" == value))
43355 {
43356 parsedValue = ExecuteType.commit;
43357 }
43358 else
43359 {
43360 if (("deferred" == value))
43361 {
43362 parsedValue = ExecuteType.deferred;
43363 }
43364 else
43365 {
43366 if (("firstSequence" == value))
43367 {
43368 parsedValue = ExecuteType.firstSequence;
43369 }
43370 else
43371 {
43372 if (("immediate" == value))
43373 {
43374 parsedValue = ExecuteType.immediate;
43375 }
43376 else
43377 {
43378 if (("oncePerProcess" == value))
43379 {
43380 parsedValue = ExecuteType.oncePerProcess;
43381 }
43382 else
43383 {
43384 if (("rollback" == value))
43385 {
43386 parsedValue = ExecuteType.rollback;
43387 }
43388 else
43389 {
43390 if (("secondSequence" == value))
43391 {
43392 parsedValue = ExecuteType.secondSequence;
43393 }
43394 else
43395 {
43396 parsedValue = ExecuteType.IllegalValue;
43397 return false;
43398 }
43399 }
43400 }
43401 }
43402 }
43403 }
43404 }
43405 return true;
43406 }
43407
43408 /// <summary>
43409 /// Processes this element and all child elements into an XmlWriter.
43410 /// </summary>
43411 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
43412 public virtual void OutputXml(XmlWriter writer)
43413 {
43414 if ((null == writer))
43415 {
43416 throw new ArgumentNullException("writer");
43417 }
43418 writer.WriteStartElement("CustomAction", "http://wixtoolset.org/schemas/v4/wxs");
43419 if (this.idFieldSet)
43420 {
43421 writer.WriteAttributeString("Id", this.idField);
43422 }
43423 if (this.binaryKeyFieldSet)
43424 {
43425 writer.WriteAttributeString("BinaryKey", this.binaryKeyField);
43426 }
43427 if (this.fileKeyFieldSet)
43428 {
43429 writer.WriteAttributeString("FileKey", this.fileKeyField);
43430 }
43431 if (this.propertyFieldSet)
43432 {
43433 writer.WriteAttributeString("Property", this.propertyField);
43434 }
43435 if (this.directoryFieldSet)
43436 {
43437 writer.WriteAttributeString("Directory", this.directoryField);
43438 }
43439 if (this.dllEntryFieldSet)
43440 {
43441 writer.WriteAttributeString("DllEntry", this.dllEntryField);
43442 }
43443 if (this.exeCommandFieldSet)
43444 {
43445 writer.WriteAttributeString("ExeCommand", this.exeCommandField);
43446 }
43447 if (this.jScriptCallFieldSet)
43448 {
43449 writer.WriteAttributeString("JScriptCall", this.jScriptCallField);
43450 }
43451 if (this.vBScriptCallFieldSet)
43452 {
43453 writer.WriteAttributeString("VBScriptCall", this.vBScriptCallField);
43454 }
43455 if (this.scriptFieldSet)
43456 {
43457 if ((this.scriptField == ScriptType.jscript))
43458 {
43459 writer.WriteAttributeString("Script", "jscript");
43460 }
43461 if ((this.scriptField == ScriptType.vbscript))
43462 {
43463 writer.WriteAttributeString("Script", "vbscript");
43464 }
43465 }
43466 if (this.suppressModularizationFieldSet)
43467 {
43468 if ((this.suppressModularizationField == YesNoType.no))
43469 {
43470 writer.WriteAttributeString("SuppressModularization", "no");
43471 }
43472 if ((this.suppressModularizationField == YesNoType.yes))
43473 {
43474 writer.WriteAttributeString("SuppressModularization", "yes");
43475 }
43476 }
43477 if (this.valueFieldSet)
43478 {
43479 writer.WriteAttributeString("Value", this.valueField);
43480 }
43481 if (this.errorFieldSet)
43482 {
43483 writer.WriteAttributeString("Error", this.errorField);
43484 }
43485 if (this.returnFieldSet)
43486 {
43487 if ((this.returnField == ReturnType.asyncNoWait))
43488 {
43489 writer.WriteAttributeString("Return", "asyncNoWait");
43490 }
43491 if ((this.returnField == ReturnType.asyncWait))
43492 {
43493 writer.WriteAttributeString("Return", "asyncWait");
43494 }
43495 if ((this.returnField == ReturnType.check))
43496 {
43497 writer.WriteAttributeString("Return", "check");
43498 }
43499 if ((this.returnField == ReturnType.ignore))
43500 {
43501 writer.WriteAttributeString("Return", "ignore");
43502 }
43503 }
43504 if (this.executeFieldSet)
43505 {
43506 if ((this.executeField == ExecuteType.commit))
43507 {
43508 writer.WriteAttributeString("Execute", "commit");
43509 }
43510 if ((this.executeField == ExecuteType.deferred))
43511 {
43512 writer.WriteAttributeString("Execute", "deferred");
43513 }
43514 if ((this.executeField == ExecuteType.firstSequence))
43515 {
43516 writer.WriteAttributeString("Execute", "firstSequence");
43517 }
43518 if ((this.executeField == ExecuteType.immediate))
43519 {
43520 writer.WriteAttributeString("Execute", "immediate");
43521 }
43522 if ((this.executeField == ExecuteType.oncePerProcess))
43523 {
43524 writer.WriteAttributeString("Execute", "oncePerProcess");
43525 }
43526 if ((this.executeField == ExecuteType.rollback))
43527 {
43528 writer.WriteAttributeString("Execute", "rollback");
43529 }
43530 if ((this.executeField == ExecuteType.secondSequence))
43531 {
43532 writer.WriteAttributeString("Execute", "secondSequence");
43533 }
43534 }
43535 if (this.impersonateFieldSet)
43536 {
43537 if ((this.impersonateField == YesNoType.no))
43538 {
43539 writer.WriteAttributeString("Impersonate", "no");
43540 }
43541 if ((this.impersonateField == YesNoType.yes))
43542 {
43543 writer.WriteAttributeString("Impersonate", "yes");
43544 }
43545 }
43546 if (this.patchUninstallFieldSet)
43547 {
43548 if ((this.patchUninstallField == YesNoType.no))
43549 {
43550 writer.WriteAttributeString("PatchUninstall", "no");
43551 }
43552 if ((this.patchUninstallField == YesNoType.yes))
43553 {
43554 writer.WriteAttributeString("PatchUninstall", "yes");
43555 }
43556 }
43557 if (this.win64FieldSet)
43558 {
43559 if ((this.win64Field == YesNoType.no))
43560 {
43561 writer.WriteAttributeString("Win64", "no");
43562 }
43563 if ((this.win64Field == YesNoType.yes))
43564 {
43565 writer.WriteAttributeString("Win64", "yes");
43566 }
43567 }
43568 if (this.terminalServerAwareFieldSet)
43569 {
43570 if ((this.terminalServerAwareField == YesNoType.no))
43571 {
43572 writer.WriteAttributeString("TerminalServerAware", "no");
43573 }
43574 if ((this.terminalServerAwareField == YesNoType.yes))
43575 {
43576 writer.WriteAttributeString("TerminalServerAware", "yes");
43577 }
43578 }
43579 if (this.hideTargetFieldSet)
43580 {
43581 if ((this.hideTargetField == YesNoType.no))
43582 {
43583 writer.WriteAttributeString("HideTarget", "no");
43584 }
43585 if ((this.hideTargetField == YesNoType.yes))
43586 {
43587 writer.WriteAttributeString("HideTarget", "yes");
43588 }
43589 }
43590 if (this.contentFieldSet)
43591 {
43592 writer.WriteString(this.contentField);
43593 }
43594 writer.WriteEndElement();
43595 }
43596
43597 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
43598 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
43599 void ISetAttributes.SetAttribute(string name, string value)
43600 {
43601 if (String.IsNullOrEmpty(name))
43602 {
43603 throw new ArgumentNullException("name");
43604 }
43605 if (("Id" == name))
43606 {
43607 this.idField = value;
43608 this.idFieldSet = true;
43609 }
43610 if (("BinaryKey" == name))
43611 {
43612 this.binaryKeyField = value;
43613 this.binaryKeyFieldSet = true;
43614 }
43615 if (("FileKey" == name))
43616 {
43617 this.fileKeyField = value;
43618 this.fileKeyFieldSet = true;
43619 }
43620 if (("Property" == name))
43621 {
43622 this.propertyField = value;
43623 this.propertyFieldSet = true;
43624 }
43625 if (("Directory" == name))
43626 {
43627 this.directoryField = value;
43628 this.directoryFieldSet = true;
43629 }
43630 if (("DllEntry" == name))
43631 {
43632 this.dllEntryField = value;
43633 this.dllEntryFieldSet = true;
43634 }
43635 if (("ExeCommand" == name))
43636 {
43637 this.exeCommandField = value;
43638 this.exeCommandFieldSet = true;
43639 }
43640 if (("JScriptCall" == name))
43641 {
43642 this.jScriptCallField = value;
43643 this.jScriptCallFieldSet = true;
43644 }
43645 if (("VBScriptCall" == name))
43646 {
43647 this.vBScriptCallField = value;
43648 this.vBScriptCallFieldSet = true;
43649 }
43650 if (("Script" == name))
43651 {
43652 this.scriptField = CustomAction.ParseScriptType(value);
43653 this.scriptFieldSet = true;
43654 }
43655 if (("SuppressModularization" == name))
43656 {
43657 this.suppressModularizationField = Enums.ParseYesNoType(value);
43658 this.suppressModularizationFieldSet = true;
43659 }
43660 if (("Value" == name))
43661 {
43662 this.valueField = value;
43663 this.valueFieldSet = true;
43664 }
43665 if (("Error" == name))
43666 {
43667 this.errorField = value;
43668 this.errorFieldSet = true;
43669 }
43670 if (("Return" == name))
43671 {
43672 this.returnField = CustomAction.ParseReturnType(value);
43673 this.returnFieldSet = true;
43674 }
43675 if (("Execute" == name))
43676 {
43677 this.executeField = CustomAction.ParseExecuteType(value);
43678 this.executeFieldSet = true;
43679 }
43680 if (("Impersonate" == name))
43681 {
43682 this.impersonateField = Enums.ParseYesNoType(value);
43683 this.impersonateFieldSet = true;
43684 }
43685 if (("PatchUninstall" == name))
43686 {
43687 this.patchUninstallField = Enums.ParseYesNoType(value);
43688 this.patchUninstallFieldSet = true;
43689 }
43690 if (("Win64" == name))
43691 {
43692 this.win64Field = Enums.ParseYesNoType(value);
43693 this.win64FieldSet = true;
43694 }
43695 if (("TerminalServerAware" == name))
43696 {
43697 this.terminalServerAwareField = Enums.ParseYesNoType(value);
43698 this.terminalServerAwareFieldSet = true;
43699 }
43700 if (("HideTarget" == name))
43701 {
43702 this.hideTargetField = Enums.ParseYesNoType(value);
43703 this.hideTargetFieldSet = true;
43704 }
43705 if (("Content" == name))
43706 {
43707 this.contentField = value;
43708 this.contentFieldSet = true;
43709 }
43710 }
43711
43712 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
43713 public enum ScriptType
43714 {
43715
43716 IllegalValue = int.MaxValue,
43717
43718 NotSet = -1,
43719
43720 jscript,
43721
43722 vbscript,
43723 }
43724
43725 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
43726 public enum ReturnType
43727 {
43728
43729 IllegalValue = int.MaxValue,
43730
43731 NotSet = -1,
43732
43733 /// <summary>
43734 /// Indicates that the custom action will run asyncronously and execution may continue after the installer terminates.
43735 /// </summary>
43736 asyncNoWait,
43737
43738 /// <summary>
43739 /// Indicates that the custom action will run asynchronously but the installer will wait for the return code at sequence end.
43740 /// </summary>
43741 asyncWait,
43742
43743 /// <summary>
43744 /// Indicates that the custom action will run synchronously and the return code will be checked for success. This is the default.
43745 /// </summary>
43746 check,
43747
43748 /// <summary>
43749 /// Indicates that the custom action will run synchronously and the return code will not be checked.
43750 /// </summary>
43751 ignore,
43752 }
43753
43754 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
43755 public enum ExecuteType
43756 {
43757
43758 IllegalValue = int.MaxValue,
43759
43760 NotSet = -1,
43761
43762 /// <summary>
43763 /// Indicates that the custom action will run after successful completion of the installation script (at the end of the installation).
43764 /// </summary>
43765 commit,
43766
43767 /// <summary>
43768 /// Indicates that the custom action runs in-script (possibly with elevated privileges).
43769 /// </summary>
43770 deferred,
43771
43772 /// <summary>
43773 /// Indicates that the custom action will only run in the first sequence that runs it.
43774 /// </summary>
43775 firstSequence,
43776
43777 /// <summary>
43778 /// Indicates that the custom action will run during normal processing time with user privileges. This is the default.
43779 /// </summary>
43780 immediate,
43781
43782 /// <summary>
43783 /// Indicates that the custom action will only run in the first sequence that runs it in the same process.
43784 /// </summary>
43785 oncePerProcess,
43786
43787 /// <summary>
43788 /// Indicates that a custom action will run in the rollback sequence when a failure
43789 /// occurs during installation, usually to undo changes made by a deferred custom action.
43790 /// </summary>
43791 rollback,
43792
43793 /// <summary>
43794 /// Indicates that a custom action should be run a second time if it was previously run in an earlier sequence.
43795 /// </summary>
43796 secondSequence,
43797 }
43798 }
43799
43800 /// <summary>
43801 /// This will cause the entire contents of the Fragment containing the referenced CustomAction to be
43802 /// included in the installer database.
43803 /// </summary>
43804 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
43805 public class CustomActionRef : ISchemaElement, ISetAttributes
43806 {
43807
43808 private string idField;
43809
43810 private bool idFieldSet;
43811
43812 private ISchemaElement parentElement;
43813
43814 /// <summary>
43815 /// The identifier of the CustomAction to reference.
43816 /// </summary>
43817 public string Id
43818 {
43819 get
43820 {
43821 return this.idField;
43822 }
43823 set
43824 {
43825 this.idFieldSet = true;
43826 this.idField = value;
43827 }
43828 }
43829
43830 public virtual ISchemaElement ParentElement
43831 {
43832 get
43833 {
43834 return this.parentElement;
43835 }
43836 set
43837 {
43838 this.parentElement = value;
43839 }
43840 }
43841
43842 /// <summary>
43843 /// Processes this element and all child elements into an XmlWriter.
43844 /// </summary>
43845 public virtual void OutputXml(XmlWriter writer)
43846 {
43847 if ((null == writer))
43848 {
43849 throw new ArgumentNullException("writer");
43850 }
43851 writer.WriteStartElement("CustomActionRef", "http://wixtoolset.org/schemas/v4/wxs");
43852 if (this.idFieldSet)
43853 {
43854 writer.WriteAttributeString("Id", this.idField);
43855 }
43856 writer.WriteEndElement();
43857 }
43858
43859 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
43860 void ISetAttributes.SetAttribute(string name, string value)
43861 {
43862 if (String.IsNullOrEmpty(name))
43863 {
43864 throw new ArgumentNullException("name");
43865 }
43866 if (("Id" == name))
43867 {
43868 this.idField = value;
43869 this.idFieldSet = true;
43870 }
43871 }
43872 }
43873
43874 /// <summary>
43875 /// Sets a Directory to a particular value. This is accomplished by creating a Type 51 custom action that is appropriately scheduled in
43876 /// the InstallUISequence and InstallExecuteSequence.
43877 /// </summary>
43878 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
43879 public class SetDirectory : ISchemaElement, ISetAttributes
43880 {
43881
43882 private string actionField;
43883
43884 private bool actionFieldSet;
43885
43886 private string idField;
43887
43888 private bool idFieldSet;
43889
43890 private SequenceType sequenceField;
43891
43892 private bool sequenceFieldSet;
43893
43894 private string valueField;
43895
43896 private bool valueFieldSet;
43897
43898 private string contentField;
43899
43900 private bool contentFieldSet;
43901
43902 private ISchemaElement parentElement;
43903
43904 /// <summary>
43905 /// By default the action is "Set" + Id attribute's value. This optional attribute can override the action name in the case
43906 /// where multiple SetDirectory elements target the same Id (probably with mutually exclusive conditions).
43907 /// </summary>
43908 public string Action
43909 {
43910 get
43911 {
43912 return this.actionField;
43913 }
43914 set
43915 {
43916 this.actionFieldSet = true;
43917 this.actionField = value;
43918 }
43919 }
43920
43921 /// <summary>
43922 /// This attribute specifies a reference to a Directory element with matching Id attribute. The path of the Directory will be set to
43923 /// the Value attribute.
43924 /// </summary>
43925 public string Id
43926 {
43927 get
43928 {
43929 return this.idField;
43930 }
43931 set
43932 {
43933 this.idFieldSet = true;
43934 this.idField = value;
43935 }
43936 }
43937
43938 /// <summary>
43939 /// Controls which sequences the Directory assignment is sequenced in.
43940 /// For 'execute', the assignment is scheduled in the InstallExecuteSequence.
43941 /// For 'ui', the assignment is scheduled in the InstallUISequence.
43942 /// For 'first', the assignment is scheduled in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped at install time.
43943 /// For 'both', the assignment is scheduled in both the InstallUISequence and the InstallExecuteSequence.
43944 /// The default is 'both'.
43945 /// </summary>
43946 public SequenceType Sequence
43947 {
43948 get
43949 {
43950 return this.sequenceField;
43951 }
43952 set
43953 {
43954 this.sequenceFieldSet = true;
43955 this.sequenceField = value;
43956 }
43957 }
43958
43959 /// <summary>
43960 /// This attribute specifies a string value to assign to the Directory. The value can be a literal value or derived from a
43961 /// Property element using the
43962 /// </summary>
43963 public string Value
43964 {
43965 get
43966 {
43967 return this.valueField;
43968 }
43969 set
43970 {
43971 this.valueFieldSet = true;
43972 this.valueField = value;
43973 }
43974 }
43975
43976 /// <summary>
43977 /// The condition that determines whether the Directory is set. If the condition evaluates to false, the SetDirectory is skipped.
43978 /// </summary>
43979 public string Content
43980 {
43981 get
43982 {
43983 return this.contentField;
43984 }
43985 set
43986 {
43987 this.contentFieldSet = true;
43988 this.contentField = value;
43989 }
43990 }
43991
43992 public virtual ISchemaElement ParentElement
43993 {
43994 get
43995 {
43996 return this.parentElement;
43997 }
43998 set
43999 {
44000 this.parentElement = value;
44001 }
44002 }
44003
44004 /// <summary>
44005 /// Processes this element and all child elements into an XmlWriter.
44006 /// </summary>
44007 public virtual void OutputXml(XmlWriter writer)
44008 {
44009 if ((null == writer))
44010 {
44011 throw new ArgumentNullException("writer");
44012 }
44013 writer.WriteStartElement("SetDirectory", "http://wixtoolset.org/schemas/v4/wxs");
44014 if (this.actionFieldSet)
44015 {
44016 writer.WriteAttributeString("Action", this.actionField);
44017 }
44018 if (this.idFieldSet)
44019 {
44020 writer.WriteAttributeString("Id", this.idField);
44021 }
44022 if (this.sequenceFieldSet)
44023 {
44024 if ((this.sequenceField == SequenceType.both))
44025 {
44026 writer.WriteAttributeString("Sequence", "both");
44027 }
44028 if ((this.sequenceField == SequenceType.first))
44029 {
44030 writer.WriteAttributeString("Sequence", "first");
44031 }
44032 if ((this.sequenceField == SequenceType.execute))
44033 {
44034 writer.WriteAttributeString("Sequence", "execute");
44035 }
44036 if ((this.sequenceField == SequenceType.ui))
44037 {
44038 writer.WriteAttributeString("Sequence", "ui");
44039 }
44040 }
44041 if (this.valueFieldSet)
44042 {
44043 writer.WriteAttributeString("Value", this.valueField);
44044 }
44045 if (this.contentFieldSet)
44046 {
44047 writer.WriteString(this.contentField);
44048 }
44049 writer.WriteEndElement();
44050 }
44051
44052 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
44053 void ISetAttributes.SetAttribute(string name, string value)
44054 {
44055 if (String.IsNullOrEmpty(name))
44056 {
44057 throw new ArgumentNullException("name");
44058 }
44059 if (("Action" == name))
44060 {
44061 this.actionField = value;
44062 this.actionFieldSet = true;
44063 }
44064 if (("Id" == name))
44065 {
44066 this.idField = value;
44067 this.idFieldSet = true;
44068 }
44069 if (("Sequence" == name))
44070 {
44071 this.sequenceField = Enums.ParseSequenceType(value);
44072 this.sequenceFieldSet = true;
44073 }
44074 if (("Value" == name))
44075 {
44076 this.valueField = value;
44077 this.valueFieldSet = true;
44078 }
44079 if (("Content" == name))
44080 {
44081 this.contentField = value;
44082 this.contentFieldSet = true;
44083 }
44084 }
44085 }
44086
44087 /// <summary>
44088 /// Sets a Property to a particular value. This is accomplished by creating a Type 51 custom action that is appropriately scheduled in
44089 /// the InstallUISequence and InstallExecuteSequence.
44090 /// </summary>
44091 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44092 public class SetProperty : ISchemaElement, ISetAttributes
44093 {
44094
44095 private string actionField;
44096
44097 private bool actionFieldSet;
44098
44099 private string afterField;
44100
44101 private bool afterFieldSet;
44102
44103 private string beforeField;
44104
44105 private bool beforeFieldSet;
44106
44107 private string idField;
44108
44109 private bool idFieldSet;
44110
44111 private SequenceType sequenceField;
44112
44113 private bool sequenceFieldSet;
44114
44115 private string valueField;
44116
44117 private bool valueFieldSet;
44118
44119 private string contentField;
44120
44121 private bool contentFieldSet;
44122
44123 private ISchemaElement parentElement;
44124
44125 /// <summary>
44126 /// By default the action is "Set" + Id attribute's value. This optional attribute can override the action name in the case
44127 /// where multiple SetProperty elements target the same Id (probably with mutually exclusive conditions).
44128 /// </summary>
44129 public string Action
44130 {
44131 get
44132 {
44133 return this.actionField;
44134 }
44135 set
44136 {
44137 this.actionFieldSet = true;
44138 this.actionField = value;
44139 }
44140 }
44141
44142 /// <summary>
44143 /// 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.
44144 /// </summary>
44145 public string After
44146 {
44147 get
44148 {
44149 return this.afterField;
44150 }
44151 set
44152 {
44153 this.afterFieldSet = true;
44154 this.afterField = value;
44155 }
44156 }
44157
44158 /// <summary>
44159 /// 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.
44160 /// </summary>
44161 public string Before
44162 {
44163 get
44164 {
44165 return this.beforeField;
44166 }
44167 set
44168 {
44169 this.beforeFieldSet = true;
44170 this.beforeField = value;
44171 }
44172 }
44173
44174 /// <summary>
44175 /// This attribute specifies the Property to set to the Value.
44176 /// </summary>
44177 public string Id
44178 {
44179 get
44180 {
44181 return this.idField;
44182 }
44183 set
44184 {
44185 this.idFieldSet = true;
44186 this.idField = value;
44187 }
44188 }
44189
44190 /// <summary>
44191 /// Controls which sequences the Property assignment is sequenced in.
44192 /// For 'execute', the assignment is scheduled in the InstallExecuteSequence.
44193 /// For 'ui', the assignment is scheduled in the InstallUISequence.
44194 /// For 'first', the assignment is scheduled in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped at install time.
44195 /// For 'both', the assignment is scheduled in both the InstallUISequence and the InstallExecuteSequence.
44196 /// The default is 'both'.
44197 /// </summary>
44198 public SequenceType Sequence
44199 {
44200 get
44201 {
44202 return this.sequenceField;
44203 }
44204 set
44205 {
44206 this.sequenceFieldSet = true;
44207 this.sequenceField = value;
44208 }
44209 }
44210
44211 /// <summary>
44212 /// This attribute specifies a string value to assign to the Property. The value can be a literal value or derived from a
44213 /// Property element using the
44214 /// </summary>
44215 public string Value
44216 {
44217 get
44218 {
44219 return this.valueField;
44220 }
44221 set
44222 {
44223 this.valueFieldSet = true;
44224 this.valueField = value;
44225 }
44226 }
44227
44228 /// <summary>
44229 /// The condition that determines whether the Property is set. If the condition evaluates to false, the Set is skipped.
44230 /// </summary>
44231 public string Content
44232 {
44233 get
44234 {
44235 return this.contentField;
44236 }
44237 set
44238 {
44239 this.contentFieldSet = true;
44240 this.contentField = value;
44241 }
44242 }
44243
44244 public virtual ISchemaElement ParentElement
44245 {
44246 get
44247 {
44248 return this.parentElement;
44249 }
44250 set
44251 {
44252 this.parentElement = value;
44253 }
44254 }
44255
44256 /// <summary>
44257 /// Processes this element and all child elements into an XmlWriter.
44258 /// </summary>
44259 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
44260 public virtual void OutputXml(XmlWriter writer)
44261 {
44262 if ((null == writer))
44263 {
44264 throw new ArgumentNullException("writer");
44265 }
44266 writer.WriteStartElement("SetProperty", "http://wixtoolset.org/schemas/v4/wxs");
44267 if (this.actionFieldSet)
44268 {
44269 writer.WriteAttributeString("Action", this.actionField);
44270 }
44271 if (this.afterFieldSet)
44272 {
44273 writer.WriteAttributeString("After", this.afterField);
44274 }
44275 if (this.beforeFieldSet)
44276 {
44277 writer.WriteAttributeString("Before", this.beforeField);
44278 }
44279 if (this.idFieldSet)
44280 {
44281 writer.WriteAttributeString("Id", this.idField);
44282 }
44283 if (this.sequenceFieldSet)
44284 {
44285 if ((this.sequenceField == SequenceType.both))
44286 {
44287 writer.WriteAttributeString("Sequence", "both");
44288 }
44289 if ((this.sequenceField == SequenceType.first))
44290 {
44291 writer.WriteAttributeString("Sequence", "first");
44292 }
44293 if ((this.sequenceField == SequenceType.execute))
44294 {
44295 writer.WriteAttributeString("Sequence", "execute");
44296 }
44297 if ((this.sequenceField == SequenceType.ui))
44298 {
44299 writer.WriteAttributeString("Sequence", "ui");
44300 }
44301 }
44302 if (this.valueFieldSet)
44303 {
44304 writer.WriteAttributeString("Value", this.valueField);
44305 }
44306 if (this.contentFieldSet)
44307 {
44308 writer.WriteString(this.contentField);
44309 }
44310 writer.WriteEndElement();
44311 }
44312
44313 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
44314 void ISetAttributes.SetAttribute(string name, string value)
44315 {
44316 if (String.IsNullOrEmpty(name))
44317 {
44318 throw new ArgumentNullException("name");
44319 }
44320 if (("Action" == name))
44321 {
44322 this.actionField = value;
44323 this.actionFieldSet = true;
44324 }
44325 if (("After" == name))
44326 {
44327 this.afterField = value;
44328 this.afterFieldSet = true;
44329 }
44330 if (("Before" == name))
44331 {
44332 this.beforeField = value;
44333 this.beforeFieldSet = true;
44334 }
44335 if (("Id" == name))
44336 {
44337 this.idField = value;
44338 this.idFieldSet = true;
44339 }
44340 if (("Sequence" == name))
44341 {
44342 this.sequenceField = Enums.ParseSequenceType(value);
44343 this.sequenceFieldSet = true;
44344 }
44345 if (("Value" == name))
44346 {
44347 this.valueField = value;
44348 this.valueFieldSet = true;
44349 }
44350 if (("Content" == name))
44351 {
44352 this.contentField = value;
44353 this.contentFieldSet = true;
44354 }
44355 }
44356 }
44357
44358 /// <summary>
44359 /// This will cause the entire contents of the Fragment containing the referenced PatchFamily to be
44360 /// used in the process of creating a patch.
44361 /// </summary>
44362 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44363 public class PatchFamilyRef : ISchemaElement, ISetAttributes
44364 {
44365
44366 private string idField;
44367
44368 private bool idFieldSet;
44369
44370 private string productCodeField;
44371
44372 private bool productCodeFieldSet;
44373
44374 private ISchemaElement parentElement;
44375
44376 /// <summary>
44377 /// The identifier of the PatchFamily to reference.
44378 /// </summary>
44379 public string Id
44380 {
44381 get
44382 {
44383 return this.idField;
44384 }
44385 set
44386 {
44387 this.idFieldSet = true;
44388 this.idField = value;
44389 }
44390 }
44391
44392 /// <summary>
44393 /// Specifies the ProductCode of the product that this family applies to.
44394 /// </summary>
44395 public string ProductCode
44396 {
44397 get
44398 {
44399 return this.productCodeField;
44400 }
44401 set
44402 {
44403 this.productCodeFieldSet = true;
44404 this.productCodeField = value;
44405 }
44406 }
44407
44408 public virtual ISchemaElement ParentElement
44409 {
44410 get
44411 {
44412 return this.parentElement;
44413 }
44414 set
44415 {
44416 this.parentElement = value;
44417 }
44418 }
44419
44420 /// <summary>
44421 /// Processes this element and all child elements into an XmlWriter.
44422 /// </summary>
44423 public virtual void OutputXml(XmlWriter writer)
44424 {
44425 if ((null == writer))
44426 {
44427 throw new ArgumentNullException("writer");
44428 }
44429 writer.WriteStartElement("PatchFamilyRef", "http://wixtoolset.org/schemas/v4/wxs");
44430 if (this.idFieldSet)
44431 {
44432 writer.WriteAttributeString("Id", this.idField);
44433 }
44434 if (this.productCodeFieldSet)
44435 {
44436 writer.WriteAttributeString("ProductCode", this.productCodeField);
44437 }
44438 writer.WriteEndElement();
44439 }
44440
44441 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
44442 void ISetAttributes.SetAttribute(string name, string value)
44443 {
44444 if (String.IsNullOrEmpty(name))
44445 {
44446 throw new ArgumentNullException("name");
44447 }
44448 if (("Id" == name))
44449 {
44450 this.idField = value;
44451 this.idFieldSet = true;
44452 }
44453 if (("ProductCode" == name))
44454 {
44455 this.productCodeField = value;
44456 this.productCodeFieldSet = true;
44457 }
44458 }
44459 }
44460
44461 /// <summary>
44462 /// 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.
44463 /// </summary>
44464 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44465 public class ValidateProductID : ActionSequenceType, ISchemaElement
44466 {
44467
44468 /// <summary>
44469 /// Processes this element and all child elements into an XmlWriter.
44470 /// </summary>
44471 public override void OutputXml(XmlWriter writer)
44472 {
44473 if ((null == writer))
44474 {
44475 throw new ArgumentNullException("writer");
44476 }
44477 writer.WriteStartElement("ValidateProductID", "http://wixtoolset.org/schemas/v4/wxs");
44478 base.OutputXml(writer);
44479 writer.WriteEndElement();
44480 }
44481 }
44482
44483 /// <summary>
44484 /// 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.
44485 /// </summary>
44486 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44487 public class CostInitialize : ActionSequenceType, ISchemaElement
44488 {
44489
44490 /// <summary>
44491 /// Processes this element and all child elements into an XmlWriter.
44492 /// </summary>
44493 public override void OutputXml(XmlWriter writer)
44494 {
44495 if ((null == writer))
44496 {
44497 throw new ArgumentNullException("writer");
44498 }
44499 writer.WriteStartElement("CostInitialize", "http://wixtoolset.org/schemas/v4/wxs");
44500 base.OutputXml(writer);
44501 writer.WriteEndElement();
44502 }
44503 }
44504
44505 /// <summary>
44506 /// 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.
44507 /// </summary>
44508 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44509 public class FileCost : ActionSequenceType, ISchemaElement
44510 {
44511
44512 /// <summary>
44513 /// Processes this element and all child elements into an XmlWriter.
44514 /// </summary>
44515 public override void OutputXml(XmlWriter writer)
44516 {
44517 if ((null == writer))
44518 {
44519 throw new ArgumentNullException("writer");
44520 }
44521 writer.WriteStartElement("FileCost", "http://wixtoolset.org/schemas/v4/wxs");
44522 base.OutputXml(writer);
44523 writer.WriteEndElement();
44524 }
44525 }
44526
44527 /// <summary>
44528 /// 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.
44529 /// </summary>
44530 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44531 public class IsolateComponents : ActionSequenceType, ISchemaElement
44532 {
44533
44534 /// <summary>
44535 /// Processes this element and all child elements into an XmlWriter.
44536 /// </summary>
44537 public override void OutputXml(XmlWriter writer)
44538 {
44539 if ((null == writer))
44540 {
44541 throw new ArgumentNullException("writer");
44542 }
44543 writer.WriteStartElement("IsolateComponents", "http://wixtoolset.org/schemas/v4/wxs");
44544 base.OutputXml(writer);
44545 writer.WriteEndElement();
44546 }
44547 }
44548
44549 /// <summary>
44550 /// 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.
44551 /// </summary>
44552 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44553 public class CostFinalize : ActionSequenceType, ISchemaElement
44554 {
44555
44556 /// <summary>
44557 /// Processes this element and all child elements into an XmlWriter.
44558 /// </summary>
44559 public override void OutputXml(XmlWriter writer)
44560 {
44561 if ((null == writer))
44562 {
44563 throw new ArgumentNullException("writer");
44564 }
44565 writer.WriteStartElement("CostFinalize", "http://wixtoolset.org/schemas/v4/wxs");
44566 base.OutputXml(writer);
44567 writer.WriteEndElement();
44568 }
44569 }
44570
44571 /// <summary>
44572 /// 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.
44573 /// </summary>
44574 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44575 public class SetODBCFolders : ActionSequenceType, ISchemaElement
44576 {
44577
44578 /// <summary>
44579 /// Processes this element and all child elements into an XmlWriter.
44580 /// </summary>
44581 public override void OutputXml(XmlWriter writer)
44582 {
44583 if ((null == writer))
44584 {
44585 throw new ArgumentNullException("writer");
44586 }
44587 writer.WriteStartElement("SetODBCFolders", "http://wixtoolset.org/schemas/v4/wxs");
44588 base.OutputXml(writer);
44589 writer.WriteEndElement();
44590 }
44591 }
44592
44593 /// <summary>
44594 /// 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.
44595 /// </summary>
44596 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44597 public class MigrateFeatureStates : ActionSequenceType, ISchemaElement
44598 {
44599
44600 /// <summary>
44601 /// Processes this element and all child elements into an XmlWriter.
44602 /// </summary>
44603 public override void OutputXml(XmlWriter writer)
44604 {
44605 if ((null == writer))
44606 {
44607 throw new ArgumentNullException("writer");
44608 }
44609 writer.WriteStartElement("MigrateFeatureStates", "http://wixtoolset.org/schemas/v4/wxs");
44610 base.OutputXml(writer);
44611 writer.WriteEndElement();
44612 }
44613 }
44614
44615 /// <summary>
44616 /// Initiates the execution sequence. The condition for this action may be specified in the element's inner text.
44617 /// </summary>
44618 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44619 public class ExecuteAction : ActionSequenceType, ISchemaElement
44620 {
44621
44622 /// <summary>
44623 /// Processes this element and all child elements into an XmlWriter.
44624 /// </summary>
44625 public override void OutputXml(XmlWriter writer)
44626 {
44627 if ((null == writer))
44628 {
44629 throw new ArgumentNullException("writer");
44630 }
44631 writer.WriteStartElement("ExecuteAction", "http://wixtoolset.org/schemas/v4/wxs");
44632 base.OutputXml(writer);
44633 writer.WriteEndElement();
44634 }
44635 }
44636
44637 /// <summary>
44638 /// 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.
44639 /// </summary>
44640 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44641 public class InstallValidate : ActionSequenceType, ISchemaElement
44642 {
44643
44644 /// <summary>
44645 /// Processes this element and all child elements into an XmlWriter.
44646 /// </summary>
44647 public override void OutputXml(XmlWriter writer)
44648 {
44649 if ((null == writer))
44650 {
44651 throw new ArgumentNullException("writer");
44652 }
44653 writer.WriteStartElement("InstallValidate", "http://wixtoolset.org/schemas/v4/wxs");
44654 base.OutputXml(writer);
44655 writer.WriteEndElement();
44656 }
44657 }
44658
44659 /// <summary>
44660 /// 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.
44661 /// </summary>
44662 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44663 public class InstallInitialize : ActionSequenceType, ISchemaElement
44664 {
44665
44666 /// <summary>
44667 /// Processes this element and all child elements into an XmlWriter.
44668 /// </summary>
44669 public override void OutputXml(XmlWriter writer)
44670 {
44671 if ((null == writer))
44672 {
44673 throw new ArgumentNullException("writer");
44674 }
44675 writer.WriteStartElement("InstallInitialize", "http://wixtoolset.org/schemas/v4/wxs");
44676 base.OutputXml(writer);
44677 writer.WriteEndElement();
44678 }
44679 }
44680
44681 /// <summary>
44682 /// Ensures the needed amount of space exists in the registry. The condition for this action may be specified in the element's inner text.
44683 /// </summary>
44684 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44685 public class AllocateRegistrySpace : ActionSequenceType, ISchemaElement
44686 {
44687
44688 /// <summary>
44689 /// Processes this element and all child elements into an XmlWriter.
44690 /// </summary>
44691 public override void OutputXml(XmlWriter writer)
44692 {
44693 if ((null == writer))
44694 {
44695 throw new ArgumentNullException("writer");
44696 }
44697 writer.WriteStartElement("AllocateRegistrySpace", "http://wixtoolset.org/schemas/v4/wxs");
44698 base.OutputXml(writer);
44699 writer.WriteEndElement();
44700 }
44701 }
44702
44703 /// <summary>
44704 /// 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.
44705 /// </summary>
44706 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44707 public class ProcessComponents : ActionSequenceType, ISchemaElement
44708 {
44709
44710 /// <summary>
44711 /// Processes this element and all child elements into an XmlWriter.
44712 /// </summary>
44713 public override void OutputXml(XmlWriter writer)
44714 {
44715 if ((null == writer))
44716 {
44717 throw new ArgumentNullException("writer");
44718 }
44719 writer.WriteStartElement("ProcessComponents", "http://wixtoolset.org/schemas/v4/wxs");
44720 base.OutputXml(writer);
44721 writer.WriteEndElement();
44722 }
44723 }
44724
44725 /// <summary>
44726 /// Manages the unadvertisement of components listed in the PublishComponent table. The condition for this action may be specified in the element's inner text.
44727 /// </summary>
44728 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44729 public class UnpublishComponents : ActionSequenceType, ISchemaElement
44730 {
44731
44732 /// <summary>
44733 /// Processes this element and all child elements into an XmlWriter.
44734 /// </summary>
44735 public override void OutputXml(XmlWriter writer)
44736 {
44737 if ((null == writer))
44738 {
44739 throw new ArgumentNullException("writer");
44740 }
44741 writer.WriteStartElement("UnpublishComponents", "http://wixtoolset.org/schemas/v4/wxs");
44742 base.OutputXml(writer);
44743 writer.WriteEndElement();
44744 }
44745 }
44746
44747 /// <summary>
44748 /// 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.
44749 /// </summary>
44750 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44751 public class MsiUnpublishAssemblies : ActionSequenceType, ISchemaElement
44752 {
44753
44754 /// <summary>
44755 /// Processes this element and all child elements into an XmlWriter.
44756 /// </summary>
44757 public override void OutputXml(XmlWriter writer)
44758 {
44759 if ((null == writer))
44760 {
44761 throw new ArgumentNullException("writer");
44762 }
44763 writer.WriteStartElement("MsiUnpublishAssemblies", "http://wixtoolset.org/schemas/v4/wxs");
44764 base.OutputXml(writer);
44765 writer.WriteEndElement();
44766 }
44767 }
44768
44769 /// <summary>
44770 /// 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.
44771 /// </summary>
44772 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44773 public class UnpublishFeatures : ActionSequenceType, ISchemaElement
44774 {
44775
44776 /// <summary>
44777 /// Processes this element and all child elements into an XmlWriter.
44778 /// </summary>
44779 public override void OutputXml(XmlWriter writer)
44780 {
44781 if ((null == writer))
44782 {
44783 throw new ArgumentNullException("writer");
44784 }
44785 writer.WriteStartElement("UnpublishFeatures", "http://wixtoolset.org/schemas/v4/wxs");
44786 base.OutputXml(writer);
44787 writer.WriteEndElement();
44788 }
44789 }
44790
44791 /// <summary>
44792 /// Stops system services. The condition for this action may be specified in the element's inner text.
44793 /// </summary>
44794 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44795 public class StopServices : ActionSequenceType, ISchemaElement
44796 {
44797
44798 /// <summary>
44799 /// Processes this element and all child elements into an XmlWriter.
44800 /// </summary>
44801 public override void OutputXml(XmlWriter writer)
44802 {
44803 if ((null == writer))
44804 {
44805 throw new ArgumentNullException("writer");
44806 }
44807 writer.WriteStartElement("StopServices", "http://wixtoolset.org/schemas/v4/wxs");
44808 base.OutputXml(writer);
44809 writer.WriteEndElement();
44810 }
44811 }
44812
44813 /// <summary>
44814 /// Stops a service and removes its registration from the system. The condition for this action may be specified in the element's inner text.
44815 /// </summary>
44816 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44817 public class DeleteServices : ActionSequenceType, ISchemaElement
44818 {
44819
44820 /// <summary>
44821 /// Processes this element and all child elements into an XmlWriter.
44822 /// </summary>
44823 public override void OutputXml(XmlWriter writer)
44824 {
44825 if ((null == writer))
44826 {
44827 throw new ArgumentNullException("writer");
44828 }
44829 writer.WriteStartElement("DeleteServices", "http://wixtoolset.org/schemas/v4/wxs");
44830 base.OutputXml(writer);
44831 writer.WriteEndElement();
44832 }
44833 }
44834
44835 /// <summary>
44836 /// Removes COM+ applications from the registry. The condition for this action may be specified in the element's inner text.
44837 /// </summary>
44838 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44839 public class UnregisterComPlus : ActionSequenceType, ISchemaElement
44840 {
44841
44842 /// <summary>
44843 /// Processes this element and all child elements into an XmlWriter.
44844 /// </summary>
44845 public override void OutputXml(XmlWriter writer)
44846 {
44847 if ((null == writer))
44848 {
44849 throw new ArgumentNullException("writer");
44850 }
44851 writer.WriteStartElement("UnregisterComPlus", "http://wixtoolset.org/schemas/v4/wxs");
44852 base.OutputXml(writer);
44853 writer.WriteEndElement();
44854 }
44855 }
44856
44857 /// <summary>
44858 /// 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.
44859 /// </summary>
44860 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44861 public class SelfUnregModules : ActionSequenceType, ISchemaElement
44862 {
44863
44864 /// <summary>
44865 /// Processes this element and all child elements into an XmlWriter.
44866 /// </summary>
44867 public override void OutputXml(XmlWriter writer)
44868 {
44869 if ((null == writer))
44870 {
44871 throw new ArgumentNullException("writer");
44872 }
44873 writer.WriteStartElement("SelfUnregModules", "http://wixtoolset.org/schemas/v4/wxs");
44874 base.OutputXml(writer);
44875 writer.WriteEndElement();
44876 }
44877 }
44878
44879 /// <summary>
44880 /// Unregisters type libraries from the system. The condition for this action may be specified in the element's inner text.
44881 /// </summary>
44882 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44883 public class UnregisterTypeLibraries : ActionSequenceType, ISchemaElement
44884 {
44885
44886 /// <summary>
44887 /// Processes this element and all child elements into an XmlWriter.
44888 /// </summary>
44889 public override void OutputXml(XmlWriter writer)
44890 {
44891 if ((null == writer))
44892 {
44893 throw new ArgumentNullException("writer");
44894 }
44895 writer.WriteStartElement("UnregisterTypeLibraries", "http://wixtoolset.org/schemas/v4/wxs");
44896 base.OutputXml(writer);
44897 writer.WriteEndElement();
44898 }
44899 }
44900
44901 /// <summary>
44902 /// 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.
44903 /// </summary>
44904 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44905 public class RemoveODBC : ActionSequenceType, ISchemaElement
44906 {
44907
44908 /// <summary>
44909 /// Processes this element and all child elements into an XmlWriter.
44910 /// </summary>
44911 public override void OutputXml(XmlWriter writer)
44912 {
44913 if ((null == writer))
44914 {
44915 throw new ArgumentNullException("writer");
44916 }
44917 writer.WriteStartElement("RemoveODBC", "http://wixtoolset.org/schemas/v4/wxs");
44918 base.OutputXml(writer);
44919 writer.WriteEndElement();
44920 }
44921 }
44922
44923 /// <summary>
44924 /// Removes registration information about installed fonts from the system. The condition for this action may be specified in the element's inner text.
44925 /// </summary>
44926 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44927 public class UnregisterFonts : ActionSequenceType, ISchemaElement
44928 {
44929
44930 /// <summary>
44931 /// Processes this element and all child elements into an XmlWriter.
44932 /// </summary>
44933 public override void OutputXml(XmlWriter writer)
44934 {
44935 if ((null == writer))
44936 {
44937 throw new ArgumentNullException("writer");
44938 }
44939 writer.WriteStartElement("UnregisterFonts", "http://wixtoolset.org/schemas/v4/wxs");
44940 base.OutputXml(writer);
44941 writer.WriteEndElement();
44942 }
44943 }
44944
44945 /// <summary>
44946 /// 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.
44947 /// </summary>
44948 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44949 public class RemoveRegistryValues : ActionSequenceType, ISchemaElement
44950 {
44951
44952 /// <summary>
44953 /// Processes this element and all child elements into an XmlWriter.
44954 /// </summary>
44955 public override void OutputXml(XmlWriter writer)
44956 {
44957 if ((null == writer))
44958 {
44959 throw new ArgumentNullException("writer");
44960 }
44961 writer.WriteStartElement("RemoveRegistryValues", "http://wixtoolset.org/schemas/v4/wxs");
44962 base.OutputXml(writer);
44963 writer.WriteEndElement();
44964 }
44965 }
44966
44967 /// <summary>
44968 /// 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.
44969 /// </summary>
44970 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44971 public class UnregisterClassInfo : ActionSequenceType, ISchemaElement
44972 {
44973
44974 /// <summary>
44975 /// Processes this element and all child elements into an XmlWriter.
44976 /// </summary>
44977 public override void OutputXml(XmlWriter writer)
44978 {
44979 if ((null == writer))
44980 {
44981 throw new ArgumentNullException("writer");
44982 }
44983 writer.WriteStartElement("UnregisterClassInfo", "http://wixtoolset.org/schemas/v4/wxs");
44984 base.OutputXml(writer);
44985 writer.WriteEndElement();
44986 }
44987 }
44988
44989 /// <summary>
44990 /// 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.
44991 /// </summary>
44992 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
44993 public class UnregisterExtensionInfo : ActionSequenceType, ISchemaElement
44994 {
44995
44996 /// <summary>
44997 /// Processes this element and all child elements into an XmlWriter.
44998 /// </summary>
44999 public override void OutputXml(XmlWriter writer)
45000 {
45001 if ((null == writer))
45002 {
45003 throw new ArgumentNullException("writer");
45004 }
45005 writer.WriteStartElement("UnregisterExtensionInfo", "http://wixtoolset.org/schemas/v4/wxs");
45006 base.OutputXml(writer);
45007 writer.WriteEndElement();
45008 }
45009 }
45010
45011 /// <summary>
45012 /// Manages the unregistration of OLE ProgId information with the system. The condition for this action may be specified in the element's inner text.
45013 /// </summary>
45014 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45015 public class UnregisterProgIdInfo : ActionSequenceType, ISchemaElement
45016 {
45017
45018 /// <summary>
45019 /// Processes this element and all child elements into an XmlWriter.
45020 /// </summary>
45021 public override void OutputXml(XmlWriter writer)
45022 {
45023 if ((null == writer))
45024 {
45025 throw new ArgumentNullException("writer");
45026 }
45027 writer.WriteStartElement("UnregisterProgIdInfo", "http://wixtoolset.org/schemas/v4/wxs");
45028 base.OutputXml(writer);
45029 writer.WriteEndElement();
45030 }
45031 }
45032
45033 /// <summary>
45034 /// Unregisters MIME-related registry information from the system. The condition for this action may be specified in the element's inner text.
45035 /// </summary>
45036 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45037 public class UnregisterMIMEInfo : ActionSequenceType, ISchemaElement
45038 {
45039
45040 /// <summary>
45041 /// Processes this element and all child elements into an XmlWriter.
45042 /// </summary>
45043 public override void OutputXml(XmlWriter writer)
45044 {
45045 if ((null == writer))
45046 {
45047 throw new ArgumentNullException("writer");
45048 }
45049 writer.WriteStartElement("UnregisterMIMEInfo", "http://wixtoolset.org/schemas/v4/wxs");
45050 base.OutputXml(writer);
45051 writer.WriteEndElement();
45052 }
45053 }
45054
45055 /// <summary>
45056 /// 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.
45057 /// </summary>
45058 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45059 public class RemoveIniValues : ActionSequenceType, ISchemaElement
45060 {
45061
45062 /// <summary>
45063 /// Processes this element and all child elements into an XmlWriter.
45064 /// </summary>
45065 public override void OutputXml(XmlWriter writer)
45066 {
45067 if ((null == writer))
45068 {
45069 throw new ArgumentNullException("writer");
45070 }
45071 writer.WriteStartElement("RemoveIniValues", "http://wixtoolset.org/schemas/v4/wxs");
45072 base.OutputXml(writer);
45073 writer.WriteEndElement();
45074 }
45075 }
45076
45077 /// <summary>
45078 /// 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.
45079 /// </summary>
45080 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45081 public class RemoveShortcuts : ActionSequenceType, ISchemaElement
45082 {
45083
45084 /// <summary>
45085 /// Processes this element and all child elements into an XmlWriter.
45086 /// </summary>
45087 public override void OutputXml(XmlWriter writer)
45088 {
45089 if ((null == writer))
45090 {
45091 throw new ArgumentNullException("writer");
45092 }
45093 writer.WriteStartElement("RemoveShortcuts", "http://wixtoolset.org/schemas/v4/wxs");
45094 base.OutputXml(writer);
45095 writer.WriteEndElement();
45096 }
45097 }
45098
45099 /// <summary>
45100 /// Modifies the values of environment variables. The condition for this action may be specified in the element's inner text.
45101 /// </summary>
45102 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45103 public class RemoveEnvironmentStrings : ActionSequenceType, ISchemaElement
45104 {
45105
45106 /// <summary>
45107 /// Processes this element and all child elements into an XmlWriter.
45108 /// </summary>
45109 public override void OutputXml(XmlWriter writer)
45110 {
45111 if ((null == writer))
45112 {
45113 throw new ArgumentNullException("writer");
45114 }
45115 writer.WriteStartElement("RemoveEnvironmentStrings", "http://wixtoolset.org/schemas/v4/wxs");
45116 base.OutputXml(writer);
45117 writer.WriteEndElement();
45118 }
45119 }
45120
45121 /// <summary>
45122 /// Deletes files installed by the DuplicateFiles action. The condition for this action may be specified in the element's inner text.
45123 /// </summary>
45124 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45125 public class RemoveDuplicateFiles : ActionSequenceType, ISchemaElement
45126 {
45127
45128 /// <summary>
45129 /// Processes this element and all child elements into an XmlWriter.
45130 /// </summary>
45131 public override void OutputXml(XmlWriter writer)
45132 {
45133 if ((null == writer))
45134 {
45135 throw new ArgumentNullException("writer");
45136 }
45137 writer.WriteStartElement("RemoveDuplicateFiles", "http://wixtoolset.org/schemas/v4/wxs");
45138 base.OutputXml(writer);
45139 writer.WriteEndElement();
45140 }
45141 }
45142
45143 /// <summary>
45144 /// Removes files previously installed by the InstallFiles action. The condition for this action may be specified in the element's inner text.
45145 /// </summary>
45146 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45147 public class RemoveFiles : ActionSequenceType, ISchemaElement
45148 {
45149
45150 /// <summary>
45151 /// Processes this element and all child elements into an XmlWriter.
45152 /// </summary>
45153 public override void OutputXml(XmlWriter writer)
45154 {
45155 if ((null == writer))
45156 {
45157 throw new ArgumentNullException("writer");
45158 }
45159 writer.WriteStartElement("RemoveFiles", "http://wixtoolset.org/schemas/v4/wxs");
45160 base.OutputXml(writer);
45161 writer.WriteEndElement();
45162 }
45163 }
45164
45165 /// <summary>
45166 /// 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.
45167 /// </summary>
45168 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45169 public class RemoveFolders : ActionSequenceType, ISchemaElement
45170 {
45171
45172 /// <summary>
45173 /// Processes this element and all child elements into an XmlWriter.
45174 /// </summary>
45175 public override void OutputXml(XmlWriter writer)
45176 {
45177 if ((null == writer))
45178 {
45179 throw new ArgumentNullException("writer");
45180 }
45181 writer.WriteStartElement("RemoveFolders", "http://wixtoolset.org/schemas/v4/wxs");
45182 base.OutputXml(writer);
45183 writer.WriteEndElement();
45184 }
45185 }
45186
45187 /// <summary>
45188 /// 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.
45189 /// </summary>
45190 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45191 public class CreateFolders : ActionSequenceType, ISchemaElement
45192 {
45193
45194 /// <summary>
45195 /// Processes this element and all child elements into an XmlWriter.
45196 /// </summary>
45197 public override void OutputXml(XmlWriter writer)
45198 {
45199 if ((null == writer))
45200 {
45201 throw new ArgumentNullException("writer");
45202 }
45203 writer.WriteStartElement("CreateFolders", "http://wixtoolset.org/schemas/v4/wxs");
45204 base.OutputXml(writer);
45205 writer.WriteEndElement();
45206 }
45207 }
45208
45209 /// <summary>
45210 /// 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.
45211 /// </summary>
45212 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45213 public class MoveFiles : ActionSequenceType, ISchemaElement
45214 {
45215
45216 /// <summary>
45217 /// Processes this element and all child elements into an XmlWriter.
45218 /// </summary>
45219 public override void OutputXml(XmlWriter writer)
45220 {
45221 if ((null == writer))
45222 {
45223 throw new ArgumentNullException("writer");
45224 }
45225 writer.WriteStartElement("MoveFiles", "http://wixtoolset.org/schemas/v4/wxs");
45226 base.OutputXml(writer);
45227 writer.WriteEndElement();
45228 }
45229 }
45230
45231 /// <summary>
45232 /// Copies the product database to the administrative installation point. The condition for this action may be specified in the element's inner text.
45233 /// </summary>
45234 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45235 public class InstallAdminPackage : ActionSequenceType, ISchemaElement
45236 {
45237
45238 /// <summary>
45239 /// Processes this element and all child elements into an XmlWriter.
45240 /// </summary>
45241 public override void OutputXml(XmlWriter writer)
45242 {
45243 if ((null == writer))
45244 {
45245 throw new ArgumentNullException("writer");
45246 }
45247 writer.WriteStartElement("InstallAdminPackage", "http://wixtoolset.org/schemas/v4/wxs");
45248 base.OutputXml(writer);
45249 writer.WriteEndElement();
45250 }
45251 }
45252
45253 /// <summary>
45254 /// 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.
45255 /// </summary>
45256 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45257 public class InstallFiles : ActionSequenceType, ISchemaElement
45258 {
45259
45260 /// <summary>
45261 /// Processes this element and all child elements into an XmlWriter.
45262 /// </summary>
45263 public override void OutputXml(XmlWriter writer)
45264 {
45265 if ((null == writer))
45266 {
45267 throw new ArgumentNullException("writer");
45268 }
45269 writer.WriteStartElement("InstallFiles", "http://wixtoolset.org/schemas/v4/wxs");
45270 base.OutputXml(writer);
45271 writer.WriteEndElement();
45272 }
45273 }
45274
45275 /// <summary>
45276 /// Duplicates files installed by the InstallFiles action. The condition for this action may be specified in the element's inner text.
45277 /// </summary>
45278 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45279 public class DuplicateFiles : ActionSequenceType, ISchemaElement
45280 {
45281
45282 /// <summary>
45283 /// Processes this element and all child elements into an XmlWriter.
45284 /// </summary>
45285 public override void OutputXml(XmlWriter writer)
45286 {
45287 if ((null == writer))
45288 {
45289 throw new ArgumentNullException("writer");
45290 }
45291 writer.WriteStartElement("DuplicateFiles", "http://wixtoolset.org/schemas/v4/wxs");
45292 base.OutputXml(writer);
45293 writer.WriteEndElement();
45294 }
45295 }
45296
45297 /// <summary>
45298 /// 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.
45299 /// </summary>
45300 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45301 public class PatchFiles : ActionSequenceType, ISchemaElement
45302 {
45303
45304 /// <summary>
45305 /// Processes this element and all child elements into an XmlWriter.
45306 /// </summary>
45307 public override void OutputXml(XmlWriter writer)
45308 {
45309 if ((null == writer))
45310 {
45311 throw new ArgumentNullException("writer");
45312 }
45313 writer.WriteStartElement("PatchFiles", "http://wixtoolset.org/schemas/v4/wxs");
45314 base.OutputXml(writer);
45315 writer.WriteEndElement();
45316 }
45317 }
45318
45319 /// <summary>
45320 /// 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.
45321 /// </summary>
45322 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45323 public class BindImage : ActionSequenceType, ISchemaElement
45324 {
45325
45326 /// <summary>
45327 /// Processes this element and all child elements into an XmlWriter.
45328 /// </summary>
45329 public override void OutputXml(XmlWriter writer)
45330 {
45331 if ((null == writer))
45332 {
45333 throw new ArgumentNullException("writer");
45334 }
45335 writer.WriteStartElement("BindImage", "http://wixtoolset.org/schemas/v4/wxs");
45336 base.OutputXml(writer);
45337 writer.WriteEndElement();
45338 }
45339 }
45340
45341 /// <summary>
45342 /// Manages the creation of shortcuts. The condition for this action may be specified in the element's inner text.
45343 /// </summary>
45344 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45345 public class CreateShortcuts : ActionSequenceType, ISchemaElement
45346 {
45347
45348 /// <summary>
45349 /// Processes this element and all child elements into an XmlWriter.
45350 /// </summary>
45351 public override void OutputXml(XmlWriter writer)
45352 {
45353 if ((null == writer))
45354 {
45355 throw new ArgumentNullException("writer");
45356 }
45357 writer.WriteStartElement("CreateShortcuts", "http://wixtoolset.org/schemas/v4/wxs");
45358 base.OutputXml(writer);
45359 writer.WriteEndElement();
45360 }
45361 }
45362
45363 /// <summary>
45364 /// Manages the registration of COM class information with the system. The condition for this action may be specified in the element's inner text.
45365 /// </summary>
45366 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45367 public class RegisterClassInfo : ActionSequenceType, ISchemaElement
45368 {
45369
45370 /// <summary>
45371 /// Processes this element and all child elements into an XmlWriter.
45372 /// </summary>
45373 public override void OutputXml(XmlWriter writer)
45374 {
45375 if ((null == writer))
45376 {
45377 throw new ArgumentNullException("writer");
45378 }
45379 writer.WriteStartElement("RegisterClassInfo", "http://wixtoolset.org/schemas/v4/wxs");
45380 base.OutputXml(writer);
45381 writer.WriteEndElement();
45382 }
45383 }
45384
45385 /// <summary>
45386 /// Manages the registration of extension related information with the system. The condition for this action may be specified in the element's inner text.
45387 /// </summary>
45388 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45389 public class RegisterExtensionInfo : ActionSequenceType, ISchemaElement
45390 {
45391
45392 /// <summary>
45393 /// Processes this element and all child elements into an XmlWriter.
45394 /// </summary>
45395 public override void OutputXml(XmlWriter writer)
45396 {
45397 if ((null == writer))
45398 {
45399 throw new ArgumentNullException("writer");
45400 }
45401 writer.WriteStartElement("RegisterExtensionInfo", "http://wixtoolset.org/schemas/v4/wxs");
45402 base.OutputXml(writer);
45403 writer.WriteEndElement();
45404 }
45405 }
45406
45407 /// <summary>
45408 /// Manages the registration of OLE ProgId information with the system. The condition for this action may be specified in the element's inner text.
45409 /// </summary>
45410 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45411 public class RegisterProgIdInfo : ActionSequenceType, ISchemaElement
45412 {
45413
45414 /// <summary>
45415 /// Processes this element and all child elements into an XmlWriter.
45416 /// </summary>
45417 public override void OutputXml(XmlWriter writer)
45418 {
45419 if ((null == writer))
45420 {
45421 throw new ArgumentNullException("writer");
45422 }
45423 writer.WriteStartElement("RegisterProgIdInfo", "http://wixtoolset.org/schemas/v4/wxs");
45424 base.OutputXml(writer);
45425 writer.WriteEndElement();
45426 }
45427 }
45428
45429 /// <summary>
45430 /// Registers MIME-related registry information with the system. The condition for this action may be specified in the element's inner text.
45431 /// </summary>
45432 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45433 public class RegisterMIMEInfo : ActionSequenceType, ISchemaElement
45434 {
45435
45436 /// <summary>
45437 /// Processes this element and all child elements into an XmlWriter.
45438 /// </summary>
45439 public override void OutputXml(XmlWriter writer)
45440 {
45441 if ((null == writer))
45442 {
45443 throw new ArgumentNullException("writer");
45444 }
45445 writer.WriteStartElement("RegisterMIMEInfo", "http://wixtoolset.org/schemas/v4/wxs");
45446 base.OutputXml(writer);
45447 writer.WriteEndElement();
45448 }
45449 }
45450
45451 /// <summary>
45452 /// Sets up an application's registry information. The condition for this action may be specified in the element's inner text.
45453 /// </summary>
45454 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45455 public class WriteRegistryValues : ActionSequenceType, ISchemaElement
45456 {
45457
45458 /// <summary>
45459 /// Processes this element and all child elements into an XmlWriter.
45460 /// </summary>
45461 public override void OutputXml(XmlWriter writer)
45462 {
45463 if ((null == writer))
45464 {
45465 throw new ArgumentNullException("writer");
45466 }
45467 writer.WriteStartElement("WriteRegistryValues", "http://wixtoolset.org/schemas/v4/wxs");
45468 base.OutputXml(writer);
45469 writer.WriteEndElement();
45470 }
45471 }
45472
45473 /// <summary>
45474 /// 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.
45475 /// </summary>
45476 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45477 public class WriteIniValues : ActionSequenceType, ISchemaElement
45478 {
45479
45480 /// <summary>
45481 /// Processes this element and all child elements into an XmlWriter.
45482 /// </summary>
45483 public override void OutputXml(XmlWriter writer)
45484 {
45485 if ((null == writer))
45486 {
45487 throw new ArgumentNullException("writer");
45488 }
45489 writer.WriteStartElement("WriteIniValues", "http://wixtoolset.org/schemas/v4/wxs");
45490 base.OutputXml(writer);
45491 writer.WriteEndElement();
45492 }
45493 }
45494
45495 /// <summary>
45496 /// Modifies the values of environment variables. The condition for this action may be specified in the element's inner text.
45497 /// </summary>
45498 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45499 public class WriteEnvironmentStrings : ActionSequenceType, ISchemaElement
45500 {
45501
45502 /// <summary>
45503 /// Processes this element and all child elements into an XmlWriter.
45504 /// </summary>
45505 public override void OutputXml(XmlWriter writer)
45506 {
45507 if ((null == writer))
45508 {
45509 throw new ArgumentNullException("writer");
45510 }
45511 writer.WriteStartElement("WriteEnvironmentStrings", "http://wixtoolset.org/schemas/v4/wxs");
45512 base.OutputXml(writer);
45513 writer.WriteEndElement();
45514 }
45515 }
45516
45517 /// <summary>
45518 /// Registers installed fonts with the system. The condition for this action may be specified in the element's inner text.
45519 /// </summary>
45520 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45521 public class RegisterFonts : ActionSequenceType, ISchemaElement
45522 {
45523
45524 /// <summary>
45525 /// Processes this element and all child elements into an XmlWriter.
45526 /// </summary>
45527 public override void OutputXml(XmlWriter writer)
45528 {
45529 if ((null == writer))
45530 {
45531 throw new ArgumentNullException("writer");
45532 }
45533 writer.WriteStartElement("RegisterFonts", "http://wixtoolset.org/schemas/v4/wxs");
45534 base.OutputXml(writer);
45535 writer.WriteEndElement();
45536 }
45537 }
45538
45539 /// <summary>
45540 /// 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.
45541 /// </summary>
45542 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45543 public class InstallODBC : ActionSequenceType, ISchemaElement
45544 {
45545
45546 /// <summary>
45547 /// Processes this element and all child elements into an XmlWriter.
45548 /// </summary>
45549 public override void OutputXml(XmlWriter writer)
45550 {
45551 if ((null == writer))
45552 {
45553 throw new ArgumentNullException("writer");
45554 }
45555 writer.WriteStartElement("InstallODBC", "http://wixtoolset.org/schemas/v4/wxs");
45556 base.OutputXml(writer);
45557 writer.WriteEndElement();
45558 }
45559 }
45560
45561 /// <summary>
45562 /// Registers type libraries with the system. The condition for this action may be specified in the element's inner text.
45563 /// </summary>
45564 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45565 public class RegisterTypeLibraries : ActionSequenceType, ISchemaElement
45566 {
45567
45568 /// <summary>
45569 /// Processes this element and all child elements into an XmlWriter.
45570 /// </summary>
45571 public override void OutputXml(XmlWriter writer)
45572 {
45573 if ((null == writer))
45574 {
45575 throw new ArgumentNullException("writer");
45576 }
45577 writer.WriteStartElement("RegisterTypeLibraries", "http://wixtoolset.org/schemas/v4/wxs");
45578 base.OutputXml(writer);
45579 writer.WriteEndElement();
45580 }
45581 }
45582
45583 /// <summary>
45584 /// 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.
45585 /// </summary>
45586 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45587 public class SelfRegModules : ActionSequenceType, ISchemaElement
45588 {
45589
45590 /// <summary>
45591 /// Processes this element and all child elements into an XmlWriter.
45592 /// </summary>
45593 public override void OutputXml(XmlWriter writer)
45594 {
45595 if ((null == writer))
45596 {
45597 throw new ArgumentNullException("writer");
45598 }
45599 writer.WriteStartElement("SelfRegModules", "http://wixtoolset.org/schemas/v4/wxs");
45600 base.OutputXml(writer);
45601 writer.WriteEndElement();
45602 }
45603 }
45604
45605 /// <summary>
45606 /// Registers COM+ applications. The condition for this action may be specified in the element's inner text.
45607 /// </summary>
45608 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45609 public class RegisterComPlus : ActionSequenceType, ISchemaElement
45610 {
45611
45612 /// <summary>
45613 /// Processes this element and all child elements into an XmlWriter.
45614 /// </summary>
45615 public override void OutputXml(XmlWriter writer)
45616 {
45617 if ((null == writer))
45618 {
45619 throw new ArgumentNullException("writer");
45620 }
45621 writer.WriteStartElement("RegisterComPlus", "http://wixtoolset.org/schemas/v4/wxs");
45622 base.OutputXml(writer);
45623 writer.WriteEndElement();
45624 }
45625 }
45626
45627 /// <summary>
45628 /// Registers a service for the system. The condition for this action may be specified in the element's inner text.
45629 /// </summary>
45630 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45631 public class InstallServices : ActionSequenceType, ISchemaElement
45632 {
45633
45634 /// <summary>
45635 /// Processes this element and all child elements into an XmlWriter.
45636 /// </summary>
45637 public override void OutputXml(XmlWriter writer)
45638 {
45639 if ((null == writer))
45640 {
45641 throw new ArgumentNullException("writer");
45642 }
45643 writer.WriteStartElement("InstallServices", "http://wixtoolset.org/schemas/v4/wxs");
45644 base.OutputXml(writer);
45645 writer.WriteEndElement();
45646 }
45647 }
45648
45649 /// <summary>
45650 /// Starts system services. The condition for this action may be specified in the element's inner text.
45651 /// </summary>
45652 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45653 public class StartServices : ActionSequenceType, ISchemaElement
45654 {
45655
45656 /// <summary>
45657 /// Processes this element and all child elements into an XmlWriter.
45658 /// </summary>
45659 public override void OutputXml(XmlWriter writer)
45660 {
45661 if ((null == writer))
45662 {
45663 throw new ArgumentNullException("writer");
45664 }
45665 writer.WriteStartElement("StartServices", "http://wixtoolset.org/schemas/v4/wxs");
45666 base.OutputXml(writer);
45667 writer.WriteEndElement();
45668 }
45669 }
45670
45671 /// <summary>
45672 /// 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.
45673 /// </summary>
45674 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45675 public class RegisterUser : ActionSequenceType, ISchemaElement
45676 {
45677
45678 /// <summary>
45679 /// Processes this element and all child elements into an XmlWriter.
45680 /// </summary>
45681 public override void OutputXml(XmlWriter writer)
45682 {
45683 if ((null == writer))
45684 {
45685 throw new ArgumentNullException("writer");
45686 }
45687 writer.WriteStartElement("RegisterUser", "http://wixtoolset.org/schemas/v4/wxs");
45688 base.OutputXml(writer);
45689 writer.WriteEndElement();
45690 }
45691 }
45692
45693 /// <summary>
45694 /// Registers the product information with the installer. The condition for this action may be specified in the element's inner text.
45695 /// </summary>
45696 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45697 public class RegisterProduct : ActionSequenceType, ISchemaElement
45698 {
45699
45700 /// <summary>
45701 /// Processes this element and all child elements into an XmlWriter.
45702 /// </summary>
45703 public override void OutputXml(XmlWriter writer)
45704 {
45705 if ((null == writer))
45706 {
45707 throw new ArgumentNullException("writer");
45708 }
45709 writer.WriteStartElement("RegisterProduct", "http://wixtoolset.org/schemas/v4/wxs");
45710 base.OutputXml(writer);
45711 writer.WriteEndElement();
45712 }
45713 }
45714
45715 /// <summary>
45716 /// Manages the advertisement of the components from the PublishComponent table. The condition for this action may be specified in the element's inner text.
45717 /// </summary>
45718 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45719 public class PublishComponents : ActionSequenceType, ISchemaElement
45720 {
45721
45722 /// <summary>
45723 /// Processes this element and all child elements into an XmlWriter.
45724 /// </summary>
45725 public override void OutputXml(XmlWriter writer)
45726 {
45727 if ((null == writer))
45728 {
45729 throw new ArgumentNullException("writer");
45730 }
45731 writer.WriteStartElement("PublishComponents", "http://wixtoolset.org/schemas/v4/wxs");
45732 base.OutputXml(writer);
45733 writer.WriteEndElement();
45734 }
45735 }
45736
45737 /// <summary>
45738 /// Manages the advertisement of CLR and Win32 assemblies. The condition for this action may be specified in the element's inner text.
45739 /// </summary>
45740 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45741 public class MsiPublishAssemblies : ActionSequenceType, ISchemaElement
45742 {
45743
45744 /// <summary>
45745 /// Processes this element and all child elements into an XmlWriter.
45746 /// </summary>
45747 public override void OutputXml(XmlWriter writer)
45748 {
45749 if ((null == writer))
45750 {
45751 throw new ArgumentNullException("writer");
45752 }
45753 writer.WriteStartElement("MsiPublishAssemblies", "http://wixtoolset.org/schemas/v4/wxs");
45754 base.OutputXml(writer);
45755 writer.WriteEndElement();
45756 }
45757 }
45758
45759 /// <summary>
45760 /// Writes each feature's state into the system registry. The condition for this action may be specified in the element's inner text.
45761 /// </summary>
45762 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45763 public class PublishFeatures : ActionSequenceType, ISchemaElement
45764 {
45765
45766 /// <summary>
45767 /// Processes this element and all child elements into an XmlWriter.
45768 /// </summary>
45769 public override void OutputXml(XmlWriter writer)
45770 {
45771 if ((null == writer))
45772 {
45773 throw new ArgumentNullException("writer");
45774 }
45775 writer.WriteStartElement("PublishFeatures", "http://wixtoolset.org/schemas/v4/wxs");
45776 base.OutputXml(writer);
45777 writer.WriteEndElement();
45778 }
45779 }
45780
45781 /// <summary>
45782 /// Manages the advertisement of the product information with the system. The condition for this action may be specified in the element's inner text.
45783 /// </summary>
45784 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45785 public class PublishProduct : ActionSequenceType, ISchemaElement
45786 {
45787
45788 /// <summary>
45789 /// Processes this element and all child elements into an XmlWriter.
45790 /// </summary>
45791 public override void OutputXml(XmlWriter writer)
45792 {
45793 if ((null == writer))
45794 {
45795 throw new ArgumentNullException("writer");
45796 }
45797 writer.WriteStartElement("PublishProduct", "http://wixtoolset.org/schemas/v4/wxs");
45798 base.OutputXml(writer);
45799 writer.WriteEndElement();
45800 }
45801 }
45802
45803 /// <summary>
45804 /// 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.
45805 /// </summary>
45806 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45807 public class InstallFinalize : ActionSequenceType, ISchemaElement
45808 {
45809
45810 /// <summary>
45811 /// Processes this element and all child elements into an XmlWriter.
45812 /// </summary>
45813 public override void OutputXml(XmlWriter writer)
45814 {
45815 if ((null == writer))
45816 {
45817 throw new ArgumentNullException("writer");
45818 }
45819 writer.WriteStartElement("InstallFinalize", "http://wixtoolset.org/schemas/v4/wxs");
45820 base.OutputXml(writer);
45821 writer.WriteEndElement();
45822 }
45823 }
45824
45825 /// <summary>
45826 /// 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.
45827 /// </summary>
45828 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45829 public class AppSearch : ActionModuleSequenceType, ISchemaElement
45830 {
45831
45832 /// <summary>
45833 /// Processes this element and all child elements into an XmlWriter.
45834 /// </summary>
45835 public override void OutputXml(XmlWriter writer)
45836 {
45837 if ((null == writer))
45838 {
45839 throw new ArgumentNullException("writer");
45840 }
45841 writer.WriteStartElement("AppSearch", "http://wixtoolset.org/schemas/v4/wxs");
45842 base.OutputXml(writer);
45843 writer.WriteEndElement();
45844 }
45845 }
45846
45847 /// <summary>
45848 /// 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.
45849 /// </summary>
45850 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45851 public class CCPSearch : ActionModuleSequenceType, ISchemaElement
45852 {
45853
45854 /// <summary>
45855 /// Processes this element and all child elements into an XmlWriter.
45856 /// </summary>
45857 public override void OutputXml(XmlWriter writer)
45858 {
45859 if ((null == writer))
45860 {
45861 throw new ArgumentNullException("writer");
45862 }
45863 writer.WriteStartElement("CCPSearch", "http://wixtoolset.org/schemas/v4/wxs");
45864 base.OutputXml(writer);
45865 writer.WriteEndElement();
45866 }
45867 }
45868
45869 /// <summary>
45870 /// 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.
45871 /// </summary>
45872 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45873 public class RMCCPSearch : ActionModuleSequenceType, ISchemaElement
45874 {
45875
45876 /// <summary>
45877 /// Processes this element and all child elements into an XmlWriter.
45878 /// </summary>
45879 public override void OutputXml(XmlWriter writer)
45880 {
45881 if ((null == writer))
45882 {
45883 throw new ArgumentNullException("writer");
45884 }
45885 writer.WriteStartElement("RMCCPSearch", "http://wixtoolset.org/schemas/v4/wxs");
45886 base.OutputXml(writer);
45887 writer.WriteEndElement();
45888 }
45889 }
45890
45891 /// <summary>
45892 /// 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.
45893 /// </summary>
45894 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45895 public class LaunchConditions : ActionModuleSequenceType, ISchemaElement
45896 {
45897
45898 /// <summary>
45899 /// Processes this element and all child elements into an XmlWriter.
45900 /// </summary>
45901 public override void OutputXml(XmlWriter writer)
45902 {
45903 if ((null == writer))
45904 {
45905 throw new ArgumentNullException("writer");
45906 }
45907 writer.WriteStartElement("LaunchConditions", "http://wixtoolset.org/schemas/v4/wxs");
45908 base.OutputXml(writer);
45909 writer.WriteEndElement();
45910 }
45911 }
45912
45913 /// <summary>
45914 /// 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.
45915 /// </summary>
45916 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45917 public class FindRelatedProducts : ActionModuleSequenceType, ISchemaElement
45918 {
45919
45920 /// <summary>
45921 /// Processes this element and all child elements into an XmlWriter.
45922 /// </summary>
45923 public override void OutputXml(XmlWriter writer)
45924 {
45925 if ((null == writer))
45926 {
45927 throw new ArgumentNullException("writer");
45928 }
45929 writer.WriteStartElement("FindRelatedProducts", "http://wixtoolset.org/schemas/v4/wxs");
45930 base.OutputXml(writer);
45931 writer.WriteEndElement();
45932 }
45933 }
45934
45935 /// <summary>
45936 /// 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.
45937 /// </summary>
45938 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45939 public class InstallExecute : ActionModuleSequenceType, ISchemaElement
45940 {
45941
45942 /// <summary>
45943 /// Processes this element and all child elements into an XmlWriter.
45944 /// </summary>
45945 public override void OutputXml(XmlWriter writer)
45946 {
45947 if ((null == writer))
45948 {
45949 throw new ArgumentNullException("writer");
45950 }
45951 writer.WriteStartElement("InstallExecute", "http://wixtoolset.org/schemas/v4/wxs");
45952 base.OutputXml(writer);
45953 writer.WriteEndElement();
45954 }
45955 }
45956
45957 /// <summary>
45958 /// 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.
45959 /// </summary>
45960 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45961 public class InstallExecuteAgain : ActionModuleSequenceType, ISchemaElement
45962 {
45963
45964 /// <summary>
45965 /// Processes this element and all child elements into an XmlWriter.
45966 /// </summary>
45967 public override void OutputXml(XmlWriter writer)
45968 {
45969 if ((null == writer))
45970 {
45971 throw new ArgumentNullException("writer");
45972 }
45973 writer.WriteStartElement("InstallExecuteAgain", "http://wixtoolset.org/schemas/v4/wxs");
45974 base.OutputXml(writer);
45975 writer.WriteEndElement();
45976 }
45977 }
45978
45979 /// <summary>
45980 /// 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.
45981 /// </summary>
45982 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
45983 public class DisableRollback : ActionModuleSequenceType, ISchemaElement
45984 {
45985
45986 /// <summary>
45987 /// Processes this element and all child elements into an XmlWriter.
45988 /// </summary>
45989 public override void OutputXml(XmlWriter writer)
45990 {
45991 if ((null == writer))
45992 {
45993 throw new ArgumentNullException("writer");
45994 }
45995 writer.WriteStartElement("DisableRollback", "http://wixtoolset.org/schemas/v4/wxs");
45996 base.OutputXml(writer);
45997 writer.WriteEndElement();
45998 }
45999 }
46000
46001 /// <summary>
46002 /// 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.
46003 /// </summary>
46004 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46005 public class RemoveExistingProducts : ActionModuleSequenceType, ISchemaElement
46006 {
46007
46008 /// <summary>
46009 /// Processes this element and all child elements into an XmlWriter.
46010 /// </summary>
46011 public override void OutputXml(XmlWriter writer)
46012 {
46013 if ((null == writer))
46014 {
46015 throw new ArgumentNullException("writer");
46016 }
46017 writer.WriteStartElement("RemoveExistingProducts", "http://wixtoolset.org/schemas/v4/wxs");
46018 base.OutputXml(writer);
46019 writer.WriteEndElement();
46020 }
46021 }
46022
46023 /// <summary>
46024 /// 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.
46025 /// </summary>
46026 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46027 public class ScheduleReboot : ActionModuleSequenceType, ISchemaElement
46028 {
46029
46030 /// <summary>
46031 /// Processes this element and all child elements into an XmlWriter.
46032 /// </summary>
46033 public override void OutputXml(XmlWriter writer)
46034 {
46035 if ((null == writer))
46036 {
46037 throw new ArgumentNullException("writer");
46038 }
46039 writer.WriteStartElement("ScheduleReboot", "http://wixtoolset.org/schemas/v4/wxs");
46040 base.OutputXml(writer);
46041 writer.WriteEndElement();
46042 }
46043 }
46044
46045 /// <summary>
46046 /// 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.
46047 /// </summary>
46048 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46049 public class ForceReboot : ActionModuleSequenceType, ISchemaElement
46050 {
46051
46052 /// <summary>
46053 /// Processes this element and all child elements into an XmlWriter.
46054 /// </summary>
46055 public override void OutputXml(XmlWriter writer)
46056 {
46057 if ((null == writer))
46058 {
46059 throw new ArgumentNullException("writer");
46060 }
46061 writer.WriteStartElement("ForceReboot", "http://wixtoolset.org/schemas/v4/wxs");
46062 base.OutputXml(writer);
46063 writer.WriteEndElement();
46064 }
46065 }
46066
46067 /// <summary>
46068 /// 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.
46069 /// </summary>
46070 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46071 public class ResolveSource : ActionModuleSequenceType, ISchemaElement
46072 {
46073
46074 /// <summary>
46075 /// Processes this element and all child elements into an XmlWriter.
46076 /// </summary>
46077 public override void OutputXml(XmlWriter writer)
46078 {
46079 if ((null == writer))
46080 {
46081 throw new ArgumentNullException("writer");
46082 }
46083 writer.WriteStartElement("ResolveSource", "http://wixtoolset.org/schemas/v4/wxs");
46084 base.OutputXml(writer);
46085 writer.WriteEndElement();
46086 }
46087 }
46088
46089 /// <summary>
46090 /// Use to sequence a custom action.
46091 /// </summary>
46092 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46093 public class Custom : ISchemaElement, ISetAttributes
46094 {
46095
46096 private string actionField;
46097
46098 private bool actionFieldSet;
46099
46100 private ExitType onExitField;
46101
46102 private bool onExitFieldSet;
46103
46104 private string beforeField;
46105
46106 private bool beforeFieldSet;
46107
46108 private string afterField;
46109
46110 private bool afterFieldSet;
46111
46112 private YesNoType overridableField;
46113
46114 private bool overridableFieldSet;
46115
46116 private int sequenceField;
46117
46118 private bool sequenceFieldSet;
46119
46120 private string contentField;
46121
46122 private bool contentFieldSet;
46123
46124 private ISchemaElement parentElement;
46125
46126 /// <summary>
46127 /// The action to which the Custom element applies.
46128 /// </summary>
46129 public string Action
46130 {
46131 get
46132 {
46133 return this.actionField;
46134 }
46135 set
46136 {
46137 this.actionFieldSet = true;
46138 this.actionField = value;
46139 }
46140 }
46141
46142 /// <summary>
46143 /// Mutually exclusive with Before, After, and Sequence attributes
46144 /// </summary>
46145 public ExitType OnExit
46146 {
46147 get
46148 {
46149 return this.onExitField;
46150 }
46151 set
46152 {
46153 this.onExitFieldSet = true;
46154 this.onExitField = value;
46155 }
46156 }
46157
46158 /// <summary>
46159 /// The name of the standard or custom action before which this action should be performed. Mutually exclusive with OnExit, After, and Sequence attributes
46160 /// </summary>
46161 public string Before
46162 {
46163 get
46164 {
46165 return this.beforeField;
46166 }
46167 set
46168 {
46169 this.beforeFieldSet = true;
46170 this.beforeField = value;
46171 }
46172 }
46173
46174 /// <summary>
46175 /// The name of the standard or custom action after which this action should be performed. Mutually exclusive with Before, OnExit, and Sequence attributes
46176 /// </summary>
46177 public string After
46178 {
46179 get
46180 {
46181 return this.afterField;
46182 }
46183 set
46184 {
46185 this.afterFieldSet = true;
46186 this.afterField = value;
46187 }
46188 }
46189
46190 /// <summary>
46191 /// If "yes", the sequencing of this action may be overridden by sequencing elsewhere.
46192 /// </summary>
46193 public YesNoType Overridable
46194 {
46195 get
46196 {
46197 return this.overridableField;
46198 }
46199 set
46200 {
46201 this.overridableFieldSet = true;
46202 this.overridableField = value;
46203 }
46204 }
46205
46206 /// <summary>
46207 /// The sequence number for this action. Mutually exclusive with Before, After, and OnExit attributes
46208 /// </summary>
46209 public int Sequence
46210 {
46211 get
46212 {
46213 return this.sequenceField;
46214 }
46215 set
46216 {
46217 this.sequenceFieldSet = true;
46218 this.sequenceField = value;
46219 }
46220 }
46221
46222 /// <summary>
46223 /// Text node specifies the condition of the action.
46224 /// </summary>
46225 public string Content
46226 {
46227 get
46228 {
46229 return this.contentField;
46230 }
46231 set
46232 {
46233 this.contentFieldSet = true;
46234 this.contentField = value;
46235 }
46236 }
46237
46238 public virtual ISchemaElement ParentElement
46239 {
46240 get
46241 {
46242 return this.parentElement;
46243 }
46244 set
46245 {
46246 this.parentElement = value;
46247 }
46248 }
46249
46250 /// <summary>
46251 /// Processes this element and all child elements into an XmlWriter.
46252 /// </summary>
46253 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
46254 public virtual void OutputXml(XmlWriter writer)
46255 {
46256 if ((null == writer))
46257 {
46258 throw new ArgumentNullException("writer");
46259 }
46260 writer.WriteStartElement("Custom", "http://wixtoolset.org/schemas/v4/wxs");
46261 if (this.actionFieldSet)
46262 {
46263 writer.WriteAttributeString("Action", this.actionField);
46264 }
46265 if (this.onExitFieldSet)
46266 {
46267 if ((this.onExitField == ExitType.success))
46268 {
46269 writer.WriteAttributeString("OnExit", "success");
46270 }
46271 if ((this.onExitField == ExitType.cancel))
46272 {
46273 writer.WriteAttributeString("OnExit", "cancel");
46274 }
46275 if ((this.onExitField == ExitType.error))
46276 {
46277 writer.WriteAttributeString("OnExit", "error");
46278 }
46279 if ((this.onExitField == ExitType.suspend))
46280 {
46281 writer.WriteAttributeString("OnExit", "suspend");
46282 }
46283 }
46284 if (this.beforeFieldSet)
46285 {
46286 writer.WriteAttributeString("Before", this.beforeField);
46287 }
46288 if (this.afterFieldSet)
46289 {
46290 writer.WriteAttributeString("After", this.afterField);
46291 }
46292 if (this.overridableFieldSet)
46293 {
46294 if ((this.overridableField == YesNoType.no))
46295 {
46296 writer.WriteAttributeString("Overridable", "no");
46297 }
46298 if ((this.overridableField == YesNoType.yes))
46299 {
46300 writer.WriteAttributeString("Overridable", "yes");
46301 }
46302 }
46303 if (this.sequenceFieldSet)
46304 {
46305 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
46306 }
46307 if (this.contentFieldSet)
46308 {
46309 writer.WriteString(this.contentField);
46310 }
46311 writer.WriteEndElement();
46312 }
46313
46314 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
46315 void ISetAttributes.SetAttribute(string name, string value)
46316 {
46317 if (String.IsNullOrEmpty(name))
46318 {
46319 throw new ArgumentNullException("name");
46320 }
46321 if (("Action" == name))
46322 {
46323 this.actionField = value;
46324 this.actionFieldSet = true;
46325 }
46326 if (("OnExit" == name))
46327 {
46328 this.onExitField = Enums.ParseExitType(value);
46329 this.onExitFieldSet = true;
46330 }
46331 if (("Before" == name))
46332 {
46333 this.beforeField = value;
46334 this.beforeFieldSet = true;
46335 }
46336 if (("After" == name))
46337 {
46338 this.afterField = value;
46339 this.afterFieldSet = true;
46340 }
46341 if (("Overridable" == name))
46342 {
46343 this.overridableField = Enums.ParseYesNoType(value);
46344 this.overridableFieldSet = true;
46345 }
46346 if (("Sequence" == name))
46347 {
46348 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
46349 this.sequenceFieldSet = true;
46350 }
46351 if (("Content" == name))
46352 {
46353 this.contentField = value;
46354 this.contentFieldSet = true;
46355 }
46356 }
46357 }
46358
46359 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46360 public class Show : ISchemaElement, ISetAttributes
46361 {
46362
46363 private string dialogField;
46364
46365 private bool dialogFieldSet;
46366
46367 private ExitType onExitField;
46368
46369 private bool onExitFieldSet;
46370
46371 private string beforeField;
46372
46373 private bool beforeFieldSet;
46374
46375 private string afterField;
46376
46377 private bool afterFieldSet;
46378
46379 private YesNoType overridableField;
46380
46381 private bool overridableFieldSet;
46382
46383 private int sequenceField;
46384
46385 private bool sequenceFieldSet;
46386
46387 private string contentField;
46388
46389 private bool contentFieldSet;
46390
46391 private ISchemaElement parentElement;
46392
46393 public string Dialog
46394 {
46395 get
46396 {
46397 return this.dialogField;
46398 }
46399 set
46400 {
46401 this.dialogFieldSet = true;
46402 this.dialogField = value;
46403 }
46404 }
46405
46406 /// <summary>
46407 /// mutually exclusive with Before, After, and Sequence attributes
46408 /// </summary>
46409 public ExitType OnExit
46410 {
46411 get
46412 {
46413 return this.onExitField;
46414 }
46415 set
46416 {
46417 this.onExitFieldSet = true;
46418 this.onExitField = value;
46419 }
46420 }
46421
46422 public string Before
46423 {
46424 get
46425 {
46426 return this.beforeField;
46427 }
46428 set
46429 {
46430 this.beforeFieldSet = true;
46431 this.beforeField = value;
46432 }
46433 }
46434
46435 public string After
46436 {
46437 get
46438 {
46439 return this.afterField;
46440 }
46441 set
46442 {
46443 this.afterFieldSet = true;
46444 this.afterField = value;
46445 }
46446 }
46447
46448 /// <summary>
46449 /// If "yes", the sequencing of this dialog may be overridden by sequencing elsewhere.
46450 /// </summary>
46451 public YesNoType Overridable
46452 {
46453 get
46454 {
46455 return this.overridableField;
46456 }
46457 set
46458 {
46459 this.overridableFieldSet = true;
46460 this.overridableField = value;
46461 }
46462 }
46463
46464 public int Sequence
46465 {
46466 get
46467 {
46468 return this.sequenceField;
46469 }
46470 set
46471 {
46472 this.sequenceFieldSet = true;
46473 this.sequenceField = value;
46474 }
46475 }
46476
46477 public string Content
46478 {
46479 get
46480 {
46481 return this.contentField;
46482 }
46483 set
46484 {
46485 this.contentFieldSet = true;
46486 this.contentField = value;
46487 }
46488 }
46489
46490 public virtual ISchemaElement ParentElement
46491 {
46492 get
46493 {
46494 return this.parentElement;
46495 }
46496 set
46497 {
46498 this.parentElement = value;
46499 }
46500 }
46501
46502 /// <summary>
46503 /// Processes this element and all child elements into an XmlWriter.
46504 /// </summary>
46505 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
46506 public virtual void OutputXml(XmlWriter writer)
46507 {
46508 if ((null == writer))
46509 {
46510 throw new ArgumentNullException("writer");
46511 }
46512 writer.WriteStartElement("Show", "http://wixtoolset.org/schemas/v4/wxs");
46513 if (this.dialogFieldSet)
46514 {
46515 writer.WriteAttributeString("Dialog", this.dialogField);
46516 }
46517 if (this.onExitFieldSet)
46518 {
46519 if ((this.onExitField == ExitType.success))
46520 {
46521 writer.WriteAttributeString("OnExit", "success");
46522 }
46523 if ((this.onExitField == ExitType.cancel))
46524 {
46525 writer.WriteAttributeString("OnExit", "cancel");
46526 }
46527 if ((this.onExitField == ExitType.error))
46528 {
46529 writer.WriteAttributeString("OnExit", "error");
46530 }
46531 if ((this.onExitField == ExitType.suspend))
46532 {
46533 writer.WriteAttributeString("OnExit", "suspend");
46534 }
46535 }
46536 if (this.beforeFieldSet)
46537 {
46538 writer.WriteAttributeString("Before", this.beforeField);
46539 }
46540 if (this.afterFieldSet)
46541 {
46542 writer.WriteAttributeString("After", this.afterField);
46543 }
46544 if (this.overridableFieldSet)
46545 {
46546 if ((this.overridableField == YesNoType.no))
46547 {
46548 writer.WriteAttributeString("Overridable", "no");
46549 }
46550 if ((this.overridableField == YesNoType.yes))
46551 {
46552 writer.WriteAttributeString("Overridable", "yes");
46553 }
46554 }
46555 if (this.sequenceFieldSet)
46556 {
46557 writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture));
46558 }
46559 if (this.contentFieldSet)
46560 {
46561 writer.WriteString(this.contentField);
46562 }
46563 writer.WriteEndElement();
46564 }
46565
46566 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
46567 void ISetAttributes.SetAttribute(string name, string value)
46568 {
46569 if (String.IsNullOrEmpty(name))
46570 {
46571 throw new ArgumentNullException("name");
46572 }
46573 if (("Dialog" == name))
46574 {
46575 this.dialogField = value;
46576 this.dialogFieldSet = true;
46577 }
46578 if (("OnExit" == name))
46579 {
46580 this.onExitField = Enums.ParseExitType(value);
46581 this.onExitFieldSet = true;
46582 }
46583 if (("Before" == name))
46584 {
46585 this.beforeField = value;
46586 this.beforeFieldSet = true;
46587 }
46588 if (("After" == name))
46589 {
46590 this.afterField = value;
46591 this.afterFieldSet = true;
46592 }
46593 if (("Overridable" == name))
46594 {
46595 this.overridableField = Enums.ParseYesNoType(value);
46596 this.overridableFieldSet = true;
46597 }
46598 if (("Sequence" == name))
46599 {
46600 this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
46601 this.sequenceFieldSet = true;
46602 }
46603 if (("Content" == name))
46604 {
46605 this.contentField = value;
46606 this.contentFieldSet = true;
46607 }
46608 }
46609 }
46610
46611 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46612 public class InstallUISequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
46613 {
46614
46615 private ElementCollection children;
46616
46617 private ISchemaElement parentElement;
46618
46619 public InstallUISequence()
46620 {
46621 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
46622 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom)));
46623 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Show)));
46624 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ScheduleReboot)));
46625 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions)));
46626 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FindRelatedProducts)));
46627 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppSearch)));
46628 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CCPSearch)));
46629 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RMCCPSearch)));
46630 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ValidateProductID)));
46631 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize)));
46632 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost)));
46633 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponents)));
46634 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource)));
46635 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize)));
46636 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MigrateFeatureStates)));
46637 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExecuteAction)));
46638 this.children = childCollection0;
46639 }
46640
46641 public virtual IEnumerable Children
46642 {
46643 get
46644 {
46645 return this.children;
46646 }
46647 }
46648
46649 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
46650 public virtual IEnumerable this[System.Type childType]
46651 {
46652 get
46653 {
46654 return this.children.Filter(childType);
46655 }
46656 }
46657
46658 public virtual ISchemaElement ParentElement
46659 {
46660 get
46661 {
46662 return this.parentElement;
46663 }
46664 set
46665 {
46666 this.parentElement = value;
46667 }
46668 }
46669
46670 public virtual void AddChild(ISchemaElement child)
46671 {
46672 if ((null == child))
46673 {
46674 throw new ArgumentNullException("child");
46675 }
46676 this.children.AddElement(child);
46677 child.ParentElement = this;
46678 }
46679
46680 public virtual void RemoveChild(ISchemaElement child)
46681 {
46682 if ((null == child))
46683 {
46684 throw new ArgumentNullException("child");
46685 }
46686 this.children.RemoveElement(child);
46687 child.ParentElement = null;
46688 }
46689
46690 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
46691 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
46692 ISchemaElement ICreateChildren.CreateChild(string childName)
46693 {
46694 if (String.IsNullOrEmpty(childName))
46695 {
46696 throw new ArgumentNullException("childName");
46697 }
46698 ISchemaElement childValue = null;
46699 if (("Custom" == childName))
46700 {
46701 childValue = new Custom();
46702 }
46703 if (("Show" == childName))
46704 {
46705 childValue = new Show();
46706 }
46707 if (("ScheduleReboot" == childName))
46708 {
46709 childValue = new ScheduleReboot();
46710 }
46711 if (("LaunchConditions" == childName))
46712 {
46713 childValue = new LaunchConditions();
46714 }
46715 if (("FindRelatedProducts" == childName))
46716 {
46717 childValue = new FindRelatedProducts();
46718 }
46719 if (("AppSearch" == childName))
46720 {
46721 childValue = new AppSearch();
46722 }
46723 if (("CCPSearch" == childName))
46724 {
46725 childValue = new CCPSearch();
46726 }
46727 if (("RMCCPSearch" == childName))
46728 {
46729 childValue = new RMCCPSearch();
46730 }
46731 if (("ValidateProductID" == childName))
46732 {
46733 childValue = new ValidateProductID();
46734 }
46735 if (("CostInitialize" == childName))
46736 {
46737 childValue = new CostInitialize();
46738 }
46739 if (("FileCost" == childName))
46740 {
46741 childValue = new FileCost();
46742 }
46743 if (("IsolateComponents" == childName))
46744 {
46745 childValue = new IsolateComponents();
46746 }
46747 if (("ResolveSource" == childName))
46748 {
46749 childValue = new ResolveSource();
46750 }
46751 if (("CostFinalize" == childName))
46752 {
46753 childValue = new CostFinalize();
46754 }
46755 if (("MigrateFeatureStates" == childName))
46756 {
46757 childValue = new MigrateFeatureStates();
46758 }
46759 if (("ExecuteAction" == childName))
46760 {
46761 childValue = new ExecuteAction();
46762 }
46763 if ((null == childValue))
46764 {
46765 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
46766 }
46767 return childValue;
46768 }
46769
46770 /// <summary>
46771 /// Processes this element and all child elements into an XmlWriter.
46772 /// </summary>
46773 public virtual void OutputXml(XmlWriter writer)
46774 {
46775 if ((null == writer))
46776 {
46777 throw new ArgumentNullException("writer");
46778 }
46779 writer.WriteStartElement("InstallUISequence", "http://wixtoolset.org/schemas/v4/wxs");
46780 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
46781 {
46782 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
46783 childElement.OutputXml(writer);
46784 }
46785 writer.WriteEndElement();
46786 }
46787
46788 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
46789 void ISetAttributes.SetAttribute(string name, string value)
46790 {
46791 if (String.IsNullOrEmpty(name))
46792 {
46793 throw new ArgumentNullException("name");
46794 }
46795 }
46796 }
46797
46798 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
46799 public class InstallExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
46800 {
46801
46802 private ElementCollection children;
46803
46804 private ISchemaElement parentElement;
46805
46806 public InstallExecuteSequence()
46807 {
46808 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
46809 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom)));
46810 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ScheduleReboot)));
46811 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ForceReboot)));
46812 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource)));
46813 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions)));
46814 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FindRelatedProducts)));
46815 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppSearch)));
46816 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CCPSearch)));
46817 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RMCCPSearch)));
46818 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ValidateProductID)));
46819 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize)));
46820 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost)));
46821 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponents)));
46822 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize)));
46823 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetODBCFolders)));
46824 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MigrateFeatureStates)));
46825 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate)));
46826 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize)));
46827 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AllocateRegistrySpace)));
46828 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProcessComponents)));
46829 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnpublishComponents)));
46830 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnpublishFeatures)));
46831 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(StopServices)));
46832 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DeleteServices)));
46833 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterComPlus)));
46834 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SelfUnregModules)));
46835 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterTypeLibraries)));
46836 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveODBC)));
46837 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterFonts)));
46838 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryValues)));
46839 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterClassInfo)));
46840 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterExtensionInfo)));
46841 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterProgIdInfo)));
46842 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterMIMEInfo)));
46843 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveIniValues)));
46844 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveShortcuts)));
46845 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveEnvironmentStrings)));
46846 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveDuplicateFiles)));
46847 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFiles)));
46848 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFolders)));
46849 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateFolders)));
46850 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MoveFiles)));
46851 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles)));
46852 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DuplicateFiles)));
46853 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFiles)));
46854 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BindImage)));
46855 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateShortcuts)));
46856 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterClassInfo)));
46857 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterExtensionInfo)));
46858 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProgIdInfo)));
46859 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterMIMEInfo)));
46860 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteRegistryValues)));
46861 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteIniValues)));
46862 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteEnvironmentStrings)));
46863 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterFonts)));
46864 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallODBC)));
46865 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterTypeLibraries)));
46866 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SelfRegModules)));
46867 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterComPlus)));
46868 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallServices)));
46869 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(StartServices)));
46870 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterUser)));
46871 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProduct)));
46872 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishComponents)));
46873 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishFeatures)));
46874 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishProduct)));
46875 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize)));
46876 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveExistingProducts)));
46877 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DisableRollback)));
46878 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallExecute)));
46879 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallExecuteAgain)));
46880 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPublishAssemblies)));
46881 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiUnpublishAssemblies)));
46882 this.children = childCollection0;
46883 }
46884
46885 public virtual IEnumerable Children
46886 {
46887 get
46888 {
46889 return this.children;
46890 }
46891 }
46892
46893 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
46894 public virtual IEnumerable this[System.Type childType]
46895 {
46896 get
46897 {
46898 return this.children.Filter(childType);
46899 }
46900 }
46901
46902 public virtual ISchemaElement ParentElement
46903 {
46904 get
46905 {
46906 return this.parentElement;
46907 }
46908 set
46909 {
46910 this.parentElement = value;
46911 }
46912 }
46913
46914 public virtual void AddChild(ISchemaElement child)
46915 {
46916 if ((null == child))
46917 {
46918 throw new ArgumentNullException("child");
46919 }
46920 this.children.AddElement(child);
46921 child.ParentElement = this;
46922 }
46923
46924 public virtual void RemoveChild(ISchemaElement child)
46925 {
46926 if ((null == child))
46927 {
46928 throw new ArgumentNullException("child");
46929 }
46930 this.children.RemoveElement(child);
46931 child.ParentElement = null;
46932 }
46933
46934 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
46935 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
46936 ISchemaElement ICreateChildren.CreateChild(string childName)
46937 {
46938 if (String.IsNullOrEmpty(childName))
46939 {
46940 throw new ArgumentNullException("childName");
46941 }
46942 ISchemaElement childValue = null;
46943 if (("Custom" == childName))
46944 {
46945 childValue = new Custom();
46946 }
46947 if (("ScheduleReboot" == childName))
46948 {
46949 childValue = new ScheduleReboot();
46950 }
46951 if (("ForceReboot" == childName))
46952 {
46953 childValue = new ForceReboot();
46954 }
46955 if (("ResolveSource" == childName))
46956 {
46957 childValue = new ResolveSource();
46958 }
46959 if (("LaunchConditions" == childName))
46960 {
46961 childValue = new LaunchConditions();
46962 }
46963 if (("FindRelatedProducts" == childName))
46964 {
46965 childValue = new FindRelatedProducts();
46966 }
46967 if (("AppSearch" == childName))
46968 {
46969 childValue = new AppSearch();
46970 }
46971 if (("CCPSearch" == childName))
46972 {
46973 childValue = new CCPSearch();
46974 }
46975 if (("RMCCPSearch" == childName))
46976 {
46977 childValue = new RMCCPSearch();
46978 }
46979 if (("ValidateProductID" == childName))
46980 {
46981 childValue = new ValidateProductID();
46982 }
46983 if (("CostInitialize" == childName))
46984 {
46985 childValue = new CostInitialize();
46986 }
46987 if (("FileCost" == childName))
46988 {
46989 childValue = new FileCost();
46990 }
46991 if (("IsolateComponents" == childName))
46992 {
46993 childValue = new IsolateComponents();
46994 }
46995 if (("CostFinalize" == childName))
46996 {
46997 childValue = new CostFinalize();
46998 }
46999 if (("SetODBCFolders" == childName))
47000 {
47001 childValue = new SetODBCFolders();
47002 }
47003 if (("MigrateFeatureStates" == childName))
47004 {
47005 childValue = new MigrateFeatureStates();
47006 }
47007 if (("InstallValidate" == childName))
47008 {
47009 childValue = new InstallValidate();
47010 }
47011 if (("InstallInitialize" == childName))
47012 {
47013 childValue = new InstallInitialize();
47014 }
47015 if (("AllocateRegistrySpace" == childName))
47016 {
47017 childValue = new AllocateRegistrySpace();
47018 }
47019 if (("ProcessComponents" == childName))
47020 {
47021 childValue = new ProcessComponents();
47022 }
47023 if (("UnpublishComponents" == childName))
47024 {
47025 childValue = new UnpublishComponents();
47026 }
47027 if (("UnpublishFeatures" == childName))
47028 {
47029 childValue = new UnpublishFeatures();
47030 }
47031 if (("StopServices" == childName))
47032 {
47033 childValue = new StopServices();
47034 }
47035 if (("DeleteServices" == childName))
47036 {
47037 childValue = new DeleteServices();
47038 }
47039 if (("UnregisterComPlus" == childName))
47040 {
47041 childValue = new UnregisterComPlus();
47042 }
47043 if (("SelfUnregModules" == childName))
47044 {
47045 childValue = new SelfUnregModules();
47046 }
47047 if (("UnregisterTypeLibraries" == childName))
47048 {
47049 childValue = new UnregisterTypeLibraries();
47050 }
47051 if (("RemoveODBC" == childName))
47052 {
47053 childValue = new RemoveODBC();
47054 }
47055 if (("UnregisterFonts" == childName))
47056 {
47057 childValue = new UnregisterFonts();
47058 }
47059 if (("RemoveRegistryValues" == childName))
47060 {
47061 childValue = new RemoveRegistryValues();
47062 }
47063 if (("UnregisterClassInfo" == childName))
47064 {
47065 childValue = new UnregisterClassInfo();
47066 }
47067 if (("UnregisterExtensionInfo" == childName))
47068 {
47069 childValue = new UnregisterExtensionInfo();
47070 }
47071 if (("UnregisterProgIdInfo" == childName))
47072 {
47073 childValue = new UnregisterProgIdInfo();
47074 }
47075 if (("UnregisterMIMEInfo" == childName))
47076 {
47077 childValue = new UnregisterMIMEInfo();
47078 }
47079 if (("RemoveIniValues" == childName))
47080 {
47081 childValue = new RemoveIniValues();
47082 }
47083 if (("RemoveShortcuts" == childName))
47084 {
47085 childValue = new RemoveShortcuts();
47086 }
47087 if (("RemoveEnvironmentStrings" == childName))
47088 {
47089 childValue = new RemoveEnvironmentStrings();
47090 }
47091 if (("RemoveDuplicateFiles" == childName))
47092 {
47093 childValue = new RemoveDuplicateFiles();
47094 }
47095 if (("RemoveFiles" == childName))
47096 {
47097 childValue = new RemoveFiles();
47098 }
47099 if (("RemoveFolders" == childName))
47100 {
47101 childValue = new RemoveFolders();
47102 }
47103 if (("CreateFolders" == childName))
47104 {
47105 childValue = new CreateFolders();
47106 }
47107 if (("MoveFiles" == childName))
47108 {
47109 childValue = new MoveFiles();
47110 }
47111 if (("InstallFiles" == childName))
47112 {
47113 childValue = new InstallFiles();
47114 }
47115 if (("DuplicateFiles" == childName))
47116 {
47117 childValue = new DuplicateFiles();
47118 }
47119 if (("PatchFiles" == childName))
47120 {
47121 childValue = new PatchFiles();
47122 }
47123 if (("BindImage" == childName))
47124 {
47125 childValue = new BindImage();
47126 }
47127 if (("CreateShortcuts" == childName))
47128 {
47129 childValue = new CreateShortcuts();
47130 }
47131 if (("RegisterClassInfo" == childName))
47132 {
47133 childValue = new RegisterClassInfo();
47134 }
47135 if (("RegisterExtensionInfo" == childName))
47136 {
47137 childValue = new RegisterExtensionInfo();
47138 }
47139 if (("RegisterProgIdInfo" == childName))
47140 {
47141 childValue = new RegisterProgIdInfo();
47142 }
47143 if (("RegisterMIMEInfo" == childName))
47144 {
47145 childValue = new RegisterMIMEInfo();
47146 }
47147 if (("WriteRegistryValues" == childName))
47148 {
47149 childValue = new WriteRegistryValues();
47150 }
47151 if (("WriteIniValues" == childName))
47152 {
47153 childValue = new WriteIniValues();
47154 }
47155 if (("WriteEnvironmentStrings" == childName))
47156 {
47157 childValue = new WriteEnvironmentStrings();
47158 }
47159 if (("RegisterFonts" == childName))
47160 {
47161 childValue = new RegisterFonts();
47162 }
47163 if (("InstallODBC" == childName))
47164 {
47165 childValue = new InstallODBC();
47166 }
47167 if (("RegisterTypeLibraries" == childName))
47168 {
47169 childValue = new RegisterTypeLibraries();
47170 }
47171 if (("SelfRegModules" == childName))
47172 {
47173 childValue = new SelfRegModules();
47174 }
47175 if (("RegisterComPlus" == childName))
47176 {
47177 childValue = new RegisterComPlus();
47178 }
47179 if (("InstallServices" == childName))
47180 {
47181 childValue = new InstallServices();
47182 }
47183 if (("StartServices" == childName))
47184 {
47185 childValue = new StartServices();
47186 }
47187 if (("RegisterUser" == childName))
47188 {
47189 childValue = new RegisterUser();
47190 }
47191 if (("RegisterProduct" == childName))
47192 {
47193 childValue = new RegisterProduct();
47194 }
47195 if (("PublishComponents" == childName))
47196 {
47197 childValue = new PublishComponents();
47198 }
47199 if (("PublishFeatures" == childName))
47200 {
47201 childValue = new PublishFeatures();
47202 }
47203 if (("PublishProduct" == childName))
47204 {
47205 childValue = new PublishProduct();
47206 }
47207 if (("InstallFinalize" == childName))
47208 {
47209 childValue = new InstallFinalize();
47210 }
47211 if (("RemoveExistingProducts" == childName))
47212 {
47213 childValue = new RemoveExistingProducts();
47214 }
47215 if (("DisableRollback" == childName))
47216 {
47217 childValue = new DisableRollback();
47218 }
47219 if (("InstallExecute" == childName))
47220 {
47221 childValue = new InstallExecute();
47222 }
47223 if (("InstallExecuteAgain" == childName))
47224 {
47225 childValue = new InstallExecuteAgain();
47226 }
47227 if (("MsiPublishAssemblies" == childName))
47228 {
47229 childValue = new MsiPublishAssemblies();
47230 }
47231 if (("MsiUnpublishAssemblies" == childName))
47232 {
47233 childValue = new MsiUnpublishAssemblies();
47234 }
47235 if ((null == childValue))
47236 {
47237 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
47238 }
47239 return childValue;
47240 }
47241
47242 /// <summary>
47243 /// Processes this element and all child elements into an XmlWriter.
47244 /// </summary>
47245 public virtual void OutputXml(XmlWriter writer)
47246 {
47247 if ((null == writer))
47248 {
47249 throw new ArgumentNullException("writer");
47250 }
47251 writer.WriteStartElement("InstallExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs");
47252 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
47253 {
47254 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
47255 childElement.OutputXml(writer);
47256 }
47257 writer.WriteEndElement();
47258 }
47259
47260 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47261 void ISetAttributes.SetAttribute(string name, string value)
47262 {
47263 if (String.IsNullOrEmpty(name))
47264 {
47265 throw new ArgumentNullException("name");
47266 }
47267 }
47268 }
47269
47270 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
47271 public class AdminUISequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
47272 {
47273
47274 private ElementCollection children;
47275
47276 private ISchemaElement parentElement;
47277
47278 public AdminUISequence()
47279 {
47280 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
47281 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom)));
47282 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Show)));
47283 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize)));
47284 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost)));
47285 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize)));
47286 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExecuteAction)));
47287 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate)));
47288 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize)));
47289 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallAdminPackage)));
47290 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles)));
47291 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize)));
47292 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions)));
47293 this.children = childCollection0;
47294 }
47295
47296 public virtual IEnumerable Children
47297 {
47298 get
47299 {
47300 return this.children;
47301 }
47302 }
47303
47304 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
47305 public virtual IEnumerable this[System.Type childType]
47306 {
47307 get
47308 {
47309 return this.children.Filter(childType);
47310 }
47311 }
47312
47313 public virtual ISchemaElement ParentElement
47314 {
47315 get
47316 {
47317 return this.parentElement;
47318 }
47319 set
47320 {
47321 this.parentElement = value;
47322 }
47323 }
47324
47325 public virtual void AddChild(ISchemaElement child)
47326 {
47327 if ((null == child))
47328 {
47329 throw new ArgumentNullException("child");
47330 }
47331 this.children.AddElement(child);
47332 child.ParentElement = this;
47333 }
47334
47335 public virtual void RemoveChild(ISchemaElement child)
47336 {
47337 if ((null == child))
47338 {
47339 throw new ArgumentNullException("child");
47340 }
47341 this.children.RemoveElement(child);
47342 child.ParentElement = null;
47343 }
47344
47345 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47346 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
47347 ISchemaElement ICreateChildren.CreateChild(string childName)
47348 {
47349 if (String.IsNullOrEmpty(childName))
47350 {
47351 throw new ArgumentNullException("childName");
47352 }
47353 ISchemaElement childValue = null;
47354 if (("Custom" == childName))
47355 {
47356 childValue = new Custom();
47357 }
47358 if (("Show" == childName))
47359 {
47360 childValue = new Show();
47361 }
47362 if (("CostInitialize" == childName))
47363 {
47364 childValue = new CostInitialize();
47365 }
47366 if (("FileCost" == childName))
47367 {
47368 childValue = new FileCost();
47369 }
47370 if (("CostFinalize" == childName))
47371 {
47372 childValue = new CostFinalize();
47373 }
47374 if (("ExecuteAction" == childName))
47375 {
47376 childValue = new ExecuteAction();
47377 }
47378 if (("InstallValidate" == childName))
47379 {
47380 childValue = new InstallValidate();
47381 }
47382 if (("InstallInitialize" == childName))
47383 {
47384 childValue = new InstallInitialize();
47385 }
47386 if (("InstallAdminPackage" == childName))
47387 {
47388 childValue = new InstallAdminPackage();
47389 }
47390 if (("InstallFiles" == childName))
47391 {
47392 childValue = new InstallFiles();
47393 }
47394 if (("InstallFinalize" == childName))
47395 {
47396 childValue = new InstallFinalize();
47397 }
47398 if (("LaunchConditions" == childName))
47399 {
47400 childValue = new LaunchConditions();
47401 }
47402 if ((null == childValue))
47403 {
47404 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
47405 }
47406 return childValue;
47407 }
47408
47409 /// <summary>
47410 /// Processes this element and all child elements into an XmlWriter.
47411 /// </summary>
47412 public virtual void OutputXml(XmlWriter writer)
47413 {
47414 if ((null == writer))
47415 {
47416 throw new ArgumentNullException("writer");
47417 }
47418 writer.WriteStartElement("AdminUISequence", "http://wixtoolset.org/schemas/v4/wxs");
47419 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
47420 {
47421 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
47422 childElement.OutputXml(writer);
47423 }
47424 writer.WriteEndElement();
47425 }
47426
47427 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47428 void ISetAttributes.SetAttribute(string name, string value)
47429 {
47430 if (String.IsNullOrEmpty(name))
47431 {
47432 throw new ArgumentNullException("name");
47433 }
47434 }
47435 }
47436
47437 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
47438 public class AdminExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
47439 {
47440
47441 private ElementCollection children;
47442
47443 private ISchemaElement parentElement;
47444
47445 public AdminExecuteSequence()
47446 {
47447 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
47448 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom)));
47449 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize)));
47450 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost)));
47451 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize)));
47452 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate)));
47453 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize)));
47454 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallAdminPackage)));
47455 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles)));
47456 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFiles)));
47457 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize)));
47458 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions)));
47459 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource)));
47460 this.children = childCollection0;
47461 }
47462
47463 public virtual IEnumerable Children
47464 {
47465 get
47466 {
47467 return this.children;
47468 }
47469 }
47470
47471 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
47472 public virtual IEnumerable this[System.Type childType]
47473 {
47474 get
47475 {
47476 return this.children.Filter(childType);
47477 }
47478 }
47479
47480 public virtual ISchemaElement ParentElement
47481 {
47482 get
47483 {
47484 return this.parentElement;
47485 }
47486 set
47487 {
47488 this.parentElement = value;
47489 }
47490 }
47491
47492 public virtual void AddChild(ISchemaElement child)
47493 {
47494 if ((null == child))
47495 {
47496 throw new ArgumentNullException("child");
47497 }
47498 this.children.AddElement(child);
47499 child.ParentElement = this;
47500 }
47501
47502 public virtual void RemoveChild(ISchemaElement child)
47503 {
47504 if ((null == child))
47505 {
47506 throw new ArgumentNullException("child");
47507 }
47508 this.children.RemoveElement(child);
47509 child.ParentElement = null;
47510 }
47511
47512 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47513 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
47514 ISchemaElement ICreateChildren.CreateChild(string childName)
47515 {
47516 if (String.IsNullOrEmpty(childName))
47517 {
47518 throw new ArgumentNullException("childName");
47519 }
47520 ISchemaElement childValue = null;
47521 if (("Custom" == childName))
47522 {
47523 childValue = new Custom();
47524 }
47525 if (("CostInitialize" == childName))
47526 {
47527 childValue = new CostInitialize();
47528 }
47529 if (("FileCost" == childName))
47530 {
47531 childValue = new FileCost();
47532 }
47533 if (("CostFinalize" == childName))
47534 {
47535 childValue = new CostFinalize();
47536 }
47537 if (("InstallValidate" == childName))
47538 {
47539 childValue = new InstallValidate();
47540 }
47541 if (("InstallInitialize" == childName))
47542 {
47543 childValue = new InstallInitialize();
47544 }
47545 if (("InstallAdminPackage" == childName))
47546 {
47547 childValue = new InstallAdminPackage();
47548 }
47549 if (("InstallFiles" == childName))
47550 {
47551 childValue = new InstallFiles();
47552 }
47553 if (("PatchFiles" == childName))
47554 {
47555 childValue = new PatchFiles();
47556 }
47557 if (("InstallFinalize" == childName))
47558 {
47559 childValue = new InstallFinalize();
47560 }
47561 if (("LaunchConditions" == childName))
47562 {
47563 childValue = new LaunchConditions();
47564 }
47565 if (("ResolveSource" == childName))
47566 {
47567 childValue = new ResolveSource();
47568 }
47569 if ((null == childValue))
47570 {
47571 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
47572 }
47573 return childValue;
47574 }
47575
47576 /// <summary>
47577 /// Processes this element and all child elements into an XmlWriter.
47578 /// </summary>
47579 public virtual void OutputXml(XmlWriter writer)
47580 {
47581 if ((null == writer))
47582 {
47583 throw new ArgumentNullException("writer");
47584 }
47585 writer.WriteStartElement("AdminExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs");
47586 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
47587 {
47588 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
47589 childElement.OutputXml(writer);
47590 }
47591 writer.WriteEndElement();
47592 }
47593
47594 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47595 void ISetAttributes.SetAttribute(string name, string value)
47596 {
47597 if (String.IsNullOrEmpty(name))
47598 {
47599 throw new ArgumentNullException("name");
47600 }
47601 }
47602 }
47603
47604 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
47605 public class AdvertiseExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
47606 {
47607
47608 private ElementCollection children;
47609
47610 private ISchemaElement parentElement;
47611
47612 public AdvertiseExecuteSequence()
47613 {
47614 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
47615 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize)));
47616 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize)));
47617 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom)));
47618 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate)));
47619 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize)));
47620 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateShortcuts)));
47621 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterClassInfo)));
47622 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterExtensionInfo)));
47623 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterMIMEInfo)));
47624 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProgIdInfo)));
47625 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishComponents)));
47626 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishFeatures)));
47627 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishProduct)));
47628 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize)));
47629 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPublishAssemblies)));
47630 this.children = childCollection0;
47631 }
47632
47633 public virtual IEnumerable Children
47634 {
47635 get
47636 {
47637 return this.children;
47638 }
47639 }
47640
47641 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
47642 public virtual IEnumerable this[System.Type childType]
47643 {
47644 get
47645 {
47646 return this.children.Filter(childType);
47647 }
47648 }
47649
47650 public virtual ISchemaElement ParentElement
47651 {
47652 get
47653 {
47654 return this.parentElement;
47655 }
47656 set
47657 {
47658 this.parentElement = value;
47659 }
47660 }
47661
47662 public virtual void AddChild(ISchemaElement child)
47663 {
47664 if ((null == child))
47665 {
47666 throw new ArgumentNullException("child");
47667 }
47668 this.children.AddElement(child);
47669 child.ParentElement = this;
47670 }
47671
47672 public virtual void RemoveChild(ISchemaElement child)
47673 {
47674 if ((null == child))
47675 {
47676 throw new ArgumentNullException("child");
47677 }
47678 this.children.RemoveElement(child);
47679 child.ParentElement = null;
47680 }
47681
47682 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47683 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
47684 ISchemaElement ICreateChildren.CreateChild(string childName)
47685 {
47686 if (String.IsNullOrEmpty(childName))
47687 {
47688 throw new ArgumentNullException("childName");
47689 }
47690 ISchemaElement childValue = null;
47691 if (("CostInitialize" == childName))
47692 {
47693 childValue = new CostInitialize();
47694 }
47695 if (("CostFinalize" == childName))
47696 {
47697 childValue = new CostFinalize();
47698 }
47699 if (("Custom" == childName))
47700 {
47701 childValue = new Custom();
47702 }
47703 if (("InstallValidate" == childName))
47704 {
47705 childValue = new InstallValidate();
47706 }
47707 if (("InstallInitialize" == childName))
47708 {
47709 childValue = new InstallInitialize();
47710 }
47711 if (("CreateShortcuts" == childName))
47712 {
47713 childValue = new CreateShortcuts();
47714 }
47715 if (("RegisterClassInfo" == childName))
47716 {
47717 childValue = new RegisterClassInfo();
47718 }
47719 if (("RegisterExtensionInfo" == childName))
47720 {
47721 childValue = new RegisterExtensionInfo();
47722 }
47723 if (("RegisterMIMEInfo" == childName))
47724 {
47725 childValue = new RegisterMIMEInfo();
47726 }
47727 if (("RegisterProgIdInfo" == childName))
47728 {
47729 childValue = new RegisterProgIdInfo();
47730 }
47731 if (("PublishComponents" == childName))
47732 {
47733 childValue = new PublishComponents();
47734 }
47735 if (("PublishFeatures" == childName))
47736 {
47737 childValue = new PublishFeatures();
47738 }
47739 if (("PublishProduct" == childName))
47740 {
47741 childValue = new PublishProduct();
47742 }
47743 if (("InstallFinalize" == childName))
47744 {
47745 childValue = new InstallFinalize();
47746 }
47747 if (("MsiPublishAssemblies" == childName))
47748 {
47749 childValue = new MsiPublishAssemblies();
47750 }
47751 if ((null == childValue))
47752 {
47753 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
47754 }
47755 return childValue;
47756 }
47757
47758 /// <summary>
47759 /// Processes this element and all child elements into an XmlWriter.
47760 /// </summary>
47761 public virtual void OutputXml(XmlWriter writer)
47762 {
47763 if ((null == writer))
47764 {
47765 throw new ArgumentNullException("writer");
47766 }
47767 writer.WriteStartElement("AdvertiseExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs");
47768 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
47769 {
47770 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
47771 childElement.OutputXml(writer);
47772 }
47773 writer.WriteEndElement();
47774 }
47775
47776 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47777 void ISetAttributes.SetAttribute(string name, string value)
47778 {
47779 if (String.IsNullOrEmpty(name))
47780 {
47781 throw new ArgumentNullException("name");
47782 }
47783 }
47784 }
47785
47786 /// <summary>
47787 /// Binary data used for CustomAction elements and UI controls.
47788 /// </summary>
47789 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
47790 public class Binary : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
47791 {
47792
47793 private ElementCollection children;
47794
47795 private string idField;
47796
47797 private bool idFieldSet;
47798
47799 private string sourceFileField;
47800
47801 private bool sourceFileFieldSet;
47802
47803 private string srcField;
47804
47805 private bool srcFieldSet;
47806
47807 private YesNoType suppressModularizationField;
47808
47809 private bool suppressModularizationFieldSet;
47810
47811 private ISchemaElement parentElement;
47812
47813 public Binary()
47814 {
47815 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
47816 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement)));
47817 this.children = childCollection0;
47818 }
47819
47820 public virtual IEnumerable Children
47821 {
47822 get
47823 {
47824 return this.children;
47825 }
47826 }
47827
47828 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
47829 public virtual IEnumerable this[System.Type childType]
47830 {
47831 get
47832 {
47833 return this.children.Filter(childType);
47834 }
47835 }
47836
47837 /// <summary>
47838 /// 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.
47839 /// </summary>
47840 public string Id
47841 {
47842 get
47843 {
47844 return this.idField;
47845 }
47846 set
47847 {
47848 this.idFieldSet = true;
47849 this.idField = value;
47850 }
47851 }
47852
47853 /// <summary>
47854 /// Path to the binary file.
47855 /// </summary>
47856 public string SourceFile
47857 {
47858 get
47859 {
47860 return this.sourceFileField;
47861 }
47862 set
47863 {
47864 this.sourceFileFieldSet = true;
47865 this.sourceFileField = value;
47866 }
47867 }
47868
47869 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
47870 public string src
47871 {
47872 get
47873 {
47874 return this.srcField;
47875 }
47876 set
47877 {
47878 this.srcFieldSet = true;
47879 this.srcField = value;
47880 }
47881 }
47882
47883 /// <summary>
47884 /// Use to suppress modularization of this Binary identifier in merge modules.
47885 /// </summary>
47886 public YesNoType SuppressModularization
47887 {
47888 get
47889 {
47890 return this.suppressModularizationField;
47891 }
47892 set
47893 {
47894 this.suppressModularizationFieldSet = true;
47895 this.suppressModularizationField = value;
47896 }
47897 }
47898
47899 public virtual ISchemaElement ParentElement
47900 {
47901 get
47902 {
47903 return this.parentElement;
47904 }
47905 set
47906 {
47907 this.parentElement = value;
47908 }
47909 }
47910
47911 public virtual void AddChild(ISchemaElement child)
47912 {
47913 if ((null == child))
47914 {
47915 throw new ArgumentNullException("child");
47916 }
47917 this.children.AddElement(child);
47918 child.ParentElement = this;
47919 }
47920
47921 public virtual void RemoveChild(ISchemaElement child)
47922 {
47923 if ((null == child))
47924 {
47925 throw new ArgumentNullException("child");
47926 }
47927 this.children.RemoveElement(child);
47928 child.ParentElement = null;
47929 }
47930
47931 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47932 ISchemaElement ICreateChildren.CreateChild(string childName)
47933 {
47934 if (String.IsNullOrEmpty(childName))
47935 {
47936 throw new ArgumentNullException("childName");
47937 }
47938 ISchemaElement childValue = null;
47939 if ((null == childValue))
47940 {
47941 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
47942 }
47943 return childValue;
47944 }
47945
47946 /// <summary>
47947 /// Processes this element and all child elements into an XmlWriter.
47948 /// </summary>
47949 public virtual void OutputXml(XmlWriter writer)
47950 {
47951 if ((null == writer))
47952 {
47953 throw new ArgumentNullException("writer");
47954 }
47955 writer.WriteStartElement("Binary", "http://wixtoolset.org/schemas/v4/wxs");
47956 if (this.idFieldSet)
47957 {
47958 writer.WriteAttributeString("Id", this.idField);
47959 }
47960 if (this.sourceFileFieldSet)
47961 {
47962 writer.WriteAttributeString("SourceFile", this.sourceFileField);
47963 }
47964 if (this.srcFieldSet)
47965 {
47966 writer.WriteAttributeString("src", this.srcField);
47967 }
47968 if (this.suppressModularizationFieldSet)
47969 {
47970 if ((this.suppressModularizationField == YesNoType.no))
47971 {
47972 writer.WriteAttributeString("SuppressModularization", "no");
47973 }
47974 if ((this.suppressModularizationField == YesNoType.yes))
47975 {
47976 writer.WriteAttributeString("SuppressModularization", "yes");
47977 }
47978 }
47979 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
47980 {
47981 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
47982 childElement.OutputXml(writer);
47983 }
47984 writer.WriteEndElement();
47985 }
47986
47987 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
47988 void ISetAttributes.SetAttribute(string name, string value)
47989 {
47990 if (String.IsNullOrEmpty(name))
47991 {
47992 throw new ArgumentNullException("name");
47993 }
47994 if (("Id" == name))
47995 {
47996 this.idField = value;
47997 this.idFieldSet = true;
47998 }
47999 if (("SourceFile" == name))
48000 {
48001 this.sourceFileField = value;
48002 this.sourceFileFieldSet = true;
48003 }
48004 if (("src" == name))
48005 {
48006 this.srcField = value;
48007 this.srcFieldSet = true;
48008 }
48009 if (("SuppressModularization" == name))
48010 {
48011 this.suppressModularizationField = Enums.ParseYesNoType(value);
48012 this.suppressModularizationFieldSet = true;
48013 }
48014 }
48015 }
48016
48017 /// <summary>
48018 /// Icon used for Shortcut, ProgId, or Class elements (but not UI controls)
48019 /// </summary>
48020 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
48021 public class Icon : ISchemaElement, ISetAttributes
48022 {
48023
48024 private string idField;
48025
48026 private bool idFieldSet;
48027
48028 private string sourceFileField;
48029
48030 private bool sourceFileFieldSet;
48031
48032 private string srcField;
48033
48034 private bool srcFieldSet;
48035
48036 private ISchemaElement parentElement;
48037
48038 /// <summary>
48039 /// 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.
48040 /// </summary>
48041 public string Id
48042 {
48043 get
48044 {
48045 return this.idField;
48046 }
48047 set
48048 {
48049 this.idFieldSet = true;
48050 this.idField = value;
48051 }
48052 }
48053
48054 /// <summary>
48055 /// Path to the icon file.
48056 /// </summary>
48057 public string SourceFile
48058 {
48059 get
48060 {
48061 return this.sourceFileField;
48062 }
48063 set
48064 {
48065 this.sourceFileFieldSet = true;
48066 this.sourceFileField = value;
48067 }
48068 }
48069
48070 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
48071 public string src
48072 {
48073 get
48074 {
48075 return this.srcField;
48076 }
48077 set
48078 {
48079 this.srcFieldSet = true;
48080 this.srcField = value;
48081 }
48082 }
48083
48084 public virtual ISchemaElement ParentElement
48085 {
48086 get
48087 {
48088 return this.parentElement;
48089 }
48090 set
48091 {
48092 this.parentElement = value;
48093 }
48094 }
48095
48096 /// <summary>
48097 /// Processes this element and all child elements into an XmlWriter.
48098 /// </summary>
48099 public virtual void OutputXml(XmlWriter writer)
48100 {
48101 if ((null == writer))
48102 {
48103 throw new ArgumentNullException("writer");
48104 }
48105 writer.WriteStartElement("Icon", "http://wixtoolset.org/schemas/v4/wxs");
48106 if (this.idFieldSet)
48107 {
48108 writer.WriteAttributeString("Id", this.idField);
48109 }
48110 if (this.sourceFileFieldSet)
48111 {
48112 writer.WriteAttributeString("SourceFile", this.sourceFileField);
48113 }
48114 if (this.srcFieldSet)
48115 {
48116 writer.WriteAttributeString("src", this.srcField);
48117 }
48118 writer.WriteEndElement();
48119 }
48120
48121 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
48122 void ISetAttributes.SetAttribute(string name, string value)
48123 {
48124 if (String.IsNullOrEmpty(name))
48125 {
48126 throw new ArgumentNullException("name");
48127 }
48128 if (("Id" == name))
48129 {
48130 this.idField = value;
48131 this.idFieldSet = true;
48132 }
48133 if (("SourceFile" == name))
48134 {
48135 this.sourceFileField = value;
48136 this.sourceFileFieldSet = true;
48137 }
48138 if (("src" == name))
48139 {
48140 this.srcField = value;
48141 this.srcFieldSet = true;
48142 }
48143 }
48144 }
48145
48146 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
48147 public class EmbeddedChainer : ISchemaElement, ISetAttributes
48148 {
48149
48150 private string idField;
48151
48152 private bool idFieldSet;
48153
48154 private string commandLineField;
48155
48156 private bool commandLineFieldSet;
48157
48158 private string binarySourceField;
48159
48160 private bool binarySourceFieldSet;
48161
48162 private string fileSourceField;
48163
48164 private bool fileSourceFieldSet;
48165
48166 private string propertySourceField;
48167
48168 private bool propertySourceFieldSet;
48169
48170 private string contentField;
48171
48172 private bool contentFieldSet;
48173
48174 private ISchemaElement parentElement;
48175
48176 /// <summary>
48177 /// Unique identifier for embedded chainer.
48178 /// </summary>
48179 public string Id
48180 {
48181 get
48182 {
48183 return this.idField;
48184 }
48185 set
48186 {
48187 this.idFieldSet = true;
48188 this.idField = value;
48189 }
48190 }
48191
48192 /// <summary>
48193 /// Value to append to the transaction handle and passed to the chainer executable.
48194 /// </summary>
48195 public string CommandLine
48196 {
48197 get
48198 {
48199 return this.commandLineField;
48200 }
48201 set
48202 {
48203 this.commandLineFieldSet = true;
48204 this.commandLineField = value;
48205 }
48206 }
48207
48208 /// <summary>
48209 /// Reference to the Binary element that contains the chainer executable. Mutually exclusive with
48210 /// the FileSource and PropertySource attributes.
48211 /// </summary>
48212 public string BinarySource
48213 {
48214 get
48215 {
48216 return this.binarySourceField;
48217 }
48218 set
48219 {
48220 this.binarySourceFieldSet = true;
48221 this.binarySourceField = value;
48222 }
48223 }
48224
48225 /// <summary>
48226 /// Reference to the File element that is the chainer executable. Mutually exclusive with
48227 /// the BinarySource and PropertySource attributes.
48228 /// </summary>
48229 public string FileSource
48230 {
48231 get
48232 {
48233 return this.fileSourceField;
48234 }
48235 set
48236 {
48237 this.fileSourceFieldSet = true;
48238 this.fileSourceField = value;
48239 }
48240 }
48241
48242 /// <summary>
48243 /// Reference to a Property that resolves to the full path to the chainer executable. Mutually exclusive with
48244 /// the BinarySource and FileSource attributes.
48245 /// </summary>
48246 public string PropertySource
48247 {
48248 get
48249 {
48250 return this.propertySourceField;
48251 }
48252 set
48253 {
48254 this.propertySourceFieldSet = true;
48255 this.propertySourceField = value;
48256 }
48257 }
48258
48259 /// <summary>
48260 /// Element value is the condition. CDATA may be used to when a condition contains many XML characters
48261 /// that must be escaped. It is important to note that each EmbeddedChainer element must have a mutually exclusive condition
48262 /// to ensure that only one embedded chainer will execute at a time. If the conditions are not mutually exclusive the chainer
48263 /// that executes is undeterministic.
48264 /// </summary>
48265 public string Content
48266 {
48267 get
48268 {
48269 return this.contentField;
48270 }
48271 set
48272 {
48273 this.contentFieldSet = true;
48274 this.contentField = value;
48275 }
48276 }
48277
48278 public virtual ISchemaElement ParentElement
48279 {
48280 get
48281 {
48282 return this.parentElement;
48283 }
48284 set
48285 {
48286 this.parentElement = value;
48287 }
48288 }
48289
48290 /// <summary>
48291 /// Processes this element and all child elements into an XmlWriter.
48292 /// </summary>
48293 public virtual void OutputXml(XmlWriter writer)
48294 {
48295 if ((null == writer))
48296 {
48297 throw new ArgumentNullException("writer");
48298 }
48299 writer.WriteStartElement("EmbeddedChainer", "http://wixtoolset.org/schemas/v4/wxs");
48300 if (this.idFieldSet)
48301 {
48302 writer.WriteAttributeString("Id", this.idField);
48303 }
48304 if (this.commandLineFieldSet)
48305 {
48306 writer.WriteAttributeString("CommandLine", this.commandLineField);
48307 }
48308 if (this.binarySourceFieldSet)
48309 {
48310 writer.WriteAttributeString("BinarySource", this.binarySourceField);
48311 }
48312 if (this.fileSourceFieldSet)
48313 {
48314 writer.WriteAttributeString("FileSource", this.fileSourceField);
48315 }
48316 if (this.propertySourceFieldSet)
48317 {
48318 writer.WriteAttributeString("PropertySource", this.propertySourceField);
48319 }
48320 if (this.contentFieldSet)
48321 {
48322 writer.WriteString(this.contentField);
48323 }
48324 writer.WriteEndElement();
48325 }
48326
48327 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
48328 void ISetAttributes.SetAttribute(string name, string value)
48329 {
48330 if (String.IsNullOrEmpty(name))
48331 {
48332 throw new ArgumentNullException("name");
48333 }
48334 if (("Id" == name))
48335 {
48336 this.idField = value;
48337 this.idFieldSet = true;
48338 }
48339 if (("CommandLine" == name))
48340 {
48341 this.commandLineField = value;
48342 this.commandLineFieldSet = true;
48343 }
48344 if (("BinarySource" == name))
48345 {
48346 this.binarySourceField = value;
48347 this.binarySourceFieldSet = true;
48348 }
48349 if (("FileSource" == name))
48350 {
48351 this.fileSourceField = value;
48352 this.fileSourceFieldSet = true;
48353 }
48354 if (("PropertySource" == name))
48355 {
48356 this.propertySourceField = value;
48357 this.propertySourceFieldSet = true;
48358 }
48359 if (("Content" == name))
48360 {
48361 this.contentField = value;
48362 this.contentFieldSet = true;
48363 }
48364 }
48365 }
48366
48367 /// <summary>
48368 /// Reference to an EmbeddedChainer element. This will force the entire referenced Fragment's contents
48369 /// to be included in the installer database.
48370 /// </summary>
48371 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
48372 public class EmbeddedChainerRef : ISchemaElement, ISetAttributes
48373 {
48374
48375 private string idField;
48376
48377 private bool idFieldSet;
48378
48379 private ISchemaElement parentElement;
48380
48381 public string Id
48382 {
48383 get
48384 {
48385 return this.idField;
48386 }
48387 set
48388 {
48389 this.idFieldSet = true;
48390 this.idField = value;
48391 }
48392 }
48393
48394 public virtual ISchemaElement ParentElement
48395 {
48396 get
48397 {
48398 return this.parentElement;
48399 }
48400 set
48401 {
48402 this.parentElement = value;
48403 }
48404 }
48405
48406 /// <summary>
48407 /// Processes this element and all child elements into an XmlWriter.
48408 /// </summary>
48409 public virtual void OutputXml(XmlWriter writer)
48410 {
48411 if ((null == writer))
48412 {
48413 throw new ArgumentNullException("writer");
48414 }
48415 writer.WriteStartElement("EmbeddedChainerRef", "http://wixtoolset.org/schemas/v4/wxs");
48416 if (this.idFieldSet)
48417 {
48418 writer.WriteAttributeString("Id", this.idField);
48419 }
48420 writer.WriteEndElement();
48421 }
48422
48423 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
48424 void ISetAttributes.SetAttribute(string name, string value)
48425 {
48426 if (String.IsNullOrEmpty(name))
48427 {
48428 throw new ArgumentNullException("name");
48429 }
48430 if (("Id" == name))
48431 {
48432 this.idField = value;
48433 this.idFieldSet = true;
48434 }
48435 }
48436 }
48437
48438 /// <summary>
48439 /// Element value is the condition. Use CDATA if message contains delimiter characters.
48440 /// </summary>
48441 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
48442 public class EmbeddedUI : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
48443 {
48444
48445 private ElementCollection children;
48446
48447 private string idField;
48448
48449 private bool idFieldSet;
48450
48451 private YesNoType ignoreFatalExitField;
48452
48453 private bool ignoreFatalExitFieldSet;
48454
48455 private YesNoType ignoreErrorField;
48456
48457 private bool ignoreErrorFieldSet;
48458
48459 private YesNoType ignoreWarningField;
48460
48461 private bool ignoreWarningFieldSet;
48462
48463 private YesNoType ignoreUserField;
48464
48465 private bool ignoreUserFieldSet;
48466
48467 private YesNoType ignoreInfoField;
48468
48469 private bool ignoreInfoFieldSet;
48470
48471 private YesNoType ignoreFilesInUseField;
48472
48473 private bool ignoreFilesInUseFieldSet;
48474
48475 private YesNoType ignoreResolveSourceField;
48476
48477 private bool ignoreResolveSourceFieldSet;
48478
48479 private YesNoType ignoreOutOfDiskSpaceField;
48480
48481 private bool ignoreOutOfDiskSpaceFieldSet;
48482
48483 private YesNoType ignoreActionStartField;
48484
48485 private bool ignoreActionStartFieldSet;
48486
48487 private YesNoType ignoreActionDataField;
48488
48489 private bool ignoreActionDataFieldSet;
48490
48491 private YesNoType ignoreProgressField;
48492
48493 private bool ignoreProgressFieldSet;
48494
48495 private YesNoType ignoreCommonDataField;
48496
48497 private bool ignoreCommonDataFieldSet;
48498
48499 private YesNoType ignoreInitializeField;
48500
48501 private bool ignoreInitializeFieldSet;
48502
48503 private YesNoType ignoreTerminateField;
48504
48505 private bool ignoreTerminateFieldSet;
48506
48507 private YesNoType ignoreShowDialogField;
48508
48509 private bool ignoreShowDialogFieldSet;
48510
48511 private YesNoType ignoreRMFilesInUseField;
48512
48513 private bool ignoreRMFilesInUseFieldSet;
48514
48515 private YesNoType ignoreInstallStartField;
48516
48517 private bool ignoreInstallStartFieldSet;
48518
48519 private YesNoType ignoreInstallEndField;
48520
48521 private bool ignoreInstallEndFieldSet;
48522
48523 private string nameField;
48524
48525 private bool nameFieldSet;
48526
48527 private string sourceFileField;
48528
48529 private bool sourceFileFieldSet;
48530
48531 private YesNoType supportBasicUIField;
48532
48533 private bool supportBasicUIFieldSet;
48534
48535 private ISchemaElement parentElement;
48536
48537 public EmbeddedUI()
48538 {
48539 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
48540 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(EmbeddedUIResource)));
48541 this.children = childCollection0;
48542 }
48543
48544 public virtual IEnumerable Children
48545 {
48546 get
48547 {
48548 return this.children;
48549 }
48550 }
48551
48552 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
48553 public virtual IEnumerable this[System.Type childType]
48554 {
48555 get
48556 {
48557 return this.children.Filter(childType);
48558 }
48559 }
48560
48561 /// <summary>
48562 /// Unique identifier for embedded UI.If this attribute is not specified the Name attribute or the file name
48563 /// portion of the SourceFile attribute will be used.
48564 /// </summary>
48565 public string Id
48566 {
48567 get
48568 {
48569 return this.idField;
48570 }
48571 set
48572 {
48573 this.idFieldSet = true;
48574 this.idField = value;
48575 }
48576 }
48577
48578 /// <summary>
48579 /// Embedded UI will not recieve any INSTALLLOGMODE_FATALEXIT messages.
48580 /// </summary>
48581 public YesNoType IgnoreFatalExit
48582 {
48583 get
48584 {
48585 return this.ignoreFatalExitField;
48586 }
48587 set
48588 {
48589 this.ignoreFatalExitFieldSet = true;
48590 this.ignoreFatalExitField = value;
48591 }
48592 }
48593
48594 /// <summary>
48595 /// Embedded UI will not recieve any INSTALLLOGMODE_ERROR messages.
48596 /// </summary>
48597 public YesNoType IgnoreError
48598 {
48599 get
48600 {
48601 return this.ignoreErrorField;
48602 }
48603 set
48604 {
48605 this.ignoreErrorFieldSet = true;
48606 this.ignoreErrorField = value;
48607 }
48608 }
48609
48610 /// <summary>
48611 /// Embedded UI will not recieve any INSTALLLOGMODE_WARNING messages.
48612 /// </summary>
48613 public YesNoType IgnoreWarning
48614 {
48615 get
48616 {
48617 return this.ignoreWarningField;
48618 }
48619 set
48620 {
48621 this.ignoreWarningFieldSet = true;
48622 this.ignoreWarningField = value;
48623 }
48624 }
48625
48626 /// <summary>
48627 /// Embedded UI will not recieve any INSTALLLOGMODE_USER messages.
48628 /// </summary>
48629 public YesNoType IgnoreUser
48630 {
48631 get
48632 {
48633 return this.ignoreUserField;
48634 }
48635 set
48636 {
48637 this.ignoreUserFieldSet = true;
48638 this.ignoreUserField = value;
48639 }
48640 }
48641
48642 /// <summary>
48643 /// Embedded UI will not recieve any INSTALLLOGMODE_INFO messages.
48644 /// </summary>
48645 public YesNoType IgnoreInfo
48646 {
48647 get
48648 {
48649 return this.ignoreInfoField;
48650 }
48651 set
48652 {
48653 this.ignoreInfoFieldSet = true;
48654 this.ignoreInfoField = value;
48655 }
48656 }
48657
48658 /// <summary>
48659 /// Embedded UI will not recieve any INSTALLLOGMODE_FILESINUSE messages.
48660 /// </summary>
48661 public YesNoType IgnoreFilesInUse
48662 {
48663 get
48664 {
48665 return this.ignoreFilesInUseField;
48666 }
48667 set
48668 {
48669 this.ignoreFilesInUseFieldSet = true;
48670 this.ignoreFilesInUseField = value;
48671 }
48672 }
48673
48674 /// <summary>
48675 /// Embedded UI will not recieve any INSTALLLOGMODE_RESOLVESOURCE messages.
48676 /// </summary>
48677 public YesNoType IgnoreResolveSource
48678 {
48679 get
48680 {
48681 return this.ignoreResolveSourceField;
48682 }
48683 set
48684 {
48685 this.ignoreResolveSourceFieldSet = true;
48686 this.ignoreResolveSourceField = value;
48687 }
48688 }
48689
48690 /// <summary>
48691 /// Embedded UI will not recieve any INSTALLLOGMODE_OUTOFDISKSPACE messages.
48692 /// </summary>
48693 public YesNoType IgnoreOutOfDiskSpace
48694 {
48695 get
48696 {
48697 return this.ignoreOutOfDiskSpaceField;
48698 }
48699 set
48700 {
48701 this.ignoreOutOfDiskSpaceFieldSet = true;
48702 this.ignoreOutOfDiskSpaceField = value;
48703 }
48704 }
48705
48706 /// <summary>
48707 /// Embedded UI will not recieve any INSTALLLOGMODE_ACTIONSTART messages.
48708 /// </summary>
48709 public YesNoType IgnoreActionStart
48710 {
48711 get
48712 {
48713 return this.ignoreActionStartField;
48714 }
48715 set
48716 {
48717 this.ignoreActionStartFieldSet = true;
48718 this.ignoreActionStartField = value;
48719 }
48720 }
48721
48722 /// <summary>
48723 /// Embedded UI will not recieve any INSTALLLOGMODE_ACTIONDATA messages.
48724 /// </summary>
48725 public YesNoType IgnoreActionData
48726 {
48727 get
48728 {
48729 return this.ignoreActionDataField;
48730 }
48731 set
48732 {
48733 this.ignoreActionDataFieldSet = true;
48734 this.ignoreActionDataField = value;
48735 }
48736 }
48737
48738 /// <summary>
48739 /// Embedded UI will not recieve any INSTALLLOGMODE_PROGRESS messages.
48740 /// </summary>
48741 public YesNoType IgnoreProgress
48742 {
48743 get
48744 {
48745 return this.ignoreProgressField;
48746 }
48747 set
48748 {
48749 this.ignoreProgressFieldSet = true;
48750 this.ignoreProgressField = value;
48751 }
48752 }
48753
48754 /// <summary>
48755 /// Embedded UI will not recieve any INSTALLLOGMODE_COMMONDATA messages.
48756 /// </summary>
48757 public YesNoType IgnoreCommonData
48758 {
48759 get
48760 {
48761 return this.ignoreCommonDataField;
48762 }
48763 set
48764 {
48765 this.ignoreCommonDataFieldSet = true;
48766 this.ignoreCommonDataField = value;
48767 }
48768 }
48769
48770 /// <summary>
48771 /// Embedded UI will not recieve any INSTALLLOGMODE_INITIALIZE messages.
48772 /// </summary>
48773 public YesNoType IgnoreInitialize
48774 {
48775 get
48776 {
48777 return this.ignoreInitializeField;
48778 }
48779 set
48780 {
48781 this.ignoreInitializeFieldSet = true;
48782 this.ignoreInitializeField = value;
48783 }
48784 }
48785
48786 /// <summary>
48787 /// Embedded UI will not recieve any INSTALLLOGMODE_TERMINATE messages.
48788 /// </summary>
48789 public YesNoType IgnoreTerminate
48790 {
48791 get
48792 {
48793 return this.ignoreTerminateField;
48794 }
48795 set
48796 {
48797 this.ignoreTerminateFieldSet = true;
48798 this.ignoreTerminateField = value;
48799 }
48800 }
48801
48802 /// <summary>
48803 /// Embedded UI will not recieve any INSTALLLOGMODE_SHOWDIALOG messages.
48804 /// </summary>
48805 public YesNoType IgnoreShowDialog
48806 {
48807 get
48808 {
48809 return this.ignoreShowDialogField;
48810 }
48811 set
48812 {
48813 this.ignoreShowDialogFieldSet = true;
48814 this.ignoreShowDialogField = value;
48815 }
48816 }
48817
48818 /// <summary>
48819 /// Embedded UI will not recieve any INSTALLLOGMODE_RMFILESINUSE messages.
48820 /// </summary>
48821 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
48822 public YesNoType IgnoreRMFilesInUse
48823 {
48824 get
48825 {
48826 return this.ignoreRMFilesInUseField;
48827 }
48828 set
48829 {
48830 this.ignoreRMFilesInUseFieldSet = true;
48831 this.ignoreRMFilesInUseField = value;
48832 }
48833 }
48834
48835 /// <summary>
48836 /// Embedded UI will not recieve any INSTALLLOGMODE_INSTALLSTART messages.
48837 /// </summary>
48838 public YesNoType IgnoreInstallStart
48839 {
48840 get
48841 {
48842 return this.ignoreInstallStartField;
48843 }
48844 set
48845 {
48846 this.ignoreInstallStartFieldSet = true;
48847 this.ignoreInstallStartField = value;
48848 }
48849 }
48850
48851 /// <summary>
48852 /// Embedded UI will not recieve any INSTALLLOGMODE_INSTALLEND messages.
48853 /// </summary>
48854 public YesNoType IgnoreInstallEnd
48855 {
48856 get
48857 {
48858 return this.ignoreInstallEndField;
48859 }
48860 set
48861 {
48862 this.ignoreInstallEndFieldSet = true;
48863 this.ignoreInstallEndField = value;
48864 }
48865 }
48866
48867 /// <summary>
48868 /// The name for the embedded UI DLL when it is extracted from the package and executed. (Windows Installer
48869 /// does not support the typical short filename and long filename combination for embedded UI files as it
48870 /// does for other kinds of files.) If this attribute is not specified the file name portion of the SourceFile
48871 /// attribute will be used.
48872 /// </summary>
48873 public string Name
48874 {
48875 get
48876 {
48877 return this.nameField;
48878 }
48879 set
48880 {
48881 this.nameFieldSet = true;
48882 this.nameField = value;
48883 }
48884 }
48885
48886 /// <summary>
48887 /// Path to the binary file that is the embedded UI. This must be a DLL that exports the following
48888 /// three entry points: InitializeEmbeddedUI, EmbeddedUIHandler and ShutdownEmbeddedUI.
48889 /// </summary>
48890 public string SourceFile
48891 {
48892 get
48893 {
48894 return this.sourceFileField;
48895 }
48896 set
48897 {
48898 this.sourceFileFieldSet = true;
48899 this.sourceFileField = value;
48900 }
48901 }
48902
48903 /// <summary>
48904 /// Set yes to allow the Windows Installer to display the embedded UI during basic UI level installation.
48905 /// </summary>
48906 public YesNoType SupportBasicUI
48907 {
48908 get
48909 {
48910 return this.supportBasicUIField;
48911 }
48912 set
48913 {
48914 this.supportBasicUIFieldSet = true;
48915 this.supportBasicUIField = value;
48916 }
48917 }
48918
48919 public virtual ISchemaElement ParentElement
48920 {
48921 get
48922 {
48923 return this.parentElement;
48924 }
48925 set
48926 {
48927 this.parentElement = value;
48928 }
48929 }
48930
48931 public virtual void AddChild(ISchemaElement child)
48932 {
48933 if ((null == child))
48934 {
48935 throw new ArgumentNullException("child");
48936 }
48937 this.children.AddElement(child);
48938 child.ParentElement = this;
48939 }
48940
48941 public virtual void RemoveChild(ISchemaElement child)
48942 {
48943 if ((null == child))
48944 {
48945 throw new ArgumentNullException("child");
48946 }
48947 this.children.RemoveElement(child);
48948 child.ParentElement = null;
48949 }
48950
48951 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
48952 ISchemaElement ICreateChildren.CreateChild(string childName)
48953 {
48954 if (String.IsNullOrEmpty(childName))
48955 {
48956 throw new ArgumentNullException("childName");
48957 }
48958 ISchemaElement childValue = null;
48959 if (("EmbeddedUIResource" == childName))
48960 {
48961 childValue = new EmbeddedUIResource();
48962 }
48963 if ((null == childValue))
48964 {
48965 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
48966 }
48967 return childValue;
48968 }
48969
48970 /// <summary>
48971 /// Processes this element and all child elements into an XmlWriter.
48972 /// </summary>
48973 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
48974 public virtual void OutputXml(XmlWriter writer)
48975 {
48976 if ((null == writer))
48977 {
48978 throw new ArgumentNullException("writer");
48979 }
48980 writer.WriteStartElement("EmbeddedUI", "http://wixtoolset.org/schemas/v4/wxs");
48981 if (this.idFieldSet)
48982 {
48983 writer.WriteAttributeString("Id", this.idField);
48984 }
48985 if (this.ignoreFatalExitFieldSet)
48986 {
48987 if ((this.ignoreFatalExitField == YesNoType.no))
48988 {
48989 writer.WriteAttributeString("IgnoreFatalExit", "no");
48990 }
48991 if ((this.ignoreFatalExitField == YesNoType.yes))
48992 {
48993 writer.WriteAttributeString("IgnoreFatalExit", "yes");
48994 }
48995 }
48996 if (this.ignoreErrorFieldSet)
48997 {
48998 if ((this.ignoreErrorField == YesNoType.no))
48999 {
49000 writer.WriteAttributeString("IgnoreError", "no");
49001 }
49002 if ((this.ignoreErrorField == YesNoType.yes))
49003 {
49004 writer.WriteAttributeString("IgnoreError", "yes");
49005 }
49006 }
49007 if (this.ignoreWarningFieldSet)
49008 {
49009 if ((this.ignoreWarningField == YesNoType.no))
49010 {
49011 writer.WriteAttributeString("IgnoreWarning", "no");
49012 }
49013 if ((this.ignoreWarningField == YesNoType.yes))
49014 {
49015 writer.WriteAttributeString("IgnoreWarning", "yes");
49016 }
49017 }
49018 if (this.ignoreUserFieldSet)
49019 {
49020 if ((this.ignoreUserField == YesNoType.no))
49021 {
49022 writer.WriteAttributeString("IgnoreUser", "no");
49023 }
49024 if ((this.ignoreUserField == YesNoType.yes))
49025 {
49026 writer.WriteAttributeString("IgnoreUser", "yes");
49027 }
49028 }
49029 if (this.ignoreInfoFieldSet)
49030 {
49031 if ((this.ignoreInfoField == YesNoType.no))
49032 {
49033 writer.WriteAttributeString("IgnoreInfo", "no");
49034 }
49035 if ((this.ignoreInfoField == YesNoType.yes))
49036 {
49037 writer.WriteAttributeString("IgnoreInfo", "yes");
49038 }
49039 }
49040 if (this.ignoreFilesInUseFieldSet)
49041 {
49042 if ((this.ignoreFilesInUseField == YesNoType.no))
49043 {
49044 writer.WriteAttributeString("IgnoreFilesInUse", "no");
49045 }
49046 if ((this.ignoreFilesInUseField == YesNoType.yes))
49047 {
49048 writer.WriteAttributeString("IgnoreFilesInUse", "yes");
49049 }
49050 }
49051 if (this.ignoreResolveSourceFieldSet)
49052 {
49053 if ((this.ignoreResolveSourceField == YesNoType.no))
49054 {
49055 writer.WriteAttributeString("IgnoreResolveSource", "no");
49056 }
49057 if ((this.ignoreResolveSourceField == YesNoType.yes))
49058 {
49059 writer.WriteAttributeString("IgnoreResolveSource", "yes");
49060 }
49061 }
49062 if (this.ignoreOutOfDiskSpaceFieldSet)
49063 {
49064 if ((this.ignoreOutOfDiskSpaceField == YesNoType.no))
49065 {
49066 writer.WriteAttributeString("IgnoreOutOfDiskSpace", "no");
49067 }
49068 if ((this.ignoreOutOfDiskSpaceField == YesNoType.yes))
49069 {
49070 writer.WriteAttributeString("IgnoreOutOfDiskSpace", "yes");
49071 }
49072 }
49073 if (this.ignoreActionStartFieldSet)
49074 {
49075 if ((this.ignoreActionStartField == YesNoType.no))
49076 {
49077 writer.WriteAttributeString("IgnoreActionStart", "no");
49078 }
49079 if ((this.ignoreActionStartField == YesNoType.yes))
49080 {
49081 writer.WriteAttributeString("IgnoreActionStart", "yes");
49082 }
49083 }
49084 if (this.ignoreActionDataFieldSet)
49085 {
49086 if ((this.ignoreActionDataField == YesNoType.no))
49087 {
49088 writer.WriteAttributeString("IgnoreActionData", "no");
49089 }
49090 if ((this.ignoreActionDataField == YesNoType.yes))
49091 {
49092 writer.WriteAttributeString("IgnoreActionData", "yes");
49093 }
49094 }
49095 if (this.ignoreProgressFieldSet)
49096 {
49097 if ((this.ignoreProgressField == YesNoType.no))
49098 {
49099 writer.WriteAttributeString("IgnoreProgress", "no");
49100 }
49101 if ((this.ignoreProgressField == YesNoType.yes))
49102 {
49103 writer.WriteAttributeString("IgnoreProgress", "yes");
49104 }
49105 }
49106 if (this.ignoreCommonDataFieldSet)
49107 {
49108 if ((this.ignoreCommonDataField == YesNoType.no))
49109 {
49110 writer.WriteAttributeString("IgnoreCommonData", "no");
49111 }
49112 if ((this.ignoreCommonDataField == YesNoType.yes))
49113 {
49114 writer.WriteAttributeString("IgnoreCommonData", "yes");
49115 }
49116 }
49117 if (this.ignoreInitializeFieldSet)
49118 {
49119 if ((this.ignoreInitializeField == YesNoType.no))
49120 {
49121 writer.WriteAttributeString("IgnoreInitialize", "no");
49122 }
49123 if ((this.ignoreInitializeField == YesNoType.yes))
49124 {
49125 writer.WriteAttributeString("IgnoreInitialize", "yes");
49126 }
49127 }
49128 if (this.ignoreTerminateFieldSet)
49129 {
49130 if ((this.ignoreTerminateField == YesNoType.no))
49131 {
49132 writer.WriteAttributeString("IgnoreTerminate", "no");
49133 }
49134 if ((this.ignoreTerminateField == YesNoType.yes))
49135 {
49136 writer.WriteAttributeString("IgnoreTerminate", "yes");
49137 }
49138 }
49139 if (this.ignoreShowDialogFieldSet)
49140 {
49141 if ((this.ignoreShowDialogField == YesNoType.no))
49142 {
49143 writer.WriteAttributeString("IgnoreShowDialog", "no");
49144 }
49145 if ((this.ignoreShowDialogField == YesNoType.yes))
49146 {
49147 writer.WriteAttributeString("IgnoreShowDialog", "yes");
49148 }
49149 }
49150 if (this.ignoreRMFilesInUseFieldSet)
49151 {
49152 if ((this.ignoreRMFilesInUseField == YesNoType.no))
49153 {
49154 writer.WriteAttributeString("IgnoreRMFilesInUse", "no");
49155 }
49156 if ((this.ignoreRMFilesInUseField == YesNoType.yes))
49157 {
49158 writer.WriteAttributeString("IgnoreRMFilesInUse", "yes");
49159 }
49160 }
49161 if (this.ignoreInstallStartFieldSet)
49162 {
49163 if ((this.ignoreInstallStartField == YesNoType.no))
49164 {
49165 writer.WriteAttributeString("IgnoreInstallStart", "no");
49166 }
49167 if ((this.ignoreInstallStartField == YesNoType.yes))
49168 {
49169 writer.WriteAttributeString("IgnoreInstallStart", "yes");
49170 }
49171 }
49172 if (this.ignoreInstallEndFieldSet)
49173 {
49174 if ((this.ignoreInstallEndField == YesNoType.no))
49175 {
49176 writer.WriteAttributeString("IgnoreInstallEnd", "no");
49177 }
49178 if ((this.ignoreInstallEndField == YesNoType.yes))
49179 {
49180 writer.WriteAttributeString("IgnoreInstallEnd", "yes");
49181 }
49182 }
49183 if (this.nameFieldSet)
49184 {
49185 writer.WriteAttributeString("Name", this.nameField);
49186 }
49187 if (this.sourceFileFieldSet)
49188 {
49189 writer.WriteAttributeString("SourceFile", this.sourceFileField);
49190 }
49191 if (this.supportBasicUIFieldSet)
49192 {
49193 if ((this.supportBasicUIField == YesNoType.no))
49194 {
49195 writer.WriteAttributeString("SupportBasicUI", "no");
49196 }
49197 if ((this.supportBasicUIField == YesNoType.yes))
49198 {
49199 writer.WriteAttributeString("SupportBasicUI", "yes");
49200 }
49201 }
49202 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
49203 {
49204 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
49205 childElement.OutputXml(writer);
49206 }
49207 writer.WriteEndElement();
49208 }
49209
49210 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
49211 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
49212 void ISetAttributes.SetAttribute(string name, string value)
49213 {
49214 if (String.IsNullOrEmpty(name))
49215 {
49216 throw new ArgumentNullException("name");
49217 }
49218 if (("Id" == name))
49219 {
49220 this.idField = value;
49221 this.idFieldSet = true;
49222 }
49223 if (("IgnoreFatalExit" == name))
49224 {
49225 this.ignoreFatalExitField = Enums.ParseYesNoType(value);
49226 this.ignoreFatalExitFieldSet = true;
49227 }
49228 if (("IgnoreError" == name))
49229 {
49230 this.ignoreErrorField = Enums.ParseYesNoType(value);
49231 this.ignoreErrorFieldSet = true;
49232 }
49233 if (("IgnoreWarning" == name))
49234 {
49235 this.ignoreWarningField = Enums.ParseYesNoType(value);
49236 this.ignoreWarningFieldSet = true;
49237 }
49238 if (("IgnoreUser" == name))
49239 {
49240 this.ignoreUserField = Enums.ParseYesNoType(value);
49241 this.ignoreUserFieldSet = true;
49242 }
49243 if (("IgnoreInfo" == name))
49244 {
49245 this.ignoreInfoField = Enums.ParseYesNoType(value);
49246 this.ignoreInfoFieldSet = true;
49247 }
49248 if (("IgnoreFilesInUse" == name))
49249 {
49250 this.ignoreFilesInUseField = Enums.ParseYesNoType(value);
49251 this.ignoreFilesInUseFieldSet = true;
49252 }
49253 if (("IgnoreResolveSource" == name))
49254 {
49255 this.ignoreResolveSourceField = Enums.ParseYesNoType(value);
49256 this.ignoreResolveSourceFieldSet = true;
49257 }
49258 if (("IgnoreOutOfDiskSpace" == name))
49259 {
49260 this.ignoreOutOfDiskSpaceField = Enums.ParseYesNoType(value);
49261 this.ignoreOutOfDiskSpaceFieldSet = true;
49262 }
49263 if (("IgnoreActionStart" == name))
49264 {
49265 this.ignoreActionStartField = Enums.ParseYesNoType(value);
49266 this.ignoreActionStartFieldSet = true;
49267 }
49268 if (("IgnoreActionData" == name))
49269 {
49270 this.ignoreActionDataField = Enums.ParseYesNoType(value);
49271 this.ignoreActionDataFieldSet = true;
49272 }
49273 if (("IgnoreProgress" == name))
49274 {
49275 this.ignoreProgressField = Enums.ParseYesNoType(value);
49276 this.ignoreProgressFieldSet = true;
49277 }
49278 if (("IgnoreCommonData" == name))
49279 {
49280 this.ignoreCommonDataField = Enums.ParseYesNoType(value);
49281 this.ignoreCommonDataFieldSet = true;
49282 }
49283 if (("IgnoreInitialize" == name))
49284 {
49285 this.ignoreInitializeField = Enums.ParseYesNoType(value);
49286 this.ignoreInitializeFieldSet = true;
49287 }
49288 if (("IgnoreTerminate" == name))
49289 {
49290 this.ignoreTerminateField = Enums.ParseYesNoType(value);
49291 this.ignoreTerminateFieldSet = true;
49292 }
49293 if (("IgnoreShowDialog" == name))
49294 {
49295 this.ignoreShowDialogField = Enums.ParseYesNoType(value);
49296 this.ignoreShowDialogFieldSet = true;
49297 }
49298 if (("IgnoreRMFilesInUse" == name))
49299 {
49300 this.ignoreRMFilesInUseField = Enums.ParseYesNoType(value);
49301 this.ignoreRMFilesInUseFieldSet = true;
49302 }
49303 if (("IgnoreInstallStart" == name))
49304 {
49305 this.ignoreInstallStartField = Enums.ParseYesNoType(value);
49306 this.ignoreInstallStartFieldSet = true;
49307 }
49308 if (("IgnoreInstallEnd" == name))
49309 {
49310 this.ignoreInstallEndField = Enums.ParseYesNoType(value);
49311 this.ignoreInstallEndFieldSet = true;
49312 }
49313 if (("Name" == name))
49314 {
49315 this.nameField = value;
49316 this.nameFieldSet = true;
49317 }
49318 if (("SourceFile" == name))
49319 {
49320 this.sourceFileField = value;
49321 this.sourceFileFieldSet = true;
49322 }
49323 if (("SupportBasicUI" == name))
49324 {
49325 this.supportBasicUIField = Enums.ParseYesNoType(value);
49326 this.supportBasicUIFieldSet = true;
49327 }
49328 }
49329 }
49330
49331 /// <summary>
49332 /// Defines a resource for use by the embedded UI.
49333 /// </summary>
49334 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
49335 public class EmbeddedUIResource : ISchemaElement, ISetAttributes
49336 {
49337
49338 private string idField;
49339
49340 private bool idFieldSet;
49341
49342 private string nameField;
49343
49344 private bool nameFieldSet;
49345
49346 private string sourceFileField;
49347
49348 private bool sourceFileFieldSet;
49349
49350 private ISchemaElement parentElement;
49351
49352 /// <summary>
49353 /// Identifier for the embedded UI resource.
49354 /// </summary>
49355 public string Id
49356 {
49357 get
49358 {
49359 return this.idField;
49360 }
49361 set
49362 {
49363 this.idFieldSet = true;
49364 this.idField = value;
49365 }
49366 }
49367
49368 /// <summary>
49369 /// The name for the resource when it is extracted from the package for use by the embedded UI DLL. (Windows
49370 /// Installer does not support the typical short filename and long filename combination for embedded UI files
49371 /// as it does for other kinds of files.) If this attribute is not specified the Id attribute will be used.
49372 /// </summary>
49373 public string Name
49374 {
49375 get
49376 {
49377 return this.nameField;
49378 }
49379 set
49380 {
49381 this.nameFieldSet = true;
49382 this.nameField = value;
49383 }
49384 }
49385
49386 /// <summary>
49387 /// Path to the binary file that is the embedded UI resource.
49388 /// </summary>
49389 public string SourceFile
49390 {
49391 get
49392 {
49393 return this.sourceFileField;
49394 }
49395 set
49396 {
49397 this.sourceFileFieldSet = true;
49398 this.sourceFileField = value;
49399 }
49400 }
49401
49402 public virtual ISchemaElement ParentElement
49403 {
49404 get
49405 {
49406 return this.parentElement;
49407 }
49408 set
49409 {
49410 this.parentElement = value;
49411 }
49412 }
49413
49414 /// <summary>
49415 /// Processes this element and all child elements into an XmlWriter.
49416 /// </summary>
49417 public virtual void OutputXml(XmlWriter writer)
49418 {
49419 if ((null == writer))
49420 {
49421 throw new ArgumentNullException("writer");
49422 }
49423 writer.WriteStartElement("EmbeddedUIResource", "http://wixtoolset.org/schemas/v4/wxs");
49424 if (this.idFieldSet)
49425 {
49426 writer.WriteAttributeString("Id", this.idField);
49427 }
49428 if (this.nameFieldSet)
49429 {
49430 writer.WriteAttributeString("Name", this.nameField);
49431 }
49432 if (this.sourceFileFieldSet)
49433 {
49434 writer.WriteAttributeString("SourceFile", this.sourceFileField);
49435 }
49436 writer.WriteEndElement();
49437 }
49438
49439 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
49440 void ISetAttributes.SetAttribute(string name, string value)
49441 {
49442 if (String.IsNullOrEmpty(name))
49443 {
49444 throw new ArgumentNullException("name");
49445 }
49446 if (("Id" == name))
49447 {
49448 this.idField = value;
49449 this.idFieldSet = true;
49450 }
49451 if (("Name" == name))
49452 {
49453 this.nameField = value;
49454 this.nameFieldSet = true;
49455 }
49456 if (("SourceFile" == name))
49457 {
49458 this.sourceFileField = value;
49459 this.sourceFileFieldSet = true;
49460 }
49461 }
49462 }
49463
49464 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
49465 public class Error : ISchemaElement, ISetAttributes
49466 {
49467
49468 private int idField;
49469
49470 private bool idFieldSet;
49471
49472 private string contentField;
49473
49474 private bool contentFieldSet;
49475
49476 private ISchemaElement parentElement;
49477
49478 /// <summary>
49479 /// Number of the error for which a message is being provided. See MSI SDK for error definitions.
49480 /// </summary>
49481 public int Id
49482 {
49483 get
49484 {
49485 return this.idField;
49486 }
49487 set
49488 {
49489 this.idFieldSet = true;
49490 this.idField = value;
49491 }
49492 }
49493
49494 /// <summary>
49495 /// Element value is Message, use CDATA if message contains delimiter characters
49496 /// </summary>
49497 public string Content
49498 {
49499 get
49500 {
49501 return this.contentField;
49502 }
49503 set
49504 {
49505 this.contentFieldSet = true;
49506 this.contentField = value;
49507 }
49508 }
49509
49510 public virtual ISchemaElement ParentElement
49511 {
49512 get
49513 {
49514 return this.parentElement;
49515 }
49516 set
49517 {
49518 this.parentElement = value;
49519 }
49520 }
49521
49522 /// <summary>
49523 /// Processes this element and all child elements into an XmlWriter.
49524 /// </summary>
49525 public virtual void OutputXml(XmlWriter writer)
49526 {
49527 if ((null == writer))
49528 {
49529 throw new ArgumentNullException("writer");
49530 }
49531 writer.WriteStartElement("Error", "http://wixtoolset.org/schemas/v4/wxs");
49532 if (this.idFieldSet)
49533 {
49534 writer.WriteAttributeString("Id", this.idField.ToString(CultureInfo.InvariantCulture));
49535 }
49536 if (this.contentFieldSet)
49537 {
49538 writer.WriteString(this.contentField);
49539 }
49540 writer.WriteEndElement();
49541 }
49542
49543 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
49544 void ISetAttributes.SetAttribute(string name, string value)
49545 {
49546 if (String.IsNullOrEmpty(name))
49547 {
49548 throw new ArgumentNullException("name");
49549 }
49550 if (("Id" == name))
49551 {
49552 this.idField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
49553 this.idFieldSet = true;
49554 }
49555 if (("Content" == name))
49556 {
49557 this.contentField = value;
49558 this.contentFieldSet = true;
49559 }
49560 }
49561 }
49562
49563 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
49564 public class Publish : ISchemaElement, ISetAttributes
49565 {
49566
49567 private string controlField;
49568
49569 private bool controlFieldSet;
49570
49571 private string dialogField;
49572
49573 private bool dialogFieldSet;
49574
49575 private string eventField;
49576
49577 private bool eventFieldSet;
49578
49579 private string orderField;
49580
49581 private bool orderFieldSet;
49582
49583 private string propertyField;
49584
49585 private bool propertyFieldSet;
49586
49587 private string valueField;
49588
49589 private bool valueFieldSet;
49590
49591 private string contentField;
49592
49593 private bool contentFieldSet;
49594
49595 private ISchemaElement parentElement;
49596
49597 /// <summary>
49598 /// The parent Control for this Publish element, should only be specified when this element is a child of the UI element.
49599 /// </summary>
49600 public string Control
49601 {
49602 get
49603 {
49604 return this.controlField;
49605 }
49606 set
49607 {
49608 this.controlFieldSet = true;
49609 this.controlField = value;
49610 }
49611 }
49612
49613 /// <summary>
49614 /// The parent Dialog for this Publish element, should only be specified when this element is a child of the UI element.
49615 /// This attribute will create a reference to the specified Dialog, so an additional DialogRef is not necessary.
49616 /// </summary>
49617 public string Dialog
49618 {
49619 get
49620 {
49621 return this.dialogField;
49622 }
49623 set
49624 {
49625 this.dialogFieldSet = true;
49626 this.dialogField = value;
49627 }
49628 }
49629
49630 /// <summary>
49631 /// Set this attribute's value to one of the standard control events to trigger that event.
49632 /// Either this attribute or the Property attribute must be set, but not both at the same time.
49633 /// </summary>
49634 public string Event
49635 {
49636 get
49637 {
49638 return this.eventField;
49639 }
49640 set
49641 {
49642 this.eventFieldSet = true;
49643 this.eventField = value;
49644 }
49645 }
49646
49647 /// <summary>
49648 /// This attribute should only need to be set if this element is nested under a UI element in order to
49649 /// control the order in which this publish event will be started.
49650 /// If this element is nested under a Control element, the default value will be one greater than any
49651 /// previous Publish element's order (the first element's default value is 1).
49652 /// If this element is nested under a UI element, the default value is always 1 (it does not get a
49653 /// default value based on any previous Publish elements).
49654 /// </summary>
49655 public string Order
49656 {
49657 get
49658 {
49659 return this.orderField;
49660 }
49661 set
49662 {
49663 this.orderFieldSet = true;
49664 this.orderField = value;
49665 }
49666 }
49667
49668 /// <summary>
49669 /// Set this attribute's value to a property name to set that property.
49670 /// Either this attribute or the Event attribute must be set, but not both at the same time.
49671 /// </summary>
49672 public string Property
49673 {
49674 get
49675 {
49676 return this.propertyField;
49677 }
49678 set
49679 {
49680 this.propertyFieldSet = true;
49681 this.propertyField = value;
49682 }
49683 }
49684
49685 /// <summary>
49686 /// If the Property attribute is specified, set the value of this attribute to the new value for the property.
49687 /// To set a property to null, do not set this attribute (the ControlEvent Argument column will be set to '{}').
49688 /// Otherwise, this attribute's value should be the argument for the event specified in the Event attribute.
49689 /// If the event doesn't take an attribute, a common value to use is "0".
49690 /// </summary>
49691 public string Value
49692 {
49693 get
49694 {
49695 return this.valueField;
49696 }
49697 set
49698 {
49699 this.valueFieldSet = true;
49700 this.valueField = value;
49701 }
49702 }
49703
49704 /// <summary>
49705 /// The element value is the optional Condition expression.
49706 /// </summary>
49707 public string Content
49708 {
49709 get
49710 {
49711 return this.contentField;
49712 }
49713 set
49714 {
49715 this.contentFieldSet = true;
49716 this.contentField = value;
49717 }
49718 }
49719
49720 public virtual ISchemaElement ParentElement
49721 {
49722 get
49723 {
49724 return this.parentElement;
49725 }
49726 set
49727 {
49728 this.parentElement = value;
49729 }
49730 }
49731
49732 /// <summary>
49733 /// Processes this element and all child elements into an XmlWriter.
49734 /// </summary>
49735 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
49736 public virtual void OutputXml(XmlWriter writer)
49737 {
49738 if ((null == writer))
49739 {
49740 throw new ArgumentNullException("writer");
49741 }
49742 writer.WriteStartElement("Publish", "http://wixtoolset.org/schemas/v4/wxs");
49743 if (this.controlFieldSet)
49744 {
49745 writer.WriteAttributeString("Control", this.controlField);
49746 }
49747 if (this.dialogFieldSet)
49748 {
49749 writer.WriteAttributeString("Dialog", this.dialogField);
49750 }
49751 if (this.eventFieldSet)
49752 {
49753 writer.WriteAttributeString("Event", this.eventField);
49754 }
49755 if (this.orderFieldSet)
49756 {
49757 writer.WriteAttributeString("Order", this.orderField);
49758 }
49759 if (this.propertyFieldSet)
49760 {
49761 writer.WriteAttributeString("Property", this.propertyField);
49762 }
49763 if (this.valueFieldSet)
49764 {
49765 writer.WriteAttributeString("Value", this.valueField);
49766 }
49767 if (this.contentFieldSet)
49768 {
49769 writer.WriteString(this.contentField);
49770 }
49771 writer.WriteEndElement();
49772 }
49773
49774 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
49775 void ISetAttributes.SetAttribute(string name, string value)
49776 {
49777 if (String.IsNullOrEmpty(name))
49778 {
49779 throw new ArgumentNullException("name");
49780 }
49781 if (("Control" == name))
49782 {
49783 this.controlField = value;
49784 this.controlFieldSet = true;
49785 }
49786 if (("Dialog" == name))
49787 {
49788 this.dialogField = value;
49789 this.dialogFieldSet = true;
49790 }
49791 if (("Event" == name))
49792 {
49793 this.eventField = value;
49794 this.eventFieldSet = true;
49795 }
49796 if (("Order" == name))
49797 {
49798 this.orderField = value;
49799 this.orderFieldSet = true;
49800 }
49801 if (("Property" == name))
49802 {
49803 this.propertyField = value;
49804 this.propertyFieldSet = true;
49805 }
49806 if (("Value" == name))
49807 {
49808 this.valueField = value;
49809 this.valueFieldSet = true;
49810 }
49811 if (("Content" == name))
49812 {
49813 this.contentField = value;
49814 this.contentFieldSet = true;
49815 }
49816 }
49817 }
49818
49819 /// <summary>
49820 /// Sets attributes for events in the EventMapping table
49821 /// </summary>
49822 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
49823 public class Subscribe : ISchemaElement, ISetAttributes
49824 {
49825
49826 private string eventField;
49827
49828 private bool eventFieldSet;
49829
49830 private string attributeField;
49831
49832 private bool attributeFieldSet;
49833
49834 private ISchemaElement parentElement;
49835
49836 /// <summary>
49837 /// must be one of the standard control events'
49838 /// </summary>
49839 public string Event
49840 {
49841 get
49842 {
49843 return this.eventField;
49844 }
49845 set
49846 {
49847 this.eventFieldSet = true;
49848 this.eventField = value;
49849 }
49850 }
49851
49852 /// <summary>
49853 /// if not present can only handle enable, disable, hide, unhide events
49854 /// </summary>
49855 public string Attribute
49856 {
49857 get
49858 {
49859 return this.attributeField;
49860 }
49861 set
49862 {
49863 this.attributeFieldSet = true;
49864 this.attributeField = value;
49865 }
49866 }
49867
49868 public virtual ISchemaElement ParentElement
49869 {
49870 get
49871 {
49872 return this.parentElement;
49873 }
49874 set
49875 {
49876 this.parentElement = value;
49877 }
49878 }
49879
49880 /// <summary>
49881 /// Processes this element and all child elements into an XmlWriter.
49882 /// </summary>
49883 public virtual void OutputXml(XmlWriter writer)
49884 {
49885 if ((null == writer))
49886 {
49887 throw new ArgumentNullException("writer");
49888 }
49889 writer.WriteStartElement("Subscribe", "http://wixtoolset.org/schemas/v4/wxs");
49890 if (this.eventFieldSet)
49891 {
49892 writer.WriteAttributeString("Event", this.eventField);
49893 }
49894 if (this.attributeFieldSet)
49895 {
49896 writer.WriteAttributeString("Attribute", this.attributeField);
49897 }
49898 writer.WriteEndElement();
49899 }
49900
49901 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
49902 void ISetAttributes.SetAttribute(string name, string value)
49903 {
49904 if (String.IsNullOrEmpty(name))
49905 {
49906 throw new ArgumentNullException("name");
49907 }
49908 if (("Event" == name))
49909 {
49910 this.eventField = value;
49911 this.eventFieldSet = true;
49912 }
49913 if (("Attribute" == name))
49914 {
49915 this.attributeField = value;
49916 this.attributeFieldSet = true;
49917 }
49918 }
49919 }
49920
49921 /// <summary>
49922 /// An alternative to using the Text attribute when the value contains special XML characters like &lt;, &gt;, or &amp;.
49923 /// </summary>
49924 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
49925 public class Text : ISchemaElement, ISetAttributes
49926 {
49927
49928 private string sourceFileField;
49929
49930 private bool sourceFileFieldSet;
49931
49932 private string srcField;
49933
49934 private bool srcFieldSet;
49935
49936 private string contentField;
49937
49938 private bool contentFieldSet;
49939
49940 private ISchemaElement parentElement;
49941
49942 /// <summary>
49943 /// Instructs the text to be imported from a file instead of the element value during the binding process.
49944 /// </summary>
49945 public string SourceFile
49946 {
49947 get
49948 {
49949 return this.sourceFileField;
49950 }
49951 set
49952 {
49953 this.sourceFileFieldSet = true;
49954 this.sourceFileField = value;
49955 }
49956 }
49957
49958 [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")]
49959 public string src
49960 {
49961 get
49962 {
49963 return this.srcField;
49964 }
49965 set
49966 {
49967 this.srcFieldSet = true;
49968 this.srcField = value;
49969 }
49970 }
49971
49972 public string Content
49973 {
49974 get
49975 {
49976 return this.contentField;
49977 }
49978 set
49979 {
49980 this.contentFieldSet = true;
49981 this.contentField = value;
49982 }
49983 }
49984
49985 public virtual ISchemaElement ParentElement
49986 {
49987 get
49988 {
49989 return this.parentElement;
49990 }
49991 set
49992 {
49993 this.parentElement = value;
49994 }
49995 }
49996
49997 /// <summary>
49998 /// Processes this element and all child elements into an XmlWriter.
49999 /// </summary>
50000 public virtual void OutputXml(XmlWriter writer)
50001 {
50002 if ((null == writer))
50003 {
50004 throw new ArgumentNullException("writer");
50005 }
50006 writer.WriteStartElement("Text", "http://wixtoolset.org/schemas/v4/wxs");
50007 if (this.sourceFileFieldSet)
50008 {
50009 writer.WriteAttributeString("SourceFile", this.sourceFileField);
50010 }
50011 if (this.srcFieldSet)
50012 {
50013 writer.WriteAttributeString("src", this.srcField);
50014 }
50015 if (this.contentFieldSet)
50016 {
50017 writer.WriteString(this.contentField);
50018 }
50019 writer.WriteEndElement();
50020 }
50021
50022 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
50023 void ISetAttributes.SetAttribute(string name, string value)
50024 {
50025 if (String.IsNullOrEmpty(name))
50026 {
50027 throw new ArgumentNullException("name");
50028 }
50029 if (("SourceFile" == name))
50030 {
50031 this.sourceFileField = value;
50032 this.sourceFileFieldSet = true;
50033 }
50034 if (("src" == name))
50035 {
50036 this.srcField = value;
50037 this.srcFieldSet = true;
50038 }
50039 if (("Content" == name))
50040 {
50041 this.contentField = value;
50042 this.contentFieldSet = true;
50043 }
50044 }
50045 }
50046
50047 /// <summary>
50048 /// Contains the controls that appear on each dialog.
50049 /// </summary>
50050 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
50051 public class Control : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
50052 {
50053
50054 private ElementCollection children;
50055
50056 private string idField;
50057
50058 private bool idFieldSet;
50059
50060 private string typeField;
50061
50062 private bool typeFieldSet;
50063
50064 private string xField;
50065
50066 private bool xFieldSet;
50067
50068 private string yField;
50069
50070 private bool yFieldSet;
50071
50072 private string widthField;
50073
50074 private bool widthFieldSet;
50075
50076 private string heightField;
50077
50078 private bool heightFieldSet;
50079
50080 private string propertyField;
50081
50082 private bool propertyFieldSet;
50083
50084 private string textField;
50085
50086 private bool textFieldSet;
50087
50088 private string helpField;
50089
50090 private bool helpFieldSet;
50091
50092 private string toolTipField;
50093
50094 private bool toolTipFieldSet;
50095
50096 private string checkBoxValueField;
50097
50098 private bool checkBoxValueFieldSet;
50099
50100 private string checkBoxPropertyRefField;
50101
50102 private bool checkBoxPropertyRefFieldSet;
50103
50104 private YesNoType tabSkipField;
50105
50106 private bool tabSkipFieldSet;
50107
50108 private YesNoType defaultField;
50109
50110 private bool defaultFieldSet;
50111
50112 private YesNoType cancelField;
50113
50114 private bool cancelFieldSet;
50115
50116 private YesNoType hiddenField;
50117
50118 private bool hiddenFieldSet;
50119
50120 private YesNoType disabledField;
50121
50122 private bool disabledFieldSet;
50123
50124 private YesNoType sunkenField;
50125
50126 private bool sunkenFieldSet;
50127
50128 private YesNoType indirectField;
50129
50130 private bool indirectFieldSet;
50131
50132 private YesNoType integerField;
50133
50134 private bool integerFieldSet;
50135
50136 private YesNoType rightToLeftField;
50137
50138 private bool rightToLeftFieldSet;
50139
50140 private YesNoType rightAlignedField;
50141
50142 private bool rightAlignedFieldSet;
50143
50144 private YesNoType leftScrollField;
50145
50146 private bool leftScrollFieldSet;
50147
50148 private YesNoType transparentField;
50149
50150 private bool transparentFieldSet;
50151
50152 private YesNoType noPrefixField;
50153
50154 private bool noPrefixFieldSet;
50155
50156 private YesNoType noWrapField;
50157
50158 private bool noWrapFieldSet;
50159
50160 private YesNoType formatSizeField;
50161
50162 private bool formatSizeFieldSet;
50163
50164 private YesNoType userLanguageField;
50165
50166 private bool userLanguageFieldSet;
50167
50168 private YesNoType multilineField;
50169
50170 private bool multilineFieldSet;
50171
50172 private YesNoType passwordField;
50173
50174 private bool passwordFieldSet;
50175
50176 private YesNoType progressBlocksField;
50177
50178 private bool progressBlocksFieldSet;
50179
50180 private YesNoType removableField;
50181
50182 private bool removableFieldSet;
50183
50184 private YesNoType fixedField;
50185
50186 private bool fixedFieldSet;
50187
50188 private YesNoType remoteField;
50189
50190 private bool remoteFieldSet;
50191
50192 private YesNoType cDROMField;
50193
50194 private bool cDROMFieldSet;
50195
50196 private YesNoType rAMDiskField;
50197
50198 private bool rAMDiskFieldSet;
50199
50200 private YesNoType floppyField;
50201
50202 private bool floppyFieldSet;
50203
50204 private YesNoType showRollbackCostField;
50205
50206 private bool showRollbackCostFieldSet;
50207
50208 private YesNoType sortedField;
50209
50210 private bool sortedFieldSet;
50211
50212 private YesNoType comboListField;
50213
50214 private bool comboListFieldSet;
50215
50216 private YesNoType imageField;
50217
50218 private bool imageFieldSet;
50219
50220 private IconSizeType iconSizeField;
50221
50222 private bool iconSizeFieldSet;
50223
50224 private YesNoType fixedSizeField;
50225
50226 private bool fixedSizeFieldSet;
50227
50228 private YesNoType iconField;
50229
50230 private bool iconFieldSet;
50231
50232 private YesNoType bitmapField;
50233
50234 private bool bitmapFieldSet;
50235
50236 private YesNoType pushLikeField;
50237
50238 private bool pushLikeFieldSet;
50239
50240 private YesNoType hasBorderField;
50241
50242 private bool hasBorderFieldSet;
50243
50244 private YesNoType elevationShieldField;
50245
50246 private bool elevationShieldFieldSet;
50247
50248 private ISchemaElement parentElement;
50249
50250 public Control()
50251 {
50252 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
50253 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Text)));
50254 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ComboBox)));
50255 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListBox)));
50256 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListView)));
50257 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RadioButtonGroup)));
50258 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property)));
50259 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Binary)));
50260 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice);
50261 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Condition)));
50262 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Publish)));
50263 childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Subscribe)));
50264 childCollection0.AddCollection(childCollection1);
50265 this.children = childCollection0;
50266 }
50267
50268 public virtual IEnumerable Children
50269 {
50270 get
50271 {
50272 return this.children;
50273 }
50274 }
50275
50276 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
50277 public virtual IEnumerable this[System.Type childType]
50278 {
50279 get
50280 {
50281 return this.children.Filter(childType);
50282 }
50283 }
50284
50285 /// <summary>
50286 /// Combined with the Dialog Id to make up the primary key of the Control table.
50287 /// </summary>
50288 public string Id
50289 {
50290 get
50291 {
50292 return this.idField;
50293 }
50294 set
50295 {
50296 this.idFieldSet = true;
50297 this.idField = value;
50298 }
50299 }
50300
50301 /// <summary>
50302 /// 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
50303 /// </summary>
50304 public string Type
50305 {
50306 get
50307 {
50308 return this.typeField;
50309 }
50310 set
50311 {
50312 this.typeFieldSet = true;
50313 this.typeField = value;
50314 }
50315 }
50316
50317 /// <summary>
50318 /// Horizontal coordinate of the upper-left corner of the rectangular boundary of the control. This must be a non-negative number.
50319 /// </summary>
50320 public string X
50321 {
50322 get
50323 {
50324 return this.xField;
50325 }
50326 set
50327 {
50328 this.xFieldSet = true;
50329 this.xField = value;
50330 }
50331 }
50332
50333 /// <summary>
50334 /// Vertical coordinate of the upper-left corner of the rectangular boundary of the control. This must be a non-negative number.
50335 /// </summary>
50336 public string Y
50337 {
50338 get
50339 {
50340 return this.yField;
50341 }
50342 set
50343 {
50344 this.yFieldSet = true;
50345 this.yField = value;
50346 }
50347 }
50348
50349 /// <summary>
50350 /// Width of the rectangular boundary of the control. This must be a non-negative number.
50351 /// </summary>
50352 public string Width
50353 {
50354 get
50355 {
50356 return this.widthField;
50357 }
50358 set
50359 {
50360 this.widthFieldSet = true;
50361 this.widthField = value;
50362 }
50363 }
50364
50365 /// <summary>
50366 /// Height of the rectangular boundary of the control. This must be a non-negative number.
50367 /// </summary>
50368 public string Height
50369 {
50370 get
50371 {
50372 return this.heightField;
50373 }
50374 set
50375 {
50376 this.heightFieldSet = true;
50377 this.heightField = value;
50378 }
50379 }
50380
50381 /// <summary>
50382 /// The name of a defined property to be linked to this control. This column is required for active controls.
50383 /// </summary>
50384 public string Property
50385 {
50386 get
50387 {
50388 return this.propertyField;
50389 }
50390 set
50391 {
50392 this.propertyFieldSet = true;
50393 this.propertyField = value;
50394 }
50395 }
50396
50397 /// <summary>
50398 /// 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
50399 /// </summary>
50400 public string Text
50401 {
50402 get
50403 {
50404 return this.textField;
50405 }
50406 set
50407 {
50408 this.textFieldSet = true;
50409 this.textField = value;
50410 }
50411 }
50412
50413 /// <summary>
50414 /// This attribute is reserved for future use. There is no need to use this until Windows Installer uses it for something.
50415 /// </summary>
50416 public string Help
50417 {
50418 get
50419 {
50420 return this.helpField;
50421 }
50422 set
50423 {
50424 this.helpFieldSet = true;
50425 this.helpField = value;
50426 }
50427 }
50428
50429 /// <summary>
50430 /// The string used for the Tooltip.
50431 /// </summary>
50432 public string ToolTip
50433 {
50434 get
50435 {
50436 return this.toolTipField;
50437 }
50438 set
50439 {
50440 this.toolTipFieldSet = true;
50441 this.toolTipField = value;
50442 }
50443 }
50444
50445 /// <summary>
50446 /// 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.
50447 /// </summary>
50448 public string CheckBoxValue
50449 {
50450 get
50451 {
50452 return this.checkBoxValueField;
50453 }
50454 set
50455 {
50456 this.checkBoxValueFieldSet = true;
50457 this.checkBoxValueField = value;
50458 }
50459 }
50460
50461 /// <summary>
50462 /// 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.
50463 /// </summary>
50464 public string CheckBoxPropertyRef
50465 {
50466 get
50467 {
50468 return this.checkBoxPropertyRefField;
50469 }
50470 set
50471 {
50472 this.checkBoxPropertyRefFieldSet = true;
50473 this.checkBoxPropertyRefField = value;
50474 }
50475 }
50476
50477 /// <summary>
50478 /// Set this attribute to "yes" to cause this Control to be skipped in the tab sequence.
50479 /// </summary>
50480 public YesNoType TabSkip
50481 {
50482 get
50483 {
50484 return this.tabSkipField;
50485 }
50486 set
50487 {
50488 this.tabSkipFieldSet = true;
50489 this.tabSkipField = value;
50490 }
50491 }
50492
50493 /// <summary>
50494 /// Set this attribute to "yes" to cause this Control to be invoked by the return key.
50495 /// </summary>
50496 public YesNoType Default
50497 {
50498 get
50499 {
50500 return this.defaultField;
50501 }
50502 set
50503 {
50504 this.defaultFieldSet = true;
50505 this.defaultField = value;
50506 }
50507 }
50508
50509 /// <summary>
50510 /// Set this attribute to "yes" to cause this Control to be invoked by the escape key.
50511 /// </summary>
50512 public YesNoType Cancel
50513 {
50514 get
50515 {
50516 return this.cancelField;
50517 }
50518 set
50519 {
50520 this.cancelFieldSet = true;
50521 this.cancelField = value;
50522 }
50523 }
50524
50525 /// <summary>
50526 /// Set this attribute to "yes" to cause the Control to be hidden.
50527 /// </summary>
50528 public YesNoType Hidden
50529 {
50530 get
50531 {
50532 return this.hiddenField;
50533 }
50534 set
50535 {
50536 this.hiddenFieldSet = true;
50537 this.hiddenField = value;
50538 }
50539 }
50540
50541 /// <summary>
50542 /// Set this attribute to "yes" to cause the Control to be disabled.
50543 /// </summary>
50544 public YesNoType Disabled
50545 {
50546 get
50547 {
50548 return this.disabledField;
50549 }
50550 set
50551 {
50552 this.disabledFieldSet = true;
50553 this.disabledField = value;
50554 }
50555 }
50556
50557 /// <summary>
50558 /// Set this attribute to "yes" to cause the Control to be sunken.
50559 /// </summary>
50560 public YesNoType Sunken
50561 {
50562 get
50563 {
50564 return this.sunkenField;
50565 }
50566 set
50567 {
50568 this.sunkenFieldSet = true;
50569 this.sunkenField = value;
50570 }
50571 }
50572
50573 /// <summary>
50574 /// 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.
50575 /// </summary>
50576 public YesNoType Indirect
50577 {
50578 get
50579 {
50580 return this.indirectField;
50581 }
50582 set
50583 {
50584 this.indirectFieldSet = true;
50585 this.indirectField = value;
50586 }
50587 }
50588
50589 /// <summary>
50590 /// 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.
50591 /// </summary>
50592 public YesNoType Integer
50593 {
50594 get
50595 {
50596 return this.integerField;
50597 }
50598 set
50599 {
50600 this.integerFieldSet = true;
50601 this.integerField = value;
50602 }
50603 }
50604
50605 /// <summary>
50606 /// Set this attribute to "yes" to cause the Control to display from right to left.
50607 /// </summary>
50608 public YesNoType RightToLeft
50609 {
50610 get
50611 {
50612 return this.rightToLeftField;
50613 }
50614 set
50615 {
50616 this.rightToLeftFieldSet = true;
50617 this.rightToLeftField = value;
50618 }
50619 }
50620
50621 /// <summary>
50622 /// Set this attribute to "yes" to cause the Control to be right aligned.
50623 /// </summary>
50624 public YesNoType RightAligned
50625 {
50626 get
50627 {
50628 return this.rightAlignedField;
50629 }
50630 set
50631 {
50632 this.rightAlignedFieldSet = true;
50633 this.rightAlignedField = value;
50634 }
50635 }
50636
50637 /// <summary>
50638 /// Set this attribute to "yes" to cause the scroll bar to display on the left side of the Control.
50639 /// </summary>
50640 public YesNoType LeftScroll
50641 {
50642 get
50643 {
50644 return this.leftScrollField;
50645 }
50646 set
50647 {
50648 this.leftScrollFieldSet = true;
50649 this.leftScrollField = value;
50650 }
50651 }
50652
50653 /// <summary>
50654 /// This attribute is only valid for Text Controls.
50655 /// </summary>
50656 public YesNoType Transparent
50657 {
50658 get
50659 {
50660 return this.transparentField;
50661 }
50662 set
50663 {
50664 this.transparentFieldSet = true;
50665 this.transparentField = value;
50666 }
50667 }
50668
50669 /// <summary>
50670 /// This attribute is only valid for Text Controls.
50671 /// </summary>
50672 public YesNoType NoPrefix
50673 {
50674 get
50675 {
50676 return this.noPrefixField;
50677 }
50678 set
50679 {
50680 this.noPrefixFieldSet = true;
50681 this.noPrefixField = value;
50682 }
50683 }
50684
50685 /// <summary>
50686 /// This attribute is only valid for Text Controls.
50687 /// </summary>
50688 public YesNoType NoWrap
50689 {
50690 get
50691 {
50692 return this.noWrapField;
50693 }
50694 set
50695 {
50696 this.noWrapFieldSet = true;
50697 this.noWrapField = value;
50698 }
50699 }
50700
50701 /// <summary>
50702 /// This attribute is only valid for Text Controls.
50703 /// </summary>
50704 public YesNoType FormatSize
50705 {
50706 get
50707 {
50708 return this.formatSizeField;
50709 }
50710 set
50711 {
50712 this.formatSizeFieldSet = true;
50713 this.formatSizeField = value;
50714 }
50715 }
50716
50717 /// <summary>
50718 /// This attribute is only valid for Text Controls.
50719 /// </summary>
50720 public YesNoType UserLanguage
50721 {
50722 get
50723 {
50724 return this.userLanguageField;
50725 }
50726 set
50727 {
50728 this.userLanguageFieldSet = true;
50729 this.userLanguageField = value;
50730 }
50731 }
50732
50733 /// <summary>
50734 /// This attribute is only valid for Edit Controls.
50735 /// </summary>
50736 public YesNoType Multiline
50737 {
50738 get
50739 {
50740 return this.multilineField;
50741 }
50742 set
50743 {
50744 this.multilineFieldSet = true;
50745 this.multilineField = value;
50746 }
50747 }
50748
50749 /// <summary>
50750 /// This attribute is only valid for Edit Controls.
50751 /// </summary>
50752 public YesNoType Password
50753 {
50754 get
50755 {
50756 return this.passwordField;
50757 }
50758 set
50759 {
50760 this.passwordFieldSet = true;
50761 this.passwordField = value;
50762 }
50763 }
50764
50765 /// <summary>
50766 /// This attribute is only valid for ProgressBar Controls.
50767 /// </summary>
50768 public YesNoType ProgressBlocks
50769 {
50770 get
50771 {
50772 return this.progressBlocksField;
50773 }
50774 set
50775 {
50776 this.progressBlocksFieldSet = true;
50777 this.progressBlocksField = value;
50778 }
50779 }
50780
50781 /// <summary>
50782 /// This attribute is only valid for Volume and Directory Controls.
50783 /// </summary>
50784 public YesNoType Removable
50785 {
50786 get
50787 {
50788 return this.removableField;
50789 }
50790 set
50791 {
50792 this.removableFieldSet = true;
50793 this.removableField = value;
50794 }
50795 }
50796
50797 /// <summary>
50798 /// This attribute is only valid for Volume and Directory Controls.
50799 /// </summary>
50800 public YesNoType Fixed
50801 {
50802 get
50803 {
50804 return this.fixedField;
50805 }
50806 set
50807 {
50808 this.fixedFieldSet = true;
50809 this.fixedField = value;
50810 }
50811 }
50812
50813 /// <summary>
50814 /// This attribute is only valid for Volume and Directory Controls.
50815 /// </summary>
50816 public YesNoType Remote
50817 {
50818 get
50819 {
50820 return this.remoteField;
50821 }
50822 set
50823 {
50824 this.remoteFieldSet = true;
50825 this.remoteField = value;
50826 }
50827 }
50828
50829 /// <summary>
50830 /// This attribute is only valid for Volume and Directory Controls.
50831 /// </summary>
50832 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
50833 public YesNoType CDROM
50834 {
50835 get
50836 {
50837 return this.cDROMField;
50838 }
50839 set
50840 {
50841 this.cDROMFieldSet = true;
50842 this.cDROMField = value;
50843 }
50844 }
50845
50846 /// <summary>
50847 /// This attribute is only valid for Volume and Directory Controls.
50848 /// </summary>
50849 [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")]
50850 public YesNoType RAMDisk
50851 {
50852 get
50853 {
50854 return this.rAMDiskField;
50855 }
50856 set
50857 {
50858 this.rAMDiskFieldSet = true;
50859 this.rAMDiskField = value;
50860 }
50861 }
50862
50863 /// <summary>
50864 /// This attribute is only valid for Volume and Directory Controls.
50865 /// </summary>
50866 public YesNoType Floppy
50867 {
50868 get
50869 {
50870 return this.floppyField;
50871 }
50872 set
50873 {
50874 this.floppyFieldSet = true;
50875 this.floppyField = value;
50876 }
50877 }
50878
50879 /// <summary>
50880 /// This attribute is only valid for VolumeCostList Controls.
50881 /// </summary>
50882 public YesNoType ShowRollbackCost
50883 {
50884 get
50885 {
50886 return this.showRollbackCostField;
50887 }
50888 set
50889 {
50890 this.showRollbackCostFieldSet = true;
50891 this.showRollbackCostField = value;
50892 }
50893 }
50894
50895 /// <summary>
50896 /// This attribute is only valid for ListBox, ListView, and ComboBox Controls. Set
50897 /// the value of this attribute to "yes" to have entries appear in the order specified under the Control.
50898 /// If the attribute value is "no" or absent the entries in the control will appear in alphabetical order.
50899 /// </summary>
50900 public YesNoType Sorted
50901 {
50902 get
50903 {
50904 return this.sortedField;
50905 }
50906 set
50907 {
50908 this.sortedFieldSet = true;
50909 this.sortedField = value;
50910 }
50911 }
50912
50913 /// <summary>
50914 /// This attribute is only valid for ComboBox Controls.
50915 /// </summary>
50916 public YesNoType ComboList
50917 {
50918 get
50919 {
50920 return this.comboListField;
50921 }
50922 set
50923 {
50924 this.comboListFieldSet = true;
50925 this.comboListField = value;
50926 }
50927 }
50928
50929 /// <summary>
50930 /// This attribute is only valid for RadioButton, PushButton, and Icon Controls.
50931 /// </summary>
50932 public YesNoType Image
50933 {
50934 get
50935 {
50936 return this.imageField;
50937 }
50938 set
50939 {
50940 this.imageFieldSet = true;
50941 this.imageField = value;
50942 }
50943 }
50944
50945 /// <summary>
50946 /// This attribute is only valid for RadioButton, PushButton, and Icon Controls.
50947 /// </summary>
50948 public IconSizeType IconSize
50949 {
50950 get
50951 {
50952 return this.iconSizeField;
50953 }
50954 set
50955 {
50956 this.iconSizeFieldSet = true;
50957 this.iconSizeField = value;
50958 }
50959 }
50960
50961 /// <summary>
50962 /// This attribute is only valid for RadioButton, PushButton, and Icon Controls.
50963 /// </summary>
50964 public YesNoType FixedSize
50965 {
50966 get
50967 {
50968 return this.fixedSizeField;
50969 }
50970 set
50971 {
50972 this.fixedSizeFieldSet = true;
50973 this.fixedSizeField = value;
50974 }
50975 }
50976
50977 /// <summary>
50978 /// This attribute is only valid for RadioButton and PushButton Controls.
50979 /// </summary>
50980 public YesNoType Icon
50981 {
50982 get
50983 {
50984 return this.iconField;
50985 }
50986 set
50987 {
50988 this.iconFieldSet = true;
50989 this.iconField = value;
50990 }
50991 }
50992
50993 /// <summary>
50994 /// This attribute is only valid for RadioButton and PushButton Controls.
50995 /// </summary>
50996 public YesNoType Bitmap
50997 {
50998 get
50999 {
51000 return this.bitmapField;
51001 }
51002 set
51003 {
51004 this.bitmapFieldSet = true;
51005 this.bitmapField = value;
51006 }
51007 }
51008
51009 /// <summary>
51010 /// This attribute is only valid for RadioButton and Checkbox Controls.
51011 /// </summary>
51012 public YesNoType PushLike
51013 {
51014 get
51015 {
51016 return this.pushLikeField;
51017 }
51018 set
51019 {
51020 this.pushLikeFieldSet = true;
51021 this.pushLikeField = value;
51022 }
51023 }
51024
51025 /// <summary>
51026 /// This attribute is only valid for RadioButton Controls.
51027 /// </summary>
51028 public YesNoType HasBorder
51029 {
51030 get
51031 {
51032 return this.hasBorderField;
51033 }
51034 set
51035 {
51036 this.hasBorderFieldSet = true;
51037 this.hasBorderField = value;
51038 }
51039 }
51040
51041 /// <summary>
51042 /// This attribute is only valid for PushButton controls.
51043 /// Set this attribute to "yes" to add the User Account Control (UAC) elevation icon (shield icon) to the PushButton control.
51044 /// If this attribute's value is "yes" and the installation is not yet running with elevated privileges,
51045 /// the pushbutton control is created using the User Account Control (UAC) elevation icon (shield icon).
51046 /// If this attribute's value is "yes" and the installation is already running with elevated privileges,
51047 /// the pushbutton control is created using the other icon attributes.
51048 /// Otherwise, the pushbutton control is created using the other icon attributes.
51049 /// </summary>
51050 public YesNoType ElevationShield
51051 {
51052 get
51053 {
51054 return this.elevationShieldField;
51055 }
51056 set
51057 {
51058 this.elevationShieldFieldSet = true;
51059 this.elevationShieldField = value;
51060 }
51061 }
51062
51063 public virtual ISchemaElement ParentElement
51064 {
51065 get
51066 {
51067 return this.parentElement;
51068 }
51069 set
51070 {
51071 this.parentElement = value;
51072 }
51073 }
51074
51075 public virtual void AddChild(ISchemaElement child)
51076 {
51077 if ((null == child))
51078 {
51079 throw new ArgumentNullException("child");
51080 }
51081 this.children.AddElement(child);
51082 child.ParentElement = this;
51083 }
51084
51085 public virtual void RemoveChild(ISchemaElement child)
51086 {
51087 if ((null == child))
51088 {
51089 throw new ArgumentNullException("child");
51090 }
51091 this.children.RemoveElement(child);
51092 child.ParentElement = null;
51093 }
51094
51095 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
51096 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
51097 ISchemaElement ICreateChildren.CreateChild(string childName)
51098 {
51099 if (String.IsNullOrEmpty(childName))
51100 {
51101 throw new ArgumentNullException("childName");
51102 }
51103 ISchemaElement childValue = null;
51104 if (("Text" == childName))
51105 {
51106 childValue = new Text();
51107 }
51108 if (("ComboBox" == childName))
51109 {
51110 childValue = new ComboBox();
51111 }
51112 if (("ListBox" == childName))
51113 {
51114 childValue = new ListBox();
51115 }
51116 if (("ListView" == childName))
51117 {
51118 childValue = new ListView();
51119 }
51120 if (("RadioButtonGroup" == childName))
51121 {
51122 childValue = new RadioButtonGroup();
51123 }
51124 if (("Property" == childName))
51125 {
51126 childValue = new Property();
51127 }
51128 if (("Binary" == childName))
51129 {
51130 childValue = new Binary();
51131 }
51132 if (("Condition" == childName))
51133 {
51134 childValue = new Condition();
51135 }
51136 if (("Publish" == childName))
51137 {
51138 childValue = new Publish();
51139 }
51140 if (("Subscribe" == childName))
51141 {
51142 childValue = new Subscribe();
51143 }
51144 if ((null == childValue))
51145 {
51146 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
51147 }
51148 return childValue;
51149 }
51150
51151 /// <summary>
51152 /// Parses a IconSizeType from a string.
51153 /// </summary>
51154 public static IconSizeType ParseIconSizeType(string value)
51155 {
51156 IconSizeType parsedValue;
51157 Control.TryParseIconSizeType(value, out parsedValue);
51158 return parsedValue;
51159 }
51160
51161 /// <summary>
51162 /// Tries to parse a IconSizeType from a string.
51163 /// </summary>
51164 public static bool TryParseIconSizeType(string value, out IconSizeType parsedValue)
51165 {
51166 parsedValue = IconSizeType.NotSet;
51167 if (string.IsNullOrEmpty(value))
51168 {
51169 return false;
51170 }
51171 if (("16" == value))
51172 {
51173 parsedValue = IconSizeType.Item16;
51174 }
51175 else
51176 {
51177 if (("32" == value))
51178 {
51179 parsedValue = IconSizeType.Item32;
51180 }
51181 else
51182 {
51183 if (("48" == value))
51184 {
51185 parsedValue = IconSizeType.Item48;
51186 }
51187 else
51188 {
51189 parsedValue = IconSizeType.IllegalValue;
51190 return false;
51191 }
51192 }
51193 }
51194 return true;
51195 }
51196
51197 /// <summary>
51198 /// Processes this element and all child elements into an XmlWriter.
51199 /// </summary>
51200 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
51201 public virtual void OutputXml(XmlWriter writer)
51202 {
51203 if ((null == writer))
51204 {
51205 throw new ArgumentNullException("writer");
51206 }
51207 writer.WriteStartElement("Control", "http://wixtoolset.org/schemas/v4/wxs");
51208 if (this.idFieldSet)
51209 {
51210 writer.WriteAttributeString("Id", this.idField);
51211 }
51212 if (this.typeFieldSet)
51213 {
51214 writer.WriteAttributeString("Type", this.typeField);
51215 }
51216 if (this.xFieldSet)
51217 {
51218 writer.WriteAttributeString("X", this.xField);
51219 }
51220 if (this.yFieldSet)
51221 {
51222 writer.WriteAttributeString("Y", this.yField);
51223 }
51224 if (this.widthFieldSet)
51225 {
51226 writer.WriteAttributeString("Width", this.widthField);
51227 }
51228 if (this.heightFieldSet)
51229 {
51230 writer.WriteAttributeString("Height", this.heightField);
51231 }
51232 if (this.propertyFieldSet)
51233 {
51234 writer.WriteAttributeString("Property", this.propertyField);
51235 }
51236 if (this.textFieldSet)
51237 {
51238 writer.WriteAttributeString("Text", this.textField);
51239 }
51240 if (this.helpFieldSet)
51241 {
51242 writer.WriteAttributeString("Help", this.helpField);
51243 }
51244 if (this.toolTipFieldSet)
51245 {
51246 writer.WriteAttributeString("ToolTip", this.toolTipField);
51247 }
51248 if (this.checkBoxValueFieldSet)
51249 {
51250 writer.WriteAttributeString("CheckBoxValue", this.checkBoxValueField);
51251 }
51252 if (this.checkBoxPropertyRefFieldSet)
51253 {
51254 writer.WriteAttributeString("CheckBoxPropertyRef", this.checkBoxPropertyRefField);
51255 }
51256 if (this.tabSkipFieldSet)
51257 {
51258 if ((this.tabSkipField == YesNoType.no))
51259 {
51260 writer.WriteAttributeString("TabSkip", "no");
51261 }
51262 if ((this.tabSkipField == YesNoType.yes))
51263 {
51264 writer.WriteAttributeString("TabSkip", "yes");
51265 }
51266 }
51267 if (this.defaultFieldSet)
51268 {
51269 if ((this.defaultField == YesNoType.no))
51270 {
51271 writer.WriteAttributeString("Default", "no");
51272 }
51273 if ((this.defaultField == YesNoType.yes))
51274 {
51275 writer.WriteAttributeString("Default", "yes");
51276 }
51277 }
51278 if (this.cancelFieldSet)
51279 {
51280 if ((this.cancelField == YesNoType.no))
51281 {
51282 writer.WriteAttributeString("Cancel", "no");
51283 }
51284 if ((this.cancelField == YesNoType.yes))
51285 {
51286 writer.WriteAttributeString("Cancel", "yes");
51287 }
51288 }
51289 if (this.hiddenFieldSet)
51290 {
51291 if ((this.hiddenField == YesNoType.no))
51292 {
51293 writer.WriteAttributeString("Hidden", "no");
51294 }
51295 if ((this.hiddenField == YesNoType.yes))
51296 {
51297 writer.WriteAttributeString("Hidden", "yes");
51298 }
51299 }
51300 if (this.disabledFieldSet)
51301 {
51302 if ((this.disabledField == YesNoType.no))
51303 {
51304 writer.WriteAttributeString("Disabled", "no");
51305 }
51306 if ((this.disabledField == YesNoType.yes))
51307 {
51308 writer.WriteAttributeString("Disabled", "yes");
51309 }
51310 }
51311 if (this.sunkenFieldSet)
51312 {
51313 if ((this.sunkenField == YesNoType.no))
51314 {
51315 writer.WriteAttributeString("Sunken", "no");
51316 }
51317 if ((this.sunkenField == YesNoType.yes))
51318 {
51319 writer.WriteAttributeString("Sunken", "yes");
51320 }
51321 }
51322 if (this.indirectFieldSet)
51323 {
51324 if ((this.indirectField == YesNoType.no))
51325 {
51326 writer.WriteAttributeString("Indirect", "no");
51327 }
51328 if ((this.indirectField == YesNoType.yes))
51329 {
51330 writer.WriteAttributeString("Indirect", "yes");
51331 }
51332 }
51333 if (this.integerFieldSet)
51334 {
51335 if ((this.integerField == YesNoType.no))
51336 {
51337 writer.WriteAttributeString("Integer", "no");
51338 }
51339 if ((this.integerField == YesNoType.yes))
51340 {
51341 writer.WriteAttributeString("Integer", "yes");
51342 }
51343 }
51344 if (this.rightToLeftFieldSet)
51345 {
51346 if ((this.rightToLeftField == YesNoType.no))
51347 {
51348 writer.WriteAttributeString("RightToLeft", "no");
51349 }
51350 if ((this.rightToLeftField == YesNoType.yes))
51351 {
51352 writer.WriteAttributeString("RightToLeft", "yes");
51353 }
51354 }
51355 if (this.rightAlignedFieldSet)
51356 {
51357 if ((this.rightAlignedField == YesNoType.no))
51358 {
51359 writer.WriteAttributeString("RightAligned", "no");
51360 }
51361 if ((this.rightAlignedField == YesNoType.yes))
51362 {
51363 writer.WriteAttributeString("RightAligned", "yes");
51364 }
51365 }
51366 if (this.leftScrollFieldSet)
51367 {
51368 if ((this.leftScrollField == YesNoType.no))
51369 {
51370 writer.WriteAttributeString("LeftScroll", "no");
51371 }
51372 if ((this.leftScrollField == YesNoType.yes))
51373 {
51374 writer.WriteAttributeString("LeftScroll", "yes");
51375 }
51376 }
51377 if (this.transparentFieldSet)
51378 {
51379 if ((this.transparentField == YesNoType.no))
51380 {
51381 writer.WriteAttributeString("Transparent", "no");
51382 }
51383 if ((this.transparentField == YesNoType.yes))
51384 {
51385 writer.WriteAttributeString("Transparent", "yes");
51386 }
51387 }
51388 if (this.noPrefixFieldSet)
51389 {
51390 if ((this.noPrefixField == YesNoType.no))
51391 {
51392 writer.WriteAttributeString("NoPrefix", "no");
51393 }
51394 if ((this.noPrefixField == YesNoType.yes))
51395 {
51396 writer.WriteAttributeString("NoPrefix", "yes");
51397 }
51398 }
51399 if (this.noWrapFieldSet)
51400 {
51401 if ((this.noWrapField == YesNoType.no))
51402 {
51403 writer.WriteAttributeString("NoWrap", "no");
51404 }
51405 if ((this.noWrapField == YesNoType.yes))
51406 {
51407 writer.WriteAttributeString("NoWrap", "yes");
51408 }
51409 }
51410 if (this.formatSizeFieldSet)
51411 {
51412 if ((this.formatSizeField == YesNoType.no))
51413 {
51414 writer.WriteAttributeString("FormatSize", "no");
51415 }
51416 if ((this.formatSizeField == YesNoType.yes))
51417 {
51418 writer.WriteAttributeString("FormatSize", "yes");
51419 }
51420 }
51421 if (this.userLanguageFieldSet)
51422 {
51423 if ((this.userLanguageField == YesNoType.no))
51424 {
51425 writer.WriteAttributeString("UserLanguage", "no");
51426 }
51427 if ((this.userLanguageField == YesNoType.yes))
51428 {
51429 writer.WriteAttributeString("UserLanguage", "yes");
51430 }
51431 }
51432 if (this.multilineFieldSet)
51433 {
51434 if ((this.multilineField == YesNoType.no))
51435 {
51436 writer.WriteAttributeString("Multiline", "no");
51437 }
51438 if ((this.multilineField == YesNoType.yes))
51439 {
51440 writer.WriteAttributeString("Multiline", "yes");
51441 }
51442 }
51443 if (this.passwordFieldSet)
51444 {
51445 if ((this.passwordField == YesNoType.no))
51446 {
51447 writer.WriteAttributeString("Password", "no");
51448 }
51449 if ((this.passwordField == YesNoType.yes))
51450 {
51451 writer.WriteAttributeString("Password", "yes");
51452 }
51453 }
51454 if (this.progressBlocksFieldSet)
51455 {
51456 if ((this.progressBlocksField == YesNoType.no))
51457 {
51458 writer.WriteAttributeString("ProgressBlocks", "no");
51459 }
51460 if ((this.progressBlocksField == YesNoType.yes))
51461 {
51462 writer.WriteAttributeString("ProgressBlocks", "yes");
51463 }
51464 }
51465 if (this.removableFieldSet)
51466 {
51467 if ((this.removableField == YesNoType.no))
51468 {
51469 writer.WriteAttributeString("Removable", "no");
51470 }
51471 if ((this.removableField == YesNoType.yes))
51472 {
51473 writer.WriteAttributeString("Removable", "yes");
51474 }
51475 }
51476 if (this.fixedFieldSet)
51477 {
51478 if ((this.fixedField == YesNoType.no))
51479 {
51480 writer.WriteAttributeString("Fixed", "no");
51481 }
51482 if ((this.fixedField == YesNoType.yes))
51483 {
51484 writer.WriteAttributeString("Fixed", "yes");
51485 }
51486 }
51487 if (this.remoteFieldSet)
51488 {
51489 if ((this.remoteField == YesNoType.no))
51490 {
51491 writer.WriteAttributeString("Remote", "no");
51492 }
51493 if ((this.remoteField == YesNoType.yes))
51494 {
51495 writer.WriteAttributeString("Remote", "yes");
51496 }
51497 }
51498 if (this.cDROMFieldSet)
51499 {
51500 if ((this.cDROMField == YesNoType.no))
51501 {
51502 writer.WriteAttributeString("CDROM", "no");
51503 }
51504 if ((this.cDROMField == YesNoType.yes))
51505 {
51506 writer.WriteAttributeString("CDROM", "yes");
51507 }
51508 }
51509 if (this.rAMDiskFieldSet)
51510 {
51511 if ((this.rAMDiskField == YesNoType.no))
51512 {
51513 writer.WriteAttributeString("RAMDisk", "no");
51514 }
51515 if ((this.rAMDiskField == YesNoType.yes))
51516 {
51517 writer.WriteAttributeString("RAMDisk", "yes");
51518 }
51519 }
51520 if (this.floppyFieldSet)
51521 {
51522 if ((this.floppyField == YesNoType.no))
51523 {
51524 writer.WriteAttributeString("Floppy", "no");
51525 }
51526 if ((this.floppyField == YesNoType.yes))
51527 {
51528 writer.WriteAttributeString("Floppy", "yes");
51529 }
51530 }
51531 if (this.showRollbackCostFieldSet)
51532 {
51533 if ((this.showRollbackCostField == YesNoType.no))
51534 {
51535 writer.WriteAttributeString("ShowRollbackCost", "no");
51536 }
51537 if ((this.showRollbackCostField == YesNoType.yes))
51538 {
51539 writer.WriteAttributeString("ShowRollbackCost", "yes");
51540 }
51541 }
51542 if (this.sortedFieldSet)
51543 {
51544 if ((this.sortedField == YesNoType.no))
51545 {
51546 writer.WriteAttributeString("Sorted", "no");
51547 }
51548 if ((this.sortedField == YesNoType.yes))
51549 {
51550 writer.WriteAttributeString("Sorted", "yes");
51551 }
51552 }
51553 if (this.comboListFieldSet)
51554 {
51555 if ((this.comboListField == YesNoType.no))
51556 {
51557 writer.WriteAttributeString("ComboList", "no");
51558 }
51559 if ((this.comboListField == YesNoType.yes))
51560 {
51561 writer.WriteAttributeString("ComboList", "yes");
51562 }
51563 }
51564 if (this.imageFieldSet)
51565 {
51566 if ((this.imageField == YesNoType.no))
51567 {
51568 writer.WriteAttributeString("Image", "no");
51569 }
51570 if ((this.imageField == YesNoType.yes))
51571 {
51572 writer.WriteAttributeString("Image", "yes");
51573 }
51574 }
51575 if (this.iconSizeFieldSet)
51576 {
51577 if ((this.iconSizeField == IconSizeType.Item16))
51578 {
51579 writer.WriteAttributeString("IconSize", "16");
51580 }
51581 if ((this.iconSizeField == IconSizeType.Item32))
51582 {
51583 writer.WriteAttributeString("IconSize", "32");
51584 }
51585 if ((this.iconSizeField == IconSizeType.Item48))
51586 {
51587 writer.WriteAttributeString("IconSize", "48");
51588 }
51589 }
51590 if (this.fixedSizeFieldSet)
51591 {
51592 if ((this.fixedSizeField == YesNoType.no))
51593 {
51594 writer.WriteAttributeString("FixedSize", "no");
51595 }
51596 if ((this.fixedSizeField == YesNoType.yes))
51597 {
51598 writer.WriteAttributeString("FixedSize", "yes");
51599 }
51600 }
51601 if (this.iconFieldSet)
51602 {
51603 if ((this.iconField == YesNoType.no))
51604 {
51605 writer.WriteAttributeString("Icon", "no");
51606 }
51607 if ((this.iconField == YesNoType.yes))
51608 {
51609 writer.WriteAttributeString("Icon", "yes");
51610 }
51611 }
51612 if (this.bitmapFieldSet)
51613 {
51614 if ((this.bitmapField == YesNoType.no))
51615 {
51616 writer.WriteAttributeString("Bitmap", "no");
51617 }
51618 if ((this.bitmapField == YesNoType.yes))
51619 {
51620 writer.WriteAttributeString("Bitmap", "yes");
51621 }
51622 }
51623 if (this.pushLikeFieldSet)
51624 {
51625 if ((this.pushLikeField == YesNoType.no))
51626 {
51627 writer.WriteAttributeString("PushLike", "no");
51628 }
51629 if ((this.pushLikeField == YesNoType.yes))
51630 {
51631 writer.WriteAttributeString("PushLike", "yes");
51632 }
51633 }
51634 if (this.hasBorderFieldSet)
51635 {
51636 if ((this.hasBorderField == YesNoType.no))
51637 {
51638 writer.WriteAttributeString("HasBorder", "no");
51639 }
51640 if ((this.hasBorderField == YesNoType.yes))
51641 {
51642 writer.WriteAttributeString("HasBorder", "yes");
51643 }
51644 }
51645 if (this.elevationShieldFieldSet)
51646 {
51647 if ((this.elevationShieldField == YesNoType.no))
51648 {
51649 writer.WriteAttributeString("ElevationShield", "no");
51650 }
51651 if ((this.elevationShieldField == YesNoType.yes))
51652 {
51653 writer.WriteAttributeString("ElevationShield", "yes");
51654 }
51655 }
51656 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
51657 {
51658 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
51659 childElement.OutputXml(writer);
51660 }
51661 writer.WriteEndElement();
51662 }
51663
51664 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
51665 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
51666 void ISetAttributes.SetAttribute(string name, string value)
51667 {
51668 if (String.IsNullOrEmpty(name))
51669 {
51670 throw new ArgumentNullException("name");
51671 }
51672 if (("Id" == name))
51673 {
51674 this.idField = value;
51675 this.idFieldSet = true;
51676 }
51677 if (("Type" == name))
51678 {
51679 this.typeField = value;
51680 this.typeFieldSet = true;
51681 }
51682 if (("X" == name))
51683 {
51684 this.xField = value;
51685 this.xFieldSet = true;
51686 }
51687 if (("Y" == name))
51688 {
51689 this.yField = value;
51690 this.yFieldSet = true;
51691 }
51692 if (("Width" == name))
51693 {
51694 this.widthField = value;
51695 this.widthFieldSet = true;
51696 }
51697 if (("Height" == name))
51698 {
51699 this.heightField = value;
51700 this.heightFieldSet = true;
51701 }
51702 if (("Property" == name))
51703 {
51704 this.propertyField = value;
51705 this.propertyFieldSet = true;
51706 }
51707 if (("Text" == name))
51708 {
51709 this.textField = value;
51710 this.textFieldSet = true;
51711 }
51712 if (("Help" == name))
51713 {
51714 this.helpField = value;
51715 this.helpFieldSet = true;
51716 }
51717 if (("ToolTip" == name))
51718 {
51719 this.toolTipField = value;
51720 this.toolTipFieldSet = true;
51721 }
51722 if (("CheckBoxValue" == name))
51723 {
51724 this.checkBoxValueField = value;
51725 this.checkBoxValueFieldSet = true;
51726 }
51727 if (("CheckBoxPropertyRef" == name))
51728 {
51729 this.checkBoxPropertyRefField = value;
51730 this.checkBoxPropertyRefFieldSet = true;
51731 }
51732 if (("TabSkip" == name))
51733 {
51734 this.tabSkipField = Enums.ParseYesNoType(value);
51735 this.tabSkipFieldSet = true;
51736 }
51737 if (("Default" == name))
51738 {
51739 this.defaultField = Enums.ParseYesNoType(value);
51740 this.defaultFieldSet = true;
51741 }
51742 if (("Cancel" == name))
51743 {
51744 this.cancelField = Enums.ParseYesNoType(value);
51745 this.cancelFieldSet = true;
51746 }
51747 if (("Hidden" == name))
51748 {
51749 this.hiddenField = Enums.ParseYesNoType(value);
51750 this.hiddenFieldSet = true;
51751 }
51752 if (("Disabled" == name))
51753 {
51754 this.disabledField = Enums.ParseYesNoType(value);
51755 this.disabledFieldSet = true;
51756 }
51757 if (("Sunken" == name))
51758 {
51759 this.sunkenField = Enums.ParseYesNoType(value);
51760 this.sunkenFieldSet = true;
51761 }
51762 if (("Indirect" == name))
51763 {
51764 this.indirectField = Enums.ParseYesNoType(value);
51765 this.indirectFieldSet = true;
51766 }
51767 if (("Integer" == name))
51768 {
51769 this.integerField = Enums.ParseYesNoType(value);
51770 this.integerFieldSet = true;
51771 }
51772 if (("RightToLeft" == name))
51773 {
51774 this.rightToLeftField = Enums.ParseYesNoType(value);
51775 this.rightToLeftFieldSet = true;
51776 }
51777 if (("RightAligned" == name))
51778 {
51779 this.rightAlignedField = Enums.ParseYesNoType(value);
51780 this.rightAlignedFieldSet = true;
51781 }
51782 if (("LeftScroll" == name))
51783 {
51784 this.leftScrollField = Enums.ParseYesNoType(value);
51785 this.leftScrollFieldSet = true;
51786 }
51787 if (("Transparent" == name))
51788 {
51789 this.transparentField = Enums.ParseYesNoType(value);
51790 this.transparentFieldSet = true;
51791 }
51792 if (("NoPrefix" == name))
51793 {
51794 this.noPrefixField = Enums.ParseYesNoType(value);
51795 this.noPrefixFieldSet = true;
51796 }
51797 if (("NoWrap" == name))
51798 {
51799 this.noWrapField = Enums.ParseYesNoType(value);
51800 this.noWrapFieldSet = true;
51801 }
51802 if (("FormatSize" == name))
51803 {
51804 this.formatSizeField = Enums.ParseYesNoType(value);
51805 this.formatSizeFieldSet = true;
51806 }
51807 if (("UserLanguage" == name))
51808 {
51809 this.userLanguageField = Enums.ParseYesNoType(value);
51810 this.userLanguageFieldSet = true;
51811 }
51812 if (("Multiline" == name))
51813 {
51814 this.multilineField = Enums.ParseYesNoType(value);
51815 this.multilineFieldSet = true;
51816 }
51817 if (("Password" == name))
51818 {
51819 this.passwordField = Enums.ParseYesNoType(value);
51820 this.passwordFieldSet = true;
51821 }
51822 if (("ProgressBlocks" == name))
51823 {
51824 this.progressBlocksField = Enums.ParseYesNoType(value);
51825 this.progressBlocksFieldSet = true;
51826 }
51827 if (("Removable" == name))
51828 {
51829 this.removableField = Enums.ParseYesNoType(value);
51830 this.removableFieldSet = true;
51831 }
51832 if (("Fixed" == name))
51833 {
51834 this.fixedField = Enums.ParseYesNoType(value);
51835 this.fixedFieldSet = true;
51836 }
51837 if (("Remote" == name))
51838 {
51839 this.remoteField = Enums.ParseYesNoType(value);
51840 this.remoteFieldSet = true;
51841 }
51842 if (("CDROM" == name))
51843 {
51844 this.cDROMField = Enums.ParseYesNoType(value);
51845 this.cDROMFieldSet = true;
51846 }
51847 if (("RAMDisk" == name))
51848 {
51849 this.rAMDiskField = Enums.ParseYesNoType(value);
51850 this.rAMDiskFieldSet = true;
51851 }
51852 if (("Floppy" == name))
51853 {
51854 this.floppyField = Enums.ParseYesNoType(value);
51855 this.floppyFieldSet = true;
51856 }
51857 if (("ShowRollbackCost" == name))
51858 {
51859 this.showRollbackCostField = Enums.ParseYesNoType(value);
51860 this.showRollbackCostFieldSet = true;
51861 }
51862 if (("Sorted" == name))
51863 {
51864 this.sortedField = Enums.ParseYesNoType(value);
51865 this.sortedFieldSet = true;
51866 }
51867 if (("ComboList" == name))
51868 {
51869 this.comboListField = Enums.ParseYesNoType(value);
51870 this.comboListFieldSet = true;
51871 }
51872 if (("Image" == name))
51873 {
51874 this.imageField = Enums.ParseYesNoType(value);
51875 this.imageFieldSet = true;
51876 }
51877 if (("IconSize" == name))
51878 {
51879 this.iconSizeField = Control.ParseIconSizeType(value);
51880 this.iconSizeFieldSet = true;
51881 }
51882 if (("FixedSize" == name))
51883 {
51884 this.fixedSizeField = Enums.ParseYesNoType(value);
51885 this.fixedSizeFieldSet = true;
51886 }
51887 if (("Icon" == name))
51888 {
51889 this.iconField = Enums.ParseYesNoType(value);
51890 this.iconFieldSet = true;
51891 }
51892 if (("Bitmap" == name))
51893 {
51894 this.bitmapField = Enums.ParseYesNoType(value);
51895 this.bitmapFieldSet = true;
51896 }
51897 if (("PushLike" == name))
51898 {
51899 this.pushLikeField = Enums.ParseYesNoType(value);
51900 this.pushLikeFieldSet = true;
51901 }
51902 if (("HasBorder" == name))
51903 {
51904 this.hasBorderField = Enums.ParseYesNoType(value);
51905 this.hasBorderFieldSet = true;
51906 }
51907 if (("ElevationShield" == name))
51908 {
51909 this.elevationShieldField = Enums.ParseYesNoType(value);
51910 this.elevationShieldFieldSet = true;
51911 }
51912 }
51913
51914 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
51915 public enum IconSizeType
51916 {
51917
51918 IllegalValue = int.MaxValue,
51919
51920 NotSet = -1,
51921
51922 Item16,
51923
51924 Item32,
51925
51926 Item48,
51927 }
51928 }
51929
51930 /// <summary>
51931 /// Billboard to display during install of a Feature
51932 /// </summary>
51933 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
51934 public class Billboard : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
51935 {
51936
51937 private ElementCollection children;
51938
51939 private string idField;
51940
51941 private bool idFieldSet;
51942
51943 private string featureField;
51944
51945 private bool featureFieldSet;
51946
51947 private ISchemaElement parentElement;
51948
51949 public Billboard()
51950 {
51951 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
51952 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Control)));
51953 this.children = childCollection0;
51954 }
51955
51956 public virtual IEnumerable Children
51957 {
51958 get
51959 {
51960 return this.children;
51961 }
51962 }
51963
51964 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
51965 public virtual IEnumerable this[System.Type childType]
51966 {
51967 get
51968 {
51969 return this.children.Filter(childType);
51970 }
51971 }
51972
51973 /// <summary>
51974 /// Unique identifier for the Billboard.
51975 /// </summary>
51976 public string Id
51977 {
51978 get
51979 {
51980 return this.idField;
51981 }
51982 set
51983 {
51984 this.idFieldSet = true;
51985 this.idField = value;
51986 }
51987 }
51988
51989 /// <summary>
51990 /// Feature whose state determines if the Billboard is shown.
51991 /// </summary>
51992 public string Feature
51993 {
51994 get
51995 {
51996 return this.featureField;
51997 }
51998 set
51999 {
52000 this.featureFieldSet = true;
52001 this.featureField = value;
52002 }
52003 }
52004
52005 public virtual ISchemaElement ParentElement
52006 {
52007 get
52008 {
52009 return this.parentElement;
52010 }
52011 set
52012 {
52013 this.parentElement = value;
52014 }
52015 }
52016
52017 public virtual void AddChild(ISchemaElement child)
52018 {
52019 if ((null == child))
52020 {
52021 throw new ArgumentNullException("child");
52022 }
52023 this.children.AddElement(child);
52024 child.ParentElement = this;
52025 }
52026
52027 public virtual void RemoveChild(ISchemaElement child)
52028 {
52029 if ((null == child))
52030 {
52031 throw new ArgumentNullException("child");
52032 }
52033 this.children.RemoveElement(child);
52034 child.ParentElement = null;
52035 }
52036
52037 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52038 ISchemaElement ICreateChildren.CreateChild(string childName)
52039 {
52040 if (String.IsNullOrEmpty(childName))
52041 {
52042 throw new ArgumentNullException("childName");
52043 }
52044 ISchemaElement childValue = null;
52045 if (("Control" == childName))
52046 {
52047 childValue = new Control();
52048 }
52049 if ((null == childValue))
52050 {
52051 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
52052 }
52053 return childValue;
52054 }
52055
52056 /// <summary>
52057 /// Processes this element and all child elements into an XmlWriter.
52058 /// </summary>
52059 public virtual void OutputXml(XmlWriter writer)
52060 {
52061 if ((null == writer))
52062 {
52063 throw new ArgumentNullException("writer");
52064 }
52065 writer.WriteStartElement("Billboard", "http://wixtoolset.org/schemas/v4/wxs");
52066 if (this.idFieldSet)
52067 {
52068 writer.WriteAttributeString("Id", this.idField);
52069 }
52070 if (this.featureFieldSet)
52071 {
52072 writer.WriteAttributeString("Feature", this.featureField);
52073 }
52074 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
52075 {
52076 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
52077 childElement.OutputXml(writer);
52078 }
52079 writer.WriteEndElement();
52080 }
52081
52082 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52083 void ISetAttributes.SetAttribute(string name, string value)
52084 {
52085 if (String.IsNullOrEmpty(name))
52086 {
52087 throw new ArgumentNullException("name");
52088 }
52089 if (("Id" == name))
52090 {
52091 this.idField = value;
52092 this.idFieldSet = true;
52093 }
52094 if (("Feature" == name))
52095 {
52096 this.featureField = value;
52097 this.featureFieldSet = true;
52098 }
52099 }
52100 }
52101
52102 /// <summary>
52103 /// Billboard action during which child Billboards are displayed
52104 /// </summary>
52105 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
52106 public class BillboardAction : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
52107 {
52108
52109 private ElementCollection children;
52110
52111 private string idField;
52112
52113 private bool idFieldSet;
52114
52115 private ISchemaElement parentElement;
52116
52117 public BillboardAction()
52118 {
52119 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
52120 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Billboard)));
52121 this.children = childCollection0;
52122 }
52123
52124 public virtual IEnumerable Children
52125 {
52126 get
52127 {
52128 return this.children;
52129 }
52130 }
52131
52132 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
52133 public virtual IEnumerable this[System.Type childType]
52134 {
52135 get
52136 {
52137 return this.children.Filter(childType);
52138 }
52139 }
52140
52141 /// <summary>
52142 /// Action name that determines when the Billboard should be shown.
52143 /// </summary>
52144 public string Id
52145 {
52146 get
52147 {
52148 return this.idField;
52149 }
52150 set
52151 {
52152 this.idFieldSet = true;
52153 this.idField = value;
52154 }
52155 }
52156
52157 public virtual ISchemaElement ParentElement
52158 {
52159 get
52160 {
52161 return this.parentElement;
52162 }
52163 set
52164 {
52165 this.parentElement = value;
52166 }
52167 }
52168
52169 public virtual void AddChild(ISchemaElement child)
52170 {
52171 if ((null == child))
52172 {
52173 throw new ArgumentNullException("child");
52174 }
52175 this.children.AddElement(child);
52176 child.ParentElement = this;
52177 }
52178
52179 public virtual void RemoveChild(ISchemaElement child)
52180 {
52181 if ((null == child))
52182 {
52183 throw new ArgumentNullException("child");
52184 }
52185 this.children.RemoveElement(child);
52186 child.ParentElement = null;
52187 }
52188
52189 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52190 ISchemaElement ICreateChildren.CreateChild(string childName)
52191 {
52192 if (String.IsNullOrEmpty(childName))
52193 {
52194 throw new ArgumentNullException("childName");
52195 }
52196 ISchemaElement childValue = null;
52197 if (("Billboard" == childName))
52198 {
52199 childValue = new Billboard();
52200 }
52201 if ((null == childValue))
52202 {
52203 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
52204 }
52205 return childValue;
52206 }
52207
52208 /// <summary>
52209 /// Processes this element and all child elements into an XmlWriter.
52210 /// </summary>
52211 public virtual void OutputXml(XmlWriter writer)
52212 {
52213 if ((null == writer))
52214 {
52215 throw new ArgumentNullException("writer");
52216 }
52217 writer.WriteStartElement("BillboardAction", "http://wixtoolset.org/schemas/v4/wxs");
52218 if (this.idFieldSet)
52219 {
52220 writer.WriteAttributeString("Id", this.idField);
52221 }
52222 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
52223 {
52224 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
52225 childElement.OutputXml(writer);
52226 }
52227 writer.WriteEndElement();
52228 }
52229
52230 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52231 void ISetAttributes.SetAttribute(string name, string value)
52232 {
52233 if (String.IsNullOrEmpty(name))
52234 {
52235 throw new ArgumentNullException("name");
52236 }
52237 if (("Id" == name))
52238 {
52239 this.idField = value;
52240 this.idFieldSet = true;
52241 }
52242 }
52243 }
52244
52245 /// <summary>
52246 /// Defines a dialog box in the Dialog Table.
52247 /// </summary>
52248 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
52249 public class Dialog : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
52250 {
52251
52252 private ElementCollection children;
52253
52254 private string idField;
52255
52256 private bool idFieldSet;
52257
52258 private int xField;
52259
52260 private bool xFieldSet;
52261
52262 private int yField;
52263
52264 private bool yFieldSet;
52265
52266 private int widthField;
52267
52268 private bool widthFieldSet;
52269
52270 private int heightField;
52271
52272 private bool heightFieldSet;
52273
52274 private string titleField;
52275
52276 private bool titleFieldSet;
52277
52278 private YesNoType hiddenField;
52279
52280 private bool hiddenFieldSet;
52281
52282 private YesNoType modelessField;
52283
52284 private bool modelessFieldSet;
52285
52286 private YesNoType noMinimizeField;
52287
52288 private bool noMinimizeFieldSet;
52289
52290 private YesNoType systemModalField;
52291
52292 private bool systemModalFieldSet;
52293
52294 private YesNoType keepModelessField;
52295
52296 private bool keepModelessFieldSet;
52297
52298 private YesNoType trackDiskSpaceField;
52299
52300 private bool trackDiskSpaceFieldSet;
52301
52302 private YesNoType customPaletteField;
52303
52304 private bool customPaletteFieldSet;
52305
52306 private YesNoType rightToLeftField;
52307
52308 private bool rightToLeftFieldSet;
52309
52310 private YesNoType rightAlignedField;
52311
52312 private bool rightAlignedFieldSet;
52313
52314 private YesNoType leftScrollField;
52315
52316 private bool leftScrollFieldSet;
52317
52318 private YesNoType errorDialogField;
52319
52320 private bool errorDialogFieldSet;
52321
52322 private ISchemaElement parentElement;
52323
52324 public Dialog()
52325 {
52326 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
52327 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Control)));
52328 this.children = childCollection0;
52329 }
52330
52331 public virtual IEnumerable Children
52332 {
52333 get
52334 {
52335 return this.children;
52336 }
52337 }
52338
52339 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
52340 public virtual IEnumerable this[System.Type childType]
52341 {
52342 get
52343 {
52344 return this.children.Filter(childType);
52345 }
52346 }
52347
52348 /// <summary>
52349 /// Unique identifier for the dialog.
52350 /// </summary>
52351 public string Id
52352 {
52353 get
52354 {
52355 return this.idField;
52356 }
52357 set
52358 {
52359 this.idFieldSet = true;
52360 this.idField = value;
52361 }
52362 }
52363
52364 /// <summary>
52365 /// Horizontal placement of the dialog box as a percentage of screen width. The default value is 50.
52366 /// </summary>
52367 public int X
52368 {
52369 get
52370 {
52371 return this.xField;
52372 }
52373 set
52374 {
52375 this.xFieldSet = true;
52376 this.xField = value;
52377 }
52378 }
52379
52380 /// <summary>
52381 /// Vertical placement of the dialog box as a percentage of screen height. The default value is 50.
52382 /// </summary>
52383 public int Y
52384 {
52385 get
52386 {
52387 return this.yField;
52388 }
52389 set
52390 {
52391 this.yFieldSet = true;
52392 this.yField = value;
52393 }
52394 }
52395
52396 /// <summary>
52397 /// The width of the dialog box in dialog units.
52398 /// </summary>
52399 public int Width
52400 {
52401 get
52402 {
52403 return this.widthField;
52404 }
52405 set
52406 {
52407 this.widthFieldSet = true;
52408 this.widthField = value;
52409 }
52410 }
52411
52412 /// <summary>
52413 /// The height of the dialog box in dialog units.
52414 /// </summary>
52415 public int Height
52416 {
52417 get
52418 {
52419 return this.heightField;
52420 }
52421 set
52422 {
52423 this.heightFieldSet = true;
52424 this.heightField = value;
52425 }
52426 }
52427
52428 /// <summary>
52429 /// The title of the dialog box.
52430 /// </summary>
52431 public string Title
52432 {
52433 get
52434 {
52435 return this.titleField;
52436 }
52437 set
52438 {
52439 this.titleFieldSet = true;
52440 this.titleField = value;
52441 }
52442 }
52443
52444 /// <summary>
52445 /// Used to hide the dialog.
52446 /// </summary>
52447 public YesNoType Hidden
52448 {
52449 get
52450 {
52451 return this.hiddenField;
52452 }
52453 set
52454 {
52455 this.hiddenFieldSet = true;
52456 this.hiddenField = value;
52457 }
52458 }
52459
52460 /// <summary>
52461 /// Used to set the dialog as modeless.
52462 /// </summary>
52463 public YesNoType Modeless
52464 {
52465 get
52466 {
52467 return this.modelessField;
52468 }
52469 set
52470 {
52471 this.modelessFieldSet = true;
52472 this.modelessField = value;
52473 }
52474 }
52475
52476 /// <summary>
52477 /// Used to specify if the dialog can be minimized.
52478 /// </summary>
52479 public YesNoType NoMinimize
52480 {
52481 get
52482 {
52483 return this.noMinimizeField;
52484 }
52485 set
52486 {
52487 this.noMinimizeFieldSet = true;
52488 this.noMinimizeField = value;
52489 }
52490 }
52491
52492 /// <summary>
52493 /// Used to set the dialog as system modal.
52494 /// </summary>
52495 public YesNoType SystemModal
52496 {
52497 get
52498 {
52499 return this.systemModalField;
52500 }
52501 set
52502 {
52503 this.systemModalFieldSet = true;
52504 this.systemModalField = value;
52505 }
52506 }
52507
52508 /// <summary>
52509 /// Keep modeless dialogs alive when this dialog is created through DoAction.
52510 /// </summary>
52511 public YesNoType KeepModeless
52512 {
52513 get
52514 {
52515 return this.keepModelessField;
52516 }
52517 set
52518 {
52519 this.keepModelessFieldSet = true;
52520 this.keepModelessField = value;
52521 }
52522 }
52523
52524 /// <summary>
52525 /// Have the dialog periodically call the installer to check if available disk space has changed.
52526 /// </summary>
52527 public YesNoType TrackDiskSpace
52528 {
52529 get
52530 {
52531 return this.trackDiskSpaceField;
52532 }
52533 set
52534 {
52535 this.trackDiskSpaceFieldSet = true;
52536 this.trackDiskSpaceField = value;
52537 }
52538 }
52539
52540 /// <summary>
52541 /// Used to specify if pictures in the dialog box are rendered with a custom palette.
52542 /// </summary>
52543 public YesNoType CustomPalette
52544 {
52545 get
52546 {
52547 return this.customPaletteField;
52548 }
52549 set
52550 {
52551 this.customPaletteFieldSet = true;
52552 this.customPaletteField = value;
52553 }
52554 }
52555
52556 /// <summary>
52557 /// Used to specify if the text in the dialog should be displayed in right to left reading order.
52558 /// </summary>
52559 public YesNoType RightToLeft
52560 {
52561 get
52562 {
52563 return this.rightToLeftField;
52564 }
52565 set
52566 {
52567 this.rightToLeftFieldSet = true;
52568 this.rightToLeftField = value;
52569 }
52570 }
52571
52572 /// <summary>
52573 /// Align text on the right.
52574 /// </summary>
52575 public YesNoType RightAligned
52576 {
52577 get
52578 {
52579 return this.rightAlignedField;
52580 }
52581 set
52582 {
52583 this.rightAlignedFieldSet = true;
52584 this.rightAlignedField = value;
52585 }
52586 }
52587
52588 /// <summary>
52589 /// Used to align the scroll bar on the left.
52590 /// </summary>
52591 public YesNoType LeftScroll
52592 {
52593 get
52594 {
52595 return this.leftScrollField;
52596 }
52597 set
52598 {
52599 this.leftScrollFieldSet = true;
52600 this.leftScrollField = value;
52601 }
52602 }
52603
52604 /// <summary>
52605 /// Specifies this dialog as an error dialog.
52606 /// </summary>
52607 public YesNoType ErrorDialog
52608 {
52609 get
52610 {
52611 return this.errorDialogField;
52612 }
52613 set
52614 {
52615 this.errorDialogFieldSet = true;
52616 this.errorDialogField = value;
52617 }
52618 }
52619
52620 public virtual ISchemaElement ParentElement
52621 {
52622 get
52623 {
52624 return this.parentElement;
52625 }
52626 set
52627 {
52628 this.parentElement = value;
52629 }
52630 }
52631
52632 public virtual void AddChild(ISchemaElement child)
52633 {
52634 if ((null == child))
52635 {
52636 throw new ArgumentNullException("child");
52637 }
52638 this.children.AddElement(child);
52639 child.ParentElement = this;
52640 }
52641
52642 public virtual void RemoveChild(ISchemaElement child)
52643 {
52644 if ((null == child))
52645 {
52646 throw new ArgumentNullException("child");
52647 }
52648 this.children.RemoveElement(child);
52649 child.ParentElement = null;
52650 }
52651
52652 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52653 ISchemaElement ICreateChildren.CreateChild(string childName)
52654 {
52655 if (String.IsNullOrEmpty(childName))
52656 {
52657 throw new ArgumentNullException("childName");
52658 }
52659 ISchemaElement childValue = null;
52660 if (("Control" == childName))
52661 {
52662 childValue = new Control();
52663 }
52664 if ((null == childValue))
52665 {
52666 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
52667 }
52668 return childValue;
52669 }
52670
52671 /// <summary>
52672 /// Processes this element and all child elements into an XmlWriter.
52673 /// </summary>
52674 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
52675 public virtual void OutputXml(XmlWriter writer)
52676 {
52677 if ((null == writer))
52678 {
52679 throw new ArgumentNullException("writer");
52680 }
52681 writer.WriteStartElement("Dialog", "http://wixtoolset.org/schemas/v4/wxs");
52682 if (this.idFieldSet)
52683 {
52684 writer.WriteAttributeString("Id", this.idField);
52685 }
52686 if (this.xFieldSet)
52687 {
52688 writer.WriteAttributeString("X", this.xField.ToString(CultureInfo.InvariantCulture));
52689 }
52690 if (this.yFieldSet)
52691 {
52692 writer.WriteAttributeString("Y", this.yField.ToString(CultureInfo.InvariantCulture));
52693 }
52694 if (this.widthFieldSet)
52695 {
52696 writer.WriteAttributeString("Width", this.widthField.ToString(CultureInfo.InvariantCulture));
52697 }
52698 if (this.heightFieldSet)
52699 {
52700 writer.WriteAttributeString("Height", this.heightField.ToString(CultureInfo.InvariantCulture));
52701 }
52702 if (this.titleFieldSet)
52703 {
52704 writer.WriteAttributeString("Title", this.titleField);
52705 }
52706 if (this.hiddenFieldSet)
52707 {
52708 if ((this.hiddenField == YesNoType.no))
52709 {
52710 writer.WriteAttributeString("Hidden", "no");
52711 }
52712 if ((this.hiddenField == YesNoType.yes))
52713 {
52714 writer.WriteAttributeString("Hidden", "yes");
52715 }
52716 }
52717 if (this.modelessFieldSet)
52718 {
52719 if ((this.modelessField == YesNoType.no))
52720 {
52721 writer.WriteAttributeString("Modeless", "no");
52722 }
52723 if ((this.modelessField == YesNoType.yes))
52724 {
52725 writer.WriteAttributeString("Modeless", "yes");
52726 }
52727 }
52728 if (this.noMinimizeFieldSet)
52729 {
52730 if ((this.noMinimizeField == YesNoType.no))
52731 {
52732 writer.WriteAttributeString("NoMinimize", "no");
52733 }
52734 if ((this.noMinimizeField == YesNoType.yes))
52735 {
52736 writer.WriteAttributeString("NoMinimize", "yes");
52737 }
52738 }
52739 if (this.systemModalFieldSet)
52740 {
52741 if ((this.systemModalField == YesNoType.no))
52742 {
52743 writer.WriteAttributeString("SystemModal", "no");
52744 }
52745 if ((this.systemModalField == YesNoType.yes))
52746 {
52747 writer.WriteAttributeString("SystemModal", "yes");
52748 }
52749 }
52750 if (this.keepModelessFieldSet)
52751 {
52752 if ((this.keepModelessField == YesNoType.no))
52753 {
52754 writer.WriteAttributeString("KeepModeless", "no");
52755 }
52756 if ((this.keepModelessField == YesNoType.yes))
52757 {
52758 writer.WriteAttributeString("KeepModeless", "yes");
52759 }
52760 }
52761 if (this.trackDiskSpaceFieldSet)
52762 {
52763 if ((this.trackDiskSpaceField == YesNoType.no))
52764 {
52765 writer.WriteAttributeString("TrackDiskSpace", "no");
52766 }
52767 if ((this.trackDiskSpaceField == YesNoType.yes))
52768 {
52769 writer.WriteAttributeString("TrackDiskSpace", "yes");
52770 }
52771 }
52772 if (this.customPaletteFieldSet)
52773 {
52774 if ((this.customPaletteField == YesNoType.no))
52775 {
52776 writer.WriteAttributeString("CustomPalette", "no");
52777 }
52778 if ((this.customPaletteField == YesNoType.yes))
52779 {
52780 writer.WriteAttributeString("CustomPalette", "yes");
52781 }
52782 }
52783 if (this.rightToLeftFieldSet)
52784 {
52785 if ((this.rightToLeftField == YesNoType.no))
52786 {
52787 writer.WriteAttributeString("RightToLeft", "no");
52788 }
52789 if ((this.rightToLeftField == YesNoType.yes))
52790 {
52791 writer.WriteAttributeString("RightToLeft", "yes");
52792 }
52793 }
52794 if (this.rightAlignedFieldSet)
52795 {
52796 if ((this.rightAlignedField == YesNoType.no))
52797 {
52798 writer.WriteAttributeString("RightAligned", "no");
52799 }
52800 if ((this.rightAlignedField == YesNoType.yes))
52801 {
52802 writer.WriteAttributeString("RightAligned", "yes");
52803 }
52804 }
52805 if (this.leftScrollFieldSet)
52806 {
52807 if ((this.leftScrollField == YesNoType.no))
52808 {
52809 writer.WriteAttributeString("LeftScroll", "no");
52810 }
52811 if ((this.leftScrollField == YesNoType.yes))
52812 {
52813 writer.WriteAttributeString("LeftScroll", "yes");
52814 }
52815 }
52816 if (this.errorDialogFieldSet)
52817 {
52818 if ((this.errorDialogField == YesNoType.no))
52819 {
52820 writer.WriteAttributeString("ErrorDialog", "no");
52821 }
52822 if ((this.errorDialogField == YesNoType.yes))
52823 {
52824 writer.WriteAttributeString("ErrorDialog", "yes");
52825 }
52826 }
52827 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
52828 {
52829 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
52830 childElement.OutputXml(writer);
52831 }
52832 writer.WriteEndElement();
52833 }
52834
52835 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52836 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
52837 void ISetAttributes.SetAttribute(string name, string value)
52838 {
52839 if (String.IsNullOrEmpty(name))
52840 {
52841 throw new ArgumentNullException("name");
52842 }
52843 if (("Id" == name))
52844 {
52845 this.idField = value;
52846 this.idFieldSet = true;
52847 }
52848 if (("X" == name))
52849 {
52850 this.xField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
52851 this.xFieldSet = true;
52852 }
52853 if (("Y" == name))
52854 {
52855 this.yField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
52856 this.yFieldSet = true;
52857 }
52858 if (("Width" == name))
52859 {
52860 this.widthField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
52861 this.widthFieldSet = true;
52862 }
52863 if (("Height" == name))
52864 {
52865 this.heightField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
52866 this.heightFieldSet = true;
52867 }
52868 if (("Title" == name))
52869 {
52870 this.titleField = value;
52871 this.titleFieldSet = true;
52872 }
52873 if (("Hidden" == name))
52874 {
52875 this.hiddenField = Enums.ParseYesNoType(value);
52876 this.hiddenFieldSet = true;
52877 }
52878 if (("Modeless" == name))
52879 {
52880 this.modelessField = Enums.ParseYesNoType(value);
52881 this.modelessFieldSet = true;
52882 }
52883 if (("NoMinimize" == name))
52884 {
52885 this.noMinimizeField = Enums.ParseYesNoType(value);
52886 this.noMinimizeFieldSet = true;
52887 }
52888 if (("SystemModal" == name))
52889 {
52890 this.systemModalField = Enums.ParseYesNoType(value);
52891 this.systemModalFieldSet = true;
52892 }
52893 if (("KeepModeless" == name))
52894 {
52895 this.keepModelessField = Enums.ParseYesNoType(value);
52896 this.keepModelessFieldSet = true;
52897 }
52898 if (("TrackDiskSpace" == name))
52899 {
52900 this.trackDiskSpaceField = Enums.ParseYesNoType(value);
52901 this.trackDiskSpaceFieldSet = true;
52902 }
52903 if (("CustomPalette" == name))
52904 {
52905 this.customPaletteField = Enums.ParseYesNoType(value);
52906 this.customPaletteFieldSet = true;
52907 }
52908 if (("RightToLeft" == name))
52909 {
52910 this.rightToLeftField = Enums.ParseYesNoType(value);
52911 this.rightToLeftFieldSet = true;
52912 }
52913 if (("RightAligned" == name))
52914 {
52915 this.rightAlignedField = Enums.ParseYesNoType(value);
52916 this.rightAlignedFieldSet = true;
52917 }
52918 if (("LeftScroll" == name))
52919 {
52920 this.leftScrollField = Enums.ParseYesNoType(value);
52921 this.leftScrollFieldSet = true;
52922 }
52923 if (("ErrorDialog" == name))
52924 {
52925 this.errorDialogField = Enums.ParseYesNoType(value);
52926 this.errorDialogFieldSet = true;
52927 }
52928 }
52929 }
52930
52931 /// <summary>
52932 /// Reference to a Dialog. This will cause the entire referenced section's contents
52933 /// to be included in the installer database.
52934 /// </summary>
52935 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
52936 public class DialogRef : ISchemaElement, ISetAttributes
52937 {
52938
52939 private string idField;
52940
52941 private bool idFieldSet;
52942
52943 private ISchemaElement parentElement;
52944
52945 /// <summary>
52946 /// The identifier of the Dialog to reference.
52947 /// </summary>
52948 public string Id
52949 {
52950 get
52951 {
52952 return this.idField;
52953 }
52954 set
52955 {
52956 this.idFieldSet = true;
52957 this.idField = value;
52958 }
52959 }
52960
52961 public virtual ISchemaElement ParentElement
52962 {
52963 get
52964 {
52965 return this.parentElement;
52966 }
52967 set
52968 {
52969 this.parentElement = value;
52970 }
52971 }
52972
52973 /// <summary>
52974 /// Processes this element and all child elements into an XmlWriter.
52975 /// </summary>
52976 public virtual void OutputXml(XmlWriter writer)
52977 {
52978 if ((null == writer))
52979 {
52980 throw new ArgumentNullException("writer");
52981 }
52982 writer.WriteStartElement("DialogRef", "http://wixtoolset.org/schemas/v4/wxs");
52983 if (this.idFieldSet)
52984 {
52985 writer.WriteAttributeString("Id", this.idField);
52986 }
52987 writer.WriteEndElement();
52988 }
52989
52990 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
52991 void ISetAttributes.SetAttribute(string name, string value)
52992 {
52993 if (String.IsNullOrEmpty(name))
52994 {
52995 throw new ArgumentNullException("name");
52996 }
52997 if (("Id" == name))
52998 {
52999 this.idField = value;
53000 this.idFieldSet = true;
53001 }
53002 }
53003 }
53004
53005 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53006 public class ProgressText : ISchemaElement, ISetAttributes
53007 {
53008
53009 private string actionField;
53010
53011 private bool actionFieldSet;
53012
53013 private string templateField;
53014
53015 private bool templateFieldSet;
53016
53017 private string contentField;
53018
53019 private bool contentFieldSet;
53020
53021 private ISchemaElement parentElement;
53022
53023 public string Action
53024 {
53025 get
53026 {
53027 return this.actionField;
53028 }
53029 set
53030 {
53031 this.actionFieldSet = true;
53032 this.actionField = value;
53033 }
53034 }
53035
53036 /// <summary>
53037 /// used to format ActionData messages from action processing
53038 /// </summary>
53039 public string Template
53040 {
53041 get
53042 {
53043 return this.templateField;
53044 }
53045 set
53046 {
53047 this.templateFieldSet = true;
53048 this.templateField = value;
53049 }
53050 }
53051
53052 /// <summary>
53053 /// Element value is progress message text for action
53054 /// </summary>
53055 public string Content
53056 {
53057 get
53058 {
53059 return this.contentField;
53060 }
53061 set
53062 {
53063 this.contentFieldSet = true;
53064 this.contentField = value;
53065 }
53066 }
53067
53068 public virtual ISchemaElement ParentElement
53069 {
53070 get
53071 {
53072 return this.parentElement;
53073 }
53074 set
53075 {
53076 this.parentElement = value;
53077 }
53078 }
53079
53080 /// <summary>
53081 /// Processes this element and all child elements into an XmlWriter.
53082 /// </summary>
53083 public virtual void OutputXml(XmlWriter writer)
53084 {
53085 if ((null == writer))
53086 {
53087 throw new ArgumentNullException("writer");
53088 }
53089 writer.WriteStartElement("ProgressText", "http://wixtoolset.org/schemas/v4/wxs");
53090 if (this.actionFieldSet)
53091 {
53092 writer.WriteAttributeString("Action", this.actionField);
53093 }
53094 if (this.templateFieldSet)
53095 {
53096 writer.WriteAttributeString("Template", this.templateField);
53097 }
53098 if (this.contentFieldSet)
53099 {
53100 writer.WriteString(this.contentField);
53101 }
53102 writer.WriteEndElement();
53103 }
53104
53105 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53106 void ISetAttributes.SetAttribute(string name, string value)
53107 {
53108 if (String.IsNullOrEmpty(name))
53109 {
53110 throw new ArgumentNullException("name");
53111 }
53112 if (("Action" == name))
53113 {
53114 this.actionField = value;
53115 this.actionFieldSet = true;
53116 }
53117 if (("Template" == name))
53118 {
53119 this.templateField = value;
53120 this.templateFieldSet = true;
53121 }
53122 if (("Content" == name))
53123 {
53124 this.contentField = value;
53125 this.contentFieldSet = true;
53126 }
53127 }
53128 }
53129
53130 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53131 public class TextStyle : ISchemaElement, ISetAttributes
53132 {
53133
53134 private string idField;
53135
53136 private bool idFieldSet;
53137
53138 private string faceNameField;
53139
53140 private bool faceNameFieldSet;
53141
53142 private string sizeField;
53143
53144 private bool sizeFieldSet;
53145
53146 private int redField;
53147
53148 private bool redFieldSet;
53149
53150 private int greenField;
53151
53152 private bool greenFieldSet;
53153
53154 private int blueField;
53155
53156 private bool blueFieldSet;
53157
53158 private YesNoType boldField;
53159
53160 private bool boldFieldSet;
53161
53162 private YesNoType italicField;
53163
53164 private bool italicFieldSet;
53165
53166 private YesNoType underlineField;
53167
53168 private bool underlineFieldSet;
53169
53170 private YesNoType strikeField;
53171
53172 private bool strikeFieldSet;
53173
53174 private ISchemaElement parentElement;
53175
53176 public string Id
53177 {
53178 get
53179 {
53180 return this.idField;
53181 }
53182 set
53183 {
53184 this.idFieldSet = true;
53185 this.idField = value;
53186 }
53187 }
53188
53189 public string FaceName
53190 {
53191 get
53192 {
53193 return this.faceNameField;
53194 }
53195 set
53196 {
53197 this.faceNameFieldSet = true;
53198 this.faceNameField = value;
53199 }
53200 }
53201
53202 public string Size
53203 {
53204 get
53205 {
53206 return this.sizeField;
53207 }
53208 set
53209 {
53210 this.sizeFieldSet = true;
53211 this.sizeField = value;
53212 }
53213 }
53214
53215 /// <summary>
53216 /// 0 to 255
53217 /// </summary>
53218 public int Red
53219 {
53220 get
53221 {
53222 return this.redField;
53223 }
53224 set
53225 {
53226 this.redFieldSet = true;
53227 this.redField = value;
53228 }
53229 }
53230
53231 /// <summary>
53232 /// 0 to 255
53233 /// </summary>
53234 public int Green
53235 {
53236 get
53237 {
53238 return this.greenField;
53239 }
53240 set
53241 {
53242 this.greenFieldSet = true;
53243 this.greenField = value;
53244 }
53245 }
53246
53247 /// <summary>
53248 /// 0 to 255
53249 /// </summary>
53250 public int Blue
53251 {
53252 get
53253 {
53254 return this.blueField;
53255 }
53256 set
53257 {
53258 this.blueFieldSet = true;
53259 this.blueField = value;
53260 }
53261 }
53262
53263 public YesNoType Bold
53264 {
53265 get
53266 {
53267 return this.boldField;
53268 }
53269 set
53270 {
53271 this.boldFieldSet = true;
53272 this.boldField = value;
53273 }
53274 }
53275
53276 public YesNoType Italic
53277 {
53278 get
53279 {
53280 return this.italicField;
53281 }
53282 set
53283 {
53284 this.italicFieldSet = true;
53285 this.italicField = value;
53286 }
53287 }
53288
53289 public YesNoType Underline
53290 {
53291 get
53292 {
53293 return this.underlineField;
53294 }
53295 set
53296 {
53297 this.underlineFieldSet = true;
53298 this.underlineField = value;
53299 }
53300 }
53301
53302 public YesNoType Strike
53303 {
53304 get
53305 {
53306 return this.strikeField;
53307 }
53308 set
53309 {
53310 this.strikeFieldSet = true;
53311 this.strikeField = value;
53312 }
53313 }
53314
53315 public virtual ISchemaElement ParentElement
53316 {
53317 get
53318 {
53319 return this.parentElement;
53320 }
53321 set
53322 {
53323 this.parentElement = value;
53324 }
53325 }
53326
53327 /// <summary>
53328 /// Processes this element and all child elements into an XmlWriter.
53329 /// </summary>
53330 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
53331 public virtual void OutputXml(XmlWriter writer)
53332 {
53333 if ((null == writer))
53334 {
53335 throw new ArgumentNullException("writer");
53336 }
53337 writer.WriteStartElement("TextStyle", "http://wixtoolset.org/schemas/v4/wxs");
53338 if (this.idFieldSet)
53339 {
53340 writer.WriteAttributeString("Id", this.idField);
53341 }
53342 if (this.faceNameFieldSet)
53343 {
53344 writer.WriteAttributeString("FaceName", this.faceNameField);
53345 }
53346 if (this.sizeFieldSet)
53347 {
53348 writer.WriteAttributeString("Size", this.sizeField);
53349 }
53350 if (this.redFieldSet)
53351 {
53352 writer.WriteAttributeString("Red", this.redField.ToString(CultureInfo.InvariantCulture));
53353 }
53354 if (this.greenFieldSet)
53355 {
53356 writer.WriteAttributeString("Green", this.greenField.ToString(CultureInfo.InvariantCulture));
53357 }
53358 if (this.blueFieldSet)
53359 {
53360 writer.WriteAttributeString("Blue", this.blueField.ToString(CultureInfo.InvariantCulture));
53361 }
53362 if (this.boldFieldSet)
53363 {
53364 if ((this.boldField == YesNoType.no))
53365 {
53366 writer.WriteAttributeString("Bold", "no");
53367 }
53368 if ((this.boldField == YesNoType.yes))
53369 {
53370 writer.WriteAttributeString("Bold", "yes");
53371 }
53372 }
53373 if (this.italicFieldSet)
53374 {
53375 if ((this.italicField == YesNoType.no))
53376 {
53377 writer.WriteAttributeString("Italic", "no");
53378 }
53379 if ((this.italicField == YesNoType.yes))
53380 {
53381 writer.WriteAttributeString("Italic", "yes");
53382 }
53383 }
53384 if (this.underlineFieldSet)
53385 {
53386 if ((this.underlineField == YesNoType.no))
53387 {
53388 writer.WriteAttributeString("Underline", "no");
53389 }
53390 if ((this.underlineField == YesNoType.yes))
53391 {
53392 writer.WriteAttributeString("Underline", "yes");
53393 }
53394 }
53395 if (this.strikeFieldSet)
53396 {
53397 if ((this.strikeField == YesNoType.no))
53398 {
53399 writer.WriteAttributeString("Strike", "no");
53400 }
53401 if ((this.strikeField == YesNoType.yes))
53402 {
53403 writer.WriteAttributeString("Strike", "yes");
53404 }
53405 }
53406 writer.WriteEndElement();
53407 }
53408
53409 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53410 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
53411 void ISetAttributes.SetAttribute(string name, string value)
53412 {
53413 if (String.IsNullOrEmpty(name))
53414 {
53415 throw new ArgumentNullException("name");
53416 }
53417 if (("Id" == name))
53418 {
53419 this.idField = value;
53420 this.idFieldSet = true;
53421 }
53422 if (("FaceName" == name))
53423 {
53424 this.faceNameField = value;
53425 this.faceNameFieldSet = true;
53426 }
53427 if (("Size" == name))
53428 {
53429 this.sizeField = value;
53430 this.sizeFieldSet = true;
53431 }
53432 if (("Red" == name))
53433 {
53434 this.redField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
53435 this.redFieldSet = true;
53436 }
53437 if (("Green" == name))
53438 {
53439 this.greenField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
53440 this.greenFieldSet = true;
53441 }
53442 if (("Blue" == name))
53443 {
53444 this.blueField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
53445 this.blueFieldSet = true;
53446 }
53447 if (("Bold" == name))
53448 {
53449 this.boldField = Enums.ParseYesNoType(value);
53450 this.boldFieldSet = true;
53451 }
53452 if (("Italic" == name))
53453 {
53454 this.italicField = Enums.ParseYesNoType(value);
53455 this.italicFieldSet = true;
53456 }
53457 if (("Underline" == name))
53458 {
53459 this.underlineField = Enums.ParseYesNoType(value);
53460 this.underlineFieldSet = true;
53461 }
53462 if (("Strike" == name))
53463 {
53464 this.strikeField = Enums.ParseYesNoType(value);
53465 this.strikeFieldSet = true;
53466 }
53467 }
53468 }
53469
53470 /// <summary>
53471 /// The value (and optional text) associated with an item in a ComboBox, ListBox, or ListView.
53472 /// </summary>
53473 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53474 public class ListItem : ISchemaElement, ISetAttributes
53475 {
53476
53477 private string valueField;
53478
53479 private bool valueFieldSet;
53480
53481 private string textField;
53482
53483 private bool textFieldSet;
53484
53485 private string iconField;
53486
53487 private bool iconFieldSet;
53488
53489 private ISchemaElement parentElement;
53490
53491 /// <summary>
53492 /// The value assigned to the associated ComboBox, ListBox, or ListView property if this item is selected.
53493 /// </summary>
53494 public string Value
53495 {
53496 get
53497 {
53498 return this.valueField;
53499 }
53500 set
53501 {
53502 this.valueFieldSet = true;
53503 this.valueField = value;
53504 }
53505 }
53506
53507 /// <summary>
53508 /// The localizable, visible text to be assigned to the item.
53509 /// If not specified, this will default to the value of the Value attribute.
53510 /// </summary>
53511 public string Text
53512 {
53513 get
53514 {
53515 return this.textField;
53516 }
53517 set
53518 {
53519 this.textFieldSet = true;
53520 this.textField = value;
53521 }
53522 }
53523
53524 /// <summary>
53525 /// The identifier of the Binary (not Icon) element containing the icon to associate with this item.
53526 /// This value is only valid when nested under a ListView element.
53527 /// </summary>
53528 public string Icon
53529 {
53530 get
53531 {
53532 return this.iconField;
53533 }
53534 set
53535 {
53536 this.iconFieldSet = true;
53537 this.iconField = value;
53538 }
53539 }
53540
53541 public virtual ISchemaElement ParentElement
53542 {
53543 get
53544 {
53545 return this.parentElement;
53546 }
53547 set
53548 {
53549 this.parentElement = value;
53550 }
53551 }
53552
53553 /// <summary>
53554 /// Processes this element and all child elements into an XmlWriter.
53555 /// </summary>
53556 public virtual void OutputXml(XmlWriter writer)
53557 {
53558 if ((null == writer))
53559 {
53560 throw new ArgumentNullException("writer");
53561 }
53562 writer.WriteStartElement("ListItem", "http://wixtoolset.org/schemas/v4/wxs");
53563 if (this.valueFieldSet)
53564 {
53565 writer.WriteAttributeString("Value", this.valueField);
53566 }
53567 if (this.textFieldSet)
53568 {
53569 writer.WriteAttributeString("Text", this.textField);
53570 }
53571 if (this.iconFieldSet)
53572 {
53573 writer.WriteAttributeString("Icon", this.iconField);
53574 }
53575 writer.WriteEndElement();
53576 }
53577
53578 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53579 void ISetAttributes.SetAttribute(string name, string value)
53580 {
53581 if (String.IsNullOrEmpty(name))
53582 {
53583 throw new ArgumentNullException("name");
53584 }
53585 if (("Value" == name))
53586 {
53587 this.valueField = value;
53588 this.valueFieldSet = true;
53589 }
53590 if (("Text" == name))
53591 {
53592 this.textField = value;
53593 this.textFieldSet = true;
53594 }
53595 if (("Icon" == name))
53596 {
53597 this.iconField = value;
53598 this.iconFieldSet = true;
53599 }
53600 }
53601 }
53602
53603 /// <summary>
53604 /// Set of items for a particular ListBox control tied to an install Property
53605 /// </summary>
53606 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53607 public class ListBox : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
53608 {
53609
53610 private ElementCollection children;
53611
53612 private string propertyField;
53613
53614 private bool propertyFieldSet;
53615
53616 private ISchemaElement parentElement;
53617
53618 public ListBox()
53619 {
53620 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
53621 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem)));
53622 this.children = childCollection0;
53623 }
53624
53625 public virtual IEnumerable Children
53626 {
53627 get
53628 {
53629 return this.children;
53630 }
53631 }
53632
53633 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
53634 public virtual IEnumerable this[System.Type childType]
53635 {
53636 get
53637 {
53638 return this.children.Filter(childType);
53639 }
53640 }
53641
53642 /// <summary>
53643 /// Property tied to this group
53644 /// </summary>
53645 public string Property
53646 {
53647 get
53648 {
53649 return this.propertyField;
53650 }
53651 set
53652 {
53653 this.propertyFieldSet = true;
53654 this.propertyField = value;
53655 }
53656 }
53657
53658 public virtual ISchemaElement ParentElement
53659 {
53660 get
53661 {
53662 return this.parentElement;
53663 }
53664 set
53665 {
53666 this.parentElement = value;
53667 }
53668 }
53669
53670 public virtual void AddChild(ISchemaElement child)
53671 {
53672 if ((null == child))
53673 {
53674 throw new ArgumentNullException("child");
53675 }
53676 this.children.AddElement(child);
53677 child.ParentElement = this;
53678 }
53679
53680 public virtual void RemoveChild(ISchemaElement child)
53681 {
53682 if ((null == child))
53683 {
53684 throw new ArgumentNullException("child");
53685 }
53686 this.children.RemoveElement(child);
53687 child.ParentElement = null;
53688 }
53689
53690 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53691 ISchemaElement ICreateChildren.CreateChild(string childName)
53692 {
53693 if (String.IsNullOrEmpty(childName))
53694 {
53695 throw new ArgumentNullException("childName");
53696 }
53697 ISchemaElement childValue = null;
53698 if (("ListItem" == childName))
53699 {
53700 childValue = new ListItem();
53701 }
53702 if ((null == childValue))
53703 {
53704 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
53705 }
53706 return childValue;
53707 }
53708
53709 /// <summary>
53710 /// Processes this element and all child elements into an XmlWriter.
53711 /// </summary>
53712 public virtual void OutputXml(XmlWriter writer)
53713 {
53714 if ((null == writer))
53715 {
53716 throw new ArgumentNullException("writer");
53717 }
53718 writer.WriteStartElement("ListBox", "http://wixtoolset.org/schemas/v4/wxs");
53719 if (this.propertyFieldSet)
53720 {
53721 writer.WriteAttributeString("Property", this.propertyField);
53722 }
53723 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
53724 {
53725 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
53726 childElement.OutputXml(writer);
53727 }
53728 writer.WriteEndElement();
53729 }
53730
53731 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53732 void ISetAttributes.SetAttribute(string name, string value)
53733 {
53734 if (String.IsNullOrEmpty(name))
53735 {
53736 throw new ArgumentNullException("name");
53737 }
53738 if (("Property" == name))
53739 {
53740 this.propertyField = value;
53741 this.propertyFieldSet = true;
53742 }
53743 }
53744 }
53745
53746 /// <summary>
53747 /// Set of items for a particular ComboBox control tied to an install Property
53748 /// </summary>
53749 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53750 public class ComboBox : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
53751 {
53752
53753 private ElementCollection children;
53754
53755 private string propertyField;
53756
53757 private bool propertyFieldSet;
53758
53759 private ISchemaElement parentElement;
53760
53761 public ComboBox()
53762 {
53763 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
53764 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem)));
53765 this.children = childCollection0;
53766 }
53767
53768 public virtual IEnumerable Children
53769 {
53770 get
53771 {
53772 return this.children;
53773 }
53774 }
53775
53776 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
53777 public virtual IEnumerable this[System.Type childType]
53778 {
53779 get
53780 {
53781 return this.children.Filter(childType);
53782 }
53783 }
53784
53785 /// <summary>
53786 /// Property tied to this group
53787 /// </summary>
53788 public string Property
53789 {
53790 get
53791 {
53792 return this.propertyField;
53793 }
53794 set
53795 {
53796 this.propertyFieldSet = true;
53797 this.propertyField = value;
53798 }
53799 }
53800
53801 public virtual ISchemaElement ParentElement
53802 {
53803 get
53804 {
53805 return this.parentElement;
53806 }
53807 set
53808 {
53809 this.parentElement = value;
53810 }
53811 }
53812
53813 public virtual void AddChild(ISchemaElement child)
53814 {
53815 if ((null == child))
53816 {
53817 throw new ArgumentNullException("child");
53818 }
53819 this.children.AddElement(child);
53820 child.ParentElement = this;
53821 }
53822
53823 public virtual void RemoveChild(ISchemaElement child)
53824 {
53825 if ((null == child))
53826 {
53827 throw new ArgumentNullException("child");
53828 }
53829 this.children.RemoveElement(child);
53830 child.ParentElement = null;
53831 }
53832
53833 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53834 ISchemaElement ICreateChildren.CreateChild(string childName)
53835 {
53836 if (String.IsNullOrEmpty(childName))
53837 {
53838 throw new ArgumentNullException("childName");
53839 }
53840 ISchemaElement childValue = null;
53841 if (("ListItem" == childName))
53842 {
53843 childValue = new ListItem();
53844 }
53845 if ((null == childValue))
53846 {
53847 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
53848 }
53849 return childValue;
53850 }
53851
53852 /// <summary>
53853 /// Processes this element and all child elements into an XmlWriter.
53854 /// </summary>
53855 public virtual void OutputXml(XmlWriter writer)
53856 {
53857 if ((null == writer))
53858 {
53859 throw new ArgumentNullException("writer");
53860 }
53861 writer.WriteStartElement("ComboBox", "http://wixtoolset.org/schemas/v4/wxs");
53862 if (this.propertyFieldSet)
53863 {
53864 writer.WriteAttributeString("Property", this.propertyField);
53865 }
53866 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
53867 {
53868 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
53869 childElement.OutputXml(writer);
53870 }
53871 writer.WriteEndElement();
53872 }
53873
53874 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53875 void ISetAttributes.SetAttribute(string name, string value)
53876 {
53877 if (String.IsNullOrEmpty(name))
53878 {
53879 throw new ArgumentNullException("name");
53880 }
53881 if (("Property" == name))
53882 {
53883 this.propertyField = value;
53884 this.propertyFieldSet = true;
53885 }
53886 }
53887 }
53888
53889 /// <summary>
53890 /// Set of items for a particular ListView control tied to an install Property
53891 /// </summary>
53892 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
53893 public class ListView : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
53894 {
53895
53896 private ElementCollection children;
53897
53898 private string propertyField;
53899
53900 private bool propertyFieldSet;
53901
53902 private ISchemaElement parentElement;
53903
53904 public ListView()
53905 {
53906 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
53907 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem)));
53908 this.children = childCollection0;
53909 }
53910
53911 public virtual IEnumerable Children
53912 {
53913 get
53914 {
53915 return this.children;
53916 }
53917 }
53918
53919 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
53920 public virtual IEnumerable this[System.Type childType]
53921 {
53922 get
53923 {
53924 return this.children.Filter(childType);
53925 }
53926 }
53927
53928 /// <summary>
53929 /// Property tied to this group
53930 /// </summary>
53931 public string Property
53932 {
53933 get
53934 {
53935 return this.propertyField;
53936 }
53937 set
53938 {
53939 this.propertyFieldSet = true;
53940 this.propertyField = value;
53941 }
53942 }
53943
53944 public virtual ISchemaElement ParentElement
53945 {
53946 get
53947 {
53948 return this.parentElement;
53949 }
53950 set
53951 {
53952 this.parentElement = value;
53953 }
53954 }
53955
53956 public virtual void AddChild(ISchemaElement child)
53957 {
53958 if ((null == child))
53959 {
53960 throw new ArgumentNullException("child");
53961 }
53962 this.children.AddElement(child);
53963 child.ParentElement = this;
53964 }
53965
53966 public virtual void RemoveChild(ISchemaElement child)
53967 {
53968 if ((null == child))
53969 {
53970 throw new ArgumentNullException("child");
53971 }
53972 this.children.RemoveElement(child);
53973 child.ParentElement = null;
53974 }
53975
53976 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
53977 ISchemaElement ICreateChildren.CreateChild(string childName)
53978 {
53979 if (String.IsNullOrEmpty(childName))
53980 {
53981 throw new ArgumentNullException("childName");
53982 }
53983 ISchemaElement childValue = null;
53984 if (("ListItem" == childName))
53985 {
53986 childValue = new ListItem();
53987 }
53988 if ((null == childValue))
53989 {
53990 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
53991 }
53992 return childValue;
53993 }
53994
53995 /// <summary>
53996 /// Processes this element and all child elements into an XmlWriter.
53997 /// </summary>
53998 public virtual void OutputXml(XmlWriter writer)
53999 {
54000 if ((null == writer))
54001 {
54002 throw new ArgumentNullException("writer");
54003 }
54004 writer.WriteStartElement("ListView", "http://wixtoolset.org/schemas/v4/wxs");
54005 if (this.propertyFieldSet)
54006 {
54007 writer.WriteAttributeString("Property", this.propertyField);
54008 }
54009 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
54010 {
54011 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
54012 childElement.OutputXml(writer);
54013 }
54014 writer.WriteEndElement();
54015 }
54016
54017 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54018 void ISetAttributes.SetAttribute(string name, string value)
54019 {
54020 if (String.IsNullOrEmpty(name))
54021 {
54022 throw new ArgumentNullException("name");
54023 }
54024 if (("Property" == name))
54025 {
54026 this.propertyField = value;
54027 this.propertyFieldSet = true;
54028 }
54029 }
54030 }
54031
54032 /// <summary>
54033 /// Text or Icon plus Value that is assigned to the Property of the parent Control (RadioButtonGroup).
54034 /// </summary>
54035 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54036 public class RadioButton : ISchemaElement, ISetAttributes
54037 {
54038
54039 private string bitmapField;
54040
54041 private bool bitmapFieldSet;
54042
54043 private string heightField;
54044
54045 private bool heightFieldSet;
54046
54047 private string helpField;
54048
54049 private bool helpFieldSet;
54050
54051 private string iconField;
54052
54053 private bool iconFieldSet;
54054
54055 private string textField;
54056
54057 private bool textFieldSet;
54058
54059 private string toolTipField;
54060
54061 private bool toolTipFieldSet;
54062
54063 private string valueField;
54064
54065 private bool valueFieldSet;
54066
54067 private string widthField;
54068
54069 private bool widthFieldSet;
54070
54071 private string xField;
54072
54073 private bool xFieldSet;
54074
54075 private string yField;
54076
54077 private bool yFieldSet;
54078
54079 private ISchemaElement parentElement;
54080
54081 /// <summary>
54082 /// This attribute defines the bitmap displayed with the radio button. The value of the attribute creates a reference
54083 /// to a Binary element that represents the bitmap. This attribute is mutually exclusive with the Icon and Text
54084 /// attributes.
54085 /// </summary>
54086 public string Bitmap
54087 {
54088 get
54089 {
54090 return this.bitmapField;
54091 }
54092 set
54093 {
54094 this.bitmapFieldSet = true;
54095 this.bitmapField = value;
54096 }
54097 }
54098
54099 public string Height
54100 {
54101 get
54102 {
54103 return this.heightField;
54104 }
54105 set
54106 {
54107 this.heightFieldSet = true;
54108 this.heightField = value;
54109 }
54110 }
54111
54112 public string Help
54113 {
54114 get
54115 {
54116 return this.helpField;
54117 }
54118 set
54119 {
54120 this.helpFieldSet = true;
54121 this.helpField = value;
54122 }
54123 }
54124
54125 /// <summary>
54126 /// This attribute defines the icon displayed with the radio button. The value of the attribute creates a reference
54127 /// to a Binary element that represents the icon. This attribute is mutually exclusive with the Bitmap and Text
54128 /// attributes.
54129 /// </summary>
54130 public string Icon
54131 {
54132 get
54133 {
54134 return this.iconField;
54135 }
54136 set
54137 {
54138 this.iconFieldSet = true;
54139 this.iconField = value;
54140 }
54141 }
54142
54143 /// <summary>
54144 /// Text displayed with the radio button. This attribute is mutually exclusive with the Bitmap and Icon attributes.
54145 /// </summary>
54146 public string Text
54147 {
54148 get
54149 {
54150 return this.textField;
54151 }
54152 set
54153 {
54154 this.textFieldSet = true;
54155 this.textField = value;
54156 }
54157 }
54158
54159 public string ToolTip
54160 {
54161 get
54162 {
54163 return this.toolTipField;
54164 }
54165 set
54166 {
54167 this.toolTipFieldSet = true;
54168 this.toolTipField = value;
54169 }
54170 }
54171
54172 /// <summary>
54173 /// Value assigned to the associated control Property when this radio button is selected.
54174 /// </summary>
54175 public string Value
54176 {
54177 get
54178 {
54179 return this.valueField;
54180 }
54181 set
54182 {
54183 this.valueFieldSet = true;
54184 this.valueField = value;
54185 }
54186 }
54187
54188 public string Width
54189 {
54190 get
54191 {
54192 return this.widthField;
54193 }
54194 set
54195 {
54196 this.widthFieldSet = true;
54197 this.widthField = value;
54198 }
54199 }
54200
54201 public string X
54202 {
54203 get
54204 {
54205 return this.xField;
54206 }
54207 set
54208 {
54209 this.xFieldSet = true;
54210 this.xField = value;
54211 }
54212 }
54213
54214 public string Y
54215 {
54216 get
54217 {
54218 return this.yField;
54219 }
54220 set
54221 {
54222 this.yFieldSet = true;
54223 this.yField = value;
54224 }
54225 }
54226
54227 public virtual ISchemaElement ParentElement
54228 {
54229 get
54230 {
54231 return this.parentElement;
54232 }
54233 set
54234 {
54235 this.parentElement = value;
54236 }
54237 }
54238
54239 /// <summary>
54240 /// Processes this element and all child elements into an XmlWriter.
54241 /// </summary>
54242 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
54243 public virtual void OutputXml(XmlWriter writer)
54244 {
54245 if ((null == writer))
54246 {
54247 throw new ArgumentNullException("writer");
54248 }
54249 writer.WriteStartElement("RadioButton", "http://wixtoolset.org/schemas/v4/wxs");
54250 if (this.bitmapFieldSet)
54251 {
54252 writer.WriteAttributeString("Bitmap", this.bitmapField);
54253 }
54254 if (this.heightFieldSet)
54255 {
54256 writer.WriteAttributeString("Height", this.heightField);
54257 }
54258 if (this.helpFieldSet)
54259 {
54260 writer.WriteAttributeString("Help", this.helpField);
54261 }
54262 if (this.iconFieldSet)
54263 {
54264 writer.WriteAttributeString("Icon", this.iconField);
54265 }
54266 if (this.textFieldSet)
54267 {
54268 writer.WriteAttributeString("Text", this.textField);
54269 }
54270 if (this.toolTipFieldSet)
54271 {
54272 writer.WriteAttributeString("ToolTip", this.toolTipField);
54273 }
54274 if (this.valueFieldSet)
54275 {
54276 writer.WriteAttributeString("Value", this.valueField);
54277 }
54278 if (this.widthFieldSet)
54279 {
54280 writer.WriteAttributeString("Width", this.widthField);
54281 }
54282 if (this.xFieldSet)
54283 {
54284 writer.WriteAttributeString("X", this.xField);
54285 }
54286 if (this.yFieldSet)
54287 {
54288 writer.WriteAttributeString("Y", this.yField);
54289 }
54290 writer.WriteEndElement();
54291 }
54292
54293 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54294 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
54295 void ISetAttributes.SetAttribute(string name, string value)
54296 {
54297 if (String.IsNullOrEmpty(name))
54298 {
54299 throw new ArgumentNullException("name");
54300 }
54301 if (("Bitmap" == name))
54302 {
54303 this.bitmapField = value;
54304 this.bitmapFieldSet = true;
54305 }
54306 if (("Height" == name))
54307 {
54308 this.heightField = value;
54309 this.heightFieldSet = true;
54310 }
54311 if (("Help" == name))
54312 {
54313 this.helpField = value;
54314 this.helpFieldSet = true;
54315 }
54316 if (("Icon" == name))
54317 {
54318 this.iconField = value;
54319 this.iconFieldSet = true;
54320 }
54321 if (("Text" == name))
54322 {
54323 this.textField = value;
54324 this.textFieldSet = true;
54325 }
54326 if (("ToolTip" == name))
54327 {
54328 this.toolTipField = value;
54329 this.toolTipFieldSet = true;
54330 }
54331 if (("Value" == name))
54332 {
54333 this.valueField = value;
54334 this.valueFieldSet = true;
54335 }
54336 if (("Width" == name))
54337 {
54338 this.widthField = value;
54339 this.widthFieldSet = true;
54340 }
54341 if (("X" == name))
54342 {
54343 this.xField = value;
54344 this.xFieldSet = true;
54345 }
54346 if (("Y" == name))
54347 {
54348 this.yField = value;
54349 this.yFieldSet = true;
54350 }
54351 }
54352 }
54353
54354 /// <summary>
54355 /// Set of radio buttons tied to the specified Property
54356 /// </summary>
54357 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54358 public class RadioButtonGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
54359 {
54360
54361 private ElementCollection children;
54362
54363 private string propertyField;
54364
54365 private bool propertyFieldSet;
54366
54367 private ISchemaElement parentElement;
54368
54369 public RadioButtonGroup()
54370 {
54371 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
54372 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RadioButton)));
54373 this.children = childCollection0;
54374 }
54375
54376 public virtual IEnumerable Children
54377 {
54378 get
54379 {
54380 return this.children;
54381 }
54382 }
54383
54384 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
54385 public virtual IEnumerable this[System.Type childType]
54386 {
54387 get
54388 {
54389 return this.children.Filter(childType);
54390 }
54391 }
54392
54393 /// <summary>
54394 /// Property tied to this group.
54395 /// </summary>
54396 public string Property
54397 {
54398 get
54399 {
54400 return this.propertyField;
54401 }
54402 set
54403 {
54404 this.propertyFieldSet = true;
54405 this.propertyField = value;
54406 }
54407 }
54408
54409 public virtual ISchemaElement ParentElement
54410 {
54411 get
54412 {
54413 return this.parentElement;
54414 }
54415 set
54416 {
54417 this.parentElement = value;
54418 }
54419 }
54420
54421 public virtual void AddChild(ISchemaElement child)
54422 {
54423 if ((null == child))
54424 {
54425 throw new ArgumentNullException("child");
54426 }
54427 this.children.AddElement(child);
54428 child.ParentElement = this;
54429 }
54430
54431 public virtual void RemoveChild(ISchemaElement child)
54432 {
54433 if ((null == child))
54434 {
54435 throw new ArgumentNullException("child");
54436 }
54437 this.children.RemoveElement(child);
54438 child.ParentElement = null;
54439 }
54440
54441 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54442 ISchemaElement ICreateChildren.CreateChild(string childName)
54443 {
54444 if (String.IsNullOrEmpty(childName))
54445 {
54446 throw new ArgumentNullException("childName");
54447 }
54448 ISchemaElement childValue = null;
54449 if (("RadioButton" == childName))
54450 {
54451 childValue = new RadioButton();
54452 }
54453 if ((null == childValue))
54454 {
54455 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
54456 }
54457 return childValue;
54458 }
54459
54460 /// <summary>
54461 /// Processes this element and all child elements into an XmlWriter.
54462 /// </summary>
54463 public virtual void OutputXml(XmlWriter writer)
54464 {
54465 if ((null == writer))
54466 {
54467 throw new ArgumentNullException("writer");
54468 }
54469 writer.WriteStartElement("RadioButtonGroup", "http://wixtoolset.org/schemas/v4/wxs");
54470 if (this.propertyFieldSet)
54471 {
54472 writer.WriteAttributeString("Property", this.propertyField);
54473 }
54474 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
54475 {
54476 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
54477 childElement.OutputXml(writer);
54478 }
54479 writer.WriteEndElement();
54480 }
54481
54482 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54483 void ISetAttributes.SetAttribute(string name, string value)
54484 {
54485 if (String.IsNullOrEmpty(name))
54486 {
54487 throw new ArgumentNullException("name");
54488 }
54489 if (("Property" == name))
54490 {
54491 this.propertyField = value;
54492 this.propertyFieldSet = true;
54493 }
54494 }
54495 }
54496
54497 /// <summary>
54498 /// Text associated with certain controls
54499 /// </summary>
54500 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54501 public class UIText : ISchemaElement, ISetAttributes
54502 {
54503
54504 private string idField;
54505
54506 private bool idFieldSet;
54507
54508 private string contentField;
54509
54510 private bool contentFieldSet;
54511
54512 private ISchemaElement parentElement;
54513
54514 public string Id
54515 {
54516 get
54517 {
54518 return this.idField;
54519 }
54520 set
54521 {
54522 this.idFieldSet = true;
54523 this.idField = value;
54524 }
54525 }
54526
54527 /// <summary>
54528 /// Element value is text, may use CDATA if needed to escape XML delimiters
54529 /// </summary>
54530 public string Content
54531 {
54532 get
54533 {
54534 return this.contentField;
54535 }
54536 set
54537 {
54538 this.contentFieldSet = true;
54539 this.contentField = value;
54540 }
54541 }
54542
54543 public virtual ISchemaElement ParentElement
54544 {
54545 get
54546 {
54547 return this.parentElement;
54548 }
54549 set
54550 {
54551 this.parentElement = value;
54552 }
54553 }
54554
54555 /// <summary>
54556 /// Processes this element and all child elements into an XmlWriter.
54557 /// </summary>
54558 public virtual void OutputXml(XmlWriter writer)
54559 {
54560 if ((null == writer))
54561 {
54562 throw new ArgumentNullException("writer");
54563 }
54564 writer.WriteStartElement("UIText", "http://wixtoolset.org/schemas/v4/wxs");
54565 if (this.idFieldSet)
54566 {
54567 writer.WriteAttributeString("Id", this.idField);
54568 }
54569 if (this.contentFieldSet)
54570 {
54571 writer.WriteString(this.contentField);
54572 }
54573 writer.WriteEndElement();
54574 }
54575
54576 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54577 void ISetAttributes.SetAttribute(string name, string value)
54578 {
54579 if (String.IsNullOrEmpty(name))
54580 {
54581 throw new ArgumentNullException("name");
54582 }
54583 if (("Id" == name))
54584 {
54585 this.idField = value;
54586 this.idFieldSet = true;
54587 }
54588 if (("Content" == name))
54589 {
54590 this.contentField = value;
54591 this.contentFieldSet = true;
54592 }
54593 }
54594 }
54595
54596 /// <summary>
54597 /// Reference to a UI element. This will force the entire referenced Fragment's contents
54598 /// to be included in the installer database.
54599 /// </summary>
54600 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54601 public class UIRef : ISchemaElement, ISetAttributes
54602 {
54603
54604 private string idField;
54605
54606 private bool idFieldSet;
54607
54608 private ISchemaElement parentElement;
54609
54610 public string Id
54611 {
54612 get
54613 {
54614 return this.idField;
54615 }
54616 set
54617 {
54618 this.idFieldSet = true;
54619 this.idField = value;
54620 }
54621 }
54622
54623 public virtual ISchemaElement ParentElement
54624 {
54625 get
54626 {
54627 return this.parentElement;
54628 }
54629 set
54630 {
54631 this.parentElement = value;
54632 }
54633 }
54634
54635 /// <summary>
54636 /// Processes this element and all child elements into an XmlWriter.
54637 /// </summary>
54638 public virtual void OutputXml(XmlWriter writer)
54639 {
54640 if ((null == writer))
54641 {
54642 throw new ArgumentNullException("writer");
54643 }
54644 writer.WriteStartElement("UIRef", "http://wixtoolset.org/schemas/v4/wxs");
54645 if (this.idFieldSet)
54646 {
54647 writer.WriteAttributeString("Id", this.idField);
54648 }
54649 writer.WriteEndElement();
54650 }
54651
54652 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54653 void ISetAttributes.SetAttribute(string name, string value)
54654 {
54655 if (String.IsNullOrEmpty(name))
54656 {
54657 throw new ArgumentNullException("name");
54658 }
54659 if (("Id" == name))
54660 {
54661 this.idField = value;
54662 this.idFieldSet = true;
54663 }
54664 }
54665 }
54666
54667 /// <summary>
54668 /// Enclosing element to compartmentalize UI specifications.
54669 /// </summary>
54670 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54671 public class UI : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
54672 {
54673
54674 private ElementCollection children;
54675
54676 private string idField;
54677
54678 private bool idFieldSet;
54679
54680 private ISchemaElement parentElement;
54681
54682 public UI()
54683 {
54684 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
54685 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedUI)));
54686 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Error)));
54687 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgressText)));
54688 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BillboardAction)));
54689 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComboBox)));
54690 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ListBox)));
54691 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ListView)));
54692 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RadioButtonGroup)));
54693 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TextStyle)));
54694 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIText)));
54695 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Dialog)));
54696 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DialogRef)));
54697 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Publish)));
54698 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef)));
54699 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property)));
54700 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Binary)));
54701 ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence);
54702 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence)));
54703 childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence)));
54704 childCollection0.AddCollection(childCollection1);
54705 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef)));
54706 this.children = childCollection0;
54707 }
54708
54709 public virtual IEnumerable Children
54710 {
54711 get
54712 {
54713 return this.children;
54714 }
54715 }
54716
54717 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
54718 public virtual IEnumerable this[System.Type childType]
54719 {
54720 get
54721 {
54722 return this.children.Filter(childType);
54723 }
54724 }
54725
54726 public string Id
54727 {
54728 get
54729 {
54730 return this.idField;
54731 }
54732 set
54733 {
54734 this.idFieldSet = true;
54735 this.idField = value;
54736 }
54737 }
54738
54739 public virtual ISchemaElement ParentElement
54740 {
54741 get
54742 {
54743 return this.parentElement;
54744 }
54745 set
54746 {
54747 this.parentElement = value;
54748 }
54749 }
54750
54751 public virtual void AddChild(ISchemaElement child)
54752 {
54753 if ((null == child))
54754 {
54755 throw new ArgumentNullException("child");
54756 }
54757 this.children.AddElement(child);
54758 child.ParentElement = this;
54759 }
54760
54761 public virtual void RemoveChild(ISchemaElement child)
54762 {
54763 if ((null == child))
54764 {
54765 throw new ArgumentNullException("child");
54766 }
54767 this.children.RemoveElement(child);
54768 child.ParentElement = null;
54769 }
54770
54771 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54772 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
54773 ISchemaElement ICreateChildren.CreateChild(string childName)
54774 {
54775 if (String.IsNullOrEmpty(childName))
54776 {
54777 throw new ArgumentNullException("childName");
54778 }
54779 ISchemaElement childValue = null;
54780 if (("EmbeddedUI" == childName))
54781 {
54782 childValue = new EmbeddedUI();
54783 }
54784 if (("Error" == childName))
54785 {
54786 childValue = new Error();
54787 }
54788 if (("ProgressText" == childName))
54789 {
54790 childValue = new ProgressText();
54791 }
54792 if (("BillboardAction" == childName))
54793 {
54794 childValue = new BillboardAction();
54795 }
54796 if (("ComboBox" == childName))
54797 {
54798 childValue = new ComboBox();
54799 }
54800 if (("ListBox" == childName))
54801 {
54802 childValue = new ListBox();
54803 }
54804 if (("ListView" == childName))
54805 {
54806 childValue = new ListView();
54807 }
54808 if (("RadioButtonGroup" == childName))
54809 {
54810 childValue = new RadioButtonGroup();
54811 }
54812 if (("TextStyle" == childName))
54813 {
54814 childValue = new TextStyle();
54815 }
54816 if (("UIText" == childName))
54817 {
54818 childValue = new UIText();
54819 }
54820 if (("Dialog" == childName))
54821 {
54822 childValue = new Dialog();
54823 }
54824 if (("DialogRef" == childName))
54825 {
54826 childValue = new DialogRef();
54827 }
54828 if (("Publish" == childName))
54829 {
54830 childValue = new Publish();
54831 }
54832 if (("PropertyRef" == childName))
54833 {
54834 childValue = new PropertyRef();
54835 }
54836 if (("Property" == childName))
54837 {
54838 childValue = new Property();
54839 }
54840 if (("Binary" == childName))
54841 {
54842 childValue = new Binary();
54843 }
54844 if (("AdminUISequence" == childName))
54845 {
54846 childValue = new AdminUISequence();
54847 }
54848 if (("InstallUISequence" == childName))
54849 {
54850 childValue = new InstallUISequence();
54851 }
54852 if (("UIRef" == childName))
54853 {
54854 childValue = new UIRef();
54855 }
54856 if ((null == childValue))
54857 {
54858 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
54859 }
54860 return childValue;
54861 }
54862
54863 /// <summary>
54864 /// Processes this element and all child elements into an XmlWriter.
54865 /// </summary>
54866 public virtual void OutputXml(XmlWriter writer)
54867 {
54868 if ((null == writer))
54869 {
54870 throw new ArgumentNullException("writer");
54871 }
54872 writer.WriteStartElement("UI", "http://wixtoolset.org/schemas/v4/wxs");
54873 if (this.idFieldSet)
54874 {
54875 writer.WriteAttributeString("Id", this.idField);
54876 }
54877 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
54878 {
54879 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
54880 childElement.OutputXml(writer);
54881 }
54882 writer.WriteEndElement();
54883 }
54884
54885 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
54886 void ISetAttributes.SetAttribute(string name, string value)
54887 {
54888 if (String.IsNullOrEmpty(name))
54889 {
54890 throw new ArgumentNullException("name");
54891 }
54892 if (("Id" == name))
54893 {
54894 this.idField = value;
54895 this.idFieldSet = true;
54896 }
54897 }
54898 }
54899
54900 /// <summary>
54901 /// Defines a custom table for use from a custom action.
54902 /// </summary>
54903 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
54904 public class CustomTable : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
54905 {
54906
54907 private ElementCollection children;
54908
54909 private string idField;
54910
54911 private bool idFieldSet;
54912
54913 private YesNoType bootstrapperApplicationDataField;
54914
54915 private bool bootstrapperApplicationDataFieldSet;
54916
54917 private ISchemaElement parentElement;
54918
54919 public CustomTable()
54920 {
54921 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
54922 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Column)));
54923 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Row)));
54924 this.children = childCollection0;
54925 }
54926
54927 public virtual IEnumerable Children
54928 {
54929 get
54930 {
54931 return this.children;
54932 }
54933 }
54934
54935 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
54936 public virtual IEnumerable this[System.Type childType]
54937 {
54938 get
54939 {
54940 return this.children.Filter(childType);
54941 }
54942 }
54943
54944 /// <summary>
54945 /// Identifier for the custom table.
54946 /// </summary>
54947 public string Id
54948 {
54949 get
54950 {
54951 return this.idField;
54952 }
54953 set
54954 {
54955 this.idFieldSet = true;
54956 this.idField = value;
54957 }
54958 }
54959
54960 /// <summary>
54961 /// Indicates the table data is transformed into the bootstrapper application data manifest.
54962 /// </summary>
54963 public YesNoType BootstrapperApplicationData
54964 {
54965 get
54966 {
54967 return this.bootstrapperApplicationDataField;
54968 }
54969 set
54970 {
54971 this.bootstrapperApplicationDataFieldSet = true;
54972 this.bootstrapperApplicationDataField = value;
54973 }
54974 }
54975
54976 public virtual ISchemaElement ParentElement
54977 {
54978 get
54979 {
54980 return this.parentElement;
54981 }
54982 set
54983 {
54984 this.parentElement = value;
54985 }
54986 }
54987
54988 public virtual void AddChild(ISchemaElement child)
54989 {
54990 if ((null == child))
54991 {
54992 throw new ArgumentNullException("child");
54993 }
54994 this.children.AddElement(child);
54995 child.ParentElement = this;
54996 }
54997
54998 public virtual void RemoveChild(ISchemaElement child)
54999 {
55000 if ((null == child))
55001 {
55002 throw new ArgumentNullException("child");
55003 }
55004 this.children.RemoveElement(child);
55005 child.ParentElement = null;
55006 }
55007
55008 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
55009 ISchemaElement ICreateChildren.CreateChild(string childName)
55010 {
55011 if (String.IsNullOrEmpty(childName))
55012 {
55013 throw new ArgumentNullException("childName");
55014 }
55015 ISchemaElement childValue = null;
55016 if (("Column" == childName))
55017 {
55018 childValue = new Column();
55019 }
55020 if (("Row" == childName))
55021 {
55022 childValue = new Row();
55023 }
55024 if ((null == childValue))
55025 {
55026 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
55027 }
55028 return childValue;
55029 }
55030
55031 /// <summary>
55032 /// Processes this element and all child elements into an XmlWriter.
55033 /// </summary>
55034 public virtual void OutputXml(XmlWriter writer)
55035 {
55036 if ((null == writer))
55037 {
55038 throw new ArgumentNullException("writer");
55039 }
55040 writer.WriteStartElement("CustomTable", "http://wixtoolset.org/schemas/v4/wxs");
55041 if (this.idFieldSet)
55042 {
55043 writer.WriteAttributeString("Id", this.idField);
55044 }
55045 if (this.bootstrapperApplicationDataFieldSet)
55046 {
55047 if ((this.bootstrapperApplicationDataField == YesNoType.no))
55048 {
55049 writer.WriteAttributeString("BootstrapperApplicationData", "no");
55050 }
55051 if ((this.bootstrapperApplicationDataField == YesNoType.yes))
55052 {
55053 writer.WriteAttributeString("BootstrapperApplicationData", "yes");
55054 }
55055 }
55056 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
55057 {
55058 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
55059 childElement.OutputXml(writer);
55060 }
55061 writer.WriteEndElement();
55062 }
55063
55064 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
55065 void ISetAttributes.SetAttribute(string name, string value)
55066 {
55067 if (String.IsNullOrEmpty(name))
55068 {
55069 throw new ArgumentNullException("name");
55070 }
55071 if (("Id" == name))
55072 {
55073 this.idField = value;
55074 this.idFieldSet = true;
55075 }
55076 if (("BootstrapperApplicationData" == name))
55077 {
55078 this.bootstrapperApplicationDataField = Enums.ParseYesNoType(value);
55079 this.bootstrapperApplicationDataFieldSet = true;
55080 }
55081 }
55082 }
55083
55084 /// <summary>
55085 /// Column definition for a Custom Table
55086 /// </summary>
55087 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
55088 public class Column : ISchemaElement, ISetAttributes
55089 {
55090
55091 private string idField;
55092
55093 private bool idFieldSet;
55094
55095 private YesNoType primaryKeyField;
55096
55097 private bool primaryKeyFieldSet;
55098
55099 private TypeType typeField;
55100
55101 private bool typeFieldSet;
55102
55103 private int widthField;
55104
55105 private bool widthFieldSet;
55106
55107 private YesNoType nullableField;
55108
55109 private bool nullableFieldSet;
55110
55111 private YesNoType localizableField;
55112
55113 private bool localizableFieldSet;
55114
55115 private long minValueField;
55116
55117 private bool minValueFieldSet;
55118
55119 private long maxValueField;
55120
55121 private bool maxValueFieldSet;
55122
55123 private string keyTableField;
55124
55125 private bool keyTableFieldSet;
55126
55127 private int keyColumnField;
55128
55129 private bool keyColumnFieldSet;
55130
55131 private CategoryType categoryField;
55132
55133 private bool categoryFieldSet;
55134
55135 private string setField;
55136
55137 private bool setFieldSet;
55138
55139 private string descriptionField;
55140
55141 private bool descriptionFieldSet;
55142
55143 private ModularizeType modularizeField;
55144
55145 private bool modularizeFieldSet;
55146
55147 private ISchemaElement parentElement;
55148
55149 /// <summary>
55150 /// Identifier for the column.
55151 /// </summary>
55152 public string Id
55153 {
55154 get
55155 {
55156 return this.idField;
55157 }
55158 set
55159 {
55160 this.idFieldSet = true;
55161 this.idField = value;
55162 }
55163 }
55164
55165 /// <summary>
55166 /// Whether this column is a primary key.
55167 /// </summary>
55168 public YesNoType PrimaryKey
55169 {
55170 get
55171 {
55172 return this.primaryKeyField;
55173 }
55174 set
55175 {
55176 this.primaryKeyFieldSet = true;
55177 this.primaryKeyField = value;
55178 }
55179 }
55180
55181 /// <summary>
55182 /// The type of this column.
55183 /// </summary>
55184 public TypeType Type
55185 {
55186 get
55187 {
55188 return this.typeField;
55189 }
55190 set
55191 {
55192 this.typeFieldSet = true;
55193 this.typeField = value;
55194 }
55195 }
55196
55197 /// <summary>
55198 /// Width of this column.
55199 /// </summary>
55200 public int Width
55201 {
55202 get
55203 {
55204 return this.widthField;
55205 }
55206 set
55207 {
55208 this.widthFieldSet = true;
55209 this.widthField = value;
55210 }
55211 }
55212
55213 /// <summary>
55214 /// Whether this column can be left null.
55215 /// </summary>
55216 public YesNoType Nullable
55217 {
55218 get
55219 {
55220 return this.nullableField;
55221 }
55222 set
55223 {
55224 this.nullableFieldSet = true;
55225 this.nullableField = value;
55226 }
55227 }
55228
55229 /// <summary>
55230 /// Whether this column can be localized.
55231 /// </summary>
55232 public YesNoType Localizable
55233 {
55234 get
55235 {
55236 return this.localizableField;
55237 }
55238 set
55239 {
55240 this.localizableFieldSet = true;
55241 this.localizableField = value;
55242 }
55243 }
55244
55245 /// <summary>
55246 /// Minimum value for a numeric value, date or version in this column.
55247 /// </summary>
55248 public long MinValue
55249 {
55250 get
55251 {
55252 return this.minValueField;
55253 }
55254 set
55255 {
55256 this.minValueFieldSet = true;
55257 this.minValueField = value;
55258 }
55259 }
55260
55261 /// <summary>
55262 /// Maximum value for a numeric value, date or version in this column.
55263 /// </summary>
55264 public long MaxValue
55265 {
55266 get
55267 {
55268 return this.maxValueField;
55269 }
55270 set
55271 {
55272 this.maxValueFieldSet = true;
55273 this.maxValueField = value;
55274 }
55275 }
55276
55277 /// <summary>
55278 /// Table in which this column is an external key. Can be semicolon delimited.
55279 /// </summary>
55280 public string KeyTable
55281 {
55282 get
55283 {
55284 return this.keyTableField;
55285 }
55286 set
55287 {
55288 this.keyTableFieldSet = true;
55289 this.keyTableField = value;
55290 }
55291 }
55292
55293 /// <summary>
55294 /// Column in the table in KeyTable attribute.
55295 /// </summary>
55296 public int KeyColumn
55297 {
55298 get
55299 {
55300 return this.keyColumnField;
55301 }
55302 set
55303 {
55304 this.keyColumnFieldSet = true;
55305 this.keyColumnField = value;
55306 }
55307 }
55308
55309 /// <summary>
55310 /// Category of this column.
55311 /// This attribute must be specified with a value of 'Binary' if the Type attribute's value is 'binary'.
55312 /// </summary>
55313 public CategoryType Category
55314 {
55315 get
55316 {
55317 return this.categoryField;
55318 }
55319 set
55320 {
55321 this.categoryFieldSet = true;
55322 this.categoryField = value;
55323 }
55324 }
55325
55326 /// <summary>
55327 /// Semicolon delimited list of permissible values.
55328 /// </summary>
55329 public string Set
55330 {
55331 get
55332 {
55333 return this.setField;
55334 }
55335 set
55336 {
55337 this.setFieldSet = true;
55338 this.setField = value;
55339 }
55340 }
55341
55342 /// <summary>
55343 /// Description of this column.
55344 /// </summary>
55345 public string Description
55346 {
55347 get
55348 {
55349 return this.descriptionField;
55350 }
55351 set
55352 {
55353 this.descriptionFieldSet = true;
55354 this.descriptionField = value;
55355 }
55356 }
55357
55358 /// <summary>
55359 /// How this column should be modularized, if at all.
55360 /// </summary>
55361 public ModularizeType Modularize
55362 {
55363 get
55364 {
55365 return this.modularizeField;
55366 }
55367 set
55368 {
55369 this.modularizeFieldSet = true;
55370 this.modularizeField = value;
55371 }
55372 }
55373
55374 public virtual ISchemaElement ParentElement
55375 {
55376 get
55377 {
55378 return this.parentElement;
55379 }
55380 set
55381 {
55382 this.parentElement = value;
55383 }
55384 }
55385
55386 /// <summary>
55387 /// Parses a TypeType from a string.
55388 /// </summary>
55389 public static TypeType ParseTypeType(string value)
55390 {
55391 TypeType parsedValue;
55392 Column.TryParseTypeType(value, out parsedValue);
55393 return parsedValue;
55394 }
55395
55396 /// <summary>
55397 /// Tries to parse a TypeType from a string.
55398 /// </summary>
55399 public static bool TryParseTypeType(string value, out TypeType parsedValue)
55400 {
55401 parsedValue = TypeType.NotSet;
55402 if (string.IsNullOrEmpty(value))
55403 {
55404 return false;
55405 }
55406 if (("binary" == value))
55407 {
55408 parsedValue = TypeType.binary;
55409 }
55410 else
55411 {
55412 if (("int" == value))
55413 {
55414 parsedValue = TypeType.@int;
55415 }
55416 else
55417 {
55418 if (("string" == value))
55419 {
55420 parsedValue = TypeType.@string;
55421 }
55422 else
55423 {
55424 parsedValue = TypeType.IllegalValue;
55425 return false;
55426 }
55427 }
55428 }
55429 return true;
55430 }
55431
55432 /// <summary>
55433 /// Parses a CategoryType from a string.
55434 /// </summary>
55435 public static CategoryType ParseCategoryType(string value)
55436 {
55437 CategoryType parsedValue;
55438 Column.TryParseCategoryType(value, out parsedValue);
55439 return parsedValue;
55440 }
55441
55442 /// <summary>
55443 /// Tries to parse a CategoryType from a string.
55444 /// </summary>
55445 public static bool TryParseCategoryType(string value, out CategoryType parsedValue)
55446 {
55447 parsedValue = CategoryType.NotSet;
55448 if (string.IsNullOrEmpty(value))
55449 {
55450 return false;
55451 }
55452 if (("Text" == value))
55453 {
55454 parsedValue = CategoryType.text;
55455 }
55456 else
55457 {
55458 if (("UpperCase" == value))
55459 {
55460 parsedValue = CategoryType.upperCase;
55461 }
55462 else
55463 {
55464 if (("LowerCase" == value))
55465 {
55466 parsedValue = CategoryType.lowerCase;
55467 }
55468 else
55469 {
55470 if (("Integer" == value))
55471 {
55472 parsedValue = CategoryType.integer;
55473 }
55474 else
55475 {
55476 if (("DoubleInteger" == value))
55477 {
55478 parsedValue = CategoryType.doubleInteger;
55479 }
55480 else
55481 {
55482 if (("TimeDate" == value))
55483 {
55484 parsedValue = CategoryType.timeDate;
55485 }
55486 else
55487 {
55488 if (("Identifier" == value))
55489 {
55490 parsedValue = CategoryType.identifier;
55491 }
55492 else
55493 {
55494 if (("Property" == value))
55495 {
55496 parsedValue = CategoryType.property;
55497 }
55498 else
55499 {
55500 if (("Filename" == value))
55501 {
55502 parsedValue = CategoryType.filename;
55503 }
55504 else
55505 {
55506 if (("WildCardFilename" == value))
55507 {
55508 parsedValue = CategoryType.wildCardFilename;
55509 }
55510 else
55511 {
55512 if (("Path" == value))
55513 {
55514 parsedValue = CategoryType.path;
55515 }
55516 else
55517 {
55518 if (("Paths" == value))
55519 {
55520 parsedValue = CategoryType.paths;
55521 }
55522 else
55523 {
55524 if (("AnyPath" == value))
55525 {
55526 parsedValue = CategoryType.anyPath;
55527 }
55528 else
55529 {
55530 if (("DefaultDir" == value))
55531 {
55532 parsedValue = CategoryType.defaultDir;
55533 }
55534 else
55535 {
55536 if (("RegPath" == value))
55537 {
55538 parsedValue = CategoryType.regPath;
55539 }
55540 else
55541 {
55542 if (("Formatted" == value))
55543 {
55544 parsedValue = CategoryType.formatted;
55545 }
55546 else
55547 {
55548 if (("FormattedSddl" == value))
55549 {
55550 parsedValue = CategoryType.formattedSddl;
55551 }
55552 else
55553 {
55554 if (("Template" == value))
55555 {
55556 parsedValue = CategoryType.template;
55557 }
55558 else
55559 {
55560 if (("Condition" == value))
55561 {
55562 parsedValue = CategoryType.condition;
55563 }
55564 else
55565 {
55566 if (("Guid" == value))
55567 {
55568 parsedValue = CategoryType.guid;
55569 }
55570 else
55571 {
55572 if (("Version" == value))
55573 {
55574 parsedValue = CategoryType.version;
55575 }
55576 else
55577 {
55578 if (("Language" == value))
55579 {
55580 parsedValue = CategoryType.language;
55581 }
55582 else
55583 {
55584 if (("Binary" == value))
55585 {
55586 parsedValue = CategoryType.binary;
55587 }
55588 else
55589 {
55590 if (("CustomSource" == value))
55591 {
55592 parsedValue = CategoryType.customSource;
55593 }
55594 else
55595 {
55596 if (("Cabinet" == value))
55597 {
55598 parsedValue = CategoryType.cabinet;
55599 }
55600 else
55601 {
55602 if (("Shortcut" == value))
55603 {
55604 parsedValue = CategoryType.shortcut;
55605 }
55606 else
55607 {
55608 parsedValue = CategoryType.IllegalValue;
55609 return false;
55610 }
55611 }
55612 }
55613 }
55614 }
55615 }
55616 }
55617 }
55618 }
55619 }
55620 }
55621 }
55622 }
55623 }
55624 }
55625 }
55626 }
55627 }
55628 }
55629 }
55630 }
55631 }
55632 }
55633 }
55634 }
55635 }
55636 return true;
55637 }
55638
55639 /// <summary>
55640 /// Parses a ModularizeType from a string.
55641 /// </summary>
55642 public static ModularizeType ParseModularizeType(string value)
55643 {
55644 ModularizeType parsedValue;
55645 Column.TryParseModularizeType(value, out parsedValue);
55646 return parsedValue;
55647 }
55648
55649 /// <summary>
55650 /// Tries to parse a ModularizeType from a string.
55651 /// </summary>
55652 public static bool TryParseModularizeType(string value, out ModularizeType parsedValue)
55653 {
55654 parsedValue = ModularizeType.NotSet;
55655 if (string.IsNullOrEmpty(value))
55656 {
55657 return false;
55658 }
55659 if (("None" == value))
55660 {
55661 parsedValue = ModularizeType.None;
55662 }
55663 else
55664 {
55665 if (("Column" == value))
55666 {
55667 parsedValue = ModularizeType.Column;
55668 }
55669 else
55670 {
55671 if (("Condition" == value))
55672 {
55673 parsedValue = ModularizeType.Condition;
55674 }
55675 else
55676 {
55677 if (("Icon" == value))
55678 {
55679 parsedValue = ModularizeType.Icon;
55680 }
55681 else
55682 {
55683 if (("Property" == value))
55684 {
55685 parsedValue = ModularizeType.Property;
55686 }
55687 else
55688 {
55689 if (("SemicolonDelimited" == value))
55690 {
55691 parsedValue = ModularizeType.SemicolonDelimited;
55692 }
55693 else
55694 {
55695 parsedValue = ModularizeType.IllegalValue;
55696 return false;
55697 }
55698 }
55699 }
55700 }
55701 }
55702 }
55703 return true;
55704 }
55705
55706 /// <summary>
55707 /// Processes this element and all child elements into an XmlWriter.
55708 /// </summary>
55709 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
55710 public virtual void OutputXml(XmlWriter writer)
55711 {
55712 if ((null == writer))
55713 {
55714 throw new ArgumentNullException("writer");
55715 }
55716 writer.WriteStartElement("Column", "http://wixtoolset.org/schemas/v4/wxs");
55717 if (this.idFieldSet)
55718 {
55719 writer.WriteAttributeString("Id", this.idField);
55720 }
55721 if (this.primaryKeyFieldSet)
55722 {
55723 if ((this.primaryKeyField == YesNoType.no))
55724 {
55725 writer.WriteAttributeString("PrimaryKey", "no");
55726 }
55727 if ((this.primaryKeyField == YesNoType.yes))
55728 {
55729 writer.WriteAttributeString("PrimaryKey", "yes");
55730 }
55731 }
55732 if (this.typeFieldSet)
55733 {
55734 if ((this.typeField == TypeType.binary))
55735 {
55736 writer.WriteAttributeString("Type", "binary");
55737 }
55738 if ((this.typeField == TypeType.@int))
55739 {
55740 writer.WriteAttributeString("Type", "int");
55741 }
55742 if ((this.typeField == TypeType.@string))
55743 {
55744 writer.WriteAttributeString("Type", "string");
55745 }
55746 }
55747 if (this.widthFieldSet)
55748 {
55749 writer.WriteAttributeString("Width", this.widthField.ToString(CultureInfo.InvariantCulture));
55750 }
55751 if (this.nullableFieldSet)
55752 {
55753 if ((this.nullableField == YesNoType.no))
55754 {
55755 writer.WriteAttributeString("Nullable", "no");
55756 }
55757 if ((this.nullableField == YesNoType.yes))
55758 {
55759 writer.WriteAttributeString("Nullable", "yes");
55760 }
55761 }
55762 if (this.localizableFieldSet)
55763 {
55764 if ((this.localizableField == YesNoType.no))
55765 {
55766 writer.WriteAttributeString("Localizable", "no");
55767 }
55768 if ((this.localizableField == YesNoType.yes))
55769 {
55770 writer.WriteAttributeString("Localizable", "yes");
55771 }
55772 }
55773 if (this.minValueFieldSet)
55774 {
55775 writer.WriteAttributeString("MinValue", this.minValueField.ToString(CultureInfo.InvariantCulture));
55776 }
55777 if (this.maxValueFieldSet)
55778 {
55779 writer.WriteAttributeString("MaxValue", this.maxValueField.ToString(CultureInfo.InvariantCulture));
55780 }
55781 if (this.keyTableFieldSet)
55782 {
55783 writer.WriteAttributeString("KeyTable", this.keyTableField);
55784 }
55785 if (this.keyColumnFieldSet)
55786 {
55787 writer.WriteAttributeString("KeyColumn", this.keyColumnField.ToString(CultureInfo.InvariantCulture));
55788 }
55789 if (this.categoryFieldSet)
55790 {
55791 if ((this.categoryField == CategoryType.text))
55792 {
55793 writer.WriteAttributeString("Category", "text");
55794 }
55795 if ((this.categoryField == CategoryType.upperCase))
55796 {
55797 writer.WriteAttributeString("Category", "upperCase");
55798 }
55799 if ((this.categoryField == CategoryType.lowerCase))
55800 {
55801 writer.WriteAttributeString("Category", "lowerCase");
55802 }
55803 if ((this.categoryField == CategoryType.integer))
55804 {
55805 writer.WriteAttributeString("Category", "integer");
55806 }
55807 if ((this.categoryField == CategoryType.doubleInteger))
55808 {
55809 writer.WriteAttributeString("Category", "doubleInteger");
55810 }
55811 if ((this.categoryField == CategoryType.timeDate))
55812 {
55813 writer.WriteAttributeString("Category", "timeDate");
55814 }
55815 if ((this.categoryField == CategoryType.identifier))
55816 {
55817 writer.WriteAttributeString("Category", "identifier");
55818 }
55819 if ((this.categoryField == CategoryType.property))
55820 {
55821 writer.WriteAttributeString("Category", "property");
55822 }
55823 if ((this.categoryField == CategoryType.filename))
55824 {
55825 writer.WriteAttributeString("Category", "filename");
55826 }
55827 if ((this.categoryField == CategoryType.wildCardFilename))
55828 {
55829 writer.WriteAttributeString("Category", "wildCardFilename");
55830 }
55831 if ((this.categoryField == CategoryType.path))
55832 {
55833 writer.WriteAttributeString("Category", "path");
55834 }
55835 if ((this.categoryField == CategoryType.paths))
55836 {
55837 writer.WriteAttributeString("Category", "paths");
55838 }
55839 if ((this.categoryField == CategoryType.anyPath))
55840 {
55841 writer.WriteAttributeString("Category", "anyPath");
55842 }
55843 if ((this.categoryField == CategoryType.defaultDir))
55844 {
55845 writer.WriteAttributeString("Category", "defaultDir");
55846 }
55847 if ((this.categoryField == CategoryType.regPath))
55848 {
55849 writer.WriteAttributeString("Category", "regPath");
55850 }
55851 if ((this.categoryField == CategoryType.formatted))
55852 {
55853 writer.WriteAttributeString("Category", "formatted");
55854 }
55855 if ((this.categoryField == CategoryType.formattedSddl))
55856 {
55857 writer.WriteAttributeString("Category", "formattedSddl");
55858 }
55859 if ((this.categoryField == CategoryType.template))
55860 {
55861 writer.WriteAttributeString("Category", "template");
55862 }
55863 if ((this.categoryField == CategoryType.condition))
55864 {
55865 writer.WriteAttributeString("Category", "condition");
55866 }
55867 if ((this.categoryField == CategoryType.guid))
55868 {
55869 writer.WriteAttributeString("Category", "guid");
55870 }
55871 if ((this.categoryField == CategoryType.version))
55872 {
55873 writer.WriteAttributeString("Category", "version");
55874 }
55875 if ((this.categoryField == CategoryType.language))
55876 {
55877 writer.WriteAttributeString("Category", "language");
55878 }
55879 if ((this.categoryField == CategoryType.binary))
55880 {
55881 writer.WriteAttributeString("Category", "Binary");
55882 }
55883 if ((this.categoryField == CategoryType.customSource))
55884 {
55885 writer.WriteAttributeString("Category", "customSource");
55886 }
55887 if ((this.categoryField == CategoryType.cabinet))
55888 {
55889 writer.WriteAttributeString("Category", "cabinet");
55890 }
55891 if ((this.categoryField == CategoryType.shortcut))
55892 {
55893 writer.WriteAttributeString("Category", "shortcut");
55894 }
55895 }
55896 if (this.setFieldSet)
55897 {
55898 writer.WriteAttributeString("Set", this.setField);
55899 }
55900 if (this.descriptionFieldSet)
55901 {
55902 writer.WriteAttributeString("Description", this.descriptionField);
55903 }
55904 if (this.modularizeFieldSet)
55905 {
55906 if ((this.modularizeField == ModularizeType.None))
55907 {
55908 writer.WriteAttributeString("Modularize", "None");
55909 }
55910 if ((this.modularizeField == ModularizeType.Column))
55911 {
55912 writer.WriteAttributeString("Modularize", "Column");
55913 }
55914 if ((this.modularizeField == ModularizeType.Condition))
55915 {
55916 writer.WriteAttributeString("Modularize", "Condition");
55917 }
55918 if ((this.modularizeField == ModularizeType.Icon))
55919 {
55920 writer.WriteAttributeString("Modularize", "Icon");
55921 }
55922 if ((this.modularizeField == ModularizeType.Property))
55923 {
55924 writer.WriteAttributeString("Modularize", "Property");
55925 }
55926 if ((this.modularizeField == ModularizeType.SemicolonDelimited))
55927 {
55928 writer.WriteAttributeString("Modularize", "SemicolonDelimited");
55929 }
55930 }
55931 writer.WriteEndElement();
55932 }
55933
55934 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
55935 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
55936 void ISetAttributes.SetAttribute(string name, string value)
55937 {
55938 if (String.IsNullOrEmpty(name))
55939 {
55940 throw new ArgumentNullException("name");
55941 }
55942 if (("Id" == name))
55943 {
55944 this.idField = value;
55945 this.idFieldSet = true;
55946 }
55947 if (("PrimaryKey" == name))
55948 {
55949 this.primaryKeyField = Enums.ParseYesNoType(value);
55950 this.primaryKeyFieldSet = true;
55951 }
55952 if (("Type" == name))
55953 {
55954 this.typeField = Column.ParseTypeType(value);
55955 this.typeFieldSet = true;
55956 }
55957 if (("Width" == name))
55958 {
55959 this.widthField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
55960 this.widthFieldSet = true;
55961 }
55962 if (("Nullable" == name))
55963 {
55964 this.nullableField = Enums.ParseYesNoType(value);
55965 this.nullableFieldSet = true;
55966 }
55967 if (("Localizable" == name))
55968 {
55969 this.localizableField = Enums.ParseYesNoType(value);
55970 this.localizableFieldSet = true;
55971 }
55972 if (("MinValue" == name))
55973 {
55974 this.minValueField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
55975 this.minValueFieldSet = true;
55976 }
55977 if (("MaxValue" == name))
55978 {
55979 this.maxValueField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
55980 this.maxValueFieldSet = true;
55981 }
55982 if (("KeyTable" == name))
55983 {
55984 this.keyTableField = value;
55985 this.keyTableFieldSet = true;
55986 }
55987 if (("KeyColumn" == name))
55988 {
55989 this.keyColumnField = Convert.ToInt32(value, CultureInfo.InvariantCulture);
55990 this.keyColumnFieldSet = true;
55991 }
55992 if (("Category" == name))
55993 {
55994 this.categoryField = Column.ParseCategoryType(value);
55995 this.categoryFieldSet = true;
55996 }
55997 if (("Set" == name))
55998 {
55999 this.setField = value;
56000 this.setFieldSet = true;
56001 }
56002 if (("Description" == name))
56003 {
56004 this.descriptionField = value;
56005 this.descriptionFieldSet = true;
56006 }
56007 if (("Modularize" == name))
56008 {
56009 this.modularizeField = Column.ParseModularizeType(value);
56010 this.modularizeFieldSet = true;
56011 }
56012 }
56013
56014 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56015 public enum TypeType
56016 {
56017
56018 IllegalValue = int.MaxValue,
56019
56020 NotSet = -1,
56021
56022 /// <summary>
56023 /// Column contains a path to a file that will be inserted into the column as a binary object.
56024 /// If this value is set, the Category attribute must also be set with a value of 'Binary' to pass ICE validation.
56025 /// </summary>
56026 binary,
56027
56028 /// <summary>
56029 /// Column contains an integer or datetime value (the MinValue and MaxValue attributes should also be set).
56030 /// </summary>
56031 @int,
56032
56033 /// <summary>
56034 /// Column contains a non-localizable string value.
56035 /// </summary>
56036 @string,
56037 }
56038
56039 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56040 public enum CategoryType
56041 {
56042
56043 IllegalValue = int.MaxValue,
56044
56045 NotSet = -1,
56046
56047 text,
56048
56049 upperCase,
56050
56051 lowerCase,
56052
56053 integer,
56054
56055 doubleInteger,
56056
56057 timeDate,
56058
56059 identifier,
56060
56061 property,
56062
56063 filename,
56064
56065 wildCardFilename,
56066
56067 path,
56068
56069 paths,
56070
56071 anyPath,
56072
56073 defaultDir,
56074
56075 regPath,
56076
56077 formatted,
56078
56079 formattedSddl,
56080
56081 template,
56082
56083 condition,
56084
56085 guid,
56086
56087 version,
56088
56089 language,
56090
56091 binary,
56092
56093 customSource,
56094
56095 cabinet,
56096
56097 shortcut,
56098 }
56099
56100 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56101 public enum ModularizeType
56102 {
56103
56104 IllegalValue = int.MaxValue,
56105
56106 NotSet = -1,
56107
56108 /// <summary>
56109 /// Column should not be modularized. This is the default value.
56110 /// </summary>
56111 None,
56112
56113 /// <summary>
56114 /// Column should be modularized.
56115 /// </summary>
56116 Column,
56117
56118 /// <summary>
56119 /// Column is a condition and should be modularized.
56120 /// </summary>
56121 Condition,
56122
56123 /// <summary>
56124 /// When the column is an primary or foreign key to the Icon table it should be modularized special.
56125 /// </summary>
56126 Icon,
56127
56128 /// <summary>
56129 /// Any Properties in the column should be modularized.
56130 /// </summary>
56131 Property,
56132
56133 /// <summary>
56134 /// Semi-colon list of keys, all of which need to be modularized.
56135 /// </summary>
56136 SemicolonDelimited,
56137 }
56138 }
56139
56140 /// <summary>
56141 /// Row data for a Custom Table
56142 /// </summary>
56143 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56144 public class Row : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
56145 {
56146
56147 private ElementCollection children;
56148
56149 private ISchemaElement parentElement;
56150
56151 public Row()
56152 {
56153 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence);
56154 childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Data)));
56155 this.children = childCollection0;
56156 }
56157
56158 public virtual IEnumerable Children
56159 {
56160 get
56161 {
56162 return this.children;
56163 }
56164 }
56165
56166 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
56167 public virtual IEnumerable this[System.Type childType]
56168 {
56169 get
56170 {
56171 return this.children.Filter(childType);
56172 }
56173 }
56174
56175 public virtual ISchemaElement ParentElement
56176 {
56177 get
56178 {
56179 return this.parentElement;
56180 }
56181 set
56182 {
56183 this.parentElement = value;
56184 }
56185 }
56186
56187 public virtual void AddChild(ISchemaElement child)
56188 {
56189 if ((null == child))
56190 {
56191 throw new ArgumentNullException("child");
56192 }
56193 this.children.AddElement(child);
56194 child.ParentElement = this;
56195 }
56196
56197 public virtual void RemoveChild(ISchemaElement child)
56198 {
56199 if ((null == child))
56200 {
56201 throw new ArgumentNullException("child");
56202 }
56203 this.children.RemoveElement(child);
56204 child.ParentElement = null;
56205 }
56206
56207 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56208 ISchemaElement ICreateChildren.CreateChild(string childName)
56209 {
56210 if (String.IsNullOrEmpty(childName))
56211 {
56212 throw new ArgumentNullException("childName");
56213 }
56214 ISchemaElement childValue = null;
56215 if (("Data" == childName))
56216 {
56217 childValue = new Data();
56218 }
56219 if ((null == childValue))
56220 {
56221 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
56222 }
56223 return childValue;
56224 }
56225
56226 /// <summary>
56227 /// Processes this element and all child elements into an XmlWriter.
56228 /// </summary>
56229 public virtual void OutputXml(XmlWriter writer)
56230 {
56231 if ((null == writer))
56232 {
56233 throw new ArgumentNullException("writer");
56234 }
56235 writer.WriteStartElement("Row", "http://wixtoolset.org/schemas/v4/wxs");
56236 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
56237 {
56238 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
56239 childElement.OutputXml(writer);
56240 }
56241 writer.WriteEndElement();
56242 }
56243
56244 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56245 void ISetAttributes.SetAttribute(string name, string value)
56246 {
56247 if (String.IsNullOrEmpty(name))
56248 {
56249 throw new ArgumentNullException("name");
56250 }
56251 }
56252 }
56253
56254 /// <summary>
56255 /// Used for a Custom Table. Specifies the data for the parent Row and specified Column.
56256 /// </summary>
56257 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56258 public class Data : ISchemaElement, ISetAttributes
56259 {
56260
56261 private string columnField;
56262
56263 private bool columnFieldSet;
56264
56265 private string contentField;
56266
56267 private bool contentFieldSet;
56268
56269 private ISchemaElement parentElement;
56270
56271 /// <summary>
56272 /// Specifies in which column to insert this data.
56273 /// </summary>
56274 public string Column
56275 {
56276 get
56277 {
56278 return this.columnField;
56279 }
56280 set
56281 {
56282 this.columnFieldSet = true;
56283 this.columnField = value;
56284 }
56285 }
56286
56287 /// <summary>
56288 /// A data value
56289 /// </summary>
56290 public string Content
56291 {
56292 get
56293 {
56294 return this.contentField;
56295 }
56296 set
56297 {
56298 this.contentFieldSet = true;
56299 this.contentField = value;
56300 }
56301 }
56302
56303 public virtual ISchemaElement ParentElement
56304 {
56305 get
56306 {
56307 return this.parentElement;
56308 }
56309 set
56310 {
56311 this.parentElement = value;
56312 }
56313 }
56314
56315 /// <summary>
56316 /// Processes this element and all child elements into an XmlWriter.
56317 /// </summary>
56318 public virtual void OutputXml(XmlWriter writer)
56319 {
56320 if ((null == writer))
56321 {
56322 throw new ArgumentNullException("writer");
56323 }
56324 writer.WriteStartElement("Data", "http://wixtoolset.org/schemas/v4/wxs");
56325 if (this.columnFieldSet)
56326 {
56327 writer.WriteAttributeString("Column", this.columnField);
56328 }
56329 if (this.contentFieldSet)
56330 {
56331 writer.WriteString(this.contentField);
56332 }
56333 writer.WriteEndElement();
56334 }
56335
56336 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56337 void ISetAttributes.SetAttribute(string name, string value)
56338 {
56339 if (String.IsNullOrEmpty(name))
56340 {
56341 throw new ArgumentNullException("name");
56342 }
56343 if (("Column" == name))
56344 {
56345 this.columnField = value;
56346 this.columnFieldSet = true;
56347 }
56348 if (("Content" == name))
56349 {
56350 this.contentField = value;
56351 this.contentFieldSet = true;
56352 }
56353 }
56354 }
56355
56356 /// <summary>
56357 /// Use this element to ensure that a table appears in the installer database, even if its empty.
56358 /// </summary>
56359 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56360 public class EnsureTable : ISchemaElement, ISetAttributes
56361 {
56362
56363 private string idField;
56364
56365 private bool idFieldSet;
56366
56367 private ISchemaElement parentElement;
56368
56369 /// <summary>
56370 /// The name of the table.
56371 /// </summary>
56372 public string Id
56373 {
56374 get
56375 {
56376 return this.idField;
56377 }
56378 set
56379 {
56380 this.idFieldSet = true;
56381 this.idField = value;
56382 }
56383 }
56384
56385 public virtual ISchemaElement ParentElement
56386 {
56387 get
56388 {
56389 return this.parentElement;
56390 }
56391 set
56392 {
56393 this.parentElement = value;
56394 }
56395 }
56396
56397 /// <summary>
56398 /// Processes this element and all child elements into an XmlWriter.
56399 /// </summary>
56400 public virtual void OutputXml(XmlWriter writer)
56401 {
56402 if ((null == writer))
56403 {
56404 throw new ArgumentNullException("writer");
56405 }
56406 writer.WriteStartElement("EnsureTable", "http://wixtoolset.org/schemas/v4/wxs");
56407 if (this.idFieldSet)
56408 {
56409 writer.WriteAttributeString("Id", this.idField);
56410 }
56411 writer.WriteEndElement();
56412 }
56413
56414 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56415 void ISetAttributes.SetAttribute(string name, string value)
56416 {
56417 if (String.IsNullOrEmpty(name))
56418 {
56419 throw new ArgumentNullException("name");
56420 }
56421 if (("Id" == name))
56422 {
56423 this.idField = value;
56424 this.idFieldSet = true;
56425 }
56426 }
56427 }
56428
56429 /// <summary>
56430 /// This element exposes advanced WiX functionality. Use this element to declare WiX variables
56431 /// from directly within your authoring. WiX variables are not resolved until the final msi/msm/pcp
56432 /// file is actually generated. WiX variables do not persist into the msi/msm/pcp file, so they cannot
56433 /// be used when an MSI file is being installed; it's a WiX-only concept.
56434 /// </summary>
56435 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56436 public class WixVariable : ISchemaElement, ISetAttributes
56437 {
56438
56439 private string idField;
56440
56441 private bool idFieldSet;
56442
56443 private YesNoType overridableField;
56444
56445 private bool overridableFieldSet;
56446
56447 private string valueField;
56448
56449 private bool valueFieldSet;
56450
56451 private ISchemaElement parentElement;
56452
56453 /// <summary>
56454 /// The name of the variable.
56455 /// </summary>
56456 public string Id
56457 {
56458 get
56459 {
56460 return this.idField;
56461 }
56462 set
56463 {
56464 this.idFieldSet = true;
56465 this.idField = value;
56466 }
56467 }
56468
56469 /// <summary>
56470 /// Set this value to 'yes' in order to make the variable's value overridable either by
56471 /// another WixVariable entry or via the command-line option -d&lt;name&gt;=&lt;value&gt;
56472 /// for light.exe. If the same variable is declared overridable in multiple places it
56473 /// will cause an error (since WiX won't know which value is correct). The default value
56474 /// is 'no'.
56475 /// </summary>
56476 public YesNoType Overridable
56477 {
56478 get
56479 {
56480 return this.overridableField;
56481 }
56482 set
56483 {
56484 this.overridableFieldSet = true;
56485 this.overridableField = value;
56486 }
56487 }
56488
56489 /// <summary>
56490 /// The value of the variable. The value cannot be an empty string because that would
56491 /// make it possible to accidentally set a column to null.
56492 /// </summary>
56493 public string Value
56494 {
56495 get
56496 {
56497 return this.valueField;
56498 }
56499 set
56500 {
56501 this.valueFieldSet = true;
56502 this.valueField = value;
56503 }
56504 }
56505
56506 public virtual ISchemaElement ParentElement
56507 {
56508 get
56509 {
56510 return this.parentElement;
56511 }
56512 set
56513 {
56514 this.parentElement = value;
56515 }
56516 }
56517
56518 /// <summary>
56519 /// Processes this element and all child elements into an XmlWriter.
56520 /// </summary>
56521 public virtual void OutputXml(XmlWriter writer)
56522 {
56523 if ((null == writer))
56524 {
56525 throw new ArgumentNullException("writer");
56526 }
56527 writer.WriteStartElement("WixVariable", "http://wixtoolset.org/schemas/v4/wxs");
56528 if (this.idFieldSet)
56529 {
56530 writer.WriteAttributeString("Id", this.idField);
56531 }
56532 if (this.overridableFieldSet)
56533 {
56534 if ((this.overridableField == YesNoType.no))
56535 {
56536 writer.WriteAttributeString("Overridable", "no");
56537 }
56538 if ((this.overridableField == YesNoType.yes))
56539 {
56540 writer.WriteAttributeString("Overridable", "yes");
56541 }
56542 }
56543 if (this.valueFieldSet)
56544 {
56545 writer.WriteAttributeString("Value", this.valueField);
56546 }
56547 writer.WriteEndElement();
56548 }
56549
56550 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56551 void ISetAttributes.SetAttribute(string name, string value)
56552 {
56553 if (String.IsNullOrEmpty(name))
56554 {
56555 throw new ArgumentNullException("name");
56556 }
56557 if (("Id" == name))
56558 {
56559 this.idField = value;
56560 this.idFieldSet = true;
56561 }
56562 if (("Overridable" == name))
56563 {
56564 this.overridableField = Enums.ParseYesNoType(value);
56565 this.overridableFieldSet = true;
56566 }
56567 if (("Value" == name))
56568 {
56569 this.valueField = value;
56570 this.valueFieldSet = true;
56571 }
56572 }
56573 }
56574
56575 /// <summary>
56576 /// Use this element to contain definitions for instance transforms.
56577 /// </summary>
56578 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56579 public class InstanceTransforms : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes
56580 {
56581
56582 private ElementCollection children;
56583
56584 private string propertyField;
56585
56586 private bool propertyFieldSet;
56587
56588 private ISchemaElement parentElement;
56589
56590 public InstanceTransforms()
56591 {
56592 ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice);
56593 childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Instance)));
56594 this.children = childCollection0;
56595 }
56596
56597 public virtual IEnumerable Children
56598 {
56599 get
56600 {
56601 return this.children;
56602 }
56603 }
56604
56605 [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")]
56606 public virtual IEnumerable this[System.Type childType]
56607 {
56608 get
56609 {
56610 return this.children.Filter(childType);
56611 }
56612 }
56613
56614 /// <summary>
56615 /// The Id of the Property who's value should change for each instance.
56616 /// </summary>
56617 public string Property
56618 {
56619 get
56620 {
56621 return this.propertyField;
56622 }
56623 set
56624 {
56625 this.propertyFieldSet = true;
56626 this.propertyField = value;
56627 }
56628 }
56629
56630 public virtual ISchemaElement ParentElement
56631 {
56632 get
56633 {
56634 return this.parentElement;
56635 }
56636 set
56637 {
56638 this.parentElement = value;
56639 }
56640 }
56641
56642 public virtual void AddChild(ISchemaElement child)
56643 {
56644 if ((null == child))
56645 {
56646 throw new ArgumentNullException("child");
56647 }
56648 this.children.AddElement(child);
56649 child.ParentElement = this;
56650 }
56651
56652 public virtual void RemoveChild(ISchemaElement child)
56653 {
56654 if ((null == child))
56655 {
56656 throw new ArgumentNullException("child");
56657 }
56658 this.children.RemoveElement(child);
56659 child.ParentElement = null;
56660 }
56661
56662 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56663 ISchemaElement ICreateChildren.CreateChild(string childName)
56664 {
56665 if (String.IsNullOrEmpty(childName))
56666 {
56667 throw new ArgumentNullException("childName");
56668 }
56669 ISchemaElement childValue = null;
56670 if (("Instance" == childName))
56671 {
56672 childValue = new Instance();
56673 }
56674 if ((null == childValue))
56675 {
56676 throw new InvalidOperationException(String.Concat(childName, " is not a valid child name."));
56677 }
56678 return childValue;
56679 }
56680
56681 /// <summary>
56682 /// Processes this element and all child elements into an XmlWriter.
56683 /// </summary>
56684 public virtual void OutputXml(XmlWriter writer)
56685 {
56686 if ((null == writer))
56687 {
56688 throw new ArgumentNullException("writer");
56689 }
56690 writer.WriteStartElement("InstanceTransforms", "http://wixtoolset.org/schemas/v4/wxs");
56691 if (this.propertyFieldSet)
56692 {
56693 writer.WriteAttributeString("Property", this.propertyField);
56694 }
56695 for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); )
56696 {
56697 ISchemaElement childElement = ((ISchemaElement)(enumerator.Current));
56698 childElement.OutputXml(writer);
56699 }
56700 writer.WriteEndElement();
56701 }
56702
56703 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56704 void ISetAttributes.SetAttribute(string name, string value)
56705 {
56706 if (String.IsNullOrEmpty(name))
56707 {
56708 throw new ArgumentNullException("name");
56709 }
56710 if (("Property" == name))
56711 {
56712 this.propertyField = value;
56713 this.propertyFieldSet = true;
56714 }
56715 }
56716 }
56717
56718 /// <summary>
56719 /// Defines an instance transform for your product.
56720 /// </summary>
56721 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56722 public class Instance : ISchemaElement, ISetAttributes
56723 {
56724
56725 private string idField;
56726
56727 private bool idFieldSet;
56728
56729 private string productCodeField;
56730
56731 private bool productCodeFieldSet;
56732
56733 private string productNameField;
56734
56735 private bool productNameFieldSet;
56736
56737 private string upgradeCodeField;
56738
56739 private bool upgradeCodeFieldSet;
56740
56741 private ISchemaElement parentElement;
56742
56743 /// <summary>
56744 /// The identity of the instance transform. This value will define the name by which the instance
56745 /// should be referred to on the command line. In addition, the value of the this attribute will
56746 /// determine what the value of the property specified in Property attribute on InstanceTransforms
56747 /// will change to for each instance.
56748 /// </summary>
56749 public string Id
56750 {
56751 get
56752 {
56753 return this.idField;
56754 }
56755 set
56756 {
56757 this.idFieldSet = true;
56758 this.idField = value;
56759 }
56760 }
56761
56762 /// <summary>
56763 /// The ProductCode for this instance.
56764 /// </summary>
56765 public string ProductCode
56766 {
56767 get
56768 {
56769 return this.productCodeField;
56770 }
56771 set
56772 {
56773 this.productCodeFieldSet = true;
56774 this.productCodeField = value;
56775 }
56776 }
56777
56778 /// <summary>
56779 /// The ProductName for this instance.
56780 /// </summary>
56781 public string ProductName
56782 {
56783 get
56784 {
56785 return this.productNameField;
56786 }
56787 set
56788 {
56789 this.productNameFieldSet = true;
56790 this.productNameField = value;
56791 }
56792 }
56793
56794 /// <summary>
56795 /// The UpgradeCode for this instance.
56796 /// </summary>
56797 public string UpgradeCode
56798 {
56799 get
56800 {
56801 return this.upgradeCodeField;
56802 }
56803 set
56804 {
56805 this.upgradeCodeFieldSet = true;
56806 this.upgradeCodeField = value;
56807 }
56808 }
56809
56810 public virtual ISchemaElement ParentElement
56811 {
56812 get
56813 {
56814 return this.parentElement;
56815 }
56816 set
56817 {
56818 this.parentElement = value;
56819 }
56820 }
56821
56822 /// <summary>
56823 /// Processes this element and all child elements into an XmlWriter.
56824 /// </summary>
56825 public virtual void OutputXml(XmlWriter writer)
56826 {
56827 if ((null == writer))
56828 {
56829 throw new ArgumentNullException("writer");
56830 }
56831 writer.WriteStartElement("Instance", "http://wixtoolset.org/schemas/v4/wxs");
56832 if (this.idFieldSet)
56833 {
56834 writer.WriteAttributeString("Id", this.idField);
56835 }
56836 if (this.productCodeFieldSet)
56837 {
56838 writer.WriteAttributeString("ProductCode", this.productCodeField);
56839 }
56840 if (this.productNameFieldSet)
56841 {
56842 writer.WriteAttributeString("ProductName", this.productNameField);
56843 }
56844 if (this.upgradeCodeFieldSet)
56845 {
56846 writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField);
56847 }
56848 writer.WriteEndElement();
56849 }
56850
56851 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
56852 void ISetAttributes.SetAttribute(string name, string value)
56853 {
56854 if (String.IsNullOrEmpty(name))
56855 {
56856 throw new ArgumentNullException("name");
56857 }
56858 if (("Id" == name))
56859 {
56860 this.idField = value;
56861 this.idFieldSet = true;
56862 }
56863 if (("ProductCode" == name))
56864 {
56865 this.productCodeField = value;
56866 this.productCodeFieldSet = true;
56867 }
56868 if (("ProductName" == name))
56869 {
56870 this.productNameField = value;
56871 this.productNameFieldSet = true;
56872 }
56873 if (("UpgradeCode" == name))
56874 {
56875 this.upgradeCodeField = value;
56876 this.upgradeCodeFieldSet = true;
56877 }
56878 }
56879 }
56880
56881 /// <summary>
56882 /// Simplifies authoring for major upgrades, including support for preventing downgrades.
56883 ///
56884 /// The parent Package element must have valid UpgradeCode and Version attributes.
56885 ///
56886 /// When the FindRelatedProducts action detects a related product installed on the system,
56887 /// it appends the product code to the property named WIX_UPGRADE_DETECTED. After the
56888 /// FindRelatedProducts action is run, the value of the WIX_UPGRADE_DETECTED property is a
56889 /// list of product codes, separated by semicolons (;), detected on the system.
56890 /// </summary>
56891 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
56892 public class MajorUpgrade : ISchemaElement, ISetAttributes
56893 {
56894
56895 private YesNoType allowDowngradesField;
56896
56897 private bool allowDowngradesFieldSet;
56898
56899 private YesNoType allowSameVersionUpgradesField;
56900
56901 private bool allowSameVersionUpgradesFieldSet;
56902
56903 private YesNoType disallowField;
56904
56905 private bool disallowFieldSet;
56906
56907 private string downgradeErrorMessageField;
56908
56909 private bool downgradeErrorMessageFieldSet;
56910
56911 private string disallowUpgradeErrorMessageField;
56912
56913 private bool disallowUpgradeErrorMessageFieldSet;
56914
56915 private YesNoType migrateFeaturesField;
56916
56917 private bool migrateFeaturesFieldSet;
56918
56919 private YesNoType ignoreLanguageField;
56920
56921 private bool ignoreLanguageFieldSet;
56922
56923 private YesNoType ignoreRemoveFailureField;
56924
56925 private bool ignoreRemoveFailureFieldSet;
56926
56927 private string removeFeaturesField;
56928
56929 private bool removeFeaturesFieldSet;
56930
56931 private ScheduleType scheduleField;
56932
56933 private bool scheduleFieldSet;
56934
56935 private ISchemaElement parentElement;
56936
56937 /// <summary>
56938 /// When set to no (the default), products with lower version numbers are blocked from
56939 /// installing when a product with a higher version is installed; the DowngradeErrorMessage
56940 /// attribute must also be specified.
56941 ///
56942 /// When set to yes, any version can be installed over any other version.
56943 /// </summary>
56944 public YesNoType AllowDowngrades
56945 {
56946 get
56947 {
56948 return this.allowDowngradesField;
56949 }
56950 set
56951 {
56952 this.allowDowngradesFieldSet = true;
56953 this.allowDowngradesField = value;
56954 }
56955 }
56956
56957 /// <summary>
56958 /// When set to no (the default), installing a product with the same version and upgrade code
56959 /// (but different product code) is allowed and treated by MSI as two products. When set to yes,
56960 /// WiX sets the msidbUpgradeAttributesVersionMaxInclusive attribute, which tells MSI to treat
56961 /// a product with the same version as a major upgrade.
56962 ///
56963 /// This is useful when two product versions differ only in the fourth version field. MSI
56964 /// specifically ignores that field when comparing product versions, so two products that
56965 /// differ only in the fourth version field are the same product and need this attribute set to
56966 /// yes to be detected.
56967 ///
56968 /// Note that because MSI ignores the fourth product version field, setting this attribute to
56969 /// yes also allows downgrades when the first three product version fields are identical.
56970 /// For example, product version 1.0.0.1 will "upgrade" 1.0.0.2998 because they're seen as the
56971 /// same version (1.0.0). That could reintroduce serious bugs so the safest choice is to change
56972 /// the first three version fields and omit this attribute to get the default of no.
56973 ///
56974 /// This attribute cannot be "yes" when AllowDowngrades is also "yes" -- AllowDowngrades
56975 /// already allows two products with the same version number to upgrade each other.
56976 /// </summary>
56977 public YesNoType AllowSameVersionUpgrades
56978 {
56979 get
56980 {
56981 return this.allowSameVersionUpgradesField;
56982 }
56983 set
56984 {
56985 this.allowSameVersionUpgradesFieldSet = true;
56986 this.allowSameVersionUpgradesField = value;
56987 }
56988 }
56989
56990 /// <summary>
56991 /// When set to yes, products with higer version numbers are blocked from
56992 /// installing when a product with a lower version is installed; the UpgradeErrorMessage
56993 /// attribute must also be specified.
56994 ///
56995 /// When set to no (the default), any version can be installed over any lower version.
56996 /// </summary>
56997 public YesNoType Disallow
56998 {
56999 get
57000 {
57001 return this.disallowField;
57002 }
57003 set
57004 {
57005 this.disallowFieldSet = true;
57006 this.disallowField = value;
57007 }
57008 }
57009
57010 /// <summary>
57011 /// The message displayed if users try to install a product with a lower version number
57012 /// when a product with a higher version is installed. Used only when AllowDowngrades
57013 /// is no (the default).
57014 /// </summary>
57015 public string DowngradeErrorMessage
57016 {
57017 get
57018 {
57019 return this.downgradeErrorMessageField;
57020 }
57021 set
57022 {
57023 this.downgradeErrorMessageFieldSet = true;
57024 this.downgradeErrorMessageField = value;
57025 }
57026 }
57027
57028 /// <summary>
57029 /// The message displayed if users try to install a product with a higer version number
57030 /// when a product with a lower version is installed. Used only when Disallow
57031 /// is yes.
57032 /// </summary>
57033 public string DisallowUpgradeErrorMessage
57034 {
57035 get
57036 {
57037 return this.disallowUpgradeErrorMessageField;
57038 }
57039 set
57040 {
57041 this.disallowUpgradeErrorMessageFieldSet = true;
57042 this.disallowUpgradeErrorMessageField = value;
57043 }
57044 }
57045
57046 /// <summary>
57047 /// When set to yes (the default), the MigrateFeatureStates standard action will set the
57048 /// feature states of the upgrade product to those of the installed product.
57049 ///
57050 /// When set to no, the installed features have no effect on the upgrade installation.
57051 /// </summary>
57052 public YesNoType MigrateFeatures
57053 {
57054 get
57055 {
57056 return this.migrateFeaturesField;
57057 }
57058 set
57059 {
57060 this.migrateFeaturesFieldSet = true;
57061 this.migrateFeaturesField = value;
57062 }
57063 }
57064
57065 /// <summary>
57066 /// When set to yes, the Upgrade table rows will match any product with the same UpgradeCode.
57067 ///
57068 /// When set to no (the default), the Upgrade table rows will match only products with the
57069 /// same UpgradeCode and ProductLanguage.
57070 /// </summary>
57071 public YesNoType IgnoreLanguage
57072 {
57073 get
57074 {
57075 return this.ignoreLanguageField;
57076 }
57077 set
57078 {
57079 this.ignoreLanguageFieldSet = true;
57080 this.ignoreLanguageField = value;
57081 }
57082 }
57083
57084 /// <summary>
57085 /// When set to yes, failures removing the installed product during the upgrade will be
57086 /// ignored.
57087 ///
57088 /// When set to no (the default), failures removing the installed product during the upgrade
57089 /// will be considered a failure and, depending on the scheduling, roll back the upgrade.
57090 /// </summary>
57091 public YesNoType IgnoreRemoveFailure
57092 {
57093 get
57094 {
57095 return this.ignoreRemoveFailureField;
57096 }
57097 set
57098 {
57099 this.ignoreRemoveFailureFieldSet = true;
57100 this.ignoreRemoveFailureField = value;
57101 }
57102 }
57103
57104 /// <summary>
57105 /// A formatted string that contains the list of features to remove from the installed
57106 /// product. The default is to remove all features. Note that if you use formatted property
57107 /// values that evaluate to an empty string, no features will be removed; only omitting
57108 /// this attribute defaults to removing all features.
57109 /// </summary>
57110 public string RemoveFeatures
57111 {
57112 get
57113 {
57114 return this.removeFeaturesField;
57115 }
57116 set
57117 {
57118 this.removeFeaturesFieldSet = true;
57119 this.removeFeaturesField = value;
57120 }
57121 }
57122
57123 /// <summary>
57124 /// Determines the scheduling of the RemoveExistingProducts standard action, which is when
57125 /// the installed product is removed. The default is "afterInstallValidate" which removes
57126 /// the installed product entirely before installing the upgrade product. It's slowest but
57127 /// gives the most flexibility in changing components and features in the upgrade product.
57128 ///
57129 /// For more information, see
57130 /// </summary>
57131 public ScheduleType Schedule
57132 {
57133 get
57134 {
57135 return this.scheduleField;
57136 }
57137 set
57138 {
57139 this.scheduleFieldSet = true;
57140 this.scheduleField = value;
57141 }
57142 }
57143
57144 public virtual ISchemaElement ParentElement
57145 {
57146 get
57147 {
57148 return this.parentElement;
57149 }
57150 set
57151 {
57152 this.parentElement = value;
57153 }
57154 }
57155
57156 /// <summary>
57157 /// Parses a ScheduleType from a string.
57158 /// </summary>
57159 public static ScheduleType ParseScheduleType(string value)
57160 {
57161 ScheduleType parsedValue;
57162 MajorUpgrade.TryParseScheduleType(value, out parsedValue);
57163 return parsedValue;
57164 }
57165
57166 /// <summary>
57167 /// Tries to parse a ScheduleType from a string.
57168 /// </summary>
57169 public static bool TryParseScheduleType(string value, out ScheduleType parsedValue)
57170 {
57171 parsedValue = ScheduleType.NotSet;
57172 if (string.IsNullOrEmpty(value))
57173 {
57174 return false;
57175 }
57176 if (("afterInstallValidate" == value))
57177 {
57178 parsedValue = ScheduleType.afterInstallValidate;
57179 }
57180 else
57181 {
57182 if (("afterInstallInitialize" == value))
57183 {
57184 parsedValue = ScheduleType.afterInstallInitialize;
57185 }
57186 else
57187 {
57188 if (("afterInstallExecute" == value))
57189 {
57190 parsedValue = ScheduleType.afterInstallExecute;
57191 }
57192 else
57193 {
57194 if (("afterInstallExecuteAgain" == value))
57195 {
57196 parsedValue = ScheduleType.afterInstallExecuteAgain;
57197 }
57198 else
57199 {
57200 if (("afterInstallFinalize" == value))
57201 {
57202 parsedValue = ScheduleType.afterInstallFinalize;
57203 }
57204 else
57205 {
57206 parsedValue = ScheduleType.IllegalValue;
57207 return false;
57208 }
57209 }
57210 }
57211 }
57212 }
57213 return true;
57214 }
57215
57216 /// <summary>
57217 /// Processes this element and all child elements into an XmlWriter.
57218 /// </summary>
57219 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
57220 public virtual void OutputXml(XmlWriter writer)
57221 {
57222 if ((null == writer))
57223 {
57224 throw new ArgumentNullException("writer");
57225 }
57226 writer.WriteStartElement("MajorUpgrade", "http://wixtoolset.org/schemas/v4/wxs");
57227 if (this.allowDowngradesFieldSet)
57228 {
57229 if ((this.allowDowngradesField == YesNoType.no))
57230 {
57231 writer.WriteAttributeString("AllowDowngrades", "no");
57232 }
57233 if ((this.allowDowngradesField == YesNoType.yes))
57234 {
57235 writer.WriteAttributeString("AllowDowngrades", "yes");
57236 }
57237 }
57238 if (this.allowSameVersionUpgradesFieldSet)
57239 {
57240 if ((this.allowSameVersionUpgradesField == YesNoType.no))
57241 {
57242 writer.WriteAttributeString("AllowSameVersionUpgrades", "no");
57243 }
57244 if ((this.allowSameVersionUpgradesField == YesNoType.yes))
57245 {
57246 writer.WriteAttributeString("AllowSameVersionUpgrades", "yes");
57247 }
57248 }
57249 if (this.disallowFieldSet)
57250 {
57251 if ((this.disallowField == YesNoType.no))
57252 {
57253 writer.WriteAttributeString("Disallow", "no");
57254 }
57255 if ((this.disallowField == YesNoType.yes))
57256 {
57257 writer.WriteAttributeString("Disallow", "yes");
57258 }
57259 }
57260 if (this.downgradeErrorMessageFieldSet)
57261 {
57262 writer.WriteAttributeString("DowngradeErrorMessage", this.downgradeErrorMessageField);
57263 }
57264 if (this.disallowUpgradeErrorMessageFieldSet)
57265 {
57266 writer.WriteAttributeString("DisallowUpgradeErrorMessage", this.disallowUpgradeErrorMessageField);
57267 }
57268 if (this.migrateFeaturesFieldSet)
57269 {
57270 if ((this.migrateFeaturesField == YesNoType.no))
57271 {
57272 writer.WriteAttributeString("MigrateFeatures", "no");
57273 }
57274 if ((this.migrateFeaturesField == YesNoType.yes))
57275 {
57276 writer.WriteAttributeString("MigrateFeatures", "yes");
57277 }
57278 }
57279 if (this.ignoreLanguageFieldSet)
57280 {
57281 if ((this.ignoreLanguageField == YesNoType.no))
57282 {
57283 writer.WriteAttributeString("IgnoreLanguage", "no");
57284 }
57285 if ((this.ignoreLanguageField == YesNoType.yes))
57286 {
57287 writer.WriteAttributeString("IgnoreLanguage", "yes");
57288 }
57289 }
57290 if (this.ignoreRemoveFailureFieldSet)
57291 {
57292 if ((this.ignoreRemoveFailureField == YesNoType.no))
57293 {
57294 writer.WriteAttributeString("IgnoreRemoveFailure", "no");
57295 }
57296 if ((this.ignoreRemoveFailureField == YesNoType.yes))
57297 {
57298 writer.WriteAttributeString("IgnoreRemoveFailure", "yes");
57299 }
57300 }
57301 if (this.removeFeaturesFieldSet)
57302 {
57303 writer.WriteAttributeString("RemoveFeatures", this.removeFeaturesField);
57304 }
57305 if (this.scheduleFieldSet)
57306 {
57307 if ((this.scheduleField == ScheduleType.afterInstallValidate))
57308 {
57309 writer.WriteAttributeString("Schedule", "afterInstallValidate");
57310 }
57311 if ((this.scheduleField == ScheduleType.afterInstallInitialize))
57312 {
57313 writer.WriteAttributeString("Schedule", "afterInstallInitialize");
57314 }
57315 if ((this.scheduleField == ScheduleType.afterInstallExecute))
57316 {
57317 writer.WriteAttributeString("Schedule", "afterInstallExecute");
57318 }
57319 if ((this.scheduleField == ScheduleType.afterInstallExecuteAgain))
57320 {
57321 writer.WriteAttributeString("Schedule", "afterInstallExecuteAgain");
57322 }
57323 if ((this.scheduleField == ScheduleType.afterInstallFinalize))
57324 {
57325 writer.WriteAttributeString("Schedule", "afterInstallFinalize");
57326 }
57327 }
57328 writer.WriteEndElement();
57329 }
57330
57331 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
57332 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
57333 void ISetAttributes.SetAttribute(string name, string value)
57334 {
57335 if (String.IsNullOrEmpty(name))
57336 {
57337 throw new ArgumentNullException("name");
57338 }
57339 if (("AllowDowngrades" == name))
57340 {
57341 this.allowDowngradesField = Enums.ParseYesNoType(value);
57342 this.allowDowngradesFieldSet = true;
57343 }
57344 if (("AllowSameVersionUpgrades" == name))
57345 {
57346 this.allowSameVersionUpgradesField = Enums.ParseYesNoType(value);
57347 this.allowSameVersionUpgradesFieldSet = true;
57348 }
57349 if (("Disallow" == name))
57350 {
57351 this.disallowField = Enums.ParseYesNoType(value);
57352 this.disallowFieldSet = true;
57353 }
57354 if (("DowngradeErrorMessage" == name))
57355 {
57356 this.downgradeErrorMessageField = value;
57357 this.downgradeErrorMessageFieldSet = true;
57358 }
57359 if (("DisallowUpgradeErrorMessage" == name))
57360 {
57361 this.disallowUpgradeErrorMessageField = value;
57362 this.disallowUpgradeErrorMessageFieldSet = true;
57363 }
57364 if (("MigrateFeatures" == name))
57365 {
57366 this.migrateFeaturesField = Enums.ParseYesNoType(value);
57367 this.migrateFeaturesFieldSet = true;
57368 }
57369 if (("IgnoreLanguage" == name))
57370 {
57371 this.ignoreLanguageField = Enums.ParseYesNoType(value);
57372 this.ignoreLanguageFieldSet = true;
57373 }
57374 if (("IgnoreRemoveFailure" == name))
57375 {
57376 this.ignoreRemoveFailureField = Enums.ParseYesNoType(value);
57377 this.ignoreRemoveFailureFieldSet = true;
57378 }
57379 if (("RemoveFeatures" == name))
57380 {
57381 this.removeFeaturesField = value;
57382 this.removeFeaturesFieldSet = true;
57383 }
57384 if (("Schedule" == name))
57385 {
57386 this.scheduleField = MajorUpgrade.ParseScheduleType(value);
57387 this.scheduleFieldSet = true;
57388 }
57389 }
57390
57391 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
57392 public enum ScheduleType
57393 {
57394
57395 IllegalValue = int.MaxValue,
57396
57397 NotSet = -1,
57398
57399 /// <summary>
57400 /// (Default) Schedules RemoveExistingProducts after the InstallValidate standard
57401 /// action. This scheduling removes the installed product entirely before installing
57402 /// the upgrade product. It's slowest but gives the most flexibility in changing
57403 /// components and features in the upgrade product. Note that if the installation
57404 /// of the upgrade product fails, the machine will have neither version installed.
57405 /// </summary>
57406 afterInstallValidate,
57407
57408 /// <summary>
57409 /// Schedules RemoveExistingProducts after the InstallInitialize standard action.
57410 /// This is similar to the afterInstallValidate scheduling, but if the installation
57411 /// of the upgrade product fails, Windows Installer also rolls back the removal of
57412 /// the installed product -- in other words, reinstalls it.
57413 /// </summary>
57414 afterInstallInitialize,
57415
57416 /// <summary>
57417 /// Schedules RemoveExistingProducts between the InstallExecute and InstallFinalize standard actions.
57418 /// This scheduling installs the upgrade product "on top of" the installed product then lets
57419 /// RemoveExistingProducts uninstall any components that don't also exist in the upgrade product.
57420 /// Note that this scheduling requires strict adherence to the component rules because it relies
57421 /// on component reference counts to be accurate during installation of the upgrade product and
57422 /// removal of the installed product. For more information, see
57423 /// </summary>
57424 afterInstallExecute,
57425
57426 /// <summary>
57427 /// Schedules RemoveExistingProducts between the InstallExecuteAgain and InstallFinalize standard actions.
57428 /// This is identical to the afterInstallExecute scheduling but after the InstallExecuteAgain standard
57429 /// action instead of InstallExecute.
57430 /// </summary>
57431 afterInstallExecuteAgain,
57432
57433 /// <summary>
57434 /// Schedules RemoveExistingProducts after the InstallFinalize standard action. This is similar to the
57435 /// afterInstallExecute and afterInstallExecuteAgain schedulings but takes place outside the
57436 /// installation transaction so if installation of the upgrade product fails, Windows Installer does
57437 /// not roll back the removal of the installed product, so the machine will have both versions
57438 /// installed.
57439 /// </summary>
57440 afterInstallFinalize,
57441 }
57442 }
57443
57444 [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")]
57445 public class ProductSearch : ISchemaElement, ISetAttributes
57446 {
57447
57448 private string minimumField;
57449
57450 private bool minimumFieldSet;
57451
57452 private string maximumField;
57453
57454 private bool maximumFieldSet;
57455
57456 private string languageField;
57457
57458 private bool languageFieldSet;
57459
57460 private YesNoType includeMinimumField;
57461
57462 private bool includeMinimumFieldSet;
57463
57464 private YesNoType includeMaximumField;
57465
57466 private bool includeMaximumFieldSet;
57467
57468 private YesNoType excludeLanguagesField;
57469
57470 private bool excludeLanguagesFieldSet;
57471
57472 private string upgradeCodeField;
57473
57474 private bool upgradeCodeFieldSet;
57475
57476 private string contentField;
57477
57478 private bool contentFieldSet;
57479
57480 private ISchemaElement parentElement;
57481
57482 /// <summary>
57483 /// Specifies the lower bound on the range of product versions to be detected by FindRelatedProducts.
57484 /// </summary>
57485 public string Minimum
57486 {
57487 get
57488 {
57489 return this.minimumField;
57490 }
57491 set
57492 {
57493 this.minimumFieldSet = true;
57494 this.minimumField = value;
57495 }
57496 }
57497
57498 /// <summary>
57499 /// Specifies the upper boundary of the range of product versions detected by FindRelatedProducts.
57500 /// </summary>
57501 public string Maximum
57502 {
57503 get
57504 {
57505 return this.maximumField;
57506 }
57507 set
57508 {
57509 this.maximumFieldSet = true;
57510 this.maximumField = value;
57511 }
57512 }
57513
57514 /// <summary>
57515 /// 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.
57516 /// </summary>
57517 public string Language
57518 {
57519 get
57520 {
57521 return this.languageField;
57522 }
57523 set
57524 {
57525 this.languageFieldSet = true;
57526 this.languageField = value;
57527 }
57528 }
57529
57530 /// <summary>
57531 /// Set to "no" to make the range of versions detected exclude the value specified in Minimum. This attribute is "yes" by default.
57532 /// </summary>
57533 public YesNoType IncludeMinimum
57534 {
57535 get
57536 {
57537 return this.includeMinimumField;
57538 }
57539 set
57540 {
57541 this.includeMinimumFieldSet = true;
57542 this.includeMinimumField = value;
57543 }
57544 }
57545
57546 /// <summary>
57547 /// Set to "yes" to make the range of versions detected include the value specified in Maximum.
57548 /// </summary>
57549 public YesNoType IncludeMaximum
57550 {
57551 get
57552 {
57553 return this.includeMaximumField;
57554 }
57555 set
57556 {
57557 this.includeMaximumFieldSet = true;
57558 this.includeMaximumField = value;
57559 }
57560 }
57561
57562 /// <summary>
57563 /// Set to "yes" to detect all languages, excluding the languages listed in the Language attribute.
57564 /// </summary>
57565 public YesNoType ExcludeLanguages
57566 {
57567 get
57568 {
57569 return this.excludeLanguagesField;
57570 }
57571 set
57572 {
57573 this.excludeLanguagesFieldSet = true;
57574 this.excludeLanguagesField = value;
57575 }
57576 }
57577
57578 /// <summary>
57579 /// This value specifies the upgrade code for the products that are to be detected by the FindRelatedProducts action.
57580 /// </summary>
57581 public string UpgradeCode
57582 {
57583 get
57584 {
57585 return this.upgradeCodeField;
57586 }
57587 set
57588 {
57589 this.upgradeCodeFieldSet = true;
57590 this.upgradeCodeField = value;
57591 }
57592 }
57593
57594 public string Content
57595 {
57596 get
57597 {
57598 return this.contentField;
57599 }
57600 set
57601 {
57602 this.contentFieldSet = true;
57603 this.contentField = value;
57604 }
57605 }
57606
57607 public virtual ISchemaElement ParentElement
57608 {
57609 get
57610 {
57611 return this.parentElement;
57612 }
57613 set
57614 {
57615 this.parentElement = value;
57616 }
57617 }
57618
57619 /// <summary>
57620 /// Processes this element and all child elements into an XmlWriter.
57621 /// </summary>
57622 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
57623 public virtual void OutputXml(XmlWriter writer)
57624 {
57625 if ((null == writer))
57626 {
57627 throw new ArgumentNullException("writer");
57628 }
57629 writer.WriteStartElement("ProductSearch", "http://wixtoolset.org/schemas/v4/wxs");
57630 if (this.minimumFieldSet)
57631 {
57632 writer.WriteAttributeString("Minimum", this.minimumField);
57633 }
57634 if (this.maximumFieldSet)
57635 {
57636 writer.WriteAttributeString("Maximum", this.maximumField);
57637 }
57638 if (this.languageFieldSet)
57639 {
57640 writer.WriteAttributeString("Language", this.languageField);
57641 }
57642 if (this.includeMinimumFieldSet)
57643 {
57644 if ((this.includeMinimumField == YesNoType.no))
57645 {
57646 writer.WriteAttributeString("IncludeMinimum", "no");
57647 }
57648 if ((this.includeMinimumField == YesNoType.yes))
57649 {
57650 writer.WriteAttributeString("IncludeMinimum", "yes");
57651 }
57652 }
57653 if (this.includeMaximumFieldSet)
57654 {
57655 if ((this.includeMaximumField == YesNoType.no))
57656 {
57657 writer.WriteAttributeString("IncludeMaximum", "no");
57658 }
57659 if ((this.includeMaximumField == YesNoType.yes))
57660 {
57661 writer.WriteAttributeString("IncludeMaximum", "yes");
57662 }
57663 }
57664 if (this.excludeLanguagesFieldSet)
57665 {
57666 if ((this.excludeLanguagesField == YesNoType.no))
57667 {
57668 writer.WriteAttributeString("ExcludeLanguages", "no");
57669 }
57670 if ((this.excludeLanguagesField == YesNoType.yes))
57671 {
57672 writer.WriteAttributeString("ExcludeLanguages", "yes");
57673 }
57674 }
57675 if (this.upgradeCodeFieldSet)
57676 {
57677 writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField);
57678 }
57679 if (this.contentFieldSet)
57680 {
57681 writer.WriteString(this.contentField);
57682 }
57683 writer.WriteEndElement();
57684 }
57685
57686 [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
57687 [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
57688 void ISetAttributes.SetAttribute(string name, string value)
57689 {
57690 if (String.IsNullOrEmpty(name))
57691 {
57692 throw new ArgumentNullException("name");
57693 }
57694 if (("Minimum" == name))
57695 {
57696 this.minimumField = value;
57697 this.minimumFieldSet = true;
57698 }
57699 if (("Maximum" == name))
57700 {
57701 this.maximumField = value;
57702 this.maximumFieldSet = true;
57703 }
57704 if (("Language" == name))
57705 {
57706 this.languageField = value;
57707 this.languageFieldSet = true;
57708 }
57709 if (("IncludeMinimum" == name))
57710 {
57711 this.includeMinimumField = Enums.ParseYesNoType(value);
57712 this.includeMinimumFieldSet = true;
57713 }
57714 if (("IncludeMaximum" == name))
57715 {
57716 this.includeMaximumField = Enums.ParseYesNoType(value);
57717 this.includeMaximumFieldSet = true;
57718 }
57719 if (("ExcludeLanguages" == name))
57720 {
57721 this.excludeLanguagesField = Enums.ParseYesNoType(value);
57722 this.excludeLanguagesFieldSet = true;
57723 }
57724 if (("UpgradeCode" == name))
57725 {
57726 this.upgradeCodeField = value;
57727 this.upgradeCodeFieldSet = true;
57728 }
57729 if (("Content" == name))
57730 {
57731 this.contentField = value;
57732 this.contentFieldSet = true;
57733 }
57734 }
57735 }
57736}
diff --git a/src/tools/heat/TypeLibraryHarvester.cs b/src/tools/heat/TypeLibraryHarvester.cs
new file mode 100644
index 00000000..b5c1cba6
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/UtilFinalizeHarvesterMutator.cs b/src/tools/heat/UtilFinalizeHarvesterMutator.cs
new file mode 100644
index 00000000..5af56e89
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/UtilHarvesterMutator.cs b/src/tools/heat/UtilHarvesterMutator.cs
new file mode 100644
index 00000000..af2584e3
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/UtilHeatExtension.cs b/src/tools/heat/UtilHeatExtension.cs
new file mode 100644
index 00000000..469e38b5
--- /dev/null
+++ b/src/tools/heat/UtilHeatExtension.cs
@@ -0,0 +1,389 @@
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.Data;
9 using WixToolset.Harvesters.Data;
10 using WixToolset.Harvesters.Extensibility;
11
12 /// <summary>
13 /// A utility heat extension for the WiX Toolset Harvester application.
14 /// </summary>
15 public sealed class UtilHeatExtension : BaseHeatExtension
16 {
17 public UtilHeatExtension(IServiceProvider serviceProvider)
18 {
19 }
20
21 /// <summary>
22 /// Gets the supported command line types for this extension.
23 /// </summary>
24 /// <value>The supported command line types for this extension.</value>
25 public override HeatCommandLineOption[] CommandLineTypes
26 {
27 get
28 {
29 return new HeatCommandLineOption[]
30 {
31 new HeatCommandLineOption("dir", "harvest a directory"),
32 new HeatCommandLineOption("file", "harvest a file"),
33 new HeatCommandLineOption("perf", "harvest performance counters"),
34 new HeatCommandLineOption("reg", "harvest a .reg file"),
35 new HeatCommandLineOption("-ag", "autogenerate component guids at compile time"),
36 new HeatCommandLineOption("-cg <ComponentGroupName>", "component group name (cannot contain spaces e.g -cg MyComponentGroup)"),
37 new HeatCommandLineOption("-dr <DirectoryName>", "directory reference to root directories (cannot contain spaces e.g. -dr MyAppDirRef)"),
38 new HeatCommandLineOption("-var <VariableName>", "substitute File/@Source=\"SourceDir\" with a preprocessor or a wix variable" + Environment.NewLine +
39 "(e.g. -var var.MySource will become File/@Source=\"$(var.MySource)\\myfile.txt\" and " + Environment.NewLine +
40 "-var wix.MySource will become File/@Source=\"!(wix.MySource)\\myfile.txt\""),
41 new HeatCommandLineOption("-gg", "generate guids now"),
42 new HeatCommandLineOption("-g1", "generated guids are not in brackets"),
43 new HeatCommandLineOption("-ke", "keep empty directories"),
44 new HeatCommandLineOption("-scom", "suppress COM elements"),
45 new HeatCommandLineOption("-sfrag", "suppress fragments"),
46 new HeatCommandLineOption("-srd", "suppress harvesting the root directory as an element"),
47 new HeatCommandLineOption("-svb6", "suppress VB6 COM elements"),
48 new HeatCommandLineOption("-sreg", "suppress registry harvesting"),
49 new HeatCommandLineOption("-suid", "suppress unique identifiers for files, components, & directories"),
50 new HeatCommandLineOption("-t", "transform harvested output with XSL file"),
51 new HeatCommandLineOption("-template", "use template, one of: fragment,module,product"),
52 };
53 }
54 }
55
56 /// <summary>
57 /// Parse the command line options for this extension.
58 /// </summary>
59 /// <param name="type">The active harvester type.</param>
60 /// <param name="args">The option arguments.</param>
61 public override void ParseOptions(string type, string[] args)
62 {
63 bool active = false;
64 IHarvesterExtension harvesterExtension = null;
65 bool suppressHarvestingRegistryValues = false;
66 UtilFinalizeHarvesterMutator utilFinalizeHarvesterMutator = new UtilFinalizeHarvesterMutator();
67 UtilMutator utilMutator = new UtilMutator();
68 List<UtilTransformMutator> transformMutators = new List<UtilTransformMutator>();
69 GenerateType generateType = GenerateType.Components;
70
71 // select the harvester
72 switch (type)
73 {
74 case "dir":
75 harvesterExtension = new DirectoryHarvester();
76 active = true;
77 break;
78 case "file":
79 harvesterExtension = new FileHarvester();
80 active = true;
81 break;
82 case "perf":
83 harvesterExtension = new PerformanceCategoryHarvester();
84 active = true;
85 break;
86 case "reg":
87 harvesterExtension = new RegFileHarvester();
88 active = true;
89 break;
90 }
91
92 // set default settings
93 utilMutator.CreateFragments = true;
94 utilMutator.SetUniqueIdentifiers = true;
95
96 // parse the options
97 for (int i = 0; i < args.Length; i++)
98 {
99 string commandSwitch = args[i];
100
101 if (null == commandSwitch || 0 == commandSwitch.Length) // skip blank arguments
102 {
103 continue;
104 }
105
106 if ('-' == commandSwitch[0] || '/' == commandSwitch[0])
107 {
108 string truncatedCommandSwitch = commandSwitch.Substring(1);
109
110 if ("ag" == truncatedCommandSwitch)
111 {
112 utilMutator.AutogenerateGuids = true;
113 }
114 else if ("cg" == truncatedCommandSwitch)
115 {
116 utilMutator.ComponentGroupName = this.GetArgumentParameter(args, i);
117
118 if (this.Core.Messaging.EncounteredError)
119 {
120 return;
121 }
122 }
123 else if ("dr" == truncatedCommandSwitch)
124 {
125 string dr = this.GetArgumentParameter(args, i);
126
127 if (this.Core.Messaging.EncounteredError)
128 {
129 return;
130 }
131
132 if (harvesterExtension is DirectoryHarvester)
133 {
134 ((DirectoryHarvester)harvesterExtension).RootedDirectoryRef = dr;
135 }
136 else if (harvesterExtension is FileHarvester)
137 {
138 ((FileHarvester)harvesterExtension).RootedDirectoryRef = dr;
139 }
140 }
141 else if ("gg" == truncatedCommandSwitch)
142 {
143 utilMutator.GenerateGuids = true;
144 }
145 else if ("g1" == truncatedCommandSwitch)
146 {
147 utilMutator.GuidFormat = "D";
148 }
149 else if ("ke" == truncatedCommandSwitch)
150 {
151 if (harvesterExtension is DirectoryHarvester)
152 {
153 ((DirectoryHarvester)harvesterExtension).KeepEmptyDirectories = true;
154 }
155 else if (active)
156 {
157 // TODO: error message - not applicable to file harvester
158 }
159 }
160 else if ("scom" == truncatedCommandSwitch)
161 {
162 if (active)
163 {
164 utilFinalizeHarvesterMutator.SuppressCOMElements = true;
165 }
166 else
167 {
168 // TODO: error message - not applicable
169 }
170 }
171 else if ("svb6" == truncatedCommandSwitch)
172 {
173 if (active)
174 {
175 utilFinalizeHarvesterMutator.SuppressVB6COMElements = true;
176 }
177 else
178 {
179 // TODO: error message - not applicable
180 }
181 }
182 else if ("sfrag" == truncatedCommandSwitch)
183 {
184 utilMutator.CreateFragments = false;
185 }
186 else if ("srd" == truncatedCommandSwitch)
187 {
188 if (harvesterExtension is DirectoryHarvester)
189 {
190 ((DirectoryHarvester)harvesterExtension).SuppressRootDirectory = true;
191 }
192 else if (harvesterExtension is FileHarvester)
193 {
194 ((FileHarvester)harvesterExtension).SuppressRootDirectory = true;
195 }
196 }
197 else if ("sreg" == truncatedCommandSwitch)
198 {
199 suppressHarvestingRegistryValues = true;
200 }
201 else if ("suid" == truncatedCommandSwitch)
202 {
203 utilMutator.SetUniqueIdentifiers = false;
204
205 if (harvesterExtension is DirectoryHarvester)
206 {
207 ((DirectoryHarvester)harvesterExtension).SetUniqueIdentifiers = false;
208 }
209 else if (harvesterExtension is FileHarvester)
210 {
211 ((FileHarvester)harvesterExtension).SetUniqueIdentifiers = false;
212 }
213 }
214 else if (truncatedCommandSwitch.StartsWith("t:", StringComparison.Ordinal) || "t" == truncatedCommandSwitch)
215 {
216 string xslFile;
217 if (truncatedCommandSwitch.StartsWith("t:", StringComparison.Ordinal))
218 {
219 this.Core.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("t:", "t"));
220 xslFile = truncatedCommandSwitch.Substring(2);
221 }
222 else
223 {
224 xslFile = this.GetArgumentParameter(args, i, true);
225 }
226
227 if (0 <= xslFile.IndexOf('\"'))
228 {
229 this.Core.Messaging.Write(ErrorMessages.PathCannotContainQuote(xslFile));
230 return;
231 }
232
233 try
234 {
235 xslFile = Path.GetFullPath(xslFile);
236 }
237 catch (Exception e)
238 {
239 this.Core.Messaging.Write(ErrorMessages.InvalidCommandLineFileName(xslFile, e.Message));
240 return;
241 }
242
243 transformMutators.Add(new UtilTransformMutator(xslFile, transformMutators.Count));
244 }
245 else if (truncatedCommandSwitch.StartsWith("template:", StringComparison.Ordinal) || "template" == truncatedCommandSwitch)
246 {
247 string template;
248 if(truncatedCommandSwitch.StartsWith("template:", StringComparison.Ordinal))
249 {
250 this.Core.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("template:", "template"));
251 template = truncatedCommandSwitch.Substring(9);
252 }
253 else
254 {
255 template = this.GetArgumentParameter(args, i);
256 }
257
258 switch (template)
259 {
260 case "fragment":
261 utilMutator.TemplateType = TemplateType.Fragment;
262 break;
263 case "module":
264 utilMutator.TemplateType = TemplateType.Module;
265 break;
266 case "product":
267 utilMutator.TemplateType = TemplateType.Package ;
268 break;
269 default:
270 // TODO: error
271 break;
272 }
273 }
274 else if ("var" == truncatedCommandSwitch)
275 {
276 if (active)
277 {
278 utilFinalizeHarvesterMutator.PreprocessorVariable = this.GetArgumentParameter(args, i);
279
280 if (this.Core.Messaging.EncounteredError)
281 {
282 return;
283 }
284 }
285 }
286 else if ("generate" == truncatedCommandSwitch)
287 {
288 if (harvesterExtension is DirectoryHarvester)
289 {
290 string genType = this.GetArgumentParameter(args, i).ToUpperInvariant();
291 switch (genType)
292 {
293 case "COMPONENTS":
294 generateType = GenerateType.Components;
295 break;
296 case "PAYLOADGROUP":
297 generateType = GenerateType.PayloadGroup;
298 break;
299 default:
300 throw new WixException(HarvesterErrors.InvalidDirectoryOutputType(genType));
301 }
302 }
303 else
304 {
305 // TODO: error message - not applicable
306 }
307 }
308 }
309 }
310
311 // set the appropriate harvester extension
312 if (active)
313 {
314 this.Core.Harvester.Extension = harvesterExtension;
315
316 if (!suppressHarvestingRegistryValues)
317 {
318 this.Core.Mutator.AddExtension(new UtilHarvesterMutator());
319 }
320
321 this.Core.Mutator.AddExtension(utilFinalizeHarvesterMutator);
322
323 if (harvesterExtension is DirectoryHarvester directoryHarvester)
324 {
325 directoryHarvester.GenerateType = generateType;
326 this.Core.Harvester.Core.RootDirectory = this.Core.Harvester.Core.ExtensionArgument;
327 }
328 else if (harvesterExtension is FileHarvester)
329 {
330 if (((FileHarvester)harvesterExtension).SuppressRootDirectory)
331 {
332 this.Core.Harvester.Core.RootDirectory = Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument));
333 }
334 else
335 {
336 this.Core.Harvester.Core.RootDirectory = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument)));
337
338 // GetDirectoryName() returns null for root paths such as "c:\", so make sure to support that as well
339 if (null == this.Core.Harvester.Core.RootDirectory)
340 {
341 this.Core.Harvester.Core.RootDirectory = Path.GetPathRoot(Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument)));
342 }
343 }
344 }
345 }
346
347 // set the mutator
348 this.Core.Mutator.AddExtension(utilMutator);
349
350 // add the transforms
351 foreach (UtilTransformMutator transformMutator in transformMutators)
352 {
353 this.Core.Mutator.AddExtension(transformMutator);
354 }
355 }
356
357 private string GetArgumentParameter(string[] args, int index)
358 {
359 return this.GetArgumentParameter(args, index, false);
360 }
361
362 private string GetArgumentParameter(string[] args, int index, bool allowSpaces)
363 {
364 string truncatedCommandSwitch = args[index];
365 string commandSwitchValue = args[index + 1];
366
367 //increment the index to the switch value
368 index++;
369
370 if (IsValidArg(args, index) && !String.IsNullOrEmpty(commandSwitchValue.Trim()))
371 {
372 if (!allowSpaces && commandSwitchValue.Contains(" "))
373 {
374 this.Core.Messaging.Write(HarvesterErrors.SpacesNotAllowedInArgumentValue(truncatedCommandSwitch, commandSwitchValue));
375 }
376 else
377 {
378 return commandSwitchValue;
379 }
380 }
381 else
382 {
383 this.Core.Messaging.Write(HarvesterErrors.ArgumentRequiresValue(truncatedCommandSwitch));
384 }
385
386 return null;
387 }
388 }
389}
diff --git a/src/tools/heat/UtilMutator.cs b/src/tools/heat/UtilMutator.cs
new file mode 100644
index 00000000..0bc15cd6
--- /dev/null
+++ b/src/tools/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 public 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 public sealed 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/tools/heat/UtilTransformMutator.cs b/src/tools/heat/UtilTransformMutator.cs
new file mode 100644
index 00000000..2d3f2bb0
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/VSHeatExtension.cs b/src/tools/heat/VSHeatExtension.cs
new file mode 100644
index 00000000..d31cd25a
--- /dev/null
+++ b/src/tools/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 public 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 public sealed 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/tools/heat/VSProjectHarvester.cs b/src/tools/heat/VSProjectHarvester.cs
new file mode 100644
index 00000000..93b20cd8
--- /dev/null
+++ b/src/tools/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 public sealed 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/tools/heat/app.config b/src/tools/heat/app.config
new file mode 100644
index 00000000..65d3d6c3
--- /dev/null
+++ b/src/tools/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/tools/heat/heat.csproj b/src/tools/heat/heat.csproj
new file mode 100644
index 00000000..b3d38098
--- /dev/null
+++ b/src/tools/heat/heat.csproj
@@ -0,0 +1,43 @@
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;net472</TargetFrameworks>
7 <OutputType>Exe</OutputType>
8 <Description>Harvester</Description>
9 <Title>WiX Toolset Harvester</Title>
10 <DebugType>embedded</DebugType>
11 <PublishRepositoryUrl>true</PublishRepositoryUrl>
12 <RuntimeIdentifiers Condition=" '$(RuntimeIdentifier)'=='' and '$(TargetFramework)'!='netcoreapp3.1' ">win-x86;win-x64</RuntimeIdentifiers>
13 <AppConfig>app.config</AppConfig>
14 <ApplicationManifest>heat.exe.manifest</ApplicationManifest>
15 <RollForward>LatestMajor</RollForward>
16 </PropertyGroup>
17
18 <ItemGroup>
19 <Compile Update="Serialize\WixHarvesterStrings.Designer.cs">
20 <DesignTime>True</DesignTime>
21 <AutoGen>True</AutoGen>
22 <DependentUpon>WixHarvesterStrings.resx</DependentUpon>
23 </Compile>
24 </ItemGroup>
25
26 <ItemGroup>
27 <EmbeddedResource Update="Serialize\WixHarvesterStrings.resx">
28 <Generator>ResXFileCodeGenerator</Generator>
29 <LastGenOutput>WixHarvesterStrings.Designer.cs</LastGenOutput>
30 </EmbeddedResource>
31 </ItemGroup>
32
33 <ItemGroup>
34 <PackageReference Include="WixToolset.Core" />
35 <PackageReference Include="WixToolset.Core.Burn" />
36 </ItemGroup>
37
38 <ItemGroup>
39 <PackageReference Include="Microsoft.Win32.Registry" />
40 <PackageReference Include="System.Diagnostics.PerformanceCounter" />
41 <PackageReference Include="System.DirectoryServices" />
42 </ItemGroup>
43</Project>
diff --git a/src/tools/heat/heat.exe.manifest b/src/tools/heat/heat.exe.manifest
new file mode 100644
index 00000000..b4adfbb7
--- /dev/null
+++ b/src/tools/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/tools/heat/heat.net461.v3.ncrunchproject b/src/tools/heat/heat.net461.v3.ncrunchproject
new file mode 100644
index 00000000..cf22dfa9
--- /dev/null
+++ b/src/tools/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/tools/heat/heat.netcoreapp2.1.v3.ncrunchproject b/src/tools/heat/heat.netcoreapp2.1.v3.ncrunchproject
new file mode 100644
index 00000000..cf22dfa9
--- /dev/null
+++ b/src/tools/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/tools/publish_t.proj b/src/tools/publish_t.proj
new file mode 100644
index 00000000..b23c3d84
--- /dev/null
+++ b/src/tools/publish_t.proj
@@ -0,0 +1,36 @@
1<Project Sdk="Microsoft.Build.Traversal">
2 <PropertyGroup>
3 <StagePublishX86>$(BaseIntermediateOutputPath)$(Configuration)\net472\x86\</StagePublishX86>
4 <StagePublishX64>$(BaseIntermediateOutputPath)$(Configuration)\net472\x64\</StagePublishX64>
5 <StagePublishDnc>$(BaseIntermediateOutputPath)$(Configuration)\netcoreapp3.1\</StagePublishDnc>
6
7 <PublishBuildFolder>$(PublishRoot)WixToolset.Heat\build\</PublishBuildFolder>
8 <PublishHere>$(PublishRoot)WixToolset.Heat\tools\net472\</PublishHere>
9 <PublishX86>$(PublishRoot)WixToolset.Heat\tools\net472\x86\</PublishX86>
10 <PublishX64>$(PublishRoot)WixToolset.Heat\tools\net472\x64\</PublishX64>
11 <PublishDnc>$(PublishRoot)WixToolset.Heat\tools\netcoreapp3.1\</PublishDnc>
12 </PropertyGroup>
13
14 <ItemGroup>
15 <ProjectReference Include="WixToolset.HeatTasks\WixToolset.HeatTasks.csproj" Properties="TargetFramework=net472;PublishDir=$(StagePublishX86)WixToolset.HeatTasks" Targets="Publish" />
16 <ProjectReference Include="WixToolset.HeatTasks\WixToolset.HeatTasks.csproj" Properties="TargetFramework=netcoreapp3.1;UseAppHost=false;PublishDir=$(StagePublishDnc)WixToolset.HeatTasks" Targets="Publish" />
17
18 <!-- heat.exe doesn't need to filter any files so publish it straight into its final location -->
19 <ProjectReference Include="heat\heat.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x86;PublishDir=$(PublishX86)" Targets="Publish" />
20 <ProjectReference Include="heat\heat.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x64;PublishDir=$(PublishX64)" Targets="Publish" />
21 <ProjectReference Include="heat\heat.csproj" Properties="TargetFramework=netcoreapp3.1;UseAppHost=false;PublishDir=$(PublishDnc)" Targets="Publish" />
22 </ItemGroup>
23
24 <Target Name="CopyToFinalPublishFolder" AfterTargets="Build">
25 <ItemGroup>
26 <From Include="WixToolset.Heat\WixToolset.Heat.targets" To="$(PublishBuildFolder)" />
27 <From Include="$(StagePublishX86)\WixToolset.HeatTasks\*.*" Exclude="$(StagePublishx86)\WixToolset.HeatTasks\Microsoft.Build.*.dll" To="$(PublishHere)" />
28 <From Include="$(StagePublishDnc)\WixToolset.HeatTasks\*.*" Exclude="$(StagePublishDnc)\WixToolset.HeatTasks\Microsoft.Build.*.dll" To="$(PublishDnc)" />
29 </ItemGroup>
30
31 <Copy SourceFiles="@(From)"
32 DestinationFiles="%(To)%(RecursiveDir)%(Filename)%(Extension)"
33 SkipUnchangedFiles="true"
34 UseHardlinksIfPossible="true" />
35 </Target>
36</Project>
diff --git a/src/tools/test/Directory.Build.props b/src/tools/test/Directory.Build.props
new file mode 100644
index 00000000..a0c9a659
--- /dev/null
+++ b/src/tools/test/Directory.Build.props
@@ -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<Project>
5 <Import Project="..\Directory.Build.props" />
6
7 <PropertyGroup>
8 <OutputPath>$(OutputPath)test\$(ProjectName)</OutputPath>
9 </PropertyGroup>
10</Project>
diff --git a/src/tools/test/WixToolsetTest.Heat/HeatRunner.cs b/src/tools/test/WixToolsetTest.Heat/HeatRunner.cs
new file mode 100644
index 00000000..287698a9
--- /dev/null
+++ b/src/tools/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/tools/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj b/src/tools/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj
new file mode 100644
index 00000000..73eb078c
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj
@@ -0,0 +1,20 @@
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 <SignOutput>false</SignOutput>
9 </PropertyGroup>
10
11 <ItemGroup>
12 <PackageReference Include="WixBuildTools.TestSupport" />
13 </ItemGroup>
14
15 <ItemGroup>
16 <PackageReference Include="Microsoft.NET.Test.Sdk" />
17 <PackageReference Include="xunit" />
18 <PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
19 </ItemGroup>
20</Project>
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs b/src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs
new file mode 100644
index 00000000..d54da457
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs
@@ -0,0 +1,410 @@
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.IO;
7 using System.Linq;
8 using WixBuildTools.TestSupport;
9 using WixToolset.Core.TestPackage;
10 using WixToolset.Data;
11 using WixToolset.Data.Symbols;
12 using Xunit;
13
14 public class MsbuildHeatFixture
15 {
16 public static readonly string HeatTargetsPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildHeatFixture).Assembly.CodeBase).AbsolutePath), "..", "..", "..", "publish", "WixToolset.Heat", "build", "WixToolset.Heat.targets");
17
18 public MsbuildHeatFixture()
19 {
20 EnsureWixSdkCached();
21 }
22
23 [Theory]
24 [InlineData(BuildSystem.DotNetCoreSdk)]
25 [InlineData(BuildSystem.MSBuild)]
26 [InlineData(BuildSystem.MSBuild64)]
27 public void CanBuildHeatFilePackage(BuildSystem buildSystem)
28 {
29 var sourceFolder = TestData.Get("TestData", "HeatFilePackage");
30
31 using (var fs = new DisposableFileSystem())
32 {
33 var baseFolder = fs.GetFolder();
34 var binFolder = Path.Combine(baseFolder, @"bin");
35 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
36 var projectPath = Path.Combine(sourceFolder, "HeatFilePackage.wixproj");
37
38 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
39 "-Restore",
40 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath),
41 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "BaseIntermediateOutputPath", intermediateFolder),
42 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "OutputPath", binFolder),
43 });
44 result.AssertSuccess();
45
46 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true);
47 Assert.Single(heatCommandLines);
48
49 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
50 WixAssert.StringCollectionEmpty(warnings);
51
52 var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs");
53 var generatedContents = File.ReadAllText(generatedFilePath);
54 var testXml = generatedContents.GetTestXml();
55 WixAssert.StringEqual(@"<Wix>" +
56 "<Fragment>" +
57 "<DirectoryRef Id='INSTALLFOLDER'>" +
58 "<Component Id='HeatFilePackage.wixproj' Guid='*'>" +
59 "<File Id='HeatFilePackage.wixproj' KeyPath='yes' Source='SourceDir\\HeatFilePackage.wixproj' />" +
60 "</Component>" +
61 "</DirectoryRef>" +
62 "</Fragment>" +
63 "<Fragment>" +
64 "<ComponentGroup Id='ProductComponents'>" +
65 "<ComponentRef Id='HeatFilePackage.wixproj' />" +
66 "</ComponentGroup>" +
67 "</Fragment>" +
68 "</Wix>", testXml);
69
70 var pdbPath = Path.Combine(binFolder, "HeatFilePackage.wixpdb");
71 var intermediate = Intermediate.Load(pdbPath);
72 var section = intermediate.Sections.Single();
73
74 var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
75 WixAssert.StringEqual(@"SourceDir\HeatFilePackage.wixproj", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath()?.Path);
76 }
77 }
78
79 [Theory]
80 [InlineData(BuildSystem.DotNetCoreSdk)]
81 [InlineData(BuildSystem.MSBuild)]
82 [InlineData(BuildSystem.MSBuild64)]
83 public void CanBuildHeatFileWithMultipleFilesPackage(BuildSystem buildSystem)
84 {
85 var sourceFolder = TestData.Get(@"TestData", "HeatFileMultipleFilesSameFileName");
86
87 using (var fs = new DisposableFileSystem())
88 {
89 var baseFolder = fs.GetFolder();
90 var binFolder = Path.Combine(baseFolder, @"bin\");
91 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
92 var projectPath = Path.Combine(sourceFolder, "HeatFileMultipleFilesSameFileName.wixproj");
93
94 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
95 "-Restore",
96 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath),
97 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "BaseIntermediateOutputPath", intermediateFolder),
98 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "OutputPath", binFolder),
99 });
100 result.AssertSuccess();
101
102 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true);
103 Assert.Equal(2, heatCommandLines.Count());
104
105 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
106 WixAssert.StringCollectionEmpty(warnings);
107
108 var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs");
109 Assert.True(File.Exists(generatedFilePath));
110
111 var generatedContents = File.ReadAllText(generatedFilePath);
112 var testXml = generatedContents.GetTestXml();
113 WixAssert.StringEqual("<Wix>" +
114 "<Fragment>" +
115 "<DirectoryRef Id='INSTALLFOLDER'>" +
116 "<Component Id='MyProgram.txt' Guid='*'>" +
117 @"<File Id='MyProgram.txt' KeyPath='yes' Source='SourceDir\MyProgram.txt' />" +
118 "</Component>" +
119 "</DirectoryRef>" +
120 "</Fragment>" +
121 "<Fragment>" +
122 "<ComponentGroup Id='TxtProductComponents'>" +
123 "<ComponentRef Id='MyProgram.txt' />" +
124 "</ComponentGroup>" +
125 "</Fragment>" +
126 "</Wix>", testXml);
127
128 generatedFilePath = Path.Combine(intermediateFolder, "Release", "_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs");
129 Assert.True(File.Exists(generatedFilePath));
130
131 generatedContents = File.ReadAllText(generatedFilePath);
132 testXml = generatedContents.GetTestXml();
133 WixAssert.StringEqual("<Wix>" +
134 "<Fragment>" +
135 "<DirectoryRef Id='INSTALLFOLDER'>" +
136 "<Component Id='MyProgram.json' Guid='*'>" +
137 @"<File Id='MyProgram.json' KeyPath='yes' Source='SourceDir\MyProgram.json' />" +
138 "</Component>" +
139 "</DirectoryRef>" +
140 "</Fragment>" +
141 "<Fragment>" +
142 "<ComponentGroup Id='JsonProductComponents'>" +
143 "<ComponentRef Id='MyProgram.json' />" +
144 "</ComponentGroup>" +
145 "</Fragment>" +
146 "</Wix>", testXml);
147
148 var pdbPath = Path.Combine(binFolder, "HeatFileMultipleFilesSameFileName.wixpdb");
149 Assert.True(File.Exists(pdbPath));
150
151 var intermediate = Intermediate.Load(pdbPath);
152 var section = intermediate.Sections.Single();
153
154 var fileSymbols = section.Symbols.OfType<FileSymbol>().ToArray();
155 WixAssert.StringEqual(@"SourceDir\MyProgram.txt", fileSymbols[0][FileSymbolFields.Source].PreviousValue.AsPath()?.Path);
156 WixAssert.StringEqual(@"SourceDir\MyProgram.json", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath()?.Path);
157 }
158 }
159
160 [Theory]
161 [InlineData(BuildSystem.DotNetCoreSdk, true)]
162 [InlineData(BuildSystem.DotNetCoreSdk, false)]
163 [InlineData(BuildSystem.MSBuild, true)]
164 [InlineData(BuildSystem.MSBuild, false)]
165 [InlineData(BuildSystem.MSBuild64, true)]
166 [InlineData(BuildSystem.MSBuild64, false)]
167 public void CanBuildHeatProjectPreSdkStyle(BuildSystem buildSystem, bool useToolsVersion)
168 {
169 var sourceFolder = TestData.Get(@"TestData", "HeatProject");
170
171 using (var fs = new TestDataFolderFileSystem())
172 {
173 fs.Initialize(sourceFolder);
174 File.Copy("global.json", Path.Combine(fs.BaseFolder, "global.json"));
175
176 var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectPreSdkStyle");
177 var binFolder = Path.Combine(baseFolder, @"bin\");
178 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
179 var projectPath = Path.Combine(baseFolder, "HeatProjectPreSdkStyle.wixproj");
180
181 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
182 {
183 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath),
184 useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty,
185 });
186 result.AssertSuccess();
187
188 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true);
189 var heatCommandLine = Assert.Single(heatCommandLines);
190
191 if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk)
192 {
193 Assert.Contains("-usetoolsversion", heatCommandLine);
194 }
195 else
196 {
197 Assert.DoesNotContain("-usetoolsversion", heatCommandLine);
198 }
199
200 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
201 WixAssert.StringCollectionEmpty(warnings);
202
203 var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_ToolsVersion4Cs.wxs");
204 Assert.True(File.Exists(generatedFilePath));
205
206 var generatedContents = File.ReadAllText(generatedFilePath);
207 var testXml = generatedContents.GetTestXml();
208 WixAssert.StringEqual(@"<Wix>" +
209 "<Fragment>" +
210 "<DirectoryRef Id='ToolsVersion4Cs.Binaries'>" +
211 "<Component Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' Guid='*'>" +
212 "<File Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' Source='$(var.ToolsVersion4Cs.TargetDir)\\ToolsVersion4Cs.dll' />" +
213 "</Component>" +
214 "</DirectoryRef>" +
215 "</Fragment>" +
216 "<Fragment>" +
217 "<ComponentGroup Id='ToolsVersion4Cs.Binaries'>" +
218 "<ComponentRef Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' />" +
219 "</ComponentGroup>" +
220 "</Fragment>" +
221 "<Fragment>" +
222 "<DirectoryRef Id='ToolsVersion4Cs.Symbols'>" +
223 "<Component Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' Guid='*'>" +
224 "<File Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' Source='$(var.ToolsVersion4Cs.TargetDir)\\ToolsVersion4Cs.pdb' />" +
225 "</Component>" +
226 "</DirectoryRef>" +
227 "</Fragment>" +
228 "<Fragment>" +
229 "<ComponentGroup Id='ToolsVersion4Cs.Symbols'>" +
230 "<ComponentRef Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' />" +
231 "</ComponentGroup>" +
232 "</Fragment>" +
233 "<Fragment>" +
234 "<DirectoryRef Id='ToolsVersion4Cs.Sources'>" +
235 "<Component Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' Guid='*'>" +
236 "<File Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' Source='$(var.ToolsVersion4Cs.ProjectDir)\\ToolsVersion4Cs.csproj' />" +
237 "</Component>" +
238 "<Directory Id='ToolsVersion4Cs.Sources.Properties' Name='Properties'>" +
239 "<Component Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' Guid='*'>" +
240 "<File Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' Source='$(var.ToolsVersion4Cs.ProjectDir)\\Properties\\AssemblyInfo.cs' />" +
241 "</Component>" +
242 "</Directory>" +
243 "</DirectoryRef>" +
244 "</Fragment>" +
245 "<Fragment>" +
246 "<ComponentGroup Id='ToolsVersion4Cs.Sources'>" +
247 "<ComponentRef Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' />" +
248 "<ComponentRef Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' />" +
249 "</ComponentGroup>" +
250 "</Fragment>" +
251 "<Fragment>" +
252 "<ComponentGroup Id='ToolsVersion4Cs.Content' />" +
253 "</Fragment>" +
254 "<Fragment>" +
255 "<ComponentGroup Id='ToolsVersion4Cs.Satellites' />" +
256 "</Fragment>" +
257 "<Fragment>" +
258 "<ComponentGroup Id='ToolsVersion4Cs.Documents' />" +
259 "</Fragment>" +
260 "</Wix>", testXml);
261
262 var pdbPath = Path.Combine(binFolder, "Release", "HeatProjectPreSdkStyle.wixpdb");
263 Assert.True(File.Exists(pdbPath));
264
265 var intermediate = Intermediate.Load(pdbPath);
266 var section = intermediate.Sections.Single();
267
268 var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
269 WixAssert.StringEqual(Path.Combine(fs.BaseFolder, "ToolsVersion4Cs", "bin", "Release\\\\ToolsVersion4Cs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path);
270 }
271 }
272
273 [Theory]
274 [InlineData(BuildSystem.DotNetCoreSdk, true)]
275 [InlineData(BuildSystem.DotNetCoreSdk, false)]
276 [InlineData(BuildSystem.MSBuild, true)]
277 [InlineData(BuildSystem.MSBuild, false)]
278 [InlineData(BuildSystem.MSBuild64, true)]
279 [InlineData(BuildSystem.MSBuild64, false)]
280 public void CanBuildHeatProjectSdkStyle(BuildSystem buildSystem, bool useToolsVersion)
281 {
282 var sourceFolder = TestData.Get(@"TestData\HeatProject");
283
284 using (var fs = new TestDataFolderFileSystem())
285 {
286 fs.Initialize(sourceFolder);
287 File.Copy("global.json", Path.Combine(fs.BaseFolder, "global.json"));
288
289 var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectSdkStyle");
290 var binFolder = Path.Combine(baseFolder, @"bin\");
291 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
292 var projectPath = Path.Combine(fs.BaseFolder, "HeatProjectSdkStyle", "HeatProjectSdkStyle.wixproj");
293 var referencedProjectPath = Path.Combine(fs.BaseFolder, "SdkStyleCs", "SdkStyleCs.csproj");
294
295 var result = MsbuildUtilities.BuildProject(buildSystem, referencedProjectPath, new[]
296 {
297 "-t:restore",
298 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath),
299 });
300 result.AssertSuccess();
301
302 result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
303 {
304 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath),
305 useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty,
306 });
307 result.AssertSuccess();
308
309 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true);
310 var heatCommandLine = Assert.Single(heatCommandLines);
311
312 if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk)
313 {
314 Assert.Contains("-usetoolsversion", heatCommandLine);
315 }
316 else
317 {
318 Assert.DoesNotContain("-usetoolsversion", heatCommandLine);
319 }
320
321 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
322 WixAssert.StringCollectionEmpty(warnings);
323
324 var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_SdkStyleCs.wxs");
325 Assert.True(File.Exists(generatedFilePath));
326
327 var generatedContents = File.ReadAllText(generatedFilePath);
328 var testXml = generatedContents.GetTestXml();
329 WixAssert.StringEqual(@"<Wix>" +
330 "<Fragment>" +
331 "<DirectoryRef Id='SdkStyleCs.Binaries'>" +
332 "<Component Id='SdkStyleCs.Binaries.SdkStyleCs.dll' Guid='*'>" +
333 "<File Id='SdkStyleCs.Binaries.SdkStyleCs.dll' Source='$(var.SdkStyleCs.TargetDir)\\SdkStyleCs.dll' />" +
334 "</Component>" +
335 "</DirectoryRef>" +
336 "</Fragment>" +
337 "<Fragment>" +
338 "<ComponentGroup Id='SdkStyleCs.Binaries'>" +
339 "<ComponentRef Id='SdkStyleCs.Binaries.SdkStyleCs.dll' />" +
340 "</ComponentGroup>" +
341 "</Fragment>" +
342 "<Fragment>" +
343 "<DirectoryRef Id='SdkStyleCs.Symbols'>" +
344 "<Component Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' Guid='*'>" +
345 "<File Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' Source='$(var.SdkStyleCs.TargetDir)\\SdkStyleCs.pdb' />" +
346 "</Component>" +
347 "</DirectoryRef>" +
348 "</Fragment>" +
349 "<Fragment>" +
350 "<ComponentGroup Id='SdkStyleCs.Symbols'>" +
351 "<ComponentRef Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' />" +
352 "</ComponentGroup>" +
353 "</Fragment>" +
354 "<Fragment>" +
355 "<DirectoryRef Id='SdkStyleCs.Sources'>" +
356 "<Component Id='SdkStyleCs.Sources.SdkStyleCs.cs' Guid='*'>" +
357 "<File Id='SdkStyleCs.Sources.SdkStyleCs.cs' Source='$(var.SdkStyleCs.ProjectDir)\\SdkStyleCs.cs' />" +
358 "</Component>" +
359 "<Component Id='SdkStyleCs.Sources.SdkStyleCs.csproj' Guid='*'>" +
360 "<File Id='SdkStyleCs.Sources.SdkStyleCs.csproj' Source='$(var.SdkStyleCs.ProjectDir)\\SdkStyleCs.csproj' />" +
361 "</Component>" +
362 "</DirectoryRef>" +
363 "</Fragment>" +
364 "<Fragment>" +
365 "<ComponentGroup Id='SdkStyleCs.Sources'>" +
366 "<ComponentRef Id='SdkStyleCs.Sources.SdkStyleCs.cs' />" +
367 "<ComponentRef Id='SdkStyleCs.Sources.SdkStyleCs.csproj' />" +
368 "</ComponentGroup>" +
369 "</Fragment>" +
370 "<Fragment>" +
371 "<ComponentGroup Id='SdkStyleCs.Content' />" +
372 "</Fragment>" +
373 "<Fragment>" +
374 "<ComponentGroup Id='SdkStyleCs.Satellites' />" +
375 "</Fragment>" +
376 "<Fragment>" +
377 "<ComponentGroup Id='SdkStyleCs.Documents' />" +
378 "</Fragment>" +
379 "</Wix>", testXml);
380
381 var pdbPath = Path.Combine(binFolder, "Release", "HeatProjectSdkStyle.wixpdb");
382 Assert.True(File.Exists(pdbPath));
383
384 var intermediate = Intermediate.Load(pdbPath);
385 var section = intermediate.Sections.Single();
386
387 var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
388 WixAssert.StringEqual(Path.Combine(fs.BaseFolder, "SdkStyleCs", "bin", "Release", "netstandard2.0\\\\SdkStyleCs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path);
389 }
390 }
391
392 /// <summary>
393 /// This method exists to get the WixToolset.Sdk.nupkg into the NuGet package cache using the global.json
394 /// and nuget.config in the root of the repository. By pre-caching the WiX SDK, the rest of the tests will
395 /// pull the binaries out of the cache instead of needing to find the original .nupkg in the build artifacts
396 /// folder (which requires use of nuget.config found in the root of the repo)
397 /// </summary>
398 private static void EnsureWixSdkCached()
399 {
400 // This EnsureWixSdkCached project exists only to pre-cache the WixToolset.Sdk for use by later projects.
401 var sourceFolder = TestData.Get("TestData", "EnsureWixSdkCached");
402
403 var result = MsbuildUtilities.BuildProject(BuildSystem.DotNetCoreSdk, Path.Combine(sourceFolder, "EnsureWixSdkCached.wixproj"), new[]
404 {
405 "-t:restore",
406 });
407 result.AssertSuccess();
408 }
409 }
410}
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/TestData/EnsureWixSdkCached/EnsureWixSdkCached.wixproj b/src/tools/test/WixToolsetTest.HeatTasks/TestData/EnsureWixSdkCached/EnsureWixSdkCached.wixproj
new file mode 100644
index 00000000..7730425f
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/TestData/EnsureWixSdkCached/EnsureWixSdkCached.wixproj
@@ -0,0 +1,4 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project Sdk="WixToolset.Sdk">
3 <!-- This project exists only to pre-cache the WixToolset.Sdk for use by the other test data projects. -->
4</Project>
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj
new file mode 100644
index 00000000..2aaf5c01
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj
@@ -0,0 +1,26 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project Sdk="WixToolset.Sdk">
3
4 <ItemGroup>
5 <BindInputPaths Include="." />
6 </ItemGroup>
7
8 <PropertyGroup>
9 <HarvestFileSuppressUniqueIds>true</HarvestFileSuppressUniqueIds>
10 </PropertyGroup>
11
12 <ItemGroup>
13 <HarvestFile Include="MyProgram.txt">
14 <ComponentGroupName>TxtProductComponents</ComponentGroupName>
15 <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
16 <SuppressRootDirectory>true</SuppressRootDirectory>
17 </HarvestFile>
18 <HarvestFile Include="MyProgram.json">
19 <ComponentGroupName>JsonProductComponents</ComponentGroupName>
20 <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
21 <SuppressRootDirectory>true</SuppressRootDirectory>
22 </HarvestFile>
23 </ItemGroup>
24
25 <Import Project="$(HeatTargetsPath)" />
26</Project>
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json
new file mode 100644
index 00000000..5f282702
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json
@@ -0,0 +1 @@
 \ No newline at end of file
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt
new file mode 100644
index 00000000..5f282702
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt
@@ -0,0 +1 @@
 \ No newline at end of file
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/Package.wxs b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/Package.wxs
new file mode 100644
index 00000000..5abcee9f
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/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/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFilePackage/HeatFilePackage.wixproj b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFilePackage/HeatFilePackage.wixproj
new file mode 100644
index 00000000..345832cf
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFilePackage/HeatFilePackage.wixproj
@@ -0,0 +1,21 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project Sdk="WixToolset.Sdk">
3
4 <ItemGroup>
5 <BindInputPaths Include="." />
6 </ItemGroup>
7
8 <PropertyGroup>
9 <HarvestFileSuppressUniqueIds>true</HarvestFileSuppressUniqueIds>
10 </PropertyGroup>
11
12 <ItemGroup>
13 <HarvestFile Include="HeatFilePackage.wixproj">
14 <ComponentGroupName>ProductComponents</ComponentGroupName>
15 <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
16 <SuppressRootDirectory>true</SuppressRootDirectory>
17 </HarvestFile>
18 </ItemGroup>
19
20 <Import Project="$(HeatTargetsPath)" />
21</Project>
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFilePackage/Package.wxs b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFilePackage/Package.wxs
new file mode 100644
index 00000000..f5fa8cf6
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/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/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj
new file mode 100644
index 00000000..a05348a5
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj
@@ -0,0 +1,18 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project Sdk="WixToolset.Sdk">
3
4 <ItemGroup>
5 <BindInputPaths Include="." />
6 </ItemGroup>
7
8 <PropertyGroup>
9 <EnableProjectHarvesting>true</EnableProjectHarvesting>
10 <HarvestProjectsSuppressUniqueIds>true</HarvestProjectsSuppressUniqueIds>
11 </PropertyGroup>
12
13 <ItemGroup>
14 <ProjectReference Include="..\ToolsVersion4Cs\ToolsVersion4Cs.csproj" />
15 </ItemGroup>
16
17 <Import Project="$(HeatTargetsPath)" />
18</Project>
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs
new file mode 100644
index 00000000..6c12861b
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/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/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj
new file mode 100644
index 00000000..202921fe
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj
@@ -0,0 +1,18 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project Sdk="WixToolset.Sdk">
3
4 <ItemGroup>
5 <BindInputPaths Include="." />
6 </ItemGroup>
7
8 <PropertyGroup>
9 <EnableProjectHarvesting>true</EnableProjectHarvesting>
10 <HarvestProjectsSuppressUniqueIds>true</HarvestProjectsSuppressUniqueIds>
11 </PropertyGroup>
12
13 <ItemGroup>
14 <ProjectReference Include="..\SdkStyleCs\SdkStyleCs.csproj" />
15 </ItemGroup>
16
17 <Import Project="$(HeatTargetsPath)" />
18</Project>
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs
new file mode 100644
index 00000000..d30218f3
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/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/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs
new file mode 100644
index 00000000..2b2c5be2
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/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/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj
new file mode 100644
index 00000000..755976bc
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/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/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000..c29a2303
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/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/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj b/src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj
new file mode 100644
index 00000000..e5723ea2
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/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.7.2</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/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.csproj b/src/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.csproj
new file mode 100644
index 00000000..c0c7c903
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.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>net472</TargetFramework>
7 <IsPackable>false</IsPackable>
8 <DebugType>embedded</DebugType>
9 <DefaultItemExcludes>TestData\**;$(DefaultItemExcludes)</DefaultItemExcludes>
10 <SignOutput>false</SignOutput>
11 </PropertyGroup>
12
13 <ItemGroup>
14 <Content Include="TestData\**" CopyToOutputDirectory="PreserveNewest" />
15 <Content Include="..\..\..\..\global.json" CopyToOutputDirectory="PreserveNewest" />
16 </ItemGroup>
17
18 <ItemGroup>
19 <PackageReference Include="WixBuildTools.TestSupport" />
20 <PackageReference Include="WixToolset.Core.TestPackage" />
21 </ItemGroup>
22
23 <ItemGroup>
24 <PackageReference Include="Microsoft.NET.Test.Sdk" />
25 <PackageReference Include="xunit" />
26 <PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
27 </ItemGroup>
28</Project>
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.v3.ncrunchproject b/src/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.v3.ncrunchproject
new file mode 100644
index 00000000..319cd523
--- /dev/null
+++ b/src/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.v3.ncrunchproject
@@ -0,0 +1,5 @@
1<ProjectConfiguration>
2 <Settings>
3 <IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
4 </Settings>
5</ProjectConfiguration> \ No newline at end of file
diff --git a/src/tools/thmviewer/thmviewer.v3.ncrunchproject b/src/tools/thmviewer/thmviewer.v3.ncrunchproject
index 3cffd6ce..1d0a6a6c 100644
--- a/src/tools/thmviewer/thmviewer.v3.ncrunchproject
+++ b/src/tools/thmviewer/thmviewer.v3.ncrunchproject
@@ -3,5 +3,6 @@
3 <AdditionalFilesToIncludeForProject> 3 <AdditionalFilesToIncludeForProject>
4 <Value>thmviewer.manifest</Value> 4 <Value>thmviewer.manifest</Value>
5 </AdditionalFilesToIncludeForProject> 5 </AdditionalFilesToIncludeForProject>
6 <IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
6 </Settings> 7 </Settings>
7</ProjectConfiguration> \ No newline at end of file 8</ProjectConfiguration> \ No newline at end of file
diff --git a/src/tools/tools.cmd b/src/tools/tools.cmd
index 4764a8fe..125bf298 100644
--- a/src/tools/tools.cmd
+++ b/src/tools/tools.cmd
@@ -2,17 +2,40 @@
2@pushd %~dp0 2@pushd %~dp0
3 3
4@set _C=Debug 4@set _C=Debug
5@set _L=%~dp0..\..\build\logs
6
5:parse_args 7:parse_args
6@if /i "%1"=="release" set _C=Release 8@if /i "%1"=="release" set _C=Release
9@if /i "%1"=="inc" set _INCREMENTAL=1
10@if /i "%1"=="clean" set _INCREMENTAL= & set _CLEAN=1
7@if not "%1"=="" shift & goto parse_args 11@if not "%1"=="" shift & goto parse_args
8 12
13:: Clean
14@if NOT "%_INCREMENTAL%"=="" call :clean
15@if NOT "%_CLEAN%"=="" goto :end
16
9@echo Building tools %_C% 17@echo Building tools %_C%
10 18
11:: tools 19:: Build
20msbuild -Restore tools.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\tools_build.binlog || exit /b
21
22:: Publish
23msbuild publish_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\tools_publish.binlog || exit /b
24
25:: Test
26dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.HeatTasks -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.HeatTasks.trx" || exit /b
27
28:: Pack
29msbuild -t:Pack WixToolset.Heat -p:Configuration=%_C% -p:NoBuild=true -nologo -m -warnaserror -bl:..\..\build\logs\tools_pack.binlog || exit /b
12 30
13nuget restore || exit /b 31@goto :end
14 32
15msbuild -t:Build -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\tools_build.binlog || exit /b 33:clean
34@rd /s/q "..\..\build\tools" 2> nul
35@del "..\..\build\artifacts\WixToolset.Heat.*.nupkg" 2> nul
36@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.heat" 2> nul
37@exit /b
16 38
39:end
17@popd 40@popd
18@endlocal 41@endlocal
diff --git a/src/tools/tools.sln b/src/tools/tools.sln
index 4da1e8fd..4df8367e 100644
--- a/src/tools/tools.sln
+++ b/src/tools/tools.sln
@@ -1,11 +1,20 @@
1
2Microsoft Visual Studio Solution File, Format Version 12.00 1Microsoft Visual Studio Solution File, Format Version 12.00
3# Visual Studio Version 16 2# Visual Studio Version 17
4VisualStudioVersion = 16.0.30711.63 3VisualStudioVersion = 17.2.32616.157
5MinimumVisualStudioVersion = 15.0.26124.0 4MinimumVisualStudioVersion = 15.0.26124.0
6Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thmviewer", "thmviewer\thmviewer.vcxproj", "{95228C13-97F5-484A-B4A2-ECF4618B0881}" 5Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thmviewer", "thmviewer\thmviewer.vcxproj", "{95228C13-97F5-484A-B4A2-ECF4618B0881}"
7EndProject 6EndProject
8Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixToolset.Templates", "WixToolset.Templates\WixToolset.Templates.csproj", "{D1385232-CA10-4092-BAB5-4E5499FE144C}" 7Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Templates", "WixToolset.Templates\WixToolset.Templates.csproj", "{D1385232-CA10-4092-BAB5-4E5499FE144C}"
8EndProject
9Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Heat", "WixToolset.Heat\WixToolset.Heat.csproj", "{4B301D2D-43D3-4000-8132-36C5A1E9F8F0}"
10EndProject
11Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "heat", "heat\heat.csproj", "{6C747707-29DE-429E-87A4-F6F81DD146C6}"
12EndProject
13Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F7A815A5-37AE-4EC4-A6D6-B29565055668}"
14EndProject
15Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.HeatTasks", "WixToolset.HeatTasks\WixToolset.HeatTasks.csproj", "{EBDCA232-17CD-40CE-B592-CD7230388BEF}"
16EndProject
17Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.HeatTasks", "test\WixToolsetTest.HeatTasks\WixToolsetTest.HeatTasks.csproj", "{3FB7F972-31A6-4929-B6BF-EACEC659A7D3}"
9EndProject 18EndProject
10Global 19Global
11 GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -30,10 +39,45 @@ Global
30 {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|Any CPU.Build.0 = Release|Any CPU 39 {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|Any CPU.Build.0 = Release|Any CPU
31 {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.ActiveCfg = Release|Any CPU 40 {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.ActiveCfg = Release|Any CPU
32 {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.Build.0 = Release|Any CPU 41 {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.Build.0 = Release|Any CPU
42 {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43 {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
44 {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|x86.ActiveCfg = Debug|Any CPU
45 {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|x86.Build.0 = Debug|Any CPU
46 {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
47 {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|Any CPU.Build.0 = Release|Any CPU
48 {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|x86.ActiveCfg = Release|Any CPU
49 {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|x86.Build.0 = Release|Any CPU
50 {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51 {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
52 {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|x86.ActiveCfg = Debug|Any CPU
53 {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|x86.Build.0 = Debug|Any CPU
54 {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
55 {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|Any CPU.Build.0 = Release|Any CPU
56 {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|x86.ActiveCfg = Release|Any CPU
57 {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|x86.Build.0 = Release|Any CPU
58 {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59 {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
60 {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|x86.ActiveCfg = Debug|Any CPU
61 {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|x86.Build.0 = Debug|Any CPU
62 {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
63 {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|Any CPU.Build.0 = Release|Any CPU
64 {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|x86.ActiveCfg = Release|Any CPU
65 {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|x86.Build.0 = Release|Any CPU
66 {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
67 {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
68 {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|x86.ActiveCfg = Debug|Any CPU
69 {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|x86.Build.0 = Debug|Any CPU
70 {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
71 {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|Any CPU.Build.0 = Release|Any CPU
72 {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|x86.ActiveCfg = Release|Any CPU
73 {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|x86.Build.0 = Release|Any CPU
33 EndGlobalSection 74 EndGlobalSection
34 GlobalSection(SolutionProperties) = preSolution 75 GlobalSection(SolutionProperties) = preSolution
35 HideSolutionNode = FALSE 76 HideSolutionNode = FALSE
36 EndGlobalSection 77 EndGlobalSection
78 GlobalSection(NestedProjects) = preSolution
79 {3FB7F972-31A6-4929-B6BF-EACEC659A7D3} = {F7A815A5-37AE-4EC4-A6D6-B29565055668}
80 EndGlobalSection
37 GlobalSection(ExtensibilityGlobals) = postSolution 81 GlobalSection(ExtensibilityGlobals) = postSolution
38 SolutionGuid = {537F1116-39FE-4AED-A9A2-35030E5750D5} 82 SolutionGuid = {537F1116-39FE-4AED-A9A2-35030E5750D5}
39 EndGlobalSection 83 EndGlobalSection
diff --git a/src/tools/tools.v3.ncrunchsolution b/src/tools/tools.v3.ncrunchsolution
new file mode 100644
index 00000000..10420ac9
--- /dev/null
+++ b/src/tools/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