From a627ca9b720047e633a8fe72003ab9bee31006c5 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Tue, 26 Jul 2022 17:20:39 -0700 Subject: Create WixToolset.Heat.nupkg to distribute heat.exe and Heat targets Moves Heat functionality to the "tools" layer and packages it all up in WixToolset.Heat.nupkg for distribution in WiX v4. Completes 6838 --- src/build_all.cmd | 8 +- src/clean.cmd | 1 + src/ext/Bal/bal.cmd | 2 +- .../EarliestCoreBundleSCD.wixproj | 4 + .../EarliestCoreBundleTrimmedSCD.wixproj | 4 + .../LatestCoreBundleSCD.wixproj | 4 + .../LatestCoreBundleTrimmedSCD.wixproj | 4 + src/ext/Bal/test/examples/examples.proj | 19 +- .../SetBuildNumber/Directory.Packages.props.pp | 2 + .../WixBuildTools.TestSupport/MsbuildUtilities.cs | 108 + .../burn/TestData/Manual/BundleB/BundleB.wixproj | 1 + src/testresultfilelist.txt | 2 +- src/tools/Directory.Build.props | 4 + src/tools/WixToolset.Heat/WixToolset.Heat.csproj | 12 + src/tools/WixToolset.Heat/WixToolset.Heat.nuspec | 20 + src/tools/WixToolset.Heat/WixToolset.Heat.targets | 516 + src/tools/WixToolset.HeatTasks/HeatDirectory.cs | 47 + src/tools/WixToolset.HeatTasks/HeatFile.cs | 44 + src/tools/WixToolset.HeatTasks/HeatProject.cs | 72 + src/tools/WixToolset.HeatTasks/HeatTask.cs | 176 + .../RefreshBundleGeneratedFile.cs | 104 + .../WixToolset.HeatTasks/RefreshGeneratedFile.cs | 91 + src/tools/WixToolset.HeatTasks/RefreshTask.cs | 59 + .../WixToolset.HeatTasks/WixCommandLineBuilder.cs | 56 + .../WixToolset.HeatTasks.csproj | 17 + src/tools/heat/AssemblyHarvester.cs | 41 + src/tools/heat/ConsoleMessageListener.cs | 90 + src/tools/heat/Data/HarvesterErrors.cs | 205 + src/tools/heat/Data/HarvesterVerboses.cs | 62 + src/tools/heat/Data/HarvesterWarnings.cs | 79 + src/tools/heat/Data/HeatCommandLineOption.cs | 31 + src/tools/heat/Data/IHeatCommandLine.cs | 12 + src/tools/heat/DirectoryHarvester.cs | 308 + src/tools/heat/DllHarvester.cs | 106 + .../heat/Extensibility/BaseHarvesterExtension.cs | 26 + src/tools/heat/Extensibility/BaseHeatExtension.cs | 55 + .../heat/Extensibility/BaseMutatorExtension.cs | 202 + src/tools/heat/Extensibility/IHarvester.cs | 31 + src/tools/heat/Extensibility/IHarvesterCore.cs | 51 + .../heat/Extensibility/IHarvesterExtension.cs | 14 + src/tools/heat/Extensibility/IHeatCore.cs | 29 + src/tools/heat/Extensibility/IHeatExtension.cs | 16 + src/tools/heat/Extensibility/IMutator.cs | 44 + src/tools/heat/Extensibility/IMutatorExtension.cs | 18 + src/tools/heat/FileHarvester.cs | 156 + src/tools/heat/Harvester.cs | 65 + src/tools/heat/HarvesterCore.cs | 76 + src/tools/heat/HeatCommand.cs | 277 + src/tools/heat/HeatCommandLine.cs | 91 + src/tools/heat/HeatCommandLineFactory.cs | 27 + src/tools/heat/HeatCore.cs | 45 + src/tools/heat/HelpCommand.cs | 106 + src/tools/heat/IIsFinalizeHarvesterMutator.cs | 160 + src/tools/heat/IIsHarvesterMutator.cs | 429 + src/tools/heat/IIsHeatExtension.cs | 80 + src/tools/heat/IIsWebSiteHarvester.cs | 439 + src/tools/heat/Mutator.cs | 93 + src/tools/heat/PerformanceCategoryHarvester.cs | 207 + src/tools/heat/Program.cs | 84 + src/tools/heat/RegFileHarvester.cs | 438 + src/tools/heat/RegistryHarvester.cs | 477 + src/tools/heat/Serialize/CodeDomInterfaces.cs | 96 + src/tools/heat/Serialize/CodeDomReader.cs | 162 + src/tools/heat/Serialize/ElementCollection.cs | 618 + .../heat/Serialize/WixHarvesterStrings.Designer.cs | 153 + src/tools/heat/Serialize/WixHarvesterStrings.resx | 150 + src/tools/heat/Serialize/iis.cs | 5915 ++ src/tools/heat/Serialize/util.cs | 11462 ++++ src/tools/heat/Serialize/vs.cs | 1574 + src/tools/heat/Serialize/wix.cs | 57736 +++++++++++++++++++ src/tools/heat/TypeLibraryHarvester.cs | 93 + src/tools/heat/UtilFinalizeHarvesterMutator.cs | 1185 + src/tools/heat/UtilHarvesterMutator.cs | 218 + src/tools/heat/UtilHeatExtension.cs | 389 + src/tools/heat/UtilMutator.cs | 633 + src/tools/heat/UtilTransformMutator.cs | 77 + src/tools/heat/VSHeatExtension.cs | 229 + src/tools/heat/VSProjectHarvester.cs | 1455 + src/tools/heat/app.config | 10 + src/tools/heat/heat.csproj | 43 + src/tools/heat/heat.exe.manifest | 20 + src/tools/heat/heat.net461.v3.ncrunchproject | 5 + .../heat/heat.netcoreapp2.1.v3.ncrunchproject | 5 + src/tools/publish_t.proj | 36 + src/tools/test/Directory.Build.props | 10 + src/tools/test/WixToolsetTest.Heat/HeatRunner.cs | 92 + .../WixToolsetTest.Heat/WixToolsetTest.Heat.csproj | 20 + .../WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs | 410 + .../EnsureWixSdkCached/EnsureWixSdkCached.wixproj | 4 + .../HeatFileMultipleFilesSameFileName.wixproj | 26 + .../MyProgram.json | 1 + .../MyProgram.txt | 1 + .../HeatFileMultipleFilesSameFileName/Package.wxs | 18 + .../HeatFilePackage/HeatFilePackage.wixproj | 21 + .../TestData/HeatFilePackage/Package.wxs | 17 + .../HeatProjectPreSdkStyle.wixproj | 18 + .../HeatProject/HeatProjectPreSdkStyle/Package.wxs | 17 + .../HeatProjectSdkStyle.wixproj | 18 + .../HeatProject/HeatProjectSdkStyle/Package.wxs | 17 + .../TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs | 8 + .../HeatProject/SdkStyleCs/SdkStyleCs.csproj | 8 + .../ToolsVersion4Cs/Properties/AssemblyInfo.cs | 11 + .../ToolsVersion4Cs/ToolsVersion4Cs.csproj | 36 + .../WixToolsetTest.HeatTasks.csproj | 28 + .../WixToolsetTest.HeatTasks.v3.ncrunchproject | 5 + src/tools/thmviewer/thmviewer.v3.ncrunchproject | 1 + src/tools/tools.cmd | 29 +- src/tools/tools.sln | 52 +- src/tools/tools.v3.ncrunchsolution | 6 + src/wix/WixToolset.BuildTasks/HeatDirectory.cs | 96 - src/wix/WixToolset.BuildTasks/HeatFile.cs | 88 - src/wix/WixToolset.BuildTasks/HeatProject.cs | 110 - src/wix/WixToolset.BuildTasks/HeatTask.cs | 91 - src/wix/WixToolset.BuildTasks/HeatTask_InProc.cs | 20 - .../RefreshBundleGeneratedFile.cs | 117 - .../WixToolset.BuildTasks/RefreshGeneratedFile.cs | 103 - src/wix/WixToolset.Sdk/WixToolset.Sdk.csproj | 1 - src/wix/WixToolset.Sdk/tools/wix.harvest.targets | 511 - src/wix/WixToolset.Sdk/tools/wix.targets | 2 - src/wix/heat/AssemblyHarvester.cs | 41 - src/wix/heat/Data/HarvesterErrors.cs | 205 - src/wix/heat/Data/HarvesterVerboses.cs | 62 - src/wix/heat/Data/HarvesterWarnings.cs | 79 - src/wix/heat/Data/HeatCommandLineOption.cs | 31 - src/wix/heat/Data/IHeatCommandLine.cs | 12 - src/wix/heat/DirectoryHarvester.cs | 308 - src/wix/heat/DllHarvester.cs | 106 - .../heat/Extensibility/BaseHarvesterExtension.cs | 26 - src/wix/heat/Extensibility/BaseHeatExtension.cs | 55 - src/wix/heat/Extensibility/BaseMutatorExtension.cs | 202 - src/wix/heat/Extensibility/IHarvester.cs | 31 - src/wix/heat/Extensibility/IHarvesterCore.cs | 51 - src/wix/heat/Extensibility/IHarvesterExtension.cs | 14 - src/wix/heat/Extensibility/IHeatCore.cs | 29 - src/wix/heat/Extensibility/IHeatExtension.cs | 16 - src/wix/heat/Extensibility/IMutator.cs | 44 - src/wix/heat/Extensibility/IMutatorExtension.cs | 18 - src/wix/heat/FileHarvester.cs | 156 - src/wix/heat/Harvester.cs | 65 - src/wix/heat/HarvesterCore.cs | 76 - src/wix/heat/HeatCommand.cs | 277 - src/wix/heat/HeatCommandLine.cs | 91 - src/wix/heat/HeatCommandLineFactory.cs | 27 - src/wix/heat/HeatCore.cs | 45 - src/wix/heat/HelpCommand.cs | 106 - src/wix/heat/IIsFinalizeHarvesterMutator.cs | 160 - src/wix/heat/IIsHarvesterMutator.cs | 429 - src/wix/heat/IIsHeatExtension.cs | 80 - src/wix/heat/IIsWebSiteHarvester.cs | 439 - src/wix/heat/Mutator.cs | 93 - src/wix/heat/PerformanceCategoryHarvester.cs | 207 - src/wix/heat/Program.cs | 86 - src/wix/heat/RegFileHarvester.cs | 438 - src/wix/heat/RegistryHarvester.cs | 477 - src/wix/heat/Serialize/CodeDomInterfaces.cs | 96 - src/wix/heat/Serialize/CodeDomReader.cs | 162 - src/wix/heat/Serialize/ElementCollection.cs | 618 - .../heat/Serialize/WixHarvesterStrings.Designer.cs | 153 - src/wix/heat/Serialize/WixHarvesterStrings.resx | 150 - src/wix/heat/Serialize/iis.cs | 5915 -- src/wix/heat/Serialize/util.cs | 11462 ---- src/wix/heat/Serialize/vs.cs | 1574 - src/wix/heat/Serialize/wix.cs | 57736 ------------------- src/wix/heat/TypeLibraryHarvester.cs | 93 - src/wix/heat/UtilFinalizeHarvesterMutator.cs | 1185 - src/wix/heat/UtilHarvesterMutator.cs | 218 - src/wix/heat/UtilHeatExtension.cs | 397 - src/wix/heat/UtilMutator.cs | 633 - src/wix/heat/UtilTransformMutator.cs | 77 - src/wix/heat/VSHeatExtension.cs | 229 - src/wix/heat/VSProjectHarvester.cs | 1455 - src/wix/heat/app.config | 10 - src/wix/heat/heat.csproj | 48 - src/wix/heat/heat.exe.manifest | 20 - src/wix/heat/heat.net461.v3.ncrunchproject | 5 - src/wix/heat/heat.netcoreapp2.1.v3.ncrunchproject | 5 - src/wix/publish_t.proj | 3 - .../WixToolsetTest.BuildTasks.csproj | 2 - src/wix/test/WixToolsetTest.Heat/HeatRunner.cs | 92 - .../WixToolsetTest.Heat/WixToolsetTest.Heat.csproj | 25 - src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs | 38 +- .../test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs | 375 - .../test/WixToolsetTest.Sdk/MsbuildUtilities.cs | 100 - .../HeatFileMultipleFilesSameFileName.wixproj | 58 - .../MyProgram.json | 1 - .../MyProgram.txt | 1 - .../HeatFileMultipleFilesSameFileName/Package.wxs | 18 - .../HeatFilePackage/HeatFilePackage.wixproj | 53 - .../TestData/HeatFilePackage/Package.wxs | 17 - .../HeatProjectPreSdkStyle.wixproj | 50 - .../HeatProject/HeatProjectPreSdkStyle/Package.wxs | 17 - .../HeatProjectSdkStyle.wixproj | 50 - .../HeatProject/HeatProjectSdkStyle/Package.wxs | 17 - .../TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs | 8 - .../HeatProject/SdkStyleCs/SdkStyleCs.csproj | 8 - .../ToolsVersion4Cs/Properties/AssemblyInfo.cs | 11 - .../ToolsVersion4Cs/ToolsVersion4Cs.csproj | 36 - src/wix/wix.cmd | 6 +- src/wix/wix.sln | 37 - 199 files changed, 89192 insertions(+), 88978 deletions(-) create mode 100644 src/internal/WixBuildTools.TestSupport/MsbuildUtilities.cs create mode 100644 src/tools/WixToolset.Heat/WixToolset.Heat.csproj create mode 100644 src/tools/WixToolset.Heat/WixToolset.Heat.nuspec create mode 100644 src/tools/WixToolset.Heat/WixToolset.Heat.targets create mode 100644 src/tools/WixToolset.HeatTasks/HeatDirectory.cs create mode 100644 src/tools/WixToolset.HeatTasks/HeatFile.cs create mode 100644 src/tools/WixToolset.HeatTasks/HeatProject.cs create mode 100644 src/tools/WixToolset.HeatTasks/HeatTask.cs create mode 100644 src/tools/WixToolset.HeatTasks/RefreshBundleGeneratedFile.cs create mode 100644 src/tools/WixToolset.HeatTasks/RefreshGeneratedFile.cs create mode 100644 src/tools/WixToolset.HeatTasks/RefreshTask.cs create mode 100644 src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs create mode 100644 src/tools/WixToolset.HeatTasks/WixToolset.HeatTasks.csproj create mode 100644 src/tools/heat/AssemblyHarvester.cs create mode 100644 src/tools/heat/ConsoleMessageListener.cs create mode 100644 src/tools/heat/Data/HarvesterErrors.cs create mode 100644 src/tools/heat/Data/HarvesterVerboses.cs create mode 100644 src/tools/heat/Data/HarvesterWarnings.cs create mode 100644 src/tools/heat/Data/HeatCommandLineOption.cs create mode 100644 src/tools/heat/Data/IHeatCommandLine.cs create mode 100644 src/tools/heat/DirectoryHarvester.cs create mode 100644 src/tools/heat/DllHarvester.cs create mode 100644 src/tools/heat/Extensibility/BaseHarvesterExtension.cs create mode 100644 src/tools/heat/Extensibility/BaseHeatExtension.cs create mode 100644 src/tools/heat/Extensibility/BaseMutatorExtension.cs create mode 100644 src/tools/heat/Extensibility/IHarvester.cs create mode 100644 src/tools/heat/Extensibility/IHarvesterCore.cs create mode 100644 src/tools/heat/Extensibility/IHarvesterExtension.cs create mode 100644 src/tools/heat/Extensibility/IHeatCore.cs create mode 100644 src/tools/heat/Extensibility/IHeatExtension.cs create mode 100644 src/tools/heat/Extensibility/IMutator.cs create mode 100644 src/tools/heat/Extensibility/IMutatorExtension.cs create mode 100644 src/tools/heat/FileHarvester.cs create mode 100644 src/tools/heat/Harvester.cs create mode 100644 src/tools/heat/HarvesterCore.cs create mode 100644 src/tools/heat/HeatCommand.cs create mode 100644 src/tools/heat/HeatCommandLine.cs create mode 100644 src/tools/heat/HeatCommandLineFactory.cs create mode 100644 src/tools/heat/HeatCore.cs create mode 100644 src/tools/heat/HelpCommand.cs create mode 100644 src/tools/heat/IIsFinalizeHarvesterMutator.cs create mode 100644 src/tools/heat/IIsHarvesterMutator.cs create mode 100644 src/tools/heat/IIsHeatExtension.cs create mode 100644 src/tools/heat/IIsWebSiteHarvester.cs create mode 100644 src/tools/heat/Mutator.cs create mode 100644 src/tools/heat/PerformanceCategoryHarvester.cs create mode 100644 src/tools/heat/Program.cs create mode 100644 src/tools/heat/RegFileHarvester.cs create mode 100644 src/tools/heat/RegistryHarvester.cs create mode 100644 src/tools/heat/Serialize/CodeDomInterfaces.cs create mode 100644 src/tools/heat/Serialize/CodeDomReader.cs create mode 100644 src/tools/heat/Serialize/ElementCollection.cs create mode 100644 src/tools/heat/Serialize/WixHarvesterStrings.Designer.cs create mode 100644 src/tools/heat/Serialize/WixHarvesterStrings.resx create mode 100644 src/tools/heat/Serialize/iis.cs create mode 100644 src/tools/heat/Serialize/util.cs create mode 100644 src/tools/heat/Serialize/vs.cs create mode 100644 src/tools/heat/Serialize/wix.cs create mode 100644 src/tools/heat/TypeLibraryHarvester.cs create mode 100644 src/tools/heat/UtilFinalizeHarvesterMutator.cs create mode 100644 src/tools/heat/UtilHarvesterMutator.cs create mode 100644 src/tools/heat/UtilHeatExtension.cs create mode 100644 src/tools/heat/UtilMutator.cs create mode 100644 src/tools/heat/UtilTransformMutator.cs create mode 100644 src/tools/heat/VSHeatExtension.cs create mode 100644 src/tools/heat/VSProjectHarvester.cs create mode 100644 src/tools/heat/app.config create mode 100644 src/tools/heat/heat.csproj create mode 100644 src/tools/heat/heat.exe.manifest create mode 100644 src/tools/heat/heat.net461.v3.ncrunchproject create mode 100644 src/tools/heat/heat.netcoreapp2.1.v3.ncrunchproject create mode 100644 src/tools/publish_t.proj create mode 100644 src/tools/test/Directory.Build.props create mode 100644 src/tools/test/WixToolsetTest.Heat/HeatRunner.cs create mode 100644 src/tools/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/EnsureWixSdkCached/EnsureWixSdkCached.wixproj create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/Package.wxs create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFilePackage/HeatFilePackage.wixproj create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFilePackage/Package.wxs create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.csproj create mode 100644 src/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.v3.ncrunchproject create mode 100644 src/tools/tools.v3.ncrunchsolution delete mode 100644 src/wix/WixToolset.BuildTasks/HeatDirectory.cs delete mode 100644 src/wix/WixToolset.BuildTasks/HeatFile.cs delete mode 100644 src/wix/WixToolset.BuildTasks/HeatProject.cs delete mode 100644 src/wix/WixToolset.BuildTasks/HeatTask.cs delete mode 100644 src/wix/WixToolset.BuildTasks/HeatTask_InProc.cs delete mode 100644 src/wix/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs delete mode 100644 src/wix/WixToolset.BuildTasks/RefreshGeneratedFile.cs delete mode 100644 src/wix/WixToolset.Sdk/tools/wix.harvest.targets delete mode 100644 src/wix/heat/AssemblyHarvester.cs delete mode 100644 src/wix/heat/Data/HarvesterErrors.cs delete mode 100644 src/wix/heat/Data/HarvesterVerboses.cs delete mode 100644 src/wix/heat/Data/HarvesterWarnings.cs delete mode 100644 src/wix/heat/Data/HeatCommandLineOption.cs delete mode 100644 src/wix/heat/Data/IHeatCommandLine.cs delete mode 100644 src/wix/heat/DirectoryHarvester.cs delete mode 100644 src/wix/heat/DllHarvester.cs delete mode 100644 src/wix/heat/Extensibility/BaseHarvesterExtension.cs delete mode 100644 src/wix/heat/Extensibility/BaseHeatExtension.cs delete mode 100644 src/wix/heat/Extensibility/BaseMutatorExtension.cs delete mode 100644 src/wix/heat/Extensibility/IHarvester.cs delete mode 100644 src/wix/heat/Extensibility/IHarvesterCore.cs delete mode 100644 src/wix/heat/Extensibility/IHarvesterExtension.cs delete mode 100644 src/wix/heat/Extensibility/IHeatCore.cs delete mode 100644 src/wix/heat/Extensibility/IHeatExtension.cs delete mode 100644 src/wix/heat/Extensibility/IMutator.cs delete mode 100644 src/wix/heat/Extensibility/IMutatorExtension.cs delete mode 100644 src/wix/heat/FileHarvester.cs delete mode 100644 src/wix/heat/Harvester.cs delete mode 100644 src/wix/heat/HarvesterCore.cs delete mode 100644 src/wix/heat/HeatCommand.cs delete mode 100644 src/wix/heat/HeatCommandLine.cs delete mode 100644 src/wix/heat/HeatCommandLineFactory.cs delete mode 100644 src/wix/heat/HeatCore.cs delete mode 100644 src/wix/heat/HelpCommand.cs delete mode 100644 src/wix/heat/IIsFinalizeHarvesterMutator.cs delete mode 100644 src/wix/heat/IIsHarvesterMutator.cs delete mode 100644 src/wix/heat/IIsHeatExtension.cs delete mode 100644 src/wix/heat/IIsWebSiteHarvester.cs delete mode 100644 src/wix/heat/Mutator.cs delete mode 100644 src/wix/heat/PerformanceCategoryHarvester.cs delete mode 100644 src/wix/heat/Program.cs delete mode 100644 src/wix/heat/RegFileHarvester.cs delete mode 100644 src/wix/heat/RegistryHarvester.cs delete mode 100644 src/wix/heat/Serialize/CodeDomInterfaces.cs delete mode 100644 src/wix/heat/Serialize/CodeDomReader.cs delete mode 100644 src/wix/heat/Serialize/ElementCollection.cs delete mode 100644 src/wix/heat/Serialize/WixHarvesterStrings.Designer.cs delete mode 100644 src/wix/heat/Serialize/WixHarvesterStrings.resx delete mode 100644 src/wix/heat/Serialize/iis.cs delete mode 100644 src/wix/heat/Serialize/util.cs delete mode 100644 src/wix/heat/Serialize/vs.cs delete mode 100644 src/wix/heat/Serialize/wix.cs delete mode 100644 src/wix/heat/TypeLibraryHarvester.cs delete mode 100644 src/wix/heat/UtilFinalizeHarvesterMutator.cs delete mode 100644 src/wix/heat/UtilHarvesterMutator.cs delete mode 100644 src/wix/heat/UtilHeatExtension.cs delete mode 100644 src/wix/heat/UtilMutator.cs delete mode 100644 src/wix/heat/UtilTransformMutator.cs delete mode 100644 src/wix/heat/VSHeatExtension.cs delete mode 100644 src/wix/heat/VSProjectHarvester.cs delete mode 100644 src/wix/heat/app.config delete mode 100644 src/wix/heat/heat.csproj delete mode 100644 src/wix/heat/heat.exe.manifest delete mode 100644 src/wix/heat/heat.net461.v3.ncrunchproject delete mode 100644 src/wix/heat/heat.netcoreapp2.1.v3.ncrunchproject delete mode 100644 src/wix/test/WixToolsetTest.Heat/HeatRunner.cs delete mode 100644 src/wix/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj delete mode 100644 src/wix/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs delete mode 100644 src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs delete mode 100644 src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj diff --git a/src/build_all.cmd b/src/build_all.cmd index 60502cdc..ce1c08f0 100644 --- a/src/build_all.cmd +++ b/src/build_all.cmd @@ -44,14 +44,14 @@ call burn\burn.cmd %_C% || exit /b call wix\wix.cmd %_C% || exit /b -:: ext +:: tools -call ext\ext.cmd %_C% || exit /b +call tools\tools.cmd %_C% || exit /b -:: tools +:: ext -call tools\tools.cmd %_C% || exit /b +call ext\ext.cmd %_C% || exit /b :: integration tests diff --git a/src/clean.cmd b/src/clean.cmd index 9eccf22a..2bbc2a78 100644 --- a/src/clean.cmd +++ b/src/clean.cmd @@ -39,6 +39,7 @@ if exist "%_NUGET_CACHE%\wixtoolset.dtf.resources" rd /s/q "%_NUGET_CACHE%\wixto if exist "%_NUGET_CACHE%\wixtoolset.dtf.windowsinstaller" rd /s/q "%_NUGET_CACHE%\wixtoolset.dtf.windowsinstaller" if exist "%_NUGET_CACHE%\wixtoolset.dutil" rd /s/q "%_NUGET_CACHE%\wixtoolset.dutil" if exist "%_NUGET_CACHE%\wixtoolset.extensibility" rd /s/q "%_NUGET_CACHE%\wixtoolset.extensibility" +if exist "%_NUGET_CACHE%\wixtoolset.heat" rd /s/q "%_NUGET_CACHE%\wixtoolset.heat" if exist "%_NUGET_CACHE%\wixtoolset.mba.core" rd /s/q "%_NUGET_CACHE%\wixtoolset.mba.core" if exist "%_NUGET_CACHE%\wixtoolset.netfx.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.netfx.wixext" if exist "%_NUGET_CACHE%\wixtoolset.sdk" rd /s/q "%_NUGET_CACHE%\wixtoolset.sdk" diff --git a/src/ext/Bal/bal.cmd b/src/ext/Bal/bal.cmd index aedf9b64..060f8ee0 100644 --- a/src/ext/Bal/bal.cmd +++ b/src/ext/Bal/bal.cmd @@ -22,7 +22,7 @@ msbuild -p:Configuration=%_C% || exit /b dotnet test test\WixToolsetTest.Dnc.HostGenerator -c %_C% --nologo --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Dnc.HostGenerator.trx" || exit /b -msbuild -p:Configuration=%_C% test\examples\examples.proj || exit /b +msbuild -Restore -p:Configuration=%_C% test\examples\examples.proj -bl || exit /b :: Test dotnet test test\WixToolsetTest.Bal -c %_C% --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Bal.trx" || exit /b diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj index ebeebff2..3f81710e 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj +++ b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj @@ -7,4 +7,8 @@ ba.xslt + + + + diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj index a6b56460..f9926550 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj +++ b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj @@ -7,4 +7,8 @@ ba.xslt + + + + diff --git a/src/ext/Bal/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj b/src/ext/Bal/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj index 30a860ab..048e3c97 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj +++ b/src/ext/Bal/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj @@ -7,4 +7,8 @@ ba.xslt + + + + diff --git a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj index 5ce89b64..056bf2bb 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj +++ b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj @@ -7,4 +7,8 @@ ba.xslt + + + + diff --git a/src/ext/Bal/test/examples/examples.proj b/src/ext/Bal/test/examples/examples.proj index 82a5e3c1..855f0ef5 100644 --- a/src/ext/Bal/test/examples/examples.proj +++ b/src/ext/Bal/test/examples/examples.proj @@ -2,8 +2,7 @@ - - + EarliestCoreMBA\Example.EarliestCoreMBA.csproj @@ -28,14 +27,12 @@ true true - + - - - + - - - - - - \ No newline at end of file + + + + diff --git a/src/internal/SetBuildNumber/Directory.Packages.props.pp b/src/internal/SetBuildNumber/Directory.Packages.props.pp index 8cf4be1f..91337de7 100644 --- a/src/internal/SetBuildNumber/Directory.Packages.props.pp +++ b/src/internal/SetBuildNumber/Directory.Packages.props.pp @@ -28,6 +28,8 @@ + + diff --git a/src/internal/WixBuildTools.TestSupport/MsbuildUtilities.cs b/src/internal/WixBuildTools.TestSupport/MsbuildUtilities.cs new file mode 100644 index 00000000..32680e5d --- /dev/null +++ b/src/internal/WixBuildTools.TestSupport/MsbuildUtilities.cs @@ -0,0 +1,108 @@ +// Copyright(c) .NET Foundation and contributors.All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolsetTest.Sdk +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using WixBuildTools.TestSupport; + + public enum BuildSystem + { + DotNetCoreSdk, + MSBuild, + MSBuild64, + } + + public static class MsbuildUtilities + { + public static MsbuildRunnerResult BuildProject(BuildSystem buildSystem, string projectPath, string[] arguments = null, string configuration = "Release", bool? outOfProc = null, string verbosityLevel = "normal", bool suppressValidation = true) + { + var allArgs = new List + { + $"-verbosity:{verbosityLevel}", + $"-p:Configuration={configuration}", + $"-p:SuppressValidation={suppressValidation}", + // Node reuse means that child msbuild processes can stay around after the build completes. + // Under that scenario, the root msbuild does not reliably close its streams which causes us to hang. + "-nr:false", + $"-bl:{Path.ChangeExtension(projectPath, ".binlog")}" + }; + + if (outOfProc.HasValue) + { + allArgs.Add($"-p:RunWixToolsOutOfProc={outOfProc.Value}"); + } + + if (arguments != null) + { + allArgs.AddRange(arguments); + } + + switch (buildSystem) + { + case BuildSystem.DotNetCoreSdk: + { + allArgs.Add(projectPath); + var result = DotnetRunner.Execute("msbuild", allArgs.ToArray()); + return new MsbuildRunnerResult + { + ExitCode = result.ExitCode, + Output = result.StandardOutput, + }; + } + case BuildSystem.MSBuild: + case BuildSystem.MSBuild64: + { + return MsbuildRunner.Execute(projectPath, allArgs.ToArray(), buildSystem == BuildSystem.MSBuild64); + } + default: + { + throw new NotImplementedException(); + } + } + } + + public static string GetQuotedPropertySwitch(BuildSystem buildSystem, string propertyName, string valueToQuote) + { + switch (buildSystem) + { + case BuildSystem.DotNetCoreSdk: + { + // If the value ends with a backslash, double-escape it (it should end up with four backslashes). + if (valueToQuote?.EndsWith("\\") == true) + { + valueToQuote += @"\\\"; + } + + return $"-p:{propertyName}=\\\"{valueToQuote}\\\""; + } + case BuildSystem.MSBuild: + case BuildSystem.MSBuild64: + { + // If the value ends with a backslash, escape it. + if (valueToQuote?.EndsWith("\\") == true) + { + valueToQuote += @"\"; + } + + return $"-p:{propertyName}=\"{valueToQuote}\""; + } + default: + { + throw new NotImplementedException(); + } + } + } + + public static IEnumerable GetToolCommandLines(MsbuildRunnerResult result, string toolName, string operation, BuildSystem buildSystem, bool? outOfProc = null) + { + var expectedOutOfProc = buildSystem == BuildSystem.DotNetCoreSdk || outOfProc.HasValue && outOfProc.Value; + var expectedToolExe = !expectedOutOfProc ? $"({toolName}.exe)" : + buildSystem == BuildSystem.DotNetCoreSdk ? $"{toolName}.dll\"" : $"{toolName}.exe"; + var expectedToolCommand = $"{expectedToolExe} {operation}"; + return result.Output.Where(line => line.Contains(expectedToolCommand)); + } + } +} diff --git a/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj b/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj index 35c92246..bd6e222a 100644 --- a/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj +++ b/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj @@ -22,6 +22,7 @@ + diff --git a/src/testresultfilelist.txt b/src/testresultfilelist.txt index fa3a0734..cdf6b00e 100644 --- a/src/testresultfilelist.txt +++ b/src/testresultfilelist.txt @@ -15,7 +15,7 @@ build/logs/TestResults/WixToolsetTest.Core.Burn.trx build/logs/TestResults/WixToolsetTest.Core.Native.trx build/logs/TestResults/WixToolsetTest.CoreIntegration.trx build/logs/TestResults/WixToolsetTest.Dnc.HostGenerator.trx -build/logs/TestResults/WixToolsetTest.Heat.trx +build/logs/TestResults/WixToolsetTest.HeatTasks.trx build/logs/TestResults/WixToolsetTest.ManagedHost.trx build/logs/TestResults/WixToolsetTest.Mba.Core.trx build/logs/TestResults/WixToolsetTest.MsiE2E.trx 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 @@ + + + $(OutputPath)publish\ + 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 @@ + + + + + + netcoreapp3.1 + WiX Toolset Heat MSBuild integration + $(PublishRoot)WixToolset.Heat\ + $(MSBuildThisFileName).nuspec + $(PublishDir) + + 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 @@ + + + + $id$ + $version$ + $title$ + $description$ + $authors$ + MS-RL + false + $copyright$ + $projectUrl$ + + + + + + + + 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 @@ + + + + + + + + $(MSBuildThisFileDirectory)..\tools\netcoreapp3.1\ + $(MSBuildThisFileDirectory)..\tools\net472\ + $(WixHeatBinDir)WixToolset.HeatTasks.dll + + + $(MSBuildThisFileDirectory)..\tools\net472\x86\ + + $(MSBuildThisFileDirectory)..\tools\net472\x86\heat.exe + $(MSBuildThisFileDirectory)..\tools\net472\x64\heat.exe + + + + + + + + + + + + + $(NoLogo) + $(SuppressAllWarnings) + $(SuppressSpecificWarnings) + $(TreatWarningsAsErrors) + $(TreatSpecificWarningsAsErrors) + $(VerboseOutput) + true + false + true + false + + + + + + false + + $(HarvestNoLogo) + $(HarvestSuppressAllWarnings) + $(HarvestSuppressSpecificWarnings) + $(HarvestTreatWarningsAsErrors) + $(HarvestTreatSpecificWarningsAsErrors) + $(HarvestVerboseOutput) + $(HarvestAutogenerateGuids) + $(HarvestGenerateGuidsNow) + $(HarvestSuppressFragments) + $(HarvestSuppressUniqueIds) + $(HarvestTransforms) + $(IntermediateOutputPath)Product.Generated.wxs + $(IntermediateOutputPath)Bundle.Generated.wxs + $(MSBuildBinPath) + + + + + $(HarvestNoLogo) + $(HarvestSuppressAllWarnings) + $(HarvestSuppressSpecificWarnings) + $(HarvestTreatWarningsAsErrors) + $(HarvestTreatSpecificWarningsAsErrors) + $(HarvestVerboseOutput) + $(HarvestAutogenerateGuids) + $(HarvestGenerateGuidsNow) + $(HarvestSuppressFragments) + $(HarvestSuppressUniqueIds) + $(HarvestTransforms) + + + + + $(HarvestNoLogo) + $(HarvestSuppressAllWarnings) + $(HarvestSuppressSpecificWarnings) + $(HarvestTreatWarningsAsErrors) + $(HarvestTreatSpecificWarningsAsErrors) + $(HarvestVerboseOutput) + $(HarvestAutogenerateGuids) + $(HarvestGenerateGuidsNow) + $(HarvestSuppressFragments) + $(HarvestSuppressUniqueIds) + $(HarvestTransforms) + + + + + + $(CoreCompileDependsOn); + Harvest + + + ConvertReferences; + ConvertBundleReferences; + HarvestProjects; + HarvestDirectory; + HarvestFile; + GenerateCode; + + + + + + + + RefreshGeneratedFile; + RefreshBundleGeneratedFile + + + + + + + + + <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' "> + %(_MSBuildProjectReferenceExistent.RefTargetDir) + Binaries;Symbols;Sources;Content;Satellites;Documents + %(_MSBuildProjectReferenceExistent.Name) + $(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs + + + + + + + + <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" /> + + + + + + + + + <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' "> + Binaries;Symbols;Sources;Content;Satellites;Documents + payloadgroup + $(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs + + + + + + + + <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $(HarvestProjectsTransforms) + $(HarvestProjectsProjectOutputGroups) + $(HarvestProjectsDirectoryIds) + + + $(HarvestProjectsTransforms) + $(HarvestProjectsProjectOutputGroups) + $(HarvestProjectsDirectoryIds) + + + + + CombineHarvestProjects + + + + + + + + + + + + + + + + + $(HarvestDirectoryTransforms) + $(HarvestDirectoryComponentGroupName) + $(HarvestDirectoryDirectoryRefId) + $(HarvestDirectoryKeepEmptyDirectories) + $(HarvestDirectoryPreprocessorVariable) + $(HarvestDirectorySuppressCom) + $(HarvestDirectorySuppressRootDirectory) + $(HarvestDirectorySuppressRegistry) + + + + + + GetHarvestDirectoryContent + + + + + + + + + + + + + + + + + + + + + + + + + + $(HarvestFileTransforms) + $(HarvestFileComponentGroupName) + $(HarvestFileDirectoryRefId) + $(HarvestFilePreprocessorVariable) + $(HarvestFileSuppressCom) + $(HarvestFileSuppressRegistry) + $(HarvestFileSuppressRootDirectory) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.HeatTasks +{ + using Microsoft.Build.Framework; + + public sealed class HeatDirectory : HeatTask + { + public string ComponentGroupName { get; set; } + + [Required] + public string Directory { get; set; } + + public string DirectoryRefId { get; set; } + + public bool KeepEmptyDirectories { get; set; } + + public string PreprocessorVariable { get; set; } + + public bool SuppressCom { get; set; } + + public bool SuppressRootDirectory { get; set; } + + public bool SuppressRegistry { get; set; } + + public string Template { get; set; } + + protected override string OperationName => "dir"; + + protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder) + { + commandLineBuilder.AppendSwitch(this.OperationName); + commandLineBuilder.AppendFileNameIfNotNull(this.Directory); + + commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName); + commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId); + commandLineBuilder.AppendIfTrue("-ke", this.KeepEmptyDirectories); + commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom); + commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry); + commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory); + commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template); + commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable); + + base.BuildCommandLine(commandLineBuilder); + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.HeatTasks +{ + using Microsoft.Build.Framework; + + public sealed class HeatFile : HeatTask + { + public string ComponentGroupName { get; set; } + + public string DirectoryRefId { get; set; } + + [Required] + public string File { get; set; } + + public string PreprocessorVariable { get; set; } + + public bool SuppressCom { get; set; } + + public bool SuppressRegistry { get; set; } + + public bool SuppressRootDirectory { get; set; } + + public string Template { get; set; } + + protected override string OperationName => "file"; + + protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder) + { + commandLineBuilder.AppendSwitch(this.OperationName); + commandLineBuilder.AppendFileNameIfNotNull(this.File); + + commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName); + commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId); + commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom); + commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory); + commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry); + commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template); + commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable); + + base.BuildCommandLine(commandLineBuilder); + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.HeatTasks +{ + using Microsoft.Build.Framework; + + public sealed class HeatProject : HeatTask + { + private string[] projectOutputGroups; + + public string Configuration { get; set; } + + public string DirectoryIds { get; set; } + + public bool GenerateWixVariables { get; set; } + + public string GenerateType { get; set; } + + public string MsbuildBinPath { get; set; } + + public string Platform { get; set; } + + [Required] + public string Project { get; set; } + + public string ProjectName { get; set; } + + public string[] ProjectOutputGroups + { + get + { + return this.projectOutputGroups; + } + set + { + this.projectOutputGroups = value; + + // If it's just one string and it contains semicolons, let's + // split it into separate items. + if (this.projectOutputGroups.Length == 1) + { + this.projectOutputGroups = this.projectOutputGroups[0].Split(new char[] { ';' }); + } + } + } + + public bool UseToolsVersion { get; set; } + + protected override string OperationName => "project"; + + protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder) + { + commandLineBuilder.AppendSwitch(this.OperationName); + commandLineBuilder.AppendFileNameIfNotNull(this.Project); + + commandLineBuilder.AppendSwitchIfNotNull("-configuration ", this.Configuration); + commandLineBuilder.AppendSwitchIfNotNull("-directoryid ", this.DirectoryIds); + commandLineBuilder.AppendSwitchIfNotNull("-generate ", this.GenerateType); + commandLineBuilder.AppendSwitchIfNotNull("-msbuildbinpath ", this.MsbuildBinPath); + commandLineBuilder.AppendSwitchIfNotNull("-platform ", this.Platform); + commandLineBuilder.AppendArrayIfNotNull("-pog ", this.ProjectOutputGroups); + commandLineBuilder.AppendSwitchIfNotNull("-projectname ", this.ProjectName); + commandLineBuilder.AppendIfTrue("-wixvar", this.GenerateWixVariables); + +#if !NETCOREAPP + commandLineBuilder.AppendIfTrue("-usetoolsversion", this.UseToolsVersion); +#endif + + base.BuildCommandLine(commandLineBuilder); + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.HeatTasks +{ + using System; + using System.IO; + using System.Runtime.InteropServices; + using Microsoft.Build.Framework; + using Microsoft.Build.Utilities; + + /// + /// A base MSBuild task to run the WiX harvester. + /// Specific harvester tasks should extend this class. + /// + public abstract partial class HeatTask : ToolTask + { + private static readonly string ThisDllPath = new Uri(typeof(HeatTask).Assembly.CodeBase).AbsolutePath; + + /// + /// Gets or sets additional options that are appended the the tool command-line. + /// + /// + /// This allows the task to support extended options in the tool which are not + /// explicitly implemented as properties on the task. + /// + public string AdditionalOptions { get; set; } + + /// + /// Gets or sets whether to display the logo. + /// + public bool NoLogo { get; set; } + + /// + /// Gets or sets whether all warnings should be suppressed. + /// + public bool SuppressAllWarnings { get; set; } + + /// + /// Gets or sets a list of specific warnings to be suppressed. + /// + public string[] SuppressSpecificWarnings { get; set; } + + /// + /// Gets or sets whether all warnings should be treated as errors. + /// + public bool TreatWarningsAsErrors { get; set; } + + /// + /// Gets or sets a list of specific warnings to treat as errors. + /// + public string[] TreatSpecificWarningsAsErrors { get; set; } + + /// + /// Gets or sets whether to display verbose output. + /// + public bool VerboseOutput { get; set; } + + public bool AutogenerateGuids { get; set; } + + public bool GenerateGuidsNow { get; set; } + + [Required] + [Output] + public ITaskItem OutputFile { get; set; } + + public bool SuppressFragments { get; set; } + + public bool SuppressUniqueIds { get; set; } + + public string[] Transforms { get; set; } + + protected sealed override string ToolName => "heat.exe"; + + /// + /// Gets the name of the heat operation performed by the task. + /// + /// This is the first parameter passed on the heat.exe command-line. + /// The name of the heat operation performed by the task. + protected abstract string OperationName { get; } + + private string ToolFullPath + { + get + { + if (String.IsNullOrEmpty(this.ToolPath)) + { + return Path.Combine(Path.GetDirectoryName(ThisDllPath), this.ToolExe); + } + + return Path.Combine(this.ToolPath, this.ToolExe); + } + } + + /// + /// Get the path to the executable. + /// + /// + /// ToolTask only calls GenerateFullPathToTool when the ToolPath property is not set. + /// WiX never sets the ToolPath property, but the user can through $(HeatToolDir). + /// If we return only a file name, ToolTask will search the system paths for it. + /// + protected sealed override string GenerateFullPathToTool() + { +#if NETCOREAPP + // If we're not using heat.exe, use dotnet.exe to exec heat.dll. + // See this.GenerateCommandLine() where "exec heat.dll" is added. + if (!IsSelfExecutable(this.ToolFullPath, out var toolFullPath)) + { + return DotnetFullPath; + } + + return toolFullPath; +#else + return this.ToolFullPath; +#endif + } + + protected sealed override string GenerateCommandLineCommands() + { + var commandLineBuilder = new WixCommandLineBuilder(); + +#if NETCOREAPP + // If we're using dotnet.exe as the target executable, see this.GenerateFullPathToTool(), + // then add "exec heat.dll" to the beginning of the command-line. + if (!IsSelfExecutable(this.ToolFullPath, out var toolFullPath)) + { + //commandLineBuilder.AppendSwitchIfNotNull("exec ", toolFullPath); + commandLineBuilder.AppendSwitch($"exec \"{toolFullPath}\""); + } +#endif + + this.BuildCommandLine(commandLineBuilder); + return commandLineBuilder.ToString(); + } + + /// + /// Builds a command line from options in this task. + /// + protected virtual void BuildCommandLine(WixCommandLineBuilder commandLineBuilder) + { + commandLineBuilder.AppendIfTrue("-nologo", this.NoLogo); + commandLineBuilder.AppendArrayIfNotNull("-sw", this.SuppressSpecificWarnings); + commandLineBuilder.AppendIfTrue("-sw", this.SuppressAllWarnings); + commandLineBuilder.AppendIfTrue("-v", this.VerboseOutput); + commandLineBuilder.AppendArrayIfNotNull("-wx", this.TreatSpecificWarningsAsErrors); + commandLineBuilder.AppendIfTrue("-wx", this.TreatWarningsAsErrors); + + commandLineBuilder.AppendIfTrue("-ag", this.AutogenerateGuids); + commandLineBuilder.AppendIfTrue("-gg", this.GenerateGuidsNow); + commandLineBuilder.AppendIfTrue("-sfrag", this.SuppressFragments); + commandLineBuilder.AppendIfTrue("-suid", this.SuppressUniqueIds); + commandLineBuilder.AppendArrayIfNotNull("-t ", this.Transforms); + commandLineBuilder.AppendTextIfNotNull(this.AdditionalOptions); + commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile); + } + +#if NETCOREAPP + private static readonly string DotnetFullPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH") ?? "dotnet"; + + private static bool IsSelfExecutable(string proposedToolFullPath, out string toolFullPath) + { + var toolFullPathWithoutExtension = Path.Combine(Path.GetDirectoryName(proposedToolFullPath), Path.GetFileNameWithoutExtension(proposedToolFullPath)); + var exeExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : String.Empty; + var exeToolFullPath = $"{toolFullPathWithoutExtension}{exeExtension}"; + if (File.Exists(exeToolFullPath)) + { + toolFullPath = exeToolFullPath; + return true; + } + + toolFullPath = $"{toolFullPathWithoutExtension}.dll"; + return false; + } +#endif + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.HeatTasks +{ + using System; + using System.Collections; + using System.Globalization; + using System.IO; + using System.Xml; + using Microsoft.Build.Framework; + + /// + /// This task refreshes the generated file for bundle projects. + /// + public class RefreshBundleGeneratedFile : RefreshTask + { + /// + /// Gets a complete list of external cabs referenced by the given installer database file. + /// + /// True upon completion of the task execution. + public override bool Execute() + { + var payloadGroupRefs = new ArrayList(); + var packageGroupRefs = new ArrayList(); + for (var i = 0; i < this.ProjectReferencePaths.Length; i++) + { + var item = this.ProjectReferencePaths[i]; + + if (!String.IsNullOrEmpty(item.GetMetadata(DoNotHarvest))) + { + continue; + } + + var projectPath = item.GetMetadata("MSBuildSourceProjectFile"); + var projectName = Path.GetFileNameWithoutExtension(projectPath); + var referenceName = GetIdentifierFromName(GetMetadataOrDefault(item, "Name", projectName)); + + var pogs = item.GetMetadata("RefProjectOutputGroups").Split(';'); + foreach (var pog in pogs) + { + if (!String.IsNullOrEmpty(pog)) + { + // TODO: Add payload group references and package group references once heat is generating them + ////payloadGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog)); + packageGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog)); + } + } + } + + var doc = new XmlDocument(); + + var head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'"); + doc.AppendChild(head); + + var rootElement = doc.CreateElement("Wix"); + rootElement.SetAttribute("xmlns", "http://wixtoolset.org/schemas/v4/wxs"); + doc.AppendChild(rootElement); + + var fragment = doc.CreateElement("Fragment"); + rootElement.AppendChild(fragment); + + var payloadGroup = doc.CreateElement("PayloadGroup"); + payloadGroup.SetAttribute("Id", "Bundle.Generated.Payloads"); + fragment.AppendChild(payloadGroup); + + var packageGroup = doc.CreateElement("PackageGroup"); + packageGroup.SetAttribute("Id", "Bundle.Generated.Packages"); + fragment.AppendChild(packageGroup); + + foreach (string payloadGroupRef in payloadGroupRefs) + { + var payloadGroupRefElement = doc.CreateElement("PayloadGroupRef"); + payloadGroupRefElement.SetAttribute("Id", payloadGroupRef); + payloadGroup.AppendChild(payloadGroupRefElement); + } + + foreach (string packageGroupRef in packageGroupRefs) + { + var packageGroupRefElement = doc.CreateElement("PackageGroupRef"); + packageGroupRefElement.SetAttribute("Id", packageGroupRef); + packageGroup.AppendChild(packageGroupRefElement); + } + + foreach (var item in this.GeneratedFiles) + { + var fullPath = item.GetMetadata("FullPath"); + + payloadGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath) + ".Payloads"); + packageGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath) + ".Packages"); + try + { + doc.Save(fullPath); + } + catch (Exception e) + { + // e.Message will be something like: "Access to the path 'fullPath' is denied." + this.Log.LogMessage(MessageImportance.High, "Unable to save generated file to '{0}'. {1}", fullPath, e.Message); + } + } + + return true; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.HeatTasks +{ + using System; + using System.Collections; + using System.Globalization; + using System.IO; + using System.Xml; + using Microsoft.Build.Framework; + + /// + /// This task refreshes the generated file that contains ComponentGroupRefs + /// to harvested output. + /// + public class RefreshGeneratedFile : RefreshTask + { + /// + /// Gets a complete list of external cabs referenced by the given installer database file. + /// + /// True upon completion of the task execution. + public override bool Execute() + { + var componentGroupRefs = new ArrayList(); + + for (var i = 0; i < this.ProjectReferencePaths.Length; i++) + { + var item = this.ProjectReferencePaths[i]; + + if (!String.IsNullOrEmpty(item.GetMetadata(DoNotHarvest))) + { + continue; + } + + var projectPath = item.GetMetadata("MSBuildSourceProjectFile"); + var projectName = Path.GetFileNameWithoutExtension(projectPath); + var referenceName = GetIdentifierFromName(GetMetadataOrDefault(item, "Name", projectName)); + + var pogs = item.GetMetadata("RefProjectOutputGroups").Split(';'); + foreach (var pog in pogs) + { + if (!String.IsNullOrEmpty(pog)) + { + componentGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog)); + } + } + } + + var doc = new XmlDocument(); + + var head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'"); + doc.AppendChild(head); + + var rootElement = doc.CreateElement("Wix"); + rootElement.SetAttribute("xmlns", "http://wixtoolset.org/schemas/v4/wxs"); + doc.AppendChild(rootElement); + + var fragment = doc.CreateElement("Fragment"); + rootElement.AppendChild(fragment); + + var componentGroup = doc.CreateElement("ComponentGroup"); + componentGroup.SetAttribute("Id", "Product.Generated"); + fragment.AppendChild(componentGroup); + + foreach (string componentGroupRef in componentGroupRefs) + { + var componentGroupRefElement = doc.CreateElement("ComponentGroupRef"); + componentGroupRefElement.SetAttribute("Id", componentGroupRef); + componentGroup.AppendChild(componentGroupRefElement); + } + + foreach (var item in this.GeneratedFiles) + { + var fullPath = item.GetMetadata("FullPath"); + + componentGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath)); + try + { + doc.Save(fullPath); + } + catch (Exception e) + { + // e.Message will be something like: "Access to the path 'fullPath' is denied." + this.Log.LogMessage(MessageImportance.High, "Unable to save generated file to '{0}'. {1}", fullPath, e.Message); + } + } + + return true; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.HeatTasks +{ + using System; + using System.Text.RegularExpressions; + using Microsoft.Build.Framework; + using Microsoft.Build.Utilities; + + /// + /// A base MSBuild task to refresh generated files. + /// + public abstract class RefreshTask : Task + { + private static readonly Regex AddPrefix = new Regex(@"^[^a-zA-Z_]"); + private static readonly Regex IllegalIdentifierCharacters = new Regex(@"[^A-Za-z0-9_\.]|\.{2,}"); // non 'words' and assorted valid characters + + /// Metadata key name to turn off harvesting of project references. + protected const string DoNotHarvest = "DoNotHarvest"; + + /// + /// The list of files to generate. + /// + [Required] + public ITaskItem[] GeneratedFiles { get; set; } + + /// + /// All the project references in the project. + /// + [Required] + public ITaskItem[] ProjectReferencePaths { get; set; } + + /// + /// Return an identifier based on passed file/directory name + /// + /// File/directory name to generate identifer from + /// A version of the name that is a legal identifier. + /// This is duplicated from WiX's Common class. + protected static string GetIdentifierFromName(string name) + { + var result = IllegalIdentifierCharacters.Replace(name, "_"); // replace illegal characters with "_". + + // MSI identifiers must begin with an alphabetic character or an + // underscore. Prefix all other values with an underscore. + if (AddPrefix.IsMatch(name)) + { + result = String.Concat("_", result); + } + + return result; + } + + protected static string GetMetadataOrDefault(ITaskItem item, string metadataName, string defaultValue) + { + var value = item.GetMetadata(metadataName); + return String.IsNullOrWhiteSpace(value) ? defaultValue : value; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.HeatTasks +{ + using System; + using System.Collections.Generic; + using Microsoft.Build.Utilities; + + /// + /// Helper class for appending the command line arguments. + /// + public class WixCommandLineBuilder : CommandLineBuilder + { + /// + /// Append a switch to the command line if the condition is true. + /// + /// Switch to append. + /// Condition specified by the user. + public void AppendIfTrue(string switchName, bool condition) + { + if (condition) + { + this.AppendSwitch(switchName); + } + } + + /// + /// Append a switch to the command line if any values in the array have been specified. + /// + /// Switch to append. + /// Values specified by the user. + public void AppendArrayIfNotNull(string switchName, IEnumerable values) + { + if (values != null) + { + foreach (var value in values) + { + this.AppendSwitchIfNotNull(switchName, value); + } + } + } + + /// + /// Append arbitrary text to the command-line if specified. + /// + /// Text to append. + public void AppendTextIfNotNull(string textToAppend) + { + if (!String.IsNullOrWhiteSpace(textToAppend)) + { + this.AppendSpaceIfNotEmpty(); + this.AppendTextUnquoted(textToAppend); + } + } + } +} 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 @@ + + + + + + netcoreapp3.1;net472 + WiX Toolset Heat MSBuild Tasks + embedded + true + + AnyCPU + + + + + + 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Reflection; + using System.Runtime.InteropServices; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// Harvest WiX authoring from an assembly file. + /// + public sealed class AssemblyHarvester + { + /// + /// Harvest the registry values written by RegisterAssembly. + /// + /// The file to harvest registry values from. + /// The harvested registry values. + public Wix.RegistryValue[] HarvestRegistryValues(string path) + { +#if NETCOREAPP + throw new PlatformNotSupportedException(); +#else + RegistrationServices regSvcs = new RegistrationServices(); + Assembly assembly = Assembly.LoadFrom(path); + + // must call this before overriding registry hives to prevent binding failures + // on exported types during RegisterAssembly + assembly.GetExportedTypes(); + + using (RegistryHarvester registryHarvester = new RegistryHarvester(true)) + { + regSvcs.RegisterAssembly(assembly, AssemblyRegistrationFlags.SetCodeBase); + + return registryHarvester.HarvestRegistry(); + } +#endif + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Tools.Core +{ + using System; + using System.Collections.Generic; + using System.Globalization; + using System.Text; + using System.Threading; + using WixToolset.Data; + using WixToolset.Extensibility; + using WixToolset.Extensibility.Services; + + public sealed class ConsoleMessageListener : IMessageListener + { + public ConsoleMessageListener(string prefix, string appName) + { + this.Prefix = prefix; + this.AppName = appName; + + PrepareConsoleForLocalization(); + } + + public string AppName { get; } + + public string Prefix { get; } + + public void Write(Message message) + { + var filename = message.SourceLineNumbers?.FileName ?? this.AppName; + var type = message.Level.ToString().ToLowerInvariant(); + var output = message.Level >= MessageLevel.Warning ? Console.Out : Console.Error; + + if (message.SourceLineNumbers?.LineNumber.HasValue == true) + { + filename = String.Concat(filename, "(", message.SourceLineNumbers?.LineNumber.Value, ")"); + } + + output.WriteLine("{0} : {1} {2}{3:0000}: {4}", filename, type, this.Prefix, message.Id, message.ToString()); + + var fileNames = GetFileNames(message.SourceLineNumbers); + if (fileNames.Count > 1) + { + foreach (var fileName in fileNames) + { + output.WriteLine("Source trace: {0}", fileName); + } + } + } + + public void Write(string message) => Console.Out.WriteLine(message); + + public MessageLevel CalculateMessageLevel(IMessaging messaging, Message message, MessageLevel defaultMessageLevel) => defaultMessageLevel; + + private static IList GetFileNames(SourceLineNumber sourceLineNumbers) + { + var fileNames = new List(); + + for (var sln = sourceLineNumbers; null != sln; sln = sln.Parent) + { + if (String.IsNullOrEmpty(sln.FileName)) + { + continue; + } + else if (sln.LineNumber.HasValue) + { + fileNames.Add(String.Format(CultureInfo.CurrentUICulture, "{0}: line {1}", sln.FileName, sln.LineNumber)); + } + else + { + fileNames.Add(sln.FileName); + } + } + + return fileNames; + } + + private static void PrepareConsoleForLocalization() + { + Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture.GetConsoleFallbackUICulture(); + + if (Console.OutputEncoding.CodePage != Encoding.UTF8.CodePage && + Console.OutputEncoding.CodePage != Thread.CurrentThread.CurrentUICulture.TextInfo.OEMCodePage && + Console.OutputEncoding.CodePage != Thread.CurrentThread.CurrentUICulture.TextInfo.ANSICodePage) + { + Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US"); + } + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Data +{ + using System; + using System.Resources; + using WixToolset.Data; + +#pragma warning disable 1591 // TODO: add documentation + public static class HarvesterErrors + { + public static Message ArgumentRequiresValue(string argument) + { + return Message(null, Ids.ArgumentRequiresValue, "The argument '{0}' does not have a value specified and it is required.", argument); + } + + public static Message BuildErrorDuringHarvesting(string buildError) + { + return Message(null, Ids.BuildErrorDuringHarvesting, "Build error during harvesting: {0}", buildError); + } + + public static Message BuildFailed() + { + return Message(null, Ids.BuildFailed, "Build failed."); + } + + public static Message CannotBuildProject(string projectFile, string innerExceptionMessage) + { + return Message(null, Ids.CannotBuildProject, "Failed to build project {0}: {1}", projectFile, innerExceptionMessage); + } + + public static Message CannotHarvestWebSite() + { + return Message(null, Ids.CannotHarvestWebSite, "Cannot harvest website. On Windows Vista, you must install IIS 6 Management Compatibility."); + } + + public static Message CannotLoadMSBuildAssembly(string innerExceptionMessage) + { + return Message(null, Ids.CannotLoadMSBuildAssembly, "Failed to load MSBuild assembly: {0}", innerExceptionMessage); + } + + public static Message CannotLoadMSBuildEngine(string innerExceptionMessage) + { + return Message(null, Ids.CannotLoadMSBuildEngine, "Failed to load MSBuild engine: {0}", innerExceptionMessage); + } + + public static Message CannotLoadMSBuildWrapperAssembly(string innerExceptionMessage) + { + return Message(null, Ids.CannotLoadMSBuildWrapperAssembly, "Failed to load MSBuild wrapper assembly: {0}", innerExceptionMessage); + } + + public static Message CannotLoadMSBuildWrapperObject(string innerExceptionMessage) + { + return Message(null, Ids.CannotLoadMSBuildWrapperObject, "Failed to load MSBuild wrapper object: {0}", innerExceptionMessage); + } + + public static Message CannotLoadMSBuildWrapperType(string innerExceptionMessage) + { + return Message(null, Ids.CannotLoadMSBuildWrapperType, "Failed to load MSBuild wrapper type: {0}", innerExceptionMessage); + } + + public static Message CannotLoadProject(string projectFile, string innerExceptionMessage) + { + return Message(null, Ids.CannotLoadProject, "Failed to load project {0}: {1}", projectFile, innerExceptionMessage); + } + + public static Message DirectoryAttributeAccessorBadType(string attributeName) + { + return Message(null, Ids.DirectoryAttributeAccessorBadType, "DirectoryAttributeAccessor tried to access an invalid element type for attribute '{0'}.", attributeName); + } + + public static Message DirectoryNotFound(string directory) + { + return Message(null, Ids.DirectoryNotFound, "The directory '{0}' could not be found.", directory); + } + + public static Message EmptyDirectory(string directory) + { + 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); + } + + public static Message ErrorTransformingHarvestedWiX(string transform, string message) + { + return Message(null, Ids.ErrorTransformingHarvestedWiX, "Error applying transform {0} to harvested WiX: {1}", transform, message); + } + + public static Message FileNotFound(string file) + { + return Message(null, Ids.FileNotFound, "The file '{0}' cannot be found.", file); + } + + public static Message InsufficientPermissionHarvestWebSite() + { + return Message(null, Ids.InsufficientPermissionHarvestWebSite, "Not enough permissions to harvest website. On Windows Vista, you must run Heat elevated."); + } + + public static Message InvalidDirectoryId(string generateType) + { + return Message(null, Ids.InvalidDirectoryId, "Invalid directory ID: {0}. Check that it doesn't start with a hyphen or slash.", generateType); + } + + public static Message InvalidDirectoryOutputType(string generateType) + { + return Message(null, Ids.InvalidOutputType, "Invalid generated type: {0}. Must be one of: components, payloadgroup.", generateType); + } + + public static Message InvalidOutputGroup(string outputGroup) + { + return Message(null, Ids.InvalidOutputGroup, "Invalid project output group: {0}.", outputGroup); + } + + public static Message InvalidProjectOutputType(string generateType) + { + return Message(null, Ids.InvalidOutputType, "Invalid generated type: {0}. Must be one of: components, container, payloadgroup, packagegroup.", generateType); + } + + public static Message InvalidProjectName(string generateType) + { + return Message(null, Ids.InvalidProjectName, "Invalid project name: {0}. Check that it doesn't start with a hyphen or slash.", generateType); + } + + public static Message MissingProjectOutputGroup(string projectFile, string outputGroup) + { + return Message(null, Ids.MissingProjectOutputGroup, "Missing project output group '{1}' in project {0}.", projectFile, outputGroup); + } + + public static Message MsbuildBinPathRequired(string version) + { + return Message(null, Ids.MsbuildBinPathRequired, "MSBuildBinPath required for ToolsVersion '{0}'", version); + } + + public static Message NoOutputGroupSpecified() + { + return Message(null, Ids.NoOutputGroupSpecified, "No project output group specified."); + } + + public static Message PerformanceCategoryNotFound(string key) + { + return Message(null, Ids.PerformanceCategoryNotFound, "Performance category '{0}' not found.", key); + } + + public static Message SpacesNotAllowedInArgumentValue(string arg, string value) + { + 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); + } + + public static Message UnableToOpenRegistryKey(string key) + { + return Message(null, Ids.UnableToOpenRegistryKey, "Unable to open registry key '{0}'.", key); + } + + public static Message UnsupportedPerformanceCounterType(string key) + { + return Message(null, Ids.UnsupportedPerformanceCounterType, "Unsupported performance counter type '{0}'.", key); + } + + public static Message WebSiteNotFound(string webSiteDescription) + { + 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); + } + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); + } + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args); + } + + public enum Ids + { + DirectoryNotFound = 5052, + EmptyDirectory = 5053, + ErrorTransformingHarvestedWiX = 5055, + UnableToOpenRegistryKey = 5056, + SpacesNotAllowedInArgumentValue = 5057, + ArgumentRequiresValue = 5058, + FileNotFound = 5059, + PerformanceCategoryNotFound = 5060, + UnsupportedPerformanceCounterType = 5061, + WebSiteNotFound = 5158, + InsufficientPermissionHarvestWebSite = 5159, + CannotHarvestWebSite = 5160, + InvalidOutputGroup = 5301, + NoOutputGroupSpecified = 5302, + CannotLoadMSBuildAssembly = 5303, + CannotLoadMSBuildEngine = 5304, + CannotLoadProject = 5305, + CannotBuildProject = 5306, + BuildFailed = 5307, + MissingProjectOutputGroup = 5308, + DirectoryAttributeAccessorBadType = 5309, + InvalidOutputType = 5310, + InvalidDirectoryId = 5311, + InvalidProjectName = 5312, + BuildErrorDuringHarvesting = 5313, + CannotLoadMSBuildWrapperAssembly = 5314, + CannotLoadMSBuildWrapperType = 5315, + CannotLoadMSBuildWrapperObject = 5316, + MsbuildBinPathRequired = 5317, + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Data +{ + using System; + using System.Resources; + using WixToolset.Data; + +#pragma warning disable 1591 // TODO: add documentation + public static class HarvesterVerboses + { + public static Message FoundToolsVersion(string toolsVersion) + { + return Message(null, Ids.FoundToolsVersion, "Found ToolsVersion {0} inside project file.", toolsVersion); + } + + public static Message HarvestingAssembly(string fileName) + { + return Message(null, Ids.HarvestingAssembly, "Trying to harvest {0} as an assembly.", fileName); + } + + public static Message HarvestingSelfReg(string fileName) + { + return Message(null, Ids.HarvestingSelfReg, "Trying to harvest self-registration information from native DLL {0}.", fileName); + } + + public static Message HarvestingTypeLib(string fileName) + { + return Message(null, Ids.HarvestingTypeLib, "Trying to harvest type-library information from native DLL {0}.", fileName); + } + + public static Message LoadingProjectWithBinPath(string msbuildBinPath) + { + return Message(null, Ids.LoadingProjectWithBinPath, "Loading project using MSBuild bin path {0}.", msbuildBinPath); + } + + public static Message LoadingProjectWithVersion(string msbuildVersion) + { + return Message(null, Ids.LoadingProjectWithVersion, "Loading project using MSBuild version {0}.", msbuildVersion); + } + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, format, args); + } + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, resourceManager, resourceName, args); + } + + public enum Ids + { + HarvestingAssembly = 5100, + HarvestingSelfReg = 5101, + HarvestingTypeLib = 5102, + LoadingProjectWithVersion = 5378, + FoundToolsVersion = 5379, + LoadingProjectWithBinPath = 5380, + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Data +{ + using System; + using System.Resources; + using WixToolset.Data; + +#pragma warning disable 1591 // TODO: add documentation + public static class HarvesterWarnings + { + public static Message AssemblyHarvestFailed(string file, string message) + { + 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); + } + + public static Message DuplicateDllRegistryEntry(string registryKey, string componentId) + { + return Message(null, Ids.DuplicateDllRegistryEntry, "Ignoring the registry key '{0}', it has already been added to the component '{1}'.", registryKey, componentId); + } + + public static Message DuplicateDllRegistryEntry(string registryKey, string registryKeyValue, string componentId) + { + 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); + } + + public static Message EncounteredNullDirectoryForWebSite(string directory) + { + return Message(null, Ids.EncounteredNullDirectoryForWebSite, "Could not harvest website directory: {0}. Please update the output with the appropriate directory ID before using.", directory); + } + + public static Message NoLogger(string exceptionMessage) + { + return Message(null, Ids.NoLogger, "Failed to set loggers: {0}", exceptionMessage); + } + + public static Message NoProjectConfiguration(string exceptionMessage) + { + return Message(null, Ids.NoProjectConfiguration, "Failed to set project configuration and platform: {0}", exceptionMessage); + } + + public static Message SelfRegHarvestFailed(string file, string message) + { + 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); + } + + public static Message TypeLibLoadFailed(string file, string message) + { + 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); + } + + public static Message UnsupportedRegistryType(string registryValue, int regFileLineNumber, string unsupportedType) + { + 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); + } + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); + } + + private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) + { + return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args); + } + + public enum Ids + { + SelfRegHarvestFailed = 5150, + AssemblyHarvestFailed = 5151, + TypeLibLoadFailed = 5152, + DuplicateDllRegistryEntry = 5156, + UnsupportedRegistryType = 5157, + NoProjectConfiguration = 5398, + NoLogger = 5399, + EncounteredNullDirectoryForWebSite = 5400, + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Data +{ + /// + /// A command line option. + /// + public struct HeatCommandLineOption + { + /// + /// The option name used on the command line. + /// + public string Option; + + /// + /// Description shown in Help command. + /// + public string Description; + + /// + /// Instantiates a new CommandLineOption. + /// + /// The option name. + /// The description of the option. + public HeatCommandLineOption(string option, string description) + { + this.Option = option; + this.Description = description; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Data +{ + using WixToolset.Extensibility.Data; + +#pragma warning disable 1591 // TODO: add documentation + public interface IHeatCommandLine + { + ICommandLineCommand ParseStandardCommandLine(ICommandLineArguments arguments); + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.IO; + using WixToolset.Data; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// Harvest WiX authoring for a directory from the file system. + /// + public sealed class DirectoryHarvester : BaseHarvesterExtension + { + private FileHarvester fileHarvester; + + private const string ComponentPrefix = "cmp"; + private const string DirectoryPrefix = "dir"; + private const string FilePrefix = "fil"; + + /// + /// Instantiate a new DirectoryHarvester. + /// + public DirectoryHarvester() + { + this.fileHarvester = new FileHarvester(); + this.SetUniqueIdentifiers = true; + } + + /// + /// Gets or sets what type of elements are to be generated. + /// + /// The type of elements being generated. + public GenerateType GenerateType { get; set; } + + /// + /// Gets or sets the option to keep empty directories. + /// + /// The option to keep empty directories. + public bool KeepEmptyDirectories { get; set; } + + /// + /// Gets or sets the rooted DirectoryRef Id if the user has supplied it. + /// + /// The DirectoryRef Id to use as the root. + public string RootedDirectoryRef { get; set; } + + /// + /// Gets of sets the option to set unique identifiers. + /// + /// The option to set unique identifiers. + public bool SetUniqueIdentifiers { get; set; } + + /// + /// Gets or sets the option to suppress including the root directory as an element. + /// + /// The option to suppress including the root directory as an element. + public bool SuppressRootDirectory { get; set; } + + /// + /// Harvest a directory. + /// + /// The path of the directory. + /// The harvested directory. + public override Wix.Fragment[] Harvest(string argument) + { + if (null == argument) + { + throw new ArgumentNullException("argument"); + } + + Wix.IParentElement harvestParent = this.HarvestDirectory(argument, true, this.GenerateType); + Wix.ISchemaElement harvestElement; + + if (this.GenerateType == GenerateType.PayloadGroup) + { + Wix.PayloadGroup payloadGroup = (Wix.PayloadGroup)harvestParent; + payloadGroup.Id = this.RootedDirectoryRef; + harvestElement = payloadGroup; + } + else + { + Wix.Directory directory = (Wix.Directory)harvestParent; + + Wix.DirectoryRef directoryRef = new Wix.DirectoryRef(); + directoryRef.Id = this.RootedDirectoryRef; + + if (this.SuppressRootDirectory) + { + foreach (Wix.ISchemaElement element in directory.Children) + { + directoryRef.AddChild(element); + } + } + else + { + directoryRef.AddChild(directory); + } + harvestElement = directoryRef; + } + + Wix.Fragment fragment = new Wix.Fragment(); + fragment.AddChild(harvestElement); + + return new Wix.Fragment[] { fragment }; + } + + /// + /// Harvest a directory. + /// + /// The path of the directory. + /// The option to harvest child directories and files. + /// The harvested directory. + public Wix.Directory HarvestDirectory(string path, bool harvestChildren) + { + if (null == path) + { + throw new ArgumentNullException("path"); + } + + return (Wix.Directory)this.HarvestDirectory(path, harvestChildren, GenerateType.Components); + } + + /// + /// Harvest a directory. + /// + /// The path of the directory. + /// The option to harvest child directories and files. + /// The type to generate. + /// The harvested directory. + private Wix.IParentElement HarvestDirectory(string path, bool harvestChildren, GenerateType generateType) + { + if (File.Exists(path)) + { + throw new WixException(ErrorMessages.ExpectedDirectoryGotFile("dir", path)); + } + + if (null == this.RootedDirectoryRef) + { + this.RootedDirectoryRef = "TARGETDIR"; + } + + // use absolute paths + path = Path.GetFullPath(path); + + // Remove any trailing separator to ensure Path.GetFileName() will return the directory name. + path = path.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); + + Wix.IParentElement harvestParent; + if (generateType == GenerateType.PayloadGroup) + { + harvestParent = new Wix.PayloadGroup(); + } + else + { + Wix.Directory directory = new Wix.Directory(); + directory.Name = Path.GetFileName(path); + directory.FileSource = path; + + if (this.SetUniqueIdentifiers) + { + if (this.SuppressRootDirectory) + { + directory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, this.RootedDirectoryRef); + } + else + { + directory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, this.RootedDirectoryRef, directory.Name); + } + } + harvestParent = directory; + } + + if (harvestChildren) + { + try + { + int fileCount = this.HarvestDirectory(path, "SourceDir\\", harvestParent, generateType); + + if (generateType != GenerateType.PayloadGroup) + { + // its an error to not harvest anything with the option to keep empty directories off + if (0 == fileCount && !this.KeepEmptyDirectories) + { + throw new WixException(HarvesterErrors.EmptyDirectory(path)); + } + } + } + catch (DirectoryNotFoundException) + { + throw new WixException(HarvesterErrors.DirectoryNotFound(path)); + } + } + + return harvestParent; + } + + /// + /// Harvest a directory. + /// + /// The path of the directory. + /// The relative path that will be used when harvesting. + /// The directory for this path. + /// + /// The number of files harvested. + private int HarvestDirectory(string path, string relativePath, Wix.IParentElement harvestParent, GenerateType generateType) + { + int fileCount = 0; + Wix.Directory directory = generateType != GenerateType.PayloadGroup ? (Wix.Directory)harvestParent : null; + + // harvest the child directories + foreach (string childDirectoryPath in Directory.GetDirectories(path)) + { + var childDirectoryName = Path.GetFileName(childDirectoryPath); + Wix.IParentElement newParent; + Wix.Directory childDirectory = null; + + if (generateType == GenerateType.PayloadGroup) + { + newParent = harvestParent; + } + else + { + childDirectory = new Wix.Directory(); + newParent = childDirectory; + + childDirectory.Name = childDirectoryName; + childDirectory.FileSource = childDirectoryPath; + + if (this.SetUniqueIdentifiers) + { + childDirectory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, directory.Id, childDirectory.Name); + } + } + + int childFileCount = this.HarvestDirectory(childDirectoryPath, String.Concat(relativePath, childDirectoryName, "\\"), newParent, generateType); + + if (generateType != GenerateType.PayloadGroup) + { + // keep the directory if it contained any files (or empty directories are being kept) + if (0 < childFileCount || this.KeepEmptyDirectories) + { + directory.AddChild(childDirectory); + } + } + + fileCount += childFileCount; + } + + // harvest the files + string[] files = Directory.GetFiles(path); + if (0 < files.Length) + { + foreach (string filePath in Directory.GetFiles(path)) + { + string fileName = Path.GetFileName(filePath); + string source = String.Concat(relativePath, fileName); + + Wix.ISchemaElement newChild; + if (generateType == GenerateType.PayloadGroup) + { + Wix.Payload payload = new Wix.Payload(); + newChild = payload; + + payload.SourceFile = source; + } + else + { + Wix.Component component = new Wix.Component(); + newChild = component; + + Wix.File file = this.fileHarvester.HarvestFile(filePath); + file.Source = source; + + if (this.SetUniqueIdentifiers) + { + file.Id = this.Core.GenerateIdentifier(FilePrefix, directory.Id, fileName); + component.Id = this.Core.GenerateIdentifier(ComponentPrefix, directory.Id, file.Id); + } + + component.AddChild(file); + } + + harvestParent.AddChild(newChild); + } + } + else if (generateType != GenerateType.PayloadGroup && 0 == fileCount && this.KeepEmptyDirectories) + { + Wix.Component component = new Wix.Component(); + component.KeyPath = Wix.YesNoType.yes; + + if (this.SetUniqueIdentifiers) + { + component.Id = this.Core.GenerateIdentifier(ComponentPrefix, directory.Id); + } + + Wix.CreateFolder createFolder = new Wix.CreateFolder(); + component.AddChild(createFolder); + + directory.AddChild(component); + } + + return fileCount + files.Length; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Reflection; + using System.Reflection.Emit; + using System.Runtime.InteropServices; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// Harvest WiX authoring from a native DLL file. + /// + public sealed class DllHarvester + { + /// + /// Harvest the registry values written by calling DllRegisterServer on the specified file. + /// + /// The file to harvest registry values from. + /// The harvested registry values. + public Wix.RegistryValue[] HarvestRegistryValues(string file) + { + // load the DLL + NativeMethods.LoadLibrary(file); + + using (RegistryHarvester registryHarvester = new RegistryHarvester(true)) + { + try + { + DynamicPInvoke(file, "DllRegisterServer", typeof(int), null, null); + + return registryHarvester.HarvestRegistry(); + } + catch (TargetInvocationException e) + { + e.Data["file"] = file; + throw; + } + } + } + + /// + /// Dynamically PInvokes into a DLL. + /// + /// Dynamic link library containing the entry point. + /// Entry point into dynamic link library. + /// Return type of entry point. + /// Type of parameters to entry point. + /// Value of parameters to entry point. + /// Value from invoked code. + private static object DynamicPInvoke(string dll, string entryPoint, Type returnType, Type[] parameterTypes, object[] parameterValues) + { +#if NETCOREAPP + throw new PlatformNotSupportedException(); +#else + AssemblyName assemblyName = new AssemblyName(); + assemblyName.Name = "wixTempAssembly"; + + AssemblyBuilder dynamicAssembly = AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run); + ModuleBuilder dynamicModule = dynamicAssembly.DefineDynamicModule("wixTempModule"); + + MethodBuilder dynamicMethod = dynamicModule.DefinePInvokeMethod(entryPoint, dll, MethodAttributes.Static | MethodAttributes.Public | MethodAttributes.PinvokeImpl, CallingConventions.Standard, returnType, parameterTypes, CallingConvention.Winapi, CharSet.Ansi); + dynamicModule.CreateGlobalFunctions(); + + MethodInfo methodInfo = dynamicModule.GetMethod(entryPoint); + return methodInfo.Invoke(null, parameterValues); +#endif + } + + /// + /// Native methods for loading libraries. + /// + private sealed class NativeMethods + { + private const UInt32 LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008; + + /// + /// Load a DLL library. + /// + /// The file name of the executable module. + /// If the function succeeds, the return value is a handle to the mapped executable module. + internal static IntPtr LoadLibrary(string file) + { + IntPtr dllHandle = LoadLibraryEx(file, IntPtr.Zero, NativeMethods.LOAD_WITH_ALTERED_SEARCH_PATH); + + if (IntPtr.Zero == dllHandle) + { + int lastError = Marshal.GetLastWin32Error(); + throw new Exception(String.Format("Unable to load file: {0}, error: {1}", file, lastError)); + } + + return dllHandle; + } + + /// + /// Maps the specified executable module into the address space of the calling process. + /// + /// The file name of the executable module. + /// This parameter is reserved for future use. It must be NULL. + /// Action to take when loading the module. + /// If the function succeeds, the return value is a handle to the mapped executable module. + [DllImport("kernel32.dll", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode, SetLastError = true)] + private static extern IntPtr LoadLibraryEx(string file, IntPtr fileHandle, UInt32 flags); + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Extensibility +{ + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// The base harvester extension. Any of these methods can be overridden to change + /// the behavior of the harvester. + /// + public abstract class BaseHarvesterExtension : IHarvesterExtension + { + /// + /// Gets or sets the harvester core for the extension. + /// + /// The harvester core for the extension. + public IHarvesterCore Core { get; set; } + + /// + /// Harvest a WiX document. + /// + /// The argument for harvesting. + /// The harvested Fragments. + public abstract Wix.Fragment[] Harvest(string argument); + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Extensibility +{ + using System; + using WixToolset.Harvesters.Data; + + /// + /// An extension for the WiX Toolset Harvester application. + /// + public abstract class BaseHeatExtension : IHeatExtension + { + /// + /// Gets or sets the heat core for the extension. + /// + /// The heat core for the extension. + public IHeatCore Core { get; set; } + + /// + /// Gets the supported command line types for this extension. + /// + /// The supported command line types for this extension. + public virtual HeatCommandLineOption[] CommandLineTypes + { + get { return null; } + } + + /// + /// Parse the command line options for this extension. + /// + /// The active harvester type. + /// The option arguments. + public virtual void ParseOptions(string type, string[] args) + { + } + + /// + /// Determines if the index refers to an argument. + /// + /// + /// + /// + public static bool IsValidArg(string[] args, int index) + { + if (args.Length <= index || String.IsNullOrEmpty(args[index]) || '/' == args[index][0] || '-' == args[index][0]) + { + return false; + } + else + { + return true; + } + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Extensibility +{ + using System; + using System.Collections.Generic; + using System.Text; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// The base mutator extension. Any of these methods can be overridden to change + /// the behavior of the mutator. + /// + public abstract class BaseMutatorExtension : IMutatorExtension + { + /// + /// Gets or sets the mutator core for the extension. + /// + /// The mutator core for the extension. + public IHarvesterCore Core { get; set; } + + /// + /// Gets the sequence of the extension. + /// + /// The sequence of the extension. + public abstract int Sequence { get; } + + /// + /// Mutate a WiX document. + /// + /// The Wix document element. + public virtual void Mutate(Wix.Wix wix) + { + } + + /// + /// Mutate a WiX document as a string. + /// + /// The Wix document element as a string. + /// The mutated Wix document as a string. + public virtual string Mutate(string wixString) + { + return wixString; + } + + /// + /// Generate unique MSI identifiers. + /// + protected class IdentifierGenerator + { + /// + /// + /// + public const int MaxProductIdentifierLength = 72; + + /// + /// + /// + public const int MaxModuleIdentifierLength = 35; + + private string baseName; + private int maxLength; + private Dictionary existingIdentifiers; + private Dictionary possibleIdentifiers; + private IHarvesterCore harvesterCore; + + /// + /// Instantiate a new IdentifierGenerator. + /// + /// The base resource name to use if a resource name contains no usable characters. + /// + public IdentifierGenerator(string baseName, IHarvesterCore harvesterCore) + { + this.baseName = baseName; + this.maxLength = IdentifierGenerator.MaxProductIdentifierLength; + this.existingIdentifiers = new Dictionary(StringComparer.OrdinalIgnoreCase); + this.possibleIdentifiers = new Dictionary(StringComparer.OrdinalIgnoreCase); + this.harvesterCore = harvesterCore; + } + + /// + /// Gets or sets the maximum length for generated identifiers. + /// + /// Maximum length for generated identifiers. (Default is 72.) + public int MaxIdentifierLength + { + get { return this.maxLength; } + set { this.maxLength = value; } + } + + /// + /// Index an existing identifier for collision detection. + /// + /// The identifier. + public void IndexExistingIdentifier(string identifier) + { + if (null == identifier) + { + throw new ArgumentNullException("identifier"); + } + + this.existingIdentifiers[identifier] = null; + } + + /// + /// Index a resource name for collision detection. + /// + /// The resource name. + public void IndexName(string name) + { + if (null == name) + { + throw new ArgumentNullException("name"); + } + + string identifier = this.CreateIdentifier(name, 0); + + if (this.possibleIdentifiers.ContainsKey(identifier)) + { + this.possibleIdentifiers[identifier] = String.Empty; + } + else + { + this.possibleIdentifiers.Add(identifier, null); + } + } + + /// + /// Get the identifier for the given resource name. + /// + /// The resource name. + /// A legal MSI identifier. + public string GetIdentifier(string name) + { + if (null == name) + { + throw new ArgumentNullException("name"); + } + + for (int i = 0; i <= Int32.MaxValue; i++) + { + string identifier = this.CreateIdentifier(name, i); + + if (this.existingIdentifiers.ContainsKey(identifier) || // already used + (0 == i && 0 != this.possibleIdentifiers.Count && null != this.possibleIdentifiers[identifier]) || // needs an index because its duplicated + (0 != i && this.possibleIdentifiers.ContainsKey(identifier))) // collides with another possible identifier + { + continue; + } + else // use this identifier + { + this.existingIdentifiers.Add(identifier, null); + + return identifier; + } + } + + throw new InvalidOperationException("Could not find a unique identifier for the given resource name."); + } + + /// + /// Create a legal MSI identifier from a resource name and an index. + /// + /// The name of the resource for which an identifier should be created. + /// An index to append to the end of the identifier to make it unique. + /// A legal MSI identifier. + public string CreateIdentifier(string name, int index) + { + if (null == name) + { + throw new ArgumentNullException("name"); + } + + StringBuilder identifier = new StringBuilder(); + + // Convert the name to a standard MSI identifier + identifier.Append(this.harvesterCore.CreateIdentifierFromFilename(name)); + + // no legal identifier characters were found, use the base id instead + if (0 == identifier.Length) + { + identifier.Append(this.baseName); + } + + // truncate the identifier if it's too long (reserve 3 characters for up to 99 collisions) + int adjustedMaxLength = this.MaxIdentifierLength - (index != 0 ? 3 : 0); + if (adjustedMaxLength < identifier.Length) + { + identifier.Length = adjustedMaxLength; + } + + // if the index is not zero, then append it to the identifier name + if (0 != index) + { + identifier.AppendFormat("_{0}", index); + } + + return identifier.ToString(); + } + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Extensibility +{ + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// Interface for the harvester. + /// + public interface IHarvester + { + /// + /// Gets or sets the harvester core for the extension. + /// + /// The harvester core for the extension. + IHarvesterCore Core { get; } + + /// + /// Gets or sets the extension. + /// + /// The extension. + IHarvesterExtension Extension { get; set; } + + /// + /// Harvest wix authoring. + /// + /// The argument for harvesting. + /// The harvested wix authoring. + Wix.Wix Harvest(string argument); + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Extensibility +{ + using WixToolset.Extensibility.Services; + + /// + /// The WiX Toolset harvester core. + /// + public interface IHarvesterCore + { + /// + /// + /// + IMessaging Messaging { get; set; } + + /// + /// Gets or sets the value of the extension argument passed to heat. + /// + /// The extension argument. + string ExtensionArgument { get; set; } + + /// + /// Gets or sets the value of the root directory that is being harvested. + /// + /// The root directory being harvested. + string RootDirectory { get; set; } + + /// + /// Create an identifier based on passed file name + /// + /// File name to generate identifer from + /// + string CreateIdentifierFromFilename(string filename); + + /// + /// Generate an identifier by hashing data from the row. + /// + /// Three letter or less prefix for generated row identifier. + /// Information to hash. + /// The generated identifier. + string GenerateIdentifier(string prefix, params string[] args); + + /// + /// Resolves a file's path if the Wix.File.Source value starts with "SourceDir\". + /// + /// The Wix.File.Source value with "SourceDir\". + /// The full path of the file. + string ResolveFilePath(string fileSource); + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Extensibility +{ + using Wix = WixToolset.Harvesters.Serialize; + +#pragma warning disable 1591 // TODO: add documentation + public interface IHarvesterExtension + { + IHarvesterCore Core { get; set; } + + Wix.Fragment[] Harvest(string argument); + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Extensibility +{ + using WixToolset.Extensibility.Services; + + /// + /// The WiX Toolset Harvester application core. + /// + public interface IHeatCore + { + /// + /// Gets the harvester. + /// + /// The harvester. + IHarvester Harvester { get; } + + /// + /// + /// + IMessaging Messaging { get; } + + /// + /// Gets the mutator. + /// + /// The mutator. + IMutator Mutator { get; } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Extensibility +{ + using WixToolset.Harvesters.Data; + +#pragma warning disable 1591 // TODO: add documentation + public interface IHeatExtension + { + IHeatCore Core { get; set; } + + HeatCommandLineOption[] CommandLineTypes { get; } + + void ParseOptions(string type, string[] args); + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Extensibility +{ + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// Interface for a mutator. + /// + public interface IMutator + { + /// + /// Gets or sets the harvester core for the extension. + /// + /// The harvester core for the extension. + IHarvesterCore Core { get; } + + /// + /// Gets or sets the value of the extension argument passed to heat. + /// + /// The extension argument. + string ExtensionArgument { get; } + + /// + /// Adds a mutator extension. + /// + /// The mutator extension to add. + void AddExtension(IMutatorExtension mutatorExtension); + + /// + /// Mutate a WiX document. + /// + /// The Wix document element. + /// true if mutation was successful + bool Mutate(Wix.Wix wix); + + /// + /// Mutate a WiX document. + /// + /// The Wix document as a string. + /// The mutated Wix document as a string if mutation was successful, else null. + string Mutate(string wixString); + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Extensibility +{ + using Wix = WixToolset.Harvesters.Serialize; + +#pragma warning disable 1591 // TODO: add documentation + public interface IMutatorExtension + { + IHarvesterCore Core { get; set; } + + int Sequence { get; } + + void Mutate(Wix.Wix wix); + + string Mutate(string wixString); + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.IO; + using WixToolset.Data; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// Harvest WiX authoring for a file from the file system. + /// + public sealed class FileHarvester : BaseHarvesterExtension + { + private string rootedDirectoryRef; + private bool setUniqueIdentifiers; + private bool suppressRootDirectory; + + private static readonly string ComponentPrefix = "cmp"; + private static readonly string DirectoryPrefix = "dir"; + private static readonly string FilePrefix = "fil"; + + /// + /// Instantiate a new FileHarvester. + /// + public FileHarvester() + { + this.setUniqueIdentifiers = true; + this.suppressRootDirectory = false; + } + + /// + /// Gets or sets the rooted DirectoryRef Id if the user has supplied it. + /// + /// The DirectoryRef Id to use as the root. + public string RootedDirectoryRef + { + get { return this.rootedDirectoryRef; } + set { this.rootedDirectoryRef = value; } + } + + /// + /// Gets of sets the option to set unique identifiers. + /// + /// The option to set unique identifiers. + public bool SetUniqueIdentifiers + { + get { return this.setUniqueIdentifiers; } + set { this.setUniqueIdentifiers = value; } + } + + /// + /// Gets or sets the option to suppress including the root directory as an element. + /// + /// The option to suppress including the root directory as an element. + public bool SuppressRootDirectory + { + get { return this.suppressRootDirectory; } + set { this.suppressRootDirectory = value; } + } + + /// + /// Harvest a file. + /// + /// The path of the file. + /// A harvested file. + public override Wix.Fragment[] Harvest(string argument) + { + if (null == argument) + { + throw new ArgumentNullException("argument"); + } + + if (null == this.rootedDirectoryRef) + { + this.rootedDirectoryRef = "TARGETDIR"; + } + + string fullPath = Path.GetFullPath(argument); + + Wix.DirectoryRef directoryRef = new Wix.DirectoryRef(); + directoryRef.Id = this.rootedDirectoryRef; + + Wix.File file = this.HarvestFile(fullPath); + + if (!this.suppressRootDirectory) + { + file.Source = String.Concat("SourceDir\\", Path.GetFileName(Path.GetDirectoryName(fullPath)), "\\", Path.GetFileName(fullPath)); + } + + Wix.Component component = new Wix.Component(); + component.AddChild(file); + + Wix.Directory directory = new Wix.Directory(); + + if (this.suppressRootDirectory) + { + directoryRef.AddChild(component); + } + else + { + string directoryPath = Path.GetDirectoryName(Path.GetFullPath(argument)); + directory.Name = Path.GetFileName(directoryPath); + + if (this.setUniqueIdentifiers) + { + directory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, directoryRef.Id, directory.Name); + } + directory.AddChild(component); + directoryRef.AddChild(directory); + } + + if (this.setUniqueIdentifiers) + { + file.Id = this.Core.GenerateIdentifier(FilePrefix, (this.suppressRootDirectory) ? directoryRef.Id : directory.Id, Path.GetFileName(file.Source)); + component.Id = this.Core.GenerateIdentifier(ComponentPrefix, (this.suppressRootDirectory) ? directoryRef.Id : directory.Id, file.Id); + } + + Wix.Fragment fragment = new Wix.Fragment(); + fragment.AddChild(directoryRef); + + return new Wix.Fragment[] { fragment }; + } + + /// + /// Harvest a file. + /// + /// The path of the file. + /// A harvested file. + public Wix.File HarvestFile(string path) + { + if (null == path) + { + throw new ArgumentNullException("path"); + } + + if (!File.Exists(path)) + { + throw new WixException(HarvesterErrors.FileNotFound(path)); + } + + Wix.File file = new Wix.File(); + + // use absolute paths + path = Path.GetFullPath(path); + + file.KeyPath = Wix.YesNoType.yes; + + file.Source = String.Concat("SourceDir\\", Path.GetFileName(path)); + + return file; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using WixToolset.Data; + using WixToolset.Harvesters.Extensibility; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// The WiX Toolset harvester. + /// + internal class Harvester : IHarvester + { + private IHarvesterExtension harvesterExtension; + + public IHarvesterCore Core { get; set; } + + public IHarvesterExtension Extension + { + get + { + return this.harvesterExtension; + } + set + { + if (null != this.harvesterExtension) + { + throw new InvalidOperationException("Multiple harvester extensions specified."); + } + + this.harvesterExtension = value; + } + } + + public Wix.Wix Harvest(string argument) + { + if (null == argument) + { + throw new ArgumentNullException("argument"); + } + + if (null == this.harvesterExtension) + { + throw new WixException(ErrorMessages.HarvestTypeNotFound()); + } + + this.harvesterExtension.Core = this.Core; + + Wix.Fragment[] fragments = this.harvesterExtension.Harvest(argument); + if (null == fragments || 0 == fragments.Length) + { + return null; + } + + Wix.Wix wix = new Wix.Wix(); + foreach (Wix.Fragment fragment in fragments) + { + wix.AddChild(fragment); + } + + return wix; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.IO; + using WixToolset.Extensibility.Services; + using WixToolset.Harvesters.Extensibility; + + /// + /// The WiX Toolset harvester core. + /// + internal class HarvesterCore : IHarvesterCore + { + public IMessaging Messaging { get; set; } + + public IParseHelper ParseHelper { get; set; } + + /// + /// Gets or sets the value of the extension argument passed to heat. + /// + /// The extension argument. + public string ExtensionArgument { get; set; } + + /// + /// Gets or sets the value of the root directory that is being harvested. + /// + /// The root directory being harvested. + public string RootDirectory { get; set; } + + /// + /// Create an identifier based on passed file name + /// + /// File name to generate identifer from + /// + public string CreateIdentifierFromFilename(string filename) + { + return this.ParseHelper.CreateIdentifierFromFilename(filename).Id; + } + + /// + /// Generate an identifier by hashing data from the row. + /// + /// Three letter or less prefix for generated row identifier. + /// Information to hash. + /// The generated identifier. + public string GenerateIdentifier(string prefix, params string[] args) + { + return this.ParseHelper.CreateIdentifier(prefix, args).Id; + } + + /// + /// Resolves a file's path if the Wix.File.Source value starts with "SourceDir\". + /// + /// The Wix.File.Source value with "SourceDir\". + /// The full path of the file. + public string ResolveFilePath(string fileSource) + { + if (fileSource.StartsWith("SourceDir\\", StringComparison.Ordinal)) + { + string file = Path.GetFullPath(this.RootDirectory); + if (File.Exists(file)) + { + return file; + } + else + { + fileSource = fileSource.Substring(10); + fileSource = Path.Combine(Path.GetFullPath(this.RootDirectory), fileSource); + } + } + + return fileSource; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections.Generic; + using System.Globalization; + using System.IO; + using System.Runtime.InteropServices; + using System.Threading; + using System.Threading.Tasks; + using System.Xml; + using WixToolset.Data; + using WixToolset.Extensibility.Data; + using WixToolset.Extensibility.Services; + using WixToolset.Harvesters.Extensibility; + using Wix = WixToolset.Harvesters.Serialize; + + internal class HeatCommand : ICommandLineCommand + { + public HeatCommand(string harvestType, IList extensions, IServiceProvider serviceProvider) + { + this.Extensions = extensions; + this.Messaging = serviceProvider.GetService(); + this.ServiceProvider = serviceProvider; + + this.ExtensionType = harvestType; + this.ExtensionOptions.Add(harvestType); + } + + public bool ShowHelp { get; set; } + + public bool ShowLogo { get; set; } + + public bool StopParsing { get; private set; } + + private string ExtensionArgument { get; set; } + + private List ExtensionOptions { get; } = new List(); + + private string ExtensionType { get; } + + private IList Extensions { get; } + + private int Indent { get; set; } = 4; + + private IMessaging Messaging { get; } + + private string OutputFile { get; set; } + + private IServiceProvider ServiceProvider { get; } + + public Task ExecuteAsync(CancellationToken cancellationToken) + { + var exitCode = this.Harvest(); + return Task.FromResult(exitCode); + } + + public bool TryParseArgument(ICommandLineParser parser, string arg) + { + if (this.ExtensionArgument == null) + { + this.ExtensionArgument = arg; + } + else if ('-' == arg[0] || '/' == arg[0]) + { + string parameter = arg.Substring(1); + if ("nologo" == parameter) + { + this.ShowLogo = false; + } + else if ("o" == parameter || "out" == parameter) + { + this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg); + + if (String.IsNullOrEmpty(this.OutputFile)) + { + return false; + } + } + else if ("swall" == parameter) + { + this.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("swall", "sw")); + this.Messaging.SuppressAllWarnings = true; + } + else if (parameter.StartsWith("sw")) + { + string paramArg = parameter.Substring(2); + try + { + if (0 == paramArg.Length) + { + this.Messaging.SuppressAllWarnings = true; + } + else + { + int suppressWarning = Convert.ToInt32(paramArg, CultureInfo.InvariantCulture.NumberFormat); + if (0 >= suppressWarning) + { + this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg)); + } + + this.Messaging.SuppressWarningMessage(suppressWarning); + } + } + catch (FormatException) + { + this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg)); + } + catch (OverflowException) + { + this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg)); + } + } + else if ("wxall" == parameter) + { + this.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("wxall", "wx")); + this.Messaging.WarningsAsError = true; + } + else if (parameter.StartsWith("wx")) + { + string paramArg = parameter.Substring(2); + try + { + if (0 == paramArg.Length) + { + this.Messaging.WarningsAsError = true; + } + else + { + int elevateWarning = Convert.ToInt32(paramArg, CultureInfo.InvariantCulture.NumberFormat); + if (0 >= elevateWarning) + { + this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg)); + } + + this.Messaging.ElevateWarningMessage(elevateWarning); + } + } + catch (FormatException) + { + this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg)); + } + catch (OverflowException) + { + this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg)); + } + } + else if ("v" == parameter) + { + this.Messaging.ShowVerboseMessages = true; + } + else if ("indent" == parameter) + { + try + { + this.Indent = Int32.Parse(parser.GetNextArgumentOrError(arg), CultureInfo.InvariantCulture); + } + catch + { + throw new ArgumentException("Invalid numeric argument.", parameter); + } + } + } + + this.ExtensionOptions.Add(arg); + return true; + } + + private int Harvest() + { + try + { + if (String.IsNullOrEmpty(this.ExtensionArgument)) + { + this.Messaging.Write(ErrorMessages.HarvestSourceNotSpecified()); + } + else if (String.IsNullOrEmpty(this.OutputFile)) + { + this.Messaging.Write(ErrorMessages.OutputTargetNotSpecified()); + } + + // exit if there was an error parsing the core command line + if (this.Messaging.EncounteredError) + { + return this.Messaging.LastErrorNumber; + } + + if (this.ShowLogo) + { + HelpCommand.DisplayToolHeader(); + } + + var heatCore = new HeatCore(this.ServiceProvider, this.ExtensionArgument); + + // parse the extension's command line arguments + var extensionOptionsArray = this.ExtensionOptions.ToArray(); + foreach (var heatExtension in this.Extensions) + { + heatExtension.Core = heatCore; + heatExtension.ParseOptions(this.ExtensionType, extensionOptionsArray); + } + + // exit if there was an error parsing the command line (otherwise the logo appears after error messages) + if (this.Messaging.EncounteredError) + { + return this.Messaging.LastErrorNumber; + } + + // harvest the output + Wix.Wix wix = heatCore.Harvester.Harvest(this.ExtensionArgument); + if (null == wix) + { + return this.Messaging.LastErrorNumber; + } + + // mutate the output + if (!heatCore.Mutator.Mutate(wix)) + { + return this.Messaging.LastErrorNumber; + } + + XmlWriterSettings xmlSettings = new XmlWriterSettings(); + xmlSettings.Indent = true; + xmlSettings.IndentChars = new string(' ', this.Indent); + xmlSettings.OmitXmlDeclaration = true; + + string wixString; + using (StringWriter stringWriter = new StringWriter()) + { + using (XmlWriter xmlWriter = XmlWriter.Create(stringWriter, xmlSettings)) + { + wix.OutputXml(xmlWriter); + } + + wixString = stringWriter.ToString(); + } + + string mutatedWixString = heatCore.Mutator.Mutate(wixString); + if (String.IsNullOrEmpty(mutatedWixString)) + { + return this.Messaging.LastErrorNumber; + } + + Directory.CreateDirectory(Path.GetDirectoryName(this.OutputFile)); + + using (StreamWriter streamWriter = new StreamWriter(this.OutputFile, false, System.Text.Encoding.UTF8)) + { + xmlSettings.OmitXmlDeclaration = false; + xmlSettings.Encoding = System.Text.Encoding.UTF8; + using (XmlWriter xmlWriter = XmlWriter.Create(streamWriter, xmlSettings)) + { + xmlWriter.WriteStartDocument(); + xmlWriter.Flush(); + } + + streamWriter.WriteLine(); + streamWriter.Write(mutatedWixString); + } + } + catch (WixException we) + { + this.Messaging.Write(we.Error); + } + catch (Exception e) + { + this.Messaging.Write(ErrorMessages.UnexpectedException(e)); + if (e is NullReferenceException || e is SEHException) + { + throw; + } + } + + return this.Messaging.LastErrorNumber; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections.Generic; + using System.Linq; + using WixToolset.Data; + using WixToolset.Extensibility.Data; + using WixToolset.Extensibility.Services; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + + internal class HeatCommandLine : IHeatCommandLine + { + private readonly List extensions; + private readonly IMessaging messaging; + private readonly IServiceProvider serviceProvider; + + public HeatCommandLine(IServiceProvider serviceProvider, IEnumerable heatExtensions) + { + this.extensions = new List { new IIsHeatExtension(), new UtilHeatExtension(serviceProvider), new VSHeatExtension() }; + if (heatExtensions != null) + { + this.extensions.AddRange(heatExtensions); + } + this.messaging = serviceProvider.GetService(); + this.serviceProvider = serviceProvider; + } + + public ICommandLineCommand ParseStandardCommandLine(ICommandLineArguments arguments) + { + ICommandLineCommand command = null; + var parser = arguments.Parse(); + + while (command?.StopParsing != true && + String.IsNullOrEmpty(parser.ErrorArgument) && + parser.TryGetNextSwitchOrArgument(out var arg)) + { + if (String.IsNullOrWhiteSpace(arg)) // skip blank arguments. + { + continue; + } + + // First argument must be the command or global switch (that creates a command). + if (command == null) + { + if (!this.TryParseUnknownCommandArg(arg, parser, out command)) + { + parser.ReportErrorArgument(arg, ErrorMessages.HarvestTypeNotFound(arg)); + } + } + else if (!command.TryParseArgument(parser, arg)) + { + parser.ReportErrorArgument(arg); + } + } + + return command ?? new HelpCommand(this.extensions); + } + + public bool TryParseUnknownCommandArg(string arg, ICommandLineParser parser, out ICommandLineCommand command) + { + command = null; + + if (parser.IsSwitch(arg)) + { + var parameter = arg.Substring(1); + switch (parameter.ToLowerInvariant()) + { + case "?": + case "h": + case "help": + command = new HelpCommand(this.extensions); + return true; + } + } + + foreach (var heatExtension in this.extensions) + { + if (heatExtension.CommandLineTypes.Any(o => o.Option == arg)) + { + command = new HeatCommand(arg, this.extensions, this.serviceProvider); + return true; + } + } + + return false; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections.Generic; + using WixToolset.Extensibility.Services; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + + /// + /// Extension methods to use Harvesters services. + /// + public class HeatCommandLineFactory + { + /// + /// Creates service. + /// + /// + /// + /// + public static IHeatCommandLine CreateCommandLine(IServiceProvider serviceProvider, IEnumerable heatExtensions = null) + { + return new HeatCommandLine(serviceProvider, heatExtensions); + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using WixToolset.Extensibility.Services; + using WixToolset.Harvesters.Extensibility; + + /// + /// The WiX Toolset Harvester application core. + /// + internal class HeatCore : IHeatCore + { + /// + /// Instantiates a new HeatCore. + /// + /// The service provider. + /// The extension argument. + public HeatCore(IServiceProvider serviceProvider, string extensionArgument) + { + this.Messaging = serviceProvider.GetService(); + var harvesterCore = new HarvesterCore + { + ExtensionArgument = extensionArgument, + Messaging = this.Messaging, + ParseHelper = serviceProvider.GetService(), + }; + + this.Harvester = new Harvester + { + Core = harvesterCore, + }; + this.Mutator = new Mutator + { + Core = harvesterCore, + }; + } + + public IHarvester Harvester { get; } + + public IMessaging Messaging { get; } + + public IMutator Mutator { get; } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Diagnostics; + using System.Threading; + using System.Threading.Tasks; + using WixToolset.Extensibility.Data; + using WixToolset.Extensibility.Services; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + + internal class HelpCommand : ICommandLineCommand + { + const string HelpMessageOptionFormat = " {0,-7} {1}"; + + public HelpCommand(IList extensions) + { + this.Extensions = extensions; + } + + private IList Extensions { get; } + + public bool ShowHelp { get; set; } + + public bool ShowLogo + { + get => false; + set { } + } + + public bool StopParsing => true; + + public Task ExecuteAsync(CancellationToken cancellationToken) + { + var exitCode = this.DisplayHelp(); + return Task.FromResult(exitCode); + } + + public static void DisplayToolHeader() + { + var wixcopAssembly = typeof(HelpCommand).Assembly; + var fv = FileVersionInfo.GetVersionInfo(wixcopAssembly.Location); + + Console.WriteLine("WiX Toolset Harvester version {0}", fv.ProductVersion); + Console.WriteLine("Copyright (C) .NET Foundation and contributors. All rights reserved."); + Console.WriteLine(); + } + + public bool TryParseArgument(ICommandLineParser parser, string argument) + { + return true; + } + + private int DisplayHelp() + { + DisplayToolHeader(); + + // output the harvest types alphabetically + SortedList harvestOptions = new SortedList(); + foreach (var heatExtension in this.Extensions) + { + foreach (HeatCommandLineOption commandLineOption in heatExtension.CommandLineTypes) + { + harvestOptions.Add(commandLineOption.Option, commandLineOption); + } + } + + harvestOptions.Add("-nologo", new HeatCommandLineOption("-nologo", "skip printing heat logo information")); + harvestOptions.Add("-indent ", new HeatCommandLineOption("-indent ", "indentation multiple (overrides default of 4)")); + harvestOptions.Add("-o[ut]", new HeatCommandLineOption("-out", "specify output file (default: write to current directory)")); + harvestOptions.Add("-sw", new HeatCommandLineOption("-sw", "suppress all warnings or a specific message ID\r\n (example: -sw1011 -sw1012)")); + harvestOptions.Add("-swall", new HeatCommandLineOption("-swall", "suppress all warnings (deprecated)")); + harvestOptions.Add("-v", new HeatCommandLineOption("-v", "verbose output")); + harvestOptions.Add("-wx[N]", new HeatCommandLineOption("-wx[N]", "treat all warnings or a specific message ID as an error\r\n (example: -wx1011 -wx1012)")); + harvestOptions.Add("-wxall", new HeatCommandLineOption("-wxall", "treat all warnings as errors (deprecated)")); + + foreach (HeatCommandLineOption commandLineOption in harvestOptions.Values) + { + if (!commandLineOption.Option.StartsWith("-")) + { + Console.WriteLine(HelpMessageOptionFormat, commandLineOption.Option, commandLineOption.Description); + } + } + + Console.WriteLine(); + Console.WriteLine("Options:"); + + foreach (HeatCommandLineOption commandLineOption in harvestOptions.Values) + { + if (commandLineOption.Option.StartsWith("-")) + { + Console.WriteLine(HelpMessageOptionFormat, commandLineOption.Option, commandLineOption.Description); + } + } + + Console.WriteLine(HelpMessageOptionFormat, "-? | -help", "this help information"); + Console.WriteLine("For more information see: https://wixtoolset.org/"); + + return 0; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections; + using System.Collections.Specialized; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + using Wix = WixToolset.Harvesters.Serialize; + using IIs = Serialize.IIs; + + /// + /// The finalize harvester mutator for the WiX Toolset Internet Information Services Extension. + /// + public sealed class IIsFinalizeHarvesterMutator : BaseMutatorExtension + { + private Hashtable directoryPaths; + private Hashtable filePaths; + private ArrayList webFilters; + private ArrayList webSites; + private ArrayList webVirtualDirs; + + /// + /// Instantiate a new IIsFinalizeHarvesterMutator. + /// + public IIsFinalizeHarvesterMutator() + { + this.directoryPaths = CollectionsUtil.CreateCaseInsensitiveHashtable(); + this.filePaths = CollectionsUtil.CreateCaseInsensitiveHashtable(); + this.webFilters = new ArrayList(); + this.webSites = new ArrayList(); + this.webVirtualDirs = new ArrayList(); + } + + /// + /// Gets the sequence of this mutator extension. + /// + /// The sequence of this mutator extension. + public override int Sequence + { + get { return 1900; } + } + + /// + /// Mutate a WiX document. + /// + /// The Wix document element. + public override void Mutate(Wix.Wix wix) + { + this.directoryPaths.Clear(); + this.filePaths.Clear(); + this.webFilters.Clear(); + this.webSites.Clear(); + this.webVirtualDirs.Clear(); + + this.IndexElement(wix); + + this.MutateWebFilters(); + this.MutateWebSites(); + this.MutateWebVirtualDirs(); + } + + /// + /// Index an element. + /// + /// The element to index. + private void IndexElement(Wix.ISchemaElement element) + { + if (element is IIs.WebFilter) + { + this.webFilters.Add(element); + } + else if (element is IIs.WebSite) + { + this.webSites.Add(element); + } + else if (element is IIs.WebVirtualDir) + { + this.webVirtualDirs.Add(element); + } + else if (element is Wix.Directory) + { + Wix.Directory directory = (Wix.Directory)element; + + if (null != directory.Id && null != directory.FileSource) + { + this.directoryPaths.Add(directory.FileSource, directory.Id); + } + } + else if (element is Wix.File) + { + Wix.File file = (Wix.File)element; + + if (null != file.Id && null != file.Source) + { + this.filePaths[file.Source] = String.Concat("[#", file.Id, "]"); + } + } + + // index the child elements + if (element is Wix.IParentElement) + { + foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children) + { + this.IndexElement(childElement); + } + } + } + + /// + /// Mutate the WebFilters. + /// + private void MutateWebFilters() + { + foreach (IIs.WebFilter webFilter in this.webFilters) + { + webFilter.Path = (string)this.filePaths[webFilter.Path]; + } + } + + /// + /// Mutate the WebSites. + /// + private void MutateWebSites() + { + foreach (IIs.WebSite webSite in this.webSites) + { + string path = (string)this.directoryPaths[webSite.Directory]; + if (null == path) + { + this.Core.Messaging.Write(HarvesterWarnings.EncounteredNullDirectoryForWebSite(path)); + } + else + { + webSite.Directory = path; + } + } + } + + /// + /// Mutate the WebVirtualDirs. + /// + private void MutateWebVirtualDirs() + { + foreach (IIs.WebVirtualDir webVirtualDir in this.webVirtualDirs) + { + string path = (string)this.directoryPaths[webVirtualDir.Directory]; + if (null == path) + { + this.Core.Messaging.Write(HarvesterWarnings.EncounteredNullDirectoryForWebSite(path)); + } + else + { + webVirtualDir.Directory = path; + } + } + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections; + using System.Collections.Specialized; + using System.IO; + using WixToolset.Harvesters.Extensibility; + using IIs = Serialize.IIs; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// The harvester mutator for the WiX Toolset Internet Information Services Extension. + /// + public sealed class IIsHarvesterMutator : BaseMutatorExtension + { + private ArrayList components; + private DirectoryHarvester directoryHarvester; + private Hashtable directoryPaths; + private FileHarvester fileHarvester; + private Wix.IParentElement rootElement; + private bool setUniqueIdentifiers; + private ArrayList webAddresses; + private ArrayList webDirs; + private ArrayList webDirProperties; + private ArrayList webFilters; + private ArrayList webSites; + private ArrayList webVirtualDirs; + + /// + /// Instantiate a new IIsHarvesterMutator. + /// + public IIsHarvesterMutator() + { + this.components = new ArrayList(); + this.directoryHarvester = new DirectoryHarvester(); + this.directoryPaths = CollectionsUtil.CreateCaseInsensitiveHashtable(); + this.fileHarvester = new FileHarvester(); + this.webAddresses = new ArrayList(); + this.webDirs = new ArrayList(); + this.webDirProperties = new ArrayList(); + this.webFilters = new ArrayList(); + this.webSites = new ArrayList(); + this.webVirtualDirs = new ArrayList(); + } + + /// + /// Gets the sequence of this mutator extension. + /// + /// The sequence of this mutator extension. + public override int Sequence + { + get { return 100; } + } + + /// + /// Gets of sets the option to set unique identifiers. + /// + /// The option to set unique identifiers. + public bool SetUniqueIdentifiers + { + get { return this.setUniqueIdentifiers; } + set { this.setUniqueIdentifiers = value; } + } + + /// + /// Mutate a WiX document. + /// + /// The Wix document element. + public override void Mutate(Wix.Wix wix) + { + this.components.Clear(); + this.directoryPaths.Clear(); + this.webAddresses.Clear(); + this.webDirs.Clear(); + this.webDirProperties.Clear(); + this.webFilters.Clear(); + this.webSites.Clear(); + this.webVirtualDirs.Clear(); + this.rootElement = null; + + this.IndexElement(wix); + + this.MutateWebAddresses(); + + this.MutateWebDirs(); + + this.MutateWebDirProperties(); + + this.MutateWebSites(); + + this.MutateWebVirtualDirs(); + + // this must come after the web virtual dirs in case they harvest a directory containing a web filter file + this.MutateWebFilters(); + + // this must come after the web site identifiers are created + this.MutateComponents(); + } + + /// + /// Harvest a new directory or return one that was previously harvested. + /// + /// The path of the directory. + /// The option to harvest the children of the directory. + /// The harvested directory. + private Wix.Directory HarvestUniqueDirectory(string path, bool harvestChildren) + { + if (this.directoryPaths.Contains(path)) + { + return (Wix.Directory)this.directoryPaths[path]; + } + else + { + Wix.Directory directory = this.directoryHarvester.HarvestDirectory(path, harvestChildren); + + this.rootElement.AddChild(directory); + + // index this new directory and all of its children + this.IndexElement(directory); + + return directory; + } + } + + /// + /// Index an element. + /// + /// The element to index. + private void IndexElement(Wix.ISchemaElement element) + { + if (element is IIs.WebAddress) + { + this.webAddresses.Add(element); + } + else if (element is IIs.WebDir) + { + this.webDirs.Add(element); + } + else if (element is IIs.WebDirProperties) + { + this.webDirProperties.Add(element); + } + else if (element is IIs.WebFilter) + { + this.webFilters.Add(element); + } + else if (element is IIs.WebSite) + { + this.webSites.Add(element); + } + else if (element is IIs.WebVirtualDir) + { + this.webVirtualDirs.Add(element); + } + else if (element is Wix.Component) + { + this.components.Add(element); + } + else if (element is Wix.Directory) + { + Wix.Directory directory = (Wix.Directory)element; + + if (null != directory.FileSource) + { + this.directoryPaths.Add(directory.FileSource, directory); + } + } + else if (element is Wix.Fragment || element is Wix.Module || element is Wix.PatchCreation || element is Wix.Package) + { + this.rootElement = (Wix.IParentElement)element; + } + + // index the child elements + if (element is Wix.IParentElement) + { + foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children) + { + this.IndexElement(childElement); + } + } + } + + /// + /// Mutate the Component elements. + /// + private void MutateComponents() + { + if (this.setUniqueIdentifiers) + { + IdentifierGenerator identifierGenerator = new IdentifierGenerator("Component", this.Core); + + // index all the existing identifiers + foreach (Wix.Component component in this.components) + { + if (null != component.Id) + { + identifierGenerator.IndexExistingIdentifier(component.Id); + } + } + + // index all the web site identifiers + foreach (IIs.WebSite webSite in this.webSites) + { + if (webSite.ParentElement is Wix.Component) + { + identifierGenerator.IndexName(webSite.Id); + } + } + + // create an identifier for each component based on its child web site identifier + foreach (IIs.WebSite webSite in this.webSites) + { + Wix.Component component = webSite.ParentElement as Wix.Component; + + if (null != component) + { + component.Id = identifierGenerator.GetIdentifier(webSite.Id); + } + } + } + } + + /// + /// Mutate the WebAddress elements. + /// + private void MutateWebAddresses() + { + if (this.setUniqueIdentifiers) + { + IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebAddress", this.Core); + + // index all the existing identifiers and names + foreach (IIs.WebAddress webAddress in this.webAddresses) + { + if (null != webAddress.Id) + { + identifierGenerator.IndexExistingIdentifier(webAddress.Id); + } + else + { + identifierGenerator.IndexName(String.Concat(webAddress.IP, "_", webAddress.Port)); + } + } + + foreach (IIs.WebAddress webAddress in this.webAddresses) + { + if (null == webAddress.Id) + { + webAddress.Id = identifierGenerator.GetIdentifier(String.Concat(webAddress.IP, "_", webAddress.Port)); + } + } + } + } + + /// + /// Mutate the WebDir elements. + /// + private void MutateWebDirs() + { + if (this.setUniqueIdentifiers) + { + IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebDir", this.Core); + + // index all the existing identifiers and names + foreach (IIs.WebDir webDir in this.webDirs) + { + if (null != webDir.Id) + { + identifierGenerator.IndexExistingIdentifier(webDir.Id); + } + else + { + identifierGenerator.IndexName(webDir.Path); + } + } + + foreach (IIs.WebDir webDir in this.webDirs) + { + if (null == webDir.Id) + { + webDir.Id = identifierGenerator.GetIdentifier(webDir.Path); + } + } + } + } + + /// + /// Mutate the WebDirProperties elements. + /// + private void MutateWebDirProperties() + { + if (this.setUniqueIdentifiers) + { + IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebDirProperties", this.Core); + + // index all the existing identifiers and names + foreach (IIs.WebDirProperties webDirProperties in this.webDirProperties) + { + if (null != webDirProperties.Id) + { + identifierGenerator.IndexExistingIdentifier(webDirProperties.Id); + } + } + + foreach (IIs.WebDirProperties webDirProperties in this.webDirProperties) + { + if (null == webDirProperties.Id) + { + webDirProperties.Id = identifierGenerator.GetIdentifier(String.Empty); + } + } + } + } + + /// + /// Mutate the WebFilter elements. + /// + private void MutateWebFilters() + { + IdentifierGenerator identifierGenerator = null; + + if (this.setUniqueIdentifiers) + { + identifierGenerator = new IdentifierGenerator("WebFilter", this.Core); + + // index all the existing identifiers and names + foreach (IIs.WebFilter webFilter in this.webFilters) + { + if (null != webFilter.Id) + { + identifierGenerator.IndexExistingIdentifier(webFilter.Id); + } + else + { + identifierGenerator.IndexName(webFilter.Name); + } + } + } + + foreach (IIs.WebFilter webFilter in this.webFilters) + { + if (this.setUniqueIdentifiers && null == webFilter.Id) + { + webFilter.Id = identifierGenerator.GetIdentifier(webFilter.Name); + } + + // harvest the file for this WebFilter + Wix.Directory directory = this.HarvestUniqueDirectory(Path.GetDirectoryName(webFilter.Path), false); + + Wix.Component component = new Wix.Component(); + directory.AddChild(component); + + Wix.File file = this.fileHarvester.HarvestFile(webFilter.Path); + component.AddChild(file); + } + } + + /// + /// Mutate the WebSite elements. + /// + private void MutateWebSites() + { + if (this.setUniqueIdentifiers) + { + IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebSite", this.Core); + + // index all the existing identifiers and names + foreach (IIs.WebSite webSite in this.webSites) + { + if (null != webSite.Id) + { + identifierGenerator.IndexExistingIdentifier(webSite.Id); + } + else + { + identifierGenerator.IndexName(webSite.Description); + } + } + + foreach (IIs.WebSite webSite in this.webSites) + { + if (null == webSite.Id) + { + webSite.Id = identifierGenerator.GetIdentifier(webSite.Description); + } + } + } + } + + /// + /// Mutate the WebVirtualDir elements. + /// + private void MutateWebVirtualDirs() + { + IdentifierGenerator identifierGenerator = null; + + if (this.setUniqueIdentifiers) + { + identifierGenerator = new IdentifierGenerator("WebVirtualDir", this.Core); + + // index all the existing identifiers and names + foreach (IIs.WebVirtualDir webVirtualDir in this.webVirtualDirs) + { + if (null != webVirtualDir.Id) + { + identifierGenerator.IndexExistingIdentifier(webVirtualDir.Id); + } + else + { + identifierGenerator.IndexName(webVirtualDir.Alias); + } + } + } + + foreach (IIs.WebVirtualDir webVirtualDir in this.webVirtualDirs) + { + if (this.setUniqueIdentifiers && null == webVirtualDir.Id) + { + webVirtualDir.Id = identifierGenerator.GetIdentifier(webVirtualDir.Alias); + } + + // harvest the directory for this WebVirtualDir + this.HarvestUniqueDirectory(webVirtualDir.Directory, true); + } + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + + /// + /// An IIS harvesting extension for the WiX Toolset Harvester application. + /// + public sealed class IIsHeatExtension : BaseHeatExtension + { + /// + /// Gets the supported command line types for this extension. + /// + /// The supported command line types for this extension. + public override HeatCommandLineOption[] CommandLineTypes + { + get + { + return new HeatCommandLineOption[] + { + new HeatCommandLineOption("website", "harvest an IIS web site"), + }; + } + } + + /// + /// Parse the command line options for this extension. + /// + /// The active harvester type. + /// The option arguments. + public override void ParseOptions(string type, string[] args) + { + bool active = false; + IHarvesterExtension harvesterExtension = null; + IIsHarvesterMutator iisHarvesterMutator = new IIsHarvesterMutator(); + + // select the harvester + switch (type) + { + case "website": + harvesterExtension = new IIsWebSiteHarvester(); + active = true; + break; + } + + // set default settings + iisHarvesterMutator.SetUniqueIdentifiers = true; + + // parse the options + foreach (string arg in args) + { + if (null == arg || 0 == arg.Length) // skip blank arguments + { + continue; + } + + if ('-' == arg[0] || '/' == arg[0]) + { + string parameter = arg.Substring(1); + + if ("suid" == parameter) + { + iisHarvesterMutator.SetUniqueIdentifiers = false; + } + } + } + + // set the appropriate harvester extension + if (active) + { + this.Core.Harvester.Extension = harvesterExtension; + this.Core.Mutator.AddExtension(iisHarvesterMutator); + this.Core.Mutator.AddExtension(new IIsFinalizeHarvesterMutator()); + this.Core.Mutator.AddExtension(new UtilFinalizeHarvesterMutator()); + } + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.DirectoryServices; + using System.Globalization; + using System.Runtime.InteropServices; + using WixToolset.Data; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + using IIs = WixToolset.Harvesters.Serialize.IIs; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// The web site harvester for the WiX Toolset Internet Information Services Extension. + /// + public sealed class IIsWebSiteHarvester : BaseHarvesterExtension + { + /// + /// Harvest a WiX document. + /// + /// The argument for harvesting. + /// The harvested Fragment. + public override Wix.Fragment[] Harvest(string argument) + { + DirectoryHarvester directoryHarvester = new DirectoryHarvester(); + directoryHarvester.Core = this.Core; + directoryHarvester.KeepEmptyDirectories = true; + + IIsWebSiteHarvester iisWebSiteHarvester = new IIsWebSiteHarvester(); + iisWebSiteHarvester.Core = this.Core; + + IIs.WebSite webSite = iisWebSiteHarvester.HarvestWebSite(argument); + + Wix.Component component = new Wix.Component(); + component.AddChild(new Wix.CreateFolder()); + component.AddChild(webSite); + + this.Core.RootDirectory = webSite.Directory; + Wix.Directory directory = directoryHarvester.HarvestDirectory(webSite.Directory, true); + directory.AddChild(component); + + Wix.Fragment fragment = new Wix.Fragment(); + fragment.AddChild(directory); + + return new Wix.Fragment[] { fragment }; + } + + /// + /// Harvest a web site. + /// + /// The name of the web site. + /// The harvested web site. + public IIs.WebSite HarvestWebSite(string name) + { + try + { + DirectoryEntry directoryEntry = new DirectoryEntry("IIS://localhost/W3SVC"); + + foreach (DirectoryEntry childEntry in directoryEntry.Children) + { + if ("IIsWebServer" == childEntry.SchemaClassName) + { + if (String.Equals((string)childEntry.Properties["ServerComment"].Value, name, StringComparison.OrdinalIgnoreCase)) + { + return this.HarvestWebSite(childEntry); + } + } + } + } + catch (COMException ce) + { + // 0x8007005 - access denied + // If we don't have permission to harvest a website, it's likely because we're on + // Vista or higher and aren't an Admin. + if ((0x80070005 == unchecked((uint)ce.ErrorCode))) + { + throw new WixException(HarvesterErrors.InsufficientPermissionHarvestWebSite()); + } + // 0x80005000 - unknown error + else if ((0x80005000 == unchecked((uint)ce.ErrorCode))) + { + throw new WixException(HarvesterErrors.CannotHarvestWebSite()); + } + } + + throw new WixException(HarvesterErrors.WebSiteNotFound(name)); + } + + /// + /// Harvest a web site. + /// + /// The web site directory entry. + /// The harvested web site. + private IIs.WebSite HarvestWebSite(DirectoryEntry webSiteEntry) + { + IIs.WebSite webSite = new IIs.WebSite(); + + foreach (string propertyName in webSiteEntry.Properties.PropertyNames) + { + PropertyValueCollection property = webSiteEntry.Properties[propertyName]; + PropertyValueCollection parentProperty = webSiteEntry.Parent.Properties[propertyName]; + + if (null == parentProperty.Value || parentProperty.Value.ToString() != property.Value.ToString()) + { + switch (propertyName) + { + case "SecureBindings": + IIs.WebAddress secureWebAddress = this.HarvestBindings(propertyName, property); + if (null != secureWebAddress) + { + webSite.AddChild(secureWebAddress); + } + break; + case "ServerBindings": + IIs.WebAddress webAddress = this.HarvestBindings(propertyName, property); + if (null != webAddress) + { + webSite.AddChild(webAddress); + } + break; + case "ServerComment": + webSite.Description = (string)property.Value; + break; + } + } + } + + foreach (DirectoryEntry childEntry in webSiteEntry.Children) + { + switch (childEntry.SchemaClassName) + { + case "IIsFilters": + string loadOrder = (string)childEntry.Properties["FilterLoadOrder"].Value; + if (loadOrder.Length > 0) + { + string[] filterNames = loadOrder.Split(",".ToCharArray()); + + for (int i = 0; i < filterNames.Length; i++) + { + using (DirectoryEntry webFilterEntry = new DirectoryEntry(String.Concat(childEntry.Path, '/', filterNames[i]))) + { + IIs.WebFilter webFilter = this.HarvestWebFilter(webFilterEntry); + + webFilter.LoadOrder = (i + 1).ToString(CultureInfo.InvariantCulture); + + webSite.AddChild(webFilter); + } + } + } + break; + case "IIsWebDirectory": + this.HarvestWebDirectory(childEntry, webSite); + break; + case "IIsWebVirtualDir": + foreach (string propertyName in childEntry.Properties.PropertyNames) + { + PropertyValueCollection property = childEntry.Properties[propertyName]; + + switch (propertyName) + { + case "Path": + webSite.Directory = (string)property.Value; + break; + } + } + + IIs.WebDirProperties webDirProps = this.HarvestWebDirProperties(childEntry); + if (null != webDirProps) + { + webSite.AddChild(webDirProps); + } + + foreach (DirectoryEntry child2Entry in childEntry.Children) + { + switch (child2Entry.SchemaClassName) + { + case "IIsWebDirectory": + this.HarvestWebDirectory(child2Entry, webSite); + break; + case "IIsWebVirtualDir": + this.HarvestWebVirtualDir(child2Entry, webSite); + break; + } + } + break; + } + } + + return webSite; + } + + /// + /// Harvest bindings. + /// + /// The property name of the bindings property. + /// The bindings property. + /// The harvested bindings. + private IIs.WebAddress HarvestBindings(string propertyName, PropertyValueCollection bindingsProperty) + { + if (1 == bindingsProperty.Count) + { + IIs.WebAddress webAddress = new IIs.WebAddress(); + + string[] bindings = ((string)bindingsProperty[0]).Split(":".ToCharArray()); + + if (0 < bindings[0].Length) + { + webAddress.IP = bindings[0]; + } + + if (0 < bindings[1].Length) + { + webAddress.Port = bindings[1]; + } + + if (0 < bindings[2].Length) + { + webAddress.Header = bindings[2]; + } + + if ("SecureBindings" == propertyName) + { + webAddress.Secure = IIs.YesNoType.yes; + } + + return webAddress; + } + + return null; + } + + /// + /// Harvest a web directory. + /// + /// The web directory directory entry. + /// The parent web site. + private void HarvestWebDirectory(DirectoryEntry webDirectoryEntry, IIs.WebSite webSite) + { + foreach (DirectoryEntry childEntry in webDirectoryEntry.Children) + { + switch (childEntry.SchemaClassName) + { + case "IIsWebDirectory": + this.HarvestWebDirectory(childEntry, webSite); + break; + case "IIsWebVirtualDir": + this.HarvestWebVirtualDir(childEntry, webSite); + break; + } + } + + IIs.WebDirProperties webDirProperties = this.HarvestWebDirProperties(webDirectoryEntry); + + if (null != webDirProperties) + { + IIs.WebDir webDir = new IIs.WebDir(); + + int indexOfRoot = webDirectoryEntry.Path.IndexOf("ROOT/", StringComparison.OrdinalIgnoreCase); + webDir.Path = webDirectoryEntry.Path.Substring(indexOfRoot + 5); + + webDir.AddChild(webDirProperties); + + webSite.AddChild(webDir); + } + } + + /// + /// Harvest a web filter. + /// + /// The web filter directory entry. + /// The harvested web filter. + private IIs.WebFilter HarvestWebFilter(DirectoryEntry webFilterEntry) + { + IIs.WebFilter webFilter = new IIs.WebFilter(); + + webFilter.Name = webFilterEntry.Name; + + foreach (string propertyName in webFilterEntry.Properties.PropertyNames) + { + PropertyValueCollection property = webFilterEntry.Properties[propertyName]; + + switch (propertyName) + { + case "FilterDescription": + webFilter.Description = (string)property.Value; + break; + case "FilterFlags": + webFilter.Flags = (int)property.Value; + break; + case "FilterPath": + webFilter.Path = (string)property.Value; + break; + } + } + + return webFilter; + } + + /// + /// Harvest a web directory's properties. + /// + /// The web directory directory entry. + /// The harvested web directory's properties. + private IIs.WebDirProperties HarvestWebDirProperties(DirectoryEntry directoryEntry) + { + bool foundProperties = false; + IIs.WebDirProperties webDirProperties = new IIs.WebDirProperties(); + + // Cannot read properties for "iisadmin" site. + if (String.Equals("iisadmin", directoryEntry.Name, StringComparison.OrdinalIgnoreCase) && + String.Equals("ROOT", directoryEntry.Parent.Name, StringComparison.OrdinalIgnoreCase)) + { + return null; + } + + foreach (string propertyName in directoryEntry.Properties.PropertyNames) + { + PropertyValueCollection property = directoryEntry.Properties[propertyName]; + PropertyValueCollection parentProperty = directoryEntry.Parent.Properties[propertyName]; + + if (null == parentProperty.Value || parentProperty.Value.ToString() != property.Value.ToString()) + { + switch (propertyName) + { + case "AccessFlags": + int access = (int)property.Value; + + if (0x1 == (access & 0x1)) + { + webDirProperties.Read = IIs.YesNoType.yes; + } + + if (0x2 == (access & 0x2)) + { + webDirProperties.Write = IIs.YesNoType.yes; + } + + if (0x4 == (access & 0x4)) + { + webDirProperties.Execute = IIs.YesNoType.yes; + } + + if (0x200 == (access & 0x200)) + { + webDirProperties.Script = IIs.YesNoType.yes; + } + + foundProperties = true; + break; + case "AuthFlags": + int authorization = (int)property.Value; + + if (0x1 == (authorization & 0x1)) + { + webDirProperties.AnonymousAccess = IIs.YesNoType.yes; + } + + if (0x2 == (authorization & 0x2)) + { + webDirProperties.BasicAuthentication = IIs.YesNoType.yes; + } + + if (0x4 == (authorization & 0x4)) + { + webDirProperties.WindowsAuthentication = IIs.YesNoType.yes; + } + + if (0x10 == (authorization & 0x10)) + { + webDirProperties.DigestAuthentication = IIs.YesNoType.yes; + } + + if (0x40 == (authorization & 0x40)) + { + webDirProperties.PassportAuthentication = IIs.YesNoType.yes; + } + + foundProperties = true; + break; + } + } + } + + return foundProperties ? webDirProperties : null; + } + + /// + /// Harvest a web virtual directory. + /// + /// The web virtual directory directory entry. + /// The parent web site. + private void HarvestWebVirtualDir(DirectoryEntry webVirtualDirEntry, IIs.WebSite webSite) + { + IIs.WebVirtualDir webVirtualDir = new IIs.WebVirtualDir(); + + foreach (string propertyName in webVirtualDirEntry.Properties.PropertyNames) + { + PropertyValueCollection property = webVirtualDirEntry.Properties[propertyName]; + PropertyValueCollection parentProperty = webVirtualDirEntry.Parent.Properties[propertyName]; + + if (null == parentProperty.Value || parentProperty.Value.ToString() != property.Value.ToString()) + { + switch (propertyName) + { + case "Path": + webVirtualDir.Directory = (string)property.Value; + break; + } + } + } + + int indexOfRoot = webVirtualDirEntry.Path.IndexOf("ROOT/", StringComparison.OrdinalIgnoreCase); + webVirtualDir.Alias = webVirtualDirEntry.Path.Substring(indexOfRoot + 5); + + IIs.WebDirProperties webDirProps = this.HarvestWebDirProperties(webVirtualDirEntry); + if (webDirProps != null) + { + webVirtualDir.AddChild(webDirProps); + } + + foreach (DirectoryEntry childEntry in webVirtualDirEntry.Children) + { + switch (childEntry.SchemaClassName) + { + case "IIsWebDirectory": + this.HarvestWebDirectory(childEntry, webSite); + break; + case "IIsWebVirtualDir": + this.HarvestWebVirtualDir(childEntry, webSite); + break; + } + } + + webSite.AddChild(webVirtualDir); + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections; + using WixToolset.Harvesters.Extensibility; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// The WiX Toolset mutator. + /// + internal class Mutator : IMutator + { + private SortedList extensions; + private string extensionArgument; + + /// + /// Instantiate a new mutator. + /// + public Mutator() + { + this.extensions = new SortedList(); + } + + public IHarvesterCore Core { get; set; } + + public string ExtensionArgument + { + get { return this.extensionArgument; } + set { this.extensionArgument = value; } + } + + public void AddExtension(IMutatorExtension mutatorExtension) + { + this.extensions.Add(mutatorExtension.Sequence, mutatorExtension); + } + + public bool Mutate(Wix.Wix wix) + { + bool encounteredError = false; + + try + { + foreach (IMutatorExtension mutatorExtension in this.extensions.Values) + { + if (null == mutatorExtension.Core) + { + mutatorExtension.Core = this.Core; + } + + mutatorExtension.Mutate(wix); + } + } + finally + { + encounteredError = this.Core.Messaging.EncounteredError; + } + + // return the Wix document element only if mutation completed successfully + return !encounteredError; + } + + public string Mutate(string wixString) + { + bool encounteredError = false; + + try + { + foreach (IMutatorExtension mutatorExtension in this.extensions.Values) + { + if (null == mutatorExtension.Core) + { + mutatorExtension.Core = this.Core; + } + + wixString = mutatorExtension.Mutate(wixString); + + if (String.IsNullOrEmpty(wixString) || this.Core.Messaging.EncounteredError) + { + break; + } + } + } + finally + { + encounteredError = this.Core.Messaging.EncounteredError; + } + + return encounteredError ? null : wixString; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Linq; + using System.Diagnostics; + using WixToolset.Data; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + using Util = WixToolset.Harvesters.Serialize.Util; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// Harvest WiX authoring for a file from the file system. + /// + public sealed class PerformanceCategoryHarvester : BaseHarvesterExtension + { + /// + /// Harvest a performance category. + /// + /// The name of the performance category. + /// A harvested performance category. + public override Wix.Fragment[] Harvest(string argument) + { + if (null == argument) + { + throw new ArgumentNullException("argument"); + } + + Util.PerformanceCategory perf = this.HarvestPerformanceCategory(argument); + + Wix.Component component = new Wix.Component(); + component.Id = this.Core.CreateIdentifierFromFilename(argument); + component.KeyPath = Wix.YesNoType.yes; + component.AddChild(perf); + + Wix.Directory directory = new Wix.Directory(); + directory.Id = "TARGETDIR"; + //directory.Name = directory.Id; + directory.AddChild(component); + + Wix.Fragment fragment = new Wix.Fragment(); + fragment.AddChild(directory); + + return new Wix.Fragment[] { fragment }; + } + + /// + /// Harvest a performance category. + /// + /// The name of the performance category. + /// A harvested file. + public Util.PerformanceCategory HarvestPerformanceCategory(string category) + { + if (null == category) + { + throw new ArgumentNullException("category"); + } + + if (PerformanceCounterCategory.Exists(category)) + { + Util.PerformanceCategory perfCategory = new Util.PerformanceCategory(); + + // Get the performance counter category and set the appropriate WiX attributes + PerformanceCounterCategory pcc = PerformanceCounterCategory.GetCategories().Single(c => string.Equals(c.CategoryName, category)); + perfCategory.Id = this.Core.CreateIdentifierFromFilename(pcc.CategoryName); + perfCategory.Name = pcc.CategoryName; + perfCategory.Help = pcc.CategoryHelp; + if (PerformanceCounterCategoryType.MultiInstance == pcc.CategoryType) + { + perfCategory.MultiInstance = Util.YesNoType.yes; + } + + // If it's multi-instance, check if there are any instances and get counters from there; else we get + // the counters straight up. For multi-instance, GetCounters() fails if there are any instances. If there + // are no instances, then GetCounters(instance) can't be called since there is no instance. Instances + // will exist for each counter even if only one of the counters was "intialized." + string[] instances = pcc.GetInstanceNames(); + bool hasInstances = instances.Length > 0; + PerformanceCounter[] counters = hasInstances + ? pcc.GetCounters(instances.First()) + : pcc.GetCounters(); + + foreach (PerformanceCounter counter in counters) + { + Util.PerformanceCounter perfCounter = new Util.PerformanceCounter(); + + // Get the performance counter and set the appropriate WiX attributes + perfCounter.Name = counter.CounterName; + perfCounter.Type = this.CounterTypeToWix(counter.CounterType); + perfCounter.Help = counter.CounterHelp; + + perfCategory.AddChild(perfCounter); + } + + return perfCategory; + } + else + { + throw new WixException(HarvesterErrors.PerformanceCategoryNotFound(category)); + } + } + + /// + /// Get the WiX performance counter type. + /// + /// The performance counter value to get. + /// The WiX performance counter type. + private Util.PerformanceCounterTypesType CounterTypeToWix(PerformanceCounterType pct) + { + Util.PerformanceCounterTypesType type; + + switch (pct) + { + case PerformanceCounterType.AverageBase: + type = Util.PerformanceCounterTypesType.averageBase; + break; + case PerformanceCounterType.AverageCount64: + type = Util.PerformanceCounterTypesType.averageCount64; + break; + case PerformanceCounterType.AverageTimer32: + type = Util.PerformanceCounterTypesType.averageTimer32; + break; + case PerformanceCounterType.CounterDelta32: + type = Util.PerformanceCounterTypesType.counterDelta32; + break; + case PerformanceCounterType.CounterTimerInverse: + type = Util.PerformanceCounterTypesType.counterTimerInverse; + break; + case PerformanceCounterType.SampleFraction: + type = Util.PerformanceCounterTypesType.sampleFraction; + break; + case PerformanceCounterType.Timer100Ns: + type = Util.PerformanceCounterTypesType.timer100Ns; + break; + case PerformanceCounterType.CounterTimer: + type = Util.PerformanceCounterTypesType.counterTimer; + break; + case PerformanceCounterType.RawFraction: + type = Util.PerformanceCounterTypesType.rawFraction; + break; + case PerformanceCounterType.Timer100NsInverse: + type = Util.PerformanceCounterTypesType.timer100NsInverse; + break; + case PerformanceCounterType.CounterMultiTimer: + type = Util.PerformanceCounterTypesType.counterMultiTimer; + break; + case PerformanceCounterType.CounterMultiTimer100Ns: + type = Util.PerformanceCounterTypesType.counterMultiTimer100Ns; + break; + case PerformanceCounterType.CounterMultiTimerInverse: + type = Util.PerformanceCounterTypesType.counterMultiTimerInverse; + break; + case PerformanceCounterType.CounterMultiTimer100NsInverse: + type = Util.PerformanceCounterTypesType.counterMultiTimer100NsInverse; + break; + case PerformanceCounterType.ElapsedTime: + type = Util.PerformanceCounterTypesType.elapsedTime; + break; + case PerformanceCounterType.SampleBase: + type = Util.PerformanceCounterTypesType.sampleBase; + break; + case PerformanceCounterType.RawBase: + type = Util.PerformanceCounterTypesType.rawBase; + break; + case PerformanceCounterType.CounterMultiBase: + type = Util.PerformanceCounterTypesType.counterMultiBase; + break; + case PerformanceCounterType.RateOfCountsPerSecond64: + type = Util.PerformanceCounterTypesType.rateOfCountsPerSecond64; + break; + case PerformanceCounterType.RateOfCountsPerSecond32: + type = Util.PerformanceCounterTypesType.rateOfCountsPerSecond32; + break; + case PerformanceCounterType.CountPerTimeInterval64: + type = Util.PerformanceCounterTypesType.countPerTimeInterval64; + break; + case PerformanceCounterType.CountPerTimeInterval32: + type = Util.PerformanceCounterTypesType.countPerTimeInterval32; + break; + case PerformanceCounterType.SampleCounter: + type = Util.PerformanceCounterTypesType.sampleCounter; + break; + case PerformanceCounterType.CounterDelta64: + type = Util.PerformanceCounterTypesType.counterDelta64; + break; + case PerformanceCounterType.NumberOfItems64: + type = Util.PerformanceCounterTypesType.numberOfItems64; + break; + case PerformanceCounterType.NumberOfItems32: + type = Util.PerformanceCounterTypesType.numberOfItems32; + break; + case PerformanceCounterType.NumberOfItemsHEX64: + type = Util.PerformanceCounterTypesType.numberOfItemsHEX64; + break; + case PerformanceCounterType.NumberOfItemsHEX32: + type = Util.PerformanceCounterTypesType.numberOfItemsHEX32; + break; + default: + throw new WixException(HarvesterErrors.UnsupportedPerformanceCounterType(pct.ToString())); + } + + return type; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Tools.Heat +{ + using System; + using System.Runtime.InteropServices; + using System.Threading; + using System.Threading.Tasks; + using WixToolset.Core; + using WixToolset.Data; + using WixToolset.Extensibility; + using WixToolset.Extensibility.Data; + using WixToolset.Extensibility.Services; + using WixToolset.Harvesters; + using WixToolset.Harvesters.Extensibility; + using WixToolset.Tools.Core; + + /// + /// Wix Toolset Harvester. + /// + public sealed class Program + { + /// + /// The main entry point for the application. + /// + /// Commandline arguments for the application. + /// Returns the application error code. + [MTAThread] + public static async Task Main(string[] args) + { + var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider(); + var listener = new ConsoleMessageListener("HEAT", "heat.exe"); + + try + { + var program = new Program(); + return await program.Run(serviceProvider, listener, args); + } + catch (WixException e) + { + listener.Write(e.Error); + + return e.Error.Id; + } + catch (Exception e) + { + listener.Write(ErrorMessages.UnexpectedException(e)); + + if (e is NullReferenceException || e is SEHException) + { + throw; + } + + return e.HResult; + } + } + + /// + /// Run the application with the given arguments. + /// + /// Service provider to use throughout this execution. + /// The commandline arguments. + /// Returns the application error code. + public Task Run(IServiceProvider serviceProvider, IMessageListener listener, string[] args) + { + var messaging = serviceProvider.GetService(); + messaging.SetListener(listener); + + var arguments = serviceProvider.GetService(); + arguments.Populate(args); + + var extensionManager = serviceProvider.GetService(); + foreach (var extension in arguments.Extensions) + { + extensionManager.Load(extension); + } + var heatExtensions = extensionManager.GetServices(); + + var commandLine = HeatCommandLineFactory.CreateCommandLine(serviceProvider, heatExtensions); + var command = commandLine.ParseStandardCommandLine(arguments); + return command?.ExecuteAsync(CancellationToken.None) ?? Task.FromResult(1); + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections; + using System.Globalization; + using System.IO; + using WixToolset.Data; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// Harvest WiX authoring for a reg file. + /// + public sealed class RegFileHarvester : BaseHarvesterExtension + { + private static readonly string ComponentPrefix = "cmp"; + + /// + /// Current line in the reg file being processed. + /// + private int currentLineNumber = 0; + + /// + /// Flag indicating whether this is a unicode registry file. + /// + private bool unicodeRegistry; + + /// + /// Harvest a file. + /// + /// The path of the file. + /// A harvested file. + public override Wix.Fragment[] Harvest(string argument) + { + if (null == argument) + { + throw new ArgumentNullException("argument"); + } + + // Harvest the keys from the registry file + Wix.Fragment fragment = this.HarvestRegFile(argument); + + return new Wix.Fragment[] { fragment }; + } + + /// + /// Harvest a reg file. + /// + /// The path of the file. + /// A harvested registy file. + public Wix.Fragment HarvestRegFile(string path) + { + if (null == path) + { + throw new ArgumentNullException("path"); + } + + if (!File.Exists(path)) + { + throw new WixException(HarvesterErrors.FileNotFound(path)); + } + + Wix.Directory directory = new Wix.Directory(); + directory.Id = "TARGETDIR"; + + // Use absolute paths + path = Path.GetFullPath(path); + FileInfo file = new FileInfo(path); + + using (StreamReader sr = file.OpenText()) + { + string line; + this.currentLineNumber = 0; + + while (null != (line = this.GetNextLine(sr))) + { + if (line.StartsWith(@"Windows Registry Editor Version 5.00")) + { + this.unicodeRegistry = true; + } + else if (line.StartsWith(@"REGEDIT4")) + { + this.unicodeRegistry = false; + } + else if (line.StartsWith(@"[HKEY_CLASSES_ROOT\")) + { + this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKCR, line.Substring(19, line.Length - 20)); + } + else if (line.StartsWith(@"[HKEY_CURRENT_USER\")) + { + this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKCU, line.Substring(19, line.Length - 20)); + } + else if (line.StartsWith(@"[HKEY_LOCAL_MACHINE\")) + { + this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKLM, line.Substring(20, line.Length - 21)); + } + else if (line.StartsWith(@"[HKEY_USERS\")) + { + this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKU, line.Substring(12, line.Length - 13)); + } + } + } + + Console.WriteLine("Processing complete"); + + Wix.Fragment fragment = new Wix.Fragment(); + fragment.AddChild(directory); + + return fragment; + } + + /// + /// Converts the registry key to a WiX component element. + /// + /// The registry file stream. + /// A WiX directory reference. + /// The root key. + /// The current line. + private void ConvertKey(StreamReader sr, ref Wix.Directory directory, Wix.RegistryRootType root, string line) + { + Wix.Component component = new Wix.Component(); + + component.Id = this.Core.GenerateIdentifier(ComponentPrefix, line); + component.KeyPath = Wix.YesNoType.yes; + + this.ConvertValues(sr, ref component, root, line); + directory.AddChild(component); + } + + /// + /// Converts the registry values to WiX regisry key element. + /// + /// The registry file stream. + /// A WiX component reference. + /// The root key. + /// The current line. + private void ConvertValues(StreamReader sr, ref Wix.Component component, Wix.RegistryRootType root, string line) + { + string name = null; + string value = null; + var registryKey = new Wix.RegistryKey + { + Root = root, + Key = line + }; + + while (this.GetValue(sr, ref name, ref value, out var type)) + { + Wix.RegistryValue registryValue = new Wix.RegistryValue(); + ArrayList charArray; + + // Don't specifiy name for default attribute + if (!String.IsNullOrEmpty(name)) + { + registryValue.Name = name; + } + + registryValue.Type = type; + + switch (type) + { + case Wix.RegistryValue.TypeType.binary: + registryValue.Value = value.Replace(",", String.Empty).ToUpper(); + break; + + case Wix.RegistryValue.TypeType.integer: + registryValue.Value = Int32.Parse(value, NumberStyles.HexNumber).ToString(); + break; + + case Wix.RegistryValue.TypeType.expandable: + charArray = this.ConvertCharList(value); + value = String.Empty; + + // create the string, remove the terminating null + for (int i = 0; i < charArray.Count; i++) + { + if ('\0' != (char)charArray[i]) + { + value += charArray[i]; + } + } + + registryValue.Value = value; + break; + + case Wix.RegistryValue.TypeType.multiString: + charArray = this.ConvertCharList(value); + value = String.Empty; + + // Convert the character array to a string so we can simply split it at the nulls, ignore the final null null. + for (int i = 0; i < (charArray.Count - 2); i++) + { + value += charArray[i]; + } + + // Although the value can use [~] the preffered way is to use MultiStringValue + string[] parts = value.Split("\0".ToCharArray()); + foreach (string part in parts) + { + Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); + multiStringValue.Content = part; + registryValue.AddChild(multiStringValue); + } + + break; + + case Wix.RegistryValue.TypeType.@string: + // Remove \\ and \" + value = value.ToString().Replace("\\\"", "\""); + value = value.ToString().Replace(@"\\", @"\"); + // Escape [ and ] + value = value.ToString().Replace(@"[", @"[\[]"); + value = value.ToString().Replace(@"]", @"[\]]"); + // This undoes the duplicate escaping caused by the second replace + value = value.ToString().Replace(@"[\[[\]]", @"[\[]"); + // Escape $ + value = value.ToString().Replace(@"$", @"$$"); + + registryValue.Value = value; + break; + + default: + throw new ApplicationException(String.Format("Did not recognize the type of reg value on line {0}", this.currentLineNumber)); + } + + registryKey.AddChild(registryValue); + } + + // Make sure empty keys are created + if (null == value) + { + registryKey.ForceCreateOnInstall = Wix.YesNoType.yes; + } + + component.AddChild(registryKey); + } + + /// + /// Parse a value from a line. + /// + /// Reader for the reg file. + /// Name of the value. + /// Value of the value. + /// Type of the value. + /// true if the value can be parsed, false otherwise. + private bool GetValue(StreamReader sr, ref string name, ref string value, out Wix.RegistryValue.TypeType type) + { + string line = this.GetNextLine(sr); + + if (null == line || 0 == line.Length) + { + type = 0; + return false; + } + + string[] parts; + + if (line.StartsWith("@")) + { + // Special case for default value + parts = line.Trim().Split("=".ToCharArray(), 2); + + name = null; + } + else + { + parts = line.Trim().Split("=".ToCharArray()); + + // It is valid to have an '=' in the name or the data. This is probably a string so the separator will be '"="'. + if (2 != parts.Length) + { + string[] stringSeparator = new string[] { "\"=\"" }; + parts = line.Trim().Split(stringSeparator, StringSplitOptions.None); + + if (2 != parts.Length) + { + // Line still no parsed correctly + throw new ApplicationException(String.Format("Cannot parse value: {0} at line {1}.", line, this.currentLineNumber)); + } + + // Put back quotes stripped by Split() + parts[0] += "\""; + parts[1] = "\"" + parts[1]; + } + + name = parts[0].Substring(1, parts[0].Length - 2); + } + + if (parts[1].StartsWith("hex:")) + { + // binary + value = parts[1].Substring(4); + type = Wix.RegistryValue.TypeType.binary; + } + else if (parts[1].StartsWith("dword:")) + { + // dword + value = parts[1].Substring(6); + type = Wix.RegistryValue.TypeType.integer; + } + else if (parts[1].StartsWith("hex(2):")) + { + // expandable string + value = parts[1].Substring(7); + type = Wix.RegistryValue.TypeType.expandable; + } + else if (parts[1].StartsWith("hex(7):")) + { + // multi-string + value = parts[1].Substring(7); + type = Wix.RegistryValue.TypeType.multiString; + } + else if (parts[1].StartsWith("hex(")) + { + // Give a better error when we find something that isn't supported + // by specifying the type that isn't supported. + string unsupportedType = ""; + + if (parts[1].StartsWith("hex(0")) { unsupportedType = "REG_NONE"; } + else if (parts[1].StartsWith("hex(6")) { unsupportedType = "REG_LINK"; } + else if (parts[1].StartsWith("hex(8")) { unsupportedType = "REG_RESOURCE_LIST"; } + else if (parts[1].StartsWith("hex(9")) { unsupportedType = "REG_FULL_RESOURCE_DESCRIPTOR"; } + else if (parts[1].StartsWith("hex(a")) { unsupportedType = "REG_RESOURCE_REQUIREMENTS_LIST"; } + else if (parts[1].StartsWith("hex(b")) { unsupportedType = "REG_QWORD"; } + + // REG_NONE(0), REG_LINK(6), REG_RESOURCE_LIST(8), REG_FULL_RESOURCE_DESCRIPTOR(9), REG_RESOURCE_REQUIREMENTS_LIST(a), REG_QWORD(b) + this.Core.Messaging.Write(HarvesterWarnings.UnsupportedRegistryType(parts[0], this.currentLineNumber, unsupportedType)); + + type = 0; + return false; + } + else if (parts[1].StartsWith("\"")) + { + // string + value = parts[1].Substring(1, parts[1].Length - 2); + type = Wix.RegistryValue.TypeType.@string; + } + else + { + // unsupported value + throw new ApplicationException(String.Format("Unsupported registry value {0} at line {1}.", line, this.currentLineNumber)); + } + + return true; + } + + /// + /// Get the next line from the reg file input stream. + /// + /// Reader for the reg file. + /// The next line. + private string GetNextLine(StreamReader sr) + { + string line; + string totalLine = null; + + while (null != (line = sr.ReadLine())) + { + bool stop = true; + + this.currentLineNumber++; + line = line.Trim(); + Console.Write("Processing line: {0}\r", this.currentLineNumber); + + if (line.EndsWith("\\")) + { + stop = false; + line = line.Substring(0, line.Length - 1); + } + + if (null == totalLine) + { + // first line + totalLine = line; + } + else + { + // other lines + totalLine += line; + } + + // break if there is no more info for this line + if (stop) + { + break; + } + } + + return totalLine; + } + + /// + /// Convert a character list into the proper WiX format for either unicode or ansi lists. + /// + /// List of characters. + /// Array of characters. + private ArrayList ConvertCharList(string charList) + { + if (String.IsNullOrEmpty(charList)) + { + return new ArrayList(); + } + + string[] strChars = charList.Split(",".ToCharArray()); + + ArrayList charArray = new ArrayList(); + + if (this.unicodeRegistry) + { + if (0 != strChars.Length % 2) + { + throw new ApplicationException(String.Format("Problem parsing Expandable string data at line {0}, its probably not Unicode.", this.currentLineNumber)); + } + + for (int i = 0; i < strChars.Length; i += 2) + { + string chars = strChars[i + 1] + strChars[i]; + int unicodeInt = Int32.Parse(chars, NumberStyles.HexNumber); + char unicodeChar = (char)unicodeInt; + charArray.Add(unicodeChar); + } + } + else + { + for (int i = 0; i < strChars.Length; i++) + { + char charValue = (char)Int32.Parse(strChars[i], NumberStyles.HexNumber); + charArray.Add(charValue); + } + } + + return charArray; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections; + using System.Diagnostics; + using System.Globalization; + using System.Runtime.InteropServices; + using System.Text; + using Microsoft.Win32; + using WixToolset.Data; + using WixToolset.Harvesters.Data; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// Harvest WiX authoring from the registry. + /// + public sealed class RegistryHarvester : IDisposable + { + private const string HKCRPathInHKLM = @"Software\Classes"; + private string remappedPath; + private static readonly int majorOSVersion = Environment.OSVersion.Version.Major; + private RegistryKey regKeyToOverride = Registry.LocalMachine; + private IntPtr regRootToOverride = NativeMethods.HkeyLocalMachine; + + /// + /// Instantiate a new RegistryHarvester. + /// + /// Set to true to remap the entire registry to a private location for this process. + public RegistryHarvester(bool remap) + { + // Detect OS major version and set the hive to use when + // redirecting registry writes. We want to redirect registry + // writes to HKCU on Windows Vista and higher to avoid UAC + // problems, and to HKLM on downlevel OS's. + if (majorOSVersion >= 6) + { + this.regKeyToOverride = Registry.CurrentUser; + this.regRootToOverride = NativeMethods.HkeyCurrentUser; + } + + // create a path in the registry for redirected keys which is process-specific + if (remap) + { + this.remappedPath = String.Concat(@"SOFTWARE\WiX\heat\", Process.GetCurrentProcess().Id.ToString(CultureInfo.InvariantCulture)); + + // remove the previous remapped key if it exists + this.RemoveRemappedKey(); + + // remap the registry roots supported by MSI + // note - order is important here - the hive being used to redirect + // to must be overridden last to avoid creating the other override + // hives in the wrong location in the registry. For example, if HKLM is + // the redirect destination, overriding it first will cause other hives + // to be overridden under HKLM\Software\WiX\heat\HKLM\Software\WiX\HKCR + // instead of under HKLM\Software\WiX\heat\HKCR + if (majorOSVersion < 6) + { + this.RemapRegistryKey(NativeMethods.HkeyClassesRoot, String.Concat(this.remappedPath, @"\\HKEY_CLASSES_ROOT")); + this.RemapRegistryKey(NativeMethods.HkeyCurrentUser, String.Concat(this.remappedPath, @"\\HKEY_CURRENT_USER")); + this.RemapRegistryKey(NativeMethods.HkeyUsers, String.Concat(this.remappedPath, @"\\HKEY_USERS")); + this.RemapRegistryKey(NativeMethods.HkeyLocalMachine, String.Concat(this.remappedPath, @"\\HKEY_LOCAL_MACHINE")); + } + else + { + this.RemapRegistryKey(NativeMethods.HkeyClassesRoot, String.Concat(this.remappedPath, @"\\HKEY_CLASSES_ROOT")); + this.RemapRegistryKey(NativeMethods.HkeyLocalMachine, String.Concat(this.remappedPath, @"\\HKEY_LOCAL_MACHINE")); + this.RemapRegistryKey(NativeMethods.HkeyUsers, String.Concat(this.remappedPath, @"\\HKEY_USERS")); + this.RemapRegistryKey(NativeMethods.HkeyCurrentUser, String.Concat(this.remappedPath, @"\\HKEY_CURRENT_USER")); + + // Typelib registration on Windows Vista requires that the key + // HKLM\Software\Classes exist, so add it to the remapped root + Registry.LocalMachine.CreateSubKey(HKCRPathInHKLM); + } + } + } + + /// + /// Close the RegistryHarvester and remove any remapped registry keys. + /// + public void Close() + { + // note - order is important here - we must quit overriding the hive + // being used to redirect first + if (majorOSVersion < 6) + { + NativeMethods.OverrideRegistryKey(NativeMethods.HkeyLocalMachine, IntPtr.Zero); + NativeMethods.OverrideRegistryKey(NativeMethods.HkeyClassesRoot, IntPtr.Zero); + NativeMethods.OverrideRegistryKey(NativeMethods.HkeyCurrentUser, IntPtr.Zero); + NativeMethods.OverrideRegistryKey(NativeMethods.HkeyUsers, IntPtr.Zero); + } + else + { + NativeMethods.OverrideRegistryKey(NativeMethods.HkeyCurrentUser, IntPtr.Zero); + NativeMethods.OverrideRegistryKey(NativeMethods.HkeyClassesRoot, IntPtr.Zero); + NativeMethods.OverrideRegistryKey(NativeMethods.HkeyLocalMachine, IntPtr.Zero); + NativeMethods.OverrideRegistryKey(NativeMethods.HkeyUsers, IntPtr.Zero); + } + + this.RemoveRemappedKey(); + } + + /// + /// Dispose the RegistryHarvester. + /// + public void Dispose() + { + this.Close(); + } + + /// + /// Harvest all registry roots supported by Windows Installer. + /// + /// The registry keys and values in the registry. + public Wix.RegistryValue[] HarvestRegistry() + { + ArrayList registryValues = new ArrayList(); + + this.HarvestRegistryKey(Registry.ClassesRoot, registryValues); + this.HarvestRegistryKey(Registry.CurrentUser, registryValues); + this.HarvestRegistryKey(Registry.LocalMachine, registryValues); + this.HarvestRegistryKey(Registry.Users, registryValues); + + return (Wix.RegistryValue[])registryValues.ToArray(typeof(Wix.RegistryValue)); + } + + /// + /// Harvest a registry key. + /// + /// The path of the registry key to harvest. + /// The registry keys and values under the key. + public Wix.RegistryValue[] HarvestRegistryKey(string path) + { + RegistryKey registryKey = null; + ArrayList registryValues = new ArrayList(); + + string[] parts = GetPathParts(path); + + try + { + switch (parts[0]) + { + case "HKEY_CLASSES_ROOT": + registryKey = Registry.ClassesRoot; + break; + case "HKEY_CURRENT_USER": + registryKey = Registry.CurrentUser; + break; + case "HKEY_LOCAL_MACHINE": + registryKey = Registry.LocalMachine; + break; + case "HKEY_USERS": + registryKey = Registry.Users; + break; + default: + // TODO: put a better exception here + throw new Exception(); + } + + if (1 < parts.Length) + { + registryKey = registryKey.OpenSubKey(parts[1]); + + if (null == registryKey) + { + throw new WixException(HarvesterErrors.UnableToOpenRegistryKey(parts[1])); + } + } + + this.HarvestRegistryKey(registryKey, registryValues); + } + finally + { + if (null != registryKey) + { + registryKey.Close(); + } + } + + return (Wix.RegistryValue[])registryValues.ToArray(typeof(Wix.RegistryValue)); + } + + /// + /// Gets the parts of a registry key's path. + /// + /// The registry key path. + /// The root and key parts of the registry key path. + private static string[] GetPathParts(string path) + { + return path.Split(@"\".ToCharArray(), 2); + } + + /// + /// Harvest a registry key. + /// + /// The registry key to harvest. + /// The collected registry values. + private void HarvestRegistryKey(RegistryKey registryKey, ArrayList registryValues) + { + // harvest the sub-keys + foreach (string subKeyName in registryKey.GetSubKeyNames()) + { + using (RegistryKey subKey = registryKey.OpenSubKey(subKeyName)) + { + this.HarvestRegistryKey(subKey, registryValues); + } + } + + string[] parts = GetPathParts(registryKey.Name); + + Wix.RegistryRootType root; + switch (parts[0]) + { + case "HKEY_CLASSES_ROOT": + root = Wix.RegistryRootType.HKCR; + break; + case "HKEY_CURRENT_USER": + root = Wix.RegistryRootType.HKCU; + break; + case "HKEY_LOCAL_MACHINE": + // HKLM\Software\Classes is equivalent to HKCR + if (1 < parts.Length && parts[1].StartsWith(HKCRPathInHKLM, StringComparison.OrdinalIgnoreCase)) + { + root = Wix.RegistryRootType.HKCR; + parts[1] = parts[1].Remove(0, HKCRPathInHKLM.Length); + + if (0 < parts[1].Length) + { + parts[1] = parts[1].TrimStart('\\'); + } + + if (String.IsNullOrEmpty(parts[1])) + { + parts = new [] { parts[0] }; + } + } + else + { + root = Wix.RegistryRootType.HKLM; + } + break; + case "HKEY_USERS": + root = Wix.RegistryRootType.HKU; + break; + default: + // TODO: put a better exception here + throw new Exception(); + } + + // harvest the values + foreach (string valueName in registryKey.GetValueNames()) + { + Wix.RegistryValue registryValue = new Wix.RegistryValue(); + + registryValue.Action = Wix.RegistryValue.ActionType.write; + + registryValue.Root = root; + + if (1 < parts.Length) + { + registryValue.Key = parts[1]; + } + + if (null != valueName && 0 < valueName.Length) + { + registryValue.Name = valueName; + } + + object value = registryKey.GetValue(valueName); + + if (value is byte[]) // binary + { + StringBuilder hexadecimalValue = new StringBuilder(); + + // convert the byte array to hexadecimal + foreach (byte byteValue in (byte[])value) + { + hexadecimalValue.Append(byteValue.ToString("X2", CultureInfo.InvariantCulture.NumberFormat)); + } + + registryValue.Type = Wix.RegistryValue.TypeType.binary; + registryValue.Value = hexadecimalValue.ToString(); + } + else if (value is int) // integer + { + registryValue.Type = Wix.RegistryValue.TypeType.integer; + registryValue.Value = ((int)value).ToString(CultureInfo.InvariantCulture); + } + else if (value is string[]) // multi-string + { + registryValue.Type = Wix.RegistryValue.TypeType.multiString; + + if (0 == ((string[])value).Length) + { + Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); + + multiStringValue.Content = String.Empty; + + registryValue.AddChild(multiStringValue); + } + else + { + foreach (string multiStringValueContent in (string[])value) + { + Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); + + multiStringValue.Content = multiStringValueContent; + + registryValue.AddChild(multiStringValue); + } + } + } + else if (value is string) // string, expandable (there is no way to differentiate a string and expandable value in .NET 1.1) + { + registryValue.Type = Wix.RegistryValue.TypeType.@string; + registryValue.Value = (string)value; + } + else + { + // TODO: put a better exception here + throw new Exception(); + } + + registryValues.Add(registryValue); + } + + // If there were no subkeys and no values, we still need an element for this empty registry key. + // But specifically avoid SOFTWARE\Classes because it shouldn't be harvested as an empty key. + if (parts.Length > 1 && registryKey.SubKeyCount == 0 && registryKey.ValueCount == 0 && + !String.Equals(parts[1], HKCRPathInHKLM, StringComparison.OrdinalIgnoreCase)) + { + Wix.RegistryValue emptyRegistryKey = new Wix.RegistryValue(); + emptyRegistryKey.Root = root; + emptyRegistryKey.Key = parts[1]; + emptyRegistryKey.Type = Wix.RegistryValue.TypeType.@string; + emptyRegistryKey.Value = String.Empty; + emptyRegistryKey.Action = Wix.RegistryValue.ActionType.write; + registryValues.Add(emptyRegistryKey); + } + } + + /// + /// Remap a registry key to an alternative location. + /// + /// The registry key to remap. + /// The path to remap the registry key to under HKLM. + private void RemapRegistryKey(IntPtr registryKey, string remappedPath) + { + IntPtr remappedKey = IntPtr.Zero; + + try + { + remappedKey = NativeMethods.OpenRegistryKey(this.regRootToOverride, remappedPath); + + NativeMethods.OverrideRegistryKey(registryKey, remappedKey); + } + finally + { + if (IntPtr.Zero != remappedKey) + { + NativeMethods.CloseRegistryKey(remappedKey); + } + } + } + + /// + /// Remove the remapped registry key. + /// + private void RemoveRemappedKey() + { + try + { + this.regKeyToOverride.DeleteSubKeyTree(this.remappedPath); + } + catch (ArgumentException) + { + // ignore the error where the key does not exist + } + } + + /// + /// The native methods for re-mapping registry keys. + /// + private sealed class NativeMethods + { + internal static readonly IntPtr HkeyClassesRoot = (IntPtr)unchecked((Int32)0x80000000); + internal static readonly IntPtr HkeyCurrentUser = (IntPtr)unchecked((Int32)0x80000001); + internal static readonly IntPtr HkeyLocalMachine = (IntPtr)unchecked((Int32)0x80000002); + internal static readonly IntPtr HkeyUsers = (IntPtr)unchecked((Int32)0x80000003); + + private const uint GenericRead = 0x80000000; + private const uint GenericWrite = 0x40000000; + private const uint GenericExecute = 0x20000000; + private const uint GenericAll = 0x10000000; + private const uint StandardRightsAll = 0x001F0000; + + /// + /// Opens a registry key. + /// + /// Base key to open. + /// Path to subkey to open. + /// Handle to new key. + internal static IntPtr OpenRegistryKey(IntPtr key, string path) + { + IntPtr newKey = IntPtr.Zero; + uint disposition = 0; + uint sam = StandardRightsAll | GenericRead | GenericWrite | GenericExecute | GenericAll; + + if (0 != RegCreateKeyEx(key, path, 0, null, 0, sam, 0, out newKey, out disposition)) + { + throw new Exception(); + } + + return newKey; + } + + /// + /// Closes a previously open registry key. + /// + /// Handle to key to close. + internal static void CloseRegistryKey(IntPtr key) + { + if (0 != RegCloseKey(key)) + { + throw new Exception(); + } + } + + /// + /// Override a registry key. + /// + /// Handle of the key to override. + /// Handle to override key. + internal static void OverrideRegistryKey(IntPtr key, IntPtr newKey) + { + if (0 != RegOverridePredefKey(key, newKey)) + { + throw new Exception(); + } + } + + /// + /// Interop to RegCreateKeyW. + /// + /// Handle to base key. + /// Subkey to create. + /// Always 0 + /// Just pass null. + /// Just pass 0. + /// Rights to registry key. + /// Just pass null. + /// Opened key. + /// Whether key was opened or created. + /// Handle to registry key. + [DllImport("advapi32.dll", EntryPoint = "RegCreateKeyExW", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] + 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); + + /// + /// Interop to RegCloseKey. + /// + /// Handle to key to close. + /// 0 if success. + [DllImport("advapi32.dll", EntryPoint = "RegCloseKey", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] + private static extern int RegCloseKey(IntPtr key); + + /// + /// Interop to RegOverridePredefKey. + /// + /// Handle to key to override. + /// Handle to override key. + /// 0 if success. + [DllImport("advapi32.dll", EntryPoint = "RegOverridePredefKey", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] + private static extern int RegOverridePredefKey(IntPtr key, IntPtr newKey); + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Serialize +{ + using System; + using System.Collections; + using System.Xml; + + /// + /// Interface for generated schema elements. + /// + public interface ISchemaElement + { + /// + /// Gets and sets the parent of this element. May be null. + /// + /// An ISchemaElement that has this element as a child. + ISchemaElement ParentElement + { + get; + set; + } + + /// + /// Outputs xml representing this element, including the associated attributes + /// and any nested elements. + /// + /// XmlWriter to be used when outputting the element. + void OutputXml(XmlWriter writer); + } + + /// + /// Interface for generated schema elements. Implemented by elements that have child + /// elements. + /// + public interface IParentElement + { + /// + /// Gets an enumerable collection of the children of this element. + /// + /// An enumerable collection of the children of this element. + IEnumerable Children + { + get; + } + + /// + /// Gets an enumerable collection of the children of this element, filtered + /// by the passed in type. + /// + /// The type of children to retrieve. + IEnumerable this[Type childType] + { + get; + } + + /// + /// Adds a child to this element. + /// + /// Child to add. + void AddChild(ISchemaElement child); + + /// + /// Removes a child from this element. + /// + /// Child to remove. + void RemoveChild(ISchemaElement child); + } + + /// + /// Interface for generated schema elements. Implemented by classes with attributes. + /// + public interface ISetAttributes + { + /// + /// Sets the attribute with the given name to the given value. The value here is + /// a string, and is converted to the strongly-typed version inside this method. + /// + /// The name of the attribute to set. + /// The value to assign to the attribute. + void SetAttribute(string name, string value); + } + + /// + /// Interface for generated schema elements. Implemented by classes with children. + /// + public interface ICreateChildren + { + /// + /// Creates an instance of the child with the passed in name. + /// + /// String matching the element name of the child when represented in XML. + /// An instance of that child. + ISchemaElement CreateChild(string childName); + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Serialize +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Globalization; + using System.Reflection; + using System.Xml; + using WixToolset.Harvesters.Extensibility.Serialize; + + /// + /// Class used for reading XML files in to the CodeDom. + /// + public class CodeDomReader + { + private Assembly[] assemblies; + + /// + /// Creates a new CodeDomReader, using the current assembly. + /// + public CodeDomReader() + { + this.assemblies = new Assembly[] { Assembly.GetExecutingAssembly() }; + } + + /// + /// Creates a new CodeDomReader, and takes in a list of assemblies in which to + /// look for elements. + /// + /// Assemblies in which to look for types that correspond + /// to elements. + public CodeDomReader(Assembly[] assemblies) + { + this.assemblies = assemblies; + } + + /// + /// Loads an XML file into a strongly-typed code dom. + /// + /// File to load into the code dom. + /// The strongly-typed object at the root of the tree. + [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")] + public ISchemaElement Load(string filePath) + { + XmlDocument document = new XmlDocument(); + document.Load(filePath); + ISchemaElement schemaElement = null; + + foreach (XmlNode node in document.ChildNodes) + { + XmlElement element = node as XmlElement; + if (element != null) + { + if (schemaElement != null) + { + throw new InvalidOperationException(WixHarvesterStrings.EXP_MultipleRootElementsFoundInFile); + } + + schemaElement = this.CreateObjectFromElement(element); + this.ParseObjectFromElement(schemaElement, element); + } + } + return schemaElement; + } + + /// + /// Sets an attribute on an ISchemaElement. + /// + /// Schema element to set attribute on. + /// Name of the attribute to set. + /// Value to set on the attribute. + [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")] + private static void SetAttributeOnObject(ISchemaElement schemaElement, string name, string value) + { + ISetAttributes setAttributes = schemaElement as ISetAttributes; + if (setAttributes == null) + { + throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixHarvesterStrings.EXP_ISchemaElementDoesnotImplementISetAttribute, schemaElement.GetType().FullName)); + } + else + { + setAttributes.SetAttribute(name, value); + } + } + + /// + /// Parses an ISchemaElement from the XmlElement. + /// + /// ISchemaElement to fill in. + /// XmlElement to parse from. + [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")] + private void ParseObjectFromElement(ISchemaElement schemaElement, XmlElement element) + { + foreach (XmlAttribute attribute in element.Attributes) + { + SetAttributeOnObject(schemaElement, attribute.LocalName, attribute.Value); + } + + foreach (XmlNode node in element.ChildNodes) + { + XmlElement childElement = node as XmlElement; + if (childElement != null) + { + ISchemaElement childSchemaElement = null; + ICreateChildren createChildren = schemaElement as ICreateChildren; + if (createChildren == null) + { + throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixHarvesterStrings.EXP_ISchemaElementDoesnotImplementICreateChildren, element.LocalName)); + } + else + { + childSchemaElement = createChildren.CreateChild(childElement.LocalName); + } + + if (childSchemaElement == null) + { + childSchemaElement = this.CreateObjectFromElement(childElement); + if (childSchemaElement == null) + { + throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixHarvesterStrings.EXP_XmlElementDoesnotHaveISchemaElement, childElement.LocalName)); + } + } + + this.ParseObjectFromElement(childSchemaElement, childElement); + IParentElement parentElement = (IParentElement)schemaElement; + parentElement.AddChild(childSchemaElement); + } + else + { + XmlText childText = node as XmlText; + if (childText != null) + { + SetAttributeOnObject(schemaElement, "Content", childText.Value); + } + } + } + } + + /// + /// Creates an object from an XML element by digging through the assembly list. + /// + /// XML Element to create an ISchemaElement from. + /// A constructed ISchemaElement. + private ISchemaElement CreateObjectFromElement(XmlElement element) + { + ISchemaElement schemaElement = null; + foreach (Assembly assembly in this.assemblies) + { + foreach (Type type in assembly.GetTypes()) + { + if (type.FullName.EndsWith(element.LocalName, StringComparison.Ordinal) + && typeof(ISchemaElement).IsAssignableFrom(type)) + { + schemaElement = (ISchemaElement)Activator.CreateInstance(type); + } + } + } + return schemaElement; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters.Serialize +{ + using System; + using System.Collections; + using System.Globalization; + using WixToolset.Harvesters.Extensibility.Serialize; + + /// + /// Collection used in the CodeDOM for the children of a given element. Provides type-checking + /// on the allowed children to ensure that only allowed types are added. + /// + public class ElementCollection : ICollection, IEnumerable + { + private CollectionType collectionType; + private int totalContainedItems; + private int containersUsed; + private ArrayList items; + + /// + /// Creates a new element collection. + /// + /// Type of the collection to create. + public ElementCollection(CollectionType collectionType) + { + this.collectionType = collectionType; + this.items = new ArrayList(); + } + + /// + /// Enum representing types of XML collections. + /// + public enum CollectionType + { + /// + /// A choice type, corresponding to the XSD choice element. + /// + Choice, + + /// + /// A sequence type, corresponding to the XSD sequence element. + /// + Sequence + } + + /// + /// Gets the type of collection. + /// + /// The type of collection. + public CollectionType Type + { + get { return this.collectionType; } + } + + /// + /// Gets the count of child elements in this collection (counts ISchemaElements, not nested collections). + /// + /// The count of child elements in this collection (counts ISchemaElements, not nested collections). + public int Count + { + get { return this.totalContainedItems; } + } + + /// + /// Gets the flag specifying whether this collection is synchronized. Always returns false. + /// + /// The flag specifying whether this collection is synchronized. Always returns false. + public bool IsSynchronized + { + get { return false; } + } + + /// + /// Gets an object external callers can synchronize on. + /// + /// An object external callers can synchronize on. + public object SyncRoot + { + get { return this; } + } + + /// + /// Adds a child element to this collection. + /// + /// The element to add. + /// Thrown if the child is not of an allowed type. + public void AddElement(ISchemaElement element) + { + foreach (object obj in this.items) + { + bool containerUsed; + + CollectionItem collectionItem = obj as CollectionItem; + if (collectionItem != null) + { + containerUsed = collectionItem.Elements.Count != 0; + if (collectionItem.ElementType.IsAssignableFrom(element.GetType())) + { + collectionItem.AddElement(element); + + if (!containerUsed) + { + this.containersUsed++; + } + + this.totalContainedItems++; + return; + } + + continue; + } + + ElementCollection collection = obj as ElementCollection; + if (collection != null) + { + containerUsed = collection.Count != 0; + + try + { + collection.AddElement(element); + + if (!containerUsed) + { + this.containersUsed++; + } + + this.totalContainedItems++; + return; + } + catch (ArgumentException) + { + // Eat the exception and keep looking. We'll throw our own if we can't find its home. + } + + continue; + } + } + + throw new ArgumentException(String.Format( + CultureInfo.InvariantCulture, + WixHarvesterStrings.EXP_ElementOfTypeIsNotValidForThisCollection, + element.GetType().Name)); + } + + /// + /// Removes a child element from this collection. + /// + /// The element to remove. + /// Thrown if the element is not of an allowed type. + public void RemoveElement(ISchemaElement element) + { + foreach (object obj in this.items) + { + CollectionItem collectionItem = obj as CollectionItem; + if (collectionItem != null) + { + if (collectionItem.ElementType.IsAssignableFrom(element.GetType())) + { + if (collectionItem.Elements.Count == 0) + { + return; + } + + collectionItem.RemoveElement(element); + + if (collectionItem.Elements.Count == 0) + { + this.containersUsed--; + } + + this.totalContainedItems--; + return; + } + + continue; + } + + ElementCollection collection = obj as ElementCollection; + if (collection != null) + { + if (collection.Count == 0) + { + continue; + } + + try + { + collection.RemoveElement(element); + + if (collection.Count == 0) + { + this.containersUsed--; + } + + this.totalContainedItems--; + return; + } + catch (ArgumentException) + { + // Eat the exception and keep looking. We'll throw our own if we can't find its home. + } + + continue; + } + } + + throw new ArgumentException(String.Format( + CultureInfo.InvariantCulture, + WixHarvesterStrings.EXP_ElementOfTypeIsNotValidForThisCollection, + element.GetType().Name)); + } + + /// + /// Copies this collection to an array. + /// + /// Array to copy to. + /// Offset into the array. + public void CopyTo(Array array, int index) + { + int item = 0; + foreach (ISchemaElement element in this) + { + array.SetValue(element, (long)(item + index)); + item++; + } + } + + /// + /// Creates an enumerator for walking the elements in this collection. + /// + /// A newly created enumerator. + public IEnumerator GetEnumerator() + { + return new ElementCollectionEnumerator(this); + } + + /// + /// Gets an enumerable collection of children of a given type. + /// + /// Type of children to get. + /// A collection of children. + /// Thrown if the type isn't a valid child type. + public IEnumerable Filter(Type childType) + { + foreach (object container in this.items) + { + CollectionItem collectionItem = container as CollectionItem; + if (collectionItem != null) + { + if (collectionItem.ElementType.IsAssignableFrom(childType)) + { + return collectionItem.Elements; + } + + continue; + } + + ElementCollection elementCollection = container as ElementCollection; + if (elementCollection != null) + { + IEnumerable nestedFilter = elementCollection.Filter(childType); + if (nestedFilter != null) + { + return nestedFilter; + } + + continue; + } + } + + throw new ArgumentException(String.Format( + CultureInfo.InvariantCulture, + WixHarvesterStrings.EXP_TypeIsNotValidForThisCollection, + childType.Name)); + } + + /// + /// Adds a type to this collection. + /// + /// CollectionItem representing the type to add. + public void AddItem(CollectionItem collectionItem) + { + this.items.Add(collectionItem); + } + + /// + /// Adds a nested collection to this collection. + /// + /// ElementCollection to add. + public void AddCollection(ElementCollection collection) + { + this.items.Add(collection); + } + + /// + /// Class used to represent a given type in the child collection of an element. Abstract, + /// has subclasses for choice and sequence (which can do cardinality checks). + /// + public abstract class CollectionItem + { + private Type elementType; + private ArrayList elements; + + /// + /// Creates a new CollectionItem for the given element type. + /// + /// Type of the element for this collection item. + protected CollectionItem(Type elementType) + { + this.elementType = elementType; + this.elements = new ArrayList(); + } + + /// + /// Gets the type of this collection's items. + /// + /// The type of this collection's items. + public Type ElementType + { + get { return this.elementType; } + } + + /// + /// Gets the elements of this collection. + /// + /// The elements of this collection. + public ArrayList Elements + { + get { return this.elements; } + } + + /// + /// Adds an element to this collection. Must be of an assignable type to the collection's + /// type. + /// + /// The element to add. + /// Thrown if the type isn't assignable to the collection's type. + public void AddElement(ISchemaElement element) + { + if (!this.elementType.IsAssignableFrom(element.GetType())) + { + throw new ArgumentException( + String.Format( + CultureInfo.InvariantCulture, + WixHarvesterStrings.EXP_ElementIsSubclassOfDifferentType, + this.elementType.Name, + element.GetType().Name), + "element"); + } + + this.elements.Add(element); + } + + /// + /// Removes an element from this collection. + /// + /// The element to remove. + /// Thrown if the element's type isn't assignable to the collection's type. + public void RemoveElement(ISchemaElement element) + { + if (!this.elementType.IsAssignableFrom(element.GetType())) + { + throw new ArgumentException( + String.Format( + CultureInfo.InvariantCulture, + WixHarvesterStrings.EXP_ElementIsSubclassOfDifferentType, + this.elementType.Name, + element.GetType().Name), + "element"); + } + + this.elements.Remove(element); + } + } + + /// + /// Class representing a choice item. Doesn't do cardinality checks. + /// + public class ChoiceItem : CollectionItem + { + /// + /// Creates a new choice item. + /// + /// Type of the created item. + public ChoiceItem(Type elementType) + : base(elementType) + { + } + } + + /// + /// Class representing a sequence item. Can do cardinality checks, if required. + /// + public class SequenceItem : CollectionItem + { + /// + /// Creates a new sequence item. + /// + /// Type of the created item. + public SequenceItem(Type elementType) + : base(elementType) + { + } + } + + /// + /// Enumerator for the ElementCollection. + /// + private class ElementCollectionEnumerator : IEnumerator + { + private ElementCollection collection; + private Stack collectionStack; + + /// + /// Creates a new ElementCollectionEnumerator. + /// + /// The collection to create an enumerator for. + public ElementCollectionEnumerator(ElementCollection collection) + { + this.collection = collection; + } + + /// + /// Gets the current object from the enumerator. + /// + public object Current + { + get + { + if (this.collectionStack != null && this.collectionStack.Count > 0) + { + CollectionSymbol symbol = (CollectionSymbol)this.collectionStack.Peek(); + object container = symbol.Collection.items[symbol.ContainerIndex]; + + CollectionItem collectionItem = container as CollectionItem; + if (collectionItem != null) + { + return collectionItem.Elements[symbol.ItemIndex]; + } + + throw new InvalidOperationException(String.Format( + CultureInfo.InvariantCulture, + WixHarvesterStrings.EXP_ElementMustBeChoiceItemOrSequenceItem, + container.GetType().Name)); + } + + return null; + } + } + + /// + /// Resets the enumerator to the beginning. + /// + public void Reset() + { + if (this.collectionStack != null) + { + this.collectionStack.Clear(); + this.collectionStack = null; + } + } + + /// + /// Moves the enumerator to the next item. + /// + /// True if there is a next item, false otherwise. + public bool MoveNext() + { + if (this.collectionStack == null) + { + if (this.collection.Count == 0) + { + return false; + } + + this.collectionStack = new Stack(); + this.collectionStack.Push(new CollectionSymbol(this.collection)); + } + + CollectionSymbol symbol = (CollectionSymbol)this.collectionStack.Peek(); + + if (this.FindNext(symbol)) + { + return true; + } + + this.collectionStack.Pop(); + if (this.collectionStack.Count == 0) + { + return false; + } + + return this.MoveNext(); + } + + /// + /// Pushes a collection onto the stack. + /// + /// The collection to push. + private void PushCollection(ElementCollection elementCollection) + { + if (elementCollection.Count <= 0) + { + throw new ArgumentException(String.Format( + CultureInfo.InvariantCulture, + WixHarvesterStrings.EXP_CollectionMustHaveAtLeastOneElement, + elementCollection.Count)); + } + + CollectionSymbol symbol = new CollectionSymbol(elementCollection); + this.collectionStack.Push(symbol); + this.FindNext(symbol); + } + + /// + /// Finds the next item from a given symbol. + /// + /// The symbol to start looking from. + /// True if a next element is found, false otherwise. + private bool FindNext(CollectionSymbol symbol) + { + object container = symbol.Collection.items[symbol.ContainerIndex]; + + CollectionItem collectionItem = container as CollectionItem; + if (collectionItem != null) + { + if (symbol.ItemIndex + 1 < collectionItem.Elements.Count) + { + symbol.ItemIndex++; + return true; + } + } + + ElementCollection elementCollection = container as ElementCollection; + if (elementCollection != null && elementCollection.Count > 0 && symbol.ItemIndex == -1) + { + symbol.ItemIndex++; + this.PushCollection(elementCollection); + return true; + } + + symbol.ItemIndex = 0; + + for (int i = symbol.ContainerIndex + 1; i < symbol.Collection.items.Count; ++i) + { + object nestedContainer = symbol.Collection.items[i]; + + CollectionItem nestedCollectionItem = nestedContainer as CollectionItem; + if (nestedCollectionItem != null) + { + if (nestedCollectionItem.Elements.Count > 0) + { + symbol.ContainerIndex = i; + return true; + } + } + + ElementCollection nestedElementCollection = nestedContainer as ElementCollection; + if (nestedElementCollection != null && nestedElementCollection.Count > 0) + { + symbol.ContainerIndex = i; + this.PushCollection(nestedElementCollection); + return true; + } + } + + return false; + } + + /// + /// Class representing a single point in the collection. Consists of an ElementCollection, + /// a container index, and an index into the container. + /// + private class CollectionSymbol + { + private ElementCollection collection; + private int containerIndex; + private int itemIndex = -1; + + /// + /// Creates a new CollectionSymbol. + /// + /// The collection for the symbol. + public CollectionSymbol(ElementCollection collection) + { + this.collection = collection; + } + + /// + /// Gets the collection for the symbol. + /// + public ElementCollection Collection + { + get { return this.collection; } + } + + /// + /// Gets and sets the index of the container in the collection. + /// + public int ContainerIndex + { + get { return this.containerIndex; } + set { this.containerIndex = value; } + } + + /// + /// Gets and sets the index of the item in the container. + /// + public int ItemIndex + { + get { return this.itemIndex; } + set { this.itemIndex = value; } + } + } + } + } +} 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 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WixToolset.Harvesters.Extensibility.Serialize { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class WixHarvesterStrings { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal WixHarvesterStrings() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("heat.Serialize.WixHarvesterStrings", typeof(WixHarvesterStrings).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Collection has {0} elements. Must have at least one.. + /// + internal static string EXP_CollectionMustHaveAtLeastOneElement { + get { + return ResourceManager.GetString("EXP_CollectionMustHaveAtLeastOneElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Element must be a subclass of {0}, but was of type {1}.. + /// + internal static string EXP_ElementIsSubclassOfDifferentType { + get { + return ResourceManager.GetString("EXP_ElementIsSubclassOfDifferentType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Element of type {0} found in enumerator. Must be ChoiceItem or SequenceItem.. + /// + internal static string EXP_ElementMustBeChoiceItemOrSequenceItem { + get { + return ResourceManager.GetString("EXP_ElementMustBeChoiceItemOrSequenceItem", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Element of type {0} is not valid for this collection.. + /// + internal static string EXP_ElementOfTypeIsNotValidForThisCollection { + get { + return ResourceManager.GetString("EXP_ElementOfTypeIsNotValidForThisCollection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ISchemaElement with name {0} does not implement ICreateChildren.. + /// + internal static string EXP_ISchemaElementDoesnotImplementICreateChildren { + get { + return ResourceManager.GetString("EXP_ISchemaElementDoesnotImplementICreateChildren", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ISchemaElement with name {0} does not implement ISetAttributes.. + /// + internal static string EXP_ISchemaElementDoesnotImplementISetAttribute { + get { + return ResourceManager.GetString("EXP_ISchemaElementDoesnotImplementISetAttribute", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A Merge table FileCompression column contains an invalid value '{0}'.. + /// + internal static string EXP_MergeTableFileCompressionColumnContainsInvalidValue { + get { + return ResourceManager.GetString("EXP_MergeTableFileCompressionColumnContainsInvalidValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple root elements found in file.. + /// + internal static string EXP_MultipleRootElementsFoundInFile { + get { + return ResourceManager.GetString("EXP_MultipleRootElementsFoundInFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type {0} is not valid for this collection.. + /// + internal static string EXP_TypeIsNotValidForThisCollection { + get { + return ResourceManager.GetString("EXP_TypeIsNotValidForThisCollection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to XmlElement with name {0} does not have a corresponding ISchemaElement.. + /// + internal static string EXP_XmlElementDoesnotHaveISchemaElement { + get { + return ResourceManager.GetString("EXP_XmlElementDoesnotHaveISchemaElement", resourceCulture); + } + } + } +} 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + A Merge table FileCompression column contains an invalid value '{0}'. + + + Multiple root elements found in file. + + + ISchemaElement with name {0} does not implement ICreateChildren. + + + ISchemaElement with name {0} does not implement ISetAttributes. + + + XmlElement with name {0} does not have a corresponding ISchemaElement. + + + Element of type {0} is not valid for this collection. + + + Type {0} is not valid for this collection. + + + Collection has {0} elements. Must have at least one. + + + Element must be a subclass of {0}, but was of type {1}. + + + Element of type {0} found in enumerator. Must be ChoiceItem or SequenceItem. + + \ 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 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 +namespace WixToolset.Harvesters.Serialize.IIs +{ + using System; + using System.CodeDom.Compiler; + using System.Collections; + using System.Diagnostics.CodeAnalysis; + using System.Globalization; + using System.Xml; + using WixToolset.Harvesters.Serialize; + + + /// + /// Values of this type will either be "yes" or "no". + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum YesNoType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + no, + + yes, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public class Enums + { + + /// + /// Parses a YesNoType from a string. + /// + public static YesNoType ParseYesNoType(string value) + { + YesNoType parsedValue; + Enums.TryParseYesNoType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a YesNoType from a string. + /// + public static bool TryParseYesNoType(string value, out YesNoType parsedValue) + { + parsedValue = YesNoType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("no" == value)) + { + parsedValue = YesNoType.no; + } + else + { + if (("yes" == value)) + { + parsedValue = YesNoType.yes; + } + else + { + parsedValue = YesNoType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Parses a YesNoDefaultType from a string. + /// + public static YesNoDefaultType ParseYesNoDefaultType(string value) + { + YesNoDefaultType parsedValue; + Enums.TryParseYesNoDefaultType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a YesNoDefaultType from a string. + /// + public static bool TryParseYesNoDefaultType(string value, out YesNoDefaultType parsedValue) + { + parsedValue = YesNoDefaultType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("default" == value)) + { + parsedValue = YesNoDefaultType.@default; + } + else + { + if (("no" == value)) + { + parsedValue = YesNoDefaultType.no; + } + else + { + if (("yes" == value)) + { + parsedValue = YesNoDefaultType.yes; + } + else + { + parsedValue = YesNoDefaultType.IllegalValue; + return false; + } + } + } + return true; + } + } + + /// + /// Values of this type will either be "default", "yes", or "no". + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum YesNoDefaultType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + @default, + + no, + + yes, + } + + /// + /// 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. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebDirProperties : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private YesNoType readField; + + private bool readFieldSet; + + private YesNoType writeField; + + private bool writeFieldSet; + + private YesNoType scriptField; + + private bool scriptFieldSet; + + private YesNoType executeField; + + private bool executeFieldSet; + + private YesNoType anonymousAccessField; + + private bool anonymousAccessFieldSet; + + private string anonymousUserField; + + private bool anonymousUserFieldSet; + + private YesNoType iIsControlledPasswordField; + + private bool iIsControlledPasswordFieldSet; + + private YesNoType windowsAuthenticationField; + + private bool windowsAuthenticationFieldSet; + + private YesNoType digestAuthenticationField; + + private bool digestAuthenticationFieldSet; + + private YesNoType basicAuthenticationField; + + private bool basicAuthenticationFieldSet; + + private YesNoType passportAuthenticationField; + + private bool passportAuthenticationFieldSet; + + private YesNoType logVisitsField; + + private bool logVisitsFieldSet; + + private YesNoType indexField; + + private bool indexFieldSet; + + private string defaultDocumentsField; + + private bool defaultDocumentsFieldSet; + + private YesNoType aspDetailedErrorField; + + private bool aspDetailedErrorFieldSet; + + private string httpExpiresField; + + private bool httpExpiresFieldSet; + + private long cacheControlMaxAgeField; + + private bool cacheControlMaxAgeFieldSet; + + private string cacheControlCustomField; + + private bool cacheControlCustomFieldSet; + + private YesNoType clearCustomErrorField; + + private bool clearCustomErrorFieldSet; + + private YesNoType accessSSLField; + + private bool accessSSLFieldSet; + + private YesNoType accessSSL128Field; + + private bool accessSSL128FieldSet; + + private YesNoType accessSSLMapCertField; + + private bool accessSSLMapCertFieldSet; + + private YesNoType accessSSLNegotiateCertField; + + private bool accessSSLNegotiateCertFieldSet; + + private YesNoType accessSSLRequireCertField; + + private bool accessSSLRequireCertFieldSet; + + private string authenticationProvidersField; + + private bool authenticationProvidersFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public YesNoType Read + { + get + { + return this.readField; + } + set + { + this.readFieldSet = true; + this.readField = value; + } + } + + public YesNoType Write + { + get + { + return this.writeField; + } + set + { + this.writeFieldSet = true; + this.writeField = value; + } + } + + public YesNoType Script + { + get + { + return this.scriptField; + } + set + { + this.scriptFieldSet = true; + this.scriptField = value; + } + } + + public YesNoType Execute + { + get + { + return this.executeField; + } + set + { + this.executeFieldSet = true; + this.executeField = value; + } + } + + /// + /// 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.' + /// + public YesNoType AnonymousAccess + { + get + { + return this.anonymousAccessField; + } + set + { + this.anonymousAccessFieldSet = true; + this.anonymousAccessField = value; + } + } + + /// + /// 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. + /// + public string AnonymousUser + { + get + { + return this.anonymousUserField; + } + set + { + this.anonymousUserFieldSet = true; + this.anonymousUserField = value; + } + } + + /// + /// Sets whether IIS should control the password used for the Windows account specified in the AnonymousUser attribute. Defaults to 'no.' + /// + public YesNoType IIsControlledPassword + { + get + { + return this.iIsControlledPasswordField; + } + set + { + this.iIsControlledPasswordFieldSet = true; + this.iIsControlledPasswordField = value; + } + } + + /// + /// Sets the Windows Authentication option, which enables integrated Windows authentication to be used on the site. Defaults to 'no.' + /// + public YesNoType WindowsAuthentication + { + get + { + return this.windowsAuthenticationField; + } + set + { + this.windowsAuthenticationFieldSet = true; + this.windowsAuthenticationField = value; + } + } + + /// + /// Sets the Digest Authentication option, which allows using digest authentication with domain user accounts. Defaults to 'no.' + /// + public YesNoType DigestAuthentication + { + get + { + return this.digestAuthenticationField; + } + set + { + this.digestAuthenticationFieldSet = true; + this.digestAuthenticationField = value; + } + } + + /// + /// Sets the Basic Authentication option, which allows clients to provide credentials in plaintext over the wire. Defaults to 'no.' + /// + public YesNoType BasicAuthentication + { + get + { + return this.basicAuthenticationField; + } + set + { + this.basicAuthenticationFieldSet = true; + this.basicAuthenticationField = value; + } + } + + /// + /// Sets the Passport Authentication option, which allows clients to provide credentials via a .Net Passport account. Defaults to 'no.' + /// + public YesNoType PassportAuthentication + { + get + { + return this.passportAuthenticationField; + } + set + { + this.passportAuthenticationFieldSet = true; + this.passportAuthenticationField = value; + } + } + + /// + /// Sets whether visits to this site should be logged. Defaults to 'no.' + /// + public YesNoType LogVisits + { + get + { + return this.logVisitsField; + } + set + { + this.logVisitsFieldSet = true; + this.logVisitsField = value; + } + } + + /// + /// Sets the Index Resource option, which specifies whether this web directory should be indexed. Defaults to 'no.' + /// + public YesNoType Index + { + get + { + return this.indexField; + } + set + { + this.indexFieldSet = true; + this.indexField = value; + } + } + + /// + /// The list of default documents to set for this web directory, in comma-delimited format. + /// + public string DefaultDocuments + { + get + { + return this.defaultDocumentsField; + } + set + { + this.defaultDocumentsFieldSet = true; + this.defaultDocumentsField = value; + } + } + + /// + /// Sets the option for whether to send detailed ASP errors back to the client on script error. Default is 'no.' + /// + public YesNoType AspDetailedError + { + get + { + return this.aspDetailedErrorField; + } + set + { + this.aspDetailedErrorFieldSet = true; + this.aspDetailedErrorField = value; + } + } + + /// + /// Value to set the HttpExpires attribute to for a Web Dir in the metabase. + /// + public string HttpExpires + { + get + { + return this.httpExpiresField; + } + set + { + this.httpExpiresFieldSet = true; + this.httpExpiresField = value; + } + } + + /// + /// Integer value specifying the cache control maximum age value. + /// + public long CacheControlMaxAge + { + get + { + return this.cacheControlMaxAgeField; + } + set + { + this.cacheControlMaxAgeFieldSet = true; + this.cacheControlMaxAgeField = value; + } + } + + /// + /// Custom HTTP 1.1 cache control directives. + /// + public string CacheControlCustom + { + get + { + return this.cacheControlCustomField; + } + set + { + this.cacheControlCustomFieldSet = true; + this.cacheControlCustomField = value; + } + } + + /// + /// Specifies whether IIs will return custom errors for this directory. + /// + public YesNoType ClearCustomError + { + get + { + return this.clearCustomErrorField; + } + set + { + this.clearCustomErrorFieldSet = true; + this.clearCustomErrorField = value; + } + } + + /// + /// 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. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public YesNoType AccessSSL + { + get + { + return this.accessSSLField; + } + set + { + this.accessSSLFieldSet = true; + this.accessSSLField = value; + } + } + + /// + /// 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. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public YesNoType AccessSSL128 + { + get + { + return this.accessSSL128Field; + } + set + { + this.accessSSL128FieldSet = true; + this.accessSSL128Field = value; + } + } + + /// + /// This corresponds to AccessSSLMapCert flag for AccessSSLFlags IIS metabase property. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public YesNoType AccessSSLMapCert + { + get + { + return this.accessSSLMapCertField; + } + set + { + this.accessSSLMapCertFieldSet = true; + this.accessSSLMapCertField = value; + } + } + + /// + /// This corresponds to AccessSSLNegotiateCert flag for AccessSSLFlags IIS metabase property. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public YesNoType AccessSSLNegotiateCert + { + get + { + return this.accessSSLNegotiateCertField; + } + set + { + this.accessSSLNegotiateCertFieldSet = true; + this.accessSSLNegotiateCertField = value; + } + } + + /// + /// This corresponds to AccessSSLRequireCert flag for AccessSSLFlags IIS metabase property. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public YesNoType AccessSSLRequireCert + { + get + { + return this.accessSSLRequireCertField; + } + set + { + this.accessSSLRequireCertFieldSet = true; + this.accessSSLRequireCertField = value; + } + } + + /// + /// Comma delimited list, in order of precedence, of Windows authentication providers that IIS will attempt to use: NTLM, Kerberos, Negotiate, and others. + /// + public string AuthenticationProviders + { + get + { + return this.authenticationProvidersField; + } + set + { + this.authenticationProvidersFieldSet = true; + this.authenticationProvidersField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebDirProperties", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.readFieldSet) + { + if ((this.readField == YesNoType.no)) + { + writer.WriteAttributeString("Read", "no"); + } + if ((this.readField == YesNoType.yes)) + { + writer.WriteAttributeString("Read", "yes"); + } + } + if (this.writeFieldSet) + { + if ((this.writeField == YesNoType.no)) + { + writer.WriteAttributeString("Write", "no"); + } + if ((this.writeField == YesNoType.yes)) + { + writer.WriteAttributeString("Write", "yes"); + } + } + if (this.scriptFieldSet) + { + if ((this.scriptField == YesNoType.no)) + { + writer.WriteAttributeString("Script", "no"); + } + if ((this.scriptField == YesNoType.yes)) + { + writer.WriteAttributeString("Script", "yes"); + } + } + if (this.executeFieldSet) + { + if ((this.executeField == YesNoType.no)) + { + writer.WriteAttributeString("Execute", "no"); + } + if ((this.executeField == YesNoType.yes)) + { + writer.WriteAttributeString("Execute", "yes"); + } + } + if (this.anonymousAccessFieldSet) + { + if ((this.anonymousAccessField == YesNoType.no)) + { + writer.WriteAttributeString("AnonymousAccess", "no"); + } + if ((this.anonymousAccessField == YesNoType.yes)) + { + writer.WriteAttributeString("AnonymousAccess", "yes"); + } + } + if (this.anonymousUserFieldSet) + { + writer.WriteAttributeString("AnonymousUser", this.anonymousUserField); + } + if (this.iIsControlledPasswordFieldSet) + { + if ((this.iIsControlledPasswordField == YesNoType.no)) + { + writer.WriteAttributeString("IIsControlledPassword", "no"); + } + if ((this.iIsControlledPasswordField == YesNoType.yes)) + { + writer.WriteAttributeString("IIsControlledPassword", "yes"); + } + } + if (this.windowsAuthenticationFieldSet) + { + if ((this.windowsAuthenticationField == YesNoType.no)) + { + writer.WriteAttributeString("WindowsAuthentication", "no"); + } + if ((this.windowsAuthenticationField == YesNoType.yes)) + { + writer.WriteAttributeString("WindowsAuthentication", "yes"); + } + } + if (this.digestAuthenticationFieldSet) + { + if ((this.digestAuthenticationField == YesNoType.no)) + { + writer.WriteAttributeString("DigestAuthentication", "no"); + } + if ((this.digestAuthenticationField == YesNoType.yes)) + { + writer.WriteAttributeString("DigestAuthentication", "yes"); + } + } + if (this.basicAuthenticationFieldSet) + { + if ((this.basicAuthenticationField == YesNoType.no)) + { + writer.WriteAttributeString("BasicAuthentication", "no"); + } + if ((this.basicAuthenticationField == YesNoType.yes)) + { + writer.WriteAttributeString("BasicAuthentication", "yes"); + } + } + if (this.passportAuthenticationFieldSet) + { + if ((this.passportAuthenticationField == YesNoType.no)) + { + writer.WriteAttributeString("PassportAuthentication", "no"); + } + if ((this.passportAuthenticationField == YesNoType.yes)) + { + writer.WriteAttributeString("PassportAuthentication", "yes"); + } + } + if (this.logVisitsFieldSet) + { + if ((this.logVisitsField == YesNoType.no)) + { + writer.WriteAttributeString("LogVisits", "no"); + } + if ((this.logVisitsField == YesNoType.yes)) + { + writer.WriteAttributeString("LogVisits", "yes"); + } + } + if (this.indexFieldSet) + { + if ((this.indexField == YesNoType.no)) + { + writer.WriteAttributeString("Index", "no"); + } + if ((this.indexField == YesNoType.yes)) + { + writer.WriteAttributeString("Index", "yes"); + } + } + if (this.defaultDocumentsFieldSet) + { + writer.WriteAttributeString("DefaultDocuments", this.defaultDocumentsField); + } + if (this.aspDetailedErrorFieldSet) + { + if ((this.aspDetailedErrorField == YesNoType.no)) + { + writer.WriteAttributeString("AspDetailedError", "no"); + } + if ((this.aspDetailedErrorField == YesNoType.yes)) + { + writer.WriteAttributeString("AspDetailedError", "yes"); + } + } + if (this.httpExpiresFieldSet) + { + writer.WriteAttributeString("HttpExpires", this.httpExpiresField); + } + if (this.cacheControlMaxAgeFieldSet) + { + writer.WriteAttributeString("CacheControlMaxAge", this.cacheControlMaxAgeField.ToString(CultureInfo.InvariantCulture)); + } + if (this.cacheControlCustomFieldSet) + { + writer.WriteAttributeString("CacheControlCustom", this.cacheControlCustomField); + } + if (this.clearCustomErrorFieldSet) + { + if ((this.clearCustomErrorField == YesNoType.no)) + { + writer.WriteAttributeString("ClearCustomError", "no"); + } + if ((this.clearCustomErrorField == YesNoType.yes)) + { + writer.WriteAttributeString("ClearCustomError", "yes"); + } + } + if (this.accessSSLFieldSet) + { + if ((this.accessSSLField == YesNoType.no)) + { + writer.WriteAttributeString("AccessSSL", "no"); + } + if ((this.accessSSLField == YesNoType.yes)) + { + writer.WriteAttributeString("AccessSSL", "yes"); + } + } + if (this.accessSSL128FieldSet) + { + if ((this.accessSSL128Field == YesNoType.no)) + { + writer.WriteAttributeString("AccessSSL128", "no"); + } + if ((this.accessSSL128Field == YesNoType.yes)) + { + writer.WriteAttributeString("AccessSSL128", "yes"); + } + } + if (this.accessSSLMapCertFieldSet) + { + if ((this.accessSSLMapCertField == YesNoType.no)) + { + writer.WriteAttributeString("AccessSSLMapCert", "no"); + } + if ((this.accessSSLMapCertField == YesNoType.yes)) + { + writer.WriteAttributeString("AccessSSLMapCert", "yes"); + } + } + if (this.accessSSLNegotiateCertFieldSet) + { + if ((this.accessSSLNegotiateCertField == YesNoType.no)) + { + writer.WriteAttributeString("AccessSSLNegotiateCert", "no"); + } + if ((this.accessSSLNegotiateCertField == YesNoType.yes)) + { + writer.WriteAttributeString("AccessSSLNegotiateCert", "yes"); + } + } + if (this.accessSSLRequireCertFieldSet) + { + if ((this.accessSSLRequireCertField == YesNoType.no)) + { + writer.WriteAttributeString("AccessSSLRequireCert", "no"); + } + if ((this.accessSSLRequireCertField == YesNoType.yes)) + { + writer.WriteAttributeString("AccessSSLRequireCert", "yes"); + } + } + if (this.authenticationProvidersFieldSet) + { + writer.WriteAttributeString("AuthenticationProviders", this.authenticationProvidersField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Read" == name)) + { + this.readField = Enums.ParseYesNoType(value); + this.readFieldSet = true; + } + if (("Write" == name)) + { + this.writeField = Enums.ParseYesNoType(value); + this.writeFieldSet = true; + } + if (("Script" == name)) + { + this.scriptField = Enums.ParseYesNoType(value); + this.scriptFieldSet = true; + } + if (("Execute" == name)) + { + this.executeField = Enums.ParseYesNoType(value); + this.executeFieldSet = true; + } + if (("AnonymousAccess" == name)) + { + this.anonymousAccessField = Enums.ParseYesNoType(value); + this.anonymousAccessFieldSet = true; + } + if (("AnonymousUser" == name)) + { + this.anonymousUserField = value; + this.anonymousUserFieldSet = true; + } + if (("IIsControlledPassword" == name)) + { + this.iIsControlledPasswordField = Enums.ParseYesNoType(value); + this.iIsControlledPasswordFieldSet = true; + } + if (("WindowsAuthentication" == name)) + { + this.windowsAuthenticationField = Enums.ParseYesNoType(value); + this.windowsAuthenticationFieldSet = true; + } + if (("DigestAuthentication" == name)) + { + this.digestAuthenticationField = Enums.ParseYesNoType(value); + this.digestAuthenticationFieldSet = true; + } + if (("BasicAuthentication" == name)) + { + this.basicAuthenticationField = Enums.ParseYesNoType(value); + this.basicAuthenticationFieldSet = true; + } + if (("PassportAuthentication" == name)) + { + this.passportAuthenticationField = Enums.ParseYesNoType(value); + this.passportAuthenticationFieldSet = true; + } + if (("LogVisits" == name)) + { + this.logVisitsField = Enums.ParseYesNoType(value); + this.logVisitsFieldSet = true; + } + if (("Index" == name)) + { + this.indexField = Enums.ParseYesNoType(value); + this.indexFieldSet = true; + } + if (("DefaultDocuments" == name)) + { + this.defaultDocumentsField = value; + this.defaultDocumentsFieldSet = true; + } + if (("AspDetailedError" == name)) + { + this.aspDetailedErrorField = Enums.ParseYesNoType(value); + this.aspDetailedErrorFieldSet = true; + } + if (("HttpExpires" == name)) + { + this.httpExpiresField = value; + this.httpExpiresFieldSet = true; + } + if (("CacheControlMaxAge" == name)) + { + this.cacheControlMaxAgeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.cacheControlMaxAgeFieldSet = true; + } + if (("CacheControlCustom" == name)) + { + this.cacheControlCustomField = value; + this.cacheControlCustomFieldSet = true; + } + if (("ClearCustomError" == name)) + { + this.clearCustomErrorField = Enums.ParseYesNoType(value); + this.clearCustomErrorFieldSet = true; + } + if (("AccessSSL" == name)) + { + this.accessSSLField = Enums.ParseYesNoType(value); + this.accessSSLFieldSet = true; + } + if (("AccessSSL128" == name)) + { + this.accessSSL128Field = Enums.ParseYesNoType(value); + this.accessSSL128FieldSet = true; + } + if (("AccessSSLMapCert" == name)) + { + this.accessSSLMapCertField = Enums.ParseYesNoType(value); + this.accessSSLMapCertFieldSet = true; + } + if (("AccessSSLNegotiateCert" == name)) + { + this.accessSSLNegotiateCertField = Enums.ParseYesNoType(value); + this.accessSSLNegotiateCertFieldSet = true; + } + if (("AccessSSLRequireCert" == name)) + { + this.accessSSLRequireCertField = Enums.ParseYesNoType(value); + this.accessSSLRequireCertFieldSet = true; + } + if (("AuthenticationProviders" == name)) + { + this.authenticationProvidersField = value; + this.authenticationProvidersFieldSet = true; + } + } + } + + /// + /// Custom Web Errors used by WebSites and Virtual Directories. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebError : ISchemaElement, ISetAttributes + { + + private int errorCodeField; + + private bool errorCodeFieldSet; + + private int subCodeField; + + private bool subCodeFieldSet; + + private string fileField; + + private bool fileFieldSet; + + private string uRLField; + + private bool uRLFieldSet; + + private ISchemaElement parentElement; + + /// + /// HTTP 1.1 error code. + /// + public int ErrorCode + { + get + { + return this.errorCodeField; + } + set + { + this.errorCodeFieldSet = true; + this.errorCodeField = value; + } + } + + /// + /// Error sub code. Set to 0 to get the wild card "*". + /// + public int SubCode + { + get + { + return this.subCodeField; + } + set + { + this.subCodeFieldSet = true; + this.subCodeField = value; + } + } + + /// + /// File to be sent to the client for this error code and sub code. This can be formatted. For example: [#FileId]. + /// + public string File + { + get + { + return this.fileField; + } + set + { + this.fileFieldSet = true; + this.fileField = value; + } + } + + /// + /// URL to be sent to the client for this error code and sub code. This can be formatted. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public string URL + { + get + { + return this.uRLField; + } + set + { + this.uRLFieldSet = true; + this.uRLField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebError", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.errorCodeFieldSet) + { + writer.WriteAttributeString("ErrorCode", this.errorCodeField.ToString(CultureInfo.InvariantCulture)); + } + if (this.subCodeFieldSet) + { + writer.WriteAttributeString("SubCode", this.subCodeField.ToString(CultureInfo.InvariantCulture)); + } + if (this.fileFieldSet) + { + writer.WriteAttributeString("File", this.fileField); + } + if (this.uRLFieldSet) + { + writer.WriteAttributeString("URL", this.uRLField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("ErrorCode" == name)) + { + this.errorCodeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.errorCodeFieldSet = true; + } + if (("SubCode" == name)) + { + this.subCodeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.subCodeFieldSet = true; + } + if (("File" == name)) + { + this.fileField = value; + this.fileFieldSet = true; + } + if (("URL" == name)) + { + this.uRLField = value; + this.uRLFieldSet = true; + } + } + } + + /// + /// Custom HTTP Header definition for IIS resources such as WebSite and WebVirtualDir. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class HttpHeader : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary key for custom HTTP Header entry. This will default to the Name attribute. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the custom HTTP Header. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// 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 + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("HttpHeader", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + } + + /// + /// MimeMap definition for IIS resources. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class MimeMap : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string typeField; + + private bool typeFieldSet; + + private string extensionField; + + private bool extensionFieldSet; + + private ISchemaElement parentElement; + + /// + /// Id for the MimeMap. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Mime-type covered by the MimeMap. + /// + public string Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + /// + /// Extension covered by the MimeMap. Must begin with a dot. + /// + public string Extension + { + get + { + return this.extensionField; + } + set + { + this.extensionFieldSet = true; + this.extensionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MimeMap", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.typeFieldSet) + { + writer.WriteAttributeString("Type", this.typeField); + } + if (this.extensionFieldSet) + { + writer.WriteAttributeString("Extension", this.extensionField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = value; + this.typeFieldSet = true; + } + if (("Extension" == name)) + { + this.extensionField = value; + this.extensionFieldSet = true; + } + } + } + + /// + /// IIs Filter for a Component + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebFilter : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string pathField; + + private bool pathFieldSet; + + private string webSiteField; + + private bool webSiteFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private int flagsField; + + private bool flagsFieldSet; + + private string loadOrderField; + + private bool loadOrderFieldSet; + + private ISchemaElement parentElement; + + /// + /// The unique Id for the web filter. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The name of the filter to be used in IIS. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The path of the filter executable file. + /// This should usually be a value like '[!FileId]', where 'FileId' is the file identifier + /// of the filter executable file. + /// + public string Path + { + get + { + return this.pathField; + } + set + { + this.pathFieldSet = true; + this.pathField = value; + } + } + + /// + /// Specifies the parent website for this filter (if there is one). + /// If this is a global filter, then this attribute should not be specified. + /// + public string WebSite + { + get + { + return this.webSiteField; + } + set + { + this.webSiteFieldSet = true; + this.webSiteField = value; + } + } + + /// + /// Description of the filter. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Sets the MD_FILTER_FLAGS metabase key for the filter. This must be an integer. See MSDN 'FilterFlags' documentation for more details. + /// + public int Flags + { + get + { + return this.flagsField; + } + set + { + this.flagsFieldSet = true; + this.flagsField = value; + } + } + + /// + /// The legal values are "first", "last", or a number. + /// If a number is specified, it must be greater than 0. + /// + public string LoadOrder + { + get + { + return this.loadOrderField; + } + set + { + this.loadOrderFieldSet = true; + this.loadOrderField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebFilter", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.pathFieldSet) + { + writer.WriteAttributeString("Path", this.pathField); + } + if (this.webSiteFieldSet) + { + writer.WriteAttributeString("WebSite", this.webSiteField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.flagsFieldSet) + { + writer.WriteAttributeString("Flags", this.flagsField.ToString(CultureInfo.InvariantCulture)); + } + if (this.loadOrderFieldSet) + { + writer.WriteAttributeString("LoadOrder", this.loadOrderField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Path" == name)) + { + this.pathField = value; + this.pathFieldSet = true; + } + if (("WebSite" == name)) + { + this.webSiteField = value; + this.webSiteFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("Flags" == name)) + { + this.flagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.flagsFieldSet = true; + } + if (("LoadOrder" == name)) + { + this.loadOrderField = value; + this.loadOrderFieldSet = true; + } + } + } + + /// + /// Extension for WebApplication + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebApplicationExtension : ISchemaElement, ISetAttributes + { + + private string executableField; + + private bool executableFieldSet; + + private string extensionField; + + private bool extensionFieldSet; + + private string verbsField; + + private bool verbsFieldSet; + + private YesNoType scriptField; + + private bool scriptFieldSet; + + private YesNoType checkPathField; + + private bool checkPathFieldSet; + + private ISchemaElement parentElement; + + /// + /// usually a Property that resolves to short file name path + /// + public string Executable + { + get + { + return this.executableField; + } + set + { + this.executableFieldSet = true; + this.executableField = value; + } + } + + /// + /// 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. + /// + public string Extension + { + get + { + return this.extensionField; + } + set + { + this.extensionFieldSet = true; + this.extensionField = value; + } + } + + public string Verbs + { + get + { + return this.verbsField; + } + set + { + this.verbsFieldSet = true; + this.verbsField = value; + } + } + + public YesNoType Script + { + get + { + return this.scriptField; + } + set + { + this.scriptFieldSet = true; + this.scriptField = value; + } + } + + public YesNoType CheckPath + { + get + { + return this.checkPathField; + } + set + { + this.checkPathFieldSet = true; + this.checkPathField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebApplicationExtension", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.executableFieldSet) + { + writer.WriteAttributeString("Executable", this.executableField); + } + if (this.extensionFieldSet) + { + writer.WriteAttributeString("Extension", this.extensionField); + } + if (this.verbsFieldSet) + { + writer.WriteAttributeString("Verbs", this.verbsField); + } + if (this.scriptFieldSet) + { + if ((this.scriptField == YesNoType.no)) + { + writer.WriteAttributeString("Script", "no"); + } + if ((this.scriptField == YesNoType.yes)) + { + writer.WriteAttributeString("Script", "yes"); + } + } + if (this.checkPathFieldSet) + { + if ((this.checkPathField == YesNoType.no)) + { + writer.WriteAttributeString("CheckPath", "no"); + } + if ((this.checkPathField == YesNoType.yes)) + { + writer.WriteAttributeString("CheckPath", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Executable" == name)) + { + this.executableField = value; + this.executableFieldSet = true; + } + if (("Extension" == name)) + { + this.extensionField = value; + this.extensionFieldSet = true; + } + if (("Verbs" == name)) + { + this.verbsField = value; + this.verbsFieldSet = true; + } + if (("Script" == name)) + { + this.scriptField = Enums.ParseYesNoType(value); + this.scriptFieldSet = true; + } + if (("CheckPath" == name)) + { + this.checkPathField = Enums.ParseYesNoType(value); + this.checkPathFieldSet = true; + } + } + } + + /// + /// IIS6 Application Pool + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebAppPool : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string userField; + + private bool userFieldSet; + + private int recycleMinutesField; + + private bool recycleMinutesFieldSet; + + private int recycleRequestsField; + + private bool recycleRequestsFieldSet; + + private int virtualMemoryField; + + private bool virtualMemoryFieldSet; + + private int privateMemoryField; + + private bool privateMemoryFieldSet; + + private int idleTimeoutField; + + private bool idleTimeoutFieldSet; + + private int queueLimitField; + + private bool queueLimitFieldSet; + + private long maxCpuUsageField; + + private bool maxCpuUsageFieldSet; + + private int refreshCpuField; + + private bool refreshCpuFieldSet; + + private CpuActionType cpuActionField; + + private bool cpuActionFieldSet; + + private int maxWorkerProcessesField; + + private bool maxWorkerProcessesFieldSet; + + private IdentityType identityField; + + private bool identityFieldSet; + + private string managedPipelineModeField; + + private bool managedPipelineModeFieldSet; + + private string managedRuntimeVersionField; + + private bool managedRuntimeVersionFieldSet; + + private ISchemaElement parentElement; + + public WebAppPool() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RecycleTime))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Id of the AppPool. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the AppPool to be shown in IIs. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// User account to run the AppPool as. To use this, you must set the Identity attribute to 'other'. + /// + public string User + { + get + { + return this.userField; + } + set + { + this.userFieldSet = true; + this.userField = value; + } + } + + /// + /// How often, in minutes, you want the AppPool to be recycled. + /// + public int RecycleMinutes + { + get + { + return this.recycleMinutesField; + } + set + { + this.recycleMinutesFieldSet = true; + this.recycleMinutesField = value; + } + } + + /// + /// How often, in requests, you want the AppPool to be recycled. + /// + public int RecycleRequests + { + get + { + return this.recycleRequestsField; + } + set + { + this.recycleRequestsFieldSet = true; + this.recycleRequestsField = value; + } + } + + /// + /// 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. + /// + public int VirtualMemory + { + get + { + return this.virtualMemoryField; + } + set + { + this.virtualMemoryFieldSet = true; + this.virtualMemoryField = value; + } + } + + /// + /// 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. + /// + public int PrivateMemory + { + get + { + return this.privateMemoryField; + } + set + { + this.privateMemoryFieldSet = true; + this.privateMemoryField = value; + } + } + + /// + /// Shutdown worker process after being idle for (time in minutes). + /// + public int IdleTimeout + { + get + { + return this.idleTimeoutField; + } + set + { + this.idleTimeoutFieldSet = true; + this.idleTimeoutField = value; + } + } + + /// + /// Limit the kernel request queue (number of requests). + /// + public int QueueLimit + { + get + { + return this.queueLimitField; + } + set + { + this.queueLimitFieldSet = true; + this.queueLimitField = value; + } + } + + /// + /// Maximum CPU usage (percent). + /// + public long MaxCpuUsage + { + get + { + return this.maxCpuUsageField; + } + set + { + this.maxCpuUsageFieldSet = true; + this.maxCpuUsageField = value; + } + } + + /// + /// Refresh CPU usage numbers (in minutes). + /// + public int RefreshCpu + { + get + { + return this.refreshCpuField; + } + set + { + this.refreshCpuFieldSet = true; + this.refreshCpuField = value; + } + } + + /// + /// Action taken when CPU exceeds maximum CPU use (as defined with MaxCpuUsage and RefreshCpu). + /// + public CpuActionType CpuAction + { + get + { + return this.cpuActionField; + } + set + { + this.cpuActionFieldSet = true; + this.cpuActionField = value; + } + } + + /// + /// Maximum number of worker processes. + /// + public int MaxWorkerProcesses + { + get + { + return this.maxWorkerProcessesField; + } + set + { + this.maxWorkerProcessesFieldSet = true; + this.maxWorkerProcessesField = value; + } + } + + /// + /// 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. + /// + public IdentityType Identity + { + get + { + return this.identityField; + } + set + { + this.identityFieldSet = true; + this.identityField = value; + } + } + + /// + /// Specifies the request-processing mode that is used to process requests for managed content. Only available on IIS7, ignored on IIS6. + /// See + /// + public string ManagedPipelineMode + { + get + { + return this.managedPipelineModeField; + } + set + { + this.managedPipelineModeFieldSet = true; + this.managedPipelineModeField = value; + } + } + + /// + /// Specifies the .NET Framework version to be used by the application pool. Only available on IIS7, ignored on IIS6. + /// See + /// + public string ManagedRuntimeVersion + { + get + { + return this.managedRuntimeVersionField; + } + set + { + this.managedRuntimeVersionFieldSet = true; + this.managedRuntimeVersionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("RecycleTime" == childName)) + { + childValue = new RecycleTime(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a CpuActionType from a string. + /// + public static CpuActionType ParseCpuActionType(string value) + { + CpuActionType parsedValue; + WebAppPool.TryParseCpuActionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a CpuActionType from a string. + /// + public static bool TryParseCpuActionType(string value, out CpuActionType parsedValue) + { + parsedValue = CpuActionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("none" == value)) + { + parsedValue = CpuActionType.none; + } + else + { + if (("shutdown" == value)) + { + parsedValue = CpuActionType.shutdown; + } + else + { + parsedValue = CpuActionType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Parses a IdentityType from a string. + /// + public static IdentityType ParseIdentityType(string value) + { + IdentityType parsedValue; + WebAppPool.TryParseIdentityType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a IdentityType from a string. + /// + public static bool TryParseIdentityType(string value, out IdentityType parsedValue) + { + parsedValue = IdentityType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("networkService" == value)) + { + parsedValue = IdentityType.networkService; + } + else + { + if (("localService" == value)) + { + parsedValue = IdentityType.localService; + } + else + { + if (("localSystem" == value)) + { + parsedValue = IdentityType.localSystem; + } + else + { + if (("other" == value)) + { + parsedValue = IdentityType.other; + } + else + { + if (("applicationPoolIdentity" == value)) + { + parsedValue = IdentityType.applicationPoolIdentity; + } + else + { + parsedValue = IdentityType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebAppPool", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.userFieldSet) + { + writer.WriteAttributeString("User", this.userField); + } + if (this.recycleMinutesFieldSet) + { + writer.WriteAttributeString("RecycleMinutes", this.recycleMinutesField.ToString(CultureInfo.InvariantCulture)); + } + if (this.recycleRequestsFieldSet) + { + writer.WriteAttributeString("RecycleRequests", this.recycleRequestsField.ToString(CultureInfo.InvariantCulture)); + } + if (this.virtualMemoryFieldSet) + { + writer.WriteAttributeString("VirtualMemory", this.virtualMemoryField.ToString(CultureInfo.InvariantCulture)); + } + if (this.privateMemoryFieldSet) + { + writer.WriteAttributeString("PrivateMemory", this.privateMemoryField.ToString(CultureInfo.InvariantCulture)); + } + if (this.idleTimeoutFieldSet) + { + writer.WriteAttributeString("IdleTimeout", this.idleTimeoutField.ToString(CultureInfo.InvariantCulture)); + } + if (this.queueLimitFieldSet) + { + writer.WriteAttributeString("QueueLimit", this.queueLimitField.ToString(CultureInfo.InvariantCulture)); + } + if (this.maxCpuUsageFieldSet) + { + writer.WriteAttributeString("MaxCpuUsage", this.maxCpuUsageField.ToString(CultureInfo.InvariantCulture)); + } + if (this.refreshCpuFieldSet) + { + writer.WriteAttributeString("RefreshCpu", this.refreshCpuField.ToString(CultureInfo.InvariantCulture)); + } + if (this.cpuActionFieldSet) + { + if ((this.cpuActionField == CpuActionType.none)) + { + writer.WriteAttributeString("CpuAction", "none"); + } + if ((this.cpuActionField == CpuActionType.shutdown)) + { + writer.WriteAttributeString("CpuAction", "shutdown"); + } + } + if (this.maxWorkerProcessesFieldSet) + { + writer.WriteAttributeString("MaxWorkerProcesses", this.maxWorkerProcessesField.ToString(CultureInfo.InvariantCulture)); + } + if (this.identityFieldSet) + { + if ((this.identityField == IdentityType.networkService)) + { + writer.WriteAttributeString("Identity", "networkService"); + } + if ((this.identityField == IdentityType.localService)) + { + writer.WriteAttributeString("Identity", "localService"); + } + if ((this.identityField == IdentityType.localSystem)) + { + writer.WriteAttributeString("Identity", "localSystem"); + } + if ((this.identityField == IdentityType.other)) + { + writer.WriteAttributeString("Identity", "other"); + } + if ((this.identityField == IdentityType.applicationPoolIdentity)) + { + writer.WriteAttributeString("Identity", "applicationPoolIdentity"); + } + } + if (this.managedPipelineModeFieldSet) + { + writer.WriteAttributeString("ManagedPipelineMode", this.managedPipelineModeField); + } + if (this.managedRuntimeVersionFieldSet) + { + writer.WriteAttributeString("ManagedRuntimeVersion", this.managedRuntimeVersionField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("User" == name)) + { + this.userField = value; + this.userFieldSet = true; + } + if (("RecycleMinutes" == name)) + { + this.recycleMinutesField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.recycleMinutesFieldSet = true; + } + if (("RecycleRequests" == name)) + { + this.recycleRequestsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.recycleRequestsFieldSet = true; + } + if (("VirtualMemory" == name)) + { + this.virtualMemoryField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.virtualMemoryFieldSet = true; + } + if (("PrivateMemory" == name)) + { + this.privateMemoryField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.privateMemoryFieldSet = true; + } + if (("IdleTimeout" == name)) + { + this.idleTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.idleTimeoutFieldSet = true; + } + if (("QueueLimit" == name)) + { + this.queueLimitField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.queueLimitFieldSet = true; + } + if (("MaxCpuUsage" == name)) + { + this.maxCpuUsageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.maxCpuUsageFieldSet = true; + } + if (("RefreshCpu" == name)) + { + this.refreshCpuField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.refreshCpuFieldSet = true; + } + if (("CpuAction" == name)) + { + this.cpuActionField = WebAppPool.ParseCpuActionType(value); + this.cpuActionFieldSet = true; + } + if (("MaxWorkerProcesses" == name)) + { + this.maxWorkerProcessesField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.maxWorkerProcessesFieldSet = true; + } + if (("Identity" == name)) + { + this.identityField = WebAppPool.ParseIdentityType(value); + this.identityFieldSet = true; + } + if (("ManagedPipelineMode" == name)) + { + this.managedPipelineModeField = value; + this.managedPipelineModeFieldSet = true; + } + if (("ManagedRuntimeVersion" == name)) + { + this.managedRuntimeVersionField = value; + this.managedRuntimeVersionFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum CpuActionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + none, + + shutdown, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum IdentityType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + networkService, + + localService, + + localSystem, + + other, + + applicationPoolIdentity, + } + } + + /// + /// IIS6 Application Pool Recycle Times on 24 hour clock. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class RecycleTime : ISchemaElement, ISetAttributes + { + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RecycleTime", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + } + + /// + /// Used to install and uninstall certificates. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class Certificate : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private StoreNameType storeNameField; + + private bool storeNameFieldSet; + + private StoreLocationType storeLocationField; + + private bool storeLocationFieldSet; + + private YesNoType overwriteField; + + private bool overwriteFieldSet; + + private YesNoType requestField; + + private bool requestFieldSet; + + private string binaryKeyField; + + private bool binaryKeyFieldSet; + + private string certificatePathField; + + private bool certificatePathFieldSet; + + private string pFXPasswordField; + + private bool pFXPasswordFieldSet; + + private ISchemaElement parentElement; + + /// + /// Unique identifier for this certificate in the installation package. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the certificate that will be installed or uninstalled in the specified store. + /// This attribute may be set via a formatted Property (e.g. [MyProperty]). + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + public StoreNameType StoreName + { + get + { + return this.storeNameField; + } + set + { + this.storeNameFieldSet = true; + this.storeNameField = value; + } + } + + public StoreLocationType StoreLocation + { + get + { + return this.storeLocationField; + } + set + { + this.storeLocationFieldSet = true; + this.storeLocationField = value; + } + } + + public YesNoType Overwrite + { + get + { + return this.overwriteField; + } + set + { + this.overwriteFieldSet = true; + this.overwriteField = value; + } + } + + /// + /// This attribute controls whether the CertificatePath attribute is a path to a certificate file (Request='no') or the + /// certificate authority to request the certificate from (Request='yes'). + /// + public YesNoType Request + { + get + { + return this.requestField; + } + set + { + this.requestFieldSet = true; + this.requestField = value; + } + } + + /// + /// Reference to a Binary element that will store the certificate as a stream inside the package. This attribute cannot be specified with + /// the CertificatePath attribute. + /// + public string BinaryKey + { + get + { + return this.binaryKeyField; + } + set + { + this.binaryKeyFieldSet = true; + this.binaryKeyField = value; + } + } + + /// + /// If the Request attribute is "no" then this attribute is the path to the certificate file outside of the package. + /// If the Request attribute is "yes" then this atribute is the certificate authority to request the certificate from. + /// This attribute may be set via a formatted Property (e.g. [MyProperty]). + /// + public string CertificatePath + { + get + { + return this.certificatePathField; + } + set + { + this.certificatePathFieldSet = true; + this.certificatePathField = value; + } + } + + /// + /// If the Binary stream or path to the file outside of the package is a password protected PFX file, the password for that + /// PFX must be specified here. This attribute may be set via a formatted Property (e.g. [MyProperty]). + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public string PFXPassword + { + get + { + return this.pFXPasswordField; + } + set + { + this.pFXPasswordFieldSet = true; + this.pFXPasswordField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a StoreNameType from a string. + /// + public static StoreNameType ParseStoreNameType(string value) + { + StoreNameType parsedValue; + Certificate.TryParseStoreNameType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a StoreNameType from a string. + /// + public static bool TryParseStoreNameType(string value, out StoreNameType parsedValue) + { + parsedValue = StoreNameType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("ca" == value)) + { + parsedValue = StoreNameType.ca; + } + else + { + if (("my" == value)) + { + parsedValue = StoreNameType.my; + } + else + { + if (("personal" == value)) + { + parsedValue = StoreNameType.personal; + } + else + { + if (("request" == value)) + { + parsedValue = StoreNameType.request; + } + else + { + if (("root" == value)) + { + parsedValue = StoreNameType.root; + } + else + { + if (("otherPeople" == value)) + { + parsedValue = StoreNameType.otherPeople; + } + else + { + if (("trustedPeople" == value)) + { + parsedValue = StoreNameType.trustedPeople; + } + else + { + if (("trustedPublisher" == value)) + { + parsedValue = StoreNameType.trustedPublisher; + } + else + { + parsedValue = StoreNameType.IllegalValue; + return false; + } + } + } + } + } + } + } + } + return true; + } + + /// + /// Parses a StoreLocationType from a string. + /// + public static StoreLocationType ParseStoreLocationType(string value) + { + StoreLocationType parsedValue; + Certificate.TryParseStoreLocationType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a StoreLocationType from a string. + /// + public static bool TryParseStoreLocationType(string value, out StoreLocationType parsedValue) + { + parsedValue = StoreLocationType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("currentUser" == value)) + { + parsedValue = StoreLocationType.currentUser; + } + else + { + if (("localMachine" == value)) + { + parsedValue = StoreLocationType.localMachine; + } + else + { + parsedValue = StoreLocationType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Certificate", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.storeNameFieldSet) + { + if ((this.storeNameField == StoreNameType.ca)) + { + writer.WriteAttributeString("StoreName", "ca"); + } + if ((this.storeNameField == StoreNameType.my)) + { + writer.WriteAttributeString("StoreName", "my"); + } + if ((this.storeNameField == StoreNameType.personal)) + { + writer.WriteAttributeString("StoreName", "personal"); + } + if ((this.storeNameField == StoreNameType.request)) + { + writer.WriteAttributeString("StoreName", "request"); + } + if ((this.storeNameField == StoreNameType.root)) + { + writer.WriteAttributeString("StoreName", "root"); + } + if ((this.storeNameField == StoreNameType.otherPeople)) + { + writer.WriteAttributeString("StoreName", "otherPeople"); + } + if ((this.storeNameField == StoreNameType.trustedPeople)) + { + writer.WriteAttributeString("StoreName", "trustedPeople"); + } + if ((this.storeNameField == StoreNameType.trustedPublisher)) + { + writer.WriteAttributeString("StoreName", "trustedPublisher"); + } + } + if (this.storeLocationFieldSet) + { + if ((this.storeLocationField == StoreLocationType.currentUser)) + { + writer.WriteAttributeString("StoreLocation", "currentUser"); + } + if ((this.storeLocationField == StoreLocationType.localMachine)) + { + writer.WriteAttributeString("StoreLocation", "localMachine"); + } + } + if (this.overwriteFieldSet) + { + if ((this.overwriteField == YesNoType.no)) + { + writer.WriteAttributeString("Overwrite", "no"); + } + if ((this.overwriteField == YesNoType.yes)) + { + writer.WriteAttributeString("Overwrite", "yes"); + } + } + if (this.requestFieldSet) + { + if ((this.requestField == YesNoType.no)) + { + writer.WriteAttributeString("Request", "no"); + } + if ((this.requestField == YesNoType.yes)) + { + writer.WriteAttributeString("Request", "yes"); + } + } + if (this.binaryKeyFieldSet) + { + writer.WriteAttributeString("BinaryKey", this.binaryKeyField); + } + if (this.certificatePathFieldSet) + { + writer.WriteAttributeString("CertificatePath", this.certificatePathField); + } + if (this.pFXPasswordFieldSet) + { + writer.WriteAttributeString("PFXPassword", this.pFXPasswordField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("StoreName" == name)) + { + this.storeNameField = Certificate.ParseStoreNameType(value); + this.storeNameFieldSet = true; + } + if (("StoreLocation" == name)) + { + this.storeLocationField = Certificate.ParseStoreLocationType(value); + this.storeLocationFieldSet = true; + } + if (("Overwrite" == name)) + { + this.overwriteField = Enums.ParseYesNoType(value); + this.overwriteFieldSet = true; + } + if (("Request" == name)) + { + this.requestField = Enums.ParseYesNoType(value); + this.requestFieldSet = true; + } + if (("BinaryKey" == name)) + { + this.binaryKeyField = value; + this.binaryKeyFieldSet = true; + } + if (("CertificatePath" == name)) + { + this.certificatePathField = value; + this.certificatePathFieldSet = true; + } + if (("PFXPassword" == name)) + { + this.pFXPasswordField = value; + this.pFXPasswordFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum StoreNameType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// 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. + /// + ca, + + /// + /// Use the "personal" value instead. + /// + my, + + /// + /// Contains personal certificates. These certificates will usually have an associated private key. This store is often + /// referred to as the "MY" certificate store. + /// + personal, + + request, + + /// + /// 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. + /// + root, + + /// + /// Contains the certificates of those that the user normally sends enveloped messages to or receives signed messages from. + /// See + /// + otherPeople, + + /// + /// Contains the certificates of those directly trusted people and resources. + /// See + /// + trustedPeople, + + /// + /// Contains the certificates of those publishers who are trusted. + /// See + /// + trustedPublisher, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum StoreLocationType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + currentUser, + + localMachine, + } + } + + /// + /// Associates a certificate with the parent WebSite. The Certificate element should be + /// in the same Component as the parent WebSite. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class CertificateRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the referenced Certificate. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CertificateRef", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// IIS Properties + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebProperty : ISchemaElement, ISetAttributes + { + + private IdType idField; + + private bool idFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + public IdType Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The value to be used for the WebProperty specified in the Id attribute. See + /// the remarks section for information on acceptable values for each Id. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a IdType from a string. + /// + public static IdType ParseIdType(string value) + { + IdType parsedValue; + WebProperty.TryParseIdType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a IdType from a string. + /// + public static bool TryParseIdType(string value, out IdType parsedValue) + { + parsedValue = IdType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("ETagChangeNumber" == value)) + { + parsedValue = IdType.ETagChangeNumber; + } + else + { + if (("IIs5IsolationMode" == value)) + { + parsedValue = IdType.IIs5IsolationMode; + } + else + { + if (("MaxGlobalBandwidth" == value)) + { + parsedValue = IdType.MaxGlobalBandwidth; + } + else + { + if (("LogInUTF8" == value)) + { + parsedValue = IdType.LogInUTF8; + } + else + { + parsedValue = IdType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebProperty", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + if ((this.idField == IdType.ETagChangeNumber)) + { + writer.WriteAttributeString("Id", "ETagChangeNumber"); + } + if ((this.idField == IdType.IIs5IsolationMode)) + { + writer.WriteAttributeString("Id", "IIs5IsolationMode"); + } + if ((this.idField == IdType.MaxGlobalBandwidth)) + { + writer.WriteAttributeString("Id", "MaxGlobalBandwidth"); + } + if ((this.idField == IdType.LogInUTF8)) + { + writer.WriteAttributeString("Id", "LogInUTF8"); + } + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = WebProperty.ParseIdType(value); + this.idFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum IdType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + ETagChangeNumber, + + IIs5IsolationMode, + + MaxGlobalBandwidth, + + LogInUTF8, + } + } + + /// + /// 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. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebApplication : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private IsolationType isolationField; + + private bool isolationFieldSet; + + private YesNoDefaultType allowSessionsField; + + private bool allowSessionsFieldSet; + + private int sessionTimeoutField; + + private bool sessionTimeoutFieldSet; + + private YesNoDefaultType bufferField; + + private bool bufferFieldSet; + + private YesNoDefaultType parentPathsField; + + private bool parentPathsFieldSet; + + private DefaultScriptType defaultScriptField; + + private bool defaultScriptFieldSet; + + private int scriptTimeoutField; + + private bool scriptTimeoutFieldSet; + + private YesNoDefaultType serverDebuggingField; + + private bool serverDebuggingFieldSet; + + private YesNoDefaultType clientDebuggingField; + + private bool clientDebuggingFieldSet; + + private string webAppPoolField; + + private bool webAppPoolFieldSet; + + private ISchemaElement parentElement; + + public WebApplication() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(WebApplicationExtension))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Sets the name of this application. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Sets the application isolation level for this application for pre-IIS 6 applications. + /// + public IsolationType Isolation + { + get + { + return this.isolationField; + } + set + { + this.isolationFieldSet = true; + this.isolationField = value; + } + } + + /// + /// Sets the Enable Session State option. When enabled, you can set the session timeout using the SessionTimeout attribute. + /// + public YesNoDefaultType AllowSessions + { + get + { + return this.allowSessionsField; + } + set + { + this.allowSessionsFieldSet = true; + this.allowSessionsField = value; + } + } + + /// + /// Sets the timeout value for sessions in minutes. + /// + public int SessionTimeout + { + get + { + return this.sessionTimeoutField; + } + set + { + this.sessionTimeoutFieldSet = true; + this.sessionTimeoutField = value; + } + } + + /// + /// Sets the option that enables response buffering in the application, which allows ASP script to set response headers anywhere in the script. + /// + public YesNoDefaultType Buffer + { + get + { + return this.bufferField; + } + set + { + this.bufferFieldSet = true; + this.bufferField = value; + } + } + + /// + /// Sets the parent paths option, which allows a client to use relative paths to reach parent directories from this application. + /// + public YesNoDefaultType ParentPaths + { + get + { + return this.parentPathsField; + } + set + { + this.parentPathsFieldSet = true; + this.parentPathsField = value; + } + } + + /// + /// Sets the default script language for the site. + /// + public DefaultScriptType DefaultScript + { + get + { + return this.defaultScriptField; + } + set + { + this.defaultScriptFieldSet = true; + this.defaultScriptField = value; + } + } + + /// + /// Sets the timeout value in seconds for executing ASP scripts. + /// + public int ScriptTimeout + { + get + { + return this.scriptTimeoutField; + } + set + { + this.scriptTimeoutFieldSet = true; + this.scriptTimeoutField = value; + } + } + + /// + /// Enable ASP server-side script debugging. + /// + public YesNoDefaultType ServerDebugging + { + get + { + return this.serverDebuggingField; + } + set + { + this.serverDebuggingFieldSet = true; + this.serverDebuggingField = value; + } + } + + /// + /// Enable ASP client-side script debugging. + /// + public YesNoDefaultType ClientDebugging + { + get + { + return this.clientDebuggingField; + } + set + { + this.clientDebuggingFieldSet = true; + this.clientDebuggingField = value; + } + } + + /// + /// References the Id attribute of a WebAppPool element to use as the application pool for this application in IIS 6 applications. + /// + public string WebAppPool + { + get + { + return this.webAppPoolField; + } + set + { + this.webAppPoolFieldSet = true; + this.webAppPoolField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("WebApplicationExtension" == childName)) + { + childValue = new WebApplicationExtension(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a IsolationType from a string. + /// + public static IsolationType ParseIsolationType(string value) + { + IsolationType parsedValue; + WebApplication.TryParseIsolationType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a IsolationType from a string. + /// + public static bool TryParseIsolationType(string value, out IsolationType parsedValue) + { + parsedValue = IsolationType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("low" == value)) + { + parsedValue = IsolationType.low; + } + else + { + if (("medium" == value)) + { + parsedValue = IsolationType.medium; + } + else + { + if (("high" == value)) + { + parsedValue = IsolationType.high; + } + else + { + parsedValue = IsolationType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a DefaultScriptType from a string. + /// + public static DefaultScriptType ParseDefaultScriptType(string value) + { + DefaultScriptType parsedValue; + WebApplication.TryParseDefaultScriptType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a DefaultScriptType from a string. + /// + public static bool TryParseDefaultScriptType(string value, out DefaultScriptType parsedValue) + { + parsedValue = DefaultScriptType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("VBScript" == value)) + { + parsedValue = DefaultScriptType.VBScript; + } + else + { + if (("JScript" == value)) + { + parsedValue = DefaultScriptType.JScript; + } + else + { + parsedValue = DefaultScriptType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebApplication", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.isolationFieldSet) + { + if ((this.isolationField == IsolationType.low)) + { + writer.WriteAttributeString("Isolation", "low"); + } + if ((this.isolationField == IsolationType.medium)) + { + writer.WriteAttributeString("Isolation", "medium"); + } + if ((this.isolationField == IsolationType.high)) + { + writer.WriteAttributeString("Isolation", "high"); + } + } + if (this.allowSessionsFieldSet) + { + if ((this.allowSessionsField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("AllowSessions", "default"); + } + if ((this.allowSessionsField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("AllowSessions", "no"); + } + if ((this.allowSessionsField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("AllowSessions", "yes"); + } + } + if (this.sessionTimeoutFieldSet) + { + writer.WriteAttributeString("SessionTimeout", this.sessionTimeoutField.ToString(CultureInfo.InvariantCulture)); + } + if (this.bufferFieldSet) + { + if ((this.bufferField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("Buffer", "default"); + } + if ((this.bufferField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("Buffer", "no"); + } + if ((this.bufferField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("Buffer", "yes"); + } + } + if (this.parentPathsFieldSet) + { + if ((this.parentPathsField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("ParentPaths", "default"); + } + if ((this.parentPathsField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("ParentPaths", "no"); + } + if ((this.parentPathsField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("ParentPaths", "yes"); + } + } + if (this.defaultScriptFieldSet) + { + if ((this.defaultScriptField == DefaultScriptType.VBScript)) + { + writer.WriteAttributeString("DefaultScript", "VBScript"); + } + if ((this.defaultScriptField == DefaultScriptType.JScript)) + { + writer.WriteAttributeString("DefaultScript", "JScript"); + } + } + if (this.scriptTimeoutFieldSet) + { + writer.WriteAttributeString("ScriptTimeout", this.scriptTimeoutField.ToString(CultureInfo.InvariantCulture)); + } + if (this.serverDebuggingFieldSet) + { + if ((this.serverDebuggingField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("ServerDebugging", "default"); + } + if ((this.serverDebuggingField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("ServerDebugging", "no"); + } + if ((this.serverDebuggingField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("ServerDebugging", "yes"); + } + } + if (this.clientDebuggingFieldSet) + { + if ((this.clientDebuggingField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("ClientDebugging", "default"); + } + if ((this.clientDebuggingField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("ClientDebugging", "no"); + } + if ((this.clientDebuggingField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("ClientDebugging", "yes"); + } + } + if (this.webAppPoolFieldSet) + { + writer.WriteAttributeString("WebAppPool", this.webAppPoolField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Isolation" == name)) + { + this.isolationField = WebApplication.ParseIsolationType(value); + this.isolationFieldSet = true; + } + if (("AllowSessions" == name)) + { + this.allowSessionsField = Enums.ParseYesNoDefaultType(value); + this.allowSessionsFieldSet = true; + } + if (("SessionTimeout" == name)) + { + this.sessionTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sessionTimeoutFieldSet = true; + } + if (("Buffer" == name)) + { + this.bufferField = Enums.ParseYesNoDefaultType(value); + this.bufferFieldSet = true; + } + if (("ParentPaths" == name)) + { + this.parentPathsField = Enums.ParseYesNoDefaultType(value); + this.parentPathsFieldSet = true; + } + if (("DefaultScript" == name)) + { + this.defaultScriptField = WebApplication.ParseDefaultScriptType(value); + this.defaultScriptFieldSet = true; + } + if (("ScriptTimeout" == name)) + { + this.scriptTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.scriptTimeoutFieldSet = true; + } + if (("ServerDebugging" == name)) + { + this.serverDebuggingField = Enums.ParseYesNoDefaultType(value); + this.serverDebuggingFieldSet = true; + } + if (("ClientDebugging" == name)) + { + this.clientDebuggingField = Enums.ParseYesNoDefaultType(value); + this.clientDebuggingFieldSet = true; + } + if (("WebAppPool" == name)) + { + this.webAppPoolField = value; + this.webAppPoolFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum IsolationType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Means the application executes within the IIS process. + /// + low, + + /// + /// Executes pooled in a separate process. + /// + medium, + + /// + /// Means execution alone in a separate process. + /// + high, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum DefaultScriptType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + VBScript, + + JScript, + } + } + + /// + /// WebAddress for WebSite + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebAddress : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string iPField; + + private bool iPFieldSet; + + private string portField; + + private bool portFieldSet; + + private string headerField; + + private bool headerFieldSet; + + private YesNoType secureField; + + private bool secureFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The IP address to locate an existing WebSite or create a new WebSite. When the WebAddress is part of a WebSite element + /// used to locate an existing web site the following rules are used: + /// + public string IP + { + get + { + return this.iPField; + } + set + { + this.iPFieldSet = true; + this.iPField = value; + } + } + + public string Port + { + get + { + return this.portField; + } + set + { + this.portFieldSet = true; + this.portField = value; + } + } + + public string Header + { + get + { + return this.headerField; + } + set + { + this.headerFieldSet = true; + this.headerField = value; + } + } + + /// + /// Determines if this address represents a secure binding. The default is 'no'. + /// + public YesNoType Secure + { + get + { + return this.secureField; + } + set + { + this.secureFieldSet = true; + this.secureField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebAddress", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.iPFieldSet) + { + writer.WriteAttributeString("IP", this.iPField); + } + if (this.portFieldSet) + { + writer.WriteAttributeString("Port", this.portField); + } + if (this.headerFieldSet) + { + writer.WriteAttributeString("Header", this.headerField); + } + if (this.secureFieldSet) + { + if ((this.secureField == YesNoType.no)) + { + writer.WriteAttributeString("Secure", "no"); + } + if ((this.secureField == YesNoType.yes)) + { + writer.WriteAttributeString("Secure", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("IP" == name)) + { + this.iPField = value; + this.iPFieldSet = true; + } + if (("Port" == name)) + { + this.portField = value; + this.portFieldSet = true; + } + if (("Header" == name)) + { + this.headerField = value; + this.headerFieldSet = true; + } + if (("Secure" == name)) + { + this.secureField = Enums.ParseYesNoType(value); + this.secureFieldSet = true; + } + } + } + + /// + /// 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 + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebVirtualDir : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string webSiteField; + + private bool webSiteFieldSet; + + private string aliasField; + + private bool aliasFieldSet; + + private string directoryField; + + private bool directoryFieldSet; + + private string dirPropertiesField; + + private bool dirPropertiesFieldSet; + + private string webApplicationField; + + private bool webApplicationFieldSet; + + private ISchemaElement parentElement; + + public WebVirtualDir() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebError))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebVirtualDir))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HttpHeader))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MimeMap))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// References the Id attribute for a WebSite in which this virtual directory belongs. Required when this element is not a child of WebSite element. + /// + public string WebSite + { + get + { + return this.webSiteField; + } + set + { + this.webSiteFieldSet = true; + this.webSiteField = value; + } + } + + /// + /// Sets the application name, which is the URL relative path used to access this virtual directory + /// + public string Alias + { + get + { + return this.aliasField; + } + set + { + this.aliasFieldSet = true; + this.aliasField = value; + } + } + + /// + /// References the Id attribute for a Directory element that points to the content for this virtual directory. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + /// + /// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this virtual directory. + /// This attribute may not be specified if a WebDirProperties element is directly nested in this element. + /// + public string DirProperties + { + get + { + return this.dirPropertiesField; + } + set + { + this.dirPropertiesFieldSet = true; + this.dirPropertiesField = value; + } + } + + /// + /// 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. + /// + public string WebApplication + { + get + { + return this.webApplicationField; + } + set + { + this.webApplicationFieldSet = true; + this.webApplicationField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("WebApplication" == childName)) + { + childValue = new WebApplication(); + } + if (("WebDirProperties" == childName)) + { + childValue = new WebDirProperties(); + } + if (("WebError" == childName)) + { + childValue = new WebError(); + } + if (("WebVirtualDir" == childName)) + { + childValue = new WebVirtualDir(); + } + if (("HttpHeader" == childName)) + { + childValue = new HttpHeader(); + } + if (("MimeMap" == childName)) + { + childValue = new MimeMap(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebVirtualDir", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.webSiteFieldSet) + { + writer.WriteAttributeString("WebSite", this.webSiteField); + } + if (this.aliasFieldSet) + { + writer.WriteAttributeString("Alias", this.aliasField); + } + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + if (this.dirPropertiesFieldSet) + { + writer.WriteAttributeString("DirProperties", this.dirPropertiesField); + } + if (this.webApplicationFieldSet) + { + writer.WriteAttributeString("WebApplication", this.webApplicationField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("WebSite" == name)) + { + this.webSiteField = value; + this.webSiteFieldSet = true; + } + if (("Alias" == name)) + { + this.aliasField = value; + this.aliasFieldSet = true; + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + if (("DirProperties" == name)) + { + this.dirPropertiesField = value; + this.dirPropertiesFieldSet = true; + } + if (("WebApplication" == name)) + { + this.webApplicationField = value; + this.webApplicationFieldSet = true; + } + } + } + + /// + /// 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. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebDir : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string webSiteField; + + private bool webSiteFieldSet; + + private string pathField; + + private bool pathFieldSet; + + private string dirPropertiesField; + + private bool dirPropertiesFieldSet; + + private ISchemaElement parentElement; + + public WebDir() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// 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. + /// + public string WebSite + { + get + { + return this.webSiteField; + } + set + { + this.webSiteFieldSet = true; + this.webSiteField = value; + } + } + + /// + /// Specifies the name of this web directory. + /// + public string Path + { + get + { + return this.pathField; + } + set + { + this.pathFieldSet = true; + this.pathField = value; + } + } + + /// + /// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this web directory. + /// This attribute may not be specified if a WebDirProperties element is directly nested in this element. + /// + public string DirProperties + { + get + { + return this.dirPropertiesField; + } + set + { + this.dirPropertiesFieldSet = true; + this.dirPropertiesField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("WebApplication" == childName)) + { + childValue = new WebApplication(); + } + if (("WebDirProperties" == childName)) + { + childValue = new WebDirProperties(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebDir", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.webSiteFieldSet) + { + writer.WriteAttributeString("WebSite", this.webSiteField); + } + if (this.pathFieldSet) + { + writer.WriteAttributeString("Path", this.pathField); + } + if (this.dirPropertiesFieldSet) + { + writer.WriteAttributeString("DirProperties", this.dirPropertiesField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("WebSite" == name)) + { + this.webSiteField = value; + this.webSiteFieldSet = true; + } + if (("Path" == name)) + { + this.pathField = value; + this.pathFieldSet = true; + } + if (("DirProperties" == name)) + { + this.dirPropertiesField = value; + this.dirPropertiesFieldSet = true; + } + } + } + + /// + /// IIs Web Site + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebSite : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private YesNoType autoStartField; + + private bool autoStartFieldSet; + + private YesNoType configureIfExistsField; + + private bool configureIfExistsFieldSet; + + private long connectionTimeoutField; + + private bool connectionTimeoutFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string directoryField; + + private bool directoryFieldSet; + + private string dirPropertiesField; + + private bool dirPropertiesFieldSet; + + private int sequenceField; + + private bool sequenceFieldSet; + + private string siteIdField; + + private bool siteIdFieldSet; + + private YesNoType startOnInstallField; + + private bool startOnInstallFieldSet; + + private string webApplicationField; + + private bool webApplicationFieldSet; + + private string webLogField; + + private bool webLogFieldSet; + + private ISchemaElement parentElement; + + public WebSite() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebAddress))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MimeMap))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CertificateRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HttpHeader))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDir))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebError))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebFilter))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebVirtualDir))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for the WebSite. Used within the MSI package only. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Specifies whether to automatically start the web site. + /// + public YesNoType AutoStart + { + get + { + return this.autoStartField; + } + set + { + this.autoStartFieldSet = true; + this.autoStartField = value; + } + } + + /// + /// 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. + /// + public YesNoType ConfigureIfExists + { + get + { + return this.configureIfExistsField; + } + set + { + this.configureIfExistsFieldSet = true; + this.configureIfExistsField = value; + } + } + + /// + /// Sets the timeout value for connections in seconds. + /// + public long ConnectionTimeout + { + get + { + return this.connectionTimeoutField; + } + set + { + this.connectionTimeoutFieldSet = true; + this.connectionTimeoutField = value; + } + } + + /// + /// This is the name of the web site that will show up in the IIS management console. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Root directory of the web site. Resolved to a directory in the Directory table at install time by the server custom actions. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + /// + /// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this website root directory. + /// This attribute may not be specified if a WebDirProperties element is directly nested in this element. + /// + public string DirProperties + { + get + { + return this.dirPropertiesField; + } + set + { + this.dirPropertiesFieldSet = true; + this.dirPropertiesField = value; + } + } + + /// + /// Sequence that the web site is to be created in. + /// + public int Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + /// + /// Optional attribute to directly specify the site id of the WebSite. Use this to ensure all web + /// sites in a web garden get the same site id. If a number is provided, the site id must be unique + /// on all target machines. If "*" is used, the Description attribute will be hashed to create a unique + /// value for the site id. This value must be a positive number or a "*" or a formatted value that resolves + /// to "-1" (for the same behavior as "*") or a positive number or blank. If this attribute is absent then + /// the web site will be located using the WebAddress element associated with the web site. + /// + public string SiteId + { + get + { + return this.siteIdField; + } + set + { + this.siteIdFieldSet = true; + this.siteIdField = value; + } + } + + /// + /// Specifies whether to start the web site on install. + /// + public YesNoType StartOnInstall + { + get + { + return this.startOnInstallField; + } + set + { + this.startOnInstallFieldSet = true; + this.startOnInstallField = value; + } + } + + /// + /// Reference to a WebApplication that is to be installed as part of this web site. + /// + public string WebApplication + { + get + { + return this.webApplicationField; + } + set + { + this.webApplicationFieldSet = true; + this.webApplicationField = value; + } + } + + /// + /// Reference to WebLog definition. + /// + public string WebLog + { + get + { + return this.webLogField; + } + set + { + this.webLogFieldSet = true; + this.webLogField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("WebAddress" == childName)) + { + childValue = new WebAddress(); + } + if (("WebApplication" == childName)) + { + childValue = new WebApplication(); + } + if (("WebDirProperties" == childName)) + { + childValue = new WebDirProperties(); + } + if (("MimeMap" == childName)) + { + childValue = new MimeMap(); + } + if (("CertificateRef" == childName)) + { + childValue = new CertificateRef(); + } + if (("HttpHeader" == childName)) + { + childValue = new HttpHeader(); + } + if (("WebDir" == childName)) + { + childValue = new WebDir(); + } + if (("WebError" == childName)) + { + childValue = new WebError(); + } + if (("WebFilter" == childName)) + { + childValue = new WebFilter(); + } + if (("WebVirtualDir" == childName)) + { + childValue = new WebVirtualDir(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebSite", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.autoStartFieldSet) + { + if ((this.autoStartField == YesNoType.no)) + { + writer.WriteAttributeString("AutoStart", "no"); + } + if ((this.autoStartField == YesNoType.yes)) + { + writer.WriteAttributeString("AutoStart", "yes"); + } + } + if (this.configureIfExistsFieldSet) + { + if ((this.configureIfExistsField == YesNoType.no)) + { + writer.WriteAttributeString("ConfigureIfExists", "no"); + } + if ((this.configureIfExistsField == YesNoType.yes)) + { + writer.WriteAttributeString("ConfigureIfExists", "yes"); + } + } + if (this.connectionTimeoutFieldSet) + { + writer.WriteAttributeString("ConnectionTimeout", this.connectionTimeoutField.ToString(CultureInfo.InvariantCulture)); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + if (this.dirPropertiesFieldSet) + { + writer.WriteAttributeString("DirProperties", this.dirPropertiesField); + } + if (this.sequenceFieldSet) + { + writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); + } + if (this.siteIdFieldSet) + { + writer.WriteAttributeString("SiteId", this.siteIdField); + } + if (this.startOnInstallFieldSet) + { + if ((this.startOnInstallField == YesNoType.no)) + { + writer.WriteAttributeString("StartOnInstall", "no"); + } + if ((this.startOnInstallField == YesNoType.yes)) + { + writer.WriteAttributeString("StartOnInstall", "yes"); + } + } + if (this.webApplicationFieldSet) + { + writer.WriteAttributeString("WebApplication", this.webApplicationField); + } + if (this.webLogFieldSet) + { + writer.WriteAttributeString("WebLog", this.webLogField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("AutoStart" == name)) + { + this.autoStartField = Enums.ParseYesNoType(value); + this.autoStartFieldSet = true; + } + if (("ConfigureIfExists" == name)) + { + this.configureIfExistsField = Enums.ParseYesNoType(value); + this.configureIfExistsFieldSet = true; + } + if (("ConnectionTimeout" == name)) + { + this.connectionTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.connectionTimeoutFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + if (("DirProperties" == name)) + { + this.dirPropertiesField = value; + this.dirPropertiesFieldSet = true; + } + if (("Sequence" == name)) + { + this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sequenceFieldSet = true; + } + if (("SiteId" == name)) + { + this.siteIdField = value; + this.siteIdFieldSet = true; + } + if (("StartOnInstall" == name)) + { + this.startOnInstallField = Enums.ParseYesNoType(value); + this.startOnInstallFieldSet = true; + } + if (("WebApplication" == name)) + { + this.webApplicationField = value; + this.webApplicationFieldSet = true; + } + if (("WebLog" == name)) + { + this.webLogField = value; + this.webLogFieldSet = true; + } + } + } + + /// + /// WebLog definition. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebLog : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private TypeType typeField; + + private bool typeFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier for the WebLog. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public TypeType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a TypeType from a string. + /// + public static TypeType ParseTypeType(string value) + { + TypeType parsedValue; + WebLog.TryParseTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypeType from a string. + /// + public static bool TryParseTypeType(string value, out TypeType parsedValue) + { + parsedValue = TypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("IIS" == value)) + { + parsedValue = TypeType.IIS; + } + else + { + if (("NCSA" == value)) + { + parsedValue = TypeType.NCSA; + } + else + { + if (("none" == value)) + { + parsedValue = TypeType.none; + } + else + { + if (("ODBC" == value)) + { + parsedValue = TypeType.ODBC; + } + else + { + if (("W3C" == value)) + { + parsedValue = TypeType.W3C; + } + else + { + parsedValue = TypeType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebLog", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.typeFieldSet) + { + if ((this.typeField == TypeType.IIS)) + { + writer.WriteAttributeString("Type", "IIS"); + } + if ((this.typeField == TypeType.NCSA)) + { + writer.WriteAttributeString("Type", "NCSA"); + } + if ((this.typeField == TypeType.none)) + { + writer.WriteAttributeString("Type", "none"); + } + if ((this.typeField == TypeType.ODBC)) + { + writer.WriteAttributeString("Type", "ODBC"); + } + if ((this.typeField == TypeType.W3C)) + { + writer.WriteAttributeString("Type", "W3C"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = WebLog.ParseTypeType(value); + this.typeFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum TypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Microsoft IIS Log File Format + /// + IIS, + + /// + /// NCSA Common Log File Format + /// + NCSA, + + /// + /// Disables logging. + /// + none, + + /// + /// ODBC Logging + /// + ODBC, + + /// + /// W3C Extended Log File Format + /// + W3C, + } + } + + /// + /// The WebServiceExtension property is used by the Web server to determine whether a Web service extension is permitted to run. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class WebServiceExtension : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string fileField; + + private bool fileFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string groupField; + + private bool groupFieldSet; + + private YesNoType allowField; + + private bool allowFieldSet; + + private YesNoType uIDeletableField; + + private bool uIDeletableFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Usually a Property that resolves to short file name path + /// + public string File + { + get + { + return this.fileField; + } + set + { + this.fileFieldSet = true; + this.fileField = value; + } + } + + /// + /// Description of the extension. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// String used to identify groups of extensions. + /// + public string Group + { + get + { + return this.groupField; + } + set + { + this.groupFieldSet = true; + this.groupField = value; + } + } + + /// + /// Indicates if the extension is allowed or denied. + /// + public YesNoType Allow + { + get + { + return this.allowField; + } + set + { + this.allowFieldSet = true; + this.allowField = value; + } + } + + /// + /// Indicates if the UI is allowed to delete the extension from the list of not. Default: Not deletable. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public YesNoType UIDeletable + { + get + { + return this.uIDeletableField; + } + set + { + this.uIDeletableFieldSet = true; + this.uIDeletableField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WebServiceExtension", "http://wixtoolset.org/schemas/v4/wxs/iis"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.fileFieldSet) + { + writer.WriteAttributeString("File", this.fileField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.groupFieldSet) + { + writer.WriteAttributeString("Group", this.groupField); + } + if (this.allowFieldSet) + { + if ((this.allowField == YesNoType.no)) + { + writer.WriteAttributeString("Allow", "no"); + } + if ((this.allowField == YesNoType.yes)) + { + writer.WriteAttributeString("Allow", "yes"); + } + } + if (this.uIDeletableFieldSet) + { + if ((this.uIDeletableField == YesNoType.no)) + { + writer.WriteAttributeString("UIDeletable", "no"); + } + if ((this.uIDeletableField == YesNoType.yes)) + { + writer.WriteAttributeString("UIDeletable", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("File" == name)) + { + this.fileField = value; + this.fileFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("Group" == name)) + { + this.groupField = value; + this.groupFieldSet = true; + } + if (("Allow" == name)) + { + this.allowField = Enums.ParseYesNoType(value); + this.allowFieldSet = true; + } + if (("UIDeletable" == name)) + { + this.uIDeletableField = Enums.ParseYesNoType(value); + this.uIDeletableFieldSet = true; + } + } + } +} 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 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 +namespace WixToolset.Harvesters.Serialize.Util +{ + using System; + using System.CodeDom.Compiler; + using System.Collections; + using System.Diagnostics.CodeAnalysis; + using System.Globalization; + using System.Xml; + using WixToolset.Harvesters.Serialize; + + + /// + /// Values of this type will either be "yes" or "no". + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum YesNoType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + no, + + yes, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public class Enums + { + + /// + /// Parses a YesNoType from a string. + /// + public static YesNoType ParseYesNoType(string value) + { + YesNoType parsedValue; + Enums.TryParseYesNoType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a YesNoType from a string. + /// + public static bool TryParseYesNoType(string value, out YesNoType parsedValue) + { + parsedValue = YesNoType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("no" == value)) + { + parsedValue = YesNoType.no; + } + else + { + if (("yes" == value)) + { + parsedValue = YesNoType.yes; + } + else + { + parsedValue = YesNoType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Parses a PerformanceCounterLanguageType from a string. + /// + public static PerformanceCounterLanguageType ParsePerformanceCounterLanguageType(string value) + { + PerformanceCounterLanguageType parsedValue; + Enums.TryParsePerformanceCounterLanguageType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a PerformanceCounterLanguageType from a string. + /// + public static bool TryParsePerformanceCounterLanguageType(string value, out PerformanceCounterLanguageType parsedValue) + { + parsedValue = PerformanceCounterLanguageType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("afrikaans" == value)) + { + parsedValue = PerformanceCounterLanguageType.afrikaans; + } + else + { + if (("albanian" == value)) + { + parsedValue = PerformanceCounterLanguageType.albanian; + } + else + { + if (("arabic" == value)) + { + parsedValue = PerformanceCounterLanguageType.arabic; + } + else + { + if (("armenian" == value)) + { + parsedValue = PerformanceCounterLanguageType.armenian; + } + else + { + if (("assamese" == value)) + { + parsedValue = PerformanceCounterLanguageType.assamese; + } + else + { + if (("azeri" == value)) + { + parsedValue = PerformanceCounterLanguageType.azeri; + } + else + { + if (("basque" == value)) + { + parsedValue = PerformanceCounterLanguageType.basque; + } + else + { + if (("belarusian" == value)) + { + parsedValue = PerformanceCounterLanguageType.belarusian; + } + else + { + if (("bengali" == value)) + { + parsedValue = PerformanceCounterLanguageType.bengali; + } + else + { + if (("bulgarian" == value)) + { + parsedValue = PerformanceCounterLanguageType.bulgarian; + } + else + { + if (("catalan" == value)) + { + parsedValue = PerformanceCounterLanguageType.catalan; + } + else + { + if (("chinese" == value)) + { + parsedValue = PerformanceCounterLanguageType.chinese; + } + else + { + if (("croatian" == value)) + { + parsedValue = PerformanceCounterLanguageType.croatian; + } + else + { + if (("czech" == value)) + { + parsedValue = PerformanceCounterLanguageType.czech; + } + else + { + if (("danish" == value)) + { + parsedValue = PerformanceCounterLanguageType.danish; + } + else + { + if (("divehi" == value)) + { + parsedValue = PerformanceCounterLanguageType.divehi; + } + else + { + if (("dutch" == value)) + { + parsedValue = PerformanceCounterLanguageType.dutch; + } + else + { + if (("english" == value)) + { + parsedValue = PerformanceCounterLanguageType.english; + } + else + { + if (("estonian" == value)) + { + parsedValue = PerformanceCounterLanguageType.estonian; + } + else + { + if (("faeroese" == value)) + { + parsedValue = PerformanceCounterLanguageType.faeroese; + } + else + { + if (("farsi" == value)) + { + parsedValue = PerformanceCounterLanguageType.farsi; + } + else + { + if (("finnish" == value)) + { + parsedValue = PerformanceCounterLanguageType.finnish; + } + else + { + if (("french" == value)) + { + parsedValue = PerformanceCounterLanguageType.french; + } + else + { + if (("galician" == value)) + { + parsedValue = PerformanceCounterLanguageType.galician; + } + else + { + if (("georgian" == value)) + { + parsedValue = PerformanceCounterLanguageType.georgian; + } + else + { + if (("german" == value)) + { + parsedValue = PerformanceCounterLanguageType.german; + } + else + { + if (("greek" == value)) + { + parsedValue = PerformanceCounterLanguageType.greek; + } + else + { + if (("gujarati" == value)) + { + parsedValue = PerformanceCounterLanguageType.gujarati; + } + else + { + if (("hebrew" == value)) + { + parsedValue = PerformanceCounterLanguageType.hebrew; + } + else + { + if (("hindi" == value)) + { + parsedValue = PerformanceCounterLanguageType.hindi; + } + else + { + if (("hungarian" == value)) + { + parsedValue = PerformanceCounterLanguageType.hungarian; + } + else + { + if (("icelandic" == value)) + { + parsedValue = PerformanceCounterLanguageType.icelandic; + } + else + { + if (("indonesian" == value)) + { + parsedValue = PerformanceCounterLanguageType.indonesian; + } + else + { + if (("italian" == value)) + { + parsedValue = PerformanceCounterLanguageType.italian; + } + else + { + if (("japanese" == value)) + { + parsedValue = PerformanceCounterLanguageType.japanese; + } + else + { + if (("kannada" == value)) + { + parsedValue = PerformanceCounterLanguageType.kannada; + } + else + { + if (("kashmiri" == value)) + { + parsedValue = PerformanceCounterLanguageType.kashmiri; + } + else + { + if (("kazak" == value)) + { + parsedValue = PerformanceCounterLanguageType.kazak; + } + else + { + if (("konkani" == value)) + { + parsedValue = PerformanceCounterLanguageType.konkani; + } + else + { + if (("korean" == value)) + { + parsedValue = PerformanceCounterLanguageType.korean; + } + else + { + if (("kyrgyz" == value)) + { + parsedValue = PerformanceCounterLanguageType.kyrgyz; + } + else + { + if (("latvian" == value)) + { + parsedValue = PerformanceCounterLanguageType.latvian; + } + else + { + if (("lithuanian" == value)) + { + parsedValue = PerformanceCounterLanguageType.lithuanian; + } + else + { + if (("macedonian" == value)) + { + parsedValue = PerformanceCounterLanguageType.macedonian; + } + else + { + if (("malay" == value)) + { + parsedValue = PerformanceCounterLanguageType.malay; + } + else + { + if (("malayalam" == value)) + { + parsedValue = PerformanceCounterLanguageType.malayalam; + } + else + { + if (("manipuri" == value)) + { + parsedValue = PerformanceCounterLanguageType.manipuri; + } + else + { + if (("marathi" == value)) + { + parsedValue = PerformanceCounterLanguageType.marathi; + } + else + { + if (("mongolian" == value)) + { + parsedValue = PerformanceCounterLanguageType.mongolian; + } + else + { + if (("nepali" == value)) + { + parsedValue = PerformanceCounterLanguageType.nepali; + } + else + { + if (("norwegian" == value)) + { + parsedValue = PerformanceCounterLanguageType.norwegian; + } + else + { + if (("oriya" == value)) + { + parsedValue = PerformanceCounterLanguageType.oriya; + } + else + { + if (("polish" == value)) + { + parsedValue = PerformanceCounterLanguageType.polish; + } + else + { + if (("portuguese" == value)) + { + parsedValue = PerformanceCounterLanguageType.portuguese; + } + else + { + if (("punjabi" == value)) + { + parsedValue = PerformanceCounterLanguageType.punjabi; + } + else + { + if (("romanian" == value)) + { + parsedValue = PerformanceCounterLanguageType.romanian; + } + else + { + if (("russian" == value)) + { + parsedValue = PerformanceCounterLanguageType.russian; + } + else + { + if (("sanskrit" == value)) + { + parsedValue = PerformanceCounterLanguageType.sanskrit; + } + else + { + if (("serbian" == value)) + { + parsedValue = PerformanceCounterLanguageType.serbian; + } + else + { + if (("sindhi" == value)) + { + parsedValue = PerformanceCounterLanguageType.sindhi; + } + else + { + if (("slovak" == value)) + { + parsedValue = PerformanceCounterLanguageType.slovak; + } + else + { + if (("slovenian" == value)) + { + parsedValue = PerformanceCounterLanguageType.slovenian; + } + else + { + if (("spanish" == value)) + { + parsedValue = PerformanceCounterLanguageType.spanish; + } + else + { + if (("swahili" == value)) + { + parsedValue = PerformanceCounterLanguageType.swahili; + } + else + { + if (("swedish" == value)) + { + parsedValue = PerformanceCounterLanguageType.swedish; + } + else + { + if (("syriac" == value)) + { + parsedValue = PerformanceCounterLanguageType.syriac; + } + else + { + if (("tamil" == value)) + { + parsedValue = PerformanceCounterLanguageType.tamil; + } + else + { + if (("tatar" == value)) + { + parsedValue = PerformanceCounterLanguageType.tatar; + } + else + { + if (("telugu" == value)) + { + parsedValue = PerformanceCounterLanguageType.telugu; + } + else + { + if (("thai" == value)) + { + parsedValue = PerformanceCounterLanguageType.thai; + } + else + { + if (("turkish" == value)) + { + parsedValue = PerformanceCounterLanguageType.turkish; + } + else + { + if (("ukrainian" == value)) + { + parsedValue = PerformanceCounterLanguageType.ukrainian; + } + else + { + if (("urdu" == value)) + { + parsedValue = PerformanceCounterLanguageType.urdu; + } + else + { + if (("uzbek" == value)) + { + parsedValue = PerformanceCounterLanguageType.uzbek; + } + else + { + if (("vietnamese" == value)) + { + parsedValue = PerformanceCounterLanguageType.vietnamese; + } + else + { + parsedValue = PerformanceCounterLanguageType.IllegalValue; + return false; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + return true; + } + + /// + /// Parses a PerformanceCounterTypesType from a string. + /// + public static PerformanceCounterTypesType ParsePerformanceCounterTypesType(string value) + { + PerformanceCounterTypesType parsedValue; + Enums.TryParsePerformanceCounterTypesType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a PerformanceCounterTypesType from a string. + /// + public static bool TryParsePerformanceCounterTypesType(string value, out PerformanceCounterTypesType parsedValue) + { + parsedValue = PerformanceCounterTypesType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("averageBase" == value)) + { + parsedValue = PerformanceCounterTypesType.averageBase; + } + else + { + if (("averageCount64" == value)) + { + parsedValue = PerformanceCounterTypesType.averageCount64; + } + else + { + if (("averageTimer32" == value)) + { + parsedValue = PerformanceCounterTypesType.averageTimer32; + } + else + { + if (("counterDelta32" == value)) + { + parsedValue = PerformanceCounterTypesType.counterDelta32; + } + else + { + if (("counterTimerInverse" == value)) + { + parsedValue = PerformanceCounterTypesType.counterTimerInverse; + } + else + { + if (("sampleFraction" == value)) + { + parsedValue = PerformanceCounterTypesType.sampleFraction; + } + else + { + if (("timer100Ns" == value)) + { + parsedValue = PerformanceCounterTypesType.timer100Ns; + } + else + { + if (("counterTimer" == value)) + { + parsedValue = PerformanceCounterTypesType.counterTimer; + } + else + { + if (("rawFraction" == value)) + { + parsedValue = PerformanceCounterTypesType.rawFraction; + } + else + { + if (("timer100NsInverse" == value)) + { + parsedValue = PerformanceCounterTypesType.timer100NsInverse; + } + else + { + if (("counterMultiTimer" == value)) + { + parsedValue = PerformanceCounterTypesType.counterMultiTimer; + } + else + { + if (("counterMultiTimer100Ns" == value)) + { + parsedValue = PerformanceCounterTypesType.counterMultiTimer100Ns; + } + else + { + if (("counterMultiTimerInverse" == value)) + { + parsedValue = PerformanceCounterTypesType.counterMultiTimerInverse; + } + else + { + if (("counterMultiTimer100NsInverse" == value)) + { + parsedValue = PerformanceCounterTypesType.counterMultiTimer100NsInverse; + } + else + { + if (("elapsedTime" == value)) + { + parsedValue = PerformanceCounterTypesType.elapsedTime; + } + else + { + if (("sampleBase" == value)) + { + parsedValue = PerformanceCounterTypesType.sampleBase; + } + else + { + if (("rawBase" == value)) + { + parsedValue = PerformanceCounterTypesType.rawBase; + } + else + { + if (("counterMultiBase" == value)) + { + parsedValue = PerformanceCounterTypesType.counterMultiBase; + } + else + { + if (("rateOfCountsPerSecond64" == value)) + { + parsedValue = PerformanceCounterTypesType.rateOfCountsPerSecond64; + } + else + { + if (("rateOfCountsPerSecond32" == value)) + { + parsedValue = PerformanceCounterTypesType.rateOfCountsPerSecond32; + } + else + { + if (("countPerTimeInterval64" == value)) + { + parsedValue = PerformanceCounterTypesType.countPerTimeInterval64; + } + else + { + if (("countPerTimeInterval32" == value)) + { + parsedValue = PerformanceCounterTypesType.countPerTimeInterval32; + } + else + { + if (("sampleCounter" == value)) + { + parsedValue = PerformanceCounterTypesType.sampleCounter; + } + else + { + if (("counterDelta64" == value)) + { + parsedValue = PerformanceCounterTypesType.counterDelta64; + } + else + { + if (("numberOfItems64" == value)) + { + parsedValue = PerformanceCounterTypesType.numberOfItems64; + } + else + { + if (("numberOfItems32" == value)) + { + parsedValue = PerformanceCounterTypesType.numberOfItems32; + } + else + { + if (("numberOfItemsHEX64" == value)) + { + parsedValue = PerformanceCounterTypesType.numberOfItemsHEX64; + } + else + { + if (("numberOfItemsHEX32" == value)) + { + parsedValue = PerformanceCounterTypesType.numberOfItemsHEX32; + } + else + { + parsedValue = PerformanceCounterTypesType.IllegalValue; + return false; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + return true; + } + } + + /// + /// Enumeration of valid languages for performance counters. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum PerformanceCounterLanguageType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + afrikaans, + + albanian, + + arabic, + + armenian, + + assamese, + + azeri, + + basque, + + belarusian, + + bengali, + + bulgarian, + + catalan, + + chinese, + + croatian, + + czech, + + danish, + + divehi, + + dutch, + + english, + + estonian, + + faeroese, + + farsi, + + finnish, + + french, + + galician, + + georgian, + + german, + + greek, + + gujarati, + + hebrew, + + hindi, + + hungarian, + + icelandic, + + indonesian, + + italian, + + japanese, + + kannada, + + kashmiri, + + kazak, + + konkani, + + korean, + + kyrgyz, + + latvian, + + lithuanian, + + macedonian, + + malay, + + malayalam, + + manipuri, + + marathi, + + mongolian, + + nepali, + + norwegian, + + oriya, + + polish, + + portuguese, + + punjabi, + + romanian, + + russian, + + sanskrit, + + serbian, + + sindhi, + + slovak, + + slovenian, + + spanish, + + swahili, + + swedish, + + syriac, + + tamil, + + tatar, + + telugu, + + thai, + + turkish, + + ukrainian, + + urdu, + + uzbek, + + vietnamese, + } + + /// + /// Enumeration of valid types for performance counters. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum PerformanceCounterTypesType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + averageBase, + + averageCount64, + + averageTimer32, + + counterDelta32, + + counterTimerInverse, + + sampleFraction, + + timer100Ns, + + counterTimer, + + rawFraction, + + timer100NsInverse, + + counterMultiTimer, + + counterMultiTimer100Ns, + + counterMultiTimerInverse, + + counterMultiTimer100NsInverse, + + elapsedTime, + + sampleBase, + + rawBase, + + counterMultiBase, + + rateOfCountsPerSecond64, + + rateOfCountsPerSecond32, + + countPerTimeInterval64, + + countPerTimeInterval32, + + sampleCounter, + + counterDelta64, + + numberOfItems64, + + numberOfItems32, + + numberOfItemsHEX64, + + numberOfItemsHEX32, + } + + /// + /// Closes applications or schedules a reboot if application cannot be closed. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class CloseApplication : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string targetField; + + private bool targetFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private int sequenceField; + + private bool sequenceFieldSet; + + private YesNoType closeMessageField; + + private bool closeMessageFieldSet; + + private YesNoType endSessionMessageField; + + private bool endSessionMessageFieldSet; + + private YesNoType elevatedCloseMessageField; + + private bool elevatedCloseMessageFieldSet; + + private YesNoType elevatedEndSessionMessageField; + + private bool elevatedEndSessionMessageFieldSet; + + private YesNoType rebootPromptField; + + private bool rebootPromptFieldSet; + + private YesNoType promptToContinueField; + + private bool promptToContinueFieldSet; + + private string propertyField; + + private bool propertyFieldSet; + + private int terminateProcessField; + + private bool terminateProcessFieldSet; + + private int timeoutField; + + private bool timeoutFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier for the close application (primary key). If the Id is not specified, one will be generated. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the exectuable to be closed. This should only be the file name. + /// + public string Target + { + get + { + return this.targetField; + } + set + { + this.targetFieldSet = true; + this.targetField = value; + } + } + + /// + /// Description to show if application is running and needs to be closed. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Optionally orders the applications to be closed. + /// + public int Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + /// + /// Optionally sends a close message to the application. Default is no. + /// + public YesNoType CloseMessage + { + get + { + return this.closeMessageField; + } + set + { + this.closeMessageFieldSet = true; + this.closeMessageField = value; + } + } + + /// + /// Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application. Default is "no". + /// + public YesNoType EndSessionMessage + { + get + { + return this.endSessionMessageField; + } + set + { + this.endSessionMessageFieldSet = true; + this.endSessionMessageField = value; + } + } + + /// + /// Optionally sends a close message to the application from deffered action without impersonation. Default is no. + /// + public YesNoType ElevatedCloseMessage + { + get + { + return this.elevatedCloseMessageField; + } + set + { + this.elevatedCloseMessageFieldSet = true; + this.elevatedCloseMessageField = value; + } + } + + /// + /// Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application from a deffered action without impersonation. Default is "no". + /// + public YesNoType ElevatedEndSessionMessage + { + get + { + return this.elevatedEndSessionMessageField; + } + set + { + this.elevatedEndSessionMessageFieldSet = true; + this.elevatedEndSessionMessageField = value; + } + } + + /// + /// 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". + /// + public YesNoType RebootPrompt + { + get + { + return this.rebootPromptField; + } + set + { + this.rebootPromptFieldSet = true; + this.rebootPromptField = value; + } + } + + /// + /// 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 + /// 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 + /// 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 + /// set on the CloseApplication element. The default is "no". + /// + public YesNoType PromptToContinue + { + get + { + return this.promptToContinueField; + } + set + { + this.promptToContinueFieldSet = true; + this.promptToContinueField = value; + } + } + + /// + /// 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. + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + /// + /// 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. + /// If this attribute is specified, the RebootPrompt attribute must be "no". The default is "no". + /// + public int TerminateProcess + { + get + { + return this.terminateProcessField; + } + set + { + this.terminateProcessFieldSet = true; + this.terminateProcessField = value; + } + } + + /// + /// 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 + /// the RebootPrompt or TerminateProcess attributes will be considered. The default value is "5" seconds. + /// + public int Timeout + { + get + { + return this.timeoutField; + } + set + { + this.timeoutFieldSet = true; + this.timeoutField = value; + } + } + + /// + /// Condition that determines if the application should be closed. Must be blank or evaluate to true + /// for the application to be scheduled for closing. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CloseApplication", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.targetFieldSet) + { + writer.WriteAttributeString("Target", this.targetField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.sequenceFieldSet) + { + writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); + } + if (this.closeMessageFieldSet) + { + if ((this.closeMessageField == YesNoType.no)) + { + writer.WriteAttributeString("CloseMessage", "no"); + } + if ((this.closeMessageField == YesNoType.yes)) + { + writer.WriteAttributeString("CloseMessage", "yes"); + } + } + if (this.endSessionMessageFieldSet) + { + if ((this.endSessionMessageField == YesNoType.no)) + { + writer.WriteAttributeString("EndSessionMessage", "no"); + } + if ((this.endSessionMessageField == YesNoType.yes)) + { + writer.WriteAttributeString("EndSessionMessage", "yes"); + } + } + if (this.elevatedCloseMessageFieldSet) + { + if ((this.elevatedCloseMessageField == YesNoType.no)) + { + writer.WriteAttributeString("ElevatedCloseMessage", "no"); + } + if ((this.elevatedCloseMessageField == YesNoType.yes)) + { + writer.WriteAttributeString("ElevatedCloseMessage", "yes"); + } + } + if (this.elevatedEndSessionMessageFieldSet) + { + if ((this.elevatedEndSessionMessageField == YesNoType.no)) + { + writer.WriteAttributeString("ElevatedEndSessionMessage", "no"); + } + if ((this.elevatedEndSessionMessageField == YesNoType.yes)) + { + writer.WriteAttributeString("ElevatedEndSessionMessage", "yes"); + } + } + if (this.rebootPromptFieldSet) + { + if ((this.rebootPromptField == YesNoType.no)) + { + writer.WriteAttributeString("RebootPrompt", "no"); + } + if ((this.rebootPromptField == YesNoType.yes)) + { + writer.WriteAttributeString("RebootPrompt", "yes"); + } + } + if (this.promptToContinueFieldSet) + { + if ((this.promptToContinueField == YesNoType.no)) + { + writer.WriteAttributeString("PromptToContinue", "no"); + } + if ((this.promptToContinueField == YesNoType.yes)) + { + writer.WriteAttributeString("PromptToContinue", "yes"); + } + } + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + if (this.terminateProcessFieldSet) + { + writer.WriteAttributeString("TerminateProcess", this.terminateProcessField.ToString(CultureInfo.InvariantCulture)); + } + if (this.timeoutFieldSet) + { + writer.WriteAttributeString("Timeout", this.timeoutField.ToString(CultureInfo.InvariantCulture)); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Target" == name)) + { + this.targetField = value; + this.targetFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("Sequence" == name)) + { + this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sequenceFieldSet = true; + } + if (("CloseMessage" == name)) + { + this.closeMessageField = Enums.ParseYesNoType(value); + this.closeMessageFieldSet = true; + } + if (("EndSessionMessage" == name)) + { + this.endSessionMessageField = Enums.ParseYesNoType(value); + this.endSessionMessageFieldSet = true; + } + if (("ElevatedCloseMessage" == name)) + { + this.elevatedCloseMessageField = Enums.ParseYesNoType(value); + this.elevatedCloseMessageFieldSet = true; + } + if (("ElevatedEndSessionMessage" == name)) + { + this.elevatedEndSessionMessageField = Enums.ParseYesNoType(value); + this.elevatedEndSessionMessageFieldSet = true; + } + if (("RebootPrompt" == name)) + { + this.rebootPromptField = Enums.ParseYesNoType(value); + this.rebootPromptFieldSet = true; + } + if (("PromptToContinue" == name)) + { + this.promptToContinueField = Enums.ParseYesNoType(value); + this.promptToContinueFieldSet = true; + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + if (("TerminateProcess" == name)) + { + this.terminateProcessField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.terminateProcessFieldSet = true; + } + if (("Timeout" == name)) + { + this.timeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.timeoutFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + /// + /// Describes a component search. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class ComponentSearch : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string variableField; + + private bool variableFieldSet; + + private string conditionField; + + private bool conditionFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private string guidField; + + private bool guidFieldSet; + + private string productCodeField; + + private bool productCodeFieldSet; + + private ResultType resultField; + + private bool resultFieldSet; + + private ISchemaElement parentElement; + + /// + /// Id of the search for ordering and dependency. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the variable in which to place the result of the search. + /// + public string Variable + { + get + { + return this.variableField; + } + set + { + this.variableFieldSet = true; + this.variableField = value; + } + } + + /// + /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. + /// + public string Condition + { + get + { + return this.conditionField; + } + set + { + this.conditionFieldSet = true; + this.conditionField = value; + } + } + + /// + /// Id of the search that this one should come after. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// Component to search for. + /// + public string Guid + { + get + { + return this.guidField; + } + set + { + this.guidFieldSet = true; + this.guidField = value; + } + } + + /// + /// Optional ProductCode to determine if the component is installed. + /// + public string ProductCode + { + get + { + return this.productCodeField; + } + set + { + this.productCodeFieldSet = true; + this.productCodeField = value; + } + } + + /// + /// Rather than saving the matching key path into the variable, a ComponentSearch can save an attribute of the component instead. + /// + public ResultType Result + { + get + { + return this.resultField; + } + set + { + this.resultFieldSet = true; + this.resultField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ResultType from a string. + /// + public static ResultType ParseResultType(string value) + { + ResultType parsedValue; + ComponentSearch.TryParseResultType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ResultType from a string. + /// + public static bool TryParseResultType(string value, out ResultType parsedValue) + { + parsedValue = ResultType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("directory" == value)) + { + parsedValue = ResultType.directory; + } + else + { + if (("state" == value)) + { + parsedValue = ResultType.state; + } + else + { + if (("keyPath" == value)) + { + parsedValue = ResultType.keyPath; + } + else + { + parsedValue = ResultType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ComponentSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.variableFieldSet) + { + writer.WriteAttributeString("Variable", this.variableField); + } + if (this.conditionFieldSet) + { + writer.WriteAttributeString("Condition", this.conditionField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.guidFieldSet) + { + writer.WriteAttributeString("Guid", this.guidField); + } + if (this.productCodeFieldSet) + { + writer.WriteAttributeString("ProductCode", this.productCodeField); + } + if (this.resultFieldSet) + { + if ((this.resultField == ResultType.directory)) + { + writer.WriteAttributeString("Result", "directory"); + } + if ((this.resultField == ResultType.state)) + { + writer.WriteAttributeString("Result", "state"); + } + if ((this.resultField == ResultType.keyPath)) + { + writer.WriteAttributeString("Result", "keyPath"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Variable" == name)) + { + this.variableField = value; + this.variableFieldSet = true; + } + if (("Condition" == name)) + { + this.conditionField = value; + this.conditionFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("Guid" == name)) + { + this.guidField = value; + this.guidFieldSet = true; + } + if (("ProductCode" == name)) + { + this.productCodeField = value; + this.productCodeFieldSet = true; + } + if (("Result" == name)) + { + this.resultField = ComponentSearch.ParseResultType(value); + this.resultFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum ResultType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Saves the parent directory for the component's file key path; other types of key path are returned unmodified. + /// + directory, + + /// + /// 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) + /// + state, + + /// + /// Saves the key path of the component if installed. This is the default. + /// + keyPath, + } + } + + /// + /// References a ComponentSearch. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class ComponentSearchRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ComponentSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Describes a directory search. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class DirectorySearch : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string variableField; + + private bool variableFieldSet; + + private string conditionField; + + private bool conditionFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private string pathField; + + private bool pathFieldSet; + + private ResultType resultField; + + private bool resultFieldSet; + + private ISchemaElement parentElement; + + /// + /// Id of the search for ordering and dependency. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the variable in which to place the result of the search. + /// + public string Variable + { + get + { + return this.variableField; + } + set + { + this.variableFieldSet = true; + this.variableField = value; + } + } + + /// + /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. + /// + public string Condition + { + get + { + return this.conditionField; + } + set + { + this.conditionFieldSet = true; + this.conditionField = value; + } + } + + /// + /// Id of the search that this one should come after. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// Directory path to search for. + /// + public string Path + { + get + { + return this.pathField; + } + set + { + this.pathFieldSet = true; + this.pathField = value; + } + } + + /// + /// Rather than saving the matching directory path into the variable, a DirectorySearch can save an + /// attribute of the matching directory instead. + /// + public ResultType Result + { + get + { + return this.resultField; + } + set + { + this.resultFieldSet = true; + this.resultField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ResultType from a string. + /// + public static ResultType ParseResultType(string value) + { + ResultType parsedValue; + DirectorySearch.TryParseResultType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ResultType from a string. + /// + public static bool TryParseResultType(string value, out ResultType parsedValue) + { + parsedValue = ResultType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("exists" == value)) + { + parsedValue = ResultType.exists; + } + else + { + parsedValue = ResultType.IllegalValue; + return false; + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DirectorySearch", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.variableFieldSet) + { + writer.WriteAttributeString("Variable", this.variableField); + } + if (this.conditionFieldSet) + { + writer.WriteAttributeString("Condition", this.conditionField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.pathFieldSet) + { + writer.WriteAttributeString("Path", this.pathField); + } + if (this.resultFieldSet) + { + if ((this.resultField == ResultType.exists)) + { + writer.WriteAttributeString("Result", "exists"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Variable" == name)) + { + this.variableField = value; + this.variableFieldSet = true; + } + if (("Condition" == name)) + { + this.conditionField = value; + this.conditionFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("Path" == name)) + { + this.pathField = value; + this.pathFieldSet = true; + } + if (("Result" == name)) + { + this.resultField = DirectorySearch.ParseResultType(value); + this.resultFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum ResultType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Saves true if a matching directory is found; false otherwise. + /// + exists, + } + } + + /// + /// References a DirectorySearch. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class DirectorySearchRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DirectorySearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Creates an event source. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class EventSource : ISchemaElement, ISetAttributes + { + + private int categoryCountField; + + private bool categoryCountFieldSet; + + private string categoryMessageFileField; + + private bool categoryMessageFileFieldSet; + + private string eventMessageFileField; + + private bool eventMessageFileFieldSet; + + private YesNoType keyPathField; + + private bool keyPathFieldSet; + + private string logField; + + private bool logFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string parameterMessageFileField; + + private bool parameterMessageFileFieldSet; + + private YesNoType supportsErrorsField; + + private bool supportsErrorsFieldSet; + + private YesNoType supportsFailureAuditsField; + + private bool supportsFailureAuditsFieldSet; + + private YesNoType supportsInformationalsField; + + private bool supportsInformationalsFieldSet; + + private YesNoType supportsSuccessAuditsField; + + private bool supportsSuccessAuditsFieldSet; + + private YesNoType supportsWarningsField; + + private bool supportsWarningsFieldSet; + + private ISchemaElement parentElement; + + /// + /// The number of categories in CategoryMessageFile. CategoryMessageFile + /// must be specified too. + /// + public int CategoryCount + { + get + { + return this.categoryCountField; + } + set + { + this.categoryCountFieldSet = true; + this.categoryCountField = value; + } + } + + /// + /// Name of the category message file. CategoryCount must be specified too. + /// Note that this is a formatted field, so you can use [#fileId] syntax to + /// refer to a file being installed. It is also written as a REG_EXPAND_SZ + /// string, so you can use %environment_variable% syntax to refer to a file + /// already present on the user's machine. + /// + public string CategoryMessageFile + { + get + { + return this.categoryMessageFileField; + } + set + { + this.categoryMessageFileFieldSet = true; + this.categoryMessageFileField = value; + } + } + + /// + /// Name of the event message file. + /// Note that this is a formatted field, so you can use [#fileId] syntax to + /// refer to a file being installed. It is also written as a REG_EXPAND_SZ + /// string, so you can use %environment_variable% syntax to refer to a file + /// already present on the user's machine. + /// + public string EventMessageFile + { + get + { + return this.eventMessageFileField; + } + set + { + this.eventMessageFileFieldSet = true; + this.eventMessageFileField = value; + } + } + + /// + /// Marks the EventSource registry as the key path of the component it belongs to. + /// + public YesNoType KeyPath + { + get + { + return this.keyPathField; + } + set + { + this.keyPathFieldSet = true; + this.keyPathField = value; + } + } + + /// + /// Name of the event source's log. + /// + public string Log + { + get + { + return this.logField; + } + set + { + this.logFieldSet = true; + this.logField = value; + } + } + + /// + /// Name of the event source. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Name of the parameter message file. + /// Note that this is a formatted field, so you can use [#fileId] syntax to + /// refer to a file being installed. It is also written as a REG_EXPAND_SZ + /// string, so you can use %environment_variable% syntax to refer to a file + /// already present on the user's machine. + /// + public string ParameterMessageFile + { + get + { + return this.parameterMessageFileField; + } + set + { + this.parameterMessageFileFieldSet = true; + this.parameterMessageFileField = value; + } + } + + /// + /// Equivalent to EVENTLOG_ERROR_TYPE. + /// + public YesNoType SupportsErrors + { + get + { + return this.supportsErrorsField; + } + set + { + this.supportsErrorsFieldSet = true; + this.supportsErrorsField = value; + } + } + + /// + /// Equivalent to EVENTLOG_AUDIT_FAILURE. + /// + public YesNoType SupportsFailureAudits + { + get + { + return this.supportsFailureAuditsField; + } + set + { + this.supportsFailureAuditsFieldSet = true; + this.supportsFailureAuditsField = value; + } + } + + /// + /// Equivalent to EVENTLOG_INFORMATION_TYPE. + /// + public YesNoType SupportsInformationals + { + get + { + return this.supportsInformationalsField; + } + set + { + this.supportsInformationalsFieldSet = true; + this.supportsInformationalsField = value; + } + } + + /// + /// Equivalent to EVENTLOG_AUDIT_SUCCESS. + /// + public YesNoType SupportsSuccessAudits + { + get + { + return this.supportsSuccessAuditsField; + } + set + { + this.supportsSuccessAuditsFieldSet = true; + this.supportsSuccessAuditsField = value; + } + } + + /// + /// Equivalent to EVENTLOG_WARNING_TYPE. + /// + public YesNoType SupportsWarnings + { + get + { + return this.supportsWarningsField; + } + set + { + this.supportsWarningsFieldSet = true; + this.supportsWarningsField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("EventSource", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.categoryCountFieldSet) + { + writer.WriteAttributeString("CategoryCount", this.categoryCountField.ToString(CultureInfo.InvariantCulture)); + } + if (this.categoryMessageFileFieldSet) + { + writer.WriteAttributeString("CategoryMessageFile", this.categoryMessageFileField); + } + if (this.eventMessageFileFieldSet) + { + writer.WriteAttributeString("EventMessageFile", this.eventMessageFileField); + } + if (this.keyPathFieldSet) + { + if ((this.keyPathField == YesNoType.no)) + { + writer.WriteAttributeString("KeyPath", "no"); + } + if ((this.keyPathField == YesNoType.yes)) + { + writer.WriteAttributeString("KeyPath", "yes"); + } + } + if (this.logFieldSet) + { + writer.WriteAttributeString("Log", this.logField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.parameterMessageFileFieldSet) + { + writer.WriteAttributeString("ParameterMessageFile", this.parameterMessageFileField); + } + if (this.supportsErrorsFieldSet) + { + if ((this.supportsErrorsField == YesNoType.no)) + { + writer.WriteAttributeString("SupportsErrors", "no"); + } + if ((this.supportsErrorsField == YesNoType.yes)) + { + writer.WriteAttributeString("SupportsErrors", "yes"); + } + } + if (this.supportsFailureAuditsFieldSet) + { + if ((this.supportsFailureAuditsField == YesNoType.no)) + { + writer.WriteAttributeString("SupportsFailureAudits", "no"); + } + if ((this.supportsFailureAuditsField == YesNoType.yes)) + { + writer.WriteAttributeString("SupportsFailureAudits", "yes"); + } + } + if (this.supportsInformationalsFieldSet) + { + if ((this.supportsInformationalsField == YesNoType.no)) + { + writer.WriteAttributeString("SupportsInformationals", "no"); + } + if ((this.supportsInformationalsField == YesNoType.yes)) + { + writer.WriteAttributeString("SupportsInformationals", "yes"); + } + } + if (this.supportsSuccessAuditsFieldSet) + { + if ((this.supportsSuccessAuditsField == YesNoType.no)) + { + writer.WriteAttributeString("SupportsSuccessAudits", "no"); + } + if ((this.supportsSuccessAuditsField == YesNoType.yes)) + { + writer.WriteAttributeString("SupportsSuccessAudits", "yes"); + } + } + if (this.supportsWarningsFieldSet) + { + if ((this.supportsWarningsField == YesNoType.no)) + { + writer.WriteAttributeString("SupportsWarnings", "no"); + } + if ((this.supportsWarningsField == YesNoType.yes)) + { + writer.WriteAttributeString("SupportsWarnings", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("CategoryCount" == name)) + { + this.categoryCountField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.categoryCountFieldSet = true; + } + if (("CategoryMessageFile" == name)) + { + this.categoryMessageFileField = value; + this.categoryMessageFileFieldSet = true; + } + if (("EventMessageFile" == name)) + { + this.eventMessageFileField = value; + this.eventMessageFileFieldSet = true; + } + if (("KeyPath" == name)) + { + this.keyPathField = Enums.ParseYesNoType(value); + this.keyPathFieldSet = true; + } + if (("Log" == name)) + { + this.logField = value; + this.logFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("ParameterMessageFile" == name)) + { + this.parameterMessageFileField = value; + this.parameterMessageFileFieldSet = true; + } + if (("SupportsErrors" == name)) + { + this.supportsErrorsField = Enums.ParseYesNoType(value); + this.supportsErrorsFieldSet = true; + } + if (("SupportsFailureAudits" == name)) + { + this.supportsFailureAuditsField = Enums.ParseYesNoType(value); + this.supportsFailureAuditsFieldSet = true; + } + if (("SupportsInformationals" == name)) + { + this.supportsInformationalsField = Enums.ParseYesNoType(value); + this.supportsInformationalsFieldSet = true; + } + if (("SupportsSuccessAudits" == name)) + { + this.supportsSuccessAuditsField = Enums.ParseYesNoType(value); + this.supportsSuccessAuditsFieldSet = true; + } + if (("SupportsWarnings" == name)) + { + this.supportsWarningsField = Enums.ParseYesNoType(value); + this.supportsWarningsFieldSet = true; + } + } + } + + /// + /// Describes a file search. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class FileSearch : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string variableField; + + private bool variableFieldSet; + + private string conditionField; + + private bool conditionFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private string pathField; + + private bool pathFieldSet; + + private ResultType resultField; + + private bool resultFieldSet; + + private ISchemaElement parentElement; + + /// + /// Id of the search for ordering and dependency. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the variable in which to place the result of the search. + /// + public string Variable + { + get + { + return this.variableField; + } + set + { + this.variableFieldSet = true; + this.variableField = value; + } + } + + /// + /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. + /// + public string Condition + { + get + { + return this.conditionField; + } + set + { + this.conditionFieldSet = true; + this.conditionField = value; + } + } + + /// + /// Id of the search that this one should come after. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// File path to search for. + /// + public string Path + { + get + { + return this.pathField; + } + set + { + this.pathFieldSet = true; + this.pathField = value; + } + } + + /// + /// Rather than saving the matching file path into the variable, a FileSearch can save an attribute of the matching file instead. + /// + public ResultType Result + { + get + { + return this.resultField; + } + set + { + this.resultFieldSet = true; + this.resultField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ResultType from a string. + /// + public static ResultType ParseResultType(string value) + { + ResultType parsedValue; + FileSearch.TryParseResultType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ResultType from a string. + /// + public static bool TryParseResultType(string value, out ResultType parsedValue) + { + parsedValue = ResultType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("exists" == value)) + { + parsedValue = ResultType.exists; + } + else + { + if (("version" == value)) + { + parsedValue = ResultType.version; + } + else + { + parsedValue = ResultType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FileSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.variableFieldSet) + { + writer.WriteAttributeString("Variable", this.variableField); + } + if (this.conditionFieldSet) + { + writer.WriteAttributeString("Condition", this.conditionField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.pathFieldSet) + { + writer.WriteAttributeString("Path", this.pathField); + } + if (this.resultFieldSet) + { + if ((this.resultField == ResultType.exists)) + { + writer.WriteAttributeString("Result", "exists"); + } + if ((this.resultField == ResultType.version)) + { + writer.WriteAttributeString("Result", "version"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Variable" == name)) + { + this.variableField = value; + this.variableFieldSet = true; + } + if (("Condition" == name)) + { + this.conditionField = value; + this.conditionFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("Path" == name)) + { + this.pathField = value; + this.pathFieldSet = true; + } + if (("Result" == name)) + { + this.resultField = FileSearch.ParseResultType(value); + this.resultFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum ResultType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Saves true if a matching file is found; false otherwise. + /// + exists, + + /// + /// Saves the version information for files that have it (.exe, .dll); zero-version (0.0.0.0) otherwise. + /// + version, + } + } + + /// + /// References a FileSearch. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class FileSearchRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FileSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Creates a file share out of the component's directory. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class FileShare : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private ISchemaElement parentElement; + + public FileShare() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(FileSharePermission))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for the file share (primary key). + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the file share. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Description of the file share. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("FileSharePermission" == childName)) + { + childValue = new FileSharePermission(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FileShare", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + } + } + + /// + /// Sets ACLs on a FileShare. This element has no Id attribute. + /// The table and key are taken from the parent element. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class FileSharePermission : ISchemaElement, ISetAttributes + { + + private string userField; + + private bool userFieldSet; + + private YesNoType readField; + + private bool readFieldSet; + + private YesNoType deleteField; + + private bool deleteFieldSet; + + private YesNoType readPermissionField; + + private bool readPermissionFieldSet; + + private YesNoType changePermissionField; + + private bool changePermissionFieldSet; + + private YesNoType takeOwnershipField; + + private bool takeOwnershipFieldSet; + + private YesNoType readAttributesField; + + private bool readAttributesFieldSet; + + private YesNoType writeAttributesField; + + private bool writeAttributesFieldSet; + + private YesNoType readExtendedAttributesField; + + private bool readExtendedAttributesFieldSet; + + private YesNoType writeExtendedAttributesField; + + private bool writeExtendedAttributesFieldSet; + + private YesNoType synchronizeField; + + private bool synchronizeFieldSet; + + private YesNoType createFileField; + + private bool createFileFieldSet; + + private YesNoType createChildField; + + private bool createChildFieldSet; + + private YesNoType deleteChildField; + + private bool deleteChildFieldSet; + + private YesNoType traverseField; + + private bool traverseFieldSet; + + private YesNoType genericAllField; + + private bool genericAllFieldSet; + + private YesNoType genericExecuteField; + + private bool genericExecuteFieldSet; + + private YesNoType genericWriteField; + + private bool genericWriteFieldSet; + + private YesNoType genericReadField; + + private bool genericReadFieldSet; + + private ISchemaElement parentElement; + + public string User + { + get + { + return this.userField; + } + set + { + this.userFieldSet = true; + this.userField = value; + } + } + + public YesNoType Read + { + get + { + return this.readField; + } + set + { + this.readFieldSet = true; + this.readField = value; + } + } + + public YesNoType Delete + { + get + { + return this.deleteField; + } + set + { + this.deleteFieldSet = true; + this.deleteField = value; + } + } + + public YesNoType ReadPermission + { + get + { + return this.readPermissionField; + } + set + { + this.readPermissionFieldSet = true; + this.readPermissionField = value; + } + } + + public YesNoType ChangePermission + { + get + { + return this.changePermissionField; + } + set + { + this.changePermissionFieldSet = true; + this.changePermissionField = value; + } + } + + public YesNoType TakeOwnership + { + get + { + return this.takeOwnershipField; + } + set + { + this.takeOwnershipFieldSet = true; + this.takeOwnershipField = value; + } + } + + public YesNoType ReadAttributes + { + get + { + return this.readAttributesField; + } + set + { + this.readAttributesFieldSet = true; + this.readAttributesField = value; + } + } + + public YesNoType WriteAttributes + { + get + { + return this.writeAttributesField; + } + set + { + this.writeAttributesFieldSet = true; + this.writeAttributesField = value; + } + } + + public YesNoType ReadExtendedAttributes + { + get + { + return this.readExtendedAttributesField; + } + set + { + this.readExtendedAttributesFieldSet = true; + this.readExtendedAttributesField = value; + } + } + + public YesNoType WriteExtendedAttributes + { + get + { + return this.writeExtendedAttributesField; + } + set + { + this.writeExtendedAttributesFieldSet = true; + this.writeExtendedAttributesField = value; + } + } + + public YesNoType Synchronize + { + get + { + return this.synchronizeField; + } + set + { + this.synchronizeFieldSet = true; + this.synchronizeField = value; + } + } + + /// + /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent. + /// + public YesNoType CreateFile + { + get + { + return this.createFileField; + } + set + { + this.createFileFieldSet = true; + this.createFileField = value; + } + } + + /// + /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent. + /// + public YesNoType CreateChild + { + get + { + return this.createChildField; + } + set + { + this.createChildFieldSet = true; + this.createChildField = value; + } + } + + /// + /// 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. + /// + public YesNoType DeleteChild + { + get + { + return this.deleteChildField; + } + set + { + this.deleteChildFieldSet = true; + this.deleteChildField = value; + } + } + + /// + /// 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. + /// + public YesNoType Traverse + { + get + { + return this.traverseField; + } + set + { + this.traverseFieldSet = true; + this.traverseField = value; + } + } + + public YesNoType GenericAll + { + get + { + return this.genericAllField; + } + set + { + this.genericAllFieldSet = true; + this.genericAllField = value; + } + } + + public YesNoType GenericExecute + { + get + { + return this.genericExecuteField; + } + set + { + this.genericExecuteFieldSet = true; + this.genericExecuteField = value; + } + } + + public YesNoType GenericWrite + { + get + { + return this.genericWriteField; + } + set + { + this.genericWriteFieldSet = true; + this.genericWriteField = value; + } + } + + /// + /// specifying this will fail to grant read access + /// + public YesNoType GenericRead + { + get + { + return this.genericReadField; + } + set + { + this.genericReadFieldSet = true; + this.genericReadField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FileSharePermission", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.userFieldSet) + { + writer.WriteAttributeString("User", this.userField); + } + if (this.readFieldSet) + { + if ((this.readField == YesNoType.no)) + { + writer.WriteAttributeString("Read", "no"); + } + if ((this.readField == YesNoType.yes)) + { + writer.WriteAttributeString("Read", "yes"); + } + } + if (this.deleteFieldSet) + { + if ((this.deleteField == YesNoType.no)) + { + writer.WriteAttributeString("Delete", "no"); + } + if ((this.deleteField == YesNoType.yes)) + { + writer.WriteAttributeString("Delete", "yes"); + } + } + if (this.readPermissionFieldSet) + { + if ((this.readPermissionField == YesNoType.no)) + { + writer.WriteAttributeString("ReadPermission", "no"); + } + if ((this.readPermissionField == YesNoType.yes)) + { + writer.WriteAttributeString("ReadPermission", "yes"); + } + } + if (this.changePermissionFieldSet) + { + if ((this.changePermissionField == YesNoType.no)) + { + writer.WriteAttributeString("ChangePermission", "no"); + } + if ((this.changePermissionField == YesNoType.yes)) + { + writer.WriteAttributeString("ChangePermission", "yes"); + } + } + if (this.takeOwnershipFieldSet) + { + if ((this.takeOwnershipField == YesNoType.no)) + { + writer.WriteAttributeString("TakeOwnership", "no"); + } + if ((this.takeOwnershipField == YesNoType.yes)) + { + writer.WriteAttributeString("TakeOwnership", "yes"); + } + } + if (this.readAttributesFieldSet) + { + if ((this.readAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("ReadAttributes", "no"); + } + if ((this.readAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("ReadAttributes", "yes"); + } + } + if (this.writeAttributesFieldSet) + { + if ((this.writeAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("WriteAttributes", "no"); + } + if ((this.writeAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("WriteAttributes", "yes"); + } + } + if (this.readExtendedAttributesFieldSet) + { + if ((this.readExtendedAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("ReadExtendedAttributes", "no"); + } + if ((this.readExtendedAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("ReadExtendedAttributes", "yes"); + } + } + if (this.writeExtendedAttributesFieldSet) + { + if ((this.writeExtendedAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("WriteExtendedAttributes", "no"); + } + if ((this.writeExtendedAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("WriteExtendedAttributes", "yes"); + } + } + if (this.synchronizeFieldSet) + { + if ((this.synchronizeField == YesNoType.no)) + { + writer.WriteAttributeString("Synchronize", "no"); + } + if ((this.synchronizeField == YesNoType.yes)) + { + writer.WriteAttributeString("Synchronize", "yes"); + } + } + if (this.createFileFieldSet) + { + if ((this.createFileField == YesNoType.no)) + { + writer.WriteAttributeString("CreateFile", "no"); + } + if ((this.createFileField == YesNoType.yes)) + { + writer.WriteAttributeString("CreateFile", "yes"); + } + } + if (this.createChildFieldSet) + { + if ((this.createChildField == YesNoType.no)) + { + writer.WriteAttributeString("CreateChild", "no"); + } + if ((this.createChildField == YesNoType.yes)) + { + writer.WriteAttributeString("CreateChild", "yes"); + } + } + if (this.deleteChildFieldSet) + { + if ((this.deleteChildField == YesNoType.no)) + { + writer.WriteAttributeString("DeleteChild", "no"); + } + if ((this.deleteChildField == YesNoType.yes)) + { + writer.WriteAttributeString("DeleteChild", "yes"); + } + } + if (this.traverseFieldSet) + { + if ((this.traverseField == YesNoType.no)) + { + writer.WriteAttributeString("Traverse", "no"); + } + if ((this.traverseField == YesNoType.yes)) + { + writer.WriteAttributeString("Traverse", "yes"); + } + } + if (this.genericAllFieldSet) + { + if ((this.genericAllField == YesNoType.no)) + { + writer.WriteAttributeString("GenericAll", "no"); + } + if ((this.genericAllField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericAll", "yes"); + } + } + if (this.genericExecuteFieldSet) + { + if ((this.genericExecuteField == YesNoType.no)) + { + writer.WriteAttributeString("GenericExecute", "no"); + } + if ((this.genericExecuteField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericExecute", "yes"); + } + } + if (this.genericWriteFieldSet) + { + if ((this.genericWriteField == YesNoType.no)) + { + writer.WriteAttributeString("GenericWrite", "no"); + } + if ((this.genericWriteField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericWrite", "yes"); + } + } + if (this.genericReadFieldSet) + { + if ((this.genericReadField == YesNoType.no)) + { + writer.WriteAttributeString("GenericRead", "no"); + } + if ((this.genericReadField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericRead", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("User" == name)) + { + this.userField = value; + this.userFieldSet = true; + } + if (("Read" == name)) + { + this.readField = Enums.ParseYesNoType(value); + this.readFieldSet = true; + } + if (("Delete" == name)) + { + this.deleteField = Enums.ParseYesNoType(value); + this.deleteFieldSet = true; + } + if (("ReadPermission" == name)) + { + this.readPermissionField = Enums.ParseYesNoType(value); + this.readPermissionFieldSet = true; + } + if (("ChangePermission" == name)) + { + this.changePermissionField = Enums.ParseYesNoType(value); + this.changePermissionFieldSet = true; + } + if (("TakeOwnership" == name)) + { + this.takeOwnershipField = Enums.ParseYesNoType(value); + this.takeOwnershipFieldSet = true; + } + if (("ReadAttributes" == name)) + { + this.readAttributesField = Enums.ParseYesNoType(value); + this.readAttributesFieldSet = true; + } + if (("WriteAttributes" == name)) + { + this.writeAttributesField = Enums.ParseYesNoType(value); + this.writeAttributesFieldSet = true; + } + if (("ReadExtendedAttributes" == name)) + { + this.readExtendedAttributesField = Enums.ParseYesNoType(value); + this.readExtendedAttributesFieldSet = true; + } + if (("WriteExtendedAttributes" == name)) + { + this.writeExtendedAttributesField = Enums.ParseYesNoType(value); + this.writeExtendedAttributesFieldSet = true; + } + if (("Synchronize" == name)) + { + this.synchronizeField = Enums.ParseYesNoType(value); + this.synchronizeFieldSet = true; + } + if (("CreateFile" == name)) + { + this.createFileField = Enums.ParseYesNoType(value); + this.createFileFieldSet = true; + } + if (("CreateChild" == name)) + { + this.createChildField = Enums.ParseYesNoType(value); + this.createChildFieldSet = true; + } + if (("DeleteChild" == name)) + { + this.deleteChildField = Enums.ParseYesNoType(value); + this.deleteChildFieldSet = true; + } + if (("Traverse" == name)) + { + this.traverseField = Enums.ParseYesNoType(value); + this.traverseFieldSet = true; + } + if (("GenericAll" == name)) + { + this.genericAllField = Enums.ParseYesNoType(value); + this.genericAllFieldSet = true; + } + if (("GenericExecute" == name)) + { + this.genericExecuteField = Enums.ParseYesNoType(value); + this.genericExecuteFieldSet = true; + } + if (("GenericWrite" == name)) + { + this.genericWriteField = Enums.ParseYesNoType(value); + this.genericWriteFieldSet = true; + } + if (("GenericRead" == name)) + { + this.genericReadField = Enums.ParseYesNoType(value); + this.genericReadFieldSet = true; + } + } + } + + /// + /// Formats a file's contents at install time. The contents are formatted according to the rules of the + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class FormatFile : ISchemaElement, ISetAttributes + { + + private string binaryKeyField; + + private bool binaryKeyFieldSet; + + private ISchemaElement parentElement; + + /// + /// The id of a Binary row that contains a copy of the file. The file in the Binary table overwrites whatever + /// file is installed by the parent component. + /// + public string BinaryKey + { + get + { + return this.binaryKeyField; + } + set + { + this.binaryKeyFieldSet = true; + this.binaryKeyField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FormatFile", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.binaryKeyFieldSet) + { + writer.WriteAttributeString("BinaryKey", this.binaryKeyField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("BinaryKey" == name)) + { + this.binaryKeyField = value; + this.binaryKeyFieldSet = true; + } + } + } + + /// + /// Finds user groups on the local machine or specified Active Directory domain. The local machine will be + /// searched for the group first then fallback to looking in Active Directory. This element is not capable + /// of creating new groups but can be used to add new or existing users to an existing group. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class Group : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string domainField; + + private bool domainFieldSet; + + private ISchemaElement parentElement; + + /// + /// Unique identifier in your installation package for this group. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// A + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// An optional + /// + public string Domain + { + get + { + return this.domainField; + } + set + { + this.domainFieldSet = true; + this.domainField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Group", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.domainFieldSet) + { + writer.WriteAttributeString("Domain", this.domainField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Domain" == name)) + { + this.domainField = value; + this.domainFieldSet = true; + } + } + } + + /// + /// Used to join a user to a group + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class GroupRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("GroupRef", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Creates a shortcut to a URL. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class InternetShortcut : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string directoryField; + + private bool directoryFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string targetField; + + private bool targetFieldSet; + + private TypeType typeField; + + private bool typeFieldSet; + + private string iconFileField; + + private bool iconFileFieldSet; + + private int iconIndexField; + + private bool iconIndexFieldSet; + + private ISchemaElement parentElement; + + /// + /// Unique identifier in your installation package for this Internet shortcut. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Identifier reference to Directory element where shortcut is to be created. This attribute's value defaults to the parent Component directory. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + /// + /// The name of the shortcut file, which is visible to the user. (The .lnk + /// extension is added automatically and by default, is not shown to the user.) + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// URL that should be opened when the user selects the shortcut. Windows + /// opens the URL in the appropriate handler for the protocol specified + /// in the URL. Note that this is a formatted field, so you can use + /// [#fileId] syntax to refer to a file being installed (using the file: + /// protocol). + /// + public string Target + { + get + { + return this.targetField; + } + set + { + this.targetFieldSet = true; + this.targetField = value; + } + } + + /// + /// Which type of shortcut should be created. + /// + public TypeType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + /// + /// Icon file that should be displayed. Note that this is a formatted field, so you can use + /// [#fileId] syntax to refer to a file being installed (using the file: + /// protocol). + /// + public string IconFile + { + get + { + return this.iconFileField; + } + set + { + this.iconFileFieldSet = true; + this.iconFileField = value; + } + } + + /// + /// Index of the icon being referenced + /// + public int IconIndex + { + get + { + return this.iconIndexField; + } + set + { + this.iconIndexFieldSet = true; + this.iconIndexField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a TypeType from a string. + /// + public static TypeType ParseTypeType(string value) + { + TypeType parsedValue; + InternetShortcut.TryParseTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypeType from a string. + /// + public static bool TryParseTypeType(string value, out TypeType parsedValue) + { + parsedValue = TypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("url" == value)) + { + parsedValue = TypeType.url; + } + else + { + if (("link" == value)) + { + parsedValue = TypeType.link; + } + else + { + parsedValue = TypeType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InternetShortcut", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.targetFieldSet) + { + writer.WriteAttributeString("Target", this.targetField); + } + if (this.typeFieldSet) + { + if ((this.typeField == TypeType.url)) + { + writer.WriteAttributeString("Type", "url"); + } + if ((this.typeField == TypeType.link)) + { + writer.WriteAttributeString("Type", "link"); + } + } + if (this.iconFileFieldSet) + { + writer.WriteAttributeString("IconFile", this.iconFileField); + } + if (this.iconIndexFieldSet) + { + writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture)); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Target" == name)) + { + this.targetField = value; + this.targetFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = InternetShortcut.ParseTypeType(value); + this.typeFieldSet = true; + } + if (("IconFile" == name)) + { + this.iconFileField = value; + this.iconFileFieldSet = true; + } + if (("IconIndex" == name)) + { + this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.iconIndexFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum TypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Creates .url files using IUniformResourceLocatorW. + /// + url, + + /// + /// Creates .lnk files using IShellLinkW (default). + /// + link, + } + } + + /// + /// Used to create performance categories and configure performance counters. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class PerformanceCategory : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string helpField; + + private bool helpFieldSet; + + private YesNoType multiInstanceField; + + private bool multiInstanceFieldSet; + + private string libraryField; + + private bool libraryFieldSet; + + private string openField; + + private bool openFieldSet; + + private string closeField; + + private bool closeFieldSet; + + private string collectField; + + private bool collectFieldSet; + + private PerformanceCounterLanguageType defaultLanguageField; + + private bool defaultLanguageFieldSet; + + private ISchemaElement parentElement; + + public PerformanceCategory() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PerformanceCounter))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Unique identifier in your installation package for this performance counter category. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// 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. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Optional help text for the performance counter category. + /// + public string Help + { + get + { + return this.helpField; + } + set + { + this.helpFieldSet = true; + this.helpField = value; + } + } + + /// + /// Flag that specifies whether the performance counter category is multi or single instanced. Default is single instance. + /// + public YesNoType MultiInstance + { + get + { + return this.multiInstanceField; + } + set + { + this.multiInstanceFieldSet = true; + this.multiInstanceField = value; + } + } + + /// + /// DLL that contains the performance counter. The default is "netfxperf.dll" which should be used for all managed code performance counters. + /// + public string Library + { + get + { + return this.libraryField; + } + set + { + this.libraryFieldSet = true; + this.libraryField = value; + } + } + + /// + /// 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. + /// + public string Open + { + get + { + return this.openField; + } + set + { + this.openFieldSet = true; + this.openField = value; + } + } + + /// + /// 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. + /// + public string Close + { + get + { + return this.closeField; + } + set + { + this.closeFieldSet = true; + this.closeField = value; + } + } + + /// + /// 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. + /// + public string Collect + { + get + { + return this.collectField; + } + set + { + this.collectFieldSet = true; + this.collectField = value; + } + } + + /// + /// Default language for the performance category and contained counters' names and help text. + /// + public PerformanceCounterLanguageType DefaultLanguage + { + get + { + return this.defaultLanguageField; + } + set + { + this.defaultLanguageFieldSet = true; + this.defaultLanguageField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("PerformanceCounter" == childName)) + { + childValue = new PerformanceCounter(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PerformanceCategory", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.helpFieldSet) + { + writer.WriteAttributeString("Help", this.helpField); + } + if (this.multiInstanceFieldSet) + { + if ((this.multiInstanceField == YesNoType.no)) + { + writer.WriteAttributeString("MultiInstance", "no"); + } + if ((this.multiInstanceField == YesNoType.yes)) + { + writer.WriteAttributeString("MultiInstance", "yes"); + } + } + if (this.libraryFieldSet) + { + writer.WriteAttributeString("Library", this.libraryField); + } + if (this.openFieldSet) + { + writer.WriteAttributeString("Open", this.openField); + } + if (this.closeFieldSet) + { + writer.WriteAttributeString("Close", this.closeField); + } + if (this.collectFieldSet) + { + writer.WriteAttributeString("Collect", this.collectField); + } + if (this.defaultLanguageFieldSet) + { + if ((this.defaultLanguageField == PerformanceCounterLanguageType.afrikaans)) + { + writer.WriteAttributeString("DefaultLanguage", "afrikaans"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.albanian)) + { + writer.WriteAttributeString("DefaultLanguage", "albanian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.arabic)) + { + writer.WriteAttributeString("DefaultLanguage", "arabic"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.armenian)) + { + writer.WriteAttributeString("DefaultLanguage", "armenian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.assamese)) + { + writer.WriteAttributeString("DefaultLanguage", "assamese"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.azeri)) + { + writer.WriteAttributeString("DefaultLanguage", "azeri"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.basque)) + { + writer.WriteAttributeString("DefaultLanguage", "basque"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.belarusian)) + { + writer.WriteAttributeString("DefaultLanguage", "belarusian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.bengali)) + { + writer.WriteAttributeString("DefaultLanguage", "bengali"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.bulgarian)) + { + writer.WriteAttributeString("DefaultLanguage", "bulgarian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.catalan)) + { + writer.WriteAttributeString("DefaultLanguage", "catalan"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.chinese)) + { + writer.WriteAttributeString("DefaultLanguage", "chinese"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.croatian)) + { + writer.WriteAttributeString("DefaultLanguage", "croatian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.czech)) + { + writer.WriteAttributeString("DefaultLanguage", "czech"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.danish)) + { + writer.WriteAttributeString("DefaultLanguage", "danish"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.divehi)) + { + writer.WriteAttributeString("DefaultLanguage", "divehi"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.dutch)) + { + writer.WriteAttributeString("DefaultLanguage", "dutch"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.english)) + { + writer.WriteAttributeString("DefaultLanguage", "english"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.estonian)) + { + writer.WriteAttributeString("DefaultLanguage", "estonian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.faeroese)) + { + writer.WriteAttributeString("DefaultLanguage", "faeroese"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.farsi)) + { + writer.WriteAttributeString("DefaultLanguage", "farsi"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.finnish)) + { + writer.WriteAttributeString("DefaultLanguage", "finnish"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.french)) + { + writer.WriteAttributeString("DefaultLanguage", "french"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.galician)) + { + writer.WriteAttributeString("DefaultLanguage", "galician"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.georgian)) + { + writer.WriteAttributeString("DefaultLanguage", "georgian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.german)) + { + writer.WriteAttributeString("DefaultLanguage", "german"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.greek)) + { + writer.WriteAttributeString("DefaultLanguage", "greek"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.gujarati)) + { + writer.WriteAttributeString("DefaultLanguage", "gujarati"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.hebrew)) + { + writer.WriteAttributeString("DefaultLanguage", "hebrew"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.hindi)) + { + writer.WriteAttributeString("DefaultLanguage", "hindi"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.hungarian)) + { + writer.WriteAttributeString("DefaultLanguage", "hungarian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.icelandic)) + { + writer.WriteAttributeString("DefaultLanguage", "icelandic"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.indonesian)) + { + writer.WriteAttributeString("DefaultLanguage", "indonesian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.italian)) + { + writer.WriteAttributeString("DefaultLanguage", "italian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.japanese)) + { + writer.WriteAttributeString("DefaultLanguage", "japanese"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.kannada)) + { + writer.WriteAttributeString("DefaultLanguage", "kannada"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.kashmiri)) + { + writer.WriteAttributeString("DefaultLanguage", "kashmiri"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.kazak)) + { + writer.WriteAttributeString("DefaultLanguage", "kazak"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.konkani)) + { + writer.WriteAttributeString("DefaultLanguage", "konkani"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.korean)) + { + writer.WriteAttributeString("DefaultLanguage", "korean"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.kyrgyz)) + { + writer.WriteAttributeString("DefaultLanguage", "kyrgyz"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.latvian)) + { + writer.WriteAttributeString("DefaultLanguage", "latvian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.lithuanian)) + { + writer.WriteAttributeString("DefaultLanguage", "lithuanian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.macedonian)) + { + writer.WriteAttributeString("DefaultLanguage", "macedonian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.malay)) + { + writer.WriteAttributeString("DefaultLanguage", "malay"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.malayalam)) + { + writer.WriteAttributeString("DefaultLanguage", "malayalam"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.manipuri)) + { + writer.WriteAttributeString("DefaultLanguage", "manipuri"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.marathi)) + { + writer.WriteAttributeString("DefaultLanguage", "marathi"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.mongolian)) + { + writer.WriteAttributeString("DefaultLanguage", "mongolian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.nepali)) + { + writer.WriteAttributeString("DefaultLanguage", "nepali"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.norwegian)) + { + writer.WriteAttributeString("DefaultLanguage", "norwegian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.oriya)) + { + writer.WriteAttributeString("DefaultLanguage", "oriya"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.polish)) + { + writer.WriteAttributeString("DefaultLanguage", "polish"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.portuguese)) + { + writer.WriteAttributeString("DefaultLanguage", "portuguese"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.punjabi)) + { + writer.WriteAttributeString("DefaultLanguage", "punjabi"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.romanian)) + { + writer.WriteAttributeString("DefaultLanguage", "romanian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.russian)) + { + writer.WriteAttributeString("DefaultLanguage", "russian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.sanskrit)) + { + writer.WriteAttributeString("DefaultLanguage", "sanskrit"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.serbian)) + { + writer.WriteAttributeString("DefaultLanguage", "serbian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.sindhi)) + { + writer.WriteAttributeString("DefaultLanguage", "sindhi"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.slovak)) + { + writer.WriteAttributeString("DefaultLanguage", "slovak"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.slovenian)) + { + writer.WriteAttributeString("DefaultLanguage", "slovenian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.spanish)) + { + writer.WriteAttributeString("DefaultLanguage", "spanish"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.swahili)) + { + writer.WriteAttributeString("DefaultLanguage", "swahili"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.swedish)) + { + writer.WriteAttributeString("DefaultLanguage", "swedish"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.syriac)) + { + writer.WriteAttributeString("DefaultLanguage", "syriac"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.tamil)) + { + writer.WriteAttributeString("DefaultLanguage", "tamil"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.tatar)) + { + writer.WriteAttributeString("DefaultLanguage", "tatar"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.telugu)) + { + writer.WriteAttributeString("DefaultLanguage", "telugu"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.thai)) + { + writer.WriteAttributeString("DefaultLanguage", "thai"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.turkish)) + { + writer.WriteAttributeString("DefaultLanguage", "turkish"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.ukrainian)) + { + writer.WriteAttributeString("DefaultLanguage", "ukrainian"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.urdu)) + { + writer.WriteAttributeString("DefaultLanguage", "urdu"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.uzbek)) + { + writer.WriteAttributeString("DefaultLanguage", "uzbek"); + } + if ((this.defaultLanguageField == PerformanceCounterLanguageType.vietnamese)) + { + writer.WriteAttributeString("DefaultLanguage", "vietnamese"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Help" == name)) + { + this.helpField = value; + this.helpFieldSet = true; + } + if (("MultiInstance" == name)) + { + this.multiInstanceField = Enums.ParseYesNoType(value); + this.multiInstanceFieldSet = true; + } + if (("Library" == name)) + { + this.libraryField = value; + this.libraryFieldSet = true; + } + if (("Open" == name)) + { + this.openField = value; + this.openFieldSet = true; + } + if (("Close" == name)) + { + this.closeField = value; + this.closeFieldSet = true; + } + if (("Collect" == name)) + { + this.collectField = value; + this.collectFieldSet = true; + } + if (("DefaultLanguage" == name)) + { + this.defaultLanguageField = Enums.ParsePerformanceCounterLanguageType(value); + this.defaultLanguageFieldSet = true; + } + } + } + + /// + /// Creates a performance counter in a performance category. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class PerformanceCounter : ISchemaElement, ISetAttributes + { + + private string nameField; + + private bool nameFieldSet; + + private string helpField; + + private bool helpFieldSet; + + private PerformanceCounterTypesType typeField; + + private bool typeFieldSet; + + private PerformanceCounterLanguageType languageField; + + private bool languageFieldSet; + + private ISchemaElement parentElement; + + /// + /// Name for the performance counter. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Optional help text for the performance counter. + /// + public string Help + { + get + { + return this.helpField; + } + set + { + this.helpFieldSet = true; + this.helpField = value; + } + } + + /// + /// Type of the performance counter. + /// + public PerformanceCounterTypesType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + /// + /// Language for the peformance counter name and help. The default is to use the parent PerformanceCategory element's DefaultLanguage attribute. + /// + public PerformanceCounterLanguageType Language + { + get + { + return this.languageField; + } + set + { + this.languageFieldSet = true; + this.languageField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PerformanceCounter", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.helpFieldSet) + { + writer.WriteAttributeString("Help", this.helpField); + } + if (this.typeFieldSet) + { + if ((this.typeField == PerformanceCounterTypesType.averageBase)) + { + writer.WriteAttributeString("Type", "averageBase"); + } + if ((this.typeField == PerformanceCounterTypesType.averageCount64)) + { + writer.WriteAttributeString("Type", "averageCount64"); + } + if ((this.typeField == PerformanceCounterTypesType.averageTimer32)) + { + writer.WriteAttributeString("Type", "averageTimer32"); + } + if ((this.typeField == PerformanceCounterTypesType.counterDelta32)) + { + writer.WriteAttributeString("Type", "counterDelta32"); + } + if ((this.typeField == PerformanceCounterTypesType.counterTimerInverse)) + { + writer.WriteAttributeString("Type", "counterTimerInverse"); + } + if ((this.typeField == PerformanceCounterTypesType.sampleFraction)) + { + writer.WriteAttributeString("Type", "sampleFraction"); + } + if ((this.typeField == PerformanceCounterTypesType.timer100Ns)) + { + writer.WriteAttributeString("Type", "timer100Ns"); + } + if ((this.typeField == PerformanceCounterTypesType.counterTimer)) + { + writer.WriteAttributeString("Type", "counterTimer"); + } + if ((this.typeField == PerformanceCounterTypesType.rawFraction)) + { + writer.WriteAttributeString("Type", "rawFraction"); + } + if ((this.typeField == PerformanceCounterTypesType.timer100NsInverse)) + { + writer.WriteAttributeString("Type", "timer100NsInverse"); + } + if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer)) + { + writer.WriteAttributeString("Type", "counterMultiTimer"); + } + if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer100Ns)) + { + writer.WriteAttributeString("Type", "counterMultiTimer100Ns"); + } + if ((this.typeField == PerformanceCounterTypesType.counterMultiTimerInverse)) + { + writer.WriteAttributeString("Type", "counterMultiTimerInverse"); + } + if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer100NsInverse)) + { + writer.WriteAttributeString("Type", "counterMultiTimer100NsInverse"); + } + if ((this.typeField == PerformanceCounterTypesType.elapsedTime)) + { + writer.WriteAttributeString("Type", "elapsedTime"); + } + if ((this.typeField == PerformanceCounterTypesType.sampleBase)) + { + writer.WriteAttributeString("Type", "sampleBase"); + } + if ((this.typeField == PerformanceCounterTypesType.rawBase)) + { + writer.WriteAttributeString("Type", "rawBase"); + } + if ((this.typeField == PerformanceCounterTypesType.counterMultiBase)) + { + writer.WriteAttributeString("Type", "counterMultiBase"); + } + if ((this.typeField == PerformanceCounterTypesType.rateOfCountsPerSecond64)) + { + writer.WriteAttributeString("Type", "rateOfCountsPerSecond64"); + } + if ((this.typeField == PerformanceCounterTypesType.rateOfCountsPerSecond32)) + { + writer.WriteAttributeString("Type", "rateOfCountsPerSecond32"); + } + if ((this.typeField == PerformanceCounterTypesType.countPerTimeInterval64)) + { + writer.WriteAttributeString("Type", "countPerTimeInterval64"); + } + if ((this.typeField == PerformanceCounterTypesType.countPerTimeInterval32)) + { + writer.WriteAttributeString("Type", "countPerTimeInterval32"); + } + if ((this.typeField == PerformanceCounterTypesType.sampleCounter)) + { + writer.WriteAttributeString("Type", "sampleCounter"); + } + if ((this.typeField == PerformanceCounterTypesType.counterDelta64)) + { + writer.WriteAttributeString("Type", "counterDelta64"); + } + if ((this.typeField == PerformanceCounterTypesType.numberOfItems64)) + { + writer.WriteAttributeString("Type", "numberOfItems64"); + } + if ((this.typeField == PerformanceCounterTypesType.numberOfItems32)) + { + writer.WriteAttributeString("Type", "numberOfItems32"); + } + if ((this.typeField == PerformanceCounterTypesType.numberOfItemsHEX64)) + { + writer.WriteAttributeString("Type", "numberOfItemsHEX64"); + } + if ((this.typeField == PerformanceCounterTypesType.numberOfItemsHEX32)) + { + writer.WriteAttributeString("Type", "numberOfItemsHEX32"); + } + } + if (this.languageFieldSet) + { + if ((this.languageField == PerformanceCounterLanguageType.afrikaans)) + { + writer.WriteAttributeString("Language", "afrikaans"); + } + if ((this.languageField == PerformanceCounterLanguageType.albanian)) + { + writer.WriteAttributeString("Language", "albanian"); + } + if ((this.languageField == PerformanceCounterLanguageType.arabic)) + { + writer.WriteAttributeString("Language", "arabic"); + } + if ((this.languageField == PerformanceCounterLanguageType.armenian)) + { + writer.WriteAttributeString("Language", "armenian"); + } + if ((this.languageField == PerformanceCounterLanguageType.assamese)) + { + writer.WriteAttributeString("Language", "assamese"); + } + if ((this.languageField == PerformanceCounterLanguageType.azeri)) + { + writer.WriteAttributeString("Language", "azeri"); + } + if ((this.languageField == PerformanceCounterLanguageType.basque)) + { + writer.WriteAttributeString("Language", "basque"); + } + if ((this.languageField == PerformanceCounterLanguageType.belarusian)) + { + writer.WriteAttributeString("Language", "belarusian"); + } + if ((this.languageField == PerformanceCounterLanguageType.bengali)) + { + writer.WriteAttributeString("Language", "bengali"); + } + if ((this.languageField == PerformanceCounterLanguageType.bulgarian)) + { + writer.WriteAttributeString("Language", "bulgarian"); + } + if ((this.languageField == PerformanceCounterLanguageType.catalan)) + { + writer.WriteAttributeString("Language", "catalan"); + } + if ((this.languageField == PerformanceCounterLanguageType.chinese)) + { + writer.WriteAttributeString("Language", "chinese"); + } + if ((this.languageField == PerformanceCounterLanguageType.croatian)) + { + writer.WriteAttributeString("Language", "croatian"); + } + if ((this.languageField == PerformanceCounterLanguageType.czech)) + { + writer.WriteAttributeString("Language", "czech"); + } + if ((this.languageField == PerformanceCounterLanguageType.danish)) + { + writer.WriteAttributeString("Language", "danish"); + } + if ((this.languageField == PerformanceCounterLanguageType.divehi)) + { + writer.WriteAttributeString("Language", "divehi"); + } + if ((this.languageField == PerformanceCounterLanguageType.dutch)) + { + writer.WriteAttributeString("Language", "dutch"); + } + if ((this.languageField == PerformanceCounterLanguageType.english)) + { + writer.WriteAttributeString("Language", "english"); + } + if ((this.languageField == PerformanceCounterLanguageType.estonian)) + { + writer.WriteAttributeString("Language", "estonian"); + } + if ((this.languageField == PerformanceCounterLanguageType.faeroese)) + { + writer.WriteAttributeString("Language", "faeroese"); + } + if ((this.languageField == PerformanceCounterLanguageType.farsi)) + { + writer.WriteAttributeString("Language", "farsi"); + } + if ((this.languageField == PerformanceCounterLanguageType.finnish)) + { + writer.WriteAttributeString("Language", "finnish"); + } + if ((this.languageField == PerformanceCounterLanguageType.french)) + { + writer.WriteAttributeString("Language", "french"); + } + if ((this.languageField == PerformanceCounterLanguageType.galician)) + { + writer.WriteAttributeString("Language", "galician"); + } + if ((this.languageField == PerformanceCounterLanguageType.georgian)) + { + writer.WriteAttributeString("Language", "georgian"); + } + if ((this.languageField == PerformanceCounterLanguageType.german)) + { + writer.WriteAttributeString("Language", "german"); + } + if ((this.languageField == PerformanceCounterLanguageType.greek)) + { + writer.WriteAttributeString("Language", "greek"); + } + if ((this.languageField == PerformanceCounterLanguageType.gujarati)) + { + writer.WriteAttributeString("Language", "gujarati"); + } + if ((this.languageField == PerformanceCounterLanguageType.hebrew)) + { + writer.WriteAttributeString("Language", "hebrew"); + } + if ((this.languageField == PerformanceCounterLanguageType.hindi)) + { + writer.WriteAttributeString("Language", "hindi"); + } + if ((this.languageField == PerformanceCounterLanguageType.hungarian)) + { + writer.WriteAttributeString("Language", "hungarian"); + } + if ((this.languageField == PerformanceCounterLanguageType.icelandic)) + { + writer.WriteAttributeString("Language", "icelandic"); + } + if ((this.languageField == PerformanceCounterLanguageType.indonesian)) + { + writer.WriteAttributeString("Language", "indonesian"); + } + if ((this.languageField == PerformanceCounterLanguageType.italian)) + { + writer.WriteAttributeString("Language", "italian"); + } + if ((this.languageField == PerformanceCounterLanguageType.japanese)) + { + writer.WriteAttributeString("Language", "japanese"); + } + if ((this.languageField == PerformanceCounterLanguageType.kannada)) + { + writer.WriteAttributeString("Language", "kannada"); + } + if ((this.languageField == PerformanceCounterLanguageType.kashmiri)) + { + writer.WriteAttributeString("Language", "kashmiri"); + } + if ((this.languageField == PerformanceCounterLanguageType.kazak)) + { + writer.WriteAttributeString("Language", "kazak"); + } + if ((this.languageField == PerformanceCounterLanguageType.konkani)) + { + writer.WriteAttributeString("Language", "konkani"); + } + if ((this.languageField == PerformanceCounterLanguageType.korean)) + { + writer.WriteAttributeString("Language", "korean"); + } + if ((this.languageField == PerformanceCounterLanguageType.kyrgyz)) + { + writer.WriteAttributeString("Language", "kyrgyz"); + } + if ((this.languageField == PerformanceCounterLanguageType.latvian)) + { + writer.WriteAttributeString("Language", "latvian"); + } + if ((this.languageField == PerformanceCounterLanguageType.lithuanian)) + { + writer.WriteAttributeString("Language", "lithuanian"); + } + if ((this.languageField == PerformanceCounterLanguageType.macedonian)) + { + writer.WriteAttributeString("Language", "macedonian"); + } + if ((this.languageField == PerformanceCounterLanguageType.malay)) + { + writer.WriteAttributeString("Language", "malay"); + } + if ((this.languageField == PerformanceCounterLanguageType.malayalam)) + { + writer.WriteAttributeString("Language", "malayalam"); + } + if ((this.languageField == PerformanceCounterLanguageType.manipuri)) + { + writer.WriteAttributeString("Language", "manipuri"); + } + if ((this.languageField == PerformanceCounterLanguageType.marathi)) + { + writer.WriteAttributeString("Language", "marathi"); + } + if ((this.languageField == PerformanceCounterLanguageType.mongolian)) + { + writer.WriteAttributeString("Language", "mongolian"); + } + if ((this.languageField == PerformanceCounterLanguageType.nepali)) + { + writer.WriteAttributeString("Language", "nepali"); + } + if ((this.languageField == PerformanceCounterLanguageType.norwegian)) + { + writer.WriteAttributeString("Language", "norwegian"); + } + if ((this.languageField == PerformanceCounterLanguageType.oriya)) + { + writer.WriteAttributeString("Language", "oriya"); + } + if ((this.languageField == PerformanceCounterLanguageType.polish)) + { + writer.WriteAttributeString("Language", "polish"); + } + if ((this.languageField == PerformanceCounterLanguageType.portuguese)) + { + writer.WriteAttributeString("Language", "portuguese"); + } + if ((this.languageField == PerformanceCounterLanguageType.punjabi)) + { + writer.WriteAttributeString("Language", "punjabi"); + } + if ((this.languageField == PerformanceCounterLanguageType.romanian)) + { + writer.WriteAttributeString("Language", "romanian"); + } + if ((this.languageField == PerformanceCounterLanguageType.russian)) + { + writer.WriteAttributeString("Language", "russian"); + } + if ((this.languageField == PerformanceCounterLanguageType.sanskrit)) + { + writer.WriteAttributeString("Language", "sanskrit"); + } + if ((this.languageField == PerformanceCounterLanguageType.serbian)) + { + writer.WriteAttributeString("Language", "serbian"); + } + if ((this.languageField == PerformanceCounterLanguageType.sindhi)) + { + writer.WriteAttributeString("Language", "sindhi"); + } + if ((this.languageField == PerformanceCounterLanguageType.slovak)) + { + writer.WriteAttributeString("Language", "slovak"); + } + if ((this.languageField == PerformanceCounterLanguageType.slovenian)) + { + writer.WriteAttributeString("Language", "slovenian"); + } + if ((this.languageField == PerformanceCounterLanguageType.spanish)) + { + writer.WriteAttributeString("Language", "spanish"); + } + if ((this.languageField == PerformanceCounterLanguageType.swahili)) + { + writer.WriteAttributeString("Language", "swahili"); + } + if ((this.languageField == PerformanceCounterLanguageType.swedish)) + { + writer.WriteAttributeString("Language", "swedish"); + } + if ((this.languageField == PerformanceCounterLanguageType.syriac)) + { + writer.WriteAttributeString("Language", "syriac"); + } + if ((this.languageField == PerformanceCounterLanguageType.tamil)) + { + writer.WriteAttributeString("Language", "tamil"); + } + if ((this.languageField == PerformanceCounterLanguageType.tatar)) + { + writer.WriteAttributeString("Language", "tatar"); + } + if ((this.languageField == PerformanceCounterLanguageType.telugu)) + { + writer.WriteAttributeString("Language", "telugu"); + } + if ((this.languageField == PerformanceCounterLanguageType.thai)) + { + writer.WriteAttributeString("Language", "thai"); + } + if ((this.languageField == PerformanceCounterLanguageType.turkish)) + { + writer.WriteAttributeString("Language", "turkish"); + } + if ((this.languageField == PerformanceCounterLanguageType.ukrainian)) + { + writer.WriteAttributeString("Language", "ukrainian"); + } + if ((this.languageField == PerformanceCounterLanguageType.urdu)) + { + writer.WriteAttributeString("Language", "urdu"); + } + if ((this.languageField == PerformanceCounterLanguageType.uzbek)) + { + writer.WriteAttributeString("Language", "uzbek"); + } + if ((this.languageField == PerformanceCounterLanguageType.vietnamese)) + { + writer.WriteAttributeString("Language", "vietnamese"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Help" == name)) + { + this.helpField = value; + this.helpFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = Enums.ParsePerformanceCounterTypesType(value); + this.typeFieldSet = true; + } + if (("Language" == name)) + { + this.languageField = Enums.ParsePerformanceCounterLanguageType(value); + this.languageFieldSet = true; + } + } + } + + /// + /// Used to install Perfmon counters. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class PerfCounter : ISchemaElement, ISetAttributes + { + + private string nameField; + + private bool nameFieldSet; + + private ISchemaElement parentElement; + + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PerfCounter", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + } + } + + /// + /// Used to install Perfmon Counter Manifests. + /// Note that this functionality cannot be used with major upgrades that are scheduled after the InstallExecute, + /// InstallExecuteAgain, or InstallFinalize actions. For more information on major upgrade scheduling, see + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class PerfCounterManifest : ISchemaElement, ISetAttributes + { + + private string resourceFileDirectoryField; + + private bool resourceFileDirectoryFieldSet; + + private ISchemaElement parentElement; + + /// + /// 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. + /// + public string ResourceFileDirectory + { + get + { + return this.resourceFileDirectoryField; + } + set + { + this.resourceFileDirectoryFieldSet = true; + this.resourceFileDirectoryField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PerfCounterManifest", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.resourceFileDirectoryFieldSet) + { + writer.WriteAttributeString("ResourceFileDirectory", this.resourceFileDirectoryField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("ResourceFileDirectory" == name)) + { + this.resourceFileDirectoryField = value; + this.resourceFileDirectoryFieldSet = true; + } + } + } + + /// + /// Used to install Event Manifests. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class EventManifest : ISchemaElement, ISetAttributes + { + + private string messageFileField; + + private bool messageFileFieldSet; + + private string parameterFileField; + + private bool parameterFileFieldSet; + + private string resourceFileField; + + private bool resourceFileFieldSet; + + private ISchemaElement parentElement; + + /// + /// 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. + /// + public string MessageFile + { + get + { + return this.messageFileField; + } + set + { + this.messageFileFieldSet = true; + this.messageFileField = value; + } + } + + /// + /// 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. + /// + public string ParameterFile + { + get + { + return this.parameterFileField; + } + set + { + this.parameterFileFieldSet = true; + this.parameterFileField = value; + } + } + + /// + /// 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. + /// + public string ResourceFile + { + get + { + return this.resourceFileField; + } + set + { + this.resourceFileFieldSet = true; + this.resourceFileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("EventManifest", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.messageFileFieldSet) + { + writer.WriteAttributeString("MessageFile", this.messageFileField); + } + if (this.parameterFileFieldSet) + { + writer.WriteAttributeString("ParameterFile", this.parameterFileField); + } + if (this.resourceFileFieldSet) + { + writer.WriteAttributeString("ResourceFile", this.resourceFileField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("MessageFile" == name)) + { + this.messageFileField = value; + this.messageFileFieldSet = true; + } + if (("ParameterFile" == name)) + { + this.parameterFileField = value; + this.parameterFileFieldSet = true; + } + if (("ResourceFile" == name)) + { + this.resourceFileField = value; + this.resourceFileFieldSet = true; + } + } + } + + /// + /// Sets ACLs on File, Registry, CreateFolder, or ServiceInstall. When under a Registry element, this cannot be used + /// if the Action attribute's value is remove or removeKeyOnInstall. This element has no Id attribute. + /// The table and key are taken from the parent element. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class PermissionEx : ISchemaElement, ISetAttributes + { + + private string domainField; + + private bool domainFieldSet; + + private string userField; + + private bool userFieldSet; + + private YesNoType readField; + + private bool readFieldSet; + + private YesNoType deleteField; + + private bool deleteFieldSet; + + private YesNoType readPermissionField; + + private bool readPermissionFieldSet; + + private YesNoType changePermissionField; + + private bool changePermissionFieldSet; + + private YesNoType takeOwnershipField; + + private bool takeOwnershipFieldSet; + + private YesNoType readAttributesField; + + private bool readAttributesFieldSet; + + private YesNoType writeAttributesField; + + private bool writeAttributesFieldSet; + + private YesNoType readExtendedAttributesField; + + private bool readExtendedAttributesFieldSet; + + private YesNoType writeExtendedAttributesField; + + private bool writeExtendedAttributesFieldSet; + + private YesNoType synchronizeField; + + private bool synchronizeFieldSet; + + private YesNoType createFileField; + + private bool createFileFieldSet; + + private YesNoType createChildField; + + private bool createChildFieldSet; + + private YesNoType deleteChildField; + + private bool deleteChildFieldSet; + + private YesNoType traverseField; + + private bool traverseFieldSet; + + private YesNoType appendField; + + private bool appendFieldSet; + + private YesNoType executeField; + + private bool executeFieldSet; + + private YesNoType writeField; + + private bool writeFieldSet; + + private YesNoType createSubkeysField; + + private bool createSubkeysFieldSet; + + private YesNoType enumerateSubkeysField; + + private bool enumerateSubkeysFieldSet; + + private YesNoType notifyField; + + private bool notifyFieldSet; + + private YesNoType createLinkField; + + private bool createLinkFieldSet; + + private YesNoType genericAllField; + + private bool genericAllFieldSet; + + private YesNoType genericExecuteField; + + private bool genericExecuteFieldSet; + + private YesNoType genericWriteField; + + private bool genericWriteFieldSet; + + private YesNoType genericReadField; + + private bool genericReadFieldSet; + + private YesNoType serviceQueryConfigField; + + private bool serviceQueryConfigFieldSet; + + private YesNoType serviceChangeConfigField; + + private bool serviceChangeConfigFieldSet; + + private YesNoType serviceQueryStatusField; + + private bool serviceQueryStatusFieldSet; + + private YesNoType serviceEnumerateDependentsField; + + private bool serviceEnumerateDependentsFieldSet; + + private YesNoType serviceStartField; + + private bool serviceStartFieldSet; + + private YesNoType serviceStopField; + + private bool serviceStopFieldSet; + + private YesNoType servicePauseContinueField; + + private bool servicePauseContinueFieldSet; + + private YesNoType serviceInterrogateField; + + private bool serviceInterrogateFieldSet; + + private YesNoType serviceUserDefinedControlField; + + private bool serviceUserDefinedControlFieldSet; + + private ISchemaElement parentElement; + + public string Domain + { + get + { + return this.domainField; + } + set + { + this.domainFieldSet = true; + this.domainField = value; + } + } + + public string User + { + get + { + return this.userField; + } + set + { + this.userFieldSet = true; + this.userField = value; + } + } + + public YesNoType Read + { + get + { + return this.readField; + } + set + { + this.readFieldSet = true; + this.readField = value; + } + } + + public YesNoType Delete + { + get + { + return this.deleteField; + } + set + { + this.deleteFieldSet = true; + this.deleteField = value; + } + } + + public YesNoType ReadPermission + { + get + { + return this.readPermissionField; + } + set + { + this.readPermissionFieldSet = true; + this.readPermissionField = value; + } + } + + public YesNoType ChangePermission + { + get + { + return this.changePermissionField; + } + set + { + this.changePermissionFieldSet = true; + this.changePermissionField = value; + } + } + + public YesNoType TakeOwnership + { + get + { + return this.takeOwnershipField; + } + set + { + this.takeOwnershipFieldSet = true; + this.takeOwnershipField = value; + } + } + + public YesNoType ReadAttributes + { + get + { + return this.readAttributesField; + } + set + { + this.readAttributesFieldSet = true; + this.readAttributesField = value; + } + } + + public YesNoType WriteAttributes + { + get + { + return this.writeAttributesField; + } + set + { + this.writeAttributesFieldSet = true; + this.writeAttributesField = value; + } + } + + public YesNoType ReadExtendedAttributes + { + get + { + return this.readExtendedAttributesField; + } + set + { + this.readExtendedAttributesFieldSet = true; + this.readExtendedAttributesField = value; + } + } + + public YesNoType WriteExtendedAttributes + { + get + { + return this.writeExtendedAttributesField; + } + set + { + this.writeExtendedAttributesFieldSet = true; + this.writeExtendedAttributesField = value; + } + } + + public YesNoType Synchronize + { + get + { + return this.synchronizeField; + } + set + { + this.synchronizeFieldSet = true; + this.synchronizeField = value; + } + } + + /// + /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent. + /// + public YesNoType CreateFile + { + get + { + return this.createFileField; + } + set + { + this.createFileFieldSet = true; + this.createFileField = value; + } + } + + /// + /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent. + /// + public YesNoType CreateChild + { + get + { + return this.createChildField; + } + set + { + this.createChildFieldSet = true; + this.createChildField = value; + } + } + + /// + /// 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. + /// + public YesNoType DeleteChild + { + get + { + return this.deleteChildField; + } + set + { + this.deleteChildFieldSet = true; + this.deleteChildField = value; + } + } + + /// + /// 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. + /// + public YesNoType Traverse + { + get + { + return this.traverseField; + } + set + { + this.traverseFieldSet = true; + this.traverseField = value; + } + } + + public YesNoType Append + { + get + { + return this.appendField; + } + set + { + this.appendFieldSet = true; + this.appendField = value; + } + } + + public YesNoType Execute + { + get + { + return this.executeField; + } + set + { + this.executeFieldSet = true; + this.executeField = value; + } + } + + public YesNoType Write + { + get + { + return this.writeField; + } + set + { + this.writeFieldSet = true; + this.writeField = value; + } + } + + public YesNoType CreateSubkeys + { + get + { + return this.createSubkeysField; + } + set + { + this.createSubkeysFieldSet = true; + this.createSubkeysField = value; + } + } + + public YesNoType EnumerateSubkeys + { + get + { + return this.enumerateSubkeysField; + } + set + { + this.enumerateSubkeysFieldSet = true; + this.enumerateSubkeysField = value; + } + } + + public YesNoType Notify + { + get + { + return this.notifyField; + } + set + { + this.notifyFieldSet = true; + this.notifyField = value; + } + } + + public YesNoType CreateLink + { + get + { + return this.createLinkField; + } + set + { + this.createLinkFieldSet = true; + this.createLinkField = value; + } + } + + public YesNoType GenericAll + { + get + { + return this.genericAllField; + } + set + { + this.genericAllFieldSet = true; + this.genericAllField = value; + } + } + + public YesNoType GenericExecute + { + get + { + return this.genericExecuteField; + } + set + { + this.genericExecuteFieldSet = true; + this.genericExecuteField = value; + } + } + + public YesNoType GenericWrite + { + get + { + return this.genericWriteField; + } + set + { + this.genericWriteFieldSet = true; + this.genericWriteField = value; + } + } + + /// + /// specifying this will fail to grant read access + /// + public YesNoType GenericRead + { + get + { + return this.genericReadField; + } + set + { + this.genericReadFieldSet = true; + this.genericReadField = value; + } + } + + /// + /// Required to call the QueryServiceConfig and QueryServiceConfig2 functions to query the service configuration. Only valid under a 'ServiceInstall' parent. + /// + public YesNoType ServiceQueryConfig + { + get + { + return this.serviceQueryConfigField; + } + set + { + this.serviceQueryConfigFieldSet = true; + this.serviceQueryConfigField = value; + } + } + + /// + /// Required to call the ChangeServiceConfig or ChangeServiceConfig2 function to change the service configuration. Only valid under a 'ServiceInstall' parent. + /// + public YesNoType ServiceChangeConfig + { + get + { + return this.serviceChangeConfigField; + } + set + { + this.serviceChangeConfigFieldSet = true; + this.serviceChangeConfigField = value; + } + } + + /// + /// Required to call the QueryServiceStatus function to ask the service control manager about the status of the service. Only valid under a 'ServiceInstall' parent. + /// + public YesNoType ServiceQueryStatus + { + get + { + return this.serviceQueryStatusField; + } + set + { + this.serviceQueryStatusFieldSet = true; + this.serviceQueryStatusField = value; + } + } + + /// + /// Required to call the EnumDependentServices function to enumerate all the services dependent on the service. Only valid under a 'ServiceInstall' parent. + /// + public YesNoType ServiceEnumerateDependents + { + get + { + return this.serviceEnumerateDependentsField; + } + set + { + this.serviceEnumerateDependentsFieldSet = true; + this.serviceEnumerateDependentsField = value; + } + } + + /// + /// Required to call the StartService function to start the service. Only valid under a 'ServiceInstall' parent. + /// + public YesNoType ServiceStart + { + get + { + return this.serviceStartField; + } + set + { + this.serviceStartFieldSet = true; + this.serviceStartField = value; + } + } + + /// + /// Required to call the ControlService function to stop the service. Only valid under a 'ServiceInstall' parent. + /// + public YesNoType ServiceStop + { + get + { + return this.serviceStopField; + } + set + { + this.serviceStopFieldSet = true; + this.serviceStopField = value; + } + } + + /// + /// Required to call the ControlService function to pause or continue the service. Only valid under a 'ServiceInstall' parent. + /// + public YesNoType ServicePauseContinue + { + get + { + return this.servicePauseContinueField; + } + set + { + this.servicePauseContinueFieldSet = true; + this.servicePauseContinueField = value; + } + } + + /// + /// Required to call the ControlService function to ask the service to report its status immediately. Only valid under a 'ServiceInstall' parent. + /// + public YesNoType ServiceInterrogate + { + get + { + return this.serviceInterrogateField; + } + set + { + this.serviceInterrogateFieldSet = true; + this.serviceInterrogateField = value; + } + } + + /// + /// Required to call the ControlService function to specify a user-defined control code. Only valid under a 'ServiceInstall' parent. + /// + public YesNoType ServiceUserDefinedControl + { + get + { + return this.serviceUserDefinedControlField; + } + set + { + this.serviceUserDefinedControlFieldSet = true; + this.serviceUserDefinedControlField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PermissionEx", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.domainFieldSet) + { + writer.WriteAttributeString("Domain", this.domainField); + } + if (this.userFieldSet) + { + writer.WriteAttributeString("User", this.userField); + } + if (this.readFieldSet) + { + if ((this.readField == YesNoType.no)) + { + writer.WriteAttributeString("Read", "no"); + } + if ((this.readField == YesNoType.yes)) + { + writer.WriteAttributeString("Read", "yes"); + } + } + if (this.deleteFieldSet) + { + if ((this.deleteField == YesNoType.no)) + { + writer.WriteAttributeString("Delete", "no"); + } + if ((this.deleteField == YesNoType.yes)) + { + writer.WriteAttributeString("Delete", "yes"); + } + } + if (this.readPermissionFieldSet) + { + if ((this.readPermissionField == YesNoType.no)) + { + writer.WriteAttributeString("ReadPermission", "no"); + } + if ((this.readPermissionField == YesNoType.yes)) + { + writer.WriteAttributeString("ReadPermission", "yes"); + } + } + if (this.changePermissionFieldSet) + { + if ((this.changePermissionField == YesNoType.no)) + { + writer.WriteAttributeString("ChangePermission", "no"); + } + if ((this.changePermissionField == YesNoType.yes)) + { + writer.WriteAttributeString("ChangePermission", "yes"); + } + } + if (this.takeOwnershipFieldSet) + { + if ((this.takeOwnershipField == YesNoType.no)) + { + writer.WriteAttributeString("TakeOwnership", "no"); + } + if ((this.takeOwnershipField == YesNoType.yes)) + { + writer.WriteAttributeString("TakeOwnership", "yes"); + } + } + if (this.readAttributesFieldSet) + { + if ((this.readAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("ReadAttributes", "no"); + } + if ((this.readAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("ReadAttributes", "yes"); + } + } + if (this.writeAttributesFieldSet) + { + if ((this.writeAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("WriteAttributes", "no"); + } + if ((this.writeAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("WriteAttributes", "yes"); + } + } + if (this.readExtendedAttributesFieldSet) + { + if ((this.readExtendedAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("ReadExtendedAttributes", "no"); + } + if ((this.readExtendedAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("ReadExtendedAttributes", "yes"); + } + } + if (this.writeExtendedAttributesFieldSet) + { + if ((this.writeExtendedAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("WriteExtendedAttributes", "no"); + } + if ((this.writeExtendedAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("WriteExtendedAttributes", "yes"); + } + } + if (this.synchronizeFieldSet) + { + if ((this.synchronizeField == YesNoType.no)) + { + writer.WriteAttributeString("Synchronize", "no"); + } + if ((this.synchronizeField == YesNoType.yes)) + { + writer.WriteAttributeString("Synchronize", "yes"); + } + } + if (this.createFileFieldSet) + { + if ((this.createFileField == YesNoType.no)) + { + writer.WriteAttributeString("CreateFile", "no"); + } + if ((this.createFileField == YesNoType.yes)) + { + writer.WriteAttributeString("CreateFile", "yes"); + } + } + if (this.createChildFieldSet) + { + if ((this.createChildField == YesNoType.no)) + { + writer.WriteAttributeString("CreateChild", "no"); + } + if ((this.createChildField == YesNoType.yes)) + { + writer.WriteAttributeString("CreateChild", "yes"); + } + } + if (this.deleteChildFieldSet) + { + if ((this.deleteChildField == YesNoType.no)) + { + writer.WriteAttributeString("DeleteChild", "no"); + } + if ((this.deleteChildField == YesNoType.yes)) + { + writer.WriteAttributeString("DeleteChild", "yes"); + } + } + if (this.traverseFieldSet) + { + if ((this.traverseField == YesNoType.no)) + { + writer.WriteAttributeString("Traverse", "no"); + } + if ((this.traverseField == YesNoType.yes)) + { + writer.WriteAttributeString("Traverse", "yes"); + } + } + if (this.appendFieldSet) + { + if ((this.appendField == YesNoType.no)) + { + writer.WriteAttributeString("Append", "no"); + } + if ((this.appendField == YesNoType.yes)) + { + writer.WriteAttributeString("Append", "yes"); + } + } + if (this.executeFieldSet) + { + if ((this.executeField == YesNoType.no)) + { + writer.WriteAttributeString("Execute", "no"); + } + if ((this.executeField == YesNoType.yes)) + { + writer.WriteAttributeString("Execute", "yes"); + } + } + if (this.writeFieldSet) + { + if ((this.writeField == YesNoType.no)) + { + writer.WriteAttributeString("Write", "no"); + } + if ((this.writeField == YesNoType.yes)) + { + writer.WriteAttributeString("Write", "yes"); + } + } + if (this.createSubkeysFieldSet) + { + if ((this.createSubkeysField == YesNoType.no)) + { + writer.WriteAttributeString("CreateSubkeys", "no"); + } + if ((this.createSubkeysField == YesNoType.yes)) + { + writer.WriteAttributeString("CreateSubkeys", "yes"); + } + } + if (this.enumerateSubkeysFieldSet) + { + if ((this.enumerateSubkeysField == YesNoType.no)) + { + writer.WriteAttributeString("EnumerateSubkeys", "no"); + } + if ((this.enumerateSubkeysField == YesNoType.yes)) + { + writer.WriteAttributeString("EnumerateSubkeys", "yes"); + } + } + if (this.notifyFieldSet) + { + if ((this.notifyField == YesNoType.no)) + { + writer.WriteAttributeString("Notify", "no"); + } + if ((this.notifyField == YesNoType.yes)) + { + writer.WriteAttributeString("Notify", "yes"); + } + } + if (this.createLinkFieldSet) + { + if ((this.createLinkField == YesNoType.no)) + { + writer.WriteAttributeString("CreateLink", "no"); + } + if ((this.createLinkField == YesNoType.yes)) + { + writer.WriteAttributeString("CreateLink", "yes"); + } + } + if (this.genericAllFieldSet) + { + if ((this.genericAllField == YesNoType.no)) + { + writer.WriteAttributeString("GenericAll", "no"); + } + if ((this.genericAllField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericAll", "yes"); + } + } + if (this.genericExecuteFieldSet) + { + if ((this.genericExecuteField == YesNoType.no)) + { + writer.WriteAttributeString("GenericExecute", "no"); + } + if ((this.genericExecuteField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericExecute", "yes"); + } + } + if (this.genericWriteFieldSet) + { + if ((this.genericWriteField == YesNoType.no)) + { + writer.WriteAttributeString("GenericWrite", "no"); + } + if ((this.genericWriteField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericWrite", "yes"); + } + } + if (this.genericReadFieldSet) + { + if ((this.genericReadField == YesNoType.no)) + { + writer.WriteAttributeString("GenericRead", "no"); + } + if ((this.genericReadField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericRead", "yes"); + } + } + if (this.serviceQueryConfigFieldSet) + { + if ((this.serviceQueryConfigField == YesNoType.no)) + { + writer.WriteAttributeString("ServiceQueryConfig", "no"); + } + if ((this.serviceQueryConfigField == YesNoType.yes)) + { + writer.WriteAttributeString("ServiceQueryConfig", "yes"); + } + } + if (this.serviceChangeConfigFieldSet) + { + if ((this.serviceChangeConfigField == YesNoType.no)) + { + writer.WriteAttributeString("ServiceChangeConfig", "no"); + } + if ((this.serviceChangeConfigField == YesNoType.yes)) + { + writer.WriteAttributeString("ServiceChangeConfig", "yes"); + } + } + if (this.serviceQueryStatusFieldSet) + { + if ((this.serviceQueryStatusField == YesNoType.no)) + { + writer.WriteAttributeString("ServiceQueryStatus", "no"); + } + if ((this.serviceQueryStatusField == YesNoType.yes)) + { + writer.WriteAttributeString("ServiceQueryStatus", "yes"); + } + } + if (this.serviceEnumerateDependentsFieldSet) + { + if ((this.serviceEnumerateDependentsField == YesNoType.no)) + { + writer.WriteAttributeString("ServiceEnumerateDependents", "no"); + } + if ((this.serviceEnumerateDependentsField == YesNoType.yes)) + { + writer.WriteAttributeString("ServiceEnumerateDependents", "yes"); + } + } + if (this.serviceStartFieldSet) + { + if ((this.serviceStartField == YesNoType.no)) + { + writer.WriteAttributeString("ServiceStart", "no"); + } + if ((this.serviceStartField == YesNoType.yes)) + { + writer.WriteAttributeString("ServiceStart", "yes"); + } + } + if (this.serviceStopFieldSet) + { + if ((this.serviceStopField == YesNoType.no)) + { + writer.WriteAttributeString("ServiceStop", "no"); + } + if ((this.serviceStopField == YesNoType.yes)) + { + writer.WriteAttributeString("ServiceStop", "yes"); + } + } + if (this.servicePauseContinueFieldSet) + { + if ((this.servicePauseContinueField == YesNoType.no)) + { + writer.WriteAttributeString("ServicePauseContinue", "no"); + } + if ((this.servicePauseContinueField == YesNoType.yes)) + { + writer.WriteAttributeString("ServicePauseContinue", "yes"); + } + } + if (this.serviceInterrogateFieldSet) + { + if ((this.serviceInterrogateField == YesNoType.no)) + { + writer.WriteAttributeString("ServiceInterrogate", "no"); + } + if ((this.serviceInterrogateField == YesNoType.yes)) + { + writer.WriteAttributeString("ServiceInterrogate", "yes"); + } + } + if (this.serviceUserDefinedControlFieldSet) + { + if ((this.serviceUserDefinedControlField == YesNoType.no)) + { + writer.WriteAttributeString("ServiceUserDefinedControl", "no"); + } + if ((this.serviceUserDefinedControlField == YesNoType.yes)) + { + writer.WriteAttributeString("ServiceUserDefinedControl", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Domain" == name)) + { + this.domainField = value; + this.domainFieldSet = true; + } + if (("User" == name)) + { + this.userField = value; + this.userFieldSet = true; + } + if (("Read" == name)) + { + this.readField = Enums.ParseYesNoType(value); + this.readFieldSet = true; + } + if (("Delete" == name)) + { + this.deleteField = Enums.ParseYesNoType(value); + this.deleteFieldSet = true; + } + if (("ReadPermission" == name)) + { + this.readPermissionField = Enums.ParseYesNoType(value); + this.readPermissionFieldSet = true; + } + if (("ChangePermission" == name)) + { + this.changePermissionField = Enums.ParseYesNoType(value); + this.changePermissionFieldSet = true; + } + if (("TakeOwnership" == name)) + { + this.takeOwnershipField = Enums.ParseYesNoType(value); + this.takeOwnershipFieldSet = true; + } + if (("ReadAttributes" == name)) + { + this.readAttributesField = Enums.ParseYesNoType(value); + this.readAttributesFieldSet = true; + } + if (("WriteAttributes" == name)) + { + this.writeAttributesField = Enums.ParseYesNoType(value); + this.writeAttributesFieldSet = true; + } + if (("ReadExtendedAttributes" == name)) + { + this.readExtendedAttributesField = Enums.ParseYesNoType(value); + this.readExtendedAttributesFieldSet = true; + } + if (("WriteExtendedAttributes" == name)) + { + this.writeExtendedAttributesField = Enums.ParseYesNoType(value); + this.writeExtendedAttributesFieldSet = true; + } + if (("Synchronize" == name)) + { + this.synchronizeField = Enums.ParseYesNoType(value); + this.synchronizeFieldSet = true; + } + if (("CreateFile" == name)) + { + this.createFileField = Enums.ParseYesNoType(value); + this.createFileFieldSet = true; + } + if (("CreateChild" == name)) + { + this.createChildField = Enums.ParseYesNoType(value); + this.createChildFieldSet = true; + } + if (("DeleteChild" == name)) + { + this.deleteChildField = Enums.ParseYesNoType(value); + this.deleteChildFieldSet = true; + } + if (("Traverse" == name)) + { + this.traverseField = Enums.ParseYesNoType(value); + this.traverseFieldSet = true; + } + if (("Append" == name)) + { + this.appendField = Enums.ParseYesNoType(value); + this.appendFieldSet = true; + } + if (("Execute" == name)) + { + this.executeField = Enums.ParseYesNoType(value); + this.executeFieldSet = true; + } + if (("Write" == name)) + { + this.writeField = Enums.ParseYesNoType(value); + this.writeFieldSet = true; + } + if (("CreateSubkeys" == name)) + { + this.createSubkeysField = Enums.ParseYesNoType(value); + this.createSubkeysFieldSet = true; + } + if (("EnumerateSubkeys" == name)) + { + this.enumerateSubkeysField = Enums.ParseYesNoType(value); + this.enumerateSubkeysFieldSet = true; + } + if (("Notify" == name)) + { + this.notifyField = Enums.ParseYesNoType(value); + this.notifyFieldSet = true; + } + if (("CreateLink" == name)) + { + this.createLinkField = Enums.ParseYesNoType(value); + this.createLinkFieldSet = true; + } + if (("GenericAll" == name)) + { + this.genericAllField = Enums.ParseYesNoType(value); + this.genericAllFieldSet = true; + } + if (("GenericExecute" == name)) + { + this.genericExecuteField = Enums.ParseYesNoType(value); + this.genericExecuteFieldSet = true; + } + if (("GenericWrite" == name)) + { + this.genericWriteField = Enums.ParseYesNoType(value); + this.genericWriteFieldSet = true; + } + if (("GenericRead" == name)) + { + this.genericReadField = Enums.ParseYesNoType(value); + this.genericReadFieldSet = true; + } + if (("ServiceQueryConfig" == name)) + { + this.serviceQueryConfigField = Enums.ParseYesNoType(value); + this.serviceQueryConfigFieldSet = true; + } + if (("ServiceChangeConfig" == name)) + { + this.serviceChangeConfigField = Enums.ParseYesNoType(value); + this.serviceChangeConfigFieldSet = true; + } + if (("ServiceQueryStatus" == name)) + { + this.serviceQueryStatusField = Enums.ParseYesNoType(value); + this.serviceQueryStatusFieldSet = true; + } + if (("ServiceEnumerateDependents" == name)) + { + this.serviceEnumerateDependentsField = Enums.ParseYesNoType(value); + this.serviceEnumerateDependentsFieldSet = true; + } + if (("ServiceStart" == name)) + { + this.serviceStartField = Enums.ParseYesNoType(value); + this.serviceStartFieldSet = true; + } + if (("ServiceStop" == name)) + { + this.serviceStopField = Enums.ParseYesNoType(value); + this.serviceStopFieldSet = true; + } + if (("ServicePauseContinue" == name)) + { + this.servicePauseContinueField = Enums.ParseYesNoType(value); + this.servicePauseContinueFieldSet = true; + } + if (("ServiceInterrogate" == name)) + { + this.serviceInterrogateField = Enums.ParseYesNoType(value); + this.serviceInterrogateFieldSet = true; + } + if (("ServiceUserDefinedControl" == name)) + { + this.serviceUserDefinedControlField = Enums.ParseYesNoType(value); + this.serviceUserDefinedControlFieldSet = true; + } + } + } + + /// + /// Describes a product search. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class ProductSearch : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string variableField; + + private bool variableFieldSet; + + private string conditionField; + + private bool conditionFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private string guidField; + + private bool guidFieldSet; + + private string productCodeField; + + private bool productCodeFieldSet; + + private string upgradeCodeField; + + private bool upgradeCodeFieldSet; + + private ResultType resultField; + + private bool resultFieldSet; + + private ISchemaElement parentElement; + + /// + /// Id of the search for ordering and dependency. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the variable in which to place the result of the search. + /// + public string Variable + { + get + { + return this.variableField; + } + set + { + this.variableFieldSet = true; + this.variableField = value; + } + } + + /// + /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. + /// + public string Condition + { + get + { + return this.conditionField; + } + set + { + this.conditionFieldSet = true; + this.conditionField = value; + } + } + + /// + /// Id of the search that this one should come after. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// 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. + /// + public string Guid + { + get + { + return this.guidField; + } + set + { + this.guidFieldSet = true; + this.guidField = value; + } + } + + /// + /// The ProductCode to use for the search. This attribute must be omitted if UpgradeCode is specified. + /// + public string ProductCode + { + get + { + return this.productCodeField; + } + set + { + this.productCodeFieldSet = true; + this.productCodeField = value; + } + } + + /// + /// 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. + /// + public string UpgradeCode + { + get + { + return this.upgradeCodeField; + } + set + { + this.upgradeCodeFieldSet = true; + this.upgradeCodeField = value; + } + } + + /// + /// Rather than saving the product version into the variable, a ProductSearch can save another attribute of the matching product instead. + /// + public ResultType Result + { + get + { + return this.resultField; + } + set + { + this.resultFieldSet = true; + this.resultField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ResultType from a string. + /// + public static ResultType ParseResultType(string value) + { + ResultType parsedValue; + ProductSearch.TryParseResultType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ResultType from a string. + /// + public static bool TryParseResultType(string value, out ResultType parsedValue) + { + parsedValue = ResultType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("version" == value)) + { + parsedValue = ResultType.version; + } + else + { + if (("language" == value)) + { + parsedValue = ResultType.language; + } + else + { + if (("state" == value)) + { + parsedValue = ResultType.state; + } + else + { + if (("assignment" == value)) + { + parsedValue = ResultType.assignment; + } + else + { + parsedValue = ResultType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ProductSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.variableFieldSet) + { + writer.WriteAttributeString("Variable", this.variableField); + } + if (this.conditionFieldSet) + { + writer.WriteAttributeString("Condition", this.conditionField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.guidFieldSet) + { + writer.WriteAttributeString("Guid", this.guidField); + } + if (this.productCodeFieldSet) + { + writer.WriteAttributeString("ProductCode", this.productCodeField); + } + if (this.upgradeCodeFieldSet) + { + writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); + } + if (this.resultFieldSet) + { + if ((this.resultField == ResultType.version)) + { + writer.WriteAttributeString("Result", "version"); + } + if ((this.resultField == ResultType.language)) + { + writer.WriteAttributeString("Result", "language"); + } + if ((this.resultField == ResultType.state)) + { + writer.WriteAttributeString("Result", "state"); + } + if ((this.resultField == ResultType.assignment)) + { + writer.WriteAttributeString("Result", "assignment"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Variable" == name)) + { + this.variableField = value; + this.variableFieldSet = true; + } + if (("Condition" == name)) + { + this.conditionField = value; + this.conditionFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("Guid" == name)) + { + this.guidField = value; + this.guidFieldSet = true; + } + if (("ProductCode" == name)) + { + this.productCodeField = value; + this.productCodeFieldSet = true; + } + if (("UpgradeCode" == name)) + { + this.upgradeCodeField = value; + this.upgradeCodeFieldSet = true; + } + if (("Result" == name)) + { + this.resultField = ProductSearch.ParseResultType(value); + this.resultFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum ResultType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Saves the version of a matching product if found; 0.0.0.0 otherwise. This is the default. + /// + version, + + /// + /// Saves the language of a matching product if found; empty otherwise. + /// + language, + + /// + /// Saves the state of the product: advertised (1), absent (2), or locally installed (5). + /// + state, + + /// + /// Saves the assignment type of the product: per-user (0), or per-machine (1). + /// + assignment, + } + } + + /// + /// References a ProductSearch. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class ProductSearchRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ProductSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Remove a folder and all contained files and folders if the parent component is selected for installation or removal. + /// The folder must be specified in the Property attribute as the name of a property that will have a value that resolves + /// to the full path of the folder before the CostInitialize action. Note that Directory ids cannot be used. + /// For more details, see the Remarks. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class RemoveFolderEx : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string propertyField; + + private bool propertyFieldSet; + + private OnType onField; + + private bool onFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary key used to identify this particular entry. If this is not specified, a stable identifier + /// will be generated at compile time based on the other attributes. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The id of a property that resolves to the full path of the source directory. The property does not have + /// to exist in the installer database at creation time; it could be created at installation time by a custom + /// action, on the command line, etc. The property value can contain environment variables surrounded by + /// percent signs such as from a REG_EXPAND_SZ registry value; environment variables will be expanded before + /// being evaluated for a full path. + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + /// + /// This value determines when the folder may be removed. + /// + public OnType On + { + get + { + return this.onField; + } + set + { + this.onFieldSet = true; + this.onField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a OnType from a string. + /// + public static OnType ParseOnType(string value) + { + OnType parsedValue; + RemoveFolderEx.TryParseOnType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a OnType from a string. + /// + public static bool TryParseOnType(string value, out OnType parsedValue) + { + parsedValue = OnType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("install" == value)) + { + parsedValue = OnType.install; + } + else + { + if (("uninstall" == value)) + { + parsedValue = OnType.uninstall; + } + else + { + if (("both" == value)) + { + parsedValue = OnType.both; + } + else + { + parsedValue = OnType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveFolderEx", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + if (this.onFieldSet) + { + if ((this.onField == OnType.install)) + { + writer.WriteAttributeString("On", "install"); + } + if ((this.onField == OnType.uninstall)) + { + writer.WriteAttributeString("On", "uninstall"); + } + if ((this.onField == OnType.both)) + { + writer.WriteAttributeString("On", "both"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + if (("On" == name)) + { + this.onField = RemoveFolderEx.ParseOnType(value); + this.onFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum OnType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Removes the folder only when the parent component is being installed (msiInstallStateLocal or msiInstallStateSource). + /// + install, + + /// + /// Default: Removes the folder only when the parent component is being removed (msiInstallStateAbsent). + /// + uninstall, + + /// + /// Removes the folder when the parent component is being installed or removed. + /// + both, + } + } + + /// + /// Registers a resource with the Restart Manager. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class RestartResource : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string pathField; + + private bool pathFieldSet; + + private string processNameField; + + private bool processNameFieldSet; + + private string serviceNameField; + + private bool serviceNameFieldSet; + + private ISchemaElement parentElement; + + /// + /// The unique identifier for this resource. A unique identifier will + /// be generated automatically if not specified. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The full path to the process module to register with the Restart Manager. + /// This can be a formatted value that resolves to a full path. + /// + public string Path + { + get + { + return this.pathField; + } + set + { + this.pathFieldSet = true; + this.pathField = value; + } + } + + /// + /// The name of a process to register with the Restart Manager. + /// This can be a formatted value that resolves to a process name. + /// + public string ProcessName + { + get + { + return this.processNameField; + } + set + { + this.processNameFieldSet = true; + this.processNameField = value; + } + } + + /// + /// The name of a Windows service to register with the Restart Manager. + /// This can be a formatted value that resolves to a service name. + /// + public string ServiceName + { + get + { + return this.serviceNameField; + } + set + { + this.serviceNameFieldSet = true; + this.serviceNameField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RestartResource", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.pathFieldSet) + { + writer.WriteAttributeString("Path", this.pathField); + } + if (this.processNameFieldSet) + { + writer.WriteAttributeString("ProcessName", this.processNameField); + } + if (this.serviceNameFieldSet) + { + writer.WriteAttributeString("ServiceName", this.serviceNameField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Path" == name)) + { + this.pathField = value; + this.pathFieldSet = true; + } + if (("ProcessName" == name)) + { + this.processNameField = value; + this.processNameFieldSet = true; + } + if (("ServiceName" == name)) + { + this.serviceNameField = value; + this.serviceNameFieldSet = true; + } + } + } + + /// + /// Describes a registry search. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class RegistrySearch : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string variableField; + + private bool variableFieldSet; + + private string conditionField; + + private bool conditionFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private RootType rootField; + + private bool rootFieldSet; + + private string keyField; + + private bool keyFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private FormatType formatField; + + private bool formatFieldSet; + + private YesNoType expandEnvironmentVariablesField; + + private bool expandEnvironmentVariablesFieldSet; + + private ResultType resultField; + + private bool resultFieldSet; + + private YesNoType win64Field; + + private bool win64FieldSet; + + private ISchemaElement parentElement; + + /// + /// Id of the search for ordering and dependency. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the variable in which to place the result of the search. + /// + public string Variable + { + get + { + return this.variableField; + } + set + { + this.variableFieldSet = true; + this.variableField = value; + } + } + + /// + /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. + /// + public string Condition + { + get + { + return this.conditionField; + } + set + { + this.conditionFieldSet = true; + this.conditionField = value; + } + } + + /// + /// Id of the search that this one should come after. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// Registry root hive to search under. + /// + public RootType Root + { + get + { + return this.rootField; + } + set + { + this.rootFieldSet = true; + this.rootField = value; + } + } + + /// + /// Key to search for. + /// + public string Key + { + get + { + return this.keyField; + } + set + { + this.keyFieldSet = true; + this.keyField = value; + } + } + + /// + /// Optional value to search for under the given Key. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// What format to return the value in. + /// + public FormatType Format + { + get + { + return this.formatField; + } + set + { + this.formatFieldSet = true; + this.formatField = value; + } + } + + /// + /// Whether to expand any environment variables in REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ values. + /// + public YesNoType ExpandEnvironmentVariables + { + get + { + return this.expandEnvironmentVariablesField; + } + set + { + this.expandEnvironmentVariablesFieldSet = true; + this.expandEnvironmentVariablesField = value; + } + } + + /// + /// Rather than saving the matching registry value into the variable, a RegistrySearch can save an attribute of the matching entry instead. + /// + public ResultType Result + { + get + { + return this.resultField; + } + set + { + this.resultFieldSet = true; + this.resultField = value; + } + } + + /// + /// 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'. + /// + public YesNoType Win64 + { + get + { + return this.win64Field; + } + set + { + this.win64FieldSet = true; + this.win64Field = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a RootType from a string. + /// + public static RootType ParseRootType(string value) + { + RootType parsedValue; + RegistrySearch.TryParseRootType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a RootType from a string. + /// + public static bool TryParseRootType(string value, out RootType parsedValue) + { + parsedValue = RootType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("HKLM" == value)) + { + parsedValue = RootType.HKLM; + } + else + { + if (("HKCU" == value)) + { + parsedValue = RootType.HKCU; + } + else + { + if (("HKCR" == value)) + { + parsedValue = RootType.HKCR; + } + else + { + if (("HKU" == value)) + { + parsedValue = RootType.HKU; + } + else + { + parsedValue = RootType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Parses a FormatType from a string. + /// + public static FormatType ParseFormatType(string value) + { + FormatType parsedValue; + RegistrySearch.TryParseFormatType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a FormatType from a string. + /// + public static bool TryParseFormatType(string value, out FormatType parsedValue) + { + parsedValue = FormatType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("raw" == value)) + { + parsedValue = FormatType.raw; + } + else + { + if (("compatible" == value)) + { + parsedValue = FormatType.compatible; + } + else + { + parsedValue = FormatType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Parses a ResultType from a string. + /// + public static ResultType ParseResultType(string value) + { + ResultType parsedValue; + RegistrySearch.TryParseResultType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ResultType from a string. + /// + public static bool TryParseResultType(string value, out ResultType parsedValue) + { + parsedValue = ResultType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("exists" == value)) + { + parsedValue = ResultType.exists; + } + else + { + if (("value" == value)) + { + parsedValue = ResultType.value; + } + else + { + parsedValue = ResultType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegistrySearch", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.variableFieldSet) + { + writer.WriteAttributeString("Variable", this.variableField); + } + if (this.conditionFieldSet) + { + writer.WriteAttributeString("Condition", this.conditionField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.rootFieldSet) + { + if ((this.rootField == RootType.HKLM)) + { + writer.WriteAttributeString("Root", "HKLM"); + } + if ((this.rootField == RootType.HKCU)) + { + writer.WriteAttributeString("Root", "HKCU"); + } + if ((this.rootField == RootType.HKCR)) + { + writer.WriteAttributeString("Root", "HKCR"); + } + if ((this.rootField == RootType.HKU)) + { + writer.WriteAttributeString("Root", "HKU"); + } + } + if (this.keyFieldSet) + { + writer.WriteAttributeString("Key", this.keyField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.formatFieldSet) + { + if ((this.formatField == FormatType.raw)) + { + writer.WriteAttributeString("Format", "raw"); + } + if ((this.formatField == FormatType.compatible)) + { + writer.WriteAttributeString("Format", "compatible"); + } + } + if (this.expandEnvironmentVariablesFieldSet) + { + if ((this.expandEnvironmentVariablesField == YesNoType.no)) + { + writer.WriteAttributeString("ExpandEnvironmentVariables", "no"); + } + if ((this.expandEnvironmentVariablesField == YesNoType.yes)) + { + writer.WriteAttributeString("ExpandEnvironmentVariables", "yes"); + } + } + if (this.resultFieldSet) + { + if ((this.resultField == ResultType.exists)) + { + writer.WriteAttributeString("Result", "exists"); + } + if ((this.resultField == ResultType.value)) + { + writer.WriteAttributeString("Result", "value"); + } + } + if (this.win64FieldSet) + { + if ((this.win64Field == YesNoType.no)) + { + writer.WriteAttributeString("Win64", "no"); + } + if ((this.win64Field == YesNoType.yes)) + { + writer.WriteAttributeString("Win64", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Variable" == name)) + { + this.variableField = value; + this.variableFieldSet = true; + } + if (("Condition" == name)) + { + this.conditionField = value; + this.conditionFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("Root" == name)) + { + this.rootField = RegistrySearch.ParseRootType(value); + this.rootFieldSet = true; + } + if (("Key" == name)) + { + this.keyField = value; + this.keyFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Format" == name)) + { + this.formatField = RegistrySearch.ParseFormatType(value); + this.formatFieldSet = true; + } + if (("ExpandEnvironmentVariables" == name)) + { + this.expandEnvironmentVariablesField = Enums.ParseYesNoType(value); + this.expandEnvironmentVariablesFieldSet = true; + } + if (("Result" == name)) + { + this.resultField = RegistrySearch.ParseResultType(value); + this.resultFieldSet = true; + } + if (("Win64" == name)) + { + this.win64Field = Enums.ParseYesNoType(value); + this.win64FieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum RootType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// HKEY_LOCAL_MACHINE + /// + HKLM, + + /// + /// HKEY_CURRENT_USER + /// + HKCU, + + /// + /// HKEY_CLASSES_ROOT + /// + HKCR, + + /// + /// HKEY_USERS + /// + HKU, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum FormatType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Returns the unformatted value directly from the registry. For example, a REG_DWORD value of '1' is returned as '1', not '#1'. + /// + raw, + + /// + /// Returns the value formatted as Windows Installer would. For example, a REG_DWORD value of '1' is returned as '#1', not '1'. + /// + compatible, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum ResultType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Saves true if a matching registry entry is found; false otherwise. + /// + exists, + + /// + /// Saves the value of the registry key in the variable. This is the default. + /// + value, + } + } + + /// + /// References a RegistrySearch. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class RegistrySearchRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegistrySearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Service configuration information for failure actions. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class ServiceConfig : ISchemaElement, ISetAttributes + { + + private string serviceNameField; + + private bool serviceNameFieldSet; + + private FirstFailureActionTypeType firstFailureActionTypeField; + + private bool firstFailureActionTypeFieldSet; + + private SecondFailureActionTypeType secondFailureActionTypeField; + + private bool secondFailureActionTypeFieldSet; + + private ThirdFailureActionTypeType thirdFailureActionTypeField; + + private bool thirdFailureActionTypeFieldSet; + + private int resetPeriodInDaysField; + + private bool resetPeriodInDaysFieldSet; + + private int restartServiceDelayInSecondsField; + + private bool restartServiceDelayInSecondsFieldSet; + + private string programCommandLineField; + + private bool programCommandLineFieldSet; + + private string rebootMessageField; + + private bool rebootMessageFieldSet; + + private ISchemaElement parentElement; + + /// + /// Required if not under a ServiceInstall element. + /// + public string ServiceName + { + get + { + return this.serviceNameField; + } + set + { + this.serviceNameFieldSet = true; + this.serviceNameField = value; + } + } + + /// + /// Action to take on the first failure of the service. + /// + public FirstFailureActionTypeType FirstFailureActionType + { + get + { + return this.firstFailureActionTypeField; + } + set + { + this.firstFailureActionTypeFieldSet = true; + this.firstFailureActionTypeField = value; + } + } + + /// + /// Action to take on the second failure of the service. + /// + public SecondFailureActionTypeType SecondFailureActionType + { + get + { + return this.secondFailureActionTypeField; + } + set + { + this.secondFailureActionTypeFieldSet = true; + this.secondFailureActionTypeField = value; + } + } + + /// + /// Action to take on the third failure of the service. + /// + public ThirdFailureActionTypeType ThirdFailureActionType + { + get + { + return this.thirdFailureActionTypeField; + } + set + { + this.thirdFailureActionTypeFieldSet = true; + this.thirdFailureActionTypeField = value; + } + } + + /// + /// Number of days after which to reset the failure count to zero if there are no failures. + /// + public int ResetPeriodInDays + { + get + { + return this.resetPeriodInDaysField; + } + set + { + this.resetPeriodInDaysFieldSet = true; + this.resetPeriodInDaysField = value; + } + } + + /// + /// If any of the three *ActionType attributes is "restart", this specifies the number of seconds to wait before doing so. + /// + public int RestartServiceDelayInSeconds + { + get + { + return this.restartServiceDelayInSecondsField; + } + set + { + this.restartServiceDelayInSecondsFieldSet = true; + this.restartServiceDelayInSecondsField = value; + } + } + + /// + /// If any of the three *ActionType attributes is "runCommand", this specifies the command to run when doing so. This value is formatted. + /// + public string ProgramCommandLine + { + get + { + return this.programCommandLineField; + } + set + { + this.programCommandLineFieldSet = true; + this.programCommandLineField = value; + } + } + + /// + /// If any of the three *ActionType attributes is "reboot", this specifies the message to broadcast to server users before doing so. + /// + public string RebootMessage + { + get + { + return this.rebootMessageField; + } + set + { + this.rebootMessageFieldSet = true; + this.rebootMessageField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a FirstFailureActionTypeType from a string. + /// + public static FirstFailureActionTypeType ParseFirstFailureActionTypeType(string value) + { + FirstFailureActionTypeType parsedValue; + ServiceConfig.TryParseFirstFailureActionTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a FirstFailureActionTypeType from a string. + /// + public static bool TryParseFirstFailureActionTypeType(string value, out FirstFailureActionTypeType parsedValue) + { + parsedValue = FirstFailureActionTypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("none" == value)) + { + parsedValue = FirstFailureActionTypeType.none; + } + else + { + if (("reboot" == value)) + { + parsedValue = FirstFailureActionTypeType.reboot; + } + else + { + if (("restart" == value)) + { + parsedValue = FirstFailureActionTypeType.restart; + } + else + { + if (("runCommand" == value)) + { + parsedValue = FirstFailureActionTypeType.runCommand; + } + else + { + parsedValue = FirstFailureActionTypeType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Parses a SecondFailureActionTypeType from a string. + /// + public static SecondFailureActionTypeType ParseSecondFailureActionTypeType(string value) + { + SecondFailureActionTypeType parsedValue; + ServiceConfig.TryParseSecondFailureActionTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a SecondFailureActionTypeType from a string. + /// + public static bool TryParseSecondFailureActionTypeType(string value, out SecondFailureActionTypeType parsedValue) + { + parsedValue = SecondFailureActionTypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("none" == value)) + { + parsedValue = SecondFailureActionTypeType.none; + } + else + { + if (("reboot" == value)) + { + parsedValue = SecondFailureActionTypeType.reboot; + } + else + { + if (("restart" == value)) + { + parsedValue = SecondFailureActionTypeType.restart; + } + else + { + if (("runCommand" == value)) + { + parsedValue = SecondFailureActionTypeType.runCommand; + } + else + { + parsedValue = SecondFailureActionTypeType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Parses a ThirdFailureActionTypeType from a string. + /// + public static ThirdFailureActionTypeType ParseThirdFailureActionTypeType(string value) + { + ThirdFailureActionTypeType parsedValue; + ServiceConfig.TryParseThirdFailureActionTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ThirdFailureActionTypeType from a string. + /// + public static bool TryParseThirdFailureActionTypeType(string value, out ThirdFailureActionTypeType parsedValue) + { + parsedValue = ThirdFailureActionTypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("none" == value)) + { + parsedValue = ThirdFailureActionTypeType.none; + } + else + { + if (("reboot" == value)) + { + parsedValue = ThirdFailureActionTypeType.reboot; + } + else + { + if (("restart" == value)) + { + parsedValue = ThirdFailureActionTypeType.restart; + } + else + { + if (("runCommand" == value)) + { + parsedValue = ThirdFailureActionTypeType.runCommand; + } + else + { + parsedValue = ThirdFailureActionTypeType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ServiceConfig", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.serviceNameFieldSet) + { + writer.WriteAttributeString("ServiceName", this.serviceNameField); + } + if (this.firstFailureActionTypeFieldSet) + { + if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.none)) + { + writer.WriteAttributeString("FirstFailureActionType", "none"); + } + if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.reboot)) + { + writer.WriteAttributeString("FirstFailureActionType", "reboot"); + } + if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.restart)) + { + writer.WriteAttributeString("FirstFailureActionType", "restart"); + } + if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.runCommand)) + { + writer.WriteAttributeString("FirstFailureActionType", "runCommand"); + } + } + if (this.secondFailureActionTypeFieldSet) + { + if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.none)) + { + writer.WriteAttributeString("SecondFailureActionType", "none"); + } + if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.reboot)) + { + writer.WriteAttributeString("SecondFailureActionType", "reboot"); + } + if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.restart)) + { + writer.WriteAttributeString("SecondFailureActionType", "restart"); + } + if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.runCommand)) + { + writer.WriteAttributeString("SecondFailureActionType", "runCommand"); + } + } + if (this.thirdFailureActionTypeFieldSet) + { + if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.none)) + { + writer.WriteAttributeString("ThirdFailureActionType", "none"); + } + if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.reboot)) + { + writer.WriteAttributeString("ThirdFailureActionType", "reboot"); + } + if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.restart)) + { + writer.WriteAttributeString("ThirdFailureActionType", "restart"); + } + if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.runCommand)) + { + writer.WriteAttributeString("ThirdFailureActionType", "runCommand"); + } + } + if (this.resetPeriodInDaysFieldSet) + { + writer.WriteAttributeString("ResetPeriodInDays", this.resetPeriodInDaysField.ToString(CultureInfo.InvariantCulture)); + } + if (this.restartServiceDelayInSecondsFieldSet) + { + writer.WriteAttributeString("RestartServiceDelayInSeconds", this.restartServiceDelayInSecondsField.ToString(CultureInfo.InvariantCulture)); + } + if (this.programCommandLineFieldSet) + { + writer.WriteAttributeString("ProgramCommandLine", this.programCommandLineField); + } + if (this.rebootMessageFieldSet) + { + writer.WriteAttributeString("RebootMessage", this.rebootMessageField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("ServiceName" == name)) + { + this.serviceNameField = value; + this.serviceNameFieldSet = true; + } + if (("FirstFailureActionType" == name)) + { + this.firstFailureActionTypeField = ServiceConfig.ParseFirstFailureActionTypeType(value); + this.firstFailureActionTypeFieldSet = true; + } + if (("SecondFailureActionType" == name)) + { + this.secondFailureActionTypeField = ServiceConfig.ParseSecondFailureActionTypeType(value); + this.secondFailureActionTypeFieldSet = true; + } + if (("ThirdFailureActionType" == name)) + { + this.thirdFailureActionTypeField = ServiceConfig.ParseThirdFailureActionTypeType(value); + this.thirdFailureActionTypeFieldSet = true; + } + if (("ResetPeriodInDays" == name)) + { + this.resetPeriodInDaysField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.resetPeriodInDaysFieldSet = true; + } + if (("RestartServiceDelayInSeconds" == name)) + { + this.restartServiceDelayInSecondsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.restartServiceDelayInSecondsFieldSet = true; + } + if (("ProgramCommandLine" == name)) + { + this.programCommandLineField = value; + this.programCommandLineFieldSet = true; + } + if (("RebootMessage" == name)) + { + this.rebootMessageField = value; + this.rebootMessageFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum FirstFailureActionTypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + none, + + reboot, + + restart, + + runCommand, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum SecondFailureActionTypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + none, + + reboot, + + restart, + + runCommand, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum ThirdFailureActionTypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + none, + + reboot, + + restart, + + runCommand, + } + } + + /// + /// Updates the last modified date/time of a file. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class TouchFile : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string pathField; + + private bool pathFieldSet; + + private YesNoType onInstallField; + + private bool onInstallFieldSet; + + private YesNoType onReinstallField; + + private bool onReinstallFieldSet; + + private YesNoType onUninstallField; + + private bool onUninstallFieldSet; + + private YesNoType nonvitalField; + + private bool nonvitalFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier for the touch file operation. If the identifier is not specified it will be generated. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Path of the file to update. This value is formatted. + /// + public string Path + { + get + { + return this.pathField; + } + set + { + this.pathFieldSet = true; + this.pathField = value; + } + } + + /// + /// 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'. + /// + public YesNoType OnInstall + { + get + { + return this.onInstallField; + } + set + { + this.onInstallFieldSet = true; + this.onInstallField = value; + } + } + + /// + /// 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'. + /// + public YesNoType OnReinstall + { + get + { + return this.onReinstallField; + } + set + { + this.onReinstallFieldSet = true; + this.onReinstallField = value; + } + } + + /// + /// 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'. + /// + public YesNoType OnUninstall + { + get + { + return this.onUninstallField; + } + set + { + this.onUninstallFieldSet = true; + this.onUninstallField = value; + } + } + + /// + /// Indicates the installation will succeed even if the modified time of the file cannot be updated. The default is 'no'. + /// + public YesNoType Nonvital + { + get + { + return this.nonvitalField; + } + set + { + this.nonvitalFieldSet = true; + this.nonvitalField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("TouchFile", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.pathFieldSet) + { + writer.WriteAttributeString("Path", this.pathField); + } + if (this.onInstallFieldSet) + { + if ((this.onInstallField == YesNoType.no)) + { + writer.WriteAttributeString("OnInstall", "no"); + } + if ((this.onInstallField == YesNoType.yes)) + { + writer.WriteAttributeString("OnInstall", "yes"); + } + } + if (this.onReinstallFieldSet) + { + if ((this.onReinstallField == YesNoType.no)) + { + writer.WriteAttributeString("OnReinstall", "no"); + } + if ((this.onReinstallField == YesNoType.yes)) + { + writer.WriteAttributeString("OnReinstall", "yes"); + } + } + if (this.onUninstallFieldSet) + { + if ((this.onUninstallField == YesNoType.no)) + { + writer.WriteAttributeString("OnUninstall", "no"); + } + if ((this.onUninstallField == YesNoType.yes)) + { + writer.WriteAttributeString("OnUninstall", "yes"); + } + } + if (this.nonvitalFieldSet) + { + if ((this.nonvitalField == YesNoType.no)) + { + writer.WriteAttributeString("Nonvital", "no"); + } + if ((this.nonvitalField == YesNoType.yes)) + { + writer.WriteAttributeString("Nonvital", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Path" == name)) + { + this.pathField = value; + this.pathFieldSet = true; + } + if (("OnInstall" == name)) + { + this.onInstallField = Enums.ParseYesNoType(value); + this.onInstallFieldSet = true; + } + if (("OnReinstall" == name)) + { + this.onReinstallField = Enums.ParseYesNoType(value); + this.onReinstallFieldSet = true; + } + if (("OnUninstall" == name)) + { + this.onUninstallField = Enums.ParseYesNoType(value); + this.onUninstallFieldSet = true; + } + if (("Nonvital" == name)) + { + this.nonvitalField = Enums.ParseYesNoType(value); + this.nonvitalFieldSet = true; + } + } + } + + /// + /// 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. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class User : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string domainField; + + private bool domainFieldSet; + + private string passwordField; + + private bool passwordFieldSet; + + private YesNoType passwordNeverExpiresField; + + private bool passwordNeverExpiresFieldSet; + + private YesNoType canNotChangePasswordField; + + private bool canNotChangePasswordFieldSet; + + private YesNoType removeOnUninstallField; + + private bool removeOnUninstallFieldSet; + + private YesNoType failIfExistsField; + + private bool failIfExistsFieldSet; + + private YesNoType logonAsServiceField; + + private bool logonAsServiceFieldSet; + + private YesNoType logonAsBatchJobField; + + private bool logonAsBatchJobFieldSet; + + private YesNoType updateIfExistsField; + + private bool updateIfExistsFieldSet; + + private YesNoType passwordExpiredField; + + private bool passwordExpiredFieldSet; + + private YesNoType disabledField; + + private bool disabledFieldSet; + + private YesNoType createUserField; + + private bool createUserFieldSet; + + private YesNoType vitalField; + + private bool vitalFieldSet; + + private ISchemaElement parentElement; + + public User() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(GroupRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// A + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// A + /// + public string Domain + { + get + { + return this.domainField; + } + set + { + this.domainFieldSet = true; + this.domainField = value; + } + } + + /// + /// Usually a Property that is passed in on the command-line to keep it more secure. + /// + public string Password + { + get + { + return this.passwordField; + } + set + { + this.passwordFieldSet = true; + this.passwordField = value; + } + } + + /// + /// The account's password never expires. Equivalent to UF_DONT_EXPIRE_PASSWD. + /// + public YesNoType PasswordNeverExpires + { + get + { + return this.passwordNeverExpiresField; + } + set + { + this.passwordNeverExpiresFieldSet = true; + this.passwordNeverExpiresField = value; + } + } + + /// + /// The user cannot change the account's password. Equivalent to UF_PASSWD_CANT_CHANGE. + /// + public YesNoType CanNotChangePassword + { + get + { + return this.canNotChangePasswordField; + } + set + { + this.canNotChangePasswordFieldSet = true; + this.canNotChangePasswordField = value; + } + } + + /// + /// Indicates whether the user account should be removed or left behind on uninstall. + /// + public YesNoType RemoveOnUninstall + { + get + { + return this.removeOnUninstallField; + } + set + { + this.removeOnUninstallFieldSet = true; + this.removeOnUninstallField = value; + } + } + + /// + /// Indicates if the install should fail if the user already exists. + /// + public YesNoType FailIfExists + { + get + { + return this.failIfExistsField; + } + set + { + this.failIfExistsFieldSet = true; + this.failIfExistsField = value; + } + } + + /// + /// 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. + /// + public YesNoType LogonAsService + { + get + { + return this.logonAsServiceField; + } + set + { + this.logonAsServiceFieldSet = true; + this.logonAsServiceField = value; + } + } + + /// + /// 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. + /// + public YesNoType LogonAsBatchJob + { + get + { + return this.logonAsBatchJobField; + } + set + { + this.logonAsBatchJobFieldSet = true; + this.logonAsBatchJobField = value; + } + } + + /// + /// Indicates if the user account properties should be updated if the user already exists. + /// + public YesNoType UpdateIfExists + { + get + { + return this.updateIfExistsField; + } + set + { + this.updateIfExistsFieldSet = true; + this.updateIfExistsField = value; + } + } + + /// + /// Indicates whether the user must change their password on their first login. + /// + public YesNoType PasswordExpired + { + get + { + return this.passwordExpiredField; + } + set + { + this.passwordExpiredFieldSet = true; + this.passwordExpiredField = value; + } + } + + /// + /// The account is disabled. Equivalent to UF_ACCOUNTDISABLE. + /// + public YesNoType Disabled + { + get + { + return this.disabledField; + } + set + { + this.disabledFieldSet = true; + this.disabledField = value; + } + } + + /// + /// 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. + /// + public YesNoType CreateUser + { + get + { + return this.createUserField; + } + set + { + this.createUserFieldSet = true; + this.createUserField = value; + } + } + + /// + /// Indicates whether failure to create the user or add the user to a group fails the installation. The default value is "yes". + /// + public YesNoType Vital + { + get + { + return this.vitalField; + } + set + { + this.vitalFieldSet = true; + this.vitalField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("GroupRef" == childName)) + { + childValue = new GroupRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("User", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.domainFieldSet) + { + writer.WriteAttributeString("Domain", this.domainField); + } + if (this.passwordFieldSet) + { + writer.WriteAttributeString("Password", this.passwordField); + } + if (this.passwordNeverExpiresFieldSet) + { + if ((this.passwordNeverExpiresField == YesNoType.no)) + { + writer.WriteAttributeString("PasswordNeverExpires", "no"); + } + if ((this.passwordNeverExpiresField == YesNoType.yes)) + { + writer.WriteAttributeString("PasswordNeverExpires", "yes"); + } + } + if (this.canNotChangePasswordFieldSet) + { + if ((this.canNotChangePasswordField == YesNoType.no)) + { + writer.WriteAttributeString("CanNotChangePassword", "no"); + } + if ((this.canNotChangePasswordField == YesNoType.yes)) + { + writer.WriteAttributeString("CanNotChangePassword", "yes"); + } + } + if (this.removeOnUninstallFieldSet) + { + if ((this.removeOnUninstallField == YesNoType.no)) + { + writer.WriteAttributeString("RemoveOnUninstall", "no"); + } + if ((this.removeOnUninstallField == YesNoType.yes)) + { + writer.WriteAttributeString("RemoveOnUninstall", "yes"); + } + } + if (this.failIfExistsFieldSet) + { + if ((this.failIfExistsField == YesNoType.no)) + { + writer.WriteAttributeString("FailIfExists", "no"); + } + if ((this.failIfExistsField == YesNoType.yes)) + { + writer.WriteAttributeString("FailIfExists", "yes"); + } + } + if (this.logonAsServiceFieldSet) + { + if ((this.logonAsServiceField == YesNoType.no)) + { + writer.WriteAttributeString("LogonAsService", "no"); + } + if ((this.logonAsServiceField == YesNoType.yes)) + { + writer.WriteAttributeString("LogonAsService", "yes"); + } + } + if (this.logonAsBatchJobFieldSet) + { + if ((this.logonAsBatchJobField == YesNoType.no)) + { + writer.WriteAttributeString("LogonAsBatchJob", "no"); + } + if ((this.logonAsBatchJobField == YesNoType.yes)) + { + writer.WriteAttributeString("LogonAsBatchJob", "yes"); + } + } + if (this.updateIfExistsFieldSet) + { + if ((this.updateIfExistsField == YesNoType.no)) + { + writer.WriteAttributeString("UpdateIfExists", "no"); + } + if ((this.updateIfExistsField == YesNoType.yes)) + { + writer.WriteAttributeString("UpdateIfExists", "yes"); + } + } + if (this.passwordExpiredFieldSet) + { + if ((this.passwordExpiredField == YesNoType.no)) + { + writer.WriteAttributeString("PasswordExpired", "no"); + } + if ((this.passwordExpiredField == YesNoType.yes)) + { + writer.WriteAttributeString("PasswordExpired", "yes"); + } + } + if (this.disabledFieldSet) + { + if ((this.disabledField == YesNoType.no)) + { + writer.WriteAttributeString("Disabled", "no"); + } + if ((this.disabledField == YesNoType.yes)) + { + writer.WriteAttributeString("Disabled", "yes"); + } + } + if (this.createUserFieldSet) + { + if ((this.createUserField == YesNoType.no)) + { + writer.WriteAttributeString("CreateUser", "no"); + } + if ((this.createUserField == YesNoType.yes)) + { + writer.WriteAttributeString("CreateUser", "yes"); + } + } + if (this.vitalFieldSet) + { + if ((this.vitalField == YesNoType.no)) + { + writer.WriteAttributeString("Vital", "no"); + } + if ((this.vitalField == YesNoType.yes)) + { + writer.WriteAttributeString("Vital", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Domain" == name)) + { + this.domainField = value; + this.domainFieldSet = true; + } + if (("Password" == name)) + { + this.passwordField = value; + this.passwordFieldSet = true; + } + if (("PasswordNeverExpires" == name)) + { + this.passwordNeverExpiresField = Enums.ParseYesNoType(value); + this.passwordNeverExpiresFieldSet = true; + } + if (("CanNotChangePassword" == name)) + { + this.canNotChangePasswordField = Enums.ParseYesNoType(value); + this.canNotChangePasswordFieldSet = true; + } + if (("RemoveOnUninstall" == name)) + { + this.removeOnUninstallField = Enums.ParseYesNoType(value); + this.removeOnUninstallFieldSet = true; + } + if (("FailIfExists" == name)) + { + this.failIfExistsField = Enums.ParseYesNoType(value); + this.failIfExistsFieldSet = true; + } + if (("LogonAsService" == name)) + { + this.logonAsServiceField = Enums.ParseYesNoType(value); + this.logonAsServiceFieldSet = true; + } + if (("LogonAsBatchJob" == name)) + { + this.logonAsBatchJobField = Enums.ParseYesNoType(value); + this.logonAsBatchJobFieldSet = true; + } + if (("UpdateIfExists" == name)) + { + this.updateIfExistsField = Enums.ParseYesNoType(value); + this.updateIfExistsFieldSet = true; + } + if (("PasswordExpired" == name)) + { + this.passwordExpiredField = Enums.ParseYesNoType(value); + this.passwordExpiredFieldSet = true; + } + if (("Disabled" == name)) + { + this.disabledField = Enums.ParseYesNoType(value); + this.disabledFieldSet = true; + } + if (("CreateUser" == name)) + { + this.createUserField = Enums.ParseYesNoType(value); + this.createUserFieldSet = true; + } + if (("Vital" == name)) + { + this.vitalField = Enums.ParseYesNoType(value); + this.vitalFieldSet = true; + } + } + } + + /// + /// Adds or removes .xml file entries. If you use the XmlFile element you must reference WixUtilExtension.dll as it contains the XmlFile custom actions. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class XmlFile : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string elementPathField; + + private bool elementPathFieldSet; + + private string fileField; + + private bool fileFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ActionType actionField; + + private bool actionFieldSet; + + private YesNoType permanentField; + + private bool permanentFieldSet; + + private YesNoType preserveModifiedDateField; + + private bool preserveModifiedDateFieldSet; + + private int sequenceField; + + private bool sequenceFieldSet; + + private SelectionLanguageType selectionLanguageField; + + private bool selectionLanguageFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier for xml file modification. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// 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. + /// + public string ElementPath + { + get + { + return this.elementPathField; + } + set + { + this.elementPathFieldSet = true; + this.elementPathField = value; + } + } + + /// + /// Path of the .xml file to configure. + /// + public string File + { + get + { + return this.fileField; + } + set + { + this.fileFieldSet = true; + this.fileField = value; + } + } + + /// + /// 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. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The value to be written. See the + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// The type of modification to be made to the XML file when the component is installed. + /// + public ActionType Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// Specifies whether or not the modification should be removed on uninstall. This has no effect on uninstall if the action was deleteValue. + /// + public YesNoType Permanent + { + get + { + return this.permanentField; + } + set + { + this.permanentFieldSet = true; + this.permanentField = value; + } + } + + /// + /// 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. + /// + public YesNoType PreserveModifiedDate + { + get + { + return this.preserveModifiedDateField; + } + set + { + this.preserveModifiedDateFieldSet = true; + this.preserveModifiedDateField = value; + } + } + + /// + /// 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. + /// + public int Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + /// + /// Specify whether the DOM object should use XPath language or the old XSLPattern language (default) as the query language. + /// + public SelectionLanguageType SelectionLanguage + { + get + { + return this.selectionLanguageField; + } + set + { + this.selectionLanguageFieldSet = true; + this.selectionLanguageField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ActionType from a string. + /// + public static ActionType ParseActionType(string value) + { + ActionType parsedValue; + XmlFile.TryParseActionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ActionType from a string. + /// + public static bool TryParseActionType(string value, out ActionType parsedValue) + { + parsedValue = ActionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("createElement" == value)) + { + parsedValue = ActionType.createElement; + } + else + { + if (("deleteValue" == value)) + { + parsedValue = ActionType.deleteValue; + } + else + { + if (("setValue" == value)) + { + parsedValue = ActionType.setValue; + } + else + { + if (("bulkSetValue" == value)) + { + parsedValue = ActionType.bulkSetValue; + } + else + { + parsedValue = ActionType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Parses a SelectionLanguageType from a string. + /// + public static SelectionLanguageType ParseSelectionLanguageType(string value) + { + SelectionLanguageType parsedValue; + XmlFile.TryParseSelectionLanguageType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a SelectionLanguageType from a string. + /// + public static bool TryParseSelectionLanguageType(string value, out SelectionLanguageType parsedValue) + { + parsedValue = SelectionLanguageType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("XPath" == value)) + { + parsedValue = SelectionLanguageType.XPath; + } + else + { + if (("XSLPattern" == value)) + { + parsedValue = SelectionLanguageType.XSLPattern; + } + else + { + parsedValue = SelectionLanguageType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("XmlFile", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.elementPathFieldSet) + { + writer.WriteAttributeString("ElementPath", this.elementPathField); + } + if (this.fileFieldSet) + { + writer.WriteAttributeString("File", this.fileField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.actionFieldSet) + { + if ((this.actionField == ActionType.createElement)) + { + writer.WriteAttributeString("Action", "createElement"); + } + if ((this.actionField == ActionType.deleteValue)) + { + writer.WriteAttributeString("Action", "deleteValue"); + } + if ((this.actionField == ActionType.setValue)) + { + writer.WriteAttributeString("Action", "setValue"); + } + if ((this.actionField == ActionType.bulkSetValue)) + { + writer.WriteAttributeString("Action", "bulkSetValue"); + } + } + if (this.permanentFieldSet) + { + if ((this.permanentField == YesNoType.no)) + { + writer.WriteAttributeString("Permanent", "no"); + } + if ((this.permanentField == YesNoType.yes)) + { + writer.WriteAttributeString("Permanent", "yes"); + } + } + if (this.preserveModifiedDateFieldSet) + { + if ((this.preserveModifiedDateField == YesNoType.no)) + { + writer.WriteAttributeString("PreserveModifiedDate", "no"); + } + if ((this.preserveModifiedDateField == YesNoType.yes)) + { + writer.WriteAttributeString("PreserveModifiedDate", "yes"); + } + } + if (this.sequenceFieldSet) + { + writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); + } + if (this.selectionLanguageFieldSet) + { + if ((this.selectionLanguageField == SelectionLanguageType.XPath)) + { + writer.WriteAttributeString("SelectionLanguage", "XPath"); + } + if ((this.selectionLanguageField == SelectionLanguageType.XSLPattern)) + { + writer.WriteAttributeString("SelectionLanguage", "XSLPattern"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("ElementPath" == name)) + { + this.elementPathField = value; + this.elementPathFieldSet = true; + } + if (("File" == name)) + { + this.fileField = value; + this.fileFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Action" == name)) + { + this.actionField = XmlFile.ParseActionType(value); + this.actionFieldSet = true; + } + if (("Permanent" == name)) + { + this.permanentField = Enums.ParseYesNoType(value); + this.permanentFieldSet = true; + } + if (("PreserveModifiedDate" == name)) + { + this.preserveModifiedDateField = Enums.ParseYesNoType(value); + this.preserveModifiedDateFieldSet = true; + } + if (("Sequence" == name)) + { + this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sequenceFieldSet = true; + } + if (("SelectionLanguage" == name)) + { + this.selectionLanguageField = XmlFile.ParseSelectionLanguageType(value); + this.selectionLanguageFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum ActionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// 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. + /// + createElement, + + /// + /// 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. + /// + deleteValue, + + /// + /// 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. + /// + setValue, + + /// + /// 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. + /// + bulkSetValue, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum SelectionLanguageType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + XPath, + + XSLPattern, + } + } + + /// + /// Adds or removes .xml file entries. If you use the XmlConfig element you must reference WixUtilExtension.dll as it contains the XmlConfig custom actions. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class XmlConfig : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ActionType actionField; + + private bool actionFieldSet; + + private string elementIdField; + + private bool elementIdFieldSet; + + private string elementPathField; + + private bool elementPathFieldSet; + + private string fileField; + + private bool fileFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private NodeType nodeField; + + private bool nodeFieldSet; + + private OnType onField; + + private bool onFieldSet; + + private YesNoType preserveModifiedDateField; + + private bool preserveModifiedDateFieldSet; + + private int sequenceField; + + private bool sequenceFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private string verifyPathField; + + private bool verifyPathFieldSet; + + private ISchemaElement parentElement; + + public XmlConfig() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(XmlConfig))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for xml file modification. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public ActionType Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// The Id of another XmlConfig to add attributes to. In this case, the 'ElementPath', 'Action', 'Node', and 'On' attributes must be omitted. + /// + public string ElementId + { + get + { + return this.elementIdField; + } + set + { + this.elementIdFieldSet = true; + this.elementIdField = value; + } + } + + /// + /// 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. + /// + public string ElementPath + { + get + { + return this.elementPathField; + } + set + { + this.elementPathFieldSet = true; + this.elementPathField = value; + } + } + + /// + /// Path of the .xml file to configure. + /// + public string File + { + get + { + return this.fileField; + } + set + { + this.fileFieldSet = true; + this.fileField = value; + } + } + + /// + /// 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. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + public NodeType Node + { + get + { + return this.nodeField; + } + set + { + this.nodeFieldSet = true; + this.nodeField = value; + } + } + + public OnType On + { + get + { + return this.onField; + } + set + { + this.onFieldSet = true; + this.onField = value; + } + } + + /// + /// 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. + /// + public YesNoType PreserveModifiedDate + { + get + { + return this.preserveModifiedDateField; + } + set + { + this.preserveModifiedDateFieldSet = true; + this.preserveModifiedDateField = value; + } + } + + /// + /// 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. + /// + public int Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + /// + /// The value to be written. See the + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// 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. + /// + public string VerifyPath + { + get + { + return this.verifyPathField; + } + set + { + this.verifyPathFieldSet = true; + this.verifyPathField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("XmlConfig" == childName)) + { + childValue = new XmlConfig(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a ActionType from a string. + /// + public static ActionType ParseActionType(string value) + { + ActionType parsedValue; + XmlConfig.TryParseActionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ActionType from a string. + /// + public static bool TryParseActionType(string value, out ActionType parsedValue) + { + parsedValue = ActionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("create" == value)) + { + parsedValue = ActionType.create; + } + else + { + if (("delete" == value)) + { + parsedValue = ActionType.delete; + } + else + { + parsedValue = ActionType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Parses a NodeType from a string. + /// + public static NodeType ParseNodeType(string value) + { + NodeType parsedValue; + XmlConfig.TryParseNodeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a NodeType from a string. + /// + public static bool TryParseNodeType(string value, out NodeType parsedValue) + { + parsedValue = NodeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("element" == value)) + { + parsedValue = NodeType.element; + } + else + { + if (("value" == value)) + { + parsedValue = NodeType.value; + } + else + { + if (("document" == value)) + { + parsedValue = NodeType.document; + } + else + { + parsedValue = NodeType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a OnType from a string. + /// + public static OnType ParseOnType(string value) + { + OnType parsedValue; + XmlConfig.TryParseOnType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a OnType from a string. + /// + public static bool TryParseOnType(string value, out OnType parsedValue) + { + parsedValue = OnType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("install" == value)) + { + parsedValue = OnType.install; + } + else + { + if (("uninstall" == value)) + { + parsedValue = OnType.uninstall; + } + else + { + parsedValue = OnType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("XmlConfig", "http://wixtoolset.org/schemas/v4/wxs/util"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.actionFieldSet) + { + if ((this.actionField == ActionType.create)) + { + writer.WriteAttributeString("Action", "create"); + } + if ((this.actionField == ActionType.delete)) + { + writer.WriteAttributeString("Action", "delete"); + } + } + if (this.elementIdFieldSet) + { + writer.WriteAttributeString("ElementId", this.elementIdField); + } + if (this.elementPathFieldSet) + { + writer.WriteAttributeString("ElementPath", this.elementPathField); + } + if (this.fileFieldSet) + { + writer.WriteAttributeString("File", this.fileField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.nodeFieldSet) + { + if ((this.nodeField == NodeType.element)) + { + writer.WriteAttributeString("Node", "element"); + } + if ((this.nodeField == NodeType.value)) + { + writer.WriteAttributeString("Node", "value"); + } + if ((this.nodeField == NodeType.document)) + { + writer.WriteAttributeString("Node", "document"); + } + } + if (this.onFieldSet) + { + if ((this.onField == OnType.install)) + { + writer.WriteAttributeString("On", "install"); + } + if ((this.onField == OnType.uninstall)) + { + writer.WriteAttributeString("On", "uninstall"); + } + } + if (this.preserveModifiedDateFieldSet) + { + if ((this.preserveModifiedDateField == YesNoType.no)) + { + writer.WriteAttributeString("PreserveModifiedDate", "no"); + } + if ((this.preserveModifiedDateField == YesNoType.yes)) + { + writer.WriteAttributeString("PreserveModifiedDate", "yes"); + } + } + if (this.sequenceFieldSet) + { + writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.verifyPathFieldSet) + { + writer.WriteAttributeString("VerifyPath", this.verifyPathField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Action" == name)) + { + this.actionField = XmlConfig.ParseActionType(value); + this.actionFieldSet = true; + } + if (("ElementId" == name)) + { + this.elementIdField = value; + this.elementIdFieldSet = true; + } + if (("ElementPath" == name)) + { + this.elementPathField = value; + this.elementPathFieldSet = true; + } + if (("File" == name)) + { + this.fileField = value; + this.fileFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Node" == name)) + { + this.nodeField = XmlConfig.ParseNodeType(value); + this.nodeFieldSet = true; + } + if (("On" == name)) + { + this.onField = XmlConfig.ParseOnType(value); + this.onFieldSet = true; + } + if (("PreserveModifiedDate" == name)) + { + this.preserveModifiedDateField = Enums.ParseYesNoType(value); + this.preserveModifiedDateFieldSet = true; + } + if (("Sequence" == name)) + { + this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sequenceFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("VerifyPath" == name)) + { + this.verifyPathField = value; + this.verifyPathFieldSet = true; + } + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum ActionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + create, + + delete, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum NodeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + element, + + value, + + document, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum OnType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + install, + + uninstall, + } + } +} 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 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 +namespace WixToolset.Harvesters.Serialize.VS +{ + using System; + using System.CodeDom.Compiler; + using System.Collections; + using System.Diagnostics.CodeAnalysis; + using System.Globalization; + using System.Xml; + using WixToolset.Harvesters.Serialize; + + + /// + /// Values of this type will either be "yes" or "no". + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public enum YesNoType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + no, + + yes, + } + + [GeneratedCode("XsdGen", "4.0.0.0")] + public class Enums + { + + /// + /// Parses a YesNoType from a string. + /// + public static YesNoType ParseYesNoType(string value) + { + YesNoType parsedValue; + Enums.TryParseYesNoType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a YesNoType from a string. + /// + public static bool TryParseYesNoType(string value, out YesNoType parsedValue) + { + parsedValue = YesNoType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("no" == value)) + { + parsedValue = YesNoType.no; + } + else + { + if (("yes" == value)) + { + parsedValue = YesNoType.yes; + } + else + { + parsedValue = YesNoType.IllegalValue; + return false; + } + } + return true; + } + } + + /// + /// Help Namespace for a help collection. The parent file is the key for the HxC (Collection) file. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class HelpCollection : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private YesNoType suppressCustomActionsField; + + private bool suppressCustomActionsFieldSet; + + private ISchemaElement parentElement; + + public HelpCollection() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFileRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFilterRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PlugCollectionInto))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Primary Key for HelpNamespace. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Friendly name for Namespace. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Internal Microsoft Help ID for this Namespace. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + /// + public YesNoType SuppressCustomActions + { + get + { + return this.suppressCustomActionsField; + } + set + { + this.suppressCustomActionsFieldSet = true; + this.suppressCustomActionsField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("HelpFileRef" == childName)) + { + childValue = new HelpFileRef(); + } + if (("HelpFilterRef" == childName)) + { + childValue = new HelpFilterRef(); + } + if (("PlugCollectionInto" == childName)) + { + childValue = new PlugCollectionInto(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("HelpCollection", "http://wixtoolset.org/schemas/v4/wxs/vs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.suppressCustomActionsFieldSet) + { + if ((this.suppressCustomActionsField == YesNoType.no)) + { + writer.WriteAttributeString("SuppressCustomActions", "no"); + } + if ((this.suppressCustomActionsField == YesNoType.yes)) + { + writer.WriteAttributeString("SuppressCustomActions", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("SuppressCustomActions" == name)) + { + this.suppressCustomActionsField = Enums.ParseYesNoType(value); + this.suppressCustomActionsFieldSet = true; + } + } + } + + /// + /// Filter for Help Namespace. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class HelpFilter : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string filterDefinitionField; + + private bool filterDefinitionFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private YesNoType suppressCustomActionsField; + + private bool suppressCustomActionsFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary Key for HelpFilter. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Query String for Help Filter. + /// + public string FilterDefinition + { + get + { + return this.filterDefinitionField; + } + set + { + this.filterDefinitionFieldSet = true; + this.filterDefinitionField = value; + } + } + + /// + /// Friendly name for Filter. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + /// + public YesNoType SuppressCustomActions + { + get + { + return this.suppressCustomActionsField; + } + set + { + this.suppressCustomActionsFieldSet = true; + this.suppressCustomActionsField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("HelpFilter", "http://wixtoolset.org/schemas/v4/wxs/vs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.filterDefinitionFieldSet) + { + writer.WriteAttributeString("FilterDefinition", this.filterDefinitionField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.suppressCustomActionsFieldSet) + { + if ((this.suppressCustomActionsField == YesNoType.no)) + { + writer.WriteAttributeString("SuppressCustomActions", "no"); + } + if ((this.suppressCustomActionsField == YesNoType.yes)) + { + writer.WriteAttributeString("SuppressCustomActions", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("FilterDefinition" == name)) + { + this.filterDefinitionField = value; + this.filterDefinitionFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("SuppressCustomActions" == name)) + { + this.suppressCustomActionsField = Enums.ParseYesNoType(value); + this.suppressCustomActionsFieldSet = true; + } + } + } + + /// + /// File for Help Namespace. The parent file is the key for HxS (Title) file. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class HelpFile : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string attributeIndexField; + + private bool attributeIndexFieldSet; + + private string indexField; + + private bool indexFieldSet; + + private int languageField; + + private bool languageFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string sampleLocationField; + + private bool sampleLocationFieldSet; + + private string searchField; + + private bool searchFieldSet; + + private YesNoType suppressCustomActionsField; + + private bool suppressCustomActionsFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary Key for HelpFile Table. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Key for HxR (Attributes) file. + /// + public string AttributeIndex + { + get + { + return this.attributeIndexField; + } + set + { + this.attributeIndexFieldSet = true; + this.attributeIndexField = value; + } + } + + /// + /// Key for HxI (Index) file. + /// + public string Index + { + get + { + return this.indexField; + } + set + { + this.indexFieldSet = true; + this.indexField = value; + } + } + + /// + /// Language ID for content file. + /// + public int Language + { + get + { + return this.languageField; + } + set + { + this.languageFieldSet = true; + this.languageField = value; + } + } + + /// + /// Internal Microsoft Help ID for this HelpFile. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Key for a file that is in the "root" of the samples directory for this HelpFile. + /// + public string SampleLocation + { + get + { + return this.sampleLocationField; + } + set + { + this.sampleLocationFieldSet = true; + this.sampleLocationField = value; + } + } + + /// + /// Key for HxQ (Query) file. + /// + public string Search + { + get + { + return this.searchField; + } + set + { + this.searchFieldSet = true; + this.searchField = value; + } + } + + /// + /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. + /// + public YesNoType SuppressCustomActions + { + get + { + return this.suppressCustomActionsField; + } + set + { + this.suppressCustomActionsFieldSet = true; + this.suppressCustomActionsField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("HelpFile", "http://wixtoolset.org/schemas/v4/wxs/vs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.attributeIndexFieldSet) + { + writer.WriteAttributeString("AttributeIndex", this.attributeIndexField); + } + if (this.indexFieldSet) + { + writer.WriteAttributeString("Index", this.indexField); + } + if (this.languageFieldSet) + { + writer.WriteAttributeString("Language", this.languageField.ToString(CultureInfo.InvariantCulture)); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.sampleLocationFieldSet) + { + writer.WriteAttributeString("SampleLocation", this.sampleLocationField); + } + if (this.searchFieldSet) + { + writer.WriteAttributeString("Search", this.searchField); + } + if (this.suppressCustomActionsFieldSet) + { + if ((this.suppressCustomActionsField == YesNoType.no)) + { + writer.WriteAttributeString("SuppressCustomActions", "no"); + } + if ((this.suppressCustomActionsField == YesNoType.yes)) + { + writer.WriteAttributeString("SuppressCustomActions", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("AttributeIndex" == name)) + { + this.attributeIndexField = value; + this.attributeIndexFieldSet = true; + } + if (("Index" == name)) + { + this.indexField = value; + this.indexFieldSet = true; + } + if (("Language" == name)) + { + this.languageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.languageFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("SampleLocation" == name)) + { + this.sampleLocationField = value; + this.sampleLocationFieldSet = true; + } + if (("Search" == name)) + { + this.searchField = value; + this.searchFieldSet = true; + } + if (("SuppressCustomActions" == name)) + { + this.suppressCustomActionsField = Enums.ParseYesNoType(value); + this.suppressCustomActionsFieldSet = true; + } + } + } + + /// + /// Plugin for Help Namespace. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class PlugCollectionInto : ISchemaElement, ISetAttributes + { + + private string attributesField; + + private bool attributesFieldSet; + + private string tableOfContentsField; + + private bool tableOfContentsFieldSet; + + private string targetCollectionField; + + private bool targetCollectionFieldSet; + + private string targetTableOfContentsField; + + private bool targetTableOfContentsFieldSet; + + private string targetFeatureField; + + private bool targetFeatureFieldSet; + + private YesNoType suppressExternalNamespacesField; + + private bool suppressExternalNamespacesFieldSet; + + private ISchemaElement parentElement; + + /// + /// Key for HxA (Attributes) file of child namespace. + /// + public string Attributes + { + get + { + return this.attributesField; + } + set + { + this.attributesFieldSet = true; + this.attributesField = value; + } + } + + /// + /// Key for HxT file of child namespace. + /// + public string TableOfContents + { + get + { + return this.tableOfContentsField; + } + set + { + this.tableOfContentsFieldSet = true; + this.tableOfContentsField = value; + } + } + + /// + /// Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted. + /// The following special keys can be used to plug into external namespaces defined outside of the installer. + /// MS_VSIPCC_v80 : Visual Studio 2005 + /// MS.VSIPCC.v90 : Visual Studio 2008 + /// + public string TargetCollection + { + get + { + return this.targetCollectionField; + } + set + { + this.targetCollectionFieldSet = true; + this.targetCollectionField = value; + } + } + + /// + /// Key for HxT file of parent namespace that now includes the new child namespace. + /// + public string TargetTableOfContents + { + get + { + return this.targetTableOfContentsField; + } + set + { + this.targetTableOfContentsFieldSet = true; + this.targetTableOfContentsField = value; + } + } + + /// + /// Key for the feature parent of this help collection. Required only when plugging into external namespaces. + /// + public string TargetFeature + { + get + { + return this.targetFeatureField; + } + set + { + this.targetFeatureFieldSet = true; + this.targetFeatureField = value; + } + } + + /// + /// Suppress linking Visual Studio Help namespaces. Help redistributable merge modules will be required. Use this when building a merge module. + /// + public YesNoType SuppressExternalNamespaces + { + get + { + return this.suppressExternalNamespacesField; + } + set + { + this.suppressExternalNamespacesFieldSet = true; + this.suppressExternalNamespacesField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PlugCollectionInto", "http://wixtoolset.org/schemas/v4/wxs/vs"); + if (this.attributesFieldSet) + { + writer.WriteAttributeString("Attributes", this.attributesField); + } + if (this.tableOfContentsFieldSet) + { + writer.WriteAttributeString("TableOfContents", this.tableOfContentsField); + } + if (this.targetCollectionFieldSet) + { + writer.WriteAttributeString("TargetCollection", this.targetCollectionField); + } + if (this.targetTableOfContentsFieldSet) + { + writer.WriteAttributeString("TargetTableOfContents", this.targetTableOfContentsField); + } + if (this.targetFeatureFieldSet) + { + writer.WriteAttributeString("TargetFeature", this.targetFeatureField); + } + if (this.suppressExternalNamespacesFieldSet) + { + if ((this.suppressExternalNamespacesField == YesNoType.no)) + { + writer.WriteAttributeString("SuppressExternalNamespaces", "no"); + } + if ((this.suppressExternalNamespacesField == YesNoType.yes)) + { + writer.WriteAttributeString("SuppressExternalNamespaces", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Attributes" == name)) + { + this.attributesField = value; + this.attributesFieldSet = true; + } + if (("TableOfContents" == name)) + { + this.tableOfContentsField = value; + this.tableOfContentsFieldSet = true; + } + if (("TargetCollection" == name)) + { + this.targetCollectionField = value; + this.targetCollectionFieldSet = true; + } + if (("TargetTableOfContents" == name)) + { + this.targetTableOfContentsField = value; + this.targetTableOfContentsFieldSet = true; + } + if (("TargetFeature" == name)) + { + this.targetFeatureField = value; + this.targetFeatureFieldSet = true; + } + if (("SuppressExternalNamespaces" == name)) + { + this.suppressExternalNamespacesField = Enums.ParseYesNoType(value); + this.suppressExternalNamespacesFieldSet = true; + } + } + } + + /// + /// Create a reference to a HelpFile element in another Fragment. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class HelpFileRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary Key for HelpFile Table. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("HelpFileRef", "http://wixtoolset.org/schemas/v4/wxs/vs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Create a reference to a HelpFile element in another Fragment. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class HelpFilterRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary Key for HelpFilter. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("HelpFilterRef", "http://wixtoolset.org/schemas/v4/wxs/vs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Create a reference to a HelpCollection element in another Fragment. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class HelpCollectionRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public HelpCollectionRef() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFileRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Primary Key for HelpNamespace Table. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("HelpFileRef" == childName)) + { + childValue = new HelpFileRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("HelpCollectionRef", "http://wixtoolset.org/schemas/v4/wxs/vs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// This element provides the metdata required to install/uninstall a file as + /// a VSIX Package. The VSIX package file will be installed as part of the MSI + /// then passed to the VSIX installer to install the VSIX package. To avoid the + /// duplication, simply use the MSI to install the VSIX package itself. + /// + [GeneratedCode("XsdGen", "4.0.0.0")] + public class VsixPackage : ISchemaElement, ISetAttributes + { + + private string fileField; + + private bool fileFieldSet; + + private string packageIdField; + + private bool packageIdFieldSet; + + private YesNoType permanentField; + + private bool permanentFieldSet; + + private string targetField; + + private bool targetFieldSet; + + private string targetVersionField; + + private bool targetVersionFieldSet; + + private YesNoType vitalField; + + private bool vitalFieldSet; + + private string vsixInstallerPathPropertyField; + + private bool vsixInstallerPathPropertyFieldSet; + + private ISchemaElement parentElement; + + /// + /// Reference to file identifer. This attribute is required when the element is not a + /// child of a File element and is invalid when the element is a child of the File element. + /// + public string File + { + get + { + return this.fileField; + } + set + { + this.fileFieldSet = true; + this.fileField = value; + } + } + + /// + /// Identity of the VSIX package per its internal manifest. If this value is not correct + /// the VSIX package will not correctly uninstall. + /// + public string PackageId + { + get + { + return this.packageIdField; + } + set + { + this.packageIdFieldSet = true; + this.packageIdField = value; + } + } + + /// + /// Indicates whether the VSIX package is uninstalled when the parent Component is uninstalled. + /// The default is 'no'. + /// + public YesNoType Permanent + { + get + { + return this.permanentField; + } + set + { + this.permanentFieldSet = true; + this.permanentField = value; + } + } + + /// + /// Specifies the SKU of Visual Studio in which to register the extension. If no target + /// is specified the extension is registered with all installed SKUs. If the Target + /// attribute is specified the TargetVersion attribute must also be specified. The + /// following is a list of known Visual Studio targets: integratedShell, professional, + /// premium, ultimate, vbExpress, vcExpress, vcsExpress, vwdExpress + /// + public string Target + { + get + { + return this.targetField; + } + set + { + this.targetFieldSet = true; + this.targetField = value; + } + } + + /// + /// Specifies the version of Visual Studio in which to register the extension. This attribute + /// is required if the Target attribute is specified. + /// + public string TargetVersion + { + get + { + return this.targetVersionField; + } + set + { + this.targetVersionFieldSet = true; + this.targetVersionField = value; + } + } + + /// + /// Indicates whether failure to install the VSIX package causes the installation to rollback. + /// The default is 'yes'. + /// + public YesNoType Vital + { + get + { + return this.vitalField; + } + set + { + this.vitalFieldSet = true; + this.vitalField = value; + } + } + + /// + /// Optional reference to a Property element that contains the path to the VsixInstaller.exe. + /// By default, the latest VsixInstaller.exe on the machine will be used to install the VSIX + /// package. It is highly recommended that this attribute is *not* used. + /// + public string VsixInstallerPathProperty + { + get + { + return this.vsixInstallerPathPropertyField; + } + set + { + this.vsixInstallerPathPropertyFieldSet = true; + this.vsixInstallerPathPropertyField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("VsixPackage", "http://wixtoolset.org/schemas/v4/wxs/vs"); + if (this.fileFieldSet) + { + writer.WriteAttributeString("File", this.fileField); + } + if (this.packageIdFieldSet) + { + writer.WriteAttributeString("PackageId", this.packageIdField); + } + if (this.permanentFieldSet) + { + if ((this.permanentField == YesNoType.no)) + { + writer.WriteAttributeString("Permanent", "no"); + } + if ((this.permanentField == YesNoType.yes)) + { + writer.WriteAttributeString("Permanent", "yes"); + } + } + if (this.targetFieldSet) + { + writer.WriteAttributeString("Target", this.targetField); + } + if (this.targetVersionFieldSet) + { + writer.WriteAttributeString("TargetVersion", this.targetVersionField); + } + if (this.vitalFieldSet) + { + if ((this.vitalField == YesNoType.no)) + { + writer.WriteAttributeString("Vital", "no"); + } + if ((this.vitalField == YesNoType.yes)) + { + writer.WriteAttributeString("Vital", "yes"); + } + } + if (this.vsixInstallerPathPropertyFieldSet) + { + writer.WriteAttributeString("VsixInstallerPathProperty", this.vsixInstallerPathPropertyField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("File" == name)) + { + this.fileField = value; + this.fileFieldSet = true; + } + if (("PackageId" == name)) + { + this.packageIdField = value; + this.packageIdFieldSet = true; + } + if (("Permanent" == name)) + { + this.permanentField = Enums.ParseYesNoType(value); + this.permanentFieldSet = true; + } + if (("Target" == name)) + { + this.targetField = value; + this.targetFieldSet = true; + } + if (("TargetVersion" == name)) + { + this.targetVersionField = value; + this.targetVersionFieldSet = true; + } + if (("Vital" == name)) + { + this.vitalField = Enums.ParseYesNoType(value); + this.vitalFieldSet = true; + } + if (("VsixInstallerPathProperty" == name)) + { + this.vsixInstallerPathPropertyField = value; + this.vsixInstallerPathPropertyFieldSet = true; + } + } + } +} 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 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 // TODO: add documentation +namespace WixToolset.Harvesters.Serialize +{ + using System; + using System.CodeDom.Compiler; + using System.Collections; + using System.Diagnostics.CodeAnalysis; + using System.Globalization; + using System.Xml; + + /// + /// Values of this type will either be "attached" or "detached". + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum BurnContainerType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + attached, + + detached, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Enums + { + + /// + /// Parses a BurnContainerType from a string. + /// + public static BurnContainerType ParseBurnContainerType(string value) + { + BurnContainerType parsedValue; + Enums.TryParseBurnContainerType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a BurnContainerType from a string. + /// + public static bool TryParseBurnContainerType(string value, out BurnContainerType parsedValue) + { + parsedValue = BurnContainerType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("attached" == value)) + { + parsedValue = BurnContainerType.attached; + } + else + { + if (("detached" == value)) + { + parsedValue = BurnContainerType.detached; + } + else + { + parsedValue = BurnContainerType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Parses a BurnExeProtocolType from a string. + /// + public static BurnExeProtocolType ParseBurnExeProtocolType(string value) + { + BurnExeProtocolType parsedValue; + Enums.TryParseBurnExeProtocolType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a BurnExeProtocolType from a string. + /// + public static bool TryParseBurnExeProtocolType(string value, out BurnExeProtocolType parsedValue) + { + parsedValue = BurnExeProtocolType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("none" == value)) + { + parsedValue = BurnExeProtocolType.none; + } + else + { + if (("burn" == value)) + { + parsedValue = BurnExeProtocolType.burn; + } + else + { + if (("netfx4" == value)) + { + parsedValue = BurnExeProtocolType.netfx4; + } + else + { + parsedValue = BurnExeProtocolType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a YesNoType from a string. + /// + public static YesNoType ParseYesNoType(string value) + { + YesNoType parsedValue; + Enums.TryParseYesNoType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a YesNoType from a string. + /// + public static bool TryParseYesNoType(string value, out YesNoType parsedValue) + { + parsedValue = YesNoType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("no" == value)) + { + parsedValue = YesNoType.no; + } + else + { + if (("yes" == value)) + { + parsedValue = YesNoType.yes; + } + else + { + parsedValue = YesNoType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Parses a YesNoButtonType from a string. + /// + public static YesNoButtonType ParseYesNoButtonType(string value) + { + YesNoButtonType parsedValue; + Enums.TryParseYesNoButtonType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a YesNoButtonType from a string. + /// + public static bool TryParseYesNoButtonType(string value, out YesNoButtonType parsedValue) + { + parsedValue = YesNoButtonType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("no" == value)) + { + parsedValue = YesNoButtonType.no; + } + else + { + if (("yes" == value)) + { + parsedValue = YesNoButtonType.yes; + } + else + { + if (("button" == value)) + { + parsedValue = YesNoButtonType.button; + } + else + { + parsedValue = YesNoButtonType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a YesNoDefaultType from a string. + /// + public static YesNoDefaultType ParseYesNoDefaultType(string value) + { + YesNoDefaultType parsedValue; + Enums.TryParseYesNoDefaultType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a YesNoDefaultType from a string. + /// + public static bool TryParseYesNoDefaultType(string value, out YesNoDefaultType parsedValue) + { + parsedValue = YesNoDefaultType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("default" == value)) + { + parsedValue = YesNoDefaultType.@default; + } + else + { + if (("no" == value)) + { + parsedValue = YesNoDefaultType.no; + } + else + { + if (("yes" == value)) + { + parsedValue = YesNoDefaultType.yes; + } + else + { + parsedValue = YesNoDefaultType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a BundleCacheType from a string. + /// + public static BundleCacheType ParseBundleCacheType(string value) + { + Enums.TryBundleCacheType(value, out var parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a YesNoAlwaysType from a string. + /// + public static bool TryBundleCacheType(string value, out BundleCacheType parsedValue) + { + parsedValue = BundleCacheType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + + if (("force" == value)) + { + parsedValue = BundleCacheType.force; + } + else + { + if (("remove" == value)) + { + parsedValue = BundleCacheType.remove; + } + else + { + if (("keep" == value)) + { + parsedValue = BundleCacheType.keep; + } + else + { + return false; + } + } + } + return true; + } + + /// + /// Parses a RegistryRootType from a string. + /// + public static RegistryRootType ParseRegistryRootType(string value) + { + RegistryRootType parsedValue; + Enums.TryParseRegistryRootType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a RegistryRootType from a string. + /// + public static bool TryParseRegistryRootType(string value, out RegistryRootType parsedValue) + { + parsedValue = RegistryRootType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("HKMU" == value)) + { + parsedValue = RegistryRootType.HKMU; + } + else + { + if (("HKCR" == value)) + { + parsedValue = RegistryRootType.HKCR; + } + else + { + if (("HKCU" == value)) + { + parsedValue = RegistryRootType.HKCU; + } + else + { + if (("HKLM" == value)) + { + parsedValue = RegistryRootType.HKLM; + } + else + { + if (("HKU" == value)) + { + parsedValue = RegistryRootType.HKU; + } + else + { + parsedValue = RegistryRootType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + + /// + /// Parses a ExitType from a string. + /// + public static ExitType ParseExitType(string value) + { + ExitType parsedValue; + Enums.TryParseExitType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ExitType from a string. + /// + public static bool TryParseExitType(string value, out ExitType parsedValue) + { + parsedValue = ExitType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("success" == value)) + { + parsedValue = ExitType.success; + } + else + { + if (("cancel" == value)) + { + parsedValue = ExitType.cancel; + } + else + { + if (("error" == value)) + { + parsedValue = ExitType.error; + } + else + { + if (("suspend" == value)) + { + parsedValue = ExitType.suspend; + } + else + { + parsedValue = ExitType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Parses a InstallUninstallType from a string. + /// + public static InstallUninstallType ParseInstallUninstallType(string value) + { + InstallUninstallType parsedValue; + Enums.TryParseInstallUninstallType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a InstallUninstallType from a string. + /// + public static bool TryParseInstallUninstallType(string value, out InstallUninstallType parsedValue) + { + parsedValue = InstallUninstallType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("install" == value)) + { + parsedValue = InstallUninstallType.install; + } + else + { + if (("uninstall" == value)) + { + parsedValue = InstallUninstallType.uninstall; + } + else + { + if (("both" == value)) + { + parsedValue = InstallUninstallType.both; + } + else + { + parsedValue = InstallUninstallType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a SequenceType from a string. + /// + public static SequenceType ParseSequenceType(string value) + { + SequenceType parsedValue; + Enums.TryParseSequenceType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a SequenceType from a string. + /// + public static bool TryParseSequenceType(string value, out SequenceType parsedValue) + { + parsedValue = SequenceType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("both" == value)) + { + parsedValue = SequenceType.both; + } + else + { + if (("first" == value)) + { + parsedValue = SequenceType.first; + } + else + { + if (("execute" == value)) + { + parsedValue = SequenceType.execute; + } + else + { + if (("ui" == value)) + { + parsedValue = SequenceType.ui; + } + else + { + parsedValue = SequenceType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Parses a CompressionLevelType from a string. + /// + public static CompressionLevelType ParseCompressionLevelType(string value) + { + CompressionLevelType parsedValue; + Enums.TryParseCompressionLevelType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a CompressionLevelType from a string. + /// + public static bool TryParseCompressionLevelType(string value, out CompressionLevelType parsedValue) + { + parsedValue = CompressionLevelType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("high" == value)) + { + parsedValue = CompressionLevelType.high; + } + else + { + if (("low" == value)) + { + parsedValue = CompressionLevelType.low; + } + else + { + if (("medium" == value)) + { + parsedValue = CompressionLevelType.medium; + } + else + { + if (("mszip" == value)) + { + parsedValue = CompressionLevelType.mszip; + } + else + { + if (("none" == value)) + { + parsedValue = CompressionLevelType.none; + } + else + { + parsedValue = CompressionLevelType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + } + + /// + /// The list of communcation protocols with executable packages Burn supports. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum BurnExeProtocolType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// The executable package does not support a communication protocol. + /// + none, + + /// + /// The executable package is another Burn bundle and supports the Burn communication protocol. + /// + burn, + + /// + /// The executable package implements the .NET Framework v4.0 communication protocol. + /// + netfx4, + } + + /// + /// Values of this type will either be "yes" or "no". + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum YesNoType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + no, + + yes, + } + + /// + /// Values of this type will either be "button", "yes" or "no". + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum YesNoButtonType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + no, + + yes, + + button, + } + + /// + /// Values of this type will either be "default", "yes", or "no". + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum YesNoDefaultType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + @default, + + no, + + yes, + } + + /// + /// Values of this type will either be "always", "yes", or "no". + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum BundleCacheType + { + NotSet = -1, + + force, + + remove, + + keep, + } + + /// + /// Values of this type represent possible registry roots. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum RegistryRootType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// A per-user installation will make the operation occur under HKEY_CURRENT_USER. + /// A per-machine installation will make the operation occur under HKEY_LOCAL_MACHINE. + /// + HKMU, + + /// + /// Operation occurs under HKEY_CLASSES_ROOT. When using Windows 2000 or later, the installer writes or removes the value + /// from the HKCU\Software\Classes hive during per-user installations. When using Windows 2000 or later operating systems, + /// the installer writes or removes the value from the HKLM\Software\Classes hive during per-machine installations. + /// + HKCR, + + /// + /// Operation occurs under HKEY_CURRENT_USER. It is recommended to set the KeyPath='yes' attribute when setting this value for writing values + /// in order to ensure that the installer writes the necessary registry entries when there are multiple users on the same computer. + /// + HKCU, + + /// + /// Operation occurs under HKEY_LOCAL_MACHINE. + /// + HKLM, + + /// + /// Operation occurs under HKEY_USERS. + /// + HKU, + } + + /// + /// 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. + /// Multiple actions can have exit types assigned, but every action and exit type must be different. Exit types are typically used with dialog boxes. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ExitType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + success, + + cancel, + + error, + + suspend, + } + + /// + /// Specifies whether an action occur on install, uninstall or both. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum InstallUninstallType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// The action should happen during install (msiInstallStateLocal or msiInstallStateSource). + /// + install, + + /// + /// The action should happen during uninstall (msiInstallStateAbsent). + /// + uninstall, + + /// + /// The action should happen during both install and uninstall. + /// + both, + } + + /// + /// Controls which sequences the item assignment is sequenced in. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum SequenceType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Schedules the assignment in the InstallUISequence and the InstallExecuteSequence. + /// + both, + + /// + /// Schedules the assignment to run in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped. + /// + first, + + /// + /// Schedules the assignment only in the the InstallExecuteSequence. + /// + execute, + + /// + /// Schedules the assignment only in the the InstallUISequence. + /// + ui, + } + + /// + /// Indicates the compression level for a cabinet. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum CompressionLevelType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + high, + + low, + + medium, + + mszip, + + none, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public abstract class ActionModuleSequenceType : ISchemaElement, ISetAttributes + { + + private string afterField; + + private bool afterFieldSet; + + private string beforeField; + + private bool beforeFieldSet; + + private YesNoType overridableField; + + private bool overridableFieldSet; + + private int sequenceField; + + private bool sequenceFieldSet; + + private YesNoType suppressField; + + private bool suppressFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// The name of an action that this action should come after. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// The name of an action that this action should come before. + /// + public string Before + { + get + { + return this.beforeField; + } + set + { + this.beforeFieldSet = true; + this.beforeField = value; + } + } + + /// + /// If "yes", the sequencing of this action may be overridden by sequencing elsewhere. + /// + public YesNoType Overridable + { + get + { + return this.overridableField; + } + set + { + this.overridableFieldSet = true; + this.overridableField = value; + } + } + + /// + /// A value used to indicate the position of this action in a sequence. + /// + public int Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + /// + /// If yes, this action will not occur. + /// + public YesNoType Suppress + { + get + { + return this.suppressField; + } + set + { + this.suppressFieldSet = true; + this.suppressField = value; + } + } + + /// + /// Text node specifies the condition of the action. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.beforeFieldSet) + { + writer.WriteAttributeString("Before", this.beforeField); + } + if (this.overridableFieldSet) + { + if ((this.overridableField == YesNoType.no)) + { + writer.WriteAttributeString("Overridable", "no"); + } + if ((this.overridableField == YesNoType.yes)) + { + writer.WriteAttributeString("Overridable", "yes"); + } + } + if (this.sequenceFieldSet) + { + writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); + } + if (this.suppressFieldSet) + { + if ((this.suppressField == YesNoType.no)) + { + writer.WriteAttributeString("Suppress", "no"); + } + if ((this.suppressField == YesNoType.yes)) + { + writer.WriteAttributeString("Suppress", "yes"); + } + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("Before" == name)) + { + this.beforeField = value; + this.beforeFieldSet = true; + } + if (("Overridable" == name)) + { + this.overridableField = Enums.ParseYesNoType(value); + this.overridableFieldSet = true; + } + if (("Sequence" == name)) + { + this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sequenceFieldSet = true; + } + if (("Suppress" == name)) + { + this.suppressField = Enums.ParseYesNoType(value); + this.suppressFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public abstract class ActionSequenceType : ISchemaElement, ISetAttributes + { + + private int sequenceField; + + private bool sequenceFieldSet; + + private YesNoType suppressField; + + private bool suppressFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// A value used to indicate the position of this action in a sequence. + /// + public int Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + /// + /// If yes, this action will not occur. + /// + public YesNoType Suppress + { + get + { + return this.suppressField; + } + set + { + this.suppressFieldSet = true; + this.suppressField = value; + } + } + + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + if (this.sequenceFieldSet) + { + writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); + } + if (this.suppressFieldSet) + { + if ((this.suppressField == YesNoType.no)) + { + writer.WriteAttributeString("Suppress", "no"); + } + if ((this.suppressField == YesNoType.yes)) + { + writer.WriteAttributeString("Suppress", "yes"); + } + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Sequence" == name)) + { + this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sequenceFieldSet = true; + } + if (("Suppress" == name)) + { + this.suppressField = Enums.ParseYesNoType(value); + this.suppressFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + /// + /// This is the top-level container element for every wxs file. Among the possible children, + /// the Bundle, Package, Module, Patch, and PatchCreation elements are analogous to the main function in a C program. + /// There can only be one of these present when linking occurs. Package compiles into an msi file, + /// Module compiles into an msm file, PatchCreation compiles into a pcp file. The Fragment element + /// is an atomic unit which ultimately links into either a Package, Module, or PatchCreation. The + /// Fragment can either be completely included or excluded during linking. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Wix : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string requiredVersionField; + + private bool requiredVersionFieldSet; + + private ISchemaElement parentElement; + + public Wix() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence); + ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Bundle))); + childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Package))); + childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Module))); + childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Patch))); + childCollection1.AddCollection(childCollection2); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(Fragment))); + childCollection0.AddCollection(childCollection1); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCreation))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Required version of the WiX toolset to compile this input file. + /// + public string RequiredVersion + { + get + { + return this.requiredVersionField; + } + set + { + this.requiredVersionFieldSet = true; + this.requiredVersionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Bundle" == childName)) + { + childValue = new Bundle(); + } + if (("Package" == childName)) + { + childValue = new Package(); + } + if (("Module" == childName)) + { + childValue = new Module(); + } + if (("Patch" == childName)) + { + childValue = new Patch(); + } + if (("Fragment" == childName)) + { + childValue = new Fragment(); + } + if (("PatchCreation" == childName)) + { + childValue = new PatchCreation(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Wix", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.requiredVersionFieldSet) + { + writer.WriteAttributeString("RequiredVersion", this.requiredVersionField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("RequiredVersion" == name)) + { + this.requiredVersionField = value; + this.requiredVersionFieldSet = true; + } + } + } + + /// + /// This is the top-level container element for every wxi file. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Include : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private ISchemaElement parentElement; + + public Include() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Include", "http://wixtoolset.org/schemas/v4/wxs"); + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + } + } + + /// + /// The root element for creating bundled packages. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Bundle : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string aboutUrlField; + + private bool aboutUrlFieldSet; + + private string copyrightField; + + private bool copyrightFieldSet; + + private YesNoDefaultType compressedField; + + private bool compressedFieldSet; + + private YesNoButtonType disableModifyField; + + private bool disableModifyFieldSet; + + private YesNoType disableRemoveField; + + private bool disableRemoveFieldSet; + + private YesNoType disableRepairField; + + private bool disableRepairFieldSet; + + private string helpTelephoneField; + + private bool helpTelephoneFieldSet; + + private string helpUrlField; + + private bool helpUrlFieldSet; + + private string iconSourceFileField; + + private bool iconSourceFileFieldSet; + + private string manufacturerField; + + private bool manufacturerFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string parentNameField; + + private bool parentNameFieldSet; + + private string splashScreenSourceFileField; + + private bool splashScreenSourceFileFieldSet; + + private string tagField; + + private bool tagFieldSet; + + private string updateUrlField; + + private bool updateUrlFieldSet; + + private string upgradeCodeField; + + private bool upgradeCodeFieldSet; + + private string versionField; + + private bool versionFieldSet; + + private string conditionField; + + private bool conditionFieldSet; + + private ISchemaElement parentElement; + + public Bundle() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ApprovedExeForElevation))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Log))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Catalog))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplication))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplicationRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(OptionalUpdateRegistration))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Chain))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Container))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ContainerRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroup))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RelatedBundle))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Update))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Variable))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// A URL for more information about the bundle to display in Programs and Features (also + /// known as Add/Remove Programs). + /// + public string AboutUrl + { + get + { + return this.aboutUrlField; + } + set + { + this.aboutUrlFieldSet = true; + this.aboutUrlField = value; + } + } + + /// + /// The legal copyright found in the version resources of final bundle executable. If + /// this attribute is not provided the copyright will be set to "Copyright (c) [Bundle/@Manufacturer]. All rights reserved.". + /// + public string Copyright + { + get + { + return this.copyrightField; + } + set + { + this.copyrightFieldSet = true; + this.copyrightField = value; + } + } + + /// + /// 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. + /// + public YesNoDefaultType Compressed + { + get + { + return this.compressedField; + } + set + { + this.compressedFieldSet = true; + this.compressedField = value; + } + } + + /// + /// Determines whether the bundle can be modified via the Programs and Features (also known as + /// Add/Remove Programs). If the value is "button" then Programs and Features will show a single + /// "Uninstall/Change" button. If the value is "yes" then Programs and Features will only show + /// the "Uninstall" button". If the value is "no", the default, then a "Change" button is shown. + /// See the DisableRemove attribute for information how to not display the bundle in Programs + /// and Features. + /// + public YesNoButtonType DisableModify + { + get + { + return this.disableModifyField; + } + set + { + this.disableModifyFieldSet = true; + this.disableModifyField = value; + } + } + + /// + /// Determines whether the bundle can be removed via the Programs and Features (also + /// known as Add/Remove Programs). If the value is "yes" then the "Uninstall" button will + /// not be displayed. The default is "no" which ensures there is an "Uninstall" button to + /// remove the bundle. If the "DisableModify" attribute is also "yes" or "button" then the + /// bundle will not be displayed in Progams and Features and another mechanism (such as + /// registering as a related bundle addon) must be used to ensure the bundle can be removed. + /// + public YesNoType DisableRemove + { + get + { + return this.disableRemoveField; + } + set + { + this.disableRemoveFieldSet = true; + this.disableRemoveField = value; + } + } + + public YesNoType DisableRepair + { + get + { + return this.disableRepairField; + } + set + { + this.disableRepairFieldSet = true; + this.disableRepairField = value; + } + } + + /// + /// A telephone number for help to display in Programs and Features (also known as + /// Add/Remove Programs). + /// + public string HelpTelephone + { + get + { + return this.helpTelephoneField; + } + set + { + this.helpTelephoneFieldSet = true; + this.helpTelephoneField = value; + } + } + + /// + /// A URL to the help for the bundle to display in Programs and Features (also known as + /// Add/Remove Programs). + /// + public string HelpUrl + { + get + { + return this.helpUrlField; + } + set + { + this.helpUrlFieldSet = true; + this.helpUrlField = value; + } + } + + /// + /// Path to an icon that will replace the default icon in the final Bundle executable. + /// This icon will also be displayed in Programs and Features (also known as Add/Remove + /// Programs). + /// + public string IconSourceFile + { + get + { + return this.iconSourceFileField; + } + set + { + this.iconSourceFileFieldSet = true; + this.iconSourceFileField = value; + } + } + + /// + /// The publisher of the bundle to display in Programs and Features (also known as + /// Add/Remove Programs). + /// + public string Manufacturer + { + get + { + return this.manufacturerField; + } + set + { + this.manufacturerFieldSet = true; + this.manufacturerField = value; + } + } + + /// + /// The name of the bundle to display in Programs and Features (also known as Add/Remove + /// Programs). This name can be accessed and overwritten by a BootstrapperApplication + /// using the WixBundleName bundle variable. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The name of the parent bundle to display in Installed Updates (also known as Add/Remove + /// Programs). This name is used to nest or group bundles that will appear as updates. + /// If the parent name does not actually exist, a virtual parent is created automatically. + /// + public string ParentName + { + get + { + return this.parentNameField; + } + set + { + this.parentNameFieldSet = true; + this.parentNameField = value; + } + } + + /// + /// 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. + /// + public string SplashScreenSourceFile + { + get + { + return this.splashScreenSourceFileField; + } + set + { + this.splashScreenSourceFileFieldSet = true; + this.splashScreenSourceFileField = value; + } + } + + /// + /// 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. + /// + public string Tag + { + get + { + return this.tagField; + } + set + { + this.tagFieldSet = true; + this.tagField = value; + } + } + + /// + /// A URL for updates of the bundle to display in Programs and Features (also + /// known as Add/Remove Programs). + /// + public string UpdateUrl + { + get + { + return this.updateUrlField; + } + set + { + this.updateUrlFieldSet = true; + this.updateUrlField = value; + } + } + + /// + /// Unique identifier for a family of bundles. If two bundles have the same UpgradeCode the + /// bundle with the highest version will be installed. + /// + public string UpgradeCode + { + get + { + return this.upgradeCodeField; + } + set + { + this.upgradeCodeFieldSet = true; + this.upgradeCodeField = value; + } + } + + /// + /// The version of the bundle. Newer versions upgrade earlier versions of the bundles + /// with matching UpgradeCodes. If the bundle is registered in Programs and Features + /// then this attribute will be displayed in the Programs and Features user interface. + /// + public string Version + { + get + { + return this.versionField; + } + set + { + this.versionFieldSet = true; + this.versionField = value; + } + } + + /// + /// The condition of the bundle. If the condition is not met, the bundle will + /// refuse to run. Conditions are checked before the bootstrapper application is loaded + /// (before detect), and thus can only reference built-in variables such as + /// variables which indicate the version of the OS. + /// + public string Condition + { + get + { + return this.conditionField; + } + set + { + this.conditionFieldSet = true; + this.conditionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ApprovedExeForElevation" == childName)) + { + childValue = new ApprovedExeForElevation(); + } + if (("Log" == childName)) + { + childValue = new Log(); + } + if (("Catalog" == childName)) + { + childValue = new Catalog(); + } + if (("BootstrapperApplication" == childName)) + { + childValue = new BootstrapperApplication(); + } + if (("BootstrapperApplicationRef" == childName)) + { + childValue = new BootstrapperApplicationRef(); + } + if (("OptionalUpdateRegistration" == childName)) + { + childValue = new OptionalUpdateRegistration(); + } + if (("Chain" == childName)) + { + childValue = new Chain(); + } + if (("Container" == childName)) + { + childValue = new Container(); + } + if (("ContainerRef" == childName)) + { + childValue = new ContainerRef(); + } + if (("PayloadGroup" == childName)) + { + childValue = new PayloadGroup(); + } + if (("PayloadGroupRef" == childName)) + { + childValue = new PayloadGroupRef(); + } + if (("RelatedBundle" == childName)) + { + childValue = new RelatedBundle(); + } + if (("Update" == childName)) + { + childValue = new Update(); + } + if (("Variable" == childName)) + { + childValue = new Variable(); + } + if (("WixVariable" == childName)) + { + childValue = new WixVariable(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Bundle", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.aboutUrlFieldSet) + { + writer.WriteAttributeString("AboutUrl", this.aboutUrlField); + } + if (this.copyrightFieldSet) + { + writer.WriteAttributeString("Copyright", this.copyrightField); + } + if (this.compressedFieldSet) + { + if ((this.compressedField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("Compressed", "default"); + } + if ((this.compressedField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("Compressed", "no"); + } + if ((this.compressedField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("Compressed", "yes"); + } + } + if (this.disableModifyFieldSet) + { + if ((this.disableModifyField == YesNoButtonType.no)) + { + writer.WriteAttributeString("DisableModify", "no"); + } + if ((this.disableModifyField == YesNoButtonType.yes)) + { + writer.WriteAttributeString("DisableModify", "yes"); + } + if ((this.disableModifyField == YesNoButtonType.button)) + { + writer.WriteAttributeString("DisableModify", "button"); + } + } + if (this.disableRemoveFieldSet) + { + if ((this.disableRemoveField == YesNoType.no)) + { + writer.WriteAttributeString("DisableRemove", "no"); + } + if ((this.disableRemoveField == YesNoType.yes)) + { + writer.WriteAttributeString("DisableRemove", "yes"); + } + } + if (this.disableRepairFieldSet) + { + if ((this.disableRepairField == YesNoType.no)) + { + writer.WriteAttributeString("DisableRepair", "no"); + } + if ((this.disableRepairField == YesNoType.yes)) + { + writer.WriteAttributeString("DisableRepair", "yes"); + } + } + if (this.helpTelephoneFieldSet) + { + writer.WriteAttributeString("HelpTelephone", this.helpTelephoneField); + } + if (this.helpUrlFieldSet) + { + writer.WriteAttributeString("HelpUrl", this.helpUrlField); + } + if (this.iconSourceFileFieldSet) + { + writer.WriteAttributeString("IconSourceFile", this.iconSourceFileField); + } + if (this.manufacturerFieldSet) + { + writer.WriteAttributeString("Manufacturer", this.manufacturerField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.parentNameFieldSet) + { + writer.WriteAttributeString("ParentName", this.parentNameField); + } + if (this.splashScreenSourceFileFieldSet) + { + writer.WriteAttributeString("SplashScreenSourceFile", this.splashScreenSourceFileField); + } + if (this.tagFieldSet) + { + writer.WriteAttributeString("Tag", this.tagField); + } + if (this.updateUrlFieldSet) + { + writer.WriteAttributeString("UpdateUrl", this.updateUrlField); + } + if (this.upgradeCodeFieldSet) + { + writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); + } + if (this.versionFieldSet) + { + writer.WriteAttributeString("Version", this.versionField); + } + if (this.conditionFieldSet) + { + writer.WriteAttributeString("Condition", this.conditionField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("AboutUrl" == name)) + { + this.aboutUrlField = value; + this.aboutUrlFieldSet = true; + } + if (("Copyright" == name)) + { + this.copyrightField = value; + this.copyrightFieldSet = true; + } + if (("Compressed" == name)) + { + this.compressedField = Enums.ParseYesNoDefaultType(value); + this.compressedFieldSet = true; + } + if (("DisableModify" == name)) + { + this.disableModifyField = Enums.ParseYesNoButtonType(value); + this.disableModifyFieldSet = true; + } + if (("DisableRemove" == name)) + { + this.disableRemoveField = Enums.ParseYesNoType(value); + this.disableRemoveFieldSet = true; + } + if (("DisableRepair" == name)) + { + this.disableRepairField = Enums.ParseYesNoType(value); + this.disableRepairFieldSet = true; + } + if (("HelpTelephone" == name)) + { + this.helpTelephoneField = value; + this.helpTelephoneFieldSet = true; + } + if (("HelpUrl" == name)) + { + this.helpUrlField = value; + this.helpUrlFieldSet = true; + } + if (("IconSourceFile" == name)) + { + this.iconSourceFileField = value; + this.iconSourceFileFieldSet = true; + } + if (("Manufacturer" == name)) + { + this.manufacturerField = value; + this.manufacturerFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("ParentName" == name)) + { + this.parentNameField = value; + this.parentNameFieldSet = true; + } + if (("SplashScreenSourceFile" == name)) + { + this.splashScreenSourceFileField = value; + this.splashScreenSourceFileFieldSet = true; + } + if (("Tag" == name)) + { + this.tagField = value; + this.tagFieldSet = true; + } + if (("UpdateUrl" == name)) + { + this.updateUrlField = value; + this.updateUrlFieldSet = true; + } + if (("UpgradeCode" == name)) + { + this.upgradeCodeField = value; + this.upgradeCodeFieldSet = true; + } + if (("Version" == name)) + { + this.versionField = value; + this.versionFieldSet = true; + } + if (("Condition" == name)) + { + this.conditionField = value; + this.conditionFieldSet = true; + } + } + } + + /// + /// Provides information about an .exe so that the BA can request the engine to run it elevated from any secure location. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ApprovedExeForElevation : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string keyField; + + private bool keyFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private YesNoType win64Field; + + private bool win64FieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the ApprovedExeForElevation element. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The key path. + /// For security purposes, the root key will be HKLM and Variables are not supported. + /// + public string Key + { + get + { + return this.keyField; + } + set + { + this.keyFieldSet = true; + this.keyField = value; + } + } + + /// + /// The value name. + /// For security purposes, Variables are not supported. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// 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'. + /// + public YesNoType Win64 + { + get + { + return this.win64Field; + } + set + { + this.win64FieldSet = true; + this.win64Field = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ApprovedExeForElevation", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.keyFieldSet) + { + writer.WriteAttributeString("Key", this.keyField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.win64FieldSet) + { + if ((this.win64Field == YesNoType.no)) + { + writer.WriteAttributeString("Win64", "no"); + } + if ((this.win64Field == YesNoType.yes)) + { + writer.WriteAttributeString("Win64", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Key" == name)) + { + this.keyField = value; + this.keyFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Win64" == name)) + { + this.win64Field = Enums.ParseYesNoType(value); + this.win64FieldSet = true; + } + } + } + + /// + /// Overrides the default log settings for a bundle. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Log : ISchemaElement, ISetAttributes + { + + private YesNoType disableField; + + private bool disableFieldSet; + + private string pathVariableField; + + private bool pathVariableFieldSet; + + private string prefixField; + + private bool prefixFieldSet; + + private string extensionField; + + private bool extensionFieldSet; + + private ISchemaElement parentElement; + + /// + /// Disables the default logging in the Bundle. The end user can still generate a + /// log file by specifying the "-l" command-line argument when installing the + /// Bundle. + /// + public YesNoType Disable + { + get + { + return this.disableField; + } + set + { + this.disableFieldSet = true; + this.disableField = value; + } + } + + /// + /// Name of a Variable that will hold the path to the log file. An empty value + /// will cause the variable to not be set. The default is "WixBundleLog". + /// + public string PathVariable + { + get + { + return this.pathVariableField; + } + set + { + this.pathVariableFieldSet = true; + this.pathVariableField = value; + } + } + + /// + /// File name and optionally a relative path to use as the prefix for the log file. The + /// default is to use the Bundle/@Name or, if Bundle/@Name is not specified, the value + /// "Setup". + /// + public string Prefix + { + get + { + return this.prefixField; + } + set + { + this.prefixFieldSet = true; + this.prefixField = value; + } + } + + /// + /// The extension to use for the log. The default is ".log". + /// + public string Extension + { + get + { + return this.extensionField; + } + set + { + this.extensionFieldSet = true; + this.extensionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Log", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.disableFieldSet) + { + if ((this.disableField == YesNoType.no)) + { + writer.WriteAttributeString("Disable", "no"); + } + if ((this.disableField == YesNoType.yes)) + { + writer.WriteAttributeString("Disable", "yes"); + } + } + if (this.pathVariableFieldSet) + { + writer.WriteAttributeString("PathVariable", this.pathVariableField); + } + if (this.prefixFieldSet) + { + writer.WriteAttributeString("Prefix", this.prefixField); + } + if (this.extensionFieldSet) + { + writer.WriteAttributeString("Extension", this.extensionField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Disable" == name)) + { + this.disableField = Enums.ParseYesNoType(value); + this.disableFieldSet = true; + } + if (("PathVariable" == name)) + { + this.pathVariableField = value; + this.pathVariableFieldSet = true; + } + if (("Prefix" == name)) + { + this.prefixField = value; + this.prefixFieldSet = true; + } + if (("Extension" == name)) + { + this.extensionField = value; + this.extensionFieldSet = true; + } + } + } + + /// + /// Specify one or more catalog files that will be used to verify the contents of the bundle. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Catalog : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the catalog element. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The catalog file + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Catalog", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + } + } + + /// + /// Contains all the relevant information about the setup UI. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class BootstrapperApplication : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private ISchemaElement parentElement; + + public BootstrapperApplication() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// The identifier of the BootstrapperApplication element. Only required if you want to reference this element using a BootstrapperApplicationRef element. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The DLL with the bootstrapper application entry function. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + /// + /// 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. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Payload" == childName)) + { + childValue = new Payload(); + } + if (("PayloadGroupRef" == childName)) + { + childValue = new PayloadGroupRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("BootstrapperApplication", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + } + } + + /// + /// Used to reference a BootstrapperApplication element and optionally add additional payloads to the bootstrapper application. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class BootstrapperApplicationRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public BootstrapperApplicationRef() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// The identifier of the BootstrapperApplication element to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Payload" == childName)) + { + childValue = new Payload(); + } + if (("PayloadGroupRef" == childName)) + { + childValue = new PayloadGroupRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("BootstrapperApplicationRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// This element has been deprecated. Use the BootstrapperApplication element instead. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UX : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string splashScreenSourceFileField; + + private bool splashScreenSourceFileFieldSet; + + private ISchemaElement parentElement; + + public UX() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// See the BootstrapperApplication instead. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + /// + /// See the BootstrapperApplication instead. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// See the BootstrapperApplication instead. + /// + public string SplashScreenSourceFile + { + get + { + return this.splashScreenSourceFileField; + } + set + { + this.splashScreenSourceFileFieldSet = true; + this.splashScreenSourceFileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Payload" == childName)) + { + childValue = new Payload(); + } + if (("PayloadGroupRef" == childName)) + { + childValue = new PayloadGroupRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UX", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.splashScreenSourceFileFieldSet) + { + writer.WriteAttributeString("SplashScreenSourceFile", this.splashScreenSourceFileField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("SplashScreenSourceFile" == name)) + { + this.splashScreenSourceFileField = value; + this.splashScreenSourceFileFieldSet = true; + } + } + } + + /// + /// Writes additional information to the Windows registry that can be used to detect the bundle. + /// This registration is intended primarily for update to an existing product. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class OptionalUpdateRegistration : ISchemaElement, ISetAttributes + { + + private string manufacturerField; + + private bool manufacturerFieldSet; + + private string departmentField; + + private bool departmentFieldSet; + + private string productFamilyField; + + private bool productFamilyFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string classificationField; + + private bool classificationFieldSet; + + private ISchemaElement parentElement; + + /// + /// The name of the manufacturer. The default is the Bundle/@Manufacturer attribute, + /// but may also be a short form, ex: Acme instead of Acme Corporation. + /// An error is generated at build time if neither attribute is specified. + /// + public string Manufacturer + { + get + { + return this.manufacturerField; + } + set + { + this.manufacturerFieldSet = true; + this.manufacturerField = value; + } + } + + /// + /// The name of the department or division publishing the update bundle. + /// The PublishingGroup registry value is not written if this attribute is not specified. + /// + public string Department + { + get + { + return this.departmentField; + } + set + { + this.departmentFieldSet = true; + this.departmentField = value; + } + } + + /// + /// The name of the family of products being updated. The default is the Bundle/@ParentName attribute. + /// The corresponding registry key is not created if neither attribute is specified. + /// + public string ProductFamily + { + get + { + return this.productFamilyField; + } + set + { + this.productFamilyFieldSet = true; + this.productFamilyField = value; + } + } + + /// + /// The name of the bundle. The default is the Bundle/@Name attribute, + /// but may also be a short form, ex: KB12345 instead of Update to Product (KB12345). + /// An error is generated at build time if neither attribute is specified. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The release type of the update bundle, such as Update, Security Update, Service Pack, etc. + /// The default value is Update. + /// + public string Classification + { + get + { + return this.classificationField; + } + set + { + this.classificationFieldSet = true; + this.classificationField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("OptionalUpdateRegistration", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.manufacturerFieldSet) + { + writer.WriteAttributeString("Manufacturer", this.manufacturerField); + } + if (this.departmentFieldSet) + { + writer.WriteAttributeString("Department", this.departmentField); + } + if (this.productFamilyFieldSet) + { + writer.WriteAttributeString("ProductFamily", this.productFamilyField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.classificationFieldSet) + { + writer.WriteAttributeString("Classification", this.classificationField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Manufacturer" == name)) + { + this.manufacturerField = value; + this.manufacturerFieldSet = true; + } + if (("Department" == name)) + { + this.departmentField = value; + this.departmentFieldSet = true; + } + if (("ProductFamily" == name)) + { + this.productFamilyField = value; + this.productFamilyFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Classification" == name)) + { + this.classificationField = value; + this.classificationFieldSet = true; + } + } + } + + /// + /// Contains the chain of packages to install. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Chain : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private YesNoType disableRollbackField; + + private bool disableRollbackFieldSet; + + private YesNoType disableSystemRestoreField; + + private bool disableSystemRestoreFieldSet; + + private YesNoType parallelCacheField; + + private bool parallelCacheFieldSet; + + private ISchemaElement parentElement; + + public Chain() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPackage))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MspPackage))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackage))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackage))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RollbackBoundary))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Specifies whether the bundle will attempt to rollback packages + /// executed in the chain. If "yes" is specified then when a vital + /// package fails to install only that package will rollback and the + /// chain will stop with the error. The default is "no" which + /// indicates all packages executed during the chain will be + /// rolledback to their previous state when a vital package fails. + /// + public YesNoType DisableRollback + { + get + { + return this.disableRollbackField; + } + set + { + this.disableRollbackFieldSet = true; + this.disableRollbackField = value; + } + } + + /// + /// Specifies whether the bundle will attempt to create a system + /// restore point when executing the chain. If "yes" is specified then + /// a system restore point will not be created. The default is "no" which + /// indicates a system restore point will be created when the bundle is + /// installed, uninstalled, repaired, modified, etc. If the system restore + /// point cannot be created, the bundle will log the issue and continue. + /// + public YesNoType DisableSystemRestore + { + get + { + return this.disableSystemRestoreField; + } + set + { + this.disableSystemRestoreFieldSet = true; + this.disableSystemRestoreField = value; + } + } + + /// + /// Specifies whether the bundle will start installing packages + /// while other packages are still being cached. If "yes", + /// packages will start executing when a rollback boundary is + /// encountered. The default is "no" which dictates all packages + /// must be cached before any packages will start to be installed. + /// + public YesNoType ParallelCache + { + get + { + return this.parallelCacheField; + } + set + { + this.parallelCacheFieldSet = true; + this.parallelCacheField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("MsiPackage" == childName)) + { + childValue = new MsiPackage(); + } + if (("MspPackage" == childName)) + { + childValue = new MspPackage(); + } + if (("MsuPackage" == childName)) + { + childValue = new MsuPackage(); + } + if (("ExePackage" == childName)) + { + childValue = new ExePackage(); + } + if (("RollbackBoundary" == childName)) + { + childValue = new RollbackBoundary(); + } + if (("PackageGroupRef" == childName)) + { + childValue = new PackageGroupRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Chain", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.disableRollbackFieldSet) + { + if ((this.disableRollbackField == YesNoType.no)) + { + writer.WriteAttributeString("DisableRollback", "no"); + } + if ((this.disableRollbackField == YesNoType.yes)) + { + writer.WriteAttributeString("DisableRollback", "yes"); + } + } + if (this.disableSystemRestoreFieldSet) + { + if ((this.disableSystemRestoreField == YesNoType.no)) + { + writer.WriteAttributeString("DisableSystemRestore", "no"); + } + if ((this.disableSystemRestoreField == YesNoType.yes)) + { + writer.WriteAttributeString("DisableSystemRestore", "yes"); + } + } + if (this.parallelCacheFieldSet) + { + if ((this.parallelCacheField == YesNoType.no)) + { + writer.WriteAttributeString("ParallelCache", "no"); + } + if ((this.parallelCacheField == YesNoType.yes)) + { + writer.WriteAttributeString("ParallelCache", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("DisableRollback" == name)) + { + this.disableRollbackField = Enums.ParseYesNoType(value); + this.disableRollbackFieldSet = true; + } + if (("DisableSystemRestore" == name)) + { + this.disableSystemRestoreField = Enums.ParseYesNoType(value); + this.disableSystemRestoreFieldSet = true; + } + if (("ParallelCache" == name)) + { + this.parallelCacheField = Enums.ParseYesNoType(value); + this.parallelCacheFieldSet = true; + } + } + } + + /// + /// Describes a single msi package to install. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MsiPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string downloadUrlField; + + private bool downloadUrlFieldSet; + + private string idField; + + private bool idFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private string installSizeField; + + private bool installSizeFieldSet; + + private string installConditionField; + + private bool installConditionFieldSet; + + private BundleCacheType cacheField; + + private bool cacheFieldSet; + + private string cacheIdField; + + private bool cacheIdFieldSet; + + private string displayNameField; + + private bool displayNameFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string logPathVariableField; + + private bool logPathVariableFieldSet; + + private string rollbackLogPathVariableField; + + private bool rollbackLogPathVariableFieldSet; + + private YesNoType permanentField; + + private bool permanentFieldSet; + + private YesNoType vitalField; + + private bool vitalFieldSet; + + private YesNoDefaultType compressedField; + + private bool compressedFieldSet; + + private YesNoType enableSignatureVerificationField; + + private bool enableSignatureVerificationFieldSet; + + private YesNoType enableFeatureSelectionField; + + private bool enableFeatureSelectionFieldSet; + + private YesNoType forcePerMachineField; + + private bool forcePerMachineFieldSet; + + private YesNoType suppressLooseFilePayloadGenerationField; + + private bool suppressLooseFilePayloadGenerationFieldSet; + + private YesNoType visibleField; + + private bool visibleFieldSet; + + private ISchemaElement parentElement; + + public MsiPackage() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiProperty))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SlipstreamMsp))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Location of the package to add to the bundle. The default value is the Name attribute, if provided. + /// At a minimum, the SourceFile or Name attribute must be specified. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + /// + /// The destination path and file name for this chain payload. Use this attribute to rename the + /// chain entry point or extract it into a subfolder. The default value is the file name from the + /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified. + /// The use of '..' directories is not allowed. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + public string DownloadUrl + { + get + { + return this.downloadUrlField; + } + set + { + this.downloadUrlFieldSet = true; + this.downloadUrlField = value; + } + } + + /// + /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute + /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores). + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The identifier of another package that this one should be installed after. By default the After + /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this + /// attribute is specified ensure that a cycle is not created explicitly or implicitly. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// The size this package will take on disk in bytes after it is installed. By default, the binder will + /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs) + /// and use the total for the install size of the package. + /// + public string InstallSize + { + get + { + return this.installSizeField; + } + set + { + this.installSizeFieldSet = true; + this.installSizeField = value; + } + } + + /// + /// 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. + /// + public string InstallCondition + { + get + { + return this.installConditionField; + } + set + { + this.installConditionFieldSet = true; + this.installConditionField = value; + } + } + + /// + /// Whether to cache the package. The default is "yes". + /// + public BundleCacheType Cache + { + get + { + return this.cacheField; + } + set + { + this.cacheFieldSet = true; + this.cacheField = value; + } + } + + /// + /// The identifier to use when caching the package. + /// + public string CacheId + { + get + { + return this.cacheIdField; + } + set + { + this.cacheIdFieldSet = true; + this.cacheIdField = value; + } + } + + /// + /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages + /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use + /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the + /// bootstrapper application data manifest. + /// + public string DisplayName + { + get + { + return this.displayNameField; + } + set + { + this.displayNameFieldSet = true; + this.displayNameField = value; + } + } + + /// + /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages + /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use + /// the Description patch metadata property. Other package types must use this attribute to define a description in the + /// bootstrapper application data manifest. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not + /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging. + /// + public string LogPathVariable + { + get + { + return this.logPathVariableField; + } + set + { + this.logPathVariableFieldSet = true; + this.logPathVariableField = value; + } + } + + /// + /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause + /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which + /// default to no logging. + /// + public string RollbackLogPathVariable + { + get + { + return this.rollbackLogPathVariableField; + } + set + { + this.rollbackLogPathVariableFieldSet = true; + this.rollbackLogPathVariableField = value; + } + } + + /// + /// Specifies whether the package can be uninstalled. The default is "no". + /// + public YesNoType Permanent + { + get + { + return this.permanentField; + } + set + { + this.permanentFieldSet = true; + this.permanentField = value; + } + } + + /// + /// Specifies whether the package must succeed for the chain to continue. The default "yes" + /// indicates that if the package fails then the chain will fail and rollback or stop. If + /// "no" is specified then the chain will continue even if the package reports failure. + /// + public YesNoType Vital + { + get + { + return this.vitalField; + } + set + { + this.vitalFieldSet = true; + this.vitalField = value; + } + } + + /// + /// Whether the package payload should be embedded in a container or left as an external payload. + /// + public YesNoDefaultType Compressed + { + get + { + return this.compressedField; + } + set + { + this.compressedFieldSet = true; + this.compressedField = value; + } + } + + /// + /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes" + /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the + /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures. + /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no". + /// + public YesNoType EnableSignatureVerification + { + get + { + return this.enableSignatureVerificationField; + } + set + { + this.enableSignatureVerificationFieldSet = true; + this.enableSignatureVerificationField = value; + } + } + + /// + /// Specifies whether the bundle will allow individual control over the installation state of Features inside + /// the msi package. Managing feature selection requires special care to ensure the install, modify, update and + /// uninstall behavior of the package is always correct. The default is "no". + /// + public YesNoType EnableFeatureSelection + { + get + { + return this.enableFeatureSelectionField; + } + set + { + this.enableFeatureSelectionFieldSet = true; + this.enableFeatureSelectionField = value; + } + } + + /// + /// Override the automatic per-machine detection of MSI packages and force the package to be per-machine. + /// The default is "no", which allows the tools to detect the expected value. + /// + public YesNoType ForcePerMachine + { + get + { + return this.forcePerMachineField; + } + set + { + this.forcePerMachineFieldSet = true; + this.forcePerMachineField = value; + } + } + + /// + /// This attribute has been deprecated. When the value is "yes", the Binder will not read the MSI package + /// to detect uncompressed files that would otherwise be automatically included in the Bundle as Payloads. + /// The resulting Bundle may not be able to install the MSI package correctly. The default is "no". + /// + public YesNoType SuppressLooseFilePayloadGeneration + { + get + { + return this.suppressLooseFilePayloadGenerationField; + } + set + { + this.suppressLooseFilePayloadGenerationFieldSet = true; + this.suppressLooseFilePayloadGenerationField = value; + } + } + + /// + /// Specifies whether the MSI will be displayed in Programs and Features (also known as Add/Remove Programs). If "yes" is + /// specified the MSI package information will be displayed in Programs and Features. The default "no" indicates the MSI + /// will not be displayed. + /// + public YesNoType Visible + { + get + { + return this.visibleField; + } + set + { + this.visibleFieldSet = true; + this.visibleField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("MsiProperty" == childName)) + { + childValue = new MsiProperty(); + } + if (("SlipstreamMsp" == childName)) + { + childValue = new SlipstreamMsp(); + } + if (("Payload" == childName)) + { + childValue = new Payload(); + } + if (("PayloadGroupRef" == childName)) + { + childValue = new PayloadGroupRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MsiPackage", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.downloadUrlFieldSet) + { + writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); + } + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.installSizeFieldSet) + { + writer.WriteAttributeString("InstallSize", this.installSizeField); + } + if (this.installConditionFieldSet) + { + writer.WriteAttributeString("InstallCondition", this.installConditionField); + } + if (this.cacheFieldSet) + { + if ((this.cacheField == BundleCacheType.force)) + { + writer.WriteAttributeString("Cache", "force"); + } + if ((this.cacheField == BundleCacheType.remove)) + { + writer.WriteAttributeString("Cache", "remove"); + } + if ((this.cacheField == BundleCacheType.keep)) + { + writer.WriteAttributeString("Cache", "keep"); + } + } + if (this.cacheIdFieldSet) + { + writer.WriteAttributeString("CacheId", this.cacheIdField); + } + if (this.displayNameFieldSet) + { + writer.WriteAttributeString("DisplayName", this.displayNameField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.logPathVariableFieldSet) + { + writer.WriteAttributeString("LogPathVariable", this.logPathVariableField); + } + if (this.rollbackLogPathVariableFieldSet) + { + writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField); + } + if (this.permanentFieldSet) + { + if ((this.permanentField == YesNoType.no)) + { + writer.WriteAttributeString("Permanent", "no"); + } + if ((this.permanentField == YesNoType.yes)) + { + writer.WriteAttributeString("Permanent", "yes"); + } + } + if (this.vitalFieldSet) + { + if ((this.vitalField == YesNoType.no)) + { + writer.WriteAttributeString("Vital", "no"); + } + if ((this.vitalField == YesNoType.yes)) + { + writer.WriteAttributeString("Vital", "yes"); + } + } + if (this.compressedFieldSet) + { + if ((this.compressedField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("Compressed", "default"); + } + if ((this.compressedField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("Compressed", "no"); + } + if ((this.compressedField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("Compressed", "yes"); + } + } + if (this.enableSignatureVerificationFieldSet) + { + if ((this.enableSignatureVerificationField == YesNoType.no)) + { + writer.WriteAttributeString("EnableSignatureVerification", "no"); + } + if ((this.enableSignatureVerificationField == YesNoType.yes)) + { + writer.WriteAttributeString("EnableSignatureVerification", "yes"); + } + } + if (this.enableFeatureSelectionFieldSet) + { + if ((this.enableFeatureSelectionField == YesNoType.no)) + { + writer.WriteAttributeString("EnableFeatureSelection", "no"); + } + if ((this.enableFeatureSelectionField == YesNoType.yes)) + { + writer.WriteAttributeString("EnableFeatureSelection", "yes"); + } + } + if (this.forcePerMachineFieldSet) + { + if ((this.forcePerMachineField == YesNoType.no)) + { + writer.WriteAttributeString("ForcePerMachine", "no"); + } + if ((this.forcePerMachineField == YesNoType.yes)) + { + writer.WriteAttributeString("ForcePerMachine", "yes"); + } + } + if (this.suppressLooseFilePayloadGenerationFieldSet) + { + if ((this.suppressLooseFilePayloadGenerationField == YesNoType.no)) + { + writer.WriteAttributeString("SuppressLooseFilePayloadGeneration", "no"); + } + if ((this.suppressLooseFilePayloadGenerationField == YesNoType.yes)) + { + writer.WriteAttributeString("SuppressLooseFilePayloadGeneration", "yes"); + } + } + if (this.visibleFieldSet) + { + if ((this.visibleField == YesNoType.no)) + { + writer.WriteAttributeString("Visible", "no"); + } + if ((this.visibleField == YesNoType.yes)) + { + writer.WriteAttributeString("Visible", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("DownloadUrl" == name)) + { + this.downloadUrlField = value; + this.downloadUrlFieldSet = true; + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("InstallSize" == name)) + { + this.installSizeField = value; + this.installSizeFieldSet = true; + } + if (("InstallCondition" == name)) + { + this.installConditionField = value; + this.installConditionFieldSet = true; + } + if (("Cache" == name)) + { + this.cacheField = Enums.ParseBundleCacheType(value); + this.cacheFieldSet = true; + } + if (("CacheId" == name)) + { + this.cacheIdField = value; + this.cacheIdFieldSet = true; + } + if (("DisplayName" == name)) + { + this.displayNameField = value; + this.displayNameFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("LogPathVariable" == name)) + { + this.logPathVariableField = value; + this.logPathVariableFieldSet = true; + } + if (("RollbackLogPathVariable" == name)) + { + this.rollbackLogPathVariableField = value; + this.rollbackLogPathVariableFieldSet = true; + } + if (("Permanent" == name)) + { + this.permanentField = Enums.ParseYesNoType(value); + this.permanentFieldSet = true; + } + if (("Vital" == name)) + { + this.vitalField = Enums.ParseYesNoType(value); + this.vitalFieldSet = true; + } + if (("Compressed" == name)) + { + this.compressedField = Enums.ParseYesNoDefaultType(value); + this.compressedFieldSet = true; + } + if (("EnableSignatureVerification" == name)) + { + this.enableSignatureVerificationField = Enums.ParseYesNoType(value); + this.enableSignatureVerificationFieldSet = true; + } + if (("EnableFeatureSelection" == name)) + { + this.enableFeatureSelectionField = Enums.ParseYesNoType(value); + this.enableFeatureSelectionFieldSet = true; + } + if (("ForcePerMachine" == name)) + { + this.forcePerMachineField = Enums.ParseYesNoType(value); + this.forcePerMachineFieldSet = true; + } + if (("SuppressLooseFilePayloadGeneration" == name)) + { + this.suppressLooseFilePayloadGenerationField = Enums.ParseYesNoType(value); + this.suppressLooseFilePayloadGenerationFieldSet = true; + } + if (("Visible" == name)) + { + this.visibleField = Enums.ParseYesNoType(value); + this.visibleFieldSet = true; + } + } + } + + /// + /// Describes a single msp package to install. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MspPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string downloadUrlField; + + private bool downloadUrlFieldSet; + + private string idField; + + private bool idFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private string installSizeField; + + private bool installSizeFieldSet; + + private string installConditionField; + + private bool installConditionFieldSet; + + private BundleCacheType cacheField; + + private bool cacheFieldSet; + + private string cacheIdField; + + private bool cacheIdFieldSet; + + private string displayNameField; + + private bool displayNameFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string logPathVariableField; + + private bool logPathVariableFieldSet; + + private string rollbackLogPathVariableField; + + private bool rollbackLogPathVariableFieldSet; + + private YesNoType permanentField; + + private bool permanentFieldSet; + + private YesNoType vitalField; + + private bool vitalFieldSet; + + private YesNoDefaultType compressedField; + + private bool compressedFieldSet; + + private YesNoType enableSignatureVerificationField; + + private bool enableSignatureVerificationFieldSet; + + private YesNoDefaultType perMachineField; + + private bool perMachineFieldSet; + + private YesNoType slipstreamField; + + private bool slipstreamFieldSet; + + private ISchemaElement parentElement; + + public MspPackage() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiProperty))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Location of the package to add to the bundle. The default value is the Name attribute, if provided. + /// At a minimum, the SourceFile or Name attribute must be specified. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + /// + /// The destination path and file name for this chain payload. Use this attribute to rename the + /// chain entry point or extract it into a subfolder. The default value is the file name from the + /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified. + /// The use of '..' directories is not allowed. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + public string DownloadUrl + { + get + { + return this.downloadUrlField; + } + set + { + this.downloadUrlFieldSet = true; + this.downloadUrlField = value; + } + } + + /// + /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute + /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores). + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The identifier of another package that this one should be installed after. By default the After + /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this + /// attribute is specified ensure that a cycle is not created explicitly or implicitly. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// The size this package will take on disk in bytes after it is installed. By default, the binder will + /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs) + /// and use the total for the install size of the package. + /// + public string InstallSize + { + get + { + return this.installSizeField; + } + set + { + this.installSizeFieldSet = true; + this.installSizeField = value; + } + } + + /// + /// 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. + /// + public string InstallCondition + { + get + { + return this.installConditionField; + } + set + { + this.installConditionFieldSet = true; + this.installConditionField = value; + } + } + + /// + /// Whether to cache the package. The default is "keep". + /// + public BundleCacheType Cache + { + get + { + return this.cacheField; + } + set + { + this.cacheFieldSet = true; + this.cacheField = value; + } + } + + /// + /// The identifier to use when caching the package. + /// + public string CacheId + { + get + { + return this.cacheIdField; + } + set + { + this.cacheIdFieldSet = true; + this.cacheIdField = value; + } + } + + /// + /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages + /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use + /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the + /// bootstrapper application data manifest. + /// + public string DisplayName + { + get + { + return this.displayNameField; + } + set + { + this.displayNameFieldSet = true; + this.displayNameField = value; + } + } + + /// + /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages + /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use + /// the Description patch metadata property. Other package types must use this attribute to define a description in the + /// bootstrapper application data manifest. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not + /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging. + /// + public string LogPathVariable + { + get + { + return this.logPathVariableField; + } + set + { + this.logPathVariableFieldSet = true; + this.logPathVariableField = value; + } + } + + /// + /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause + /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which + /// default to no logging. + /// + public string RollbackLogPathVariable + { + get + { + return this.rollbackLogPathVariableField; + } + set + { + this.rollbackLogPathVariableFieldSet = true; + this.rollbackLogPathVariableField = value; + } + } + + /// + /// Specifies whether the package can be uninstalled. The default is "no". + /// + public YesNoType Permanent + { + get + { + return this.permanentField; + } + set + { + this.permanentFieldSet = true; + this.permanentField = value; + } + } + + /// + /// Specifies whether the package must succeed for the chain to continue. The default "yes" + /// indicates that if the package fails then the chain will fail and rollback or stop. If + /// "no" is specified then the chain will continue even if the package reports failure. + /// + public YesNoType Vital + { + get + { + return this.vitalField; + } + set + { + this.vitalFieldSet = true; + this.vitalField = value; + } + } + + /// + /// Whether the package payload should be embedded in a container or left as an external payload. + /// + public YesNoDefaultType Compressed + { + get + { + return this.compressedField; + } + set + { + this.compressedFieldSet = true; + this.compressedField = value; + } + } + + /// + /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes" + /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the + /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures. + /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no". + /// + public YesNoType EnableSignatureVerification + { + get + { + return this.enableSignatureVerificationField; + } + set + { + this.enableSignatureVerificationFieldSet = true; + this.enableSignatureVerificationField = value; + } + } + + /// + /// Indicates the package must be executed elevated. The default is "no". + /// + public YesNoDefaultType PerMachine + { + get + { + return this.perMachineField; + } + set + { + this.perMachineFieldSet = true; + this.perMachineField = value; + } + } + + /// + /// Specifies whether to automatically slipstream the patch for any target msi packages in the chain. The default is "no". + /// Even when the value is "no", you can still author the SlipstreamMsp element under MsiPackage elements as desired. + /// + public YesNoType Slipstream + { + get + { + return this.slipstreamField; + } + set + { + this.slipstreamFieldSet = true; + this.slipstreamField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("MsiProperty" == childName)) + { + childValue = new MsiProperty(); + } + if (("Payload" == childName)) + { + childValue = new Payload(); + } + if (("PayloadGroupRef" == childName)) + { + childValue = new PayloadGroupRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MspPackage", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.downloadUrlFieldSet) + { + writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); + } + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.installSizeFieldSet) + { + writer.WriteAttributeString("InstallSize", this.installSizeField); + } + if (this.installConditionFieldSet) + { + writer.WriteAttributeString("InstallCondition", this.installConditionField); + } + if (this.cacheFieldSet) + { + if ((this.cacheField == BundleCacheType.force)) + { + writer.WriteAttributeString("Cache", "force"); + } + if ((this.cacheField == BundleCacheType.remove)) + { + writer.WriteAttributeString("Cache", "remove"); + } + if ((this.cacheField == BundleCacheType.keep)) + { + writer.WriteAttributeString("Cache", "keep"); + } + } + if (this.cacheIdFieldSet) + { + writer.WriteAttributeString("CacheId", this.cacheIdField); + } + if (this.displayNameFieldSet) + { + writer.WriteAttributeString("DisplayName", this.displayNameField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.logPathVariableFieldSet) + { + writer.WriteAttributeString("LogPathVariable", this.logPathVariableField); + } + if (this.rollbackLogPathVariableFieldSet) + { + writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField); + } + if (this.permanentFieldSet) + { + if ((this.permanentField == YesNoType.no)) + { + writer.WriteAttributeString("Permanent", "no"); + } + if ((this.permanentField == YesNoType.yes)) + { + writer.WriteAttributeString("Permanent", "yes"); + } + } + if (this.vitalFieldSet) + { + if ((this.vitalField == YesNoType.no)) + { + writer.WriteAttributeString("Vital", "no"); + } + if ((this.vitalField == YesNoType.yes)) + { + writer.WriteAttributeString("Vital", "yes"); + } + } + if (this.compressedFieldSet) + { + if ((this.compressedField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("Compressed", "default"); + } + if ((this.compressedField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("Compressed", "no"); + } + if ((this.compressedField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("Compressed", "yes"); + } + } + if (this.enableSignatureVerificationFieldSet) + { + if ((this.enableSignatureVerificationField == YesNoType.no)) + { + writer.WriteAttributeString("EnableSignatureVerification", "no"); + } + if ((this.enableSignatureVerificationField == YesNoType.yes)) + { + writer.WriteAttributeString("EnableSignatureVerification", "yes"); + } + } + if (this.perMachineFieldSet) + { + if ((this.perMachineField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("PerMachine", "default"); + } + if ((this.perMachineField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("PerMachine", "no"); + } + if ((this.perMachineField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("PerMachine", "yes"); + } + } + if (this.slipstreamFieldSet) + { + if ((this.slipstreamField == YesNoType.no)) + { + writer.WriteAttributeString("Slipstream", "no"); + } + if ((this.slipstreamField == YesNoType.yes)) + { + writer.WriteAttributeString("Slipstream", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("DownloadUrl" == name)) + { + this.downloadUrlField = value; + this.downloadUrlFieldSet = true; + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("InstallSize" == name)) + { + this.installSizeField = value; + this.installSizeFieldSet = true; + } + if (("InstallCondition" == name)) + { + this.installConditionField = value; + this.installConditionFieldSet = true; + } + if (("Cache" == name)) + { + this.cacheField = Enums.ParseBundleCacheType(value); + this.cacheFieldSet = true; + } + if (("CacheId" == name)) + { + this.cacheIdField = value; + this.cacheIdFieldSet = true; + } + if (("DisplayName" == name)) + { + this.displayNameField = value; + this.displayNameFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("LogPathVariable" == name)) + { + this.logPathVariableField = value; + this.logPathVariableFieldSet = true; + } + if (("RollbackLogPathVariable" == name)) + { + this.rollbackLogPathVariableField = value; + this.rollbackLogPathVariableFieldSet = true; + } + if (("Permanent" == name)) + { + this.permanentField = Enums.ParseYesNoType(value); + this.permanentFieldSet = true; + } + if (("Vital" == name)) + { + this.vitalField = Enums.ParseYesNoType(value); + this.vitalFieldSet = true; + } + if (("Compressed" == name)) + { + this.compressedField = Enums.ParseYesNoDefaultType(value); + this.compressedFieldSet = true; + } + if (("EnableSignatureVerification" == name)) + { + this.enableSignatureVerificationField = Enums.ParseYesNoType(value); + this.enableSignatureVerificationFieldSet = true; + } + if (("PerMachine" == name)) + { + this.perMachineField = Enums.ParseYesNoDefaultType(value); + this.perMachineFieldSet = true; + } + if (("Slipstream" == name)) + { + this.slipstreamField = Enums.ParseYesNoType(value); + this.slipstreamFieldSet = true; + } + } + } + + /// + /// Describes a single msu package to install. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MsuPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string downloadUrlField; + + private bool downloadUrlFieldSet; + + private string idField; + + private bool idFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private string installSizeField; + + private bool installSizeFieldSet; + + private string installConditionField; + + private bool installConditionFieldSet; + + private BundleCacheType cacheField; + + private bool cacheFieldSet; + + private string cacheIdField; + + private bool cacheIdFieldSet; + + private string displayNameField; + + private bool displayNameFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string logPathVariableField; + + private bool logPathVariableFieldSet; + + private string rollbackLogPathVariableField; + + private bool rollbackLogPathVariableFieldSet; + + private YesNoType permanentField; + + private bool permanentFieldSet; + + private YesNoType vitalField; + + private bool vitalFieldSet; + + private YesNoDefaultType compressedField; + + private bool compressedFieldSet; + + private YesNoType enableSignatureVerificationField; + + private bool enableSignatureVerificationFieldSet; + + private string detectConditionField; + + private bool detectConditionFieldSet; + + private string kBField; + + private bool kBFieldSet; + + private ISchemaElement parentElement; + + public MsuPackage() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackagePayload))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Location of the package to add to the bundle. The default value is the Name attribute, if provided. + /// At a minimum, the SourceFile or Name attribute must be specified. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + /// + /// The destination path and file name for this chain payload. Use this attribute to rename the + /// chain entry point or extract it into a subfolder. The default value is the file name from the + /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified. + /// The use of '..' directories is not allowed. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + public string DownloadUrl + { + get + { + return this.downloadUrlField; + } + set + { + this.downloadUrlFieldSet = true; + this.downloadUrlField = value; + } + } + + /// + /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute + /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores). + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The identifier of another package that this one should be installed after. By default the After + /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this + /// attribute is specified ensure that a cycle is not created explicitly or implicitly. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// The size this package will take on disk in bytes after it is installed. By default, the binder will + /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs) + /// and use the total for the install size of the package. + /// + public string InstallSize + { + get + { + return this.installSizeField; + } + set + { + this.installSizeFieldSet = true; + this.installSizeField = value; + } + } + + /// + /// 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. + /// + public string InstallCondition + { + get + { + return this.installConditionField; + } + set + { + this.installConditionFieldSet = true; + this.installConditionField = value; + } + } + + /// + /// Whether to cache the package. The default is "yes". + /// + public BundleCacheType Cache + { + get + { + return this.cacheField; + } + set + { + this.cacheFieldSet = true; + this.cacheField = value; + } + } + + /// + /// The identifier to use when caching the package. + /// + public string CacheId + { + get + { + return this.cacheIdField; + } + set + { + this.cacheIdFieldSet = true; + this.cacheIdField = value; + } + } + + /// + /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages + /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use + /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the + /// bootstrapper application data manifest. + /// + public string DisplayName + { + get + { + return this.displayNameField; + } + set + { + this.displayNameFieldSet = true; + this.displayNameField = value; + } + } + + /// + /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages + /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use + /// the Description patch metadata property. Other package types must use this attribute to define a description in the + /// bootstrapper application data manifest. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not + /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging. + /// + public string LogPathVariable + { + get + { + return this.logPathVariableField; + } + set + { + this.logPathVariableFieldSet = true; + this.logPathVariableField = value; + } + } + + /// + /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause + /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which + /// default to no logging. + /// + public string RollbackLogPathVariable + { + get + { + return this.rollbackLogPathVariableField; + } + set + { + this.rollbackLogPathVariableFieldSet = true; + this.rollbackLogPathVariableField = value; + } + } + + /// + /// Specifies whether the package can be uninstalled. The default is "no". + /// + public YesNoType Permanent + { + get + { + return this.permanentField; + } + set + { + this.permanentFieldSet = true; + this.permanentField = value; + } + } + + /// + /// Specifies whether the package must succeed for the chain to continue. The default "yes" + /// indicates that if the package fails then the chain will fail and rollback or stop. If + /// "no" is specified then the chain will continue even if the package reports failure. + /// + public YesNoType Vital + { + get + { + return this.vitalField; + } + set + { + this.vitalFieldSet = true; + this.vitalField = value; + } + } + + /// + /// Whether the package payload should be embedded in a container or left as an external payload. + /// + public YesNoDefaultType Compressed + { + get + { + return this.compressedField; + } + set + { + this.compressedFieldSet = true; + this.compressedField = value; + } + } + + /// + /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes" + /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the + /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures. + /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no". + /// + public YesNoType EnableSignatureVerification + { + get + { + return this.enableSignatureVerificationField; + } + set + { + this.enableSignatureVerificationFieldSet = true; + this.enableSignatureVerificationField = value; + } + } + + /// + /// A condition that determines if the package is present on the target system. This condition can use built-in + /// variables and variables returned by searches. This condition is necessary because Windows doesn't provide a + /// method to detect the presence of an MsuPackage. Burn uses this condition to determine how to treat this + /// package during a bundle action; for example, if this condition is false or omitted and the bundle is being + /// installed, Burn will install this package. + /// + public string DetectCondition + { + get + { + return this.detectConditionField; + } + set + { + this.detectConditionFieldSet = true; + this.detectConditionField = value; + } + } + + /// + /// The knowledge base identifier for the MSU. The KB attribute must be specified to enable the MSU package to + /// be uninstalled. Even then MSU uninstallation is only supported on Windows 7 and later. When the KB attribute + /// is specified, the Permanent attribute will the control whether the package is uninstalled. + /// + public string KB + { + get + { + return this.kBField; + } + set + { + this.kBFieldSet = true; + this.kBField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Payload" == childName)) + { + childValue = new Payload(); + } + if (("PayloadGroupRef" == childName)) + { + childValue = new PayloadGroupRef(); + } + if (("MsuPackagePayload" == childName)) + { + childValue = new MsuPackagePayload(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MsuPackage", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.downloadUrlFieldSet) + { + writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); + } + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.installSizeFieldSet) + { + writer.WriteAttributeString("InstallSize", this.installSizeField); + } + if (this.installConditionFieldSet) + { + writer.WriteAttributeString("InstallCondition", this.installConditionField); + } + if (this.cacheFieldSet) + { + if ((this.cacheField == BundleCacheType.force)) + { + writer.WriteAttributeString("Cache", "force"); + } + if ((this.cacheField == BundleCacheType.remove)) + { + writer.WriteAttributeString("Cache", "remove"); + } + if ((this.cacheField == BundleCacheType.keep)) + { + writer.WriteAttributeString("Cache", "keep"); + } + } + if (this.cacheIdFieldSet) + { + writer.WriteAttributeString("CacheId", this.cacheIdField); + } + if (this.displayNameFieldSet) + { + writer.WriteAttributeString("DisplayName", this.displayNameField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.logPathVariableFieldSet) + { + writer.WriteAttributeString("LogPathVariable", this.logPathVariableField); + } + if (this.rollbackLogPathVariableFieldSet) + { + writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField); + } + if (this.permanentFieldSet) + { + if ((this.permanentField == YesNoType.no)) + { + writer.WriteAttributeString("Permanent", "no"); + } + if ((this.permanentField == YesNoType.yes)) + { + writer.WriteAttributeString("Permanent", "yes"); + } + } + if (this.vitalFieldSet) + { + if ((this.vitalField == YesNoType.no)) + { + writer.WriteAttributeString("Vital", "no"); + } + if ((this.vitalField == YesNoType.yes)) + { + writer.WriteAttributeString("Vital", "yes"); + } + } + if (this.compressedFieldSet) + { + if ((this.compressedField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("Compressed", "default"); + } + if ((this.compressedField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("Compressed", "no"); + } + if ((this.compressedField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("Compressed", "yes"); + } + } + if (this.enableSignatureVerificationFieldSet) + { + if ((this.enableSignatureVerificationField == YesNoType.no)) + { + writer.WriteAttributeString("EnableSignatureVerification", "no"); + } + if ((this.enableSignatureVerificationField == YesNoType.yes)) + { + writer.WriteAttributeString("EnableSignatureVerification", "yes"); + } + } + if (this.detectConditionFieldSet) + { + writer.WriteAttributeString("DetectCondition", this.detectConditionField); + } + if (this.kBFieldSet) + { + writer.WriteAttributeString("KB", this.kBField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("DownloadUrl" == name)) + { + this.downloadUrlField = value; + this.downloadUrlFieldSet = true; + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("InstallSize" == name)) + { + this.installSizeField = value; + this.installSizeFieldSet = true; + } + if (("InstallCondition" == name)) + { + this.installConditionField = value; + this.installConditionFieldSet = true; + } + if (("Cache" == name)) + { + this.cacheField = Enums.ParseBundleCacheType(value); + this.cacheFieldSet = true; + } + if (("CacheId" == name)) + { + this.cacheIdField = value; + this.cacheIdFieldSet = true; + } + if (("DisplayName" == name)) + { + this.displayNameField = value; + this.displayNameFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("LogPathVariable" == name)) + { + this.logPathVariableField = value; + this.logPathVariableFieldSet = true; + } + if (("RollbackLogPathVariable" == name)) + { + this.rollbackLogPathVariableField = value; + this.rollbackLogPathVariableFieldSet = true; + } + if (("Permanent" == name)) + { + this.permanentField = Enums.ParseYesNoType(value); + this.permanentFieldSet = true; + } + if (("Vital" == name)) + { + this.vitalField = Enums.ParseYesNoType(value); + this.vitalFieldSet = true; + } + if (("Compressed" == name)) + { + this.compressedField = Enums.ParseYesNoDefaultType(value); + this.compressedFieldSet = true; + } + if (("EnableSignatureVerification" == name)) + { + this.enableSignatureVerificationField = Enums.ParseYesNoType(value); + this.enableSignatureVerificationFieldSet = true; + } + if (("DetectCondition" == name)) + { + this.detectConditionField = value; + this.detectConditionFieldSet = true; + } + if (("KB" == name)) + { + this.kBField = value; + this.kBFieldSet = true; + } + } + } + + /// + /// Describes a single exe package to install. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ExePackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string downloadUrlField; + + private bool downloadUrlFieldSet; + + private string idField; + + private bool idFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private string installSizeField; + + private bool installSizeFieldSet; + + private string installConditionField; + + private bool installConditionFieldSet; + + private BundleCacheType cacheField; + + private bool cacheFieldSet; + + private string cacheIdField; + + private bool cacheIdFieldSet; + + private string displayNameField; + + private bool displayNameFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string logPathVariableField; + + private bool logPathVariableFieldSet; + + private string rollbackLogPathVariableField; + + private bool rollbackLogPathVariableFieldSet; + + private YesNoType permanentField; + + private bool permanentFieldSet; + + private YesNoType vitalField; + + private bool vitalFieldSet; + + private YesNoDefaultType compressedField; + + private bool compressedFieldSet; + + private YesNoType enableSignatureVerificationField; + + private bool enableSignatureVerificationFieldSet; + + private string detectConditionField; + + private bool detectConditionFieldSet; + + private string installCommandField; + + private bool installCommandFieldSet; + + private string repairCommandField; + + private bool repairCommandFieldSet; + + private string uninstallCommandField; + + private bool uninstallCommandFieldSet; + + private YesNoDefaultType perMachineField; + + private bool perMachineFieldSet; + + private BurnExeProtocolType protocolField; + + private bool protocolFieldSet; + + private ISchemaElement parentElement; + + public ExePackage() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackagePayload))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExitCode))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CommandLine))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Location of the package to add to the bundle. The default value is the Name attribute, if provided. + /// At a minimum, the SourceFile or Name attribute must be specified. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + /// + /// The destination path and file name for this chain payload. Use this attribute to rename the + /// chain entry point or extract it into a subfolder. The default value is the file name from the + /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified. + /// The use of '..' directories is not allowed. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + public string DownloadUrl + { + get + { + return this.downloadUrlField; + } + set + { + this.downloadUrlFieldSet = true; + this.downloadUrlField = value; + } + } + + /// + /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute + /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores). + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The identifier of another package that this one should be installed after. By default the After + /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this + /// attribute is specified ensure that a cycle is not created explicitly or implicitly. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// The size this package will take on disk in bytes after it is installed. By default, the binder will + /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs) + /// and use the total for the install size of the package. + /// + public string InstallSize + { + get + { + return this.installSizeField; + } + set + { + this.installSizeFieldSet = true; + this.installSizeField = value; + } + } + + /// + /// 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. + /// + public string InstallCondition + { + get + { + return this.installConditionField; + } + set + { + this.installConditionFieldSet = true; + this.installConditionField = value; + } + } + + /// + /// Whether to cache the package. The default is "yes". + /// + public BundleCacheType Cache + { + get + { + return this.cacheField; + } + set + { + this.cacheFieldSet = true; + this.cacheField = value; + } + } + + /// + /// The identifier to use when caching the package. + /// + public string CacheId + { + get + { + return this.cacheIdField; + } + set + { + this.cacheIdFieldSet = true; + this.cacheIdField = value; + } + } + + /// + /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages + /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use + /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the + /// bootstrapper application data manifest. + /// + public string DisplayName + { + get + { + return this.displayNameField; + } + set + { + this.displayNameFieldSet = true; + this.displayNameField = value; + } + } + + /// + /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages + /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use + /// the Description patch metadata property. Other package types must use this attribute to define a description in the + /// bootstrapper application data manifest. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not + /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging. + /// + public string LogPathVariable + { + get + { + return this.logPathVariableField; + } + set + { + this.logPathVariableFieldSet = true; + this.logPathVariableField = value; + } + } + + /// + /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause + /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which + /// default to no logging. + /// + public string RollbackLogPathVariable + { + get + { + return this.rollbackLogPathVariableField; + } + set + { + this.rollbackLogPathVariableFieldSet = true; + this.rollbackLogPathVariableField = value; + } + } + + /// + /// Specifies whether the package can be uninstalled. The default is "no". + /// + public YesNoType Permanent + { + get + { + return this.permanentField; + } + set + { + this.permanentFieldSet = true; + this.permanentField = value; + } + } + + /// + /// Specifies whether the package must succeed for the chain to continue. The default "yes" + /// indicates that if the package fails then the chain will fail and rollback or stop. If + /// "no" is specified then the chain will continue even if the package reports failure. + /// + public YesNoType Vital + { + get + { + return this.vitalField; + } + set + { + this.vitalFieldSet = true; + this.vitalField = value; + } + } + + /// + /// Whether the package payload should be embedded in a container or left as an external payload. + /// + public YesNoDefaultType Compressed + { + get + { + return this.compressedField; + } + set + { + this.compressedFieldSet = true; + this.compressedField = value; + } + } + + /// + /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes" + /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the + /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures. + /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no". + /// + public YesNoType EnableSignatureVerification + { + get + { + return this.enableSignatureVerificationField; + } + set + { + this.enableSignatureVerificationFieldSet = true; + this.enableSignatureVerificationField = value; + } + } + + /// + /// A condition that determines if the package is present on the target system. This condition can use built-in + /// variables and variables returned by searches. This condition is necessary because Windows doesn't provide a + /// method to detect the presence of an ExePackage. Burn uses this condition to determine how to treat this + /// package during a bundle action; for example, if this condition is false or omitted and the bundle is being + /// installed, Burn will install this package. + /// + public string DetectCondition + { + get + { + return this.detectConditionField; + } + set + { + this.detectConditionFieldSet = true; + this.detectConditionField = value; + } + } + + /// + /// 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. + /// + public string InstallCommand + { + get + { + return this.installCommandField; + } + set + { + this.installCommandFieldSet = true; + this.installCommandField = value; + } + } + + /// + /// The command-line arguments to specify to indicate a repair. If the executable package can be repaired but + /// does not require any special command-line arguments to do so then set the attribute's value to blank. To + /// indicate that the package does not support repair, omit this attribute. + /// + public string RepairCommand + { + get + { + return this.repairCommandField; + } + set + { + this.repairCommandFieldSet = true; + this.repairCommandField = value; + } + } + + /// + /// 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". + /// + public string UninstallCommand + { + get + { + return this.uninstallCommandField; + } + set + { + this.uninstallCommandFieldSet = true; + this.uninstallCommandField = value; + } + } + + /// + /// Indicates the package must be executed elevated. The default is "no". + /// + public YesNoDefaultType PerMachine + { + get + { + return this.perMachineField; + } + set + { + this.perMachineFieldSet = true; + this.perMachineField = value; + } + } + + /// + /// Indicates the communication protocol the package supports for extended progress and error reporting. The default is "none". + /// + public BurnExeProtocolType Protocol + { + get + { + return this.protocolField; + } + set + { + this.protocolFieldSet = true; + this.protocolField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Payload" == childName)) + { + childValue = new Payload(); + } + if (("PayloadGroupRef" == childName)) + { + childValue = new PayloadGroupRef(); + } + if (("ExePackagePayload" == childName)) + { + childValue = new ExePackagePayload(); + } + if (("ExitCode" == childName)) + { + childValue = new ExitCode(); + } + if (("CommandLine" == childName)) + { + childValue = new CommandLine(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ExePackage", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.downloadUrlFieldSet) + { + writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); + } + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.installSizeFieldSet) + { + writer.WriteAttributeString("InstallSize", this.installSizeField); + } + if (this.installConditionFieldSet) + { + writer.WriteAttributeString("InstallCondition", this.installConditionField); + } + if (this.cacheFieldSet) + { + if ((this.cacheField == BundleCacheType.force)) + { + writer.WriteAttributeString("Cache", "force"); + } + if ((this.cacheField == BundleCacheType.remove)) + { + writer.WriteAttributeString("Cache", "remove"); + } + if ((this.cacheField == BundleCacheType.keep)) + { + writer.WriteAttributeString("Cache", "keep"); + } + } + if (this.cacheIdFieldSet) + { + writer.WriteAttributeString("CacheId", this.cacheIdField); + } + if (this.displayNameFieldSet) + { + writer.WriteAttributeString("DisplayName", this.displayNameField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.logPathVariableFieldSet) + { + writer.WriteAttributeString("LogPathVariable", this.logPathVariableField); + } + if (this.rollbackLogPathVariableFieldSet) + { + writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField); + } + if (this.permanentFieldSet) + { + if ((this.permanentField == YesNoType.no)) + { + writer.WriteAttributeString("Permanent", "no"); + } + if ((this.permanentField == YesNoType.yes)) + { + writer.WriteAttributeString("Permanent", "yes"); + } + } + if (this.vitalFieldSet) + { + if ((this.vitalField == YesNoType.no)) + { + writer.WriteAttributeString("Vital", "no"); + } + if ((this.vitalField == YesNoType.yes)) + { + writer.WriteAttributeString("Vital", "yes"); + } + } + if (this.compressedFieldSet) + { + if ((this.compressedField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("Compressed", "default"); + } + if ((this.compressedField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("Compressed", "no"); + } + if ((this.compressedField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("Compressed", "yes"); + } + } + if (this.enableSignatureVerificationFieldSet) + { + if ((this.enableSignatureVerificationField == YesNoType.no)) + { + writer.WriteAttributeString("EnableSignatureVerification", "no"); + } + if ((this.enableSignatureVerificationField == YesNoType.yes)) + { + writer.WriteAttributeString("EnableSignatureVerification", "yes"); + } + } + if (this.detectConditionFieldSet) + { + writer.WriteAttributeString("DetectCondition", this.detectConditionField); + } + if (this.installCommandFieldSet) + { + writer.WriteAttributeString("InstallCommand", this.installCommandField); + } + if (this.repairCommandFieldSet) + { + writer.WriteAttributeString("RepairCommand", this.repairCommandField); + } + if (this.uninstallCommandFieldSet) + { + writer.WriteAttributeString("UninstallCommand", this.uninstallCommandField); + } + if (this.perMachineFieldSet) + { + if ((this.perMachineField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("PerMachine", "default"); + } + if ((this.perMachineField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("PerMachine", "no"); + } + if ((this.perMachineField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("PerMachine", "yes"); + } + } + if (this.protocolFieldSet) + { + if ((this.protocolField == BurnExeProtocolType.none)) + { + writer.WriteAttributeString("Protocol", "none"); + } + if ((this.protocolField == BurnExeProtocolType.burn)) + { + writer.WriteAttributeString("Protocol", "burn"); + } + if ((this.protocolField == BurnExeProtocolType.netfx4)) + { + writer.WriteAttributeString("Protocol", "netfx4"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("DownloadUrl" == name)) + { + this.downloadUrlField = value; + this.downloadUrlFieldSet = true; + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("InstallSize" == name)) + { + this.installSizeField = value; + this.installSizeFieldSet = true; + } + if (("InstallCondition" == name)) + { + this.installConditionField = value; + this.installConditionFieldSet = true; + } + if (("Cache" == name)) + { + this.cacheField = Enums.ParseBundleCacheType(value); + this.cacheFieldSet = true; + } + if (("CacheId" == name)) + { + this.cacheIdField = value; + this.cacheIdFieldSet = true; + } + if (("DisplayName" == name)) + { + this.displayNameField = value; + this.displayNameFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("LogPathVariable" == name)) + { + this.logPathVariableField = value; + this.logPathVariableFieldSet = true; + } + if (("RollbackLogPathVariable" == name)) + { + this.rollbackLogPathVariableField = value; + this.rollbackLogPathVariableFieldSet = true; + } + if (("Permanent" == name)) + { + this.permanentField = Enums.ParseYesNoType(value); + this.permanentFieldSet = true; + } + if (("Vital" == name)) + { + this.vitalField = Enums.ParseYesNoType(value); + this.vitalFieldSet = true; + } + if (("Compressed" == name)) + { + this.compressedField = Enums.ParseYesNoDefaultType(value); + this.compressedFieldSet = true; + } + if (("EnableSignatureVerification" == name)) + { + this.enableSignatureVerificationField = Enums.ParseYesNoType(value); + this.enableSignatureVerificationFieldSet = true; + } + if (("DetectCondition" == name)) + { + this.detectConditionField = value; + this.detectConditionFieldSet = true; + } + if (("InstallCommand" == name)) + { + this.installCommandField = value; + this.installCommandFieldSet = true; + } + if (("RepairCommand" == name)) + { + this.repairCommandField = value; + this.repairCommandFieldSet = true; + } + if (("UninstallCommand" == name)) + { + this.uninstallCommandField = value; + this.uninstallCommandFieldSet = true; + } + if (("PerMachine" == name)) + { + this.perMachineField = Enums.ParseYesNoDefaultType(value); + this.perMachineFieldSet = true; + } + if (("Protocol" == name)) + { + this.protocolField = Enums.ParseBurnExeProtocolType(value); + this.protocolFieldSet = true; + } + } + } + + /// + /// Describes a rollback boundary in the chain. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RollbackBoundary : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private YesNoType vitalField; + + private bool vitalFieldSet; + + private YesNoType transactionField; + + private bool transactionFieldSet; + + private ISchemaElement parentElement; + + public RollbackBoundary() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for this rollback boundary, for ordering and cross-referencing. If this attribute is + /// not provided a stable identifier will be generated. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Specifies whether the rollback boundary aborts the chain. The default "yes" indicates that if + /// the rollback boundary is encountered then the chain will fail and rollback or stop. If "no" + /// is specified then the chain should continue successfuly at the next rollback boundary. + /// + public YesNoType Vital + { + get + { + return this.vitalField; + } + set + { + this.vitalFieldSet = true; + this.vitalField = value; + } + } + + /// + /// Specifies whether the rollback boundary is wrapped in an MSI transaction. The default is "no" + /// + public YesNoType Transaction + { + get + { + return this.transactionField; + } + set + { + this.transactionFieldSet = true; + this.transactionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RollbackBoundary", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.vitalFieldSet) + { + if ((this.vitalField == YesNoType.no)) + { + writer.WriteAttributeString("Vital", "no"); + } + if ((this.vitalField == YesNoType.yes)) + { + writer.WriteAttributeString("Vital", "yes"); + } + } + if (this.transactionFieldSet) + { + if ((this.transactionField == YesNoType.no)) + { + writer.WriteAttributeString("Transaction", "no"); + } + if ((this.transactionField == YesNoType.yes)) + { + writer.WriteAttributeString("Transaction", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Vital" == name)) + { + this.vitalField = Enums.ParseYesNoType(value); + this.vitalFieldSet = true; + } + if (("Transaction" == name)) + { + this.transactionField = Enums.ParseYesNoType(value); + this.transactionFieldSet = true; + } + } + } + + /// + /// Describes a package group to a bootstrapper. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PackageGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public PackageGroup() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPackage))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MspPackage))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackage))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackage))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RollbackBoundary))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for package group. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("MsiPackage" == childName)) + { + childValue = new MsiPackage(); + } + if (("MspPackage" == childName)) + { + childValue = new MspPackage(); + } + if (("MsuPackage" == childName)) + { + childValue = new MsuPackage(); + } + if (("ExePackage" == childName)) + { + childValue = new ExePackage(); + } + if (("RollbackBoundary" == childName)) + { + childValue = new RollbackBoundary(); + } + if (("PackageGroupRef" == childName)) + { + childValue = new PackageGroupRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PackageGroup", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Create a reference to PackageGroup element that exists inside a Bundle or Fragment element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PackageGroupRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the PackageGroup element to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The identifier of a package that this group should be installed after. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PackageGroupRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + } + } + + /// + /// Allows an MSI property to be set based on the value of a burn engine expression. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MsiProperty : ISchemaElement, ISetAttributes + { + + private string nameField; + + private bool nameFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + /// + /// 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 + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// 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. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MsiProperty", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + } + + /// + /// Specifies a patch included in the same bundle that is installed when the parent MSI package is installed. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class SlipstreamMsp : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier for a MspPackage in the bundle. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("SlipstreamMsp", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Describes a burn engine variable to define. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Variable : ISchemaElement, ISetAttributes + { + + private YesNoType hiddenField; + + private bool hiddenFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private YesNoType persistedField; + + private bool persistedFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private TypeType typeField; + + private bool typeFieldSet; + + private ISchemaElement parentElement; + + /// + /// Whether the value of the variable should be hidden. + /// + public YesNoType Hidden + { + get + { + return this.hiddenField; + } + set + { + this.hiddenFieldSet = true; + this.hiddenField = value; + } + } + + /// + /// The name for the variable. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Whether the variable should be persisted. + /// + public YesNoType Persisted + { + get + { + return this.persistedField; + } + set + { + this.persistedFieldSet = true; + this.persistedField = value; + } + } + + /// + /// Starting value for the variable. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// Type of the variable, inferred from the value if not specified. + /// + public TypeType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a TypeType from a string. + /// + public static TypeType ParseTypeType(string value) + { + TypeType parsedValue; + Variable.TryParseTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypeType from a string. + /// + public static bool TryParseTypeType(string value, out TypeType parsedValue) + { + parsedValue = TypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("string" == value)) + { + parsedValue = TypeType.@string; + } + else + { + if (("numeric" == value)) + { + parsedValue = TypeType.numeric; + } + else + { + if (("version" == value)) + { + parsedValue = TypeType.version; + } + else + { + parsedValue = TypeType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Variable", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.hiddenFieldSet) + { + if ((this.hiddenField == YesNoType.no)) + { + writer.WriteAttributeString("Hidden", "no"); + } + if ((this.hiddenField == YesNoType.yes)) + { + writer.WriteAttributeString("Hidden", "yes"); + } + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.persistedFieldSet) + { + if ((this.persistedField == YesNoType.no)) + { + writer.WriteAttributeString("Persisted", "no"); + } + if ((this.persistedField == YesNoType.yes)) + { + writer.WriteAttributeString("Persisted", "yes"); + } + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.typeFieldSet) + { + if ((this.typeField == TypeType.@string)) + { + writer.WriteAttributeString("Type", "string"); + } + if ((this.typeField == TypeType.numeric)) + { + writer.WriteAttributeString("Type", "numeric"); + } + if ((this.typeField == TypeType.version)) + { + writer.WriteAttributeString("Type", "version"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Hidden" == name)) + { + this.hiddenField = Enums.ParseYesNoType(value); + this.hiddenFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Persisted" == name)) + { + this.persistedField = Enums.ParseYesNoType(value); + this.persistedFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = Variable.ParseTypeType(value); + this.typeFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum TypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + @string, + + numeric, + + version, + } + } + + /// + /// Representation of a file that contains one or more files. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Container : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string downloadUrlField; + + private bool downloadUrlFieldSet; + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private BurnContainerType typeField; + + private bool typeFieldSet; + + private ISchemaElement parentElement; + + public Container() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public string DownloadUrl + { + get + { + return this.downloadUrlField; + } + set + { + this.downloadUrlFieldSet = true; + this.downloadUrlField = value; + } + } + + /// + /// The unique identifier for the container. If this attribute is not specified the Name attribute will be used. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The file name for this container. A relative path may be provided to place the container in a sub-folder of the bundle. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Indicates whether the container is "attached" to the bundle executable or placed external to the bundle extecutable as "detached". If + /// this attribute is not specified, the default is to create a detached container. + /// + public BurnContainerType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("PackageGroupRef" == childName)) + { + childValue = new PackageGroupRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Container", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.downloadUrlFieldSet) + { + writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); + } + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.typeFieldSet) + { + if ((this.typeField == BurnContainerType.attached)) + { + writer.WriteAttributeString("Type", "attached"); + } + if ((this.typeField == BurnContainerType.detached)) + { + writer.WriteAttributeString("Type", "detached"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("DownloadUrl" == name)) + { + this.downloadUrlField = value; + this.downloadUrlFieldSet = true; + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = Enums.ParseBurnContainerType(value); + this.typeFieldSet = true; + } + } + } + + /// + /// Create a reference to an existing Container element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ContainerRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of Container element to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ContainerRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Describes map of exit code returned from executable package to a bootstrapper behavior. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ExitCode : ISchemaElement, ISetAttributes + { + + private int valueField; + + private bool valueFieldSet; + + private BehaviorType behaviorField; + + private bool behaviorFieldSet; + + private ISchemaElement parentElement; + + /// + /// Exit code returned from executable package. If no value is provided it means all values not explicitly set default to this behavior. + /// + public int Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// Choose one of the supported behaviors error codes: success, error, scheduleReboot, forceReboot. + /// + public BehaviorType Behavior + { + get + { + return this.behaviorField; + } + set + { + this.behaviorFieldSet = true; + this.behaviorField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a BehaviorType from a string. + /// + public static BehaviorType ParseBehaviorType(string value) + { + BehaviorType parsedValue; + ExitCode.TryParseBehaviorType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a BehaviorType from a string. + /// + public static bool TryParseBehaviorType(string value, out BehaviorType parsedValue) + { + parsedValue = BehaviorType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("success" == value)) + { + parsedValue = BehaviorType.success; + } + else + { + if (("error" == value)) + { + parsedValue = BehaviorType.error; + } + else + { + if (("scheduleReboot" == value)) + { + parsedValue = BehaviorType.scheduleReboot; + } + else + { + if (("forceReboot" == value)) + { + parsedValue = BehaviorType.forceReboot; + } + else + { + parsedValue = BehaviorType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ExitCode", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField.ToString(CultureInfo.InvariantCulture)); + } + if (this.behaviorFieldSet) + { + if ((this.behaviorField == BehaviorType.success)) + { + writer.WriteAttributeString("Behavior", "success"); + } + if ((this.behaviorField == BehaviorType.error)) + { + writer.WriteAttributeString("Behavior", "error"); + } + if ((this.behaviorField == BehaviorType.scheduleReboot)) + { + writer.WriteAttributeString("Behavior", "scheduleReboot"); + } + if ((this.behaviorField == BehaviorType.forceReboot)) + { + writer.WriteAttributeString("Behavior", "forceReboot"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Value" == name)) + { + this.valueField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.valueFieldSet = true; + } + if (("Behavior" == name)) + { + this.behaviorField = ExitCode.ParseBehaviorType(value); + this.behaviorFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum BehaviorType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + success, + + error, + + scheduleReboot, + + forceReboot, + } + } + + /// + /// Describes additional, conditional command-line arguments for an ExePackage. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CommandLine : ISchemaElement, ISetAttributes + { + + private string installArgumentField; + + private bool installArgumentFieldSet; + + private string uninstallArgumentField; + + private bool uninstallArgumentFieldSet; + + private string repairArgumentField; + + private bool repairArgumentFieldSet; + + private string conditionField; + + private bool conditionFieldSet; + + private ISchemaElement parentElement; + + /// + /// Additional command-line arguments to apply during package installation if Condition is true. + /// + public string InstallArgument + { + get + { + return this.installArgumentField; + } + set + { + this.installArgumentFieldSet = true; + this.installArgumentField = value; + } + } + + /// + /// Additional command-line arguments to apply during package uninstallation if Condition is true. + /// + public string UninstallArgument + { + get + { + return this.uninstallArgumentField; + } + set + { + this.uninstallArgumentFieldSet = true; + this.uninstallArgumentField = value; + } + } + + /// + /// Additional command-line arguments to apply during package repair if Condition is true. + /// + public string RepairArgument + { + get + { + return this.repairArgumentField; + } + set + { + this.repairArgumentFieldSet = true; + this.repairArgumentField = value; + } + } + + /// + /// The condition that controls whether the command-line arguments specified in the + /// InstallArgument, UninstallArgument, or RepairArgument attributes are appended to the + /// command line passed to the ExePackage. Which attribute is used depends on the + /// action being applied to the ExePackage. For example, when the ExePackage is + /// being installed, the InstallArgument attribute value is appended to the command + /// line when the ExePackage is executed. + /// + public string Condition + { + get + { + return this.conditionField; + } + set + { + this.conditionFieldSet = true; + this.conditionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CommandLine", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.installArgumentFieldSet) + { + writer.WriteAttributeString("InstallArgument", this.installArgumentField); + } + if (this.uninstallArgumentFieldSet) + { + writer.WriteAttributeString("UninstallArgument", this.uninstallArgumentField); + } + if (this.repairArgumentFieldSet) + { + writer.WriteAttributeString("RepairArgument", this.repairArgumentField); + } + if (this.conditionFieldSet) + { + writer.WriteAttributeString("Condition", this.conditionField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("InstallArgument" == name)) + { + this.installArgumentField = value; + this.installArgumentFieldSet = true; + } + if (("UninstallArgument" == name)) + { + this.uninstallArgumentField = value; + this.uninstallArgumentFieldSet = true; + } + if (("RepairArgument" == name)) + { + this.repairArgumentField = value; + this.repairArgumentFieldSet = true; + } + if (("Condition" == name)) + { + this.conditionField = value; + this.conditionFieldSet = true; + } + } + } + + /// + /// Describes a payload to a bootstrapper. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Payload : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private YesNoDefaultType compressedField; + + private bool compressedFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string downloadUrlField; + + private bool downloadUrlFieldSet; + + private YesNoType enableSignatureVerificationField; + + private bool enableSignatureVerificationFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of Payload element. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Whether the payload should be embedded in a container or left as an external payload. + /// + public YesNoDefaultType Compressed + { + get + { + return this.compressedField; + } + set + { + this.compressedFieldSet = true; + this.compressedField = value; + } + } + + /// + /// Location of the source file. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + /// + /// The destination path and file name for this payload. The default is the source file name. The use of '..' directories is not allowed. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + public string DownloadUrl + { + get + { + return this.downloadUrlField; + } + set + { + this.downloadUrlFieldSet = true; + this.downloadUrlField = value; + } + } + + /// + /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes" + /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the + /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures. + /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no". + /// + public YesNoType EnableSignatureVerification + { + get + { + return this.enableSignatureVerificationField; + } + set + { + this.enableSignatureVerificationFieldSet = true; + this.enableSignatureVerificationField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Payload", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.compressedFieldSet) + { + if ((this.compressedField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("Compressed", "default"); + } + if ((this.compressedField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("Compressed", "no"); + } + if ((this.compressedField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("Compressed", "yes"); + } + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.downloadUrlFieldSet) + { + writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); + } + if (this.enableSignatureVerificationFieldSet) + { + if ((this.enableSignatureVerificationField == YesNoType.no)) + { + writer.WriteAttributeString("EnableSignatureVerification", "no"); + } + if ((this.enableSignatureVerificationField == YesNoType.yes)) + { + writer.WriteAttributeString("EnableSignatureVerification", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Compressed" == name)) + { + this.compressedField = Enums.ParseYesNoDefaultType(value); + this.compressedFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("DownloadUrl" == name)) + { + this.downloadUrlField = value; + this.downloadUrlFieldSet = true; + } + if (("EnableSignatureVerification" == name)) + { + this.enableSignatureVerificationField = Enums.ParseYesNoType(value); + this.enableSignatureVerificationFieldSet = true; + } + } + } + + /// + /// Describes a payload group to a bootstrapper. PayloadGroups referenced from within a Bundle are tied to the Bundle. + /// PayloadGroups referenced from a Fragment are tied to the context of whatever references them such as an ExePackage or MsiPackage. + /// It is possible to share a PayloadGroup between multiple Packages and/or a Bundle by creating multiple references to it. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PayloadGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public PayloadGroup() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for payload group. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Payload" == childName)) + { + childValue = new Payload(); + } + if (("PayloadGroupRef" == childName)) + { + childValue = new PayloadGroupRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PayloadGroup", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Create a reference to PayloadGroup element that exists inside a Bundle or Fragment element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PayloadGroupRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the PayloadGroup element to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PayloadGroupRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + public class ExePackagePayload : RemotePayload + { + public ExePackagePayload() : base("ExePackagePayload") { } + } + + public class MsuPackagePayload : RemotePayload + { + public MsuPackagePayload() : base("MsuPackagePayload") { } + } + + /// + /// Describes information about a remote file payload that is not available at the time of building the bundle. + /// The parent must specify DownloadUrl and must not specify SourceFile when using this element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public abstract class RemotePayload : ISchemaElement, ISetAttributes + { + private string elementName; + + public RemotePayload(string elementName) + { + this.elementName = elementName; + } + + private string descriptionField; + + private bool descriptionFieldSet; + + private string hashField; + + private bool hashFieldSet; + + private string productNameField; + + private bool productNameFieldSet; + + private long sizeField; + + private bool sizeFieldSet; + + private string versionField; + + private bool versionFieldSet; + + private ISchemaElement parentElement; + + /// + /// Description of the file from version resources. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// SHA-1 hash of the RemotePayload. Include this attribute if the remote file is unsigned or SuppressSignatureVerification is set to Yes. + /// + public string Hash + { + get + { + return this.hashField; + } + set + { + this.hashFieldSet = true; + this.hashField = value; + } + } + + /// + /// Product name of the file from version resouces. + /// + public string ProductName + { + get + { + return this.productNameField; + } + set + { + this.productNameFieldSet = true; + this.productNameField = value; + } + } + + /// + /// Size of the remote file in bytes. + /// + public long Size + { + get + { + return this.sizeField; + } + set + { + this.sizeFieldSet = true; + this.sizeField = value; + } + } + + /// + /// Version of the remote file + /// + public string Version + { + get + { + return this.versionField; + } + set + { + this.versionFieldSet = true; + this.versionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement(this.elementName, "http://wixtoolset.org/schemas/v4/wxs"); + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.hashFieldSet) + { + writer.WriteAttributeString("Hash", this.hashField); + } + if (this.productNameFieldSet) + { + writer.WriteAttributeString("ProductName", this.productNameField); + } + if (this.sizeFieldSet) + { + writer.WriteAttributeString("Size", this.sizeField.ToString(CultureInfo.InvariantCulture)); + } + if (this.versionFieldSet) + { + writer.WriteAttributeString("Version", this.versionField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("Hash" == name)) + { + this.hashField = value; + this.hashFieldSet = true; + } + if (("ProductName" == name)) + { + this.productNameField = value; + this.productNameFieldSet = true; + } + if (("Size" == name)) + { + this.sizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sizeFieldSet = true; + } + if (("Version" == name)) + { + this.versionField = value; + this.versionFieldSet = true; + } + } + } + + /// + /// Create a RelatedBundle element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RelatedBundle : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ActionType actionField; + + private bool actionFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the RelatedBundle group. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The action to take on bundles related to this one. Detect is the default. + /// + public ActionType Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ActionType from a string. + /// + public static ActionType ParseActionType(string value) + { + ActionType parsedValue; + RelatedBundle.TryParseActionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ActionType from a string. + /// + public static bool TryParseActionType(string value, out ActionType parsedValue) + { + parsedValue = ActionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("Detect" == value)) + { + parsedValue = ActionType.Detect; + } + else + { + if (("Upgrade" == value)) + { + parsedValue = ActionType.Upgrade; + } + else + { + if (("Addon" == value)) + { + parsedValue = ActionType.Addon; + } + else + { + if (("Patch" == value)) + { + parsedValue = ActionType.Patch; + } + else + { + parsedValue = ActionType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RelatedBundle", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.actionFieldSet) + { + if ((this.actionField == ActionType.Detect)) + { + writer.WriteAttributeString("Action", "Detect"); + } + if ((this.actionField == ActionType.Upgrade)) + { + writer.WriteAttributeString("Action", "Upgrade"); + } + if ((this.actionField == ActionType.Addon)) + { + writer.WriteAttributeString("Action", "Addon"); + } + if ((this.actionField == ActionType.Patch)) + { + writer.WriteAttributeString("Action", "Patch"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Action" == name)) + { + this.actionField = RelatedBundle.ParseActionType(value); + this.actionFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ActionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + Detect, + + Upgrade, + + Addon, + + Patch, + } + } + + /// + /// Defines the update for a Bundle. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Update : ISchemaElement, ISetAttributes + { + + private string locationField; + + private bool locationFieldSet; + + private ISchemaElement parentElement; + + /// + /// The absolute path or URL to check for an update bundle. Currently the engine provides this value + /// in the IBootstrapperApplication::OnDetectUpdateBegin() and otherwise ignores the value. In the + /// future the engine will be able to acquire an update bundle from the location and determine if it + /// is newer than the current executing bundle. + /// + public string Location + { + get + { + return this.locationField; + } + set + { + this.locationFieldSet = true; + this.locationField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Update", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.locationFieldSet) + { + writer.WriteAttributeString("Location", this.locationField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Location" == name)) + { + this.locationField = value; + this.locationFieldSet = true; + } + } + } + + /// + /// The Package element is analogous to the main function in a C program. When linking, only one Package section + /// can be given to the linker to produce a successful result. Using this element creates an msi file. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Package : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string codepageField; + + private bool codepageFieldSet; + + private string languageField; + + private bool languageFieldSet; + + private string manufacturerField; + + private bool manufacturerFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string upgradeCodeField; + + private bool upgradeCodeFieldSet; + + private string versionField; + + private bool versionFieldSet; + + private ISchemaElement parentElement; + + public Package() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SummaryInformation))); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Binary))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComplianceCheck))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroup))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Condition))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Directory))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Feature))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Icon))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(InstanceTransforms))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(MajorUpgrade))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Media))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(MediaTemplate))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PackageCertificates))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCertificates))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Property))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UI))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Upgrade))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable))); + ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence))); + childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence))); + childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence))); + childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence))); + childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence))); + childCollection1.AddCollection(childCollection2); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// The product code GUID for the product. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The code page integer value or web name for the resulting MSI. See remarks for more information. + /// + public string Codepage + { + get + { + return this.codepageField; + } + set + { + this.codepageFieldSet = true; + this.codepageField = value; + } + } + + /// + /// The decimal language ID (LCID) for the product. + /// + public string Language + { + get + { + return this.languageField; + } + set + { + this.languageFieldSet = true; + this.languageField = value; + } + } + + /// + /// The manufacturer of the product. + /// + public string Manufacturer + { + get + { + return this.manufacturerField; + } + set + { + this.manufacturerFieldSet = true; + this.manufacturerField = value; + } + } + + /// + /// The descriptive name of the product. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The upgrade code GUID for the product. + /// + public string UpgradeCode + { + get + { + return this.upgradeCodeField; + } + set + { + this.upgradeCodeFieldSet = true; + this.upgradeCodeField = value; + } + } + + /// + /// The product's version string. + /// + public string Version + { + get + { + return this.versionField; + } + set + { + this.versionFieldSet = true; + this.versionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("SummaryInformation" == childName)) + { + childValue = new SummaryInformation(); + } + if (("AppId" == childName)) + { + childValue = new AppId(); + } + if (("Binary" == childName)) + { + childValue = new Binary(); + } + if (("ComplianceCheck" == childName)) + { + childValue = new ComplianceCheck(); + } + if (("Component" == childName)) + { + childValue = new Component(); + } + if (("ComponentGroup" == childName)) + { + childValue = new ComponentGroup(); + } + if (("Condition" == childName)) + { + childValue = new Condition(); + } + if (("CustomAction" == childName)) + { + childValue = new CustomAction(); + } + if (("CustomActionRef" == childName)) + { + childValue = new CustomActionRef(); + } + if (("CustomTable" == childName)) + { + childValue = new CustomTable(); + } + if (("Directory" == childName)) + { + childValue = new Directory(); + } + if (("DirectoryRef" == childName)) + { + childValue = new DirectoryRef(); + } + if (("EmbeddedChainer" == childName)) + { + childValue = new EmbeddedChainer(); + } + if (("EmbeddedChainerRef" == childName)) + { + childValue = new EmbeddedChainerRef(); + } + if (("EnsureTable" == childName)) + { + childValue = new EnsureTable(); + } + if (("Feature" == childName)) + { + childValue = new Feature(); + } + if (("FeatureRef" == childName)) + { + childValue = new FeatureRef(); + } + if (("FeatureGroupRef" == childName)) + { + childValue = new FeatureGroupRef(); + } + if (("Icon" == childName)) + { + childValue = new Icon(); + } + if (("InstanceTransforms" == childName)) + { + childValue = new InstanceTransforms(); + } + if (("MajorUpgrade" == childName)) + { + childValue = new MajorUpgrade(); + } + if (("Media" == childName)) + { + childValue = new Media(); + } + if (("MediaTemplate" == childName)) + { + childValue = new MediaTemplate(); + } + if (("PackageCertificates" == childName)) + { + childValue = new PackageCertificates(); + } + if (("PatchCertificates" == childName)) + { + childValue = new PatchCertificates(); + } + if (("Property" == childName)) + { + childValue = new Property(); + } + if (("PropertyRef" == childName)) + { + childValue = new PropertyRef(); + } + if (("SetDirectory" == childName)) + { + childValue = new SetDirectory(); + } + if (("SetProperty" == childName)) + { + childValue = new SetProperty(); + } + if (("SFPCatalog" == childName)) + { + childValue = new SFPCatalog(); + } + if (("SymbolPath" == childName)) + { + childValue = new SymbolPath(); + } + if (("UI" == childName)) + { + childValue = new UI(); + } + if (("UIRef" == childName)) + { + childValue = new UIRef(); + } + if (("Upgrade" == childName)) + { + childValue = new Upgrade(); + } + if (("WixVariable" == childName)) + { + childValue = new WixVariable(); + } + if (("InstallExecuteSequence" == childName)) + { + childValue = new InstallExecuteSequence(); + } + if (("InstallUISequence" == childName)) + { + childValue = new InstallUISequence(); + } + if (("AdminExecuteSequence" == childName)) + { + childValue = new AdminExecuteSequence(); + } + if (("AdminUISequence" == childName)) + { + childValue = new AdminUISequence(); + } + if (("AdvertiseExecuteSequence" == childName)) + { + childValue = new AdvertiseExecuteSequence(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Package", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.codepageFieldSet) + { + writer.WriteAttributeString("Codepage", this.codepageField); + } + if (this.languageFieldSet) + { + writer.WriteAttributeString("Language", this.languageField); + } + if (this.manufacturerFieldSet) + { + writer.WriteAttributeString("Manufacturer", this.manufacturerField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.upgradeCodeFieldSet) + { + writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); + } + if (this.versionFieldSet) + { + writer.WriteAttributeString("Version", this.versionField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Codepage" == name)) + { + this.codepageField = value; + this.codepageFieldSet = true; + } + if (("Language" == name)) + { + this.languageField = value; + this.languageFieldSet = true; + } + if (("Manufacturer" == name)) + { + this.manufacturerField = value; + this.manufacturerFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("UpgradeCode" == name)) + { + this.upgradeCodeField = value; + this.upgradeCodeFieldSet = true; + } + if (("Version" == name)) + { + this.versionField = value; + this.versionFieldSet = true; + } + } + } + + /// + /// The Module element is analogous to the main function in a C program. When linking, only + /// one Module section can be given to the linker to produce a successful result. Using this + /// element creates an msm file. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Module : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string codepageField; + + private bool codepageFieldSet; + + private string guidField; + + private bool guidFieldSet; + + private string languageField; + + private bool languageFieldSet; + + private string versionField; + + private bool versionFieldSet; + + private ISchemaElement parentElement; + + public Module() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SummaryInformation))); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Binary))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Configuration))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Dependency))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Directory))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Exclusion))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Icon))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreModularization))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreTable))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Property))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Substitution))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UI))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable))); + ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence))); + childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence))); + childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence))); + childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence))); + childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence))); + childCollection1.AddCollection(childCollection2); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// The name of the merge module (not the file name). + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The code page integer value or web name for the resulting MSM. See remarks for more information. + /// + public string Codepage + { + get + { + return this.codepageField; + } + set + { + this.codepageFieldSet = true; + this.codepageField = value; + } + } + + /// + /// The modularizaion Guid. + /// + public string Guid + { + get + { + return this.guidField; + } + set + { + this.guidFieldSet = true; + this.guidField = value; + } + } + + /// + /// The decimal language ID (LCID) of the merge module. + /// + public string Language + { + get + { + return this.languageField; + } + set + { + this.languageFieldSet = true; + this.languageField = value; + } + } + + /// + /// The major and minor versions of the merge module. + /// + public string Version + { + get + { + return this.versionField; + } + set + { + this.versionFieldSet = true; + this.versionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("SummaryInformation" == childName)) + { + childValue = new SummaryInformation(); + } + if (("AppId" == childName)) + { + childValue = new AppId(); + } + if (("Binary" == childName)) + { + childValue = new Binary(); + } + if (("Component" == childName)) + { + childValue = new Component(); + } + if (("ComponentGroupRef" == childName)) + { + childValue = new ComponentGroupRef(); + } + if (("ComponentRef" == childName)) + { + childValue = new ComponentRef(); + } + if (("Configuration" == childName)) + { + childValue = new Configuration(); + } + if (("CustomAction" == childName)) + { + childValue = new CustomAction(); + } + if (("CustomActionRef" == childName)) + { + childValue = new CustomActionRef(); + } + if (("CustomTable" == childName)) + { + childValue = new CustomTable(); + } + if (("Dependency" == childName)) + { + childValue = new Dependency(); + } + if (("Directory" == childName)) + { + childValue = new Directory(); + } + if (("DirectoryRef" == childName)) + { + childValue = new DirectoryRef(); + } + if (("EmbeddedChainer" == childName)) + { + childValue = new EmbeddedChainer(); + } + if (("EmbeddedChainerRef" == childName)) + { + childValue = new EmbeddedChainerRef(); + } + if (("EnsureTable" == childName)) + { + childValue = new EnsureTable(); + } + if (("Exclusion" == childName)) + { + childValue = new Exclusion(); + } + if (("Icon" == childName)) + { + childValue = new Icon(); + } + if (("IgnoreModularization" == childName)) + { + childValue = new IgnoreModularization(); + } + if (("IgnoreTable" == childName)) + { + childValue = new IgnoreTable(); + } + if (("Property" == childName)) + { + childValue = new Property(); + } + if (("PropertyRef" == childName)) + { + childValue = new PropertyRef(); + } + if (("SetDirectory" == childName)) + { + childValue = new SetDirectory(); + } + if (("SetProperty" == childName)) + { + childValue = new SetProperty(); + } + if (("SFPCatalog" == childName)) + { + childValue = new SFPCatalog(); + } + if (("Substitution" == childName)) + { + childValue = new Substitution(); + } + if (("UI" == childName)) + { + childValue = new UI(); + } + if (("UIRef" == childName)) + { + childValue = new UIRef(); + } + if (("WixVariable" == childName)) + { + childValue = new WixVariable(); + } + if (("InstallExecuteSequence" == childName)) + { + childValue = new InstallExecuteSequence(); + } + if (("InstallUISequence" == childName)) + { + childValue = new InstallUISequence(); + } + if (("AdminExecuteSequence" == childName)) + { + childValue = new AdminExecuteSequence(); + } + if (("AdminUISequence" == childName)) + { + childValue = new AdminUISequence(); + } + if (("AdvertiseExecuteSequence" == childName)) + { + childValue = new AdvertiseExecuteSequence(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Module", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.codepageFieldSet) + { + writer.WriteAttributeString("Codepage", this.codepageField); + } + if (this.guidFieldSet) + { + writer.WriteAttributeString("Guid", this.guidField); + } + if (this.languageFieldSet) + { + writer.WriteAttributeString("Language", this.languageField); + } + if (this.versionFieldSet) + { + writer.WriteAttributeString("Version", this.versionField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Codepage" == name)) + { + this.codepageField = value; + this.codepageFieldSet = true; + } + if (("Guid" == name)) + { + this.guidField = value; + this.guidFieldSet = true; + } + if (("Language" == name)) + { + this.languageField = value; + this.languageFieldSet = true; + } + if (("Version" == name)) + { + this.versionField = value; + this.versionFieldSet = true; + } + } + } + + /// + /// Declares a dependency on another merge module. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Dependency : ISchemaElement, ISetAttributes + { + + private string requiredIdField; + + private bool requiredIdFieldSet; + + private int requiredLanguageField; + + private bool requiredLanguageFieldSet; + + private string requiredVersionField; + + private bool requiredVersionFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier of the merge module required by the merge module. + /// + public string RequiredId + { + get + { + return this.requiredIdField; + } + set + { + this.requiredIdFieldSet = true; + this.requiredIdField = value; + } + } + + /// + /// Numeric language ID of the merge module in RequiredID. + /// + public int RequiredLanguage + { + get + { + return this.requiredLanguageField; + } + set + { + this.requiredLanguageFieldSet = true; + this.requiredLanguageField = value; + } + } + + /// + /// Version of the merge module in RequiredID. + /// + public string RequiredVersion + { + get + { + return this.requiredVersionField; + } + set + { + this.requiredVersionFieldSet = true; + this.requiredVersionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Dependency", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.requiredIdFieldSet) + { + writer.WriteAttributeString("RequiredId", this.requiredIdField); + } + if (this.requiredLanguageFieldSet) + { + writer.WriteAttributeString("RequiredLanguage", this.requiredLanguageField.ToString(CultureInfo.InvariantCulture)); + } + if (this.requiredVersionFieldSet) + { + writer.WriteAttributeString("RequiredVersion", this.requiredVersionField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("RequiredId" == name)) + { + this.requiredIdField = value; + this.requiredIdFieldSet = true; + } + if (("RequiredLanguage" == name)) + { + this.requiredLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.requiredLanguageFieldSet = true; + } + if (("RequiredVersion" == name)) + { + this.requiredVersionField = value; + this.requiredVersionFieldSet = true; + } + } + } + + /// + /// Declares a merge module with which this merge module is incompatible. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Exclusion : ISchemaElement, ISetAttributes + { + + private string excludedIdField; + + private bool excludedIdFieldSet; + + private int excludeExceptLanguageField; + + private bool excludeExceptLanguageFieldSet; + + private int excludeLanguageField; + + private bool excludeLanguageFieldSet; + + private string excludedMinVersionField; + + private bool excludedMinVersionFieldSet; + + private string excludedMaxVersionField; + + private bool excludedMaxVersionFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier of the merge module that is incompatible. + /// + public string ExcludedId + { + get + { + return this.excludedIdField; + } + set + { + this.excludedIdFieldSet = true; + this.excludedIdField = value; + } + } + + /// + /// 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. + /// + public int ExcludeExceptLanguage + { + get + { + return this.excludeExceptLanguageField; + } + set + { + this.excludeExceptLanguageFieldSet = true; + this.excludeExceptLanguageField = value; + } + } + + /// + /// Numeric language ID of the merge module in ExcludedID. The specified language will be excluded. Only one of ExcludeExceptLanguage and ExcludeLanguage may be specified. + /// + public int ExcludeLanguage + { + get + { + return this.excludeLanguageField; + } + set + { + this.excludeLanguageFieldSet = true; + this.excludeLanguageField = value; + } + } + + /// + /// 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. + /// + public string ExcludedMinVersion + { + get + { + return this.excludedMinVersionField; + } + set + { + this.excludedMinVersionFieldSet = true; + this.excludedMinVersionField = value; + } + } + + /// + /// 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. + /// + public string ExcludedMaxVersion + { + get + { + return this.excludedMaxVersionField; + } + set + { + this.excludedMaxVersionFieldSet = true; + this.excludedMaxVersionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Exclusion", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.excludedIdFieldSet) + { + writer.WriteAttributeString("ExcludedId", this.excludedIdField); + } + if (this.excludeExceptLanguageFieldSet) + { + writer.WriteAttributeString("ExcludeExceptLanguage", this.excludeExceptLanguageField.ToString(CultureInfo.InvariantCulture)); + } + if (this.excludeLanguageFieldSet) + { + writer.WriteAttributeString("ExcludeLanguage", this.excludeLanguageField.ToString(CultureInfo.InvariantCulture)); + } + if (this.excludedMinVersionFieldSet) + { + writer.WriteAttributeString("ExcludedMinVersion", this.excludedMinVersionField); + } + if (this.excludedMaxVersionFieldSet) + { + writer.WriteAttributeString("ExcludedMaxVersion", this.excludedMaxVersionField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("ExcludedId" == name)) + { + this.excludedIdField = value; + this.excludedIdFieldSet = true; + } + if (("ExcludeExceptLanguage" == name)) + { + this.excludeExceptLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.excludeExceptLanguageFieldSet = true; + } + if (("ExcludeLanguage" == name)) + { + this.excludeLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.excludeLanguageFieldSet = true; + } + if (("ExcludedMinVersion" == name)) + { + this.excludedMinVersionField = value; + this.excludedMinVersionFieldSet = true; + } + if (("ExcludedMaxVersion" == name)) + { + this.excludedMaxVersionField = value; + this.excludedMaxVersionFieldSet = true; + } + } + } + + /// + /// Defines the configurable attributes of merge module. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Configuration : ISchemaElement, ISetAttributes + { + + private string nameField; + + private bool nameFieldSet; + + private FormatType formatField; + + private bool formatFieldSet; + + private string typeField; + + private bool typeFieldSet; + + private string contextDataField; + + private bool contextDataFieldSet; + + private string defaultValueField; + + private bool defaultValueFieldSet; + + private YesNoType keyNoOrphanField; + + private bool keyNoOrphanFieldSet; + + private YesNoType nonNullableField; + + private bool nonNullableFieldSet; + + private string displayNameField; + + private bool displayNameFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string helpLocationField; + + private bool helpLocationFieldSet; + + private string helpKeywordField; + + private bool helpKeywordFieldSet; + + private ISchemaElement parentElement; + + /// + /// Defines the name of the configurable item. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Specifies the format of the data being changed. + /// + public FormatType Format + { + get + { + return this.formatField; + } + set + { + this.formatFieldSet = true; + this.formatField = value; + } + } + + /// + /// Specifies the type of the data being changed. + /// + public string Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + /// + /// Specifies a semantic context for the requested data. + /// + public string ContextData + { + get + { + return this.contextDataField; + } + set + { + this.contextDataFieldSet = true; + this.contextDataField = value; + } + } + + /// + /// Specifies a default value for the item in this record if the merge tool declines to provide a value. + /// + public string DefaultValue + { + get + { + return this.defaultValueField; + } + set + { + this.defaultValueFieldSet = true; + this.defaultValueField = value; + } + } + + /// + /// Does not merge rule according to rules in MSI SDK. + /// + public YesNoType KeyNoOrphan + { + get + { + return this.keyNoOrphanField; + } + set + { + this.keyNoOrphanFieldSet = true; + this.keyNoOrphanField = value; + } + } + + /// + /// If yes, null is not a valid entry. + /// + public YesNoType NonNullable + { + get + { + return this.nonNullableField; + } + set + { + this.nonNullableFieldSet = true; + this.nonNullableField = value; + } + } + + /// + /// Display name for authoring. + /// + public string DisplayName + { + get + { + return this.displayNameField; + } + set + { + this.displayNameFieldSet = true; + this.displayNameField = value; + } + } + + /// + /// Description for authoring. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Location of chm file for authoring. + /// + public string HelpLocation + { + get + { + return this.helpLocationField; + } + set + { + this.helpLocationFieldSet = true; + this.helpLocationField = value; + } + } + + /// + /// Keyword into chm file for authoring. + /// + public string HelpKeyword + { + get + { + return this.helpKeywordField; + } + set + { + this.helpKeywordFieldSet = true; + this.helpKeywordField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a FormatType from a string. + /// + public static FormatType ParseFormatType(string value) + { + FormatType parsedValue; + Configuration.TryParseFormatType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a FormatType from a string. + /// + public static bool TryParseFormatType(string value, out FormatType parsedValue) + { + parsedValue = FormatType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("Text" == value)) + { + parsedValue = FormatType.Text; + } + else + { + if (("Key" == value)) + { + parsedValue = FormatType.Key; + } + else + { + if (("Integer" == value)) + { + parsedValue = FormatType.Integer; + } + else + { + if (("Bitfield" == value)) + { + parsedValue = FormatType.Bitfield; + } + else + { + parsedValue = FormatType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Configuration", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.formatFieldSet) + { + if ((this.formatField == FormatType.Text)) + { + writer.WriteAttributeString("Format", "Text"); + } + if ((this.formatField == FormatType.Key)) + { + writer.WriteAttributeString("Format", "Key"); + } + if ((this.formatField == FormatType.Integer)) + { + writer.WriteAttributeString("Format", "Integer"); + } + if ((this.formatField == FormatType.Bitfield)) + { + writer.WriteAttributeString("Format", "Bitfield"); + } + } + if (this.typeFieldSet) + { + writer.WriteAttributeString("Type", this.typeField); + } + if (this.contextDataFieldSet) + { + writer.WriteAttributeString("ContextData", this.contextDataField); + } + if (this.defaultValueFieldSet) + { + writer.WriteAttributeString("DefaultValue", this.defaultValueField); + } + if (this.keyNoOrphanFieldSet) + { + if ((this.keyNoOrphanField == YesNoType.no)) + { + writer.WriteAttributeString("KeyNoOrphan", "no"); + } + if ((this.keyNoOrphanField == YesNoType.yes)) + { + writer.WriteAttributeString("KeyNoOrphan", "yes"); + } + } + if (this.nonNullableFieldSet) + { + if ((this.nonNullableField == YesNoType.no)) + { + writer.WriteAttributeString("NonNullable", "no"); + } + if ((this.nonNullableField == YesNoType.yes)) + { + writer.WriteAttributeString("NonNullable", "yes"); + } + } + if (this.displayNameFieldSet) + { + writer.WriteAttributeString("DisplayName", this.displayNameField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.helpLocationFieldSet) + { + writer.WriteAttributeString("HelpLocation", this.helpLocationField); + } + if (this.helpKeywordFieldSet) + { + writer.WriteAttributeString("HelpKeyword", this.helpKeywordField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Format" == name)) + { + this.formatField = Configuration.ParseFormatType(value); + this.formatFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = value; + this.typeFieldSet = true; + } + if (("ContextData" == name)) + { + this.contextDataField = value; + this.contextDataFieldSet = true; + } + if (("DefaultValue" == name)) + { + this.defaultValueField = value; + this.defaultValueFieldSet = true; + } + if (("KeyNoOrphan" == name)) + { + this.keyNoOrphanField = Enums.ParseYesNoType(value); + this.keyNoOrphanFieldSet = true; + } + if (("NonNullable" == name)) + { + this.nonNullableField = Enums.ParseYesNoType(value); + this.nonNullableFieldSet = true; + } + if (("DisplayName" == name)) + { + this.displayNameField = value; + this.displayNameFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("HelpLocation" == name)) + { + this.helpLocationField = value; + this.helpLocationFieldSet = true; + } + if (("HelpKeyword" == name)) + { + this.helpKeywordField = value; + this.helpKeywordFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum FormatType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + Text, + + Key, + + Integer, + + Bitfield, + } + } + + /// + /// Specifies the configurable fields of a module database and provides a template for the configuration of each field. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Substitution : ISchemaElement, ISetAttributes + { + + private string tableField; + + private bool tableFieldSet; + + private string rowField; + + private bool rowFieldSet; + + private string columnField; + + private bool columnFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + /// + /// Specifies the name of the table being modified in the module database. + /// + public string Table + { + get + { + return this.tableField; + } + set + { + this.tableFieldSet = true; + this.tableField = value; + } + } + + /// + /// Specifies the primary keys of the target row in the table named in the Table column. If multiple keys, separated by semicolons. + /// + public string Row + { + get + { + return this.rowField; + } + set + { + this.rowFieldSet = true; + this.rowField = value; + } + } + + /// + /// Specifies the target column in the row named in the Row column. + /// + public string Column + { + get + { + return this.columnField; + } + set + { + this.columnFieldSet = true; + this.columnField = value; + } + } + + /// + /// Provides a formatting template for the data being substituted into the target field specified by Table, Row, and Column. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Substitution", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.tableFieldSet) + { + writer.WriteAttributeString("Table", this.tableField); + } + if (this.rowFieldSet) + { + writer.WriteAttributeString("Row", this.rowField); + } + if (this.columnFieldSet) + { + writer.WriteAttributeString("Column", this.columnField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Table" == name)) + { + this.tableField = value; + this.tableFieldSet = true; + } + if (("Row" == name)) + { + this.rowField = value; + this.rowFieldSet = true; + } + if (("Column" == name)) + { + this.columnField = value; + this.columnFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + } + + /// + /// Specifies a table from the merge module that is not merged into an .msi file. + /// If the table already exists in an .msi file, it is not modified by the merge. + /// The specified table can therefore contain data that is unneeded after the merge. + /// To minimize the size of the .msm file, it is recommended that developers remove + /// unused tables from modules intended for redistribution rather than creating + /// IgnoreTable elements for those tables. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class IgnoreTable : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The name of the table in the merge module that is not to be merged into the .msi file. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("IgnoreTable", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// The Fragment element is the building block of creating an installer database in WiX. Once defined, + /// the Fragment becomes an immutable, atomic unit which can either be completely included or excluded + /// from a product. The contents of a Fragment element can be linked into a product by utilizing one + /// of the many *Ref elements. When linking in a Fragment, it will be necessary to link in all of its + /// individual units. For instance, if a given Fragment contains two Component elements, you must link + /// both under features using ComponentRef for each linked Component. Otherwise, you will get a linker + /// warning and have a floating Component that does not appear under any Feature. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Fragment : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public Fragment() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Binary))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplication))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplicationRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComplianceCheck))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroup))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Container))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroup))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Icon))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreModularization))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Media))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MediaTemplate))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroup))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageCertificates))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCertificates))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroup))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroup))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RelatedBundle))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UI))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Upgrade))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Variable))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable))); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence))); + childCollection0.AddCollection(childCollection1); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Optional identifier for a Fragment. Should only be set by advanced users to tag sections. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("AppId" == childName)) + { + childValue = new AppId(); + } + if (("Binary" == childName)) + { + childValue = new Binary(); + } + if (("BootstrapperApplication" == childName)) + { + childValue = new BootstrapperApplication(); + } + if (("BootstrapperApplicationRef" == childName)) + { + childValue = new BootstrapperApplicationRef(); + } + if (("ComplianceCheck" == childName)) + { + childValue = new ComplianceCheck(); + } + if (("Component" == childName)) + { + childValue = new Component(); + } + if (("ComponentGroup" == childName)) + { + childValue = new ComponentGroup(); + } + if (("Condition" == childName)) + { + childValue = new Condition(); + } + if (("Container" == childName)) + { + childValue = new Container(); + } + if (("CustomAction" == childName)) + { + childValue = new CustomAction(); + } + if (("CustomActionRef" == childName)) + { + childValue = new CustomActionRef(); + } + if (("CustomTable" == childName)) + { + childValue = new CustomTable(); + } + if (("Directory" == childName)) + { + childValue = new Directory(); + } + if (("DirectoryRef" == childName)) + { + childValue = new DirectoryRef(); + } + if (("EmbeddedChainer" == childName)) + { + childValue = new EmbeddedChainer(); + } + if (("EmbeddedChainerRef" == childName)) + { + childValue = new EmbeddedChainerRef(); + } + if (("EnsureTable" == childName)) + { + childValue = new EnsureTable(); + } + if (("Feature" == childName)) + { + childValue = new Feature(); + } + if (("FeatureGroup" == childName)) + { + childValue = new FeatureGroup(); + } + if (("FeatureRef" == childName)) + { + childValue = new FeatureRef(); + } + if (("Icon" == childName)) + { + childValue = new Icon(); + } + if (("IgnoreModularization" == childName)) + { + childValue = new IgnoreModularization(); + } + if (("Media" == childName)) + { + childValue = new Media(); + } + if (("MediaTemplate" == childName)) + { + childValue = new MediaTemplate(); + } + if (("PackageGroup" == childName)) + { + childValue = new PackageGroup(); + } + if (("PackageCertificates" == childName)) + { + childValue = new PackageCertificates(); + } + if (("PatchCertificates" == childName)) + { + childValue = new PatchCertificates(); + } + if (("PatchFamily" == childName)) + { + childValue = new PatchFamily(); + } + if (("PatchFamilyGroup" == childName)) + { + childValue = new PatchFamilyGroup(); + } + if (("PayloadGroup" == childName)) + { + childValue = new PayloadGroup(); + } + if (("Property" == childName)) + { + childValue = new Property(); + } + if (("PropertyRef" == childName)) + { + childValue = new PropertyRef(); + } + if (("RelatedBundle" == childName)) + { + childValue = new RelatedBundle(); + } + if (("SetDirectory" == childName)) + { + childValue = new SetDirectory(); + } + if (("SetProperty" == childName)) + { + childValue = new SetProperty(); + } + if (("SFPCatalog" == childName)) + { + childValue = new SFPCatalog(); + } + if (("UI" == childName)) + { + childValue = new UI(); + } + if (("UIRef" == childName)) + { + childValue = new UIRef(); + } + if (("Upgrade" == childName)) + { + childValue = new Upgrade(); + } + if (("Variable" == childName)) + { + childValue = new Variable(); + } + if (("WixVariable" == childName)) + { + childValue = new WixVariable(); + } + if (("InstallExecuteSequence" == childName)) + { + childValue = new InstallExecuteSequence(); + } + if (("InstallUISequence" == childName)) + { + childValue = new InstallUISequence(); + } + if (("AdminExecuteSequence" == childName)) + { + childValue = new AdminExecuteSequence(); + } + if (("AdminUISequence" == childName)) + { + childValue = new AdminUISequence(); + } + if (("AdvertiseExecuteSequence" == childName)) + { + childValue = new AdvertiseExecuteSequence(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Fragment", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// The Patch element is analogous to the main function in a C program. When linking, only one Patch section + /// can be given to the linker to produce a successful result. Using this element creates an MSP file. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Patch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string codepageField; + + private bool codepageFieldSet; + + private YesNoType allowRemovalField; + + private bool allowRemovalFieldSet; + + private string classificationField; + + private bool classificationFieldSet; + + private string clientPatchIdField; + + private bool clientPatchIdFieldSet; + + private YesNoType apiPatchingSymbolNoImagehlpFlagField; + + private bool apiPatchingSymbolNoImagehlpFlagFieldSet; + + private YesNoType apiPatchingSymbolNoFailuresFlagField; + + private bool apiPatchingSymbolNoFailuresFlagFieldSet; + + private YesNoType apiPatchingSymbolUndecoratedTooFlagField; + + private bool apiPatchingSymbolUndecoratedTooFlagFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string displayNameField; + + private bool displayNameFieldSet; + + private string commentsField; + + private bool commentsFieldSet; + + private string manufacturerField; + + private bool manufacturerFieldSet; + + private YesNoType minorUpdateTargetRTMField; + + private bool minorUpdateTargetRTMFieldSet; + + private string moreInfoURLField; + + private bool moreInfoURLFieldSet; + + private YesNoType optimizedInstallModeField; + + private bool optimizedInstallModeFieldSet; + + private string targetProductNameField; + + private bool targetProductNameFieldSet; + + private YesNoType optimizePatchSizeForLargeFilesField; + + private bool optimizePatchSizeForLargeFilesFieldSet; + + private ISchemaElement parentElement; + + public Patch() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchInformation))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Media))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(OptimizeCustomActions))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroup))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroupRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchProperty))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCodes))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Patch code for this patch. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The code page integer value or web name for the resulting MSP. See remarks for more information. + /// + public string Codepage + { + get + { + return this.codepageField; + } + set + { + this.codepageFieldSet = true; + this.codepageField = value; + } + } + + /// + /// Whether this is an uninstallable patch. + /// + public YesNoType AllowRemoval + { + get + { + return this.allowRemovalField; + } + set + { + this.allowRemovalFieldSet = true; + this.allowRemovalField = value; + } + } + + /// + /// Category of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup. + /// + public string Classification + { + get + { + return this.classificationField; + } + set + { + this.classificationFieldSet = true; + this.classificationField = value; + } + } + + /// + /// An easily referenced identity unique to a patch that can be used in product authoring. See remarks for more information. + /// + public string ClientPatchId + { + get + { + return this.clientPatchIdField; + } + set + { + this.clientPatchIdFieldSet = true; + this.clientPatchIdField = value; + } + } + + /// + /// Flag used when creating a binary file patch. Default is "no". Don't use imagehlp.dll. + /// + public YesNoType ApiPatchingSymbolNoImagehlpFlag + { + get + { + return this.apiPatchingSymbolNoImagehlpFlagField; + } + set + { + this.apiPatchingSymbolNoImagehlpFlagFieldSet = true; + this.apiPatchingSymbolNoImagehlpFlagField = value; + } + } + + /// + /// Flag used when creating a binary file patch. Default is "no". Don't fail patch due to imagehlp failures. + /// + public YesNoType ApiPatchingSymbolNoFailuresFlag + { + get + { + return this.apiPatchingSymbolNoFailuresFlagField; + } + set + { + this.apiPatchingSymbolNoFailuresFlagFieldSet = true; + this.apiPatchingSymbolNoFailuresFlagField = value; + } + } + + /// + /// Flag used when creating a binary file patch. Default is "no". After matching decorated symbols, try to match remaining by undecorated names. + /// + public YesNoType ApiPatchingSymbolUndecoratedTooFlag + { + get + { + return this.apiPatchingSymbolUndecoratedTooFlagField; + } + set + { + this.apiPatchingSymbolUndecoratedTooFlagFieldSet = true; + this.apiPatchingSymbolUndecoratedTooFlagField = value; + } + } + + /// + /// Description of the patch. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on. + /// + public string DisplayName + { + get + { + return this.displayNameField; + } + set + { + this.displayNameFieldSet = true; + this.displayNameField = value; + } + } + + /// + /// Optional comments for browsing. + /// + public string Comments + { + get + { + return this.commentsField; + } + set + { + this.commentsFieldSet = true; + this.commentsField = value; + } + } + + /// + /// Vendor releasing the package + /// + public string Manufacturer + { + get + { + return this.manufacturerField; + } + set + { + this.manufacturerFieldSet = true; + this.manufacturerField = value; + } + } + + /// + /// Indicates that the patch targets the RTM version of the product or the most recent major + /// upgrade patch. Author this optional property in minor update patches that contain sequencing + /// information to indicate that the patch removes all patches up to the RTM version of the + /// product, or up to the most recent major upgrade patch. This property is available beginning + /// with Windows Installer 3.1. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public YesNoType MinorUpdateTargetRTM + { + get + { + return this.minorUpdateTargetRTMField; + } + set + { + this.minorUpdateTargetRTMFieldSet = true; + this.minorUpdateTargetRTMField = value; + } + } + + /// + /// A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public string MoreInfoURL + { + get + { + return this.moreInfoURLField; + } + set + { + this.moreInfoURLFieldSet = true; + this.moreInfoURLField = value; + } + } + + /// + /// If this attribute is set to 'yes' in all the patches to be applied in a transaction, the + /// application of the patch is optimized if possible. Available beginning with Windows Installer 3.1. + /// + public YesNoType OptimizedInstallMode + { + get + { + return this.optimizedInstallModeField; + } + set + { + this.optimizedInstallModeFieldSet = true; + this.optimizedInstallModeField = value; + } + } + + /// + /// Name of the application or target product suite. + /// + public string TargetProductName + { + get + { + return this.targetProductNameField; + } + set + { + this.targetProductNameFieldSet = true; + this.targetProductNameField = value; + } + } + + /// + /// When this attribute is set, patches for files greater than approximately 4 MB in size may be made smaller. + /// + public YesNoType OptimizePatchSizeForLargeFiles + { + get + { + return this.optimizePatchSizeForLargeFilesField; + } + set + { + this.optimizePatchSizeForLargeFilesFieldSet = true; + this.optimizePatchSizeForLargeFilesField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("PatchInformation" == childName)) + { + childValue = new PatchInformation(); + } + if (("Media" == childName)) + { + childValue = new Media(); + } + if (("OptimizeCustomActions" == childName)) + { + childValue = new OptimizeCustomActions(); + } + if (("PatchFamily" == childName)) + { + childValue = new PatchFamily(); + } + if (("PatchFamilyRef" == childName)) + { + childValue = new PatchFamilyRef(); + } + if (("PatchFamilyGroup" == childName)) + { + childValue = new PatchFamilyGroup(); + } + if (("PatchFamilyGroupRef" == childName)) + { + childValue = new PatchFamilyGroupRef(); + } + if (("PatchProperty" == childName)) + { + childValue = new PatchProperty(); + } + if (("TargetProductCodes" == childName)) + { + childValue = new TargetProductCodes(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Patch", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.codepageFieldSet) + { + writer.WriteAttributeString("Codepage", this.codepageField); + } + if (this.allowRemovalFieldSet) + { + if ((this.allowRemovalField == YesNoType.no)) + { + writer.WriteAttributeString("AllowRemoval", "no"); + } + if ((this.allowRemovalField == YesNoType.yes)) + { + writer.WriteAttributeString("AllowRemoval", "yes"); + } + } + if (this.classificationFieldSet) + { + writer.WriteAttributeString("Classification", this.classificationField); + } + if (this.clientPatchIdFieldSet) + { + writer.WriteAttributeString("ClientPatchId", this.clientPatchIdField); + } + if (this.apiPatchingSymbolNoImagehlpFlagFieldSet) + { + if ((this.apiPatchingSymbolNoImagehlpFlagField == YesNoType.no)) + { + writer.WriteAttributeString("ApiPatchingSymbolNoImagehlpFlag", "no"); + } + if ((this.apiPatchingSymbolNoImagehlpFlagField == YesNoType.yes)) + { + writer.WriteAttributeString("ApiPatchingSymbolNoImagehlpFlag", "yes"); + } + } + if (this.apiPatchingSymbolNoFailuresFlagFieldSet) + { + if ((this.apiPatchingSymbolNoFailuresFlagField == YesNoType.no)) + { + writer.WriteAttributeString("ApiPatchingSymbolNoFailuresFlag", "no"); + } + if ((this.apiPatchingSymbolNoFailuresFlagField == YesNoType.yes)) + { + writer.WriteAttributeString("ApiPatchingSymbolNoFailuresFlag", "yes"); + } + } + if (this.apiPatchingSymbolUndecoratedTooFlagFieldSet) + { + if ((this.apiPatchingSymbolUndecoratedTooFlagField == YesNoType.no)) + { + writer.WriteAttributeString("ApiPatchingSymbolUndecoratedTooFlag", "no"); + } + if ((this.apiPatchingSymbolUndecoratedTooFlagField == YesNoType.yes)) + { + writer.WriteAttributeString("ApiPatchingSymbolUndecoratedTooFlag", "yes"); + } + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.displayNameFieldSet) + { + writer.WriteAttributeString("DisplayName", this.displayNameField); + } + if (this.commentsFieldSet) + { + writer.WriteAttributeString("Comments", this.commentsField); + } + if (this.manufacturerFieldSet) + { + writer.WriteAttributeString("Manufacturer", this.manufacturerField); + } + if (this.minorUpdateTargetRTMFieldSet) + { + if ((this.minorUpdateTargetRTMField == YesNoType.no)) + { + writer.WriteAttributeString("MinorUpdateTargetRTM", "no"); + } + if ((this.minorUpdateTargetRTMField == YesNoType.yes)) + { + writer.WriteAttributeString("MinorUpdateTargetRTM", "yes"); + } + } + if (this.moreInfoURLFieldSet) + { + writer.WriteAttributeString("MoreInfoURL", this.moreInfoURLField); + } + if (this.optimizedInstallModeFieldSet) + { + if ((this.optimizedInstallModeField == YesNoType.no)) + { + writer.WriteAttributeString("OptimizedInstallMode", "no"); + } + if ((this.optimizedInstallModeField == YesNoType.yes)) + { + writer.WriteAttributeString("OptimizedInstallMode", "yes"); + } + } + if (this.targetProductNameFieldSet) + { + writer.WriteAttributeString("TargetProductName", this.targetProductNameField); + } + if (this.optimizePatchSizeForLargeFilesFieldSet) + { + if ((this.optimizePatchSizeForLargeFilesField == YesNoType.no)) + { + writer.WriteAttributeString("OptimizePatchSizeForLargeFiles", "no"); + } + if ((this.optimizePatchSizeForLargeFilesField == YesNoType.yes)) + { + writer.WriteAttributeString("OptimizePatchSizeForLargeFiles", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Codepage" == name)) + { + this.codepageField = value; + this.codepageFieldSet = true; + } + if (("AllowRemoval" == name)) + { + this.allowRemovalField = Enums.ParseYesNoType(value); + this.allowRemovalFieldSet = true; + } + if (("Classification" == name)) + { + this.classificationField = value; + this.classificationFieldSet = true; + } + if (("ClientPatchId" == name)) + { + this.clientPatchIdField = value; + this.clientPatchIdFieldSet = true; + } + if (("ApiPatchingSymbolNoImagehlpFlag" == name)) + { + this.apiPatchingSymbolNoImagehlpFlagField = Enums.ParseYesNoType(value); + this.apiPatchingSymbolNoImagehlpFlagFieldSet = true; + } + if (("ApiPatchingSymbolNoFailuresFlag" == name)) + { + this.apiPatchingSymbolNoFailuresFlagField = Enums.ParseYesNoType(value); + this.apiPatchingSymbolNoFailuresFlagFieldSet = true; + } + if (("ApiPatchingSymbolUndecoratedTooFlag" == name)) + { + this.apiPatchingSymbolUndecoratedTooFlagField = Enums.ParseYesNoType(value); + this.apiPatchingSymbolUndecoratedTooFlagFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("DisplayName" == name)) + { + this.displayNameField = value; + this.displayNameFieldSet = true; + } + if (("Comments" == name)) + { + this.commentsField = value; + this.commentsFieldSet = true; + } + if (("Manufacturer" == name)) + { + this.manufacturerField = value; + this.manufacturerFieldSet = true; + } + if (("MinorUpdateTargetRTM" == name)) + { + this.minorUpdateTargetRTMField = Enums.ParseYesNoType(value); + this.minorUpdateTargetRTMFieldSet = true; + } + if (("MoreInfoURL" == name)) + { + this.moreInfoURLField = value; + this.moreInfoURLFieldSet = true; + } + if (("OptimizedInstallMode" == name)) + { + this.optimizedInstallModeField = Enums.ParseYesNoType(value); + this.optimizedInstallModeFieldSet = true; + } + if (("TargetProductName" == name)) + { + this.targetProductNameField = value; + this.targetProductNameFieldSet = true; + } + if (("OptimizePatchSizeForLargeFiles" == name)) + { + this.optimizePatchSizeForLargeFilesField = Enums.ParseYesNoType(value); + this.optimizePatchSizeForLargeFilesFieldSet = true; + } + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Validate : ISchemaElement, ISetAttributes + { + + private YesNoType productIdField; + + private bool productIdFieldSet; + + private YesNoType productLanguageField; + + private bool productLanguageFieldSet; + + private ProductVersionType productVersionField; + + private bool productVersionFieldSet; + + private ProductVersionOperatorType productVersionOperatorField; + + private bool productVersionOperatorFieldSet; + + private YesNoType upgradeCodeField; + + private bool upgradeCodeFieldSet; + + private YesNoType ignoreAddExistingRowField; + + private bool ignoreAddExistingRowFieldSet; + + private YesNoType ignoreAddExistingTableField; + + private bool ignoreAddExistingTableFieldSet; + + private YesNoType ignoreDeleteMissingRowField; + + private bool ignoreDeleteMissingRowFieldSet; + + private YesNoType ignoreDeleteMissingTableField; + + private bool ignoreDeleteMissingTableFieldSet; + + private YesNoType ignoreUpdateMissingRowField; + + private bool ignoreUpdateMissingRowFieldSet; + + private YesNoType ignoreChangingCodePageField; + + private bool ignoreChangingCodePageFieldSet; + + private ISchemaElement parentElement; + + /// + /// Requires that the installed ProductCode match the target ProductCode used to create the transform. The default is 'yes'. + /// + public YesNoType ProductId + { + get + { + return this.productIdField; + } + set + { + this.productIdFieldSet = true; + this.productIdField = value; + } + } + + /// + /// Requires that the installed ProductLanguage match the target ProductLanguage used to create the transform. The default is 'no'. + /// + public YesNoType ProductLanguage + { + get + { + return this.productLanguageField; + } + set + { + this.productLanguageFieldSet = true; + this.productLanguageField = value; + } + } + + /// + /// Determines how many fields of the installed ProductVersion to compare. See remarks for more information. The default is 'Update'. + /// + public ProductVersionType ProductVersion + { + get + { + return this.productVersionField; + } + set + { + this.productVersionFieldSet = true; + this.productVersionField = value; + } + } + + /// + /// 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'. + /// + public ProductVersionOperatorType ProductVersionOperator + { + get + { + return this.productVersionOperatorField; + } + set + { + this.productVersionOperatorFieldSet = true; + this.productVersionOperatorField = value; + } + } + + /// + /// Requires that the installed UpgradeCode match the target UpgradeCode used to create the transform. The default is 'yes'. + /// + public YesNoType UpgradeCode + { + get + { + return this.upgradeCodeField; + } + set + { + this.upgradeCodeFieldSet = true; + this.upgradeCodeField = value; + } + } + + /// + /// Ignore errors when adding existing rows. The default is 'yes'. + /// + public YesNoType IgnoreAddExistingRow + { + get + { + return this.ignoreAddExistingRowField; + } + set + { + this.ignoreAddExistingRowFieldSet = true; + this.ignoreAddExistingRowField = value; + } + } + + /// + /// Ignore errors when adding existing tables. The default is 'yes'. + /// + public YesNoType IgnoreAddExistingTable + { + get + { + return this.ignoreAddExistingTableField; + } + set + { + this.ignoreAddExistingTableFieldSet = true; + this.ignoreAddExistingTableField = value; + } + } + + /// + /// Ignore errors when deleting missing rows. The default is 'yes'. + /// + public YesNoType IgnoreDeleteMissingRow + { + get + { + return this.ignoreDeleteMissingRowField; + } + set + { + this.ignoreDeleteMissingRowFieldSet = true; + this.ignoreDeleteMissingRowField = value; + } + } + + /// + /// Ignore errors when deleting missing tables. The default is 'yes'. + /// + public YesNoType IgnoreDeleteMissingTable + { + get + { + return this.ignoreDeleteMissingTableField; + } + set + { + this.ignoreDeleteMissingTableFieldSet = true; + this.ignoreDeleteMissingTableField = value; + } + } + + /// + /// Ignore errors when updating missing rows. The default is 'yes'. + /// + public YesNoType IgnoreUpdateMissingRow + { + get + { + return this.ignoreUpdateMissingRowField; + } + set + { + this.ignoreUpdateMissingRowFieldSet = true; + this.ignoreUpdateMissingRowField = value; + } + } + + /// + /// Ignore errors when changing the database code page. The default is 'no'. + /// + public YesNoType IgnoreChangingCodePage + { + get + { + return this.ignoreChangingCodePageField; + } + set + { + this.ignoreChangingCodePageFieldSet = true; + this.ignoreChangingCodePageField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ProductVersionType from a string. + /// + public static ProductVersionType ParseProductVersionType(string value) + { + ProductVersionType parsedValue; + Validate.TryParseProductVersionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ProductVersionType from a string. + /// + public static bool TryParseProductVersionType(string value, out ProductVersionType parsedValue) + { + parsedValue = ProductVersionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("Major" == value)) + { + parsedValue = ProductVersionType.Major; + } + else + { + if (("Minor" == value)) + { + parsedValue = ProductVersionType.Minor; + } + else + { + if (("Update" == value)) + { + parsedValue = ProductVersionType.Update; + } + else + { + parsedValue = ProductVersionType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a ProductVersionOperatorType from a string. + /// + public static ProductVersionOperatorType ParseProductVersionOperatorType(string value) + { + ProductVersionOperatorType parsedValue; + Validate.TryParseProductVersionOperatorType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ProductVersionOperatorType from a string. + /// + public static bool TryParseProductVersionOperatorType(string value, out ProductVersionOperatorType parsedValue) + { + parsedValue = ProductVersionOperatorType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("Lesser" == value)) + { + parsedValue = ProductVersionOperatorType.Lesser; + } + else + { + if (("LesserOrEqual" == value)) + { + parsedValue = ProductVersionOperatorType.LesserOrEqual; + } + else + { + if (("Equal" == value)) + { + parsedValue = ProductVersionOperatorType.Equal; + } + else + { + if (("GreaterOrEqual" == value)) + { + parsedValue = ProductVersionOperatorType.GreaterOrEqual; + } + else + { + if (("Greater" == value)) + { + parsedValue = ProductVersionOperatorType.Greater; + } + else + { + parsedValue = ProductVersionOperatorType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Validate", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.productIdFieldSet) + { + if ((this.productIdField == YesNoType.no)) + { + writer.WriteAttributeString("ProductId", "no"); + } + if ((this.productIdField == YesNoType.yes)) + { + writer.WriteAttributeString("ProductId", "yes"); + } + } + if (this.productLanguageFieldSet) + { + if ((this.productLanguageField == YesNoType.no)) + { + writer.WriteAttributeString("ProductLanguage", "no"); + } + if ((this.productLanguageField == YesNoType.yes)) + { + writer.WriteAttributeString("ProductLanguage", "yes"); + } + } + if (this.productVersionFieldSet) + { + if ((this.productVersionField == ProductVersionType.Major)) + { + writer.WriteAttributeString("ProductVersion", "Major"); + } + if ((this.productVersionField == ProductVersionType.Minor)) + { + writer.WriteAttributeString("ProductVersion", "Minor"); + } + if ((this.productVersionField == ProductVersionType.Update)) + { + writer.WriteAttributeString("ProductVersion", "Update"); + } + } + if (this.productVersionOperatorFieldSet) + { + if ((this.productVersionOperatorField == ProductVersionOperatorType.Lesser)) + { + writer.WriteAttributeString("ProductVersionOperator", "Lesser"); + } + if ((this.productVersionOperatorField == ProductVersionOperatorType.LesserOrEqual)) + { + writer.WriteAttributeString("ProductVersionOperator", "LesserOrEqual"); + } + if ((this.productVersionOperatorField == ProductVersionOperatorType.Equal)) + { + writer.WriteAttributeString("ProductVersionOperator", "Equal"); + } + if ((this.productVersionOperatorField == ProductVersionOperatorType.GreaterOrEqual)) + { + writer.WriteAttributeString("ProductVersionOperator", "GreaterOrEqual"); + } + if ((this.productVersionOperatorField == ProductVersionOperatorType.Greater)) + { + writer.WriteAttributeString("ProductVersionOperator", "Greater"); + } + } + if (this.upgradeCodeFieldSet) + { + if ((this.upgradeCodeField == YesNoType.no)) + { + writer.WriteAttributeString("UpgradeCode", "no"); + } + if ((this.upgradeCodeField == YesNoType.yes)) + { + writer.WriteAttributeString("UpgradeCode", "yes"); + } + } + if (this.ignoreAddExistingRowFieldSet) + { + if ((this.ignoreAddExistingRowField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreAddExistingRow", "no"); + } + if ((this.ignoreAddExistingRowField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreAddExistingRow", "yes"); + } + } + if (this.ignoreAddExistingTableFieldSet) + { + if ((this.ignoreAddExistingTableField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreAddExistingTable", "no"); + } + if ((this.ignoreAddExistingTableField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreAddExistingTable", "yes"); + } + } + if (this.ignoreDeleteMissingRowFieldSet) + { + if ((this.ignoreDeleteMissingRowField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreDeleteMissingRow", "no"); + } + if ((this.ignoreDeleteMissingRowField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreDeleteMissingRow", "yes"); + } + } + if (this.ignoreDeleteMissingTableFieldSet) + { + if ((this.ignoreDeleteMissingTableField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreDeleteMissingTable", "no"); + } + if ((this.ignoreDeleteMissingTableField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreDeleteMissingTable", "yes"); + } + } + if (this.ignoreUpdateMissingRowFieldSet) + { + if ((this.ignoreUpdateMissingRowField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreUpdateMissingRow", "no"); + } + if ((this.ignoreUpdateMissingRowField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreUpdateMissingRow", "yes"); + } + } + if (this.ignoreChangingCodePageFieldSet) + { + if ((this.ignoreChangingCodePageField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreChangingCodePage", "no"); + } + if ((this.ignoreChangingCodePageField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreChangingCodePage", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("ProductId" == name)) + { + this.productIdField = Enums.ParseYesNoType(value); + this.productIdFieldSet = true; + } + if (("ProductLanguage" == name)) + { + this.productLanguageField = Enums.ParseYesNoType(value); + this.productLanguageFieldSet = true; + } + if (("ProductVersion" == name)) + { + this.productVersionField = Validate.ParseProductVersionType(value); + this.productVersionFieldSet = true; + } + if (("ProductVersionOperator" == name)) + { + this.productVersionOperatorField = Validate.ParseProductVersionOperatorType(value); + this.productVersionOperatorFieldSet = true; + } + if (("UpgradeCode" == name)) + { + this.upgradeCodeField = Enums.ParseYesNoType(value); + this.upgradeCodeFieldSet = true; + } + if (("IgnoreAddExistingRow" == name)) + { + this.ignoreAddExistingRowField = Enums.ParseYesNoType(value); + this.ignoreAddExistingRowFieldSet = true; + } + if (("IgnoreAddExistingTable" == name)) + { + this.ignoreAddExistingTableField = Enums.ParseYesNoType(value); + this.ignoreAddExistingTableFieldSet = true; + } + if (("IgnoreDeleteMissingRow" == name)) + { + this.ignoreDeleteMissingRowField = Enums.ParseYesNoType(value); + this.ignoreDeleteMissingRowFieldSet = true; + } + if (("IgnoreDeleteMissingTable" == name)) + { + this.ignoreDeleteMissingTableField = Enums.ParseYesNoType(value); + this.ignoreDeleteMissingTableFieldSet = true; + } + if (("IgnoreUpdateMissingRow" == name)) + { + this.ignoreUpdateMissingRowField = Enums.ParseYesNoType(value); + this.ignoreUpdateMissingRowFieldSet = true; + } + if (("IgnoreChangingCodePage" == name)) + { + this.ignoreChangingCodePageField = Enums.ParseYesNoType(value); + this.ignoreChangingCodePageFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ProductVersionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Checks the major version. + /// + Major, + + /// + /// Checks the major and minor versions. + /// + Minor, + + /// + /// Checks the major, minor, and update versions. + /// + Update, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ProductVersionOperatorType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Installed ProductVersion < target ProductVersion. + /// + Lesser, + + /// + /// Installed ProductVersion <= target ProductVersion. + /// + LesserOrEqual, + + /// + /// Installed ProductVersion = target ProductVersion. + /// + Equal, + + /// + /// Installed ProductVersion >= target ProductVersion. + /// + GreaterOrEqual, + + /// + /// Installed ProductVersion > target ProductVersion. + /// + Greater, + } + } + + /// + /// Indicates whether custom actions can be skipped when applying the patch. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class OptimizeCustomActions : ISchemaElement, ISetAttributes + { + + private YesNoType skipAssignmentField; + + private bool skipAssignmentFieldSet; + + private YesNoType skipImmediateField; + + private bool skipImmediateFieldSet; + + private YesNoType skipDeferredField; + + private bool skipDeferredFieldSet; + + private ISchemaElement parentElement; + + /// + /// Skip property (type 51) and directory (type 35) assignment custom actions. + /// + public YesNoType SkipAssignment + { + get + { + return this.skipAssignmentField; + } + set + { + this.skipAssignmentFieldSet = true; + this.skipAssignmentField = value; + } + } + + /// + /// Skip immediate custom actions that are not property or directory assignment custom actions. + /// + public YesNoType SkipImmediate + { + get + { + return this.skipImmediateField; + } + set + { + this.skipImmediateFieldSet = true; + this.skipImmediateField = value; + } + } + + /// + /// Skip custom actions that run within the script. + /// + public YesNoType SkipDeferred + { + get + { + return this.skipDeferredField; + } + set + { + this.skipDeferredFieldSet = true; + this.skipDeferredField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("OptimizeCustomActions", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.skipAssignmentFieldSet) + { + if ((this.skipAssignmentField == YesNoType.no)) + { + writer.WriteAttributeString("SkipAssignment", "no"); + } + if ((this.skipAssignmentField == YesNoType.yes)) + { + writer.WriteAttributeString("SkipAssignment", "yes"); + } + } + if (this.skipImmediateFieldSet) + { + if ((this.skipImmediateField == YesNoType.no)) + { + writer.WriteAttributeString("SkipImmediate", "no"); + } + if ((this.skipImmediateField == YesNoType.yes)) + { + writer.WriteAttributeString("SkipImmediate", "yes"); + } + } + if (this.skipDeferredFieldSet) + { + if ((this.skipDeferredField == YesNoType.no)) + { + writer.WriteAttributeString("SkipDeferred", "no"); + } + if ((this.skipDeferredField == YesNoType.yes)) + { + writer.WriteAttributeString("SkipDeferred", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("SkipAssignment" == name)) + { + this.skipAssignmentField = Enums.ParseYesNoType(value); + this.skipAssignmentFieldSet = true; + } + if (("SkipImmediate" == name)) + { + this.skipImmediateField = Enums.ParseYesNoType(value); + this.skipImmediateFieldSet = true; + } + if (("SkipDeferred" == name)) + { + this.skipDeferredField = Enums.ParseYesNoType(value); + this.skipDeferredFieldSet = true; + } + } + } + + /// + /// Identifies a set of product versions. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchBaseline : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public PatchBaseline() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Validate))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for a set of product versions. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Validate" == childName)) + { + childValue = new Validate(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchBaseline", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Collection of items that should be kept from the differences between two products. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchFamily : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string productCodeField; + + private bool productCodeFieldSet; + + private string versionField; + + private bool versionFieldSet; + + private YesNoType supersedeField; + + private bool supersedeFieldSet; + + private ISchemaElement parentElement; + + public PatchFamily() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(All))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(BinaryRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificateRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IconRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier which indicates a sequence family to which this patch belongs. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Specifies the ProductCode of the product that this family applies to. + /// + public string ProductCode + { + get + { + return this.productCodeField; + } + set + { + this.productCodeFieldSet = true; + this.productCodeField = value; + } + } + + /// + /// 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. + /// + public string Version + { + get + { + return this.versionField; + } + set + { + this.versionFieldSet = true; + this.versionField = value; + } + } + + /// + /// Set this value to 'yes' to indicate that this patch will supersede all previous patches in this patch family. + /// The default value is 'no'. + /// + public YesNoType Supersede + { + get + { + return this.supersedeField; + } + set + { + this.supersedeFieldSet = true; + this.supersedeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("All" == childName)) + { + childValue = new All(); + } + if (("BinaryRef" == childName)) + { + childValue = new BinaryRef(); + } + if (("ComponentRef" == childName)) + { + childValue = new ComponentRef(); + } + if (("CustomActionRef" == childName)) + { + childValue = new CustomActionRef(); + } + if (("DigitalCertificateRef" == childName)) + { + childValue = new DigitalCertificateRef(); + } + if (("DirectoryRef" == childName)) + { + childValue = new DirectoryRef(); + } + if (("FeatureRef" == childName)) + { + childValue = new FeatureRef(); + } + if (("IconRef" == childName)) + { + childValue = new IconRef(); + } + if (("PropertyRef" == childName)) + { + childValue = new PropertyRef(); + } + if (("UIRef" == childName)) + { + childValue = new UIRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchFamily", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.productCodeFieldSet) + { + writer.WriteAttributeString("ProductCode", this.productCodeField); + } + if (this.versionFieldSet) + { + writer.WriteAttributeString("Version", this.versionField); + } + if (this.supersedeFieldSet) + { + if ((this.supersedeField == YesNoType.no)) + { + writer.WriteAttributeString("Supersede", "no"); + } + if ((this.supersedeField == YesNoType.yes)) + { + writer.WriteAttributeString("Supersede", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("ProductCode" == name)) + { + this.productCodeField = value; + this.productCodeFieldSet = true; + } + if (("Version" == name)) + { + this.versionField = value; + this.versionFieldSet = true; + } + if (("Supersede" == name)) + { + this.supersedeField = Enums.ParseYesNoType(value); + this.supersedeFieldSet = true; + } + } + } + + /// + /// Groups together multiple patch families to be used in other locations. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchFamilyGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public PatchFamilyGroup() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for the PatchFamilyGroup. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("PatchFamily" == childName)) + { + childValue = new PatchFamily(); + } + if (("PatchFamilyRef" == childName)) + { + childValue = new PatchFamilyRef(); + } + if (("PatchFamilyGroupRef" == childName)) + { + childValue = new PatchFamilyGroupRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchFamilyGroup", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Create a reference to a PatchFamilyGroup in another Fragment. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchFamilyGroupRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the PatchFamilyGroup to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchFamilyGroupRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// The PatchCreation element is analogous to the main function in a C program. When linking, only one PatchCreation section + /// can be given to the linker to produce a successful result. Using this element creates a pcp file. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchCreation : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private YesNoType allowMajorVersionMismatchesField; + + private bool allowMajorVersionMismatchesFieldSet; + + private YesNoType allowProductCodeMismatchesField; + + private bool allowProductCodeMismatchesFieldSet; + + private YesNoType cleanWorkingFolderField; + + private bool cleanWorkingFolderFieldSet; + + private string codepageField; + + private bool codepageFieldSet; + + private string outputPathField; + + private bool outputPathFieldSet; + + private string sourceListField; + + private bool sourceListFieldSet; + + private int symbolFlagsField; + + private bool symbolFlagsFieldSet; + + private YesNoType wholeFilesOnlyField; + + private bool wholeFilesOnlyFieldSet; + + private ISchemaElement parentElement; + + public PatchCreation() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PatchInformation))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PatchMetadata))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Family))); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchProperty))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchSequence))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ReplacePatch))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCode))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// PatchCreation identifier; this is the primary key for identifying patches. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Use this to set whether the major versions between the upgrade and target images match. See + /// + public YesNoType AllowMajorVersionMismatches + { + get + { + return this.allowMajorVersionMismatchesField; + } + set + { + this.allowMajorVersionMismatchesFieldSet = true; + this.allowMajorVersionMismatchesField = value; + } + } + + /// + /// Use this to set whether the product code between the upgrade and target images match. See + /// + public YesNoType AllowProductCodeMismatches + { + get + { + return this.allowProductCodeMismatchesField; + } + set + { + this.allowProductCodeMismatchesFieldSet = true; + this.allowProductCodeMismatchesField = value; + } + } + + /// + /// Use this to set whether Patchwiz should clean the temp folder when finished. See + /// + public YesNoType CleanWorkingFolder + { + get + { + return this.cleanWorkingFolderField; + } + set + { + this.cleanWorkingFolderFieldSet = true; + this.cleanWorkingFolderField = value; + } + } + + /// + /// The code page integer value or web name for the resulting PCP. See remarks for more information. + /// + public string Codepage + { + get + { + return this.codepageField; + } + set + { + this.codepageFieldSet = true; + this.codepageField = value; + } + } + + /// + /// The full path, including file name, of the patch package file that is to be generated. See + /// + public string OutputPath + { + get + { + return this.outputPathField; + } + set + { + this.outputPathFieldSet = true; + this.outputPathField = value; + } + } + + /// + /// Used to locate the .msp file for the patch if the cached copy is unavailable. See + /// + public string SourceList + { + get + { + return this.sourceListField; + } + set + { + this.sourceListFieldSet = true; + this.sourceListField = value; + } + } + + /// + /// An 8-digit hex integer representing the combination of patch symbol usage flags to use when creating a binary file patch. See + /// + public int SymbolFlags + { + get + { + return this.symbolFlagsField; + } + set + { + this.symbolFlagsFieldSet = true; + this.symbolFlagsField = value; + } + } + + /// + /// Use this to set whether changing files should be included in their entirety. See + /// + public YesNoType WholeFilesOnly + { + get + { + return this.wholeFilesOnlyField; + } + set + { + this.wholeFilesOnlyFieldSet = true; + this.wholeFilesOnlyField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("PatchInformation" == childName)) + { + childValue = new PatchInformation(); + } + if (("PatchMetadata" == childName)) + { + childValue = new PatchMetadata(); + } + if (("Family" == childName)) + { + childValue = new Family(); + } + if (("PatchProperty" == childName)) + { + childValue = new PatchProperty(); + } + if (("PatchSequence" == childName)) + { + childValue = new PatchSequence(); + } + if (("ReplacePatch" == childName)) + { + childValue = new ReplacePatch(); + } + if (("TargetProductCode" == childName)) + { + childValue = new TargetProductCode(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchCreation", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.allowMajorVersionMismatchesFieldSet) + { + if ((this.allowMajorVersionMismatchesField == YesNoType.no)) + { + writer.WriteAttributeString("AllowMajorVersionMismatches", "no"); + } + if ((this.allowMajorVersionMismatchesField == YesNoType.yes)) + { + writer.WriteAttributeString("AllowMajorVersionMismatches", "yes"); + } + } + if (this.allowProductCodeMismatchesFieldSet) + { + if ((this.allowProductCodeMismatchesField == YesNoType.no)) + { + writer.WriteAttributeString("AllowProductCodeMismatches", "no"); + } + if ((this.allowProductCodeMismatchesField == YesNoType.yes)) + { + writer.WriteAttributeString("AllowProductCodeMismatches", "yes"); + } + } + if (this.cleanWorkingFolderFieldSet) + { + if ((this.cleanWorkingFolderField == YesNoType.no)) + { + writer.WriteAttributeString("CleanWorkingFolder", "no"); + } + if ((this.cleanWorkingFolderField == YesNoType.yes)) + { + writer.WriteAttributeString("CleanWorkingFolder", "yes"); + } + } + if (this.codepageFieldSet) + { + writer.WriteAttributeString("Codepage", this.codepageField); + } + if (this.outputPathFieldSet) + { + writer.WriteAttributeString("OutputPath", this.outputPathField); + } + if (this.sourceListFieldSet) + { + writer.WriteAttributeString("SourceList", this.sourceListField); + } + if (this.symbolFlagsFieldSet) + { + writer.WriteAttributeString("SymbolFlags", this.symbolFlagsField.ToString(CultureInfo.InvariantCulture)); + } + if (this.wholeFilesOnlyFieldSet) + { + if ((this.wholeFilesOnlyField == YesNoType.no)) + { + writer.WriteAttributeString("WholeFilesOnly", "no"); + } + if ((this.wholeFilesOnlyField == YesNoType.yes)) + { + writer.WriteAttributeString("WholeFilesOnly", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("AllowMajorVersionMismatches" == name)) + { + this.allowMajorVersionMismatchesField = Enums.ParseYesNoType(value); + this.allowMajorVersionMismatchesFieldSet = true; + } + if (("AllowProductCodeMismatches" == name)) + { + this.allowProductCodeMismatchesField = Enums.ParseYesNoType(value); + this.allowProductCodeMismatchesFieldSet = true; + } + if (("CleanWorkingFolder" == name)) + { + this.cleanWorkingFolderField = Enums.ParseYesNoType(value); + this.cleanWorkingFolderFieldSet = true; + } + if (("Codepage" == name)) + { + this.codepageField = value; + this.codepageFieldSet = true; + } + if (("OutputPath" == name)) + { + this.outputPathField = value; + this.outputPathFieldSet = true; + } + if (("SourceList" == name)) + { + this.sourceListField = value; + this.sourceListFieldSet = true; + } + if (("SymbolFlags" == name)) + { + this.symbolFlagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.symbolFlagsFieldSet = true; + } + if (("WholeFilesOnly" == name)) + { + this.wholeFilesOnlyField = Enums.ParseYesNoType(value); + this.wholeFilesOnlyFieldSet = true; + } + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchInformation : ISchemaElement, ISetAttributes + { + + private string descriptionField; + + private bool descriptionFieldSet; + + private string platformsField; + + private bool platformsFieldSet; + + private string languagesField; + + private bool languagesFieldSet; + + private string manufacturerField; + + private bool manufacturerFieldSet; + + private string keywordsField; + + private bool keywordsFieldSet; + + private string commentsField; + + private bool commentsFieldSet; + + private YesNoDefaultType readOnlyField; + + private bool readOnlyFieldSet; + + private string summaryCodepageField; + + private bool summaryCodepageFieldSet; + + private YesNoType shortNamesField; + + private bool shortNamesFieldSet; + + private YesNoType compressedField; + + private bool compressedFieldSet; + + private YesNoType adminImageField; + + private bool adminImageFieldSet; + + private ISchemaElement parentElement; + + /// + /// A short description of the patch that includes the name of the product. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + public string Platforms + { + get + { + return this.platformsField; + } + set + { + this.platformsFieldSet = true; + this.platformsField = value; + } + } + + public string Languages + { + get + { + return this.languagesField; + } + set + { + this.languagesFieldSet = true; + this.languagesField = value; + } + } + + /// + /// The name of the manufacturer of the patch package. + /// + public string Manufacturer + { + get + { + return this.manufacturerField; + } + set + { + this.manufacturerFieldSet = true; + this.manufacturerField = value; + } + } + + /// + /// A semicolon-delimited list of network or URL locations for alternate sources of the patch. The default is "Installer,Patching,PCP,Database". + /// + public string Keywords + { + get + { + return this.keywordsField; + } + set + { + this.keywordsFieldSet = true; + this.keywordsField = value; + } + } + + /// + /// General purpose of the patch package. For example, "This patch contains the logic and data required to install + /// + public string Comments + { + get + { + return this.commentsField; + } + set + { + this.commentsFieldSet = true; + this.commentsField = value; + } + } + + /// + /// The value of this attribute conveys whether the package should be opened as read-only. + /// A database editing tool should not modify a read-only enforced database and should + /// issue a warning at attempts to modify a read-only recommended database. + /// + public YesNoDefaultType ReadOnly + { + get + { + return this.readOnlyField; + } + set + { + this.readOnlyFieldSet = true; + this.readOnlyField = value; + } + } + + /// + /// The code page integer value or web name for summary info strings only. The default is 1252. See remarks for more information. + /// + public string SummaryCodepage + { + get + { + return this.summaryCodepageField; + } + set + { + this.summaryCodepageFieldSet = true; + this.summaryCodepageField = value; + } + } + + public YesNoType ShortNames + { + get + { + return this.shortNamesField; + } + set + { + this.shortNamesFieldSet = true; + this.shortNamesField = value; + } + } + + public YesNoType Compressed + { + get + { + return this.compressedField; + } + set + { + this.compressedFieldSet = true; + this.compressedField = value; + } + } + + public YesNoType AdminImage + { + get + { + return this.adminImageField; + } + set + { + this.adminImageFieldSet = true; + this.adminImageField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchInformation", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.platformsFieldSet) + { + writer.WriteAttributeString("Platforms", this.platformsField); + } + if (this.languagesFieldSet) + { + writer.WriteAttributeString("Languages", this.languagesField); + } + if (this.manufacturerFieldSet) + { + writer.WriteAttributeString("Manufacturer", this.manufacturerField); + } + if (this.keywordsFieldSet) + { + writer.WriteAttributeString("Keywords", this.keywordsField); + } + if (this.commentsFieldSet) + { + writer.WriteAttributeString("Comments", this.commentsField); + } + if (this.readOnlyFieldSet) + { + if ((this.readOnlyField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("ReadOnly", "default"); + } + if ((this.readOnlyField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("ReadOnly", "no"); + } + if ((this.readOnlyField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("ReadOnly", "yes"); + } + } + if (this.summaryCodepageFieldSet) + { + writer.WriteAttributeString("SummaryCodepage", this.summaryCodepageField); + } + if (this.shortNamesFieldSet) + { + if ((this.shortNamesField == YesNoType.no)) + { + writer.WriteAttributeString("ShortNames", "no"); + } + if ((this.shortNamesField == YesNoType.yes)) + { + writer.WriteAttributeString("ShortNames", "yes"); + } + } + if (this.compressedFieldSet) + { + if ((this.compressedField == YesNoType.no)) + { + writer.WriteAttributeString("Compressed", "no"); + } + if ((this.compressedField == YesNoType.yes)) + { + writer.WriteAttributeString("Compressed", "yes"); + } + } + if (this.adminImageFieldSet) + { + if ((this.adminImageField == YesNoType.no)) + { + writer.WriteAttributeString("AdminImage", "no"); + } + if ((this.adminImageField == YesNoType.yes)) + { + writer.WriteAttributeString("AdminImage", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("Platforms" == name)) + { + this.platformsField = value; + this.platformsFieldSet = true; + } + if (("Languages" == name)) + { + this.languagesField = value; + this.languagesFieldSet = true; + } + if (("Manufacturer" == name)) + { + this.manufacturerField = value; + this.manufacturerFieldSet = true; + } + if (("Keywords" == name)) + { + this.keywordsField = value; + this.keywordsFieldSet = true; + } + if (("Comments" == name)) + { + this.commentsField = value; + this.commentsFieldSet = true; + } + if (("ReadOnly" == name)) + { + this.readOnlyField = Enums.ParseYesNoDefaultType(value); + this.readOnlyFieldSet = true; + } + if (("SummaryCodepage" == name)) + { + this.summaryCodepageField = value; + this.summaryCodepageFieldSet = true; + } + if (("ShortNames" == name)) + { + this.shortNamesField = Enums.ParseYesNoType(value); + this.shortNamesFieldSet = true; + } + if (("Compressed" == name)) + { + this.compressedField = Enums.ParseYesNoType(value); + this.compressedFieldSet = true; + } + if (("AdminImage" == name)) + { + this.adminImageField = Enums.ParseYesNoType(value); + this.adminImageFieldSet = true; + } + } + } + + /// + /// Properties about the patch to be placed in the PatchMetadata table. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchMetadata : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private YesNoType allowRemovalField; + + private bool allowRemovalFieldSet; + + private string classificationField; + + private bool classificationFieldSet; + + private string creationTimeUTCField; + + private bool creationTimeUTCFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string displayNameField; + + private bool displayNameFieldSet; + + private string manufacturerNameField; + + private bool manufacturerNameFieldSet; + + private string minorUpdateTargetRTMField; + + private bool minorUpdateTargetRTMFieldSet; + + private string moreInfoURLField; + + private bool moreInfoURLFieldSet; + + private YesNoType optimizedInstallModeField; + + private bool optimizedInstallModeFieldSet; + + private string targetProductNameField; + + private bool targetProductNameFieldSet; + + private ISchemaElement parentElement; + + public PatchMetadata() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomProperty))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(OptimizeCustomActions))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Whether this is an uninstallable patch. + /// + public YesNoType AllowRemoval + { + get + { + return this.allowRemovalField; + } + set + { + this.allowRemovalFieldSet = true; + this.allowRemovalField = value; + } + } + + /// + /// Category of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup. + /// + public string Classification + { + get + { + return this.classificationField; + } + set + { + this.classificationFieldSet = true; + this.classificationField = value; + } + } + + /// + /// Creation time of the .msp file in the form mm-dd-yy HH:MM (month-day-year hour:minute). + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public string CreationTimeUTC + { + get + { + return this.creationTimeUTCField; + } + set + { + this.creationTimeUTCFieldSet = true; + this.creationTimeUTCField = value; + } + } + + /// + /// Description of the patch. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on. + /// + public string DisplayName + { + get + { + return this.displayNameField; + } + set + { + this.displayNameFieldSet = true; + this.displayNameField = value; + } + } + + /// + /// Name of the manufacturer. + /// + public string ManufacturerName + { + get + { + return this.manufacturerNameField; + } + set + { + this.manufacturerNameFieldSet = true; + this.manufacturerNameField = value; + } + } + + /// + /// Indicates that the patch targets the RTM version of the product or the most recent major + /// upgrade patch. Author this optional property in minor update patches that contain sequencing + /// information to indicate that the patch removes all patches up to the RTM version of the + /// product, or up to the most recent major upgrade patch. This property is available beginning + /// with Windows Installer 3.1. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public string MinorUpdateTargetRTM + { + get + { + return this.minorUpdateTargetRTMField; + } + set + { + this.minorUpdateTargetRTMFieldSet = true; + this.minorUpdateTargetRTMField = value; + } + } + + /// + /// A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public string MoreInfoURL + { + get + { + return this.moreInfoURLField; + } + set + { + this.moreInfoURLFieldSet = true; + this.moreInfoURLField = value; + } + } + + /// + /// If this attribute is set to 'yes' in all the patches to be applied in a transaction, the + /// application of the patch is optimized if possible. Available beginning with Windows Installer 3.1. + /// + public YesNoType OptimizedInstallMode + { + get + { + return this.optimizedInstallModeField; + } + set + { + this.optimizedInstallModeFieldSet = true; + this.optimizedInstallModeField = value; + } + } + + /// + /// Name of the application or target product suite. + /// + public string TargetProductName + { + get + { + return this.targetProductNameField; + } + set + { + this.targetProductNameFieldSet = true; + this.targetProductNameField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("CustomProperty" == childName)) + { + childValue = new CustomProperty(); + } + if (("OptimizeCustomActions" == childName)) + { + childValue = new OptimizeCustomActions(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchMetadata", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.allowRemovalFieldSet) + { + if ((this.allowRemovalField == YesNoType.no)) + { + writer.WriteAttributeString("AllowRemoval", "no"); + } + if ((this.allowRemovalField == YesNoType.yes)) + { + writer.WriteAttributeString("AllowRemoval", "yes"); + } + } + if (this.classificationFieldSet) + { + writer.WriteAttributeString("Classification", this.classificationField); + } + if (this.creationTimeUTCFieldSet) + { + writer.WriteAttributeString("CreationTimeUTC", this.creationTimeUTCField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.displayNameFieldSet) + { + writer.WriteAttributeString("DisplayName", this.displayNameField); + } + if (this.manufacturerNameFieldSet) + { + writer.WriteAttributeString("ManufacturerName", this.manufacturerNameField); + } + if (this.minorUpdateTargetRTMFieldSet) + { + writer.WriteAttributeString("MinorUpdateTargetRTM", this.minorUpdateTargetRTMField); + } + if (this.moreInfoURLFieldSet) + { + writer.WriteAttributeString("MoreInfoURL", this.moreInfoURLField); + } + if (this.optimizedInstallModeFieldSet) + { + if ((this.optimizedInstallModeField == YesNoType.no)) + { + writer.WriteAttributeString("OptimizedInstallMode", "no"); + } + if ((this.optimizedInstallModeField == YesNoType.yes)) + { + writer.WriteAttributeString("OptimizedInstallMode", "yes"); + } + } + if (this.targetProductNameFieldSet) + { + writer.WriteAttributeString("TargetProductName", this.targetProductNameField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("AllowRemoval" == name)) + { + this.allowRemovalField = Enums.ParseYesNoType(value); + this.allowRemovalFieldSet = true; + } + if (("Classification" == name)) + { + this.classificationField = value; + this.classificationFieldSet = true; + } + if (("CreationTimeUTC" == name)) + { + this.creationTimeUTCField = value; + this.creationTimeUTCFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("DisplayName" == name)) + { + this.displayNameField = value; + this.displayNameFieldSet = true; + } + if (("ManufacturerName" == name)) + { + this.manufacturerNameField = value; + this.manufacturerNameFieldSet = true; + } + if (("MinorUpdateTargetRTM" == name)) + { + this.minorUpdateTargetRTMField = value; + this.minorUpdateTargetRTMFieldSet = true; + } + if (("MoreInfoURL" == name)) + { + this.moreInfoURLField = value; + this.moreInfoURLFieldSet = true; + } + if (("OptimizedInstallMode" == name)) + { + this.optimizedInstallModeField = Enums.ParseYesNoType(value); + this.optimizedInstallModeFieldSet = true; + } + if (("TargetProductName" == name)) + { + this.targetProductNameField = value; + this.targetProductNameFieldSet = true; + } + } + } + + /// + /// A custom property for the PatchMetadata table. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CustomProperty : ISchemaElement, ISetAttributes + { + + private string companyField; + + private bool companyFieldSet; + + private string propertyField; + + private bool propertyFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + /// + /// The name of the company. + /// + public string Company + { + get + { + return this.companyField; + } + set + { + this.companyFieldSet = true; + this.companyField = value; + } + } + + /// + /// The name of the metadata property. + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + /// + /// Value of the metadata property. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CustomProperty", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.companyFieldSet) + { + writer.WriteAttributeString("Company", this.companyField); + } + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Company" == name)) + { + this.companyField = value; + this.companyFieldSet = true; + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + } + + /// + /// A patch that is deprecated by this patch. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ReplacePatch : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// Patch GUID to be unregistered if it exists on the machine targeted by this patch. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ReplacePatch", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// The product codes for products that can accept the patch. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class TargetProductCodes : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private YesNoType replaceField; + + private bool replaceFieldSet; + + private ISchemaElement parentElement; + + public TargetProductCodes() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCode))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Whether to replace the product codes that can accept the patch from the target packages with the child elements. + /// + public YesNoType Replace + { + get + { + return this.replaceField; + } + set + { + this.replaceFieldSet = true; + this.replaceField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("TargetProductCode" == childName)) + { + childValue = new TargetProductCode(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("TargetProductCodes", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.replaceFieldSet) + { + if ((this.replaceField == YesNoType.no)) + { + writer.WriteAttributeString("Replace", "no"); + } + if ((this.replaceField == YesNoType.yes)) + { + writer.WriteAttributeString("Replace", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Replace" == name)) + { + this.replaceField = Enums.ParseYesNoType(value); + this.replaceFieldSet = true; + } + } + } + + /// + /// A product code for a product that can accept the patch. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class TargetProductCode : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The product code for a product that can accept the patch. This can be '*'. See remarks for more information. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("TargetProductCode", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// A property for this patch database. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchProperty : ISchemaElement, ISetAttributes + { + + private string companyField; + + private bool companyFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + /// + /// Name of the company for a custom metadata property. + /// + public string Company + { + get + { + return this.companyField; + } + set + { + this.companyFieldSet = true; + this.companyField = value; + } + } + + /// + /// Name of the patch property. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Value of the patch property. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchProperty", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.companyFieldSet) + { + writer.WriteAttributeString("Company", this.companyField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Company" == name)) + { + this.companyField = value; + this.companyFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + } + + /// + /// Sequence information for this patch database. Sequence information is generated automatically in most cases, and rarely needs to be set explicitly. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchSequence : ISchemaElement, ISetAttributes + { + + private string patchFamilyField; + + private bool patchFamilyFieldSet; + + private string productCodeField; + + private bool productCodeFieldSet; + + private string sequenceField; + + private bool sequenceFieldSet; + + private YesNoType supersedeField; + + private bool supersedeFieldSet; + + private string targetField; + + private bool targetFieldSet; + + private string targetImageField; + + private bool targetImageFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier which indicates a sequence family to which this patch belongs. + /// + public string PatchFamily + { + get + { + return this.patchFamilyField; + } + set + { + this.patchFamilyFieldSet = true; + this.patchFamilyField = value; + } + } + + /// + /// Specifies the ProductCode of the product that this family applies to. + /// This attribute cannot the specified if the TargetImage attribute is specified. + /// + public string ProductCode + { + get + { + return this.productCodeField; + } + set + { + this.productCodeFieldSet = true; + this.productCodeField = value; + } + } + + /// + /// 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. + /// + public string Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + /// + /// Set this value to 'yes' to indicate that this patch will supersede all previous patches in this patch family. + /// The default value is 'no'. + /// + public YesNoType Supersede + { + get + { + return this.supersedeField; + } + set + { + this.supersedeFieldSet = true; + this.supersedeField = value; + } + } + + public string Target + { + get + { + return this.targetField; + } + set + { + this.targetFieldSet = true; + this.targetField = value; + } + } + + /// + /// Specifies the TargetImage that this family applies to. + /// This attribute cannot the specified if the ProductCode attribute is specified. + /// + public string TargetImage + { + get + { + return this.targetImageField; + } + set + { + this.targetImageFieldSet = true; + this.targetImageField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchSequence", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.patchFamilyFieldSet) + { + writer.WriteAttributeString("PatchFamily", this.patchFamilyField); + } + if (this.productCodeFieldSet) + { + writer.WriteAttributeString("ProductCode", this.productCodeField); + } + if (this.sequenceFieldSet) + { + writer.WriteAttributeString("Sequence", this.sequenceField); + } + if (this.supersedeFieldSet) + { + if ((this.supersedeField == YesNoType.no)) + { + writer.WriteAttributeString("Supersede", "no"); + } + if ((this.supersedeField == YesNoType.yes)) + { + writer.WriteAttributeString("Supersede", "yes"); + } + } + if (this.targetFieldSet) + { + writer.WriteAttributeString("Target", this.targetField); + } + if (this.targetImageFieldSet) + { + writer.WriteAttributeString("TargetImage", this.targetImageField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("PatchFamily" == name)) + { + this.patchFamilyField = value; + this.patchFamilyFieldSet = true; + } + if (("ProductCode" == name)) + { + this.productCodeField = value; + this.productCodeFieldSet = true; + } + if (("Sequence" == name)) + { + this.sequenceField = value; + this.sequenceFieldSet = true; + } + if (("Supersede" == name)) + { + this.supersedeField = Enums.ParseYesNoType(value); + this.supersedeFieldSet = true; + } + if (("Target" == name)) + { + this.targetField = value; + this.targetFieldSet = true; + } + if (("TargetImage" == name)) + { + this.targetImageField = value; + this.targetImageFieldSet = true; + } + } + } + + /// + /// Group of one or more upgraded images of a product. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Family : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string diskIdField; + + private bool diskIdFieldSet; + + private string diskPromptField; + + private bool diskPromptFieldSet; + + private string mediaSrcPropField; + + private bool mediaSrcPropFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private int sequenceStartField; + + private bool sequenceStartFieldSet; + + private string volumeLabelField; + + private bool volumeLabelFieldSet; + + private ISchemaElement parentElement; + + public Family() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(UpgradeImage))); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ExternalFile))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectFile))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Entered into the DiskId field of the new Media table record. + /// + public string DiskId + { + get + { + return this.diskIdField; + } + set + { + this.diskIdFieldSet = true; + this.diskIdField = value; + } + } + + /// + /// Value to display in the "[1]" of the DiskPrompt Property. Using this attribute will require you to define a DiskPrompt Property. + /// + public string DiskPrompt + { + get + { + return this.diskPromptField; + } + set + { + this.diskPromptFieldSet = true; + this.diskPromptField = value; + } + } + + /// + /// Entered into the Source field of the new Media table entry of the upgraded image. + /// + public string MediaSrcProp + { + get + { + return this.mediaSrcPropField; + } + set + { + this.mediaSrcPropFieldSet = true; + this.mediaSrcPropField = value; + } + } + + /// + /// Identifier for the family. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Sequence number for the starting file. + /// + public int SequenceStart + { + get + { + return this.sequenceStartField; + } + set + { + this.sequenceStartFieldSet = true; + this.sequenceStartField = value; + } + } + + /// + /// Entered into the VolumeLabel field of the new Media table record. + /// + public string VolumeLabel + { + get + { + return this.volumeLabelField; + } + set + { + this.volumeLabelFieldSet = true; + this.volumeLabelField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("UpgradeImage" == childName)) + { + childValue = new UpgradeImage(); + } + if (("ExternalFile" == childName)) + { + childValue = new ExternalFile(); + } + if (("ProtectFile" == childName)) + { + childValue = new ProtectFile(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Family", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.diskIdFieldSet) + { + writer.WriteAttributeString("DiskId", this.diskIdField); + } + if (this.diskPromptFieldSet) + { + writer.WriteAttributeString("DiskPrompt", this.diskPromptField); + } + if (this.mediaSrcPropFieldSet) + { + writer.WriteAttributeString("MediaSrcProp", this.mediaSrcPropField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.sequenceStartFieldSet) + { + writer.WriteAttributeString("SequenceStart", this.sequenceStartField.ToString(CultureInfo.InvariantCulture)); + } + if (this.volumeLabelFieldSet) + { + writer.WriteAttributeString("VolumeLabel", this.volumeLabelField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("DiskId" == name)) + { + this.diskIdField = value; + this.diskIdFieldSet = true; + } + if (("DiskPrompt" == name)) + { + this.diskPromptField = value; + this.diskPromptFieldSet = true; + } + if (("MediaSrcProp" == name)) + { + this.mediaSrcPropField = value; + this.mediaSrcPropFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("SequenceStart" == name)) + { + this.sequenceStartField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sequenceStartFieldSet = true; + } + if (("VolumeLabel" == name)) + { + this.volumeLabelField = value; + this.volumeLabelFieldSet = true; + } + } + } + + /// + /// Contains information about the upgraded images of the product. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UpgradeImage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string srcField; + + private bool srcFieldSet; + + private string sourcePatchField; + + private bool sourcePatchFieldSet; + + private string srcPatchField; + + private bool srcPatchFieldSet; + + private ISchemaElement parentElement; + + public UpgradeImage() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(TargetImage))); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UpgradeFile))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier to connect target images with upgraded image. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Full path to location of msi file for upgraded image. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string src + { + get + { + return this.srcField; + } + set + { + this.srcFieldSet = true; + this.srcField = value; + } + } + + /// + /// Modified copy of the upgraded installation database that contains additional authoring specific to patching. + /// + public string SourcePatch + { + get + { + return this.sourcePatchField; + } + set + { + this.sourcePatchFieldSet = true; + this.sourcePatchField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string srcPatch + { + get + { + return this.srcPatchField; + } + set + { + this.srcPatchFieldSet = true; + this.srcPatchField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("TargetImage" == childName)) + { + childValue = new TargetImage(); + } + if (("SymbolPath" == childName)) + { + childValue = new SymbolPath(); + } + if (("UpgradeFile" == childName)) + { + childValue = new UpgradeFile(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UpgradeImage", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.srcFieldSet) + { + writer.WriteAttributeString("src", this.srcField); + } + if (this.sourcePatchFieldSet) + { + writer.WriteAttributeString("SourcePatch", this.sourcePatchField); + } + if (this.srcPatchFieldSet) + { + writer.WriteAttributeString("srcPatch", this.srcPatchField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("src" == name)) + { + this.srcField = value; + this.srcFieldSet = true; + } + if (("SourcePatch" == name)) + { + this.sourcePatchField = value; + this.sourcePatchFieldSet = true; + } + if (("srcPatch" == name)) + { + this.srcPatchField = value; + this.srcPatchFieldSet = true; + } + } + } + + /// + /// Contains information about the target images of the product. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class TargetImage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string srcField; + + private bool srcFieldSet; + + private int orderField; + + private bool orderFieldSet; + + private string validationField; + + private bool validationFieldSet; + + private YesNoType ignoreMissingFilesField; + + private bool ignoreMissingFilesFieldSet; + + private ISchemaElement parentElement; + + public TargetImage() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TargetFile))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for the target image. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Full path to the location of the msi file for the target image. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string src + { + get + { + return this.srcField; + } + set + { + this.srcFieldSet = true; + this.srcField = value; + } + } + + /// + /// Relative order of the target image. + /// + public int Order + { + get + { + return this.orderField; + } + set + { + this.orderFieldSet = true; + this.orderField = value; + } + } + + /// + /// Product checking to avoid applying irrelevant transforms. + /// + public string Validation + { + get + { + return this.validationField; + } + set + { + this.validationFieldSet = true; + this.validationField = value; + } + } + + /// + /// Files missing from the target image are ignored by the installer. + /// + public YesNoType IgnoreMissingFiles + { + get + { + return this.ignoreMissingFilesField; + } + set + { + this.ignoreMissingFilesFieldSet = true; + this.ignoreMissingFilesField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("SymbolPath" == childName)) + { + childValue = new SymbolPath(); + } + if (("TargetFile" == childName)) + { + childValue = new TargetFile(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("TargetImage", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.srcFieldSet) + { + writer.WriteAttributeString("src", this.srcField); + } + if (this.orderFieldSet) + { + writer.WriteAttributeString("Order", this.orderField.ToString(CultureInfo.InvariantCulture)); + } + if (this.validationFieldSet) + { + writer.WriteAttributeString("Validation", this.validationField); + } + if (this.ignoreMissingFilesFieldSet) + { + if ((this.ignoreMissingFilesField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreMissingFiles", "no"); + } + if ((this.ignoreMissingFilesField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreMissingFiles", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("src" == name)) + { + this.srcField = value; + this.srcFieldSet = true; + } + if (("Order" == name)) + { + this.orderField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.orderFieldSet = true; + } + if (("Validation" == name)) + { + this.validationField = value; + this.validationFieldSet = true; + } + if (("IgnoreMissingFiles" == name)) + { + this.ignoreMissingFilesField = Enums.ParseYesNoType(value); + this.ignoreMissingFilesFieldSet = true; + } + } + } + + /// + /// Information about specific files in a target image. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class TargetFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public TargetFile() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SymbolPath))); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreRange))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectRange))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Foreign key into the File table. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("SymbolPath" == childName)) + { + childValue = new SymbolPath(); + } + if (("IgnoreRange" == childName)) + { + childValue = new IgnoreRange(); + } + if (("ProtectRange" == childName)) + { + childValue = new ProtectRange(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("TargetFile", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Specifies part of a file that is to be ignored during patching. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class IgnoreRange : ISchemaElement, ISetAttributes + { + + private int offsetField; + + private bool offsetFieldSet; + + private int lengthField; + + private bool lengthFieldSet; + + private ISchemaElement parentElement; + + /// + /// Offset of the start of the range. + /// + public int Offset + { + get + { + return this.offsetField; + } + set + { + this.offsetFieldSet = true; + this.offsetField = value; + } + } + + /// + /// Length of the range. + /// + public int Length + { + get + { + return this.lengthField; + } + set + { + this.lengthFieldSet = true; + this.lengthField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("IgnoreRange", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.offsetFieldSet) + { + writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture)); + } + if (this.lengthFieldSet) + { + writer.WriteAttributeString("Length", this.lengthField.ToString(CultureInfo.InvariantCulture)); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Offset" == name)) + { + this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.offsetFieldSet = true; + } + if (("Length" == name)) + { + this.lengthField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.lengthFieldSet = true; + } + } + } + + /// + /// Specifies part of a file that cannot be overwritten during patching. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ProtectRange : ISchemaElement, ISetAttributes + { + + private int offsetField; + + private bool offsetFieldSet; + + private int lengthField; + + private bool lengthFieldSet; + + private ISchemaElement parentElement; + + /// + /// Offset of the start of the range. + /// + public int Offset + { + get + { + return this.offsetField; + } + set + { + this.offsetFieldSet = true; + this.offsetField = value; + } + } + + /// + /// Length of the range. + /// + public int Length + { + get + { + return this.lengthField; + } + set + { + this.lengthFieldSet = true; + this.lengthField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ProtectRange", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.offsetFieldSet) + { + writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture)); + } + if (this.lengthFieldSet) + { + writer.WriteAttributeString("Length", this.lengthField.ToString(CultureInfo.InvariantCulture)); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Offset" == name)) + { + this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.offsetFieldSet = true; + } + if (("Length" == name)) + { + this.lengthField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.lengthFieldSet = true; + } + } + } + + /// + /// Specifies a file to be protected. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ProtectFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string fileField; + + private bool fileFieldSet; + + private ISchemaElement parentElement; + + public ProtectFile() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectRange))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Foreign key into the File table. + /// + public string File + { + get + { + return this.fileField; + } + set + { + this.fileFieldSet = true; + this.fileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ProtectRange" == childName)) + { + childValue = new ProtectRange(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ProtectFile", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.fileFieldSet) + { + writer.WriteAttributeString("File", this.fileField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("File" == name)) + { + this.fileField = value; + this.fileFieldSet = true; + } + } + } + + /// + /// Contains information about specific files that are not part of a regular target image. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ExternalFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string fileField; + + private bool fileFieldSet; + + private string sourceField; + + private bool sourceFieldSet; + + private string srcField; + + private bool srcFieldSet; + + private int orderField; + + private bool orderFieldSet; + + private ISchemaElement parentElement; + + public ExternalFile() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ProtectRange))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SymbolPath))); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreRange))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Foreign key into the File table. + /// + public string File + { + get + { + return this.fileField; + } + set + { + this.fileFieldSet = true; + this.fileField = value; + } + } + + /// + /// Full path of the external file. + /// + public string Source + { + get + { + return this.sourceField; + } + set + { + this.sourceFieldSet = true; + this.sourceField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string src + { + get + { + return this.srcField; + } + set + { + this.srcFieldSet = true; + this.srcField = value; + } + } + + /// + /// Specifies the order of the external files to use when creating the patch. + /// + public int Order + { + get + { + return this.orderField; + } + set + { + this.orderFieldSet = true; + this.orderField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ProtectRange" == childName)) + { + childValue = new ProtectRange(); + } + if (("SymbolPath" == childName)) + { + childValue = new SymbolPath(); + } + if (("IgnoreRange" == childName)) + { + childValue = new IgnoreRange(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ExternalFile", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.fileFieldSet) + { + writer.WriteAttributeString("File", this.fileField); + } + if (this.sourceFieldSet) + { + writer.WriteAttributeString("Source", this.sourceField); + } + if (this.srcFieldSet) + { + writer.WriteAttributeString("src", this.srcField); + } + if (this.orderFieldSet) + { + writer.WriteAttributeString("Order", this.orderField.ToString(CultureInfo.InvariantCulture)); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("File" == name)) + { + this.fileField = value; + this.fileFieldSet = true; + } + if (("Source" == name)) + { + this.sourceField = value; + this.sourceFieldSet = true; + } + if (("src" == name)) + { + this.srcField = value; + this.srcFieldSet = true; + } + if (("Order" == name)) + { + this.orderField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.orderFieldSet = true; + } + } + } + + /// + /// Specifies files to either ignore or to specify optional data about a file. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UpgradeFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string fileField; + + private bool fileFieldSet; + + private YesNoType ignoreField; + + private bool ignoreFieldSet; + + private YesNoType allowIgnoreOnErrorField; + + private bool allowIgnoreOnErrorFieldSet; + + private YesNoType wholeFileField; + + private bool wholeFileFieldSet; + + private ISchemaElement parentElement; + + public UpgradeFile() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Foreign key into the File table. + /// + public string File + { + get + { + return this.fileField; + } + set + { + this.fileFieldSet = true; + this.fileField = value; + } + } + + /// + /// If yes, the file is ignored during patching, and the next two attributes are ignored. + /// + public YesNoType Ignore + { + get + { + return this.ignoreField; + } + set + { + this.ignoreFieldSet = true; + this.ignoreField = value; + } + } + + /// + /// Specifies whether patching this file is vital. + /// + public YesNoType AllowIgnoreOnError + { + get + { + return this.allowIgnoreOnErrorField; + } + set + { + this.allowIgnoreOnErrorFieldSet = true; + this.allowIgnoreOnErrorField = value; + } + } + + /// + /// Whether the whole file should be installed, rather than creating a binary patch. + /// + public YesNoType WholeFile + { + get + { + return this.wholeFileField; + } + set + { + this.wholeFileFieldSet = true; + this.wholeFileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("SymbolPath" == childName)) + { + childValue = new SymbolPath(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UpgradeFile", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.fileFieldSet) + { + writer.WriteAttributeString("File", this.fileField); + } + if (this.ignoreFieldSet) + { + if ((this.ignoreField == YesNoType.no)) + { + writer.WriteAttributeString("Ignore", "no"); + } + if ((this.ignoreField == YesNoType.yes)) + { + writer.WriteAttributeString("Ignore", "yes"); + } + } + if (this.allowIgnoreOnErrorFieldSet) + { + if ((this.allowIgnoreOnErrorField == YesNoType.no)) + { + writer.WriteAttributeString("AllowIgnoreOnError", "no"); + } + if ((this.allowIgnoreOnErrorField == YesNoType.yes)) + { + writer.WriteAttributeString("AllowIgnoreOnError", "yes"); + } + } + if (this.wholeFileFieldSet) + { + if ((this.wholeFileField == YesNoType.no)) + { + writer.WriteAttributeString("WholeFile", "no"); + } + if ((this.wholeFileField == YesNoType.yes)) + { + writer.WriteAttributeString("WholeFile", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("File" == name)) + { + this.fileField = value; + this.fileFieldSet = true; + } + if (("Ignore" == name)) + { + this.ignoreField = Enums.ParseYesNoType(value); + this.ignoreFieldSet = true; + } + if (("AllowIgnoreOnError" == name)) + { + this.allowIgnoreOnErrorField = Enums.ParseYesNoType(value); + this.allowIgnoreOnErrorFieldSet = true; + } + if (("WholeFile" == name)) + { + this.wholeFileField = Enums.ParseYesNoType(value); + this.wholeFileFieldSet = true; + } + } + } + + /// + /// A path to symbols. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class SymbolPath : ISchemaElement, ISetAttributes + { + + private string pathField; + + private bool pathFieldSet; + + private ISchemaElement parentElement; + + /// + /// The path. + /// + public string Path + { + get + { + return this.pathField; + } + set + { + this.pathFieldSet = true; + this.pathField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("SymbolPath", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.pathFieldSet) + { + writer.WriteAttributeString("Path", this.pathField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Path" == name)) + { + this.pathField = value; + this.pathFieldSet = true; + } + } + } + + /// + /// Properties about the package 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class SummaryInformation : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private YesNoType adminImageField; + + private bool adminImageFieldSet; + + private string commentsField; + + private bool commentsFieldSet; + + private YesNoType compressedField; + + private bool compressedFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private InstallPrivilegesType installPrivilegesField; + + private bool installPrivilegesFieldSet; + + private InstallScopeType installScopeField; + + private bool installScopeFieldSet; + + private int installerVersionField; + + private bool installerVersionFieldSet; + + private string keywordsField; + + private bool keywordsFieldSet; + + private string languagesField; + + private bool languagesFieldSet; + + private string manufacturerField; + + private bool manufacturerFieldSet; + + private string platformsField; + + private bool platformsFieldSet; + + private PlatformType platformField; + + private bool platformFieldSet; + + private YesNoDefaultType readOnlyField; + + private bool readOnlyFieldSet; + + private YesNoType shortNamesField; + + private bool shortNamesFieldSet; + + private string summaryCodepageField; + + private bool summaryCodepageFieldSet; + + private ISchemaElement parentElement; + + /// + /// The package code GUID for a product or merge module. + /// When compiling a product, this attribute should not be set in order to allow the package + /// code to be generated for each build. + /// When compiling a merge module, this attribute must be set to the modularization guid. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Set to 'yes' if the source is an admin image. + /// + public YesNoType AdminImage + { + get + { + return this.adminImageField; + } + set + { + this.adminImageFieldSet = true; + this.adminImageField = value; + } + } + + /// + /// Optional comments for browsing. + /// + public string Comments + { + get + { + return this.commentsField; + } + set + { + this.commentsFieldSet = true; + this.commentsField = value; + } + } + + /// + /// Set to 'yes' to have compressed files in the source. + /// This attribute cannot be set for merge modules. + /// + public YesNoType Compressed + { + get + { + return this.compressedField; + } + set + { + this.compressedFieldSet = true; + this.compressedField = value; + } + } + + /// + /// The product full name or description. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Use this attribute to specify the priviliges required to install the package on Windows Vista and above. + /// + public InstallPrivilegesType InstallPrivileges + { + get + { + return this.installPrivilegesField; + } + set + { + this.installPrivilegesFieldSet = true; + this.installPrivilegesField = value; + } + } + + /// + /// Use this attribute to specify the installation scope of this package: per-machine or per-user. + /// + public InstallScopeType InstallScope + { + get + { + return this.installScopeField; + } + set + { + this.installScopeFieldSet = true; + this.installScopeField = value; + } + } + + /// + /// The minimum version of the Windows Installer required to install this package. Take the major version of the required Windows Installer + /// and multiply by a 100 then add the minor version of the Windows Installer. For example, "200" would represent Windows Installer 2.0 and + /// "405" would represent Windows Installer 4.5. For 64-bit Windows Installer packages, this property is set to 200 by default as + /// Windows Installer 2.0 was the first version to support 64-bit packages. + /// + public int InstallerVersion + { + get + { + return this.installerVersionField; + } + set + { + this.installerVersionFieldSet = true; + this.installerVersionField = value; + } + } + + /// + /// Optional keywords for browsing. + /// + public string Keywords + { + get + { + return this.keywordsField; + } + set + { + this.keywordsFieldSet = true; + this.keywordsField = value; + } + } + + /// + /// The list of language IDs (LCIDs) supported in the package. + /// + public string Languages + { + get + { + return this.languagesField; + } + set + { + this.languagesFieldSet = true; + this.languagesField = value; + } + } + + /// + /// The vendor releasing the package. + /// + public string Manufacturer + { + get + { + return this.manufacturerField; + } + set + { + this.manufacturerFieldSet = true; + this.manufacturerField = value; + } + } + + /// + /// The list of platforms supported by the package. This attribute has been deprecated. + /// Specify the -arch switch at the candle.exe command line or the InstallerPlatform + /// property in a .wixproj MSBuild project. + /// + public string Platforms + { + get + { + return this.platformsField; + } + set + { + this.platformsFieldSet = true; + this.platformsField = value; + } + } + + /// + /// The platform supported by the package. Use of this attribute is discouraged; instead, + /// specify the -arch switch at the candle.exe command line or the InstallerPlatform + /// property in a .wixproj MSBuild project. + /// + public PlatformType Platform + { + get + { + return this.platformField; + } + set + { + this.platformFieldSet = true; + this.platformField = value; + } + } + + /// + /// The value of this attribute conveys whether the package should be opened as read-only. + /// A database editing tool should not modify a read-only enforced database and should + /// issue a warning at attempts to modify a read-only recommended database. + /// + public YesNoDefaultType ReadOnly + { + get + { + return this.readOnlyField; + } + set + { + this.readOnlyFieldSet = true; + this.readOnlyField = value; + } + } + + /// + /// Set to 'yes' to have short filenames in the source. + /// + public YesNoType ShortNames + { + get + { + return this.shortNamesField; + } + set + { + this.shortNamesFieldSet = true; + this.shortNamesField = value; + } + } + + /// + /// The code page integer value or web name for summary info strings only. See remarks for more information. + /// + public string SummaryCodepage + { + get + { + return this.summaryCodepageField; + } + set + { + this.summaryCodepageFieldSet = true; + this.summaryCodepageField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a InstallPrivilegesType from a string. + /// + public static InstallPrivilegesType ParseInstallPrivilegesType(string value) + { + InstallPrivilegesType parsedValue; + SummaryInformation.TryParseInstallPrivilegesType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a InstallPrivilegesType from a string. + /// + public static bool TryParseInstallPrivilegesType(string value, out InstallPrivilegesType parsedValue) + { + parsedValue = InstallPrivilegesType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("limited" == value)) + { + parsedValue = InstallPrivilegesType.limited; + } + else + { + if (("elevated" == value)) + { + parsedValue = InstallPrivilegesType.elevated; + } + else + { + parsedValue = InstallPrivilegesType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Parses a InstallScopeType from a string. + /// + public static InstallScopeType ParseInstallScopeType(string value) + { + InstallScopeType parsedValue; + SummaryInformation.TryParseInstallScopeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a InstallScopeType from a string. + /// + public static bool TryParseInstallScopeType(string value, out InstallScopeType parsedValue) + { + parsedValue = InstallScopeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("perMachine" == value)) + { + parsedValue = InstallScopeType.perMachine; + } + else + { + if (("perUser" == value)) + { + parsedValue = InstallScopeType.perUser; + } + else + { + parsedValue = InstallScopeType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Parses a PlatformType from a string. + /// + public static PlatformType ParsePlatformType(string value) + { + PlatformType parsedValue; + SummaryInformation.TryParsePlatformType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a PlatformType from a string. + /// + public static bool TryParsePlatformType(string value, out PlatformType parsedValue) + { + parsedValue = PlatformType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("x86" == value)) + { + parsedValue = PlatformType.x86; + } + else + { + if (("ia64" == value)) + { + parsedValue = PlatformType.ia64; + } + else + { + if (("x64" == value)) + { + parsedValue = PlatformType.x64; + } + else + { + if (("arm" == value)) + { + parsedValue = PlatformType.arm; + } + else + { + if (("intel" == value)) + { + parsedValue = PlatformType.intel; + } + else + { + if (("intel64" == value)) + { + parsedValue = PlatformType.intel64; + } + else + { + parsedValue = PlatformType.IllegalValue; + return false; + } + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("SummaryInformation", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.adminImageFieldSet) + { + if ((this.adminImageField == YesNoType.no)) + { + writer.WriteAttributeString("AdminImage", "no"); + } + if ((this.adminImageField == YesNoType.yes)) + { + writer.WriteAttributeString("AdminImage", "yes"); + } + } + if (this.commentsFieldSet) + { + writer.WriteAttributeString("Comments", this.commentsField); + } + if (this.compressedFieldSet) + { + if ((this.compressedField == YesNoType.no)) + { + writer.WriteAttributeString("Compressed", "no"); + } + if ((this.compressedField == YesNoType.yes)) + { + writer.WriteAttributeString("Compressed", "yes"); + } + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.installPrivilegesFieldSet) + { + if ((this.installPrivilegesField == InstallPrivilegesType.limited)) + { + writer.WriteAttributeString("InstallPrivileges", "limited"); + } + if ((this.installPrivilegesField == InstallPrivilegesType.elevated)) + { + writer.WriteAttributeString("InstallPrivileges", "elevated"); + } + } + if (this.installScopeFieldSet) + { + if ((this.installScopeField == InstallScopeType.perMachine)) + { + writer.WriteAttributeString("InstallScope", "perMachine"); + } + if ((this.installScopeField == InstallScopeType.perUser)) + { + writer.WriteAttributeString("InstallScope", "perUser"); + } + } + if (this.installerVersionFieldSet) + { + writer.WriteAttributeString("InstallerVersion", this.installerVersionField.ToString(CultureInfo.InvariantCulture)); + } + if (this.keywordsFieldSet) + { + writer.WriteAttributeString("Keywords", this.keywordsField); + } + if (this.languagesFieldSet) + { + writer.WriteAttributeString("Languages", this.languagesField); + } + if (this.manufacturerFieldSet) + { + writer.WriteAttributeString("Manufacturer", this.manufacturerField); + } + if (this.platformsFieldSet) + { + writer.WriteAttributeString("Platforms", this.platformsField); + } + if (this.platformFieldSet) + { + if ((this.platformField == PlatformType.x86)) + { + writer.WriteAttributeString("Platform", "x86"); + } + if ((this.platformField == PlatformType.ia64)) + { + writer.WriteAttributeString("Platform", "ia64"); + } + if ((this.platformField == PlatformType.x64)) + { + writer.WriteAttributeString("Platform", "x64"); + } + if ((this.platformField == PlatformType.arm)) + { + writer.WriteAttributeString("Platform", "arm"); + } + if ((this.platformField == PlatformType.intel)) + { + writer.WriteAttributeString("Platform", "intel"); + } + if ((this.platformField == PlatformType.intel64)) + { + writer.WriteAttributeString("Platform", "intel64"); + } + } + if (this.readOnlyFieldSet) + { + if ((this.readOnlyField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("ReadOnly", "default"); + } + if ((this.readOnlyField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("ReadOnly", "no"); + } + if ((this.readOnlyField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("ReadOnly", "yes"); + } + } + if (this.shortNamesFieldSet) + { + if ((this.shortNamesField == YesNoType.no)) + { + writer.WriteAttributeString("ShortNames", "no"); + } + if ((this.shortNamesField == YesNoType.yes)) + { + writer.WriteAttributeString("ShortNames", "yes"); + } + } + if (this.summaryCodepageFieldSet) + { + writer.WriteAttributeString("SummaryCodepage", this.summaryCodepageField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("AdminImage" == name)) + { + this.adminImageField = Enums.ParseYesNoType(value); + this.adminImageFieldSet = true; + } + if (("Comments" == name)) + { + this.commentsField = value; + this.commentsFieldSet = true; + } + if (("Compressed" == name)) + { + this.compressedField = Enums.ParseYesNoType(value); + this.compressedFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("InstallPrivileges" == name)) + { + this.installPrivilegesField = SummaryInformation.ParseInstallPrivilegesType(value); + this.installPrivilegesFieldSet = true; + } + if (("InstallScope" == name)) + { + this.installScopeField = SummaryInformation.ParseInstallScopeType(value); + this.installScopeFieldSet = true; + } + if (("InstallerVersion" == name)) + { + this.installerVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.installerVersionFieldSet = true; + } + if (("Keywords" == name)) + { + this.keywordsField = value; + this.keywordsFieldSet = true; + } + if (("Languages" == name)) + { + this.languagesField = value; + this.languagesFieldSet = true; + } + if (("Manufacturer" == name)) + { + this.manufacturerField = value; + this.manufacturerFieldSet = true; + } + if (("Platforms" == name)) + { + this.platformsField = value; + this.platformsFieldSet = true; + } + if (("Platform" == name)) + { + this.platformField = SummaryInformation.ParsePlatformType(value); + this.platformFieldSet = true; + } + if (("ReadOnly" == name)) + { + this.readOnlyField = Enums.ParseYesNoDefaultType(value); + this.readOnlyFieldSet = true; + } + if (("ShortNames" == name)) + { + this.shortNamesField = Enums.ParseYesNoType(value); + this.shortNamesFieldSet = true; + } + if (("SummaryCodepage" == name)) + { + this.summaryCodepageField = value; + this.summaryCodepageFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum InstallPrivilegesType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Set this value to declare that the package does not require elevated privileges to install. + /// + limited, + + /// + /// Set this value to declare that the package requires elevated privileges to install. + /// This is the default value. + /// + elevated, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum InstallScopeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Set this value to declare that the package is a per-machine installation and requires elevated privileges to install. + /// Sets the ALLUSERS property to 1. + /// + perMachine, + + /// + /// Set this value to declare that the package is a per-user installation and does not require elevated privileges to install. + /// Sets the package's InstallPrivileges attribute to "limited." + /// + perUser, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum PlatformType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Set this value to declare that the package is an x86 package. + /// + x86, + + /// + /// Set this value to declare that the package is an ia64 package. + /// This value requires that the InstallerVersion property be set to 200 or greater. + /// + ia64, + + /// + /// Set this value to declare that the package is an x64 package. + /// This value requires that the InstallerVersion property be set to 200 or greater. + /// + x64, + + /// + /// Set this value to declare that the package is an arm package. + /// This value requires that the InstallerVersion property be set to 500 or greater. + /// + arm, + + /// + /// This value has been deprecated. Use "x86" instead. + /// + intel, + + /// + /// This value has been deprecated. Use "ia64" instead. + /// + intel64, + } + } + + /// + /// The MsiAssemblyName table specifies the schema for the elements of a strong assembly cache name for a .NET Framework or Win32 assembly. + /// Consider using the Assembly attribute on File element to have the toolset populate these entries automatically. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class AssemblyName : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + /// + /// Name of the attribute associated with the value specified in the Value column. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Value associated with the name specified in the Name column. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("AssemblyName", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + } + + /// + /// Identifies the possible signer certificates used to digitally sign patches. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchCertificates : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private ISchemaElement parentElement; + + public PatchCertificates() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("DigitalCertificate" == childName)) + { + childValue = new DigitalCertificate(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchCertificates", "http://wixtoolset.org/schemas/v4/wxs"); + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + } + } + + /// + /// Digital signatures that identify installation packages in a multi-product transaction. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PackageCertificates : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private ISchemaElement parentElement; + + public PackageCertificates() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("DigitalCertificate" == childName)) + { + childValue = new DigitalCertificate(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PackageCertificates", "http://wixtoolset.org/schemas/v4/wxs"); + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + } + } + + /// + /// Adds a digital certificate. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class DigitalCertificate : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier for a certificate file. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The path to the certificate file. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DigitalCertificate", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + } + } + + /// + /// Reference to a DigitalCertificate element. This will force the entire referenced Fragment's contents + /// to be included in the installer database. This is only used for references when patching. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class DigitalCertificateRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DigitalCertificateRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Adds a digital signature. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class DigitalSignature : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private ISchemaElement parentElement; + + public DigitalSignature() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// The path to signature's optional hash file. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("DigitalCertificate" == childName)) + { + childValue = new DigitalCertificate(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DigitalSignature", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + } + } + + /// + /// Adds a system file protection update catalog file + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class SFPCatalog : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string nameField; + + private bool nameFieldSet; + + private string dependencyField; + + private bool dependencyFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private ISchemaElement parentElement; + + public SFPCatalog() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPFile))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Filename for catalog file when installed. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Used to define dependency outside of the package. + /// + public string Dependency + { + get + { + return this.dependencyField; + } + set + { + this.dependencyFieldSet = true; + this.dependencyField = value; + } + } + + /// + /// Path to catalog file in binary. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("SFPCatalog" == childName)) + { + childValue = new SFPCatalog(); + } + if (("SFPFile" == childName)) + { + childValue = new SFPFile(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("SFPCatalog", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.dependencyFieldSet) + { + writer.WriteAttributeString("Dependency", this.dependencyField); + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Dependency" == name)) + { + this.dependencyField = value; + this.dependencyFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + } + } + + /// + /// Provides a many-to-many mapping from the SFPCatalog table to the File table + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class SFPFile : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary Key to File Table. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("SFPFile", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Adds or removes .ini file entries. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class IniFile : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ActionType actionField; + + private bool actionFieldSet; + + private string directoryField; + + private bool directoryFieldSet; + + private string keyField; + + private bool keyFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string sectionField; + + private bool sectionFieldSet; + + private string shortNameField; + + private bool shortNameFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier for ini file. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The type of modification to be made. + /// + public ActionType Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// 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. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + /// + /// The localizable .ini file key within the section. + /// + public string Key + { + get + { + return this.keyField; + } + set + { + this.keyFieldSet = true; + this.keyField = value; + } + } + + /// + /// In prior versions of the WiX toolset, this attribute specified the short name. + /// This attribute's value may now be either a short or long name. + /// If a short name is specified, the ShortName attribute may not be specified. + /// Also, if this value is a long name, the ShortName attribute may be omitted to + /// allow WiX to attempt to generate a unique short name. + /// However, if this name collides with another file or you wish to manually specify + /// the short name, then the ShortName attribute may be specified. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The localizable .ini file section. + /// + public string Section + { + get + { + return this.sectionField; + } + set + { + this.sectionFieldSet = true; + this.sectionField = value; + } + } + + /// + /// The short name of the in 8.3 format. + /// This attribute should only be set if there is a conflict between generated short names + /// or the user wants to manually specify the short name. + /// + public string ShortName + { + get + { + return this.shortNameField; + } + set + { + this.shortNameFieldSet = true; + this.shortNameField = value; + } + } + + /// + /// The localizable value to be written or deleted. This attribute must be set if + /// the Action attribute's value is "addLine", "addTag", or "createLine". + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ActionType from a string. + /// + public static ActionType ParseActionType(string value) + { + ActionType parsedValue; + IniFile.TryParseActionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ActionType from a string. + /// + public static bool TryParseActionType(string value, out ActionType parsedValue) + { + parsedValue = ActionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("addLine" == value)) + { + parsedValue = ActionType.addLine; + } + else + { + if (("addTag" == value)) + { + parsedValue = ActionType.addTag; + } + else + { + if (("createLine" == value)) + { + parsedValue = ActionType.createLine; + } + else + { + if (("removeLine" == value)) + { + parsedValue = ActionType.removeLine; + } + else + { + if (("removeTag" == value)) + { + parsedValue = ActionType.removeTag; + } + else + { + parsedValue = ActionType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("IniFile", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.actionFieldSet) + { + if ((this.actionField == ActionType.addLine)) + { + writer.WriteAttributeString("Action", "addLine"); + } + if ((this.actionField == ActionType.addTag)) + { + writer.WriteAttributeString("Action", "addTag"); + } + if ((this.actionField == ActionType.createLine)) + { + writer.WriteAttributeString("Action", "createLine"); + } + if ((this.actionField == ActionType.removeLine)) + { + writer.WriteAttributeString("Action", "removeLine"); + } + if ((this.actionField == ActionType.removeTag)) + { + writer.WriteAttributeString("Action", "removeTag"); + } + } + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + if (this.keyFieldSet) + { + writer.WriteAttributeString("Key", this.keyField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.sectionFieldSet) + { + writer.WriteAttributeString("Section", this.sectionField); + } + if (this.shortNameFieldSet) + { + writer.WriteAttributeString("ShortName", this.shortNameField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Action" == name)) + { + this.actionField = IniFile.ParseActionType(value); + this.actionFieldSet = true; + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + if (("Key" == name)) + { + this.keyField = value; + this.keyFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Section" == name)) + { + this.sectionField = value; + this.sectionFieldSet = true; + } + if (("ShortName" == name)) + { + this.shortNameField = value; + this.shortNameFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ActionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Creates or updates an .ini entry. + /// + addLine, + + /// + /// Creates a new entry or appends a new comma-separated value to an existing entry. + /// + addTag, + + /// + /// Creates an .ini entry only if the entry does no already exist. + /// + createLine, + + /// + /// Removes an .ini entry. + /// + removeLine, + + /// + /// Removes a tag from an .ini entry. + /// + removeTag, + } + } + + /// + /// ODBCDataSource for a Component + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ODBCDataSource : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string driverNameField; + + private bool driverNameFieldSet; + + private RegistrationType registrationField; + + private bool registrationFieldSet; + + private YesNoType keyPathField; + + private bool keyPathFieldSet; + + private ISchemaElement parentElement; + + public ODBCDataSource() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier of the data source. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name for the data source. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Required if not found as child of ODBCDriver element + /// + public string DriverName + { + get + { + return this.driverNameField; + } + set + { + this.driverNameFieldSet = true; + this.driverNameField = value; + } + } + + /// + /// Scope for which the data source should be registered. + /// + public RegistrationType Registration + { + get + { + return this.registrationField; + } + set + { + this.registrationFieldSet = true; + this.registrationField = value; + } + } + + /// + /// Set 'yes' to force this file to be key path for parent Component + /// + public YesNoType KeyPath + { + get + { + return this.keyPathField; + } + set + { + this.keyPathFieldSet = true; + this.keyPathField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Property" == childName)) + { + childValue = new Property(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a RegistrationType from a string. + /// + public static RegistrationType ParseRegistrationType(string value) + { + RegistrationType parsedValue; + ODBCDataSource.TryParseRegistrationType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a RegistrationType from a string. + /// + public static bool TryParseRegistrationType(string value, out RegistrationType parsedValue) + { + parsedValue = RegistrationType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("machine" == value)) + { + parsedValue = RegistrationType.machine; + } + else + { + if (("user" == value)) + { + parsedValue = RegistrationType.user; + } + else + { + parsedValue = RegistrationType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ODBCDataSource", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.driverNameFieldSet) + { + writer.WriteAttributeString("DriverName", this.driverNameField); + } + if (this.registrationFieldSet) + { + if ((this.registrationField == RegistrationType.machine)) + { + writer.WriteAttributeString("Registration", "machine"); + } + if ((this.registrationField == RegistrationType.user)) + { + writer.WriteAttributeString("Registration", "user"); + } + } + if (this.keyPathFieldSet) + { + if ((this.keyPathField == YesNoType.no)) + { + writer.WriteAttributeString("KeyPath", "no"); + } + if ((this.keyPathField == YesNoType.yes)) + { + writer.WriteAttributeString("KeyPath", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("DriverName" == name)) + { + this.driverNameField = value; + this.driverNameFieldSet = true; + } + if (("Registration" == name)) + { + this.registrationField = ODBCDataSource.ParseRegistrationType(value); + this.registrationFieldSet = true; + } + if (("KeyPath" == name)) + { + this.keyPathField = Enums.ParseYesNoType(value); + this.keyPathFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum RegistrationType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Data source is registered per machine. + /// + machine, + + /// + /// Data source is registered per user. + /// + user, + } + } + + /// + /// ODBCDriver for a Component + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ODBCDriver : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string fileField; + + private bool fileFieldSet; + + private string setupFileField; + + private bool setupFileFieldSet; + + private ISchemaElement parentElement; + + public ODBCDriver() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ODBCDataSource))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for the driver. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name for the driver. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Required if not found as child of File element + /// + public string File + { + get + { + return this.fileField; + } + set + { + this.fileFieldSet = true; + this.fileField = value; + } + } + + /// + /// Required if not found as child of File element or different from File attribute above + /// + public string SetupFile + { + get + { + return this.setupFileField; + } + set + { + this.setupFileFieldSet = true; + this.setupFileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Property" == childName)) + { + childValue = new Property(); + } + if (("ODBCDataSource" == childName)) + { + childValue = new ODBCDataSource(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ODBCDriver", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.fileFieldSet) + { + writer.WriteAttributeString("File", this.fileField); + } + if (this.setupFileFieldSet) + { + writer.WriteAttributeString("SetupFile", this.setupFileField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("File" == name)) + { + this.fileField = value; + this.fileFieldSet = true; + } + if (("SetupFile" == name)) + { + this.setupFileField = value; + this.setupFileFieldSet = true; + } + } + } + + /// + /// ODBCTranslator for a Component + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ODBCTranslator : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string fileField; + + private bool fileFieldSet; + + private string setupFileField; + + private bool setupFileFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier for the translator. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name for the translator. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Required if not found as child of File element + /// + public string File + { + get + { + return this.fileField; + } + set + { + this.fileFieldSet = true; + this.fileField = value; + } + } + + /// + /// Required if not found as child of File element or different from File attribute above + /// + public string SetupFile + { + get + { + return this.setupFileField; + } + set + { + this.setupFileFieldSet = true; + this.setupFileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ODBCTranslator", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.fileFieldSet) + { + writer.WriteAttributeString("File", this.fileField); + } + if (this.setupFileFieldSet) + { + writer.WriteAttributeString("SetupFile", this.setupFileField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("File" == name)) + { + this.fileField = value; + this.fileFieldSet = true; + } + if (("SetupFile" == name)) + { + this.setupFileField = value; + this.setupFileFieldSet = true; + } + } + } + + /// + /// Searches for file and assigns to fullpath value of parent Property + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class FileSearch : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string shortNameField; + + private bool shortNameFieldSet; + + private int minSizeField; + + private bool minSizeFieldSet; + + private int maxSizeField; + + private bool maxSizeFieldSet; + + private string minVersionField; + + private bool minVersionFieldSet; + + private string maxVersionField; + + private bool maxVersionFieldSet; + + private DateTime minDateField; + + private bool minDateFieldSet; + + private DateTime maxDateField; + + private bool maxDateFieldSet; + + private string languagesField; + + private bool languagesFieldSet; + + private ISchemaElement parentElement; + + /// + /// 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. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// In prior versions of the WiX toolset, this attribute specified the short file name. + /// This attribute's value may now be either a short or long file name. + /// If a short file name is specified, the ShortName attribute may not be specified. + /// If you wish to manually specify the short file name, then the ShortName + /// attribute may be specified. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The short file name of the file in 8.3 format. + /// There is a Windows Installer bug which prevents the FileSearch functionality from working + /// if both a short and long file name are specified. Since the Name attribute allows either + /// a short or long name to be specified, it is the only attribute related to file names which + /// should be specified. + /// + public string ShortName + { + get + { + return this.shortNameField; + } + set + { + this.shortNameFieldSet = true; + this.shortNameField = value; + } + } + + /// + /// The minimum size of the file. + /// + public int MinSize + { + get + { + return this.minSizeField; + } + set + { + this.minSizeFieldSet = true; + this.minSizeField = value; + } + } + + /// + /// The maximum size of the file. + /// + public int MaxSize + { + get + { + return this.maxSizeField; + } + set + { + this.maxSizeFieldSet = true; + this.maxSizeField = value; + } + } + + /// + /// The minimum version of the file. + /// + public string MinVersion + { + get + { + return this.minVersionField; + } + set + { + this.minVersionFieldSet = true; + this.minVersionField = value; + } + } + + /// + /// The maximum version of the file. + /// + public string MaxVersion + { + get + { + return this.maxVersionField; + } + set + { + this.maxVersionFieldSet = true; + this.maxVersionField = value; + } + } + + /// + /// 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. + /// + public DateTime MinDate + { + get + { + return this.minDateField; + } + set + { + this.minDateFieldSet = true; + this.minDateField = value; + } + } + + /// + /// 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. + /// + public DateTime MaxDate + { + get + { + return this.maxDateField; + } + set + { + this.maxDateFieldSet = true; + this.maxDateField = value; + } + } + + /// + /// The languages supported by the file. + /// + public string Languages + { + get + { + return this.languagesField; + } + set + { + this.languagesFieldSet = true; + this.languagesField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FileSearch", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.shortNameFieldSet) + { + writer.WriteAttributeString("ShortName", this.shortNameField); + } + if (this.minSizeFieldSet) + { + writer.WriteAttributeString("MinSize", this.minSizeField.ToString(CultureInfo.InvariantCulture)); + } + if (this.maxSizeFieldSet) + { + writer.WriteAttributeString("MaxSize", this.maxSizeField.ToString(CultureInfo.InvariantCulture)); + } + if (this.minVersionFieldSet) + { + writer.WriteAttributeString("MinVersion", this.minVersionField); + } + if (this.maxVersionFieldSet) + { + writer.WriteAttributeString("MaxVersion", this.maxVersionField); + } + if (this.minDateFieldSet) + { + writer.WriteAttributeString("MinDate", this.minDateField.ToString("yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture.DateTimeFormat)); + } + if (this.maxDateFieldSet) + { + writer.WriteAttributeString("MaxDate", this.maxDateField.ToString("yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture.DateTimeFormat)); + } + if (this.languagesFieldSet) + { + writer.WriteAttributeString("Languages", this.languagesField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("ShortName" == name)) + { + this.shortNameField = value; + this.shortNameFieldSet = true; + } + if (("MinSize" == name)) + { + this.minSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.minSizeFieldSet = true; + } + if (("MaxSize" == name)) + { + this.maxSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.maxSizeFieldSet = true; + } + if (("MinVersion" == name)) + { + this.minVersionField = value; + this.minVersionFieldSet = true; + } + if (("MaxVersion" == name)) + { + this.maxVersionField = value; + this.maxVersionFieldSet = true; + } + if (("MinDate" == name)) + { + this.minDateField = Convert.ToDateTime(value, CultureInfo.InvariantCulture); + this.minDateFieldSet = true; + } + if (("MaxDate" == name)) + { + this.maxDateField = Convert.ToDateTime(value, CultureInfo.InvariantCulture); + this.maxDateFieldSet = true; + } + if (("Languages" == name)) + { + this.languagesField = value; + this.languagesFieldSet = true; + } + } + } + + /// + /// References an existing FileSearch element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class FileSearchRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// Specify the Id to the FileSearch to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FileSearchRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Searches for directory and assigns to value of parent Property. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class DirectorySearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string pathField; + + private bool pathFieldSet; + + private int depthField; + + private bool depthFieldSet; + + private YesNoType assignToPropertyField; + + private bool assignToPropertyFieldSet; + + private ISchemaElement parentElement; + + public DirectorySearch() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Unique identifier for the directory search. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Path on the user's system. Either absolute, or relative to containing directories. + /// + public string Path + { + get + { + return this.pathField; + } + set + { + this.pathFieldSet = true; + this.pathField = value; + } + } + + /// + /// Depth below the path that the installer searches for the file or directory specified by the search. See remarks for more information. + /// + public int Depth + { + get + { + return this.depthField; + } + set + { + this.depthFieldSet = true; + this.depthField = value; + } + } + + /// + /// Set the value of the outer Property to the result of this search. See remarks for more information. + /// + public YesNoType AssignToProperty + { + get + { + return this.assignToPropertyField; + } + set + { + this.assignToPropertyFieldSet = true; + this.assignToPropertyField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("DirectorySearch" == childName)) + { + childValue = new DirectorySearch(); + } + if (("DirectorySearchRef" == childName)) + { + childValue = new DirectorySearchRef(); + } + if (("FileSearch" == childName)) + { + childValue = new FileSearch(); + } + if (("FileSearchRef" == childName)) + { + childValue = new FileSearchRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DirectorySearch", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.pathFieldSet) + { + writer.WriteAttributeString("Path", this.pathField); + } + if (this.depthFieldSet) + { + writer.WriteAttributeString("Depth", this.depthField.ToString(CultureInfo.InvariantCulture)); + } + if (this.assignToPropertyFieldSet) + { + if ((this.assignToPropertyField == YesNoType.no)) + { + writer.WriteAttributeString("AssignToProperty", "no"); + } + if ((this.assignToPropertyField == YesNoType.yes)) + { + writer.WriteAttributeString("AssignToProperty", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Path" == name)) + { + this.pathField = value; + this.pathFieldSet = true; + } + if (("Depth" == name)) + { + this.depthField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.depthFieldSet = true; + } + if (("AssignToProperty" == name)) + { + this.assignToPropertyField = Enums.ParseYesNoType(value); + this.assignToPropertyFieldSet = true; + } + } + } + + /// + /// References an existing DirectorySearch element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class DirectorySearchRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string parentField; + + private bool parentFieldSet; + + private string pathField; + + private bool pathFieldSet; + + private ISchemaElement parentElement; + + public DirectorySearchRef() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Id of the search being referred to. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// 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. + /// + public string Parent + { + get + { + return this.parentField; + } + set + { + this.parentFieldSet = true; + this.parentField = value; + } + } + + /// + /// Path on the user's system. Either absolute, or relative to containing directories. + /// + public string Path + { + get + { + return this.pathField; + } + set + { + this.pathFieldSet = true; + this.pathField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("DirectorySearch" == childName)) + { + childValue = new DirectorySearch(); + } + if (("DirectorySearchRef" == childName)) + { + childValue = new DirectorySearchRef(); + } + if (("FileSearch" == childName)) + { + childValue = new FileSearch(); + } + if (("FileSearchRef" == childName)) + { + childValue = new FileSearchRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DirectorySearchRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.parentFieldSet) + { + writer.WriteAttributeString("Parent", this.parentField); + } + if (this.pathFieldSet) + { + writer.WriteAttributeString("Path", this.pathField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Parent" == name)) + { + this.parentField = value; + this.parentFieldSet = true; + } + if (("Path" == name)) + { + this.pathField = value; + this.pathFieldSet = true; + } + } + } + + /// + /// Searches for file or directory and assigns to value of parent Property. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ComponentSearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string guidField; + + private bool guidFieldSet; + + private TypeType typeField; + + private bool typeFieldSet; + + private ISchemaElement parentElement; + + public ComponentSearch() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The component ID of the component whose key path is to be used for the search. + /// + public string Guid + { + get + { + return this.guidField; + } + set + { + this.guidFieldSet = true; + this.guidField = value; + } + } + + /// + /// Must be file if last child is FileSearch element and must be directory if last child is DirectorySearch element. + /// + public TypeType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("DirectorySearch" == childName)) + { + childValue = new DirectorySearch(); + } + if (("DirectorySearchRef" == childName)) + { + childValue = new DirectorySearchRef(); + } + if (("FileSearch" == childName)) + { + childValue = new FileSearch(); + } + if (("FileSearchRef" == childName)) + { + childValue = new FileSearchRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a TypeType from a string. + /// + public static TypeType ParseTypeType(string value) + { + TypeType parsedValue; + ComponentSearch.TryParseTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypeType from a string. + /// + public static bool TryParseTypeType(string value, out TypeType parsedValue) + { + parsedValue = TypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("directory" == value)) + { + parsedValue = TypeType.directory; + } + else + { + if (("file" == value)) + { + parsedValue = TypeType.file; + } + else + { + parsedValue = TypeType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ComponentSearch", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.guidFieldSet) + { + writer.WriteAttributeString("Guid", this.guidField); + } + if (this.typeFieldSet) + { + if ((this.typeField == TypeType.directory)) + { + writer.WriteAttributeString("Type", "directory"); + } + if ((this.typeField == TypeType.file)) + { + writer.WriteAttributeString("Type", "file"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Guid" == name)) + { + this.guidField = value; + this.guidFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = ComponentSearch.ParseTypeType(value); + this.typeFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum TypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// The key path of the component is a directory. + /// + directory, + + /// + /// The key path of the component is a file. This is the default value. + /// + file, + } + } + + /// + /// Searches for file, directory or registry key and assigns to value of parent Property + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class IniFileSearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private int fieldField; + + private bool fieldFieldSet; + + private string keyField; + + private bool keyFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string sectionField; + + private bool sectionFieldSet; + + private string shortNameField; + + private bool shortNameFieldSet; + + private TypeType typeField; + + private bool typeFieldSet; + + private ISchemaElement parentElement; + + public IniFileSearch() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// External key into the Signature table. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The field in the .ini line. If field is Null or 0, the entire line is read. + /// + public int Field + { + get + { + return this.fieldField; + } + set + { + this.fieldFieldSet = true; + this.fieldField = value; + } + } + + /// + /// The key value within the section. + /// + public string Key + { + get + { + return this.keyField; + } + set + { + this.keyFieldSet = true; + this.keyField = value; + } + } + + /// + /// In prior versions of the WiX toolset, this attribute specified the short name. + /// This attribute's value may now be either a short or long name. + /// If a short name is specified, the ShortName attribute may not be specified. + /// Also, if this value is a long name, the ShortName attribute may be omitted to + /// allow WiX to attempt to generate a unique short name. + /// However, if you wish to manually specify the short name, then the ShortName + /// attribute may be specified. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The localizable .ini file section. + /// + public string Section + { + get + { + return this.sectionField; + } + set + { + this.sectionFieldSet = true; + this.sectionField = value; + } + } + + /// + /// The short name of the file in 8.3 format. + /// This attribute should only be set if the user wants to manually specify the short name. + /// + public string ShortName + { + get + { + return this.shortNameField; + } + set + { + this.shortNameFieldSet = true; + this.shortNameField = value; + } + } + + /// + /// Must be file if last child is FileSearch element and must be directory if last child is DirectorySearch element. + /// + public TypeType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("DirectorySearch" == childName)) + { + childValue = new DirectorySearch(); + } + if (("DirectorySearchRef" == childName)) + { + childValue = new DirectorySearchRef(); + } + if (("FileSearch" == childName)) + { + childValue = new FileSearch(); + } + if (("FileSearchRef" == childName)) + { + childValue = new FileSearchRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a TypeType from a string. + /// + public static TypeType ParseTypeType(string value) + { + TypeType parsedValue; + IniFileSearch.TryParseTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypeType from a string. + /// + public static bool TryParseTypeType(string value, out TypeType parsedValue) + { + parsedValue = TypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("directory" == value)) + { + parsedValue = TypeType.directory; + } + else + { + if (("file" == value)) + { + parsedValue = TypeType.file; + } + else + { + if (("raw" == value)) + { + parsedValue = TypeType.raw; + } + else + { + parsedValue = TypeType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("IniFileSearch", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.fieldFieldSet) + { + writer.WriteAttributeString("Field", this.fieldField.ToString(CultureInfo.InvariantCulture)); + } + if (this.keyFieldSet) + { + writer.WriteAttributeString("Key", this.keyField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.sectionFieldSet) + { + writer.WriteAttributeString("Section", this.sectionField); + } + if (this.shortNameFieldSet) + { + writer.WriteAttributeString("ShortName", this.shortNameField); + } + if (this.typeFieldSet) + { + if ((this.typeField == TypeType.directory)) + { + writer.WriteAttributeString("Type", "directory"); + } + if ((this.typeField == TypeType.file)) + { + writer.WriteAttributeString("Type", "file"); + } + if ((this.typeField == TypeType.raw)) + { + writer.WriteAttributeString("Type", "raw"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Field" == name)) + { + this.fieldField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.fieldFieldSet = true; + } + if (("Key" == name)) + { + this.keyField = value; + this.keyFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Section" == name)) + { + this.sectionField = value; + this.sectionFieldSet = true; + } + if (("ShortName" == name)) + { + this.shortNameField = value; + this.shortNameFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = IniFileSearch.ParseTypeType(value); + this.typeFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum TypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// A directory location. + /// + directory, + + /// + /// A file location. This is the default value. + /// + file, + + /// + /// A raw .ini value. + /// + raw, + } + } + + /// + /// Searches for file, directory or registry key and assigns to value of parent Property + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegistrySearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private RootType rootField; + + private bool rootFieldSet; + + private string keyField; + + private bool keyFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private TypeType typeField; + + private bool typeFieldSet; + + private YesNoType win64Field; + + private bool win64FieldSet; + + private ISchemaElement parentElement; + + public RegistrySearch() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Signature to be used for the file, directory or registry key being searched for. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Root key for the registry value. + /// + public RootType Root + { + get + { + return this.rootField; + } + set + { + this.rootFieldSet = true; + this.rootField = value; + } + } + + /// + /// Key for the registry value. + /// + public string Key + { + get + { + return this.keyField; + } + set + { + this.keyFieldSet = true; + this.keyField = value; + } + } + + /// + /// Registry value name. If this value is null, then the value from the key's unnamed or default value, if any, is retrieved. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The value must be 'file' if the child is a FileSearch element, and must be 'directory' if child is a DirectorySearch element. + /// + public TypeType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + /// + /// 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 based on the platform set by the -arch switch to candle.exe + /// or the InstallerPlatform property in a .wixproj MSBuild project: + /// For x86 and ARM, the default value is 'no'. + /// For x64 and IA64, the default value is 'yes'. + /// + public YesNoType Win64 + { + get + { + return this.win64Field; + } + set + { + this.win64FieldSet = true; + this.win64Field = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("DirectorySearch" == childName)) + { + childValue = new DirectorySearch(); + } + if (("DirectorySearchRef" == childName)) + { + childValue = new DirectorySearchRef(); + } + if (("FileSearch" == childName)) + { + childValue = new FileSearch(); + } + if (("FileSearchRef" == childName)) + { + childValue = new FileSearchRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a RootType from a string. + /// + public static RootType ParseRootType(string value) + { + RootType parsedValue; + RegistrySearch.TryParseRootType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a RootType from a string. + /// + public static bool TryParseRootType(string value, out RootType parsedValue) + { + parsedValue = RootType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("HKCR" == value)) + { + parsedValue = RootType.HKCR; + } + else + { + if (("HKCU" == value)) + { + parsedValue = RootType.HKCU; + } + else + { + if (("HKLM" == value)) + { + parsedValue = RootType.HKLM; + } + else + { + if (("HKU" == value)) + { + parsedValue = RootType.HKU; + } + else + { + parsedValue = RootType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Parses a TypeType from a string. + /// + public static TypeType ParseTypeType(string value) + { + TypeType parsedValue; + RegistrySearch.TryParseTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypeType from a string. + /// + public static bool TryParseTypeType(string value, out TypeType parsedValue) + { + parsedValue = TypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("directory" == value)) + { + parsedValue = TypeType.directory; + } + else + { + if (("file" == value)) + { + parsedValue = TypeType.file; + } + else + { + if (("raw" == value)) + { + parsedValue = TypeType.raw; + } + else + { + parsedValue = TypeType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegistrySearch", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.rootFieldSet) + { + if ((this.rootField == RootType.HKCR)) + { + writer.WriteAttributeString("Root", "HKCR"); + } + if ((this.rootField == RootType.HKCU)) + { + writer.WriteAttributeString("Root", "HKCU"); + } + if ((this.rootField == RootType.HKLM)) + { + writer.WriteAttributeString("Root", "HKLM"); + } + if ((this.rootField == RootType.HKU)) + { + writer.WriteAttributeString("Root", "HKU"); + } + } + if (this.keyFieldSet) + { + writer.WriteAttributeString("Key", this.keyField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.typeFieldSet) + { + if ((this.typeField == TypeType.directory)) + { + writer.WriteAttributeString("Type", "directory"); + } + if ((this.typeField == TypeType.file)) + { + writer.WriteAttributeString("Type", "file"); + } + if ((this.typeField == TypeType.raw)) + { + writer.WriteAttributeString("Type", "raw"); + } + } + if (this.win64FieldSet) + { + if ((this.win64Field == YesNoType.no)) + { + writer.WriteAttributeString("Win64", "no"); + } + if ((this.win64Field == YesNoType.yes)) + { + writer.WriteAttributeString("Win64", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Root" == name)) + { + this.rootField = RegistrySearch.ParseRootType(value); + this.rootFieldSet = true; + } + if (("Key" == name)) + { + this.keyField = value; + this.keyFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = RegistrySearch.ParseTypeType(value); + this.typeFieldSet = true; + } + if (("Win64" == name)) + { + this.win64Field = Enums.ParseYesNoType(value); + this.win64FieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum RootType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// HKEY_CLASSES_ROOT + /// + HKCR, + + /// + /// HKEY_CURRENT_USER + /// + HKCU, + + /// + /// HKEY_LOCAL_MACHINE + /// + HKLM, + + /// + /// HKEY_USERS + /// + HKU, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum TypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// The registry value contains the path to a directory. + /// + directory, + + /// + /// 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. + /// + file, + + /// + /// Sets the raw value from the registry value. Please note that this value will contain a prefix as follows: + /// + raw, + } + } + + /// + /// References an existing RegistrySearch element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegistrySearchRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// Specify the Id of the RegistrySearch to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegistrySearchRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Sets the parent of a nested DirectorySearch element to CCP_DRIVE. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ComplianceDrive : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private ISchemaElement parentElement; + + public ComplianceDrive() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("DirectorySearch" == childName)) + { + childValue = new DirectorySearch(); + } + if (("DirectorySearchRef" == childName)) + { + childValue = new DirectorySearchRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ComplianceDrive", "http://wixtoolset.org/schemas/v4/wxs"); + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + } + } + + /// + /// Adds a row to the CCPSearch table. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ComplianceCheck : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private ISchemaElement parentElement; + + public ComplianceCheck() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComplianceDrive))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComponentSearch))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearch))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(IniFileSearch))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearch))); + childCollection0.AddCollection(childCollection1); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ComplianceDrive" == childName)) + { + childValue = new ComplianceDrive(); + } + if (("ComponentSearch" == childName)) + { + childValue = new ComponentSearch(); + } + if (("RegistrySearch" == childName)) + { + childValue = new RegistrySearch(); + } + if (("IniFileSearch" == childName)) + { + childValue = new IniFileSearch(); + } + if (("DirectorySearch" == childName)) + { + childValue = new DirectorySearch(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ComplianceCheck", "http://wixtoolset.org/schemas/v4/wxs"); + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + } + } + + /// + /// Property value for a Package or Module. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Property : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private YesNoType complianceCheckField; + + private bool complianceCheckFieldSet; + + private YesNoType adminField; + + private bool adminFieldSet; + + private YesNoType secureField; + + private bool secureFieldSet; + + private YesNoType hiddenField; + + private bool hiddenFieldSet; + + private YesNoType suppressModularizationField; + + private bool suppressModularizationFieldSet; + + private ISchemaElement parentElement; + + public Property() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComplianceDrive))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComponentSearch))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearch))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearchRef))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(IniFileSearch))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearch))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearchRef))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ProductSearch))); + childCollection0.AddCollection(childCollection1); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Unique identifier for Property. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Sets a default value for the property. The value will be overwritten if the Property is used for a search. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// Adds a row to the CCPSearch table. This attribute is only valid when this Property contains a search element. + /// + public YesNoType ComplianceCheck + { + get + { + return this.complianceCheckField; + } + set + { + this.complianceCheckFieldSet = true; + this.complianceCheckField = value; + } + } + + /// + /// Denotes that the Property is saved during + /// + public YesNoType Admin + { + get + { + return this.adminField; + } + set + { + this.adminFieldSet = true; + this.adminField = value; + } + } + + /// + /// Denotes that the Property can be passed to the server side when doing a managed installation with elevated privileges. See the + /// + public YesNoType Secure + { + get + { + return this.secureField; + } + set + { + this.secureFieldSet = true; + this.secureField = value; + } + } + + /// + /// Denotes that the Property is not logged during installation. See the + /// + public YesNoType Hidden + { + get + { + return this.hiddenField; + } + set + { + this.hiddenFieldSet = true; + this.hiddenField = value; + } + } + + /// + /// Use to suppress modularization of this property identifier in merge modules. + /// Using this functionality is strongly discouraged; it should only be + /// necessary as a workaround of last resort in rare scenarios. + /// + public YesNoType SuppressModularization + { + get + { + return this.suppressModularizationField; + } + set + { + this.suppressModularizationFieldSet = true; + this.suppressModularizationField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ComplianceDrive" == childName)) + { + childValue = new ComplianceDrive(); + } + if (("ComponentSearch" == childName)) + { + childValue = new ComponentSearch(); + } + if (("RegistrySearch" == childName)) + { + childValue = new RegistrySearch(); + } + if (("RegistrySearchRef" == childName)) + { + childValue = new RegistrySearchRef(); + } + if (("IniFileSearch" == childName)) + { + childValue = new IniFileSearch(); + } + if (("DirectorySearch" == childName)) + { + childValue = new DirectorySearch(); + } + if (("DirectorySearchRef" == childName)) + { + childValue = new DirectorySearchRef(); + } + if (("ProductSearch" == childName)) + { + childValue = new ProductSearch(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Property", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.complianceCheckFieldSet) + { + if ((this.complianceCheckField == YesNoType.no)) + { + writer.WriteAttributeString("ComplianceCheck", "no"); + } + if ((this.complianceCheckField == YesNoType.yes)) + { + writer.WriteAttributeString("ComplianceCheck", "yes"); + } + } + if (this.adminFieldSet) + { + if ((this.adminField == YesNoType.no)) + { + writer.WriteAttributeString("Admin", "no"); + } + if ((this.adminField == YesNoType.yes)) + { + writer.WriteAttributeString("Admin", "yes"); + } + } + if (this.secureFieldSet) + { + if ((this.secureField == YesNoType.no)) + { + writer.WriteAttributeString("Secure", "no"); + } + if ((this.secureField == YesNoType.yes)) + { + writer.WriteAttributeString("Secure", "yes"); + } + } + if (this.hiddenFieldSet) + { + if ((this.hiddenField == YesNoType.no)) + { + writer.WriteAttributeString("Hidden", "no"); + } + if ((this.hiddenField == YesNoType.yes)) + { + writer.WriteAttributeString("Hidden", "yes"); + } + } + if (this.suppressModularizationFieldSet) + { + if ((this.suppressModularizationField == YesNoType.no)) + { + writer.WriteAttributeString("SuppressModularization", "no"); + } + if ((this.suppressModularizationField == YesNoType.yes)) + { + writer.WriteAttributeString("SuppressModularization", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("ComplianceCheck" == name)) + { + this.complianceCheckField = Enums.ParseYesNoType(value); + this.complianceCheckFieldSet = true; + } + if (("Admin" == name)) + { + this.adminField = Enums.ParseYesNoType(value); + this.adminFieldSet = true; + } + if (("Secure" == name)) + { + this.secureField = Enums.ParseYesNoType(value); + this.secureFieldSet = true; + } + if (("Hidden" == name)) + { + this.hiddenField = Enums.ParseYesNoType(value); + this.hiddenFieldSet = true; + } + if (("SuppressModularization" == name)) + { + this.suppressModularizationField = Enums.ParseYesNoType(value); + this.suppressModularizationFieldSet = true; + } + } + } + + /// + /// Reference to a Property value. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PropertyRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier of Property to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PropertyRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Shortcut, default target is parent File, CreateFolder, or Component's Directory + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Shortcut : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string directoryField; + + private bool directoryFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string shortNameField; + + private bool shortNameFieldSet; + + private string targetField; + + private bool targetFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string argumentsField; + + private bool argumentsFieldSet; + + private int hotkeyField; + + private bool hotkeyFieldSet; + + private string iconField; + + private bool iconFieldSet; + + private int iconIndexField; + + private bool iconIndexFieldSet; + + private ShowType showField; + + private bool showFieldSet; + + private string workingDirectoryField; + + private bool workingDirectoryFieldSet; + + private YesNoType advertiseField; + + private bool advertiseFieldSet; + + private string displayResourceDllField; + + private bool displayResourceDllFieldSet; + + private int displayResourceIdField; + + private bool displayResourceIdFieldSet; + + private string descriptionResourceDllField; + + private bool descriptionResourceDllFieldSet; + + private int descriptionResourceIdField; + + private bool descriptionResourceIdFieldSet; + + private ISchemaElement parentElement; + + public Shortcut() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Icon))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ShortcutProperty))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Unique identifier for the shortcut. This value will serve as the primary key for the row. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// 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. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + /// + /// In prior versions of the WiX toolset, this attribute specified the short name. + /// This attribute's value may now be either a short or long name. + /// If a short name is specified, the ShortName attribute may not be specified. + /// Also, if this value is a long name, the ShortName attribute may be omitted to + /// allow WiX to attempt to generate a unique short name. + /// However, if this name collides with another shortcut or you wish to manually specify + /// the short name, then the ShortName attribute may be specified. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The short name of the shortcut in 8.3 format. + /// This attribute should only be set if there is a conflict between generated short names + /// or the user wants to manually specify the short name. + /// + public string ShortName + { + get + { + return this.shortNameField; + } + set + { + this.shortNameFieldSet = true; + this.shortNameField = value; + } + } + + /// + /// This attribute can only be set if this Shortcut element is nested under a Component element. + /// When nested under a Component element, this attribute's value will default to the parent directory. + /// This attribute's value is the target for a non-advertised shortcut. + /// This attribute is not valid for advertised shortcuts. + /// 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. + /// + public string Target + { + get + { + return this.targetField; + } + set + { + this.targetFieldSet = true; + this.targetField = value; + } + } + + /// + /// The localizable description for the shortcut. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// The command-line arguments for the shortcut. Note that the resolution of properties + /// in the Arguments field is limited. A property formatted as [Property] in this field can only be resolved if the + /// property already has the intended value when the component owning the shortcut is installed. For example, for the + /// argument "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and + /// the component that owns the shortcut. + /// + public string Arguments + { + get + { + return this.argumentsField; + } + set + { + this.argumentsFieldSet = true; + this.argumentsField = value; + } + } + + /// + /// The hotkey for the shortcut. The low-order byte contains the virtual-key code for + /// the key, and the high-order byte contains modifier flags. This must be a non-negative number. Authors of + /// installation packages are generally recommend not to set this option, because this can add duplicate hotkeys to a + /// users desktop. In addition, the practice of assigning hotkeys to shortcuts can be problematic for users using hotkeys + /// for accessibility. + /// + public int Hotkey + { + get + { + return this.hotkeyField; + } + set + { + this.hotkeyFieldSet = true; + this.hotkeyField = value; + } + } + + /// + /// Identifier reference to Icon element. The Icon identifier should have the same extension + /// as the file that it points at. For example, a shortcut to an executable (e.g. "my.exe") should reference an Icon with identifier + /// like "MyIcon.exe" + /// + public string Icon + { + get + { + return this.iconField; + } + set + { + this.iconFieldSet = true; + this.iconField = value; + } + } + + /// + /// Identifier reference to Icon element. + /// + public int IconIndex + { + get + { + return this.iconIndexField; + } + set + { + this.iconIndexFieldSet = true; + this.iconIndexField = value; + } + } + + public ShowType Show + { + get + { + return this.showField; + } + set + { + this.showFieldSet = true; + this.showField = value; + } + } + + /// + /// Directory identifier (or Property identifier that resolves to a directory) that resolves + /// to the path of the working directory for the shortcut. + /// + public string WorkingDirectory + { + get + { + return this.workingDirectoryField; + } + set + { + this.workingDirectoryFieldSet = true; + this.workingDirectoryField = value; + } + } + + /// + /// Specifies if the shortcut should be advertised or not. Note that advertised shortcuts + /// always point at a particular application, identified by a ProductCode, and should not be shared between applications. + /// Advertised shortcuts only work for the most recently installed application, and are removed when that application is + /// removed. The default value is 'no'. + /// + public YesNoType Advertise + { + get + { + return this.advertiseField; + } + set + { + this.advertiseFieldSet = true; + this.advertiseField = value; + } + } + + /// + /// The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally + /// authored using [#filekey] form. When this attribute is specified, the DisplayResourceId attribute must also + /// be provided. + /// + /// This attribute is only used on Windows Vista and above. If this attribute is not populated and the install + /// is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and + /// the install is running on Vista and above, the value in the Name attribute is ignored. + /// + public string DisplayResourceDll + { + get + { + return this.displayResourceDllField; + } + set + { + this.displayResourceDllFieldSet = true; + this.displayResourceDllField = value; + } + } + + /// + /// The display name index for the shortcut. This must be a non-negative number. When this attribute is specified, the + /// DisplayResourceDll attribute must also be provided. + /// + /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install + /// is running on Vista and above, the value in the Name attribute is used. If this attribute is specified and + /// the install is running on Vista and above, the value in the Name attribute is ignored. + /// + public int DisplayResourceId + { + get + { + return this.displayResourceIdField; + } + set + { + this.displayResourceIdFieldSet = true; + this.displayResourceIdField = value; + } + } + + /// + /// The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally + /// authored using [#filekey] form. When this attribute is specified, the DescriptionResourceId attribute must also + /// be provided. + /// + /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install + /// is running on Vista and above, the value in the Name attribute is used. If this attribute is provided and + /// the install is running on Vista and above, the value in the Name attribute is ignored. + /// + public string DescriptionResourceDll + { + get + { + return this.descriptionResourceDllField; + } + set + { + this.descriptionResourceDllFieldSet = true; + this.descriptionResourceDllField = value; + } + } + + /// + /// The description name index for the shortcut. This must be a non-negative number. When this attribute is specified, + /// the DescriptionResourceDll attribute must also be populated. + /// + /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install + /// is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and the + /// install is running on Vista and above, the value in the Name attribute is ignored. + /// + public int DescriptionResourceId + { + get + { + return this.descriptionResourceIdField; + } + set + { + this.descriptionResourceIdFieldSet = true; + this.descriptionResourceIdField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Icon" == childName)) + { + childValue = new Icon(); + } + if (("ShortcutProperty" == childName)) + { + childValue = new ShortcutProperty(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a ShowType from a string. + /// + public static ShowType ParseShowType(string value) + { + ShowType parsedValue; + Shortcut.TryParseShowType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ShowType from a string. + /// + public static bool TryParseShowType(string value, out ShowType parsedValue) + { + parsedValue = ShowType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("normal" == value)) + { + parsedValue = ShowType.normal; + } + else + { + if (("minimized" == value)) + { + parsedValue = ShowType.minimized; + } + else + { + if (("maximized" == value)) + { + parsedValue = ShowType.maximized; + } + else + { + parsedValue = ShowType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Shortcut", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.shortNameFieldSet) + { + writer.WriteAttributeString("ShortName", this.shortNameField); + } + if (this.targetFieldSet) + { + writer.WriteAttributeString("Target", this.targetField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.argumentsFieldSet) + { + writer.WriteAttributeString("Arguments", this.argumentsField); + } + if (this.hotkeyFieldSet) + { + writer.WriteAttributeString("Hotkey", this.hotkeyField.ToString(CultureInfo.InvariantCulture)); + } + if (this.iconFieldSet) + { + writer.WriteAttributeString("Icon", this.iconField); + } + if (this.iconIndexFieldSet) + { + writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture)); + } + if (this.showFieldSet) + { + if ((this.showField == ShowType.normal)) + { + writer.WriteAttributeString("Show", "normal"); + } + if ((this.showField == ShowType.minimized)) + { + writer.WriteAttributeString("Show", "minimized"); + } + if ((this.showField == ShowType.maximized)) + { + writer.WriteAttributeString("Show", "maximized"); + } + } + if (this.workingDirectoryFieldSet) + { + writer.WriteAttributeString("WorkingDirectory", this.workingDirectoryField); + } + if (this.advertiseFieldSet) + { + if ((this.advertiseField == YesNoType.no)) + { + writer.WriteAttributeString("Advertise", "no"); + } + if ((this.advertiseField == YesNoType.yes)) + { + writer.WriteAttributeString("Advertise", "yes"); + } + } + if (this.displayResourceDllFieldSet) + { + writer.WriteAttributeString("DisplayResourceDll", this.displayResourceDllField); + } + if (this.displayResourceIdFieldSet) + { + writer.WriteAttributeString("DisplayResourceId", this.displayResourceIdField.ToString(CultureInfo.InvariantCulture)); + } + if (this.descriptionResourceDllFieldSet) + { + writer.WriteAttributeString("DescriptionResourceDll", this.descriptionResourceDllField); + } + if (this.descriptionResourceIdFieldSet) + { + writer.WriteAttributeString("DescriptionResourceId", this.descriptionResourceIdField.ToString(CultureInfo.InvariantCulture)); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("ShortName" == name)) + { + this.shortNameField = value; + this.shortNameFieldSet = true; + } + if (("Target" == name)) + { + this.targetField = value; + this.targetFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("Arguments" == name)) + { + this.argumentsField = value; + this.argumentsFieldSet = true; + } + if (("Hotkey" == name)) + { + this.hotkeyField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.hotkeyFieldSet = true; + } + if (("Icon" == name)) + { + this.iconField = value; + this.iconFieldSet = true; + } + if (("IconIndex" == name)) + { + this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.iconIndexFieldSet = true; + } + if (("Show" == name)) + { + this.showField = Shortcut.ParseShowType(value); + this.showFieldSet = true; + } + if (("WorkingDirectory" == name)) + { + this.workingDirectoryField = value; + this.workingDirectoryFieldSet = true; + } + if (("Advertise" == name)) + { + this.advertiseField = Enums.ParseYesNoType(value); + this.advertiseFieldSet = true; + } + if (("DisplayResourceDll" == name)) + { + this.displayResourceDllField = value; + this.displayResourceDllFieldSet = true; + } + if (("DisplayResourceId" == name)) + { + this.displayResourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.displayResourceIdFieldSet = true; + } + if (("DescriptionResourceDll" == name)) + { + this.descriptionResourceDllField = value; + this.descriptionResourceDllFieldSet = true; + } + if (("DescriptionResourceId" == name)) + { + this.descriptionResourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.descriptionResourceIdFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ShowType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// The shortcut target will be displayed using the SW_SHOWNORMAL attribute. + /// + normal, + + /// + /// The shortcut target will be displayed using the SW_SHOWMINNOACTIVE attribute. + /// + minimized, + + /// + /// The shortcut target will be displayed using the SW_SHOWMAXIMIZED attribute. + /// + maximized, + } + } + + /// + /// Property values for a shortcut. This element's functionality is available starting with MSI 5.0. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ShortcutProperty : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string keyField; + + private bool keyFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + /// + /// Unique identifier for MsiShortcutProperty table. If omitted, a stable identifier will be generated from the parent shortcut identifier and Key value. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// A formatted string identifying the property to be set. + /// + public string Key + { + get + { + return this.keyField; + } + set + { + this.keyFieldSet = true; + this.keyField = value; + } + } + + /// + /// A formatted string supplying the value of the property. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ShortcutProperty", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.keyFieldSet) + { + writer.WriteAttributeString("Key", this.keyField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Key" == name)) + { + this.keyField = value; + this.keyFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + } + + /// + /// Sets ACLs on File, Registry, or CreateFolder. When under a Registry element, this cannot be used + /// if the Action attribute's value is remove or removeKeyOnInstall. This element has no Id attribute. + /// The table and key are taken from the parent element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Permission : ISchemaElement, ISetAttributes + { + + private string domainField; + + private bool domainFieldSet; + + private string userField; + + private bool userFieldSet; + + private YesNoType readField; + + private bool readFieldSet; + + private YesNoType deleteField; + + private bool deleteFieldSet; + + private YesNoType readPermissionField; + + private bool readPermissionFieldSet; + + private YesNoType changePermissionField; + + private bool changePermissionFieldSet; + + private YesNoType takeOwnershipField; + + private bool takeOwnershipFieldSet; + + private YesNoType specificRightsAllField; + + private bool specificRightsAllFieldSet; + + private YesNoType readAttributesField; + + private bool readAttributesFieldSet; + + private YesNoType writeAttributesField; + + private bool writeAttributesFieldSet; + + private YesNoType readExtendedAttributesField; + + private bool readExtendedAttributesFieldSet; + + private YesNoType writeExtendedAttributesField; + + private bool writeExtendedAttributesFieldSet; + + private YesNoType synchronizeField; + + private bool synchronizeFieldSet; + + private YesNoType createFileField; + + private bool createFileFieldSet; + + private YesNoType createChildField; + + private bool createChildFieldSet; + + private YesNoType deleteChildField; + + private bool deleteChildFieldSet; + + private YesNoType traverseField; + + private bool traverseFieldSet; + + private YesNoType appendField; + + private bool appendFieldSet; + + private YesNoType executeField; + + private bool executeFieldSet; + + private YesNoType fileAllRightsField; + + private bool fileAllRightsFieldSet; + + private YesNoType writeField; + + private bool writeFieldSet; + + private YesNoType createSubkeysField; + + private bool createSubkeysFieldSet; + + private YesNoType enumerateSubkeysField; + + private bool enumerateSubkeysFieldSet; + + private YesNoType notifyField; + + private bool notifyFieldSet; + + private YesNoType createLinkField; + + private bool createLinkFieldSet; + + private YesNoType genericAllField; + + private bool genericAllFieldSet; + + private YesNoType genericExecuteField; + + private bool genericExecuteFieldSet; + + private YesNoType genericWriteField; + + private bool genericWriteFieldSet; + + private YesNoType genericReadField; + + private bool genericReadFieldSet; + + private ISchemaElement parentElement; + + public string Domain + { + get + { + return this.domainField; + } + set + { + this.domainFieldSet = true; + this.domainField = value; + } + } + + public string User + { + get + { + return this.userField; + } + set + { + this.userFieldSet = true; + this.userField = value; + } + } + + public YesNoType Read + { + get + { + return this.readField; + } + set + { + this.readFieldSet = true; + this.readField = value; + } + } + + public YesNoType Delete + { + get + { + return this.deleteField; + } + set + { + this.deleteFieldSet = true; + this.deleteField = value; + } + } + + public YesNoType ReadPermission + { + get + { + return this.readPermissionField; + } + set + { + this.readPermissionFieldSet = true; + this.readPermissionField = value; + } + } + + public YesNoType ChangePermission + { + get + { + return this.changePermissionField; + } + set + { + this.changePermissionFieldSet = true; + this.changePermissionField = value; + } + } + + public YesNoType TakeOwnership + { + get + { + return this.takeOwnershipField; + } + set + { + this.takeOwnershipFieldSet = true; + this.takeOwnershipField = value; + } + } + + /// + /// Bit mask for SPECIFIC_RIGHTS_ALL from WinNT.h (0x0000FFFF). + /// + public YesNoType SpecificRightsAll + { + get + { + return this.specificRightsAllField; + } + set + { + this.specificRightsAllFieldSet = true; + this.specificRightsAllField = value; + } + } + + public YesNoType ReadAttributes + { + get + { + return this.readAttributesField; + } + set + { + this.readAttributesFieldSet = true; + this.readAttributesField = value; + } + } + + public YesNoType WriteAttributes + { + get + { + return this.writeAttributesField; + } + set + { + this.writeAttributesFieldSet = true; + this.writeAttributesField = value; + } + } + + public YesNoType ReadExtendedAttributes + { + get + { + return this.readExtendedAttributesField; + } + set + { + this.readExtendedAttributesFieldSet = true; + this.readExtendedAttributesField = value; + } + } + + public YesNoType WriteExtendedAttributes + { + get + { + return this.writeExtendedAttributesField; + } + set + { + this.writeExtendedAttributesFieldSet = true; + this.writeExtendedAttributesField = value; + } + } + + public YesNoType Synchronize + { + get + { + return this.synchronizeField; + } + set + { + this.synchronizeFieldSet = true; + this.synchronizeField = value; + } + } + + /// + /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent. + /// + public YesNoType CreateFile + { + get + { + return this.createFileField; + } + set + { + this.createFileFieldSet = true; + this.createFileField = value; + } + } + + /// + /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent. + /// + public YesNoType CreateChild + { + get + { + return this.createChildField; + } + set + { + this.createChildFieldSet = true; + this.createChildField = value; + } + } + + /// + /// 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. + /// + public YesNoType DeleteChild + { + get + { + return this.deleteChildField; + } + set + { + this.deleteChildFieldSet = true; + this.deleteChildField = value; + } + } + + /// + /// 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. + /// + public YesNoType Traverse + { + get + { + return this.traverseField; + } + set + { + this.traverseFieldSet = true; + this.traverseField = value; + } + } + + public YesNoType Append + { + get + { + return this.appendField; + } + set + { + this.appendFieldSet = true; + this.appendField = value; + } + } + + public YesNoType Execute + { + get + { + return this.executeField; + } + set + { + this.executeFieldSet = true; + this.executeField = value; + } + } + + /// + /// Bit mask for FILE_ALL_ACCESS from WinNT.h (0x001F01FF). + /// + public YesNoType FileAllRights + { + get + { + return this.fileAllRightsField; + } + set + { + this.fileAllRightsFieldSet = true; + this.fileAllRightsField = value; + } + } + + public YesNoType Write + { + get + { + return this.writeField; + } + set + { + this.writeFieldSet = true; + this.writeField = value; + } + } + + public YesNoType CreateSubkeys + { + get + { + return this.createSubkeysField; + } + set + { + this.createSubkeysFieldSet = true; + this.createSubkeysField = value; + } + } + + public YesNoType EnumerateSubkeys + { + get + { + return this.enumerateSubkeysField; + } + set + { + this.enumerateSubkeysFieldSet = true; + this.enumerateSubkeysField = value; + } + } + + public YesNoType Notify + { + get + { + return this.notifyField; + } + set + { + this.notifyFieldSet = true; + this.notifyField = value; + } + } + + public YesNoType CreateLink + { + get + { + return this.createLinkField; + } + set + { + this.createLinkFieldSet = true; + this.createLinkField = value; + } + } + + public YesNoType GenericAll + { + get + { + return this.genericAllField; + } + set + { + this.genericAllFieldSet = true; + this.genericAllField = value; + } + } + + public YesNoType GenericExecute + { + get + { + return this.genericExecuteField; + } + set + { + this.genericExecuteFieldSet = true; + this.genericExecuteField = value; + } + } + + public YesNoType GenericWrite + { + get + { + return this.genericWriteField; + } + set + { + this.genericWriteFieldSet = true; + this.genericWriteField = value; + } + } + + /// + /// specifying this will fail to grant read access + /// + public YesNoType GenericRead + { + get + { + return this.genericReadField; + } + set + { + this.genericReadFieldSet = true; + this.genericReadField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Permission", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.domainFieldSet) + { + writer.WriteAttributeString("Domain", this.domainField); + } + if (this.userFieldSet) + { + writer.WriteAttributeString("User", this.userField); + } + if (this.readFieldSet) + { + if ((this.readField == YesNoType.no)) + { + writer.WriteAttributeString("Read", "no"); + } + if ((this.readField == YesNoType.yes)) + { + writer.WriteAttributeString("Read", "yes"); + } + } + if (this.deleteFieldSet) + { + if ((this.deleteField == YesNoType.no)) + { + writer.WriteAttributeString("Delete", "no"); + } + if ((this.deleteField == YesNoType.yes)) + { + writer.WriteAttributeString("Delete", "yes"); + } + } + if (this.readPermissionFieldSet) + { + if ((this.readPermissionField == YesNoType.no)) + { + writer.WriteAttributeString("ReadPermission", "no"); + } + if ((this.readPermissionField == YesNoType.yes)) + { + writer.WriteAttributeString("ReadPermission", "yes"); + } + } + if (this.changePermissionFieldSet) + { + if ((this.changePermissionField == YesNoType.no)) + { + writer.WriteAttributeString("ChangePermission", "no"); + } + if ((this.changePermissionField == YesNoType.yes)) + { + writer.WriteAttributeString("ChangePermission", "yes"); + } + } + if (this.takeOwnershipFieldSet) + { + if ((this.takeOwnershipField == YesNoType.no)) + { + writer.WriteAttributeString("TakeOwnership", "no"); + } + if ((this.takeOwnershipField == YesNoType.yes)) + { + writer.WriteAttributeString("TakeOwnership", "yes"); + } + } + if (this.specificRightsAllFieldSet) + { + if ((this.specificRightsAllField == YesNoType.no)) + { + writer.WriteAttributeString("SpecificRightsAll", "no"); + } + if ((this.specificRightsAllField == YesNoType.yes)) + { + writer.WriteAttributeString("SpecificRightsAll", "yes"); + } + } + if (this.readAttributesFieldSet) + { + if ((this.readAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("ReadAttributes", "no"); + } + if ((this.readAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("ReadAttributes", "yes"); + } + } + if (this.writeAttributesFieldSet) + { + if ((this.writeAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("WriteAttributes", "no"); + } + if ((this.writeAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("WriteAttributes", "yes"); + } + } + if (this.readExtendedAttributesFieldSet) + { + if ((this.readExtendedAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("ReadExtendedAttributes", "no"); + } + if ((this.readExtendedAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("ReadExtendedAttributes", "yes"); + } + } + if (this.writeExtendedAttributesFieldSet) + { + if ((this.writeExtendedAttributesField == YesNoType.no)) + { + writer.WriteAttributeString("WriteExtendedAttributes", "no"); + } + if ((this.writeExtendedAttributesField == YesNoType.yes)) + { + writer.WriteAttributeString("WriteExtendedAttributes", "yes"); + } + } + if (this.synchronizeFieldSet) + { + if ((this.synchronizeField == YesNoType.no)) + { + writer.WriteAttributeString("Synchronize", "no"); + } + if ((this.synchronizeField == YesNoType.yes)) + { + writer.WriteAttributeString("Synchronize", "yes"); + } + } + if (this.createFileFieldSet) + { + if ((this.createFileField == YesNoType.no)) + { + writer.WriteAttributeString("CreateFile", "no"); + } + if ((this.createFileField == YesNoType.yes)) + { + writer.WriteAttributeString("CreateFile", "yes"); + } + } + if (this.createChildFieldSet) + { + if ((this.createChildField == YesNoType.no)) + { + writer.WriteAttributeString("CreateChild", "no"); + } + if ((this.createChildField == YesNoType.yes)) + { + writer.WriteAttributeString("CreateChild", "yes"); + } + } + if (this.deleteChildFieldSet) + { + if ((this.deleteChildField == YesNoType.no)) + { + writer.WriteAttributeString("DeleteChild", "no"); + } + if ((this.deleteChildField == YesNoType.yes)) + { + writer.WriteAttributeString("DeleteChild", "yes"); + } + } + if (this.traverseFieldSet) + { + if ((this.traverseField == YesNoType.no)) + { + writer.WriteAttributeString("Traverse", "no"); + } + if ((this.traverseField == YesNoType.yes)) + { + writer.WriteAttributeString("Traverse", "yes"); + } + } + if (this.appendFieldSet) + { + if ((this.appendField == YesNoType.no)) + { + writer.WriteAttributeString("Append", "no"); + } + if ((this.appendField == YesNoType.yes)) + { + writer.WriteAttributeString("Append", "yes"); + } + } + if (this.executeFieldSet) + { + if ((this.executeField == YesNoType.no)) + { + writer.WriteAttributeString("Execute", "no"); + } + if ((this.executeField == YesNoType.yes)) + { + writer.WriteAttributeString("Execute", "yes"); + } + } + if (this.fileAllRightsFieldSet) + { + if ((this.fileAllRightsField == YesNoType.no)) + { + writer.WriteAttributeString("FileAllRights", "no"); + } + if ((this.fileAllRightsField == YesNoType.yes)) + { + writer.WriteAttributeString("FileAllRights", "yes"); + } + } + if (this.writeFieldSet) + { + if ((this.writeField == YesNoType.no)) + { + writer.WriteAttributeString("Write", "no"); + } + if ((this.writeField == YesNoType.yes)) + { + writer.WriteAttributeString("Write", "yes"); + } + } + if (this.createSubkeysFieldSet) + { + if ((this.createSubkeysField == YesNoType.no)) + { + writer.WriteAttributeString("CreateSubkeys", "no"); + } + if ((this.createSubkeysField == YesNoType.yes)) + { + writer.WriteAttributeString("CreateSubkeys", "yes"); + } + } + if (this.enumerateSubkeysFieldSet) + { + if ((this.enumerateSubkeysField == YesNoType.no)) + { + writer.WriteAttributeString("EnumerateSubkeys", "no"); + } + if ((this.enumerateSubkeysField == YesNoType.yes)) + { + writer.WriteAttributeString("EnumerateSubkeys", "yes"); + } + } + if (this.notifyFieldSet) + { + if ((this.notifyField == YesNoType.no)) + { + writer.WriteAttributeString("Notify", "no"); + } + if ((this.notifyField == YesNoType.yes)) + { + writer.WriteAttributeString("Notify", "yes"); + } + } + if (this.createLinkFieldSet) + { + if ((this.createLinkField == YesNoType.no)) + { + writer.WriteAttributeString("CreateLink", "no"); + } + if ((this.createLinkField == YesNoType.yes)) + { + writer.WriteAttributeString("CreateLink", "yes"); + } + } + if (this.genericAllFieldSet) + { + if ((this.genericAllField == YesNoType.no)) + { + writer.WriteAttributeString("GenericAll", "no"); + } + if ((this.genericAllField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericAll", "yes"); + } + } + if (this.genericExecuteFieldSet) + { + if ((this.genericExecuteField == YesNoType.no)) + { + writer.WriteAttributeString("GenericExecute", "no"); + } + if ((this.genericExecuteField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericExecute", "yes"); + } + } + if (this.genericWriteFieldSet) + { + if ((this.genericWriteField == YesNoType.no)) + { + writer.WriteAttributeString("GenericWrite", "no"); + } + if ((this.genericWriteField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericWrite", "yes"); + } + } + if (this.genericReadFieldSet) + { + if ((this.genericReadField == YesNoType.no)) + { + writer.WriteAttributeString("GenericRead", "no"); + } + if ((this.genericReadField == YesNoType.yes)) + { + writer.WriteAttributeString("GenericRead", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Domain" == name)) + { + this.domainField = value; + this.domainFieldSet = true; + } + if (("User" == name)) + { + this.userField = value; + this.userFieldSet = true; + } + if (("Read" == name)) + { + this.readField = Enums.ParseYesNoType(value); + this.readFieldSet = true; + } + if (("Delete" == name)) + { + this.deleteField = Enums.ParseYesNoType(value); + this.deleteFieldSet = true; + } + if (("ReadPermission" == name)) + { + this.readPermissionField = Enums.ParseYesNoType(value); + this.readPermissionFieldSet = true; + } + if (("ChangePermission" == name)) + { + this.changePermissionField = Enums.ParseYesNoType(value); + this.changePermissionFieldSet = true; + } + if (("TakeOwnership" == name)) + { + this.takeOwnershipField = Enums.ParseYesNoType(value); + this.takeOwnershipFieldSet = true; + } + if (("SpecificRightsAll" == name)) + { + this.specificRightsAllField = Enums.ParseYesNoType(value); + this.specificRightsAllFieldSet = true; + } + if (("ReadAttributes" == name)) + { + this.readAttributesField = Enums.ParseYesNoType(value); + this.readAttributesFieldSet = true; + } + if (("WriteAttributes" == name)) + { + this.writeAttributesField = Enums.ParseYesNoType(value); + this.writeAttributesFieldSet = true; + } + if (("ReadExtendedAttributes" == name)) + { + this.readExtendedAttributesField = Enums.ParseYesNoType(value); + this.readExtendedAttributesFieldSet = true; + } + if (("WriteExtendedAttributes" == name)) + { + this.writeExtendedAttributesField = Enums.ParseYesNoType(value); + this.writeExtendedAttributesFieldSet = true; + } + if (("Synchronize" == name)) + { + this.synchronizeField = Enums.ParseYesNoType(value); + this.synchronizeFieldSet = true; + } + if (("CreateFile" == name)) + { + this.createFileField = Enums.ParseYesNoType(value); + this.createFileFieldSet = true; + } + if (("CreateChild" == name)) + { + this.createChildField = Enums.ParseYesNoType(value); + this.createChildFieldSet = true; + } + if (("DeleteChild" == name)) + { + this.deleteChildField = Enums.ParseYesNoType(value); + this.deleteChildFieldSet = true; + } + if (("Traverse" == name)) + { + this.traverseField = Enums.ParseYesNoType(value); + this.traverseFieldSet = true; + } + if (("Append" == name)) + { + this.appendField = Enums.ParseYesNoType(value); + this.appendFieldSet = true; + } + if (("Execute" == name)) + { + this.executeField = Enums.ParseYesNoType(value); + this.executeFieldSet = true; + } + if (("FileAllRights" == name)) + { + this.fileAllRightsField = Enums.ParseYesNoType(value); + this.fileAllRightsFieldSet = true; + } + if (("Write" == name)) + { + this.writeField = Enums.ParseYesNoType(value); + this.writeFieldSet = true; + } + if (("CreateSubkeys" == name)) + { + this.createSubkeysField = Enums.ParseYesNoType(value); + this.createSubkeysFieldSet = true; + } + if (("EnumerateSubkeys" == name)) + { + this.enumerateSubkeysField = Enums.ParseYesNoType(value); + this.enumerateSubkeysFieldSet = true; + } + if (("Notify" == name)) + { + this.notifyField = Enums.ParseYesNoType(value); + this.notifyFieldSet = true; + } + if (("CreateLink" == name)) + { + this.createLinkField = Enums.ParseYesNoType(value); + this.createLinkFieldSet = true; + } + if (("GenericAll" == name)) + { + this.genericAllField = Enums.ParseYesNoType(value); + this.genericAllFieldSet = true; + } + if (("GenericExecute" == name)) + { + this.genericExecuteField = Enums.ParseYesNoType(value); + this.genericExecuteFieldSet = true; + } + if (("GenericWrite" == name)) + { + this.genericWriteField = Enums.ParseYesNoType(value); + this.genericWriteFieldSet = true; + } + if (("GenericRead" == name)) + { + this.genericReadField = Enums.ParseYesNoType(value); + this.genericReadFieldSet = true; + } + } + } + + /// + /// Sets ACLs on File, Registry, or CreateFolder. When under a Registry element, this cannot be used + /// if the Action attribute's value is remove or removeKeyOnInstall. This element is only available + /// when installing with MSI 5.0. For downlevel support, see the PermissionEx element from the + /// WixUtilExtension. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PermissionEx : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string sddlField; + + private bool sddlFieldSet; + + private ISchemaElement parentElement; + + public PermissionEx() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Condition))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Primary key used to identify this particular entry. If this is not specified the parent element's Id attribute + /// will be used instead. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Security descriptor to apply to parent object. + /// + public string Sddl + { + get + { + return this.sddlField; + } + set + { + this.sddlFieldSet = true; + this.sddlField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Condition" == childName)) + { + childValue = new Condition(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PermissionEx", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.sddlFieldSet) + { + writer.WriteAttributeString("Sddl", this.sddlField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Sddl" == name)) + { + this.sddlField = value; + this.sddlFieldSet = true; + } + } + } + + /// + /// Copy or move an existing file on the target machine, or copy a file that is being installed, to another destination. When + /// this element is nested under a File element, the parent file will be installed, then copied to the specified destination + /// if the parent component of the file is selected for installation or removal. When this element is nested under + /// a Component element and no FileId attribute is specified, the file to copy or move must already be on the target machine. + /// When this element is nested under a Component element and the FileId attribute is specified, the specified file is installed, + /// then copied to the specified destination if the parent component is selected for installation or removal (use + /// this option to control the copy of a file in a different component by the parent component's installation state). If the + /// specified destination directory is the same as the directory containing the original file and the name for the proposed source + /// file is the same as the original, then no action takes place. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CopyFile : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string fileIdField; + + private bool fileIdFieldSet; + + private string sourceDirectoryField; + + private bool sourceDirectoryFieldSet; + + private string sourcePropertyField; + + private bool sourcePropertyFieldSet; + + private string sourceNameField; + + private bool sourceNameFieldSet; + + private string destinationDirectoryField; + + private bool destinationDirectoryFieldSet; + + private string destinationPropertyField; + + private bool destinationPropertyFieldSet; + + private string destinationNameField; + + private bool destinationNameFieldSet; + + private string destinationShortNameField; + + private bool destinationShortNameFieldSet; + + private YesNoType deleteField; + + private bool deleteFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary key used to identify this particular entry. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// This attribute cannot be specified if the element is nested under a File element. Set this attribute's value to the identifier + /// of a file from a different component to copy it based on the install state of the parent component. + /// + public string FileId + { + get + { + return this.fileIdField; + } + set + { + this.fileIdFieldSet = true; + this.fileIdField = value; + } + } + + /// + /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set + /// this value to the source directory from which to copy or move an existing file on the target machine. This Directory must + /// exist in the installer database at creation time. This attribute cannot be specified in conjunction with SourceProperty. + /// + public string SourceDirectory + { + get + { + return this.sourceDirectoryField; + } + set + { + this.sourceDirectoryFieldSet = true; + this.sourceDirectoryField = value; + } + } + + /// + /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set + /// this value to a property that will have a value that resolves to the full path of the source directory (or full path + /// including file name if SourceName is not specified). The property does not have to exist in the installer database at + /// creation time; it could be created at installation time by a custom action, on the command line, etc. This attribute + /// cannot be specified in conjunction with SourceDirectory. + /// + public string SourceProperty + { + get + { + return this.sourcePropertyField; + } + set + { + this.sourcePropertyFieldSet = true; + this.sourcePropertyField = value; + } + } + + /// + /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set + /// this value to the localizable name of the file(s) to be copied or moved. All of the files that + /// match the wild card will be removed from the specified directory. The value is a filename that may also + /// contain the wild card characters "?" for any single character or "*" for zero or more occurrences of any character. If this + /// attribute is not specified (and this element is not nested under a File element or specify a FileId attribute) then the + /// SourceProperty attribute should be set to the name of a property that will resolve to the full path of the source filename. + /// If the value of this attribute contains a "*" wildcard and the DestinationName attribute is specified, all moved or copied + /// files retain the file names from their sources. + /// + public string SourceName + { + get + { + return this.sourceNameField; + } + set + { + this.sourceNameFieldSet = true; + this.sourceNameField = value; + } + } + + /// + /// Set this value to the destination directory where an existing file on the target machine should be moved or copied to. This + /// Directory must exist in the installer database at creation time. This attribute cannot be specified in conjunction with + /// DestinationProperty. + /// + public string DestinationDirectory + { + get + { + return this.destinationDirectoryField; + } + set + { + this.destinationDirectoryFieldSet = true; + this.destinationDirectoryField = value; + } + } + + /// + /// Set this value to a property that will have a value that resolves to the full path of the destination directory. The property + /// does not have to exist in the installer database at creation time; it could be created at installation time by a custom + /// action, on the command line, etc. This attribute cannot be specified in conjunction with DestinationDirectory. + /// + public string DestinationProperty + { + get + { + return this.destinationPropertyField; + } + set + { + this.destinationPropertyFieldSet = true; + this.destinationPropertyField = value; + } + } + + /// + /// In prior versions of the WiX toolset, this attribute specified the short file name. + /// Now set this value to the localizable name to be given to the original file after it is moved or copied. + /// If this attribute is not specified, then the destination file is given the same name as the source file. + /// If a short file name is specified, the DestinationShortName attribute may not be specified. + /// Also, if this value is a long file name, the DestinationShortName attribute may be omitted to + /// allow WiX to attempt to generate a unique short file name. + /// However, if this name collides with another file or you wish to manually specify + /// the short file name, then the DestinationShortName attribute may be specified. + /// + public string DestinationName + { + get + { + return this.destinationNameField; + } + set + { + this.destinationNameFieldSet = true; + this.destinationNameField = value; + } + } + + /// + /// The short file name of the file in 8.3 format. + /// This attribute should only be set if there is a conflict between generated short file names + /// or you wish to manually specify the short file name. + /// + public string DestinationShortName + { + get + { + return this.destinationShortNameField; + } + set + { + this.destinationShortNameFieldSet = true; + this.destinationShortNameField = value; + } + } + + /// + /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. In other + /// cases, if the attribute is not specified, the default value is "no" and the file is copied, not moved. Set the value to "yes" + /// in order to move the file (thus deleting the source file) instead of copying it. + /// + public YesNoType Delete + { + get + { + return this.deleteField; + } + set + { + this.deleteFieldSet = true; + this.deleteField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CopyFile", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.fileIdFieldSet) + { + writer.WriteAttributeString("FileId", this.fileIdField); + } + if (this.sourceDirectoryFieldSet) + { + writer.WriteAttributeString("SourceDirectory", this.sourceDirectoryField); + } + if (this.sourcePropertyFieldSet) + { + writer.WriteAttributeString("SourceProperty", this.sourcePropertyField); + } + if (this.sourceNameFieldSet) + { + writer.WriteAttributeString("SourceName", this.sourceNameField); + } + if (this.destinationDirectoryFieldSet) + { + writer.WriteAttributeString("DestinationDirectory", this.destinationDirectoryField); + } + if (this.destinationPropertyFieldSet) + { + writer.WriteAttributeString("DestinationProperty", this.destinationPropertyField); + } + if (this.destinationNameFieldSet) + { + writer.WriteAttributeString("DestinationName", this.destinationNameField); + } + if (this.destinationShortNameFieldSet) + { + writer.WriteAttributeString("DestinationShortName", this.destinationShortNameField); + } + if (this.deleteFieldSet) + { + if ((this.deleteField == YesNoType.no)) + { + writer.WriteAttributeString("Delete", "no"); + } + if ((this.deleteField == YesNoType.yes)) + { + writer.WriteAttributeString("Delete", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("FileId" == name)) + { + this.fileIdField = value; + this.fileIdFieldSet = true; + } + if (("SourceDirectory" == name)) + { + this.sourceDirectoryField = value; + this.sourceDirectoryFieldSet = true; + } + if (("SourceProperty" == name)) + { + this.sourcePropertyField = value; + this.sourcePropertyFieldSet = true; + } + if (("SourceName" == name)) + { + this.sourceNameField = value; + this.sourceNameFieldSet = true; + } + if (("DestinationDirectory" == name)) + { + this.destinationDirectoryField = value; + this.destinationDirectoryFieldSet = true; + } + if (("DestinationProperty" == name)) + { + this.destinationPropertyField = value; + this.destinationPropertyFieldSet = true; + } + if (("DestinationName" == name)) + { + this.destinationNameField = value; + this.destinationNameFieldSet = true; + } + if (("DestinationShortName" == name)) + { + this.destinationShortNameField = value; + this.destinationShortNameFieldSet = true; + } + if (("Delete" == name)) + { + this.deleteField = Enums.ParseYesNoType(value); + this.deleteFieldSet = true; + } + } + } + + /// + /// File specification for File table, must be child node of Component. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class File : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string companionFileField; + + private bool companionFileFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private YesNoType keyPathField; + + private bool keyPathFieldSet; + + private string shortNameField; + + private bool shortNameFieldSet; + + private YesNoType readOnlyField; + + private bool readOnlyFieldSet; + + private YesNoType hiddenField; + + private bool hiddenFieldSet; + + private YesNoType systemField; + + private bool systemFieldSet; + + private YesNoType vitalField; + + private bool vitalFieldSet; + + private YesNoType checksumField; + + private bool checksumFieldSet; + + private YesNoDefaultType compressedField; + + private bool compressedFieldSet; + + private string bindPathField; + + private bool bindPathFieldSet; + + private int selfRegCostField; + + private bool selfRegCostFieldSet; + + private YesNoType trueTypeField; + + private bool trueTypeFieldSet; + + private string fontTitleField; + + private bool fontTitleFieldSet; + + private string defaultLanguageField; + + private bool defaultLanguageFieldSet; + + private int defaultSizeField; + + private bool defaultSizeFieldSet; + + private string defaultVersionField; + + private bool defaultVersionFieldSet; + + private AssemblyType assemblyField; + + private bool assemblyFieldSet; + + private string assemblyManifestField; + + private bool assemblyManifestFieldSet; + + private string assemblyApplicationField; + + private bool assemblyApplicationFieldSet; + + private ProcessorArchitectureType processorArchitectureField; + + private bool processorArchitectureFieldSet; + + private string diskIdField; + + private bool diskIdFieldSet; + + private string sourceField; + + private bool sourceFieldSet; + + private string srcField; + + private bool srcFieldSet; + + private int patchGroupField; + + private bool patchGroupFieldSet; + + private YesNoType patchIgnoreField; + + private bool patchIgnoreFieldSet; + + private YesNoType patchAllowIgnoreOnErrorField; + + private bool patchAllowIgnoreOnErrorFieldSet; + + private YesNoType patchWholeFileField; + + private bool patchWholeFileFieldSet; + + private ISchemaElement parentElement; + + public File() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AssemblyName))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CopyFile))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDriver))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCTranslator))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TypeLib))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// 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]. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Set this attribute to make this file a companion child of another file. The installation + /// state of a companion file depends not on its own file versioning information, but on the versioning of its + /// companion parent. A file that is the key path for its component can not be a companion file (that means + /// this attribute cannot be set if KeyPath="yes" for this file). The Version attribute cannot be set along + /// with this attribute since companion files are not installed based on their own version. + /// + public string CompanionFile + { + get + { + return this.companionFileField; + } + set + { + this.companionFileFieldSet = true; + this.companionFileField = value; + } + } + + /// + /// In prior versions of the WiX toolset, this attribute specified the short file name. + /// This attribute's value may now be either a short or long file name. + /// If a short file name is specified, the ShortName attribute may not be specified. + /// Also, if this value is a long file name, the ShortName attribute may be omitted to + /// allow WiX to attempt to generate a unique short file name. + /// However, if this name collides with another file or you wish to manually specify + /// the short file name, then the ShortName attribute may be specified. + /// Finally, if this attribute is omitted then its default value is the file name portion + /// of the Source attribute, if one is specified, or the value of the Id attribute, if + /// the Source attribute is omitted or doesn't contain a file name. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Set to yes in order to force this file to be the key path for the parent component. + /// + public YesNoType KeyPath + { + get + { + return this.keyPathField; + } + set + { + this.keyPathFieldSet = true; + this.keyPathField = value; + } + } + + /// + /// The short file name of the file in 8.3 format. + /// This attribute should only be set if there is a conflict between generated short file names + /// or the user wants to manually specify the short file name. + /// + public string ShortName + { + get + { + return this.shortNameField; + } + set + { + this.shortNameFieldSet = true; + this.shortNameField = value; + } + } + + /// + /// Set to yes in order to have the file's read-only attribute set when it is installed on the target machine. + /// + public YesNoType ReadOnly + { + get + { + return this.readOnlyField; + } + set + { + this.readOnlyFieldSet = true; + this.readOnlyField = value; + } + } + + /// + /// Set to yes in order to have the file's hidden attribute set when it is installed on the target machine. + /// + public YesNoType Hidden + { + get + { + return this.hiddenField; + } + set + { + this.hiddenFieldSet = true; + this.hiddenField = value; + } + } + + /// + /// Set to yes in order to have the file's system attribute set when it is installed on the target machine. + /// + public YesNoType System + { + get + { + return this.systemField; + } + set + { + this.systemFieldSet = true; + this.systemField = value; + } + } + + /// + /// 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. + /// + public YesNoType Vital + { + get + { + return this.vitalField; + } + set + { + this.vitalFieldSet = true; + this.vitalField = value; + } + } + + /// + /// 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. + /// + public YesNoType Checksum + { + get + { + return this.checksumField; + } + set + { + this.checksumFieldSet = true; + this.checksumField = value; + } + } + + /// + /// Sets the file's source type compression. A setting of "yes" or "no" will override the setting in the Word Count Summary Property. + /// + public YesNoDefaultType Compressed + { + get + { + return this.compressedField; + } + set + { + this.compressedFieldSet = true; + this.compressedField = value; + } + } + + /// + /// 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. + /// + public string BindPath + { + get + { + return this.bindPathField; + } + set + { + this.bindPathFieldSet = true; + this.bindPathField = value; + } + } + + /// + /// 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. + /// + public int SelfRegCost + { + get + { + return this.selfRegCostField; + } + set + { + this.selfRegCostFieldSet = true; + this.selfRegCostField = value; + } + } + + /// + /// 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. + /// + public YesNoType TrueType + { + get + { + return this.trueTypeField; + } + set + { + this.trueTypeFieldSet = true; + this.trueTypeField = value; + } + } + + /// + /// 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. + /// + public string FontTitle + { + get + { + return this.fontTitleField; + } + set + { + this.fontTitleFieldSet = true; + this.fontTitleField = value; + } + } + + /// + /// 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. + /// + public string DefaultLanguage + { + get + { + return this.defaultLanguageField; + } + set + { + this.defaultLanguageFieldSet = true; + this.defaultLanguageField = value; + } + } + + /// + /// 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. + /// + public int DefaultSize + { + get + { + return this.defaultSizeField; + } + set + { + this.defaultSizeFieldSet = true; + this.defaultSizeField = value; + } + } + + /// + /// 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. + /// + public string DefaultVersion + { + get + { + return this.defaultVersionField; + } + set + { + this.defaultVersionFieldSet = true; + this.defaultVersionField = value; + } + } + + /// + /// Specifies if this File is a Win32 Assembly or .NET Assembly that needs to be installed into the + /// Global Assembly Cache (GAC). If the value is '.net' or 'win32', this file must also be the key path of the Component. + /// + public AssemblyType Assembly + { + get + { + return this.assemblyField; + } + set + { + this.assemblyFieldSet = true; + this.assemblyField = value; + } + } + + /// + /// Specifies the file identifier of the manifest file that describes this assembly. + /// The manifest file should be in the same component as the assembly it describes. + /// This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'. + /// + public string AssemblyManifest + { + get + { + return this.assemblyManifestField; + } + set + { + this.assemblyManifestFieldSet = true; + this.assemblyManifestField = value; + } + } + + /// + /// Specifies the file identifier of the application file. This assembly will be isolated + /// to the same directory as the application file. + /// If this attribute is absent, the assembly will be installed to the Global Assembly Cache (GAC). + /// This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'. + /// + public string AssemblyApplication + { + get + { + return this.assemblyApplicationField; + } + set + { + this.assemblyApplicationFieldSet = true; + this.assemblyApplicationField = value; + } + } + + /// + /// Specifies the architecture for this assembly. This attribute should only be used on .NET Framework 2.0 or higher assemblies. + /// + public ProcessorArchitectureType ProcessorArchitecture + { + get + { + return this.processorArchitectureField; + } + set + { + this.processorArchitectureFieldSet = true; + this.processorArchitectureField = value; + } + } + + /// + /// The value of this attribute should correspond to the Id attribute of a Media + /// element authored elsewhere. By creating this connection between a file and + /// its media, you set the packaging options to the values specified in the Media + /// element (values such as compression level, cab embedding, etc...). Specifying + /// the DiskId attribute on the File element overrides the default DiskId attribute + /// from the parent Component element. If no DiskId attribute is specified, + /// the default is "1". This DiskId attribute is ignored when creating a merge module + /// because merge modules do not have media. + /// + public string DiskId + { + get + { + return this.diskIdField; + } + set + { + this.diskIdFieldSet = true; + this.diskIdField = value; + } + } + + /// + /// 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 + /// + public string Source + { + get + { + return this.sourceField; + } + set + { + this.sourceFieldSet = true; + this.sourceField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string src + { + get + { + return this.srcField; + } + set + { + this.srcFieldSet = true; + this.srcField = value; + } + } + + /// + /// This attribute must be set for patch-added files. Each patch should be assigned a different patch group number. Patch groups + /// numbers must be greater 0 and should be assigned consecutively. For example, the first patch should use PatchGroup='1', the + /// second patch will have PatchGroup='2', etc... + /// + public int PatchGroup + { + get + { + return this.patchGroupField; + } + set + { + this.patchGroupFieldSet = true; + this.patchGroupField = value; + } + } + + /// + /// Prevents the updating of the file that is in fact changed in the upgraded image relative to the target images. + /// + public YesNoType PatchIgnore + { + get + { + return this.patchIgnoreField; + } + set + { + this.patchIgnoreFieldSet = true; + this.patchIgnoreField = value; + } + } + + /// + /// Set to indicate that the patch is non-vital. + /// + public YesNoType PatchAllowIgnoreOnError + { + get + { + return this.patchAllowIgnoreOnErrorField; + } + set + { + this.patchAllowIgnoreOnErrorFieldSet = true; + this.patchAllowIgnoreOnErrorField = value; + } + } + + /// + /// Set if the entire file should be installed rather than creating a binary patch. + /// + public YesNoType PatchWholeFile + { + get + { + return this.patchWholeFileField; + } + set + { + this.patchWholeFileFieldSet = true; + this.patchWholeFileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("AssemblyName" == childName)) + { + childValue = new AssemblyName(); + } + if (("Permission" == childName)) + { + childValue = new Permission(); + } + if (("PermissionEx" == childName)) + { + childValue = new PermissionEx(); + } + if (("CopyFile" == childName)) + { + childValue = new CopyFile(); + } + if (("Shortcut" == childName)) + { + childValue = new Shortcut(); + } + if (("ODBCDriver" == childName)) + { + childValue = new ODBCDriver(); + } + if (("ODBCTranslator" == childName)) + { + childValue = new ODBCTranslator(); + } + if (("SymbolPath" == childName)) + { + childValue = new SymbolPath(); + } + if (("Class" == childName)) + { + childValue = new Class(); + } + if (("AppId" == childName)) + { + childValue = new AppId(); + } + if (("TypeLib" == childName)) + { + childValue = new TypeLib(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a AssemblyType from a string. + /// + public static AssemblyType ParseAssemblyType(string value) + { + AssemblyType parsedValue; + File.TryParseAssemblyType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a AssemblyType from a string. + /// + public static bool TryParseAssemblyType(string value, out AssemblyType parsedValue) + { + parsedValue = AssemblyType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if ((".net" == value)) + { + parsedValue = AssemblyType.net; + } + else + { + if (("no" == value)) + { + parsedValue = AssemblyType.no; + } + else + { + if (("win32" == value)) + { + parsedValue = AssemblyType.win32; + } + else + { + parsedValue = AssemblyType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a ProcessorArchitectureType from a string. + /// + public static ProcessorArchitectureType ParseProcessorArchitectureType(string value) + { + ProcessorArchitectureType parsedValue; + File.TryParseProcessorArchitectureType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ProcessorArchitectureType from a string. + /// + public static bool TryParseProcessorArchitectureType(string value, out ProcessorArchitectureType parsedValue) + { + parsedValue = ProcessorArchitectureType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("msil" == value)) + { + parsedValue = ProcessorArchitectureType.msil; + } + else + { + if (("x86" == value)) + { + parsedValue = ProcessorArchitectureType.x86; + } + else + { + if (("x64" == value)) + { + parsedValue = ProcessorArchitectureType.x64; + } + else + { + if (("ia64" == value)) + { + parsedValue = ProcessorArchitectureType.ia64; + } + else + { + parsedValue = ProcessorArchitectureType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("File", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.companionFileFieldSet) + { + writer.WriteAttributeString("CompanionFile", this.companionFileField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.keyPathFieldSet) + { + if ((this.keyPathField == YesNoType.no)) + { + writer.WriteAttributeString("KeyPath", "no"); + } + if ((this.keyPathField == YesNoType.yes)) + { + writer.WriteAttributeString("KeyPath", "yes"); + } + } + if (this.shortNameFieldSet) + { + writer.WriteAttributeString("ShortName", this.shortNameField); + } + if (this.readOnlyFieldSet) + { + if ((this.readOnlyField == YesNoType.no)) + { + writer.WriteAttributeString("ReadOnly", "no"); + } + if ((this.readOnlyField == YesNoType.yes)) + { + writer.WriteAttributeString("ReadOnly", "yes"); + } + } + if (this.hiddenFieldSet) + { + if ((this.hiddenField == YesNoType.no)) + { + writer.WriteAttributeString("Hidden", "no"); + } + if ((this.hiddenField == YesNoType.yes)) + { + writer.WriteAttributeString("Hidden", "yes"); + } + } + if (this.systemFieldSet) + { + if ((this.systemField == YesNoType.no)) + { + writer.WriteAttributeString("System", "no"); + } + if ((this.systemField == YesNoType.yes)) + { + writer.WriteAttributeString("System", "yes"); + } + } + if (this.vitalFieldSet) + { + if ((this.vitalField == YesNoType.no)) + { + writer.WriteAttributeString("Vital", "no"); + } + if ((this.vitalField == YesNoType.yes)) + { + writer.WriteAttributeString("Vital", "yes"); + } + } + if (this.checksumFieldSet) + { + if ((this.checksumField == YesNoType.no)) + { + writer.WriteAttributeString("Checksum", "no"); + } + if ((this.checksumField == YesNoType.yes)) + { + writer.WriteAttributeString("Checksum", "yes"); + } + } + if (this.compressedFieldSet) + { + if ((this.compressedField == YesNoDefaultType.@default)) + { + writer.WriteAttributeString("Compressed", "default"); + } + if ((this.compressedField == YesNoDefaultType.no)) + { + writer.WriteAttributeString("Compressed", "no"); + } + if ((this.compressedField == YesNoDefaultType.yes)) + { + writer.WriteAttributeString("Compressed", "yes"); + } + } + if (this.bindPathFieldSet) + { + writer.WriteAttributeString("BindPath", this.bindPathField); + } + if (this.selfRegCostFieldSet) + { + writer.WriteAttributeString("SelfRegCost", this.selfRegCostField.ToString(CultureInfo.InvariantCulture)); + } + if (this.trueTypeFieldSet) + { + if ((this.trueTypeField == YesNoType.no)) + { + writer.WriteAttributeString("TrueType", "no"); + } + if ((this.trueTypeField == YesNoType.yes)) + { + writer.WriteAttributeString("TrueType", "yes"); + } + } + if (this.fontTitleFieldSet) + { + writer.WriteAttributeString("FontTitle", this.fontTitleField); + } + if (this.defaultLanguageFieldSet) + { + writer.WriteAttributeString("DefaultLanguage", this.defaultLanguageField); + } + if (this.defaultSizeFieldSet) + { + writer.WriteAttributeString("DefaultSize", this.defaultSizeField.ToString(CultureInfo.InvariantCulture)); + } + if (this.defaultVersionFieldSet) + { + writer.WriteAttributeString("DefaultVersion", this.defaultVersionField); + } + if (this.assemblyFieldSet) + { + if ((this.assemblyField == AssemblyType.net)) + { + writer.WriteAttributeString("Assembly", ".net"); + } + if ((this.assemblyField == AssemblyType.no)) + { + writer.WriteAttributeString("Assembly", "no"); + } + if ((this.assemblyField == AssemblyType.win32)) + { + writer.WriteAttributeString("Assembly", "win32"); + } + } + if (this.assemblyManifestFieldSet) + { + writer.WriteAttributeString("AssemblyManifest", this.assemblyManifestField); + } + if (this.assemblyApplicationFieldSet) + { + writer.WriteAttributeString("AssemblyApplication", this.assemblyApplicationField); + } + if (this.processorArchitectureFieldSet) + { + if ((this.processorArchitectureField == ProcessorArchitectureType.msil)) + { + writer.WriteAttributeString("ProcessorArchitecture", "msil"); + } + if ((this.processorArchitectureField == ProcessorArchitectureType.x86)) + { + writer.WriteAttributeString("ProcessorArchitecture", "x86"); + } + if ((this.processorArchitectureField == ProcessorArchitectureType.x64)) + { + writer.WriteAttributeString("ProcessorArchitecture", "x64"); + } + if ((this.processorArchitectureField == ProcessorArchitectureType.ia64)) + { + writer.WriteAttributeString("ProcessorArchitecture", "ia64"); + } + } + if (this.diskIdFieldSet) + { + writer.WriteAttributeString("DiskId", this.diskIdField); + } + if (this.sourceFieldSet) + { + writer.WriteAttributeString("Source", this.sourceField); + } + if (this.srcFieldSet) + { + writer.WriteAttributeString("src", this.srcField); + } + if (this.patchGroupFieldSet) + { + writer.WriteAttributeString("PatchGroup", this.patchGroupField.ToString(CultureInfo.InvariantCulture)); + } + if (this.patchIgnoreFieldSet) + { + if ((this.patchIgnoreField == YesNoType.no)) + { + writer.WriteAttributeString("PatchIgnore", "no"); + } + if ((this.patchIgnoreField == YesNoType.yes)) + { + writer.WriteAttributeString("PatchIgnore", "yes"); + } + } + if (this.patchAllowIgnoreOnErrorFieldSet) + { + if ((this.patchAllowIgnoreOnErrorField == YesNoType.no)) + { + writer.WriteAttributeString("PatchAllowIgnoreOnError", "no"); + } + if ((this.patchAllowIgnoreOnErrorField == YesNoType.yes)) + { + writer.WriteAttributeString("PatchAllowIgnoreOnError", "yes"); + } + } + if (this.patchWholeFileFieldSet) + { + if ((this.patchWholeFileField == YesNoType.no)) + { + writer.WriteAttributeString("PatchWholeFile", "no"); + } + if ((this.patchWholeFileField == YesNoType.yes)) + { + writer.WriteAttributeString("PatchWholeFile", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("CompanionFile" == name)) + { + this.companionFileField = value; + this.companionFileFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("KeyPath" == name)) + { + this.keyPathField = Enums.ParseYesNoType(value); + this.keyPathFieldSet = true; + } + if (("ShortName" == name)) + { + this.shortNameField = value; + this.shortNameFieldSet = true; + } + if (("ReadOnly" == name)) + { + this.readOnlyField = Enums.ParseYesNoType(value); + this.readOnlyFieldSet = true; + } + if (("Hidden" == name)) + { + this.hiddenField = Enums.ParseYesNoType(value); + this.hiddenFieldSet = true; + } + if (("System" == name)) + { + this.systemField = Enums.ParseYesNoType(value); + this.systemFieldSet = true; + } + if (("Vital" == name)) + { + this.vitalField = Enums.ParseYesNoType(value); + this.vitalFieldSet = true; + } + if (("Checksum" == name)) + { + this.checksumField = Enums.ParseYesNoType(value); + this.checksumFieldSet = true; + } + if (("Compressed" == name)) + { + this.compressedField = Enums.ParseYesNoDefaultType(value); + this.compressedFieldSet = true; + } + if (("BindPath" == name)) + { + this.bindPathField = value; + this.bindPathFieldSet = true; + } + if (("SelfRegCost" == name)) + { + this.selfRegCostField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.selfRegCostFieldSet = true; + } + if (("TrueType" == name)) + { + this.trueTypeField = Enums.ParseYesNoType(value); + this.trueTypeFieldSet = true; + } + if (("FontTitle" == name)) + { + this.fontTitleField = value; + this.fontTitleFieldSet = true; + } + if (("DefaultLanguage" == name)) + { + this.defaultLanguageField = value; + this.defaultLanguageFieldSet = true; + } + if (("DefaultSize" == name)) + { + this.defaultSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.defaultSizeFieldSet = true; + } + if (("DefaultVersion" == name)) + { + this.defaultVersionField = value; + this.defaultVersionFieldSet = true; + } + if (("Assembly" == name)) + { + this.assemblyField = File.ParseAssemblyType(value); + this.assemblyFieldSet = true; + } + if (("AssemblyManifest" == name)) + { + this.assemblyManifestField = value; + this.assemblyManifestFieldSet = true; + } + if (("AssemblyApplication" == name)) + { + this.assemblyApplicationField = value; + this.assemblyApplicationFieldSet = true; + } + if (("ProcessorArchitecture" == name)) + { + this.processorArchitectureField = File.ParseProcessorArchitectureType(value); + this.processorArchitectureFieldSet = true; + } + if (("DiskId" == name)) + { + this.diskIdField = value; + this.diskIdFieldSet = true; + } + if (("Source" == name)) + { + this.sourceField = value; + this.sourceFieldSet = true; + } + if (("src" == name)) + { + this.srcField = value; + this.srcFieldSet = true; + } + if (("PatchGroup" == name)) + { + this.patchGroupField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.patchGroupFieldSet = true; + } + if (("PatchIgnore" == name)) + { + this.patchIgnoreField = Enums.ParseYesNoType(value); + this.patchIgnoreFieldSet = true; + } + if (("PatchAllowIgnoreOnError" == name)) + { + this.patchAllowIgnoreOnErrorField = Enums.ParseYesNoType(value); + this.patchAllowIgnoreOnErrorFieldSet = true; + } + if (("PatchWholeFile" == name)) + { + this.patchWholeFileField = Enums.ParseYesNoType(value); + this.patchWholeFileFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum AssemblyType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// The file is a .NET Framework assembly. + /// + net, + + /// + /// The file is not a .NET Framework or Win32 assembly. This is the default value. + /// + no, + + /// + /// The file is a Win32 assembly. + /// + win32, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ProcessorArchitectureType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// The file is a .NET Framework assembly that is processor-neutral. + /// + msil, + + /// + /// The file is a .NET Framework assembly for the x86 processor. + /// + x86, + + /// + /// The file is a .NET Framework assembly for the x64 processor. + /// + x64, + + /// + /// The file is a .NET Framework assembly for the ia64 processor. + /// + ia64, + } + } + + /// + /// Use several of these elements to specify each registry value in a multiString registry value. This element + /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The + /// values should go in the text area of the MultiStringValue element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MultiStringValue : ISetAttributes, ISchemaElement + { + + private ISchemaElement parentElement; + + private string contentField; + + private bool contentFieldSet; + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Use several of these elements to specify each registry value in a multiString registry value. This element + /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The + /// values should go in the text area of the MultiStringValue element. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MultiStringValue", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + } + + /// + /// Used for organization of child RegistryValue elements or to create a registry key + /// (and optionally remove it during uninstallation). + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegistryKey : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ActionType actionField; + + private bool actionFieldSet; + + private YesNoType forceCreateOnInstallField; + + private bool forceCreateOnInstallFieldSet; + + private YesNoType forceDeleteOnUninstallField; + + private bool forceDeleteOnUninstallFieldSet; + + private string keyField; + + private bool keyFieldSet; + + private RegistryRootType rootField; + + private bool rootFieldSet; + + private ISchemaElement parentElement; + + public RegistryKey() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryKey))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be + /// generated by hashing the parent Component identifier, Root, Key, and Name. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The Action attribute has been deprecated. In most cases, you can simply omit @Action. If you need to force Windows Installer + /// to create an empty key or recursively delete the key, use the ForceCreateOnInstall or ForceDeleteOnUninstall attributes instead. + /// + public ActionType Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// Set this attribute to 'yes' to create an empty key, if absent, when the parent component is installed. + /// This value is needed only to create an empty key with no subkeys or values. Windows Installer creates + /// keys as needed to store subkeys and values. The default is "no". + /// + public YesNoType ForceCreateOnInstall + { + get + { + return this.forceCreateOnInstallField; + } + set + { + this.forceCreateOnInstallFieldSet = true; + this.forceCreateOnInstallField = value; + } + } + + /// + /// Set this attribute to 'yes' to remove the key with all its values and subkeys when the parent component is uninstalled. + /// 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 + /// removes all values and subkeys that it creates, so this option just adds additional overhead to uninstall. + /// The default is "no". + /// + public YesNoType ForceDeleteOnUninstall + { + get + { + return this.forceDeleteOnUninstallField; + } + set + { + this.forceDeleteOnUninstallFieldSet = true; + this.forceDeleteOnUninstallField = value; + } + } + + /// + /// The localizable key for the registry value. + /// If the parent element is a RegistryKey, this value may be omitted to use the + /// path of the parent, or if its specified it will be appended to the path of the parent. + /// + public string Key + { + get + { + return this.keyField; + } + set + { + this.keyFieldSet = true; + this.keyField = value; + } + } + + /// + /// The predefined root key for the registry value. + /// + public RegistryRootType Root + { + get + { + return this.rootField; + } + set + { + this.rootFieldSet = true; + this.rootField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("RegistryKey" == childName)) + { + childValue = new RegistryKey(); + } + if (("RegistryValue" == childName)) + { + childValue = new RegistryValue(); + } + if (("Permission" == childName)) + { + childValue = new Permission(); + } + if (("PermissionEx" == childName)) + { + childValue = new PermissionEx(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a ActionType from a string. + /// + public static ActionType ParseActionType(string value) + { + ActionType parsedValue; + RegistryKey.TryParseActionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ActionType from a string. + /// + public static bool TryParseActionType(string value, out ActionType parsedValue) + { + parsedValue = ActionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("create" == value)) + { + parsedValue = ActionType.create; + } + else + { + if (("createAndRemoveOnUninstall" == value)) + { + parsedValue = ActionType.createAndRemoveOnUninstall; + } + else + { + if (("none" == value)) + { + parsedValue = ActionType.none; + } + else + { + parsedValue = ActionType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegistryKey", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.actionFieldSet) + { + if ((this.actionField == ActionType.create)) + { + writer.WriteAttributeString("Action", "create"); + } + if ((this.actionField == ActionType.createAndRemoveOnUninstall)) + { + writer.WriteAttributeString("Action", "createAndRemoveOnUninstall"); + } + if ((this.actionField == ActionType.none)) + { + writer.WriteAttributeString("Action", "none"); + } + } + if (this.forceCreateOnInstallFieldSet) + { + if ((this.forceCreateOnInstallField == YesNoType.no)) + { + writer.WriteAttributeString("ForceCreateOnInstall", "no"); + } + if ((this.forceCreateOnInstallField == YesNoType.yes)) + { + writer.WriteAttributeString("ForceCreateOnInstall", "yes"); + } + } + if (this.forceDeleteOnUninstallFieldSet) + { + if ((this.forceDeleteOnUninstallField == YesNoType.no)) + { + writer.WriteAttributeString("ForceDeleteOnUninstall", "no"); + } + if ((this.forceDeleteOnUninstallField == YesNoType.yes)) + { + writer.WriteAttributeString("ForceDeleteOnUninstall", "yes"); + } + } + if (this.keyFieldSet) + { + writer.WriteAttributeString("Key", this.keyField); + } + if (this.rootFieldSet) + { + if ((this.rootField == RegistryRootType.HKMU)) + { + writer.WriteAttributeString("Root", "HKMU"); + } + if ((this.rootField == RegistryRootType.HKCR)) + { + writer.WriteAttributeString("Root", "HKCR"); + } + if ((this.rootField == RegistryRootType.HKCU)) + { + writer.WriteAttributeString("Root", "HKCU"); + } + if ((this.rootField == RegistryRootType.HKLM)) + { + writer.WriteAttributeString("Root", "HKLM"); + } + if ((this.rootField == RegistryRootType.HKU)) + { + writer.WriteAttributeString("Root", "HKU"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Action" == name)) + { + this.actionField = RegistryKey.ParseActionType(value); + this.actionFieldSet = true; + } + if (("ForceCreateOnInstall" == name)) + { + this.forceCreateOnInstallField = Enums.ParseYesNoType(value); + this.forceCreateOnInstallFieldSet = true; + } + if (("ForceDeleteOnUninstall" == name)) + { + this.forceDeleteOnUninstallField = Enums.ParseYesNoType(value); + this.forceDeleteOnUninstallFieldSet = true; + } + if (("Key" == name)) + { + this.keyField = value; + this.keyFieldSet = true; + } + if (("Root" == name)) + { + this.rootField = Enums.ParseRegistryRootType(value); + this.rootFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ActionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Creates the key, if absent, when the parent component is installed. + /// + create, + + /// + /// 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. + /// 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 + /// removes all values and subkeys that it creates, so this option just adds additional overhead to uninstall. + /// + createAndRemoveOnUninstall, + + /// + /// Does nothing; this element is used merely in WiX authoring for organization and does nothing to the final output. + /// This is the default value. + /// + none, + } + } + + /// + /// Used to create a registry value. For multi-string values, this can be used to prepend or append values. + /// + /// For legacy authoring: Use several of these elements to specify each registry value in a multiString registry value. This element + /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The + /// values should go in the text area of the RegistryValue element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegistryValue : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private RegistryRootType rootField; + + private bool rootFieldSet; + + private string keyField; + + private bool keyFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private TypeType typeField; + + private bool typeFieldSet; + + private ActionType actionField; + + private bool actionFieldSet; + + private YesNoType keyPathField; + + private bool keyPathFieldSet; + + private ISchemaElement parentElement; + + public RegistryValue() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MultiStringValue))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be + /// generated by hashing the parent Component identifier, Root, Key, and Name. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The predefined root key for the registry value. + /// + public RegistryRootType Root + { + get + { + return this.rootField; + } + set + { + this.rootFieldSet = true; + this.rootField = value; + } + } + + /// + /// The localizable key for the registry value. + /// If the parent element is a RegistryKey, this value may be omitted to use the + /// path of the parent, or if its specified it will be appended to the path of the parent. + /// + public string Key + { + get + { + return this.keyField; + } + set + { + this.keyFieldSet = true; + this.keyField = value; + } + } + + /// + /// The localizable registry value name. If this attribute is not provided the default value for the registry key will + /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not + /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Set this attribute to the localizable registry value. This value is formatted. The Windows Installer allows + /// several special values to be set for this attribute. You should not use them in WiX. Instead use appropriate + /// values in the Type attribute to get the desired behavior. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// Set this attribute to the type of the desired registry key. This attribute must be specified whenever the Value + /// attribute or a child RegistryValue element is specified. This attribute + /// should only be set when the value of the Action attribute does not include the word 'remove'. + /// + public TypeType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + /// + /// This is the action that will be taken for this registry value. + /// + public ActionType Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// Set this attribute to 'yes' to make this registry key the KeyPath of the parent component. + /// Only one resource (registry, file, etc) can be the KeyPath of a component. + /// + public YesNoType KeyPath + { + get + { + return this.keyPathField; + } + set + { + this.keyPathFieldSet = true; + this.keyPathField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Permission" == childName)) + { + childValue = new Permission(); + } + if (("PermissionEx" == childName)) + { + childValue = new PermissionEx(); + } + if (("MultiStringValue" == childName)) + { + childValue = new MultiStringValue(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a TypeType from a string. + /// + public static TypeType ParseTypeType(string value) + { + TypeType parsedValue; + RegistryValue.TryParseTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypeType from a string. + /// + public static bool TryParseTypeType(string value, out TypeType parsedValue) + { + parsedValue = TypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("string" == value)) + { + parsedValue = TypeType.@string; + } + else + { + if (("integer" == value)) + { + parsedValue = TypeType.integer; + } + else + { + if (("binary" == value)) + { + parsedValue = TypeType.binary; + } + else + { + if (("expandable" == value)) + { + parsedValue = TypeType.expandable; + } + else + { + if (("multiString" == value)) + { + parsedValue = TypeType.multiString; + } + else + { + parsedValue = TypeType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + + /// + /// Parses a ActionType from a string. + /// + public static ActionType ParseActionType(string value) + { + ActionType parsedValue; + RegistryValue.TryParseActionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ActionType from a string. + /// + public static bool TryParseActionType(string value, out ActionType parsedValue) + { + parsedValue = ActionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("append" == value)) + { + parsedValue = ActionType.append; + } + else + { + if (("prepend" == value)) + { + parsedValue = ActionType.prepend; + } + else + { + if (("write" == value)) + { + parsedValue = ActionType.write; + } + else + { + parsedValue = ActionType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegistryValue", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.rootFieldSet) + { + if ((this.rootField == RegistryRootType.HKMU)) + { + writer.WriteAttributeString("Root", "HKMU"); + } + if ((this.rootField == RegistryRootType.HKCR)) + { + writer.WriteAttributeString("Root", "HKCR"); + } + if ((this.rootField == RegistryRootType.HKCU)) + { + writer.WriteAttributeString("Root", "HKCU"); + } + if ((this.rootField == RegistryRootType.HKLM)) + { + writer.WriteAttributeString("Root", "HKLM"); + } + if ((this.rootField == RegistryRootType.HKU)) + { + writer.WriteAttributeString("Root", "HKU"); + } + } + if (this.keyFieldSet) + { + writer.WriteAttributeString("Key", this.keyField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.typeFieldSet) + { + if ((this.typeField == TypeType.@string)) + { + writer.WriteAttributeString("Type", "string"); + } + if ((this.typeField == TypeType.integer)) + { + writer.WriteAttributeString("Type", "integer"); + } + if ((this.typeField == TypeType.binary)) + { + writer.WriteAttributeString("Type", "binary"); + } + if ((this.typeField == TypeType.expandable)) + { + writer.WriteAttributeString("Type", "expandable"); + } + if ((this.typeField == TypeType.multiString)) + { + writer.WriteAttributeString("Type", "multiString"); + } + } + if (this.actionFieldSet) + { + if ((this.actionField == ActionType.append)) + { + writer.WriteAttributeString("Action", "append"); + } + if ((this.actionField == ActionType.prepend)) + { + writer.WriteAttributeString("Action", "prepend"); + } + if ((this.actionField == ActionType.write)) + { + writer.WriteAttributeString("Action", "write"); + } + } + if (this.keyPathFieldSet) + { + if ((this.keyPathField == YesNoType.no)) + { + writer.WriteAttributeString("KeyPath", "no"); + } + if ((this.keyPathField == YesNoType.yes)) + { + writer.WriteAttributeString("KeyPath", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Root" == name)) + { + this.rootField = Enums.ParseRegistryRootType(value); + this.rootFieldSet = true; + } + if (("Key" == name)) + { + this.keyField = value; + this.keyFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = RegistryValue.ParseTypeType(value); + this.typeFieldSet = true; + } + if (("Action" == name)) + { + this.actionField = RegistryValue.ParseActionType(value); + this.actionFieldSet = true; + } + if (("KeyPath" == name)) + { + this.keyPathField = Enums.ParseYesNoType(value); + this.keyPathFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum TypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// The value is interpreted and stored as a string (REG_SZ). + /// + @string, + + /// + /// The value is interpreted and stored as an integer (REG_DWORD). + /// + integer, + + /// + /// The value is interpreted and stored as a hexadecimal value (REG_BINARY). + /// + binary, + + /// + /// The value is interpreted and stored as an expandable string (REG_EXPAND_SZ). + /// + expandable, + + /// + /// The value is interpreted and stored as a multiple strings (REG_MULTI_SZ). + /// Please note that this value will only result in a multi-string value if there is more than one registry value + /// or the Action attribute's value is 'append' or 'prepend'. Otherwise a string value will be created. + /// + multiString, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ActionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Appends the specified value(s) to a multiString registry value. + /// + append, + + /// + /// Prepends the specified value(s) to a multiString registry value. + /// + prepend, + + /// + /// Writes a registry value. This is the default value. + /// + write, + } + } + + /// + /// Used for removing registry keys and all child keys either during install or uninstall. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveRegistryKey : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ActionType actionField; + + private bool actionFieldSet; + + private string keyField; + + private bool keyFieldSet; + + private RegistryRootType rootField; + + private bool rootFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be + /// generated by hashing the parent Component identifier, Root, Key, and Name. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// This is the action that will be taken for this registry value. + /// + public ActionType Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// The localizable key for the registry value. + /// + public string Key + { + get + { + return this.keyField; + } + set + { + this.keyFieldSet = true; + this.keyField = value; + } + } + + /// + /// The predefined root key for the registry value. + /// + public RegistryRootType Root + { + get + { + return this.rootField; + } + set + { + this.rootFieldSet = true; + this.rootField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ActionType from a string. + /// + public static ActionType ParseActionType(string value) + { + ActionType parsedValue; + RemoveRegistryKey.TryParseActionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ActionType from a string. + /// + public static bool TryParseActionType(string value, out ActionType parsedValue) + { + parsedValue = ActionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("removeOnInstall" == value)) + { + parsedValue = ActionType.removeOnInstall; + } + else + { + if (("removeOnUninstall" == value)) + { + parsedValue = ActionType.removeOnUninstall; + } + else + { + parsedValue = ActionType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveRegistryKey", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.actionFieldSet) + { + if ((this.actionField == ActionType.removeOnInstall)) + { + writer.WriteAttributeString("Action", "removeOnInstall"); + } + if ((this.actionField == ActionType.removeOnUninstall)) + { + writer.WriteAttributeString("Action", "removeOnUninstall"); + } + } + if (this.keyFieldSet) + { + writer.WriteAttributeString("Key", this.keyField); + } + if (this.rootFieldSet) + { + if ((this.rootField == RegistryRootType.HKMU)) + { + writer.WriteAttributeString("Root", "HKMU"); + } + if ((this.rootField == RegistryRootType.HKCR)) + { + writer.WriteAttributeString("Root", "HKCR"); + } + if ((this.rootField == RegistryRootType.HKCU)) + { + writer.WriteAttributeString("Root", "HKCU"); + } + if ((this.rootField == RegistryRootType.HKLM)) + { + writer.WriteAttributeString("Root", "HKLM"); + } + if ((this.rootField == RegistryRootType.HKU)) + { + writer.WriteAttributeString("Root", "HKU"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Action" == name)) + { + this.actionField = RemoveRegistryKey.ParseActionType(value); + this.actionFieldSet = true; + } + if (("Key" == name)) + { + this.keyField = value; + this.keyFieldSet = true; + } + if (("Root" == name)) + { + this.rootField = Enums.ParseRegistryRootType(value); + this.rootFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ActionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Removes a key with all its values and subkeys when the parent component is installed. + /// + removeOnInstall, + + /// + /// Removes a key with all its values and subkeys when the parent component is uninstalled. + /// + removeOnUninstall, + } + } + + /// + /// Used to remove a registry value during installation. + /// There is no standard way to remove a single registry value during uninstall (but you can remove an entire key with RemoveRegistryKey). + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveRegistryValue : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string keyField; + + private bool keyFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private RegistryRootType rootField; + + private bool rootFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be + /// generated by hashing the parent Component identifier, Root, Key, and Name. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The localizable key for the registry value. + /// If the parent element is a RegistryKey, this value may be omitted to use the + /// path of the parent, or if its specified it will be appended to the path of the parent. + /// + public string Key + { + get + { + return this.keyField; + } + set + { + this.keyFieldSet = true; + this.keyField = value; + } + } + + /// + /// The localizable registry value name. If this attribute is not provided the default value for the registry key will + /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not + /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The predefined root key for the registry value. + /// + public RegistryRootType Root + { + get + { + return this.rootField; + } + set + { + this.rootFieldSet = true; + this.rootField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveRegistryValue", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.keyFieldSet) + { + writer.WriteAttributeString("Key", this.keyField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.rootFieldSet) + { + if ((this.rootField == RegistryRootType.HKMU)) + { + writer.WriteAttributeString("Root", "HKMU"); + } + if ((this.rootField == RegistryRootType.HKCR)) + { + writer.WriteAttributeString("Root", "HKCR"); + } + if ((this.rootField == RegistryRootType.HKCU)) + { + writer.WriteAttributeString("Root", "HKCU"); + } + if ((this.rootField == RegistryRootType.HKLM)) + { + writer.WriteAttributeString("Root", "HKLM"); + } + if ((this.rootField == RegistryRootType.HKU)) + { + writer.WriteAttributeString("Root", "HKU"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Key" == name)) + { + this.keyField = value; + this.keyFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Root" == name)) + { + this.rootField = Enums.ParseRegistryRootType(value); + this.rootFieldSet = true; + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Registry : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ActionType actionField; + + private bool actionFieldSet; + + private string keyField; + + private bool keyFieldSet; + + private YesNoType keyPathField; + + private bool keyPathFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private RegistryRootType rootField; + + private bool rootFieldSet; + + private TypeType typeField; + + private bool typeFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + public Registry() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Registry))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be + /// generated by hashing the parent Component identifier, Root, Key, and Name. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// This is the action that will be taken for this registry key. + /// + public ActionType Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// The localizable key for the registry value. + /// + public string Key + { + get + { + return this.keyField; + } + set + { + this.keyFieldSet = true; + this.keyField = value; + } + } + + /// + /// Set this attribute to 'yes' to make this registry key the KeyPath of the parent component. Only one resource (registry, + /// file, etc) can be the KeyPath of a component. + /// + public YesNoType KeyPath + { + get + { + return this.keyPathField; + } + set + { + this.keyPathFieldSet = true; + this.keyPathField = value; + } + } + + /// + /// The localizable registry value name. If this attribute is not provided the default value for the registry key will + /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not + /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The predefined root key for the registry value. + /// + public RegistryRootType Root + { + get + { + return this.rootField; + } + set + { + this.rootFieldSet = true; + this.rootField = value; + } + } + + /// + /// Set this attribute to the type of the desired registry key. This attribute must be specified whenever the Value + /// attribute or a child RegistryValue element is specified. This attribute + /// should only be set when the value of the Action attribute does not include the word 'remove'. + /// + public TypeType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + /// + /// Set this attribute to the localizable registry value. This value is formatted. The Windows Installer allows + /// several special values to be set for this attribute. You should not use them in WiX. Instead use appropriate + /// values in the Type attribute to get the desired behavior. This attribute cannot be specified if the Action + /// attribute's value contains the word 'remove'. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Permission" == childName)) + { + childValue = new Permission(); + } + if (("PermissionEx" == childName)) + { + childValue = new PermissionEx(); + } + if (("RegistryValue" == childName)) + { + childValue = new RegistryValue(); + } + if (("Registry" == childName)) + { + childValue = new Registry(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a ActionType from a string. + /// + public static ActionType ParseActionType(string value) + { + ActionType parsedValue; + Registry.TryParseActionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ActionType from a string. + /// + public static bool TryParseActionType(string value, out ActionType parsedValue) + { + parsedValue = ActionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("append" == value)) + { + parsedValue = ActionType.append; + } + else + { + if (("createKey" == value)) + { + parsedValue = ActionType.createKey; + } + else + { + if (("createKeyAndRemoveKeyOnUninstall" == value)) + { + parsedValue = ActionType.createKeyAndRemoveKeyOnUninstall; + } + else + { + if (("prepend" == value)) + { + parsedValue = ActionType.prepend; + } + else + { + if (("remove" == value)) + { + parsedValue = ActionType.remove; + } + else + { + if (("removeKeyOnInstall" == value)) + { + parsedValue = ActionType.removeKeyOnInstall; + } + else + { + if (("removeKeyOnUninstall" == value)) + { + parsedValue = ActionType.removeKeyOnUninstall; + } + else + { + if (("write" == value)) + { + parsedValue = ActionType.write; + } + else + { + parsedValue = ActionType.IllegalValue; + return false; + } + } + } + } + } + } + } + } + return true; + } + + /// + /// Parses a TypeType from a string. + /// + public static TypeType ParseTypeType(string value) + { + TypeType parsedValue; + Registry.TryParseTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypeType from a string. + /// + public static bool TryParseTypeType(string value, out TypeType parsedValue) + { + parsedValue = TypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("string" == value)) + { + parsedValue = TypeType.@string; + } + else + { + if (("integer" == value)) + { + parsedValue = TypeType.integer; + } + else + { + if (("binary" == value)) + { + parsedValue = TypeType.binary; + } + else + { + if (("expandable" == value)) + { + parsedValue = TypeType.expandable; + } + else + { + if (("multiString" == value)) + { + parsedValue = TypeType.multiString; + } + else + { + parsedValue = TypeType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Registry", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.actionFieldSet) + { + if ((this.actionField == ActionType.append)) + { + writer.WriteAttributeString("Action", "append"); + } + if ((this.actionField == ActionType.createKey)) + { + writer.WriteAttributeString("Action", "createKey"); + } + if ((this.actionField == ActionType.createKeyAndRemoveKeyOnUninstall)) + { + writer.WriteAttributeString("Action", "createKeyAndRemoveKeyOnUninstall"); + } + if ((this.actionField == ActionType.prepend)) + { + writer.WriteAttributeString("Action", "prepend"); + } + if ((this.actionField == ActionType.remove)) + { + writer.WriteAttributeString("Action", "remove"); + } + if ((this.actionField == ActionType.removeKeyOnInstall)) + { + writer.WriteAttributeString("Action", "removeKeyOnInstall"); + } + if ((this.actionField == ActionType.removeKeyOnUninstall)) + { + writer.WriteAttributeString("Action", "removeKeyOnUninstall"); + } + if ((this.actionField == ActionType.write)) + { + writer.WriteAttributeString("Action", "write"); + } + } + if (this.keyFieldSet) + { + writer.WriteAttributeString("Key", this.keyField); + } + if (this.keyPathFieldSet) + { + if ((this.keyPathField == YesNoType.no)) + { + writer.WriteAttributeString("KeyPath", "no"); + } + if ((this.keyPathField == YesNoType.yes)) + { + writer.WriteAttributeString("KeyPath", "yes"); + } + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.rootFieldSet) + { + if ((this.rootField == RegistryRootType.HKMU)) + { + writer.WriteAttributeString("Root", "HKMU"); + } + if ((this.rootField == RegistryRootType.HKCR)) + { + writer.WriteAttributeString("Root", "HKCR"); + } + if ((this.rootField == RegistryRootType.HKCU)) + { + writer.WriteAttributeString("Root", "HKCU"); + } + if ((this.rootField == RegistryRootType.HKLM)) + { + writer.WriteAttributeString("Root", "HKLM"); + } + if ((this.rootField == RegistryRootType.HKU)) + { + writer.WriteAttributeString("Root", "HKU"); + } + } + if (this.typeFieldSet) + { + if ((this.typeField == TypeType.@string)) + { + writer.WriteAttributeString("Type", "string"); + } + if ((this.typeField == TypeType.integer)) + { + writer.WriteAttributeString("Type", "integer"); + } + if ((this.typeField == TypeType.binary)) + { + writer.WriteAttributeString("Type", "binary"); + } + if ((this.typeField == TypeType.expandable)) + { + writer.WriteAttributeString("Type", "expandable"); + } + if ((this.typeField == TypeType.multiString)) + { + writer.WriteAttributeString("Type", "multiString"); + } + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Action" == name)) + { + this.actionField = Registry.ParseActionType(value); + this.actionFieldSet = true; + } + if (("Key" == name)) + { + this.keyField = value; + this.keyFieldSet = true; + } + if (("KeyPath" == name)) + { + this.keyPathField = Enums.ParseYesNoType(value); + this.keyPathFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Root" == name)) + { + this.rootField = Enums.ParseRegistryRootType(value); + this.rootFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = Registry.ParseTypeType(value); + this.typeFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ActionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Appends the specified value(s) to a multiString registry key. + /// + append, + + /// + /// Creates the key, if absent, when the parent component is installed. + /// + createKey, + + /// + /// 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. + /// + createKeyAndRemoveKeyOnUninstall, + + /// + /// Prepends the specified value(s) to a multiString registry key. + /// + prepend, + + /// + /// Removes a registry name when the parent component is installed. + /// + remove, + + /// + /// Removes a key with all its values and subkeys when the parent component is installed. + /// + removeKeyOnInstall, + + /// + /// Removes a key with all its values and subkeys when the parent component is uninstalled. + /// + removeKeyOnUninstall, + + /// + /// Writes a registry value. + /// + write, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum TypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// The value is interpreted and stored as a string (REG_SZ). + /// + @string, + + /// + /// The value is interpreted and stored as an integer (REG_DWORD). + /// + integer, + + /// + /// The value is interpreted and stored as a hexadecimal value (REG_BINARY). + /// + binary, + + /// + /// The value is interpreted and stored as an expandable string (REG_EXPAND_SZ). + /// + expandable, + + /// + /// The value is interpreted and stored as a multiple strings (REG_MULTI_SZ). + /// Please note that this value will only result in a multi-string value if there is more than one registry value + /// or the Action attribute's value is 'append' or 'prepend'. Otherwise a string value will be created. + /// + multiString, + } + } + + /// + /// Remove a file(s) if the parent component is selected for installation or removal. Multiple files can be removed + /// by specifying a wildcard for the value of the Name attribute. By default, the source + /// directory of the file is the directory of the parent component. This can be overridden by specifying the + /// Directory attribute with a value corresponding to the Id of the source directory, or by specifying the Property + /// attribute with a value corresponding to a property that will have a value that resolves to the full path + /// to the source directory. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveFile : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string directoryField; + + private bool directoryFieldSet; + + private string propertyField; + + private bool propertyFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string shortNameField; + + private bool shortNameFieldSet; + + private InstallUninstallType onField; + + private bool onFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary key used to identify this particular entry. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Overrides the directory of the parent component with a specific Directory. This Directory must exist in the + /// installer database at creation time. This attribute cannot be specified in conjunction with the Property attribute. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + /// + /// Overrides the directory of the parent component with the value of the specified property. The property + /// should have a value that resolves to the full path of the source directory. The property does not have + /// to exist in the installer database at creation time; it could be created at installation time by a custom + /// action, on the command line, etc. This attribute cannot be specified in conjunction with the Directory attribute. + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + /// + /// This value should be set to the localizable name of the file(s) to be removed. All of the files that + /// match the wild card will be removed from the specified directory. The value is a filename that may also + /// contain the wild card characters "?" for any single character or "*" for zero or more occurrences of any character. + /// In prior versions of the WiX toolset, this attribute specified the short file name. + /// This attribute's value may now be either a short or long file name. + /// If a short file name is specified, the ShortName attribute may not be specified. + /// Also, if this value is a long file name, the ShortName attribute may be omitted to + /// allow WiX to attempt to generate a unique short file name. + /// However, if you wish to manually specify the short file name, then the ShortName attribute may be specified. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The short file name of the file in 8.3 format. + /// This attribute should only be set if you want to manually specify the short file name. + /// + public string ShortName + { + get + { + return this.shortNameField; + } + set + { + this.shortNameFieldSet = true; + this.shortNameField = value; + } + } + + /// + /// This value determines the time at which the file(s) may be removed. For 'install', the file will + /// be removed only when the parent component is being installed (msiInstallStateLocal or + /// msiInstallStateSource); for 'uninstall', the file will be removed only when the parent component + /// is being removed (msiInstallStateAbsent); for 'both', the file will be removed in both cases. + /// + public InstallUninstallType On + { + get + { + return this.onField; + } + set + { + this.onFieldSet = true; + this.onField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveFile", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.shortNameFieldSet) + { + writer.WriteAttributeString("ShortName", this.shortNameField); + } + if (this.onFieldSet) + { + if ((this.onField == InstallUninstallType.install)) + { + writer.WriteAttributeString("On", "install"); + } + if ((this.onField == InstallUninstallType.uninstall)) + { + writer.WriteAttributeString("On", "uninstall"); + } + if ((this.onField == InstallUninstallType.both)) + { + writer.WriteAttributeString("On", "both"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("ShortName" == name)) + { + this.shortNameField = value; + this.shortNameFieldSet = true; + } + if (("On" == name)) + { + this.onField = Enums.ParseInstallUninstallType(value); + this.onFieldSet = true; + } + } + } + + /// + /// Remove an empty folder if the parent component is selected for installation or removal. By default, the folder + /// is the directory of the parent component. This can be overridden by specifying the Directory attribute + /// with a value corresponding to the Id of the directory, or by specifying the Property attribute with a value + /// corresponding to a property that will have a value that resolves to the full path of the folder. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveFolder : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string directoryField; + + private bool directoryFieldSet; + + private string propertyField; + + private bool propertyFieldSet; + + private InstallUninstallType onField; + + private bool onFieldSet; + + private ISchemaElement parentElement; + + /// + /// Primary key used to identify this particular entry. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Overrides the directory of the parent component with a specific Directory. This Directory must exist in the + /// installer database at creation time. This attribute cannot be specified in conjunction with the Property attribute. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + /// + /// Overrides the directory of the parent component with the value of the specified property. The property + /// should have a value that resolves to the full path of the source directory. The property does not have + /// to exist in the installer database at creation time; it could be created at installation time by a custom + /// action, on the command line, etc. This attribute cannot be specified in conjunction with the Directory attribute. + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + /// + /// This value determines the time at which the folder may be removed, based on the install/uninstall of the parent component. + /// For 'install', the folder will be removed only when the parent component is being installed (msiInstallStateLocal or + /// msiInstallStateSource); for 'uninstall', the folder will be removed only when the parent component + /// is being removed (msiInstallStateAbsent); for 'both', the folder will be removed in both cases. + /// + public InstallUninstallType On + { + get + { + return this.onField; + } + set + { + this.onFieldSet = true; + this.onField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveFolder", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + if (this.onFieldSet) + { + if ((this.onField == InstallUninstallType.install)) + { + writer.WriteAttributeString("On", "install"); + } + if ((this.onField == InstallUninstallType.uninstall)) + { + writer.WriteAttributeString("On", "uninstall"); + } + if ((this.onField == InstallUninstallType.both)) + { + writer.WriteAttributeString("On", "both"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + if (("On" == name)) + { + this.onField = Enums.ParseInstallUninstallType(value); + this.onFieldSet = true; + } + } + } + + /// + /// Create folder as part of parent Component. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CreateFolder : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string directoryField; + + private bool directoryFieldSet; + + private ISchemaElement parentElement; + + public CreateFolder() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier of Directory to create. Defaults to Directory of parent Component. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Shortcut" == childName)) + { + childValue = new Shortcut(); + } + if (("Permission" == childName)) + { + childValue = new Permission(); + } + if (("PermissionEx" == childName)) + { + childValue = new PermissionEx(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CreateFolder", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + } + } + + /// + /// Optional way for defining AppData, generally used for complex CDATA. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class AppData : ISetAttributes, ISchemaElement + { + + private ISchemaElement parentElement; + + private string contentField; + + private bool contentFieldSet; + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Optional way for defining AppData, generally used for complex CDATA. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("AppData", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + } + + /// + /// Qualified published component for parent Component + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Category : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string qualifierField; + + private bool qualifierFieldSet; + + private string appDataField; + + private bool appDataFieldSet; + + private string featureField; + + private bool featureFieldSet; + + private ISchemaElement parentElement; + + public Category() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(AppData))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// A string GUID that represents the category of components being grouped together. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// 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. + /// + public string Qualifier + { + get + { + return this.qualifierField; + } + set + { + this.qualifierFieldSet = true; + this.qualifierField = value; + } + } + + /// + /// 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. + /// + public string AppData + { + get + { + return this.appDataField; + } + set + { + this.appDataFieldSet = true; + this.appDataField = value; + } + } + + /// + /// Feature that controls the advertisement of the category. Defaults to the primary Feature for the parent Component . + /// + public string Feature + { + get + { + return this.featureField; + } + set + { + this.featureFieldSet = true; + this.featureField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("AppData" == childName)) + { + childValue = new AppData(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Category", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.qualifierFieldSet) + { + writer.WriteAttributeString("Qualifier", this.qualifierField); + } + if (this.appDataFieldSet) + { + writer.WriteAttributeString("AppData", this.appDataField); + } + if (this.featureFieldSet) + { + writer.WriteAttributeString("Feature", this.featureField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Qualifier" == name)) + { + this.qualifierField = value; + this.qualifierFieldSet = true; + } + if (("AppData" == name)) + { + this.appDataField = value; + this.appDataFieldSet = true; + } + if (("Feature" == name)) + { + this.featureField = value; + this.featureFieldSet = true; + } + } + } + + /// + /// MIME content-type for an Extension + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MIME : ISchemaElement, ISetAttributes + { + + private YesNoType advertiseField; + + private bool advertiseFieldSet; + + private string contentTypeField; + + private bool contentTypeFieldSet; + + private string classField; + + private bool classFieldSet; + + private YesNoType defaultField; + + private bool defaultFieldSet; + + private ISchemaElement parentElement; + + /// + /// 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. + /// + public YesNoType Advertise + { + get + { + return this.advertiseField; + } + set + { + this.advertiseFieldSet = true; + this.advertiseField = value; + } + } + + /// + /// This is the identifier for the MIME content. It is commonly written in the form of type/format. + /// + public string ContentType + { + get + { + return this.contentTypeField; + } + set + { + this.contentTypeFieldSet = true; + this.contentTypeField = value; + } + } + + /// + /// Class ID for the COM server that is to be associated with the MIME content. + /// + public string Class + { + get + { + return this.classField; + } + set + { + this.classFieldSet = true; + this.classField = value; + } + } + + /// + /// If 'yes', become the content type for the parent Extension. The default value is 'no'. + /// + public YesNoType Default + { + get + { + return this.defaultField; + } + set + { + this.defaultFieldSet = true; + this.defaultField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MIME", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.advertiseFieldSet) + { + if ((this.advertiseField == YesNoType.no)) + { + writer.WriteAttributeString("Advertise", "no"); + } + if ((this.advertiseField == YesNoType.yes)) + { + writer.WriteAttributeString("Advertise", "yes"); + } + } + if (this.contentTypeFieldSet) + { + writer.WriteAttributeString("ContentType", this.contentTypeField); + } + if (this.classFieldSet) + { + writer.WriteAttributeString("Class", this.classField); + } + if (this.defaultFieldSet) + { + if ((this.defaultField == YesNoType.no)) + { + writer.WriteAttributeString("Default", "no"); + } + if ((this.defaultField == YesNoType.yes)) + { + writer.WriteAttributeString("Default", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Advertise" == name)) + { + this.advertiseField = Enums.ParseYesNoType(value); + this.advertiseFieldSet = true; + } + if (("ContentType" == name)) + { + this.contentTypeField = value; + this.contentTypeFieldSet = true; + } + if (("Class" == name)) + { + this.classField = value; + this.classFieldSet = true; + } + if (("Default" == name)) + { + this.defaultField = Enums.ParseYesNoType(value); + this.defaultFieldSet = true; + } + } + } + + /// + /// Verb definition for an Extension. When advertised, this element creates a row in the + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Verb : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string commandField; + + private bool commandFieldSet; + + private string argumentField; + + private bool argumentFieldSet; + + private int sequenceField; + + private bool sequenceFieldSet; + + private string targetField; + + private bool targetFieldSet; + + private string targetFileField; + + private bool targetFileFieldSet; + + private string targetPropertyField; + + private bool targetPropertyFieldSet; + + private ISchemaElement parentElement; + + /// + /// The verb for the command. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The localized text displayed on the context menu. + /// + public string Command + { + get + { + return this.commandField; + } + set + { + this.commandFieldSet = true; + this.commandField = value; + } + } + + /// + /// Value for the command arguments. Note that the resolution of properties in the + /// Argument field is limited. A property formatted as [Property] in this field can only be resolved if the property + /// already has the intended value when the component owning the verb is installed. For example, for the argument + /// "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and the + /// component that owns the verb. + /// + public string Argument + { + get + { + return this.argumentField; + } + set + { + this.argumentFieldSet = true; + this.argumentField = value; + } + } + + /// + /// The sequence of the commands. Only verbs for which the Sequence is specified + /// are used to prepare an ordered list for the default value of the shell key. The Verb with the lowest value in this + /// column becomes the default verb. Used only for Advertised verbs. + /// + public int Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + public string Target + { + get + { + return this.targetField; + } + set + { + this.targetFieldSet = true; + this.targetField = value; + } + } + + /// + /// Either this attribute or the TargetProperty attribute must be specified for a non-advertised verb. + /// The value should be the identifier of the target file to be executed for the verb. + /// + public string TargetFile + { + get + { + return this.targetFileField; + } + set + { + this.targetFileFieldSet = true; + this.targetFileField = value; + } + } + + /// + /// Either this attribute or the TargetFile attribute must be specified for a non-advertised verb. + /// 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. + /// + public string TargetProperty + { + get + { + return this.targetPropertyField; + } + set + { + this.targetPropertyFieldSet = true; + this.targetPropertyField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Verb", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.commandFieldSet) + { + writer.WriteAttributeString("Command", this.commandField); + } + if (this.argumentFieldSet) + { + writer.WriteAttributeString("Argument", this.argumentField); + } + if (this.sequenceFieldSet) + { + writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); + } + if (this.targetFieldSet) + { + writer.WriteAttributeString("Target", this.targetField); + } + if (this.targetFileFieldSet) + { + writer.WriteAttributeString("TargetFile", this.targetFileField); + } + if (this.targetPropertyFieldSet) + { + writer.WriteAttributeString("TargetProperty", this.targetPropertyField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Command" == name)) + { + this.commandField = value; + this.commandFieldSet = true; + } + if (("Argument" == name)) + { + this.argumentField = value; + this.argumentFieldSet = true; + } + if (("Sequence" == name)) + { + this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sequenceFieldSet = true; + } + if (("Target" == name)) + { + this.targetField = value; + this.targetFieldSet = true; + } + if (("TargetFile" == name)) + { + this.targetFileField = value; + this.targetFileFieldSet = true; + } + if (("TargetProperty" == name)) + { + this.targetPropertyField = value; + this.targetPropertyFieldSet = true; + } + } + } + + /// + /// Extension for a Component + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Extension : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string contentTypeField; + + private bool contentTypeFieldSet; + + private YesNoType advertiseField; + + private bool advertiseFieldSet; + + private ISchemaElement parentElement; + + public Extension() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MIME))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Verb))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// This is simply the file extension, like "doc" or "xml". Do not include the preceding period. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The MIME type that is to be written. + /// + public string ContentType + { + get + { + return this.contentTypeField; + } + set + { + this.contentTypeFieldSet = true; + this.contentTypeField = value; + } + } + + /// + /// Whether this extension is to be advertised. The default is "no". + /// + public YesNoType Advertise + { + get + { + return this.advertiseField; + } + set + { + this.advertiseFieldSet = true; + this.advertiseField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("MIME" == childName)) + { + childValue = new MIME(); + } + if (("Verb" == childName)) + { + childValue = new Verb(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Extension", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.contentTypeFieldSet) + { + writer.WriteAttributeString("ContentType", this.contentTypeField); + } + if (this.advertiseFieldSet) + { + if ((this.advertiseField == YesNoType.no)) + { + writer.WriteAttributeString("Advertise", "no"); + } + if ((this.advertiseField == YesNoType.yes)) + { + writer.WriteAttributeString("Advertise", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("ContentType" == name)) + { + this.contentTypeField = value; + this.contentTypeFieldSet = true; + } + if (("Advertise" == name)) + { + this.advertiseField = Enums.ParseYesNoType(value); + this.advertiseFieldSet = true; + } + } + } + + /// + /// Register a type library (TypeLib). Please note that in order to properly use this + /// non-advertised, you will need use this element with Advertise='no' and also author the + /// appropriate child Interface elements by extracting them from the type library itself. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class TypeLib : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private YesNoType advertiseField; + + private bool advertiseFieldSet; + + private YesNoType controlField; + + private bool controlFieldSet; + + private int costField; + + private bool costFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private YesNoType hasDiskImageField; + + private bool hasDiskImageFieldSet; + + private string helpDirectoryField; + + private bool helpDirectoryFieldSet; + + private YesNoType hiddenField; + + private bool hiddenFieldSet; + + private int languageField; + + private bool languageFieldSet; + + private int majorVersionField; + + private bool majorVersionFieldSet; + + private int minorVersionField; + + private bool minorVersionFieldSet; + + private int resourceIdField; + + private bool resourceIdFieldSet; + + private YesNoType restrictedField; + + private bool restrictedFieldSet; + + private ISchemaElement parentElement; + + public TypeLib() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// The GUID that identifes the type library. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Value of 'yes' will create a row in the TypeLib table. + /// Value of 'no' will create rows in the Registry table. + /// The default value is 'no'. + /// + public YesNoType Advertise + { + get + { + return this.advertiseField; + } + set + { + this.advertiseFieldSet = true; + this.advertiseField = value; + } + } + + /// + /// Value of 'yes' means the type library describes controls, and should not be displayed in type browsers intended for nonvisual objects. + /// This attribute can only be set if Advertise='no'. + /// + public YesNoType Control + { + get + { + return this.controlField; + } + set + { + this.controlFieldSet = true; + this.controlField = value; + } + } + + /// + /// The cost associated with the registration of the type library in bytes. This attribute cannot be set if Advertise='no'. + /// + public int Cost + { + get + { + return this.costField; + } + set + { + this.costFieldSet = true; + this.costField = value; + } + } + + /// + /// The localizable description of the type library. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Value of 'yes' means the type library exists in a persisted form on disk. This attribute can only be set if Advertise='no'. + /// + public YesNoType HasDiskImage + { + get + { + return this.hasDiskImageField; + } + set + { + this.hasDiskImageFieldSet = true; + this.hasDiskImageField = value; + } + } + + /// + /// The identifier of the Directory element for the help directory. + /// + public string HelpDirectory + { + get + { + return this.helpDirectoryField; + } + set + { + this.helpDirectoryFieldSet = true; + this.helpDirectoryField = value; + } + } + + /// + /// Value of 'yes' means the type library should not be displayed to users, although its use is not restricted. + /// Should be used by controls. Hosts should create a new type library that wraps the control with extended properties. + /// This attribute can only be set if Advertise='no'. + /// + public YesNoType Hidden + { + get + { + return this.hiddenField; + } + set + { + this.hiddenFieldSet = true; + this.hiddenField = value; + } + } + + /// + /// The language of the type library. This must be a non-negative integer. + /// + public int Language + { + get + { + return this.languageField; + } + set + { + this.languageFieldSet = true; + this.languageField = value; + } + } + + /// + /// The major version of the type library. The value should be an integer from 0 - 255. + /// + public int MajorVersion + { + get + { + return this.majorVersionField; + } + set + { + this.majorVersionFieldSet = true; + this.majorVersionField = value; + } + } + + /// + /// The minor version of the type library. The value should be an integer from 0 - 255. + /// + public int MinorVersion + { + get + { + return this.minorVersionField; + } + set + { + this.minorVersionFieldSet = true; + this.minorVersionField = value; + } + } + + /// + /// The resource id of a typelib. The value is appended to the end of the typelib path in the registry. + /// + public int ResourceId + { + get + { + return this.resourceIdField; + } + set + { + this.resourceIdFieldSet = true; + this.resourceIdField = value; + } + } + + /// + /// 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'. + /// + public YesNoType Restricted + { + get + { + return this.restrictedField; + } + set + { + this.restrictedFieldSet = true; + this.restrictedField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("AppId" == childName)) + { + childValue = new AppId(); + } + if (("Class" == childName)) + { + childValue = new Class(); + } + if (("Interface" == childName)) + { + childValue = new Interface(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("TypeLib", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.advertiseFieldSet) + { + if ((this.advertiseField == YesNoType.no)) + { + writer.WriteAttributeString("Advertise", "no"); + } + if ((this.advertiseField == YesNoType.yes)) + { + writer.WriteAttributeString("Advertise", "yes"); + } + } + if (this.controlFieldSet) + { + if ((this.controlField == YesNoType.no)) + { + writer.WriteAttributeString("Control", "no"); + } + if ((this.controlField == YesNoType.yes)) + { + writer.WriteAttributeString("Control", "yes"); + } + } + if (this.costFieldSet) + { + writer.WriteAttributeString("Cost", this.costField.ToString(CultureInfo.InvariantCulture)); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.hasDiskImageFieldSet) + { + if ((this.hasDiskImageField == YesNoType.no)) + { + writer.WriteAttributeString("HasDiskImage", "no"); + } + if ((this.hasDiskImageField == YesNoType.yes)) + { + writer.WriteAttributeString("HasDiskImage", "yes"); + } + } + if (this.helpDirectoryFieldSet) + { + writer.WriteAttributeString("HelpDirectory", this.helpDirectoryField); + } + if (this.hiddenFieldSet) + { + if ((this.hiddenField == YesNoType.no)) + { + writer.WriteAttributeString("Hidden", "no"); + } + if ((this.hiddenField == YesNoType.yes)) + { + writer.WriteAttributeString("Hidden", "yes"); + } + } + if (this.languageFieldSet) + { + writer.WriteAttributeString("Language", this.languageField.ToString(CultureInfo.InvariantCulture)); + } + if (this.majorVersionFieldSet) + { + writer.WriteAttributeString("MajorVersion", this.majorVersionField.ToString(CultureInfo.InvariantCulture)); + } + if (this.minorVersionFieldSet) + { + writer.WriteAttributeString("MinorVersion", this.minorVersionField.ToString(CultureInfo.InvariantCulture)); + } + if (this.resourceIdFieldSet) + { + writer.WriteAttributeString("ResourceId", this.resourceIdField.ToString(CultureInfo.InvariantCulture)); + } + if (this.restrictedFieldSet) + { + if ((this.restrictedField == YesNoType.no)) + { + writer.WriteAttributeString("Restricted", "no"); + } + if ((this.restrictedField == YesNoType.yes)) + { + writer.WriteAttributeString("Restricted", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Advertise" == name)) + { + this.advertiseField = Enums.ParseYesNoType(value); + this.advertiseFieldSet = true; + } + if (("Control" == name)) + { + this.controlField = Enums.ParseYesNoType(value); + this.controlFieldSet = true; + } + if (("Cost" == name)) + { + this.costField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.costFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("HasDiskImage" == name)) + { + this.hasDiskImageField = Enums.ParseYesNoType(value); + this.hasDiskImageFieldSet = true; + } + if (("HelpDirectory" == name)) + { + this.helpDirectoryField = value; + this.helpDirectoryFieldSet = true; + } + if (("Hidden" == name)) + { + this.hiddenField = Enums.ParseYesNoType(value); + this.hiddenFieldSet = true; + } + if (("Language" == name)) + { + this.languageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.languageFieldSet = true; + } + if (("MajorVersion" == name)) + { + this.majorVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.majorVersionFieldSet = true; + } + if (("MinorVersion" == name)) + { + this.minorVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.minorVersionFieldSet = true; + } + if (("ResourceId" == name)) + { + this.resourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.resourceIdFieldSet = true; + } + if (("Restricted" == name)) + { + this.restrictedField = Enums.ParseYesNoType(value); + this.restrictedFieldSet = true; + } + } + } + + /// + /// ProgId registration for parent Component. If ProgId has an associated Class, it must be a child of that element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ProgId : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string iconField; + + private bool iconFieldSet; + + private int iconIndexField; + + private bool iconIndexFieldSet; + + private YesNoType advertiseField; + + private bool advertiseFieldSet; + + private string noOpenField; + + private bool noOpenFieldSet; + + private ISchemaElement parentElement; + + public ProgId() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ProgId))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Extension))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// 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. + /// + public string Icon + { + get + { + return this.iconField; + } + set + { + this.iconFieldSet = true; + this.iconField = value; + } + } + + public int IconIndex + { + get + { + return this.iconIndexField; + } + set + { + this.iconIndexFieldSet = true; + this.iconIndexField = value; + } + } + + public YesNoType Advertise + { + get + { + return this.advertiseField; + } + set + { + this.advertiseFieldSet = true; + this.advertiseField = value; + } + } + + /// + /// 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. + /// + public string NoOpen + { + get + { + return this.noOpenField; + } + set + { + this.noOpenFieldSet = true; + this.noOpenField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ProgId" == childName)) + { + childValue = new ProgId(); + } + if (("Extension" == childName)) + { + childValue = new Extension(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ProgId", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.iconFieldSet) + { + writer.WriteAttributeString("Icon", this.iconField); + } + if (this.iconIndexFieldSet) + { + writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture)); + } + if (this.advertiseFieldSet) + { + if ((this.advertiseField == YesNoType.no)) + { + writer.WriteAttributeString("Advertise", "no"); + } + if ((this.advertiseField == YesNoType.yes)) + { + writer.WriteAttributeString("Advertise", "yes"); + } + } + if (this.noOpenFieldSet) + { + writer.WriteAttributeString("NoOpen", this.noOpenField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("Icon" == name)) + { + this.iconField = value; + this.iconFieldSet = true; + } + if (("IconIndex" == name)) + { + this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.iconIndexFieldSet = true; + } + if (("Advertise" == name)) + { + this.advertiseField = Enums.ParseYesNoType(value); + this.advertiseFieldSet = true; + } + if (("NoOpen" == name)) + { + this.noOpenField = value; + this.noOpenFieldSet = true; + } + } + } + + /// + /// Application ID containing DCOM information for the associated application GUID. + /// If this element is nested under a Fragment, Module, or Package element, it must be + /// advertised. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class AppId : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private YesNoType activateAtStorageField; + + private bool activateAtStorageFieldSet; + + private YesNoType advertiseField; + + private bool advertiseFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string dllSurrogateField; + + private bool dllSurrogateFieldSet; + + private string idField; + + private bool idFieldSet; + + private string localServiceField; + + private bool localServiceFieldSet; + + private string remoteServerNameField; + + private bool remoteServerNameFieldSet; + + private YesNoType runAsInteractiveUserField; + + private bool runAsInteractiveUserFieldSet; + + private string serviceParametersField; + + private bool serviceParametersFieldSet; + + private ISchemaElement parentElement; + + public AppId() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Set this value to 'yes' to configure the client to activate on the same system as persistent storage. + /// + public YesNoType ActivateAtStorage + { + get + { + return this.activateAtStorageField; + } + set + { + this.activateAtStorageFieldSet = true; + this.activateAtStorageField = value; + } + } + + /// + /// Set this value to 'yes' in order to create a normal AppId table row. Set this value to 'no' in order to + /// generate Registry rows that perform similar registration (without the often problematic Windows Installer + /// advertising behavior). + /// + public YesNoType Advertise + { + get + { + return this.advertiseField; + } + set + { + this.advertiseFieldSet = true; + this.advertiseField = value; + } + } + + /// + /// Set this value to the description of the AppId. It can only be specified when the AppId is not being advertised. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Set this value to specify that the class is a DLL that is to be activated in a surrogate EXE + /// process, and the surrogate process to be used is the path of a surrogate EXE file specified by the value. + /// + public string DllSurrogate + { + get + { + return this.dllSurrogateField; + } + set + { + this.dllSurrogateFieldSet = true; + this.dllSurrogateField = value; + } + } + + /// + /// Set this value to the AppID GUID that corresponds to the named executable. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Set this value to the name of a service to allow the object to be installed as a Win32 service. + /// + public string LocalService + { + get + { + return this.localServiceField; + } + set + { + this.localServiceFieldSet = true; + this.localServiceField = value; + } + } + + /// + /// Set this value to the name of the remote server to configure the client to request the object + /// be run at a particular machine whenever an activation function is called for which a COSERVERINFO + /// structure is not specified. + /// + public string RemoteServerName + { + get + { + return this.remoteServerNameField; + } + set + { + this.remoteServerNameFieldSet = true; + this.remoteServerNameField = value; + } + } + + /// + /// Set this value to 'yes' to configure a class to run under the identity of the user currently + /// logged on and connected to the interactive desktop when activated by a remote client without + /// being written as a Win32 service. + /// + public YesNoType RunAsInteractiveUser + { + get + { + return this.runAsInteractiveUserField; + } + set + { + this.runAsInteractiveUserFieldSet = true; + this.runAsInteractiveUserField = value; + } + } + + /// + /// Set this value to the parameters to be passed to a LocalService on invocation. + /// + public string ServiceParameters + { + get + { + return this.serviceParametersField; + } + set + { + this.serviceParametersFieldSet = true; + this.serviceParametersField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Class" == childName)) + { + childValue = new Class(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("AppId", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.activateAtStorageFieldSet) + { + if ((this.activateAtStorageField == YesNoType.no)) + { + writer.WriteAttributeString("ActivateAtStorage", "no"); + } + if ((this.activateAtStorageField == YesNoType.yes)) + { + writer.WriteAttributeString("ActivateAtStorage", "yes"); + } + } + if (this.advertiseFieldSet) + { + if ((this.advertiseField == YesNoType.no)) + { + writer.WriteAttributeString("Advertise", "no"); + } + if ((this.advertiseField == YesNoType.yes)) + { + writer.WriteAttributeString("Advertise", "yes"); + } + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.dllSurrogateFieldSet) + { + writer.WriteAttributeString("DllSurrogate", this.dllSurrogateField); + } + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.localServiceFieldSet) + { + writer.WriteAttributeString("LocalService", this.localServiceField); + } + if (this.remoteServerNameFieldSet) + { + writer.WriteAttributeString("RemoteServerName", this.remoteServerNameField); + } + if (this.runAsInteractiveUserFieldSet) + { + if ((this.runAsInteractiveUserField == YesNoType.no)) + { + writer.WriteAttributeString("RunAsInteractiveUser", "no"); + } + if ((this.runAsInteractiveUserField == YesNoType.yes)) + { + writer.WriteAttributeString("RunAsInteractiveUser", "yes"); + } + } + if (this.serviceParametersFieldSet) + { + writer.WriteAttributeString("ServiceParameters", this.serviceParametersField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("ActivateAtStorage" == name)) + { + this.activateAtStorageField = Enums.ParseYesNoType(value); + this.activateAtStorageFieldSet = true; + } + if (("Advertise" == name)) + { + this.advertiseField = Enums.ParseYesNoType(value); + this.advertiseFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("DllSurrogate" == name)) + { + this.dllSurrogateField = value; + this.dllSurrogateFieldSet = true; + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("LocalService" == name)) + { + this.localServiceField = value; + this.localServiceFieldSet = true; + } + if (("RemoteServerName" == name)) + { + this.remoteServerNameField = value; + this.remoteServerNameFieldSet = true; + } + if (("RunAsInteractiveUser" == name)) + { + this.runAsInteractiveUserField = Enums.ParseYesNoType(value); + this.runAsInteractiveUserFieldSet = true; + } + if (("ServiceParameters" == name)) + { + this.serviceParametersField = value; + this.serviceParametersFieldSet = true; + } + } + } + + /// + /// COM Class registration for parent Component. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Class : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ContextType contextField; + + private bool contextFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string appIdField; + + private bool appIdFieldSet; + + private string iconField; + + private bool iconFieldSet; + + private int iconIndexField; + + private bool iconIndexFieldSet; + + private string handlerField; + + private bool handlerFieldSet; + + private string argumentField; + + private bool argumentFieldSet; + + private YesNoType relativePathField; + + private bool relativePathFieldSet; + + private YesNoType advertiseField; + + private bool advertiseFieldSet; + + private ThreadingModelType threadingModelField; + + private bool threadingModelFieldSet; + + private string versionField; + + private bool versionFieldSet; + + private YesNoType insertableField; + + private bool insertableFieldSet; + + private YesNoType programmableField; + + private bool programmableFieldSet; + + private string foreignServerField; + + private bool foreignServerFieldSet; + + private string serverField; + + private bool serverFieldSet; + + private YesNoType shortPathField; + + private bool shortPathFieldSet; + + private YesNoType safeForScriptingField; + + private bool safeForScriptingFieldSet; + + private YesNoType safeForInitializingField; + + private bool safeForInitializingFieldSet; + + private YesNoType controlField; + + private bool controlFieldSet; + + private ISchemaElement parentElement; + + public Class() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgId))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileTypeMask))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// The Class identifier (CLSID) of a COM server. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The server context(s) for this COM server. This attribute is optional for VB6 libraries that are marked "PublicNotCreateable". + /// Class elements marked Advertised must specify at least one server context. It is most common for there to be a single value + /// for the Context attribute. + /// + public ContextType Context + { + get + { + return this.contextField; + } + set + { + this.contextFieldSet = true; + this.contextField = value; + } + } + + /// + /// Localized description associated with the Class ID and Program ID. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// This attribute is only allowed when a Class is advertised. Using this attribute will reference an Application ID + /// containing DCOM information for the associated application GUID. The value must correspond to an AppId/@Id of an + /// AppId element nested under a Fragment, Module, or Package element. To associate an AppId with a non-advertised + /// class, nest the class within a parent AppId element. + /// + public string AppId + { + get + { + return this.appIdField; + } + set + { + this.appIdFieldSet = true; + this.appIdField = value; + } + } + + /// + /// The file providing the icon associated with this CLSID. Reference to an Icon element + /// (should match the Id attribute of an Icon element). This is currently not supported if the + /// value of the Advertise attribute is "no". + /// + public string Icon + { + get + { + return this.iconField; + } + set + { + this.iconFieldSet = true; + this.iconField = value; + } + } + + /// + /// Icon index into the icon file. + /// + public int IconIndex + { + get + { + return this.iconIndexField; + } + set + { + this.iconIndexFieldSet = true; + this.iconIndexField = value; + } + } + + /// + /// The default inproc handler. May be optionally provided only for Context = LocalServer or + /// LocalServer32. Value of "1" creates a 16-bit InprocHandler (appearing as the InprocHandler + /// value). Value of "2" creates a 32-bit InprocHandler (appearing as the InprocHandler32 value). + /// Value of "3" creates 16-bit as well as 32-bit InprocHandlers. A non-numeric value is treated + /// as a system file that serves as the 32-bit InprocHandler (appearing as the InprocHandler32 value). + /// + public string Handler + { + get + { + return this.handlerField; + } + set + { + this.handlerFieldSet = true; + this.handlerField = value; + } + } + + /// + /// This column is optional only when the Context column is set to "LocalServer" + /// or "LocalServer32" server context. The text is registered as the argument against + /// the OLE server and is used by OLE for invoking the server. Note that the resolution + /// of properties in the Argument field is limited. A property formatted as [Property] in + /// this field can only be resolved if the property already has the intended value when + /// the component owning the class is installed. For example, for the argument "[#MyDoc.doc]" + /// to resolve to the correct value, the same process must be installing the file MyDoc.doc and the + /// component that owns the class. + /// + public string Argument + { + get + { + return this.argumentField; + } + set + { + this.argumentFieldSet = true; + this.argumentField = value; + } + } + + /// + /// When the value is "yes", the bare file name can be used for COM servers. The installer + /// registers the file name only instead of the complete path. This enables the server in + /// the current directory to take precedence and allows multiple copies of the same component. + /// + public YesNoType RelativePath + { + get + { + return this.relativePathField; + } + set + { + this.relativePathFieldSet = true; + this.relativePathField = value; + } + } + + /// + /// Set this value to "yes" in order to create a normal Class table row. Set this value to + /// "no" in order to generate Registry rows that perform similar registration (without the + /// often problematic Windows Installer advertising behavior). + /// + public YesNoType Advertise + { + get + { + return this.advertiseField; + } + set + { + this.advertiseFieldSet = true; + this.advertiseField = value; + } + } + + /// + /// Threading model for the CLSID. + /// + public ThreadingModelType ThreadingModel + { + get + { + return this.threadingModelField; + } + set + { + this.threadingModelFieldSet = true; + this.threadingModelField = value; + } + } + + /// + /// Version for the CLSID. + /// + public string Version + { + get + { + return this.versionField; + } + set + { + this.versionFieldSet = true; + this.versionField = value; + } + } + + /// + /// Specifies the CLSID may be insertable. + /// + public YesNoType Insertable + { + get + { + return this.insertableField; + } + set + { + this.insertableFieldSet = true; + this.insertableField = value; + } + } + + /// + /// Specifies the CLSID may be programmable. + /// + public YesNoType Programmable + { + get + { + return this.programmableField; + } + set + { + this.programmableFieldSet = true; + this.programmableField = value; + } + } + + /// + /// May only be specified if the value of the Advertise attribute is "no" and Server has not been specified. In addition, it may only + /// be used when the Class element is directly under the Component element. The value can be + /// that of an registry type (REG_SZ). This attribute should be used to specify foreign servers, such as mscoree.dll if needed. + /// + public string ForeignServer + { + get + { + return this.foreignServerField; + } + set + { + this.foreignServerFieldSet = true; + this.foreignServerField = value; + } + } + + /// + /// May only be specified if the value of the Advertise attribute is "no" and the ForeignServer attribute is not specified. File Id of the + /// COM server file. If this element is nested under a File element, this value defaults to + /// the value of the parent File/@Id. + /// + public string Server + { + get + { + return this.serverField; + } + set + { + this.serverFieldSet = true; + this.serverField = value; + } + } + + /// + /// 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. + /// + public YesNoType ShortPath + { + get + { + return this.shortPathField; + } + set + { + this.shortPathFieldSet = true; + this.shortPathField = value; + } + } + + /// + /// May only be specified if the value of the Advertise attribute is "no". + /// + public YesNoType SafeForScripting + { + get + { + return this.safeForScriptingField; + } + set + { + this.safeForScriptingFieldSet = true; + this.safeForScriptingField = value; + } + } + + /// + /// May only be specified if the value of the Advertise attribute is "no". + /// + public YesNoType SafeForInitializing + { + get + { + return this.safeForInitializingField; + } + set + { + this.safeForInitializingFieldSet = true; + this.safeForInitializingField = value; + } + } + + /// + /// Set this attribute's value to 'yes' to identify an object as an ActiveX Control. The default value is 'no'. + /// + public YesNoType Control + { + get + { + return this.controlField; + } + set + { + this.controlFieldSet = true; + this.controlField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ProgId" == childName)) + { + childValue = new ProgId(); + } + if (("FileTypeMask" == childName)) + { + childValue = new FileTypeMask(); + } + if (("Interface" == childName)) + { + childValue = new Interface(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Tries to parse a ContextType from a string. + /// + public static bool TryParseContextType(string value, out ContextType parsedValue) + { + parsedValue = ContextType.None; + if (string.IsNullOrEmpty(value)) + { + return false; + } + string[] splitValue = value.Split(" \t\r\n".ToCharArray(), System.StringSplitOptions.RemoveEmptyEntries); + for (System.Collections.IEnumerator enumerator = splitValue.GetEnumerator(); enumerator.MoveNext(); + ) + { + string currentValue = ((string)(enumerator.Current)); + if (("LocalServer" == currentValue)) + { + parsedValue = (parsedValue | ContextType.LocalServer); + } + else + { + if (("LocalServer32" == currentValue)) + { + parsedValue = (parsedValue | ContextType.LocalServer32); + } + else + { + if (("InprocServer" == currentValue)) + { + parsedValue = (parsedValue | ContextType.InprocServer); + } + else + { + if (("InprocServer32" == currentValue)) + { + parsedValue = (parsedValue | ContextType.InprocServer32); + } + else + { + parsedValue = ContextType.None; + return false; + } + } + } + } + } + return true; + } + + /// + /// Parses a ThreadingModelType from a string. + /// + public static ThreadingModelType ParseThreadingModelType(string value) + { + ThreadingModelType parsedValue; + Class.TryParseThreadingModelType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ThreadingModelType from a string. + /// + public static bool TryParseThreadingModelType(string value, out ThreadingModelType parsedValue) + { + parsedValue = ThreadingModelType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("apartment" == value)) + { + parsedValue = ThreadingModelType.apartment; + } + else + { + if (("free" == value)) + { + parsedValue = ThreadingModelType.free; + } + else + { + if (("both" == value)) + { + parsedValue = ThreadingModelType.both; + } + else + { + if (("neutral" == value)) + { + parsedValue = ThreadingModelType.neutral; + } + else + { + if (("single" == value)) + { + parsedValue = ThreadingModelType.single; + } + else + { + if (("rental" == value)) + { + parsedValue = ThreadingModelType.rental; + } + else + { + parsedValue = ThreadingModelType.IllegalValue; + return false; + } + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Class", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.contextFieldSet) + { + string outputValue = ""; + if (((this.contextField & ContextType.LocalServer) + != 0)) + { + if ((outputValue.Length != 0)) + { + outputValue = (outputValue + " "); + } + outputValue = (outputValue + "LocalServer"); + } + if (((this.contextField & ContextType.LocalServer32) + != 0)) + { + if ((outputValue.Length != 0)) + { + outputValue = (outputValue + " "); + } + outputValue = (outputValue + "LocalServer32"); + } + if (((this.contextField & ContextType.InprocServer) + != 0)) + { + if ((outputValue.Length != 0)) + { + outputValue = (outputValue + " "); + } + outputValue = (outputValue + "InprocServer"); + } + if (((this.contextField & ContextType.InprocServer32) + != 0)) + { + if ((outputValue.Length != 0)) + { + outputValue = (outputValue + " "); + } + outputValue = (outputValue + "InprocServer32"); + } + writer.WriteAttributeString("Context", outputValue); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.appIdFieldSet) + { + writer.WriteAttributeString("AppId", this.appIdField); + } + if (this.iconFieldSet) + { + writer.WriteAttributeString("Icon", this.iconField); + } + if (this.iconIndexFieldSet) + { + writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture)); + } + if (this.handlerFieldSet) + { + writer.WriteAttributeString("Handler", this.handlerField); + } + if (this.argumentFieldSet) + { + writer.WriteAttributeString("Argument", this.argumentField); + } + if (this.relativePathFieldSet) + { + if ((this.relativePathField == YesNoType.no)) + { + writer.WriteAttributeString("RelativePath", "no"); + } + if ((this.relativePathField == YesNoType.yes)) + { + writer.WriteAttributeString("RelativePath", "yes"); + } + } + if (this.advertiseFieldSet) + { + if ((this.advertiseField == YesNoType.no)) + { + writer.WriteAttributeString("Advertise", "no"); + } + if ((this.advertiseField == YesNoType.yes)) + { + writer.WriteAttributeString("Advertise", "yes"); + } + } + if (this.threadingModelFieldSet) + { + if ((this.threadingModelField == ThreadingModelType.apartment)) + { + writer.WriteAttributeString("ThreadingModel", "apartment"); + } + if ((this.threadingModelField == ThreadingModelType.free)) + { + writer.WriteAttributeString("ThreadingModel", "free"); + } + if ((this.threadingModelField == ThreadingModelType.both)) + { + writer.WriteAttributeString("ThreadingModel", "both"); + } + if ((this.threadingModelField == ThreadingModelType.neutral)) + { + writer.WriteAttributeString("ThreadingModel", "neutral"); + } + if ((this.threadingModelField == ThreadingModelType.single)) + { + writer.WriteAttributeString("ThreadingModel", "single"); + } + if ((this.threadingModelField == ThreadingModelType.rental)) + { + writer.WriteAttributeString("ThreadingModel", "rental"); + } + } + if (this.versionFieldSet) + { + writer.WriteAttributeString("Version", this.versionField); + } + if (this.insertableFieldSet) + { + if ((this.insertableField == YesNoType.no)) + { + writer.WriteAttributeString("Insertable", "no"); + } + if ((this.insertableField == YesNoType.yes)) + { + writer.WriteAttributeString("Insertable", "yes"); + } + } + if (this.programmableFieldSet) + { + if ((this.programmableField == YesNoType.no)) + { + writer.WriteAttributeString("Programmable", "no"); + } + if ((this.programmableField == YesNoType.yes)) + { + writer.WriteAttributeString("Programmable", "yes"); + } + } + if (this.foreignServerFieldSet) + { + writer.WriteAttributeString("ForeignServer", this.foreignServerField); + } + if (this.serverFieldSet) + { + writer.WriteAttributeString("Server", this.serverField); + } + if (this.shortPathFieldSet) + { + if ((this.shortPathField == YesNoType.no)) + { + writer.WriteAttributeString("ShortPath", "no"); + } + if ((this.shortPathField == YesNoType.yes)) + { + writer.WriteAttributeString("ShortPath", "yes"); + } + } + if (this.safeForScriptingFieldSet) + { + if ((this.safeForScriptingField == YesNoType.no)) + { + writer.WriteAttributeString("SafeForScripting", "no"); + } + if ((this.safeForScriptingField == YesNoType.yes)) + { + writer.WriteAttributeString("SafeForScripting", "yes"); + } + } + if (this.safeForInitializingFieldSet) + { + if ((this.safeForInitializingField == YesNoType.no)) + { + writer.WriteAttributeString("SafeForInitializing", "no"); + } + if ((this.safeForInitializingField == YesNoType.yes)) + { + writer.WriteAttributeString("SafeForInitializing", "yes"); + } + } + if (this.controlFieldSet) + { + if ((this.controlField == YesNoType.no)) + { + writer.WriteAttributeString("Control", "no"); + } + if ((this.controlField == YesNoType.yes)) + { + writer.WriteAttributeString("Control", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Context" == name)) + { + Class.TryParseContextType(value, out this.contextField); + this.contextFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("AppId" == name)) + { + this.appIdField = value; + this.appIdFieldSet = true; + } + if (("Icon" == name)) + { + this.iconField = value; + this.iconFieldSet = true; + } + if (("IconIndex" == name)) + { + this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.iconIndexFieldSet = true; + } + if (("Handler" == name)) + { + this.handlerField = value; + this.handlerFieldSet = true; + } + if (("Argument" == name)) + { + this.argumentField = value; + this.argumentFieldSet = true; + } + if (("RelativePath" == name)) + { + this.relativePathField = Enums.ParseYesNoType(value); + this.relativePathFieldSet = true; + } + if (("Advertise" == name)) + { + this.advertiseField = Enums.ParseYesNoType(value); + this.advertiseFieldSet = true; + } + if (("ThreadingModel" == name)) + { + this.threadingModelField = Class.ParseThreadingModelType(value); + this.threadingModelFieldSet = true; + } + if (("Version" == name)) + { + this.versionField = value; + this.versionFieldSet = true; + } + if (("Insertable" == name)) + { + this.insertableField = Enums.ParseYesNoType(value); + this.insertableFieldSet = true; + } + if (("Programmable" == name)) + { + this.programmableField = Enums.ParseYesNoType(value); + this.programmableFieldSet = true; + } + if (("ForeignServer" == name)) + { + this.foreignServerField = value; + this.foreignServerFieldSet = true; + } + if (("Server" == name)) + { + this.serverField = value; + this.serverFieldSet = true; + } + if (("ShortPath" == name)) + { + this.shortPathField = Enums.ParseYesNoType(value); + this.shortPathFieldSet = true; + } + if (("SafeForScripting" == name)) + { + this.safeForScriptingField = Enums.ParseYesNoType(value); + this.safeForScriptingFieldSet = true; + } + if (("SafeForInitializing" == name)) + { + this.safeForInitializingField = Enums.ParseYesNoType(value); + this.safeForInitializingFieldSet = true; + } + if (("Control" == name)) + { + this.controlField = Enums.ParseYesNoType(value); + this.controlFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + [Flags()] + public enum ContextType + { + + None = 0, + + /// + /// A 16-bit local server application. + /// + LocalServer = 1, + + /// + /// A 32-bit local server application. + /// + LocalServer32 = 2, + + /// + /// A 16-bit in-process server DLL. + /// + InprocServer = 4, + + /// + /// A 32-bit in-process server DLL. + /// + InprocServer32 = 8, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ThreadingModelType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + apartment, + + free, + + both, + + neutral, + + single, + + rental, + } + } + + /// + /// COM Interface registration for parent TypeLib. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Interface : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string baseInterfaceField; + + private bool baseInterfaceFieldSet; + + private string proxyStubClassIdField; + + private bool proxyStubClassIdFieldSet; + + private string proxyStubClassId32Field; + + private bool proxyStubClassId32FieldSet; + + private int numMethodsField; + + private bool numMethodsFieldSet; + + private YesNoType versionedField; + + private bool versionedFieldSet; + + private ISchemaElement parentElement; + + /// + /// GUID identifier for COM Interface. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name for COM Interface. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Identifies the interface from which the current interface is derived. + /// + public string BaseInterface + { + get + { + return this.baseInterfaceField; + } + set + { + this.baseInterfaceFieldSet = true; + this.baseInterfaceField = value; + } + } + + /// + /// GUID CLSID for proxy stub to COM Interface. + /// + public string ProxyStubClassId + { + get + { + return this.proxyStubClassIdField; + } + set + { + this.proxyStubClassIdFieldSet = true; + this.proxyStubClassIdField = value; + } + } + + /// + /// GUID CLSID for 32-bit proxy stub to COM Interface. + /// + public string ProxyStubClassId32 + { + get + { + return this.proxyStubClassId32Field; + } + set + { + this.proxyStubClassId32FieldSet = true; + this.proxyStubClassId32Field = value; + } + } + + /// + /// Number of methods implemented on COM Interface. + /// + public int NumMethods + { + get + { + return this.numMethodsField; + } + set + { + this.numMethodsFieldSet = true; + this.numMethodsField = value; + } + } + + /// + /// Determines whether a Typelib version entry should be created with the other COM Interface registry keys. Default is 'yes'. + /// + public YesNoType Versioned + { + get + { + return this.versionedField; + } + set + { + this.versionedFieldSet = true; + this.versionedField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Interface", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.baseInterfaceFieldSet) + { + writer.WriteAttributeString("BaseInterface", this.baseInterfaceField); + } + if (this.proxyStubClassIdFieldSet) + { + writer.WriteAttributeString("ProxyStubClassId", this.proxyStubClassIdField); + } + if (this.proxyStubClassId32FieldSet) + { + writer.WriteAttributeString("ProxyStubClassId32", this.proxyStubClassId32Field); + } + if (this.numMethodsFieldSet) + { + writer.WriteAttributeString("NumMethods", this.numMethodsField.ToString(CultureInfo.InvariantCulture)); + } + if (this.versionedFieldSet) + { + if ((this.versionedField == YesNoType.no)) + { + writer.WriteAttributeString("Versioned", "no"); + } + if ((this.versionedField == YesNoType.yes)) + { + writer.WriteAttributeString("Versioned", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("BaseInterface" == name)) + { + this.baseInterfaceField = value; + this.baseInterfaceFieldSet = true; + } + if (("ProxyStubClassId" == name)) + { + this.proxyStubClassIdField = value; + this.proxyStubClassIdFieldSet = true; + } + if (("ProxyStubClassId32" == name)) + { + this.proxyStubClassId32Field = value; + this.proxyStubClassId32FieldSet = true; + } + if (("NumMethods" == name)) + { + this.numMethodsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.numMethodsFieldSet = true; + } + if (("Versioned" == name)) + { + this.versionedField = Enums.ParseYesNoType(value); + this.versionedFieldSet = true; + } + } + } + + /// + /// FileType data for class Id registration. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class FileTypeMask : ISchemaElement, ISetAttributes + { + + private int offsetField; + + private bool offsetFieldSet; + + private string maskField; + + private bool maskFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + /// + /// Offset into file. If positive, offset is from the beginning; if negative, offset is from the end. + /// + public int Offset + { + get + { + return this.offsetField; + } + set + { + this.offsetFieldSet = true; + this.offsetField = value; + } + } + + /// + /// Hex value that is AND'd against the bytes in the file at Offset. + /// + public string Mask + { + get + { + return this.maskField; + } + set + { + this.maskFieldSet = true; + this.maskField = value; + } + } + + /// + /// 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. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FileTypeMask", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.offsetFieldSet) + { + writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture)); + } + if (this.maskFieldSet) + { + writer.WriteAttributeString("Mask", this.maskField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Offset" == name)) + { + this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.offsetFieldSet = true; + } + if (("Mask" == name)) + { + this.maskField = value; + this.maskFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + } + + /// + /// Service or group of services that must start before the parent service. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ServiceDependency : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private YesNoType groupField; + + private bool groupFieldSet; + + private ISchemaElement parentElement; + + /// + /// The value of this attribute should be one of the following: + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Set to 'yes' to indicate that the value in the Id attribute is the name of a group of services. + /// + public YesNoType Group + { + get + { + return this.groupField; + } + set + { + this.groupFieldSet = true; + this.groupField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ServiceDependency", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.groupFieldSet) + { + if ((this.groupField == YesNoType.no)) + { + writer.WriteAttributeString("Group", "no"); + } + if ((this.groupField == YesNoType.yes)) + { + writer.WriteAttributeString("Group", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Group" == name)) + { + this.groupField = Enums.ParseYesNoType(value); + this.groupFieldSet = true; + } + } + } + + /// + /// Adds services for parent Component. Use the ServiceControl element to remove services. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ServiceInstall : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string displayNameField; + + private bool displayNameFieldSet; + + private TypeType typeField; + + private bool typeFieldSet; + + private YesNoType interactiveField; + + private bool interactiveFieldSet; + + private StartType startField; + + private bool startFieldSet; + + private ErrorControlType errorControlField; + + private bool errorControlFieldSet; + + private YesNoType vitalField; + + private bool vitalFieldSet; + + private string loadOrderGroupField; + + private bool loadOrderGroupFieldSet; + + private string accountField; + + private bool accountFieldSet; + + private string passwordField; + + private bool passwordFieldSet; + + private string argumentsField; + + private bool argumentsFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private YesNoType eraseDescriptionField; + + private bool eraseDescriptionFieldSet; + + private ISchemaElement parentElement; + + public ServiceInstall() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceDependency))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfig))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfigFailureActions))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Unique identifier for this service configuration. This value will default to the Name attribute if not + /// specified. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// This column is the string that gives the service name to install. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// This column is the localizable string that user interface programs use to identify the service. + /// + public string DisplayName + { + get + { + return this.displayNameField; + } + set + { + this.displayNameFieldSet = true; + this.displayNameField = value; + } + } + + /// + /// The Windows Installer does not currently support kernelDriver or systemDriver. + /// + public TypeType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + /// + /// Whether or not the service interacts with the desktop. + /// + public YesNoType Interactive + { + get + { + return this.interactiveField; + } + set + { + this.interactiveFieldSet = true; + this.interactiveField = value; + } + } + + /// + /// Determines when the service should be started. The Windows Installer does not support boot or system. + /// + public StartType Start + { + get + { + return this.startField; + } + set + { + this.startFieldSet = true; + this.startField = value; + } + } + + /// + /// Determines what action should be taken on an error. + /// + public ErrorControlType ErrorControl + { + get + { + return this.errorControlField; + } + set + { + this.errorControlFieldSet = true; + this.errorControlField = value; + } + } + + /// + /// The overall install should fail if this service fails to install. + /// + public YesNoType Vital + { + get + { + return this.vitalField; + } + set + { + this.vitalFieldSet = true; + this.vitalField = value; + } + } + + /// + /// The load ordering group that this service should be a part of. + /// + public string LoadOrderGroup + { + get + { + return this.loadOrderGroupField; + } + set + { + this.loadOrderGroupFieldSet = true; + this.loadOrderGroupField = value; + } + } + + /// + /// Fully qualified names must be used even for local accounts, e.g.: ".\LOCAL_ACCOUNT". Valid only when ServiceType is ownProcess. + /// + public string Account + { + get + { + return this.accountField; + } + set + { + this.accountFieldSet = true; + this.accountField = value; + } + } + + /// + /// The password for the account. Valid only when the account has a password. + /// + public string Password + { + get + { + return this.passwordField; + } + set + { + this.passwordFieldSet = true; + this.passwordField = value; + } + } + + /// + /// Contains any command line arguments or properties required to run the service. + /// + public string Arguments + { + get + { + return this.argumentsField; + } + set + { + this.argumentsFieldSet = true; + this.argumentsField = value; + } + } + + /// + /// Sets the description of the service. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Determines whether the existing service description will be ignored. If 'yes', the service description will be null, even if the Description attribute is set. + /// + public YesNoType EraseDescription + { + get + { + return this.eraseDescriptionField; + } + set + { + this.eraseDescriptionFieldSet = true; + this.eraseDescriptionField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("PermissionEx" == childName)) + { + childValue = new PermissionEx(); + } + if (("ServiceDependency" == childName)) + { + childValue = new ServiceDependency(); + } + if (("ServiceConfig" == childName)) + { + childValue = new ServiceConfig(); + } + if (("ServiceConfigFailureActions" == childName)) + { + childValue = new ServiceConfigFailureActions(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a TypeType from a string. + /// + public static TypeType ParseTypeType(string value) + { + TypeType parsedValue; + ServiceInstall.TryParseTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypeType from a string. + /// + public static bool TryParseTypeType(string value, out TypeType parsedValue) + { + parsedValue = TypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("ownProcess" == value)) + { + parsedValue = TypeType.ownProcess; + } + else + { + if (("shareProcess" == value)) + { + parsedValue = TypeType.shareProcess; + } + else + { + if (("kernelDriver" == value)) + { + parsedValue = TypeType.kernelDriver; + } + else + { + if (("systemDriver" == value)) + { + parsedValue = TypeType.systemDriver; + } + else + { + parsedValue = TypeType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Parses a StartType from a string. + /// + public static StartType ParseStartType(string value) + { + StartType parsedValue; + ServiceInstall.TryParseStartType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a StartType from a string. + /// + public static bool TryParseStartType(string value, out StartType parsedValue) + { + parsedValue = StartType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("auto" == value)) + { + parsedValue = StartType.auto; + } + else + { + if (("demand" == value)) + { + parsedValue = StartType.demand; + } + else + { + if (("disabled" == value)) + { + parsedValue = StartType.disabled; + } + else + { + if (("boot" == value)) + { + parsedValue = StartType.boot; + } + else + { + if (("system" == value)) + { + parsedValue = StartType.system; + } + else + { + parsedValue = StartType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + + /// + /// Parses a ErrorControlType from a string. + /// + public static ErrorControlType ParseErrorControlType(string value) + { + ErrorControlType parsedValue; + ServiceInstall.TryParseErrorControlType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ErrorControlType from a string. + /// + public static bool TryParseErrorControlType(string value, out ErrorControlType parsedValue) + { + parsedValue = ErrorControlType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("ignore" == value)) + { + parsedValue = ErrorControlType.ignore; + } + else + { + if (("normal" == value)) + { + parsedValue = ErrorControlType.normal; + } + else + { + if (("critical" == value)) + { + parsedValue = ErrorControlType.critical; + } + else + { + parsedValue = ErrorControlType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ServiceInstall", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.displayNameFieldSet) + { + writer.WriteAttributeString("DisplayName", this.displayNameField); + } + if (this.typeFieldSet) + { + if ((this.typeField == TypeType.ownProcess)) + { + writer.WriteAttributeString("Type", "ownProcess"); + } + if ((this.typeField == TypeType.shareProcess)) + { + writer.WriteAttributeString("Type", "shareProcess"); + } + if ((this.typeField == TypeType.kernelDriver)) + { + writer.WriteAttributeString("Type", "kernelDriver"); + } + if ((this.typeField == TypeType.systemDriver)) + { + writer.WriteAttributeString("Type", "systemDriver"); + } + } + if (this.interactiveFieldSet) + { + if ((this.interactiveField == YesNoType.no)) + { + writer.WriteAttributeString("Interactive", "no"); + } + if ((this.interactiveField == YesNoType.yes)) + { + writer.WriteAttributeString("Interactive", "yes"); + } + } + if (this.startFieldSet) + { + if ((this.startField == StartType.auto)) + { + writer.WriteAttributeString("Start", "auto"); + } + if ((this.startField == StartType.demand)) + { + writer.WriteAttributeString("Start", "demand"); + } + if ((this.startField == StartType.disabled)) + { + writer.WriteAttributeString("Start", "disabled"); + } + if ((this.startField == StartType.boot)) + { + writer.WriteAttributeString("Start", "boot"); + } + if ((this.startField == StartType.system)) + { + writer.WriteAttributeString("Start", "system"); + } + } + if (this.errorControlFieldSet) + { + if ((this.errorControlField == ErrorControlType.ignore)) + { + writer.WriteAttributeString("ErrorControl", "ignore"); + } + if ((this.errorControlField == ErrorControlType.normal)) + { + writer.WriteAttributeString("ErrorControl", "normal"); + } + if ((this.errorControlField == ErrorControlType.critical)) + { + writer.WriteAttributeString("ErrorControl", "critical"); + } + } + if (this.vitalFieldSet) + { + if ((this.vitalField == YesNoType.no)) + { + writer.WriteAttributeString("Vital", "no"); + } + if ((this.vitalField == YesNoType.yes)) + { + writer.WriteAttributeString("Vital", "yes"); + } + } + if (this.loadOrderGroupFieldSet) + { + writer.WriteAttributeString("LoadOrderGroup", this.loadOrderGroupField); + } + if (this.accountFieldSet) + { + writer.WriteAttributeString("Account", this.accountField); + } + if (this.passwordFieldSet) + { + writer.WriteAttributeString("Password", this.passwordField); + } + if (this.argumentsFieldSet) + { + writer.WriteAttributeString("Arguments", this.argumentsField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.eraseDescriptionFieldSet) + { + if ((this.eraseDescriptionField == YesNoType.no)) + { + writer.WriteAttributeString("EraseDescription", "no"); + } + if ((this.eraseDescriptionField == YesNoType.yes)) + { + writer.WriteAttributeString("EraseDescription", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("DisplayName" == name)) + { + this.displayNameField = value; + this.displayNameFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = ServiceInstall.ParseTypeType(value); + this.typeFieldSet = true; + } + if (("Interactive" == name)) + { + this.interactiveField = Enums.ParseYesNoType(value); + this.interactiveFieldSet = true; + } + if (("Start" == name)) + { + this.startField = ServiceInstall.ParseStartType(value); + this.startFieldSet = true; + } + if (("ErrorControl" == name)) + { + this.errorControlField = ServiceInstall.ParseErrorControlType(value); + this.errorControlFieldSet = true; + } + if (("Vital" == name)) + { + this.vitalField = Enums.ParseYesNoType(value); + this.vitalFieldSet = true; + } + if (("LoadOrderGroup" == name)) + { + this.loadOrderGroupField = value; + this.loadOrderGroupFieldSet = true; + } + if (("Account" == name)) + { + this.accountField = value; + this.accountFieldSet = true; + } + if (("Password" == name)) + { + this.passwordField = value; + this.passwordFieldSet = true; + } + if (("Arguments" == name)) + { + this.argumentsField = value; + this.argumentsFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("EraseDescription" == name)) + { + this.eraseDescriptionField = Enums.ParseYesNoType(value); + this.eraseDescriptionFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum TypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// A Win32 service that runs its own process. + /// + ownProcess, + + /// + /// A Win32 service that shares a process. + /// + shareProcess, + + /// + /// A kernel driver service. This value is not currently supported by the Windows Installer. + /// + kernelDriver, + + /// + /// A file system driver service. This value is not currently supported by the Windows Installer. + /// + systemDriver, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum StartType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// The service will start during startup of the system. + /// + auto, + + /// + /// The service will start when the service control manager calls the StartService function. + /// + demand, + + /// + /// The service can no longer be started. + /// + disabled, + + /// + /// 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. + /// + boot, + + /// + /// The service is a device driver that will be started by the IoInitSystem function. This value is not currently supported by the Windows Installer. + /// + system, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ErrorControlType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Logs the error and continues with the startup operation. + /// + ignore, + + /// + /// Logs the error, displays a message box and continues the startup operation. + /// + normal, + + /// + /// 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. + /// + critical, + } + } + + /// + /// Argument used in ServiceControl parent + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ServiceArgument : ISetAttributes, ISchemaElement + { + + private ISchemaElement parentElement; + + private string contentField; + + private bool contentFieldSet; + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Argument used in ServiceControl parent + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ServiceArgument", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + } + + /// + /// Starts, stops, and removes services for parent Component. This element is used to control the state + /// of a service installed by the MSI or MSM file by using the start, stop and remove attributes. + /// For example, Start='install' Stop='both' Remove='uninstall' would mean: start the service on install, + /// remove the service when the product is uninstalled, and stop the service both on install and uninstall. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ServiceControl : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private InstallUninstallType startField; + + private bool startFieldSet; + + private InstallUninstallType stopField; + + private bool stopFieldSet; + + private InstallUninstallType removeField; + + private bool removeFieldSet; + + private YesNoType waitField; + + private bool waitFieldSet; + + private ISchemaElement parentElement; + + public ServiceControl() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ServiceArgument))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the service. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Specifies whether the service should be started by the StartServices action on install, uninstall or both. + /// For 'install', the service will be started only when the parent component is being installed (msiInstallStateLocal or + /// msiInstallStateSource); for 'uninstall', the service will be started only when the parent component + /// is being removed (msiInstallStateAbsent); for 'both', the service will be started in both cases. + /// + public InstallUninstallType Start + { + get + { + return this.startField; + } + set + { + this.startFieldSet = true; + this.startField = value; + } + } + + /// + /// Specifies whether the service should be stopped by the StopServices action on install, uninstall or both. + /// For 'install', the service will be stopped only when the parent component is being installed (msiInstallStateLocal or + /// msiInstallStateSource); for 'uninstall', the service will be stopped only when the parent component + /// is being removed (msiInstallStateAbsent); for 'both', the service will be stopped in both cases. + /// + public InstallUninstallType Stop + { + get + { + return this.stopField; + } + set + { + this.stopFieldSet = true; + this.stopField = value; + } + } + + /// + /// Specifies whether the service should be removed by the DeleteServices action on install, uninstall or both. + /// For 'install', the service will be removed only when the parent component is being installed (msiInstallStateLocal or + /// msiInstallStateSource); for 'uninstall', the service will be removed only when the parent component + /// is being removed (msiInstallStateAbsent); for 'both', the service will be removed in both cases. + /// + public InstallUninstallType Remove + { + get + { + return this.removeField; + } + set + { + this.removeFieldSet = true; + this.removeField = value; + } + } + + /// + /// Specifies whether or not to wait for the service to complete before continuing. The default is 'yes'. + /// + public YesNoType Wait + { + get + { + return this.waitField; + } + set + { + this.waitFieldSet = true; + this.waitField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ServiceArgument" == childName)) + { + childValue = new ServiceArgument(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ServiceControl", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.startFieldSet) + { + if ((this.startField == InstallUninstallType.install)) + { + writer.WriteAttributeString("Start", "install"); + } + if ((this.startField == InstallUninstallType.uninstall)) + { + writer.WriteAttributeString("Start", "uninstall"); + } + if ((this.startField == InstallUninstallType.both)) + { + writer.WriteAttributeString("Start", "both"); + } + } + if (this.stopFieldSet) + { + if ((this.stopField == InstallUninstallType.install)) + { + writer.WriteAttributeString("Stop", "install"); + } + if ((this.stopField == InstallUninstallType.uninstall)) + { + writer.WriteAttributeString("Stop", "uninstall"); + } + if ((this.stopField == InstallUninstallType.both)) + { + writer.WriteAttributeString("Stop", "both"); + } + } + if (this.removeFieldSet) + { + if ((this.removeField == InstallUninstallType.install)) + { + writer.WriteAttributeString("Remove", "install"); + } + if ((this.removeField == InstallUninstallType.uninstall)) + { + writer.WriteAttributeString("Remove", "uninstall"); + } + if ((this.removeField == InstallUninstallType.both)) + { + writer.WriteAttributeString("Remove", "both"); + } + } + if (this.waitFieldSet) + { + if ((this.waitField == YesNoType.no)) + { + writer.WriteAttributeString("Wait", "no"); + } + if ((this.waitField == YesNoType.yes)) + { + writer.WriteAttributeString("Wait", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Start" == name)) + { + this.startField = Enums.ParseInstallUninstallType(value); + this.startFieldSet = true; + } + if (("Stop" == name)) + { + this.stopField = Enums.ParseInstallUninstallType(value); + this.stopFieldSet = true; + } + if (("Remove" == name)) + { + this.removeField = Enums.ParseInstallUninstallType(value); + this.removeFieldSet = true; + } + if (("Wait" == name)) + { + this.waitField = Enums.ParseYesNoType(value); + this.waitFieldSet = true; + } + } + } + + /// + /// Privilege required by service configured by ServiceConfig parent. Valid values are a + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RequiredPrivilege : ISetAttributes, ISchemaElement + { + + private ISchemaElement parentElement; + + private string contentField; + + private bool contentFieldSet; + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Privilege required by service configured by ServiceConfig parent. Valid values are a + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RequiredPrivilege", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + } + + /// + /// Configures a service being installed or one that already exists. This element's functionality is available starting with MSI 5.0. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ServiceConfig : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string delayedAutoStartField; + + private bool delayedAutoStartFieldSet; + + private string failureActionsWhenField; + + private bool failureActionsWhenFieldSet; + + private string preShutdownDelayField; + + private bool preShutdownDelayFieldSet; + + private YesNoType onInstallField; + + private bool onInstallFieldSet; + + private YesNoType onReinstallField; + + private bool onReinstallFieldSet; + + private YesNoType onUninstallField; + + private bool onUninstallFieldSet; + + private string serviceNameField; + + private bool serviceNameFieldSet; + + private string serviceSidField; + + private bool serviceSidFieldSet; + + private ISchemaElement parentElement; + + public ServiceConfig() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RequiredPrivilege))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Unique identifier for this service configuration. This value will default to the ServiceName attribute if not + /// specified. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// This attribute specifies whether an auto-start service should delay its start until after all other auto-start + /// services. This attribute only affects auto-start services. Allowed values are "yes", "no" or a Formatted property that + /// resolves to "1" (for "yes") or "0" (for "no"). If this attribute is not present the setting is not configured. + /// + public string DelayedAutoStart + { + get + { + return this.delayedAutoStartField; + } + set + { + this.delayedAutoStartFieldSet = true; + this.delayedAutoStartField = value; + } + } + + /// + /// This attribute specifies when failure actions should be applied. Allowed values are "failedToStop", "failedToStopOrReturnedError" + /// or a Formatted property that resolves to "1" (for "failedToStopOrReturnedError") or "0" (for "failedToStop"). If this attribute + /// is not present the setting is not configured. + /// + public string FailureActionsWhen + { + get + { + return this.failureActionsWhenField; + } + set + { + this.failureActionsWhenFieldSet = true; + this.failureActionsWhenField = value; + } + } + + /// + /// This attribute specifies time in milliseconds that the Service Control Manager (SCM) waits after notifying the service of a system + /// shutdown. If this attribute is not present the default value, 3 minutes, is used. + /// + public string PreShutdownDelay + { + get + { + return this.preShutdownDelayField; + } + set + { + this.preShutdownDelayFieldSet = true; + this.preShutdownDelayField = value; + } + } + + /// + /// Specifies whether to configure the service when the parent Component is installed. This attribute may be combined with OnReinstall + /// and OnUninstall. + /// + public YesNoType OnInstall + { + get + { + return this.onInstallField; + } + set + { + this.onInstallFieldSet = true; + this.onInstallField = value; + } + } + + /// + /// Specifies whether to configure the service when the parent Component is reinstalled. This attribute may be combined with OnInstall + /// and OnUninstall. + /// + public YesNoType OnReinstall + { + get + { + return this.onReinstallField; + } + set + { + this.onReinstallFieldSet = true; + this.onReinstallField = value; + } + } + + /// + /// Specifies whether to configure the service when the parent Component is uninstalled. This attribute may be combined with OnInstall + /// and OnReinstall. + /// + public YesNoType OnUninstall + { + get + { + return this.onUninstallField; + } + set + { + this.onUninstallFieldSet = true; + this.onUninstallField = value; + } + } + + /// + /// Specifies the name of the service to configure. This value will default to the ServiceInstall/@Name attribute when nested under + /// a ServiceInstall element. + /// + public string ServiceName + { + get + { + return this.serviceNameField; + } + set + { + this.serviceNameFieldSet = true; + this.serviceNameField = value; + } + } + + /// + /// Specifies the service SID to apply to the service. Valid values are "none", "restricted", "unrestricted" or a Formatted property + /// that resolves to "0" (for "none"), "3" (for "restricted") or "1" (for "unrestricted"). If this attribute is not present the + /// setting is not configured. + /// + public string ServiceSid + { + get + { + return this.serviceSidField; + } + set + { + this.serviceSidFieldSet = true; + this.serviceSidField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("RequiredPrivilege" == childName)) + { + childValue = new RequiredPrivilege(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ServiceConfig", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.delayedAutoStartFieldSet) + { + writer.WriteAttributeString("DelayedAutoStart", this.delayedAutoStartField); + } + if (this.failureActionsWhenFieldSet) + { + writer.WriteAttributeString("FailureActionsWhen", this.failureActionsWhenField); + } + if (this.preShutdownDelayFieldSet) + { + writer.WriteAttributeString("PreShutdownDelay", this.preShutdownDelayField); + } + if (this.onInstallFieldSet) + { + if ((this.onInstallField == YesNoType.no)) + { + writer.WriteAttributeString("OnInstall", "no"); + } + if ((this.onInstallField == YesNoType.yes)) + { + writer.WriteAttributeString("OnInstall", "yes"); + } + } + if (this.onReinstallFieldSet) + { + if ((this.onReinstallField == YesNoType.no)) + { + writer.WriteAttributeString("OnReinstall", "no"); + } + if ((this.onReinstallField == YesNoType.yes)) + { + writer.WriteAttributeString("OnReinstall", "yes"); + } + } + if (this.onUninstallFieldSet) + { + if ((this.onUninstallField == YesNoType.no)) + { + writer.WriteAttributeString("OnUninstall", "no"); + } + if ((this.onUninstallField == YesNoType.yes)) + { + writer.WriteAttributeString("OnUninstall", "yes"); + } + } + if (this.serviceNameFieldSet) + { + writer.WriteAttributeString("ServiceName", this.serviceNameField); + } + if (this.serviceSidFieldSet) + { + writer.WriteAttributeString("ServiceSid", this.serviceSidField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("DelayedAutoStart" == name)) + { + this.delayedAutoStartField = value; + this.delayedAutoStartFieldSet = true; + } + if (("FailureActionsWhen" == name)) + { + this.failureActionsWhenField = value; + this.failureActionsWhenFieldSet = true; + } + if (("PreShutdownDelay" == name)) + { + this.preShutdownDelayField = value; + this.preShutdownDelayFieldSet = true; + } + if (("OnInstall" == name)) + { + this.onInstallField = Enums.ParseYesNoType(value); + this.onInstallFieldSet = true; + } + if (("OnReinstall" == name)) + { + this.onReinstallField = Enums.ParseYesNoType(value); + this.onReinstallFieldSet = true; + } + if (("OnUninstall" == name)) + { + this.onUninstallField = Enums.ParseYesNoType(value); + this.onUninstallFieldSet = true; + } + if (("ServiceName" == name)) + { + this.serviceNameField = value; + this.serviceNameFieldSet = true; + } + if (("ServiceSid" == name)) + { + this.serviceSidField = value; + this.serviceSidFieldSet = true; + } + } + } + + /// + /// Failure action for a ServiceConfigFailureActions element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Failure : ISchemaElement, ISetAttributes + { + + private string actionField; + + private bool actionFieldSet; + + private string delayField; + + private bool delayFieldSet; + + private ISchemaElement parentElement; + + /// + /// Specifies the action to take when the service fails. Valid values are "none", "restartComputer", "restartService", "runCommand" or a Formatted property + /// that resolves to "0" (for "none"), "1" (for "restartService"), "2" (for "restartComputer") or "3" (for "runCommand"). + /// + public string Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// Specifies the time in milliseconds to wait before performing the value from the Action attribute. + /// + public string Delay + { + get + { + return this.delayField; + } + set + { + this.delayFieldSet = true; + this.delayField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Failure", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.actionFieldSet) + { + writer.WriteAttributeString("Action", this.actionField); + } + if (this.delayFieldSet) + { + writer.WriteAttributeString("Delay", this.delayField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Action" == name)) + { + this.actionField = value; + this.actionFieldSet = true; + } + if (("Delay" == name)) + { + this.delayField = value; + this.delayFieldSet = true; + } + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ServiceConfigFailureActions : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string commandField; + + private bool commandFieldSet; + + private YesNoType onInstallField; + + private bool onInstallFieldSet; + + private YesNoType onReinstallField; + + private bool onReinstallFieldSet; + + private YesNoType onUninstallField; + + private bool onUninstallFieldSet; + + private string rebootMessageField; + + private bool rebootMessageFieldSet; + + private string resetPeriodField; + + private bool resetPeriodFieldSet; + + private string serviceNameField; + + private bool serviceNameFieldSet; + + private ISchemaElement parentElement; + + public ServiceConfigFailureActions() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Failure))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Unique identifier for this service configuration. This value will default to the ServiceName attribute if not + /// specified. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// This attribute specifies command to execute when a "runCommand" failure action hit. If an empty string is provided it clears + /// the existing command. If this attribute is not present the setting is not changed. + /// + public string Command + { + get + { + return this.commandField; + } + set + { + this.commandFieldSet = true; + this.commandField = value; + } + } + + /// + /// Specifies whether to configure the service when the parent Component is installed. This attribute may be combined with OnReinstall + /// and OnUninstall. + /// + public YesNoType OnInstall + { + get + { + return this.onInstallField; + } + set + { + this.onInstallFieldSet = true; + this.onInstallField = value; + } + } + + /// + /// Specifies whether to configure the service when the parent Component is reinstalled. This attribute may be combined with OnInstall + /// and OnUninstall. + /// + public YesNoType OnReinstall + { + get + { + return this.onReinstallField; + } + set + { + this.onReinstallFieldSet = true; + this.onReinstallField = value; + } + } + + /// + /// Specifies whether to configure the service when the parent Component is uninstalled. This attribute may be combined with OnInstall + /// and OnReinstall. + /// + public YesNoType OnUninstall + { + get + { + return this.onUninstallField; + } + set + { + this.onUninstallFieldSet = true; + this.onUninstallField = value; + } + } + + /// + /// Specifies the message to show for a reboot failure action. If an empty string is provided it clears any existing reboot message. If this + /// attribute is not present the setting is not changed. + /// + public string RebootMessage + { + get + { + return this.rebootMessageField; + } + set + { + this.rebootMessageFieldSet = true; + this.rebootMessageField = value; + } + } + + /// + /// Specifies the time in seconds to reset the failure count. If this attribute is not present the failure count will not be reset. + /// + public string ResetPeriod + { + get + { + return this.resetPeriodField; + } + set + { + this.resetPeriodFieldSet = true; + this.resetPeriodField = value; + } + } + + /// + /// Specifies the name of the service to configure. This value will default to the ServiceInstall/@Name attribute when nested under + /// a ServiceInstall element. + /// + public string ServiceName + { + get + { + return this.serviceNameField; + } + set + { + this.serviceNameFieldSet = true; + this.serviceNameField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Failure" == childName)) + { + childValue = new Failure(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ServiceConfigFailureActions", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.commandFieldSet) + { + writer.WriteAttributeString("Command", this.commandField); + } + if (this.onInstallFieldSet) + { + if ((this.onInstallField == YesNoType.no)) + { + writer.WriteAttributeString("OnInstall", "no"); + } + if ((this.onInstallField == YesNoType.yes)) + { + writer.WriteAttributeString("OnInstall", "yes"); + } + } + if (this.onReinstallFieldSet) + { + if ((this.onReinstallField == YesNoType.no)) + { + writer.WriteAttributeString("OnReinstall", "no"); + } + if ((this.onReinstallField == YesNoType.yes)) + { + writer.WriteAttributeString("OnReinstall", "yes"); + } + } + if (this.onUninstallFieldSet) + { + if ((this.onUninstallField == YesNoType.no)) + { + writer.WriteAttributeString("OnUninstall", "no"); + } + if ((this.onUninstallField == YesNoType.yes)) + { + writer.WriteAttributeString("OnUninstall", "yes"); + } + } + if (this.rebootMessageFieldSet) + { + writer.WriteAttributeString("RebootMessage", this.rebootMessageField); + } + if (this.resetPeriodFieldSet) + { + writer.WriteAttributeString("ResetPeriod", this.resetPeriodField); + } + if (this.serviceNameFieldSet) + { + writer.WriteAttributeString("ServiceName", this.serviceNameField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Command" == name)) + { + this.commandField = value; + this.commandFieldSet = true; + } + if (("OnInstall" == name)) + { + this.onInstallField = Enums.ParseYesNoType(value); + this.onInstallFieldSet = true; + } + if (("OnReinstall" == name)) + { + this.onReinstallField = Enums.ParseYesNoType(value); + this.onReinstallFieldSet = true; + } + if (("OnUninstall" == name)) + { + this.onUninstallField = Enums.ParseYesNoType(value); + this.onUninstallFieldSet = true; + } + if (("RebootMessage" == name)) + { + this.rebootMessageField = value; + this.rebootMessageFieldSet = true; + } + if (("ResetPeriod" == name)) + { + this.resetPeriodField = value; + this.resetPeriodFieldSet = true; + } + if (("ServiceName" == name)) + { + this.serviceNameField = value; + this.serviceNameFieldSet = true; + } + } + } + + /// + /// Environment variables added or removed for the parent component. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Environment : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private string separatorField; + + private bool separatorFieldSet; + + private ActionType actionField; + + private bool actionFieldSet; + + private PartType partField; + + private bool partFieldSet; + + private YesNoType permanentField; + + private bool permanentFieldSet; + + private YesNoType systemField; + + private bool systemFieldSet; + + private ISchemaElement parentElement; + + /// + /// Unique identifier for environment entry. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Name of the environment variable. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The value to set into the environment variable. + /// If this attribute is not set, the environment variable is removed during installation if it exists on the machine. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// Optional attribute to change the separator used between values. By default a semicolon is used. + /// + public string Separator + { + get + { + return this.separatorField; + } + set + { + this.separatorFieldSet = true; + this.separatorField = value; + } + } + + /// + /// Specfies whether the environmental variable should be created, set or removed when the parent component is installed. + /// + public ActionType Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + public PartType Part + { + get + { + return this.partField; + } + set + { + this.partFieldSet = true; + this.partField = value; + } + } + + /// + /// Specifies that the environment variable should not be removed on uninstall. + /// + public YesNoType Permanent + { + get + { + return this.permanentField; + } + set + { + this.permanentFieldSet = true; + this.permanentField = value; + } + } + + /// + /// Specifies that the environment variable should be added to the system environment space. The default + /// is 'no' which indicates the environment variable is added to the user environment space. + /// + public YesNoType System + { + get + { + return this.systemField; + } + set + { + this.systemFieldSet = true; + this.systemField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ActionType from a string. + /// + public static ActionType ParseActionType(string value) + { + ActionType parsedValue; + Environment.TryParseActionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ActionType from a string. + /// + public static bool TryParseActionType(string value, out ActionType parsedValue) + { + parsedValue = ActionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("create" == value)) + { + parsedValue = ActionType.create; + } + else + { + if (("set" == value)) + { + parsedValue = ActionType.set; + } + else + { + if (("remove" == value)) + { + parsedValue = ActionType.remove; + } + else + { + parsedValue = ActionType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a PartType from a string. + /// + public static PartType ParsePartType(string value) + { + PartType parsedValue; + Environment.TryParsePartType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a PartType from a string. + /// + public static bool TryParsePartType(string value, out PartType parsedValue) + { + parsedValue = PartType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("all" == value)) + { + parsedValue = PartType.all; + } + else + { + if (("first" == value)) + { + parsedValue = PartType.first; + } + else + { + if (("last" == value)) + { + parsedValue = PartType.last; + } + else + { + parsedValue = PartType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Environment", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.separatorFieldSet) + { + writer.WriteAttributeString("Separator", this.separatorField); + } + if (this.actionFieldSet) + { + if ((this.actionField == ActionType.create)) + { + writer.WriteAttributeString("Action", "create"); + } + if ((this.actionField == ActionType.set)) + { + writer.WriteAttributeString("Action", "set"); + } + if ((this.actionField == ActionType.remove)) + { + writer.WriteAttributeString("Action", "remove"); + } + } + if (this.partFieldSet) + { + if ((this.partField == PartType.all)) + { + writer.WriteAttributeString("Part", "all"); + } + if ((this.partField == PartType.first)) + { + writer.WriteAttributeString("Part", "first"); + } + if ((this.partField == PartType.last)) + { + writer.WriteAttributeString("Part", "last"); + } + } + if (this.permanentFieldSet) + { + if ((this.permanentField == YesNoType.no)) + { + writer.WriteAttributeString("Permanent", "no"); + } + if ((this.permanentField == YesNoType.yes)) + { + writer.WriteAttributeString("Permanent", "yes"); + } + } + if (this.systemFieldSet) + { + if ((this.systemField == YesNoType.no)) + { + writer.WriteAttributeString("System", "no"); + } + if ((this.systemField == YesNoType.yes)) + { + writer.WriteAttributeString("System", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Separator" == name)) + { + this.separatorField = value; + this.separatorFieldSet = true; + } + if (("Action" == name)) + { + this.actionField = Environment.ParseActionType(value); + this.actionFieldSet = true; + } + if (("Part" == name)) + { + this.partField = Environment.ParsePartType(value); + this.partFieldSet = true; + } + if (("Permanent" == name)) + { + this.permanentField = Enums.ParseYesNoType(value); + this.permanentFieldSet = true; + } + if (("System" == name)) + { + this.systemField = Enums.ParseYesNoType(value); + this.systemFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ActionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// 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. + /// + create, + + /// + /// 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. + /// + set, + + /// + /// Removes the environment variable during an installation. + /// The installer only removes an environment variable during an installation if the name and value + /// of the variable match the entries in the Name and Value attributes. + /// If you want to remove an environment variable, regardless of its value, do not set the Value attribute. + /// + remove, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum PartType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// This value is the entire environmental variable. This is the default. + /// + all, + + /// + /// This value is prefixed. + /// + first, + + /// + /// This value is appended. + /// + last, + } + } + + /// + /// Conditions for components, controls, features, and products. The condition is specified in the inner text of the element. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Condition : ISchemaElement, ISetAttributes + { + + private ActionType actionField; + + private bool actionFieldSet; + + private int levelField; + + private bool levelFieldSet; + + private string messageField; + + private bool messageFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// Used only under Control elements and is required. Allows specific actions to be applied to a control based + /// on the result of this condition. + /// + public ActionType Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// Used only under Feature elements and is required. Allows modifying the level of a Feature based on the + /// result of this condition. + /// + public int Level + { + get + { + return this.levelField; + } + set + { + this.levelFieldSet = true; + this.levelField = value; + } + } + + /// + /// Used only under Fragment or Package elements and is required. Set the value to the text to display when the + /// condition fails and the installation must be terminated. + /// + public string Message + { + get + { + return this.messageField; + } + set + { + this.messageFieldSet = true; + this.messageField = value; + } + } + + /// + /// Under a Component element, the condition becomes the condition of the component. Under a Control element, + /// the condition becomes a ControlCondition entry. Under a Feature element, the condition becomes a Condition + /// entry. Under a Fragment or Package element, the condition becomes a LaunchCondition entry. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ActionType from a string. + /// + public static ActionType ParseActionType(string value) + { + ActionType parsedValue; + Condition.TryParseActionType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ActionType from a string. + /// + public static bool TryParseActionType(string value, out ActionType parsedValue) + { + parsedValue = ActionType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("default" == value)) + { + parsedValue = ActionType.@default; + } + else + { + if (("enable" == value)) + { + parsedValue = ActionType.enable; + } + else + { + if (("disable" == value)) + { + parsedValue = ActionType.disable; + } + else + { + if (("hide" == value)) + { + parsedValue = ActionType.hide; + } + else + { + if (("show" == value)) + { + parsedValue = ActionType.show; + } + else + { + parsedValue = ActionType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Condition", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.actionFieldSet) + { + if ((this.actionField == ActionType.@default)) + { + writer.WriteAttributeString("Action", "default"); + } + if ((this.actionField == ActionType.enable)) + { + writer.WriteAttributeString("Action", "enable"); + } + if ((this.actionField == ActionType.disable)) + { + writer.WriteAttributeString("Action", "disable"); + } + if ((this.actionField == ActionType.hide)) + { + writer.WriteAttributeString("Action", "hide"); + } + if ((this.actionField == ActionType.show)) + { + writer.WriteAttributeString("Action", "show"); + } + } + if (this.levelFieldSet) + { + writer.WriteAttributeString("Level", this.levelField.ToString(CultureInfo.InvariantCulture)); + } + if (this.messageFieldSet) + { + writer.WriteAttributeString("Message", this.messageField); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Action" == name)) + { + this.actionField = Condition.ParseActionType(value); + this.actionFieldSet = true; + } + if (("Level" == name)) + { + this.levelField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.levelFieldSet = true; + } + if (("Message" == name)) + { + this.messageField = value; + this.messageFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ActionType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Set the Control as the default. Only used under Control elements. + /// + @default, + + /// + /// Enable the Control. Only used under Control elements. + /// + enable, + + /// + /// Disable the Control. Only used under Control elements. + /// + disable, + + /// + /// Hide the Control. Only used under Control elements. + /// + hide, + + /// + /// Display the Control. Only used under Control elements. + /// + show, + } + } + + /// + /// Shared Component to be privately replicated in folder of parent Component + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class IsolateComponent : ISchemaElement, ISetAttributes + { + + private string sharedField; + + private bool sharedFieldSet; + + private ISchemaElement parentElement; + + /// + /// Shared Component for this application Component. + /// + public string Shared + { + get + { + return this.sharedField; + } + set + { + this.sharedFieldSet = true; + this.sharedField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("IsolateComponent", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.sharedFieldSet) + { + writer.WriteAttributeString("Shared", this.sharedField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Shared" == name)) + { + this.sharedField = value; + this.sharedFieldSet = true; + } + } + } + + /// + /// Disk cost to reserve in a folder for running locally and/or from source. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ReserveCost : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string directoryField; + + private bool directoryFieldSet; + + private int runFromSourceField; + + private bool runFromSourceFieldSet; + + private int runLocalField; + + private bool runLocalFieldSet; + + private ISchemaElement parentElement; + + /// + /// A primary key that uniquely identifies this ReserveCost entry. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Adds the amount of disk space specified in RunFromSource or RunLocal to the volume cost of the device containing the directory. + /// If this attribute is not set, it will default to the directory of parent component. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + /// + /// The number of bytes of disk space to reserve if the component is installed to run from source. + /// + public int RunFromSource + { + get + { + return this.runFromSourceField; + } + set + { + this.runFromSourceFieldSet = true; + this.runFromSourceField = value; + } + } + + /// + /// The number of bytes of disk space to reserve if the component is installed to run locally. + /// + public int RunLocal + { + get + { + return this.runLocalField; + } + set + { + this.runLocalFieldSet = true; + this.runLocalField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ReserveCost", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + if (this.runFromSourceFieldSet) + { + writer.WriteAttributeString("RunFromSource", this.runFromSourceField.ToString(CultureInfo.InvariantCulture)); + } + if (this.runLocalFieldSet) + { + writer.WriteAttributeString("RunLocal", this.runLocalField.ToString(CultureInfo.InvariantCulture)); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + if (("RunFromSource" == name)) + { + this.runFromSourceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.runFromSourceFieldSet = true; + } + if (("RunLocal" == name)) + { + this.runLocalField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.runLocalFieldSet = true; + } + } + } + + /// + /// Component for parent Directory + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Component : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private int comPlusFlagsField; + + private bool comPlusFlagsFieldSet; + + private YesNoType disableRegistryReflectionField; + + private bool disableRegistryReflectionFieldSet; + + private string directoryField; + + private bool directoryFieldSet; + + private string diskIdField; + + private bool diskIdFieldSet; + + private string featureField; + + private bool featureFieldSet; + + private string guidField; + + private bool guidFieldSet; + + private YesNoType keyPathField; + + private bool keyPathFieldSet; + + private LocationType locationField; + + private bool locationFieldSet; + + private YesNoType multiInstanceField; + + private bool multiInstanceFieldSet; + + private YesNoType neverOverwriteField; + + private bool neverOverwriteFieldSet; + + private YesNoType permanentField; + + private bool permanentFieldSet; + + private YesNoType sharedField; + + private bool sharedFieldSet; + + private YesNoType sharedDllRefCountField; + + private bool sharedDllRefCountFieldSet; + + private YesNoType transitiveField; + + private bool transitiveFieldSet; + + private YesNoType uninstallWhenSupersededField; + + private bool uninstallWhenSupersededFieldSet; + + private YesNoType win64Field; + + private bool win64FieldSet; + + private ISchemaElement parentElement; + + public Component() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Category))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CopyFile))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateFolder))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Environment))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Extension))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(File))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IniFile))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponent))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDataSource))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDriver))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCTranslator))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgId))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Registry))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryKey))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFile))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFolder))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryKey))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryValue))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ReserveCost))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceControl))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfig))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfigFailureActions))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceInstall))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TypeLib))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Component identifier; this is the primary key for identifying components. If omitted, + /// the compiler defaults the identifier to the identifier of the resource that is the + /// explicit keypath of the component (for example, a child File element with KeyPath + /// attribute with value 'yes'. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Set this attribute to create a ComPlus entry. The value should be the export flags used + /// during the generation of the .msi file. For more information see the COM+ documentation + /// in the Platform SDK. + /// + public int ComPlusFlags + { + get + { + return this.comPlusFlagsField; + } + set + { + this.comPlusFlagsFieldSet = true; + this.comPlusFlagsField = value; + } + } + + /// + /// Set this attribute to 'yes' in order to disable registry reflection on all existing and + /// new registry keys affected by this component. + /// When set to 'yes', the Windows Installer calls the RegDisableReflectionKey on each key + /// being accessed by the component. + /// This bit is available with Windows Installer version 4.0 and is ignored on 32-bit systems. + /// + public YesNoType DisableRegistryReflection + { + get + { + return this.disableRegistryReflectionField; + } + set + { + this.disableRegistryReflectionFieldSet = true; + this.disableRegistryReflectionField = value; + } + } + + /// + /// Sets the Directory of the Component. If this element is nested under a Directory element, + /// this value defaults to the value of the parent Directory/@Id. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + /// + /// This attribute provides a default DiskId attribute for all child File elements. Specifying + /// the DiskId on a Component element will override any DiskId attributes set by parent Directory + /// or DirectoryRef elements. See the File element's DiskId attribute for more information about + /// the purpose of the DiskId. + /// + public string DiskId + { + get + { + return this.diskIdField; + } + set + { + this.diskIdFieldSet = true; + this.diskIdField = value; + } + } + + /// + /// Identifies a feature to which this component belongs, as a shorthand for a child + /// ComponentRef element of the Feature element. The value of this attribute should + /// correspond to the Id attribute of a Feature element authored elsewhere. Note that + /// a single component can belong to multiple features but this attribute allows you + /// to specify only a single feature. + /// + public string Feature + { + get + { + return this.featureField; + } + set + { + this.featureFieldSet = true; + this.featureField = value; + } + } + + /// + /// This value should be a guid that uniquely identifies this component's contents, language, platform, and version. + /// If omitted, the default value is '*' which indicates that the linker should generate a stable guid. + /// Generatable guids are supported only for components with a single file as the component's keypath + /// or no files and a registry value as the keypath. + /// It's also possible to set the value to an empty string to specify an unmanaged component. + /// Unmanaged components are a security vulnerability because the component cannot be removed or repaired + /// by Windows Installer (it is essentially an unpatchable, permanent component). Therefore, a guid should + /// always be specified for any component which contains resources that may need to be patched in the future. + /// + public string Guid + { + get + { + return this.guidField; + } + set + { + this.guidFieldSet = true; + this.guidField = value; + } + } + + /// + /// If this attribute's value is set to 'yes', then the Directory of this Component is used + /// as the KeyPath. To set a Registry value or File as the KeyPath of a component, set the + /// KeyPath attribute to 'yes' on one of those child elements. If KeyPath is not set to 'yes' for the + /// Component or for a child Registry value or File, WiX will look at the child elements under the + /// Component in sequential order and try to automatically select one of them as a key path. Allowing + /// WiX to automatically select a key path can be dangerous because adding or removing child elements + /// under the Component can inadvertantly cause the key path to change, which can lead to + /// installation problems. + /// + public YesNoType KeyPath + { + get + { + return this.keyPathField; + } + set + { + this.keyPathFieldSet = true; + this.keyPathField = value; + } + } + + /// + /// Optional value that specifies the location that the component can be run from. + /// + public LocationType Location + { + get + { + return this.locationField; + } + set + { + this.locationFieldSet = true; + this.locationField = value; + } + } + + /// + /// If this attribute is set to 'yes', a new Component/@Guid will be generated for each + /// instance transform. Ensure that all of the resources contained in a multi-instance + /// Component will be installed to different paths based on the instance Property; otherwise, + /// the Component Rules will be violated. + /// + public YesNoType MultiInstance + { + get + { + return this.multiInstanceField; + } + set + { + this.multiInstanceFieldSet = true; + this.multiInstanceField = value; + } + } + + /// + /// If this attribute is set to 'yes', the installer does not install or reinstall the + /// component if a key path file or a key path registry entry for the component already + /// exists. The application does register itself as a client of the component. Use this + /// flag only for components that are being registered by the Registry table. Do not use + /// this flag for components registered by the AppId, Class, Extension, ProgId, MIME, and + /// Verb tables. + /// + public YesNoType NeverOverwrite + { + get + { + return this.neverOverwriteField; + } + set + { + this.neverOverwriteFieldSet = true; + this.neverOverwriteField = value; + } + } + + /// + /// If this attribute is set to 'yes', the installer does not remove the component during + /// an uninstall. The installer registers an extra system client for the component in + /// the Windows Installer registry settings (which basically just means that at least one + /// product is always referencing this component). Note that this option differs from the + /// behavior of not setting a guid because although the component is permanent, it is still + /// patchable (because Windows Installer still tracks it), it's just not uninstallable. + /// + public YesNoType Permanent + { + get + { + return this.permanentField; + } + set + { + this.permanentFieldSet = true; + this.permanentField = value; + } + } + + /// + /// If this attribute's value is set to 'yes', enables advanced patching semantics for + /// Components that are shared across multiple Products. Specifically, the Windows Installer + /// will cache the shared files to improve patch uninstall. This functionality is available + /// in Windows Installer 4.5 and later. + /// + public YesNoType Shared + { + get + { + return this.sharedField; + } + set + { + this.sharedFieldSet = true; + this.sharedField = value; + } + } + + /// + /// If this attribute's value is set to 'yes', the installer increments the reference count + /// in the shared DLL registry of the component's key file. If this bit is not set, the + /// installer increments the reference count only if the reference count already exists. + /// + public YesNoType SharedDllRefCount + { + get + { + return this.sharedDllRefCountField; + } + set + { + this.sharedDllRefCountFieldSet = true; + this.sharedDllRefCountField = value; + } + } + + /// + /// If this attribute is set to 'yes', the installer reevaluates the value of the statement + /// in the Condition upon a reinstall. If the value was previously False and has changed to + /// True, the installer installs the component. If the value was previously True and has + /// changed to False, the installer removes the component even if the component has other + /// products as clients. + /// + public YesNoType Transitive + { + get + { + return this.transitiveField; + } + set + { + this.transitiveFieldSet = true; + this.transitiveField = value; + } + } + + /// + /// If this attribute is set to 'yes', the installer will uninstall the Component's files + /// and registry keys when it is superseded by a patch. This functionality is available in + /// Windows Installer 4.5 and later. + /// + public YesNoType UninstallWhenSuperseded + { + get + { + return this.uninstallWhenSupersededField; + } + set + { + this.uninstallWhenSupersededFieldSet = true; + this.uninstallWhenSupersededField = value; + } + } + + /// + /// Set this attribute to 'yes' to mark this as a 64-bit component. This attribute facilitates + /// the installation of packages that include both 32-bit and 64-bit components. If this is a 64-bit + /// component replacing a 32-bit component, set this attribute to 'yes' and assign a new GUID in the Guid attribute. + /// The default value is based on the platform set by the -arch switch to candle.exe + /// or the InstallerPlatform property in a .wixproj MSBuild project: + /// For x86 and ARM, the default value is 'no'. + /// For x64 and IA64, the default value is 'yes'. + /// + public YesNoType Win64 + { + get + { + return this.win64Field; + } + set + { + this.win64FieldSet = true; + this.win64Field = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("AppId" == childName)) + { + childValue = new AppId(); + } + if (("Category" == childName)) + { + childValue = new Category(); + } + if (("Class" == childName)) + { + childValue = new Class(); + } + if (("Condition" == childName)) + { + childValue = new Condition(); + } + if (("CopyFile" == childName)) + { + childValue = new CopyFile(); + } + if (("CreateFolder" == childName)) + { + childValue = new CreateFolder(); + } + if (("Environment" == childName)) + { + childValue = new Environment(); + } + if (("Extension" == childName)) + { + childValue = new Extension(); + } + if (("File" == childName)) + { + childValue = new File(); + } + if (("IniFile" == childName)) + { + childValue = new IniFile(); + } + if (("Interface" == childName)) + { + childValue = new Interface(); + } + if (("IsolateComponent" == childName)) + { + childValue = new IsolateComponent(); + } + if (("ODBCDataSource" == childName)) + { + childValue = new ODBCDataSource(); + } + if (("ODBCDriver" == childName)) + { + childValue = new ODBCDriver(); + } + if (("ODBCTranslator" == childName)) + { + childValue = new ODBCTranslator(); + } + if (("ProgId" == childName)) + { + childValue = new ProgId(); + } + if (("Registry" == childName)) + { + childValue = new Registry(); + } + if (("RegistryKey" == childName)) + { + childValue = new RegistryKey(); + } + if (("RegistryValue" == childName)) + { + childValue = new RegistryValue(); + } + if (("RemoveFile" == childName)) + { + childValue = new RemoveFile(); + } + if (("RemoveFolder" == childName)) + { + childValue = new RemoveFolder(); + } + if (("RemoveRegistryKey" == childName)) + { + childValue = new RemoveRegistryKey(); + } + if (("RemoveRegistryValue" == childName)) + { + childValue = new RemoveRegistryValue(); + } + if (("ReserveCost" == childName)) + { + childValue = new ReserveCost(); + } + if (("ServiceControl" == childName)) + { + childValue = new ServiceControl(); + } + if (("ServiceConfig" == childName)) + { + childValue = new ServiceConfig(); + } + if (("ServiceConfigFailureActions" == childName)) + { + childValue = new ServiceConfigFailureActions(); + } + if (("ServiceInstall" == childName)) + { + childValue = new ServiceInstall(); + } + if (("Shortcut" == childName)) + { + childValue = new Shortcut(); + } + if (("SymbolPath" == childName)) + { + childValue = new SymbolPath(); + } + if (("TypeLib" == childName)) + { + childValue = new TypeLib(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a LocationType from a string. + /// + public static LocationType ParseLocationType(string value) + { + LocationType parsedValue; + Component.TryParseLocationType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a LocationType from a string. + /// + public static bool TryParseLocationType(string value, out LocationType parsedValue) + { + parsedValue = LocationType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("local" == value)) + { + parsedValue = LocationType.local; + } + else + { + if (("source" == value)) + { + parsedValue = LocationType.source; + } + else + { + if (("either" == value)) + { + parsedValue = LocationType.either; + } + else + { + parsedValue = LocationType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Component", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.comPlusFlagsFieldSet) + { + writer.WriteAttributeString("ComPlusFlags", this.comPlusFlagsField.ToString(CultureInfo.InvariantCulture)); + } + if (this.disableRegistryReflectionFieldSet) + { + if ((this.disableRegistryReflectionField == YesNoType.no)) + { + writer.WriteAttributeString("DisableRegistryReflection", "no"); + } + if ((this.disableRegistryReflectionField == YesNoType.yes)) + { + writer.WriteAttributeString("DisableRegistryReflection", "yes"); + } + } + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + if (this.diskIdFieldSet) + { + writer.WriteAttributeString("DiskId", this.diskIdField); + } + if (this.featureFieldSet) + { + writer.WriteAttributeString("Feature", this.featureField); + } + if (this.guidFieldSet) + { + writer.WriteAttributeString("Guid", this.guidField); + } + if (this.keyPathFieldSet) + { + if ((this.keyPathField == YesNoType.no)) + { + writer.WriteAttributeString("KeyPath", "no"); + } + if ((this.keyPathField == YesNoType.yes)) + { + writer.WriteAttributeString("KeyPath", "yes"); + } + } + if (this.locationFieldSet) + { + if ((this.locationField == LocationType.local)) + { + writer.WriteAttributeString("Location", "local"); + } + if ((this.locationField == LocationType.source)) + { + writer.WriteAttributeString("Location", "source"); + } + if ((this.locationField == LocationType.either)) + { + writer.WriteAttributeString("Location", "either"); + } + } + if (this.multiInstanceFieldSet) + { + if ((this.multiInstanceField == YesNoType.no)) + { + writer.WriteAttributeString("MultiInstance", "no"); + } + if ((this.multiInstanceField == YesNoType.yes)) + { + writer.WriteAttributeString("MultiInstance", "yes"); + } + } + if (this.neverOverwriteFieldSet) + { + if ((this.neverOverwriteField == YesNoType.no)) + { + writer.WriteAttributeString("NeverOverwrite", "no"); + } + if ((this.neverOverwriteField == YesNoType.yes)) + { + writer.WriteAttributeString("NeverOverwrite", "yes"); + } + } + if (this.permanentFieldSet) + { + if ((this.permanentField == YesNoType.no)) + { + writer.WriteAttributeString("Permanent", "no"); + } + if ((this.permanentField == YesNoType.yes)) + { + writer.WriteAttributeString("Permanent", "yes"); + } + } + if (this.sharedFieldSet) + { + if ((this.sharedField == YesNoType.no)) + { + writer.WriteAttributeString("Shared", "no"); + } + if ((this.sharedField == YesNoType.yes)) + { + writer.WriteAttributeString("Shared", "yes"); + } + } + if (this.sharedDllRefCountFieldSet) + { + if ((this.sharedDllRefCountField == YesNoType.no)) + { + writer.WriteAttributeString("SharedDllRefCount", "no"); + } + if ((this.sharedDllRefCountField == YesNoType.yes)) + { + writer.WriteAttributeString("SharedDllRefCount", "yes"); + } + } + if (this.transitiveFieldSet) + { + if ((this.transitiveField == YesNoType.no)) + { + writer.WriteAttributeString("Transitive", "no"); + } + if ((this.transitiveField == YesNoType.yes)) + { + writer.WriteAttributeString("Transitive", "yes"); + } + } + if (this.uninstallWhenSupersededFieldSet) + { + if ((this.uninstallWhenSupersededField == YesNoType.no)) + { + writer.WriteAttributeString("UninstallWhenSuperseded", "no"); + } + if ((this.uninstallWhenSupersededField == YesNoType.yes)) + { + writer.WriteAttributeString("UninstallWhenSuperseded", "yes"); + } + } + if (this.win64FieldSet) + { + if ((this.win64Field == YesNoType.no)) + { + writer.WriteAttributeString("Win64", "no"); + } + if ((this.win64Field == YesNoType.yes)) + { + writer.WriteAttributeString("Win64", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("ComPlusFlags" == name)) + { + this.comPlusFlagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.comPlusFlagsFieldSet = true; + } + if (("DisableRegistryReflection" == name)) + { + this.disableRegistryReflectionField = Enums.ParseYesNoType(value); + this.disableRegistryReflectionFieldSet = true; + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + if (("DiskId" == name)) + { + this.diskIdField = value; + this.diskIdFieldSet = true; + } + if (("Feature" == name)) + { + this.featureField = value; + this.featureFieldSet = true; + } + if (("Guid" == name)) + { + this.guidField = value; + this.guidFieldSet = true; + } + if (("KeyPath" == name)) + { + this.keyPathField = Enums.ParseYesNoType(value); + this.keyPathFieldSet = true; + } + if (("Location" == name)) + { + this.locationField = Component.ParseLocationType(value); + this.locationFieldSet = true; + } + if (("MultiInstance" == name)) + { + this.multiInstanceField = Enums.ParseYesNoType(value); + this.multiInstanceFieldSet = true; + } + if (("NeverOverwrite" == name)) + { + this.neverOverwriteField = Enums.ParseYesNoType(value); + this.neverOverwriteFieldSet = true; + } + if (("Permanent" == name)) + { + this.permanentField = Enums.ParseYesNoType(value); + this.permanentFieldSet = true; + } + if (("Shared" == name)) + { + this.sharedField = Enums.ParseYesNoType(value); + this.sharedFieldSet = true; + } + if (("SharedDllRefCount" == name)) + { + this.sharedDllRefCountField = Enums.ParseYesNoType(value); + this.sharedDllRefCountFieldSet = true; + } + if (("Transitive" == name)) + { + this.transitiveField = Enums.ParseYesNoType(value); + this.transitiveFieldSet = true; + } + if (("UninstallWhenSuperseded" == name)) + { + this.uninstallWhenSupersededField = Enums.ParseYesNoType(value); + this.uninstallWhenSupersededFieldSet = true; + } + if (("Win64" == name)) + { + this.win64Field = Enums.ParseYesNoType(value); + this.win64FieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum LocationType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Prevents the component from running from the source or the network (this is the default behavior if this attribute is not set). + /// + local, + + /// + /// Enforces that the component can only be run from the source (it cannot be run from the user's computer). + /// + source, + + /// + /// Allows the component to run from source or locally. + /// + either, + } + } + + /// + /// Groups together multiple components to be used in other locations. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ComponentGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string directoryField; + + private bool directoryFieldSet; + + private string sourceField; + + private bool sourceFieldSet; + + private ISchemaElement parentElement; + + public ComponentGroup() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for the ComponentGroup. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Sets the default directory identifier for child Component elements. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + /// + /// Used to set the default file system source for child Component elements. For more information, see + /// + public string Source + { + get + { + return this.sourceField; + } + set + { + this.sourceFieldSet = true; + this.sourceField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Component" == childName)) + { + childValue = new Component(); + } + if (("ComponentGroupRef" == childName)) + { + childValue = new ComponentGroupRef(); + } + if (("ComponentRef" == childName)) + { + childValue = new ComponentRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ComponentGroup", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + if (this.sourceFieldSet) + { + writer.WriteAttributeString("Source", this.sourceField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + if (("Source" == name)) + { + this.sourceField = value; + this.sourceFieldSet = true; + } + } + } + + /// + /// Create a reference to a ComponentGroup in another Fragment. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ComponentGroupRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private YesNoType primaryField; + + private bool primaryFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the ComponentGroup to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Set this attribute to 'yes' in order to make the parent feature of this component + /// the primary feature for this component. Components may belong to multiple features. + /// By designating a feature as the primary feature of a component, you ensure that + /// whenever a component is selected for install-on-demand (IOD), the primary feature + /// will be the one to install it. This attribute should only be set if a component + /// actually nests under multiple features. If a component nests under only one feature, + /// that feature is the primary feature for the component. You cannot set more than one + /// feature as the primary feature of a given component. + /// + public YesNoType Primary + { + get + { + return this.primaryField; + } + set + { + this.primaryFieldSet = true; + this.primaryField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ComponentGroupRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.primaryFieldSet) + { + if ((this.primaryField == YesNoType.no)) + { + writer.WriteAttributeString("Primary", "no"); + } + if ((this.primaryField == YesNoType.yes)) + { + writer.WriteAttributeString("Primary", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Primary" == name)) + { + this.primaryField = Enums.ParseYesNoType(value); + this.primaryFieldSet = true; + } + } + } + + /// + /// Used only for PatchFamilies to include all changes between the baseline and upgraded packages in a patch. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class All : ISetAttributes, ISchemaElement + { + + private ISchemaElement parentElement; + + private string contentField; + + private bool contentFieldSet; + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Used only for PatchFamilies to include all changes between the baseline and upgraded packages in a patch. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("All", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + } + + /// + /// Used only for PatchFamilies to include only a binary table entry in a patch. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class BinaryRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the Binary element to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("BinaryRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Used only for PatchFamilies to include only a icon table entry in a patch. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class IconRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the Icon element to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("IconRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Create a reference to a Feature element in another Fragment. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ComponentRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private YesNoType primaryField; + + private bool primaryFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the Component element to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Set this attribute to 'yes' in order to make the parent feature of this component + /// the primary feature for this component. Components may belong to multiple features. + /// By designating a feature as the primary feature of a component, you ensure that + /// whenever a component is selected for install-on-demand (IOD), the primary feature + /// will be the one to install it. This attribute should only be set if a component + /// actually nests under multiple features. If a component nests under only one feature, + /// that feature is the primary feature for the component. You cannot set more than one + /// feature as the primary feature of a given component. + /// + public YesNoType Primary + { + get + { + return this.primaryField; + } + set + { + this.primaryFieldSet = true; + this.primaryField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ComponentRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.primaryFieldSet) + { + if ((this.primaryField == YesNoType.no)) + { + writer.WriteAttributeString("Primary", "no"); + } + if ((this.primaryField == YesNoType.yes)) + { + writer.WriteAttributeString("Primary", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Primary" == name)) + { + this.primaryField = Enums.ParseYesNoType(value); + this.primaryFieldSet = true; + } + } + } + + /// + /// Merge directive to bring in a merge module that will be redirected to the parent directory. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Merge : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string diskIdField; + + private bool diskIdFieldSet; + + private YesNoType fileCompressionField; + + private bool fileCompressionFieldSet; + + private string languageField; + + private bool languageFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string srcField; + + private bool srcFieldSet; + + private ISchemaElement parentElement; + + public Merge() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ConfigurationData))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// The unique identifier for the Merge element in the source code. Referenced by the MergeRef/@Id. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The value of this attribute should correspond to the Id attribute of a + /// Media element authored elsewhere. By creating this connection between the merge module and Media + /// element, you set the packaging options to the values specified in the Media + /// element (values such as compression level, cab embedding, etc...). + /// + public string DiskId + { + get + { + return this.diskIdField; + } + set + { + this.diskIdFieldSet = true; + this.diskIdField = value; + } + } + + /// + /// Specifies if the files in the merge module should be compressed. + /// + public YesNoType FileCompression + { + get + { + return this.fileCompressionField; + } + set + { + this.fileCompressionFieldSet = true; + this.fileCompressionField = value; + } + } + + /// + /// Specifies the decimal LCID or localization token for the language to merge the Module in as. + /// + public string Language + { + get + { + return this.languageField; + } + set + { + this.languageFieldSet = true; + this.languageField = value; + } + } + + /// + /// Path to the source location of the merge module. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string src + { + get + { + return this.srcField; + } + set + { + this.srcFieldSet = true; + this.srcField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ConfigurationData" == childName)) + { + childValue = new ConfigurationData(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Merge", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.diskIdFieldSet) + { + writer.WriteAttributeString("DiskId", this.diskIdField); + } + if (this.fileCompressionFieldSet) + { + if ((this.fileCompressionField == YesNoType.no)) + { + writer.WriteAttributeString("FileCompression", "no"); + } + if ((this.fileCompressionField == YesNoType.yes)) + { + writer.WriteAttributeString("FileCompression", "yes"); + } + } + if (this.languageFieldSet) + { + writer.WriteAttributeString("Language", this.languageField); + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.srcFieldSet) + { + writer.WriteAttributeString("src", this.srcField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("DiskId" == name)) + { + this.diskIdField = value; + this.diskIdFieldSet = true; + } + if (("FileCompression" == name)) + { + this.fileCompressionField = Enums.ParseYesNoType(value); + this.fileCompressionFieldSet = true; + } + if (("Language" == name)) + { + this.languageField = value; + this.languageFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("src" == name)) + { + this.srcField = value; + this.srcFieldSet = true; + } + } + } + + /// + /// Merge reference to connect a Merge Module to parent Feature + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MergeRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private YesNoType primaryField; + + private bool primaryFieldSet; + + private ISchemaElement parentElement; + + /// + /// The unique identifier for the Merge element to be referenced. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Specifies whether the feature containing this MergeRef is the primary feature for advertising the merge module's components. + /// + public YesNoType Primary + { + get + { + return this.primaryField; + } + set + { + this.primaryFieldSet = true; + this.primaryField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MergeRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.primaryFieldSet) + { + if ((this.primaryField == YesNoType.no)) + { + writer.WriteAttributeString("Primary", "no"); + } + if ((this.primaryField == YesNoType.yes)) + { + writer.WriteAttributeString("Primary", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Primary" == name)) + { + this.primaryField = Enums.ParseYesNoType(value); + this.primaryFieldSet = true; + } + } + } + + /// + /// Data to use as input to a configurable merge module. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ConfigurationData : ISchemaElement, ISetAttributes + { + + private string nameField; + + private bool nameFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + /// + /// Name of the item in the ModuleConfiguration table. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Value to be passed to configurable merge module. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ConfigurationData", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + } + + /// + /// Directory layout for the product. Also specifies the mappings between source and target directories. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Directory : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string componentGuidGenerationSeedField; + + private bool componentGuidGenerationSeedFieldSet; + + private string diskIdField; + + private bool diskIdFieldSet; + + private string fileSourceField; + + private bool fileSourceFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string shortNameField; + + private bool shortNameFieldSet; + + private string shortSourceNameField; + + private bool shortSourceNameFieldSet; + + private string sourceNameField; + + private bool sourceNameFieldSet; + + private string srcField; + + private bool srcFieldSet; + + private ISchemaElement parentElement; + + public Directory() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Merge))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// This value is the unique identifier of the directory entry. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The Component Guid Generation Seed is a guid that must be used when a Component with the generate guid directive ("*") + /// is not rooted in a standard Windows Installer directory (for example, ProgramFilesFolder or CommonFilesFolder). + /// It is recommended that this attribute be avoided and that developers install their Components under standard + /// directories with unique names instead (for example, "ProgramFilesFolder\Company Name Product Name Version"). It is + /// important to note that once a directory is assigned a Component Guid Generation Seed the value must not change until + /// (and must be changed when) the path to that directory, including itself and all parent directories, changes. + /// + public string ComponentGuidGenerationSeed + { + get + { + return this.componentGuidGenerationSeedField; + } + set + { + this.componentGuidGenerationSeedFieldSet = true; + this.componentGuidGenerationSeedField = value; + } + } + + /// + /// Sets the default disk identifier for the files contained in this directory. + /// This attribute's value may be overridden by a child Component, Directory, + /// Merge or File element. See the File or Merge elements' DiskId attribute for + /// more information. + /// + public string DiskId + { + get + { + return this.diskIdField; + } + set + { + this.diskIdFieldSet = true; + this.diskIdField = value; + } + } + + /// + /// Used to set the file system source for this directory's child elements. For more information, see + /// + public string FileSource + { + get + { + return this.fileSourceField; + } + set + { + this.fileSourceFieldSet = true; + this.fileSourceField = value; + } + } + + /// + /// The name of the directory. + /// + /// Do not specify this attribute if this directory represents + /// the same directory as the parent (see the Windows Installer SDK's + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The short name of the directory in 8.3 format. + /// This attribute should only be set if there is a conflict between generated short directory names + /// or the user wants to manually specify the short directory name. + /// + public string ShortName + { + get + { + return this.shortNameField; + } + set + { + this.shortNameFieldSet = true; + this.shortNameField = value; + } + } + + /// + /// The short name of the directory on the source media in 8.3 format. + /// This attribute should only be set if there is a conflict between generated short directory names + /// or the user wants to manually specify the short source directory name. + /// + public string ShortSourceName + { + get + { + return this.shortSourceNameField; + } + set + { + this.shortSourceNameFieldSet = true; + this.shortSourceNameField = value; + } + } + + /// + /// The name of the directory on the source media. + /// If this attribute is not specified, Windows Installer will default to the Name attribute. + /// + /// In prior versions of the WiX toolset, this attribute specified the short source directory name. + /// This attribute's value may now be either a short or long directory name. + /// If a short directory name is specified, the ShortSourceName attribute may not be specified. + /// If a long directory name is specified, the LongSource attribute may not be specified. + /// Also, if this value is a long directory name, the ShortSourceName attribute may be omitted to + /// allow WiX to attempt to generate a unique short directory name. + /// However, if this name collides with another directory or you wish to manually specify + /// the short directory name, then the ShortSourceName attribute may be specified. + /// + public string SourceName + { + get + { + return this.sourceNameField; + } + set + { + this.sourceNameFieldSet = true; + this.sourceNameField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string src + { + get + { + return this.srcField; + } + set + { + this.srcFieldSet = true; + this.srcField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Component" == childName)) + { + childValue = new Component(); + } + if (("Directory" == childName)) + { + childValue = new Directory(); + } + if (("Merge" == childName)) + { + childValue = new Merge(); + } + if (("SymbolPath" == childName)) + { + childValue = new SymbolPath(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Directory", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.componentGuidGenerationSeedFieldSet) + { + writer.WriteAttributeString("ComponentGuidGenerationSeed", this.componentGuidGenerationSeedField); + } + if (this.diskIdFieldSet) + { + writer.WriteAttributeString("DiskId", this.diskIdField); + } + if (this.fileSourceFieldSet) + { + writer.WriteAttributeString("FileSource", this.fileSourceField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.shortNameFieldSet) + { + writer.WriteAttributeString("ShortName", this.shortNameField); + } + if (this.shortSourceNameFieldSet) + { + writer.WriteAttributeString("ShortSourceName", this.shortSourceNameField); + } + if (this.sourceNameFieldSet) + { + writer.WriteAttributeString("SourceName", this.sourceNameField); + } + if (this.srcFieldSet) + { + writer.WriteAttributeString("src", this.srcField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("ComponentGuidGenerationSeed" == name)) + { + this.componentGuidGenerationSeedField = value; + this.componentGuidGenerationSeedFieldSet = true; + } + if (("DiskId" == name)) + { + this.diskIdField = value; + this.diskIdFieldSet = true; + } + if (("FileSource" == name)) + { + this.fileSourceField = value; + this.fileSourceFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("ShortName" == name)) + { + this.shortNameField = value; + this.shortNameFieldSet = true; + } + if (("ShortSourceName" == name)) + { + this.shortSourceNameField = value; + this.shortSourceNameFieldSet = true; + } + if (("SourceName" == name)) + { + this.sourceNameField = value; + this.sourceNameFieldSet = true; + } + if (("src" == name)) + { + this.srcField = value; + this.srcFieldSet = true; + } + } + } + + /// + /// Create a reference to a Directory element in another Fragment. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class DirectoryRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string diskIdField; + + private bool diskIdFieldSet; + + private string fileSourceField; + + private bool fileSourceFieldSet; + + private string srcField; + + private bool srcFieldSet; + + private ISchemaElement parentElement; + + public DirectoryRef() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Merge))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// The identifier of the Directory element to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Sets the default disk identifier for the files contained in this directory. + /// This attribute's value may be overridden by a child Component, Directory, + /// Merge or File element. See the File or Merge elements' DiskId attribute for + /// more information. + /// + public string DiskId + { + get + { + return this.diskIdField; + } + set + { + this.diskIdFieldSet = true; + this.diskIdField = value; + } + } + + /// + /// Used to set the file system source for this DirectoryRef's child elements. For more information, see + /// + public string FileSource + { + get + { + return this.fileSourceField; + } + set + { + this.fileSourceFieldSet = true; + this.fileSourceField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string src + { + get + { + return this.srcField; + } + set + { + this.srcFieldSet = true; + this.srcField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Component" == childName)) + { + childValue = new Component(); + } + if (("Directory" == childName)) + { + childValue = new Directory(); + } + if (("Merge" == childName)) + { + childValue = new Merge(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DirectoryRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.diskIdFieldSet) + { + writer.WriteAttributeString("DiskId", this.diskIdField); + } + if (this.fileSourceFieldSet) + { + writer.WriteAttributeString("FileSource", this.fileSourceField); + } + if (this.srcFieldSet) + { + writer.WriteAttributeString("src", this.srcField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("DiskId" == name)) + { + this.diskIdField = value; + this.diskIdFieldSet = true; + } + if (("FileSource" == name)) + { + this.fileSourceField = value; + this.fileSourceFieldSet = true; + } + if (("src" == name)) + { + this.srcField = value; + this.srcFieldSet = true; + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UpgradeVersion : ISchemaElement, ISetAttributes + { + + private string minimumField; + + private bool minimumFieldSet; + + private string maximumField; + + private bool maximumFieldSet; + + private string languageField; + + private bool languageFieldSet; + + private string removeFeaturesField; + + private bool removeFeaturesFieldSet; + + private string propertyField; + + private bool propertyFieldSet; + + private YesNoType migrateFeaturesField; + + private bool migrateFeaturesFieldSet; + + private YesNoType onlyDetectField; + + private bool onlyDetectFieldSet; + + private YesNoType ignoreRemoveFailureField; + + private bool ignoreRemoveFailureFieldSet; + + private YesNoType includeMinimumField; + + private bool includeMinimumFieldSet; + + private YesNoType includeMaximumField; + + private bool includeMaximumFieldSet; + + private YesNoType excludeLanguagesField; + + private bool excludeLanguagesFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// Specifies the lower bound on the range of product versions to be detected by FindRelatedProducts. + /// + public string Minimum + { + get + { + return this.minimumField; + } + set + { + this.minimumFieldSet = true; + this.minimumField = value; + } + } + + /// + /// Specifies the upper boundary of the range of product versions detected by FindRelatedProducts. + /// + public string Maximum + { + get + { + return this.maximumField; + } + set + { + this.maximumFieldSet = true; + this.maximumField = value; + } + } + + /// + /// 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. + /// + public string Language + { + get + { + return this.languageField; + } + set + { + this.languageFieldSet = true; + this.languageField = value; + } + } + + /// + /// 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. + /// + public string RemoveFeatures + { + get + { + return this.removeFeaturesField; + } + set + { + this.removeFeaturesFieldSet = true; + this.removeFeaturesField = value; + } + } + + /// + /// 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 + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + /// + /// Set to "yes" to migrate feature states from upgraded products by enabling the logic in the MigrateFeatureStates action. + /// + public YesNoType MigrateFeatures + { + get + { + return this.migrateFeaturesField; + } + set + { + this.migrateFeaturesFieldSet = true; + this.migrateFeaturesField = value; + } + } + + /// + /// Set to "yes" to detect products and applications but do not uninstall. + /// + public YesNoType OnlyDetect + { + get + { + return this.onlyDetectField; + } + set + { + this.onlyDetectFieldSet = true; + this.onlyDetectField = value; + } + } + + /// + /// Set to "yes" to continue installation upon failure to remove a product or application. + /// + public YesNoType IgnoreRemoveFailure + { + get + { + return this.ignoreRemoveFailureField; + } + set + { + this.ignoreRemoveFailureFieldSet = true; + this.ignoreRemoveFailureField = value; + } + } + + /// + /// Set to "no" to make the range of versions detected exclude the value specified in Minimum. This attribute is "yes" by default. + /// + public YesNoType IncludeMinimum + { + get + { + return this.includeMinimumField; + } + set + { + this.includeMinimumFieldSet = true; + this.includeMinimumField = value; + } + } + + /// + /// Set to "yes" to make the range of versions detected include the value specified in Maximum. + /// + public YesNoType IncludeMaximum + { + get + { + return this.includeMaximumField; + } + set + { + this.includeMaximumFieldSet = true; + this.includeMaximumField = value; + } + } + + /// + /// Set to "yes" to detect all languages, excluding the languages listed in the Language attribute. + /// + public YesNoType ExcludeLanguages + { + get + { + return this.excludeLanguagesField; + } + set + { + this.excludeLanguagesFieldSet = true; + this.excludeLanguagesField = value; + } + } + + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UpgradeVersion", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.minimumFieldSet) + { + writer.WriteAttributeString("Minimum", this.minimumField); + } + if (this.maximumFieldSet) + { + writer.WriteAttributeString("Maximum", this.maximumField); + } + if (this.languageFieldSet) + { + writer.WriteAttributeString("Language", this.languageField); + } + if (this.removeFeaturesFieldSet) + { + writer.WriteAttributeString("RemoveFeatures", this.removeFeaturesField); + } + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + if (this.migrateFeaturesFieldSet) + { + if ((this.migrateFeaturesField == YesNoType.no)) + { + writer.WriteAttributeString("MigrateFeatures", "no"); + } + if ((this.migrateFeaturesField == YesNoType.yes)) + { + writer.WriteAttributeString("MigrateFeatures", "yes"); + } + } + if (this.onlyDetectFieldSet) + { + if ((this.onlyDetectField == YesNoType.no)) + { + writer.WriteAttributeString("OnlyDetect", "no"); + } + if ((this.onlyDetectField == YesNoType.yes)) + { + writer.WriteAttributeString("OnlyDetect", "yes"); + } + } + if (this.ignoreRemoveFailureFieldSet) + { + if ((this.ignoreRemoveFailureField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreRemoveFailure", "no"); + } + if ((this.ignoreRemoveFailureField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreRemoveFailure", "yes"); + } + } + if (this.includeMinimumFieldSet) + { + if ((this.includeMinimumField == YesNoType.no)) + { + writer.WriteAttributeString("IncludeMinimum", "no"); + } + if ((this.includeMinimumField == YesNoType.yes)) + { + writer.WriteAttributeString("IncludeMinimum", "yes"); + } + } + if (this.includeMaximumFieldSet) + { + if ((this.includeMaximumField == YesNoType.no)) + { + writer.WriteAttributeString("IncludeMaximum", "no"); + } + if ((this.includeMaximumField == YesNoType.yes)) + { + writer.WriteAttributeString("IncludeMaximum", "yes"); + } + } + if (this.excludeLanguagesFieldSet) + { + if ((this.excludeLanguagesField == YesNoType.no)) + { + writer.WriteAttributeString("ExcludeLanguages", "no"); + } + if ((this.excludeLanguagesField == YesNoType.yes)) + { + writer.WriteAttributeString("ExcludeLanguages", "yes"); + } + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Minimum" == name)) + { + this.minimumField = value; + this.minimumFieldSet = true; + } + if (("Maximum" == name)) + { + this.maximumField = value; + this.maximumFieldSet = true; + } + if (("Language" == name)) + { + this.languageField = value; + this.languageFieldSet = true; + } + if (("RemoveFeatures" == name)) + { + this.removeFeaturesField = value; + this.removeFeaturesFieldSet = true; + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + if (("MigrateFeatures" == name)) + { + this.migrateFeaturesField = Enums.ParseYesNoType(value); + this.migrateFeaturesFieldSet = true; + } + if (("OnlyDetect" == name)) + { + this.onlyDetectField = Enums.ParseYesNoType(value); + this.onlyDetectFieldSet = true; + } + if (("IgnoreRemoveFailure" == name)) + { + this.ignoreRemoveFailureField = Enums.ParseYesNoType(value); + this.ignoreRemoveFailureFieldSet = true; + } + if (("IncludeMinimum" == name)) + { + this.includeMinimumField = Enums.ParseYesNoType(value); + this.includeMinimumFieldSet = true; + } + if (("IncludeMaximum" == name)) + { + this.includeMaximumField = Enums.ParseYesNoType(value); + this.includeMaximumFieldSet = true; + } + if (("ExcludeLanguages" == name)) + { + this.excludeLanguagesField = Enums.ParseYesNoType(value); + this.excludeLanguagesFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + /// + /// Upgrade info for a particular UpgradeCode + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Upgrade : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public Upgrade() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UpgradeVersion))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// This value specifies the upgrade code for the products that are to be detected by the FindRelatedProducts action. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("UpgradeVersion" == childName)) + { + childValue = new UpgradeVersion(); + } + if (("Property" == childName)) + { + childValue = new Property(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Upgrade", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// A feature for the Feature table. Features are the smallest installable unit. See msi.chm for more + /// detailed information on the myriad installation options for a feature. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Feature : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private AbsentType absentField; + + private bool absentFieldSet; + + private AllowAdvertiseType allowAdvertiseField; + + private bool allowAdvertiseFieldSet; + + private string configurableDirectoryField; + + private bool configurableDirectoryFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private string displayField; + + private bool displayFieldSet; + + private InstallDefaultType installDefaultField; + + private bool installDefaultFieldSet; + + private int levelField; + + private bool levelFieldSet; + + private string titleField; + + private bool titleFieldSet; + + private TypicalDefaultType typicalDefaultField; + + private bool typicalDefaultFieldSet; + + private ISchemaElement parentElement; + + public Feature() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Unique identifier of the feature. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// This attribute determines if a user will have the option to set a feature to absent in the user interface. + /// + public AbsentType Absent + { + get + { + return this.absentField; + } + set + { + this.absentFieldSet = true; + this.absentField = value; + } + } + + /// + /// This attribute determines the possible advertise states for this feature. + /// + public AllowAdvertiseType AllowAdvertise + { + get + { + return this.allowAdvertiseField; + } + set + { + this.allowAdvertiseFieldSet = true; + this.allowAdvertiseField = value; + } + } + + /// + /// Specify the Id of a Directory that can be configured by the user at installation time. This identifier + /// must be a public property and therefore completely uppercase. + /// + public string ConfigurableDirectory + { + get + { + return this.configurableDirectoryField; + } + set + { + this.configurableDirectoryFieldSet = true; + this.configurableDirectoryField = value; + } + } + + /// + /// Longer string of text describing the feature. This localizable string is displayed by the + /// Text Control of the Selection Dialog. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// Determines the initial display of this feature in the feature tree. + /// This attribute's value should be one of the following: + /// + public string Display + { + get + { + return this.displayField; + } + set + { + this.displayFieldSet = true; + this.displayField = value; + } + } + + /// + /// This attribute determines the default install/run location of a feature. This attribute cannot be specified + /// if the value of the FollowParent attribute is 'yes' since that would ask the installer to force this feature + /// to follow the parent installation state and simultaneously favor a particular installation state just for this feature. + /// + public InstallDefaultType InstallDefault + { + get + { + return this.installDefaultField; + } + set + { + this.installDefaultFieldSet = true; + this.installDefaultField = value; + } + } + + /// + /// Sets the install level of this feature. A value of 0 will disable the feature. Processing the + /// Condition Table can modify the level value (this is set via the Condition child element). The + /// default value is "1". + /// + public int Level + { + get + { + return this.levelField; + } + set + { + this.levelFieldSet = true; + this.levelField = value; + } + } + + /// + /// Short string of text identifying the feature. This string is listed as an item by the + /// SelectionTree control of the Selection Dialog. + /// + public string Title + { + get + { + return this.titleField; + } + set + { + this.titleFieldSet = true; + this.titleField = value; + } + } + + /// + /// This attribute determines the default advertise state of the feature. + /// + public TypicalDefaultType TypicalDefault + { + get + { + return this.typicalDefaultField; + } + set + { + this.typicalDefaultFieldSet = true; + this.typicalDefaultField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Component" == childName)) + { + childValue = new Component(); + } + if (("ComponentGroupRef" == childName)) + { + childValue = new ComponentGroupRef(); + } + if (("ComponentRef" == childName)) + { + childValue = new ComponentRef(); + } + if (("Condition" == childName)) + { + childValue = new Condition(); + } + if (("Feature" == childName)) + { + childValue = new Feature(); + } + if (("FeatureGroupRef" == childName)) + { + childValue = new FeatureGroupRef(); + } + if (("FeatureRef" == childName)) + { + childValue = new FeatureRef(); + } + if (("MergeRef" == childName)) + { + childValue = new MergeRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a AbsentType from a string. + /// + public static AbsentType ParseAbsentType(string value) + { + AbsentType parsedValue; + Feature.TryParseAbsentType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a AbsentType from a string. + /// + public static bool TryParseAbsentType(string value, out AbsentType parsedValue) + { + parsedValue = AbsentType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("allow" == value)) + { + parsedValue = AbsentType.allow; + } + else + { + if (("disallow" == value)) + { + parsedValue = AbsentType.disallow; + } + else + { + parsedValue = AbsentType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Parses a AllowAdvertiseType from a string. + /// + public static AllowAdvertiseType ParseAllowAdvertiseType(string value) + { + AllowAdvertiseType parsedValue; + Feature.TryParseAllowAdvertiseType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a AllowAdvertiseType from a string. + /// + public static bool TryParseAllowAdvertiseType(string value, out AllowAdvertiseType parsedValue) + { + parsedValue = AllowAdvertiseType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("no" == value)) + { + parsedValue = AllowAdvertiseType.no; + } + else + { + if (("system" == value)) + { + parsedValue = AllowAdvertiseType.system; + } + else + { + if (("yes" == value)) + { + parsedValue = AllowAdvertiseType.yes; + } + else + { + parsedValue = AllowAdvertiseType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a InstallDefaultType from a string. + /// + public static InstallDefaultType ParseInstallDefaultType(string value) + { + InstallDefaultType parsedValue; + Feature.TryParseInstallDefaultType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a InstallDefaultType from a string. + /// + public static bool TryParseInstallDefaultType(string value, out InstallDefaultType parsedValue) + { + parsedValue = InstallDefaultType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("followParent" == value)) + { + parsedValue = InstallDefaultType.followParent; + } + else + { + if (("local" == value)) + { + parsedValue = InstallDefaultType.local; + } + else + { + if (("source" == value)) + { + parsedValue = InstallDefaultType.source; + } + else + { + parsedValue = InstallDefaultType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a TypicalDefaultType from a string. + /// + public static TypicalDefaultType ParseTypicalDefaultType(string value) + { + TypicalDefaultType parsedValue; + Feature.TryParseTypicalDefaultType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypicalDefaultType from a string. + /// + public static bool TryParseTypicalDefaultType(string value, out TypicalDefaultType parsedValue) + { + parsedValue = TypicalDefaultType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("advertise" == value)) + { + parsedValue = TypicalDefaultType.advertise; + } + else + { + if (("install" == value)) + { + parsedValue = TypicalDefaultType.install; + } + else + { + parsedValue = TypicalDefaultType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Feature", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.absentFieldSet) + { + if ((this.absentField == AbsentType.allow)) + { + writer.WriteAttributeString("Absent", "allow"); + } + if ((this.absentField == AbsentType.disallow)) + { + writer.WriteAttributeString("Absent", "disallow"); + } + } + if (this.allowAdvertiseFieldSet) + { + if ((this.allowAdvertiseField == AllowAdvertiseType.no)) + { + writer.WriteAttributeString("AllowAdvertise", "no"); + } + if ((this.allowAdvertiseField == AllowAdvertiseType.system)) + { + writer.WriteAttributeString("AllowAdvertise", "system"); + } + if ((this.allowAdvertiseField == AllowAdvertiseType.yes)) + { + writer.WriteAttributeString("AllowAdvertise", "yes"); + } + } + if (this.configurableDirectoryFieldSet) + { + writer.WriteAttributeString("ConfigurableDirectory", this.configurableDirectoryField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.displayFieldSet) + { + writer.WriteAttributeString("Display", this.displayField); + } + if (this.installDefaultFieldSet) + { + if ((this.installDefaultField == InstallDefaultType.followParent)) + { + writer.WriteAttributeString("InstallDefault", "followParent"); + } + if ((this.installDefaultField == InstallDefaultType.local)) + { + writer.WriteAttributeString("InstallDefault", "local"); + } + if ((this.installDefaultField == InstallDefaultType.source)) + { + writer.WriteAttributeString("InstallDefault", "source"); + } + } + if (this.levelFieldSet) + { + writer.WriteAttributeString("Level", this.levelField.ToString(CultureInfo.InvariantCulture)); + } + if (this.titleFieldSet) + { + writer.WriteAttributeString("Title", this.titleField); + } + if (this.typicalDefaultFieldSet) + { + if ((this.typicalDefaultField == TypicalDefaultType.advertise)) + { + writer.WriteAttributeString("TypicalDefault", "advertise"); + } + if ((this.typicalDefaultField == TypicalDefaultType.install)) + { + writer.WriteAttributeString("TypicalDefault", "install"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Absent" == name)) + { + this.absentField = Feature.ParseAbsentType(value); + this.absentFieldSet = true; + } + if (("AllowAdvertise" == name)) + { + this.allowAdvertiseField = Feature.ParseAllowAdvertiseType(value); + this.allowAdvertiseFieldSet = true; + } + if (("ConfigurableDirectory" == name)) + { + this.configurableDirectoryField = value; + this.configurableDirectoryFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("Display" == name)) + { + this.displayField = value; + this.displayFieldSet = true; + } + if (("InstallDefault" == name)) + { + this.installDefaultField = Feature.ParseInstallDefaultType(value); + this.installDefaultFieldSet = true; + } + if (("Level" == name)) + { + this.levelField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.levelFieldSet = true; + } + if (("Title" == name)) + { + this.titleField = value; + this.titleFieldSet = true; + } + if (("TypicalDefault" == name)) + { + this.typicalDefaultField = Feature.ParseTypicalDefaultType(value); + this.typicalDefaultFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum AbsentType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Allows the user interface to display an option to change the feature state to Absent. + /// + allow, + + /// + /// Prevents the user interface from displaying an option to change the feature state + /// to Absent by setting the msidbFeatureAttributesUIDisallowAbsent attribute. This will force the feature + /// to the installation state, whether or not the feature is visible in the UI. + /// + disallow, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum AllowAdvertiseType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Prevents this feature from being advertised by setting the msidbFeatureAttributesDisallowAdvertise attribute. + /// + no, + + /// + /// Prevents advertising for this feature if the operating system shell does not support Windows Installer + /// descriptors by setting the msidbFeatureAttributesNoUnsupportedAdvertise attribute. + /// + system, + + /// + /// Allows the feature to be advertised. + /// + yes, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum InstallDefaultType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Forces the feature to follow the same installation state as its parent feature. + /// + followParent, + + /// + /// Favors installing this feature locally by setting the msidbFeatureAttributesFavorLocal attribute. + /// + local, + + /// + /// Favors running this feature from source by setting the msidbFeatureAttributesFavorSource attribute. + /// + source, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum TypicalDefaultType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Sets the feature to be advertised by setting the msidbFeatureAttributesFavorAdvertise attribute. + /// This value cannot be set if the value of the AllowAdvertise attribute is 'no' since that would ask the installer to + /// disallow the advertised state for this feature while at the same time favoring it. + /// + advertise, + + /// + /// Sets the feature to the default non-advertised installation option. + /// + install, + } + } + + /// + /// Groups together multiple components, features, and merges to be used in other locations. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class FeatureGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public FeatureGroup() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for the FeatureGroup. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Component" == childName)) + { + childValue = new Component(); + } + if (("ComponentGroupRef" == childName)) + { + childValue = new ComponentGroupRef(); + } + if (("ComponentRef" == childName)) + { + childValue = new ComponentRef(); + } + if (("Feature" == childName)) + { + childValue = new Feature(); + } + if (("FeatureGroupRef" == childName)) + { + childValue = new FeatureGroupRef(); + } + if (("FeatureRef" == childName)) + { + childValue = new FeatureRef(); + } + if (("MergeRef" == childName)) + { + childValue = new MergeRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FeatureGroup", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Create a reference to a FeatureGroup in another Fragment. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class FeatureGroupRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private YesNoType ignoreParentField; + + private bool ignoreParentFieldSet; + + private YesNoType primaryField; + + private bool primaryFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the FeatureGroup to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Normally feature group references that end up nested under a parent element create a + /// connection to that parent. This behavior is undesirable when trying to simply reference + /// to a FeatureGroup in a different Fragment. Specify 'yes' to have this feature group + /// reference not create a connection to its parent. The default is 'no'. + /// + public YesNoType IgnoreParent + { + get + { + return this.ignoreParentField; + } + set + { + this.ignoreParentFieldSet = true; + this.ignoreParentField = value; + } + } + + /// + /// Set this attribute to 'yes' in order to make the parent feature of this group + /// the primary feature for any components and merges contained in the group. + /// Features may belong to multiple features. By designating a feature as the + /// primary feature of a component or merge, you ensure that whenever a component is + /// selected for install-on-demand (IOD), the primary feature will be the one to install + /// it. This attribute should only be set if a component actually nests under multiple + /// features. If a component nests under only one feature, that feature is the primary + /// feature for the component. You cannot set more than one feature as the primary + /// feature of a given component. + /// + public YesNoType Primary + { + get + { + return this.primaryField; + } + set + { + this.primaryFieldSet = true; + this.primaryField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FeatureGroupRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.ignoreParentFieldSet) + { + if ((this.ignoreParentField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreParent", "no"); + } + if ((this.ignoreParentField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreParent", "yes"); + } + } + if (this.primaryFieldSet) + { + if ((this.primaryField == YesNoType.no)) + { + writer.WriteAttributeString("Primary", "no"); + } + if ((this.primaryField == YesNoType.yes)) + { + writer.WriteAttributeString("Primary", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("IgnoreParent" == name)) + { + this.ignoreParentField = Enums.ParseYesNoType(value); + this.ignoreParentFieldSet = true; + } + if (("Primary" == name)) + { + this.primaryField = Enums.ParseYesNoType(value); + this.primaryFieldSet = true; + } + } + } + + /// + /// Create a reference to a Feature element in another Fragment. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class FeatureRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private YesNoType ignoreParentField; + + private bool ignoreParentFieldSet; + + private ISchemaElement parentElement; + + public FeatureRef() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroup))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// The identifier of the Feature element to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Normally feature references that are nested under a parent element create a connection to that + /// parent. This behavior is undesirable when trying to simply reference a Feature in a different + /// Fragment. Specify 'yes' to have this feature reference not create a connection to its parent. + /// The default is 'no'. + /// + public YesNoType IgnoreParent + { + get + { + return this.ignoreParentField; + } + set + { + this.ignoreParentFieldSet = true; + this.ignoreParentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Component" == childName)) + { + childValue = new Component(); + } + if (("ComponentGroupRef" == childName)) + { + childValue = new ComponentGroupRef(); + } + if (("ComponentRef" == childName)) + { + childValue = new ComponentRef(); + } + if (("Feature" == childName)) + { + childValue = new Feature(); + } + if (("FeatureRef" == childName)) + { + childValue = new FeatureRef(); + } + if (("FeatureGroup" == childName)) + { + childValue = new FeatureGroup(); + } + if (("FeatureGroupRef" == childName)) + { + childValue = new FeatureGroupRef(); + } + if (("MergeRef" == childName)) + { + childValue = new MergeRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FeatureRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.ignoreParentFieldSet) + { + if ((this.ignoreParentField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreParent", "no"); + } + if ((this.ignoreParentField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreParent", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("IgnoreParent" == name)) + { + this.ignoreParentField = Enums.ParseYesNoType(value); + this.ignoreParentFieldSet = true; + } + } + } + + /// + /// Media element describes a disk that makes up the source media for the installation. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Media : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string cabinetField; + + private bool cabinetFieldSet; + + private CompressionLevelType compressionLevelField; + + private bool compressionLevelFieldSet; + + private string diskPromptField; + + private bool diskPromptFieldSet; + + private YesNoType embedCabField; + + private bool embedCabFieldSet; + + private string layoutField; + + private bool layoutFieldSet; + + private string srcField; + + private bool srcFieldSet; + + private string volumeLabelField; + + private bool volumeLabelFieldSet; + + private string sourceField; + + private bool sourceFieldSet; + + private ISchemaElement parentElement; + + public Media() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalSignature))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchBaseline))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Disk identifier for Media table. This number must be equal to or greater than 1. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// 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. + /// + public string Cabinet + { + get + { + return this.cabinetField; + } + set + { + this.cabinetFieldSet = true; + this.cabinetField = value; + } + } + + /// + /// Indicates the compression level for the Media's cabinet. This attribute can + /// only be used in conjunction with the Cabinet attribute. The default is 'mszip'. + /// + public CompressionLevelType CompressionLevel + { + get + { + return this.compressionLevelField; + } + set + { + this.compressionLevelFieldSet = true; + this.compressionLevelField = value; + } + } + + /// + /// 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. + /// + public string DiskPrompt + { + get + { + return this.diskPromptField; + } + set + { + this.diskPromptFieldSet = true; + this.diskPromptField = value; + } + } + + /// + /// Instructs the binder to embed the cabinet in the product if 'yes'. This attribute can only be specified in conjunction with the Cabinet attribute. + /// + public YesNoType EmbedCab + { + get + { + return this.embedCabField; + } + set + { + this.embedCabFieldSet = true; + this.embedCabField = value; + } + } + + /// + /// This attribute specifies the root directory for the uncompressed files that + /// are a part of this Media element. By default, the src will be the output + /// directory for the final image. The default value ensures the binder generates + /// an installable image. If a relative path is specified in the src attribute, + /// the value will be appended to the image's output directory. If an absolute + /// path is provided, that path will be used without modification. The latter two + /// options are provided to ease the layout of an image onto multiple medias (CDs/DVDs). + /// + public string Layout + { + get + { + return this.layoutField; + } + set + { + this.layoutFieldSet = true; + this.layoutField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string src + { + get + { + return this.srcField; + } + set + { + this.srcFieldSet = true; + this.srcField = value; + } + } + + /// + /// The label attributed to the volume. This is the volume label returned + /// by the GetVolumeInformation function. If the SourceDir property refers + /// to a removable (floppy or CD-ROM) volume, then this volume label is + /// used to verify that the proper disk is in the drive before attempting + /// to install files. The entry in this column must match the volume label + /// of the physical media. + /// + public string VolumeLabel + { + get + { + return this.volumeLabelField; + } + set + { + this.volumeLabelFieldSet = true; + this.volumeLabelField = value; + } + } + + /// + /// Optional property that identifies the source of the embedded cabinet. + /// If a cabinet is specified for a patch, this property should be defined + /// and unique to each patch so that the embedded cabinet containing patched + /// and new files can be located in the patch package. If the cabinet is not + /// embedded - this is not typical - the cabinet can be found in the directory + /// referenced in this column. If empty, the external cabinet must be located + /// in the SourceDir directory. + /// + public string Source + { + get + { + return this.sourceField; + } + set + { + this.sourceFieldSet = true; + this.sourceField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("DigitalSignature" == childName)) + { + childValue = new DigitalSignature(); + } + if (("PatchBaseline" == childName)) + { + childValue = new PatchBaseline(); + } + if (("SymbolPath" == childName)) + { + childValue = new SymbolPath(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Media", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.cabinetFieldSet) + { + writer.WriteAttributeString("Cabinet", this.cabinetField); + } + if (this.compressionLevelFieldSet) + { + if ((this.compressionLevelField == CompressionLevelType.high)) + { + writer.WriteAttributeString("CompressionLevel", "high"); + } + if ((this.compressionLevelField == CompressionLevelType.low)) + { + writer.WriteAttributeString("CompressionLevel", "low"); + } + if ((this.compressionLevelField == CompressionLevelType.medium)) + { + writer.WriteAttributeString("CompressionLevel", "medium"); + } + if ((this.compressionLevelField == CompressionLevelType.mszip)) + { + writer.WriteAttributeString("CompressionLevel", "mszip"); + } + if ((this.compressionLevelField == CompressionLevelType.none)) + { + writer.WriteAttributeString("CompressionLevel", "none"); + } + } + if (this.diskPromptFieldSet) + { + writer.WriteAttributeString("DiskPrompt", this.diskPromptField); + } + if (this.embedCabFieldSet) + { + if ((this.embedCabField == YesNoType.no)) + { + writer.WriteAttributeString("EmbedCab", "no"); + } + if ((this.embedCabField == YesNoType.yes)) + { + writer.WriteAttributeString("EmbedCab", "yes"); + } + } + if (this.layoutFieldSet) + { + writer.WriteAttributeString("Layout", this.layoutField); + } + if (this.srcFieldSet) + { + writer.WriteAttributeString("src", this.srcField); + } + if (this.volumeLabelFieldSet) + { + writer.WriteAttributeString("VolumeLabel", this.volumeLabelField); + } + if (this.sourceFieldSet) + { + writer.WriteAttributeString("Source", this.sourceField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Cabinet" == name)) + { + this.cabinetField = value; + this.cabinetFieldSet = true; + } + if (("CompressionLevel" == name)) + { + this.compressionLevelField = Enums.ParseCompressionLevelType(value); + this.compressionLevelFieldSet = true; + } + if (("DiskPrompt" == name)) + { + this.diskPromptField = value; + this.diskPromptFieldSet = true; + } + if (("EmbedCab" == name)) + { + this.embedCabField = Enums.ParseYesNoType(value); + this.embedCabFieldSet = true; + } + if (("Layout" == name)) + { + this.layoutField = value; + this.layoutFieldSet = true; + } + if (("src" == name)) + { + this.srcField = value; + this.srcFieldSet = true; + } + if (("VolumeLabel" == name)) + { + this.volumeLabelField = value; + this.volumeLabelFieldSet = true; + } + if (("Source" == name)) + { + this.sourceField = value; + this.sourceFieldSet = true; + } + } + } + + /// + /// MediaTeplate element describes information to automatically assign files to cabinets. + /// A maximumum number of cabinets created is 999. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MediaTemplate : ISchemaElement, ISetAttributes + { + + private string cabinetTemplateField; + + private bool cabinetTemplateFieldSet; + + private CompressionLevelType compressionLevelField; + + private bool compressionLevelFieldSet; + + private string diskPromptField; + + private bool diskPromptFieldSet; + + private YesNoType embedCabField; + + private bool embedCabFieldSet; + + private string volumeLabelField; + + private bool volumeLabelFieldSet; + + private int maximumUncompressedMediaSizeField; + + private bool maximumUncompressedMediaSizeFieldSet; + + private int maximumCabinetSizeForLargeFileSplittingField; + + private bool maximumCabinetSizeForLargeFileSplittingFieldSet; + + private ISchemaElement parentElement; + + /// + /// Templated name of the cabinet if some or all of the files stored on the media are in + /// a cabinet file. This name must begin with either a letter or an underscore, contain + /// maximum of five characters and {0} in the cabinet name part and must end three character extension. + /// The default is cab{0}.cab. + /// + public string CabinetTemplate + { + get + { + return this.cabinetTemplateField; + } + set + { + this.cabinetTemplateFieldSet = true; + this.cabinetTemplateField = value; + } + } + + /// + /// Indicates the compression level for the Media's cabinet. This attribute can + /// only be used in conjunction with the Cabinet attribute. The default is 'mszip'. + /// + public CompressionLevelType CompressionLevel + { + get + { + return this.compressionLevelField; + } + set + { + this.compressionLevelFieldSet = true; + this.compressionLevelField = value; + } + } + + /// + /// 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. + /// + public string DiskPrompt + { + get + { + return this.diskPromptField; + } + set + { + this.diskPromptFieldSet = true; + this.diskPromptField = value; + } + } + + /// + /// Instructs the binder to embed the cabinets in the product if 'yes'. + /// + public YesNoType EmbedCab + { + get + { + return this.embedCabField; + } + set + { + this.embedCabFieldSet = true; + this.embedCabField = value; + } + } + + /// + /// The label attributed to the volume. This is the volume label returned + /// by the GetVolumeInformation function. If the SourceDir property refers + /// to a removable (floppy or CD-ROM) volume, then this volume label is + /// used to verify that the proper disk is in the drive before attempting + /// to install files. The entry in this column must match the volume label + /// of the physical media. + /// + public string VolumeLabel + { + get + { + return this.volumeLabelField; + } + set + { + this.volumeLabelFieldSet = true; + this.volumeLabelField = value; + } + } + + /// + /// Size of uncompressed files in each cabinet, in megabytes. WIX_MUMS environment variable + /// can be used to override this value. Default value is 200 MB. + /// + public int MaximumUncompressedMediaSize + { + get + { + return this.maximumUncompressedMediaSizeField; + } + set + { + this.maximumUncompressedMediaSizeFieldSet = true; + this.maximumUncompressedMediaSizeField = value; + } + } + + /// + /// Maximum size of cabinet files in megabytes for large files. This attribute is used for packaging + /// files that are larger than MaximumUncompressedMediaSize into smaller cabinets. If cabinet size + /// exceed this value, then setting this attribute will cause the file to be split into multiple + /// cabinets of this maximum size. For simply controlling cabinet size without file splitting use + /// MaximumUncompressedMediaSize attribute. Setting this attribute will disable smart cabbing feature + /// for this Fragment / Package. Setting WIX_MCSLFS environment variable can be used to override this + /// value. Minimum allowed value of this attribute is 20 MB. Maximum allowed value and the Default + /// value of this attribute is 2048 MB (2 GB). + /// + public int MaximumCabinetSizeForLargeFileSplitting + { + get + { + return this.maximumCabinetSizeForLargeFileSplittingField; + } + set + { + this.maximumCabinetSizeForLargeFileSplittingFieldSet = true; + this.maximumCabinetSizeForLargeFileSplittingField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a CompressionLevelType from a string. + /// + public static CompressionLevelType ParseCompressionLevelType(string value) + { + CompressionLevelType parsedValue; + MediaTemplate.TryParseCompressionLevelType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a CompressionLevelType from a string. + /// + public static bool TryParseCompressionLevelType(string value, out CompressionLevelType parsedValue) + { + parsedValue = CompressionLevelType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("high" == value)) + { + parsedValue = CompressionLevelType.high; + } + else + { + if (("low" == value)) + { + parsedValue = CompressionLevelType.low; + } + else + { + if (("medium" == value)) + { + parsedValue = CompressionLevelType.medium; + } + else + { + if (("mszip" == value)) + { + parsedValue = CompressionLevelType.mszip; + } + else + { + if (("none" == value)) + { + parsedValue = CompressionLevelType.none; + } + else + { + parsedValue = CompressionLevelType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MediaTemplate", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.cabinetTemplateFieldSet) + { + writer.WriteAttributeString("CabinetTemplate", this.cabinetTemplateField); + } + if (this.compressionLevelFieldSet) + { + if ((this.compressionLevelField == CompressionLevelType.high)) + { + writer.WriteAttributeString("CompressionLevel", "high"); + } + if ((this.compressionLevelField == CompressionLevelType.low)) + { + writer.WriteAttributeString("CompressionLevel", "low"); + } + if ((this.compressionLevelField == CompressionLevelType.medium)) + { + writer.WriteAttributeString("CompressionLevel", "medium"); + } + if ((this.compressionLevelField == CompressionLevelType.mszip)) + { + writer.WriteAttributeString("CompressionLevel", "mszip"); + } + if ((this.compressionLevelField == CompressionLevelType.none)) + { + writer.WriteAttributeString("CompressionLevel", "none"); + } + } + if (this.diskPromptFieldSet) + { + writer.WriteAttributeString("DiskPrompt", this.diskPromptField); + } + if (this.embedCabFieldSet) + { + if ((this.embedCabField == YesNoType.no)) + { + writer.WriteAttributeString("EmbedCab", "no"); + } + if ((this.embedCabField == YesNoType.yes)) + { + writer.WriteAttributeString("EmbedCab", "yes"); + } + } + if (this.volumeLabelFieldSet) + { + writer.WriteAttributeString("VolumeLabel", this.volumeLabelField); + } + if (this.maximumUncompressedMediaSizeFieldSet) + { + writer.WriteAttributeString("MaximumUncompressedMediaSize", this.maximumUncompressedMediaSizeField.ToString(CultureInfo.InvariantCulture)); + } + if (this.maximumCabinetSizeForLargeFileSplittingFieldSet) + { + writer.WriteAttributeString("MaximumCabinetSizeForLargeFileSplitting", this.maximumCabinetSizeForLargeFileSplittingField.ToString(CultureInfo.InvariantCulture)); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("CabinetTemplate" == name)) + { + this.cabinetTemplateField = value; + this.cabinetTemplateFieldSet = true; + } + if (("CompressionLevel" == name)) + { + this.compressionLevelField = MediaTemplate.ParseCompressionLevelType(value); + this.compressionLevelFieldSet = true; + } + if (("DiskPrompt" == name)) + { + this.diskPromptField = value; + this.diskPromptFieldSet = true; + } + if (("EmbedCab" == name)) + { + this.embedCabField = Enums.ParseYesNoType(value); + this.embedCabFieldSet = true; + } + if (("VolumeLabel" == name)) + { + this.volumeLabelField = value; + this.volumeLabelFieldSet = true; + } + if (("MaximumUncompressedMediaSize" == name)) + { + this.maximumUncompressedMediaSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.maximumUncompressedMediaSizeFieldSet = true; + } + if (("MaximumCabinetSizeForLargeFileSplitting" == name)) + { + this.maximumCabinetSizeForLargeFileSplittingField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.maximumCabinetSizeForLargeFileSplittingFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum CompressionLevelType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + high, + + low, + + medium, + + mszip, + + none, + } + } + + /// + /// This element has been deprecated. + /// Use the Binary/@SuppressModularization, CustomAction/@SuppressModularization, or Property/@SuppressModularization attributes instead. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class IgnoreModularization : ISchemaElement, ISetAttributes + { + + private string nameField; + + private bool nameFieldSet; + + private TypeType typeField; + + private bool typeFieldSet; + + private ISchemaElement parentElement; + + /// + /// The name of the item to ignore modularization for. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// The type of the item to ignore modularization for. + /// + public TypeType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a TypeType from a string. + /// + public static TypeType ParseTypeType(string value) + { + TypeType parsedValue; + IgnoreModularization.TryParseTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypeType from a string. + /// + public static bool TryParseTypeType(string value, out TypeType parsedValue) + { + parsedValue = TypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("Action" == value)) + { + parsedValue = TypeType.Action; + } + else + { + if (("Property" == value)) + { + parsedValue = TypeType.Property; + } + else + { + if (("Directory" == value)) + { + parsedValue = TypeType.Directory; + } + else + { + parsedValue = TypeType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("IgnoreModularization", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.typeFieldSet) + { + if ((this.typeField == TypeType.Action)) + { + writer.WriteAttributeString("Type", "Action"); + } + if ((this.typeField == TypeType.Property)) + { + writer.WriteAttributeString("Type", "Property"); + } + if ((this.typeField == TypeType.Directory)) + { + writer.WriteAttributeString("Type", "Directory"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = IgnoreModularization.ParseTypeType(value); + this.typeFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum TypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + Action, + + Property, + + Directory, + } + } + + /// + /// Specifies a custom action to be added to the MSI CustomAction table. Various combinations of the attributes for this element + /// correspond to different custom action types. For more information about custom actions see the + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CustomAction : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string binaryKeyField; + + private bool binaryKeyFieldSet; + + private string fileKeyField; + + private bool fileKeyFieldSet; + + private string propertyField; + + private bool propertyFieldSet; + + private string directoryField; + + private bool directoryFieldSet; + + private string dllEntryField; + + private bool dllEntryFieldSet; + + private string exeCommandField; + + private bool exeCommandFieldSet; + + private string jScriptCallField; + + private bool jScriptCallFieldSet; + + private string vBScriptCallField; + + private bool vBScriptCallFieldSet; + + private ScriptType scriptField; + + private bool scriptFieldSet; + + private YesNoType suppressModularizationField; + + private bool suppressModularizationFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private string errorField; + + private bool errorFieldSet; + + private ReturnType returnField; + + private bool returnFieldSet; + + private ExecuteType executeField; + + private bool executeFieldSet; + + private YesNoType impersonateField; + + private bool impersonateFieldSet; + + private YesNoType patchUninstallField; + + private bool patchUninstallFieldSet; + + private YesNoType win64Field; + + private bool win64FieldSet; + + private YesNoType terminalServerAwareField; + + private bool terminalServerAwareFieldSet; + + private YesNoType hideTargetField; + + private bool hideTargetFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the custom action. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// This attribute is a reference to a Binary element with matching Id attribute. That binary stream contains + /// the custom action for use during install. The custom action will not be installed into a target directory. This attribute is + /// typically used with the DllEntry attribute to specify the custom action DLL to use for a type 1 custom action, with the ExeCommand + /// attribute to specify a type 17 custom action that runs an embedded executable, or with the VBScriptCall or JScriptCall attributes + /// to specify a type 5 or 6 custom action. + /// + public string BinaryKey + { + get + { + return this.binaryKeyField; + } + set + { + this.binaryKeyFieldSet = true; + this.binaryKeyField = value; + } + } + + /// + /// This attribute specifies a reference to a File element with matching Id attribute that + /// will execute the custom action code in the file after the file is installed. This + /// attribute is typically used with the ExeCommand attribute to specify a type 18 custom action + /// that runs an installed executable, with the DllEntry attribute to specify an installed custom + /// action DLL to use for a type 17 custom action, or with the VBScriptCall or JScriptCall + /// attributes to specify a type 21 or 22 custom action. + /// + public string FileKey + { + get + { + return this.fileKeyField; + } + set + { + this.fileKeyFieldSet = true; + this.fileKeyField = value; + } + } + + /// + /// This attribute specifies a reference to a Property element with matching Id attribute that specifies the Property + /// to be used or updated on execution of this custom action. This attribute is + /// typically used with the Value attribute to create a type 51 custom action that parses + /// the text in Value and places it into the specified Property. This attribute is also used with + /// the ExeCommand attribute to create a type 50 custom action that uses the value of the + /// given property to specify the path to the executable. Type 51 custom actions are often useful to + /// pass values to a deferred custom action. + /// See + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + /// + /// This attribute specifies a reference to a Directory element with matching Id attribute containing a directory path. + /// This attribute is typically used with the ExeCommand attribute to specify the source executable for a type 34 + /// custom action, or with the Value attribute to specify a formatted string to place in the specified Directory + /// table entry in a type 35 custom action. + /// + public string Directory + { + get + { + return this.directoryField; + } + set + { + this.directoryFieldSet = true; + this.directoryField = value; + } + } + + /// + /// This attribute specifies the name of a function in a custom action to execute. + /// This attribute is used with the BinaryKey attribute to create a type 1 custom + /// action, or with the FileKey attribute to create a type 17 custom action. + /// + public string DllEntry + { + get + { + return this.dllEntryField; + } + set + { + this.dllEntryFieldSet = true; + this.dllEntryField = value; + } + } + + /// + /// This attribute specifies the command line parameters to supply to an externally + /// run executable. This attribute is typically used with the BinaryKey attribute for a type 2 custom action, + /// the FileKey attribute for a type 18 custom action, the Property attribute for a type 50 custom action, + /// or the Directory attribute for a type 34 custom action that specify the executable to run. + /// + public string ExeCommand + { + get + { + return this.exeCommandField; + } + set + { + this.exeCommandFieldSet = true; + this.exeCommandField = value; + } + } + + /// + /// This attribute specifies the name of the JScript function to execute in a script. The script must be + /// provided in a Binary element identified by the BinaryKey attribute described above. In other words, this + /// attribute must be specified in conjunction with the BinaryKey attribute. + /// + public string JScriptCall + { + get + { + return this.jScriptCallField; + } + set + { + this.jScriptCallFieldSet = true; + this.jScriptCallField = value; + } + } + + /// + /// This attribute specifies the name of the VBScript Subroutine to execute in a script. The script must be + /// provided in a Binary element identified by the BinaryKey attribute described above. In other words, this + /// attribute must be specified in conjunction with the BinaryKey attribute. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public string VBScriptCall + { + get + { + return this.vBScriptCallField; + } + set + { + this.vBScriptCallFieldSet = true; + this.vBScriptCallField = value; + } + } + + /// + /// Creates a type 37 or 38 custom action. The text of the element should contain the script to be embedded in the package. + /// + public ScriptType Script + { + get + { + return this.scriptField; + } + set + { + this.scriptFieldSet = true; + this.scriptField = value; + } + } + + /// + /// Use to suppress modularization of this custom action name in merge modules. + /// This should only be necessary for table-driven custom actions because the + /// table name which they interact with cannot be modularized, so there can only + /// be one instance of the table. + /// + public YesNoType SuppressModularization + { + get + { + return this.suppressModularizationField; + } + set + { + this.suppressModularizationFieldSet = true; + this.suppressModularizationField = value; + } + } + + /// + /// This attribute specifies a string value to use in the custom action. This attribute + /// must be used with the Property attribute to set the property as part of a + /// type 51 custom action or with the Directory attribute to set a directory path in that + /// table in a type 35 custom action. The value can be a literal value or derived from a + /// Property element using the + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// This attribute specifies an index in the MSI Error table to use as an error message for a + /// type 19 custom action that displays the error message and aborts a product's installation. + /// + public string Error + { + get + { + return this.errorField; + } + set + { + this.errorFieldSet = true; + this.errorField = value; + } + } + + /// + /// Set this attribute to set the return behavior of the custom action. + /// + public ReturnType Return + { + get + { + return this.returnField; + } + set + { + this.returnFieldSet = true; + this.returnField = value; + } + } + + /// + /// This attribute indicates the scheduling of the custom action. + /// + public ExecuteType Execute + { + get + { + return this.executeField; + } + set + { + this.executeFieldSet = true; + this.executeField = value; + } + } + + /// + /// This attribute specifies whether the Windows Installer, which executes as LocalSystem, + /// should impersonate the user context of the installing user when executing this custom action. + /// Typically the value should be 'yes', except when the custom action needs elevated privileges + /// to apply changes to the machine. + /// + public YesNoType Impersonate + { + get + { + return this.impersonateField; + } + set + { + this.impersonateFieldSet = true; + this.impersonateField = value; + } + } + + /// + /// This attribute specifies that the Windows Installer, execute the custom action only when + /// a patch is being uninstalled. These custom actions should also be conditioned using the + /// MSIPATCHREMOVE property to ensure proper down level (less than Windows Installer 4.5) + /// behavior. + /// + public YesNoType PatchUninstall + { + get + { + return this.patchUninstallField; + } + set + { + this.patchUninstallFieldSet = true; + this.patchUninstallField = value; + } + } + + /// + /// Specifies that a script custom action targets a 64-bit platform. Valid only when used with + /// the Script, VBScriptCall, and JScriptCall attributes. + /// The default value is based on the platform set by the -arch switch to candle.exe + /// or the InstallerPlatform property in a .wixproj MSBuild project: + /// For x86 and ARM, the default value is 'no'. + /// For x64 and IA64, the default value is 'yes'. + /// + public YesNoType Win64 + { + get + { + return this.win64Field; + } + set + { + this.win64FieldSet = true; + this.win64Field = value; + } + } + + /// + /// This attribute specifies controls whether the custom action will impersonate the + /// installing user during per-machine installs on Terminal Server machines. + /// Deferred execution custom actions that do not specify this attribute, or explicitly set it 'no', + /// will run with no user impersonation on Terminal Server machines during + /// per-machine installations. This attribute is only applicable when installing on the + /// Windows Server 2003 family. + /// + public YesNoType TerminalServerAware + { + get + { + return this.terminalServerAwareField; + } + set + { + this.terminalServerAwareFieldSet = true; + this.terminalServerAwareField = value; + } + } + + /// + /// Ensures the installer does not log the CustomActionData for the deferred custom action. + /// + public YesNoType HideTarget + { + get + { + return this.hideTargetField; + } + set + { + this.hideTargetFieldSet = true; + this.hideTargetField = value; + } + } + + /// + /// The text node is only valid if the Script attribute is specified. In that case, the text node contains the script to embed. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ScriptType from a string. + /// + public static ScriptType ParseScriptType(string value) + { + ScriptType parsedValue; + CustomAction.TryParseScriptType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ScriptType from a string. + /// + public static bool TryParseScriptType(string value, out ScriptType parsedValue) + { + parsedValue = ScriptType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("jscript" == value)) + { + parsedValue = ScriptType.jscript; + } + else + { + if (("vbscript" == value)) + { + parsedValue = ScriptType.vbscript; + } + else + { + parsedValue = ScriptType.IllegalValue; + return false; + } + } + return true; + } + + /// + /// Parses a ReturnType from a string. + /// + public static ReturnType ParseReturnType(string value) + { + ReturnType parsedValue; + CustomAction.TryParseReturnType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ReturnType from a string. + /// + public static bool TryParseReturnType(string value, out ReturnType parsedValue) + { + parsedValue = ReturnType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("asyncNoWait" == value)) + { + parsedValue = ReturnType.asyncNoWait; + } + else + { + if (("asyncWait" == value)) + { + parsedValue = ReturnType.asyncWait; + } + else + { + if (("check" == value)) + { + parsedValue = ReturnType.check; + } + else + { + if (("ignore" == value)) + { + parsedValue = ReturnType.ignore; + } + else + { + parsedValue = ReturnType.IllegalValue; + return false; + } + } + } + } + return true; + } + + /// + /// Parses a ExecuteType from a string. + /// + public static ExecuteType ParseExecuteType(string value) + { + ExecuteType parsedValue; + CustomAction.TryParseExecuteType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ExecuteType from a string. + /// + public static bool TryParseExecuteType(string value, out ExecuteType parsedValue) + { + parsedValue = ExecuteType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("commit" == value)) + { + parsedValue = ExecuteType.commit; + } + else + { + if (("deferred" == value)) + { + parsedValue = ExecuteType.deferred; + } + else + { + if (("firstSequence" == value)) + { + parsedValue = ExecuteType.firstSequence; + } + else + { + if (("immediate" == value)) + { + parsedValue = ExecuteType.immediate; + } + else + { + if (("oncePerProcess" == value)) + { + parsedValue = ExecuteType.oncePerProcess; + } + else + { + if (("rollback" == value)) + { + parsedValue = ExecuteType.rollback; + } + else + { + if (("secondSequence" == value)) + { + parsedValue = ExecuteType.secondSequence; + } + else + { + parsedValue = ExecuteType.IllegalValue; + return false; + } + } + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CustomAction", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.binaryKeyFieldSet) + { + writer.WriteAttributeString("BinaryKey", this.binaryKeyField); + } + if (this.fileKeyFieldSet) + { + writer.WriteAttributeString("FileKey", this.fileKeyField); + } + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + if (this.directoryFieldSet) + { + writer.WriteAttributeString("Directory", this.directoryField); + } + if (this.dllEntryFieldSet) + { + writer.WriteAttributeString("DllEntry", this.dllEntryField); + } + if (this.exeCommandFieldSet) + { + writer.WriteAttributeString("ExeCommand", this.exeCommandField); + } + if (this.jScriptCallFieldSet) + { + writer.WriteAttributeString("JScriptCall", this.jScriptCallField); + } + if (this.vBScriptCallFieldSet) + { + writer.WriteAttributeString("VBScriptCall", this.vBScriptCallField); + } + if (this.scriptFieldSet) + { + if ((this.scriptField == ScriptType.jscript)) + { + writer.WriteAttributeString("Script", "jscript"); + } + if ((this.scriptField == ScriptType.vbscript)) + { + writer.WriteAttributeString("Script", "vbscript"); + } + } + if (this.suppressModularizationFieldSet) + { + if ((this.suppressModularizationField == YesNoType.no)) + { + writer.WriteAttributeString("SuppressModularization", "no"); + } + if ((this.suppressModularizationField == YesNoType.yes)) + { + writer.WriteAttributeString("SuppressModularization", "yes"); + } + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.errorFieldSet) + { + writer.WriteAttributeString("Error", this.errorField); + } + if (this.returnFieldSet) + { + if ((this.returnField == ReturnType.asyncNoWait)) + { + writer.WriteAttributeString("Return", "asyncNoWait"); + } + if ((this.returnField == ReturnType.asyncWait)) + { + writer.WriteAttributeString("Return", "asyncWait"); + } + if ((this.returnField == ReturnType.check)) + { + writer.WriteAttributeString("Return", "check"); + } + if ((this.returnField == ReturnType.ignore)) + { + writer.WriteAttributeString("Return", "ignore"); + } + } + if (this.executeFieldSet) + { + if ((this.executeField == ExecuteType.commit)) + { + writer.WriteAttributeString("Execute", "commit"); + } + if ((this.executeField == ExecuteType.deferred)) + { + writer.WriteAttributeString("Execute", "deferred"); + } + if ((this.executeField == ExecuteType.firstSequence)) + { + writer.WriteAttributeString("Execute", "firstSequence"); + } + if ((this.executeField == ExecuteType.immediate)) + { + writer.WriteAttributeString("Execute", "immediate"); + } + if ((this.executeField == ExecuteType.oncePerProcess)) + { + writer.WriteAttributeString("Execute", "oncePerProcess"); + } + if ((this.executeField == ExecuteType.rollback)) + { + writer.WriteAttributeString("Execute", "rollback"); + } + if ((this.executeField == ExecuteType.secondSequence)) + { + writer.WriteAttributeString("Execute", "secondSequence"); + } + } + if (this.impersonateFieldSet) + { + if ((this.impersonateField == YesNoType.no)) + { + writer.WriteAttributeString("Impersonate", "no"); + } + if ((this.impersonateField == YesNoType.yes)) + { + writer.WriteAttributeString("Impersonate", "yes"); + } + } + if (this.patchUninstallFieldSet) + { + if ((this.patchUninstallField == YesNoType.no)) + { + writer.WriteAttributeString("PatchUninstall", "no"); + } + if ((this.patchUninstallField == YesNoType.yes)) + { + writer.WriteAttributeString("PatchUninstall", "yes"); + } + } + if (this.win64FieldSet) + { + if ((this.win64Field == YesNoType.no)) + { + writer.WriteAttributeString("Win64", "no"); + } + if ((this.win64Field == YesNoType.yes)) + { + writer.WriteAttributeString("Win64", "yes"); + } + } + if (this.terminalServerAwareFieldSet) + { + if ((this.terminalServerAwareField == YesNoType.no)) + { + writer.WriteAttributeString("TerminalServerAware", "no"); + } + if ((this.terminalServerAwareField == YesNoType.yes)) + { + writer.WriteAttributeString("TerminalServerAware", "yes"); + } + } + if (this.hideTargetFieldSet) + { + if ((this.hideTargetField == YesNoType.no)) + { + writer.WriteAttributeString("HideTarget", "no"); + } + if ((this.hideTargetField == YesNoType.yes)) + { + writer.WriteAttributeString("HideTarget", "yes"); + } + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("BinaryKey" == name)) + { + this.binaryKeyField = value; + this.binaryKeyFieldSet = true; + } + if (("FileKey" == name)) + { + this.fileKeyField = value; + this.fileKeyFieldSet = true; + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + if (("Directory" == name)) + { + this.directoryField = value; + this.directoryFieldSet = true; + } + if (("DllEntry" == name)) + { + this.dllEntryField = value; + this.dllEntryFieldSet = true; + } + if (("ExeCommand" == name)) + { + this.exeCommandField = value; + this.exeCommandFieldSet = true; + } + if (("JScriptCall" == name)) + { + this.jScriptCallField = value; + this.jScriptCallFieldSet = true; + } + if (("VBScriptCall" == name)) + { + this.vBScriptCallField = value; + this.vBScriptCallFieldSet = true; + } + if (("Script" == name)) + { + this.scriptField = CustomAction.ParseScriptType(value); + this.scriptFieldSet = true; + } + if (("SuppressModularization" == name)) + { + this.suppressModularizationField = Enums.ParseYesNoType(value); + this.suppressModularizationFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Error" == name)) + { + this.errorField = value; + this.errorFieldSet = true; + } + if (("Return" == name)) + { + this.returnField = CustomAction.ParseReturnType(value); + this.returnFieldSet = true; + } + if (("Execute" == name)) + { + this.executeField = CustomAction.ParseExecuteType(value); + this.executeFieldSet = true; + } + if (("Impersonate" == name)) + { + this.impersonateField = Enums.ParseYesNoType(value); + this.impersonateFieldSet = true; + } + if (("PatchUninstall" == name)) + { + this.patchUninstallField = Enums.ParseYesNoType(value); + this.patchUninstallFieldSet = true; + } + if (("Win64" == name)) + { + this.win64Field = Enums.ParseYesNoType(value); + this.win64FieldSet = true; + } + if (("TerminalServerAware" == name)) + { + this.terminalServerAwareField = Enums.ParseYesNoType(value); + this.terminalServerAwareFieldSet = true; + } + if (("HideTarget" == name)) + { + this.hideTargetField = Enums.ParseYesNoType(value); + this.hideTargetFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ScriptType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + jscript, + + vbscript, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ReturnType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Indicates that the custom action will run asyncronously and execution may continue after the installer terminates. + /// + asyncNoWait, + + /// + /// Indicates that the custom action will run asynchronously but the installer will wait for the return code at sequence end. + /// + asyncWait, + + /// + /// Indicates that the custom action will run synchronously and the return code will be checked for success. This is the default. + /// + check, + + /// + /// Indicates that the custom action will run synchronously and the return code will not be checked. + /// + ignore, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ExecuteType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Indicates that the custom action will run after successful completion of the installation script (at the end of the installation). + /// + commit, + + /// + /// Indicates that the custom action runs in-script (possibly with elevated privileges). + /// + deferred, + + /// + /// Indicates that the custom action will only run in the first sequence that runs it. + /// + firstSequence, + + /// + /// Indicates that the custom action will run during normal processing time with user privileges. This is the default. + /// + immediate, + + /// + /// Indicates that the custom action will only run in the first sequence that runs it in the same process. + /// + oncePerProcess, + + /// + /// Indicates that a custom action will run in the rollback sequence when a failure + /// occurs during installation, usually to undo changes made by a deferred custom action. + /// + rollback, + + /// + /// Indicates that a custom action should be run a second time if it was previously run in an earlier sequence. + /// + secondSequence, + } + } + + /// + /// This will cause the entire contents of the Fragment containing the referenced CustomAction to be + /// included in the installer database. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CustomActionRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the CustomAction to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CustomActionRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Sets a Directory to a particular value. This is accomplished by creating a Type 51 custom action that is appropriately scheduled in + /// the InstallUISequence and InstallExecuteSequence. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class SetDirectory : ISchemaElement, ISetAttributes + { + + private string actionField; + + private bool actionFieldSet; + + private string idField; + + private bool idFieldSet; + + private SequenceType sequenceField; + + private bool sequenceFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// By default the action is "Set" + Id attribute's value. This optional attribute can override the action name in the case + /// where multiple SetDirectory elements target the same Id (probably with mutually exclusive conditions). + /// + public string Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// This attribute specifies a reference to a Directory element with matching Id attribute. The path of the Directory will be set to + /// the Value attribute. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Controls which sequences the Directory assignment is sequenced in. + /// For 'execute', the assignment is scheduled in the InstallExecuteSequence. + /// For 'ui', the assignment is scheduled in the InstallUISequence. + /// For 'first', the assignment is scheduled in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped at install time. + /// For 'both', the assignment is scheduled in both the InstallUISequence and the InstallExecuteSequence. + /// The default is 'both'. + /// + public SequenceType Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + /// + /// This attribute specifies a string value to assign to the Directory. The value can be a literal value or derived from a + /// Property element using the + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// The condition that determines whether the Directory is set. If the condition evaluates to false, the SetDirectory is skipped. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("SetDirectory", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.actionFieldSet) + { + writer.WriteAttributeString("Action", this.actionField); + } + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.sequenceFieldSet) + { + if ((this.sequenceField == SequenceType.both)) + { + writer.WriteAttributeString("Sequence", "both"); + } + if ((this.sequenceField == SequenceType.first)) + { + writer.WriteAttributeString("Sequence", "first"); + } + if ((this.sequenceField == SequenceType.execute)) + { + writer.WriteAttributeString("Sequence", "execute"); + } + if ((this.sequenceField == SequenceType.ui)) + { + writer.WriteAttributeString("Sequence", "ui"); + } + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Action" == name)) + { + this.actionField = value; + this.actionFieldSet = true; + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Sequence" == name)) + { + this.sequenceField = Enums.ParseSequenceType(value); + this.sequenceFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + /// + /// Sets a Property to a particular value. This is accomplished by creating a Type 51 custom action that is appropriately scheduled in + /// the InstallUISequence and InstallExecuteSequence. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class SetProperty : ISchemaElement, ISetAttributes + { + + private string actionField; + + private bool actionFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private string beforeField; + + private bool beforeFieldSet; + + private string idField; + + private bool idFieldSet; + + private SequenceType sequenceField; + + private bool sequenceFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// By default the action is "Set" + Id attribute's value. This optional attribute can override the action name in the case + /// where multiple SetProperty elements target the same Id (probably with mutually exclusive conditions). + /// + public string Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// 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. + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// 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. + /// + public string Before + { + get + { + return this.beforeField; + } + set + { + this.beforeFieldSet = true; + this.beforeField = value; + } + } + + /// + /// This attribute specifies the Property to set to the Value. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Controls which sequences the Property assignment is sequenced in. + /// For 'execute', the assignment is scheduled in the InstallExecuteSequence. + /// For 'ui', the assignment is scheduled in the InstallUISequence. + /// For 'first', the assignment is scheduled in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped at install time. + /// For 'both', the assignment is scheduled in both the InstallUISequence and the InstallExecuteSequence. + /// The default is 'both'. + /// + public SequenceType Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + /// + /// This attribute specifies a string value to assign to the Property. The value can be a literal value or derived from a + /// Property element using the + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// The condition that determines whether the Property is set. If the condition evaluates to false, the Set is skipped. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("SetProperty", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.actionFieldSet) + { + writer.WriteAttributeString("Action", this.actionField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.beforeFieldSet) + { + writer.WriteAttributeString("Before", this.beforeField); + } + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.sequenceFieldSet) + { + if ((this.sequenceField == SequenceType.both)) + { + writer.WriteAttributeString("Sequence", "both"); + } + if ((this.sequenceField == SequenceType.first)) + { + writer.WriteAttributeString("Sequence", "first"); + } + if ((this.sequenceField == SequenceType.execute)) + { + writer.WriteAttributeString("Sequence", "execute"); + } + if ((this.sequenceField == SequenceType.ui)) + { + writer.WriteAttributeString("Sequence", "ui"); + } + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Action" == name)) + { + this.actionField = value; + this.actionFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("Before" == name)) + { + this.beforeField = value; + this.beforeFieldSet = true; + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Sequence" == name)) + { + this.sequenceField = Enums.ParseSequenceType(value); + this.sequenceFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + /// + /// This will cause the entire contents of the Fragment containing the referenced PatchFamily to be + /// used in the process of creating a patch. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchFamilyRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string productCodeField; + + private bool productCodeFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the PatchFamily to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Specifies the ProductCode of the product that this family applies to. + /// + public string ProductCode + { + get + { + return this.productCodeField; + } + set + { + this.productCodeFieldSet = true; + this.productCodeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchFamilyRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.productCodeFieldSet) + { + writer.WriteAttributeString("ProductCode", this.productCodeField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("ProductCode" == name)) + { + this.productCodeField = value; + this.productCodeFieldSet = true; + } + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ValidateProductID : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ValidateProductID", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CostInitialize : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CostInitialize", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class FileCost : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FileCost", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class IsolateComponents : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("IsolateComponents", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CostFinalize : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CostFinalize", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class SetODBCFolders : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("SetODBCFolders", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MigrateFeatureStates : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MigrateFeatureStates", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Initiates the execution sequence. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ExecuteAction : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ExecuteAction", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstallValidate : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstallValidate", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstallInitialize : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstallInitialize", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Ensures the needed amount of space exists in the registry. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class AllocateRegistrySpace : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("AllocateRegistrySpace", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ProcessComponents : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ProcessComponents", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Manages the unadvertisement of components listed in the PublishComponent table. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UnpublishComponents : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UnpublishComponents", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MsiUnpublishAssemblies : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MsiUnpublishAssemblies", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UnpublishFeatures : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UnpublishFeatures", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Stops system services. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class StopServices : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("StopServices", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Stops a service and removes its registration from the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class DeleteServices : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DeleteServices", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Removes COM+ applications from the registry. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UnregisterComPlus : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UnregisterComPlus", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class SelfUnregModules : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("SelfUnregModules", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Unregisters type libraries from the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UnregisterTypeLibraries : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UnregisterTypeLibraries", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveODBC : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveODBC", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Removes registration information about installed fonts from the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UnregisterFonts : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UnregisterFonts", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveRegistryValues : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveRegistryValues", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UnregisterClassInfo : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UnregisterClassInfo", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UnregisterExtensionInfo : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UnregisterExtensionInfo", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Manages the unregistration of OLE ProgId information with the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UnregisterProgIdInfo : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UnregisterProgIdInfo", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Unregisters MIME-related registry information from the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UnregisterMIMEInfo : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UnregisterMIMEInfo", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveIniValues : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveIniValues", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveShortcuts : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveShortcuts", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Modifies the values of environment variables. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveEnvironmentStrings : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveEnvironmentStrings", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Deletes files installed by the DuplicateFiles action. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveDuplicateFiles : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveDuplicateFiles", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Removes files previously installed by the InstallFiles action. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveFiles : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveFiles", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveFolders : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveFolders", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CreateFolders : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CreateFolders", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MoveFiles : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MoveFiles", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Copies the product database to the administrative installation point. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstallAdminPackage : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstallAdminPackage", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstallFiles : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstallFiles", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Duplicates files installed by the InstallFiles action. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class DuplicateFiles : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DuplicateFiles", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PatchFiles : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PatchFiles", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class BindImage : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("BindImage", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Manages the creation of shortcuts. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CreateShortcuts : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CreateShortcuts", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Manages the registration of COM class information with the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegisterClassInfo : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegisterClassInfo", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Manages the registration of extension related information with the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegisterExtensionInfo : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegisterExtensionInfo", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Manages the registration of OLE ProgId information with the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegisterProgIdInfo : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegisterProgIdInfo", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Registers MIME-related registry information with the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegisterMIMEInfo : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegisterMIMEInfo", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Sets up an application's registry information. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class WriteRegistryValues : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WriteRegistryValues", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class WriteIniValues : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WriteIniValues", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Modifies the values of environment variables. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class WriteEnvironmentStrings : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WriteEnvironmentStrings", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Registers installed fonts with the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegisterFonts : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegisterFonts", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstallODBC : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstallODBC", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Registers type libraries with the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegisterTypeLibraries : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegisterTypeLibraries", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class SelfRegModules : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("SelfRegModules", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Registers COM+ applications. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegisterComPlus : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegisterComPlus", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Registers a service for the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstallServices : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstallServices", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Starts system services. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class StartServices : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("StartServices", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegisterUser : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegisterUser", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Registers the product information with the installer. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RegisterProduct : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RegisterProduct", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Manages the advertisement of the components from the PublishComponent table. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PublishComponents : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PublishComponents", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Manages the advertisement of CLR and Win32 assemblies. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MsiPublishAssemblies : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MsiPublishAssemblies", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Writes each feature's state into the system registry. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PublishFeatures : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PublishFeatures", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Manages the advertisement of the product information with the system. The condition for this action may be specified in the element's inner text. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class PublishProduct : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("PublishProduct", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstallFinalize : ActionSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstallFinalize", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class AppSearch : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("AppSearch", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CCPSearch : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CCPSearch", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RMCCPSearch : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RMCCPSearch", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class LaunchConditions : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("LaunchConditions", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class FindRelatedProducts : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("FindRelatedProducts", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstallExecute : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstallExecute", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstallExecuteAgain : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstallExecuteAgain", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class DisableRollback : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DisableRollback", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RemoveExistingProducts : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RemoveExistingProducts", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ScheduleReboot : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ScheduleReboot", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ForceReboot : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ForceReboot", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// 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. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ResolveSource : ActionModuleSequenceType, ISchemaElement + { + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public override void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ResolveSource", "http://wixtoolset.org/schemas/v4/wxs"); + base.OutputXml(writer); + writer.WriteEndElement(); + } + } + + /// + /// Use to sequence a custom action. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Custom : ISchemaElement, ISetAttributes + { + + private string actionField; + + private bool actionFieldSet; + + private ExitType onExitField; + + private bool onExitFieldSet; + + private string beforeField; + + private bool beforeFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private YesNoType overridableField; + + private bool overridableFieldSet; + + private int sequenceField; + + private bool sequenceFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// The action to which the Custom element applies. + /// + public string Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// Mutually exclusive with Before, After, and Sequence attributes + /// + public ExitType OnExit + { + get + { + return this.onExitField; + } + set + { + this.onExitFieldSet = true; + this.onExitField = value; + } + } + + /// + /// The name of the standard or custom action before which this action should be performed. Mutually exclusive with OnExit, After, and Sequence attributes + /// + public string Before + { + get + { + return this.beforeField; + } + set + { + this.beforeFieldSet = true; + this.beforeField = value; + } + } + + /// + /// The name of the standard or custom action after which this action should be performed. Mutually exclusive with Before, OnExit, and Sequence attributes + /// + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// If "yes", the sequencing of this action may be overridden by sequencing elsewhere. + /// + public YesNoType Overridable + { + get + { + return this.overridableField; + } + set + { + this.overridableFieldSet = true; + this.overridableField = value; + } + } + + /// + /// The sequence number for this action. Mutually exclusive with Before, After, and OnExit attributes + /// + public int Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + /// + /// Text node specifies the condition of the action. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Custom", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.actionFieldSet) + { + writer.WriteAttributeString("Action", this.actionField); + } + if (this.onExitFieldSet) + { + if ((this.onExitField == ExitType.success)) + { + writer.WriteAttributeString("OnExit", "success"); + } + if ((this.onExitField == ExitType.cancel)) + { + writer.WriteAttributeString("OnExit", "cancel"); + } + if ((this.onExitField == ExitType.error)) + { + writer.WriteAttributeString("OnExit", "error"); + } + if ((this.onExitField == ExitType.suspend)) + { + writer.WriteAttributeString("OnExit", "suspend"); + } + } + if (this.beforeFieldSet) + { + writer.WriteAttributeString("Before", this.beforeField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.overridableFieldSet) + { + if ((this.overridableField == YesNoType.no)) + { + writer.WriteAttributeString("Overridable", "no"); + } + if ((this.overridableField == YesNoType.yes)) + { + writer.WriteAttributeString("Overridable", "yes"); + } + } + if (this.sequenceFieldSet) + { + writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Action" == name)) + { + this.actionField = value; + this.actionFieldSet = true; + } + if (("OnExit" == name)) + { + this.onExitField = Enums.ParseExitType(value); + this.onExitFieldSet = true; + } + if (("Before" == name)) + { + this.beforeField = value; + this.beforeFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("Overridable" == name)) + { + this.overridableField = Enums.ParseYesNoType(value); + this.overridableFieldSet = true; + } + if (("Sequence" == name)) + { + this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sequenceFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Show : ISchemaElement, ISetAttributes + { + + private string dialogField; + + private bool dialogFieldSet; + + private ExitType onExitField; + + private bool onExitFieldSet; + + private string beforeField; + + private bool beforeFieldSet; + + private string afterField; + + private bool afterFieldSet; + + private YesNoType overridableField; + + private bool overridableFieldSet; + + private int sequenceField; + + private bool sequenceFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + public string Dialog + { + get + { + return this.dialogField; + } + set + { + this.dialogFieldSet = true; + this.dialogField = value; + } + } + + /// + /// mutually exclusive with Before, After, and Sequence attributes + /// + public ExitType OnExit + { + get + { + return this.onExitField; + } + set + { + this.onExitFieldSet = true; + this.onExitField = value; + } + } + + public string Before + { + get + { + return this.beforeField; + } + set + { + this.beforeFieldSet = true; + this.beforeField = value; + } + } + + public string After + { + get + { + return this.afterField; + } + set + { + this.afterFieldSet = true; + this.afterField = value; + } + } + + /// + /// If "yes", the sequencing of this dialog may be overridden by sequencing elsewhere. + /// + public YesNoType Overridable + { + get + { + return this.overridableField; + } + set + { + this.overridableFieldSet = true; + this.overridableField = value; + } + } + + public int Sequence + { + get + { + return this.sequenceField; + } + set + { + this.sequenceFieldSet = true; + this.sequenceField = value; + } + } + + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Show", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.dialogFieldSet) + { + writer.WriteAttributeString("Dialog", this.dialogField); + } + if (this.onExitFieldSet) + { + if ((this.onExitField == ExitType.success)) + { + writer.WriteAttributeString("OnExit", "success"); + } + if ((this.onExitField == ExitType.cancel)) + { + writer.WriteAttributeString("OnExit", "cancel"); + } + if ((this.onExitField == ExitType.error)) + { + writer.WriteAttributeString("OnExit", "error"); + } + if ((this.onExitField == ExitType.suspend)) + { + writer.WriteAttributeString("OnExit", "suspend"); + } + } + if (this.beforeFieldSet) + { + writer.WriteAttributeString("Before", this.beforeField); + } + if (this.afterFieldSet) + { + writer.WriteAttributeString("After", this.afterField); + } + if (this.overridableFieldSet) + { + if ((this.overridableField == YesNoType.no)) + { + writer.WriteAttributeString("Overridable", "no"); + } + if ((this.overridableField == YesNoType.yes)) + { + writer.WriteAttributeString("Overridable", "yes"); + } + } + if (this.sequenceFieldSet) + { + writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Dialog" == name)) + { + this.dialogField = value; + this.dialogFieldSet = true; + } + if (("OnExit" == name)) + { + this.onExitField = Enums.ParseExitType(value); + this.onExitFieldSet = true; + } + if (("Before" == name)) + { + this.beforeField = value; + this.beforeFieldSet = true; + } + if (("After" == name)) + { + this.afterField = value; + this.afterFieldSet = true; + } + if (("Overridable" == name)) + { + this.overridableField = Enums.ParseYesNoType(value); + this.overridableFieldSet = true; + } + if (("Sequence" == name)) + { + this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.sequenceFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstallUISequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private ISchemaElement parentElement; + + public InstallUISequence() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Show))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ScheduleReboot))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FindRelatedProducts))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppSearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CCPSearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RMCCPSearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ValidateProductID))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponents))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MigrateFeatureStates))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExecuteAction))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Custom" == childName)) + { + childValue = new Custom(); + } + if (("Show" == childName)) + { + childValue = new Show(); + } + if (("ScheduleReboot" == childName)) + { + childValue = new ScheduleReboot(); + } + if (("LaunchConditions" == childName)) + { + childValue = new LaunchConditions(); + } + if (("FindRelatedProducts" == childName)) + { + childValue = new FindRelatedProducts(); + } + if (("AppSearch" == childName)) + { + childValue = new AppSearch(); + } + if (("CCPSearch" == childName)) + { + childValue = new CCPSearch(); + } + if (("RMCCPSearch" == childName)) + { + childValue = new RMCCPSearch(); + } + if (("ValidateProductID" == childName)) + { + childValue = new ValidateProductID(); + } + if (("CostInitialize" == childName)) + { + childValue = new CostInitialize(); + } + if (("FileCost" == childName)) + { + childValue = new FileCost(); + } + if (("IsolateComponents" == childName)) + { + childValue = new IsolateComponents(); + } + if (("ResolveSource" == childName)) + { + childValue = new ResolveSource(); + } + if (("CostFinalize" == childName)) + { + childValue = new CostFinalize(); + } + if (("MigrateFeatureStates" == childName)) + { + childValue = new MigrateFeatureStates(); + } + if (("ExecuteAction" == childName)) + { + childValue = new ExecuteAction(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstallUISequence", "http://wixtoolset.org/schemas/v4/wxs"); + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstallExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private ISchemaElement parentElement; + + public InstallExecuteSequence() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ScheduleReboot))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ForceReboot))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FindRelatedProducts))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppSearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CCPSearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RMCCPSearch))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ValidateProductID))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponents))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetODBCFolders))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MigrateFeatureStates))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AllocateRegistrySpace))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProcessComponents))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnpublishComponents))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnpublishFeatures))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(StopServices))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DeleteServices))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterComPlus))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SelfUnregModules))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterTypeLibraries))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveODBC))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterFonts))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryValues))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterClassInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterExtensionInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterProgIdInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterMIMEInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveIniValues))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveShortcuts))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveEnvironmentStrings))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveDuplicateFiles))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFiles))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFolders))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateFolders))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MoveFiles))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DuplicateFiles))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFiles))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BindImage))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateShortcuts))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterClassInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterExtensionInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProgIdInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterMIMEInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteRegistryValues))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteIniValues))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteEnvironmentStrings))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterFonts))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallODBC))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterTypeLibraries))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SelfRegModules))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterComPlus))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallServices))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(StartServices))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterUser))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProduct))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishComponents))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishFeatures))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishProduct))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveExistingProducts))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DisableRollback))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallExecute))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallExecuteAgain))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPublishAssemblies))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiUnpublishAssemblies))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Custom" == childName)) + { + childValue = new Custom(); + } + if (("ScheduleReboot" == childName)) + { + childValue = new ScheduleReboot(); + } + if (("ForceReboot" == childName)) + { + childValue = new ForceReboot(); + } + if (("ResolveSource" == childName)) + { + childValue = new ResolveSource(); + } + if (("LaunchConditions" == childName)) + { + childValue = new LaunchConditions(); + } + if (("FindRelatedProducts" == childName)) + { + childValue = new FindRelatedProducts(); + } + if (("AppSearch" == childName)) + { + childValue = new AppSearch(); + } + if (("CCPSearch" == childName)) + { + childValue = new CCPSearch(); + } + if (("RMCCPSearch" == childName)) + { + childValue = new RMCCPSearch(); + } + if (("ValidateProductID" == childName)) + { + childValue = new ValidateProductID(); + } + if (("CostInitialize" == childName)) + { + childValue = new CostInitialize(); + } + if (("FileCost" == childName)) + { + childValue = new FileCost(); + } + if (("IsolateComponents" == childName)) + { + childValue = new IsolateComponents(); + } + if (("CostFinalize" == childName)) + { + childValue = new CostFinalize(); + } + if (("SetODBCFolders" == childName)) + { + childValue = new SetODBCFolders(); + } + if (("MigrateFeatureStates" == childName)) + { + childValue = new MigrateFeatureStates(); + } + if (("InstallValidate" == childName)) + { + childValue = new InstallValidate(); + } + if (("InstallInitialize" == childName)) + { + childValue = new InstallInitialize(); + } + if (("AllocateRegistrySpace" == childName)) + { + childValue = new AllocateRegistrySpace(); + } + if (("ProcessComponents" == childName)) + { + childValue = new ProcessComponents(); + } + if (("UnpublishComponents" == childName)) + { + childValue = new UnpublishComponents(); + } + if (("UnpublishFeatures" == childName)) + { + childValue = new UnpublishFeatures(); + } + if (("StopServices" == childName)) + { + childValue = new StopServices(); + } + if (("DeleteServices" == childName)) + { + childValue = new DeleteServices(); + } + if (("UnregisterComPlus" == childName)) + { + childValue = new UnregisterComPlus(); + } + if (("SelfUnregModules" == childName)) + { + childValue = new SelfUnregModules(); + } + if (("UnregisterTypeLibraries" == childName)) + { + childValue = new UnregisterTypeLibraries(); + } + if (("RemoveODBC" == childName)) + { + childValue = new RemoveODBC(); + } + if (("UnregisterFonts" == childName)) + { + childValue = new UnregisterFonts(); + } + if (("RemoveRegistryValues" == childName)) + { + childValue = new RemoveRegistryValues(); + } + if (("UnregisterClassInfo" == childName)) + { + childValue = new UnregisterClassInfo(); + } + if (("UnregisterExtensionInfo" == childName)) + { + childValue = new UnregisterExtensionInfo(); + } + if (("UnregisterProgIdInfo" == childName)) + { + childValue = new UnregisterProgIdInfo(); + } + if (("UnregisterMIMEInfo" == childName)) + { + childValue = new UnregisterMIMEInfo(); + } + if (("RemoveIniValues" == childName)) + { + childValue = new RemoveIniValues(); + } + if (("RemoveShortcuts" == childName)) + { + childValue = new RemoveShortcuts(); + } + if (("RemoveEnvironmentStrings" == childName)) + { + childValue = new RemoveEnvironmentStrings(); + } + if (("RemoveDuplicateFiles" == childName)) + { + childValue = new RemoveDuplicateFiles(); + } + if (("RemoveFiles" == childName)) + { + childValue = new RemoveFiles(); + } + if (("RemoveFolders" == childName)) + { + childValue = new RemoveFolders(); + } + if (("CreateFolders" == childName)) + { + childValue = new CreateFolders(); + } + if (("MoveFiles" == childName)) + { + childValue = new MoveFiles(); + } + if (("InstallFiles" == childName)) + { + childValue = new InstallFiles(); + } + if (("DuplicateFiles" == childName)) + { + childValue = new DuplicateFiles(); + } + if (("PatchFiles" == childName)) + { + childValue = new PatchFiles(); + } + if (("BindImage" == childName)) + { + childValue = new BindImage(); + } + if (("CreateShortcuts" == childName)) + { + childValue = new CreateShortcuts(); + } + if (("RegisterClassInfo" == childName)) + { + childValue = new RegisterClassInfo(); + } + if (("RegisterExtensionInfo" == childName)) + { + childValue = new RegisterExtensionInfo(); + } + if (("RegisterProgIdInfo" == childName)) + { + childValue = new RegisterProgIdInfo(); + } + if (("RegisterMIMEInfo" == childName)) + { + childValue = new RegisterMIMEInfo(); + } + if (("WriteRegistryValues" == childName)) + { + childValue = new WriteRegistryValues(); + } + if (("WriteIniValues" == childName)) + { + childValue = new WriteIniValues(); + } + if (("WriteEnvironmentStrings" == childName)) + { + childValue = new WriteEnvironmentStrings(); + } + if (("RegisterFonts" == childName)) + { + childValue = new RegisterFonts(); + } + if (("InstallODBC" == childName)) + { + childValue = new InstallODBC(); + } + if (("RegisterTypeLibraries" == childName)) + { + childValue = new RegisterTypeLibraries(); + } + if (("SelfRegModules" == childName)) + { + childValue = new SelfRegModules(); + } + if (("RegisterComPlus" == childName)) + { + childValue = new RegisterComPlus(); + } + if (("InstallServices" == childName)) + { + childValue = new InstallServices(); + } + if (("StartServices" == childName)) + { + childValue = new StartServices(); + } + if (("RegisterUser" == childName)) + { + childValue = new RegisterUser(); + } + if (("RegisterProduct" == childName)) + { + childValue = new RegisterProduct(); + } + if (("PublishComponents" == childName)) + { + childValue = new PublishComponents(); + } + if (("PublishFeatures" == childName)) + { + childValue = new PublishFeatures(); + } + if (("PublishProduct" == childName)) + { + childValue = new PublishProduct(); + } + if (("InstallFinalize" == childName)) + { + childValue = new InstallFinalize(); + } + if (("RemoveExistingProducts" == childName)) + { + childValue = new RemoveExistingProducts(); + } + if (("DisableRollback" == childName)) + { + childValue = new DisableRollback(); + } + if (("InstallExecute" == childName)) + { + childValue = new InstallExecute(); + } + if (("InstallExecuteAgain" == childName)) + { + childValue = new InstallExecuteAgain(); + } + if (("MsiPublishAssemblies" == childName)) + { + childValue = new MsiPublishAssemblies(); + } + if (("MsiUnpublishAssemblies" == childName)) + { + childValue = new MsiUnpublishAssemblies(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstallExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs"); + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class AdminUISequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private ISchemaElement parentElement; + + public AdminUISequence() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Show))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExecuteAction))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallAdminPackage))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Custom" == childName)) + { + childValue = new Custom(); + } + if (("Show" == childName)) + { + childValue = new Show(); + } + if (("CostInitialize" == childName)) + { + childValue = new CostInitialize(); + } + if (("FileCost" == childName)) + { + childValue = new FileCost(); + } + if (("CostFinalize" == childName)) + { + childValue = new CostFinalize(); + } + if (("ExecuteAction" == childName)) + { + childValue = new ExecuteAction(); + } + if (("InstallValidate" == childName)) + { + childValue = new InstallValidate(); + } + if (("InstallInitialize" == childName)) + { + childValue = new InstallInitialize(); + } + if (("InstallAdminPackage" == childName)) + { + childValue = new InstallAdminPackage(); + } + if (("InstallFiles" == childName)) + { + childValue = new InstallFiles(); + } + if (("InstallFinalize" == childName)) + { + childValue = new InstallFinalize(); + } + if (("LaunchConditions" == childName)) + { + childValue = new LaunchConditions(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("AdminUISequence", "http://wixtoolset.org/schemas/v4/wxs"); + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class AdminExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private ISchemaElement parentElement; + + public AdminExecuteSequence() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallAdminPackage))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFiles))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Custom" == childName)) + { + childValue = new Custom(); + } + if (("CostInitialize" == childName)) + { + childValue = new CostInitialize(); + } + if (("FileCost" == childName)) + { + childValue = new FileCost(); + } + if (("CostFinalize" == childName)) + { + childValue = new CostFinalize(); + } + if (("InstallValidate" == childName)) + { + childValue = new InstallValidate(); + } + if (("InstallInitialize" == childName)) + { + childValue = new InstallInitialize(); + } + if (("InstallAdminPackage" == childName)) + { + childValue = new InstallAdminPackage(); + } + if (("InstallFiles" == childName)) + { + childValue = new InstallFiles(); + } + if (("PatchFiles" == childName)) + { + childValue = new PatchFiles(); + } + if (("InstallFinalize" == childName)) + { + childValue = new InstallFinalize(); + } + if (("LaunchConditions" == childName)) + { + childValue = new LaunchConditions(); + } + if (("ResolveSource" == childName)) + { + childValue = new ResolveSource(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("AdminExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs"); + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class AdvertiseExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private ISchemaElement parentElement; + + public AdvertiseExecuteSequence() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateShortcuts))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterClassInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterExtensionInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterMIMEInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProgIdInfo))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishComponents))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishFeatures))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishProduct))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPublishAssemblies))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("CostInitialize" == childName)) + { + childValue = new CostInitialize(); + } + if (("CostFinalize" == childName)) + { + childValue = new CostFinalize(); + } + if (("Custom" == childName)) + { + childValue = new Custom(); + } + if (("InstallValidate" == childName)) + { + childValue = new InstallValidate(); + } + if (("InstallInitialize" == childName)) + { + childValue = new InstallInitialize(); + } + if (("CreateShortcuts" == childName)) + { + childValue = new CreateShortcuts(); + } + if (("RegisterClassInfo" == childName)) + { + childValue = new RegisterClassInfo(); + } + if (("RegisterExtensionInfo" == childName)) + { + childValue = new RegisterExtensionInfo(); + } + if (("RegisterMIMEInfo" == childName)) + { + childValue = new RegisterMIMEInfo(); + } + if (("RegisterProgIdInfo" == childName)) + { + childValue = new RegisterProgIdInfo(); + } + if (("PublishComponents" == childName)) + { + childValue = new PublishComponents(); + } + if (("PublishFeatures" == childName)) + { + childValue = new PublishFeatures(); + } + if (("PublishProduct" == childName)) + { + childValue = new PublishProduct(); + } + if (("InstallFinalize" == childName)) + { + childValue = new InstallFinalize(); + } + if (("MsiPublishAssemblies" == childName)) + { + childValue = new MsiPublishAssemblies(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("AdvertiseExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs"); + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + } + } + + /// + /// Binary data used for CustomAction elements and UI controls. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Binary : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string srcField; + + private bool srcFieldSet; + + private YesNoType suppressModularizationField; + + private bool suppressModularizationFieldSet; + + private ISchemaElement parentElement; + + public Binary() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// 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. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Path to the binary file. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string src + { + get + { + return this.srcField; + } + set + { + this.srcFieldSet = true; + this.srcField = value; + } + } + + /// + /// Use to suppress modularization of this Binary identifier in merge modules. + /// + public YesNoType SuppressModularization + { + get + { + return this.suppressModularizationField; + } + set + { + this.suppressModularizationFieldSet = true; + this.suppressModularizationField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Binary", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.srcFieldSet) + { + writer.WriteAttributeString("src", this.srcField); + } + if (this.suppressModularizationFieldSet) + { + if ((this.suppressModularizationField == YesNoType.no)) + { + writer.WriteAttributeString("SuppressModularization", "no"); + } + if ((this.suppressModularizationField == YesNoType.yes)) + { + writer.WriteAttributeString("SuppressModularization", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("src" == name)) + { + this.srcField = value; + this.srcFieldSet = true; + } + if (("SuppressModularization" == name)) + { + this.suppressModularizationField = Enums.ParseYesNoType(value); + this.suppressModularizationFieldSet = true; + } + } + } + + /// + /// Icon used for Shortcut, ProgId, or Class elements (but not UI controls) + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Icon : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string srcField; + + private bool srcFieldSet; + + private ISchemaElement parentElement; + + /// + /// 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. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Path to the icon file. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string src + { + get + { + return this.srcField; + } + set + { + this.srcFieldSet = true; + this.srcField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Icon", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.srcFieldSet) + { + writer.WriteAttributeString("src", this.srcField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("src" == name)) + { + this.srcField = value; + this.srcFieldSet = true; + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class EmbeddedChainer : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string commandLineField; + + private bool commandLineFieldSet; + + private string binarySourceField; + + private bool binarySourceFieldSet; + + private string fileSourceField; + + private bool fileSourceFieldSet; + + private string propertySourceField; + + private bool propertySourceFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// Unique identifier for embedded chainer. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Value to append to the transaction handle and passed to the chainer executable. + /// + public string CommandLine + { + get + { + return this.commandLineField; + } + set + { + this.commandLineFieldSet = true; + this.commandLineField = value; + } + } + + /// + /// Reference to the Binary element that contains the chainer executable. Mutually exclusive with + /// the FileSource and PropertySource attributes. + /// + public string BinarySource + { + get + { + return this.binarySourceField; + } + set + { + this.binarySourceFieldSet = true; + this.binarySourceField = value; + } + } + + /// + /// Reference to the File element that is the chainer executable. Mutually exclusive with + /// the BinarySource and PropertySource attributes. + /// + public string FileSource + { + get + { + return this.fileSourceField; + } + set + { + this.fileSourceFieldSet = true; + this.fileSourceField = value; + } + } + + /// + /// Reference to a Property that resolves to the full path to the chainer executable. Mutually exclusive with + /// the BinarySource and FileSource attributes. + /// + public string PropertySource + { + get + { + return this.propertySourceField; + } + set + { + this.propertySourceFieldSet = true; + this.propertySourceField = value; + } + } + + /// + /// Element value is the condition. CDATA may be used to when a condition contains many XML characters + /// that must be escaped. It is important to note that each EmbeddedChainer element must have a mutually exclusive condition + /// to ensure that only one embedded chainer will execute at a time. If the conditions are not mutually exclusive the chainer + /// that executes is undeterministic. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("EmbeddedChainer", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.commandLineFieldSet) + { + writer.WriteAttributeString("CommandLine", this.commandLineField); + } + if (this.binarySourceFieldSet) + { + writer.WriteAttributeString("BinarySource", this.binarySourceField); + } + if (this.fileSourceFieldSet) + { + writer.WriteAttributeString("FileSource", this.fileSourceField); + } + if (this.propertySourceFieldSet) + { + writer.WriteAttributeString("PropertySource", this.propertySourceField); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("CommandLine" == name)) + { + this.commandLineField = value; + this.commandLineFieldSet = true; + } + if (("BinarySource" == name)) + { + this.binarySourceField = value; + this.binarySourceFieldSet = true; + } + if (("FileSource" == name)) + { + this.fileSourceField = value; + this.fileSourceFieldSet = true; + } + if (("PropertySource" == name)) + { + this.propertySourceField = value; + this.propertySourceFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + /// + /// Reference to an EmbeddedChainer element. This will force the entire referenced Fragment's contents + /// to be included in the installer database. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class EmbeddedChainerRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("EmbeddedChainerRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Element value is the condition. Use CDATA if message contains delimiter characters. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class EmbeddedUI : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private YesNoType ignoreFatalExitField; + + private bool ignoreFatalExitFieldSet; + + private YesNoType ignoreErrorField; + + private bool ignoreErrorFieldSet; + + private YesNoType ignoreWarningField; + + private bool ignoreWarningFieldSet; + + private YesNoType ignoreUserField; + + private bool ignoreUserFieldSet; + + private YesNoType ignoreInfoField; + + private bool ignoreInfoFieldSet; + + private YesNoType ignoreFilesInUseField; + + private bool ignoreFilesInUseFieldSet; + + private YesNoType ignoreResolveSourceField; + + private bool ignoreResolveSourceFieldSet; + + private YesNoType ignoreOutOfDiskSpaceField; + + private bool ignoreOutOfDiskSpaceFieldSet; + + private YesNoType ignoreActionStartField; + + private bool ignoreActionStartFieldSet; + + private YesNoType ignoreActionDataField; + + private bool ignoreActionDataFieldSet; + + private YesNoType ignoreProgressField; + + private bool ignoreProgressFieldSet; + + private YesNoType ignoreCommonDataField; + + private bool ignoreCommonDataFieldSet; + + private YesNoType ignoreInitializeField; + + private bool ignoreInitializeFieldSet; + + private YesNoType ignoreTerminateField; + + private bool ignoreTerminateFieldSet; + + private YesNoType ignoreShowDialogField; + + private bool ignoreShowDialogFieldSet; + + private YesNoType ignoreRMFilesInUseField; + + private bool ignoreRMFilesInUseFieldSet; + + private YesNoType ignoreInstallStartField; + + private bool ignoreInstallStartFieldSet; + + private YesNoType ignoreInstallEndField; + + private bool ignoreInstallEndFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private YesNoType supportBasicUIField; + + private bool supportBasicUIFieldSet; + + private ISchemaElement parentElement; + + public EmbeddedUI() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(EmbeddedUIResource))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Unique identifier for embedded UI.If this attribute is not specified the Name attribute or the file name + /// portion of the SourceFile attribute will be used. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_FATALEXIT messages. + /// + public YesNoType IgnoreFatalExit + { + get + { + return this.ignoreFatalExitField; + } + set + { + this.ignoreFatalExitFieldSet = true; + this.ignoreFatalExitField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_ERROR messages. + /// + public YesNoType IgnoreError + { + get + { + return this.ignoreErrorField; + } + set + { + this.ignoreErrorFieldSet = true; + this.ignoreErrorField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_WARNING messages. + /// + public YesNoType IgnoreWarning + { + get + { + return this.ignoreWarningField; + } + set + { + this.ignoreWarningFieldSet = true; + this.ignoreWarningField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_USER messages. + /// + public YesNoType IgnoreUser + { + get + { + return this.ignoreUserField; + } + set + { + this.ignoreUserFieldSet = true; + this.ignoreUserField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_INFO messages. + /// + public YesNoType IgnoreInfo + { + get + { + return this.ignoreInfoField; + } + set + { + this.ignoreInfoFieldSet = true; + this.ignoreInfoField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_FILESINUSE messages. + /// + public YesNoType IgnoreFilesInUse + { + get + { + return this.ignoreFilesInUseField; + } + set + { + this.ignoreFilesInUseFieldSet = true; + this.ignoreFilesInUseField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_RESOLVESOURCE messages. + /// + public YesNoType IgnoreResolveSource + { + get + { + return this.ignoreResolveSourceField; + } + set + { + this.ignoreResolveSourceFieldSet = true; + this.ignoreResolveSourceField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_OUTOFDISKSPACE messages. + /// + public YesNoType IgnoreOutOfDiskSpace + { + get + { + return this.ignoreOutOfDiskSpaceField; + } + set + { + this.ignoreOutOfDiskSpaceFieldSet = true; + this.ignoreOutOfDiskSpaceField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_ACTIONSTART messages. + /// + public YesNoType IgnoreActionStart + { + get + { + return this.ignoreActionStartField; + } + set + { + this.ignoreActionStartFieldSet = true; + this.ignoreActionStartField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_ACTIONDATA messages. + /// + public YesNoType IgnoreActionData + { + get + { + return this.ignoreActionDataField; + } + set + { + this.ignoreActionDataFieldSet = true; + this.ignoreActionDataField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_PROGRESS messages. + /// + public YesNoType IgnoreProgress + { + get + { + return this.ignoreProgressField; + } + set + { + this.ignoreProgressFieldSet = true; + this.ignoreProgressField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_COMMONDATA messages. + /// + public YesNoType IgnoreCommonData + { + get + { + return this.ignoreCommonDataField; + } + set + { + this.ignoreCommonDataFieldSet = true; + this.ignoreCommonDataField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_INITIALIZE messages. + /// + public YesNoType IgnoreInitialize + { + get + { + return this.ignoreInitializeField; + } + set + { + this.ignoreInitializeFieldSet = true; + this.ignoreInitializeField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_TERMINATE messages. + /// + public YesNoType IgnoreTerminate + { + get + { + return this.ignoreTerminateField; + } + set + { + this.ignoreTerminateFieldSet = true; + this.ignoreTerminateField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_SHOWDIALOG messages. + /// + public YesNoType IgnoreShowDialog + { + get + { + return this.ignoreShowDialogField; + } + set + { + this.ignoreShowDialogFieldSet = true; + this.ignoreShowDialogField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_RMFILESINUSE messages. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public YesNoType IgnoreRMFilesInUse + { + get + { + return this.ignoreRMFilesInUseField; + } + set + { + this.ignoreRMFilesInUseFieldSet = true; + this.ignoreRMFilesInUseField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_INSTALLSTART messages. + /// + public YesNoType IgnoreInstallStart + { + get + { + return this.ignoreInstallStartField; + } + set + { + this.ignoreInstallStartFieldSet = true; + this.ignoreInstallStartField = value; + } + } + + /// + /// Embedded UI will not recieve any INSTALLLOGMODE_INSTALLEND messages. + /// + public YesNoType IgnoreInstallEnd + { + get + { + return this.ignoreInstallEndField; + } + set + { + this.ignoreInstallEndFieldSet = true; + this.ignoreInstallEndField = value; + } + } + + /// + /// The name for the embedded UI DLL when it is extracted from the package and executed. (Windows Installer + /// does not support the typical short filename and long filename combination for embedded UI files as it + /// does for other kinds of files.) If this attribute is not specified the file name portion of the SourceFile + /// attribute will be used. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Path to the binary file that is the embedded UI. This must be a DLL that exports the following + /// three entry points: InitializeEmbeddedUI, EmbeddedUIHandler and ShutdownEmbeddedUI. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + /// + /// Set yes to allow the Windows Installer to display the embedded UI during basic UI level installation. + /// + public YesNoType SupportBasicUI + { + get + { + return this.supportBasicUIField; + } + set + { + this.supportBasicUIFieldSet = true; + this.supportBasicUIField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("EmbeddedUIResource" == childName)) + { + childValue = new EmbeddedUIResource(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("EmbeddedUI", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.ignoreFatalExitFieldSet) + { + if ((this.ignoreFatalExitField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreFatalExit", "no"); + } + if ((this.ignoreFatalExitField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreFatalExit", "yes"); + } + } + if (this.ignoreErrorFieldSet) + { + if ((this.ignoreErrorField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreError", "no"); + } + if ((this.ignoreErrorField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreError", "yes"); + } + } + if (this.ignoreWarningFieldSet) + { + if ((this.ignoreWarningField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreWarning", "no"); + } + if ((this.ignoreWarningField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreWarning", "yes"); + } + } + if (this.ignoreUserFieldSet) + { + if ((this.ignoreUserField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreUser", "no"); + } + if ((this.ignoreUserField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreUser", "yes"); + } + } + if (this.ignoreInfoFieldSet) + { + if ((this.ignoreInfoField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreInfo", "no"); + } + if ((this.ignoreInfoField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreInfo", "yes"); + } + } + if (this.ignoreFilesInUseFieldSet) + { + if ((this.ignoreFilesInUseField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreFilesInUse", "no"); + } + if ((this.ignoreFilesInUseField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreFilesInUse", "yes"); + } + } + if (this.ignoreResolveSourceFieldSet) + { + if ((this.ignoreResolveSourceField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreResolveSource", "no"); + } + if ((this.ignoreResolveSourceField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreResolveSource", "yes"); + } + } + if (this.ignoreOutOfDiskSpaceFieldSet) + { + if ((this.ignoreOutOfDiskSpaceField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreOutOfDiskSpace", "no"); + } + if ((this.ignoreOutOfDiskSpaceField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreOutOfDiskSpace", "yes"); + } + } + if (this.ignoreActionStartFieldSet) + { + if ((this.ignoreActionStartField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreActionStart", "no"); + } + if ((this.ignoreActionStartField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreActionStart", "yes"); + } + } + if (this.ignoreActionDataFieldSet) + { + if ((this.ignoreActionDataField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreActionData", "no"); + } + if ((this.ignoreActionDataField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreActionData", "yes"); + } + } + if (this.ignoreProgressFieldSet) + { + if ((this.ignoreProgressField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreProgress", "no"); + } + if ((this.ignoreProgressField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreProgress", "yes"); + } + } + if (this.ignoreCommonDataFieldSet) + { + if ((this.ignoreCommonDataField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreCommonData", "no"); + } + if ((this.ignoreCommonDataField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreCommonData", "yes"); + } + } + if (this.ignoreInitializeFieldSet) + { + if ((this.ignoreInitializeField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreInitialize", "no"); + } + if ((this.ignoreInitializeField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreInitialize", "yes"); + } + } + if (this.ignoreTerminateFieldSet) + { + if ((this.ignoreTerminateField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreTerminate", "no"); + } + if ((this.ignoreTerminateField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreTerminate", "yes"); + } + } + if (this.ignoreShowDialogFieldSet) + { + if ((this.ignoreShowDialogField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreShowDialog", "no"); + } + if ((this.ignoreShowDialogField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreShowDialog", "yes"); + } + } + if (this.ignoreRMFilesInUseFieldSet) + { + if ((this.ignoreRMFilesInUseField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreRMFilesInUse", "no"); + } + if ((this.ignoreRMFilesInUseField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreRMFilesInUse", "yes"); + } + } + if (this.ignoreInstallStartFieldSet) + { + if ((this.ignoreInstallStartField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreInstallStart", "no"); + } + if ((this.ignoreInstallStartField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreInstallStart", "yes"); + } + } + if (this.ignoreInstallEndFieldSet) + { + if ((this.ignoreInstallEndField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreInstallEnd", "no"); + } + if ((this.ignoreInstallEndField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreInstallEnd", "yes"); + } + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.supportBasicUIFieldSet) + { + if ((this.supportBasicUIField == YesNoType.no)) + { + writer.WriteAttributeString("SupportBasicUI", "no"); + } + if ((this.supportBasicUIField == YesNoType.yes)) + { + writer.WriteAttributeString("SupportBasicUI", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("IgnoreFatalExit" == name)) + { + this.ignoreFatalExitField = Enums.ParseYesNoType(value); + this.ignoreFatalExitFieldSet = true; + } + if (("IgnoreError" == name)) + { + this.ignoreErrorField = Enums.ParseYesNoType(value); + this.ignoreErrorFieldSet = true; + } + if (("IgnoreWarning" == name)) + { + this.ignoreWarningField = Enums.ParseYesNoType(value); + this.ignoreWarningFieldSet = true; + } + if (("IgnoreUser" == name)) + { + this.ignoreUserField = Enums.ParseYesNoType(value); + this.ignoreUserFieldSet = true; + } + if (("IgnoreInfo" == name)) + { + this.ignoreInfoField = Enums.ParseYesNoType(value); + this.ignoreInfoFieldSet = true; + } + if (("IgnoreFilesInUse" == name)) + { + this.ignoreFilesInUseField = Enums.ParseYesNoType(value); + this.ignoreFilesInUseFieldSet = true; + } + if (("IgnoreResolveSource" == name)) + { + this.ignoreResolveSourceField = Enums.ParseYesNoType(value); + this.ignoreResolveSourceFieldSet = true; + } + if (("IgnoreOutOfDiskSpace" == name)) + { + this.ignoreOutOfDiskSpaceField = Enums.ParseYesNoType(value); + this.ignoreOutOfDiskSpaceFieldSet = true; + } + if (("IgnoreActionStart" == name)) + { + this.ignoreActionStartField = Enums.ParseYesNoType(value); + this.ignoreActionStartFieldSet = true; + } + if (("IgnoreActionData" == name)) + { + this.ignoreActionDataField = Enums.ParseYesNoType(value); + this.ignoreActionDataFieldSet = true; + } + if (("IgnoreProgress" == name)) + { + this.ignoreProgressField = Enums.ParseYesNoType(value); + this.ignoreProgressFieldSet = true; + } + if (("IgnoreCommonData" == name)) + { + this.ignoreCommonDataField = Enums.ParseYesNoType(value); + this.ignoreCommonDataFieldSet = true; + } + if (("IgnoreInitialize" == name)) + { + this.ignoreInitializeField = Enums.ParseYesNoType(value); + this.ignoreInitializeFieldSet = true; + } + if (("IgnoreTerminate" == name)) + { + this.ignoreTerminateField = Enums.ParseYesNoType(value); + this.ignoreTerminateFieldSet = true; + } + if (("IgnoreShowDialog" == name)) + { + this.ignoreShowDialogField = Enums.ParseYesNoType(value); + this.ignoreShowDialogFieldSet = true; + } + if (("IgnoreRMFilesInUse" == name)) + { + this.ignoreRMFilesInUseField = Enums.ParseYesNoType(value); + this.ignoreRMFilesInUseFieldSet = true; + } + if (("IgnoreInstallStart" == name)) + { + this.ignoreInstallStartField = Enums.ParseYesNoType(value); + this.ignoreInstallStartFieldSet = true; + } + if (("IgnoreInstallEnd" == name)) + { + this.ignoreInstallEndField = Enums.ParseYesNoType(value); + this.ignoreInstallEndFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("SupportBasicUI" == name)) + { + this.supportBasicUIField = Enums.ParseYesNoType(value); + this.supportBasicUIFieldSet = true; + } + } + } + + /// + /// Defines a resource for use by the embedded UI. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class EmbeddedUIResource : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string nameField; + + private bool nameFieldSet; + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier for the embedded UI resource. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The name for the resource when it is extracted from the package for use by the embedded UI DLL. (Windows + /// Installer does not support the typical short filename and long filename combination for embedded UI files + /// as it does for other kinds of files.) If this attribute is not specified the Id attribute will be used. + /// + public string Name + { + get + { + return this.nameField; + } + set + { + this.nameFieldSet = true; + this.nameField = value; + } + } + + /// + /// Path to the binary file that is the embedded UI resource. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("EmbeddedUIResource", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.nameFieldSet) + { + writer.WriteAttributeString("Name", this.nameField); + } + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Name" == name)) + { + this.nameField = value; + this.nameFieldSet = true; + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Error : ISchemaElement, ISetAttributes + { + + private int idField; + + private bool idFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// Number of the error for which a message is being provided. See MSI SDK for error definitions. + /// + public int Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Element value is Message, use CDATA if message contains delimiter characters + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Error", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField.ToString(CultureInfo.InvariantCulture)); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.idFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Publish : ISchemaElement, ISetAttributes + { + + private string controlField; + + private bool controlFieldSet; + + private string dialogField; + + private bool dialogFieldSet; + + private string eventField; + + private bool eventFieldSet; + + private string orderField; + + private bool orderFieldSet; + + private string propertyField; + + private bool propertyFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// The parent Control for this Publish element, should only be specified when this element is a child of the UI element. + /// + public string Control + { + get + { + return this.controlField; + } + set + { + this.controlFieldSet = true; + this.controlField = value; + } + } + + /// + /// The parent Dialog for this Publish element, should only be specified when this element is a child of the UI element. + /// This attribute will create a reference to the specified Dialog, so an additional DialogRef is not necessary. + /// + public string Dialog + { + get + { + return this.dialogField; + } + set + { + this.dialogFieldSet = true; + this.dialogField = value; + } + } + + /// + /// Set this attribute's value to one of the standard control events to trigger that event. + /// Either this attribute or the Property attribute must be set, but not both at the same time. + /// + public string Event + { + get + { + return this.eventField; + } + set + { + this.eventFieldSet = true; + this.eventField = value; + } + } + + /// + /// This attribute should only need to be set if this element is nested under a UI element in order to + /// control the order in which this publish event will be started. + /// If this element is nested under a Control element, the default value will be one greater than any + /// previous Publish element's order (the first element's default value is 1). + /// If this element is nested under a UI element, the default value is always 1 (it does not get a + /// default value based on any previous Publish elements). + /// + public string Order + { + get + { + return this.orderField; + } + set + { + this.orderFieldSet = true; + this.orderField = value; + } + } + + /// + /// Set this attribute's value to a property name to set that property. + /// Either this attribute or the Event attribute must be set, but not both at the same time. + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + /// + /// If the Property attribute is specified, set the value of this attribute to the new value for the property. + /// To set a property to null, do not set this attribute (the ControlEvent Argument column will be set to '{}'). + /// Otherwise, this attribute's value should be the argument for the event specified in the Event attribute. + /// If the event doesn't take an attribute, a common value to use is "0". + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// The element value is the optional Condition expression. + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Publish", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.controlFieldSet) + { + writer.WriteAttributeString("Control", this.controlField); + } + if (this.dialogFieldSet) + { + writer.WriteAttributeString("Dialog", this.dialogField); + } + if (this.eventFieldSet) + { + writer.WriteAttributeString("Event", this.eventField); + } + if (this.orderFieldSet) + { + writer.WriteAttributeString("Order", this.orderField); + } + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Control" == name)) + { + this.controlField = value; + this.controlFieldSet = true; + } + if (("Dialog" == name)) + { + this.dialogField = value; + this.dialogFieldSet = true; + } + if (("Event" == name)) + { + this.eventField = value; + this.eventFieldSet = true; + } + if (("Order" == name)) + { + this.orderField = value; + this.orderFieldSet = true; + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + /// + /// Sets attributes for events in the EventMapping table + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Subscribe : ISchemaElement, ISetAttributes + { + + private string eventField; + + private bool eventFieldSet; + + private string attributeField; + + private bool attributeFieldSet; + + private ISchemaElement parentElement; + + /// + /// must be one of the standard control events' + /// + public string Event + { + get + { + return this.eventField; + } + set + { + this.eventFieldSet = true; + this.eventField = value; + } + } + + /// + /// if not present can only handle enable, disable, hide, unhide events + /// + public string Attribute + { + get + { + return this.attributeField; + } + set + { + this.attributeFieldSet = true; + this.attributeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Subscribe", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.eventFieldSet) + { + writer.WriteAttributeString("Event", this.eventField); + } + if (this.attributeFieldSet) + { + writer.WriteAttributeString("Attribute", this.attributeField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Event" == name)) + { + this.eventField = value; + this.eventFieldSet = true; + } + if (("Attribute" == name)) + { + this.attributeField = value; + this.attributeFieldSet = true; + } + } + } + + /// + /// An alternative to using the Text attribute when the value contains special XML characters like <, >, or &. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Text : ISchemaElement, ISetAttributes + { + + private string sourceFileField; + + private bool sourceFileFieldSet; + + private string srcField; + + private bool srcFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// Instructs the text to be imported from a file instead of the element value during the binding process. + /// + public string SourceFile + { + get + { + return this.sourceFileField; + } + set + { + this.sourceFileFieldSet = true; + this.sourceFileField = value; + } + } + + [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] + public string src + { + get + { + return this.srcField; + } + set + { + this.srcFieldSet = true; + this.srcField = value; + } + } + + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Text", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.sourceFileFieldSet) + { + writer.WriteAttributeString("SourceFile", this.sourceFileField); + } + if (this.srcFieldSet) + { + writer.WriteAttributeString("src", this.srcField); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("SourceFile" == name)) + { + this.sourceFileField = value; + this.sourceFileFieldSet = true; + } + if (("src" == name)) + { + this.srcField = value; + this.srcFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + /// + /// Contains the controls that appear on each dialog. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Control : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string typeField; + + private bool typeFieldSet; + + private string xField; + + private bool xFieldSet; + + private string yField; + + private bool yFieldSet; + + private string widthField; + + private bool widthFieldSet; + + private string heightField; + + private bool heightFieldSet; + + private string propertyField; + + private bool propertyFieldSet; + + private string textField; + + private bool textFieldSet; + + private string helpField; + + private bool helpFieldSet; + + private string toolTipField; + + private bool toolTipFieldSet; + + private string checkBoxValueField; + + private bool checkBoxValueFieldSet; + + private string checkBoxPropertyRefField; + + private bool checkBoxPropertyRefFieldSet; + + private YesNoType tabSkipField; + + private bool tabSkipFieldSet; + + private YesNoType defaultField; + + private bool defaultFieldSet; + + private YesNoType cancelField; + + private bool cancelFieldSet; + + private YesNoType hiddenField; + + private bool hiddenFieldSet; + + private YesNoType disabledField; + + private bool disabledFieldSet; + + private YesNoType sunkenField; + + private bool sunkenFieldSet; + + private YesNoType indirectField; + + private bool indirectFieldSet; + + private YesNoType integerField; + + private bool integerFieldSet; + + private YesNoType rightToLeftField; + + private bool rightToLeftFieldSet; + + private YesNoType rightAlignedField; + + private bool rightAlignedFieldSet; + + private YesNoType leftScrollField; + + private bool leftScrollFieldSet; + + private YesNoType transparentField; + + private bool transparentFieldSet; + + private YesNoType noPrefixField; + + private bool noPrefixFieldSet; + + private YesNoType noWrapField; + + private bool noWrapFieldSet; + + private YesNoType formatSizeField; + + private bool formatSizeFieldSet; + + private YesNoType userLanguageField; + + private bool userLanguageFieldSet; + + private YesNoType multilineField; + + private bool multilineFieldSet; + + private YesNoType passwordField; + + private bool passwordFieldSet; + + private YesNoType progressBlocksField; + + private bool progressBlocksFieldSet; + + private YesNoType removableField; + + private bool removableFieldSet; + + private YesNoType fixedField; + + private bool fixedFieldSet; + + private YesNoType remoteField; + + private bool remoteFieldSet; + + private YesNoType cDROMField; + + private bool cDROMFieldSet; + + private YesNoType rAMDiskField; + + private bool rAMDiskFieldSet; + + private YesNoType floppyField; + + private bool floppyFieldSet; + + private YesNoType showRollbackCostField; + + private bool showRollbackCostFieldSet; + + private YesNoType sortedField; + + private bool sortedFieldSet; + + private YesNoType comboListField; + + private bool comboListFieldSet; + + private YesNoType imageField; + + private bool imageFieldSet; + + private IconSizeType iconSizeField; + + private bool iconSizeFieldSet; + + private YesNoType fixedSizeField; + + private bool fixedSizeFieldSet; + + private YesNoType iconField; + + private bool iconFieldSet; + + private YesNoType bitmapField; + + private bool bitmapFieldSet; + + private YesNoType pushLikeField; + + private bool pushLikeFieldSet; + + private YesNoType hasBorderField; + + private bool hasBorderFieldSet; + + private YesNoType elevationShieldField; + + private bool elevationShieldFieldSet; + + private ISchemaElement parentElement; + + public Control() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Text))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ComboBox))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListBox))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListView))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RadioButtonGroup))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Binary))); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Condition))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Publish))); + childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Subscribe))); + childCollection0.AddCollection(childCollection1); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Combined with the Dialog Id to make up the primary key of the Control table. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// 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 + /// + public string Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + /// + /// Horizontal coordinate of the upper-left corner of the rectangular boundary of the control. This must be a non-negative number. + /// + public string X + { + get + { + return this.xField; + } + set + { + this.xFieldSet = true; + this.xField = value; + } + } + + /// + /// Vertical coordinate of the upper-left corner of the rectangular boundary of the control. This must be a non-negative number. + /// + public string Y + { + get + { + return this.yField; + } + set + { + this.yFieldSet = true; + this.yField = value; + } + } + + /// + /// Width of the rectangular boundary of the control. This must be a non-negative number. + /// + public string Width + { + get + { + return this.widthField; + } + set + { + this.widthFieldSet = true; + this.widthField = value; + } + } + + /// + /// Height of the rectangular boundary of the control. This must be a non-negative number. + /// + public string Height + { + get + { + return this.heightField; + } + set + { + this.heightFieldSet = true; + this.heightField = value; + } + } + + /// + /// The name of a defined property to be linked to this control. This column is required for active controls. + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + /// + /// 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 + /// + public string Text + { + get + { + return this.textField; + } + set + { + this.textFieldSet = true; + this.textField = value; + } + } + + /// + /// This attribute is reserved for future use. There is no need to use this until Windows Installer uses it for something. + /// + public string Help + { + get + { + return this.helpField; + } + set + { + this.helpFieldSet = true; + this.helpField = value; + } + } + + /// + /// The string used for the Tooltip. + /// + public string ToolTip + { + get + { + return this.toolTipField; + } + set + { + this.toolTipFieldSet = true; + this.toolTipField = value; + } + } + + /// + /// 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. + /// + public string CheckBoxValue + { + get + { + return this.checkBoxValueField; + } + set + { + this.checkBoxValueFieldSet = true; + this.checkBoxValueField = value; + } + } + + /// + /// 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. + /// + public string CheckBoxPropertyRef + { + get + { + return this.checkBoxPropertyRefField; + } + set + { + this.checkBoxPropertyRefFieldSet = true; + this.checkBoxPropertyRefField = value; + } + } + + /// + /// Set this attribute to "yes" to cause this Control to be skipped in the tab sequence. + /// + public YesNoType TabSkip + { + get + { + return this.tabSkipField; + } + set + { + this.tabSkipFieldSet = true; + this.tabSkipField = value; + } + } + + /// + /// Set this attribute to "yes" to cause this Control to be invoked by the return key. + /// + public YesNoType Default + { + get + { + return this.defaultField; + } + set + { + this.defaultFieldSet = true; + this.defaultField = value; + } + } + + /// + /// Set this attribute to "yes" to cause this Control to be invoked by the escape key. + /// + public YesNoType Cancel + { + get + { + return this.cancelField; + } + set + { + this.cancelFieldSet = true; + this.cancelField = value; + } + } + + /// + /// Set this attribute to "yes" to cause the Control to be hidden. + /// + public YesNoType Hidden + { + get + { + return this.hiddenField; + } + set + { + this.hiddenFieldSet = true; + this.hiddenField = value; + } + } + + /// + /// Set this attribute to "yes" to cause the Control to be disabled. + /// + public YesNoType Disabled + { + get + { + return this.disabledField; + } + set + { + this.disabledFieldSet = true; + this.disabledField = value; + } + } + + /// + /// Set this attribute to "yes" to cause the Control to be sunken. + /// + public YesNoType Sunken + { + get + { + return this.sunkenField; + } + set + { + this.sunkenFieldSet = true; + this.sunkenField = value; + } + } + + /// + /// 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. + /// + public YesNoType Indirect + { + get + { + return this.indirectField; + } + set + { + this.indirectFieldSet = true; + this.indirectField = value; + } + } + + /// + /// 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. + /// + public YesNoType Integer + { + get + { + return this.integerField; + } + set + { + this.integerFieldSet = true; + this.integerField = value; + } + } + + /// + /// Set this attribute to "yes" to cause the Control to display from right to left. + /// + public YesNoType RightToLeft + { + get + { + return this.rightToLeftField; + } + set + { + this.rightToLeftFieldSet = true; + this.rightToLeftField = value; + } + } + + /// + /// Set this attribute to "yes" to cause the Control to be right aligned. + /// + public YesNoType RightAligned + { + get + { + return this.rightAlignedField; + } + set + { + this.rightAlignedFieldSet = true; + this.rightAlignedField = value; + } + } + + /// + /// Set this attribute to "yes" to cause the scroll bar to display on the left side of the Control. + /// + public YesNoType LeftScroll + { + get + { + return this.leftScrollField; + } + set + { + this.leftScrollFieldSet = true; + this.leftScrollField = value; + } + } + + /// + /// This attribute is only valid for Text Controls. + /// + public YesNoType Transparent + { + get + { + return this.transparentField; + } + set + { + this.transparentFieldSet = true; + this.transparentField = value; + } + } + + /// + /// This attribute is only valid for Text Controls. + /// + public YesNoType NoPrefix + { + get + { + return this.noPrefixField; + } + set + { + this.noPrefixFieldSet = true; + this.noPrefixField = value; + } + } + + /// + /// This attribute is only valid for Text Controls. + /// + public YesNoType NoWrap + { + get + { + return this.noWrapField; + } + set + { + this.noWrapFieldSet = true; + this.noWrapField = value; + } + } + + /// + /// This attribute is only valid for Text Controls. + /// + public YesNoType FormatSize + { + get + { + return this.formatSizeField; + } + set + { + this.formatSizeFieldSet = true; + this.formatSizeField = value; + } + } + + /// + /// This attribute is only valid for Text Controls. + /// + public YesNoType UserLanguage + { + get + { + return this.userLanguageField; + } + set + { + this.userLanguageFieldSet = true; + this.userLanguageField = value; + } + } + + /// + /// This attribute is only valid for Edit Controls. + /// + public YesNoType Multiline + { + get + { + return this.multilineField; + } + set + { + this.multilineFieldSet = true; + this.multilineField = value; + } + } + + /// + /// This attribute is only valid for Edit Controls. + /// + public YesNoType Password + { + get + { + return this.passwordField; + } + set + { + this.passwordFieldSet = true; + this.passwordField = value; + } + } + + /// + /// This attribute is only valid for ProgressBar Controls. + /// + public YesNoType ProgressBlocks + { + get + { + return this.progressBlocksField; + } + set + { + this.progressBlocksFieldSet = true; + this.progressBlocksField = value; + } + } + + /// + /// This attribute is only valid for Volume and Directory Controls. + /// + public YesNoType Removable + { + get + { + return this.removableField; + } + set + { + this.removableFieldSet = true; + this.removableField = value; + } + } + + /// + /// This attribute is only valid for Volume and Directory Controls. + /// + public YesNoType Fixed + { + get + { + return this.fixedField; + } + set + { + this.fixedFieldSet = true; + this.fixedField = value; + } + } + + /// + /// This attribute is only valid for Volume and Directory Controls. + /// + public YesNoType Remote + { + get + { + return this.remoteField; + } + set + { + this.remoteFieldSet = true; + this.remoteField = value; + } + } + + /// + /// This attribute is only valid for Volume and Directory Controls. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public YesNoType CDROM + { + get + { + return this.cDROMField; + } + set + { + this.cDROMFieldSet = true; + this.cDROMField = value; + } + } + + /// + /// This attribute is only valid for Volume and Directory Controls. + /// + [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] + public YesNoType RAMDisk + { + get + { + return this.rAMDiskField; + } + set + { + this.rAMDiskFieldSet = true; + this.rAMDiskField = value; + } + } + + /// + /// This attribute is only valid for Volume and Directory Controls. + /// + public YesNoType Floppy + { + get + { + return this.floppyField; + } + set + { + this.floppyFieldSet = true; + this.floppyField = value; + } + } + + /// + /// This attribute is only valid for VolumeCostList Controls. + /// + public YesNoType ShowRollbackCost + { + get + { + return this.showRollbackCostField; + } + set + { + this.showRollbackCostFieldSet = true; + this.showRollbackCostField = value; + } + } + + /// + /// This attribute is only valid for ListBox, ListView, and ComboBox Controls. Set + /// the value of this attribute to "yes" to have entries appear in the order specified under the Control. + /// If the attribute value is "no" or absent the entries in the control will appear in alphabetical order. + /// + public YesNoType Sorted + { + get + { + return this.sortedField; + } + set + { + this.sortedFieldSet = true; + this.sortedField = value; + } + } + + /// + /// This attribute is only valid for ComboBox Controls. + /// + public YesNoType ComboList + { + get + { + return this.comboListField; + } + set + { + this.comboListFieldSet = true; + this.comboListField = value; + } + } + + /// + /// This attribute is only valid for RadioButton, PushButton, and Icon Controls. + /// + public YesNoType Image + { + get + { + return this.imageField; + } + set + { + this.imageFieldSet = true; + this.imageField = value; + } + } + + /// + /// This attribute is only valid for RadioButton, PushButton, and Icon Controls. + /// + public IconSizeType IconSize + { + get + { + return this.iconSizeField; + } + set + { + this.iconSizeFieldSet = true; + this.iconSizeField = value; + } + } + + /// + /// This attribute is only valid for RadioButton, PushButton, and Icon Controls. + /// + public YesNoType FixedSize + { + get + { + return this.fixedSizeField; + } + set + { + this.fixedSizeFieldSet = true; + this.fixedSizeField = value; + } + } + + /// + /// This attribute is only valid for RadioButton and PushButton Controls. + /// + public YesNoType Icon + { + get + { + return this.iconField; + } + set + { + this.iconFieldSet = true; + this.iconField = value; + } + } + + /// + /// This attribute is only valid for RadioButton and PushButton Controls. + /// + public YesNoType Bitmap + { + get + { + return this.bitmapField; + } + set + { + this.bitmapFieldSet = true; + this.bitmapField = value; + } + } + + /// + /// This attribute is only valid for RadioButton and Checkbox Controls. + /// + public YesNoType PushLike + { + get + { + return this.pushLikeField; + } + set + { + this.pushLikeFieldSet = true; + this.pushLikeField = value; + } + } + + /// + /// This attribute is only valid for RadioButton Controls. + /// + public YesNoType HasBorder + { + get + { + return this.hasBorderField; + } + set + { + this.hasBorderFieldSet = true; + this.hasBorderField = value; + } + } + + /// + /// This attribute is only valid for PushButton controls. + /// Set this attribute to "yes" to add the User Account Control (UAC) elevation icon (shield icon) to the PushButton control. + /// If this attribute's value is "yes" and the installation is not yet running with elevated privileges, + /// the pushbutton control is created using the User Account Control (UAC) elevation icon (shield icon). + /// If this attribute's value is "yes" and the installation is already running with elevated privileges, + /// the pushbutton control is created using the other icon attributes. + /// Otherwise, the pushbutton control is created using the other icon attributes. + /// + public YesNoType ElevationShield + { + get + { + return this.elevationShieldField; + } + set + { + this.elevationShieldFieldSet = true; + this.elevationShieldField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Text" == childName)) + { + childValue = new Text(); + } + if (("ComboBox" == childName)) + { + childValue = new ComboBox(); + } + if (("ListBox" == childName)) + { + childValue = new ListBox(); + } + if (("ListView" == childName)) + { + childValue = new ListView(); + } + if (("RadioButtonGroup" == childName)) + { + childValue = new RadioButtonGroup(); + } + if (("Property" == childName)) + { + childValue = new Property(); + } + if (("Binary" == childName)) + { + childValue = new Binary(); + } + if (("Condition" == childName)) + { + childValue = new Condition(); + } + if (("Publish" == childName)) + { + childValue = new Publish(); + } + if (("Subscribe" == childName)) + { + childValue = new Subscribe(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Parses a IconSizeType from a string. + /// + public static IconSizeType ParseIconSizeType(string value) + { + IconSizeType parsedValue; + Control.TryParseIconSizeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a IconSizeType from a string. + /// + public static bool TryParseIconSizeType(string value, out IconSizeType parsedValue) + { + parsedValue = IconSizeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("16" == value)) + { + parsedValue = IconSizeType.Item16; + } + else + { + if (("32" == value)) + { + parsedValue = IconSizeType.Item32; + } + else + { + if (("48" == value)) + { + parsedValue = IconSizeType.Item48; + } + else + { + parsedValue = IconSizeType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Control", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.typeFieldSet) + { + writer.WriteAttributeString("Type", this.typeField); + } + if (this.xFieldSet) + { + writer.WriteAttributeString("X", this.xField); + } + if (this.yFieldSet) + { + writer.WriteAttributeString("Y", this.yField); + } + if (this.widthFieldSet) + { + writer.WriteAttributeString("Width", this.widthField); + } + if (this.heightFieldSet) + { + writer.WriteAttributeString("Height", this.heightField); + } + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + if (this.textFieldSet) + { + writer.WriteAttributeString("Text", this.textField); + } + if (this.helpFieldSet) + { + writer.WriteAttributeString("Help", this.helpField); + } + if (this.toolTipFieldSet) + { + writer.WriteAttributeString("ToolTip", this.toolTipField); + } + if (this.checkBoxValueFieldSet) + { + writer.WriteAttributeString("CheckBoxValue", this.checkBoxValueField); + } + if (this.checkBoxPropertyRefFieldSet) + { + writer.WriteAttributeString("CheckBoxPropertyRef", this.checkBoxPropertyRefField); + } + if (this.tabSkipFieldSet) + { + if ((this.tabSkipField == YesNoType.no)) + { + writer.WriteAttributeString("TabSkip", "no"); + } + if ((this.tabSkipField == YesNoType.yes)) + { + writer.WriteAttributeString("TabSkip", "yes"); + } + } + if (this.defaultFieldSet) + { + if ((this.defaultField == YesNoType.no)) + { + writer.WriteAttributeString("Default", "no"); + } + if ((this.defaultField == YesNoType.yes)) + { + writer.WriteAttributeString("Default", "yes"); + } + } + if (this.cancelFieldSet) + { + if ((this.cancelField == YesNoType.no)) + { + writer.WriteAttributeString("Cancel", "no"); + } + if ((this.cancelField == YesNoType.yes)) + { + writer.WriteAttributeString("Cancel", "yes"); + } + } + if (this.hiddenFieldSet) + { + if ((this.hiddenField == YesNoType.no)) + { + writer.WriteAttributeString("Hidden", "no"); + } + if ((this.hiddenField == YesNoType.yes)) + { + writer.WriteAttributeString("Hidden", "yes"); + } + } + if (this.disabledFieldSet) + { + if ((this.disabledField == YesNoType.no)) + { + writer.WriteAttributeString("Disabled", "no"); + } + if ((this.disabledField == YesNoType.yes)) + { + writer.WriteAttributeString("Disabled", "yes"); + } + } + if (this.sunkenFieldSet) + { + if ((this.sunkenField == YesNoType.no)) + { + writer.WriteAttributeString("Sunken", "no"); + } + if ((this.sunkenField == YesNoType.yes)) + { + writer.WriteAttributeString("Sunken", "yes"); + } + } + if (this.indirectFieldSet) + { + if ((this.indirectField == YesNoType.no)) + { + writer.WriteAttributeString("Indirect", "no"); + } + if ((this.indirectField == YesNoType.yes)) + { + writer.WriteAttributeString("Indirect", "yes"); + } + } + if (this.integerFieldSet) + { + if ((this.integerField == YesNoType.no)) + { + writer.WriteAttributeString("Integer", "no"); + } + if ((this.integerField == YesNoType.yes)) + { + writer.WriteAttributeString("Integer", "yes"); + } + } + if (this.rightToLeftFieldSet) + { + if ((this.rightToLeftField == YesNoType.no)) + { + writer.WriteAttributeString("RightToLeft", "no"); + } + if ((this.rightToLeftField == YesNoType.yes)) + { + writer.WriteAttributeString("RightToLeft", "yes"); + } + } + if (this.rightAlignedFieldSet) + { + if ((this.rightAlignedField == YesNoType.no)) + { + writer.WriteAttributeString("RightAligned", "no"); + } + if ((this.rightAlignedField == YesNoType.yes)) + { + writer.WriteAttributeString("RightAligned", "yes"); + } + } + if (this.leftScrollFieldSet) + { + if ((this.leftScrollField == YesNoType.no)) + { + writer.WriteAttributeString("LeftScroll", "no"); + } + if ((this.leftScrollField == YesNoType.yes)) + { + writer.WriteAttributeString("LeftScroll", "yes"); + } + } + if (this.transparentFieldSet) + { + if ((this.transparentField == YesNoType.no)) + { + writer.WriteAttributeString("Transparent", "no"); + } + if ((this.transparentField == YesNoType.yes)) + { + writer.WriteAttributeString("Transparent", "yes"); + } + } + if (this.noPrefixFieldSet) + { + if ((this.noPrefixField == YesNoType.no)) + { + writer.WriteAttributeString("NoPrefix", "no"); + } + if ((this.noPrefixField == YesNoType.yes)) + { + writer.WriteAttributeString("NoPrefix", "yes"); + } + } + if (this.noWrapFieldSet) + { + if ((this.noWrapField == YesNoType.no)) + { + writer.WriteAttributeString("NoWrap", "no"); + } + if ((this.noWrapField == YesNoType.yes)) + { + writer.WriteAttributeString("NoWrap", "yes"); + } + } + if (this.formatSizeFieldSet) + { + if ((this.formatSizeField == YesNoType.no)) + { + writer.WriteAttributeString("FormatSize", "no"); + } + if ((this.formatSizeField == YesNoType.yes)) + { + writer.WriteAttributeString("FormatSize", "yes"); + } + } + if (this.userLanguageFieldSet) + { + if ((this.userLanguageField == YesNoType.no)) + { + writer.WriteAttributeString("UserLanguage", "no"); + } + if ((this.userLanguageField == YesNoType.yes)) + { + writer.WriteAttributeString("UserLanguage", "yes"); + } + } + if (this.multilineFieldSet) + { + if ((this.multilineField == YesNoType.no)) + { + writer.WriteAttributeString("Multiline", "no"); + } + if ((this.multilineField == YesNoType.yes)) + { + writer.WriteAttributeString("Multiline", "yes"); + } + } + if (this.passwordFieldSet) + { + if ((this.passwordField == YesNoType.no)) + { + writer.WriteAttributeString("Password", "no"); + } + if ((this.passwordField == YesNoType.yes)) + { + writer.WriteAttributeString("Password", "yes"); + } + } + if (this.progressBlocksFieldSet) + { + if ((this.progressBlocksField == YesNoType.no)) + { + writer.WriteAttributeString("ProgressBlocks", "no"); + } + if ((this.progressBlocksField == YesNoType.yes)) + { + writer.WriteAttributeString("ProgressBlocks", "yes"); + } + } + if (this.removableFieldSet) + { + if ((this.removableField == YesNoType.no)) + { + writer.WriteAttributeString("Removable", "no"); + } + if ((this.removableField == YesNoType.yes)) + { + writer.WriteAttributeString("Removable", "yes"); + } + } + if (this.fixedFieldSet) + { + if ((this.fixedField == YesNoType.no)) + { + writer.WriteAttributeString("Fixed", "no"); + } + if ((this.fixedField == YesNoType.yes)) + { + writer.WriteAttributeString("Fixed", "yes"); + } + } + if (this.remoteFieldSet) + { + if ((this.remoteField == YesNoType.no)) + { + writer.WriteAttributeString("Remote", "no"); + } + if ((this.remoteField == YesNoType.yes)) + { + writer.WriteAttributeString("Remote", "yes"); + } + } + if (this.cDROMFieldSet) + { + if ((this.cDROMField == YesNoType.no)) + { + writer.WriteAttributeString("CDROM", "no"); + } + if ((this.cDROMField == YesNoType.yes)) + { + writer.WriteAttributeString("CDROM", "yes"); + } + } + if (this.rAMDiskFieldSet) + { + if ((this.rAMDiskField == YesNoType.no)) + { + writer.WriteAttributeString("RAMDisk", "no"); + } + if ((this.rAMDiskField == YesNoType.yes)) + { + writer.WriteAttributeString("RAMDisk", "yes"); + } + } + if (this.floppyFieldSet) + { + if ((this.floppyField == YesNoType.no)) + { + writer.WriteAttributeString("Floppy", "no"); + } + if ((this.floppyField == YesNoType.yes)) + { + writer.WriteAttributeString("Floppy", "yes"); + } + } + if (this.showRollbackCostFieldSet) + { + if ((this.showRollbackCostField == YesNoType.no)) + { + writer.WriteAttributeString("ShowRollbackCost", "no"); + } + if ((this.showRollbackCostField == YesNoType.yes)) + { + writer.WriteAttributeString("ShowRollbackCost", "yes"); + } + } + if (this.sortedFieldSet) + { + if ((this.sortedField == YesNoType.no)) + { + writer.WriteAttributeString("Sorted", "no"); + } + if ((this.sortedField == YesNoType.yes)) + { + writer.WriteAttributeString("Sorted", "yes"); + } + } + if (this.comboListFieldSet) + { + if ((this.comboListField == YesNoType.no)) + { + writer.WriteAttributeString("ComboList", "no"); + } + if ((this.comboListField == YesNoType.yes)) + { + writer.WriteAttributeString("ComboList", "yes"); + } + } + if (this.imageFieldSet) + { + if ((this.imageField == YesNoType.no)) + { + writer.WriteAttributeString("Image", "no"); + } + if ((this.imageField == YesNoType.yes)) + { + writer.WriteAttributeString("Image", "yes"); + } + } + if (this.iconSizeFieldSet) + { + if ((this.iconSizeField == IconSizeType.Item16)) + { + writer.WriteAttributeString("IconSize", "16"); + } + if ((this.iconSizeField == IconSizeType.Item32)) + { + writer.WriteAttributeString("IconSize", "32"); + } + if ((this.iconSizeField == IconSizeType.Item48)) + { + writer.WriteAttributeString("IconSize", "48"); + } + } + if (this.fixedSizeFieldSet) + { + if ((this.fixedSizeField == YesNoType.no)) + { + writer.WriteAttributeString("FixedSize", "no"); + } + if ((this.fixedSizeField == YesNoType.yes)) + { + writer.WriteAttributeString("FixedSize", "yes"); + } + } + if (this.iconFieldSet) + { + if ((this.iconField == YesNoType.no)) + { + writer.WriteAttributeString("Icon", "no"); + } + if ((this.iconField == YesNoType.yes)) + { + writer.WriteAttributeString("Icon", "yes"); + } + } + if (this.bitmapFieldSet) + { + if ((this.bitmapField == YesNoType.no)) + { + writer.WriteAttributeString("Bitmap", "no"); + } + if ((this.bitmapField == YesNoType.yes)) + { + writer.WriteAttributeString("Bitmap", "yes"); + } + } + if (this.pushLikeFieldSet) + { + if ((this.pushLikeField == YesNoType.no)) + { + writer.WriteAttributeString("PushLike", "no"); + } + if ((this.pushLikeField == YesNoType.yes)) + { + writer.WriteAttributeString("PushLike", "yes"); + } + } + if (this.hasBorderFieldSet) + { + if ((this.hasBorderField == YesNoType.no)) + { + writer.WriteAttributeString("HasBorder", "no"); + } + if ((this.hasBorderField == YesNoType.yes)) + { + writer.WriteAttributeString("HasBorder", "yes"); + } + } + if (this.elevationShieldFieldSet) + { + if ((this.elevationShieldField == YesNoType.no)) + { + writer.WriteAttributeString("ElevationShield", "no"); + } + if ((this.elevationShieldField == YesNoType.yes)) + { + writer.WriteAttributeString("ElevationShield", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = value; + this.typeFieldSet = true; + } + if (("X" == name)) + { + this.xField = value; + this.xFieldSet = true; + } + if (("Y" == name)) + { + this.yField = value; + this.yFieldSet = true; + } + if (("Width" == name)) + { + this.widthField = value; + this.widthFieldSet = true; + } + if (("Height" == name)) + { + this.heightField = value; + this.heightFieldSet = true; + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + if (("Text" == name)) + { + this.textField = value; + this.textFieldSet = true; + } + if (("Help" == name)) + { + this.helpField = value; + this.helpFieldSet = true; + } + if (("ToolTip" == name)) + { + this.toolTipField = value; + this.toolTipFieldSet = true; + } + if (("CheckBoxValue" == name)) + { + this.checkBoxValueField = value; + this.checkBoxValueFieldSet = true; + } + if (("CheckBoxPropertyRef" == name)) + { + this.checkBoxPropertyRefField = value; + this.checkBoxPropertyRefFieldSet = true; + } + if (("TabSkip" == name)) + { + this.tabSkipField = Enums.ParseYesNoType(value); + this.tabSkipFieldSet = true; + } + if (("Default" == name)) + { + this.defaultField = Enums.ParseYesNoType(value); + this.defaultFieldSet = true; + } + if (("Cancel" == name)) + { + this.cancelField = Enums.ParseYesNoType(value); + this.cancelFieldSet = true; + } + if (("Hidden" == name)) + { + this.hiddenField = Enums.ParseYesNoType(value); + this.hiddenFieldSet = true; + } + if (("Disabled" == name)) + { + this.disabledField = Enums.ParseYesNoType(value); + this.disabledFieldSet = true; + } + if (("Sunken" == name)) + { + this.sunkenField = Enums.ParseYesNoType(value); + this.sunkenFieldSet = true; + } + if (("Indirect" == name)) + { + this.indirectField = Enums.ParseYesNoType(value); + this.indirectFieldSet = true; + } + if (("Integer" == name)) + { + this.integerField = Enums.ParseYesNoType(value); + this.integerFieldSet = true; + } + if (("RightToLeft" == name)) + { + this.rightToLeftField = Enums.ParseYesNoType(value); + this.rightToLeftFieldSet = true; + } + if (("RightAligned" == name)) + { + this.rightAlignedField = Enums.ParseYesNoType(value); + this.rightAlignedFieldSet = true; + } + if (("LeftScroll" == name)) + { + this.leftScrollField = Enums.ParseYesNoType(value); + this.leftScrollFieldSet = true; + } + if (("Transparent" == name)) + { + this.transparentField = Enums.ParseYesNoType(value); + this.transparentFieldSet = true; + } + if (("NoPrefix" == name)) + { + this.noPrefixField = Enums.ParseYesNoType(value); + this.noPrefixFieldSet = true; + } + if (("NoWrap" == name)) + { + this.noWrapField = Enums.ParseYesNoType(value); + this.noWrapFieldSet = true; + } + if (("FormatSize" == name)) + { + this.formatSizeField = Enums.ParseYesNoType(value); + this.formatSizeFieldSet = true; + } + if (("UserLanguage" == name)) + { + this.userLanguageField = Enums.ParseYesNoType(value); + this.userLanguageFieldSet = true; + } + if (("Multiline" == name)) + { + this.multilineField = Enums.ParseYesNoType(value); + this.multilineFieldSet = true; + } + if (("Password" == name)) + { + this.passwordField = Enums.ParseYesNoType(value); + this.passwordFieldSet = true; + } + if (("ProgressBlocks" == name)) + { + this.progressBlocksField = Enums.ParseYesNoType(value); + this.progressBlocksFieldSet = true; + } + if (("Removable" == name)) + { + this.removableField = Enums.ParseYesNoType(value); + this.removableFieldSet = true; + } + if (("Fixed" == name)) + { + this.fixedField = Enums.ParseYesNoType(value); + this.fixedFieldSet = true; + } + if (("Remote" == name)) + { + this.remoteField = Enums.ParseYesNoType(value); + this.remoteFieldSet = true; + } + if (("CDROM" == name)) + { + this.cDROMField = Enums.ParseYesNoType(value); + this.cDROMFieldSet = true; + } + if (("RAMDisk" == name)) + { + this.rAMDiskField = Enums.ParseYesNoType(value); + this.rAMDiskFieldSet = true; + } + if (("Floppy" == name)) + { + this.floppyField = Enums.ParseYesNoType(value); + this.floppyFieldSet = true; + } + if (("ShowRollbackCost" == name)) + { + this.showRollbackCostField = Enums.ParseYesNoType(value); + this.showRollbackCostFieldSet = true; + } + if (("Sorted" == name)) + { + this.sortedField = Enums.ParseYesNoType(value); + this.sortedFieldSet = true; + } + if (("ComboList" == name)) + { + this.comboListField = Enums.ParseYesNoType(value); + this.comboListFieldSet = true; + } + if (("Image" == name)) + { + this.imageField = Enums.ParseYesNoType(value); + this.imageFieldSet = true; + } + if (("IconSize" == name)) + { + this.iconSizeField = Control.ParseIconSizeType(value); + this.iconSizeFieldSet = true; + } + if (("FixedSize" == name)) + { + this.fixedSizeField = Enums.ParseYesNoType(value); + this.fixedSizeFieldSet = true; + } + if (("Icon" == name)) + { + this.iconField = Enums.ParseYesNoType(value); + this.iconFieldSet = true; + } + if (("Bitmap" == name)) + { + this.bitmapField = Enums.ParseYesNoType(value); + this.bitmapFieldSet = true; + } + if (("PushLike" == name)) + { + this.pushLikeField = Enums.ParseYesNoType(value); + this.pushLikeFieldSet = true; + } + if (("HasBorder" == name)) + { + this.hasBorderField = Enums.ParseYesNoType(value); + this.hasBorderFieldSet = true; + } + if (("ElevationShield" == name)) + { + this.elevationShieldField = Enums.ParseYesNoType(value); + this.elevationShieldFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum IconSizeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + Item16, + + Item32, + + Item48, + } + } + + /// + /// Billboard to display during install of a Feature + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Billboard : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private string featureField; + + private bool featureFieldSet; + + private ISchemaElement parentElement; + + public Billboard() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Control))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Unique identifier for the Billboard. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Feature whose state determines if the Billboard is shown. + /// + public string Feature + { + get + { + return this.featureField; + } + set + { + this.featureFieldSet = true; + this.featureField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Control" == childName)) + { + childValue = new Control(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Billboard", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.featureFieldSet) + { + writer.WriteAttributeString("Feature", this.featureField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Feature" == name)) + { + this.featureField = value; + this.featureFieldSet = true; + } + } + } + + /// + /// Billboard action during which child Billboards are displayed + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class BillboardAction : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public BillboardAction() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Billboard))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Action name that determines when the Billboard should be shown. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Billboard" == childName)) + { + childValue = new Billboard(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("BillboardAction", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Defines a dialog box in the Dialog Table. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Dialog : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private int xField; + + private bool xFieldSet; + + private int yField; + + private bool yFieldSet; + + private int widthField; + + private bool widthFieldSet; + + private int heightField; + + private bool heightFieldSet; + + private string titleField; + + private bool titleFieldSet; + + private YesNoType hiddenField; + + private bool hiddenFieldSet; + + private YesNoType modelessField; + + private bool modelessFieldSet; + + private YesNoType noMinimizeField; + + private bool noMinimizeFieldSet; + + private YesNoType systemModalField; + + private bool systemModalFieldSet; + + private YesNoType keepModelessField; + + private bool keepModelessFieldSet; + + private YesNoType trackDiskSpaceField; + + private bool trackDiskSpaceFieldSet; + + private YesNoType customPaletteField; + + private bool customPaletteFieldSet; + + private YesNoType rightToLeftField; + + private bool rightToLeftFieldSet; + + private YesNoType rightAlignedField; + + private bool rightAlignedFieldSet; + + private YesNoType leftScrollField; + + private bool leftScrollFieldSet; + + private YesNoType errorDialogField; + + private bool errorDialogFieldSet; + + private ISchemaElement parentElement; + + public Dialog() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Control))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Unique identifier for the dialog. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Horizontal placement of the dialog box as a percentage of screen width. The default value is 50. + /// + public int X + { + get + { + return this.xField; + } + set + { + this.xFieldSet = true; + this.xField = value; + } + } + + /// + /// Vertical placement of the dialog box as a percentage of screen height. The default value is 50. + /// + public int Y + { + get + { + return this.yField; + } + set + { + this.yFieldSet = true; + this.yField = value; + } + } + + /// + /// The width of the dialog box in dialog units. + /// + public int Width + { + get + { + return this.widthField; + } + set + { + this.widthFieldSet = true; + this.widthField = value; + } + } + + /// + /// The height of the dialog box in dialog units. + /// + public int Height + { + get + { + return this.heightField; + } + set + { + this.heightFieldSet = true; + this.heightField = value; + } + } + + /// + /// The title of the dialog box. + /// + public string Title + { + get + { + return this.titleField; + } + set + { + this.titleFieldSet = true; + this.titleField = value; + } + } + + /// + /// Used to hide the dialog. + /// + public YesNoType Hidden + { + get + { + return this.hiddenField; + } + set + { + this.hiddenFieldSet = true; + this.hiddenField = value; + } + } + + /// + /// Used to set the dialog as modeless. + /// + public YesNoType Modeless + { + get + { + return this.modelessField; + } + set + { + this.modelessFieldSet = true; + this.modelessField = value; + } + } + + /// + /// Used to specify if the dialog can be minimized. + /// + public YesNoType NoMinimize + { + get + { + return this.noMinimizeField; + } + set + { + this.noMinimizeFieldSet = true; + this.noMinimizeField = value; + } + } + + /// + /// Used to set the dialog as system modal. + /// + public YesNoType SystemModal + { + get + { + return this.systemModalField; + } + set + { + this.systemModalFieldSet = true; + this.systemModalField = value; + } + } + + /// + /// Keep modeless dialogs alive when this dialog is created through DoAction. + /// + public YesNoType KeepModeless + { + get + { + return this.keepModelessField; + } + set + { + this.keepModelessFieldSet = true; + this.keepModelessField = value; + } + } + + /// + /// Have the dialog periodically call the installer to check if available disk space has changed. + /// + public YesNoType TrackDiskSpace + { + get + { + return this.trackDiskSpaceField; + } + set + { + this.trackDiskSpaceFieldSet = true; + this.trackDiskSpaceField = value; + } + } + + /// + /// Used to specify if pictures in the dialog box are rendered with a custom palette. + /// + public YesNoType CustomPalette + { + get + { + return this.customPaletteField; + } + set + { + this.customPaletteFieldSet = true; + this.customPaletteField = value; + } + } + + /// + /// Used to specify if the text in the dialog should be displayed in right to left reading order. + /// + public YesNoType RightToLeft + { + get + { + return this.rightToLeftField; + } + set + { + this.rightToLeftFieldSet = true; + this.rightToLeftField = value; + } + } + + /// + /// Align text on the right. + /// + public YesNoType RightAligned + { + get + { + return this.rightAlignedField; + } + set + { + this.rightAlignedFieldSet = true; + this.rightAlignedField = value; + } + } + + /// + /// Used to align the scroll bar on the left. + /// + public YesNoType LeftScroll + { + get + { + return this.leftScrollField; + } + set + { + this.leftScrollFieldSet = true; + this.leftScrollField = value; + } + } + + /// + /// Specifies this dialog as an error dialog. + /// + public YesNoType ErrorDialog + { + get + { + return this.errorDialogField; + } + set + { + this.errorDialogFieldSet = true; + this.errorDialogField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Control" == childName)) + { + childValue = new Control(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Dialog", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.xFieldSet) + { + writer.WriteAttributeString("X", this.xField.ToString(CultureInfo.InvariantCulture)); + } + if (this.yFieldSet) + { + writer.WriteAttributeString("Y", this.yField.ToString(CultureInfo.InvariantCulture)); + } + if (this.widthFieldSet) + { + writer.WriteAttributeString("Width", this.widthField.ToString(CultureInfo.InvariantCulture)); + } + if (this.heightFieldSet) + { + writer.WriteAttributeString("Height", this.heightField.ToString(CultureInfo.InvariantCulture)); + } + if (this.titleFieldSet) + { + writer.WriteAttributeString("Title", this.titleField); + } + if (this.hiddenFieldSet) + { + if ((this.hiddenField == YesNoType.no)) + { + writer.WriteAttributeString("Hidden", "no"); + } + if ((this.hiddenField == YesNoType.yes)) + { + writer.WriteAttributeString("Hidden", "yes"); + } + } + if (this.modelessFieldSet) + { + if ((this.modelessField == YesNoType.no)) + { + writer.WriteAttributeString("Modeless", "no"); + } + if ((this.modelessField == YesNoType.yes)) + { + writer.WriteAttributeString("Modeless", "yes"); + } + } + if (this.noMinimizeFieldSet) + { + if ((this.noMinimizeField == YesNoType.no)) + { + writer.WriteAttributeString("NoMinimize", "no"); + } + if ((this.noMinimizeField == YesNoType.yes)) + { + writer.WriteAttributeString("NoMinimize", "yes"); + } + } + if (this.systemModalFieldSet) + { + if ((this.systemModalField == YesNoType.no)) + { + writer.WriteAttributeString("SystemModal", "no"); + } + if ((this.systemModalField == YesNoType.yes)) + { + writer.WriteAttributeString("SystemModal", "yes"); + } + } + if (this.keepModelessFieldSet) + { + if ((this.keepModelessField == YesNoType.no)) + { + writer.WriteAttributeString("KeepModeless", "no"); + } + if ((this.keepModelessField == YesNoType.yes)) + { + writer.WriteAttributeString("KeepModeless", "yes"); + } + } + if (this.trackDiskSpaceFieldSet) + { + if ((this.trackDiskSpaceField == YesNoType.no)) + { + writer.WriteAttributeString("TrackDiskSpace", "no"); + } + if ((this.trackDiskSpaceField == YesNoType.yes)) + { + writer.WriteAttributeString("TrackDiskSpace", "yes"); + } + } + if (this.customPaletteFieldSet) + { + if ((this.customPaletteField == YesNoType.no)) + { + writer.WriteAttributeString("CustomPalette", "no"); + } + if ((this.customPaletteField == YesNoType.yes)) + { + writer.WriteAttributeString("CustomPalette", "yes"); + } + } + if (this.rightToLeftFieldSet) + { + if ((this.rightToLeftField == YesNoType.no)) + { + writer.WriteAttributeString("RightToLeft", "no"); + } + if ((this.rightToLeftField == YesNoType.yes)) + { + writer.WriteAttributeString("RightToLeft", "yes"); + } + } + if (this.rightAlignedFieldSet) + { + if ((this.rightAlignedField == YesNoType.no)) + { + writer.WriteAttributeString("RightAligned", "no"); + } + if ((this.rightAlignedField == YesNoType.yes)) + { + writer.WriteAttributeString("RightAligned", "yes"); + } + } + if (this.leftScrollFieldSet) + { + if ((this.leftScrollField == YesNoType.no)) + { + writer.WriteAttributeString("LeftScroll", "no"); + } + if ((this.leftScrollField == YesNoType.yes)) + { + writer.WriteAttributeString("LeftScroll", "yes"); + } + } + if (this.errorDialogFieldSet) + { + if ((this.errorDialogField == YesNoType.no)) + { + writer.WriteAttributeString("ErrorDialog", "no"); + } + if ((this.errorDialogField == YesNoType.yes)) + { + writer.WriteAttributeString("ErrorDialog", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("X" == name)) + { + this.xField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.xFieldSet = true; + } + if (("Y" == name)) + { + this.yField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.yFieldSet = true; + } + if (("Width" == name)) + { + this.widthField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.widthFieldSet = true; + } + if (("Height" == name)) + { + this.heightField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.heightFieldSet = true; + } + if (("Title" == name)) + { + this.titleField = value; + this.titleFieldSet = true; + } + if (("Hidden" == name)) + { + this.hiddenField = Enums.ParseYesNoType(value); + this.hiddenFieldSet = true; + } + if (("Modeless" == name)) + { + this.modelessField = Enums.ParseYesNoType(value); + this.modelessFieldSet = true; + } + if (("NoMinimize" == name)) + { + this.noMinimizeField = Enums.ParseYesNoType(value); + this.noMinimizeFieldSet = true; + } + if (("SystemModal" == name)) + { + this.systemModalField = Enums.ParseYesNoType(value); + this.systemModalFieldSet = true; + } + if (("KeepModeless" == name)) + { + this.keepModelessField = Enums.ParseYesNoType(value); + this.keepModelessFieldSet = true; + } + if (("TrackDiskSpace" == name)) + { + this.trackDiskSpaceField = Enums.ParseYesNoType(value); + this.trackDiskSpaceFieldSet = true; + } + if (("CustomPalette" == name)) + { + this.customPaletteField = Enums.ParseYesNoType(value); + this.customPaletteFieldSet = true; + } + if (("RightToLeft" == name)) + { + this.rightToLeftField = Enums.ParseYesNoType(value); + this.rightToLeftFieldSet = true; + } + if (("RightAligned" == name)) + { + this.rightAlignedField = Enums.ParseYesNoType(value); + this.rightAlignedFieldSet = true; + } + if (("LeftScroll" == name)) + { + this.leftScrollField = Enums.ParseYesNoType(value); + this.leftScrollFieldSet = true; + } + if (("ErrorDialog" == name)) + { + this.errorDialogField = Enums.ParseYesNoType(value); + this.errorDialogFieldSet = true; + } + } + } + + /// + /// Reference to a Dialog. This will cause the entire referenced section's contents + /// to be included in the installer database. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class DialogRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identifier of the Dialog to reference. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("DialogRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ProgressText : ISchemaElement, ISetAttributes + { + + private string actionField; + + private bool actionFieldSet; + + private string templateField; + + private bool templateFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + public string Action + { + get + { + return this.actionField; + } + set + { + this.actionFieldSet = true; + this.actionField = value; + } + } + + /// + /// used to format ActionData messages from action processing + /// + public string Template + { + get + { + return this.templateField; + } + set + { + this.templateFieldSet = true; + this.templateField = value; + } + } + + /// + /// Element value is progress message text for action + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ProgressText", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.actionFieldSet) + { + writer.WriteAttributeString("Action", this.actionField); + } + if (this.templateFieldSet) + { + writer.WriteAttributeString("Template", this.templateField); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Action" == name)) + { + this.actionField = value; + this.actionFieldSet = true; + } + if (("Template" == name)) + { + this.templateField = value; + this.templateFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class TextStyle : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string faceNameField; + + private bool faceNameFieldSet; + + private string sizeField; + + private bool sizeFieldSet; + + private int redField; + + private bool redFieldSet; + + private int greenField; + + private bool greenFieldSet; + + private int blueField; + + private bool blueFieldSet; + + private YesNoType boldField; + + private bool boldFieldSet; + + private YesNoType italicField; + + private bool italicFieldSet; + + private YesNoType underlineField; + + private bool underlineFieldSet; + + private YesNoType strikeField; + + private bool strikeFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public string FaceName + { + get + { + return this.faceNameField; + } + set + { + this.faceNameFieldSet = true; + this.faceNameField = value; + } + } + + public string Size + { + get + { + return this.sizeField; + } + set + { + this.sizeFieldSet = true; + this.sizeField = value; + } + } + + /// + /// 0 to 255 + /// + public int Red + { + get + { + return this.redField; + } + set + { + this.redFieldSet = true; + this.redField = value; + } + } + + /// + /// 0 to 255 + /// + public int Green + { + get + { + return this.greenField; + } + set + { + this.greenFieldSet = true; + this.greenField = value; + } + } + + /// + /// 0 to 255 + /// + public int Blue + { + get + { + return this.blueField; + } + set + { + this.blueFieldSet = true; + this.blueField = value; + } + } + + public YesNoType Bold + { + get + { + return this.boldField; + } + set + { + this.boldFieldSet = true; + this.boldField = value; + } + } + + public YesNoType Italic + { + get + { + return this.italicField; + } + set + { + this.italicFieldSet = true; + this.italicField = value; + } + } + + public YesNoType Underline + { + get + { + return this.underlineField; + } + set + { + this.underlineFieldSet = true; + this.underlineField = value; + } + } + + public YesNoType Strike + { + get + { + return this.strikeField; + } + set + { + this.strikeFieldSet = true; + this.strikeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("TextStyle", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.faceNameFieldSet) + { + writer.WriteAttributeString("FaceName", this.faceNameField); + } + if (this.sizeFieldSet) + { + writer.WriteAttributeString("Size", this.sizeField); + } + if (this.redFieldSet) + { + writer.WriteAttributeString("Red", this.redField.ToString(CultureInfo.InvariantCulture)); + } + if (this.greenFieldSet) + { + writer.WriteAttributeString("Green", this.greenField.ToString(CultureInfo.InvariantCulture)); + } + if (this.blueFieldSet) + { + writer.WriteAttributeString("Blue", this.blueField.ToString(CultureInfo.InvariantCulture)); + } + if (this.boldFieldSet) + { + if ((this.boldField == YesNoType.no)) + { + writer.WriteAttributeString("Bold", "no"); + } + if ((this.boldField == YesNoType.yes)) + { + writer.WriteAttributeString("Bold", "yes"); + } + } + if (this.italicFieldSet) + { + if ((this.italicField == YesNoType.no)) + { + writer.WriteAttributeString("Italic", "no"); + } + if ((this.italicField == YesNoType.yes)) + { + writer.WriteAttributeString("Italic", "yes"); + } + } + if (this.underlineFieldSet) + { + if ((this.underlineField == YesNoType.no)) + { + writer.WriteAttributeString("Underline", "no"); + } + if ((this.underlineField == YesNoType.yes)) + { + writer.WriteAttributeString("Underline", "yes"); + } + } + if (this.strikeFieldSet) + { + if ((this.strikeField == YesNoType.no)) + { + writer.WriteAttributeString("Strike", "no"); + } + if ((this.strikeField == YesNoType.yes)) + { + writer.WriteAttributeString("Strike", "yes"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("FaceName" == name)) + { + this.faceNameField = value; + this.faceNameFieldSet = true; + } + if (("Size" == name)) + { + this.sizeField = value; + this.sizeFieldSet = true; + } + if (("Red" == name)) + { + this.redField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.redFieldSet = true; + } + if (("Green" == name)) + { + this.greenField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.greenFieldSet = true; + } + if (("Blue" == name)) + { + this.blueField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.blueFieldSet = true; + } + if (("Bold" == name)) + { + this.boldField = Enums.ParseYesNoType(value); + this.boldFieldSet = true; + } + if (("Italic" == name)) + { + this.italicField = Enums.ParseYesNoType(value); + this.italicFieldSet = true; + } + if (("Underline" == name)) + { + this.underlineField = Enums.ParseYesNoType(value); + this.underlineFieldSet = true; + } + if (("Strike" == name)) + { + this.strikeField = Enums.ParseYesNoType(value); + this.strikeFieldSet = true; + } + } + } + + /// + /// The value (and optional text) associated with an item in a ComboBox, ListBox, or ListView. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ListItem : ISchemaElement, ISetAttributes + { + + private string valueField; + + private bool valueFieldSet; + + private string textField; + + private bool textFieldSet; + + private string iconField; + + private bool iconFieldSet; + + private ISchemaElement parentElement; + + /// + /// The value assigned to the associated ComboBox, ListBox, or ListView property if this item is selected. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + /// + /// The localizable, visible text to be assigned to the item. + /// If not specified, this will default to the value of the Value attribute. + /// + public string Text + { + get + { + return this.textField; + } + set + { + this.textFieldSet = true; + this.textField = value; + } + } + + /// + /// The identifier of the Binary (not Icon) element containing the icon to associate with this item. + /// This value is only valid when nested under a ListView element. + /// + public string Icon + { + get + { + return this.iconField; + } + set + { + this.iconFieldSet = true; + this.iconField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ListItem", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.textFieldSet) + { + writer.WriteAttributeString("Text", this.textField); + } + if (this.iconFieldSet) + { + writer.WriteAttributeString("Icon", this.iconField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Text" == name)) + { + this.textField = value; + this.textFieldSet = true; + } + if (("Icon" == name)) + { + this.iconField = value; + this.iconFieldSet = true; + } + } + } + + /// + /// Set of items for a particular ListBox control tied to an install Property + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ListBox : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string propertyField; + + private bool propertyFieldSet; + + private ISchemaElement parentElement; + + public ListBox() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Property tied to this group + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ListItem" == childName)) + { + childValue = new ListItem(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ListBox", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + } + } + + /// + /// Set of items for a particular ComboBox control tied to an install Property + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ComboBox : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string propertyField; + + private bool propertyFieldSet; + + private ISchemaElement parentElement; + + public ComboBox() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Property tied to this group + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ListItem" == childName)) + { + childValue = new ListItem(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ComboBox", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + } + } + + /// + /// Set of items for a particular ListView control tied to an install Property + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ListView : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string propertyField; + + private bool propertyFieldSet; + + private ISchemaElement parentElement; + + public ListView() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Property tied to this group + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("ListItem" == childName)) + { + childValue = new ListItem(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ListView", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + } + } + + /// + /// Text or Icon plus Value that is assigned to the Property of the parent Control (RadioButtonGroup). + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RadioButton : ISchemaElement, ISetAttributes + { + + private string bitmapField; + + private bool bitmapFieldSet; + + private string heightField; + + private bool heightFieldSet; + + private string helpField; + + private bool helpFieldSet; + + private string iconField; + + private bool iconFieldSet; + + private string textField; + + private bool textFieldSet; + + private string toolTipField; + + private bool toolTipFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private string widthField; + + private bool widthFieldSet; + + private string xField; + + private bool xFieldSet; + + private string yField; + + private bool yFieldSet; + + private ISchemaElement parentElement; + + /// + /// This attribute defines the bitmap displayed with the radio button. The value of the attribute creates a reference + /// to a Binary element that represents the bitmap. This attribute is mutually exclusive with the Icon and Text + /// attributes. + /// + public string Bitmap + { + get + { + return this.bitmapField; + } + set + { + this.bitmapFieldSet = true; + this.bitmapField = value; + } + } + + public string Height + { + get + { + return this.heightField; + } + set + { + this.heightFieldSet = true; + this.heightField = value; + } + } + + public string Help + { + get + { + return this.helpField; + } + set + { + this.helpFieldSet = true; + this.helpField = value; + } + } + + /// + /// This attribute defines the icon displayed with the radio button. The value of the attribute creates a reference + /// to a Binary element that represents the icon. This attribute is mutually exclusive with the Bitmap and Text + /// attributes. + /// + public string Icon + { + get + { + return this.iconField; + } + set + { + this.iconFieldSet = true; + this.iconField = value; + } + } + + /// + /// Text displayed with the radio button. This attribute is mutually exclusive with the Bitmap and Icon attributes. + /// + public string Text + { + get + { + return this.textField; + } + set + { + this.textFieldSet = true; + this.textField = value; + } + } + + public string ToolTip + { + get + { + return this.toolTipField; + } + set + { + this.toolTipFieldSet = true; + this.toolTipField = value; + } + } + + /// + /// Value assigned to the associated control Property when this radio button is selected. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public string Width + { + get + { + return this.widthField; + } + set + { + this.widthFieldSet = true; + this.widthField = value; + } + } + + public string X + { + get + { + return this.xField; + } + set + { + this.xFieldSet = true; + this.xField = value; + } + } + + public string Y + { + get + { + return this.yField; + } + set + { + this.yFieldSet = true; + this.yField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RadioButton", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.bitmapFieldSet) + { + writer.WriteAttributeString("Bitmap", this.bitmapField); + } + if (this.heightFieldSet) + { + writer.WriteAttributeString("Height", this.heightField); + } + if (this.helpFieldSet) + { + writer.WriteAttributeString("Help", this.helpField); + } + if (this.iconFieldSet) + { + writer.WriteAttributeString("Icon", this.iconField); + } + if (this.textFieldSet) + { + writer.WriteAttributeString("Text", this.textField); + } + if (this.toolTipFieldSet) + { + writer.WriteAttributeString("ToolTip", this.toolTipField); + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + if (this.widthFieldSet) + { + writer.WriteAttributeString("Width", this.widthField); + } + if (this.xFieldSet) + { + writer.WriteAttributeString("X", this.xField); + } + if (this.yFieldSet) + { + writer.WriteAttributeString("Y", this.yField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Bitmap" == name)) + { + this.bitmapField = value; + this.bitmapFieldSet = true; + } + if (("Height" == name)) + { + this.heightField = value; + this.heightFieldSet = true; + } + if (("Help" == name)) + { + this.helpField = value; + this.helpFieldSet = true; + } + if (("Icon" == name)) + { + this.iconField = value; + this.iconFieldSet = true; + } + if (("Text" == name)) + { + this.textField = value; + this.textFieldSet = true; + } + if (("ToolTip" == name)) + { + this.toolTipField = value; + this.toolTipFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + if (("Width" == name)) + { + this.widthField = value; + this.widthFieldSet = true; + } + if (("X" == name)) + { + this.xField = value; + this.xFieldSet = true; + } + if (("Y" == name)) + { + this.yField = value; + this.yFieldSet = true; + } + } + } + + /// + /// Set of radio buttons tied to the specified Property + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class RadioButtonGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string propertyField; + + private bool propertyFieldSet; + + private ISchemaElement parentElement; + + public RadioButtonGroup() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RadioButton))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Property tied to this group. + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("RadioButton" == childName)) + { + childValue = new RadioButton(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("RadioButtonGroup", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + } + } + + /// + /// Text associated with certain controls + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UIText : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Element value is text, may use CDATA if needed to escape XML delimiters + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UIText", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + /// + /// Reference to a UI element. This will force the entire referenced Fragment's contents + /// to be included in the installer database. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UIRef : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UIRef", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Enclosing element to compartmentalize UI specifications. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class UI : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + public UI() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedUI))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Error))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgressText))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BillboardAction))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComboBox))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ListBox))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ListView))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RadioButtonGroup))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TextStyle))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIText))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Dialog))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DialogRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Publish))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property))); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Binary))); + ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence))); + childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence))); + childCollection0.AddCollection(childCollection1); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("EmbeddedUI" == childName)) + { + childValue = new EmbeddedUI(); + } + if (("Error" == childName)) + { + childValue = new Error(); + } + if (("ProgressText" == childName)) + { + childValue = new ProgressText(); + } + if (("BillboardAction" == childName)) + { + childValue = new BillboardAction(); + } + if (("ComboBox" == childName)) + { + childValue = new ComboBox(); + } + if (("ListBox" == childName)) + { + childValue = new ListBox(); + } + if (("ListView" == childName)) + { + childValue = new ListView(); + } + if (("RadioButtonGroup" == childName)) + { + childValue = new RadioButtonGroup(); + } + if (("TextStyle" == childName)) + { + childValue = new TextStyle(); + } + if (("UIText" == childName)) + { + childValue = new UIText(); + } + if (("Dialog" == childName)) + { + childValue = new Dialog(); + } + if (("DialogRef" == childName)) + { + childValue = new DialogRef(); + } + if (("Publish" == childName)) + { + childValue = new Publish(); + } + if (("PropertyRef" == childName)) + { + childValue = new PropertyRef(); + } + if (("Property" == childName)) + { + childValue = new Property(); + } + if (("Binary" == childName)) + { + childValue = new Binary(); + } + if (("AdminUISequence" == childName)) + { + childValue = new AdminUISequence(); + } + if (("InstallUISequence" == childName)) + { + childValue = new InstallUISequence(); + } + if (("UIRef" == childName)) + { + childValue = new UIRef(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("UI", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// Defines a custom table for use from a custom action. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class CustomTable : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string idField; + + private bool idFieldSet; + + private YesNoType bootstrapperApplicationDataField; + + private bool bootstrapperApplicationDataFieldSet; + + private ISchemaElement parentElement; + + public CustomTable() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Column))); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Row))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// Identifier for the custom table. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Indicates the table data is transformed into the bootstrapper application data manifest. + /// + public YesNoType BootstrapperApplicationData + { + get + { + return this.bootstrapperApplicationDataField; + } + set + { + this.bootstrapperApplicationDataFieldSet = true; + this.bootstrapperApplicationDataField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Column" == childName)) + { + childValue = new Column(); + } + if (("Row" == childName)) + { + childValue = new Row(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("CustomTable", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.bootstrapperApplicationDataFieldSet) + { + if ((this.bootstrapperApplicationDataField == YesNoType.no)) + { + writer.WriteAttributeString("BootstrapperApplicationData", "no"); + } + if ((this.bootstrapperApplicationDataField == YesNoType.yes)) + { + writer.WriteAttributeString("BootstrapperApplicationData", "yes"); + } + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("BootstrapperApplicationData" == name)) + { + this.bootstrapperApplicationDataField = Enums.ParseYesNoType(value); + this.bootstrapperApplicationDataFieldSet = true; + } + } + } + + /// + /// Column definition for a Custom Table + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Column : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private YesNoType primaryKeyField; + + private bool primaryKeyFieldSet; + + private TypeType typeField; + + private bool typeFieldSet; + + private int widthField; + + private bool widthFieldSet; + + private YesNoType nullableField; + + private bool nullableFieldSet; + + private YesNoType localizableField; + + private bool localizableFieldSet; + + private long minValueField; + + private bool minValueFieldSet; + + private long maxValueField; + + private bool maxValueFieldSet; + + private string keyTableField; + + private bool keyTableFieldSet; + + private int keyColumnField; + + private bool keyColumnFieldSet; + + private CategoryType categoryField; + + private bool categoryFieldSet; + + private string setField; + + private bool setFieldSet; + + private string descriptionField; + + private bool descriptionFieldSet; + + private ModularizeType modularizeField; + + private bool modularizeFieldSet; + + private ISchemaElement parentElement; + + /// + /// Identifier for the column. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Whether this column is a primary key. + /// + public YesNoType PrimaryKey + { + get + { + return this.primaryKeyField; + } + set + { + this.primaryKeyFieldSet = true; + this.primaryKeyField = value; + } + } + + /// + /// The type of this column. + /// + public TypeType Type + { + get + { + return this.typeField; + } + set + { + this.typeFieldSet = true; + this.typeField = value; + } + } + + /// + /// Width of this column. + /// + public int Width + { + get + { + return this.widthField; + } + set + { + this.widthFieldSet = true; + this.widthField = value; + } + } + + /// + /// Whether this column can be left null. + /// + public YesNoType Nullable + { + get + { + return this.nullableField; + } + set + { + this.nullableFieldSet = true; + this.nullableField = value; + } + } + + /// + /// Whether this column can be localized. + /// + public YesNoType Localizable + { + get + { + return this.localizableField; + } + set + { + this.localizableFieldSet = true; + this.localizableField = value; + } + } + + /// + /// Minimum value for a numeric value, date or version in this column. + /// + public long MinValue + { + get + { + return this.minValueField; + } + set + { + this.minValueFieldSet = true; + this.minValueField = value; + } + } + + /// + /// Maximum value for a numeric value, date or version in this column. + /// + public long MaxValue + { + get + { + return this.maxValueField; + } + set + { + this.maxValueFieldSet = true; + this.maxValueField = value; + } + } + + /// + /// Table in which this column is an external key. Can be semicolon delimited. + /// + public string KeyTable + { + get + { + return this.keyTableField; + } + set + { + this.keyTableFieldSet = true; + this.keyTableField = value; + } + } + + /// + /// Column in the table in KeyTable attribute. + /// + public int KeyColumn + { + get + { + return this.keyColumnField; + } + set + { + this.keyColumnFieldSet = true; + this.keyColumnField = value; + } + } + + /// + /// Category of this column. + /// This attribute must be specified with a value of 'Binary' if the Type attribute's value is 'binary'. + /// + public CategoryType Category + { + get + { + return this.categoryField; + } + set + { + this.categoryFieldSet = true; + this.categoryField = value; + } + } + + /// + /// Semicolon delimited list of permissible values. + /// + public string Set + { + get + { + return this.setField; + } + set + { + this.setFieldSet = true; + this.setField = value; + } + } + + /// + /// Description of this column. + /// + public string Description + { + get + { + return this.descriptionField; + } + set + { + this.descriptionFieldSet = true; + this.descriptionField = value; + } + } + + /// + /// How this column should be modularized, if at all. + /// + public ModularizeType Modularize + { + get + { + return this.modularizeField; + } + set + { + this.modularizeFieldSet = true; + this.modularizeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a TypeType from a string. + /// + public static TypeType ParseTypeType(string value) + { + TypeType parsedValue; + Column.TryParseTypeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a TypeType from a string. + /// + public static bool TryParseTypeType(string value, out TypeType parsedValue) + { + parsedValue = TypeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("binary" == value)) + { + parsedValue = TypeType.binary; + } + else + { + if (("int" == value)) + { + parsedValue = TypeType.@int; + } + else + { + if (("string" == value)) + { + parsedValue = TypeType.@string; + } + else + { + parsedValue = TypeType.IllegalValue; + return false; + } + } + } + return true; + } + + /// + /// Parses a CategoryType from a string. + /// + public static CategoryType ParseCategoryType(string value) + { + CategoryType parsedValue; + Column.TryParseCategoryType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a CategoryType from a string. + /// + public static bool TryParseCategoryType(string value, out CategoryType parsedValue) + { + parsedValue = CategoryType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("Text" == value)) + { + parsedValue = CategoryType.text; + } + else + { + if (("UpperCase" == value)) + { + parsedValue = CategoryType.upperCase; + } + else + { + if (("LowerCase" == value)) + { + parsedValue = CategoryType.lowerCase; + } + else + { + if (("Integer" == value)) + { + parsedValue = CategoryType.integer; + } + else + { + if (("DoubleInteger" == value)) + { + parsedValue = CategoryType.doubleInteger; + } + else + { + if (("TimeDate" == value)) + { + parsedValue = CategoryType.timeDate; + } + else + { + if (("Identifier" == value)) + { + parsedValue = CategoryType.identifier; + } + else + { + if (("Property" == value)) + { + parsedValue = CategoryType.property; + } + else + { + if (("Filename" == value)) + { + parsedValue = CategoryType.filename; + } + else + { + if (("WildCardFilename" == value)) + { + parsedValue = CategoryType.wildCardFilename; + } + else + { + if (("Path" == value)) + { + parsedValue = CategoryType.path; + } + else + { + if (("Paths" == value)) + { + parsedValue = CategoryType.paths; + } + else + { + if (("AnyPath" == value)) + { + parsedValue = CategoryType.anyPath; + } + else + { + if (("DefaultDir" == value)) + { + parsedValue = CategoryType.defaultDir; + } + else + { + if (("RegPath" == value)) + { + parsedValue = CategoryType.regPath; + } + else + { + if (("Formatted" == value)) + { + parsedValue = CategoryType.formatted; + } + else + { + if (("FormattedSddl" == value)) + { + parsedValue = CategoryType.formattedSddl; + } + else + { + if (("Template" == value)) + { + parsedValue = CategoryType.template; + } + else + { + if (("Condition" == value)) + { + parsedValue = CategoryType.condition; + } + else + { + if (("Guid" == value)) + { + parsedValue = CategoryType.guid; + } + else + { + if (("Version" == value)) + { + parsedValue = CategoryType.version; + } + else + { + if (("Language" == value)) + { + parsedValue = CategoryType.language; + } + else + { + if (("Binary" == value)) + { + parsedValue = CategoryType.binary; + } + else + { + if (("CustomSource" == value)) + { + parsedValue = CategoryType.customSource; + } + else + { + if (("Cabinet" == value)) + { + parsedValue = CategoryType.cabinet; + } + else + { + if (("Shortcut" == value)) + { + parsedValue = CategoryType.shortcut; + } + else + { + parsedValue = CategoryType.IllegalValue; + return false; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + return true; + } + + /// + /// Parses a ModularizeType from a string. + /// + public static ModularizeType ParseModularizeType(string value) + { + ModularizeType parsedValue; + Column.TryParseModularizeType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ModularizeType from a string. + /// + public static bool TryParseModularizeType(string value, out ModularizeType parsedValue) + { + parsedValue = ModularizeType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("None" == value)) + { + parsedValue = ModularizeType.None; + } + else + { + if (("Column" == value)) + { + parsedValue = ModularizeType.Column; + } + else + { + if (("Condition" == value)) + { + parsedValue = ModularizeType.Condition; + } + else + { + if (("Icon" == value)) + { + parsedValue = ModularizeType.Icon; + } + else + { + if (("Property" == value)) + { + parsedValue = ModularizeType.Property; + } + else + { + if (("SemicolonDelimited" == value)) + { + parsedValue = ModularizeType.SemicolonDelimited; + } + else + { + parsedValue = ModularizeType.IllegalValue; + return false; + } + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Column", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.primaryKeyFieldSet) + { + if ((this.primaryKeyField == YesNoType.no)) + { + writer.WriteAttributeString("PrimaryKey", "no"); + } + if ((this.primaryKeyField == YesNoType.yes)) + { + writer.WriteAttributeString("PrimaryKey", "yes"); + } + } + if (this.typeFieldSet) + { + if ((this.typeField == TypeType.binary)) + { + writer.WriteAttributeString("Type", "binary"); + } + if ((this.typeField == TypeType.@int)) + { + writer.WriteAttributeString("Type", "int"); + } + if ((this.typeField == TypeType.@string)) + { + writer.WriteAttributeString("Type", "string"); + } + } + if (this.widthFieldSet) + { + writer.WriteAttributeString("Width", this.widthField.ToString(CultureInfo.InvariantCulture)); + } + if (this.nullableFieldSet) + { + if ((this.nullableField == YesNoType.no)) + { + writer.WriteAttributeString("Nullable", "no"); + } + if ((this.nullableField == YesNoType.yes)) + { + writer.WriteAttributeString("Nullable", "yes"); + } + } + if (this.localizableFieldSet) + { + if ((this.localizableField == YesNoType.no)) + { + writer.WriteAttributeString("Localizable", "no"); + } + if ((this.localizableField == YesNoType.yes)) + { + writer.WriteAttributeString("Localizable", "yes"); + } + } + if (this.minValueFieldSet) + { + writer.WriteAttributeString("MinValue", this.minValueField.ToString(CultureInfo.InvariantCulture)); + } + if (this.maxValueFieldSet) + { + writer.WriteAttributeString("MaxValue", this.maxValueField.ToString(CultureInfo.InvariantCulture)); + } + if (this.keyTableFieldSet) + { + writer.WriteAttributeString("KeyTable", this.keyTableField); + } + if (this.keyColumnFieldSet) + { + writer.WriteAttributeString("KeyColumn", this.keyColumnField.ToString(CultureInfo.InvariantCulture)); + } + if (this.categoryFieldSet) + { + if ((this.categoryField == CategoryType.text)) + { + writer.WriteAttributeString("Category", "text"); + } + if ((this.categoryField == CategoryType.upperCase)) + { + writer.WriteAttributeString("Category", "upperCase"); + } + if ((this.categoryField == CategoryType.lowerCase)) + { + writer.WriteAttributeString("Category", "lowerCase"); + } + if ((this.categoryField == CategoryType.integer)) + { + writer.WriteAttributeString("Category", "integer"); + } + if ((this.categoryField == CategoryType.doubleInteger)) + { + writer.WriteAttributeString("Category", "doubleInteger"); + } + if ((this.categoryField == CategoryType.timeDate)) + { + writer.WriteAttributeString("Category", "timeDate"); + } + if ((this.categoryField == CategoryType.identifier)) + { + writer.WriteAttributeString("Category", "identifier"); + } + if ((this.categoryField == CategoryType.property)) + { + writer.WriteAttributeString("Category", "property"); + } + if ((this.categoryField == CategoryType.filename)) + { + writer.WriteAttributeString("Category", "filename"); + } + if ((this.categoryField == CategoryType.wildCardFilename)) + { + writer.WriteAttributeString("Category", "wildCardFilename"); + } + if ((this.categoryField == CategoryType.path)) + { + writer.WriteAttributeString("Category", "path"); + } + if ((this.categoryField == CategoryType.paths)) + { + writer.WriteAttributeString("Category", "paths"); + } + if ((this.categoryField == CategoryType.anyPath)) + { + writer.WriteAttributeString("Category", "anyPath"); + } + if ((this.categoryField == CategoryType.defaultDir)) + { + writer.WriteAttributeString("Category", "defaultDir"); + } + if ((this.categoryField == CategoryType.regPath)) + { + writer.WriteAttributeString("Category", "regPath"); + } + if ((this.categoryField == CategoryType.formatted)) + { + writer.WriteAttributeString("Category", "formatted"); + } + if ((this.categoryField == CategoryType.formattedSddl)) + { + writer.WriteAttributeString("Category", "formattedSddl"); + } + if ((this.categoryField == CategoryType.template)) + { + writer.WriteAttributeString("Category", "template"); + } + if ((this.categoryField == CategoryType.condition)) + { + writer.WriteAttributeString("Category", "condition"); + } + if ((this.categoryField == CategoryType.guid)) + { + writer.WriteAttributeString("Category", "guid"); + } + if ((this.categoryField == CategoryType.version)) + { + writer.WriteAttributeString("Category", "version"); + } + if ((this.categoryField == CategoryType.language)) + { + writer.WriteAttributeString("Category", "language"); + } + if ((this.categoryField == CategoryType.binary)) + { + writer.WriteAttributeString("Category", "Binary"); + } + if ((this.categoryField == CategoryType.customSource)) + { + writer.WriteAttributeString("Category", "customSource"); + } + if ((this.categoryField == CategoryType.cabinet)) + { + writer.WriteAttributeString("Category", "cabinet"); + } + if ((this.categoryField == CategoryType.shortcut)) + { + writer.WriteAttributeString("Category", "shortcut"); + } + } + if (this.setFieldSet) + { + writer.WriteAttributeString("Set", this.setField); + } + if (this.descriptionFieldSet) + { + writer.WriteAttributeString("Description", this.descriptionField); + } + if (this.modularizeFieldSet) + { + if ((this.modularizeField == ModularizeType.None)) + { + writer.WriteAttributeString("Modularize", "None"); + } + if ((this.modularizeField == ModularizeType.Column)) + { + writer.WriteAttributeString("Modularize", "Column"); + } + if ((this.modularizeField == ModularizeType.Condition)) + { + writer.WriteAttributeString("Modularize", "Condition"); + } + if ((this.modularizeField == ModularizeType.Icon)) + { + writer.WriteAttributeString("Modularize", "Icon"); + } + if ((this.modularizeField == ModularizeType.Property)) + { + writer.WriteAttributeString("Modularize", "Property"); + } + if ((this.modularizeField == ModularizeType.SemicolonDelimited)) + { + writer.WriteAttributeString("Modularize", "SemicolonDelimited"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("PrimaryKey" == name)) + { + this.primaryKeyField = Enums.ParseYesNoType(value); + this.primaryKeyFieldSet = true; + } + if (("Type" == name)) + { + this.typeField = Column.ParseTypeType(value); + this.typeFieldSet = true; + } + if (("Width" == name)) + { + this.widthField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.widthFieldSet = true; + } + if (("Nullable" == name)) + { + this.nullableField = Enums.ParseYesNoType(value); + this.nullableFieldSet = true; + } + if (("Localizable" == name)) + { + this.localizableField = Enums.ParseYesNoType(value); + this.localizableFieldSet = true; + } + if (("MinValue" == name)) + { + this.minValueField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.minValueFieldSet = true; + } + if (("MaxValue" == name)) + { + this.maxValueField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.maxValueFieldSet = true; + } + if (("KeyTable" == name)) + { + this.keyTableField = value; + this.keyTableFieldSet = true; + } + if (("KeyColumn" == name)) + { + this.keyColumnField = Convert.ToInt32(value, CultureInfo.InvariantCulture); + this.keyColumnFieldSet = true; + } + if (("Category" == name)) + { + this.categoryField = Column.ParseCategoryType(value); + this.categoryFieldSet = true; + } + if (("Set" == name)) + { + this.setField = value; + this.setFieldSet = true; + } + if (("Description" == name)) + { + this.descriptionField = value; + this.descriptionFieldSet = true; + } + if (("Modularize" == name)) + { + this.modularizeField = Column.ParseModularizeType(value); + this.modularizeFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum TypeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Column contains a path to a file that will be inserted into the column as a binary object. + /// If this value is set, the Category attribute must also be set with a value of 'Binary' to pass ICE validation. + /// + binary, + + /// + /// Column contains an integer or datetime value (the MinValue and MaxValue attributes should also be set). + /// + @int, + + /// + /// Column contains a non-localizable string value. + /// + @string, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum CategoryType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + text, + + upperCase, + + lowerCase, + + integer, + + doubleInteger, + + timeDate, + + identifier, + + property, + + filename, + + wildCardFilename, + + path, + + paths, + + anyPath, + + defaultDir, + + regPath, + + formatted, + + formattedSddl, + + template, + + condition, + + guid, + + version, + + language, + + binary, + + customSource, + + cabinet, + + shortcut, + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ModularizeType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// Column should not be modularized. This is the default value. + /// + None, + + /// + /// Column should be modularized. + /// + Column, + + /// + /// Column is a condition and should be modularized. + /// + Condition, + + /// + /// When the column is an primary or foreign key to the Icon table it should be modularized special. + /// + Icon, + + /// + /// Any Properties in the column should be modularized. + /// + Property, + + /// + /// Semi-colon list of keys, all of which need to be modularized. + /// + SemicolonDelimited, + } + } + + /// + /// Row data for a Custom Table + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Row : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private ISchemaElement parentElement; + + public Row() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); + childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Data))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Data" == childName)) + { + childValue = new Data(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Row", "http://wixtoolset.org/schemas/v4/wxs"); + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + } + } + + /// + /// Used for a Custom Table. Specifies the data for the parent Row and specified Column. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Data : ISchemaElement, ISetAttributes + { + + private string columnField; + + private bool columnFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// Specifies in which column to insert this data. + /// + public string Column + { + get + { + return this.columnField; + } + set + { + this.columnFieldSet = true; + this.columnField = value; + } + } + + /// + /// A data value + /// + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Data", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.columnFieldSet) + { + writer.WriteAttributeString("Column", this.columnField); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Column" == name)) + { + this.columnField = value; + this.columnFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } + + /// + /// Use this element to ensure that a table appears in the installer database, even if its empty. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class EnsureTable : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private ISchemaElement parentElement; + + /// + /// The name of the table. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("EnsureTable", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + } + } + + /// + /// This element exposes advanced WiX functionality. Use this element to declare WiX variables + /// from directly within your authoring. WiX variables are not resolved until the final msi/msm/pcp + /// file is actually generated. WiX variables do not persist into the msi/msm/pcp file, so they cannot + /// be used when an MSI file is being installed; it's a WiX-only concept. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class WixVariable : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private YesNoType overridableField; + + private bool overridableFieldSet; + + private string valueField; + + private bool valueFieldSet; + + private ISchemaElement parentElement; + + /// + /// The name of the variable. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// Set this value to 'yes' in order to make the variable's value overridable either by + /// another WixVariable entry or via the command-line option -d<name>=<value> + /// for light.exe. If the same variable is declared overridable in multiple places it + /// will cause an error (since WiX won't know which value is correct). The default value + /// is 'no'. + /// + public YesNoType Overridable + { + get + { + return this.overridableField; + } + set + { + this.overridableFieldSet = true; + this.overridableField = value; + } + } + + /// + /// The value of the variable. The value cannot be an empty string because that would + /// make it possible to accidentally set a column to null. + /// + public string Value + { + get + { + return this.valueField; + } + set + { + this.valueFieldSet = true; + this.valueField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("WixVariable", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.overridableFieldSet) + { + if ((this.overridableField == YesNoType.no)) + { + writer.WriteAttributeString("Overridable", "no"); + } + if ((this.overridableField == YesNoType.yes)) + { + writer.WriteAttributeString("Overridable", "yes"); + } + } + if (this.valueFieldSet) + { + writer.WriteAttributeString("Value", this.valueField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("Overridable" == name)) + { + this.overridableField = Enums.ParseYesNoType(value); + this.overridableFieldSet = true; + } + if (("Value" == name)) + { + this.valueField = value; + this.valueFieldSet = true; + } + } + } + + /// + /// Use this element to contain definitions for instance transforms. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class InstanceTransforms : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes + { + + private ElementCollection children; + + private string propertyField; + + private bool propertyFieldSet; + + private ISchemaElement parentElement; + + public InstanceTransforms() + { + ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); + childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Instance))); + this.children = childCollection0; + } + + public virtual IEnumerable Children + { + get + { + return this.children; + } + } + + [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] + public virtual IEnumerable this[System.Type childType] + { + get + { + return this.children.Filter(childType); + } + } + + /// + /// The Id of the Property who's value should change for each instance. + /// + public string Property + { + get + { + return this.propertyField; + } + set + { + this.propertyFieldSet = true; + this.propertyField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + public virtual void AddChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.AddElement(child); + child.ParentElement = this; + } + + public virtual void RemoveChild(ISchemaElement child) + { + if ((null == child)) + { + throw new ArgumentNullException("child"); + } + this.children.RemoveElement(child); + child.ParentElement = null; + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + ISchemaElement ICreateChildren.CreateChild(string childName) + { + if (String.IsNullOrEmpty(childName)) + { + throw new ArgumentNullException("childName"); + } + ISchemaElement childValue = null; + if (("Instance" == childName)) + { + childValue = new Instance(); + } + if ((null == childValue)) + { + throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); + } + return childValue; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("InstanceTransforms", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.propertyFieldSet) + { + writer.WriteAttributeString("Property", this.propertyField); + } + for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) + { + ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); + childElement.OutputXml(writer); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Property" == name)) + { + this.propertyField = value; + this.propertyFieldSet = true; + } + } + } + + /// + /// Defines an instance transform for your product. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class Instance : ISchemaElement, ISetAttributes + { + + private string idField; + + private bool idFieldSet; + + private string productCodeField; + + private bool productCodeFieldSet; + + private string productNameField; + + private bool productNameFieldSet; + + private string upgradeCodeField; + + private bool upgradeCodeFieldSet; + + private ISchemaElement parentElement; + + /// + /// The identity of the instance transform. This value will define the name by which the instance + /// should be referred to on the command line. In addition, the value of the this attribute will + /// determine what the value of the property specified in Property attribute on InstanceTransforms + /// will change to for each instance. + /// + public string Id + { + get + { + return this.idField; + } + set + { + this.idFieldSet = true; + this.idField = value; + } + } + + /// + /// The ProductCode for this instance. + /// + public string ProductCode + { + get + { + return this.productCodeField; + } + set + { + this.productCodeFieldSet = true; + this.productCodeField = value; + } + } + + /// + /// The ProductName for this instance. + /// + public string ProductName + { + get + { + return this.productNameField; + } + set + { + this.productNameFieldSet = true; + this.productNameField = value; + } + } + + /// + /// The UpgradeCode for this instance. + /// + public string UpgradeCode + { + get + { + return this.upgradeCodeField; + } + set + { + this.upgradeCodeFieldSet = true; + this.upgradeCodeField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("Instance", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.idFieldSet) + { + writer.WriteAttributeString("Id", this.idField); + } + if (this.productCodeFieldSet) + { + writer.WriteAttributeString("ProductCode", this.productCodeField); + } + if (this.productNameFieldSet) + { + writer.WriteAttributeString("ProductName", this.productNameField); + } + if (this.upgradeCodeFieldSet) + { + writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Id" == name)) + { + this.idField = value; + this.idFieldSet = true; + } + if (("ProductCode" == name)) + { + this.productCodeField = value; + this.productCodeFieldSet = true; + } + if (("ProductName" == name)) + { + this.productNameField = value; + this.productNameFieldSet = true; + } + if (("UpgradeCode" == name)) + { + this.upgradeCodeField = value; + this.upgradeCodeFieldSet = true; + } + } + } + + /// + /// Simplifies authoring for major upgrades, including support for preventing downgrades. + /// + /// The parent Package element must have valid UpgradeCode and Version attributes. + /// + /// When the FindRelatedProducts action detects a related product installed on the system, + /// it appends the product code to the property named WIX_UPGRADE_DETECTED. After the + /// FindRelatedProducts action is run, the value of the WIX_UPGRADE_DETECTED property is a + /// list of product codes, separated by semicolons (;), detected on the system. + /// + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class MajorUpgrade : ISchemaElement, ISetAttributes + { + + private YesNoType allowDowngradesField; + + private bool allowDowngradesFieldSet; + + private YesNoType allowSameVersionUpgradesField; + + private bool allowSameVersionUpgradesFieldSet; + + private YesNoType disallowField; + + private bool disallowFieldSet; + + private string downgradeErrorMessageField; + + private bool downgradeErrorMessageFieldSet; + + private string disallowUpgradeErrorMessageField; + + private bool disallowUpgradeErrorMessageFieldSet; + + private YesNoType migrateFeaturesField; + + private bool migrateFeaturesFieldSet; + + private YesNoType ignoreLanguageField; + + private bool ignoreLanguageFieldSet; + + private YesNoType ignoreRemoveFailureField; + + private bool ignoreRemoveFailureFieldSet; + + private string removeFeaturesField; + + private bool removeFeaturesFieldSet; + + private ScheduleType scheduleField; + + private bool scheduleFieldSet; + + private ISchemaElement parentElement; + + /// + /// When set to no (the default), products with lower version numbers are blocked from + /// installing when a product with a higher version is installed; the DowngradeErrorMessage + /// attribute must also be specified. + /// + /// When set to yes, any version can be installed over any other version. + /// + public YesNoType AllowDowngrades + { + get + { + return this.allowDowngradesField; + } + set + { + this.allowDowngradesFieldSet = true; + this.allowDowngradesField = value; + } + } + + /// + /// When set to no (the default), installing a product with the same version and upgrade code + /// (but different product code) is allowed and treated by MSI as two products. When set to yes, + /// WiX sets the msidbUpgradeAttributesVersionMaxInclusive attribute, which tells MSI to treat + /// a product with the same version as a major upgrade. + /// + /// This is useful when two product versions differ only in the fourth version field. MSI + /// specifically ignores that field when comparing product versions, so two products that + /// differ only in the fourth version field are the same product and need this attribute set to + /// yes to be detected. + /// + /// Note that because MSI ignores the fourth product version field, setting this attribute to + /// yes also allows downgrades when the first three product version fields are identical. + /// For example, product version 1.0.0.1 will "upgrade" 1.0.0.2998 because they're seen as the + /// same version (1.0.0). That could reintroduce serious bugs so the safest choice is to change + /// the first three version fields and omit this attribute to get the default of no. + /// + /// This attribute cannot be "yes" when AllowDowngrades is also "yes" -- AllowDowngrades + /// already allows two products with the same version number to upgrade each other. + /// + public YesNoType AllowSameVersionUpgrades + { + get + { + return this.allowSameVersionUpgradesField; + } + set + { + this.allowSameVersionUpgradesFieldSet = true; + this.allowSameVersionUpgradesField = value; + } + } + + /// + /// When set to yes, products with higer version numbers are blocked from + /// installing when a product with a lower version is installed; the UpgradeErrorMessage + /// attribute must also be specified. + /// + /// When set to no (the default), any version can be installed over any lower version. + /// + public YesNoType Disallow + { + get + { + return this.disallowField; + } + set + { + this.disallowFieldSet = true; + this.disallowField = value; + } + } + + /// + /// The message displayed if users try to install a product with a lower version number + /// when a product with a higher version is installed. Used only when AllowDowngrades + /// is no (the default). + /// + public string DowngradeErrorMessage + { + get + { + return this.downgradeErrorMessageField; + } + set + { + this.downgradeErrorMessageFieldSet = true; + this.downgradeErrorMessageField = value; + } + } + + /// + /// The message displayed if users try to install a product with a higer version number + /// when a product with a lower version is installed. Used only when Disallow + /// is yes. + /// + public string DisallowUpgradeErrorMessage + { + get + { + return this.disallowUpgradeErrorMessageField; + } + set + { + this.disallowUpgradeErrorMessageFieldSet = true; + this.disallowUpgradeErrorMessageField = value; + } + } + + /// + /// When set to yes (the default), the MigrateFeatureStates standard action will set the + /// feature states of the upgrade product to those of the installed product. + /// + /// When set to no, the installed features have no effect on the upgrade installation. + /// + public YesNoType MigrateFeatures + { + get + { + return this.migrateFeaturesField; + } + set + { + this.migrateFeaturesFieldSet = true; + this.migrateFeaturesField = value; + } + } + + /// + /// When set to yes, the Upgrade table rows will match any product with the same UpgradeCode. + /// + /// When set to no (the default), the Upgrade table rows will match only products with the + /// same UpgradeCode and ProductLanguage. + /// + public YesNoType IgnoreLanguage + { + get + { + return this.ignoreLanguageField; + } + set + { + this.ignoreLanguageFieldSet = true; + this.ignoreLanguageField = value; + } + } + + /// + /// When set to yes, failures removing the installed product during the upgrade will be + /// ignored. + /// + /// When set to no (the default), failures removing the installed product during the upgrade + /// will be considered a failure and, depending on the scheduling, roll back the upgrade. + /// + public YesNoType IgnoreRemoveFailure + { + get + { + return this.ignoreRemoveFailureField; + } + set + { + this.ignoreRemoveFailureFieldSet = true; + this.ignoreRemoveFailureField = value; + } + } + + /// + /// A formatted string that contains the list of features to remove from the installed + /// product. The default is to remove all features. Note that if you use formatted property + /// values that evaluate to an empty string, no features will be removed; only omitting + /// this attribute defaults to removing all features. + /// + public string RemoveFeatures + { + get + { + return this.removeFeaturesField; + } + set + { + this.removeFeaturesFieldSet = true; + this.removeFeaturesField = value; + } + } + + /// + /// Determines the scheduling of the RemoveExistingProducts standard action, which is when + /// the installed product is removed. The default is "afterInstallValidate" which removes + /// the installed product entirely before installing the upgrade product. It's slowest but + /// gives the most flexibility in changing components and features in the upgrade product. + /// + /// For more information, see + /// + public ScheduleType Schedule + { + get + { + return this.scheduleField; + } + set + { + this.scheduleFieldSet = true; + this.scheduleField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Parses a ScheduleType from a string. + /// + public static ScheduleType ParseScheduleType(string value) + { + ScheduleType parsedValue; + MajorUpgrade.TryParseScheduleType(value, out parsedValue); + return parsedValue; + } + + /// + /// Tries to parse a ScheduleType from a string. + /// + public static bool TryParseScheduleType(string value, out ScheduleType parsedValue) + { + parsedValue = ScheduleType.NotSet; + if (string.IsNullOrEmpty(value)) + { + return false; + } + if (("afterInstallValidate" == value)) + { + parsedValue = ScheduleType.afterInstallValidate; + } + else + { + if (("afterInstallInitialize" == value)) + { + parsedValue = ScheduleType.afterInstallInitialize; + } + else + { + if (("afterInstallExecute" == value)) + { + parsedValue = ScheduleType.afterInstallExecute; + } + else + { + if (("afterInstallExecuteAgain" == value)) + { + parsedValue = ScheduleType.afterInstallExecuteAgain; + } + else + { + if (("afterInstallFinalize" == value)) + { + parsedValue = ScheduleType.afterInstallFinalize; + } + else + { + parsedValue = ScheduleType.IllegalValue; + return false; + } + } + } + } + } + return true; + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("MajorUpgrade", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.allowDowngradesFieldSet) + { + if ((this.allowDowngradesField == YesNoType.no)) + { + writer.WriteAttributeString("AllowDowngrades", "no"); + } + if ((this.allowDowngradesField == YesNoType.yes)) + { + writer.WriteAttributeString("AllowDowngrades", "yes"); + } + } + if (this.allowSameVersionUpgradesFieldSet) + { + if ((this.allowSameVersionUpgradesField == YesNoType.no)) + { + writer.WriteAttributeString("AllowSameVersionUpgrades", "no"); + } + if ((this.allowSameVersionUpgradesField == YesNoType.yes)) + { + writer.WriteAttributeString("AllowSameVersionUpgrades", "yes"); + } + } + if (this.disallowFieldSet) + { + if ((this.disallowField == YesNoType.no)) + { + writer.WriteAttributeString("Disallow", "no"); + } + if ((this.disallowField == YesNoType.yes)) + { + writer.WriteAttributeString("Disallow", "yes"); + } + } + if (this.downgradeErrorMessageFieldSet) + { + writer.WriteAttributeString("DowngradeErrorMessage", this.downgradeErrorMessageField); + } + if (this.disallowUpgradeErrorMessageFieldSet) + { + writer.WriteAttributeString("DisallowUpgradeErrorMessage", this.disallowUpgradeErrorMessageField); + } + if (this.migrateFeaturesFieldSet) + { + if ((this.migrateFeaturesField == YesNoType.no)) + { + writer.WriteAttributeString("MigrateFeatures", "no"); + } + if ((this.migrateFeaturesField == YesNoType.yes)) + { + writer.WriteAttributeString("MigrateFeatures", "yes"); + } + } + if (this.ignoreLanguageFieldSet) + { + if ((this.ignoreLanguageField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreLanguage", "no"); + } + if ((this.ignoreLanguageField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreLanguage", "yes"); + } + } + if (this.ignoreRemoveFailureFieldSet) + { + if ((this.ignoreRemoveFailureField == YesNoType.no)) + { + writer.WriteAttributeString("IgnoreRemoveFailure", "no"); + } + if ((this.ignoreRemoveFailureField == YesNoType.yes)) + { + writer.WriteAttributeString("IgnoreRemoveFailure", "yes"); + } + } + if (this.removeFeaturesFieldSet) + { + writer.WriteAttributeString("RemoveFeatures", this.removeFeaturesField); + } + if (this.scheduleFieldSet) + { + if ((this.scheduleField == ScheduleType.afterInstallValidate)) + { + writer.WriteAttributeString("Schedule", "afterInstallValidate"); + } + if ((this.scheduleField == ScheduleType.afterInstallInitialize)) + { + writer.WriteAttributeString("Schedule", "afterInstallInitialize"); + } + if ((this.scheduleField == ScheduleType.afterInstallExecute)) + { + writer.WriteAttributeString("Schedule", "afterInstallExecute"); + } + if ((this.scheduleField == ScheduleType.afterInstallExecuteAgain)) + { + writer.WriteAttributeString("Schedule", "afterInstallExecuteAgain"); + } + if ((this.scheduleField == ScheduleType.afterInstallFinalize)) + { + writer.WriteAttributeString("Schedule", "afterInstallFinalize"); + } + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("AllowDowngrades" == name)) + { + this.allowDowngradesField = Enums.ParseYesNoType(value); + this.allowDowngradesFieldSet = true; + } + if (("AllowSameVersionUpgrades" == name)) + { + this.allowSameVersionUpgradesField = Enums.ParseYesNoType(value); + this.allowSameVersionUpgradesFieldSet = true; + } + if (("Disallow" == name)) + { + this.disallowField = Enums.ParseYesNoType(value); + this.disallowFieldSet = true; + } + if (("DowngradeErrorMessage" == name)) + { + this.downgradeErrorMessageField = value; + this.downgradeErrorMessageFieldSet = true; + } + if (("DisallowUpgradeErrorMessage" == name)) + { + this.disallowUpgradeErrorMessageField = value; + this.disallowUpgradeErrorMessageFieldSet = true; + } + if (("MigrateFeatures" == name)) + { + this.migrateFeaturesField = Enums.ParseYesNoType(value); + this.migrateFeaturesFieldSet = true; + } + if (("IgnoreLanguage" == name)) + { + this.ignoreLanguageField = Enums.ParseYesNoType(value); + this.ignoreLanguageFieldSet = true; + } + if (("IgnoreRemoveFailure" == name)) + { + this.ignoreRemoveFailureField = Enums.ParseYesNoType(value); + this.ignoreRemoveFailureFieldSet = true; + } + if (("RemoveFeatures" == name)) + { + this.removeFeaturesField = value; + this.removeFeaturesFieldSet = true; + } + if (("Schedule" == name)) + { + this.scheduleField = MajorUpgrade.ParseScheduleType(value); + this.scheduleFieldSet = true; + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public enum ScheduleType + { + + IllegalValue = int.MaxValue, + + NotSet = -1, + + /// + /// (Default) Schedules RemoveExistingProducts after the InstallValidate standard + /// action. This scheduling removes the installed product entirely before installing + /// the upgrade product. It's slowest but gives the most flexibility in changing + /// components and features in the upgrade product. Note that if the installation + /// of the upgrade product fails, the machine will have neither version installed. + /// + afterInstallValidate, + + /// + /// Schedules RemoveExistingProducts after the InstallInitialize standard action. + /// This is similar to the afterInstallValidate scheduling, but if the installation + /// of the upgrade product fails, Windows Installer also rolls back the removal of + /// the installed product -- in other words, reinstalls it. + /// + afterInstallInitialize, + + /// + /// Schedules RemoveExistingProducts between the InstallExecute and InstallFinalize standard actions. + /// This scheduling installs the upgrade product "on top of" the installed product then lets + /// RemoveExistingProducts uninstall any components that don't also exist in the upgrade product. + /// Note that this scheduling requires strict adherence to the component rules because it relies + /// on component reference counts to be accurate during installation of the upgrade product and + /// removal of the installed product. For more information, see + /// + afterInstallExecute, + + /// + /// Schedules RemoveExistingProducts between the InstallExecuteAgain and InstallFinalize standard actions. + /// This is identical to the afterInstallExecute scheduling but after the InstallExecuteAgain standard + /// action instead of InstallExecute. + /// + afterInstallExecuteAgain, + + /// + /// Schedules RemoveExistingProducts after the InstallFinalize standard action. This is similar to the + /// afterInstallExecute and afterInstallExecuteAgain schedulings but takes place outside the + /// installation transaction so if installation of the upgrade product fails, Windows Installer does + /// not roll back the removal of the installed product, so the machine will have both versions + /// installed. + /// + afterInstallFinalize, + } + } + + [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] + public class ProductSearch : ISchemaElement, ISetAttributes + { + + private string minimumField; + + private bool minimumFieldSet; + + private string maximumField; + + private bool maximumFieldSet; + + private string languageField; + + private bool languageFieldSet; + + private YesNoType includeMinimumField; + + private bool includeMinimumFieldSet; + + private YesNoType includeMaximumField; + + private bool includeMaximumFieldSet; + + private YesNoType excludeLanguagesField; + + private bool excludeLanguagesFieldSet; + + private string upgradeCodeField; + + private bool upgradeCodeFieldSet; + + private string contentField; + + private bool contentFieldSet; + + private ISchemaElement parentElement; + + /// + /// Specifies the lower bound on the range of product versions to be detected by FindRelatedProducts. + /// + public string Minimum + { + get + { + return this.minimumField; + } + set + { + this.minimumFieldSet = true; + this.minimumField = value; + } + } + + /// + /// Specifies the upper boundary of the range of product versions detected by FindRelatedProducts. + /// + public string Maximum + { + get + { + return this.maximumField; + } + set + { + this.maximumFieldSet = true; + this.maximumField = value; + } + } + + /// + /// 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. + /// + public string Language + { + get + { + return this.languageField; + } + set + { + this.languageFieldSet = true; + this.languageField = value; + } + } + + /// + /// Set to "no" to make the range of versions detected exclude the value specified in Minimum. This attribute is "yes" by default. + /// + public YesNoType IncludeMinimum + { + get + { + return this.includeMinimumField; + } + set + { + this.includeMinimumFieldSet = true; + this.includeMinimumField = value; + } + } + + /// + /// Set to "yes" to make the range of versions detected include the value specified in Maximum. + /// + public YesNoType IncludeMaximum + { + get + { + return this.includeMaximumField; + } + set + { + this.includeMaximumFieldSet = true; + this.includeMaximumField = value; + } + } + + /// + /// Set to "yes" to detect all languages, excluding the languages listed in the Language attribute. + /// + public YesNoType ExcludeLanguages + { + get + { + return this.excludeLanguagesField; + } + set + { + this.excludeLanguagesFieldSet = true; + this.excludeLanguagesField = value; + } + } + + /// + /// This value specifies the upgrade code for the products that are to be detected by the FindRelatedProducts action. + /// + public string UpgradeCode + { + get + { + return this.upgradeCodeField; + } + set + { + this.upgradeCodeFieldSet = true; + this.upgradeCodeField = value; + } + } + + public string Content + { + get + { + return this.contentField; + } + set + { + this.contentFieldSet = true; + this.contentField = value; + } + } + + public virtual ISchemaElement ParentElement + { + get + { + return this.parentElement; + } + set + { + this.parentElement = value; + } + } + + /// + /// Processes this element and all child elements into an XmlWriter. + /// + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + public virtual void OutputXml(XmlWriter writer) + { + if ((null == writer)) + { + throw new ArgumentNullException("writer"); + } + writer.WriteStartElement("ProductSearch", "http://wixtoolset.org/schemas/v4/wxs"); + if (this.minimumFieldSet) + { + writer.WriteAttributeString("Minimum", this.minimumField); + } + if (this.maximumFieldSet) + { + writer.WriteAttributeString("Maximum", this.maximumField); + } + if (this.languageFieldSet) + { + writer.WriteAttributeString("Language", this.languageField); + } + if (this.includeMinimumFieldSet) + { + if ((this.includeMinimumField == YesNoType.no)) + { + writer.WriteAttributeString("IncludeMinimum", "no"); + } + if ((this.includeMinimumField == YesNoType.yes)) + { + writer.WriteAttributeString("IncludeMinimum", "yes"); + } + } + if (this.includeMaximumFieldSet) + { + if ((this.includeMaximumField == YesNoType.no)) + { + writer.WriteAttributeString("IncludeMaximum", "no"); + } + if ((this.includeMaximumField == YesNoType.yes)) + { + writer.WriteAttributeString("IncludeMaximum", "yes"); + } + } + if (this.excludeLanguagesFieldSet) + { + if ((this.excludeLanguagesField == YesNoType.no)) + { + writer.WriteAttributeString("ExcludeLanguages", "no"); + } + if ((this.excludeLanguagesField == YesNoType.yes)) + { + writer.WriteAttributeString("ExcludeLanguages", "yes"); + } + } + if (this.upgradeCodeFieldSet) + { + writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); + } + if (this.contentFieldSet) + { + writer.WriteString(this.contentField); + } + writer.WriteEndElement(); + } + + [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] + [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] + void ISetAttributes.SetAttribute(string name, string value) + { + if (String.IsNullOrEmpty(name)) + { + throw new ArgumentNullException("name"); + } + if (("Minimum" == name)) + { + this.minimumField = value; + this.minimumFieldSet = true; + } + if (("Maximum" == name)) + { + this.maximumField = value; + this.maximumFieldSet = true; + } + if (("Language" == name)) + { + this.languageField = value; + this.languageFieldSet = true; + } + if (("IncludeMinimum" == name)) + { + this.includeMinimumField = Enums.ParseYesNoType(value); + this.includeMinimumFieldSet = true; + } + if (("IncludeMaximum" == name)) + { + this.includeMaximumField = Enums.ParseYesNoType(value); + this.includeMaximumFieldSet = true; + } + if (("ExcludeLanguages" == name)) + { + this.excludeLanguagesField = Enums.ParseYesNoType(value); + this.excludeLanguagesFieldSet = true; + } + if (("UpgradeCode" == name)) + { + this.upgradeCodeField = value; + this.upgradeCodeFieldSet = true; + } + if (("Content" == name)) + { + this.contentField = value; + this.contentFieldSet = true; + } + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Globalization; + using System.Runtime.InteropServices; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// Harvest WiX authoring from a type library file. + /// + public sealed class TypeLibraryHarvester + { + /// + /// Harvest the registry values written by RegisterTypeLib. + /// + /// The file to harvest registry values from. + /// The harvested registry values. + public Wix.RegistryValue[] HarvestRegistryValues(string path) + { + using (RegistryHarvester registryHarvester = new RegistryHarvester(true)) + { + NativeMethods.RegisterTypeLibrary(path); + + return registryHarvester.HarvestRegistry(); + } + } + + /// + /// Parses a hexadecimal version string into a Version object. + /// + /// Hexadecimal version string, for example "1.A.3C.F241" + /// Version object, or null if versionString is not a valid hex version. + public static Version ParseHexVersion(string versionString) + { + if (String.IsNullOrEmpty(versionString)) + { + return null; + } + + int[] versionNumbers = new int[4]; + string[] versionNumberStrings = versionString.Split('.'); + + for (int i = 0; i < versionNumbers.Length && i < versionNumberStrings.Length; i++) + { + if (!Int32.TryParse(versionNumberStrings[i], NumberStyles.HexNumber, CultureInfo.InvariantCulture, out versionNumbers[i])) + { + return null; + } + } + + return new Version(versionNumbers[0], versionNumbers[1], versionNumbers[2], versionNumbers[3]); + } + + /// + /// Native methods for registering type libraries. + /// + private sealed class NativeMethods + { + /// + /// Registers a type library. + /// + /// The type library file to register. + internal static void RegisterTypeLibrary(string typeLibraryFile) + { + IntPtr ptlib; + + LoadTypeLib(typeLibraryFile, out ptlib); + + RegisterTypeLib(ptlib, typeLibraryFile, null); + } + + /// + /// Loads and registers a type library. + /// + /// Contains the name of the file from which LoadTypeLib should attempt to load a type library. + /// On return, contains a pointer to a pointer to the loaded type library. + /// LoadTypeLib will not register the type library if the path of the type library is specified. + [DllImport("oleaut32.dll", PreserveSig = false)] + private static extern void LoadTypeLib([MarshalAs(UnmanagedType.BStr)] string szFile, out IntPtr pptlib); + + /// + /// Adds information about a type library to the system registry. + /// + /// Pointer to the type library being registered. + /// Fully qualified path specification for the type library being registered. + /// Directory in which the Help file for the library being registered can be found. Can be Null. + [DllImport("oleaut32.dll", PreserveSig = false)] + private static extern void RegisterTypeLib(IntPtr ptlib, [MarshalAs(UnmanagedType.BStr)] string szFullPath, [MarshalAs(UnmanagedType.BStr)] string szHelpDir); + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Collections.Specialized; + using System.Globalization; + using System.IO; + using System.Runtime.InteropServices; + using System.Text; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// The finalize harvester mutator for the WiX Toolset Utility Extension. + /// + public sealed class UtilFinalizeHarvesterMutator : BaseMutatorExtension + { + private ArrayList components; + private ArrayList directories; + private SortedList directoryPaths; + private Hashtable filePaths; + private ArrayList files; + private ArrayList registryValues; + private bool suppressCOMElements; + private bool suppressVB6COMElements; + private string preprocessorVariable; + + /// + /// Instantiate a new UtilFinalizeHarvesterMutator. + /// + public UtilFinalizeHarvesterMutator() + { + this.components = new ArrayList(); + this.directories = new ArrayList(); + this.directoryPaths = new SortedList(); + this.filePaths = new Hashtable(); + this.files = new ArrayList(); + this.registryValues = new ArrayList(); + } + + /// + /// Gets or sets the preprocessor variable for substitution. + /// + /// The preprocessor variable for substitution. + public string PreprocessorVariable + { + get { return this.preprocessorVariable; } + set { this.preprocessorVariable = value; } + } + + /// + /// Gets the sequence of the extension. + /// + /// The sequence of the extension. + public override int Sequence + { + get { return 2000; } + } + + /// + /// Gets or sets the option to suppress COM elements. + /// + /// The option to suppress COM elements. + public bool SuppressCOMElements + { + get { return this.suppressCOMElements; } + set { this.suppressCOMElements = value; } + } + + /// + /// Gets or sets the option to suppress VB6 COM elements. + /// + /// The option to suppress VB6 COM elements. + public bool SuppressVB6COMElements + { + get { return this.suppressVB6COMElements; } + set { this.suppressVB6COMElements = value; } + } + + /// + /// Mutate a WiX document. + /// + /// The Wix document element. + public override void Mutate(Wix.Wix wix) + { + this.components.Clear(); + this.directories.Clear(); + this.directoryPaths.Clear(); + this.filePaths.Clear(); + this.files.Clear(); + this.registryValues.Clear(); + + // index elements in this wix document + this.IndexElement(wix); + + this.MutateDirectories(); + this.MutateFiles(); + this.MutateRegistryValues(); + + // must occur after all the registry values have been formatted + this.MutateComponents(); + } + + /// + /// Index an element. + /// + /// The element to index. + private void IndexElement(Wix.ISchemaElement element) + { + if (element is Wix.Component) + { + // Component elements only need to be indexed if COM registry values will be strongly typed + if (!this.suppressCOMElements) + { + this.components.Add(element); + } + } + else if (element is Wix.Directory) + { + this.directories.Add(element); + } + else if (element is Wix.File) + { + this.files.Add(element); + } + else if (element is Wix.RegistryValue) + { + this.registryValues.Add(element); + } + + // index the child elements + if (element is Wix.IParentElement) + { + foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children) + { + this.IndexElement(childElement); + } + } + } + + /// + /// Mutate the components. + /// + private void MutateComponents() + { + if (this.suppressVB6COMElements) + { + // Search for VB6 specific COM registrations + foreach (Wix.Component component in this.components) + { + ArrayList vb6RegistryValues = new ArrayList(); + + foreach (Wix.RegistryValue registryValue in component[typeof(Wix.RegistryValue)]) + { + if (Wix.RegistryValue.ActionType.write == registryValue.Action && Wix.RegistryRootType.HKCR == registryValue.Root) + { + string[] parts = registryValue.Key.Split('\\'); + + if (String.Equals(parts[0], "CLSID", StringComparison.OrdinalIgnoreCase)) + { + // Search for the VB6 CLSID {D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731} + if (2 <= parts.Length) + { + if (String.Equals(parts[1], "{D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731}", StringComparison.OrdinalIgnoreCase)) + { + if (!vb6RegistryValues.Contains(registryValue)) + { + vb6RegistryValues.Add(registryValue); + } + } + } + } + else if (String.Equals(parts[0], "TypeLib", StringComparison.OrdinalIgnoreCase)) + { + // Search for the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046} + if (2 <= parts.Length) + { + if (String.Equals(parts[1], "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) || + String.Equals(parts[1], "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase)) + { + if (!vb6RegistryValues.Contains(registryValue)) + { + vb6RegistryValues.Add(registryValue); + } + } + } + } + else if (String.Equals(parts[0], "Interface", StringComparison.OrdinalIgnoreCase)) + { + // Search for any Interfaces that reference the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046} + if (3 <= parts.Length) + { + if (String.Equals(parts[2], "TypeLib", StringComparison.OrdinalIgnoreCase)) + { + if (String.Equals(registryValue.Value, "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) || + String.Equals(registryValue.Value, "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase)) + { + // Having found a match we have to loop through again finding the matching Interface entries + foreach (Wix.RegistryValue regValue in component[typeof(Wix.RegistryValue)]) + { + if (Wix.RegistryValue.ActionType.write == regValue.Action && Wix.RegistryRootType.HKCR == regValue.Root) + { + string[] rvparts = regValue.Key.Split('\\'); + if (String.Equals(rvparts[0], "Interface", StringComparison.OrdinalIgnoreCase)) + { + if (2 <= rvparts.Length) + { + if (String.Equals(rvparts[1], parts[1], StringComparison.OrdinalIgnoreCase)) + { + if (!vb6RegistryValues.Contains(regValue)) + { + vb6RegistryValues.Add(regValue); + } + } + } + } + } + } + } + } + } + } + } + } + + // Remove all the VB6 specific COM registry values + foreach (Object entry in vb6RegistryValues) + { + component.RemoveChild((Wix.RegistryValue)entry); + } + } + } + + foreach (Wix.Component component in this.components) + { + SortedList indexedElements = CollectionsUtil.CreateCaseInsensitiveSortedList(); + SortedList indexedRegistryValues = CollectionsUtil.CreateCaseInsensitiveSortedList(); + List duplicateRegistryValues = new List(); + + // index all the File elements + foreach (Wix.File file in component[typeof(Wix.File)]) + { + indexedElements.Add(String.Concat("file/", file.Id), file); + } + + // group all the registry values by the COM element they would correspond to and + // create a COM element for each group + foreach (Wix.RegistryValue registryValue in component[typeof(Wix.RegistryValue)]) + { + if (!String.IsNullOrEmpty(registryValue.Key) && Wix.RegistryValue.ActionType.write == registryValue.Action && Wix.RegistryRootType.HKCR == registryValue.Root && Wix.RegistryValue.TypeType.@string == registryValue.Type) + { + string index = null; + string[] parts = registryValue.Key.Split('\\'); + + // create a COM element for COM registration and index it + if (1 <= parts.Length) + { + if (String.Equals(parts[0], "AppID", StringComparison.OrdinalIgnoreCase)) + { + // only work with GUID AppIds here + if (2 <= parts.Length && parts[1].StartsWith("{", StringComparison.Ordinal) && parts[1].EndsWith("}", StringComparison.Ordinal)) + { + index = String.Concat(parts[0], '/', parts[1]); + + if (!indexedElements.Contains(index)) + { + Wix.AppId appId = new Wix.AppId(); + appId.Id = parts[1].ToUpper(CultureInfo.InvariantCulture); + indexedElements.Add(index, appId); + } + } + } + else if (String.Equals(parts[0], "CLSID", StringComparison.OrdinalIgnoreCase)) + { + if (2 <= parts.Length) + { + index = String.Concat(parts[0], '/', parts[1]); + + if (!indexedElements.Contains(index)) + { + Wix.Class wixClass = new Wix.Class(); + wixClass.Id = parts[1].ToUpper(CultureInfo.InvariantCulture); + indexedElements.Add(index, wixClass); + } + } + } + else if (String.Equals(parts[0], "Component Categories", StringComparison.OrdinalIgnoreCase)) + { + // If this is the .NET Component Category it should not end up in the authoring. Therefore, add + // the registry key to the duplicate list to ensure it gets removed later. + if (String.Equals(parts[1], "{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}", StringComparison.OrdinalIgnoreCase)) + { + duplicateRegistryValues.Add(registryValue); + } + else + { + // TODO: add support for Component Categories to the compiler. + } + } + else if (String.Equals(parts[0], "Interface", StringComparison.OrdinalIgnoreCase)) + { + if (2 <= parts.Length) + { + index = String.Concat(parts[0], '/', parts[1]); + + if (!indexedElements.Contains(index)) + { + Wix.Interface wixInterface = new Wix.Interface(); + wixInterface.Id = parts[1].ToUpper(CultureInfo.InvariantCulture); + indexedElements.Add(index, wixInterface); + } + } + } + else if (String.Equals(parts[0], "TypeLib", StringComparison.Ordinal)) + { + if (3 <= parts.Length) + { + // use a special index to ensure progIds are processed before classes + index = String.Concat(".typelib/", parts[1], '/', parts[2]); + + if (!indexedElements.Contains(index)) + { + Version version = TypeLibraryHarvester.ParseHexVersion(parts[2]); + if (version != null) + { + Wix.TypeLib typeLib = new Wix.TypeLib(); + typeLib.Id = parts[1].ToUpper(CultureInfo.InvariantCulture); + typeLib.MajorVersion = version.Major; + typeLib.MinorVersion = version.Minor; + indexedElements.Add(index, typeLib); + } + else // not a valid type library registry value + { + index = null; + } + } + } + } + else if (parts[0].StartsWith(".", StringComparison.Ordinal)) + { + // extension + } + else // ProgId (hopefully) + { + // use a special index to ensure progIds are processed before classes + index = String.Concat(".progid/", parts[0]); + + if (!indexedElements.Contains(index)) + { + Wix.ProgId progId = new Wix.ProgId(); + progId.Id = parts[0]; + indexedElements.Add(index, progId); + } + } + } + + // index the RegistryValue element according to the COM element it corresponds to + if (null != index) + { + SortedList registryValues = (SortedList)indexedRegistryValues[index]; + + if (null == registryValues) + { + registryValues = CollectionsUtil.CreateCaseInsensitiveSortedList(); + indexedRegistryValues.Add(index, registryValues); + } + + try + { + registryValues.Add(String.Concat(registryValue.Key, '/', registryValue.Name), registryValue); + } + catch (ArgumentException) + { + duplicateRegistryValues.Add(registryValue); + + if (String.IsNullOrEmpty(registryValue.Value)) + { + this.Core.Messaging.Write(HarvesterWarnings.DuplicateDllRegistryEntry(String.Concat(registryValue.Key, '/', registryValue.Name), component.Id)); + } + else + { + this.Core.Messaging.Write(HarvesterWarnings.DuplicateDllRegistryEntry(String.Concat(registryValue.Key, '/', registryValue.Name), registryValue.Value, component.Id)); + } + } + } + } + } + + foreach (Wix.RegistryValue removeRegistryEntry in duplicateRegistryValues) + { + component.RemoveChild(removeRegistryEntry); + } + + // set various values on the COM elements from their corresponding registry values + Hashtable indexedProcessedRegistryValues = new Hashtable(); + foreach (DictionaryEntry entry in indexedRegistryValues) + { + Wix.ISchemaElement element = (Wix.ISchemaElement)indexedElements[entry.Key]; + string parentIndex = null; + SortedList registryValues = (SortedList)entry.Value; + + // element-specific variables (for really tough situations) + string classAppId = null; + bool threadingModelSet = false; + + foreach (Wix.RegistryValue registryValue in registryValues.Values) + { + string[] parts = registryValue.Key.ToLower(CultureInfo.InvariantCulture).Split('\\'); + bool processed = false; + + if (element is Wix.AppId) + { + Wix.AppId appId = (Wix.AppId)element; + + if (2 == parts.Length) + { + if (null == registryValue.Name) + { + appId.Description = registryValue.Value; + processed = true; + } + } + } + else if (element is Wix.Class) + { + Wix.Class wixClass = (Wix.Class)element; + + if (2 == parts.Length) + { + if (null == registryValue.Name) + { + wixClass.Description = registryValue.Value; + processed = true; + } + else if (String.Equals(registryValue.Name, "AppID", StringComparison.OrdinalIgnoreCase)) + { + classAppId = registryValue.Value; + processed = true; + } + } + else if (3 == parts.Length) + { + Wix.Class.ContextType contextType = Wix.Class.ContextType.None; + + switch (parts[2]) + { + case "control": + wixClass.Control = Wix.YesNoType.yes; + processed = true; + break; + case "inprochandler": + if (null == registryValue.Name) + { + if (null == wixClass.Handler) + { + wixClass.Handler = "1"; + processed = true; + } + else if ("2" == wixClass.Handler) + { + wixClass.Handler = "3"; + processed = true; + } + } + break; + case "inprochandler32": + if (null == registryValue.Name) + { + if (null == wixClass.Handler) + { + wixClass.Handler = "2"; + processed = true; + } + else if ("1" == wixClass.Handler) + { + wixClass.Handler = "3"; + processed = true; + } + } + break; + case "inprocserver": + contextType = Wix.Class.ContextType.InprocServer; + break; + case "inprocserver32": + contextType = Wix.Class.ContextType.InprocServer32; + break; + case "insertable": + wixClass.Insertable = Wix.YesNoType.yes; + processed = true; + break; + case "localserver": + contextType = Wix.Class.ContextType.LocalServer; + break; + case "localserver32": + contextType = Wix.Class.ContextType.LocalServer32; + break; + case "progid": + if (null == registryValue.Name) + { + Wix.ProgId progId = (Wix.ProgId)indexedElements[String.Concat(".progid/", registryValue.Value)]; + + // verify that the versioned ProgId appears under this Class element + // if not, toss the entire element + if (null == progId || wixClass != progId.ParentElement) + { + element = null; + } + else + { + processed = true; + } + } + break; + case "programmable": + wixClass.Programmable = Wix.YesNoType.yes; + processed = true; + break; + case "typelib": + if (null == registryValue.Name) + { + foreach (DictionaryEntry indexedEntry in indexedElements) + { + string key = (string)indexedEntry.Key; + Wix.ISchemaElement possibleTypeLib = (Wix.ISchemaElement)indexedEntry.Value; + + if (key.StartsWith(".typelib/", StringComparison.Ordinal) && + 0 == String.Compare(key, 9, registryValue.Value, 0, registryValue.Value.Length, StringComparison.OrdinalIgnoreCase)) + { + // ensure the TypeLib is nested under the same thing we want the Class under + if (null == parentIndex || indexedElements[parentIndex] == possibleTypeLib.ParentElement) + { + parentIndex = key; + processed = true; + } + } + } + } + break; + case "version": + if (null == registryValue.Name) + { + wixClass.Version = registryValue.Value; + processed = true; + } + break; + case "versionindependentprogid": + if (null == registryValue.Name) + { + Wix.ProgId progId = (Wix.ProgId)indexedElements[String.Concat(".progid/", registryValue.Value)]; + + // verify that the version independent ProgId appears somewhere + // under this Class element - if not, toss the entire element + if (null == progId || wixClass != progId.ParentElement) + { + // check the parent of the parent + if (null == progId || null == progId.ParentElement || wixClass != progId.ParentElement.ParentElement) + { + element = null; + } + } + + processed = true; + } + break; + } + + if (Wix.Class.ContextType.None != contextType) + { + wixClass.Context |= contextType; + + if (null == registryValue.Name) + { + if ((registryValue.Value.StartsWith("[!", StringComparison.Ordinal) || registryValue.Value.StartsWith("[#", StringComparison.Ordinal)) + && registryValue.Value.EndsWith("]", StringComparison.Ordinal)) + { + parentIndex = String.Concat("file/", registryValue.Value.Substring(2, registryValue.Value.Length - 3)); + processed = true; + } + else if (String.Equals(Path.GetFileName(registryValue.Value), "mscoree.dll", StringComparison.OrdinalIgnoreCase)) + { + wixClass.ForeignServer = "mscoree.dll"; + processed = true; + } + else if (String.Equals(Path.GetFileName(registryValue.Value), "msvbvm60.dll", StringComparison.OrdinalIgnoreCase)) + { + wixClass.ForeignServer = "msvbvm60.dll"; + processed = true; + } + else + { + // Some servers are specifying relative paths (which the above code doesn't find) + // If there's any ambiguity leave it alone and let the developer figure it out when it breaks in the compiler + + bool possibleDuplicate = false; + string possibleParentIndex = null; + + foreach (Wix.File file in this.files) + { + if (String.Equals(registryValue.Value, Path.GetFileName(file.Source), StringComparison.OrdinalIgnoreCase)) + { + if (null == possibleParentIndex) + { + possibleParentIndex = String.Concat("file/", file.Id); + } + else + { + possibleDuplicate = true; + break; + } + } + } + + if (!possibleDuplicate) + { + if (null == possibleParentIndex) + { + wixClass.ForeignServer = registryValue.Value; + processed = true; + } + else + { + parentIndex = possibleParentIndex; + wixClass.RelativePath = Wix.YesNoType.yes; + processed = true; + } + } + } + } + else if (String.Equals(registryValue.Name, "ThreadingModel", StringComparison.OrdinalIgnoreCase)) + { + Wix.Class.ThreadingModelType threadingModel; + + if (String.Equals(registryValue.Value, "apartment", StringComparison.OrdinalIgnoreCase)) + { + threadingModel = Wix.Class.ThreadingModelType.apartment; + processed = true; + } + else if (String.Equals(registryValue.Value, "both", StringComparison.OrdinalIgnoreCase)) + { + threadingModel = Wix.Class.ThreadingModelType.both; + processed = true; + } + else if (String.Equals(registryValue.Value, "free", StringComparison.OrdinalIgnoreCase)) + { + threadingModel = Wix.Class.ThreadingModelType.free; + processed = true; + } + else if (String.Equals(registryValue.Value, "neutral", StringComparison.OrdinalIgnoreCase)) + { + threadingModel = Wix.Class.ThreadingModelType.neutral; + processed = true; + } + else if (String.Equals(registryValue.Value, "rental", StringComparison.OrdinalIgnoreCase)) + { + threadingModel = Wix.Class.ThreadingModelType.rental; + processed = true; + } + else if (String.Equals(registryValue.Value, "single", StringComparison.OrdinalIgnoreCase)) + { + threadingModel = Wix.Class.ThreadingModelType.single; + processed = true; + } + else + { + continue; + } + + if (!threadingModelSet || wixClass.ThreadingModel == threadingModel) + { + wixClass.ThreadingModel = threadingModel; + threadingModelSet = true; + } + else + { + element = null; + break; + } + } + } + } + else if (4 == parts.Length) + { + if (String.Equals(parts[2], "implemented categories", StringComparison.Ordinal)) + { + switch (parts[3]) + { + case "{7dd95801-9882-11cf-9fa9-00aa006c42c4}": + wixClass.SafeForScripting = Wix.YesNoType.yes; + processed = true; + break; + case "{7dd95802-9882-11cf-9fa9-00aa006c42c4}": + wixClass.SafeForInitializing = Wix.YesNoType.yes; + processed = true; + break; + } + } + } + } + else if (element is Wix.Interface) + { + Wix.Interface wixInterface = (Wix.Interface)element; + + if (2 == parts.Length && null == registryValue.Name) + { + wixInterface.Name = registryValue.Value; + processed = true; + } + else if (3 == parts.Length) + { + switch (parts[2]) + { + case "proxystubclsid": + if (null == registryValue.Name) + { + wixInterface.ProxyStubClassId = registryValue.Value.ToUpper(CultureInfo.InvariantCulture); + processed = true; + } + break; + case "proxystubclsid32": + if (null == registryValue.Name) + { + wixInterface.ProxyStubClassId32 = registryValue.Value.ToUpper(CultureInfo.InvariantCulture); + processed = true; + } + break; + case "nummethods": + if (null == registryValue.Name) + { + wixInterface.NumMethods = Convert.ToInt32(registryValue.Value, CultureInfo.InvariantCulture); + processed = true; + } + break; + case "typelib": + if (String.Equals("Version", registryValue.Name, StringComparison.OrdinalIgnoreCase)) + { + parentIndex = String.Concat(parentIndex, registryValue.Value); + processed = true; + } + else if (null == registryValue.Name) // TypeLib guid + { + parentIndex = String.Concat(".typelib/", registryValue.Value, '/', parentIndex); + processed = true; + } + break; + } + } + } + else if (element is Wix.ProgId) + { + Wix.ProgId progId = (Wix.ProgId)element; + + if (null == registryValue.Name) + { + if (1 == parts.Length) + { + progId.Description = registryValue.Value; + processed = true; + } + else if (2 == parts.Length) + { + if (String.Equals(parts[1], "CLSID", StringComparison.OrdinalIgnoreCase)) + { + parentIndex = String.Concat("CLSID/", registryValue.Value); + processed = true; + } + else if (String.Equals(parts[1], "CurVer", StringComparison.OrdinalIgnoreCase)) + { + // If a progId points to its own ProgId with CurVer, it isn't meaningful, so ignore it + if (!String.Equals(progId.Id, registryValue.Value, StringComparison.OrdinalIgnoreCase)) + { + // this registry value should usually be processed second so the + // version independent ProgId should be under the versioned one + parentIndex = String.Concat(".progid/", registryValue.Value); + processed = true; + } + } + } + } + } + else if (element is Wix.TypeLib) + { + Wix.TypeLib typeLib = (Wix.TypeLib)element; + + if (null == registryValue.Name) + { + if (3 == parts.Length) + { + typeLib.Description = registryValue.Value; + processed = true; + } + else if (4 == parts.Length) + { + if (String.Equals(parts[3], "flags", StringComparison.OrdinalIgnoreCase)) + { + int flags = Convert.ToInt32(registryValue.Value, CultureInfo.InvariantCulture); + + if (0x1 == (flags & 0x1)) + { + typeLib.Restricted = Wix.YesNoType.yes; + } + + if (0x2 == (flags & 0x2)) + { + typeLib.Control = Wix.YesNoType.yes; + } + + if (0x4 == (flags & 0x4)) + { + typeLib.Hidden = Wix.YesNoType.yes; + } + + if (0x8 == (flags & 0x8)) + { + typeLib.HasDiskImage = Wix.YesNoType.yes; + } + + processed = true; + } + else if (String.Equals(parts[3], "helpdir", StringComparison.OrdinalIgnoreCase)) + { + if (registryValue.Value.StartsWith("[", StringComparison.Ordinal) && (registryValue.Value.EndsWith("]", StringComparison.Ordinal) + || registryValue.Value.EndsWith("]\\", StringComparison.Ordinal))) + { + typeLib.HelpDirectory = registryValue.Value.Substring(1, registryValue.Value.LastIndexOf(']') - 1); + } + else if (0 == String.Compare(registryValue.Value, Environment.SystemDirectory, StringComparison.OrdinalIgnoreCase)) // VB6 DLLs register their help directory as SystemFolder + { + typeLib.HelpDirectory = "SystemFolder"; + } + else if (null != component.Directory) // -sfrag has not been specified + { + typeLib.HelpDirectory = component.Directory; + } + else if (component.ParentElement is Wix.Directory) // -sfrag has been specified + { + typeLib.HelpDirectory = ((Wix.Directory)component.ParentElement).Id; + } + else if (component.ParentElement is Wix.DirectoryRef) // -sfrag has been specified + { + typeLib.HelpDirectory = ((Wix.DirectoryRef)component.ParentElement).Id; + } + + //If the helpdir has not matched a known directory, drop it because it cannot be resolved. + processed = true; + } + } + else if (5 == parts.Length && String.Equals("win32", parts[4], StringComparison.OrdinalIgnoreCase)) + { + typeLib.Language = Convert.ToInt32(parts[3], CultureInfo.InvariantCulture); + + if ((registryValue.Value.StartsWith("[!", StringComparison.Ordinal) || registryValue.Value.StartsWith("[#", StringComparison.Ordinal)) + && registryValue.Value.EndsWith("]", StringComparison.Ordinal)) + { + parentIndex = String.Concat("file/", registryValue.Value.Substring(2, registryValue.Value.Length - 3)); + } + + processed = true; + } + } + } + + // index the processed registry values by their corresponding COM element + if (processed) + { + indexedProcessedRegistryValues.Add(registryValue, element); + } + } + + // parent the COM element + if (null != element) + { + if (null != parentIndex) + { + Wix.IParentElement parentElement = (Wix.IParentElement)indexedElements[parentIndex]; + + if (null != parentElement) + { + parentElement.AddChild(element); + } + } + else if (0 < indexedProcessedRegistryValues.Count) + { + component.AddChild(element); + } + + // special handling for AppID since it doesn't fit the general model + if (null != classAppId) + { + Wix.AppId appId = (Wix.AppId)indexedElements[String.Concat("AppID/", classAppId)]; + + // move the Class element under the AppId (and put the AppId under its old parent) + if (null != appId) + { + // move the AppId element + ((Wix.IParentElement)appId.ParentElement).RemoveChild(appId); + ((Wix.IParentElement)element.ParentElement).AddChild(appId); + + // move the Class element + ((Wix.IParentElement)element.ParentElement).RemoveChild(element); + appId.AddChild(element); + } + } + } + } + + // remove the RegistryValue elements which were converted into COM elements + // that were successfully nested under the Component element + foreach (DictionaryEntry entry in indexedProcessedRegistryValues) + { + Wix.ISchemaElement element = (Wix.ISchemaElement)entry.Value; + Wix.RegistryValue registryValue = (Wix.RegistryValue)entry.Key; + + while (null != element) + { + if (element == component) + { + ((Wix.IParentElement)registryValue.ParentElement).RemoveChild(registryValue); + break; + } + + element = element.ParentElement; + } + } + } + } + + /// + /// Mutate the directories. + /// + private void MutateDirectories() + { + foreach (Wix.Directory directory in this.directories) + { + string path = directory.FileSource; + + // create a new directory element without the FileSource attribute + if (null != path) + { + Wix.Directory newDirectory = new Wix.Directory(); + + newDirectory.Id = directory.Id; + newDirectory.Name = directory.Name; + + foreach (Wix.ISchemaElement element in directory.Children) + { + newDirectory.AddChild(element); + } + + ((Wix.IParentElement)directory.ParentElement).AddChild(newDirectory); + ((Wix.IParentElement)directory.ParentElement).RemoveChild(directory); + + if (null != newDirectory.Id) + { + this.directoryPaths[path.ToLower(CultureInfo.InvariantCulture)] = String.Concat("[", newDirectory.Id, "]"); + } + } + } + } + + /// + /// Mutate the files. + /// + private void MutateFiles() + { + string sourceDirSubstitution = this.preprocessorVariable; + if (sourceDirSubstitution != null) + { + string prefix = "$("; + if (sourceDirSubstitution.StartsWith("wix.", StringComparison.Ordinal)) + { + prefix = "!("; + } + sourceDirSubstitution = String.Concat(prefix, sourceDirSubstitution, ")"); + } + + foreach (Wix.File file in this.files) + { + if (null != file.Id && null != file.Source) + { + string fileSource = this.Core.ResolveFilePath(file.Source); + + // index the long path + this.filePaths[fileSource.ToLower(CultureInfo.InvariantCulture)] = String.Concat("[#", file.Id, "]"); + + // index the long path as a URL for assembly harvesting + Uri fileUri = new Uri(fileSource); + this.filePaths[fileUri.ToString().ToLower(CultureInfo.InvariantCulture)] = String.Concat("file:///[#", file.Id, "]"); + + // index the short path + string shortPath = NativeMethods.GetShortPathName(fileSource); + this.filePaths[shortPath.ToLower(CultureInfo.InvariantCulture)] = String.Concat("[!", file.Id, "]"); + + // escape literal $ characters + file.Source = file.Source.Replace("$", "$$"); + + if (null != sourceDirSubstitution && file.Source.StartsWith("SourceDir\\", StringComparison.Ordinal)) + { + file.Source = file.Source.Substring(9).Insert(0, sourceDirSubstitution); + } + } + } + } + + /// + /// Mutate an individual registry string, according to a collection of replacement items. + /// + /// The string to mutate. + /// The collection of items to replace within the string. + /// The mutated registry string. + private string MutateRegistryString(string value, ICollection replace) + { + int index; + string lowercaseValue = value.ToLower(CultureInfo.InvariantCulture); + + foreach (DictionaryEntry entry in replace) + { + while (0 <= (index = lowercaseValue.IndexOf((string)entry.Key, StringComparison.Ordinal))) + { + value = value.Remove(index, ((string)entry.Key).Length); + value = value.Insert(index, (string)entry.Value); + lowercaseValue = value.ToLower(CultureInfo.InvariantCulture); + } + } + + return value; + } + + /// + /// Mutate the registry values. + /// + private void MutateRegistryValues() + { + if (this.SuppressVB6COMElements && this.SuppressCOMElements) + { + var vb6RegistryValues = new List(); + foreach (Wix.RegistryValue registryValue in this.registryValues) + { + if (IsVb6RegistryValue(registryValue)) + { + if (!vb6RegistryValues.Contains(registryValue)) + { + vb6RegistryValues.Add(registryValue); + } + } + } + + // Remove all the VB6 specific COM registry values + foreach (var reg in vb6RegistryValues) + { + if (reg.ParentElement is Wix.Component component) + { + component.RemoveChild(reg); + } + this.registryValues.Remove(reg); + } + } + + + ArrayList reversedDirectoryPaths = new ArrayList(); + + // reverse the indexed directory paths to ensure the longest paths are found first + foreach (DictionaryEntry entry in this.directoryPaths) + { + reversedDirectoryPaths.Insert(0, entry); + } + + foreach (Wix.RegistryValue registryValue in this.registryValues) + { + // Multi-string values are stored as children - their "Value" member is null + if (Wix.RegistryValue.TypeType.multiString == registryValue.Type) + { + foreach (Wix.MultiStringValue multiStringValue in registryValue.Children) + { + // first replace file paths with their MSI tokens + multiStringValue.Content = this.MutateRegistryString(multiStringValue.Content, (ICollection)this.filePaths); + // next replace directory paths with their MSI tokens + multiStringValue.Content = this.MutateRegistryString(multiStringValue.Content, (ICollection)reversedDirectoryPaths); + } + } + else + { + // first replace file paths with their MSI tokens + registryValue.Value = this.MutateRegistryString(registryValue.Value, (ICollection)this.filePaths); + // next replace directory paths with their MSI tokens + registryValue.Value = this.MutateRegistryString(registryValue.Value, (ICollection)reversedDirectoryPaths); + } + } + } + + private static bool IsVb6RegistryValue(Wix.RegistryValue registryValue) + { + if (Wix.RegistryValue.ActionType.write == registryValue.Action && Wix.RegistryRootType.HKCR == registryValue.Root) + { + string[] parts = registryValue.Key.Split('\\'); + if (String.Equals(parts[0], "CLSID", StringComparison.OrdinalIgnoreCase)) + { + // Search for the VB6 CLSID {D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731} + if (2 <= parts.Length) + { + if (String.Equals(parts[1], "{D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731}", StringComparison.OrdinalIgnoreCase)) + { + return true; + } + } + } + else if (String.Equals(parts[0], "TypeLib", StringComparison.OrdinalIgnoreCase)) + { + // Search for the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046} + if (2 <= parts.Length) + { + if (String.Equals(parts[1], "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) || + String.Equals(parts[1], "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase)) + { + return true; + } + } + } + else if (String.Equals(parts[0], "Interface", StringComparison.OrdinalIgnoreCase)) + { + // Search for any Interfaces that reference the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046} + if (3 <= parts.Length) + { + if (String.Equals(parts[2], "TypeLib", StringComparison.OrdinalIgnoreCase)) + { + if (String.Equals(registryValue.Value, "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) || + String.Equals(registryValue.Value, "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase)) + { + return true; + } + } + } + } + } + return false; + } + + /// + /// The native methods for grabbing machine-specific short file paths. + /// + private class NativeMethods + { + /// + /// Gets the short name for a file. + /// + /// Fullpath to file on disk. + /// Short name for file. + internal static string GetShortPathName(string fullPath) + { + var bufferSize = (int)GetShortPathName(fullPath, null, 0); + if (0 == bufferSize) + { + int err = System.Runtime.InteropServices.Marshal.GetLastWin32Error(); + throw new System.Runtime.InteropServices.COMException(String.Concat("Failed to get short path buffer size for file: ", fullPath), err); + } + + bufferSize += 1; + var shortPath = new StringBuilder(bufferSize, bufferSize); + + uint result = GetShortPathName(fullPath, shortPath, bufferSize); + + if (0 == result) + { + int err = System.Runtime.InteropServices.Marshal.GetLastWin32Error(); + throw new System.Runtime.InteropServices.COMException(String.Concat("Failed to get short path name for file: ", fullPath), err); + } + + return shortPath.ToString(); + } + + /// + /// Gets the short name for a file. + /// + /// Long path to convert to short path. + /// Short path from long path. + /// Size of short path. + /// zero if success. + [DllImport("kernel32.dll", EntryPoint = "GetShortPathNameW", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] + internal static extern uint GetShortPathName(string longPath, StringBuilder shortPath, [MarshalAs(UnmanagedType.U4)]int buffer); + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections; + using System.IO; + using System.Reflection; + using System.Runtime.InteropServices; + using WixToolset.Data; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// The WiX Toolset harvester mutator. + /// + public sealed class UtilHarvesterMutator : BaseMutatorExtension + { + // Flags for SetErrorMode() native method. + private const UInt32 SEM_FAILCRITICALERRORS = 0x0001; + private const UInt32 SEM_NOGPFAULTERRORBOX = 0x0002; + private const UInt32 SEM_NOALIGNMENTFAULTEXCEPT = 0x0004; + private const UInt32 SEM_NOOPENFILEERRORBOX = 0x8000; + + // Remember whether we were able to call OaEnablePerUserTLibRegistration + private bool calledPerUserTLibReg; + + /// + /// allow process to handle serious system errors. + /// + [DllImport("Kernel32.dll")] + private static extern void SetErrorMode(UInt32 uiMode); + + /// + /// enable the RegisterTypeLib API to use the appropriate override mapping for non-admin users on Vista + /// + [DllImport("Oleaut32.dll")] + private static extern void OaEnablePerUserTLibRegistration(); + + public UtilHarvesterMutator() + { + this.calledPerUserTLibReg = false; + + SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); + + try + { + OaEnablePerUserTLibRegistration(); + this.calledPerUserTLibReg = true; + } + catch (EntryPointNotFoundException) + { + } + } + + /// + /// Gets the sequence of this mutator extension. + /// + /// The sequence of this mutator extension. + public override int Sequence + { + get { return 100; } + } + + /// + /// Mutate a WiX document. + /// + /// The Wix document element. + public override void Mutate(Wix.Wix wix) + { + this.MutateElement(null, wix); + } + + /// + /// Mutate an element. + /// + /// The parent of the element to mutate. + /// The element to mutate. + private void MutateElement(Wix.IParentElement parentElement, Wix.ISchemaElement element) + { + if (element is Wix.File) + { + this.MutateFile(parentElement, (Wix.File)element); + } + + // mutate the child elements + if (element is Wix.IParentElement) + { + ArrayList childElements = new ArrayList(); + + // copy the child elements to a temporary array (to allow them to be deleted/moved) + foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children) + { + childElements.Add(childElement); + } + + foreach (Wix.ISchemaElement childElement in childElements) + { + this.MutateElement((Wix.IParentElement)element, childElement); + } + } + } + + /// + /// Mutate a file. + /// + /// The parent of the element to mutate. + /// The file to mutate. + private void MutateFile(Wix.IParentElement parentElement, Wix.File file) + { + if (null != file.Source) + { + string fileExtension = Path.GetExtension(file.Source); + string fileSource = this.Core.ResolveFilePath(file.Source); + + if (String.Equals(".ax", fileExtension, StringComparison.OrdinalIgnoreCase) || // DirectShow filter + String.Equals(".dll", fileExtension, StringComparison.OrdinalIgnoreCase) || + String.Equals(".exe", fileExtension, StringComparison.OrdinalIgnoreCase) || + String.Equals(".ocx", fileExtension, StringComparison.OrdinalIgnoreCase)) // ActiveX + { + // try the assembly harvester + try + { + AssemblyHarvester assemblyHarvester = new AssemblyHarvester(); + + this.Core.Messaging.Write(HarvesterVerboses.HarvestingAssembly(fileSource)); + Wix.RegistryValue[] registryValues = assemblyHarvester.HarvestRegistryValues(fileSource); + + foreach (Wix.RegistryValue registryValue in registryValues) + { + parentElement.AddChild(registryValue); + } + + // also try self-reg since we could have a mixed-mode assembly + this.HarvestSelfReg(parentElement, fileSource); + } + catch (BadImageFormatException) // not an assembly, try raw DLL. + { + this.HarvestSelfReg(parentElement, fileSource); + } + catch (Exception ex) + { + this.Core.Messaging.Write(HarvesterWarnings.AssemblyHarvestFailed(fileSource, ex.Message)); + } + } + else if (String.Equals(".olb", fileExtension, StringComparison.OrdinalIgnoreCase) || // type library + String.Equals(".tlb", fileExtension, StringComparison.OrdinalIgnoreCase)) // type library + { + // try the type library harvester + try + { + TypeLibraryHarvester typeLibHarvester = new TypeLibraryHarvester(); + + this.Core.Messaging.Write(HarvesterVerboses.HarvestingTypeLib(fileSource)); + Wix.RegistryValue[] registryValues = typeLibHarvester.HarvestRegistryValues(fileSource); + + foreach (Wix.RegistryValue registryValue in registryValues) + { + parentElement.AddChild(registryValue); + } + } + catch (COMException ce) + { + // 0x8002801C (TYPE_E_REGISTRYACCESS) + // If we don't have permission to harvest typelibs, it's likely because we're on + // Vista or higher and aren't an Admin, or don't have the appropriate QFE installed. + if (!this.calledPerUserTLibReg && (0x8002801c == unchecked((uint)ce.ErrorCode))) + { + this.Core.Messaging.Write(WarningMessages.InsufficientPermissionHarvestTypeLib()); + } + else if (0x80029C4A == unchecked((uint)ce.ErrorCode)) // generic can't load type library + { + this.Core.Messaging.Write(HarvesterWarnings.TypeLibLoadFailed(fileSource, ce.Message)); + } + } + } + } + } + + /// + /// Calls self-reg harvester. + /// + /// The parent element. + /// The file source. + private void HarvestSelfReg(Wix.IParentElement parentElement, string fileSource) + { + // try the self-reg harvester + try + { + DllHarvester dllHarvester = new DllHarvester(); + + this.Core.Messaging.Write(HarvesterVerboses.HarvestingSelfReg(fileSource)); + Wix.RegistryValue[] registryValues = dllHarvester.HarvestRegistryValues(fileSource); + + foreach (Wix.RegistryValue registryValue in registryValues) + { + parentElement.AddChild(registryValue); + } + } + catch (TargetInvocationException tie) + { + if (tie.InnerException is EntryPointNotFoundException) + { + // No DllRegisterServer(), which is fine by me. + } + else + { + this.Core.Messaging.Write(HarvesterWarnings.SelfRegHarvestFailed(fileSource, tie.Message)); + } + } + catch (Exception ex) + { + this.Core.Messaging.Write(HarvesterWarnings.SelfRegHarvestFailed(fileSource, ex.Message)); + } + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections.Generic; + using System.IO; + using WixToolset.Data; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + + /// + /// A utility heat extension for the WiX Toolset Harvester application. + /// + public sealed class UtilHeatExtension : BaseHeatExtension + { + public UtilHeatExtension(IServiceProvider serviceProvider) + { + } + + /// + /// Gets the supported command line types for this extension. + /// + /// The supported command line types for this extension. + public override HeatCommandLineOption[] CommandLineTypes + { + get + { + return new HeatCommandLineOption[] + { + new HeatCommandLineOption("dir", "harvest a directory"), + new HeatCommandLineOption("file", "harvest a file"), + new HeatCommandLineOption("perf", "harvest performance counters"), + new HeatCommandLineOption("reg", "harvest a .reg file"), + new HeatCommandLineOption("-ag", "autogenerate component guids at compile time"), + new HeatCommandLineOption("-cg ", "component group name (cannot contain spaces e.g -cg MyComponentGroup)"), + new HeatCommandLineOption("-dr ", "directory reference to root directories (cannot contain spaces e.g. -dr MyAppDirRef)"), + new HeatCommandLineOption("-var ", "substitute File/@Source=\"SourceDir\" with a preprocessor or a wix variable" + Environment.NewLine + + "(e.g. -var var.MySource will become File/@Source=\"$(var.MySource)\\myfile.txt\" and " + Environment.NewLine + + "-var wix.MySource will become File/@Source=\"!(wix.MySource)\\myfile.txt\""), + new HeatCommandLineOption("-gg", "generate guids now"), + new HeatCommandLineOption("-g1", "generated guids are not in brackets"), + new HeatCommandLineOption("-ke", "keep empty directories"), + new HeatCommandLineOption("-scom", "suppress COM elements"), + new HeatCommandLineOption("-sfrag", "suppress fragments"), + new HeatCommandLineOption("-srd", "suppress harvesting the root directory as an element"), + new HeatCommandLineOption("-svb6", "suppress VB6 COM elements"), + new HeatCommandLineOption("-sreg", "suppress registry harvesting"), + new HeatCommandLineOption("-suid", "suppress unique identifiers for files, components, & directories"), + new HeatCommandLineOption("-t", "transform harvested output with XSL file"), + new HeatCommandLineOption("-template", "use template, one of: fragment,module,product"), + }; + } + } + + /// + /// Parse the command line options for this extension. + /// + /// The active harvester type. + /// The option arguments. + public override void ParseOptions(string type, string[] args) + { + bool active = false; + IHarvesterExtension harvesterExtension = null; + bool suppressHarvestingRegistryValues = false; + UtilFinalizeHarvesterMutator utilFinalizeHarvesterMutator = new UtilFinalizeHarvesterMutator(); + UtilMutator utilMutator = new UtilMutator(); + List transformMutators = new List(); + GenerateType generateType = GenerateType.Components; + + // select the harvester + switch (type) + { + case "dir": + harvesterExtension = new DirectoryHarvester(); + active = true; + break; + case "file": + harvesterExtension = new FileHarvester(); + active = true; + break; + case "perf": + harvesterExtension = new PerformanceCategoryHarvester(); + active = true; + break; + case "reg": + harvesterExtension = new RegFileHarvester(); + active = true; + break; + } + + // set default settings + utilMutator.CreateFragments = true; + utilMutator.SetUniqueIdentifiers = true; + + // parse the options + for (int i = 0; i < args.Length; i++) + { + string commandSwitch = args[i]; + + if (null == commandSwitch || 0 == commandSwitch.Length) // skip blank arguments + { + continue; + } + + if ('-' == commandSwitch[0] || '/' == commandSwitch[0]) + { + string truncatedCommandSwitch = commandSwitch.Substring(1); + + if ("ag" == truncatedCommandSwitch) + { + utilMutator.AutogenerateGuids = true; + } + else if ("cg" == truncatedCommandSwitch) + { + utilMutator.ComponentGroupName = this.GetArgumentParameter(args, i); + + if (this.Core.Messaging.EncounteredError) + { + return; + } + } + else if ("dr" == truncatedCommandSwitch) + { + string dr = this.GetArgumentParameter(args, i); + + if (this.Core.Messaging.EncounteredError) + { + return; + } + + if (harvesterExtension is DirectoryHarvester) + { + ((DirectoryHarvester)harvesterExtension).RootedDirectoryRef = dr; + } + else if (harvesterExtension is FileHarvester) + { + ((FileHarvester)harvesterExtension).RootedDirectoryRef = dr; + } + } + else if ("gg" == truncatedCommandSwitch) + { + utilMutator.GenerateGuids = true; + } + else if ("g1" == truncatedCommandSwitch) + { + utilMutator.GuidFormat = "D"; + } + else if ("ke" == truncatedCommandSwitch) + { + if (harvesterExtension is DirectoryHarvester) + { + ((DirectoryHarvester)harvesterExtension).KeepEmptyDirectories = true; + } + else if (active) + { + // TODO: error message - not applicable to file harvester + } + } + else if ("scom" == truncatedCommandSwitch) + { + if (active) + { + utilFinalizeHarvesterMutator.SuppressCOMElements = true; + } + else + { + // TODO: error message - not applicable + } + } + else if ("svb6" == truncatedCommandSwitch) + { + if (active) + { + utilFinalizeHarvesterMutator.SuppressVB6COMElements = true; + } + else + { + // TODO: error message - not applicable + } + } + else if ("sfrag" == truncatedCommandSwitch) + { + utilMutator.CreateFragments = false; + } + else if ("srd" == truncatedCommandSwitch) + { + if (harvesterExtension is DirectoryHarvester) + { + ((DirectoryHarvester)harvesterExtension).SuppressRootDirectory = true; + } + else if (harvesterExtension is FileHarvester) + { + ((FileHarvester)harvesterExtension).SuppressRootDirectory = true; + } + } + else if ("sreg" == truncatedCommandSwitch) + { + suppressHarvestingRegistryValues = true; + } + else if ("suid" == truncatedCommandSwitch) + { + utilMutator.SetUniqueIdentifiers = false; + + if (harvesterExtension is DirectoryHarvester) + { + ((DirectoryHarvester)harvesterExtension).SetUniqueIdentifiers = false; + } + else if (harvesterExtension is FileHarvester) + { + ((FileHarvester)harvesterExtension).SetUniqueIdentifiers = false; + } + } + else if (truncatedCommandSwitch.StartsWith("t:", StringComparison.Ordinal) || "t" == truncatedCommandSwitch) + { + string xslFile; + if (truncatedCommandSwitch.StartsWith("t:", StringComparison.Ordinal)) + { + this.Core.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("t:", "t")); + xslFile = truncatedCommandSwitch.Substring(2); + } + else + { + xslFile = this.GetArgumentParameter(args, i, true); + } + + if (0 <= xslFile.IndexOf('\"')) + { + this.Core.Messaging.Write(ErrorMessages.PathCannotContainQuote(xslFile)); + return; + } + + try + { + xslFile = Path.GetFullPath(xslFile); + } + catch (Exception e) + { + this.Core.Messaging.Write(ErrorMessages.InvalidCommandLineFileName(xslFile, e.Message)); + return; + } + + transformMutators.Add(new UtilTransformMutator(xslFile, transformMutators.Count)); + } + else if (truncatedCommandSwitch.StartsWith("template:", StringComparison.Ordinal) || "template" == truncatedCommandSwitch) + { + string template; + if(truncatedCommandSwitch.StartsWith("template:", StringComparison.Ordinal)) + { + this.Core.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("template:", "template")); + template = truncatedCommandSwitch.Substring(9); + } + else + { + template = this.GetArgumentParameter(args, i); + } + + switch (template) + { + case "fragment": + utilMutator.TemplateType = TemplateType.Fragment; + break; + case "module": + utilMutator.TemplateType = TemplateType.Module; + break; + case "product": + utilMutator.TemplateType = TemplateType.Package ; + break; + default: + // TODO: error + break; + } + } + else if ("var" == truncatedCommandSwitch) + { + if (active) + { + utilFinalizeHarvesterMutator.PreprocessorVariable = this.GetArgumentParameter(args, i); + + if (this.Core.Messaging.EncounteredError) + { + return; + } + } + } + else if ("generate" == truncatedCommandSwitch) + { + if (harvesterExtension is DirectoryHarvester) + { + string genType = this.GetArgumentParameter(args, i).ToUpperInvariant(); + switch (genType) + { + case "COMPONENTS": + generateType = GenerateType.Components; + break; + case "PAYLOADGROUP": + generateType = GenerateType.PayloadGroup; + break; + default: + throw new WixException(HarvesterErrors.InvalidDirectoryOutputType(genType)); + } + } + else + { + // TODO: error message - not applicable + } + } + } + } + + // set the appropriate harvester extension + if (active) + { + this.Core.Harvester.Extension = harvesterExtension; + + if (!suppressHarvestingRegistryValues) + { + this.Core.Mutator.AddExtension(new UtilHarvesterMutator()); + } + + this.Core.Mutator.AddExtension(utilFinalizeHarvesterMutator); + + if (harvesterExtension is DirectoryHarvester directoryHarvester) + { + directoryHarvester.GenerateType = generateType; + this.Core.Harvester.Core.RootDirectory = this.Core.Harvester.Core.ExtensionArgument; + } + else if (harvesterExtension is FileHarvester) + { + if (((FileHarvester)harvesterExtension).SuppressRootDirectory) + { + this.Core.Harvester.Core.RootDirectory = Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument)); + } + else + { + this.Core.Harvester.Core.RootDirectory = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument))); + + // GetDirectoryName() returns null for root paths such as "c:\", so make sure to support that as well + if (null == this.Core.Harvester.Core.RootDirectory) + { + this.Core.Harvester.Core.RootDirectory = Path.GetPathRoot(Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument))); + } + } + } + } + + // set the mutator + this.Core.Mutator.AddExtension(utilMutator); + + // add the transforms + foreach (UtilTransformMutator transformMutator in transformMutators) + { + this.Core.Mutator.AddExtension(transformMutator); + } + } + + private string GetArgumentParameter(string[] args, int index) + { + return this.GetArgumentParameter(args, index, false); + } + + private string GetArgumentParameter(string[] args, int index, bool allowSpaces) + { + string truncatedCommandSwitch = args[index]; + string commandSwitchValue = args[index + 1]; + + //increment the index to the switch value + index++; + + if (IsValidArg(args, index) && !String.IsNullOrEmpty(commandSwitchValue.Trim())) + { + if (!allowSpaces && commandSwitchValue.Contains(" ")) + { + this.Core.Messaging.Write(HarvesterErrors.SpacesNotAllowedInArgumentValue(truncatedCommandSwitch, commandSwitchValue)); + } + else + { + return commandSwitchValue; + } + } + else + { + this.Core.Messaging.Write(HarvesterErrors.ArgumentRequiresValue(truncatedCommandSwitch)); + } + + return null; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections; + using System.Diagnostics; + using System.Globalization; + using System.IO; + using WixToolset.Harvesters.Extensibility; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// The template type. + /// + public enum TemplateType + { + /// + /// A fragment template. + /// + Fragment, + + /// + /// A module template. + /// + Module, + + /// + /// A product template. + /// + Package + } + + /// + /// The mutator for the WiX Toolset Internet Information Services Extension. + /// + public sealed class UtilMutator : BaseMutatorExtension + { + private ArrayList components; + private ArrayList componentGroups; + private string componentGroupName; + private bool createFragments; + private ArrayList directories; + private ArrayList directoryRefs; + private ArrayList files; + private ArrayList features; + private SortedList fragments; + private bool autogenerateGuids; + private bool generateGuids; + private string guidFormat = "B"; // Defaults to guid in {} + private Wix.IParentElement rootElement; + private bool setUniqueIdentifiers; + private TemplateType templateType; + + /// + /// Instantiate a new UtilMutator. + /// + public UtilMutator() + { + this.components = new ArrayList(); + this.componentGroups = new ArrayList(); + this.directories = new ArrayList(); + this.directoryRefs = new ArrayList(); + this.features = new ArrayList(); + this.files = new ArrayList(); + this.fragments = new SortedList(); + } + + /// + /// Gets or sets the value of the component group name. + /// + /// The component group name. + public string ComponentGroupName + { + get { return this.componentGroupName; } + set { this.componentGroupName = value; } + } + + /// + /// Gets or sets the option to create fragments. + /// + /// The option to create fragments. + public bool CreateFragments + { + get { return this.createFragments; } + set { this.createFragments = value; } + } + + /// + /// Gets or sets the option to autogenerate component guids at compile time. + /// + /// The option to autogenerate component guids. + public bool AutogenerateGuids + { + get { return this.autogenerateGuids; } + set { this.autogenerateGuids = value; } + } + + /// + /// Gets or sets the option to generate missing guids. + /// + /// The option to generate missing guids. + public bool GenerateGuids + { + get { return this.generateGuids; } + set { this.generateGuids = value; } + } + + /// + /// Gets or sets the option to set the format of guids. + /// D - 32 digits separated by hyphens: + /// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + /// B - 32 digits separated by hyphens, enclosed in brackets: + /// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} + /// + /// Guid format either B or D. + public string GuidFormat + { + get { return this.guidFormat; } + set { this.guidFormat = value; } + } + + /// + /// Gets the sequence of the extension. + /// + /// The sequence of the extension. + public override int Sequence + { + get { return 1000; } + } + + /// + /// Gets of sets the option to set unique identifiers. + /// + /// The option to set unique identifiers. + public bool SetUniqueIdentifiers + { + get { return this.setUniqueIdentifiers; } + set { this.setUniqueIdentifiers = value; } + } + + /// + /// Gets or sets the template type. + /// + /// The template type. + public TemplateType TemplateType + { + get { return this.templateType; } + set { this.templateType = value; } + } + + /// + /// Mutate a WiX document. + /// + /// The Wix document element. + public override void Mutate(Wix.Wix wix) + { + this.components.Clear(); + this.directories.Clear(); + this.directoryRefs.Clear(); + this.features.Clear(); + this.files.Clear(); + this.fragments.Clear(); + this.rootElement = null; + + // index elements in this wix document + this.IndexElement(wix); + + this.MutateWix(wix); + + this.MutateFiles(); + + this.MutateDirectories(); + + this.MutateComponents(); + + if (null != this.componentGroupName) + { + this.CreateComponentGroup(wix); + } + + // add the components to the product feature after all the identifiers have been set + if (TemplateType.Package == this.templateType) + { + Wix.Feature feature = (Wix.Feature)this.features[0]; + + foreach (Wix.ComponentGroup group in this.componentGroups) + { + Wix.ComponentGroupRef componentGroupRef = new Wix.ComponentGroupRef(); + componentGroupRef.Id = group.Id; + + feature.AddChild(componentGroupRef); + } + } + else if (TemplateType.Module == this.templateType) + { + foreach (Wix.ISchemaElement element in wix.Children) + { + if (element is Wix.Module) + { + foreach (Wix.ComponentGroup group in this.componentGroups) + { + Wix.ComponentGroupRef componentGroupRef = new Wix.ComponentGroupRef(); + componentGroupRef.Id = group.Id; + + ((Wix.IParentElement)element).AddChild(componentGroupRef); + } + break; + } + } + } + + //if(!this.createFragments && TemplateType.Package + foreach (Wix.Fragment fragment in this.fragments.Values) + { + wix.AddChild(fragment); + } + } + + /// + /// Creates a component group with a given name. + /// + /// The Wix document element. + private void CreateComponentGroup(Wix.Wix wix) + { + Wix.ComponentGroup componentGroup = new Wix.ComponentGroup(); + componentGroup.Id = this.componentGroupName; + this.componentGroups.Add(componentGroup); + + Wix.Fragment cgFragment = new Wix.Fragment(); + cgFragment.AddChild(componentGroup); + wix.AddChild(cgFragment); + + int componentCount = 0; + for (; componentCount < this.components.Count; componentCount++) + { + Wix.Component c = this.components[componentCount] as Wix.Component; + + if (this.createFragments) + { + if (c.ParentElement is Wix.Directory) + { + Wix.Directory parentDirectory = c.ParentElement as Wix.Directory; + + componentGroup.AddChild(c); + c.Directory = parentDirectory.Id; + parentDirectory.RemoveChild(c); + } + else if (c.ParentElement is Wix.DirectoryRef) + { + Wix.DirectoryRef parentDirectory = c.ParentElement as Wix.DirectoryRef; + + componentGroup.AddChild(c); + c.Directory = parentDirectory.Id; + parentDirectory.RemoveChild(c); + + // Remove whole fragment if moving the component to the component group just leaves an empty DirectoryRef + if (0 < this.fragments.Count && parentDirectory.ParentElement is Wix.Fragment) + { + Wix.Fragment parentFragment = parentDirectory.ParentElement as Wix.Fragment; + int childCount = 0; + foreach (Wix.ISchemaElement element in parentFragment.Children) + { + childCount++; + } + + // 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. + if (1 == childCount && !String.IsNullOrEmpty(c.Id)) + { + int removeIndex = this.fragments.IndexOfKey(String.Concat("Component:", c.Id)); + if (0 <= removeIndex) + { + this.fragments.RemoveAt(removeIndex); + } + } + } + } + } + else + { + Wix.ComponentRef componentRef = new Wix.ComponentRef(); + componentRef.Id = c.Id; + componentGroup.AddChild(componentRef); + } + } + } + + /// + /// Index an element. + /// + /// The element to index. + private void IndexElement(Wix.ISchemaElement element) + { + if (element is Wix.Component) + { + this.components.Add(element); + } + else if (element is Wix.ComponentGroup) + { + this.componentGroups.Add(element); + } + else if (element is Wix.Directory) + { + this.directories.Add(element); + } + else if (element is Wix.DirectoryRef) + { + this.directoryRefs.Add(element); + } + else if (element is Wix.Feature) + { + this.features.Add(element); + } + else if (element is Wix.File) + { + this.files.Add(element); + } + else if (element is Wix.Module || element is Wix.PatchCreation || element is Wix.Package) + { + Debug.Assert(null == this.rootElement); + this.rootElement = (Wix.IParentElement)element; + } + + // index the child elements + if (element is Wix.IParentElement) + { + foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children) + { + this.IndexElement(childElement); + } + } + } + + /// + /// Mutate the components. + /// + private void MutateComponents() + { + IdentifierGenerator identifierGenerator = new IdentifierGenerator("Component", this.Core); + if (TemplateType.Module == this.templateType) + { + identifierGenerator.MaxIdentifierLength = IdentifierGenerator.MaxModuleIdentifierLength; + } + + foreach (Wix.Component component in this.components) + { + if (null == component.Id) + { + string firstFileId = string.Empty; + + // attempt to create a possible identifier from the first file identifier in the component + foreach (Wix.File file in component[typeof(Wix.File)]) + { + firstFileId = file.Id; + break; + } + + if (string.IsNullOrEmpty(firstFileId)) + { + firstFileId = this.GetGuid(); + } + + component.Id = identifierGenerator.GetIdentifier(firstFileId); + } + + if (null == component.Guid) + { + if (this.AutogenerateGuids) + { + component.Guid = "*"; + } + else + { + component.Guid = this.GetGuid(); + } + } + + if (this.createFragments && component.ParentElement is Wix.Directory) + { + Wix.Directory directory = (Wix.Directory)component.ParentElement; + + // parent directory must have an identifier to create a reference to it + if (null == directory.Id) + { + break; + } + + if (this.rootElement is Wix.Module) + { + // add a ComponentRef for the Component + Wix.ComponentRef componentRef = new Wix.ComponentRef(); + componentRef.Id = component.Id; + this.rootElement.AddChild(componentRef); + } + + // create a new Fragment + Wix.Fragment fragment = new Wix.Fragment(); + this.fragments.Add(String.Concat("Component:", (null != component.Id ? component.Id : this.fragments.Count.ToString())), fragment); + + // create a new DirectoryRef + Wix.DirectoryRef directoryRef = new Wix.DirectoryRef(); + directoryRef.Id = directory.Id; + fragment.AddChild(directoryRef); + + // move the Component from the the Directory to the DirectoryRef + directory.RemoveChild(component); + directoryRef.AddChild(component); + } + } + } + + /// + /// Mutate the directories. + /// + private void MutateDirectories() + { + if (!this.setUniqueIdentifiers) + { + // assign all identifiers before fragmenting (because fragmenting requires them all to be present) + IdentifierGenerator identifierGenerator = new IdentifierGenerator("Directory", this.Core); + if (TemplateType.Module == this.templateType) + { + identifierGenerator.MaxIdentifierLength = IdentifierGenerator.MaxModuleIdentifierLength; + } + + foreach (Wix.Directory directory in this.directories) + { + if (null == directory.Id) + { + directory.Id = identifierGenerator.GetIdentifier(directory.Name); + } + } + } + + if (this.createFragments) + { + foreach (Wix.Directory directory in this.directories) + { + if (directory.ParentElement is Wix.Directory) + { + Wix.Directory parentDirectory = (Wix.Directory)directory.ParentElement; + + // parent directory must have an identifier to create a reference to it + if (null == parentDirectory.Id) + { + return; + } + + // create a new Fragment + Wix.Fragment fragment = new Wix.Fragment(); + this.fragments.Add(String.Concat("Directory:", ("TARGETDIR" == directory.Id ? null : (null != directory.Id ? directory.Id : this.fragments.Count.ToString()))), fragment); + + // create a new DirectoryRef + Wix.DirectoryRef directoryRef = new Wix.DirectoryRef(); + directoryRef.Id = parentDirectory.Id; + fragment.AddChild(directoryRef); + + // move the Directory from the parent Directory to DirectoryRef + parentDirectory.RemoveChild(directory); + directoryRef.AddChild(directory); + } + else if (directory.ParentElement is Wix.Fragment) + { + // When creating fragments, remove any top-level Directory elements; + // the fragments should be pulled in by their DirectoryRefs instead. + Wix.Fragment parent = (Wix.Fragment)directory.ParentElement; + parent.RemoveChild(directory); + + // Remove the fragment if it is empty. + if (parent.Children.GetEnumerator().Current == null && parent.ParentElement != null) + { + ((Wix.IParentElement)parent.ParentElement).RemoveChild(parent); + } + } + else if (directory.ParentElement == this.rootElement) + { + // create a new Fragment + Wix.Fragment fragment = new Wix.Fragment(); + this.fragments.Add(String.Concat("Directory:", ("TARGETDIR" == directory.Id ? null : (null != directory.Id ? directory.Id : this.fragments.Count.ToString()))), fragment); + + // move the Directory from the root element to the Fragment + this.rootElement.RemoveChild(directory); + fragment.AddChild(directory); + } + } + } + } + + /// + /// Mutate the files. + /// + private void MutateFiles() + { + IdentifierGenerator identifierGenerator = new IdentifierGenerator("File", this.Core); + if (TemplateType.Module == this.templateType) + { + identifierGenerator.MaxIdentifierLength = IdentifierGenerator.MaxModuleIdentifierLength; + } + + foreach (Wix.File file in this.files) + { + if (null == file.Id) + { + file.Id = identifierGenerator.GetIdentifier(Path.GetFileName(file.Source)); + } + } + } + + /// + /// Mutate a Wix element. + /// + /// The Wix element to mutate. + private void MutateWix(Wix.Wix wix) + { + if (TemplateType.Fragment != this.templateType) + { + if (null != this.rootElement || 0 != this.features.Count) + { + throw new Exception("The template option cannot be used with Feature, Package, or Module elements present."); + } + + // create a package element although it won't always be used + Wix.SummaryInformation package = new Wix.SummaryInformation(); + if (TemplateType.Module == this.templateType) + { + package.Id = this.GetGuid(); + } + else + { + package.Compressed = Wix.YesNoType.yes; + } + + package.InstallerVersion = 200; + + Wix.Directory targetDir = new Wix.Directory(); + targetDir.Id = "TARGETDIR"; + targetDir.Name = "SourceDir"; + + foreach (Wix.DirectoryRef directoryRef in this.directoryRefs) + { + if (String.Equals(directoryRef.Id, "TARGETDIR", StringComparison.OrdinalIgnoreCase)) + { + Wix.IParentElement parent = directoryRef.ParentElement as Wix.IParentElement; + + foreach (Wix.ISchemaElement element in directoryRef.Children) + { + targetDir.AddChild(element); + } + + parent.RemoveChild(directoryRef); + + if (null != ((Wix.ISchemaElement)parent).ParentElement) + { + int i = 0; + + foreach (Wix.ISchemaElement element in parent.Children) + { + i++; + } + + if (0 == i) + { + Wix.IParentElement supParent = (Wix.IParentElement)((Wix.ISchemaElement)parent).ParentElement; + supParent.RemoveChild((Wix.ISchemaElement)parent); + } + } + + break; + } + } + + if (TemplateType.Module == this.templateType) + { + Wix.Module module = new Wix.Module(); + module.Id = "PUT-MODULE-NAME-HERE"; + module.Language = "1033"; + module.Version = "1.0.0.0"; + + package.Manufacturer = "PUT-COMPANY-NAME-HERE"; + module.AddChild(package); + module.AddChild(targetDir); + + wix.AddChild(module); + this.rootElement = module; + } + else // product + { + Wix.Package product = new Wix.Package(); + product.Id = this.GetGuid(); + product.Language = "1033"; + product.Manufacturer = "PUT-COMPANY-NAME-HERE"; + product.Name = "PUT-PRODUCT-NAME-HERE"; + product.UpgradeCode = this.GetGuid(); + product.Version = "1.0.0.0"; + product.AddChild(package); + product.AddChild(targetDir); + + Wix.Media media = new Wix.Media(); + media.Id = "1"; + media.Cabinet = "product.cab"; + media.EmbedCab = Wix.YesNoType.yes; + product.AddChild(media); + + Wix.Feature feature = new Wix.Feature(); + feature.Id = "ProductFeature"; + feature.Title = "PUT-FEATURE-TITLE-HERE"; + feature.Level = 1; + product.AddChild(feature); + this.features.Add(feature); + + wix.AddChild(product); + this.rootElement = product; + } + } + } + + /// + /// Get a generated guid or a placeholder for a guid. + /// + /// A generated guid or placeholder. + private string GetGuid() + { + if (this.generateGuids) + { + return Guid.NewGuid().ToString(this.guidFormat, CultureInfo.InvariantCulture).ToUpper(CultureInfo.InvariantCulture); + } + else + { + return "PUT-GUID-HERE"; + } + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.IO; + using System.Xml; + using System.Xml.Xsl; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + + public sealed class UtilTransformMutator : BaseMutatorExtension + { + private string transform; + private int transformSequence; + + /// + /// Instantiate a new UtilTransformMutator. + /// + /// Path to the XSL transform file. + /// Order in which the transform should be applied, + /// relative to other transforms. + public UtilTransformMutator(string transform, int transformSequence) + { + this.transform = transform; + this.transformSequence = transformSequence; + } + + /// + /// Gets the sequence of the extension. + /// + /// The sequence of the extension. + public override int Sequence + { + get { return 3000 + this.transformSequence; } + } + + /// + /// Mutate a WiX document as a string. + /// + /// The Wix document element as a string. + /// The mutated Wix document as a string. + public override string Mutate(string wixString) + { + try + { + XslCompiledTransform xslt = new XslCompiledTransform(); + xslt.Load(this.transform, XsltSettings.TrustedXslt, new XmlUrlResolver()); + + using (XmlTextReader xmlReader = new XmlTextReader(new StringReader(wixString))) + { + using (StringWriter stringWriter = new StringWriter()) + { + XmlWriterSettings xmlSettings = new XmlWriterSettings(); + xmlSettings.Indent = true; + xmlSettings.IndentChars = " "; + xmlSettings.OmitXmlDeclaration = true; + + using (XmlWriter xmlWriter = XmlWriter.Create(stringWriter, xmlSettings)) + { + xslt.Transform(xmlReader, xmlWriter); + } + + wixString = stringWriter.ToString(); + } + } + } + catch (Exception ex) + { + this.Core.Messaging.Write(HarvesterErrors.ErrorTransformingHarvestedWiX(this.transform, ex.Message)); + return null; + } + + return wixString; + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.Collections; + using WixToolset.Data; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + + /// + /// Defines generated element types. + /// + public enum GenerateType + { + /// Generate Components. + Components, + + /// Generate a Container with Payloads. + Container, + + /// Generate a Bundle PackageGroups. + PackageGroup, + + /// Generate a PayloadGroup with Payloads. + PayloadGroup, + } + + /// + /// VS-related extensions for the WiX Toolset Harvester application. + /// + public sealed class VSHeatExtension : BaseHeatExtension + { + /// + /// Gets the supported command line types for this extension. + /// + /// The supported command line types for this extension. + public override HeatCommandLineOption[] CommandLineTypes + { + get + { + return new HeatCommandLineOption[] + { + new HeatCommandLineOption("project", "harvest outputs of a VS project"), + new HeatCommandLineOption("-configuration", "configuration to set when harvesting the project"), + new HeatCommandLineOption("-directoryid", "overridden directory id for generated directory elements"), + new HeatCommandLineOption("-generate", Environment.NewLine + + " specify what elements to generate, one of:" + Environment.NewLine + + " components, container, payloadgroup, packagegroup" + Environment.NewLine + + " (default is components)"), + new HeatCommandLineOption("-msbuildbinpath", "msbuild bin directory path"), + new HeatCommandLineOption("-platform", "platform to set when harvesting the project"), + new HeatCommandLineOption("-pog", Environment.NewLine + + " specify output group of VS project, one of:" + Environment.NewLine + + " " + String.Join(",", VSProjectHarvester.GetOutputGroupNames()) + Environment.NewLine + + " This option may be repeated for multiple output groups."), + new HeatCommandLineOption("-projectname", "overridden project name to use in variables"), + new HeatCommandLineOption("-usetoolsversion", "ignore msbuildbinpath if project specifies known msbuild version"), + new HeatCommandLineOption("-wixvar", "generate binder variables instead of preprocessor variables"), + }; + } + } + + /// + /// Parse the command line options for this extension. + /// + /// The active harvester type. + /// The option arguments. + public override void ParseOptions(string type, string[] args) + { + if ("project" == type) + { + string[] allOutputGroups = VSProjectHarvester.GetOutputGroupNames(); + bool suppressUniqueId = false; + bool generateWixVars = false; + bool useToolsVersion = false; + GenerateType generateType = GenerateType.Components; + string directoryIds = null; + string msbuildBinPath = null; + string projectName = null; + string configuration = null; + string platform = null; + ArrayList outputGroups = new ArrayList(); + + for (int i = 0; i < args.Length; i++) + { + if ("-configuration" == args[i]) + { + configuration = args[++i]; + } + else if ("-directoryid" == args[i]) + { + if (!IsValidArg(args, ++i)) + { + throw new WixException(HarvesterErrors.InvalidDirectoryId(args[i])); + } + + directoryIds = args[i]; + } + else if ("-generate" == args[i]) + { + if (!IsValidArg(args, ++i)) + { + throw new WixException(HarvesterErrors.InvalidProjectOutputType(args[i])); + } + + string genType = args[i].ToUpperInvariant(); + switch(genType) + { + case "CONTAINER": + generateType = GenerateType.Container; + break; + case "COMPONENTS": + generateType = GenerateType.Components; + break; + case "PACKAGEGROUP": + generateType = GenerateType.PackageGroup; + break; + case "PAYLOADGROUP": + generateType = GenerateType.PayloadGroup; + break; + default: + throw new WixException(HarvesterErrors.InvalidProjectOutputType(genType)); + } + } + else if ("-msbuildbinpath" == args[i]) + { + if (!IsValidArg(args, ++i)) + { + throw new WixException(HarvesterErrors.ArgumentRequiresValue(args[i-1])); + } + + msbuildBinPath = args[i]; + } + else if ("-platform" == args[i]) + { + platform = args[++i]; + } + else if ("-pog" == args[i]) + { + if (!IsValidArg(args, ++i)) + { + throw new WixException(HarvesterErrors.InvalidOutputGroup(args[i])); + } + + string pogName = args[i]; + bool found = false; + foreach (string availableOutputGroup in allOutputGroups) + { + if (String.Equals(pogName, availableOutputGroup, StringComparison.Ordinal)) + { + outputGroups.Add(availableOutputGroup); + found = true; + break; + } + } + + if (!found) + { + throw new WixException(HarvesterErrors.InvalidOutputGroup(pogName)); + } + } + else if (args[i].StartsWith("-pog:", StringComparison.Ordinal)) + { + this.Core.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("pog:", "pog")); + + string pogName = args[i].Substring(5); + bool found = false; + foreach (string availableOutputGroup in allOutputGroups) + { + if (String.Equals(pogName, availableOutputGroup, StringComparison.Ordinal)) + { + outputGroups.Add(availableOutputGroup); + found = true; + break; + } + } + + if (!found) + { + throw new WixException(HarvesterErrors.InvalidOutputGroup(pogName)); + } + } + else if ("-projectname" == args[i]) + { + if (!IsValidArg(args, ++i)) + { + throw new WixException(HarvesterErrors.InvalidProjectName(args[i])); + } + + projectName = args[i]; + } + else if ("-suid" == args[i]) + { + suppressUniqueId = true; + } + else if ("-usetoolsversion" == args[i]) + { + useToolsVersion = true; + } + else if ("-wixvar" == args[i]) + { + generateWixVars = true; + } + } + + if (outputGroups.Count == 0) + { + throw new WixException(HarvesterErrors.NoOutputGroupSpecified()); + } + + VSProjectHarvester harvester = new VSProjectHarvester( + (string[]) outputGroups.ToArray(typeof(string))); + + harvester.SetUniqueIdentifiers = !suppressUniqueId; + harvester.GenerateWixVars = generateWixVars; + harvester.GenerateType = generateType; + harvester.DirectoryIds = directoryIds; + harvester.MsbuildBinPath = msbuildBinPath; + harvester.ProjectName = projectName; + harvester.Configuration = configuration; + harvester.Platform = platform; + harvester.UseToolsVersion = String.IsNullOrEmpty(msbuildBinPath) || useToolsVersion; + + this.Core.Harvester.Extension = harvester; + } + } + } +} 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolset.Harvesters +{ + using System; + using System.IO; + using System.Reflection; + using System.Collections; + using System.Collections.Generic; + using System.Globalization; + using System.Text.RegularExpressions; + using System.Xml; + using WixToolset.Data; + using WixToolset.Extensibility.Services; + using WixToolset.Harvesters.Data; + using WixToolset.Harvesters.Extensibility; + using Wix = WixToolset.Harvesters.Serialize; + + /// + /// Harvest WiX authoring for the outputs of a VS project. + /// + public sealed class VSProjectHarvester : BaseHarvesterExtension + { + // These format strings are used for generated element identifiers. + // {0} = project name + // {1} = POG name + // {2} = file name + private const string DirectoryIdFormat = "{0}.{1}"; + private const string ComponentIdFormat = "{0}.{1}.{2}"; + private const string FileIdFormat = "{0}.{1}.{2}"; + private const string VariableFormat = "$(var.{0}.{1})"; + private const string WixVariableFormat = "!(wix.{0}.{1})"; + + private const string ComponentPrefix = "cmp"; + private const string DirectoryPrefix = "dir"; + private const string FilePrefix = "fil"; + + private string projectGUID; + private string directoryIds; + private string directoryRefSeed; + private string projectName; + private string configuration; + private string platform; + private bool setUniqueIdentifiers; + private GenerateType generateType; + private bool generateWixVars; + + + private static readonly ProjectOutputGroup[] allOutputGroups = new ProjectOutputGroup[] + { + new ProjectOutputGroup("Binaries", "BuiltProjectOutputGroup", "TargetDir"), + new ProjectOutputGroup("Symbols", "DebugSymbolsProjectOutputGroup", "TargetDir"), + new ProjectOutputGroup("Documents", "DocumentationProjectOutputGroup", "ProjectDir"), + new ProjectOutputGroup("Satellites", "SatelliteDllsProjectOutputGroup", "TargetDir"), + new ProjectOutputGroup("Sources", "SourceFilesProjectOutputGroup", "ProjectDir"), + new ProjectOutputGroup("Content", "ContentFilesProjectOutputGroup", "ProjectDir"), + }; + + private string[] outputGroups; + + /// + /// Instantiate a new VSProjectHarvester. + /// + /// List of project output groups to harvest. + public VSProjectHarvester(string[] outputGroups) + { + if (outputGroups == null) + { + throw new ArgumentNullException("outputGroups"); + } + + this.outputGroups = outputGroups; + } + + /// + /// Gets or sets the configuration to set when harvesting. + /// + /// The configuration to set when harvesting. + public string Configuration + { + get { return this.configuration; } + set { this.configuration = value; } + } + + public string DirectoryIds + { + get { return this.directoryIds; } + set { this.directoryIds = value; } + } + + /// + /// Gets or sets what type of elements are to be generated. + /// + /// The type of elements being generated. + public GenerateType GenerateType + { + get { return this.generateType; } + set { this.generateType = value; } + } + + /// + /// Gets or sets whether or not to use wix variables. + /// + /// Whether or not to use wix variables. + public bool GenerateWixVars + { + get { return this.generateWixVars; } + set { this.generateWixVars = value; } + } + + /// + /// Gets or sets the location to load MSBuild from. + /// + public string MsbuildBinPath { get; set; } + + /// + /// Gets or sets the platform to set when harvesting. + /// + /// The platform to set when harvesting. + public string Platform + { + get { return this.platform; } + set { this.platform = value; } + } + + /// + /// Gets or sets the project name to use in wix variables. + /// + /// The project name to use in wix variables. + public string ProjectName + { + get { return this.projectName; } + set { this.projectName = value; } + } + + /// + /// Gets or sets the option to set unique identifiers. + /// + /// The option to set unique identifiers. + public bool SetUniqueIdentifiers + { + get { return this.setUniqueIdentifiers; } + set { this.setUniqueIdentifiers = value; } + } + + /// + /// Gets or sets whether to ignore MsbuildBinPath when the project file specifies a known MSBuild version. + /// + public bool UseToolsVersion { get; set; } + + /// + /// Gets a list of friendly output group names that will be recognized on the command-line. + /// + /// Array of output group names. + public static string[] GetOutputGroupNames() + { + string[] names = new string[VSProjectHarvester.allOutputGroups.Length]; + for (int i = 0; i < names.Length; i++) + { + names[i] = VSProjectHarvester.allOutputGroups[i].Name; + } + return names; + } + + /// + /// Harvest a VS project. + /// + /// The path of the VS project file. + /// The harvested directory. + public override Wix.Fragment[] Harvest(string argument) + { + if (null == argument) + { + throw new ArgumentNullException("argument"); + } + + if (!System.IO.File.Exists(argument)) + { + throw new FileNotFoundException(argument); + } + + // Match specified output group names to available POG structures + // and collect list of build output groups to pass to MSBuild. + ProjectOutputGroup[] pogs = new ProjectOutputGroup[this.outputGroups.Length]; + string[] buildOutputGroups = new string[this.outputGroups.Length]; + for (int i = 0; i < this.outputGroups.Length; i++) + { + foreach (ProjectOutputGroup pog in VSProjectHarvester.allOutputGroups) + { + if (pog.Name == this.outputGroups[i]) + { + pogs[i] = pog; + buildOutputGroups[i] = pog.BuildOutputGroup; + } + } + + if (buildOutputGroups[i] == null) + { + throw new WixException(HarvesterErrors.InvalidOutputGroup(this.outputGroups[i])); + } + } + + string projectFile = Path.GetFullPath(argument); + + IDictionary buildOutputs = this.GetProjectBuildOutputs(projectFile, buildOutputGroups); + + ArrayList fragmentList = new ArrayList(); + + for (int i = 0; i < pogs.Length; i++) + { + this.HarvestProjectOutputGroup(projectFile, buildOutputs, pogs[i], fragmentList); + } + + return (Wix.Fragment[]) fragmentList.ToArray(typeof(Wix.Fragment)); + } + + /// + /// Runs MSBuild on a project file to get the list of filenames for the specified output groups. + /// + /// VS MSBuild project file to load. + /// List of MSBuild output group names. + /// Dictionary mapping output group names to lists of filenames in the group. + private IDictionary GetProjectBuildOutputs(string projectFile, string[] buildOutputGroups) + { + MSBuildProject project = this.GetMsbuildProject(projectFile); + + project.Load(projectFile); + + IDictionary buildOutputs = new Hashtable(); + + string originalDirectory = System.IO.Directory.GetCurrentDirectory(); + System.IO.Directory.SetCurrentDirectory(Path.GetDirectoryName(projectFile)); + bool buildSuccess = false; + try + { + buildSuccess = project.Build(projectFile, buildOutputGroups, buildOutputs); + } + finally + { + System.IO.Directory.SetCurrentDirectory(originalDirectory); + } + + if (!buildSuccess) + { + throw new WixException(HarvesterErrors.BuildFailed()); + } + + this.projectGUID = project.GetEvaluatedProperty("ProjectGuid"); + + if (null == this.projectGUID) + { + throw new WixException(HarvesterErrors.BuildFailed()); + } + + IDictionary newDictionary = new Dictionary(); + foreach (string buildOutput in buildOutputs.Keys) + { + IEnumerable buildOutputFiles = buildOutputs[buildOutput] as IEnumerable; + + bool hasFiles = false; + + foreach (object file in buildOutputFiles) + { + hasFiles = true; + break; + } + + // Try the item group if no outputs + if (!hasFiles) + { + IEnumerable itemFiles = project.GetEvaluatedItemsByName(String.Concat(buildOutput, "Output")); + List itemFileList = new List(); + + // Get each BuildItem and add the file path to our list + foreach (object itemFile in itemFiles) + { + itemFileList.Add(project.GetBuildItem(itemFile)); + } + + // Use our list for this build output + newDictionary.Add(buildOutput, itemFileList); + } + else + { + newDictionary.Add(buildOutput, buildOutputFiles); + } + } + + return newDictionary; + } + + /// + /// Creates WiX fragments for files in one output group. + /// + /// VS MSBuild project file. + /// Dictionary of build outputs retrieved from an MSBuild run on the project file. + /// Project output group parameters. + /// List to which generated fragments will be added. + /// Count of harvested files. + private int HarvestProjectOutputGroup(string projectFile, IDictionary buildOutputs, ProjectOutputGroup pog, IList fragmentList) + { + string projectName = Path.GetFileNameWithoutExtension(projectFile); + string projectBaseDir = null; + + if (this.ProjectName != null) + { + projectName = this.ProjectName; + } + + string sanitizedProjectName = this.Core.CreateIdentifierFromFilename(projectName); + + Wix.IParentElement harvestParent; + + if (this.GenerateType == GenerateType.Container) + { + Wix.Container container = new Wix.Container(); + harvestParent = container; + + container.Name = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name); + } + else if (this.GenerateType == GenerateType.PayloadGroup) + { + Wix.PayloadGroup payloadGroup = new Wix.PayloadGroup(); + harvestParent = payloadGroup; + + payloadGroup.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name); + } + else if (this.GenerateType == GenerateType.PackageGroup) + { + Wix.PackageGroup packageGroup = new Wix.PackageGroup(); + harvestParent = packageGroup; + + packageGroup.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name); + } + else + { + Wix.DirectoryRef directoryRef = new Wix.DirectoryRef(); + harvestParent = directoryRef; + + if (!String.IsNullOrEmpty(this.directoryIds)) + { + directoryRef.Id = this.directoryIds; + } + else if (this.setUniqueIdentifiers) + { + directoryRef.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name); + } + else + { + directoryRef.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name)); + } + + this.directoryRefSeed = this.Core.GenerateIdentifier(DirectoryPrefix, this.projectGUID, pog.Name); + } + + IEnumerable pogFiles = buildOutputs[pog.BuildOutputGroup] as IEnumerable; + if (pogFiles == null) + { + throw new WixException(HarvesterErrors.MissingProjectOutputGroup( + projectFile, pog.BuildOutputGroup)); + } + + if (pog.FileSource == "ProjectDir") + { + projectBaseDir = Path.GetDirectoryName(projectFile) + "\\"; + } + + int harvestCount = this.HarvestProjectOutputGroupFiles(projectBaseDir, projectName, pog.Name, pog.FileSource, pogFiles, harvestParent); + + if (this.GenerateType == GenerateType.Container) + { + // harvestParent must be a Container at this point + Wix.Container container = harvestParent as Wix.Container; + + Wix.Fragment fragment = new Wix.Fragment(); + fragment.AddChild(container); + fragmentList.Add(fragment); + } + else if (this.GenerateType == GenerateType.PackageGroup) + { + // harvestParent must be a PackageGroup at this point + Wix.PackageGroup packageGroup = harvestParent as Wix.PackageGroup; + + Wix.Fragment fragment = new Wix.Fragment(); + fragment.AddChild(packageGroup); + fragmentList.Add(fragment); + } + else if (this.GenerateType == GenerateType.PayloadGroup) + { + // harvestParent must be a Container at this point + Wix.PayloadGroup payloadGroup = harvestParent as Wix.PayloadGroup; + + Wix.Fragment fragment = new Wix.Fragment(); + fragment.AddChild(payloadGroup); + fragmentList.Add(fragment); + } + else + { + // harvestParent must be a DirectoryRef at this point + Wix.DirectoryRef directoryRef = harvestParent as Wix.DirectoryRef; + + if (harvestCount > 0) + { + Wix.Fragment drf = new Wix.Fragment(); + drf.AddChild(directoryRef); + fragmentList.Add(drf); + } + + Wix.ComponentGroup cg = new Wix.ComponentGroup(); + + if (this.setUniqueIdentifiers || !String.IsNullOrEmpty(this.directoryIds)) + { + cg.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name); + } + else + { + cg.Id = directoryRef.Id; + } + + if (harvestCount > 0) + { + this.AddComponentsToComponentGroup(directoryRef, cg); + } + + Wix.Fragment cgf = new Wix.Fragment(); + cgf.AddChild(cg); + fragmentList.Add(cgf); + } + + return harvestCount; + } + + /// + /// Add all Components in an element tree to a ComponentGroup. + /// + /// Parent of an element tree that will be searched for Components. + /// The ComponentGroup the Components will be added to. + private void AddComponentsToComponentGroup(Wix.IParentElement parent, Wix.ComponentGroup cg) + { + foreach (Wix.ISchemaElement childElement in parent.Children) + { + Wix.Component c = childElement as Wix.Component; + if (c != null) + { + Wix.ComponentRef cr = new Wix.ComponentRef(); + cr.Id = c.Id; + cg.AddChild(cr); + } + else + { + Wix.IParentElement p = childElement as Wix.IParentElement; + if (p != null) + { + this.AddComponentsToComponentGroup(p, cg); + } + } + } + } + + /// + /// Harvest files from one output group of a VS project. + /// + /// The base directory of the files. + /// Name of the project, to be used as a prefix for generated identifiers. + /// Name of the project output group, used for generating identifiers for WiX elements. + /// The ProjectOutputGroup file source. + /// The files from one output group to harvest. + /// The parent element that will contain the components of the harvested files. + /// The number of files harvested. + private int HarvestProjectOutputGroupFiles(string baseDir, string projectName, string pogName, string pogFileSource, IEnumerable outputGroupFiles, Wix.IParentElement parent) + { + int fileCount = 0; + + Wix.ISchemaElement exeFile = null; + Wix.ISchemaElement dllFile = null; + Wix.ISchemaElement appConfigFile = null; + + // Keep track of files inserted + // Files can have different absolute paths but get mapped to the same SourceFile + // after the project variables have been used. For example, a WiX project that + // is building multiple cultures will have many output MSIs/MSMs, but will all get + // mapped to $(var.ProjName.TargetDir)\ProjName.msm. These duplicates would + // prevent generated code from compiling. + Dictionary seenList = new Dictionary(); + + foreach (object output in outputGroupFiles) + { + string filePath = output.ToString(); + string fileName = Path.GetFileName(filePath); + string fileDir = Path.GetDirectoryName(filePath); + string link = null; + + MethodInfo getMetadataMethod = output.GetType().GetMethod("GetMetadata"); + if (getMetadataMethod != null) + { + link = (string)getMetadataMethod.Invoke(output, new object[] { "Link" }); + if (!String.IsNullOrEmpty(link)) + { + fileDir = Path.GetDirectoryName(Path.Combine(baseDir, link)); + } + } + + Wix.IParentElement parentDir = parent; + // Ignore Containers and PayloadGroups because they do not have a nested structure. + if (baseDir != null && !String.Equals(Path.GetDirectoryName(baseDir), fileDir, StringComparison.OrdinalIgnoreCase) + && this.GenerateType != GenerateType.Container && this.GenerateType != GenerateType.PackageGroup && this.GenerateType != GenerateType.PayloadGroup) + { + Uri baseUri = new Uri(baseDir); + Uri relativeUri = baseUri.MakeRelativeUri(new Uri(fileDir)); + parentDir = this.GetSubDirElement(parentDir, relativeUri); + } + + string parentDirId = null; + + if (parentDir is Wix.DirectoryRef) + { + parentDirId = this.directoryRefSeed; + } + else if (parentDir is Wix.Directory) + { + parentDirId = ((Wix.Directory)parentDir).Id; + } + + if (this.GenerateType == GenerateType.Container || this.GenerateType == GenerateType.PayloadGroup) + { + Wix.Payload payload = new Wix.Payload(); + + this.HarvestProjectOutputGroupPayloadFile(baseDir, projectName, pogName, pogFileSource, filePath, fileName, link, parentDir, payload, seenList); + } + else if (this.GenerateType == GenerateType.PackageGroup) + { + this.HarvestProjectOutputGroupPackage(projectName, pogName, pogFileSource, filePath, fileName, link, parentDir, seenList); + } + else + { + Wix.Component component = new Wix.Component(); + Wix.File file = new Wix.File(); + + this.HarvestProjectOutputGroupFile(baseDir, projectName, pogName, pogFileSource, filePath, fileName, link, parentDir, parentDirId, component, file, seenList); + + if (String.Equals(Path.GetExtension(file.Source), ".exe", StringComparison.OrdinalIgnoreCase)) + { + exeFile = file; + } + else if (String.Equals(Path.GetExtension(file.Source), ".dll", StringComparison.OrdinalIgnoreCase)) + { + dllFile = file; + } + else if (file.Source.EndsWith("app.config", StringComparison.OrdinalIgnoreCase)) + { + appConfigFile = file; + } + } + + fileCount++; + } + + // if there was no exe file found fallback on the dll file found + if (exeFile == null && dllFile != null) + { + exeFile = dllFile; + } + + // Special case for the app.config file in the Binaries POG... + // The POG refers to the files in the OBJ directory, while the + // generated WiX code references them in the bin directory. + // The app.config file gets renamed to match the exe name. + if ("Binaries" == pogName && null != exeFile && null != appConfigFile) + { + if (appConfigFile is Wix.File) + { + Wix.File appConfigFileAsWixFile = appConfigFile as Wix.File; + Wix.File exeFileAsWixFile = exeFile as Wix.File; + // Case insensitive replace + appConfigFileAsWixFile.Source = Regex.Replace(appConfigFileAsWixFile.Source, @"app\.config", Path.GetFileName(exeFileAsWixFile.Source) + ".config", RegexOptions.IgnoreCase); + } + } + + return fileCount; + } + + 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 seenList) + { + string varFormat = VariableFormat; + if (this.generateWixVars) + { + varFormat = WixVariableFormat; + } + + if (pogName.Equals("Satellites", StringComparison.OrdinalIgnoreCase)) + { + Wix.Directory locDirectory = new Wix.Directory(); + + locDirectory.Name = Path.GetFileName(Path.GetDirectoryName(Path.GetFullPath(filePath))); + file.Source = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", locDirectory.Name, "\\", Path.GetFileName(filePath)); + + if (!seenList.ContainsKey(file.Source)) + { + parentDir.AddChild(locDirectory); + locDirectory.AddChild(component); + component.AddChild(file); + seenList.Add(file.Source, true); + + if (this.setUniqueIdentifiers) + { + locDirectory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, parentDirId, locDirectory.Name); + file.Id = this.Core.GenerateIdentifier(FilePrefix, locDirectory.Id, fileName); + component.Id = this.Core.GenerateIdentifier(ComponentPrefix, locDirectory.Id, file.Id); + } + else + { + locDirectory.Id = this.Core.CreateIdentifierFromFilename(String.Format(DirectoryIdFormat, (parentDir is Wix.DirectoryRef) ? ((Wix.DirectoryRef)parentDir).Id : parentDirId, locDirectory.Name)); + file.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.FileIdFormat, projectName, pogName, String.Concat(locDirectory.Name, ".", fileName))); + component.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.ComponentIdFormat, projectName, pogName, String.Concat(locDirectory.Name, ".", fileName))); + } + } + } + else + { + file.Source = GenerateSourceFilePath(baseDir, projectName, pogFileSource, filePath, link, varFormat); + + if (!seenList.ContainsKey(file.Source)) + { + component.AddChild(file); + parentDir.AddChild(component); + seenList.Add(file.Source, true); + + if (this.setUniqueIdentifiers) + { + file.Id = this.Core.GenerateIdentifier(FilePrefix, parentDirId, fileName); + component.Id = this.Core.GenerateIdentifier(ComponentPrefix, parentDirId, file.Id); + } + else + { + file.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.FileIdFormat, projectName, pogName, fileName)); + component.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.ComponentIdFormat, projectName, pogName, fileName)); + } + } + } + } + + private void HarvestProjectOutputGroupPackage(string projectName, string pogName, string pogFileSource, string filePath, string fileName, string link, Wix.IParentElement parentDir, Dictionary seenList) + { + string varFormat = VariableFormat; + if (this.generateWixVars) + { + varFormat = WixVariableFormat; + } + + if (pogName.Equals("Binaries", StringComparison.OrdinalIgnoreCase)) + { + if (String.Equals(Path.GetExtension(filePath), ".exe", StringComparison.OrdinalIgnoreCase)) + { + Wix.ExePackage exePackage = new Wix.ExePackage(); + exePackage.SourceFile = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", Path.GetFileName(filePath)); + if (!seenList.ContainsKey(exePackage.SourceFile)) + { + parentDir.AddChild(exePackage); + seenList.Add(exePackage.SourceFile, true); + } + } + else if (String.Equals(Path.GetExtension(filePath), ".msi", StringComparison.OrdinalIgnoreCase)) + { + Wix.MsiPackage msiPackage = new Wix.MsiPackage(); + msiPackage.SourceFile = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", Path.GetFileName(filePath)); + if (!seenList.ContainsKey(msiPackage.SourceFile)) + { + parentDir.AddChild(msiPackage); + seenList.Add(msiPackage.SourceFile, true); + } + } + } + } + + private void HarvestProjectOutputGroupPayloadFile(string baseDir, string projectName, string pogName, string pogFileSource, string filePath, string fileName, string link, Wix.IParentElement parentDir, Wix.Payload file, Dictionary seenList) + { + string varFormat = VariableFormat; + if (this.generateWixVars) + { + varFormat = WixVariableFormat; + } + + if (pogName.Equals("Satellites", StringComparison.OrdinalIgnoreCase)) + { + string locDirectoryName = Path.GetFileName(Path.GetDirectoryName(Path.GetFullPath(filePath))); + file.SourceFile = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", locDirectoryName, "\\", Path.GetFileName(filePath)); + + if (!seenList.ContainsKey(file.SourceFile)) + { + parentDir.AddChild(file); + seenList.Add(file.SourceFile, true); + } + } + else + { + file.SourceFile = GenerateSourceFilePath(baseDir, projectName, pogFileSource, filePath, link, varFormat); + + if (!seenList.ContainsKey(file.SourceFile)) + { + parentDir.AddChild(file); + seenList.Add(file.SourceFile, true); + } + } + } + + /// + /// Helper function to generates a source file path when harvesting files. + /// + /// + /// + /// + /// + /// + /// + /// + private static string GenerateSourceFilePath(string baseDir, string projectName, string pogFileSource, string filePath, string link, string varFormat) + { + string ret; + + if (null == baseDir && !String.IsNullOrEmpty(link)) + { + // This needs to be the absolute path as a link can be located anywhere. + ret = filePath; + } + else if (null == baseDir) + { + ret = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", Path.GetFileName(filePath)); + } + else if (filePath.StartsWith(baseDir, StringComparison.OrdinalIgnoreCase)) + { + ret = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", filePath.Substring(baseDir.Length)); + } + else + { + // come up with a relative path to the file + Uri sourcePathUri = new Uri(filePath); + Uri baseDirUri = new Uri(baseDir); + Uri sourceRelativeUri = baseDirUri.MakeRelativeUri(sourcePathUri); + string relativePath = sourceRelativeUri.ToString().Replace('/', Path.DirectorySeparatorChar); + if (!sourceRelativeUri.UserEscaped) + { + relativePath = Uri.UnescapeDataString(relativePath); + } + + ret = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", relativePath); + } + + return ret; + } + + /// + /// Gets a Directory element corresponding to a relative subdirectory within the project, + /// either by locating a suitable existing Directory or creating a new one. + /// + /// The parent element which the subdirectory is relative to. + /// Relative path of the subdirectory. + /// Directory element for the relative path. + private Wix.IParentElement GetSubDirElement(Wix.IParentElement parentDir, Uri relativeUri) + { + string[] segments = relativeUri.ToString().Split('\\', '/'); + string firstSubDirName = Uri.UnescapeDataString(segments[0]); + DirectoryAttributeAccessor subDir = null; + + if (String.Equals(firstSubDirName, "..", StringComparison.Ordinal)) + { + return parentDir; + } + + Type directoryType; + Type directoryRefType; + if (parentDir is Wix.Directory || parentDir is Wix.DirectoryRef) + { + directoryType = typeof(Wix.Directory); + directoryRefType = typeof(Wix.DirectoryRef); + } + else + { + throw new ArgumentException("GetSubDirElement parentDir"); + } + + // Search for an existing directory element. + foreach (Wix.ISchemaElement childElement in parentDir.Children) + { + if(VSProjectHarvester.AreTypesEquivalent(childElement.GetType(), directoryType)) + { + DirectoryAttributeAccessor childDir = new DirectoryAttributeAccessor(childElement); + if (String.Equals(childDir.Name, firstSubDirName, StringComparison.OrdinalIgnoreCase)) + { + subDir = childDir; + break; + } + } + } + + if (subDir == null) + { + string parentId = null; + DirectoryAttributeAccessor parentDirectory = null; + DirectoryAttributeAccessor parentDirectoryRef = null; + + if (VSProjectHarvester.AreTypesEquivalent(parentDir.GetType(), directoryType)) + { + parentDirectory = new DirectoryAttributeAccessor((Wix.ISchemaElement)parentDir); + } + else if (VSProjectHarvester.AreTypesEquivalent(parentDir.GetType(), directoryRefType)) + { + parentDirectoryRef = new DirectoryAttributeAccessor((Wix.ISchemaElement)parentDir); + } + + if (parentDirectory != null) + { + parentId = parentDirectory.Id; + } + else if (parentDirectoryRef != null) + { + if (this.setUniqueIdentifiers) + { + //Use the GUID of the project instead of the project name to help keep things stable. + parentId = this.directoryRefSeed; + } + else + { + parentId = parentDirectoryRef.Id; + } + } + + Wix.ISchemaElement newDirectory = (Wix.ISchemaElement)directoryType.GetConstructor(new Type[] { }).Invoke(null); + subDir = new DirectoryAttributeAccessor(newDirectory); + + if (this.setUniqueIdentifiers) + { + subDir.Id = this.Core.GenerateIdentifier(DirectoryPrefix, parentId, firstSubDirName); + } + else + { + subDir.Id = String.Format(DirectoryIdFormat, parentId, firstSubDirName); + } + + subDir.Name = firstSubDirName; + + parentDir.AddChild(subDir.Element); + } + + if (segments.Length == 1) + { + return subDir.ElementAsParent; + } + else + { + Uri nextRelativeUri = new Uri(Uri.UnescapeDataString(relativeUri.ToString()).Substring(firstSubDirName.Length + 1), UriKind.Relative); + return this.GetSubDirElement(subDir.ElementAsParent, nextRelativeUri); + } + } + + private MSBuildProject GetMsbuildProject(string projectFile) + { + XmlDocument document = new XmlDocument(); + try + { + document.Load(projectFile); + } + catch (Exception e) + { + throw new WixException(HarvesterErrors.CannotLoadProject(projectFile, e.Message)); + } + + string version = null; + + if (this.UseToolsVersion) + { + foreach (XmlNode child in document.ChildNodes) + { + if (String.Equals(child.Name, "Project", StringComparison.Ordinal) && child.Attributes != null) + { + XmlNode toolsVersionAttribute = child.Attributes["ToolsVersion"]; + if (toolsVersionAttribute != null) + { + version = toolsVersionAttribute.Value; + this.Core.Messaging.Write(HarvesterVerboses.FoundToolsVersion(version)); + + break; + } + } + } + + switch (version) + { + case "4.0": + version = "4.0.0.0"; + break; + case "12.0": + version = "12.0.0.0"; + break; + case "14.0": + version = "14.0.0.0"; + break; + default: + if (String.IsNullOrEmpty(this.MsbuildBinPath)) + { + throw new WixException(HarvesterErrors.MsbuildBinPathRequired(version ?? "(none)")); + } + + version = null; + break; + } + } + + var project = this.ConstructMsbuild40Project(version); + return project; + } + + private Assembly ResolveFromMsbuildBinPath(object sender, ResolveEventArgs args) + { + var assemblyName = new AssemblyName(args.Name); + + var assemblyPath = Path.Combine(this.MsbuildBinPath, $"{assemblyName.Name}.dll"); + if (!File.Exists(assemblyPath)) + { + return null; + } + + return Assembly.LoadFrom(assemblyPath); + } + + private MSBuildProject ConstructMsbuild40Project(string loadVersion) + { + const string MSBuildEngineAssemblyName = "Microsoft.Build, Version={0}, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; + const string MSBuildFrameworkAssemblyName = "Microsoft.Build.Framework, Version={0}, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; + Assembly msbuildAssembly; + Assembly msbuildFrameworkAssembly; + + if (loadVersion == null) + { + this.Core.Messaging.Write(HarvesterVerboses.LoadingProjectWithBinPath(this.MsbuildBinPath)); + AppDomain.CurrentDomain.AssemblyResolve += this.ResolveFromMsbuildBinPath; + + try + { + msbuildAssembly = Assembly.Load("Microsoft.Build"); + } + catch (Exception e) + { + throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message)); + } + + try + { + msbuildFrameworkAssembly = Assembly.Load("Microsoft.Build.Framework"); + } + catch (Exception e) + { + throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message)); + } + } + else + { + this.Core.Messaging.Write(HarvesterVerboses.LoadingProjectWithVersion(loadVersion)); + + try + { + msbuildAssembly = Assembly.Load(String.Format(MSBuildEngineAssemblyName, loadVersion)); + } + catch (Exception e) + { + throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message)); + } + + try + { + msbuildFrameworkAssembly = Assembly.Load(String.Format(MSBuildFrameworkAssemblyName, loadVersion)); + } + catch (Exception e) + { + throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message)); + } + } + + Type projectType; + Type buildItemType; + + Type buildManagerType; + Type buildParametersType; + Type buildRequestDataFlagsType; + Type buildRequestDataType; + Type hostServicesType; + Type projectCollectionType; + Type projectInstanceType; + + Type writeHandlerType; + Type colorSetterType; + Type colorResetterType; + Type loggerVerbosityType; + Type consoleLoggerType; + Type iLoggerType; + + try + { + buildItemType = msbuildAssembly.GetType("Microsoft.Build.Execution.ProjectItemInstance", true); + projectType = msbuildAssembly.GetType("Microsoft.Build.Evaluation.Project", true); + + buildManagerType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildManager", true); + buildParametersType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildParameters", true); + buildRequestDataFlagsType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildRequestDataFlags", true); + buildRequestDataType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildRequestData", true); + hostServicesType = msbuildAssembly.GetType("Microsoft.Build.Execution.HostServices", true); + projectCollectionType = msbuildAssembly.GetType("Microsoft.Build.Evaluation.ProjectCollection", true); + projectInstanceType = msbuildAssembly.GetType("Microsoft.Build.Execution.ProjectInstance", true); + + writeHandlerType = msbuildAssembly.GetType("Microsoft.Build.Logging.WriteHandler", true); + colorSetterType = msbuildAssembly.GetType("Microsoft.Build.Logging.ColorSetter", true); + colorResetterType = msbuildAssembly.GetType("Microsoft.Build.Logging.ColorResetter", true); + loggerVerbosityType = msbuildFrameworkAssembly.GetType("Microsoft.Build.Framework.LoggerVerbosity", true); + consoleLoggerType = msbuildAssembly.GetType("Microsoft.Build.Logging.ConsoleLogger", true); + iLoggerType = msbuildFrameworkAssembly.GetType("Microsoft.Build.Framework.ILogger", true); + } + catch (TargetInvocationException tie) + { + throw new WixException(HarvesterErrors.CannotLoadMSBuildEngine(tie.InnerException.Message)); + } + catch (Exception e) + { + throw new WixException(HarvesterErrors.CannotLoadMSBuildEngine(e.Message)); + } + + MSBuild40Types types = new MSBuild40Types(); + types.buildManagerType = buildManagerType; + types.buildParametersType = buildParametersType; + types.buildRequestDataFlagsType = buildRequestDataFlagsType; + types.buildRequestDataType = buildRequestDataType; + types.hostServicesType = hostServicesType; + types.projectCollectionType = projectCollectionType; + types.projectInstanceType = projectInstanceType; + types.writeHandlerType = writeHandlerType; + types.colorSetterType = colorSetterType; + types.colorResetterType = colorResetterType; + types.loggerVerbosityType = loggerVerbosityType; + types.consoleLoggerType = consoleLoggerType; + types.iLoggerType = iLoggerType; + return new MSBuild40Project(null, projectType, buildItemType, loadVersion, types, this.Core, this.configuration, this.platform); + } + + private static bool AreTypesEquivalent(Type a, Type b) + { + return (a == b) || (a.IsAssignableFrom(b) && b.IsAssignableFrom(a)); + } + + private abstract class MSBuildProject + { + protected Type projectType; + protected Type buildItemType; + protected object project; + private string loadVersion; + + public MSBuildProject(object project, Type projectType, Type buildItemType, string loadVersion) + { + this.project = project; + this.projectType = projectType; + this.buildItemType = buildItemType; + this.loadVersion = loadVersion; + } + + public string LoadVersion + { + get { return this.loadVersion; } + } + + public abstract bool Build(string projectFileName, string[] targetNames, IDictionary targetOutputs); + + public abstract MSBuildProjectItemType GetBuildItem(object buildItem); + + public abstract IEnumerable GetEvaluatedItemsByName(string itemName); + + public abstract string GetEvaluatedProperty(string propertyName); + + public abstract void Load(string projectFileName); + } + + private abstract class MSBuildProjectItemType + { + public MSBuildProjectItemType(object buildItem) + { + this.buildItem = buildItem; + } + + public abstract override string ToString(); + + public abstract string GetMetadata(string name); + + protected object buildItem; + } + + + private struct MSBuild40Types + { + public Type buildManagerType; + public Type buildParametersType; + public Type buildRequestDataFlagsType; + public Type buildRequestDataType; + public Type hostServicesType; + public Type projectCollectionType; + public Type projectInstanceType; + public Type writeHandlerType; + public Type colorSetterType; + public Type colorResetterType; + public Type loggerVerbosityType; + public Type consoleLoggerType; + public Type iLoggerType; + } + + private class MSBuild40Project : MSBuildProject + { + private MSBuild40Types types; + private object projectCollection; + private object currentProjectInstance; + private object buildManager; + private object buildParameters; + private IHarvesterCore harvesterCore; + + public MSBuild40Project(object project, Type projectType, Type buildItemType, string loadVersion, MSBuild40Types types, IHarvesterCore harvesterCore, string configuration, string platform) + : base(project, projectType, buildItemType, loadVersion) + { + this.types = types; + this.harvesterCore = harvesterCore; + + this.buildParameters = this.types.buildParametersType.GetConstructor(new Type[] { }).Invoke(null); + + try + { + var loggers = this.CreateLoggers(); + + // this.buildParameters.Loggers = loggers; + this.types.buildParametersType.GetProperty("Loggers").SetValue(this.buildParameters, loggers, null); + } + catch (TargetInvocationException tie) + { + if (this.harvesterCore != null) + { + this.harvesterCore.Messaging.Write(HarvesterWarnings.NoLogger(tie.InnerException.Message)); + } + } + catch (Exception e) + { + if (this.harvesterCore != null) + { + this.harvesterCore.Messaging.Write(HarvesterWarnings.NoLogger(e.Message)); + } + } + + this.buildManager = this.types.buildManagerType.GetConstructor(new Type[] { }).Invoke(null); + + if (configuration != null || platform != null) + { + Dictionary globalVariables = new Dictionary(); + if (configuration != null) + { + globalVariables.Add("Configuration", configuration); + } + + if (platform != null) + { + globalVariables.Add("Platform", platform); + } + + this.projectCollection = this.types.projectCollectionType.GetConstructor(new Type[] { typeof(IDictionary) }).Invoke(new object[] { globalVariables }); + } + else + { + this.projectCollection = this.types.projectCollectionType.GetConstructor(new Type[] {}).Invoke(null); + } + } + + private object CreateLoggers() + { + var logger = new HarvestLogger(this.harvesterCore.Messaging); + var loggerVerbosity = Enum.Parse(this.types.loggerVerbosityType, "Minimal"); + var writeHandler = Delegate.CreateDelegate(this.types.writeHandlerType, logger, nameof(logger.LogMessage)); + var colorSetter = Delegate.CreateDelegate(this.types.colorSetterType, logger, nameof(logger.SetColor)); + var colorResetter = Delegate.CreateDelegate(this.types.colorResetterType, logger, nameof(logger.ResetColor)); + + var consoleLoggerCtor = this.types.consoleLoggerType.GetConstructor(new Type[] { + this.types.loggerVerbosityType, + this.types.writeHandlerType, + this.types.colorSetterType, + this.types.colorResetterType, + }); + var consoleLogger = consoleLoggerCtor.Invoke(new object[] { loggerVerbosity, writeHandler, colorSetter, colorResetter }); + + var loggers = Array.CreateInstance(this.types.iLoggerType, 1); + loggers.SetValue(consoleLogger, 0); + + return loggers; + } + + public override bool Build(string projectFileName, string[] targetNames, IDictionary targetOutputs) + { + try + { + // this.buildManager.BeginBuild(this.buildParameters); + this.types.buildManagerType.GetMethod("BeginBuild", new Type[] { this.types.buildParametersType }).Invoke(this.buildManager, new object[] { this.buildParameters }); + + // buildRequestData = new BuildRequestData(this.currentProjectInstance, targetNames, null, BuildRequestData.BuildRequestDataFlags.ReplaceExistingProjectInstance); + ConstructorInfo buildRequestDataCtor = this.types.buildRequestDataType.GetConstructor( + new Type[] + { + this.types.projectInstanceType, typeof(string[]), this.types.hostServicesType, this.types.buildRequestDataFlagsType + }); + object buildRequestDataFlags = this.types.buildRequestDataFlagsType.GetField("ReplaceExistingProjectInstance").GetRawConstantValue(); + object buildRequestData = buildRequestDataCtor.Invoke(new object[] { this.currentProjectInstance, targetNames, null, buildRequestDataFlags }); + + // BuildSubmission submission = this.buildManager.PendBuildRequest(buildRequestData); + object submission = this.types.buildManagerType.GetMethod("PendBuildRequest", new Type[] { this.types.buildRequestDataType }) + .Invoke(this.buildManager, new object[] { buildRequestData }); + + // BuildResult buildResult = submission.Execute(); + object buildResult = submission.GetType().GetMethod("Execute", new Type[] { }).Invoke(submission, null); + + // bool buildSucceeded = buildResult.OverallResult == BuildResult.Success; + object overallResult = buildResult.GetType().GetProperty("OverallResult").GetValue(buildResult, null); + bool buildSucceeded = String.Equals(overallResult.ToString(), "Success", StringComparison.Ordinal); + + // this.buildManager.EndBuild(); + this.types.buildManagerType.GetMethod("EndBuild", new Type[] { }).Invoke(this.buildManager, null); + + // fill in empty lists for each target so that heat will look at the item group later + foreach (string target in targetNames) + { + targetOutputs.Add(target, new List()); + } + + return buildSucceeded; + } + catch (TargetInvocationException tie) + { + throw new WixException(HarvesterErrors.CannotBuildProject(projectFileName, tie.InnerException.Message)); + } + catch (Exception e) + { + throw new WixException(HarvesterErrors.CannotBuildProject(projectFileName, e.Message)); + } + } + + public override MSBuildProjectItemType GetBuildItem(object buildItem) + { + return new MSBuild40ProjectItemType(buildItem); + } + + public override IEnumerable GetEvaluatedItemsByName(string itemName) + { + MethodInfo getEvaluatedItem = this.types.projectInstanceType.GetMethod("GetItems", new Type[] { typeof(string) }); + return (IEnumerable)getEvaluatedItem.Invoke(this.currentProjectInstance, new object[] { itemName }); + } + + public override string GetEvaluatedProperty(string propertyName) + { + MethodInfo getProperty = this.types.projectInstanceType.GetMethod("GetPropertyValue", new Type[] { typeof(string) }); + return (string)getProperty.Invoke(this.currentProjectInstance, new object[] { propertyName }); + } + + public override void Load(string projectFileName) + { + try + { + //this.project = this.projectCollection.LoadProject(projectFileName); + this.project = this.types.projectCollectionType.GetMethod("LoadProject", new Type[] { typeof(string) }).Invoke(this.projectCollection, new object[] { projectFileName }); + + // this.currentProjectInstance = this.project.CreateProjectInstance(); + MethodInfo createProjectInstanceMethod = this.projectType.GetMethod("CreateProjectInstance", new Type[] { }); + this.currentProjectInstance = createProjectInstanceMethod.Invoke(this.project, null); + } + catch (TargetInvocationException tie) + { + throw new WixException(HarvesterErrors.CannotLoadProject(projectFileName, tie.InnerException.Message)); + } + catch (Exception e) + { + throw new WixException(HarvesterErrors.CannotLoadProject(projectFileName, e.Message)); + } + } + } + + private class MSBuild40ProjectItemType : MSBuildProjectItemType + { + public MSBuild40ProjectItemType(object buildItem) + : base(buildItem) + { + } + + public override string ToString() + { + PropertyInfo includeProperty = this.buildItem.GetType().GetProperty("EvaluatedInclude"); + return (string)includeProperty.GetValue(this.buildItem, null); + } + + public override string GetMetadata(string name) + { + MethodInfo getMetadataMethod = this.buildItem.GetType().GetMethod("GetMetadataValue"); + if (null != getMetadataMethod) + { + return (string)getMetadataMethod.Invoke(this.buildItem, new object[] { name }); + } + return string.Empty; + } + } + + /// + /// Used internally in the VSProjectHarvester class to encapsulate + /// the settings for a particular MSBuild "project output group". + /// + private struct ProjectOutputGroup + { + public readonly string Name; + public readonly string BuildOutputGroup; + public readonly string FileSource; + + /// + /// Creates a new project output group. + /// + /// Friendly name used by heat. + /// MSBuild's name of the project output group. + /// VS directory token containing the files of the POG. + public ProjectOutputGroup(string name, string buildOutputGroup, string fileSource) + { + this.Name = name; + this.BuildOutputGroup = buildOutputGroup; + this.FileSource = fileSource; + } + } + + /// + /// Internal class for getting and setting common attrbiutes on + /// directory elements. + /// + internal class DirectoryAttributeAccessor + { + public Wix.ISchemaElement directoryElement; + + public DirectoryAttributeAccessor(Wix.ISchemaElement directoryElement) + { + this.directoryElement = directoryElement; + } + + /// + /// Gets the element as a ISchemaElement. + /// + public Wix.ISchemaElement Element + { + get { return this.directoryElement; } + } + + /// + /// Gets the element as a IParentElement. + /// + public Wix.IParentElement ElementAsParent + { + get { return (Wix.IParentElement)this.directoryElement; } + } + + /// + /// Gets or sets the Id attrbiute. + /// + public string Id + { + get + { + if (this.directoryElement is Wix.Directory wixDirectory) + { + return wixDirectory.Id; + } + else if (this.directoryElement is Wix.DirectoryRef wixDirectoryRef) + { + return wixDirectoryRef.Id; + } + else + { + throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Id")); + } + } + set + { + if (this.directoryElement is Wix.Directory wixDirectory) + { + wixDirectory.Id = value; + } + else if (this.directoryElement is Wix.DirectoryRef wixDirectoryRef) + { + wixDirectoryRef.Id = value; + } + else + { + throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Id")); + } + } + } + + /// + /// Gets or sets the Name attribute. + /// + public string Name + { + get + { + if (this.directoryElement is Wix.Directory wixDirectory) + { + return wixDirectory.Name; + } + else + { + throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Name")); + } + } + set + { + if (this.directoryElement is Wix.Directory wixDirectory) + { + wixDirectory.Name = value; + } + else + { + throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Name")); + } + } + } + } + + internal class HarvestLogger + { + public HarvestLogger(IMessaging messaging) + { + this.Color = ConsoleColor.Black; + this.Messaging = messaging; + } + + private ConsoleColor Color { get; set; } + private IMessaging Messaging { get; } + + public void LogMessage(string message) + { + if (this.Color == ConsoleColor.Red) + { + this.Messaging.Write(HarvesterErrors.BuildErrorDuringHarvesting(message)); + } + } + + public void SetColor(ConsoleColor color) + { + this.Color = color; + } + + public void ResetColor() + { + this.Color = ConsoleColor.Black; + } + } + } +} 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 @@ + + + + + + + + + + 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 @@ + + + + + + netcoreapp3.1;net472 + Exe + Harvester + WiX Toolset Harvester + embedded + true + win-x86;win-x64 + app.config + heat.exe.manifest + LatestMajor + + + + + True + True + WixHarvesterStrings.resx + + + + + + ResXFileCodeGenerator + WixHarvesterStrings.Designer.cs + + + + + + + + + + + + + + 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 @@ + + + + + + + WiX Toolset Harvester + + + + + + + + + + true + + + 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 @@ + + + + + \ 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 @@ + + + + + \ 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 @@ + + + $(BaseIntermediateOutputPath)$(Configuration)\net472\x86\ + $(BaseIntermediateOutputPath)$(Configuration)\net472\x64\ + $(BaseIntermediateOutputPath)$(Configuration)\netcoreapp3.1\ + + $(PublishRoot)WixToolset.Heat\build\ + $(PublishRoot)WixToolset.Heat\tools\net472\ + $(PublishRoot)WixToolset.Heat\tools\net472\x86\ + $(PublishRoot)WixToolset.Heat\tools\net472\x64\ + $(PublishRoot)WixToolset.Heat\tools\netcoreapp3.1\ + + + + + + + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + $(OutputPath)test\$(ProjectName) + + 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolsetTest.Harvesters +{ + using System; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using WixToolset.Core; + using WixToolset.Core.Burn; + using WixToolset.Core.TestPackage; + using WixToolset.Data; + using WixToolset.Extensibility.Data; + using WixToolset.Extensibility.Services; + using WixToolset.Harvesters; + + /// + /// Utility class to emulate heat.exe. + /// + public static class HeatRunner + { + /// + /// Emulates calling heat.exe. + /// + /// + /// + /// + /// + public static int Execute(string[] args, out List messages, bool warningsAsErrors = true) + { + var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider(); + var task = Execute(args, serviceProvider, out messages, warningsAsErrors: warningsAsErrors); + return task.Result; + } + + /// + /// Emulates calling wix.exe with standard backends. + /// This overload always treats warnings as errors. + /// + /// + /// + public static WixRunnerResult Execute(params string[] args) + { + return Execute(true, args); + } + + /// + /// Emulates calling wix.exe with standard backends. + /// + /// + /// + /// + public static WixRunnerResult Execute(bool warningsAsErrors, params string[] args) + { + var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider(); + var exitCode = Execute(args, serviceProvider, out var messages, warningsAsErrors: warningsAsErrors); + return new WixRunnerResult { ExitCode = exitCode.Result, Messages = messages.ToArray() }; + } + + /// + /// Emulates calling wix.exe with standard backends. + /// + /// + /// + /// + /// + /// + public static Task Execute(string[] args, IWixToolsetCoreServiceProvider coreProvider, out List messages, bool warningsAsErrors = true) + { + coreProvider.AddBundleBackend(); + + var listener = new TestMessageListener(); + + messages = listener.Messages; + + var messaging = coreProvider.GetService(); + messaging.SetListener(listener); + + if (warningsAsErrors) + { + messaging.WarningsAsError = true; + } + + var arguments = coreProvider.GetService(); + arguments.Populate(args); + + var commandLine = HeatCommandLineFactory.CreateCommandLine(coreProvider); + var command = commandLine.ParseStandardCommandLine(arguments); + return command?.ExecuteAsync(CancellationToken.None) ?? Task.FromResult(1); + } + } +} 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 @@ + + + + + + netcoreapp3.1 + false + false + + + + + + + + + + + + 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace WixToolsetTest.Sdk +{ + using System; + using System.IO; + using System.Linq; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using WixToolset.Data; + using WixToolset.Data.Symbols; + using Xunit; + + public class MsbuildHeatFixture + { + public static readonly string HeatTargetsPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildHeatFixture).Assembly.CodeBase).AbsolutePath), "..", "..", "..", "publish", "WixToolset.Heat", "build", "WixToolset.Heat.targets"); + + public MsbuildHeatFixture() + { + EnsureWixSdkCached(); + } + + [Theory] + [InlineData(BuildSystem.DotNetCoreSdk)] + [InlineData(BuildSystem.MSBuild)] + [InlineData(BuildSystem.MSBuild64)] + public void CanBuildHeatFilePackage(BuildSystem buildSystem) + { + var sourceFolder = TestData.Get("TestData", "HeatFilePackage"); + + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var binFolder = Path.Combine(baseFolder, @"bin"); + var intermediateFolder = Path.Combine(baseFolder, @"obj\"); + var projectPath = Path.Combine(sourceFolder, "HeatFilePackage.wixproj"); + + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + "-Restore", + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath), + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "BaseIntermediateOutputPath", intermediateFolder), + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "OutputPath", binFolder), + }); + result.AssertSuccess(); + + var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true); + Assert.Single(heatCommandLines); + + var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); + WixAssert.StringCollectionEmpty(warnings); + + var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs"); + var generatedContents = File.ReadAllText(generatedFilePath); + var testXml = generatedContents.GetTestXml(); + WixAssert.StringEqual(@"" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "", testXml); + + var pdbPath = Path.Combine(binFolder, "HeatFilePackage.wixpdb"); + var intermediate = Intermediate.Load(pdbPath); + var section = intermediate.Sections.Single(); + + var fileSymbol = section.Symbols.OfType().Single(); + WixAssert.StringEqual(@"SourceDir\HeatFilePackage.wixproj", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath()?.Path); + } + } + + [Theory] + [InlineData(BuildSystem.DotNetCoreSdk)] + [InlineData(BuildSystem.MSBuild)] + [InlineData(BuildSystem.MSBuild64)] + public void CanBuildHeatFileWithMultipleFilesPackage(BuildSystem buildSystem) + { + var sourceFolder = TestData.Get(@"TestData", "HeatFileMultipleFilesSameFileName"); + + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var binFolder = Path.Combine(baseFolder, @"bin\"); + var intermediateFolder = Path.Combine(baseFolder, @"obj\"); + var projectPath = Path.Combine(sourceFolder, "HeatFileMultipleFilesSameFileName.wixproj"); + + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + "-Restore", + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath), + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "BaseIntermediateOutputPath", intermediateFolder), + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "OutputPath", binFolder), + }); + result.AssertSuccess(); + + var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true); + Assert.Equal(2, heatCommandLines.Count()); + + var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); + WixAssert.StringCollectionEmpty(warnings); + + var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs"); + Assert.True(File.Exists(generatedFilePath)); + + var generatedContents = File.ReadAllText(generatedFilePath); + var testXml = generatedContents.GetTestXml(); + WixAssert.StringEqual("" + + "" + + "" + + "" + + @"" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "", testXml); + + generatedFilePath = Path.Combine(intermediateFolder, "Release", "_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs"); + Assert.True(File.Exists(generatedFilePath)); + + generatedContents = File.ReadAllText(generatedFilePath); + testXml = generatedContents.GetTestXml(); + WixAssert.StringEqual("" + + "" + + "" + + "" + + @"" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "", testXml); + + var pdbPath = Path.Combine(binFolder, "HeatFileMultipleFilesSameFileName.wixpdb"); + Assert.True(File.Exists(pdbPath)); + + var intermediate = Intermediate.Load(pdbPath); + var section = intermediate.Sections.Single(); + + var fileSymbols = section.Symbols.OfType().ToArray(); + WixAssert.StringEqual(@"SourceDir\MyProgram.txt", fileSymbols[0][FileSymbolFields.Source].PreviousValue.AsPath()?.Path); + WixAssert.StringEqual(@"SourceDir\MyProgram.json", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath()?.Path); + } + } + + [Theory] + [InlineData(BuildSystem.DotNetCoreSdk, true)] + [InlineData(BuildSystem.DotNetCoreSdk, false)] + [InlineData(BuildSystem.MSBuild, true)] + [InlineData(BuildSystem.MSBuild, false)] + [InlineData(BuildSystem.MSBuild64, true)] + [InlineData(BuildSystem.MSBuild64, false)] + public void CanBuildHeatProjectPreSdkStyle(BuildSystem buildSystem, bool useToolsVersion) + { + var sourceFolder = TestData.Get(@"TestData", "HeatProject"); + + using (var fs = new TestDataFolderFileSystem()) + { + fs.Initialize(sourceFolder); + File.Copy("global.json", Path.Combine(fs.BaseFolder, "global.json")); + + var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectPreSdkStyle"); + var binFolder = Path.Combine(baseFolder, @"bin\"); + var intermediateFolder = Path.Combine(baseFolder, @"obj\"); + var projectPath = Path.Combine(baseFolder, "HeatProjectPreSdkStyle.wixproj"); + + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] + { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath), + useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty, + }); + result.AssertSuccess(); + + var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true); + var heatCommandLine = Assert.Single(heatCommandLines); + + if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk) + { + Assert.Contains("-usetoolsversion", heatCommandLine); + } + else + { + Assert.DoesNotContain("-usetoolsversion", heatCommandLine); + } + + var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); + WixAssert.StringCollectionEmpty(warnings); + + var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_ToolsVersion4Cs.wxs"); + Assert.True(File.Exists(generatedFilePath)); + + var generatedContents = File.ReadAllText(generatedFilePath); + var testXml = generatedContents.GetTestXml(); + WixAssert.StringEqual(@"" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "", testXml); + + var pdbPath = Path.Combine(binFolder, "Release", "HeatProjectPreSdkStyle.wixpdb"); + Assert.True(File.Exists(pdbPath)); + + var intermediate = Intermediate.Load(pdbPath); + var section = intermediate.Sections.Single(); + + var fileSymbol = section.Symbols.OfType().Single(); + WixAssert.StringEqual(Path.Combine(fs.BaseFolder, "ToolsVersion4Cs", "bin", "Release\\\\ToolsVersion4Cs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path); + } + } + + [Theory] + [InlineData(BuildSystem.DotNetCoreSdk, true)] + [InlineData(BuildSystem.DotNetCoreSdk, false)] + [InlineData(BuildSystem.MSBuild, true)] + [InlineData(BuildSystem.MSBuild, false)] + [InlineData(BuildSystem.MSBuild64, true)] + [InlineData(BuildSystem.MSBuild64, false)] + public void CanBuildHeatProjectSdkStyle(BuildSystem buildSystem, bool useToolsVersion) + { + var sourceFolder = TestData.Get(@"TestData\HeatProject"); + + using (var fs = new TestDataFolderFileSystem()) + { + fs.Initialize(sourceFolder); + File.Copy("global.json", Path.Combine(fs.BaseFolder, "global.json")); + + var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectSdkStyle"); + var binFolder = Path.Combine(baseFolder, @"bin\"); + var intermediateFolder = Path.Combine(baseFolder, @"obj\"); + var projectPath = Path.Combine(fs.BaseFolder, "HeatProjectSdkStyle", "HeatProjectSdkStyle.wixproj"); + var referencedProjectPath = Path.Combine(fs.BaseFolder, "SdkStyleCs", "SdkStyleCs.csproj"); + + var result = MsbuildUtilities.BuildProject(buildSystem, referencedProjectPath, new[] + { + "-t:restore", + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath), + }); + result.AssertSuccess(); + + result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] + { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath), + useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty, + }); + result.AssertSuccess(); + + var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true); + var heatCommandLine = Assert.Single(heatCommandLines); + + if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk) + { + Assert.Contains("-usetoolsversion", heatCommandLine); + } + else + { + Assert.DoesNotContain("-usetoolsversion", heatCommandLine); + } + + var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); + WixAssert.StringCollectionEmpty(warnings); + + var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_SdkStyleCs.wxs"); + Assert.True(File.Exists(generatedFilePath)); + + var generatedContents = File.ReadAllText(generatedFilePath); + var testXml = generatedContents.GetTestXml(); + WixAssert.StringEqual(@"" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "" + + "", testXml); + + var pdbPath = Path.Combine(binFolder, "Release", "HeatProjectSdkStyle.wixpdb"); + Assert.True(File.Exists(pdbPath)); + + var intermediate = Intermediate.Load(pdbPath); + var section = intermediate.Sections.Single(); + + var fileSymbol = section.Symbols.OfType().Single(); + WixAssert.StringEqual(Path.Combine(fs.BaseFolder, "SdkStyleCs", "bin", "Release", "netstandard2.0\\\\SdkStyleCs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path); + } + } + + /// + /// This method exists to get the WixToolset.Sdk.nupkg into the NuGet package cache using the global.json + /// and nuget.config in the root of the repository. By pre-caching the WiX SDK, the rest of the tests will + /// pull the binaries out of the cache instead of needing to find the original .nupkg in the build artifacts + /// folder (which requires use of nuget.config found in the root of the repo) + /// + private static void EnsureWixSdkCached() + { + // This EnsureWixSdkCached project exists only to pre-cache the WixToolset.Sdk for use by later projects. + var sourceFolder = TestData.Get("TestData", "EnsureWixSdkCached"); + + var result = MsbuildUtilities.BuildProject(BuildSystem.DotNetCoreSdk, Path.Combine(sourceFolder, "EnsureWixSdkCached.wixproj"), new[] + { + "-t:restore", + }); + result.AssertSuccess(); + } + } +} 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 @@ + + + + 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 @@ + + + + + + + + + true + + + + + TxtProductComponents + INSTALLFOLDER + true + + + JsonProductComponents + INSTALLFOLDER + true + + + + + 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 @@ + + + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + + true + + + + + ProductComponents + INSTALLFOLDER + true + + + + + 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 @@ + + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + + true + true + + + + + + + + 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 @@ + + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + + true + true + + + + + + + + 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 @@ + + + + + + + + + + + + + + + + + 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 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +namespace SdkStyleCs +{ + public class SdkStyleCs + { + } +} 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 @@ + + + + + + netstandard2.0 + + 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 @@ +// 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. + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("ToolsVersion4Cs")] +[assembly: AssemblyDescription("ToolsVersion4Cs")] +[assembly: AssemblyProduct("WiX Toolset")] +[assembly: AssemblyCompany("WiX Toolset Team")] +[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 @@ + + + + + + + {8B19578A-816A-48A1-A6C4-58067334EB79} + ToolsVersion4Cs + Library + ToolsVersion4Cs + v4.7.2 + + + true + false + $(DefineConstants);DEBUG;TRACE + bin\Debug\ + + + true + true + $(DefineConstants);TRACE + bin\Release\ + + + + + + + + + + + + + \ 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 @@ + + + + + + net472 + false + embedded + TestData\**;$(DefaultItemExcludes) + false + + + + + + + + + + + + + + + + + + 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 @@ + + + True + + \ 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 @@ thmviewer.manifest + True \ 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 @@ @pushd %~dp0 @set _C=Debug +@set _L=%~dp0..\..\build\logs + :parse_args @if /i "%1"=="release" set _C=Release +@if /i "%1"=="inc" set _INCREMENTAL=1 +@if /i "%1"=="clean" set _INCREMENTAL= & set _CLEAN=1 @if not "%1"=="" shift & goto parse_args +:: Clean +@if NOT "%_INCREMENTAL%"=="" call :clean +@if NOT "%_CLEAN%"=="" goto :end + @echo Building tools %_C% -:: tools +:: Build +msbuild -Restore tools.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\tools_build.binlog || exit /b + +:: Publish +msbuild publish_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\tools_publish.binlog || exit /b + +:: Test +dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.HeatTasks -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.HeatTasks.trx" || exit /b + +:: Pack +msbuild -t:Pack WixToolset.Heat -p:Configuration=%_C% -p:NoBuild=true -nologo -m -warnaserror -bl:..\..\build\logs\tools_pack.binlog || exit /b -nuget restore || exit /b +@goto :end -msbuild -t:Build -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\tools_build.binlog || exit /b +:clean +@rd /s/q "..\..\build\tools" 2> nul +@del "..\..\build\artifacts\WixToolset.Heat.*.nupkg" 2> nul +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.heat" 2> nul +@exit /b +:end @popd @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 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30711.63 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32616.157 MinimumVisualStudioVersion = 15.0.26124.0 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thmviewer", "thmviewer\thmviewer.vcxproj", "{95228C13-97F5-484A-B4A2-ECF4618B0881}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixToolset.Templates", "WixToolset.Templates\WixToolset.Templates.csproj", "{D1385232-CA10-4092-BAB5-4E5499FE144C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Templates", "WixToolset.Templates\WixToolset.Templates.csproj", "{D1385232-CA10-4092-BAB5-4E5499FE144C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Heat", "WixToolset.Heat\WixToolset.Heat.csproj", "{4B301D2D-43D3-4000-8132-36C5A1E9F8F0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "heat", "heat\heat.csproj", "{6C747707-29DE-429E-87A4-F6F81DD146C6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F7A815A5-37AE-4EC4-A6D6-B29565055668}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.HeatTasks", "WixToolset.HeatTasks\WixToolset.HeatTasks.csproj", "{EBDCA232-17CD-40CE-B592-CD7230388BEF}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.HeatTasks", "test\WixToolsetTest.HeatTasks\WixToolsetTest.HeatTasks.csproj", "{3FB7F972-31A6-4929-B6BF-EACEC659A7D3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -30,10 +39,45 @@ Global {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|Any CPU.Build.0 = Release|Any CPU {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.ActiveCfg = Release|Any CPU {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.Build.0 = Release|Any CPU + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|x86.ActiveCfg = Debug|Any CPU + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|x86.Build.0 = Debug|Any CPU + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|Any CPU.Build.0 = Release|Any CPU + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|x86.ActiveCfg = Release|Any CPU + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|x86.Build.0 = Release|Any CPU + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|x86.ActiveCfg = Debug|Any CPU + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|x86.Build.0 = Debug|Any CPU + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|Any CPU.Build.0 = Release|Any CPU + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|x86.ActiveCfg = Release|Any CPU + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|x86.Build.0 = Release|Any CPU + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|x86.ActiveCfg = Debug|Any CPU + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|x86.Build.0 = Debug|Any CPU + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|Any CPU.Build.0 = Release|Any CPU + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|x86.ActiveCfg = Release|Any CPU + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|x86.Build.0 = Release|Any CPU + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|x86.ActiveCfg = Debug|Any CPU + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|x86.Build.0 = Debug|Any CPU + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|Any CPU.Build.0 = Release|Any CPU + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|x86.ActiveCfg = Release|Any CPU + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3} = {F7A815A5-37AE-4EC4-A6D6-B29565055668} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {537F1116-39FE-4AED-A9A2-35030E5750D5} 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 @@ + + + True + True + + \ No newline at end of file diff --git a/src/wix/WixToolset.BuildTasks/HeatDirectory.cs b/src/wix/WixToolset.BuildTasks/HeatDirectory.cs deleted file mode 100644 index 79da303a..00000000 --- a/src/wix/WixToolset.BuildTasks/HeatDirectory.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.BuildTasks -{ - using Microsoft.Build.Framework; - - public sealed class HeatDirectory : HeatTask - { - private string directory; - private bool keepEmptyDirectories; - private bool suppressCom; - private bool suppressRootDirectory; - private bool suppressRegistry; - private string template; - private string componentGroupName; - private string directoryRefId; - private string preprocessorVariable; - - public string ComponentGroupName - { - get { return this.componentGroupName; } - set { this.componentGroupName = value; } - } - - [Required] - public string Directory - { - get { return this.directory; } - set { this.directory = value; } - } - - public string DirectoryRefId - { - get { return this.directoryRefId; } - set { this.directoryRefId = value; } - } - - public bool KeepEmptyDirectories - { - get { return this.keepEmptyDirectories; } - set { this.keepEmptyDirectories = value; } - } - - public string PreprocessorVariable - { - get { return this.preprocessorVariable; } - set { this.preprocessorVariable = value; } - } - - public bool SuppressCom - { - get { return this.suppressCom; } - set { this.suppressCom = value; } - } - - public bool SuppressRootDirectory - { - get { return this.suppressRootDirectory; } - set { this.suppressRootDirectory = value; } - } - - public bool SuppressRegistry - { - get { return this.suppressRegistry; } - set { this.suppressRegistry = value; } - } - - public string Template - { - get { return this.template; } - set { this.template = value; } - } - - protected override string OperationName - { - get { return "dir"; } - } - - protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder) - { - commandLineBuilder.AppendSwitch(this.OperationName); - commandLineBuilder.AppendFileNameIfNotNull(this.Directory); - - commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName); - commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId); - commandLineBuilder.AppendIfTrue("-ke", this.KeepEmptyDirectories); - commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom); - commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry); - commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory); - commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template); - commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable); - - base.BuildCommandLine(commandLineBuilder); - } - } -} diff --git a/src/wix/WixToolset.BuildTasks/HeatFile.cs b/src/wix/WixToolset.BuildTasks/HeatFile.cs deleted file mode 100644 index 57fe579d..00000000 --- a/src/wix/WixToolset.BuildTasks/HeatFile.cs +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.BuildTasks -{ - using Microsoft.Build.Framework; - - public sealed class HeatFile : HeatTask - { - private string file; - private bool suppressCom; - private bool suppressRegistry; - private bool suppressRootDirectory; - private string template; - private string componentGroupName; - private string directoryRefId; - private string preprocessorVariable; - - public string ComponentGroupName - { - get { return this.componentGroupName; } - set { this.componentGroupName = value; } - } - - public string DirectoryRefId - { - get { return this.directoryRefId; } - set { this.directoryRefId = value; } - } - - [Required] - public string File - { - get { return this.file; } - set { this.file = value; } - } - - public string PreprocessorVariable - { - get { return this.preprocessorVariable; } - set { this.preprocessorVariable = value; } - } - - public bool SuppressCom - { - get { return this.suppressCom; } - set { this.suppressCom = value; } - } - - public bool SuppressRegistry - { - get { return this.suppressRegistry; } - set { this.suppressRegistry = value; } - } - - public bool SuppressRootDirectory - { - get { return this.suppressRootDirectory; } - set { this.suppressRootDirectory = value; } - } - - public string Template - { - get { return this.template; } - set { this.template = value; } - } - - protected override string OperationName - { - get { return "file"; } - } - - protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder) - { - commandLineBuilder.AppendSwitch(this.OperationName); - commandLineBuilder.AppendFileNameIfNotNull(this.File); - - commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName); - commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId); - commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom); - commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory); - commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry); - commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template); - commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable); - - base.BuildCommandLine(commandLineBuilder); - } - } -} diff --git a/src/wix/WixToolset.BuildTasks/HeatProject.cs b/src/wix/WixToolset.BuildTasks/HeatProject.cs deleted file mode 100644 index 3833a754..00000000 --- a/src/wix/WixToolset.BuildTasks/HeatProject.cs +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.BuildTasks -{ - using Microsoft.Build.Framework; - - public sealed class HeatProject : HeatTask - { - private string configuration; - private string directoryIds; - private string generateType; - private bool generateWixVariables; - private string platform; - private string project; - private string projectName; - private string[] projectOutputGroups; - - public string Configuration - { - get { return this.configuration; } - set { this.configuration = value; } - } - - public string DirectoryIds - { - get { return this.directoryIds; } - set { this.directoryIds = value; } - } - - public bool GenerateWixVariables - { - get { return this.generateWixVariables; } - set { this.generateWixVariables = value; } - } - - public string GenerateType - { - get { return this.generateType; } - set { this.generateType = value; } - } - - public string MsbuildBinPath { get; set; } - - public string Platform - { - get { return this.platform; } - set { this.platform = value; } - } - - [Required] - public string Project - { - get { return this.project; } - set { this.project = value; } - } - - public string ProjectName - { - get { return this.projectName; } - set { this.projectName = value; } - } - - public string[] ProjectOutputGroups - { - get - { - return this.projectOutputGroups; - } - set - { - this.projectOutputGroups = value; - - // If it's just one string and it contains semicolons, let's - // split it into separate items. - if (this.projectOutputGroups.Length == 1) - { - this.projectOutputGroups = this.projectOutputGroups[0].Split(new char[] { ';' }); - } - } - } - - public bool UseToolsVersion { get; set; } - - protected override string OperationName - { - get { return "project"; } - } - - protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder) - { - commandLineBuilder.AppendSwitch(this.OperationName); - commandLineBuilder.AppendFileNameIfNotNull(this.Project); - - commandLineBuilder.AppendSwitchIfNotNull("-configuration ", this.Configuration); - commandLineBuilder.AppendSwitchIfNotNull("-directoryid ", this.DirectoryIds); - commandLineBuilder.AppendSwitchIfNotNull("-generate ", this.GenerateType); - commandLineBuilder.AppendSwitchIfNotNull("-msbuildbinpath ", this.MsbuildBinPath); - commandLineBuilder.AppendSwitchIfNotNull("-platform ", this.Platform); - commandLineBuilder.AppendArrayIfNotNull("-pog ", this.ProjectOutputGroups); - commandLineBuilder.AppendSwitchIfNotNull("-projectname ", this.ProjectName); - commandLineBuilder.AppendIfTrue("-wixvar", this.GenerateWixVariables); - -#if !NETCOREAPP - commandLineBuilder.AppendIfTrue("-usetoolsversion", this.UseToolsVersion); -#endif - - base.BuildCommandLine(commandLineBuilder); - } - } -} diff --git a/src/wix/WixToolset.BuildTasks/HeatTask.cs b/src/wix/WixToolset.BuildTasks/HeatTask.cs deleted file mode 100644 index 18c08342..00000000 --- a/src/wix/WixToolset.BuildTasks/HeatTask.cs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.BuildTasks -{ - using Microsoft.Build.Framework; - - /// - /// A base MSBuild task to run the WiX harvester. - /// Specific harvester tasks should extend this class. - /// - public abstract partial class HeatTask : ToolsetTask - { - private bool autogenerageGuids; - private bool generateGuidsNow; - private ITaskItem outputFile; - private bool suppressFragments; - private bool suppressUniqueIds; - private string[] transforms; - - public HeatTask() - { - this.RunAsSeparateProcess = true; - } - - public bool AutogenerateGuids - { - get { return this.autogenerageGuids; } - set { this.autogenerageGuids = value; } - } - - public bool GenerateGuidsNow - { - get { return this.generateGuidsNow; } - set { this.generateGuidsNow = value; } - } - - [Required] - [Output] - public ITaskItem OutputFile - { - get { return this.outputFile; } - set { this.outputFile = value; } - } - - public bool SuppressFragments - { - get { return this.suppressFragments; } - set { this.suppressFragments = value; } - } - - public bool SuppressUniqueIds - { - get { return this.suppressUniqueIds; } - set { this.suppressUniqueIds = value; } - } - - public string[] Transforms - { - get { return this.transforms; } - set { this.transforms = value; } - } - - protected sealed override string ToolName => "heat.exe"; - - /// - /// Gets the name of the heat operation performed by the task. - /// - /// This is the first parameter passed on the heat.exe command-line. - /// The name of the heat operation performed by the task. - protected abstract string OperationName - { - get; - } - - /// - /// Builds a command line from options in this task. - /// - protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder) - { - base.BuildCommandLine(commandLineBuilder); - - commandLineBuilder.AppendIfTrue("-ag", this.AutogenerateGuids); - commandLineBuilder.AppendIfTrue("-gg", this.GenerateGuidsNow); - commandLineBuilder.AppendIfTrue("-sfrag", this.SuppressFragments); - commandLineBuilder.AppendIfTrue("-suid", this.SuppressUniqueIds); - commandLineBuilder.AppendArrayIfNotNull("-t ", this.Transforms); - commandLineBuilder.AppendTextIfNotNull(this.AdditionalOptions); - commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile); - } - } -} diff --git a/src/wix/WixToolset.BuildTasks/HeatTask_InProc.cs b/src/wix/WixToolset.BuildTasks/HeatTask_InProc.cs deleted file mode 100644 index 48ee9e02..00000000 --- a/src/wix/WixToolset.BuildTasks/HeatTask_InProc.cs +++ /dev/null @@ -1,20 +0,0 @@ -// 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. - -#if !NETCOREAPP -namespace WixToolset.BuildTasks -{ - using System; - using System.Threading; - using System.Threading.Tasks; - using WixToolset.Extensibility.Services; - - public partial class HeatTask - { - public override bool RunAsSeparateProcess { get => true; } - - protected sealed override string TaskShortName => "HEAT"; - - protected sealed override Task ExecuteCoreAsync(IWixToolsetCoreServiceProvider coreProvider, string commandLineString, CancellationToken cancellationToken) => throw new NotImplementedException(); - } -} -#endif diff --git a/src/wix/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs b/src/wix/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs deleted file mode 100644 index 983695c9..00000000 --- a/src/wix/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.BuildTasks -{ - using System; - using System.Collections; - using System.Globalization; - using System.IO; - using System.Xml; - using Microsoft.Build.Framework; - using Microsoft.Build.Utilities; - - /// - /// This task refreshes the generated file for bundle projects. - /// - public class RefreshBundleGeneratedFile : Task - { - /// - /// The list of files to generate. - /// - [Required] - public ITaskItem[] GeneratedFiles { get; set; } - - /// - /// All the project references in the project. - /// - [Required] - public ITaskItem[] ProjectReferencePaths { get; set; } - - /// - /// Gets a complete list of external cabs referenced by the given installer database file. - /// - /// True upon completion of the task execution. - public override bool Execute() - { - ArrayList payloadGroupRefs = new ArrayList(); - ArrayList packageGroupRefs = new ArrayList(); - for (int i = 0; i < this.ProjectReferencePaths.Length; i++) - { - ITaskItem item = this.ProjectReferencePaths[i]; - - if (!String.IsNullOrEmpty(item.GetMetadata(ToolsCommon.DoNotHarvest))) - { - continue; - } - - string projectPath = item.GetMetadata("MSBuildSourceProjectFile"); - string projectName = Path.GetFileNameWithoutExtension(projectPath); - string referenceName = ToolsCommon.GetIdentifierFromName(ToolsCommon.GetMetadataOrDefault(item, "Name", projectName)); - - string[] pogs = item.GetMetadata("RefProjectOutputGroups").Split(';'); - foreach (string pog in pogs) - { - if (!String.IsNullOrEmpty(pog)) - { - // TODO: Add payload group references and package group references once heat is generating them - ////payloadGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog)); - packageGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog)); - } - } - } - - XmlDocument doc = new XmlDocument(); - - XmlProcessingInstruction head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'"); - doc.AppendChild(head); - - XmlElement rootElement = doc.CreateElement("Wix"); - rootElement.SetAttribute("xmlns", "http://wixtoolset.org/schemas/v4/wxs"); - doc.AppendChild(rootElement); - - XmlElement fragment = doc.CreateElement("Fragment"); - rootElement.AppendChild(fragment); - - XmlElement payloadGroup = doc.CreateElement("PayloadGroup"); - payloadGroup.SetAttribute("Id", "Bundle.Generated.Payloads"); - fragment.AppendChild(payloadGroup); - - XmlElement packageGroup = doc.CreateElement("PackageGroup"); - packageGroup.SetAttribute("Id", "Bundle.Generated.Packages"); - fragment.AppendChild(packageGroup); - - foreach (string payloadGroupRef in payloadGroupRefs) - { - XmlElement payloadGroupRefElement = doc.CreateElement("PayloadGroupRef"); - payloadGroupRefElement.SetAttribute("Id", payloadGroupRef); - payloadGroup.AppendChild(payloadGroupRefElement); - } - - foreach (string packageGroupRef in packageGroupRefs) - { - XmlElement packageGroupRefElement = doc.CreateElement("PackageGroupRef"); - packageGroupRefElement.SetAttribute("Id", packageGroupRef); - packageGroup.AppendChild(packageGroupRefElement); - } - - foreach (ITaskItem item in this.GeneratedFiles) - { - string fullPath = item.GetMetadata("FullPath"); - - payloadGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath) + ".Payloads"); - packageGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath) + ".Packages"); - try - { - doc.Save(fullPath); - } - catch (Exception e) - { - // e.Message will be something like: "Access to the path 'fullPath' is denied." - this.Log.LogMessage(MessageImportance.High, "Unable to save generated file to '{0}'. {1}", fullPath, e.Message); - } - } - - return true; - } - } -} diff --git a/src/wix/WixToolset.BuildTasks/RefreshGeneratedFile.cs b/src/wix/WixToolset.BuildTasks/RefreshGeneratedFile.cs deleted file mode 100644 index e18ae222..00000000 --- a/src/wix/WixToolset.BuildTasks/RefreshGeneratedFile.cs +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.BuildTasks -{ - using System; - using System.Collections; - using System.Globalization; - using System.IO; - using System.Xml; - using Microsoft.Build.Framework; - using Microsoft.Build.Utilities; - - /// - /// This task refreshes the generated file that contains ComponentGroupRefs - /// to harvested output. - /// - public class RefreshGeneratedFile : Task - { - /// - /// The list of files to generate. - /// - [Required] - public ITaskItem[] GeneratedFiles { get; set; } - - /// - /// All the project references in the project. - /// - [Required] - public ITaskItem[] ProjectReferencePaths { get; set; } - - /// - /// Gets a complete list of external cabs referenced by the given installer database file. - /// - /// True upon completion of the task execution. - public override bool Execute() - { - ArrayList componentGroupRefs = new ArrayList(); - for (int i = 0; i < this.ProjectReferencePaths.Length; i++) - { - ITaskItem item = this.ProjectReferencePaths[i]; - - if (!String.IsNullOrEmpty(item.GetMetadata(ToolsCommon.DoNotHarvest))) - { - continue; - } - - string projectPath = item.GetMetadata("MSBuildSourceProjectFile"); - string projectName = Path.GetFileNameWithoutExtension(projectPath); - string referenceName = ToolsCommon.GetIdentifierFromName(ToolsCommon.GetMetadataOrDefault(item, "Name", projectName)); - - string[] pogs = item.GetMetadata("RefProjectOutputGroups").Split(';'); - foreach (string pog in pogs) - { - if (!String.IsNullOrEmpty(pog)) - { - componentGroupRefs.Add(String.Format(CultureInfo.InvariantCulture, "{0}.{1}", referenceName, pog)); - } - } - } - - XmlDocument doc = new XmlDocument(); - - XmlProcessingInstruction head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'"); - doc.AppendChild(head); - - XmlElement rootElement = doc.CreateElement("Wix"); - rootElement.SetAttribute("xmlns", "http://wixtoolset.org/schemas/v4/wxs"); - doc.AppendChild(rootElement); - - XmlElement fragment = doc.CreateElement("Fragment"); - rootElement.AppendChild(fragment); - - XmlElement componentGroup = doc.CreateElement("ComponentGroup"); - componentGroup.SetAttribute("Id", "Product.Generated"); - fragment.AppendChild(componentGroup); - - foreach (string componentGroupRef in componentGroupRefs) - { - XmlElement componentGroupRefElement = doc.CreateElement("ComponentGroupRef"); - componentGroupRefElement.SetAttribute("Id", componentGroupRef); - componentGroup.AppendChild(componentGroupRefElement); - } - - foreach (ITaskItem item in this.GeneratedFiles) - { - string fullPath = item.GetMetadata("FullPath"); - - componentGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath)); - try - { - doc.Save(fullPath); - } - catch (Exception e) - { - // e.Message will be something like: "Access to the path 'fullPath' is denied." - this.Log.LogMessage(MessageImportance.High, "Unable to save generated file to '{0}'. {1}", fullPath, e.Message); - } - } - - return true; - } - } -} diff --git a/src/wix/WixToolset.Sdk/WixToolset.Sdk.csproj b/src/wix/WixToolset.Sdk/WixToolset.Sdk.csproj index b6751ed9..4af6c522 100644 --- a/src/wix/WixToolset.Sdk/WixToolset.Sdk.csproj +++ b/src/wix/WixToolset.Sdk/WixToolset.Sdk.csproj @@ -13,7 +13,6 @@ - diff --git a/src/wix/WixToolset.Sdk/tools/wix.harvest.targets b/src/wix/WixToolset.Sdk/tools/wix.harvest.targets deleted file mode 100644 index 23e4a68e..00000000 --- a/src/wix/WixToolset.Sdk/tools/wix.harvest.targets +++ /dev/null @@ -1,511 +0,0 @@ - - - - - - - - $(WixToolDir) - - - - - - - - - - - - - $(NoLogo) - $(SuppressAllWarnings) - $(SuppressSpecificWarnings) - $(TreatWarningsAsErrors) - $(TreatSpecificWarningsAsErrors) - $(VerboseOutput) - true - false - true - false - - - - - - false - - $(HarvestNoLogo) - $(HarvestSuppressAllWarnings) - $(HarvestSuppressSpecificWarnings) - $(HarvestTreatWarningsAsErrors) - $(HarvestTreatSpecificWarningsAsErrors) - $(HarvestVerboseOutput) - $(HarvestAutogenerateGuids) - $(HarvestGenerateGuidsNow) - $(HarvestSuppressFragments) - $(HarvestSuppressUniqueIds) - $(HarvestTransforms) - $(IntermediateOutputPath)Product.Generated.wxs - $(IntermediateOutputPath)Bundle.Generated.wxs - $(MSBuildBinPath) - - - - - $(HarvestNoLogo) - $(HarvestSuppressAllWarnings) - $(HarvestSuppressSpecificWarnings) - $(HarvestTreatWarningsAsErrors) - $(HarvestTreatSpecificWarningsAsErrors) - $(HarvestVerboseOutput) - $(HarvestAutogenerateGuids) - $(HarvestGenerateGuidsNow) - $(HarvestSuppressFragments) - $(HarvestSuppressUniqueIds) - $(HarvestTransforms) - - - - - $(HarvestNoLogo) - $(HarvestSuppressAllWarnings) - $(HarvestSuppressSpecificWarnings) - $(HarvestTreatWarningsAsErrors) - $(HarvestTreatSpecificWarningsAsErrors) - $(HarvestVerboseOutput) - $(HarvestAutogenerateGuids) - $(HarvestGenerateGuidsNow) - $(HarvestSuppressFragments) - $(HarvestSuppressUniqueIds) - $(HarvestTransforms) - - - - - - $(CoreCompileDependsOn); - Harvest - - - ConvertReferences; - ConvertBundleReferences; - HarvestProjects; - HarvestDirectory; - HarvestFile; - GenerateCode; - - - - - - - - RefreshGeneratedFile; - RefreshBundleGeneratedFile - - - - - - - - - <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' "> - %(_MSBuildProjectReferenceExistent.RefTargetDir) - Binaries;Symbols;Sources;Content;Satellites;Documents - %(_MSBuildProjectReferenceExistent.Name) - $(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs - - - - - - - - <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" /> - - - - - - - - - <_HeatProjectReference Include="@(_MSBuildProjectReferenceExistent)" Condition=" '%(_MSBuildProjectReferenceExistent.DoNotHarvest)' == '' "> - Binaries;Symbols;Sources;Content;Satellites;Documents - payloadgroup - $(IntermediateOutputPath)_%(_MSBuildProjectReferenceExistent.Filename).wxs - - - - - - - - <_GeneratedFiles Include="$(HarvestProjectsGeneratedFile)" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $(HarvestProjectsTransforms) - $(HarvestProjectsProjectOutputGroups) - $(HarvestProjectsDirectoryIds) - - - $(HarvestProjectsTransforms) - $(HarvestProjectsProjectOutputGroups) - $(HarvestProjectsDirectoryIds) - - - - - CombineHarvestProjects - - - - - - - - - - - - - - - - - $(HarvestDirectoryTransforms) - $(HarvestDirectoryComponentGroupName) - $(HarvestDirectoryDirectoryRefId) - $(HarvestDirectoryKeepEmptyDirectories) - $(HarvestDirectoryPreprocessorVariable) - $(HarvestDirectorySuppressCom) - $(HarvestDirectorySuppressRootDirectory) - $(HarvestDirectorySuppressRegistry) - - - - - - GetHarvestDirectoryContent - - - - - - - - - - - - - - - - - - - - - - - - - - $(HarvestFileTransforms) - $(HarvestFileComponentGroupName) - $(HarvestFileDirectoryRefId) - $(HarvestFilePreprocessorVariable) - $(HarvestFileSuppressCom) - $(HarvestFileSuppressRegistry) - $(HarvestFileSuppressRootDirectory) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/wix/WixToolset.Sdk/tools/wix.targets b/src/wix/WixToolset.Sdk/tools/wix.targets index 87dfab33..752753b6 100644 --- a/src/wix/WixToolset.Sdk/tools/wix.targets +++ b/src/wix/WixToolset.Sdk/tools/wix.targets @@ -34,7 +34,6 @@ - $(MSBuildThisFileDirectory)wix.harvest.targets $(MSBuildThisFileDirectory)WixToolset.Signing.targets @@ -966,7 +965,6 @@ --> - diff --git a/src/wix/heat/AssemblyHarvester.cs b/src/wix/heat/AssemblyHarvester.cs deleted file mode 100644 index 2304d827..00000000 --- a/src/wix/heat/AssemblyHarvester.cs +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Reflection; - using System.Runtime.InteropServices; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// Harvest WiX authoring from an assembly file. - /// - public sealed class AssemblyHarvester - { - /// - /// Harvest the registry values written by RegisterAssembly. - /// - /// The file to harvest registry values from. - /// The harvested registry values. - public Wix.RegistryValue[] HarvestRegistryValues(string path) - { -#if NETCOREAPP - throw new PlatformNotSupportedException(); -#else - RegistrationServices regSvcs = new RegistrationServices(); - Assembly assembly = Assembly.LoadFrom(path); - - // must call this before overriding registry hives to prevent binding failures - // on exported types during RegisterAssembly - assembly.GetExportedTypes(); - - using (RegistryHarvester registryHarvester = new RegistryHarvester(true)) - { - regSvcs.RegisterAssembly(assembly, AssemblyRegistrationFlags.SetCodeBase); - - return registryHarvester.HarvestRegistry(); - } -#endif - } - } -} diff --git a/src/wix/heat/Data/HarvesterErrors.cs b/src/wix/heat/Data/HarvesterErrors.cs deleted file mode 100644 index a8a3055a..00000000 --- a/src/wix/heat/Data/HarvesterErrors.cs +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Data -{ - using System; - using System.Resources; - using WixToolset.Data; - -#pragma warning disable 1591 // TODO: add documentation - public static class HarvesterErrors - { - public static Message ArgumentRequiresValue(string argument) - { - return Message(null, Ids.ArgumentRequiresValue, "The argument '{0}' does not have a value specified and it is required.", argument); - } - - public static Message BuildErrorDuringHarvesting(string buildError) - { - return Message(null, Ids.BuildErrorDuringHarvesting, "Build error during harvesting: {0}", buildError); - } - - public static Message BuildFailed() - { - return Message(null, Ids.BuildFailed, "Build failed."); - } - - public static Message CannotBuildProject(string projectFile, string innerExceptionMessage) - { - return Message(null, Ids.CannotBuildProject, "Failed to build project {0}: {1}", projectFile, innerExceptionMessage); - } - - public static Message CannotHarvestWebSite() - { - return Message(null, Ids.CannotHarvestWebSite, "Cannot harvest website. On Windows Vista, you must install IIS 6 Management Compatibility."); - } - - public static Message CannotLoadMSBuildAssembly(string innerExceptionMessage) - { - return Message(null, Ids.CannotLoadMSBuildAssembly, "Failed to load MSBuild assembly: {0}", innerExceptionMessage); - } - - public static Message CannotLoadMSBuildEngine(string innerExceptionMessage) - { - return Message(null, Ids.CannotLoadMSBuildEngine, "Failed to load MSBuild engine: {0}", innerExceptionMessage); - } - - public static Message CannotLoadMSBuildWrapperAssembly(string innerExceptionMessage) - { - return Message(null, Ids.CannotLoadMSBuildWrapperAssembly, "Failed to load MSBuild wrapper assembly: {0}", innerExceptionMessage); - } - - public static Message CannotLoadMSBuildWrapperObject(string innerExceptionMessage) - { - return Message(null, Ids.CannotLoadMSBuildWrapperObject, "Failed to load MSBuild wrapper object: {0}", innerExceptionMessage); - } - - public static Message CannotLoadMSBuildWrapperType(string innerExceptionMessage) - { - return Message(null, Ids.CannotLoadMSBuildWrapperType, "Failed to load MSBuild wrapper type: {0}", innerExceptionMessage); - } - - public static Message CannotLoadProject(string projectFile, string innerExceptionMessage) - { - return Message(null, Ids.CannotLoadProject, "Failed to load project {0}: {1}", projectFile, innerExceptionMessage); - } - - public static Message DirectoryAttributeAccessorBadType(string attributeName) - { - return Message(null, Ids.DirectoryAttributeAccessorBadType, "DirectoryAttributeAccessor tried to access an invalid element type for attribute '{0'}.", attributeName); - } - - public static Message DirectoryNotFound(string directory) - { - return Message(null, Ids.DirectoryNotFound, "The directory '{0}' could not be found.", directory); - } - - public static Message EmptyDirectory(string directory) - { - 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); - } - - public static Message ErrorTransformingHarvestedWiX(string transform, string message) - { - return Message(null, Ids.ErrorTransformingHarvestedWiX, "Error applying transform {0} to harvested WiX: {1}", transform, message); - } - - public static Message FileNotFound(string file) - { - return Message(null, Ids.FileNotFound, "The file '{0}' cannot be found.", file); - } - - public static Message InsufficientPermissionHarvestWebSite() - { - return Message(null, Ids.InsufficientPermissionHarvestWebSite, "Not enough permissions to harvest website. On Windows Vista, you must run Heat elevated."); - } - - public static Message InvalidDirectoryId(string generateType) - { - return Message(null, Ids.InvalidDirectoryId, "Invalid directory ID: {0}. Check that it doesn't start with a hyphen or slash.", generateType); - } - - public static Message InvalidDirectoryOutputType(string generateType) - { - return Message(null, Ids.InvalidOutputType, "Invalid generated type: {0}. Must be one of: components, payloadgroup.", generateType); - } - - public static Message InvalidOutputGroup(string outputGroup) - { - return Message(null, Ids.InvalidOutputGroup, "Invalid project output group: {0}.", outputGroup); - } - - public static Message InvalidProjectOutputType(string generateType) - { - return Message(null, Ids.InvalidOutputType, "Invalid generated type: {0}. Must be one of: components, container, payloadgroup, packagegroup.", generateType); - } - - public static Message InvalidProjectName(string generateType) - { - return Message(null, Ids.InvalidProjectName, "Invalid project name: {0}. Check that it doesn't start with a hyphen or slash.", generateType); - } - - public static Message MissingProjectOutputGroup(string projectFile, string outputGroup) - { - return Message(null, Ids.MissingProjectOutputGroup, "Missing project output group '{1}' in project {0}.", projectFile, outputGroup); - } - - public static Message MsbuildBinPathRequired(string version) - { - return Message(null, Ids.MsbuildBinPathRequired, "MSBuildBinPath required for ToolsVersion '{0}'", version); - } - - public static Message NoOutputGroupSpecified() - { - return Message(null, Ids.NoOutputGroupSpecified, "No project output group specified."); - } - - public static Message PerformanceCategoryNotFound(string key) - { - return Message(null, Ids.PerformanceCategoryNotFound, "Performance category '{0}' not found.", key); - } - - public static Message SpacesNotAllowedInArgumentValue(string arg, string value) - { - 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); - } - - public static Message UnableToOpenRegistryKey(string key) - { - return Message(null, Ids.UnableToOpenRegistryKey, "Unable to open registry key '{0}'.", key); - } - - public static Message UnsupportedPerformanceCounterType(string key) - { - return Message(null, Ids.UnsupportedPerformanceCounterType, "Unsupported performance counter type '{0}'.", key); - } - - public static Message WebSiteNotFound(string webSiteDescription) - { - 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); - } - - private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) - { - return new Message(sourceLineNumber, MessageLevel.Error, (int)id, format, args); - } - - private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) - { - return new Message(sourceLineNumber, MessageLevel.Error, (int)id, resourceManager, resourceName, args); - } - - public enum Ids - { - DirectoryNotFound = 5052, - EmptyDirectory = 5053, - ErrorTransformingHarvestedWiX = 5055, - UnableToOpenRegistryKey = 5056, - SpacesNotAllowedInArgumentValue = 5057, - ArgumentRequiresValue = 5058, - FileNotFound = 5059, - PerformanceCategoryNotFound = 5060, - UnsupportedPerformanceCounterType = 5061, - WebSiteNotFound = 5158, - InsufficientPermissionHarvestWebSite = 5159, - CannotHarvestWebSite = 5160, - InvalidOutputGroup = 5301, - NoOutputGroupSpecified = 5302, - CannotLoadMSBuildAssembly = 5303, - CannotLoadMSBuildEngine = 5304, - CannotLoadProject = 5305, - CannotBuildProject = 5306, - BuildFailed = 5307, - MissingProjectOutputGroup = 5308, - DirectoryAttributeAccessorBadType = 5309, - InvalidOutputType = 5310, - InvalidDirectoryId = 5311, - InvalidProjectName = 5312, - BuildErrorDuringHarvesting = 5313, - CannotLoadMSBuildWrapperAssembly = 5314, - CannotLoadMSBuildWrapperType = 5315, - CannotLoadMSBuildWrapperObject = 5316, - MsbuildBinPathRequired = 5317, - } - } -} diff --git a/src/wix/heat/Data/HarvesterVerboses.cs b/src/wix/heat/Data/HarvesterVerboses.cs deleted file mode 100644 index 72de2351..00000000 --- a/src/wix/heat/Data/HarvesterVerboses.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Data -{ - using System; - using System.Resources; - using WixToolset.Data; - -#pragma warning disable 1591 // TODO: add documentation - public static class HarvesterVerboses - { - public static Message FoundToolsVersion(string toolsVersion) - { - return Message(null, Ids.FoundToolsVersion, "Found ToolsVersion {0} inside project file.", toolsVersion); - } - - public static Message HarvestingAssembly(string fileName) - { - return Message(null, Ids.HarvestingAssembly, "Trying to harvest {0} as an assembly.", fileName); - } - - public static Message HarvestingSelfReg(string fileName) - { - return Message(null, Ids.HarvestingSelfReg, "Trying to harvest self-registration information from native DLL {0}.", fileName); - } - - public static Message HarvestingTypeLib(string fileName) - { - return Message(null, Ids.HarvestingTypeLib, "Trying to harvest type-library information from native DLL {0}.", fileName); - } - - public static Message LoadingProjectWithBinPath(string msbuildBinPath) - { - return Message(null, Ids.LoadingProjectWithBinPath, "Loading project using MSBuild bin path {0}.", msbuildBinPath); - } - - public static Message LoadingProjectWithVersion(string msbuildVersion) - { - return Message(null, Ids.LoadingProjectWithVersion, "Loading project using MSBuild version {0}.", msbuildVersion); - } - - private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) - { - return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, format, args); - } - - private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) - { - return new Message(sourceLineNumber, MessageLevel.Verbose, (int)id, resourceManager, resourceName, args); - } - - public enum Ids - { - HarvestingAssembly = 5100, - HarvestingSelfReg = 5101, - HarvestingTypeLib = 5102, - LoadingProjectWithVersion = 5378, - FoundToolsVersion = 5379, - LoadingProjectWithBinPath = 5380, - } - } -} diff --git a/src/wix/heat/Data/HarvesterWarnings.cs b/src/wix/heat/Data/HarvesterWarnings.cs deleted file mode 100644 index 80ee5c31..00000000 --- a/src/wix/heat/Data/HarvesterWarnings.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Data -{ - using System; - using System.Resources; - using WixToolset.Data; - -#pragma warning disable 1591 // TODO: add documentation - public static class HarvesterWarnings - { - public static Message AssemblyHarvestFailed(string file, string message) - { - 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); - } - - public static Message DuplicateDllRegistryEntry(string registryKey, string componentId) - { - return Message(null, Ids.DuplicateDllRegistryEntry, "Ignoring the registry key '{0}', it has already been added to the component '{1}'.", registryKey, componentId); - } - - public static Message DuplicateDllRegistryEntry(string registryKey, string registryKeyValue, string componentId) - { - 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); - } - - public static Message EncounteredNullDirectoryForWebSite(string directory) - { - return Message(null, Ids.EncounteredNullDirectoryForWebSite, "Could not harvest website directory: {0}. Please update the output with the appropriate directory ID before using.", directory); - } - - public static Message NoLogger(string exceptionMessage) - { - return Message(null, Ids.NoLogger, "Failed to set loggers: {0}", exceptionMessage); - } - - public static Message NoProjectConfiguration(string exceptionMessage) - { - return Message(null, Ids.NoProjectConfiguration, "Failed to set project configuration and platform: {0}", exceptionMessage); - } - - public static Message SelfRegHarvestFailed(string file, string message) - { - 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); - } - - public static Message TypeLibLoadFailed(string file, string message) - { - 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); - } - - public static Message UnsupportedRegistryType(string registryValue, int regFileLineNumber, string unsupportedType) - { - 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); - } - - private static Message Message(SourceLineNumber sourceLineNumber, Ids id, string format, params object[] args) - { - return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, format, args); - } - - private static Message Message(SourceLineNumber sourceLineNumber, Ids id, ResourceManager resourceManager, string resourceName, params object[] args) - { - return new Message(sourceLineNumber, MessageLevel.Warning, (int)id, resourceManager, resourceName, args); - } - - public enum Ids - { - SelfRegHarvestFailed = 5150, - AssemblyHarvestFailed = 5151, - TypeLibLoadFailed = 5152, - DuplicateDllRegistryEntry = 5156, - UnsupportedRegistryType = 5157, - NoProjectConfiguration = 5398, - NoLogger = 5399, - EncounteredNullDirectoryForWebSite = 5400, - } - } -} diff --git a/src/wix/heat/Data/HeatCommandLineOption.cs b/src/wix/heat/Data/HeatCommandLineOption.cs deleted file mode 100644 index 5815abf0..00000000 --- a/src/wix/heat/Data/HeatCommandLineOption.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Data -{ - /// - /// A command line option. - /// - public struct HeatCommandLineOption - { - /// - /// The option name used on the command line. - /// - public string Option; - - /// - /// Description shown in Help command. - /// - public string Description; - - /// - /// Instantiates a new CommandLineOption. - /// - /// The option name. - /// The description of the option. - public HeatCommandLineOption(string option, string description) - { - this.Option = option; - this.Description = description; - } - } -} diff --git a/src/wix/heat/Data/IHeatCommandLine.cs b/src/wix/heat/Data/IHeatCommandLine.cs deleted file mode 100644 index 9198468d..00000000 --- a/src/wix/heat/Data/IHeatCommandLine.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Data -{ - using WixToolset.Extensibility.Data; - -#pragma warning disable 1591 // TODO: add documentation - public interface IHeatCommandLine - { - ICommandLineCommand ParseStandardCommandLine(ICommandLineArguments arguments); - } -} diff --git a/src/wix/heat/DirectoryHarvester.cs b/src/wix/heat/DirectoryHarvester.cs deleted file mode 100644 index c1cc3edb..00000000 --- a/src/wix/heat/DirectoryHarvester.cs +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.IO; - using WixToolset.Data; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// Harvest WiX authoring for a directory from the file system. - /// - public sealed class DirectoryHarvester : BaseHarvesterExtension - { - private FileHarvester fileHarvester; - - private const string ComponentPrefix = "cmp"; - private const string DirectoryPrefix = "dir"; - private const string FilePrefix = "fil"; - - /// - /// Instantiate a new DirectoryHarvester. - /// - public DirectoryHarvester() - { - this.fileHarvester = new FileHarvester(); - this.SetUniqueIdentifiers = true; - } - - /// - /// Gets or sets what type of elements are to be generated. - /// - /// The type of elements being generated. - public GenerateType GenerateType { get; set; } - - /// - /// Gets or sets the option to keep empty directories. - /// - /// The option to keep empty directories. - public bool KeepEmptyDirectories { get; set; } - - /// - /// Gets or sets the rooted DirectoryRef Id if the user has supplied it. - /// - /// The DirectoryRef Id to use as the root. - public string RootedDirectoryRef { get; set; } - - /// - /// Gets of sets the option to set unique identifiers. - /// - /// The option to set unique identifiers. - public bool SetUniqueIdentifiers { get; set; } - - /// - /// Gets or sets the option to suppress including the root directory as an element. - /// - /// The option to suppress including the root directory as an element. - public bool SuppressRootDirectory { get; set; } - - /// - /// Harvest a directory. - /// - /// The path of the directory. - /// The harvested directory. - public override Wix.Fragment[] Harvest(string argument) - { - if (null == argument) - { - throw new ArgumentNullException("argument"); - } - - Wix.IParentElement harvestParent = this.HarvestDirectory(argument, true, this.GenerateType); - Wix.ISchemaElement harvestElement; - - if (this.GenerateType == GenerateType.PayloadGroup) - { - Wix.PayloadGroup payloadGroup = (Wix.PayloadGroup)harvestParent; - payloadGroup.Id = this.RootedDirectoryRef; - harvestElement = payloadGroup; - } - else - { - Wix.Directory directory = (Wix.Directory)harvestParent; - - Wix.DirectoryRef directoryRef = new Wix.DirectoryRef(); - directoryRef.Id = this.RootedDirectoryRef; - - if (this.SuppressRootDirectory) - { - foreach (Wix.ISchemaElement element in directory.Children) - { - directoryRef.AddChild(element); - } - } - else - { - directoryRef.AddChild(directory); - } - harvestElement = directoryRef; - } - - Wix.Fragment fragment = new Wix.Fragment(); - fragment.AddChild(harvestElement); - - return new Wix.Fragment[] { fragment }; - } - - /// - /// Harvest a directory. - /// - /// The path of the directory. - /// The option to harvest child directories and files. - /// The harvested directory. - public Wix.Directory HarvestDirectory(string path, bool harvestChildren) - { - if (null == path) - { - throw new ArgumentNullException("path"); - } - - return (Wix.Directory)this.HarvestDirectory(path, harvestChildren, GenerateType.Components); - } - - /// - /// Harvest a directory. - /// - /// The path of the directory. - /// The option to harvest child directories and files. - /// The type to generate. - /// The harvested directory. - private Wix.IParentElement HarvestDirectory(string path, bool harvestChildren, GenerateType generateType) - { - if (File.Exists(path)) - { - throw new WixException(ErrorMessages.ExpectedDirectoryGotFile("dir", path)); - } - - if (null == this.RootedDirectoryRef) - { - this.RootedDirectoryRef = "TARGETDIR"; - } - - // use absolute paths - path = Path.GetFullPath(path); - - // Remove any trailing separator to ensure Path.GetFileName() will return the directory name. - path = path.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); - - Wix.IParentElement harvestParent; - if (generateType == GenerateType.PayloadGroup) - { - harvestParent = new Wix.PayloadGroup(); - } - else - { - Wix.Directory directory = new Wix.Directory(); - directory.Name = Path.GetFileName(path); - directory.FileSource = path; - - if (this.SetUniqueIdentifiers) - { - if (this.SuppressRootDirectory) - { - directory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, this.RootedDirectoryRef); - } - else - { - directory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, this.RootedDirectoryRef, directory.Name); - } - } - harvestParent = directory; - } - - if (harvestChildren) - { - try - { - int fileCount = this.HarvestDirectory(path, "SourceDir\\", harvestParent, generateType); - - if (generateType != GenerateType.PayloadGroup) - { - // its an error to not harvest anything with the option to keep empty directories off - if (0 == fileCount && !this.KeepEmptyDirectories) - { - throw new WixException(HarvesterErrors.EmptyDirectory(path)); - } - } - } - catch (DirectoryNotFoundException) - { - throw new WixException(HarvesterErrors.DirectoryNotFound(path)); - } - } - - return harvestParent; - } - - /// - /// Harvest a directory. - /// - /// The path of the directory. - /// The relative path that will be used when harvesting. - /// The directory for this path. - /// - /// The number of files harvested. - private int HarvestDirectory(string path, string relativePath, Wix.IParentElement harvestParent, GenerateType generateType) - { - int fileCount = 0; - Wix.Directory directory = generateType != GenerateType.PayloadGroup ? (Wix.Directory)harvestParent : null; - - // harvest the child directories - foreach (string childDirectoryPath in Directory.GetDirectories(path)) - { - var childDirectoryName = Path.GetFileName(childDirectoryPath); - Wix.IParentElement newParent; - Wix.Directory childDirectory = null; - - if (generateType == GenerateType.PayloadGroup) - { - newParent = harvestParent; - } - else - { - childDirectory = new Wix.Directory(); - newParent = childDirectory; - - childDirectory.Name = childDirectoryName; - childDirectory.FileSource = childDirectoryPath; - - if (this.SetUniqueIdentifiers) - { - childDirectory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, directory.Id, childDirectory.Name); - } - } - - int childFileCount = this.HarvestDirectory(childDirectoryPath, String.Concat(relativePath, childDirectoryName, "\\"), newParent, generateType); - - if (generateType != GenerateType.PayloadGroup) - { - // keep the directory if it contained any files (or empty directories are being kept) - if (0 < childFileCount || this.KeepEmptyDirectories) - { - directory.AddChild(childDirectory); - } - } - - fileCount += childFileCount; - } - - // harvest the files - string[] files = Directory.GetFiles(path); - if (0 < files.Length) - { - foreach (string filePath in Directory.GetFiles(path)) - { - string fileName = Path.GetFileName(filePath); - string source = String.Concat(relativePath, fileName); - - Wix.ISchemaElement newChild; - if (generateType == GenerateType.PayloadGroup) - { - Wix.Payload payload = new Wix.Payload(); - newChild = payload; - - payload.SourceFile = source; - } - else - { - Wix.Component component = new Wix.Component(); - newChild = component; - - Wix.File file = this.fileHarvester.HarvestFile(filePath); - file.Source = source; - - if (this.SetUniqueIdentifiers) - { - file.Id = this.Core.GenerateIdentifier(FilePrefix, directory.Id, fileName); - component.Id = this.Core.GenerateIdentifier(ComponentPrefix, directory.Id, file.Id); - } - - component.AddChild(file); - } - - harvestParent.AddChild(newChild); - } - } - else if (generateType != GenerateType.PayloadGroup && 0 == fileCount && this.KeepEmptyDirectories) - { - Wix.Component component = new Wix.Component(); - component.KeyPath = Wix.YesNoType.yes; - - if (this.SetUniqueIdentifiers) - { - component.Id = this.Core.GenerateIdentifier(ComponentPrefix, directory.Id); - } - - Wix.CreateFolder createFolder = new Wix.CreateFolder(); - component.AddChild(createFolder); - - directory.AddChild(component); - } - - return fileCount + files.Length; - } - } -} diff --git a/src/wix/heat/DllHarvester.cs b/src/wix/heat/DllHarvester.cs deleted file mode 100644 index e8c5ae40..00000000 --- a/src/wix/heat/DllHarvester.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Reflection; - using System.Reflection.Emit; - using System.Runtime.InteropServices; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// Harvest WiX authoring from a native DLL file. - /// - public sealed class DllHarvester - { - /// - /// Harvest the registry values written by calling DllRegisterServer on the specified file. - /// - /// The file to harvest registry values from. - /// The harvested registry values. - public Wix.RegistryValue[] HarvestRegistryValues(string file) - { - // load the DLL - NativeMethods.LoadLibrary(file); - - using (RegistryHarvester registryHarvester = new RegistryHarvester(true)) - { - try - { - DynamicPInvoke(file, "DllRegisterServer", typeof(int), null, null); - - return registryHarvester.HarvestRegistry(); - } - catch (TargetInvocationException e) - { - e.Data["file"] = file; - throw; - } - } - } - - /// - /// Dynamically PInvokes into a DLL. - /// - /// Dynamic link library containing the entry point. - /// Entry point into dynamic link library. - /// Return type of entry point. - /// Type of parameters to entry point. - /// Value of parameters to entry point. - /// Value from invoked code. - private static object DynamicPInvoke(string dll, string entryPoint, Type returnType, Type[] parameterTypes, object[] parameterValues) - { -#if NETCOREAPP - throw new PlatformNotSupportedException(); -#else - AssemblyName assemblyName = new AssemblyName(); - assemblyName.Name = "wixTempAssembly"; - - AssemblyBuilder dynamicAssembly = AppDomain.CurrentDomain.DefineDynamicAssembly(assemblyName, AssemblyBuilderAccess.Run); - ModuleBuilder dynamicModule = dynamicAssembly.DefineDynamicModule("wixTempModule"); - - MethodBuilder dynamicMethod = dynamicModule.DefinePInvokeMethod(entryPoint, dll, MethodAttributes.Static | MethodAttributes.Public | MethodAttributes.PinvokeImpl, CallingConventions.Standard, returnType, parameterTypes, CallingConvention.Winapi, CharSet.Ansi); - dynamicModule.CreateGlobalFunctions(); - - MethodInfo methodInfo = dynamicModule.GetMethod(entryPoint); - return methodInfo.Invoke(null, parameterValues); -#endif - } - - /// - /// Native methods for loading libraries. - /// - private sealed class NativeMethods - { - private const UInt32 LOAD_WITH_ALTERED_SEARCH_PATH = 0x00000008; - - /// - /// Load a DLL library. - /// - /// The file name of the executable module. - /// If the function succeeds, the return value is a handle to the mapped executable module. - internal static IntPtr LoadLibrary(string file) - { - IntPtr dllHandle = LoadLibraryEx(file, IntPtr.Zero, NativeMethods.LOAD_WITH_ALTERED_SEARCH_PATH); - - if (IntPtr.Zero == dllHandle) - { - int lastError = Marshal.GetLastWin32Error(); - throw new Exception(String.Format("Unable to load file: {0}, error: {1}", file, lastError)); - } - - return dllHandle; - } - - /// - /// Maps the specified executable module into the address space of the calling process. - /// - /// The file name of the executable module. - /// This parameter is reserved for future use. It must be NULL. - /// Action to take when loading the module. - /// If the function succeeds, the return value is a handle to the mapped executable module. - [DllImport("kernel32.dll", CallingConvention = CallingConvention.Winapi, CharSet = CharSet.Unicode, SetLastError = true)] - private static extern IntPtr LoadLibraryEx(string file, IntPtr fileHandle, UInt32 flags); - } - } -} diff --git a/src/wix/heat/Extensibility/BaseHarvesterExtension.cs b/src/wix/heat/Extensibility/BaseHarvesterExtension.cs deleted file mode 100644 index 02696d5b..00000000 --- a/src/wix/heat/Extensibility/BaseHarvesterExtension.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Extensibility -{ - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// The base harvester extension. Any of these methods can be overridden to change - /// the behavior of the harvester. - /// - public abstract class BaseHarvesterExtension : IHarvesterExtension - { - /// - /// Gets or sets the harvester core for the extension. - /// - /// The harvester core for the extension. - public IHarvesterCore Core { get; set; } - - /// - /// Harvest a WiX document. - /// - /// The argument for harvesting. - /// The harvested Fragments. - public abstract Wix.Fragment[] Harvest(string argument); - } -} diff --git a/src/wix/heat/Extensibility/BaseHeatExtension.cs b/src/wix/heat/Extensibility/BaseHeatExtension.cs deleted file mode 100644 index b76aaf62..00000000 --- a/src/wix/heat/Extensibility/BaseHeatExtension.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Extensibility -{ - using System; - using WixToolset.Harvesters.Data; - - /// - /// An extension for the WiX Toolset Harvester application. - /// - public abstract class BaseHeatExtension : IHeatExtension - { - /// - /// Gets or sets the heat core for the extension. - /// - /// The heat core for the extension. - public IHeatCore Core { get; set; } - - /// - /// Gets the supported command line types for this extension. - /// - /// The supported command line types for this extension. - public virtual HeatCommandLineOption[] CommandLineTypes - { - get { return null; } - } - - /// - /// Parse the command line options for this extension. - /// - /// The active harvester type. - /// The option arguments. - public virtual void ParseOptions(string type, string[] args) - { - } - - /// - /// Determines if the index refers to an argument. - /// - /// - /// - /// - public static bool IsValidArg(string[] args, int index) - { - if (args.Length <= index || String.IsNullOrEmpty(args[index]) || '/' == args[index][0] || '-' == args[index][0]) - { - return false; - } - else - { - return true; - } - } - } -} diff --git a/src/wix/heat/Extensibility/BaseMutatorExtension.cs b/src/wix/heat/Extensibility/BaseMutatorExtension.cs deleted file mode 100644 index c36a8ed1..00000000 --- a/src/wix/heat/Extensibility/BaseMutatorExtension.cs +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Extensibility -{ - using System; - using System.Collections.Generic; - using System.Text; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// The base mutator extension. Any of these methods can be overridden to change - /// the behavior of the mutator. - /// - public abstract class BaseMutatorExtension : IMutatorExtension - { - /// - /// Gets or sets the mutator core for the extension. - /// - /// The mutator core for the extension. - public IHarvesterCore Core { get; set; } - - /// - /// Gets the sequence of the extension. - /// - /// The sequence of the extension. - public abstract int Sequence { get; } - - /// - /// Mutate a WiX document. - /// - /// The Wix document element. - public virtual void Mutate(Wix.Wix wix) - { - } - - /// - /// Mutate a WiX document as a string. - /// - /// The Wix document element as a string. - /// The mutated Wix document as a string. - public virtual string Mutate(string wixString) - { - return wixString; - } - - /// - /// Generate unique MSI identifiers. - /// - protected class IdentifierGenerator - { - /// - /// - /// - public const int MaxProductIdentifierLength = 72; - - /// - /// - /// - public const int MaxModuleIdentifierLength = 35; - - private string baseName; - private int maxLength; - private Dictionary existingIdentifiers; - private Dictionary possibleIdentifiers; - private IHarvesterCore harvesterCore; - - /// - /// Instantiate a new IdentifierGenerator. - /// - /// The base resource name to use if a resource name contains no usable characters. - /// - public IdentifierGenerator(string baseName, IHarvesterCore harvesterCore) - { - this.baseName = baseName; - this.maxLength = IdentifierGenerator.MaxProductIdentifierLength; - this.existingIdentifiers = new Dictionary(StringComparer.OrdinalIgnoreCase); - this.possibleIdentifiers = new Dictionary(StringComparer.OrdinalIgnoreCase); - this.harvesterCore = harvesterCore; - } - - /// - /// Gets or sets the maximum length for generated identifiers. - /// - /// Maximum length for generated identifiers. (Default is 72.) - public int MaxIdentifierLength - { - get { return this.maxLength; } - set { this.maxLength = value; } - } - - /// - /// Index an existing identifier for collision detection. - /// - /// The identifier. - public void IndexExistingIdentifier(string identifier) - { - if (null == identifier) - { - throw new ArgumentNullException("identifier"); - } - - this.existingIdentifiers[identifier] = null; - } - - /// - /// Index a resource name for collision detection. - /// - /// The resource name. - public void IndexName(string name) - { - if (null == name) - { - throw new ArgumentNullException("name"); - } - - string identifier = this.CreateIdentifier(name, 0); - - if (this.possibleIdentifiers.ContainsKey(identifier)) - { - this.possibleIdentifiers[identifier] = String.Empty; - } - else - { - this.possibleIdentifiers.Add(identifier, null); - } - } - - /// - /// Get the identifier for the given resource name. - /// - /// The resource name. - /// A legal MSI identifier. - public string GetIdentifier(string name) - { - if (null == name) - { - throw new ArgumentNullException("name"); - } - - for (int i = 0; i <= Int32.MaxValue; i++) - { - string identifier = this.CreateIdentifier(name, i); - - if (this.existingIdentifiers.ContainsKey(identifier) || // already used - (0 == i && 0 != this.possibleIdentifiers.Count && null != this.possibleIdentifiers[identifier]) || // needs an index because its duplicated - (0 != i && this.possibleIdentifiers.ContainsKey(identifier))) // collides with another possible identifier - { - continue; - } - else // use this identifier - { - this.existingIdentifiers.Add(identifier, null); - - return identifier; - } - } - - throw new InvalidOperationException("Could not find a unique identifier for the given resource name."); - } - - /// - /// Create a legal MSI identifier from a resource name and an index. - /// - /// The name of the resource for which an identifier should be created. - /// An index to append to the end of the identifier to make it unique. - /// A legal MSI identifier. - public string CreateIdentifier(string name, int index) - { - if (null == name) - { - throw new ArgumentNullException("name"); - } - - StringBuilder identifier = new StringBuilder(); - - // Convert the name to a standard MSI identifier - identifier.Append(this.harvesterCore.CreateIdentifierFromFilename(name)); - - // no legal identifier characters were found, use the base id instead - if (0 == identifier.Length) - { - identifier.Append(this.baseName); - } - - // truncate the identifier if it's too long (reserve 3 characters for up to 99 collisions) - int adjustedMaxLength = this.MaxIdentifierLength - (index != 0 ? 3 : 0); - if (adjustedMaxLength < identifier.Length) - { - identifier.Length = adjustedMaxLength; - } - - // if the index is not zero, then append it to the identifier name - if (0 != index) - { - identifier.AppendFormat("_{0}", index); - } - - return identifier.ToString(); - } - } - } -} diff --git a/src/wix/heat/Extensibility/IHarvester.cs b/src/wix/heat/Extensibility/IHarvester.cs deleted file mode 100644 index 6d363b50..00000000 --- a/src/wix/heat/Extensibility/IHarvester.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Extensibility -{ - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// Interface for the harvester. - /// - public interface IHarvester - { - /// - /// Gets or sets the harvester core for the extension. - /// - /// The harvester core for the extension. - IHarvesterCore Core { get; } - - /// - /// Gets or sets the extension. - /// - /// The extension. - IHarvesterExtension Extension { get; set; } - - /// - /// Harvest wix authoring. - /// - /// The argument for harvesting. - /// The harvested wix authoring. - Wix.Wix Harvest(string argument); - } -} diff --git a/src/wix/heat/Extensibility/IHarvesterCore.cs b/src/wix/heat/Extensibility/IHarvesterCore.cs deleted file mode 100644 index 3c34b8a1..00000000 --- a/src/wix/heat/Extensibility/IHarvesterCore.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Extensibility -{ - using WixToolset.Extensibility.Services; - - /// - /// The WiX Toolset harvester core. - /// - public interface IHarvesterCore - { - /// - /// - /// - IMessaging Messaging { get; set; } - - /// - /// Gets or sets the value of the extension argument passed to heat. - /// - /// The extension argument. - string ExtensionArgument { get; set; } - - /// - /// Gets or sets the value of the root directory that is being harvested. - /// - /// The root directory being harvested. - string RootDirectory { get; set; } - - /// - /// Create an identifier based on passed file name - /// - /// File name to generate identifer from - /// - string CreateIdentifierFromFilename(string filename); - - /// - /// Generate an identifier by hashing data from the row. - /// - /// Three letter or less prefix for generated row identifier. - /// Information to hash. - /// The generated identifier. - string GenerateIdentifier(string prefix, params string[] args); - - /// - /// Resolves a file's path if the Wix.File.Source value starts with "SourceDir\". - /// - /// The Wix.File.Source value with "SourceDir\". - /// The full path of the file. - string ResolveFilePath(string fileSource); - } -} diff --git a/src/wix/heat/Extensibility/IHarvesterExtension.cs b/src/wix/heat/Extensibility/IHarvesterExtension.cs deleted file mode 100644 index 5125ea32..00000000 --- a/src/wix/heat/Extensibility/IHarvesterExtension.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Extensibility -{ - using Wix = WixToolset.Harvesters.Serialize; - -#pragma warning disable 1591 // TODO: add documentation - public interface IHarvesterExtension - { - IHarvesterCore Core { get; set; } - - Wix.Fragment[] Harvest(string argument); - } -} diff --git a/src/wix/heat/Extensibility/IHeatCore.cs b/src/wix/heat/Extensibility/IHeatCore.cs deleted file mode 100644 index 0aa01b62..00000000 --- a/src/wix/heat/Extensibility/IHeatCore.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Extensibility -{ - using WixToolset.Extensibility.Services; - - /// - /// The WiX Toolset Harvester application core. - /// - public interface IHeatCore - { - /// - /// Gets the harvester. - /// - /// The harvester. - IHarvester Harvester { get; } - - /// - /// - /// - IMessaging Messaging { get; } - - /// - /// Gets the mutator. - /// - /// The mutator. - IMutator Mutator { get; } - } -} diff --git a/src/wix/heat/Extensibility/IHeatExtension.cs b/src/wix/heat/Extensibility/IHeatExtension.cs deleted file mode 100644 index 8a00da37..00000000 --- a/src/wix/heat/Extensibility/IHeatExtension.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Extensibility -{ - using WixToolset.Harvesters.Data; - -#pragma warning disable 1591 // TODO: add documentation - public interface IHeatExtension - { - IHeatCore Core { get; set; } - - HeatCommandLineOption[] CommandLineTypes { get; } - - void ParseOptions(string type, string[] args); - } -} diff --git a/src/wix/heat/Extensibility/IMutator.cs b/src/wix/heat/Extensibility/IMutator.cs deleted file mode 100644 index c936339e..00000000 --- a/src/wix/heat/Extensibility/IMutator.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Extensibility -{ - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// Interface for a mutator. - /// - public interface IMutator - { - /// - /// Gets or sets the harvester core for the extension. - /// - /// The harvester core for the extension. - IHarvesterCore Core { get; } - - /// - /// Gets or sets the value of the extension argument passed to heat. - /// - /// The extension argument. - string ExtensionArgument { get; } - - /// - /// Adds a mutator extension. - /// - /// The mutator extension to add. - void AddExtension(IMutatorExtension mutatorExtension); - - /// - /// Mutate a WiX document. - /// - /// The Wix document element. - /// true if mutation was successful - bool Mutate(Wix.Wix wix); - - /// - /// Mutate a WiX document. - /// - /// The Wix document as a string. - /// The mutated Wix document as a string if mutation was successful, else null. - string Mutate(string wixString); - } -} diff --git a/src/wix/heat/Extensibility/IMutatorExtension.cs b/src/wix/heat/Extensibility/IMutatorExtension.cs deleted file mode 100644 index b81f586e..00000000 --- a/src/wix/heat/Extensibility/IMutatorExtension.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Extensibility -{ - using Wix = WixToolset.Harvesters.Serialize; - -#pragma warning disable 1591 // TODO: add documentation - public interface IMutatorExtension - { - IHarvesterCore Core { get; set; } - - int Sequence { get; } - - void Mutate(Wix.Wix wix); - - string Mutate(string wixString); - } -} diff --git a/src/wix/heat/FileHarvester.cs b/src/wix/heat/FileHarvester.cs deleted file mode 100644 index 886b942a..00000000 --- a/src/wix/heat/FileHarvester.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.IO; - using WixToolset.Data; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// Harvest WiX authoring for a file from the file system. - /// - public sealed class FileHarvester : BaseHarvesterExtension - { - private string rootedDirectoryRef; - private bool setUniqueIdentifiers; - private bool suppressRootDirectory; - - private static readonly string ComponentPrefix = "cmp"; - private static readonly string DirectoryPrefix = "dir"; - private static readonly string FilePrefix = "fil"; - - /// - /// Instantiate a new FileHarvester. - /// - public FileHarvester() - { - this.setUniqueIdentifiers = true; - this.suppressRootDirectory = false; - } - - /// - /// Gets or sets the rooted DirectoryRef Id if the user has supplied it. - /// - /// The DirectoryRef Id to use as the root. - public string RootedDirectoryRef - { - get { return this.rootedDirectoryRef; } - set { this.rootedDirectoryRef = value; } - } - - /// - /// Gets of sets the option to set unique identifiers. - /// - /// The option to set unique identifiers. - public bool SetUniqueIdentifiers - { - get { return this.setUniqueIdentifiers; } - set { this.setUniqueIdentifiers = value; } - } - - /// - /// Gets or sets the option to suppress including the root directory as an element. - /// - /// The option to suppress including the root directory as an element. - public bool SuppressRootDirectory - { - get { return this.suppressRootDirectory; } - set { this.suppressRootDirectory = value; } - } - - /// - /// Harvest a file. - /// - /// The path of the file. - /// A harvested file. - public override Wix.Fragment[] Harvest(string argument) - { - if (null == argument) - { - throw new ArgumentNullException("argument"); - } - - if (null == this.rootedDirectoryRef) - { - this.rootedDirectoryRef = "TARGETDIR"; - } - - string fullPath = Path.GetFullPath(argument); - - Wix.DirectoryRef directoryRef = new Wix.DirectoryRef(); - directoryRef.Id = this.rootedDirectoryRef; - - Wix.File file = this.HarvestFile(fullPath); - - if (!this.suppressRootDirectory) - { - file.Source = String.Concat("SourceDir\\", Path.GetFileName(Path.GetDirectoryName(fullPath)), "\\", Path.GetFileName(fullPath)); - } - - Wix.Component component = new Wix.Component(); - component.AddChild(file); - - Wix.Directory directory = new Wix.Directory(); - - if (this.suppressRootDirectory) - { - directoryRef.AddChild(component); - } - else - { - string directoryPath = Path.GetDirectoryName(Path.GetFullPath(argument)); - directory.Name = Path.GetFileName(directoryPath); - - if (this.setUniqueIdentifiers) - { - directory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, directoryRef.Id, directory.Name); - } - directory.AddChild(component); - directoryRef.AddChild(directory); - } - - if (this.setUniqueIdentifiers) - { - file.Id = this.Core.GenerateIdentifier(FilePrefix, (this.suppressRootDirectory) ? directoryRef.Id : directory.Id, Path.GetFileName(file.Source)); - component.Id = this.Core.GenerateIdentifier(ComponentPrefix, (this.suppressRootDirectory) ? directoryRef.Id : directory.Id, file.Id); - } - - Wix.Fragment fragment = new Wix.Fragment(); - fragment.AddChild(directoryRef); - - return new Wix.Fragment[] { fragment }; - } - - /// - /// Harvest a file. - /// - /// The path of the file. - /// A harvested file. - public Wix.File HarvestFile(string path) - { - if (null == path) - { - throw new ArgumentNullException("path"); - } - - if (!File.Exists(path)) - { - throw new WixException(HarvesterErrors.FileNotFound(path)); - } - - Wix.File file = new Wix.File(); - - // use absolute paths - path = Path.GetFullPath(path); - - file.KeyPath = Wix.YesNoType.yes; - - file.Source = String.Concat("SourceDir\\", Path.GetFileName(path)); - - return file; - } - } -} diff --git a/src/wix/heat/Harvester.cs b/src/wix/heat/Harvester.cs deleted file mode 100644 index 791c1cb2..00000000 --- a/src/wix/heat/Harvester.cs +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using WixToolset.Data; - using WixToolset.Harvesters.Extensibility; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// The WiX Toolset harvester. - /// - internal class Harvester : IHarvester - { - private IHarvesterExtension harvesterExtension; - - public IHarvesterCore Core { get; set; } - - public IHarvesterExtension Extension - { - get - { - return this.harvesterExtension; - } - set - { - if (null != this.harvesterExtension) - { - throw new InvalidOperationException("Multiple harvester extensions specified."); - } - - this.harvesterExtension = value; - } - } - - public Wix.Wix Harvest(string argument) - { - if (null == argument) - { - throw new ArgumentNullException("argument"); - } - - if (null == this.harvesterExtension) - { - throw new WixException(ErrorMessages.HarvestTypeNotFound()); - } - - this.harvesterExtension.Core = this.Core; - - Wix.Fragment[] fragments = this.harvesterExtension.Harvest(argument); - if (null == fragments || 0 == fragments.Length) - { - return null; - } - - Wix.Wix wix = new Wix.Wix(); - foreach (Wix.Fragment fragment in fragments) - { - wix.AddChild(fragment); - } - - return wix; - } - } -} diff --git a/src/wix/heat/HarvesterCore.cs b/src/wix/heat/HarvesterCore.cs deleted file mode 100644 index 92b34ab0..00000000 --- a/src/wix/heat/HarvesterCore.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.IO; - using WixToolset.Extensibility.Services; - using WixToolset.Harvesters.Extensibility; - - /// - /// The WiX Toolset harvester core. - /// - internal class HarvesterCore : IHarvesterCore - { - public IMessaging Messaging { get; set; } - - public IParseHelper ParseHelper { get; set; } - - /// - /// Gets or sets the value of the extension argument passed to heat. - /// - /// The extension argument. - public string ExtensionArgument { get; set; } - - /// - /// Gets or sets the value of the root directory that is being harvested. - /// - /// The root directory being harvested. - public string RootDirectory { get; set; } - - /// - /// Create an identifier based on passed file name - /// - /// File name to generate identifer from - /// - public string CreateIdentifierFromFilename(string filename) - { - return this.ParseHelper.CreateIdentifierFromFilename(filename).Id; - } - - /// - /// Generate an identifier by hashing data from the row. - /// - /// Three letter or less prefix for generated row identifier. - /// Information to hash. - /// The generated identifier. - public string GenerateIdentifier(string prefix, params string[] args) - { - return this.ParseHelper.CreateIdentifier(prefix, args).Id; - } - - /// - /// Resolves a file's path if the Wix.File.Source value starts with "SourceDir\". - /// - /// The Wix.File.Source value with "SourceDir\". - /// The full path of the file. - public string ResolveFilePath(string fileSource) - { - if (fileSource.StartsWith("SourceDir\\", StringComparison.Ordinal)) - { - string file = Path.GetFullPath(this.RootDirectory); - if (File.Exists(file)) - { - return file; - } - else - { - fileSource = fileSource.Substring(10); - fileSource = Path.Combine(Path.GetFullPath(this.RootDirectory), fileSource); - } - } - - return fileSource; - } - } -} diff --git a/src/wix/heat/HeatCommand.cs b/src/wix/heat/HeatCommand.cs deleted file mode 100644 index 56277004..00000000 --- a/src/wix/heat/HeatCommand.cs +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections.Generic; - using System.Globalization; - using System.IO; - using System.Runtime.InteropServices; - using System.Threading; - using System.Threading.Tasks; - using System.Xml; - using WixToolset.Data; - using WixToolset.Extensibility.Data; - using WixToolset.Extensibility.Services; - using WixToolset.Harvesters.Extensibility; - using Wix = WixToolset.Harvesters.Serialize; - - internal class HeatCommand : ICommandLineCommand - { - public HeatCommand(string harvestType, IList extensions, IServiceProvider serviceProvider) - { - this.Extensions = extensions; - this.Messaging = serviceProvider.GetService(); - this.ServiceProvider = serviceProvider; - - this.ExtensionType = harvestType; - this.ExtensionOptions.Add(harvestType); - } - - public bool ShowHelp { get; set; } - - public bool ShowLogo { get; set; } - - public bool StopParsing { get; private set; } - - private string ExtensionArgument { get; set; } - - private List ExtensionOptions { get; } = new List(); - - private string ExtensionType { get; } - - private IList Extensions { get; } - - private int Indent { get; set; } = 4; - - private IMessaging Messaging { get; } - - private string OutputFile { get; set; } - - private IServiceProvider ServiceProvider { get; } - - public Task ExecuteAsync(CancellationToken cancellationToken) - { - var exitCode = this.Harvest(); - return Task.FromResult(exitCode); - } - - public bool TryParseArgument(ICommandLineParser parser, string arg) - { - if (this.ExtensionArgument == null) - { - this.ExtensionArgument = arg; - } - else if ('-' == arg[0] || '/' == arg[0]) - { - string parameter = arg.Substring(1); - if ("nologo" == parameter) - { - this.ShowLogo = false; - } - else if ("o" == parameter || "out" == parameter) - { - this.OutputFile = parser.GetNextArgumentAsFilePathOrError(arg); - - if (String.IsNullOrEmpty(this.OutputFile)) - { - return false; - } - } - else if ("swall" == parameter) - { - this.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("swall", "sw")); - this.Messaging.SuppressAllWarnings = true; - } - else if (parameter.StartsWith("sw")) - { - string paramArg = parameter.Substring(2); - try - { - if (0 == paramArg.Length) - { - this.Messaging.SuppressAllWarnings = true; - } - else - { - int suppressWarning = Convert.ToInt32(paramArg, CultureInfo.InvariantCulture.NumberFormat); - if (0 >= suppressWarning) - { - this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg)); - } - - this.Messaging.SuppressWarningMessage(suppressWarning); - } - } - catch (FormatException) - { - this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg)); - } - catch (OverflowException) - { - this.Messaging.Write(ErrorMessages.IllegalSuppressWarningId(paramArg)); - } - } - else if ("wxall" == parameter) - { - this.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("wxall", "wx")); - this.Messaging.WarningsAsError = true; - } - else if (parameter.StartsWith("wx")) - { - string paramArg = parameter.Substring(2); - try - { - if (0 == paramArg.Length) - { - this.Messaging.WarningsAsError = true; - } - else - { - int elevateWarning = Convert.ToInt32(paramArg, CultureInfo.InvariantCulture.NumberFormat); - if (0 >= elevateWarning) - { - this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg)); - } - - this.Messaging.ElevateWarningMessage(elevateWarning); - } - } - catch (FormatException) - { - this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg)); - } - catch (OverflowException) - { - this.Messaging.Write(ErrorMessages.IllegalWarningIdAsError(paramArg)); - } - } - else if ("v" == parameter) - { - this.Messaging.ShowVerboseMessages = true; - } - else if ("indent" == parameter) - { - try - { - this.Indent = Int32.Parse(parser.GetNextArgumentOrError(arg), CultureInfo.InvariantCulture); - } - catch - { - throw new ArgumentException("Invalid numeric argument.", parameter); - } - } - } - - this.ExtensionOptions.Add(arg); - return true; - } - - private int Harvest() - { - try - { - if (String.IsNullOrEmpty(this.ExtensionArgument)) - { - this.Messaging.Write(ErrorMessages.HarvestSourceNotSpecified()); - } - else if (String.IsNullOrEmpty(this.OutputFile)) - { - this.Messaging.Write(ErrorMessages.OutputTargetNotSpecified()); - } - - // exit if there was an error parsing the core command line - if (this.Messaging.EncounteredError) - { - return this.Messaging.LastErrorNumber; - } - - if (this.ShowLogo) - { - HelpCommand.DisplayToolHeader(); - } - - var heatCore = new HeatCore(this.ServiceProvider, this.ExtensionArgument); - - // parse the extension's command line arguments - var extensionOptionsArray = this.ExtensionOptions.ToArray(); - foreach (var heatExtension in this.Extensions) - { - heatExtension.Core = heatCore; - heatExtension.ParseOptions(this.ExtensionType, extensionOptionsArray); - } - - // exit if there was an error parsing the command line (otherwise the logo appears after error messages) - if (this.Messaging.EncounteredError) - { - return this.Messaging.LastErrorNumber; - } - - // harvest the output - Wix.Wix wix = heatCore.Harvester.Harvest(this.ExtensionArgument); - if (null == wix) - { - return this.Messaging.LastErrorNumber; - } - - // mutate the output - if (!heatCore.Mutator.Mutate(wix)) - { - return this.Messaging.LastErrorNumber; - } - - XmlWriterSettings xmlSettings = new XmlWriterSettings(); - xmlSettings.Indent = true; - xmlSettings.IndentChars = new string(' ', this.Indent); - xmlSettings.OmitXmlDeclaration = true; - - string wixString; - using (StringWriter stringWriter = new StringWriter()) - { - using (XmlWriter xmlWriter = XmlWriter.Create(stringWriter, xmlSettings)) - { - wix.OutputXml(xmlWriter); - } - - wixString = stringWriter.ToString(); - } - - string mutatedWixString = heatCore.Mutator.Mutate(wixString); - if (String.IsNullOrEmpty(mutatedWixString)) - { - return this.Messaging.LastErrorNumber; - } - - Directory.CreateDirectory(Path.GetDirectoryName(this.OutputFile)); - - using (StreamWriter streamWriter = new StreamWriter(this.OutputFile, false, System.Text.Encoding.UTF8)) - { - xmlSettings.OmitXmlDeclaration = false; - xmlSettings.Encoding = System.Text.Encoding.UTF8; - using (XmlWriter xmlWriter = XmlWriter.Create(streamWriter, xmlSettings)) - { - xmlWriter.WriteStartDocument(); - xmlWriter.Flush(); - } - - streamWriter.WriteLine(); - streamWriter.Write(mutatedWixString); - } - } - catch (WixException we) - { - this.Messaging.Write(we.Error); - } - catch (Exception e) - { - this.Messaging.Write(ErrorMessages.UnexpectedException(e)); - if (e is NullReferenceException || e is SEHException) - { - throw; - } - } - - return this.Messaging.LastErrorNumber; - } - } -} diff --git a/src/wix/heat/HeatCommandLine.cs b/src/wix/heat/HeatCommandLine.cs deleted file mode 100644 index b11dda4e..00000000 --- a/src/wix/heat/HeatCommandLine.cs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections.Generic; - using System.Linq; - using WixToolset.Data; - using WixToolset.Extensibility.Data; - using WixToolset.Extensibility.Services; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - - internal class HeatCommandLine : IHeatCommandLine - { - private readonly List extensions; - private readonly IMessaging messaging; - private readonly IServiceProvider serviceProvider; - - public HeatCommandLine(IServiceProvider serviceProvider, IEnumerable heatExtensions) - { - this.extensions = new List { new IIsHeatExtension(), new UtilHeatExtension(serviceProvider), new VSHeatExtension() }; - if (heatExtensions != null) - { - this.extensions.AddRange(heatExtensions); - } - this.messaging = serviceProvider.GetService(); - this.serviceProvider = serviceProvider; - } - - public ICommandLineCommand ParseStandardCommandLine(ICommandLineArguments arguments) - { - ICommandLineCommand command = null; - var parser = arguments.Parse(); - - while (command?.StopParsing != true && - String.IsNullOrEmpty(parser.ErrorArgument) && - parser.TryGetNextSwitchOrArgument(out var arg)) - { - if (String.IsNullOrWhiteSpace(arg)) // skip blank arguments. - { - continue; - } - - // First argument must be the command or global switch (that creates a command). - if (command == null) - { - if (!this.TryParseUnknownCommandArg(arg, parser, out command)) - { - parser.ReportErrorArgument(arg, ErrorMessages.HarvestTypeNotFound(arg)); - } - } - else if (!command.TryParseArgument(parser, arg)) - { - parser.ReportErrorArgument(arg); - } - } - - return command ?? new HelpCommand(this.extensions); - } - - public bool TryParseUnknownCommandArg(string arg, ICommandLineParser parser, out ICommandLineCommand command) - { - command = null; - - if (parser.IsSwitch(arg)) - { - var parameter = arg.Substring(1); - switch (parameter.ToLowerInvariant()) - { - case "?": - case "h": - case "help": - command = new HelpCommand(this.extensions); - return true; - } - } - - foreach (var heatExtension in this.extensions) - { - if (heatExtension.CommandLineTypes.Any(o => o.Option == arg)) - { - command = new HeatCommand(arg, this.extensions, this.serviceProvider); - return true; - } - } - - return false; - } - } -} diff --git a/src/wix/heat/HeatCommandLineFactory.cs b/src/wix/heat/HeatCommandLineFactory.cs deleted file mode 100644 index 44291e48..00000000 --- a/src/wix/heat/HeatCommandLineFactory.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections.Generic; - using WixToolset.Extensibility.Services; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - - /// - /// Extension methods to use Harvesters services. - /// - public class HeatCommandLineFactory - { - /// - /// Creates service. - /// - /// - /// - /// - public static IHeatCommandLine CreateCommandLine(IServiceProvider serviceProvider, IEnumerable heatExtensions = null) - { - return new HeatCommandLine(serviceProvider, heatExtensions); - } - } -} diff --git a/src/wix/heat/HeatCore.cs b/src/wix/heat/HeatCore.cs deleted file mode 100644 index 578c4aab..00000000 --- a/src/wix/heat/HeatCore.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using WixToolset.Extensibility.Services; - using WixToolset.Harvesters.Extensibility; - - /// - /// The WiX Toolset Harvester application core. - /// - internal class HeatCore : IHeatCore - { - /// - /// Instantiates a new HeatCore. - /// - /// The service provider. - /// The extension argument. - public HeatCore(IServiceProvider serviceProvider, string extensionArgument) - { - this.Messaging = serviceProvider.GetService(); - var harvesterCore = new HarvesterCore - { - ExtensionArgument = extensionArgument, - Messaging = this.Messaging, - ParseHelper = serviceProvider.GetService(), - }; - - this.Harvester = new Harvester - { - Core = harvesterCore, - }; - this.Mutator = new Mutator - { - Core = harvesterCore, - }; - } - - public IHarvester Harvester { get; } - - public IMessaging Messaging { get; } - - public IMutator Mutator { get; } - } -} diff --git a/src/wix/heat/HelpCommand.cs b/src/wix/heat/HelpCommand.cs deleted file mode 100644 index d991b4fa..00000000 --- a/src/wix/heat/HelpCommand.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Diagnostics; - using System.Threading; - using System.Threading.Tasks; - using WixToolset.Extensibility.Data; - using WixToolset.Extensibility.Services; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - - internal class HelpCommand : ICommandLineCommand - { - const string HelpMessageOptionFormat = " {0,-7} {1}"; - - public HelpCommand(IList extensions) - { - this.Extensions = extensions; - } - - private IList Extensions { get; } - - public bool ShowHelp { get; set; } - - public bool ShowLogo - { - get => false; - set { } - } - - public bool StopParsing => true; - - public Task ExecuteAsync(CancellationToken cancellationToken) - { - var exitCode = this.DisplayHelp(); - return Task.FromResult(exitCode); - } - - public static void DisplayToolHeader() - { - var wixcopAssembly = typeof(HelpCommand).Assembly; - var fv = FileVersionInfo.GetVersionInfo(wixcopAssembly.Location); - - Console.WriteLine("WiX Toolset Harvester version {0}", fv.ProductVersion); - Console.WriteLine("Copyright (C) .NET Foundation and contributors. All rights reserved."); - Console.WriteLine(); - } - - public bool TryParseArgument(ICommandLineParser parser, string argument) - { - return true; - } - - private int DisplayHelp() - { - DisplayToolHeader(); - - // output the harvest types alphabetically - SortedList harvestOptions = new SortedList(); - foreach (var heatExtension in this.Extensions) - { - foreach (HeatCommandLineOption commandLineOption in heatExtension.CommandLineTypes) - { - harvestOptions.Add(commandLineOption.Option, commandLineOption); - } - } - - harvestOptions.Add("-nologo", new HeatCommandLineOption("-nologo", "skip printing heat logo information")); - harvestOptions.Add("-indent ", new HeatCommandLineOption("-indent ", "indentation multiple (overrides default of 4)")); - harvestOptions.Add("-o[ut]", new HeatCommandLineOption("-out", "specify output file (default: write to current directory)")); - harvestOptions.Add("-sw", new HeatCommandLineOption("-sw", "suppress all warnings or a specific message ID\r\n (example: -sw1011 -sw1012)")); - harvestOptions.Add("-swall", new HeatCommandLineOption("-swall", "suppress all warnings (deprecated)")); - harvestOptions.Add("-v", new HeatCommandLineOption("-v", "verbose output")); - harvestOptions.Add("-wx[N]", new HeatCommandLineOption("-wx[N]", "treat all warnings or a specific message ID as an error\r\n (example: -wx1011 -wx1012)")); - harvestOptions.Add("-wxall", new HeatCommandLineOption("-wxall", "treat all warnings as errors (deprecated)")); - - foreach (HeatCommandLineOption commandLineOption in harvestOptions.Values) - { - if (!commandLineOption.Option.StartsWith("-")) - { - Console.WriteLine(HelpMessageOptionFormat, commandLineOption.Option, commandLineOption.Description); - } - } - - Console.WriteLine(); - Console.WriteLine("Options:"); - - foreach (HeatCommandLineOption commandLineOption in harvestOptions.Values) - { - if (commandLineOption.Option.StartsWith("-")) - { - Console.WriteLine(HelpMessageOptionFormat, commandLineOption.Option, commandLineOption.Description); - } - } - - Console.WriteLine(HelpMessageOptionFormat, "-? | -help", "this help information"); - Console.WriteLine("For more information see: https://wixtoolset.org/"); - - return 0; - } - } -} diff --git a/src/wix/heat/IIsFinalizeHarvesterMutator.cs b/src/wix/heat/IIsFinalizeHarvesterMutator.cs deleted file mode 100644 index cfe90272..00000000 --- a/src/wix/heat/IIsFinalizeHarvesterMutator.cs +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections; - using System.Collections.Specialized; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - using Wix = WixToolset.Harvesters.Serialize; - using IIs = Serialize.IIs; - - /// - /// The finalize harvester mutator for the WiX Toolset Internet Information Services Extension. - /// - public sealed class IIsFinalizeHarvesterMutator : BaseMutatorExtension - { - private Hashtable directoryPaths; - private Hashtable filePaths; - private ArrayList webFilters; - private ArrayList webSites; - private ArrayList webVirtualDirs; - - /// - /// Instantiate a new IIsFinalizeHarvesterMutator. - /// - public IIsFinalizeHarvesterMutator() - { - this.directoryPaths = CollectionsUtil.CreateCaseInsensitiveHashtable(); - this.filePaths = CollectionsUtil.CreateCaseInsensitiveHashtable(); - this.webFilters = new ArrayList(); - this.webSites = new ArrayList(); - this.webVirtualDirs = new ArrayList(); - } - - /// - /// Gets the sequence of this mutator extension. - /// - /// The sequence of this mutator extension. - public override int Sequence - { - get { return 1900; } - } - - /// - /// Mutate a WiX document. - /// - /// The Wix document element. - public override void Mutate(Wix.Wix wix) - { - this.directoryPaths.Clear(); - this.filePaths.Clear(); - this.webFilters.Clear(); - this.webSites.Clear(); - this.webVirtualDirs.Clear(); - - this.IndexElement(wix); - - this.MutateWebFilters(); - this.MutateWebSites(); - this.MutateWebVirtualDirs(); - } - - /// - /// Index an element. - /// - /// The element to index. - private void IndexElement(Wix.ISchemaElement element) - { - if (element is IIs.WebFilter) - { - this.webFilters.Add(element); - } - else if (element is IIs.WebSite) - { - this.webSites.Add(element); - } - else if (element is IIs.WebVirtualDir) - { - this.webVirtualDirs.Add(element); - } - else if (element is Wix.Directory) - { - Wix.Directory directory = (Wix.Directory)element; - - if (null != directory.Id && null != directory.FileSource) - { - this.directoryPaths.Add(directory.FileSource, directory.Id); - } - } - else if (element is Wix.File) - { - Wix.File file = (Wix.File)element; - - if (null != file.Id && null != file.Source) - { - this.filePaths[file.Source] = String.Concat("[#", file.Id, "]"); - } - } - - // index the child elements - if (element is Wix.IParentElement) - { - foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children) - { - this.IndexElement(childElement); - } - } - } - - /// - /// Mutate the WebFilters. - /// - private void MutateWebFilters() - { - foreach (IIs.WebFilter webFilter in this.webFilters) - { - webFilter.Path = (string)this.filePaths[webFilter.Path]; - } - } - - /// - /// Mutate the WebSites. - /// - private void MutateWebSites() - { - foreach (IIs.WebSite webSite in this.webSites) - { - string path = (string)this.directoryPaths[webSite.Directory]; - if (null == path) - { - this.Core.Messaging.Write(HarvesterWarnings.EncounteredNullDirectoryForWebSite(path)); - } - else - { - webSite.Directory = path; - } - } - } - - /// - /// Mutate the WebVirtualDirs. - /// - private void MutateWebVirtualDirs() - { - foreach (IIs.WebVirtualDir webVirtualDir in this.webVirtualDirs) - { - string path = (string)this.directoryPaths[webVirtualDir.Directory]; - if (null == path) - { - this.Core.Messaging.Write(HarvesterWarnings.EncounteredNullDirectoryForWebSite(path)); - } - else - { - webVirtualDir.Directory = path; - } - } - } - } -} diff --git a/src/wix/heat/IIsHarvesterMutator.cs b/src/wix/heat/IIsHarvesterMutator.cs deleted file mode 100644 index a0147d0f..00000000 --- a/src/wix/heat/IIsHarvesterMutator.cs +++ /dev/null @@ -1,429 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections; - using System.Collections.Specialized; - using System.IO; - using WixToolset.Harvesters.Extensibility; - using IIs = Serialize.IIs; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// The harvester mutator for the WiX Toolset Internet Information Services Extension. - /// - public sealed class IIsHarvesterMutator : BaseMutatorExtension - { - private ArrayList components; - private DirectoryHarvester directoryHarvester; - private Hashtable directoryPaths; - private FileHarvester fileHarvester; - private Wix.IParentElement rootElement; - private bool setUniqueIdentifiers; - private ArrayList webAddresses; - private ArrayList webDirs; - private ArrayList webDirProperties; - private ArrayList webFilters; - private ArrayList webSites; - private ArrayList webVirtualDirs; - - /// - /// Instantiate a new IIsHarvesterMutator. - /// - public IIsHarvesterMutator() - { - this.components = new ArrayList(); - this.directoryHarvester = new DirectoryHarvester(); - this.directoryPaths = CollectionsUtil.CreateCaseInsensitiveHashtable(); - this.fileHarvester = new FileHarvester(); - this.webAddresses = new ArrayList(); - this.webDirs = new ArrayList(); - this.webDirProperties = new ArrayList(); - this.webFilters = new ArrayList(); - this.webSites = new ArrayList(); - this.webVirtualDirs = new ArrayList(); - } - - /// - /// Gets the sequence of this mutator extension. - /// - /// The sequence of this mutator extension. - public override int Sequence - { - get { return 100; } - } - - /// - /// Gets of sets the option to set unique identifiers. - /// - /// The option to set unique identifiers. - public bool SetUniqueIdentifiers - { - get { return this.setUniqueIdentifiers; } - set { this.setUniqueIdentifiers = value; } - } - - /// - /// Mutate a WiX document. - /// - /// The Wix document element. - public override void Mutate(Wix.Wix wix) - { - this.components.Clear(); - this.directoryPaths.Clear(); - this.webAddresses.Clear(); - this.webDirs.Clear(); - this.webDirProperties.Clear(); - this.webFilters.Clear(); - this.webSites.Clear(); - this.webVirtualDirs.Clear(); - this.rootElement = null; - - this.IndexElement(wix); - - this.MutateWebAddresses(); - - this.MutateWebDirs(); - - this.MutateWebDirProperties(); - - this.MutateWebSites(); - - this.MutateWebVirtualDirs(); - - // this must come after the web virtual dirs in case they harvest a directory containing a web filter file - this.MutateWebFilters(); - - // this must come after the web site identifiers are created - this.MutateComponents(); - } - - /// - /// Harvest a new directory or return one that was previously harvested. - /// - /// The path of the directory. - /// The option to harvest the children of the directory. - /// The harvested directory. - private Wix.Directory HarvestUniqueDirectory(string path, bool harvestChildren) - { - if (this.directoryPaths.Contains(path)) - { - return (Wix.Directory)this.directoryPaths[path]; - } - else - { - Wix.Directory directory = this.directoryHarvester.HarvestDirectory(path, harvestChildren); - - this.rootElement.AddChild(directory); - - // index this new directory and all of its children - this.IndexElement(directory); - - return directory; - } - } - - /// - /// Index an element. - /// - /// The element to index. - private void IndexElement(Wix.ISchemaElement element) - { - if (element is IIs.WebAddress) - { - this.webAddresses.Add(element); - } - else if (element is IIs.WebDir) - { - this.webDirs.Add(element); - } - else if (element is IIs.WebDirProperties) - { - this.webDirProperties.Add(element); - } - else if (element is IIs.WebFilter) - { - this.webFilters.Add(element); - } - else if (element is IIs.WebSite) - { - this.webSites.Add(element); - } - else if (element is IIs.WebVirtualDir) - { - this.webVirtualDirs.Add(element); - } - else if (element is Wix.Component) - { - this.components.Add(element); - } - else if (element is Wix.Directory) - { - Wix.Directory directory = (Wix.Directory)element; - - if (null != directory.FileSource) - { - this.directoryPaths.Add(directory.FileSource, directory); - } - } - else if (element is Wix.Fragment || element is Wix.Module || element is Wix.PatchCreation || element is Wix.Package) - { - this.rootElement = (Wix.IParentElement)element; - } - - // index the child elements - if (element is Wix.IParentElement) - { - foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children) - { - this.IndexElement(childElement); - } - } - } - - /// - /// Mutate the Component elements. - /// - private void MutateComponents() - { - if (this.setUniqueIdentifiers) - { - IdentifierGenerator identifierGenerator = new IdentifierGenerator("Component", this.Core); - - // index all the existing identifiers - foreach (Wix.Component component in this.components) - { - if (null != component.Id) - { - identifierGenerator.IndexExistingIdentifier(component.Id); - } - } - - // index all the web site identifiers - foreach (IIs.WebSite webSite in this.webSites) - { - if (webSite.ParentElement is Wix.Component) - { - identifierGenerator.IndexName(webSite.Id); - } - } - - // create an identifier for each component based on its child web site identifier - foreach (IIs.WebSite webSite in this.webSites) - { - Wix.Component component = webSite.ParentElement as Wix.Component; - - if (null != component) - { - component.Id = identifierGenerator.GetIdentifier(webSite.Id); - } - } - } - } - - /// - /// Mutate the WebAddress elements. - /// - private void MutateWebAddresses() - { - if (this.setUniqueIdentifiers) - { - IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebAddress", this.Core); - - // index all the existing identifiers and names - foreach (IIs.WebAddress webAddress in this.webAddresses) - { - if (null != webAddress.Id) - { - identifierGenerator.IndexExistingIdentifier(webAddress.Id); - } - else - { - identifierGenerator.IndexName(String.Concat(webAddress.IP, "_", webAddress.Port)); - } - } - - foreach (IIs.WebAddress webAddress in this.webAddresses) - { - if (null == webAddress.Id) - { - webAddress.Id = identifierGenerator.GetIdentifier(String.Concat(webAddress.IP, "_", webAddress.Port)); - } - } - } - } - - /// - /// Mutate the WebDir elements. - /// - private void MutateWebDirs() - { - if (this.setUniqueIdentifiers) - { - IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebDir", this.Core); - - // index all the existing identifiers and names - foreach (IIs.WebDir webDir in this.webDirs) - { - if (null != webDir.Id) - { - identifierGenerator.IndexExistingIdentifier(webDir.Id); - } - else - { - identifierGenerator.IndexName(webDir.Path); - } - } - - foreach (IIs.WebDir webDir in this.webDirs) - { - if (null == webDir.Id) - { - webDir.Id = identifierGenerator.GetIdentifier(webDir.Path); - } - } - } - } - - /// - /// Mutate the WebDirProperties elements. - /// - private void MutateWebDirProperties() - { - if (this.setUniqueIdentifiers) - { - IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebDirProperties", this.Core); - - // index all the existing identifiers and names - foreach (IIs.WebDirProperties webDirProperties in this.webDirProperties) - { - if (null != webDirProperties.Id) - { - identifierGenerator.IndexExistingIdentifier(webDirProperties.Id); - } - } - - foreach (IIs.WebDirProperties webDirProperties in this.webDirProperties) - { - if (null == webDirProperties.Id) - { - webDirProperties.Id = identifierGenerator.GetIdentifier(String.Empty); - } - } - } - } - - /// - /// Mutate the WebFilter elements. - /// - private void MutateWebFilters() - { - IdentifierGenerator identifierGenerator = null; - - if (this.setUniqueIdentifiers) - { - identifierGenerator = new IdentifierGenerator("WebFilter", this.Core); - - // index all the existing identifiers and names - foreach (IIs.WebFilter webFilter in this.webFilters) - { - if (null != webFilter.Id) - { - identifierGenerator.IndexExistingIdentifier(webFilter.Id); - } - else - { - identifierGenerator.IndexName(webFilter.Name); - } - } - } - - foreach (IIs.WebFilter webFilter in this.webFilters) - { - if (this.setUniqueIdentifiers && null == webFilter.Id) - { - webFilter.Id = identifierGenerator.GetIdentifier(webFilter.Name); - } - - // harvest the file for this WebFilter - Wix.Directory directory = this.HarvestUniqueDirectory(Path.GetDirectoryName(webFilter.Path), false); - - Wix.Component component = new Wix.Component(); - directory.AddChild(component); - - Wix.File file = this.fileHarvester.HarvestFile(webFilter.Path); - component.AddChild(file); - } - } - - /// - /// Mutate the WebSite elements. - /// - private void MutateWebSites() - { - if (this.setUniqueIdentifiers) - { - IdentifierGenerator identifierGenerator = new IdentifierGenerator("WebSite", this.Core); - - // index all the existing identifiers and names - foreach (IIs.WebSite webSite in this.webSites) - { - if (null != webSite.Id) - { - identifierGenerator.IndexExistingIdentifier(webSite.Id); - } - else - { - identifierGenerator.IndexName(webSite.Description); - } - } - - foreach (IIs.WebSite webSite in this.webSites) - { - if (null == webSite.Id) - { - webSite.Id = identifierGenerator.GetIdentifier(webSite.Description); - } - } - } - } - - /// - /// Mutate the WebVirtualDir elements. - /// - private void MutateWebVirtualDirs() - { - IdentifierGenerator identifierGenerator = null; - - if (this.setUniqueIdentifiers) - { - identifierGenerator = new IdentifierGenerator("WebVirtualDir", this.Core); - - // index all the existing identifiers and names - foreach (IIs.WebVirtualDir webVirtualDir in this.webVirtualDirs) - { - if (null != webVirtualDir.Id) - { - identifierGenerator.IndexExistingIdentifier(webVirtualDir.Id); - } - else - { - identifierGenerator.IndexName(webVirtualDir.Alias); - } - } - } - - foreach (IIs.WebVirtualDir webVirtualDir in this.webVirtualDirs) - { - if (this.setUniqueIdentifiers && null == webVirtualDir.Id) - { - webVirtualDir.Id = identifierGenerator.GetIdentifier(webVirtualDir.Alias); - } - - // harvest the directory for this WebVirtualDir - this.HarvestUniqueDirectory(webVirtualDir.Directory, true); - } - } - } -} diff --git a/src/wix/heat/IIsHeatExtension.cs b/src/wix/heat/IIsHeatExtension.cs deleted file mode 100644 index be998370..00000000 --- a/src/wix/heat/IIsHeatExtension.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - - /// - /// An IIS harvesting extension for the WiX Toolset Harvester application. - /// - public sealed class IIsHeatExtension : BaseHeatExtension - { - /// - /// Gets the supported command line types for this extension. - /// - /// The supported command line types for this extension. - public override HeatCommandLineOption[] CommandLineTypes - { - get - { - return new HeatCommandLineOption[] - { - new HeatCommandLineOption("website", "harvest an IIS web site"), - }; - } - } - - /// - /// Parse the command line options for this extension. - /// - /// The active harvester type. - /// The option arguments. - public override void ParseOptions(string type, string[] args) - { - bool active = false; - IHarvesterExtension harvesterExtension = null; - IIsHarvesterMutator iisHarvesterMutator = new IIsHarvesterMutator(); - - // select the harvester - switch (type) - { - case "website": - harvesterExtension = new IIsWebSiteHarvester(); - active = true; - break; - } - - // set default settings - iisHarvesterMutator.SetUniqueIdentifiers = true; - - // parse the options - foreach (string arg in args) - { - if (null == arg || 0 == arg.Length) // skip blank arguments - { - continue; - } - - if ('-' == arg[0] || '/' == arg[0]) - { - string parameter = arg.Substring(1); - - if ("suid" == parameter) - { - iisHarvesterMutator.SetUniqueIdentifiers = false; - } - } - } - - // set the appropriate harvester extension - if (active) - { - this.Core.Harvester.Extension = harvesterExtension; - this.Core.Mutator.AddExtension(iisHarvesterMutator); - this.Core.Mutator.AddExtension(new IIsFinalizeHarvesterMutator()); - this.Core.Mutator.AddExtension(new UtilFinalizeHarvesterMutator()); - } - } - } -} diff --git a/src/wix/heat/IIsWebSiteHarvester.cs b/src/wix/heat/IIsWebSiteHarvester.cs deleted file mode 100644 index 6e5e29c7..00000000 --- a/src/wix/heat/IIsWebSiteHarvester.cs +++ /dev/null @@ -1,439 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.DirectoryServices; - using System.Globalization; - using System.Runtime.InteropServices; - using WixToolset.Data; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - using IIs = WixToolset.Harvesters.Serialize.IIs; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// The web site harvester for the WiX Toolset Internet Information Services Extension. - /// - public sealed class IIsWebSiteHarvester : BaseHarvesterExtension - { - /// - /// Harvest a WiX document. - /// - /// The argument for harvesting. - /// The harvested Fragment. - public override Wix.Fragment[] Harvest(string argument) - { - DirectoryHarvester directoryHarvester = new DirectoryHarvester(); - directoryHarvester.Core = this.Core; - directoryHarvester.KeepEmptyDirectories = true; - - IIsWebSiteHarvester iisWebSiteHarvester = new IIsWebSiteHarvester(); - iisWebSiteHarvester.Core = this.Core; - - IIs.WebSite webSite = iisWebSiteHarvester.HarvestWebSite(argument); - - Wix.Component component = new Wix.Component(); - component.AddChild(new Wix.CreateFolder()); - component.AddChild(webSite); - - this.Core.RootDirectory = webSite.Directory; - Wix.Directory directory = directoryHarvester.HarvestDirectory(webSite.Directory, true); - directory.AddChild(component); - - Wix.Fragment fragment = new Wix.Fragment(); - fragment.AddChild(directory); - - return new Wix.Fragment[] { fragment }; - } - - /// - /// Harvest a web site. - /// - /// The name of the web site. - /// The harvested web site. - public IIs.WebSite HarvestWebSite(string name) - { - try - { - DirectoryEntry directoryEntry = new DirectoryEntry("IIS://localhost/W3SVC"); - - foreach (DirectoryEntry childEntry in directoryEntry.Children) - { - if ("IIsWebServer" == childEntry.SchemaClassName) - { - if (String.Equals((string)childEntry.Properties["ServerComment"].Value, name, StringComparison.OrdinalIgnoreCase)) - { - return this.HarvestWebSite(childEntry); - } - } - } - } - catch (COMException ce) - { - // 0x8007005 - access denied - // If we don't have permission to harvest a website, it's likely because we're on - // Vista or higher and aren't an Admin. - if ((0x80070005 == unchecked((uint)ce.ErrorCode))) - { - throw new WixException(HarvesterErrors.InsufficientPermissionHarvestWebSite()); - } - // 0x80005000 - unknown error - else if ((0x80005000 == unchecked((uint)ce.ErrorCode))) - { - throw new WixException(HarvesterErrors.CannotHarvestWebSite()); - } - } - - throw new WixException(HarvesterErrors.WebSiteNotFound(name)); - } - - /// - /// Harvest a web site. - /// - /// The web site directory entry. - /// The harvested web site. - private IIs.WebSite HarvestWebSite(DirectoryEntry webSiteEntry) - { - IIs.WebSite webSite = new IIs.WebSite(); - - foreach (string propertyName in webSiteEntry.Properties.PropertyNames) - { - PropertyValueCollection property = webSiteEntry.Properties[propertyName]; - PropertyValueCollection parentProperty = webSiteEntry.Parent.Properties[propertyName]; - - if (null == parentProperty.Value || parentProperty.Value.ToString() != property.Value.ToString()) - { - switch (propertyName) - { - case "SecureBindings": - IIs.WebAddress secureWebAddress = this.HarvestBindings(propertyName, property); - if (null != secureWebAddress) - { - webSite.AddChild(secureWebAddress); - } - break; - case "ServerBindings": - IIs.WebAddress webAddress = this.HarvestBindings(propertyName, property); - if (null != webAddress) - { - webSite.AddChild(webAddress); - } - break; - case "ServerComment": - webSite.Description = (string)property.Value; - break; - } - } - } - - foreach (DirectoryEntry childEntry in webSiteEntry.Children) - { - switch (childEntry.SchemaClassName) - { - case "IIsFilters": - string loadOrder = (string)childEntry.Properties["FilterLoadOrder"].Value; - if (loadOrder.Length > 0) - { - string[] filterNames = loadOrder.Split(",".ToCharArray()); - - for (int i = 0; i < filterNames.Length; i++) - { - using (DirectoryEntry webFilterEntry = new DirectoryEntry(String.Concat(childEntry.Path, '/', filterNames[i]))) - { - IIs.WebFilter webFilter = this.HarvestWebFilter(webFilterEntry); - - webFilter.LoadOrder = (i + 1).ToString(CultureInfo.InvariantCulture); - - webSite.AddChild(webFilter); - } - } - } - break; - case "IIsWebDirectory": - this.HarvestWebDirectory(childEntry, webSite); - break; - case "IIsWebVirtualDir": - foreach (string propertyName in childEntry.Properties.PropertyNames) - { - PropertyValueCollection property = childEntry.Properties[propertyName]; - - switch (propertyName) - { - case "Path": - webSite.Directory = (string)property.Value; - break; - } - } - - IIs.WebDirProperties webDirProps = this.HarvestWebDirProperties(childEntry); - if (null != webDirProps) - { - webSite.AddChild(webDirProps); - } - - foreach (DirectoryEntry child2Entry in childEntry.Children) - { - switch (child2Entry.SchemaClassName) - { - case "IIsWebDirectory": - this.HarvestWebDirectory(child2Entry, webSite); - break; - case "IIsWebVirtualDir": - this.HarvestWebVirtualDir(child2Entry, webSite); - break; - } - } - break; - } - } - - return webSite; - } - - /// - /// Harvest bindings. - /// - /// The property name of the bindings property. - /// The bindings property. - /// The harvested bindings. - private IIs.WebAddress HarvestBindings(string propertyName, PropertyValueCollection bindingsProperty) - { - if (1 == bindingsProperty.Count) - { - IIs.WebAddress webAddress = new IIs.WebAddress(); - - string[] bindings = ((string)bindingsProperty[0]).Split(":".ToCharArray()); - - if (0 < bindings[0].Length) - { - webAddress.IP = bindings[0]; - } - - if (0 < bindings[1].Length) - { - webAddress.Port = bindings[1]; - } - - if (0 < bindings[2].Length) - { - webAddress.Header = bindings[2]; - } - - if ("SecureBindings" == propertyName) - { - webAddress.Secure = IIs.YesNoType.yes; - } - - return webAddress; - } - - return null; - } - - /// - /// Harvest a web directory. - /// - /// The web directory directory entry. - /// The parent web site. - private void HarvestWebDirectory(DirectoryEntry webDirectoryEntry, IIs.WebSite webSite) - { - foreach (DirectoryEntry childEntry in webDirectoryEntry.Children) - { - switch (childEntry.SchemaClassName) - { - case "IIsWebDirectory": - this.HarvestWebDirectory(childEntry, webSite); - break; - case "IIsWebVirtualDir": - this.HarvestWebVirtualDir(childEntry, webSite); - break; - } - } - - IIs.WebDirProperties webDirProperties = this.HarvestWebDirProperties(webDirectoryEntry); - - if (null != webDirProperties) - { - IIs.WebDir webDir = new IIs.WebDir(); - - int indexOfRoot = webDirectoryEntry.Path.IndexOf("ROOT/", StringComparison.OrdinalIgnoreCase); - webDir.Path = webDirectoryEntry.Path.Substring(indexOfRoot + 5); - - webDir.AddChild(webDirProperties); - - webSite.AddChild(webDir); - } - } - - /// - /// Harvest a web filter. - /// - /// The web filter directory entry. - /// The harvested web filter. - private IIs.WebFilter HarvestWebFilter(DirectoryEntry webFilterEntry) - { - IIs.WebFilter webFilter = new IIs.WebFilter(); - - webFilter.Name = webFilterEntry.Name; - - foreach (string propertyName in webFilterEntry.Properties.PropertyNames) - { - PropertyValueCollection property = webFilterEntry.Properties[propertyName]; - - switch (propertyName) - { - case "FilterDescription": - webFilter.Description = (string)property.Value; - break; - case "FilterFlags": - webFilter.Flags = (int)property.Value; - break; - case "FilterPath": - webFilter.Path = (string)property.Value; - break; - } - } - - return webFilter; - } - - /// - /// Harvest a web directory's properties. - /// - /// The web directory directory entry. - /// The harvested web directory's properties. - private IIs.WebDirProperties HarvestWebDirProperties(DirectoryEntry directoryEntry) - { - bool foundProperties = false; - IIs.WebDirProperties webDirProperties = new IIs.WebDirProperties(); - - // Cannot read properties for "iisadmin" site. - if (String.Equals("iisadmin", directoryEntry.Name, StringComparison.OrdinalIgnoreCase) && - String.Equals("ROOT", directoryEntry.Parent.Name, StringComparison.OrdinalIgnoreCase)) - { - return null; - } - - foreach (string propertyName in directoryEntry.Properties.PropertyNames) - { - PropertyValueCollection property = directoryEntry.Properties[propertyName]; - PropertyValueCollection parentProperty = directoryEntry.Parent.Properties[propertyName]; - - if (null == parentProperty.Value || parentProperty.Value.ToString() != property.Value.ToString()) - { - switch (propertyName) - { - case "AccessFlags": - int access = (int)property.Value; - - if (0x1 == (access & 0x1)) - { - webDirProperties.Read = IIs.YesNoType.yes; - } - - if (0x2 == (access & 0x2)) - { - webDirProperties.Write = IIs.YesNoType.yes; - } - - if (0x4 == (access & 0x4)) - { - webDirProperties.Execute = IIs.YesNoType.yes; - } - - if (0x200 == (access & 0x200)) - { - webDirProperties.Script = IIs.YesNoType.yes; - } - - foundProperties = true; - break; - case "AuthFlags": - int authorization = (int)property.Value; - - if (0x1 == (authorization & 0x1)) - { - webDirProperties.AnonymousAccess = IIs.YesNoType.yes; - } - - if (0x2 == (authorization & 0x2)) - { - webDirProperties.BasicAuthentication = IIs.YesNoType.yes; - } - - if (0x4 == (authorization & 0x4)) - { - webDirProperties.WindowsAuthentication = IIs.YesNoType.yes; - } - - if (0x10 == (authorization & 0x10)) - { - webDirProperties.DigestAuthentication = IIs.YesNoType.yes; - } - - if (0x40 == (authorization & 0x40)) - { - webDirProperties.PassportAuthentication = IIs.YesNoType.yes; - } - - foundProperties = true; - break; - } - } - } - - return foundProperties ? webDirProperties : null; - } - - /// - /// Harvest a web virtual directory. - /// - /// The web virtual directory directory entry. - /// The parent web site. - private void HarvestWebVirtualDir(DirectoryEntry webVirtualDirEntry, IIs.WebSite webSite) - { - IIs.WebVirtualDir webVirtualDir = new IIs.WebVirtualDir(); - - foreach (string propertyName in webVirtualDirEntry.Properties.PropertyNames) - { - PropertyValueCollection property = webVirtualDirEntry.Properties[propertyName]; - PropertyValueCollection parentProperty = webVirtualDirEntry.Parent.Properties[propertyName]; - - if (null == parentProperty.Value || parentProperty.Value.ToString() != property.Value.ToString()) - { - switch (propertyName) - { - case "Path": - webVirtualDir.Directory = (string)property.Value; - break; - } - } - } - - int indexOfRoot = webVirtualDirEntry.Path.IndexOf("ROOT/", StringComparison.OrdinalIgnoreCase); - webVirtualDir.Alias = webVirtualDirEntry.Path.Substring(indexOfRoot + 5); - - IIs.WebDirProperties webDirProps = this.HarvestWebDirProperties(webVirtualDirEntry); - if (webDirProps != null) - { - webVirtualDir.AddChild(webDirProps); - } - - foreach (DirectoryEntry childEntry in webVirtualDirEntry.Children) - { - switch (childEntry.SchemaClassName) - { - case "IIsWebDirectory": - this.HarvestWebDirectory(childEntry, webSite); - break; - case "IIsWebVirtualDir": - this.HarvestWebVirtualDir(childEntry, webSite); - break; - } - } - - webSite.AddChild(webVirtualDir); - } - } -} diff --git a/src/wix/heat/Mutator.cs b/src/wix/heat/Mutator.cs deleted file mode 100644 index 8c63882d..00000000 --- a/src/wix/heat/Mutator.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections; - using WixToolset.Harvesters.Extensibility; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// The WiX Toolset mutator. - /// - internal class Mutator : IMutator - { - private SortedList extensions; - private string extensionArgument; - - /// - /// Instantiate a new mutator. - /// - public Mutator() - { - this.extensions = new SortedList(); - } - - public IHarvesterCore Core { get; set; } - - public string ExtensionArgument - { - get { return this.extensionArgument; } - set { this.extensionArgument = value; } - } - - public void AddExtension(IMutatorExtension mutatorExtension) - { - this.extensions.Add(mutatorExtension.Sequence, mutatorExtension); - } - - public bool Mutate(Wix.Wix wix) - { - bool encounteredError = false; - - try - { - foreach (IMutatorExtension mutatorExtension in this.extensions.Values) - { - if (null == mutatorExtension.Core) - { - mutatorExtension.Core = this.Core; - } - - mutatorExtension.Mutate(wix); - } - } - finally - { - encounteredError = this.Core.Messaging.EncounteredError; - } - - // return the Wix document element only if mutation completed successfully - return !encounteredError; - } - - public string Mutate(string wixString) - { - bool encounteredError = false; - - try - { - foreach (IMutatorExtension mutatorExtension in this.extensions.Values) - { - if (null == mutatorExtension.Core) - { - mutatorExtension.Core = this.Core; - } - - wixString = mutatorExtension.Mutate(wixString); - - if (String.IsNullOrEmpty(wixString) || this.Core.Messaging.EncounteredError) - { - break; - } - } - } - finally - { - encounteredError = this.Core.Messaging.EncounteredError; - } - - return encounteredError ? null : wixString; - } - } -} diff --git a/src/wix/heat/PerformanceCategoryHarvester.cs b/src/wix/heat/PerformanceCategoryHarvester.cs deleted file mode 100644 index 6be3401b..00000000 --- a/src/wix/heat/PerformanceCategoryHarvester.cs +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Linq; - using System.Diagnostics; - using WixToolset.Data; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - using Util = WixToolset.Harvesters.Serialize.Util; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// Harvest WiX authoring for a file from the file system. - /// - public sealed class PerformanceCategoryHarvester : BaseHarvesterExtension - { - /// - /// Harvest a performance category. - /// - /// The name of the performance category. - /// A harvested performance category. - public override Wix.Fragment[] Harvest(string argument) - { - if (null == argument) - { - throw new ArgumentNullException("argument"); - } - - Util.PerformanceCategory perf = this.HarvestPerformanceCategory(argument); - - Wix.Component component = new Wix.Component(); - component.Id = this.Core.CreateIdentifierFromFilename(argument); - component.KeyPath = Wix.YesNoType.yes; - component.AddChild(perf); - - Wix.Directory directory = new Wix.Directory(); - directory.Id = "TARGETDIR"; - //directory.Name = directory.Id; - directory.AddChild(component); - - Wix.Fragment fragment = new Wix.Fragment(); - fragment.AddChild(directory); - - return new Wix.Fragment[] { fragment }; - } - - /// - /// Harvest a performance category. - /// - /// The name of the performance category. - /// A harvested file. - public Util.PerformanceCategory HarvestPerformanceCategory(string category) - { - if (null == category) - { - throw new ArgumentNullException("category"); - } - - if (PerformanceCounterCategory.Exists(category)) - { - Util.PerformanceCategory perfCategory = new Util.PerformanceCategory(); - - // Get the performance counter category and set the appropriate WiX attributes - PerformanceCounterCategory pcc = PerformanceCounterCategory.GetCategories().Single(c => string.Equals(c.CategoryName, category)); - perfCategory.Id = this.Core.CreateIdentifierFromFilename(pcc.CategoryName); - perfCategory.Name = pcc.CategoryName; - perfCategory.Help = pcc.CategoryHelp; - if (PerformanceCounterCategoryType.MultiInstance == pcc.CategoryType) - { - perfCategory.MultiInstance = Util.YesNoType.yes; - } - - // If it's multi-instance, check if there are any instances and get counters from there; else we get - // the counters straight up. For multi-instance, GetCounters() fails if there are any instances. If there - // are no instances, then GetCounters(instance) can't be called since there is no instance. Instances - // will exist for each counter even if only one of the counters was "intialized." - string[] instances = pcc.GetInstanceNames(); - bool hasInstances = instances.Length > 0; - PerformanceCounter[] counters = hasInstances - ? pcc.GetCounters(instances.First()) - : pcc.GetCounters(); - - foreach (PerformanceCounter counter in counters) - { - Util.PerformanceCounter perfCounter = new Util.PerformanceCounter(); - - // Get the performance counter and set the appropriate WiX attributes - perfCounter.Name = counter.CounterName; - perfCounter.Type = this.CounterTypeToWix(counter.CounterType); - perfCounter.Help = counter.CounterHelp; - - perfCategory.AddChild(perfCounter); - } - - return perfCategory; - } - else - { - throw new WixException(HarvesterErrors.PerformanceCategoryNotFound(category)); - } - } - - /// - /// Get the WiX performance counter type. - /// - /// The performance counter value to get. - /// The WiX performance counter type. - private Util.PerformanceCounterTypesType CounterTypeToWix(PerformanceCounterType pct) - { - Util.PerformanceCounterTypesType type; - - switch (pct) - { - case PerformanceCounterType.AverageBase: - type = Util.PerformanceCounterTypesType.averageBase; - break; - case PerformanceCounterType.AverageCount64: - type = Util.PerformanceCounterTypesType.averageCount64; - break; - case PerformanceCounterType.AverageTimer32: - type = Util.PerformanceCounterTypesType.averageTimer32; - break; - case PerformanceCounterType.CounterDelta32: - type = Util.PerformanceCounterTypesType.counterDelta32; - break; - case PerformanceCounterType.CounterTimerInverse: - type = Util.PerformanceCounterTypesType.counterTimerInverse; - break; - case PerformanceCounterType.SampleFraction: - type = Util.PerformanceCounterTypesType.sampleFraction; - break; - case PerformanceCounterType.Timer100Ns: - type = Util.PerformanceCounterTypesType.timer100Ns; - break; - case PerformanceCounterType.CounterTimer: - type = Util.PerformanceCounterTypesType.counterTimer; - break; - case PerformanceCounterType.RawFraction: - type = Util.PerformanceCounterTypesType.rawFraction; - break; - case PerformanceCounterType.Timer100NsInverse: - type = Util.PerformanceCounterTypesType.timer100NsInverse; - break; - case PerformanceCounterType.CounterMultiTimer: - type = Util.PerformanceCounterTypesType.counterMultiTimer; - break; - case PerformanceCounterType.CounterMultiTimer100Ns: - type = Util.PerformanceCounterTypesType.counterMultiTimer100Ns; - break; - case PerformanceCounterType.CounterMultiTimerInverse: - type = Util.PerformanceCounterTypesType.counterMultiTimerInverse; - break; - case PerformanceCounterType.CounterMultiTimer100NsInverse: - type = Util.PerformanceCounterTypesType.counterMultiTimer100NsInverse; - break; - case PerformanceCounterType.ElapsedTime: - type = Util.PerformanceCounterTypesType.elapsedTime; - break; - case PerformanceCounterType.SampleBase: - type = Util.PerformanceCounterTypesType.sampleBase; - break; - case PerformanceCounterType.RawBase: - type = Util.PerformanceCounterTypesType.rawBase; - break; - case PerformanceCounterType.CounterMultiBase: - type = Util.PerformanceCounterTypesType.counterMultiBase; - break; - case PerformanceCounterType.RateOfCountsPerSecond64: - type = Util.PerformanceCounterTypesType.rateOfCountsPerSecond64; - break; - case PerformanceCounterType.RateOfCountsPerSecond32: - type = Util.PerformanceCounterTypesType.rateOfCountsPerSecond32; - break; - case PerformanceCounterType.CountPerTimeInterval64: - type = Util.PerformanceCounterTypesType.countPerTimeInterval64; - break; - case PerformanceCounterType.CountPerTimeInterval32: - type = Util.PerformanceCounterTypesType.countPerTimeInterval32; - break; - case PerformanceCounterType.SampleCounter: - type = Util.PerformanceCounterTypesType.sampleCounter; - break; - case PerformanceCounterType.CounterDelta64: - type = Util.PerformanceCounterTypesType.counterDelta64; - break; - case PerformanceCounterType.NumberOfItems64: - type = Util.PerformanceCounterTypesType.numberOfItems64; - break; - case PerformanceCounterType.NumberOfItems32: - type = Util.PerformanceCounterTypesType.numberOfItems32; - break; - case PerformanceCounterType.NumberOfItemsHEX64: - type = Util.PerformanceCounterTypesType.numberOfItemsHEX64; - break; - case PerformanceCounterType.NumberOfItemsHEX32: - type = Util.PerformanceCounterTypesType.numberOfItemsHEX32; - break; - default: - throw new WixException(HarvesterErrors.UnsupportedPerformanceCounterType(pct.ToString())); - } - - return type; - } - } -} diff --git a/src/wix/heat/Program.cs b/src/wix/heat/Program.cs deleted file mode 100644 index 0b602f76..00000000 --- a/src/wix/heat/Program.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Tools.Heat -{ - using System; - using System.Runtime.InteropServices; - using System.Threading; - using System.Threading.Tasks; - using WixToolset.Core; - using WixToolset.Core.Burn; - using WixToolset.Data; - using WixToolset.Extensibility; - using WixToolset.Extensibility.Data; - using WixToolset.Extensibility.Services; - using WixToolset.Harvesters; - using WixToolset.Harvesters.Extensibility; - using WixToolset.Tools.Core; - - /// - /// Wix Toolset Harvester. - /// - public sealed class Program - { - /// - /// The main entry point for the application. - /// - /// Commandline arguments for the application. - /// Returns the application error code. - [MTAThread] - public static async Task Main(string[] args) - { - var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider() - .AddBundleBackend(); - var listener = new ConsoleMessageListener("HEAT", "heat.exe"); - - try - { - var program = new Program(); - return await program.Run(serviceProvider, listener, args); - } - catch (WixException e) - { - listener.Write(e.Error); - - return e.Error.Id; - } - catch (Exception e) - { - listener.Write(ErrorMessages.UnexpectedException(e)); - - if (e is NullReferenceException || e is SEHException) - { - throw; - } - - return e.HResult; - } - } - - /// - /// Run the application with the given arguments. - /// - /// Service provider to use throughout this execution. - /// The commandline arguments. - /// Returns the application error code. - public Task Run(IServiceProvider serviceProvider, IMessageListener listener, string[] args) - { - var messaging = serviceProvider.GetService(); - messaging.SetListener(listener); - - var arguments = serviceProvider.GetService(); - arguments.Populate(args); - - var extensionManager = serviceProvider.GetService(); - foreach (var extension in arguments.Extensions) - { - extensionManager.Load(extension); - } - var heatExtensions = extensionManager.GetServices(); - - var commandLine = HeatCommandLineFactory.CreateCommandLine(serviceProvider, heatExtensions); - var command = commandLine.ParseStandardCommandLine(arguments); - return command?.ExecuteAsync(CancellationToken.None) ?? Task.FromResult(1); - } - } -} diff --git a/src/wix/heat/RegFileHarvester.cs b/src/wix/heat/RegFileHarvester.cs deleted file mode 100644 index b7ad8c7b..00000000 --- a/src/wix/heat/RegFileHarvester.cs +++ /dev/null @@ -1,438 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections; - using System.Globalization; - using System.IO; - using WixToolset.Data; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// Harvest WiX authoring for a reg file. - /// - public sealed class RegFileHarvester : BaseHarvesterExtension - { - private static readonly string ComponentPrefix = "cmp"; - - /// - /// Current line in the reg file being processed. - /// - private int currentLineNumber = 0; - - /// - /// Flag indicating whether this is a unicode registry file. - /// - private bool unicodeRegistry; - - /// - /// Harvest a file. - /// - /// The path of the file. - /// A harvested file. - public override Wix.Fragment[] Harvest(string argument) - { - if (null == argument) - { - throw new ArgumentNullException("argument"); - } - - // Harvest the keys from the registry file - Wix.Fragment fragment = this.HarvestRegFile(argument); - - return new Wix.Fragment[] { fragment }; - } - - /// - /// Harvest a reg file. - /// - /// The path of the file. - /// A harvested registy file. - public Wix.Fragment HarvestRegFile(string path) - { - if (null == path) - { - throw new ArgumentNullException("path"); - } - - if (!File.Exists(path)) - { - throw new WixException(HarvesterErrors.FileNotFound(path)); - } - - Wix.Directory directory = new Wix.Directory(); - directory.Id = "TARGETDIR"; - - // Use absolute paths - path = Path.GetFullPath(path); - FileInfo file = new FileInfo(path); - - using (StreamReader sr = file.OpenText()) - { - string line; - this.currentLineNumber = 0; - - while (null != (line = this.GetNextLine(sr))) - { - if (line.StartsWith(@"Windows Registry Editor Version 5.00")) - { - this.unicodeRegistry = true; - } - else if (line.StartsWith(@"REGEDIT4")) - { - this.unicodeRegistry = false; - } - else if (line.StartsWith(@"[HKEY_CLASSES_ROOT\")) - { - this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKCR, line.Substring(19, line.Length - 20)); - } - else if (line.StartsWith(@"[HKEY_CURRENT_USER\")) - { - this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKCU, line.Substring(19, line.Length - 20)); - } - else if (line.StartsWith(@"[HKEY_LOCAL_MACHINE\")) - { - this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKLM, line.Substring(20, line.Length - 21)); - } - else if (line.StartsWith(@"[HKEY_USERS\")) - { - this.ConvertKey(sr, ref directory, Wix.RegistryRootType.HKU, line.Substring(12, line.Length - 13)); - } - } - } - - Console.WriteLine("Processing complete"); - - Wix.Fragment fragment = new Wix.Fragment(); - fragment.AddChild(directory); - - return fragment; - } - - /// - /// Converts the registry key to a WiX component element. - /// - /// The registry file stream. - /// A WiX directory reference. - /// The root key. - /// The current line. - private void ConvertKey(StreamReader sr, ref Wix.Directory directory, Wix.RegistryRootType root, string line) - { - Wix.Component component = new Wix.Component(); - - component.Id = this.Core.GenerateIdentifier(ComponentPrefix, line); - component.KeyPath = Wix.YesNoType.yes; - - this.ConvertValues(sr, ref component, root, line); - directory.AddChild(component); - } - - /// - /// Converts the registry values to WiX regisry key element. - /// - /// The registry file stream. - /// A WiX component reference. - /// The root key. - /// The current line. - private void ConvertValues(StreamReader sr, ref Wix.Component component, Wix.RegistryRootType root, string line) - { - string name = null; - string value = null; - var registryKey = new Wix.RegistryKey - { - Root = root, - Key = line - }; - - while (this.GetValue(sr, ref name, ref value, out var type)) - { - Wix.RegistryValue registryValue = new Wix.RegistryValue(); - ArrayList charArray; - - // Don't specifiy name for default attribute - if (!String.IsNullOrEmpty(name)) - { - registryValue.Name = name; - } - - registryValue.Type = type; - - switch (type) - { - case Wix.RegistryValue.TypeType.binary: - registryValue.Value = value.Replace(",", String.Empty).ToUpper(); - break; - - case Wix.RegistryValue.TypeType.integer: - registryValue.Value = Int32.Parse(value, NumberStyles.HexNumber).ToString(); - break; - - case Wix.RegistryValue.TypeType.expandable: - charArray = this.ConvertCharList(value); - value = String.Empty; - - // create the string, remove the terminating null - for (int i = 0; i < charArray.Count; i++) - { - if ('\0' != (char)charArray[i]) - { - value += charArray[i]; - } - } - - registryValue.Value = value; - break; - - case Wix.RegistryValue.TypeType.multiString: - charArray = this.ConvertCharList(value); - value = String.Empty; - - // Convert the character array to a string so we can simply split it at the nulls, ignore the final null null. - for (int i = 0; i < (charArray.Count - 2); i++) - { - value += charArray[i]; - } - - // Although the value can use [~] the preffered way is to use MultiStringValue - string[] parts = value.Split("\0".ToCharArray()); - foreach (string part in parts) - { - Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); - multiStringValue.Content = part; - registryValue.AddChild(multiStringValue); - } - - break; - - case Wix.RegistryValue.TypeType.@string: - // Remove \\ and \" - value = value.ToString().Replace("\\\"", "\""); - value = value.ToString().Replace(@"\\", @"\"); - // Escape [ and ] - value = value.ToString().Replace(@"[", @"[\[]"); - value = value.ToString().Replace(@"]", @"[\]]"); - // This undoes the duplicate escaping caused by the second replace - value = value.ToString().Replace(@"[\[[\]]", @"[\[]"); - // Escape $ - value = value.ToString().Replace(@"$", @"$$"); - - registryValue.Value = value; - break; - - default: - throw new ApplicationException(String.Format("Did not recognize the type of reg value on line {0}", this.currentLineNumber)); - } - - registryKey.AddChild(registryValue); - } - - // Make sure empty keys are created - if (null == value) - { - registryKey.ForceCreateOnInstall = Wix.YesNoType.yes; - } - - component.AddChild(registryKey); - } - - /// - /// Parse a value from a line. - /// - /// Reader for the reg file. - /// Name of the value. - /// Value of the value. - /// Type of the value. - /// true if the value can be parsed, false otherwise. - private bool GetValue(StreamReader sr, ref string name, ref string value, out Wix.RegistryValue.TypeType type) - { - string line = this.GetNextLine(sr); - - if (null == line || 0 == line.Length) - { - type = 0; - return false; - } - - string[] parts; - - if (line.StartsWith("@")) - { - // Special case for default value - parts = line.Trim().Split("=".ToCharArray(), 2); - - name = null; - } - else - { - parts = line.Trim().Split("=".ToCharArray()); - - // It is valid to have an '=' in the name or the data. This is probably a string so the separator will be '"="'. - if (2 != parts.Length) - { - string[] stringSeparator = new string[] { "\"=\"" }; - parts = line.Trim().Split(stringSeparator, StringSplitOptions.None); - - if (2 != parts.Length) - { - // Line still no parsed correctly - throw new ApplicationException(String.Format("Cannot parse value: {0} at line {1}.", line, this.currentLineNumber)); - } - - // Put back quotes stripped by Split() - parts[0] += "\""; - parts[1] = "\"" + parts[1]; - } - - name = parts[0].Substring(1, parts[0].Length - 2); - } - - if (parts[1].StartsWith("hex:")) - { - // binary - value = parts[1].Substring(4); - type = Wix.RegistryValue.TypeType.binary; - } - else if (parts[1].StartsWith("dword:")) - { - // dword - value = parts[1].Substring(6); - type = Wix.RegistryValue.TypeType.integer; - } - else if (parts[1].StartsWith("hex(2):")) - { - // expandable string - value = parts[1].Substring(7); - type = Wix.RegistryValue.TypeType.expandable; - } - else if (parts[1].StartsWith("hex(7):")) - { - // multi-string - value = parts[1].Substring(7); - type = Wix.RegistryValue.TypeType.multiString; - } - else if (parts[1].StartsWith("hex(")) - { - // Give a better error when we find something that isn't supported - // by specifying the type that isn't supported. - string unsupportedType = ""; - - if (parts[1].StartsWith("hex(0")) { unsupportedType = "REG_NONE"; } - else if (parts[1].StartsWith("hex(6")) { unsupportedType = "REG_LINK"; } - else if (parts[1].StartsWith("hex(8")) { unsupportedType = "REG_RESOURCE_LIST"; } - else if (parts[1].StartsWith("hex(9")) { unsupportedType = "REG_FULL_RESOURCE_DESCRIPTOR"; } - else if (parts[1].StartsWith("hex(a")) { unsupportedType = "REG_RESOURCE_REQUIREMENTS_LIST"; } - else if (parts[1].StartsWith("hex(b")) { unsupportedType = "REG_QWORD"; } - - // REG_NONE(0), REG_LINK(6), REG_RESOURCE_LIST(8), REG_FULL_RESOURCE_DESCRIPTOR(9), REG_RESOURCE_REQUIREMENTS_LIST(a), REG_QWORD(b) - this.Core.Messaging.Write(HarvesterWarnings.UnsupportedRegistryType(parts[0], this.currentLineNumber, unsupportedType)); - - type = 0; - return false; - } - else if (parts[1].StartsWith("\"")) - { - // string - value = parts[1].Substring(1, parts[1].Length - 2); - type = Wix.RegistryValue.TypeType.@string; - } - else - { - // unsupported value - throw new ApplicationException(String.Format("Unsupported registry value {0} at line {1}.", line, this.currentLineNumber)); - } - - return true; - } - - /// - /// Get the next line from the reg file input stream. - /// - /// Reader for the reg file. - /// The next line. - private string GetNextLine(StreamReader sr) - { - string line; - string totalLine = null; - - while (null != (line = sr.ReadLine())) - { - bool stop = true; - - this.currentLineNumber++; - line = line.Trim(); - Console.Write("Processing line: {0}\r", this.currentLineNumber); - - if (line.EndsWith("\\")) - { - stop = false; - line = line.Substring(0, line.Length - 1); - } - - if (null == totalLine) - { - // first line - totalLine = line; - } - else - { - // other lines - totalLine += line; - } - - // break if there is no more info for this line - if (stop) - { - break; - } - } - - return totalLine; - } - - /// - /// Convert a character list into the proper WiX format for either unicode or ansi lists. - /// - /// List of characters. - /// Array of characters. - private ArrayList ConvertCharList(string charList) - { - if (String.IsNullOrEmpty(charList)) - { - return new ArrayList(); - } - - string[] strChars = charList.Split(",".ToCharArray()); - - ArrayList charArray = new ArrayList(); - - if (this.unicodeRegistry) - { - if (0 != strChars.Length % 2) - { - throw new ApplicationException(String.Format("Problem parsing Expandable string data at line {0}, its probably not Unicode.", this.currentLineNumber)); - } - - for (int i = 0; i < strChars.Length; i += 2) - { - string chars = strChars[i + 1] + strChars[i]; - int unicodeInt = Int32.Parse(chars, NumberStyles.HexNumber); - char unicodeChar = (char)unicodeInt; - charArray.Add(unicodeChar); - } - } - else - { - for (int i = 0; i < strChars.Length; i++) - { - char charValue = (char)Int32.Parse(strChars[i], NumberStyles.HexNumber); - charArray.Add(charValue); - } - } - - return charArray; - } - } -} diff --git a/src/wix/heat/RegistryHarvester.cs b/src/wix/heat/RegistryHarvester.cs deleted file mode 100644 index 0dfd3a29..00000000 --- a/src/wix/heat/RegistryHarvester.cs +++ /dev/null @@ -1,477 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections; - using System.Diagnostics; - using System.Globalization; - using System.Runtime.InteropServices; - using System.Text; - using Microsoft.Win32; - using WixToolset.Data; - using WixToolset.Harvesters.Data; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// Harvest WiX authoring from the registry. - /// - public sealed class RegistryHarvester : IDisposable - { - private const string HKCRPathInHKLM = @"Software\Classes"; - private string remappedPath; - private static readonly int majorOSVersion = Environment.OSVersion.Version.Major; - private RegistryKey regKeyToOverride = Registry.LocalMachine; - private IntPtr regRootToOverride = NativeMethods.HkeyLocalMachine; - - /// - /// Instantiate a new RegistryHarvester. - /// - /// Set to true to remap the entire registry to a private location for this process. - public RegistryHarvester(bool remap) - { - // Detect OS major version and set the hive to use when - // redirecting registry writes. We want to redirect registry - // writes to HKCU on Windows Vista and higher to avoid UAC - // problems, and to HKLM on downlevel OS's. - if (majorOSVersion >= 6) - { - this.regKeyToOverride = Registry.CurrentUser; - this.regRootToOverride = NativeMethods.HkeyCurrentUser; - } - - // create a path in the registry for redirected keys which is process-specific - if (remap) - { - this.remappedPath = String.Concat(@"SOFTWARE\WiX\heat\", Process.GetCurrentProcess().Id.ToString(CultureInfo.InvariantCulture)); - - // remove the previous remapped key if it exists - this.RemoveRemappedKey(); - - // remap the registry roots supported by MSI - // note - order is important here - the hive being used to redirect - // to must be overridden last to avoid creating the other override - // hives in the wrong location in the registry. For example, if HKLM is - // the redirect destination, overriding it first will cause other hives - // to be overridden under HKLM\Software\WiX\heat\HKLM\Software\WiX\HKCR - // instead of under HKLM\Software\WiX\heat\HKCR - if (majorOSVersion < 6) - { - this.RemapRegistryKey(NativeMethods.HkeyClassesRoot, String.Concat(this.remappedPath, @"\\HKEY_CLASSES_ROOT")); - this.RemapRegistryKey(NativeMethods.HkeyCurrentUser, String.Concat(this.remappedPath, @"\\HKEY_CURRENT_USER")); - this.RemapRegistryKey(NativeMethods.HkeyUsers, String.Concat(this.remappedPath, @"\\HKEY_USERS")); - this.RemapRegistryKey(NativeMethods.HkeyLocalMachine, String.Concat(this.remappedPath, @"\\HKEY_LOCAL_MACHINE")); - } - else - { - this.RemapRegistryKey(NativeMethods.HkeyClassesRoot, String.Concat(this.remappedPath, @"\\HKEY_CLASSES_ROOT")); - this.RemapRegistryKey(NativeMethods.HkeyLocalMachine, String.Concat(this.remappedPath, @"\\HKEY_LOCAL_MACHINE")); - this.RemapRegistryKey(NativeMethods.HkeyUsers, String.Concat(this.remappedPath, @"\\HKEY_USERS")); - this.RemapRegistryKey(NativeMethods.HkeyCurrentUser, String.Concat(this.remappedPath, @"\\HKEY_CURRENT_USER")); - - // Typelib registration on Windows Vista requires that the key - // HKLM\Software\Classes exist, so add it to the remapped root - Registry.LocalMachine.CreateSubKey(HKCRPathInHKLM); - } - } - } - - /// - /// Close the RegistryHarvester and remove any remapped registry keys. - /// - public void Close() - { - // note - order is important here - we must quit overriding the hive - // being used to redirect first - if (majorOSVersion < 6) - { - NativeMethods.OverrideRegistryKey(NativeMethods.HkeyLocalMachine, IntPtr.Zero); - NativeMethods.OverrideRegistryKey(NativeMethods.HkeyClassesRoot, IntPtr.Zero); - NativeMethods.OverrideRegistryKey(NativeMethods.HkeyCurrentUser, IntPtr.Zero); - NativeMethods.OverrideRegistryKey(NativeMethods.HkeyUsers, IntPtr.Zero); - } - else - { - NativeMethods.OverrideRegistryKey(NativeMethods.HkeyCurrentUser, IntPtr.Zero); - NativeMethods.OverrideRegistryKey(NativeMethods.HkeyClassesRoot, IntPtr.Zero); - NativeMethods.OverrideRegistryKey(NativeMethods.HkeyLocalMachine, IntPtr.Zero); - NativeMethods.OverrideRegistryKey(NativeMethods.HkeyUsers, IntPtr.Zero); - } - - this.RemoveRemappedKey(); - } - - /// - /// Dispose the RegistryHarvester. - /// - public void Dispose() - { - this.Close(); - } - - /// - /// Harvest all registry roots supported by Windows Installer. - /// - /// The registry keys and values in the registry. - public Wix.RegistryValue[] HarvestRegistry() - { - ArrayList registryValues = new ArrayList(); - - this.HarvestRegistryKey(Registry.ClassesRoot, registryValues); - this.HarvestRegistryKey(Registry.CurrentUser, registryValues); - this.HarvestRegistryKey(Registry.LocalMachine, registryValues); - this.HarvestRegistryKey(Registry.Users, registryValues); - - return (Wix.RegistryValue[])registryValues.ToArray(typeof(Wix.RegistryValue)); - } - - /// - /// Harvest a registry key. - /// - /// The path of the registry key to harvest. - /// The registry keys and values under the key. - public Wix.RegistryValue[] HarvestRegistryKey(string path) - { - RegistryKey registryKey = null; - ArrayList registryValues = new ArrayList(); - - string[] parts = GetPathParts(path); - - try - { - switch (parts[0]) - { - case "HKEY_CLASSES_ROOT": - registryKey = Registry.ClassesRoot; - break; - case "HKEY_CURRENT_USER": - registryKey = Registry.CurrentUser; - break; - case "HKEY_LOCAL_MACHINE": - registryKey = Registry.LocalMachine; - break; - case "HKEY_USERS": - registryKey = Registry.Users; - break; - default: - // TODO: put a better exception here - throw new Exception(); - } - - if (1 < parts.Length) - { - registryKey = registryKey.OpenSubKey(parts[1]); - - if (null == registryKey) - { - throw new WixException(HarvesterErrors.UnableToOpenRegistryKey(parts[1])); - } - } - - this.HarvestRegistryKey(registryKey, registryValues); - } - finally - { - if (null != registryKey) - { - registryKey.Close(); - } - } - - return (Wix.RegistryValue[])registryValues.ToArray(typeof(Wix.RegistryValue)); - } - - /// - /// Gets the parts of a registry key's path. - /// - /// The registry key path. - /// The root and key parts of the registry key path. - private static string[] GetPathParts(string path) - { - return path.Split(@"\".ToCharArray(), 2); - } - - /// - /// Harvest a registry key. - /// - /// The registry key to harvest. - /// The collected registry values. - private void HarvestRegistryKey(RegistryKey registryKey, ArrayList registryValues) - { - // harvest the sub-keys - foreach (string subKeyName in registryKey.GetSubKeyNames()) - { - using (RegistryKey subKey = registryKey.OpenSubKey(subKeyName)) - { - this.HarvestRegistryKey(subKey, registryValues); - } - } - - string[] parts = GetPathParts(registryKey.Name); - - Wix.RegistryRootType root; - switch (parts[0]) - { - case "HKEY_CLASSES_ROOT": - root = Wix.RegistryRootType.HKCR; - break; - case "HKEY_CURRENT_USER": - root = Wix.RegistryRootType.HKCU; - break; - case "HKEY_LOCAL_MACHINE": - // HKLM\Software\Classes is equivalent to HKCR - if (1 < parts.Length && parts[1].StartsWith(HKCRPathInHKLM, StringComparison.OrdinalIgnoreCase)) - { - root = Wix.RegistryRootType.HKCR; - parts[1] = parts[1].Remove(0, HKCRPathInHKLM.Length); - - if (0 < parts[1].Length) - { - parts[1] = parts[1].TrimStart('\\'); - } - - if (String.IsNullOrEmpty(parts[1])) - { - parts = new [] { parts[0] }; - } - } - else - { - root = Wix.RegistryRootType.HKLM; - } - break; - case "HKEY_USERS": - root = Wix.RegistryRootType.HKU; - break; - default: - // TODO: put a better exception here - throw new Exception(); - } - - // harvest the values - foreach (string valueName in registryKey.GetValueNames()) - { - Wix.RegistryValue registryValue = new Wix.RegistryValue(); - - registryValue.Action = Wix.RegistryValue.ActionType.write; - - registryValue.Root = root; - - if (1 < parts.Length) - { - registryValue.Key = parts[1]; - } - - if (null != valueName && 0 < valueName.Length) - { - registryValue.Name = valueName; - } - - object value = registryKey.GetValue(valueName); - - if (value is byte[]) // binary - { - StringBuilder hexadecimalValue = new StringBuilder(); - - // convert the byte array to hexadecimal - foreach (byte byteValue in (byte[])value) - { - hexadecimalValue.Append(byteValue.ToString("X2", CultureInfo.InvariantCulture.NumberFormat)); - } - - registryValue.Type = Wix.RegistryValue.TypeType.binary; - registryValue.Value = hexadecimalValue.ToString(); - } - else if (value is int) // integer - { - registryValue.Type = Wix.RegistryValue.TypeType.integer; - registryValue.Value = ((int)value).ToString(CultureInfo.InvariantCulture); - } - else if (value is string[]) // multi-string - { - registryValue.Type = Wix.RegistryValue.TypeType.multiString; - - if (0 == ((string[])value).Length) - { - Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); - - multiStringValue.Content = String.Empty; - - registryValue.AddChild(multiStringValue); - } - else - { - foreach (string multiStringValueContent in (string[])value) - { - Wix.MultiStringValue multiStringValue = new Wix.MultiStringValue(); - - multiStringValue.Content = multiStringValueContent; - - registryValue.AddChild(multiStringValue); - } - } - } - else if (value is string) // string, expandable (there is no way to differentiate a string and expandable value in .NET 1.1) - { - registryValue.Type = Wix.RegistryValue.TypeType.@string; - registryValue.Value = (string)value; - } - else - { - // TODO: put a better exception here - throw new Exception(); - } - - registryValues.Add(registryValue); - } - - // If there were no subkeys and no values, we still need an element for this empty registry key. - // But specifically avoid SOFTWARE\Classes because it shouldn't be harvested as an empty key. - if (parts.Length > 1 && registryKey.SubKeyCount == 0 && registryKey.ValueCount == 0 && - !String.Equals(parts[1], HKCRPathInHKLM, StringComparison.OrdinalIgnoreCase)) - { - Wix.RegistryValue emptyRegistryKey = new Wix.RegistryValue(); - emptyRegistryKey.Root = root; - emptyRegistryKey.Key = parts[1]; - emptyRegistryKey.Type = Wix.RegistryValue.TypeType.@string; - emptyRegistryKey.Value = String.Empty; - emptyRegistryKey.Action = Wix.RegistryValue.ActionType.write; - registryValues.Add(emptyRegistryKey); - } - } - - /// - /// Remap a registry key to an alternative location. - /// - /// The registry key to remap. - /// The path to remap the registry key to under HKLM. - private void RemapRegistryKey(IntPtr registryKey, string remappedPath) - { - IntPtr remappedKey = IntPtr.Zero; - - try - { - remappedKey = NativeMethods.OpenRegistryKey(this.regRootToOverride, remappedPath); - - NativeMethods.OverrideRegistryKey(registryKey, remappedKey); - } - finally - { - if (IntPtr.Zero != remappedKey) - { - NativeMethods.CloseRegistryKey(remappedKey); - } - } - } - - /// - /// Remove the remapped registry key. - /// - private void RemoveRemappedKey() - { - try - { - this.regKeyToOverride.DeleteSubKeyTree(this.remappedPath); - } - catch (ArgumentException) - { - // ignore the error where the key does not exist - } - } - - /// - /// The native methods for re-mapping registry keys. - /// - private sealed class NativeMethods - { - internal static readonly IntPtr HkeyClassesRoot = (IntPtr)unchecked((Int32)0x80000000); - internal static readonly IntPtr HkeyCurrentUser = (IntPtr)unchecked((Int32)0x80000001); - internal static readonly IntPtr HkeyLocalMachine = (IntPtr)unchecked((Int32)0x80000002); - internal static readonly IntPtr HkeyUsers = (IntPtr)unchecked((Int32)0x80000003); - - private const uint GenericRead = 0x80000000; - private const uint GenericWrite = 0x40000000; - private const uint GenericExecute = 0x20000000; - private const uint GenericAll = 0x10000000; - private const uint StandardRightsAll = 0x001F0000; - - /// - /// Opens a registry key. - /// - /// Base key to open. - /// Path to subkey to open. - /// Handle to new key. - internal static IntPtr OpenRegistryKey(IntPtr key, string path) - { - IntPtr newKey = IntPtr.Zero; - uint disposition = 0; - uint sam = StandardRightsAll | GenericRead | GenericWrite | GenericExecute | GenericAll; - - if (0 != RegCreateKeyEx(key, path, 0, null, 0, sam, 0, out newKey, out disposition)) - { - throw new Exception(); - } - - return newKey; - } - - /// - /// Closes a previously open registry key. - /// - /// Handle to key to close. - internal static void CloseRegistryKey(IntPtr key) - { - if (0 != RegCloseKey(key)) - { - throw new Exception(); - } - } - - /// - /// Override a registry key. - /// - /// Handle of the key to override. - /// Handle to override key. - internal static void OverrideRegistryKey(IntPtr key, IntPtr newKey) - { - if (0 != RegOverridePredefKey(key, newKey)) - { - throw new Exception(); - } - } - - /// - /// Interop to RegCreateKeyW. - /// - /// Handle to base key. - /// Subkey to create. - /// Always 0 - /// Just pass null. - /// Just pass 0. - /// Rights to registry key. - /// Just pass null. - /// Opened key. - /// Whether key was opened or created. - /// Handle to registry key. - [DllImport("advapi32.dll", EntryPoint = "RegCreateKeyExW", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] - 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); - - /// - /// Interop to RegCloseKey. - /// - /// Handle to key to close. - /// 0 if success. - [DllImport("advapi32.dll", EntryPoint = "RegCloseKey", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] - private static extern int RegCloseKey(IntPtr key); - - /// - /// Interop to RegOverridePredefKey. - /// - /// Handle to key to override. - /// Handle to override key. - /// 0 if success. - [DllImport("advapi32.dll", EntryPoint = "RegOverridePredefKey", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] - private static extern int RegOverridePredefKey(IntPtr key, IntPtr newKey); - } - } -} diff --git a/src/wix/heat/Serialize/CodeDomInterfaces.cs b/src/wix/heat/Serialize/CodeDomInterfaces.cs deleted file mode 100644 index bd674db6..00000000 --- a/src/wix/heat/Serialize/CodeDomInterfaces.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Serialize -{ - using System; - using System.Collections; - using System.Xml; - - /// - /// Interface for generated schema elements. - /// - public interface ISchemaElement - { - /// - /// Gets and sets the parent of this element. May be null. - /// - /// An ISchemaElement that has this element as a child. - ISchemaElement ParentElement - { - get; - set; - } - - /// - /// Outputs xml representing this element, including the associated attributes - /// and any nested elements. - /// - /// XmlWriter to be used when outputting the element. - void OutputXml(XmlWriter writer); - } - - /// - /// Interface for generated schema elements. Implemented by elements that have child - /// elements. - /// - public interface IParentElement - { - /// - /// Gets an enumerable collection of the children of this element. - /// - /// An enumerable collection of the children of this element. - IEnumerable Children - { - get; - } - - /// - /// Gets an enumerable collection of the children of this element, filtered - /// by the passed in type. - /// - /// The type of children to retrieve. - IEnumerable this[Type childType] - { - get; - } - - /// - /// Adds a child to this element. - /// - /// Child to add. - void AddChild(ISchemaElement child); - - /// - /// Removes a child from this element. - /// - /// Child to remove. - void RemoveChild(ISchemaElement child); - } - - /// - /// Interface for generated schema elements. Implemented by classes with attributes. - /// - public interface ISetAttributes - { - /// - /// Sets the attribute with the given name to the given value. The value here is - /// a string, and is converted to the strongly-typed version inside this method. - /// - /// The name of the attribute to set. - /// The value to assign to the attribute. - void SetAttribute(string name, string value); - } - - /// - /// Interface for generated schema elements. Implemented by classes with children. - /// - public interface ICreateChildren - { - /// - /// Creates an instance of the child with the passed in name. - /// - /// String matching the element name of the child when represented in XML. - /// An instance of that child. - ISchemaElement CreateChild(string childName); - } -} diff --git a/src/wix/heat/Serialize/CodeDomReader.cs b/src/wix/heat/Serialize/CodeDomReader.cs deleted file mode 100644 index 0741bf68..00000000 --- a/src/wix/heat/Serialize/CodeDomReader.cs +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Serialize -{ - using System; - using System.Diagnostics.CodeAnalysis; - using System.Globalization; - using System.Reflection; - using System.Xml; - using WixToolset.Harvesters.Extensibility.Serialize; - - /// - /// Class used for reading XML files in to the CodeDom. - /// - public class CodeDomReader - { - private Assembly[] assemblies; - - /// - /// Creates a new CodeDomReader, using the current assembly. - /// - public CodeDomReader() - { - this.assemblies = new Assembly[] { Assembly.GetExecutingAssembly() }; - } - - /// - /// Creates a new CodeDomReader, and takes in a list of assemblies in which to - /// look for elements. - /// - /// Assemblies in which to look for types that correspond - /// to elements. - public CodeDomReader(Assembly[] assemblies) - { - this.assemblies = assemblies; - } - - /// - /// Loads an XML file into a strongly-typed code dom. - /// - /// File to load into the code dom. - /// The strongly-typed object at the root of the tree. - [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")] - public ISchemaElement Load(string filePath) - { - XmlDocument document = new XmlDocument(); - document.Load(filePath); - ISchemaElement schemaElement = null; - - foreach (XmlNode node in document.ChildNodes) - { - XmlElement element = node as XmlElement; - if (element != null) - { - if (schemaElement != null) - { - throw new InvalidOperationException(WixHarvesterStrings.EXP_MultipleRootElementsFoundInFile); - } - - schemaElement = this.CreateObjectFromElement(element); - this.ParseObjectFromElement(schemaElement, element); - } - } - return schemaElement; - } - - /// - /// Sets an attribute on an ISchemaElement. - /// - /// Schema element to set attribute on. - /// Name of the attribute to set. - /// Value to set on the attribute. - [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")] - private static void SetAttributeOnObject(ISchemaElement schemaElement, string name, string value) - { - ISetAttributes setAttributes = schemaElement as ISetAttributes; - if (setAttributes == null) - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixHarvesterStrings.EXP_ISchemaElementDoesnotImplementISetAttribute, schemaElement.GetType().FullName)); - } - else - { - setAttributes.SetAttribute(name, value); - } - } - - /// - /// Parses an ISchemaElement from the XmlElement. - /// - /// ISchemaElement to fill in. - /// XmlElement to parse from. - [SuppressMessage("Microsoft.Globalization", "CA1303:DoNotPassLiteralsAsLocalizedParameters", MessageId = "System.InvalidOperationException.#ctor(System.String)")] - private void ParseObjectFromElement(ISchemaElement schemaElement, XmlElement element) - { - foreach (XmlAttribute attribute in element.Attributes) - { - SetAttributeOnObject(schemaElement, attribute.LocalName, attribute.Value); - } - - foreach (XmlNode node in element.ChildNodes) - { - XmlElement childElement = node as XmlElement; - if (childElement != null) - { - ISchemaElement childSchemaElement = null; - ICreateChildren createChildren = schemaElement as ICreateChildren; - if (createChildren == null) - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixHarvesterStrings.EXP_ISchemaElementDoesnotImplementICreateChildren, element.LocalName)); - } - else - { - childSchemaElement = createChildren.CreateChild(childElement.LocalName); - } - - if (childSchemaElement == null) - { - childSchemaElement = this.CreateObjectFromElement(childElement); - if (childSchemaElement == null) - { - throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, WixHarvesterStrings.EXP_XmlElementDoesnotHaveISchemaElement, childElement.LocalName)); - } - } - - this.ParseObjectFromElement(childSchemaElement, childElement); - IParentElement parentElement = (IParentElement)schemaElement; - parentElement.AddChild(childSchemaElement); - } - else - { - XmlText childText = node as XmlText; - if (childText != null) - { - SetAttributeOnObject(schemaElement, "Content", childText.Value); - } - } - } - } - - /// - /// Creates an object from an XML element by digging through the assembly list. - /// - /// XML Element to create an ISchemaElement from. - /// A constructed ISchemaElement. - private ISchemaElement CreateObjectFromElement(XmlElement element) - { - ISchemaElement schemaElement = null; - foreach (Assembly assembly in this.assemblies) - { - foreach (Type type in assembly.GetTypes()) - { - if (type.FullName.EndsWith(element.LocalName, StringComparison.Ordinal) - && typeof(ISchemaElement).IsAssignableFrom(type)) - { - schemaElement = (ISchemaElement)Activator.CreateInstance(type); - } - } - } - return schemaElement; - } - } -} diff --git a/src/wix/heat/Serialize/ElementCollection.cs b/src/wix/heat/Serialize/ElementCollection.cs deleted file mode 100644 index bacbafbd..00000000 --- a/src/wix/heat/Serialize/ElementCollection.cs +++ /dev/null @@ -1,618 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters.Serialize -{ - using System; - using System.Collections; - using System.Globalization; - using WixToolset.Harvesters.Extensibility.Serialize; - - /// - /// Collection used in the CodeDOM for the children of a given element. Provides type-checking - /// on the allowed children to ensure that only allowed types are added. - /// - public class ElementCollection : ICollection, IEnumerable - { - private CollectionType collectionType; - private int totalContainedItems; - private int containersUsed; - private ArrayList items; - - /// - /// Creates a new element collection. - /// - /// Type of the collection to create. - public ElementCollection(CollectionType collectionType) - { - this.collectionType = collectionType; - this.items = new ArrayList(); - } - - /// - /// Enum representing types of XML collections. - /// - public enum CollectionType - { - /// - /// A choice type, corresponding to the XSD choice element. - /// - Choice, - - /// - /// A sequence type, corresponding to the XSD sequence element. - /// - Sequence - } - - /// - /// Gets the type of collection. - /// - /// The type of collection. - public CollectionType Type - { - get { return this.collectionType; } - } - - /// - /// Gets the count of child elements in this collection (counts ISchemaElements, not nested collections). - /// - /// The count of child elements in this collection (counts ISchemaElements, not nested collections). - public int Count - { - get { return this.totalContainedItems; } - } - - /// - /// Gets the flag specifying whether this collection is synchronized. Always returns false. - /// - /// The flag specifying whether this collection is synchronized. Always returns false. - public bool IsSynchronized - { - get { return false; } - } - - /// - /// Gets an object external callers can synchronize on. - /// - /// An object external callers can synchronize on. - public object SyncRoot - { - get { return this; } - } - - /// - /// Adds a child element to this collection. - /// - /// The element to add. - /// Thrown if the child is not of an allowed type. - public void AddElement(ISchemaElement element) - { - foreach (object obj in this.items) - { - bool containerUsed; - - CollectionItem collectionItem = obj as CollectionItem; - if (collectionItem != null) - { - containerUsed = collectionItem.Elements.Count != 0; - if (collectionItem.ElementType.IsAssignableFrom(element.GetType())) - { - collectionItem.AddElement(element); - - if (!containerUsed) - { - this.containersUsed++; - } - - this.totalContainedItems++; - return; - } - - continue; - } - - ElementCollection collection = obj as ElementCollection; - if (collection != null) - { - containerUsed = collection.Count != 0; - - try - { - collection.AddElement(element); - - if (!containerUsed) - { - this.containersUsed++; - } - - this.totalContainedItems++; - return; - } - catch (ArgumentException) - { - // Eat the exception and keep looking. We'll throw our own if we can't find its home. - } - - continue; - } - } - - throw new ArgumentException(String.Format( - CultureInfo.InvariantCulture, - WixHarvesterStrings.EXP_ElementOfTypeIsNotValidForThisCollection, - element.GetType().Name)); - } - - /// - /// Removes a child element from this collection. - /// - /// The element to remove. - /// Thrown if the element is not of an allowed type. - public void RemoveElement(ISchemaElement element) - { - foreach (object obj in this.items) - { - CollectionItem collectionItem = obj as CollectionItem; - if (collectionItem != null) - { - if (collectionItem.ElementType.IsAssignableFrom(element.GetType())) - { - if (collectionItem.Elements.Count == 0) - { - return; - } - - collectionItem.RemoveElement(element); - - if (collectionItem.Elements.Count == 0) - { - this.containersUsed--; - } - - this.totalContainedItems--; - return; - } - - continue; - } - - ElementCollection collection = obj as ElementCollection; - if (collection != null) - { - if (collection.Count == 0) - { - continue; - } - - try - { - collection.RemoveElement(element); - - if (collection.Count == 0) - { - this.containersUsed--; - } - - this.totalContainedItems--; - return; - } - catch (ArgumentException) - { - // Eat the exception and keep looking. We'll throw our own if we can't find its home. - } - - continue; - } - } - - throw new ArgumentException(String.Format( - CultureInfo.InvariantCulture, - WixHarvesterStrings.EXP_ElementOfTypeIsNotValidForThisCollection, - element.GetType().Name)); - } - - /// - /// Copies this collection to an array. - /// - /// Array to copy to. - /// Offset into the array. - public void CopyTo(Array array, int index) - { - int item = 0; - foreach (ISchemaElement element in this) - { - array.SetValue(element, (long)(item + index)); - item++; - } - } - - /// - /// Creates an enumerator for walking the elements in this collection. - /// - /// A newly created enumerator. - public IEnumerator GetEnumerator() - { - return new ElementCollectionEnumerator(this); - } - - /// - /// Gets an enumerable collection of children of a given type. - /// - /// Type of children to get. - /// A collection of children. - /// Thrown if the type isn't a valid child type. - public IEnumerable Filter(Type childType) - { - foreach (object container in this.items) - { - CollectionItem collectionItem = container as CollectionItem; - if (collectionItem != null) - { - if (collectionItem.ElementType.IsAssignableFrom(childType)) - { - return collectionItem.Elements; - } - - continue; - } - - ElementCollection elementCollection = container as ElementCollection; - if (elementCollection != null) - { - IEnumerable nestedFilter = elementCollection.Filter(childType); - if (nestedFilter != null) - { - return nestedFilter; - } - - continue; - } - } - - throw new ArgumentException(String.Format( - CultureInfo.InvariantCulture, - WixHarvesterStrings.EXP_TypeIsNotValidForThisCollection, - childType.Name)); - } - - /// - /// Adds a type to this collection. - /// - /// CollectionItem representing the type to add. - public void AddItem(CollectionItem collectionItem) - { - this.items.Add(collectionItem); - } - - /// - /// Adds a nested collection to this collection. - /// - /// ElementCollection to add. - public void AddCollection(ElementCollection collection) - { - this.items.Add(collection); - } - - /// - /// Class used to represent a given type in the child collection of an element. Abstract, - /// has subclasses for choice and sequence (which can do cardinality checks). - /// - public abstract class CollectionItem - { - private Type elementType; - private ArrayList elements; - - /// - /// Creates a new CollectionItem for the given element type. - /// - /// Type of the element for this collection item. - protected CollectionItem(Type elementType) - { - this.elementType = elementType; - this.elements = new ArrayList(); - } - - /// - /// Gets the type of this collection's items. - /// - /// The type of this collection's items. - public Type ElementType - { - get { return this.elementType; } - } - - /// - /// Gets the elements of this collection. - /// - /// The elements of this collection. - public ArrayList Elements - { - get { return this.elements; } - } - - /// - /// Adds an element to this collection. Must be of an assignable type to the collection's - /// type. - /// - /// The element to add. - /// Thrown if the type isn't assignable to the collection's type. - public void AddElement(ISchemaElement element) - { - if (!this.elementType.IsAssignableFrom(element.GetType())) - { - throw new ArgumentException( - String.Format( - CultureInfo.InvariantCulture, - WixHarvesterStrings.EXP_ElementIsSubclassOfDifferentType, - this.elementType.Name, - element.GetType().Name), - "element"); - } - - this.elements.Add(element); - } - - /// - /// Removes an element from this collection. - /// - /// The element to remove. - /// Thrown if the element's type isn't assignable to the collection's type. - public void RemoveElement(ISchemaElement element) - { - if (!this.elementType.IsAssignableFrom(element.GetType())) - { - throw new ArgumentException( - String.Format( - CultureInfo.InvariantCulture, - WixHarvesterStrings.EXP_ElementIsSubclassOfDifferentType, - this.elementType.Name, - element.GetType().Name), - "element"); - } - - this.elements.Remove(element); - } - } - - /// - /// Class representing a choice item. Doesn't do cardinality checks. - /// - public class ChoiceItem : CollectionItem - { - /// - /// Creates a new choice item. - /// - /// Type of the created item. - public ChoiceItem(Type elementType) - : base(elementType) - { - } - } - - /// - /// Class representing a sequence item. Can do cardinality checks, if required. - /// - public class SequenceItem : CollectionItem - { - /// - /// Creates a new sequence item. - /// - /// Type of the created item. - public SequenceItem(Type elementType) - : base(elementType) - { - } - } - - /// - /// Enumerator for the ElementCollection. - /// - private class ElementCollectionEnumerator : IEnumerator - { - private ElementCollection collection; - private Stack collectionStack; - - /// - /// Creates a new ElementCollectionEnumerator. - /// - /// The collection to create an enumerator for. - public ElementCollectionEnumerator(ElementCollection collection) - { - this.collection = collection; - } - - /// - /// Gets the current object from the enumerator. - /// - public object Current - { - get - { - if (this.collectionStack != null && this.collectionStack.Count > 0) - { - CollectionSymbol symbol = (CollectionSymbol)this.collectionStack.Peek(); - object container = symbol.Collection.items[symbol.ContainerIndex]; - - CollectionItem collectionItem = container as CollectionItem; - if (collectionItem != null) - { - return collectionItem.Elements[symbol.ItemIndex]; - } - - throw new InvalidOperationException(String.Format( - CultureInfo.InvariantCulture, - WixHarvesterStrings.EXP_ElementMustBeChoiceItemOrSequenceItem, - container.GetType().Name)); - } - - return null; - } - } - - /// - /// Resets the enumerator to the beginning. - /// - public void Reset() - { - if (this.collectionStack != null) - { - this.collectionStack.Clear(); - this.collectionStack = null; - } - } - - /// - /// Moves the enumerator to the next item. - /// - /// True if there is a next item, false otherwise. - public bool MoveNext() - { - if (this.collectionStack == null) - { - if (this.collection.Count == 0) - { - return false; - } - - this.collectionStack = new Stack(); - this.collectionStack.Push(new CollectionSymbol(this.collection)); - } - - CollectionSymbol symbol = (CollectionSymbol)this.collectionStack.Peek(); - - if (this.FindNext(symbol)) - { - return true; - } - - this.collectionStack.Pop(); - if (this.collectionStack.Count == 0) - { - return false; - } - - return this.MoveNext(); - } - - /// - /// Pushes a collection onto the stack. - /// - /// The collection to push. - private void PushCollection(ElementCollection elementCollection) - { - if (elementCollection.Count <= 0) - { - throw new ArgumentException(String.Format( - CultureInfo.InvariantCulture, - WixHarvesterStrings.EXP_CollectionMustHaveAtLeastOneElement, - elementCollection.Count)); - } - - CollectionSymbol symbol = new CollectionSymbol(elementCollection); - this.collectionStack.Push(symbol); - this.FindNext(symbol); - } - - /// - /// Finds the next item from a given symbol. - /// - /// The symbol to start looking from. - /// True if a next element is found, false otherwise. - private bool FindNext(CollectionSymbol symbol) - { - object container = symbol.Collection.items[symbol.ContainerIndex]; - - CollectionItem collectionItem = container as CollectionItem; - if (collectionItem != null) - { - if (symbol.ItemIndex + 1 < collectionItem.Elements.Count) - { - symbol.ItemIndex++; - return true; - } - } - - ElementCollection elementCollection = container as ElementCollection; - if (elementCollection != null && elementCollection.Count > 0 && symbol.ItemIndex == -1) - { - symbol.ItemIndex++; - this.PushCollection(elementCollection); - return true; - } - - symbol.ItemIndex = 0; - - for (int i = symbol.ContainerIndex + 1; i < symbol.Collection.items.Count; ++i) - { - object nestedContainer = symbol.Collection.items[i]; - - CollectionItem nestedCollectionItem = nestedContainer as CollectionItem; - if (nestedCollectionItem != null) - { - if (nestedCollectionItem.Elements.Count > 0) - { - symbol.ContainerIndex = i; - return true; - } - } - - ElementCollection nestedElementCollection = nestedContainer as ElementCollection; - if (nestedElementCollection != null && nestedElementCollection.Count > 0) - { - symbol.ContainerIndex = i; - this.PushCollection(nestedElementCollection); - return true; - } - } - - return false; - } - - /// - /// Class representing a single point in the collection. Consists of an ElementCollection, - /// a container index, and an index into the container. - /// - private class CollectionSymbol - { - private ElementCollection collection; - private int containerIndex; - private int itemIndex = -1; - - /// - /// Creates a new CollectionSymbol. - /// - /// The collection for the symbol. - public CollectionSymbol(ElementCollection collection) - { - this.collection = collection; - } - - /// - /// Gets the collection for the symbol. - /// - public ElementCollection Collection - { - get { return this.collection; } - } - - /// - /// Gets and sets the index of the container in the collection. - /// - public int ContainerIndex - { - get { return this.containerIndex; } - set { this.containerIndex = value; } - } - - /// - /// Gets and sets the index of the item in the container. - /// - public int ItemIndex - { - get { return this.itemIndex; } - set { this.itemIndex = value; } - } - } - } - } -} diff --git a/src/wix/heat/Serialize/WixHarvesterStrings.Designer.cs b/src/wix/heat/Serialize/WixHarvesterStrings.Designer.cs deleted file mode 100644 index cc16e57a..00000000 --- a/src/wix/heat/Serialize/WixHarvesterStrings.Designer.cs +++ /dev/null @@ -1,153 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WixToolset.Harvesters.Extensibility.Serialize { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class WixHarvesterStrings { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal WixHarvesterStrings() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("heat.Serialize.WixHarvesterStrings", typeof(WixHarvesterStrings).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to Collection has {0} elements. Must have at least one.. - /// - internal static string EXP_CollectionMustHaveAtLeastOneElement { - get { - return ResourceManager.GetString("EXP_CollectionMustHaveAtLeastOneElement", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Element must be a subclass of {0}, but was of type {1}.. - /// - internal static string EXP_ElementIsSubclassOfDifferentType { - get { - return ResourceManager.GetString("EXP_ElementIsSubclassOfDifferentType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Element of type {0} found in enumerator. Must be ChoiceItem or SequenceItem.. - /// - internal static string EXP_ElementMustBeChoiceItemOrSequenceItem { - get { - return ResourceManager.GetString("EXP_ElementMustBeChoiceItemOrSequenceItem", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Element of type {0} is not valid for this collection.. - /// - internal static string EXP_ElementOfTypeIsNotValidForThisCollection { - get { - return ResourceManager.GetString("EXP_ElementOfTypeIsNotValidForThisCollection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to ISchemaElement with name {0} does not implement ICreateChildren.. - /// - internal static string EXP_ISchemaElementDoesnotImplementICreateChildren { - get { - return ResourceManager.GetString("EXP_ISchemaElementDoesnotImplementICreateChildren", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to ISchemaElement with name {0} does not implement ISetAttributes.. - /// - internal static string EXP_ISchemaElementDoesnotImplementISetAttribute { - get { - return ResourceManager.GetString("EXP_ISchemaElementDoesnotImplementISetAttribute", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to A Merge table FileCompression column contains an invalid value '{0}'.. - /// - internal static string EXP_MergeTableFileCompressionColumnContainsInvalidValue { - get { - return ResourceManager.GetString("EXP_MergeTableFileCompressionColumnContainsInvalidValue", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Multiple root elements found in file.. - /// - internal static string EXP_MultipleRootElementsFoundInFile { - get { - return ResourceManager.GetString("EXP_MultipleRootElementsFoundInFile", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Type {0} is not valid for this collection.. - /// - internal static string EXP_TypeIsNotValidForThisCollection { - get { - return ResourceManager.GetString("EXP_TypeIsNotValidForThisCollection", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to XmlElement with name {0} does not have a corresponding ISchemaElement.. - /// - internal static string EXP_XmlElementDoesnotHaveISchemaElement { - get { - return ResourceManager.GetString("EXP_XmlElementDoesnotHaveISchemaElement", resourceCulture); - } - } - } -} diff --git a/src/wix/heat/Serialize/WixHarvesterStrings.resx b/src/wix/heat/Serialize/WixHarvesterStrings.resx deleted file mode 100644 index 5894a190..00000000 --- a/src/wix/heat/Serialize/WixHarvesterStrings.resx +++ /dev/null @@ -1,150 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - A Merge table FileCompression column contains an invalid value '{0}'. - - - Multiple root elements found in file. - - - ISchemaElement with name {0} does not implement ICreateChildren. - - - ISchemaElement with name {0} does not implement ISetAttributes. - - - XmlElement with name {0} does not have a corresponding ISchemaElement. - - - Element of type {0} is not valid for this collection. - - - Type {0} is not valid for this collection. - - - Collection has {0} elements. Must have at least one. - - - Element must be a subclass of {0}, but was of type {1}. - - - Element of type {0} found in enumerator. Must be ChoiceItem or SequenceItem. - - \ No newline at end of file diff --git a/src/wix/heat/Serialize/iis.cs b/src/wix/heat/Serialize/iis.cs deleted file mode 100644 index 3f2943f8..00000000 --- a/src/wix/heat/Serialize/iis.cs +++ /dev/null @@ -1,5915 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#pragma warning disable 1591 -namespace WixToolset.Harvesters.Serialize.IIs -{ - using System; - using System.CodeDom.Compiler; - using System.Collections; - using System.Diagnostics.CodeAnalysis; - using System.Globalization; - using System.Xml; - using WixToolset.Harvesters.Serialize; - - - /// - /// Values of this type will either be "yes" or "no". - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum YesNoType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - no, - - yes, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public class Enums - { - - /// - /// Parses a YesNoType from a string. - /// - public static YesNoType ParseYesNoType(string value) - { - YesNoType parsedValue; - Enums.TryParseYesNoType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a YesNoType from a string. - /// - public static bool TryParseYesNoType(string value, out YesNoType parsedValue) - { - parsedValue = YesNoType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("no" == value)) - { - parsedValue = YesNoType.no; - } - else - { - if (("yes" == value)) - { - parsedValue = YesNoType.yes; - } - else - { - parsedValue = YesNoType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Parses a YesNoDefaultType from a string. - /// - public static YesNoDefaultType ParseYesNoDefaultType(string value) - { - YesNoDefaultType parsedValue; - Enums.TryParseYesNoDefaultType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a YesNoDefaultType from a string. - /// - public static bool TryParseYesNoDefaultType(string value, out YesNoDefaultType parsedValue) - { - parsedValue = YesNoDefaultType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("default" == value)) - { - parsedValue = YesNoDefaultType.@default; - } - else - { - if (("no" == value)) - { - parsedValue = YesNoDefaultType.no; - } - else - { - if (("yes" == value)) - { - parsedValue = YesNoDefaultType.yes; - } - else - { - parsedValue = YesNoDefaultType.IllegalValue; - return false; - } - } - } - return true; - } - } - - /// - /// Values of this type will either be "default", "yes", or "no". - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum YesNoDefaultType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - @default, - - no, - - yes, - } - - /// - /// 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. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebDirProperties : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private YesNoType readField; - - private bool readFieldSet; - - private YesNoType writeField; - - private bool writeFieldSet; - - private YesNoType scriptField; - - private bool scriptFieldSet; - - private YesNoType executeField; - - private bool executeFieldSet; - - private YesNoType anonymousAccessField; - - private bool anonymousAccessFieldSet; - - private string anonymousUserField; - - private bool anonymousUserFieldSet; - - private YesNoType iIsControlledPasswordField; - - private bool iIsControlledPasswordFieldSet; - - private YesNoType windowsAuthenticationField; - - private bool windowsAuthenticationFieldSet; - - private YesNoType digestAuthenticationField; - - private bool digestAuthenticationFieldSet; - - private YesNoType basicAuthenticationField; - - private bool basicAuthenticationFieldSet; - - private YesNoType passportAuthenticationField; - - private bool passportAuthenticationFieldSet; - - private YesNoType logVisitsField; - - private bool logVisitsFieldSet; - - private YesNoType indexField; - - private bool indexFieldSet; - - private string defaultDocumentsField; - - private bool defaultDocumentsFieldSet; - - private YesNoType aspDetailedErrorField; - - private bool aspDetailedErrorFieldSet; - - private string httpExpiresField; - - private bool httpExpiresFieldSet; - - private long cacheControlMaxAgeField; - - private bool cacheControlMaxAgeFieldSet; - - private string cacheControlCustomField; - - private bool cacheControlCustomFieldSet; - - private YesNoType clearCustomErrorField; - - private bool clearCustomErrorFieldSet; - - private YesNoType accessSSLField; - - private bool accessSSLFieldSet; - - private YesNoType accessSSL128Field; - - private bool accessSSL128FieldSet; - - private YesNoType accessSSLMapCertField; - - private bool accessSSLMapCertFieldSet; - - private YesNoType accessSSLNegotiateCertField; - - private bool accessSSLNegotiateCertFieldSet; - - private YesNoType accessSSLRequireCertField; - - private bool accessSSLRequireCertFieldSet; - - private string authenticationProvidersField; - - private bool authenticationProvidersFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public YesNoType Read - { - get - { - return this.readField; - } - set - { - this.readFieldSet = true; - this.readField = value; - } - } - - public YesNoType Write - { - get - { - return this.writeField; - } - set - { - this.writeFieldSet = true; - this.writeField = value; - } - } - - public YesNoType Script - { - get - { - return this.scriptField; - } - set - { - this.scriptFieldSet = true; - this.scriptField = value; - } - } - - public YesNoType Execute - { - get - { - return this.executeField; - } - set - { - this.executeFieldSet = true; - this.executeField = value; - } - } - - /// - /// 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.' - /// - public YesNoType AnonymousAccess - { - get - { - return this.anonymousAccessField; - } - set - { - this.anonymousAccessFieldSet = true; - this.anonymousAccessField = value; - } - } - - /// - /// 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. - /// - public string AnonymousUser - { - get - { - return this.anonymousUserField; - } - set - { - this.anonymousUserFieldSet = true; - this.anonymousUserField = value; - } - } - - /// - /// Sets whether IIS should control the password used for the Windows account specified in the AnonymousUser attribute. Defaults to 'no.' - /// - public YesNoType IIsControlledPassword - { - get - { - return this.iIsControlledPasswordField; - } - set - { - this.iIsControlledPasswordFieldSet = true; - this.iIsControlledPasswordField = value; - } - } - - /// - /// Sets the Windows Authentication option, which enables integrated Windows authentication to be used on the site. Defaults to 'no.' - /// - public YesNoType WindowsAuthentication - { - get - { - return this.windowsAuthenticationField; - } - set - { - this.windowsAuthenticationFieldSet = true; - this.windowsAuthenticationField = value; - } - } - - /// - /// Sets the Digest Authentication option, which allows using digest authentication with domain user accounts. Defaults to 'no.' - /// - public YesNoType DigestAuthentication - { - get - { - return this.digestAuthenticationField; - } - set - { - this.digestAuthenticationFieldSet = true; - this.digestAuthenticationField = value; - } - } - - /// - /// Sets the Basic Authentication option, which allows clients to provide credentials in plaintext over the wire. Defaults to 'no.' - /// - public YesNoType BasicAuthentication - { - get - { - return this.basicAuthenticationField; - } - set - { - this.basicAuthenticationFieldSet = true; - this.basicAuthenticationField = value; - } - } - - /// - /// Sets the Passport Authentication option, which allows clients to provide credentials via a .Net Passport account. Defaults to 'no.' - /// - public YesNoType PassportAuthentication - { - get - { - return this.passportAuthenticationField; - } - set - { - this.passportAuthenticationFieldSet = true; - this.passportAuthenticationField = value; - } - } - - /// - /// Sets whether visits to this site should be logged. Defaults to 'no.' - /// - public YesNoType LogVisits - { - get - { - return this.logVisitsField; - } - set - { - this.logVisitsFieldSet = true; - this.logVisitsField = value; - } - } - - /// - /// Sets the Index Resource option, which specifies whether this web directory should be indexed. Defaults to 'no.' - /// - public YesNoType Index - { - get - { - return this.indexField; - } - set - { - this.indexFieldSet = true; - this.indexField = value; - } - } - - /// - /// The list of default documents to set for this web directory, in comma-delimited format. - /// - public string DefaultDocuments - { - get - { - return this.defaultDocumentsField; - } - set - { - this.defaultDocumentsFieldSet = true; - this.defaultDocumentsField = value; - } - } - - /// - /// Sets the option for whether to send detailed ASP errors back to the client on script error. Default is 'no.' - /// - public YesNoType AspDetailedError - { - get - { - return this.aspDetailedErrorField; - } - set - { - this.aspDetailedErrorFieldSet = true; - this.aspDetailedErrorField = value; - } - } - - /// - /// Value to set the HttpExpires attribute to for a Web Dir in the metabase. - /// - public string HttpExpires - { - get - { - return this.httpExpiresField; - } - set - { - this.httpExpiresFieldSet = true; - this.httpExpiresField = value; - } - } - - /// - /// Integer value specifying the cache control maximum age value. - /// - public long CacheControlMaxAge - { - get - { - return this.cacheControlMaxAgeField; - } - set - { - this.cacheControlMaxAgeFieldSet = true; - this.cacheControlMaxAgeField = value; - } - } - - /// - /// Custom HTTP 1.1 cache control directives. - /// - public string CacheControlCustom - { - get - { - return this.cacheControlCustomField; - } - set - { - this.cacheControlCustomFieldSet = true; - this.cacheControlCustomField = value; - } - } - - /// - /// Specifies whether IIs will return custom errors for this directory. - /// - public YesNoType ClearCustomError - { - get - { - return this.clearCustomErrorField; - } - set - { - this.clearCustomErrorFieldSet = true; - this.clearCustomErrorField = value; - } - } - - /// - /// 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. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public YesNoType AccessSSL - { - get - { - return this.accessSSLField; - } - set - { - this.accessSSLFieldSet = true; - this.accessSSLField = value; - } - } - - /// - /// 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. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public YesNoType AccessSSL128 - { - get - { - return this.accessSSL128Field; - } - set - { - this.accessSSL128FieldSet = true; - this.accessSSL128Field = value; - } - } - - /// - /// This corresponds to AccessSSLMapCert flag for AccessSSLFlags IIS metabase property. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public YesNoType AccessSSLMapCert - { - get - { - return this.accessSSLMapCertField; - } - set - { - this.accessSSLMapCertFieldSet = true; - this.accessSSLMapCertField = value; - } - } - - /// - /// This corresponds to AccessSSLNegotiateCert flag for AccessSSLFlags IIS metabase property. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public YesNoType AccessSSLNegotiateCert - { - get - { - return this.accessSSLNegotiateCertField; - } - set - { - this.accessSSLNegotiateCertFieldSet = true; - this.accessSSLNegotiateCertField = value; - } - } - - /// - /// This corresponds to AccessSSLRequireCert flag for AccessSSLFlags IIS metabase property. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public YesNoType AccessSSLRequireCert - { - get - { - return this.accessSSLRequireCertField; - } - set - { - this.accessSSLRequireCertFieldSet = true; - this.accessSSLRequireCertField = value; - } - } - - /// - /// Comma delimited list, in order of precedence, of Windows authentication providers that IIS will attempt to use: NTLM, Kerberos, Negotiate, and others. - /// - public string AuthenticationProviders - { - get - { - return this.authenticationProvidersField; - } - set - { - this.authenticationProvidersFieldSet = true; - this.authenticationProvidersField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebDirProperties", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.readFieldSet) - { - if ((this.readField == YesNoType.no)) - { - writer.WriteAttributeString("Read", "no"); - } - if ((this.readField == YesNoType.yes)) - { - writer.WriteAttributeString("Read", "yes"); - } - } - if (this.writeFieldSet) - { - if ((this.writeField == YesNoType.no)) - { - writer.WriteAttributeString("Write", "no"); - } - if ((this.writeField == YesNoType.yes)) - { - writer.WriteAttributeString("Write", "yes"); - } - } - if (this.scriptFieldSet) - { - if ((this.scriptField == YesNoType.no)) - { - writer.WriteAttributeString("Script", "no"); - } - if ((this.scriptField == YesNoType.yes)) - { - writer.WriteAttributeString("Script", "yes"); - } - } - if (this.executeFieldSet) - { - if ((this.executeField == YesNoType.no)) - { - writer.WriteAttributeString("Execute", "no"); - } - if ((this.executeField == YesNoType.yes)) - { - writer.WriteAttributeString("Execute", "yes"); - } - } - if (this.anonymousAccessFieldSet) - { - if ((this.anonymousAccessField == YesNoType.no)) - { - writer.WriteAttributeString("AnonymousAccess", "no"); - } - if ((this.anonymousAccessField == YesNoType.yes)) - { - writer.WriteAttributeString("AnonymousAccess", "yes"); - } - } - if (this.anonymousUserFieldSet) - { - writer.WriteAttributeString("AnonymousUser", this.anonymousUserField); - } - if (this.iIsControlledPasswordFieldSet) - { - if ((this.iIsControlledPasswordField == YesNoType.no)) - { - writer.WriteAttributeString("IIsControlledPassword", "no"); - } - if ((this.iIsControlledPasswordField == YesNoType.yes)) - { - writer.WriteAttributeString("IIsControlledPassword", "yes"); - } - } - if (this.windowsAuthenticationFieldSet) - { - if ((this.windowsAuthenticationField == YesNoType.no)) - { - writer.WriteAttributeString("WindowsAuthentication", "no"); - } - if ((this.windowsAuthenticationField == YesNoType.yes)) - { - writer.WriteAttributeString("WindowsAuthentication", "yes"); - } - } - if (this.digestAuthenticationFieldSet) - { - if ((this.digestAuthenticationField == YesNoType.no)) - { - writer.WriteAttributeString("DigestAuthentication", "no"); - } - if ((this.digestAuthenticationField == YesNoType.yes)) - { - writer.WriteAttributeString("DigestAuthentication", "yes"); - } - } - if (this.basicAuthenticationFieldSet) - { - if ((this.basicAuthenticationField == YesNoType.no)) - { - writer.WriteAttributeString("BasicAuthentication", "no"); - } - if ((this.basicAuthenticationField == YesNoType.yes)) - { - writer.WriteAttributeString("BasicAuthentication", "yes"); - } - } - if (this.passportAuthenticationFieldSet) - { - if ((this.passportAuthenticationField == YesNoType.no)) - { - writer.WriteAttributeString("PassportAuthentication", "no"); - } - if ((this.passportAuthenticationField == YesNoType.yes)) - { - writer.WriteAttributeString("PassportAuthentication", "yes"); - } - } - if (this.logVisitsFieldSet) - { - if ((this.logVisitsField == YesNoType.no)) - { - writer.WriteAttributeString("LogVisits", "no"); - } - if ((this.logVisitsField == YesNoType.yes)) - { - writer.WriteAttributeString("LogVisits", "yes"); - } - } - if (this.indexFieldSet) - { - if ((this.indexField == YesNoType.no)) - { - writer.WriteAttributeString("Index", "no"); - } - if ((this.indexField == YesNoType.yes)) - { - writer.WriteAttributeString("Index", "yes"); - } - } - if (this.defaultDocumentsFieldSet) - { - writer.WriteAttributeString("DefaultDocuments", this.defaultDocumentsField); - } - if (this.aspDetailedErrorFieldSet) - { - if ((this.aspDetailedErrorField == YesNoType.no)) - { - writer.WriteAttributeString("AspDetailedError", "no"); - } - if ((this.aspDetailedErrorField == YesNoType.yes)) - { - writer.WriteAttributeString("AspDetailedError", "yes"); - } - } - if (this.httpExpiresFieldSet) - { - writer.WriteAttributeString("HttpExpires", this.httpExpiresField); - } - if (this.cacheControlMaxAgeFieldSet) - { - writer.WriteAttributeString("CacheControlMaxAge", this.cacheControlMaxAgeField.ToString(CultureInfo.InvariantCulture)); - } - if (this.cacheControlCustomFieldSet) - { - writer.WriteAttributeString("CacheControlCustom", this.cacheControlCustomField); - } - if (this.clearCustomErrorFieldSet) - { - if ((this.clearCustomErrorField == YesNoType.no)) - { - writer.WriteAttributeString("ClearCustomError", "no"); - } - if ((this.clearCustomErrorField == YesNoType.yes)) - { - writer.WriteAttributeString("ClearCustomError", "yes"); - } - } - if (this.accessSSLFieldSet) - { - if ((this.accessSSLField == YesNoType.no)) - { - writer.WriteAttributeString("AccessSSL", "no"); - } - if ((this.accessSSLField == YesNoType.yes)) - { - writer.WriteAttributeString("AccessSSL", "yes"); - } - } - if (this.accessSSL128FieldSet) - { - if ((this.accessSSL128Field == YesNoType.no)) - { - writer.WriteAttributeString("AccessSSL128", "no"); - } - if ((this.accessSSL128Field == YesNoType.yes)) - { - writer.WriteAttributeString("AccessSSL128", "yes"); - } - } - if (this.accessSSLMapCertFieldSet) - { - if ((this.accessSSLMapCertField == YesNoType.no)) - { - writer.WriteAttributeString("AccessSSLMapCert", "no"); - } - if ((this.accessSSLMapCertField == YesNoType.yes)) - { - writer.WriteAttributeString("AccessSSLMapCert", "yes"); - } - } - if (this.accessSSLNegotiateCertFieldSet) - { - if ((this.accessSSLNegotiateCertField == YesNoType.no)) - { - writer.WriteAttributeString("AccessSSLNegotiateCert", "no"); - } - if ((this.accessSSLNegotiateCertField == YesNoType.yes)) - { - writer.WriteAttributeString("AccessSSLNegotiateCert", "yes"); - } - } - if (this.accessSSLRequireCertFieldSet) - { - if ((this.accessSSLRequireCertField == YesNoType.no)) - { - writer.WriteAttributeString("AccessSSLRequireCert", "no"); - } - if ((this.accessSSLRequireCertField == YesNoType.yes)) - { - writer.WriteAttributeString("AccessSSLRequireCert", "yes"); - } - } - if (this.authenticationProvidersFieldSet) - { - writer.WriteAttributeString("AuthenticationProviders", this.authenticationProvidersField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Read" == name)) - { - this.readField = Enums.ParseYesNoType(value); - this.readFieldSet = true; - } - if (("Write" == name)) - { - this.writeField = Enums.ParseYesNoType(value); - this.writeFieldSet = true; - } - if (("Script" == name)) - { - this.scriptField = Enums.ParseYesNoType(value); - this.scriptFieldSet = true; - } - if (("Execute" == name)) - { - this.executeField = Enums.ParseYesNoType(value); - this.executeFieldSet = true; - } - if (("AnonymousAccess" == name)) - { - this.anonymousAccessField = Enums.ParseYesNoType(value); - this.anonymousAccessFieldSet = true; - } - if (("AnonymousUser" == name)) - { - this.anonymousUserField = value; - this.anonymousUserFieldSet = true; - } - if (("IIsControlledPassword" == name)) - { - this.iIsControlledPasswordField = Enums.ParseYesNoType(value); - this.iIsControlledPasswordFieldSet = true; - } - if (("WindowsAuthentication" == name)) - { - this.windowsAuthenticationField = Enums.ParseYesNoType(value); - this.windowsAuthenticationFieldSet = true; - } - if (("DigestAuthentication" == name)) - { - this.digestAuthenticationField = Enums.ParseYesNoType(value); - this.digestAuthenticationFieldSet = true; - } - if (("BasicAuthentication" == name)) - { - this.basicAuthenticationField = Enums.ParseYesNoType(value); - this.basicAuthenticationFieldSet = true; - } - if (("PassportAuthentication" == name)) - { - this.passportAuthenticationField = Enums.ParseYesNoType(value); - this.passportAuthenticationFieldSet = true; - } - if (("LogVisits" == name)) - { - this.logVisitsField = Enums.ParseYesNoType(value); - this.logVisitsFieldSet = true; - } - if (("Index" == name)) - { - this.indexField = Enums.ParseYesNoType(value); - this.indexFieldSet = true; - } - if (("DefaultDocuments" == name)) - { - this.defaultDocumentsField = value; - this.defaultDocumentsFieldSet = true; - } - if (("AspDetailedError" == name)) - { - this.aspDetailedErrorField = Enums.ParseYesNoType(value); - this.aspDetailedErrorFieldSet = true; - } - if (("HttpExpires" == name)) - { - this.httpExpiresField = value; - this.httpExpiresFieldSet = true; - } - if (("CacheControlMaxAge" == name)) - { - this.cacheControlMaxAgeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.cacheControlMaxAgeFieldSet = true; - } - if (("CacheControlCustom" == name)) - { - this.cacheControlCustomField = value; - this.cacheControlCustomFieldSet = true; - } - if (("ClearCustomError" == name)) - { - this.clearCustomErrorField = Enums.ParseYesNoType(value); - this.clearCustomErrorFieldSet = true; - } - if (("AccessSSL" == name)) - { - this.accessSSLField = Enums.ParseYesNoType(value); - this.accessSSLFieldSet = true; - } - if (("AccessSSL128" == name)) - { - this.accessSSL128Field = Enums.ParseYesNoType(value); - this.accessSSL128FieldSet = true; - } - if (("AccessSSLMapCert" == name)) - { - this.accessSSLMapCertField = Enums.ParseYesNoType(value); - this.accessSSLMapCertFieldSet = true; - } - if (("AccessSSLNegotiateCert" == name)) - { - this.accessSSLNegotiateCertField = Enums.ParseYesNoType(value); - this.accessSSLNegotiateCertFieldSet = true; - } - if (("AccessSSLRequireCert" == name)) - { - this.accessSSLRequireCertField = Enums.ParseYesNoType(value); - this.accessSSLRequireCertFieldSet = true; - } - if (("AuthenticationProviders" == name)) - { - this.authenticationProvidersField = value; - this.authenticationProvidersFieldSet = true; - } - } - } - - /// - /// Custom Web Errors used by WebSites and Virtual Directories. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebError : ISchemaElement, ISetAttributes - { - - private int errorCodeField; - - private bool errorCodeFieldSet; - - private int subCodeField; - - private bool subCodeFieldSet; - - private string fileField; - - private bool fileFieldSet; - - private string uRLField; - - private bool uRLFieldSet; - - private ISchemaElement parentElement; - - /// - /// HTTP 1.1 error code. - /// - public int ErrorCode - { - get - { - return this.errorCodeField; - } - set - { - this.errorCodeFieldSet = true; - this.errorCodeField = value; - } - } - - /// - /// Error sub code. Set to 0 to get the wild card "*". - /// - public int SubCode - { - get - { - return this.subCodeField; - } - set - { - this.subCodeFieldSet = true; - this.subCodeField = value; - } - } - - /// - /// File to be sent to the client for this error code and sub code. This can be formatted. For example: [#FileId]. - /// - public string File - { - get - { - return this.fileField; - } - set - { - this.fileFieldSet = true; - this.fileField = value; - } - } - - /// - /// URL to be sent to the client for this error code and sub code. This can be formatted. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public string URL - { - get - { - return this.uRLField; - } - set - { - this.uRLFieldSet = true; - this.uRLField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebError", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.errorCodeFieldSet) - { - writer.WriteAttributeString("ErrorCode", this.errorCodeField.ToString(CultureInfo.InvariantCulture)); - } - if (this.subCodeFieldSet) - { - writer.WriteAttributeString("SubCode", this.subCodeField.ToString(CultureInfo.InvariantCulture)); - } - if (this.fileFieldSet) - { - writer.WriteAttributeString("File", this.fileField); - } - if (this.uRLFieldSet) - { - writer.WriteAttributeString("URL", this.uRLField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("ErrorCode" == name)) - { - this.errorCodeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.errorCodeFieldSet = true; - } - if (("SubCode" == name)) - { - this.subCodeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.subCodeFieldSet = true; - } - if (("File" == name)) - { - this.fileField = value; - this.fileFieldSet = true; - } - if (("URL" == name)) - { - this.uRLField = value; - this.uRLFieldSet = true; - } - } - } - - /// - /// Custom HTTP Header definition for IIS resources such as WebSite and WebVirtualDir. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class HttpHeader : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary key for custom HTTP Header entry. This will default to the Name attribute. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the custom HTTP Header. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// 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 - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("HttpHeader", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - } - - /// - /// MimeMap definition for IIS resources. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class MimeMap : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string typeField; - - private bool typeFieldSet; - - private string extensionField; - - private bool extensionFieldSet; - - private ISchemaElement parentElement; - - /// - /// Id for the MimeMap. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Mime-type covered by the MimeMap. - /// - public string Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - /// - /// Extension covered by the MimeMap. Must begin with a dot. - /// - public string Extension - { - get - { - return this.extensionField; - } - set - { - this.extensionFieldSet = true; - this.extensionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MimeMap", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.typeFieldSet) - { - writer.WriteAttributeString("Type", this.typeField); - } - if (this.extensionFieldSet) - { - writer.WriteAttributeString("Extension", this.extensionField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = value; - this.typeFieldSet = true; - } - if (("Extension" == name)) - { - this.extensionField = value; - this.extensionFieldSet = true; - } - } - } - - /// - /// IIs Filter for a Component - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebFilter : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string pathField; - - private bool pathFieldSet; - - private string webSiteField; - - private bool webSiteFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private int flagsField; - - private bool flagsFieldSet; - - private string loadOrderField; - - private bool loadOrderFieldSet; - - private ISchemaElement parentElement; - - /// - /// The unique Id for the web filter. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The name of the filter to be used in IIS. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The path of the filter executable file. - /// This should usually be a value like '[!FileId]', where 'FileId' is the file identifier - /// of the filter executable file. - /// - public string Path - { - get - { - return this.pathField; - } - set - { - this.pathFieldSet = true; - this.pathField = value; - } - } - - /// - /// Specifies the parent website for this filter (if there is one). - /// If this is a global filter, then this attribute should not be specified. - /// - public string WebSite - { - get - { - return this.webSiteField; - } - set - { - this.webSiteFieldSet = true; - this.webSiteField = value; - } - } - - /// - /// Description of the filter. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Sets the MD_FILTER_FLAGS metabase key for the filter. This must be an integer. See MSDN 'FilterFlags' documentation for more details. - /// - public int Flags - { - get - { - return this.flagsField; - } - set - { - this.flagsFieldSet = true; - this.flagsField = value; - } - } - - /// - /// The legal values are "first", "last", or a number. - /// If a number is specified, it must be greater than 0. - /// - public string LoadOrder - { - get - { - return this.loadOrderField; - } - set - { - this.loadOrderFieldSet = true; - this.loadOrderField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebFilter", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.pathFieldSet) - { - writer.WriteAttributeString("Path", this.pathField); - } - if (this.webSiteFieldSet) - { - writer.WriteAttributeString("WebSite", this.webSiteField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.flagsFieldSet) - { - writer.WriteAttributeString("Flags", this.flagsField.ToString(CultureInfo.InvariantCulture)); - } - if (this.loadOrderFieldSet) - { - writer.WriteAttributeString("LoadOrder", this.loadOrderField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Path" == name)) - { - this.pathField = value; - this.pathFieldSet = true; - } - if (("WebSite" == name)) - { - this.webSiteField = value; - this.webSiteFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("Flags" == name)) - { - this.flagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.flagsFieldSet = true; - } - if (("LoadOrder" == name)) - { - this.loadOrderField = value; - this.loadOrderFieldSet = true; - } - } - } - - /// - /// Extension for WebApplication - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebApplicationExtension : ISchemaElement, ISetAttributes - { - - private string executableField; - - private bool executableFieldSet; - - private string extensionField; - - private bool extensionFieldSet; - - private string verbsField; - - private bool verbsFieldSet; - - private YesNoType scriptField; - - private bool scriptFieldSet; - - private YesNoType checkPathField; - - private bool checkPathFieldSet; - - private ISchemaElement parentElement; - - /// - /// usually a Property that resolves to short file name path - /// - public string Executable - { - get - { - return this.executableField; - } - set - { - this.executableFieldSet = true; - this.executableField = value; - } - } - - /// - /// 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. - /// - public string Extension - { - get - { - return this.extensionField; - } - set - { - this.extensionFieldSet = true; - this.extensionField = value; - } - } - - public string Verbs - { - get - { - return this.verbsField; - } - set - { - this.verbsFieldSet = true; - this.verbsField = value; - } - } - - public YesNoType Script - { - get - { - return this.scriptField; - } - set - { - this.scriptFieldSet = true; - this.scriptField = value; - } - } - - public YesNoType CheckPath - { - get - { - return this.checkPathField; - } - set - { - this.checkPathFieldSet = true; - this.checkPathField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebApplicationExtension", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.executableFieldSet) - { - writer.WriteAttributeString("Executable", this.executableField); - } - if (this.extensionFieldSet) - { - writer.WriteAttributeString("Extension", this.extensionField); - } - if (this.verbsFieldSet) - { - writer.WriteAttributeString("Verbs", this.verbsField); - } - if (this.scriptFieldSet) - { - if ((this.scriptField == YesNoType.no)) - { - writer.WriteAttributeString("Script", "no"); - } - if ((this.scriptField == YesNoType.yes)) - { - writer.WriteAttributeString("Script", "yes"); - } - } - if (this.checkPathFieldSet) - { - if ((this.checkPathField == YesNoType.no)) - { - writer.WriteAttributeString("CheckPath", "no"); - } - if ((this.checkPathField == YesNoType.yes)) - { - writer.WriteAttributeString("CheckPath", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Executable" == name)) - { - this.executableField = value; - this.executableFieldSet = true; - } - if (("Extension" == name)) - { - this.extensionField = value; - this.extensionFieldSet = true; - } - if (("Verbs" == name)) - { - this.verbsField = value; - this.verbsFieldSet = true; - } - if (("Script" == name)) - { - this.scriptField = Enums.ParseYesNoType(value); - this.scriptFieldSet = true; - } - if (("CheckPath" == name)) - { - this.checkPathField = Enums.ParseYesNoType(value); - this.checkPathFieldSet = true; - } - } - } - - /// - /// IIS6 Application Pool - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebAppPool : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string userField; - - private bool userFieldSet; - - private int recycleMinutesField; - - private bool recycleMinutesFieldSet; - - private int recycleRequestsField; - - private bool recycleRequestsFieldSet; - - private int virtualMemoryField; - - private bool virtualMemoryFieldSet; - - private int privateMemoryField; - - private bool privateMemoryFieldSet; - - private int idleTimeoutField; - - private bool idleTimeoutFieldSet; - - private int queueLimitField; - - private bool queueLimitFieldSet; - - private long maxCpuUsageField; - - private bool maxCpuUsageFieldSet; - - private int refreshCpuField; - - private bool refreshCpuFieldSet; - - private CpuActionType cpuActionField; - - private bool cpuActionFieldSet; - - private int maxWorkerProcessesField; - - private bool maxWorkerProcessesFieldSet; - - private IdentityType identityField; - - private bool identityFieldSet; - - private string managedPipelineModeField; - - private bool managedPipelineModeFieldSet; - - private string managedRuntimeVersionField; - - private bool managedRuntimeVersionFieldSet; - - private ISchemaElement parentElement; - - public WebAppPool() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RecycleTime))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Id of the AppPool. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the AppPool to be shown in IIs. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// User account to run the AppPool as. To use this, you must set the Identity attribute to 'other'. - /// - public string User - { - get - { - return this.userField; - } - set - { - this.userFieldSet = true; - this.userField = value; - } - } - - /// - /// How often, in minutes, you want the AppPool to be recycled. - /// - public int RecycleMinutes - { - get - { - return this.recycleMinutesField; - } - set - { - this.recycleMinutesFieldSet = true; - this.recycleMinutesField = value; - } - } - - /// - /// How often, in requests, you want the AppPool to be recycled. - /// - public int RecycleRequests - { - get - { - return this.recycleRequestsField; - } - set - { - this.recycleRequestsFieldSet = true; - this.recycleRequestsField = value; - } - } - - /// - /// 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. - /// - public int VirtualMemory - { - get - { - return this.virtualMemoryField; - } - set - { - this.virtualMemoryFieldSet = true; - this.virtualMemoryField = value; - } - } - - /// - /// 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. - /// - public int PrivateMemory - { - get - { - return this.privateMemoryField; - } - set - { - this.privateMemoryFieldSet = true; - this.privateMemoryField = value; - } - } - - /// - /// Shutdown worker process after being idle for (time in minutes). - /// - public int IdleTimeout - { - get - { - return this.idleTimeoutField; - } - set - { - this.idleTimeoutFieldSet = true; - this.idleTimeoutField = value; - } - } - - /// - /// Limit the kernel request queue (number of requests). - /// - public int QueueLimit - { - get - { - return this.queueLimitField; - } - set - { - this.queueLimitFieldSet = true; - this.queueLimitField = value; - } - } - - /// - /// Maximum CPU usage (percent). - /// - public long MaxCpuUsage - { - get - { - return this.maxCpuUsageField; - } - set - { - this.maxCpuUsageFieldSet = true; - this.maxCpuUsageField = value; - } - } - - /// - /// Refresh CPU usage numbers (in minutes). - /// - public int RefreshCpu - { - get - { - return this.refreshCpuField; - } - set - { - this.refreshCpuFieldSet = true; - this.refreshCpuField = value; - } - } - - /// - /// Action taken when CPU exceeds maximum CPU use (as defined with MaxCpuUsage and RefreshCpu). - /// - public CpuActionType CpuAction - { - get - { - return this.cpuActionField; - } - set - { - this.cpuActionFieldSet = true; - this.cpuActionField = value; - } - } - - /// - /// Maximum number of worker processes. - /// - public int MaxWorkerProcesses - { - get - { - return this.maxWorkerProcessesField; - } - set - { - this.maxWorkerProcessesFieldSet = true; - this.maxWorkerProcessesField = value; - } - } - - /// - /// 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. - /// - public IdentityType Identity - { - get - { - return this.identityField; - } - set - { - this.identityFieldSet = true; - this.identityField = value; - } - } - - /// - /// Specifies the request-processing mode that is used to process requests for managed content. Only available on IIS7, ignored on IIS6. - /// See - /// - public string ManagedPipelineMode - { - get - { - return this.managedPipelineModeField; - } - set - { - this.managedPipelineModeFieldSet = true; - this.managedPipelineModeField = value; - } - } - - /// - /// Specifies the .NET Framework version to be used by the application pool. Only available on IIS7, ignored on IIS6. - /// See - /// - public string ManagedRuntimeVersion - { - get - { - return this.managedRuntimeVersionField; - } - set - { - this.managedRuntimeVersionFieldSet = true; - this.managedRuntimeVersionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("RecycleTime" == childName)) - { - childValue = new RecycleTime(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a CpuActionType from a string. - /// - public static CpuActionType ParseCpuActionType(string value) - { - CpuActionType parsedValue; - WebAppPool.TryParseCpuActionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a CpuActionType from a string. - /// - public static bool TryParseCpuActionType(string value, out CpuActionType parsedValue) - { - parsedValue = CpuActionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("none" == value)) - { - parsedValue = CpuActionType.none; - } - else - { - if (("shutdown" == value)) - { - parsedValue = CpuActionType.shutdown; - } - else - { - parsedValue = CpuActionType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Parses a IdentityType from a string. - /// - public static IdentityType ParseIdentityType(string value) - { - IdentityType parsedValue; - WebAppPool.TryParseIdentityType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a IdentityType from a string. - /// - public static bool TryParseIdentityType(string value, out IdentityType parsedValue) - { - parsedValue = IdentityType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("networkService" == value)) - { - parsedValue = IdentityType.networkService; - } - else - { - if (("localService" == value)) - { - parsedValue = IdentityType.localService; - } - else - { - if (("localSystem" == value)) - { - parsedValue = IdentityType.localSystem; - } - else - { - if (("other" == value)) - { - parsedValue = IdentityType.other; - } - else - { - if (("applicationPoolIdentity" == value)) - { - parsedValue = IdentityType.applicationPoolIdentity; - } - else - { - parsedValue = IdentityType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebAppPool", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.userFieldSet) - { - writer.WriteAttributeString("User", this.userField); - } - if (this.recycleMinutesFieldSet) - { - writer.WriteAttributeString("RecycleMinutes", this.recycleMinutesField.ToString(CultureInfo.InvariantCulture)); - } - if (this.recycleRequestsFieldSet) - { - writer.WriteAttributeString("RecycleRequests", this.recycleRequestsField.ToString(CultureInfo.InvariantCulture)); - } - if (this.virtualMemoryFieldSet) - { - writer.WriteAttributeString("VirtualMemory", this.virtualMemoryField.ToString(CultureInfo.InvariantCulture)); - } - if (this.privateMemoryFieldSet) - { - writer.WriteAttributeString("PrivateMemory", this.privateMemoryField.ToString(CultureInfo.InvariantCulture)); - } - if (this.idleTimeoutFieldSet) - { - writer.WriteAttributeString("IdleTimeout", this.idleTimeoutField.ToString(CultureInfo.InvariantCulture)); - } - if (this.queueLimitFieldSet) - { - writer.WriteAttributeString("QueueLimit", this.queueLimitField.ToString(CultureInfo.InvariantCulture)); - } - if (this.maxCpuUsageFieldSet) - { - writer.WriteAttributeString("MaxCpuUsage", this.maxCpuUsageField.ToString(CultureInfo.InvariantCulture)); - } - if (this.refreshCpuFieldSet) - { - writer.WriteAttributeString("RefreshCpu", this.refreshCpuField.ToString(CultureInfo.InvariantCulture)); - } - if (this.cpuActionFieldSet) - { - if ((this.cpuActionField == CpuActionType.none)) - { - writer.WriteAttributeString("CpuAction", "none"); - } - if ((this.cpuActionField == CpuActionType.shutdown)) - { - writer.WriteAttributeString("CpuAction", "shutdown"); - } - } - if (this.maxWorkerProcessesFieldSet) - { - writer.WriteAttributeString("MaxWorkerProcesses", this.maxWorkerProcessesField.ToString(CultureInfo.InvariantCulture)); - } - if (this.identityFieldSet) - { - if ((this.identityField == IdentityType.networkService)) - { - writer.WriteAttributeString("Identity", "networkService"); - } - if ((this.identityField == IdentityType.localService)) - { - writer.WriteAttributeString("Identity", "localService"); - } - if ((this.identityField == IdentityType.localSystem)) - { - writer.WriteAttributeString("Identity", "localSystem"); - } - if ((this.identityField == IdentityType.other)) - { - writer.WriteAttributeString("Identity", "other"); - } - if ((this.identityField == IdentityType.applicationPoolIdentity)) - { - writer.WriteAttributeString("Identity", "applicationPoolIdentity"); - } - } - if (this.managedPipelineModeFieldSet) - { - writer.WriteAttributeString("ManagedPipelineMode", this.managedPipelineModeField); - } - if (this.managedRuntimeVersionFieldSet) - { - writer.WriteAttributeString("ManagedRuntimeVersion", this.managedRuntimeVersionField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("User" == name)) - { - this.userField = value; - this.userFieldSet = true; - } - if (("RecycleMinutes" == name)) - { - this.recycleMinutesField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.recycleMinutesFieldSet = true; - } - if (("RecycleRequests" == name)) - { - this.recycleRequestsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.recycleRequestsFieldSet = true; - } - if (("VirtualMemory" == name)) - { - this.virtualMemoryField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.virtualMemoryFieldSet = true; - } - if (("PrivateMemory" == name)) - { - this.privateMemoryField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.privateMemoryFieldSet = true; - } - if (("IdleTimeout" == name)) - { - this.idleTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.idleTimeoutFieldSet = true; - } - if (("QueueLimit" == name)) - { - this.queueLimitField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.queueLimitFieldSet = true; - } - if (("MaxCpuUsage" == name)) - { - this.maxCpuUsageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.maxCpuUsageFieldSet = true; - } - if (("RefreshCpu" == name)) - { - this.refreshCpuField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.refreshCpuFieldSet = true; - } - if (("CpuAction" == name)) - { - this.cpuActionField = WebAppPool.ParseCpuActionType(value); - this.cpuActionFieldSet = true; - } - if (("MaxWorkerProcesses" == name)) - { - this.maxWorkerProcessesField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.maxWorkerProcessesFieldSet = true; - } - if (("Identity" == name)) - { - this.identityField = WebAppPool.ParseIdentityType(value); - this.identityFieldSet = true; - } - if (("ManagedPipelineMode" == name)) - { - this.managedPipelineModeField = value; - this.managedPipelineModeFieldSet = true; - } - if (("ManagedRuntimeVersion" == name)) - { - this.managedRuntimeVersionField = value; - this.managedRuntimeVersionFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum CpuActionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - none, - - shutdown, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum IdentityType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - networkService, - - localService, - - localSystem, - - other, - - applicationPoolIdentity, - } - } - - /// - /// IIS6 Application Pool Recycle Times on 24 hour clock. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class RecycleTime : ISchemaElement, ISetAttributes - { - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RecycleTime", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - } - - /// - /// Used to install and uninstall certificates. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class Certificate : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private StoreNameType storeNameField; - - private bool storeNameFieldSet; - - private StoreLocationType storeLocationField; - - private bool storeLocationFieldSet; - - private YesNoType overwriteField; - - private bool overwriteFieldSet; - - private YesNoType requestField; - - private bool requestFieldSet; - - private string binaryKeyField; - - private bool binaryKeyFieldSet; - - private string certificatePathField; - - private bool certificatePathFieldSet; - - private string pFXPasswordField; - - private bool pFXPasswordFieldSet; - - private ISchemaElement parentElement; - - /// - /// Unique identifier for this certificate in the installation package. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the certificate that will be installed or uninstalled in the specified store. - /// This attribute may be set via a formatted Property (e.g. [MyProperty]). - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - public StoreNameType StoreName - { - get - { - return this.storeNameField; - } - set - { - this.storeNameFieldSet = true; - this.storeNameField = value; - } - } - - public StoreLocationType StoreLocation - { - get - { - return this.storeLocationField; - } - set - { - this.storeLocationFieldSet = true; - this.storeLocationField = value; - } - } - - public YesNoType Overwrite - { - get - { - return this.overwriteField; - } - set - { - this.overwriteFieldSet = true; - this.overwriteField = value; - } - } - - /// - /// This attribute controls whether the CertificatePath attribute is a path to a certificate file (Request='no') or the - /// certificate authority to request the certificate from (Request='yes'). - /// - public YesNoType Request - { - get - { - return this.requestField; - } - set - { - this.requestFieldSet = true; - this.requestField = value; - } - } - - /// - /// Reference to a Binary element that will store the certificate as a stream inside the package. This attribute cannot be specified with - /// the CertificatePath attribute. - /// - public string BinaryKey - { - get - { - return this.binaryKeyField; - } - set - { - this.binaryKeyFieldSet = true; - this.binaryKeyField = value; - } - } - - /// - /// If the Request attribute is "no" then this attribute is the path to the certificate file outside of the package. - /// If the Request attribute is "yes" then this atribute is the certificate authority to request the certificate from. - /// This attribute may be set via a formatted Property (e.g. [MyProperty]). - /// - public string CertificatePath - { - get - { - return this.certificatePathField; - } - set - { - this.certificatePathFieldSet = true; - this.certificatePathField = value; - } - } - - /// - /// If the Binary stream or path to the file outside of the package is a password protected PFX file, the password for that - /// PFX must be specified here. This attribute may be set via a formatted Property (e.g. [MyProperty]). - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public string PFXPassword - { - get - { - return this.pFXPasswordField; - } - set - { - this.pFXPasswordFieldSet = true; - this.pFXPasswordField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a StoreNameType from a string. - /// - public static StoreNameType ParseStoreNameType(string value) - { - StoreNameType parsedValue; - Certificate.TryParseStoreNameType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a StoreNameType from a string. - /// - public static bool TryParseStoreNameType(string value, out StoreNameType parsedValue) - { - parsedValue = StoreNameType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("ca" == value)) - { - parsedValue = StoreNameType.ca; - } - else - { - if (("my" == value)) - { - parsedValue = StoreNameType.my; - } - else - { - if (("personal" == value)) - { - parsedValue = StoreNameType.personal; - } - else - { - if (("request" == value)) - { - parsedValue = StoreNameType.request; - } - else - { - if (("root" == value)) - { - parsedValue = StoreNameType.root; - } - else - { - if (("otherPeople" == value)) - { - parsedValue = StoreNameType.otherPeople; - } - else - { - if (("trustedPeople" == value)) - { - parsedValue = StoreNameType.trustedPeople; - } - else - { - if (("trustedPublisher" == value)) - { - parsedValue = StoreNameType.trustedPublisher; - } - else - { - parsedValue = StoreNameType.IllegalValue; - return false; - } - } - } - } - } - } - } - } - return true; - } - - /// - /// Parses a StoreLocationType from a string. - /// - public static StoreLocationType ParseStoreLocationType(string value) - { - StoreLocationType parsedValue; - Certificate.TryParseStoreLocationType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a StoreLocationType from a string. - /// - public static bool TryParseStoreLocationType(string value, out StoreLocationType parsedValue) - { - parsedValue = StoreLocationType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("currentUser" == value)) - { - parsedValue = StoreLocationType.currentUser; - } - else - { - if (("localMachine" == value)) - { - parsedValue = StoreLocationType.localMachine; - } - else - { - parsedValue = StoreLocationType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Certificate", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.storeNameFieldSet) - { - if ((this.storeNameField == StoreNameType.ca)) - { - writer.WriteAttributeString("StoreName", "ca"); - } - if ((this.storeNameField == StoreNameType.my)) - { - writer.WriteAttributeString("StoreName", "my"); - } - if ((this.storeNameField == StoreNameType.personal)) - { - writer.WriteAttributeString("StoreName", "personal"); - } - if ((this.storeNameField == StoreNameType.request)) - { - writer.WriteAttributeString("StoreName", "request"); - } - if ((this.storeNameField == StoreNameType.root)) - { - writer.WriteAttributeString("StoreName", "root"); - } - if ((this.storeNameField == StoreNameType.otherPeople)) - { - writer.WriteAttributeString("StoreName", "otherPeople"); - } - if ((this.storeNameField == StoreNameType.trustedPeople)) - { - writer.WriteAttributeString("StoreName", "trustedPeople"); - } - if ((this.storeNameField == StoreNameType.trustedPublisher)) - { - writer.WriteAttributeString("StoreName", "trustedPublisher"); - } - } - if (this.storeLocationFieldSet) - { - if ((this.storeLocationField == StoreLocationType.currentUser)) - { - writer.WriteAttributeString("StoreLocation", "currentUser"); - } - if ((this.storeLocationField == StoreLocationType.localMachine)) - { - writer.WriteAttributeString("StoreLocation", "localMachine"); - } - } - if (this.overwriteFieldSet) - { - if ((this.overwriteField == YesNoType.no)) - { - writer.WriteAttributeString("Overwrite", "no"); - } - if ((this.overwriteField == YesNoType.yes)) - { - writer.WriteAttributeString("Overwrite", "yes"); - } - } - if (this.requestFieldSet) - { - if ((this.requestField == YesNoType.no)) - { - writer.WriteAttributeString("Request", "no"); - } - if ((this.requestField == YesNoType.yes)) - { - writer.WriteAttributeString("Request", "yes"); - } - } - if (this.binaryKeyFieldSet) - { - writer.WriteAttributeString("BinaryKey", this.binaryKeyField); - } - if (this.certificatePathFieldSet) - { - writer.WriteAttributeString("CertificatePath", this.certificatePathField); - } - if (this.pFXPasswordFieldSet) - { - writer.WriteAttributeString("PFXPassword", this.pFXPasswordField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("StoreName" == name)) - { - this.storeNameField = Certificate.ParseStoreNameType(value); - this.storeNameFieldSet = true; - } - if (("StoreLocation" == name)) - { - this.storeLocationField = Certificate.ParseStoreLocationType(value); - this.storeLocationFieldSet = true; - } - if (("Overwrite" == name)) - { - this.overwriteField = Enums.ParseYesNoType(value); - this.overwriteFieldSet = true; - } - if (("Request" == name)) - { - this.requestField = Enums.ParseYesNoType(value); - this.requestFieldSet = true; - } - if (("BinaryKey" == name)) - { - this.binaryKeyField = value; - this.binaryKeyFieldSet = true; - } - if (("CertificatePath" == name)) - { - this.certificatePathField = value; - this.certificatePathFieldSet = true; - } - if (("PFXPassword" == name)) - { - this.pFXPasswordField = value; - this.pFXPasswordFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum StoreNameType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// 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. - /// - ca, - - /// - /// Use the "personal" value instead. - /// - my, - - /// - /// Contains personal certificates. These certificates will usually have an associated private key. This store is often - /// referred to as the "MY" certificate store. - /// - personal, - - request, - - /// - /// 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. - /// - root, - - /// - /// Contains the certificates of those that the user normally sends enveloped messages to or receives signed messages from. - /// See - /// - otherPeople, - - /// - /// Contains the certificates of those directly trusted people and resources. - /// See - /// - trustedPeople, - - /// - /// Contains the certificates of those publishers who are trusted. - /// See - /// - trustedPublisher, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum StoreLocationType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - currentUser, - - localMachine, - } - } - - /// - /// Associates a certificate with the parent WebSite. The Certificate element should be - /// in the same Component as the parent WebSite. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class CertificateRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the referenced Certificate. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CertificateRef", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// IIS Properties - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebProperty : ISchemaElement, ISetAttributes - { - - private IdType idField; - - private bool idFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - public IdType Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The value to be used for the WebProperty specified in the Id attribute. See - /// the remarks section for information on acceptable values for each Id. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a IdType from a string. - /// - public static IdType ParseIdType(string value) - { - IdType parsedValue; - WebProperty.TryParseIdType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a IdType from a string. - /// - public static bool TryParseIdType(string value, out IdType parsedValue) - { - parsedValue = IdType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("ETagChangeNumber" == value)) - { - parsedValue = IdType.ETagChangeNumber; - } - else - { - if (("IIs5IsolationMode" == value)) - { - parsedValue = IdType.IIs5IsolationMode; - } - else - { - if (("MaxGlobalBandwidth" == value)) - { - parsedValue = IdType.MaxGlobalBandwidth; - } - else - { - if (("LogInUTF8" == value)) - { - parsedValue = IdType.LogInUTF8; - } - else - { - parsedValue = IdType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebProperty", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - if ((this.idField == IdType.ETagChangeNumber)) - { - writer.WriteAttributeString("Id", "ETagChangeNumber"); - } - if ((this.idField == IdType.IIs5IsolationMode)) - { - writer.WriteAttributeString("Id", "IIs5IsolationMode"); - } - if ((this.idField == IdType.MaxGlobalBandwidth)) - { - writer.WriteAttributeString("Id", "MaxGlobalBandwidth"); - } - if ((this.idField == IdType.LogInUTF8)) - { - writer.WriteAttributeString("Id", "LogInUTF8"); - } - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = WebProperty.ParseIdType(value); - this.idFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum IdType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - ETagChangeNumber, - - IIs5IsolationMode, - - MaxGlobalBandwidth, - - LogInUTF8, - } - } - - /// - /// 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. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebApplication : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private IsolationType isolationField; - - private bool isolationFieldSet; - - private YesNoDefaultType allowSessionsField; - - private bool allowSessionsFieldSet; - - private int sessionTimeoutField; - - private bool sessionTimeoutFieldSet; - - private YesNoDefaultType bufferField; - - private bool bufferFieldSet; - - private YesNoDefaultType parentPathsField; - - private bool parentPathsFieldSet; - - private DefaultScriptType defaultScriptField; - - private bool defaultScriptFieldSet; - - private int scriptTimeoutField; - - private bool scriptTimeoutFieldSet; - - private YesNoDefaultType serverDebuggingField; - - private bool serverDebuggingFieldSet; - - private YesNoDefaultType clientDebuggingField; - - private bool clientDebuggingFieldSet; - - private string webAppPoolField; - - private bool webAppPoolFieldSet; - - private ISchemaElement parentElement; - - public WebApplication() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(WebApplicationExtension))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Sets the name of this application. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Sets the application isolation level for this application for pre-IIS 6 applications. - /// - public IsolationType Isolation - { - get - { - return this.isolationField; - } - set - { - this.isolationFieldSet = true; - this.isolationField = value; - } - } - - /// - /// Sets the Enable Session State option. When enabled, you can set the session timeout using the SessionTimeout attribute. - /// - public YesNoDefaultType AllowSessions - { - get - { - return this.allowSessionsField; - } - set - { - this.allowSessionsFieldSet = true; - this.allowSessionsField = value; - } - } - - /// - /// Sets the timeout value for sessions in minutes. - /// - public int SessionTimeout - { - get - { - return this.sessionTimeoutField; - } - set - { - this.sessionTimeoutFieldSet = true; - this.sessionTimeoutField = value; - } - } - - /// - /// Sets the option that enables response buffering in the application, which allows ASP script to set response headers anywhere in the script. - /// - public YesNoDefaultType Buffer - { - get - { - return this.bufferField; - } - set - { - this.bufferFieldSet = true; - this.bufferField = value; - } - } - - /// - /// Sets the parent paths option, which allows a client to use relative paths to reach parent directories from this application. - /// - public YesNoDefaultType ParentPaths - { - get - { - return this.parentPathsField; - } - set - { - this.parentPathsFieldSet = true; - this.parentPathsField = value; - } - } - - /// - /// Sets the default script language for the site. - /// - public DefaultScriptType DefaultScript - { - get - { - return this.defaultScriptField; - } - set - { - this.defaultScriptFieldSet = true; - this.defaultScriptField = value; - } - } - - /// - /// Sets the timeout value in seconds for executing ASP scripts. - /// - public int ScriptTimeout - { - get - { - return this.scriptTimeoutField; - } - set - { - this.scriptTimeoutFieldSet = true; - this.scriptTimeoutField = value; - } - } - - /// - /// Enable ASP server-side script debugging. - /// - public YesNoDefaultType ServerDebugging - { - get - { - return this.serverDebuggingField; - } - set - { - this.serverDebuggingFieldSet = true; - this.serverDebuggingField = value; - } - } - - /// - /// Enable ASP client-side script debugging. - /// - public YesNoDefaultType ClientDebugging - { - get - { - return this.clientDebuggingField; - } - set - { - this.clientDebuggingFieldSet = true; - this.clientDebuggingField = value; - } - } - - /// - /// References the Id attribute of a WebAppPool element to use as the application pool for this application in IIS 6 applications. - /// - public string WebAppPool - { - get - { - return this.webAppPoolField; - } - set - { - this.webAppPoolFieldSet = true; - this.webAppPoolField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("WebApplicationExtension" == childName)) - { - childValue = new WebApplicationExtension(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a IsolationType from a string. - /// - public static IsolationType ParseIsolationType(string value) - { - IsolationType parsedValue; - WebApplication.TryParseIsolationType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a IsolationType from a string. - /// - public static bool TryParseIsolationType(string value, out IsolationType parsedValue) - { - parsedValue = IsolationType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("low" == value)) - { - parsedValue = IsolationType.low; - } - else - { - if (("medium" == value)) - { - parsedValue = IsolationType.medium; - } - else - { - if (("high" == value)) - { - parsedValue = IsolationType.high; - } - else - { - parsedValue = IsolationType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a DefaultScriptType from a string. - /// - public static DefaultScriptType ParseDefaultScriptType(string value) - { - DefaultScriptType parsedValue; - WebApplication.TryParseDefaultScriptType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a DefaultScriptType from a string. - /// - public static bool TryParseDefaultScriptType(string value, out DefaultScriptType parsedValue) - { - parsedValue = DefaultScriptType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("VBScript" == value)) - { - parsedValue = DefaultScriptType.VBScript; - } - else - { - if (("JScript" == value)) - { - parsedValue = DefaultScriptType.JScript; - } - else - { - parsedValue = DefaultScriptType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebApplication", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.isolationFieldSet) - { - if ((this.isolationField == IsolationType.low)) - { - writer.WriteAttributeString("Isolation", "low"); - } - if ((this.isolationField == IsolationType.medium)) - { - writer.WriteAttributeString("Isolation", "medium"); - } - if ((this.isolationField == IsolationType.high)) - { - writer.WriteAttributeString("Isolation", "high"); - } - } - if (this.allowSessionsFieldSet) - { - if ((this.allowSessionsField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("AllowSessions", "default"); - } - if ((this.allowSessionsField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("AllowSessions", "no"); - } - if ((this.allowSessionsField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("AllowSessions", "yes"); - } - } - if (this.sessionTimeoutFieldSet) - { - writer.WriteAttributeString("SessionTimeout", this.sessionTimeoutField.ToString(CultureInfo.InvariantCulture)); - } - if (this.bufferFieldSet) - { - if ((this.bufferField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("Buffer", "default"); - } - if ((this.bufferField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("Buffer", "no"); - } - if ((this.bufferField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("Buffer", "yes"); - } - } - if (this.parentPathsFieldSet) - { - if ((this.parentPathsField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("ParentPaths", "default"); - } - if ((this.parentPathsField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("ParentPaths", "no"); - } - if ((this.parentPathsField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("ParentPaths", "yes"); - } - } - if (this.defaultScriptFieldSet) - { - if ((this.defaultScriptField == DefaultScriptType.VBScript)) - { - writer.WriteAttributeString("DefaultScript", "VBScript"); - } - if ((this.defaultScriptField == DefaultScriptType.JScript)) - { - writer.WriteAttributeString("DefaultScript", "JScript"); - } - } - if (this.scriptTimeoutFieldSet) - { - writer.WriteAttributeString("ScriptTimeout", this.scriptTimeoutField.ToString(CultureInfo.InvariantCulture)); - } - if (this.serverDebuggingFieldSet) - { - if ((this.serverDebuggingField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("ServerDebugging", "default"); - } - if ((this.serverDebuggingField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("ServerDebugging", "no"); - } - if ((this.serverDebuggingField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("ServerDebugging", "yes"); - } - } - if (this.clientDebuggingFieldSet) - { - if ((this.clientDebuggingField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("ClientDebugging", "default"); - } - if ((this.clientDebuggingField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("ClientDebugging", "no"); - } - if ((this.clientDebuggingField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("ClientDebugging", "yes"); - } - } - if (this.webAppPoolFieldSet) - { - writer.WriteAttributeString("WebAppPool", this.webAppPoolField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Isolation" == name)) - { - this.isolationField = WebApplication.ParseIsolationType(value); - this.isolationFieldSet = true; - } - if (("AllowSessions" == name)) - { - this.allowSessionsField = Enums.ParseYesNoDefaultType(value); - this.allowSessionsFieldSet = true; - } - if (("SessionTimeout" == name)) - { - this.sessionTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sessionTimeoutFieldSet = true; - } - if (("Buffer" == name)) - { - this.bufferField = Enums.ParseYesNoDefaultType(value); - this.bufferFieldSet = true; - } - if (("ParentPaths" == name)) - { - this.parentPathsField = Enums.ParseYesNoDefaultType(value); - this.parentPathsFieldSet = true; - } - if (("DefaultScript" == name)) - { - this.defaultScriptField = WebApplication.ParseDefaultScriptType(value); - this.defaultScriptFieldSet = true; - } - if (("ScriptTimeout" == name)) - { - this.scriptTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.scriptTimeoutFieldSet = true; - } - if (("ServerDebugging" == name)) - { - this.serverDebuggingField = Enums.ParseYesNoDefaultType(value); - this.serverDebuggingFieldSet = true; - } - if (("ClientDebugging" == name)) - { - this.clientDebuggingField = Enums.ParseYesNoDefaultType(value); - this.clientDebuggingFieldSet = true; - } - if (("WebAppPool" == name)) - { - this.webAppPoolField = value; - this.webAppPoolFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum IsolationType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Means the application executes within the IIS process. - /// - low, - - /// - /// Executes pooled in a separate process. - /// - medium, - - /// - /// Means execution alone in a separate process. - /// - high, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum DefaultScriptType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - VBScript, - - JScript, - } - } - - /// - /// WebAddress for WebSite - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebAddress : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string iPField; - - private bool iPFieldSet; - - private string portField; - - private bool portFieldSet; - - private string headerField; - - private bool headerFieldSet; - - private YesNoType secureField; - - private bool secureFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The IP address to locate an existing WebSite or create a new WebSite. When the WebAddress is part of a WebSite element - /// used to locate an existing web site the following rules are used: - /// - public string IP - { - get - { - return this.iPField; - } - set - { - this.iPFieldSet = true; - this.iPField = value; - } - } - - public string Port - { - get - { - return this.portField; - } - set - { - this.portFieldSet = true; - this.portField = value; - } - } - - public string Header - { - get - { - return this.headerField; - } - set - { - this.headerFieldSet = true; - this.headerField = value; - } - } - - /// - /// Determines if this address represents a secure binding. The default is 'no'. - /// - public YesNoType Secure - { - get - { - return this.secureField; - } - set - { - this.secureFieldSet = true; - this.secureField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebAddress", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.iPFieldSet) - { - writer.WriteAttributeString("IP", this.iPField); - } - if (this.portFieldSet) - { - writer.WriteAttributeString("Port", this.portField); - } - if (this.headerFieldSet) - { - writer.WriteAttributeString("Header", this.headerField); - } - if (this.secureFieldSet) - { - if ((this.secureField == YesNoType.no)) - { - writer.WriteAttributeString("Secure", "no"); - } - if ((this.secureField == YesNoType.yes)) - { - writer.WriteAttributeString("Secure", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("IP" == name)) - { - this.iPField = value; - this.iPFieldSet = true; - } - if (("Port" == name)) - { - this.portField = value; - this.portFieldSet = true; - } - if (("Header" == name)) - { - this.headerField = value; - this.headerFieldSet = true; - } - if (("Secure" == name)) - { - this.secureField = Enums.ParseYesNoType(value); - this.secureFieldSet = true; - } - } - } - - /// - /// 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 - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebVirtualDir : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string webSiteField; - - private bool webSiteFieldSet; - - private string aliasField; - - private bool aliasFieldSet; - - private string directoryField; - - private bool directoryFieldSet; - - private string dirPropertiesField; - - private bool dirPropertiesFieldSet; - - private string webApplicationField; - - private bool webApplicationFieldSet; - - private ISchemaElement parentElement; - - public WebVirtualDir() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebError))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebVirtualDir))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HttpHeader))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MimeMap))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// References the Id attribute for a WebSite in which this virtual directory belongs. Required when this element is not a child of WebSite element. - /// - public string WebSite - { - get - { - return this.webSiteField; - } - set - { - this.webSiteFieldSet = true; - this.webSiteField = value; - } - } - - /// - /// Sets the application name, which is the URL relative path used to access this virtual directory - /// - public string Alias - { - get - { - return this.aliasField; - } - set - { - this.aliasFieldSet = true; - this.aliasField = value; - } - } - - /// - /// References the Id attribute for a Directory element that points to the content for this virtual directory. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - /// - /// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this virtual directory. - /// This attribute may not be specified if a WebDirProperties element is directly nested in this element. - /// - public string DirProperties - { - get - { - return this.dirPropertiesField; - } - set - { - this.dirPropertiesFieldSet = true; - this.dirPropertiesField = value; - } - } - - /// - /// 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. - /// - public string WebApplication - { - get - { - return this.webApplicationField; - } - set - { - this.webApplicationFieldSet = true; - this.webApplicationField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("WebApplication" == childName)) - { - childValue = new WebApplication(); - } - if (("WebDirProperties" == childName)) - { - childValue = new WebDirProperties(); - } - if (("WebError" == childName)) - { - childValue = new WebError(); - } - if (("WebVirtualDir" == childName)) - { - childValue = new WebVirtualDir(); - } - if (("HttpHeader" == childName)) - { - childValue = new HttpHeader(); - } - if (("MimeMap" == childName)) - { - childValue = new MimeMap(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebVirtualDir", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.webSiteFieldSet) - { - writer.WriteAttributeString("WebSite", this.webSiteField); - } - if (this.aliasFieldSet) - { - writer.WriteAttributeString("Alias", this.aliasField); - } - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - if (this.dirPropertiesFieldSet) - { - writer.WriteAttributeString("DirProperties", this.dirPropertiesField); - } - if (this.webApplicationFieldSet) - { - writer.WriteAttributeString("WebApplication", this.webApplicationField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("WebSite" == name)) - { - this.webSiteField = value; - this.webSiteFieldSet = true; - } - if (("Alias" == name)) - { - this.aliasField = value; - this.aliasFieldSet = true; - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - if (("DirProperties" == name)) - { - this.dirPropertiesField = value; - this.dirPropertiesFieldSet = true; - } - if (("WebApplication" == name)) - { - this.webApplicationField = value; - this.webApplicationFieldSet = true; - } - } - } - - /// - /// 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. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebDir : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string webSiteField; - - private bool webSiteFieldSet; - - private string pathField; - - private bool pathFieldSet; - - private string dirPropertiesField; - - private bool dirPropertiesFieldSet; - - private ISchemaElement parentElement; - - public WebDir() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// 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. - /// - public string WebSite - { - get - { - return this.webSiteField; - } - set - { - this.webSiteFieldSet = true; - this.webSiteField = value; - } - } - - /// - /// Specifies the name of this web directory. - /// - public string Path - { - get - { - return this.pathField; - } - set - { - this.pathFieldSet = true; - this.pathField = value; - } - } - - /// - /// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this web directory. - /// This attribute may not be specified if a WebDirProperties element is directly nested in this element. - /// - public string DirProperties - { - get - { - return this.dirPropertiesField; - } - set - { - this.dirPropertiesFieldSet = true; - this.dirPropertiesField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("WebApplication" == childName)) - { - childValue = new WebApplication(); - } - if (("WebDirProperties" == childName)) - { - childValue = new WebDirProperties(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebDir", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.webSiteFieldSet) - { - writer.WriteAttributeString("WebSite", this.webSiteField); - } - if (this.pathFieldSet) - { - writer.WriteAttributeString("Path", this.pathField); - } - if (this.dirPropertiesFieldSet) - { - writer.WriteAttributeString("DirProperties", this.dirPropertiesField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("WebSite" == name)) - { - this.webSiteField = value; - this.webSiteFieldSet = true; - } - if (("Path" == name)) - { - this.pathField = value; - this.pathFieldSet = true; - } - if (("DirProperties" == name)) - { - this.dirPropertiesField = value; - this.dirPropertiesFieldSet = true; - } - } - } - - /// - /// IIs Web Site - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebSite : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private YesNoType autoStartField; - - private bool autoStartFieldSet; - - private YesNoType configureIfExistsField; - - private bool configureIfExistsFieldSet; - - private long connectionTimeoutField; - - private bool connectionTimeoutFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string directoryField; - - private bool directoryFieldSet; - - private string dirPropertiesField; - - private bool dirPropertiesFieldSet; - - private int sequenceField; - - private bool sequenceFieldSet; - - private string siteIdField; - - private bool siteIdFieldSet; - - private YesNoType startOnInstallField; - - private bool startOnInstallFieldSet; - - private string webApplicationField; - - private bool webApplicationFieldSet; - - private string webLogField; - - private bool webLogFieldSet; - - private ISchemaElement parentElement; - - public WebSite() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebAddress))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebApplication))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDirProperties))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MimeMap))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CertificateRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HttpHeader))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebDir))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebError))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebFilter))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WebVirtualDir))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for the WebSite. Used within the MSI package only. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Specifies whether to automatically start the web site. - /// - public YesNoType AutoStart - { - get - { - return this.autoStartField; - } - set - { - this.autoStartFieldSet = true; - this.autoStartField = value; - } - } - - /// - /// 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. - /// - public YesNoType ConfigureIfExists - { - get - { - return this.configureIfExistsField; - } - set - { - this.configureIfExistsFieldSet = true; - this.configureIfExistsField = value; - } - } - - /// - /// Sets the timeout value for connections in seconds. - /// - public long ConnectionTimeout - { - get - { - return this.connectionTimeoutField; - } - set - { - this.connectionTimeoutFieldSet = true; - this.connectionTimeoutField = value; - } - } - - /// - /// This is the name of the web site that will show up in the IIS management console. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Root directory of the web site. Resolved to a directory in the Directory table at install time by the server custom actions. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - /// - /// References the Id attribute for a WebDirProperties element that specifies the security and access properties for this website root directory. - /// This attribute may not be specified if a WebDirProperties element is directly nested in this element. - /// - public string DirProperties - { - get - { - return this.dirPropertiesField; - } - set - { - this.dirPropertiesFieldSet = true; - this.dirPropertiesField = value; - } - } - - /// - /// Sequence that the web site is to be created in. - /// - public int Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - /// - /// Optional attribute to directly specify the site id of the WebSite. Use this to ensure all web - /// sites in a web garden get the same site id. If a number is provided, the site id must be unique - /// on all target machines. If "*" is used, the Description attribute will be hashed to create a unique - /// value for the site id. This value must be a positive number or a "*" or a formatted value that resolves - /// to "-1" (for the same behavior as "*") or a positive number or blank. If this attribute is absent then - /// the web site will be located using the WebAddress element associated with the web site. - /// - public string SiteId - { - get - { - return this.siteIdField; - } - set - { - this.siteIdFieldSet = true; - this.siteIdField = value; - } - } - - /// - /// Specifies whether to start the web site on install. - /// - public YesNoType StartOnInstall - { - get - { - return this.startOnInstallField; - } - set - { - this.startOnInstallFieldSet = true; - this.startOnInstallField = value; - } - } - - /// - /// Reference to a WebApplication that is to be installed as part of this web site. - /// - public string WebApplication - { - get - { - return this.webApplicationField; - } - set - { - this.webApplicationFieldSet = true; - this.webApplicationField = value; - } - } - - /// - /// Reference to WebLog definition. - /// - public string WebLog - { - get - { - return this.webLogField; - } - set - { - this.webLogFieldSet = true; - this.webLogField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("WebAddress" == childName)) - { - childValue = new WebAddress(); - } - if (("WebApplication" == childName)) - { - childValue = new WebApplication(); - } - if (("WebDirProperties" == childName)) - { - childValue = new WebDirProperties(); - } - if (("MimeMap" == childName)) - { - childValue = new MimeMap(); - } - if (("CertificateRef" == childName)) - { - childValue = new CertificateRef(); - } - if (("HttpHeader" == childName)) - { - childValue = new HttpHeader(); - } - if (("WebDir" == childName)) - { - childValue = new WebDir(); - } - if (("WebError" == childName)) - { - childValue = new WebError(); - } - if (("WebFilter" == childName)) - { - childValue = new WebFilter(); - } - if (("WebVirtualDir" == childName)) - { - childValue = new WebVirtualDir(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebSite", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.autoStartFieldSet) - { - if ((this.autoStartField == YesNoType.no)) - { - writer.WriteAttributeString("AutoStart", "no"); - } - if ((this.autoStartField == YesNoType.yes)) - { - writer.WriteAttributeString("AutoStart", "yes"); - } - } - if (this.configureIfExistsFieldSet) - { - if ((this.configureIfExistsField == YesNoType.no)) - { - writer.WriteAttributeString("ConfigureIfExists", "no"); - } - if ((this.configureIfExistsField == YesNoType.yes)) - { - writer.WriteAttributeString("ConfigureIfExists", "yes"); - } - } - if (this.connectionTimeoutFieldSet) - { - writer.WriteAttributeString("ConnectionTimeout", this.connectionTimeoutField.ToString(CultureInfo.InvariantCulture)); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - if (this.dirPropertiesFieldSet) - { - writer.WriteAttributeString("DirProperties", this.dirPropertiesField); - } - if (this.sequenceFieldSet) - { - writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); - } - if (this.siteIdFieldSet) - { - writer.WriteAttributeString("SiteId", this.siteIdField); - } - if (this.startOnInstallFieldSet) - { - if ((this.startOnInstallField == YesNoType.no)) - { - writer.WriteAttributeString("StartOnInstall", "no"); - } - if ((this.startOnInstallField == YesNoType.yes)) - { - writer.WriteAttributeString("StartOnInstall", "yes"); - } - } - if (this.webApplicationFieldSet) - { - writer.WriteAttributeString("WebApplication", this.webApplicationField); - } - if (this.webLogFieldSet) - { - writer.WriteAttributeString("WebLog", this.webLogField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("AutoStart" == name)) - { - this.autoStartField = Enums.ParseYesNoType(value); - this.autoStartFieldSet = true; - } - if (("ConfigureIfExists" == name)) - { - this.configureIfExistsField = Enums.ParseYesNoType(value); - this.configureIfExistsFieldSet = true; - } - if (("ConnectionTimeout" == name)) - { - this.connectionTimeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.connectionTimeoutFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - if (("DirProperties" == name)) - { - this.dirPropertiesField = value; - this.dirPropertiesFieldSet = true; - } - if (("Sequence" == name)) - { - this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sequenceFieldSet = true; - } - if (("SiteId" == name)) - { - this.siteIdField = value; - this.siteIdFieldSet = true; - } - if (("StartOnInstall" == name)) - { - this.startOnInstallField = Enums.ParseYesNoType(value); - this.startOnInstallFieldSet = true; - } - if (("WebApplication" == name)) - { - this.webApplicationField = value; - this.webApplicationFieldSet = true; - } - if (("WebLog" == name)) - { - this.webLogField = value; - this.webLogFieldSet = true; - } - } - } - - /// - /// WebLog definition. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebLog : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private TypeType typeField; - - private bool typeFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier for the WebLog. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public TypeType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a TypeType from a string. - /// - public static TypeType ParseTypeType(string value) - { - TypeType parsedValue; - WebLog.TryParseTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypeType from a string. - /// - public static bool TryParseTypeType(string value, out TypeType parsedValue) - { - parsedValue = TypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("IIS" == value)) - { - parsedValue = TypeType.IIS; - } - else - { - if (("NCSA" == value)) - { - parsedValue = TypeType.NCSA; - } - else - { - if (("none" == value)) - { - parsedValue = TypeType.none; - } - else - { - if (("ODBC" == value)) - { - parsedValue = TypeType.ODBC; - } - else - { - if (("W3C" == value)) - { - parsedValue = TypeType.W3C; - } - else - { - parsedValue = TypeType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebLog", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.typeFieldSet) - { - if ((this.typeField == TypeType.IIS)) - { - writer.WriteAttributeString("Type", "IIS"); - } - if ((this.typeField == TypeType.NCSA)) - { - writer.WriteAttributeString("Type", "NCSA"); - } - if ((this.typeField == TypeType.none)) - { - writer.WriteAttributeString("Type", "none"); - } - if ((this.typeField == TypeType.ODBC)) - { - writer.WriteAttributeString("Type", "ODBC"); - } - if ((this.typeField == TypeType.W3C)) - { - writer.WriteAttributeString("Type", "W3C"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = WebLog.ParseTypeType(value); - this.typeFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum TypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Microsoft IIS Log File Format - /// - IIS, - - /// - /// NCSA Common Log File Format - /// - NCSA, - - /// - /// Disables logging. - /// - none, - - /// - /// ODBC Logging - /// - ODBC, - - /// - /// W3C Extended Log File Format - /// - W3C, - } - } - - /// - /// The WebServiceExtension property is used by the Web server to determine whether a Web service extension is permitted to run. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class WebServiceExtension : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string fileField; - - private bool fileFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string groupField; - - private bool groupFieldSet; - - private YesNoType allowField; - - private bool allowFieldSet; - - private YesNoType uIDeletableField; - - private bool uIDeletableFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Usually a Property that resolves to short file name path - /// - public string File - { - get - { - return this.fileField; - } - set - { - this.fileFieldSet = true; - this.fileField = value; - } - } - - /// - /// Description of the extension. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// String used to identify groups of extensions. - /// - public string Group - { - get - { - return this.groupField; - } - set - { - this.groupFieldSet = true; - this.groupField = value; - } - } - - /// - /// Indicates if the extension is allowed or denied. - /// - public YesNoType Allow - { - get - { - return this.allowField; - } - set - { - this.allowFieldSet = true; - this.allowField = value; - } - } - - /// - /// Indicates if the UI is allowed to delete the extension from the list of not. Default: Not deletable. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public YesNoType UIDeletable - { - get - { - return this.uIDeletableField; - } - set - { - this.uIDeletableFieldSet = true; - this.uIDeletableField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WebServiceExtension", "http://wixtoolset.org/schemas/v4/wxs/iis"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.fileFieldSet) - { - writer.WriteAttributeString("File", this.fileField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.groupFieldSet) - { - writer.WriteAttributeString("Group", this.groupField); - } - if (this.allowFieldSet) - { - if ((this.allowField == YesNoType.no)) - { - writer.WriteAttributeString("Allow", "no"); - } - if ((this.allowField == YesNoType.yes)) - { - writer.WriteAttributeString("Allow", "yes"); - } - } - if (this.uIDeletableFieldSet) - { - if ((this.uIDeletableField == YesNoType.no)) - { - writer.WriteAttributeString("UIDeletable", "no"); - } - if ((this.uIDeletableField == YesNoType.yes)) - { - writer.WriteAttributeString("UIDeletable", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("File" == name)) - { - this.fileField = value; - this.fileFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("Group" == name)) - { - this.groupField = value; - this.groupFieldSet = true; - } - if (("Allow" == name)) - { - this.allowField = Enums.ParseYesNoType(value); - this.allowFieldSet = true; - } - if (("UIDeletable" == name)) - { - this.uIDeletableField = Enums.ParseYesNoType(value); - this.uIDeletableFieldSet = true; - } - } - } -} diff --git a/src/wix/heat/Serialize/util.cs b/src/wix/heat/Serialize/util.cs deleted file mode 100644 index 84f56eb0..00000000 --- a/src/wix/heat/Serialize/util.cs +++ /dev/null @@ -1,11462 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#pragma warning disable 1591 -namespace WixToolset.Harvesters.Serialize.Util -{ - using System; - using System.CodeDom.Compiler; - using System.Collections; - using System.Diagnostics.CodeAnalysis; - using System.Globalization; - using System.Xml; - using WixToolset.Harvesters.Serialize; - - - /// - /// Values of this type will either be "yes" or "no". - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum YesNoType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - no, - - yes, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public class Enums - { - - /// - /// Parses a YesNoType from a string. - /// - public static YesNoType ParseYesNoType(string value) - { - YesNoType parsedValue; - Enums.TryParseYesNoType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a YesNoType from a string. - /// - public static bool TryParseYesNoType(string value, out YesNoType parsedValue) - { - parsedValue = YesNoType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("no" == value)) - { - parsedValue = YesNoType.no; - } - else - { - if (("yes" == value)) - { - parsedValue = YesNoType.yes; - } - else - { - parsedValue = YesNoType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Parses a PerformanceCounterLanguageType from a string. - /// - public static PerformanceCounterLanguageType ParsePerformanceCounterLanguageType(string value) - { - PerformanceCounterLanguageType parsedValue; - Enums.TryParsePerformanceCounterLanguageType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a PerformanceCounterLanguageType from a string. - /// - public static bool TryParsePerformanceCounterLanguageType(string value, out PerformanceCounterLanguageType parsedValue) - { - parsedValue = PerformanceCounterLanguageType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("afrikaans" == value)) - { - parsedValue = PerformanceCounterLanguageType.afrikaans; - } - else - { - if (("albanian" == value)) - { - parsedValue = PerformanceCounterLanguageType.albanian; - } - else - { - if (("arabic" == value)) - { - parsedValue = PerformanceCounterLanguageType.arabic; - } - else - { - if (("armenian" == value)) - { - parsedValue = PerformanceCounterLanguageType.armenian; - } - else - { - if (("assamese" == value)) - { - parsedValue = PerformanceCounterLanguageType.assamese; - } - else - { - if (("azeri" == value)) - { - parsedValue = PerformanceCounterLanguageType.azeri; - } - else - { - if (("basque" == value)) - { - parsedValue = PerformanceCounterLanguageType.basque; - } - else - { - if (("belarusian" == value)) - { - parsedValue = PerformanceCounterLanguageType.belarusian; - } - else - { - if (("bengali" == value)) - { - parsedValue = PerformanceCounterLanguageType.bengali; - } - else - { - if (("bulgarian" == value)) - { - parsedValue = PerformanceCounterLanguageType.bulgarian; - } - else - { - if (("catalan" == value)) - { - parsedValue = PerformanceCounterLanguageType.catalan; - } - else - { - if (("chinese" == value)) - { - parsedValue = PerformanceCounterLanguageType.chinese; - } - else - { - if (("croatian" == value)) - { - parsedValue = PerformanceCounterLanguageType.croatian; - } - else - { - if (("czech" == value)) - { - parsedValue = PerformanceCounterLanguageType.czech; - } - else - { - if (("danish" == value)) - { - parsedValue = PerformanceCounterLanguageType.danish; - } - else - { - if (("divehi" == value)) - { - parsedValue = PerformanceCounterLanguageType.divehi; - } - else - { - if (("dutch" == value)) - { - parsedValue = PerformanceCounterLanguageType.dutch; - } - else - { - if (("english" == value)) - { - parsedValue = PerformanceCounterLanguageType.english; - } - else - { - if (("estonian" == value)) - { - parsedValue = PerformanceCounterLanguageType.estonian; - } - else - { - if (("faeroese" == value)) - { - parsedValue = PerformanceCounterLanguageType.faeroese; - } - else - { - if (("farsi" == value)) - { - parsedValue = PerformanceCounterLanguageType.farsi; - } - else - { - if (("finnish" == value)) - { - parsedValue = PerformanceCounterLanguageType.finnish; - } - else - { - if (("french" == value)) - { - parsedValue = PerformanceCounterLanguageType.french; - } - else - { - if (("galician" == value)) - { - parsedValue = PerformanceCounterLanguageType.galician; - } - else - { - if (("georgian" == value)) - { - parsedValue = PerformanceCounterLanguageType.georgian; - } - else - { - if (("german" == value)) - { - parsedValue = PerformanceCounterLanguageType.german; - } - else - { - if (("greek" == value)) - { - parsedValue = PerformanceCounterLanguageType.greek; - } - else - { - if (("gujarati" == value)) - { - parsedValue = PerformanceCounterLanguageType.gujarati; - } - else - { - if (("hebrew" == value)) - { - parsedValue = PerformanceCounterLanguageType.hebrew; - } - else - { - if (("hindi" == value)) - { - parsedValue = PerformanceCounterLanguageType.hindi; - } - else - { - if (("hungarian" == value)) - { - parsedValue = PerformanceCounterLanguageType.hungarian; - } - else - { - if (("icelandic" == value)) - { - parsedValue = PerformanceCounterLanguageType.icelandic; - } - else - { - if (("indonesian" == value)) - { - parsedValue = PerformanceCounterLanguageType.indonesian; - } - else - { - if (("italian" == value)) - { - parsedValue = PerformanceCounterLanguageType.italian; - } - else - { - if (("japanese" == value)) - { - parsedValue = PerformanceCounterLanguageType.japanese; - } - else - { - if (("kannada" == value)) - { - parsedValue = PerformanceCounterLanguageType.kannada; - } - else - { - if (("kashmiri" == value)) - { - parsedValue = PerformanceCounterLanguageType.kashmiri; - } - else - { - if (("kazak" == value)) - { - parsedValue = PerformanceCounterLanguageType.kazak; - } - else - { - if (("konkani" == value)) - { - parsedValue = PerformanceCounterLanguageType.konkani; - } - else - { - if (("korean" == value)) - { - parsedValue = PerformanceCounterLanguageType.korean; - } - else - { - if (("kyrgyz" == value)) - { - parsedValue = PerformanceCounterLanguageType.kyrgyz; - } - else - { - if (("latvian" == value)) - { - parsedValue = PerformanceCounterLanguageType.latvian; - } - else - { - if (("lithuanian" == value)) - { - parsedValue = PerformanceCounterLanguageType.lithuanian; - } - else - { - if (("macedonian" == value)) - { - parsedValue = PerformanceCounterLanguageType.macedonian; - } - else - { - if (("malay" == value)) - { - parsedValue = PerformanceCounterLanguageType.malay; - } - else - { - if (("malayalam" == value)) - { - parsedValue = PerformanceCounterLanguageType.malayalam; - } - else - { - if (("manipuri" == value)) - { - parsedValue = PerformanceCounterLanguageType.manipuri; - } - else - { - if (("marathi" == value)) - { - parsedValue = PerformanceCounterLanguageType.marathi; - } - else - { - if (("mongolian" == value)) - { - parsedValue = PerformanceCounterLanguageType.mongolian; - } - else - { - if (("nepali" == value)) - { - parsedValue = PerformanceCounterLanguageType.nepali; - } - else - { - if (("norwegian" == value)) - { - parsedValue = PerformanceCounterLanguageType.norwegian; - } - else - { - if (("oriya" == value)) - { - parsedValue = PerformanceCounterLanguageType.oriya; - } - else - { - if (("polish" == value)) - { - parsedValue = PerformanceCounterLanguageType.polish; - } - else - { - if (("portuguese" == value)) - { - parsedValue = PerformanceCounterLanguageType.portuguese; - } - else - { - if (("punjabi" == value)) - { - parsedValue = PerformanceCounterLanguageType.punjabi; - } - else - { - if (("romanian" == value)) - { - parsedValue = PerformanceCounterLanguageType.romanian; - } - else - { - if (("russian" == value)) - { - parsedValue = PerformanceCounterLanguageType.russian; - } - else - { - if (("sanskrit" == value)) - { - parsedValue = PerformanceCounterLanguageType.sanskrit; - } - else - { - if (("serbian" == value)) - { - parsedValue = PerformanceCounterLanguageType.serbian; - } - else - { - if (("sindhi" == value)) - { - parsedValue = PerformanceCounterLanguageType.sindhi; - } - else - { - if (("slovak" == value)) - { - parsedValue = PerformanceCounterLanguageType.slovak; - } - else - { - if (("slovenian" == value)) - { - parsedValue = PerformanceCounterLanguageType.slovenian; - } - else - { - if (("spanish" == value)) - { - parsedValue = PerformanceCounterLanguageType.spanish; - } - else - { - if (("swahili" == value)) - { - parsedValue = PerformanceCounterLanguageType.swahili; - } - else - { - if (("swedish" == value)) - { - parsedValue = PerformanceCounterLanguageType.swedish; - } - else - { - if (("syriac" == value)) - { - parsedValue = PerformanceCounterLanguageType.syriac; - } - else - { - if (("tamil" == value)) - { - parsedValue = PerformanceCounterLanguageType.tamil; - } - else - { - if (("tatar" == value)) - { - parsedValue = PerformanceCounterLanguageType.tatar; - } - else - { - if (("telugu" == value)) - { - parsedValue = PerformanceCounterLanguageType.telugu; - } - else - { - if (("thai" == value)) - { - parsedValue = PerformanceCounterLanguageType.thai; - } - else - { - if (("turkish" == value)) - { - parsedValue = PerformanceCounterLanguageType.turkish; - } - else - { - if (("ukrainian" == value)) - { - parsedValue = PerformanceCounterLanguageType.ukrainian; - } - else - { - if (("urdu" == value)) - { - parsedValue = PerformanceCounterLanguageType.urdu; - } - else - { - if (("uzbek" == value)) - { - parsedValue = PerformanceCounterLanguageType.uzbek; - } - else - { - if (("vietnamese" == value)) - { - parsedValue = PerformanceCounterLanguageType.vietnamese; - } - else - { - parsedValue = PerformanceCounterLanguageType.IllegalValue; - return false; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - return true; - } - - /// - /// Parses a PerformanceCounterTypesType from a string. - /// - public static PerformanceCounterTypesType ParsePerformanceCounterTypesType(string value) - { - PerformanceCounterTypesType parsedValue; - Enums.TryParsePerformanceCounterTypesType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a PerformanceCounterTypesType from a string. - /// - public static bool TryParsePerformanceCounterTypesType(string value, out PerformanceCounterTypesType parsedValue) - { - parsedValue = PerformanceCounterTypesType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("averageBase" == value)) - { - parsedValue = PerformanceCounterTypesType.averageBase; - } - else - { - if (("averageCount64" == value)) - { - parsedValue = PerformanceCounterTypesType.averageCount64; - } - else - { - if (("averageTimer32" == value)) - { - parsedValue = PerformanceCounterTypesType.averageTimer32; - } - else - { - if (("counterDelta32" == value)) - { - parsedValue = PerformanceCounterTypesType.counterDelta32; - } - else - { - if (("counterTimerInverse" == value)) - { - parsedValue = PerformanceCounterTypesType.counterTimerInverse; - } - else - { - if (("sampleFraction" == value)) - { - parsedValue = PerformanceCounterTypesType.sampleFraction; - } - else - { - if (("timer100Ns" == value)) - { - parsedValue = PerformanceCounterTypesType.timer100Ns; - } - else - { - if (("counterTimer" == value)) - { - parsedValue = PerformanceCounterTypesType.counterTimer; - } - else - { - if (("rawFraction" == value)) - { - parsedValue = PerformanceCounterTypesType.rawFraction; - } - else - { - if (("timer100NsInverse" == value)) - { - parsedValue = PerformanceCounterTypesType.timer100NsInverse; - } - else - { - if (("counterMultiTimer" == value)) - { - parsedValue = PerformanceCounterTypesType.counterMultiTimer; - } - else - { - if (("counterMultiTimer100Ns" == value)) - { - parsedValue = PerformanceCounterTypesType.counterMultiTimer100Ns; - } - else - { - if (("counterMultiTimerInverse" == value)) - { - parsedValue = PerformanceCounterTypesType.counterMultiTimerInverse; - } - else - { - if (("counterMultiTimer100NsInverse" == value)) - { - parsedValue = PerformanceCounterTypesType.counterMultiTimer100NsInverse; - } - else - { - if (("elapsedTime" == value)) - { - parsedValue = PerformanceCounterTypesType.elapsedTime; - } - else - { - if (("sampleBase" == value)) - { - parsedValue = PerformanceCounterTypesType.sampleBase; - } - else - { - if (("rawBase" == value)) - { - parsedValue = PerformanceCounterTypesType.rawBase; - } - else - { - if (("counterMultiBase" == value)) - { - parsedValue = PerformanceCounterTypesType.counterMultiBase; - } - else - { - if (("rateOfCountsPerSecond64" == value)) - { - parsedValue = PerformanceCounterTypesType.rateOfCountsPerSecond64; - } - else - { - if (("rateOfCountsPerSecond32" == value)) - { - parsedValue = PerformanceCounterTypesType.rateOfCountsPerSecond32; - } - else - { - if (("countPerTimeInterval64" == value)) - { - parsedValue = PerformanceCounterTypesType.countPerTimeInterval64; - } - else - { - if (("countPerTimeInterval32" == value)) - { - parsedValue = PerformanceCounterTypesType.countPerTimeInterval32; - } - else - { - if (("sampleCounter" == value)) - { - parsedValue = PerformanceCounterTypesType.sampleCounter; - } - else - { - if (("counterDelta64" == value)) - { - parsedValue = PerformanceCounterTypesType.counterDelta64; - } - else - { - if (("numberOfItems64" == value)) - { - parsedValue = PerformanceCounterTypesType.numberOfItems64; - } - else - { - if (("numberOfItems32" == value)) - { - parsedValue = PerformanceCounterTypesType.numberOfItems32; - } - else - { - if (("numberOfItemsHEX64" == value)) - { - parsedValue = PerformanceCounterTypesType.numberOfItemsHEX64; - } - else - { - if (("numberOfItemsHEX32" == value)) - { - parsedValue = PerformanceCounterTypesType.numberOfItemsHEX32; - } - else - { - parsedValue = PerformanceCounterTypesType.IllegalValue; - return false; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - return true; - } - } - - /// - /// Enumeration of valid languages for performance counters. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum PerformanceCounterLanguageType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - afrikaans, - - albanian, - - arabic, - - armenian, - - assamese, - - azeri, - - basque, - - belarusian, - - bengali, - - bulgarian, - - catalan, - - chinese, - - croatian, - - czech, - - danish, - - divehi, - - dutch, - - english, - - estonian, - - faeroese, - - farsi, - - finnish, - - french, - - galician, - - georgian, - - german, - - greek, - - gujarati, - - hebrew, - - hindi, - - hungarian, - - icelandic, - - indonesian, - - italian, - - japanese, - - kannada, - - kashmiri, - - kazak, - - konkani, - - korean, - - kyrgyz, - - latvian, - - lithuanian, - - macedonian, - - malay, - - malayalam, - - manipuri, - - marathi, - - mongolian, - - nepali, - - norwegian, - - oriya, - - polish, - - portuguese, - - punjabi, - - romanian, - - russian, - - sanskrit, - - serbian, - - sindhi, - - slovak, - - slovenian, - - spanish, - - swahili, - - swedish, - - syriac, - - tamil, - - tatar, - - telugu, - - thai, - - turkish, - - ukrainian, - - urdu, - - uzbek, - - vietnamese, - } - - /// - /// Enumeration of valid types for performance counters. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum PerformanceCounterTypesType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - averageBase, - - averageCount64, - - averageTimer32, - - counterDelta32, - - counterTimerInverse, - - sampleFraction, - - timer100Ns, - - counterTimer, - - rawFraction, - - timer100NsInverse, - - counterMultiTimer, - - counterMultiTimer100Ns, - - counterMultiTimerInverse, - - counterMultiTimer100NsInverse, - - elapsedTime, - - sampleBase, - - rawBase, - - counterMultiBase, - - rateOfCountsPerSecond64, - - rateOfCountsPerSecond32, - - countPerTimeInterval64, - - countPerTimeInterval32, - - sampleCounter, - - counterDelta64, - - numberOfItems64, - - numberOfItems32, - - numberOfItemsHEX64, - - numberOfItemsHEX32, - } - - /// - /// Closes applications or schedules a reboot if application cannot be closed. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class CloseApplication : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string targetField; - - private bool targetFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private int sequenceField; - - private bool sequenceFieldSet; - - private YesNoType closeMessageField; - - private bool closeMessageFieldSet; - - private YesNoType endSessionMessageField; - - private bool endSessionMessageFieldSet; - - private YesNoType elevatedCloseMessageField; - - private bool elevatedCloseMessageFieldSet; - - private YesNoType elevatedEndSessionMessageField; - - private bool elevatedEndSessionMessageFieldSet; - - private YesNoType rebootPromptField; - - private bool rebootPromptFieldSet; - - private YesNoType promptToContinueField; - - private bool promptToContinueFieldSet; - - private string propertyField; - - private bool propertyFieldSet; - - private int terminateProcessField; - - private bool terminateProcessFieldSet; - - private int timeoutField; - - private bool timeoutFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier for the close application (primary key). If the Id is not specified, one will be generated. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the exectuable to be closed. This should only be the file name. - /// - public string Target - { - get - { - return this.targetField; - } - set - { - this.targetFieldSet = true; - this.targetField = value; - } - } - - /// - /// Description to show if application is running and needs to be closed. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Optionally orders the applications to be closed. - /// - public int Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - /// - /// Optionally sends a close message to the application. Default is no. - /// - public YesNoType CloseMessage - { - get - { - return this.closeMessageField; - } - set - { - this.closeMessageFieldSet = true; - this.closeMessageField = value; - } - } - - /// - /// Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application. Default is "no". - /// - public YesNoType EndSessionMessage - { - get - { - return this.endSessionMessageField; - } - set - { - this.endSessionMessageFieldSet = true; - this.endSessionMessageField = value; - } - } - - /// - /// Optionally sends a close message to the application from deffered action without impersonation. Default is no. - /// - public YesNoType ElevatedCloseMessage - { - get - { - return this.elevatedCloseMessageField; - } - set - { - this.elevatedCloseMessageFieldSet = true; - this.elevatedCloseMessageField = value; - } - } - - /// - /// Sends WM_QUERYENDSESSION then WM_ENDSESSION messages to the application from a deffered action without impersonation. Default is "no". - /// - public YesNoType ElevatedEndSessionMessage - { - get - { - return this.elevatedEndSessionMessageField; - } - set - { - this.elevatedEndSessionMessageFieldSet = true; - this.elevatedEndSessionMessageField = value; - } - } - - /// - /// 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". - /// - public YesNoType RebootPrompt - { - get - { - return this.rebootPromptField; - } - set - { - this.rebootPromptFieldSet = true; - this.rebootPromptField = value; - } - } - - /// - /// 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 - /// 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 - /// 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 - /// set on the CloseApplication element. The default is "no". - /// - public YesNoType PromptToContinue - { - get - { - return this.promptToContinueField; - } - set - { - this.promptToContinueFieldSet = true; - this.promptToContinueField = value; - } - } - - /// - /// 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. - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - /// - /// 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. - /// If this attribute is specified, the RebootPrompt attribute must be "no". The default is "no". - /// - public int TerminateProcess - { - get - { - return this.terminateProcessField; - } - set - { - this.terminateProcessFieldSet = true; - this.terminateProcessField = value; - } - } - - /// - /// 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 - /// the RebootPrompt or TerminateProcess attributes will be considered. The default value is "5" seconds. - /// - public int Timeout - { - get - { - return this.timeoutField; - } - set - { - this.timeoutFieldSet = true; - this.timeoutField = value; - } - } - - /// - /// Condition that determines if the application should be closed. Must be blank or evaluate to true - /// for the application to be scheduled for closing. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CloseApplication", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.targetFieldSet) - { - writer.WriteAttributeString("Target", this.targetField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.sequenceFieldSet) - { - writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); - } - if (this.closeMessageFieldSet) - { - if ((this.closeMessageField == YesNoType.no)) - { - writer.WriteAttributeString("CloseMessage", "no"); - } - if ((this.closeMessageField == YesNoType.yes)) - { - writer.WriteAttributeString("CloseMessage", "yes"); - } - } - if (this.endSessionMessageFieldSet) - { - if ((this.endSessionMessageField == YesNoType.no)) - { - writer.WriteAttributeString("EndSessionMessage", "no"); - } - if ((this.endSessionMessageField == YesNoType.yes)) - { - writer.WriteAttributeString("EndSessionMessage", "yes"); - } - } - if (this.elevatedCloseMessageFieldSet) - { - if ((this.elevatedCloseMessageField == YesNoType.no)) - { - writer.WriteAttributeString("ElevatedCloseMessage", "no"); - } - if ((this.elevatedCloseMessageField == YesNoType.yes)) - { - writer.WriteAttributeString("ElevatedCloseMessage", "yes"); - } - } - if (this.elevatedEndSessionMessageFieldSet) - { - if ((this.elevatedEndSessionMessageField == YesNoType.no)) - { - writer.WriteAttributeString("ElevatedEndSessionMessage", "no"); - } - if ((this.elevatedEndSessionMessageField == YesNoType.yes)) - { - writer.WriteAttributeString("ElevatedEndSessionMessage", "yes"); - } - } - if (this.rebootPromptFieldSet) - { - if ((this.rebootPromptField == YesNoType.no)) - { - writer.WriteAttributeString("RebootPrompt", "no"); - } - if ((this.rebootPromptField == YesNoType.yes)) - { - writer.WriteAttributeString("RebootPrompt", "yes"); - } - } - if (this.promptToContinueFieldSet) - { - if ((this.promptToContinueField == YesNoType.no)) - { - writer.WriteAttributeString("PromptToContinue", "no"); - } - if ((this.promptToContinueField == YesNoType.yes)) - { - writer.WriteAttributeString("PromptToContinue", "yes"); - } - } - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - if (this.terminateProcessFieldSet) - { - writer.WriteAttributeString("TerminateProcess", this.terminateProcessField.ToString(CultureInfo.InvariantCulture)); - } - if (this.timeoutFieldSet) - { - writer.WriteAttributeString("Timeout", this.timeoutField.ToString(CultureInfo.InvariantCulture)); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Target" == name)) - { - this.targetField = value; - this.targetFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("Sequence" == name)) - { - this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sequenceFieldSet = true; - } - if (("CloseMessage" == name)) - { - this.closeMessageField = Enums.ParseYesNoType(value); - this.closeMessageFieldSet = true; - } - if (("EndSessionMessage" == name)) - { - this.endSessionMessageField = Enums.ParseYesNoType(value); - this.endSessionMessageFieldSet = true; - } - if (("ElevatedCloseMessage" == name)) - { - this.elevatedCloseMessageField = Enums.ParseYesNoType(value); - this.elevatedCloseMessageFieldSet = true; - } - if (("ElevatedEndSessionMessage" == name)) - { - this.elevatedEndSessionMessageField = Enums.ParseYesNoType(value); - this.elevatedEndSessionMessageFieldSet = true; - } - if (("RebootPrompt" == name)) - { - this.rebootPromptField = Enums.ParseYesNoType(value); - this.rebootPromptFieldSet = true; - } - if (("PromptToContinue" == name)) - { - this.promptToContinueField = Enums.ParseYesNoType(value); - this.promptToContinueFieldSet = true; - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - if (("TerminateProcess" == name)) - { - this.terminateProcessField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.terminateProcessFieldSet = true; - } - if (("Timeout" == name)) - { - this.timeoutField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.timeoutFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - /// - /// Describes a component search. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class ComponentSearch : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string variableField; - - private bool variableFieldSet; - - private string conditionField; - - private bool conditionFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private string guidField; - - private bool guidFieldSet; - - private string productCodeField; - - private bool productCodeFieldSet; - - private ResultType resultField; - - private bool resultFieldSet; - - private ISchemaElement parentElement; - - /// - /// Id of the search for ordering and dependency. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the variable in which to place the result of the search. - /// - public string Variable - { - get - { - return this.variableField; - } - set - { - this.variableFieldSet = true; - this.variableField = value; - } - } - - /// - /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. - /// - public string Condition - { - get - { - return this.conditionField; - } - set - { - this.conditionFieldSet = true; - this.conditionField = value; - } - } - - /// - /// Id of the search that this one should come after. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// Component to search for. - /// - public string Guid - { - get - { - return this.guidField; - } - set - { - this.guidFieldSet = true; - this.guidField = value; - } - } - - /// - /// Optional ProductCode to determine if the component is installed. - /// - public string ProductCode - { - get - { - return this.productCodeField; - } - set - { - this.productCodeFieldSet = true; - this.productCodeField = value; - } - } - - /// - /// Rather than saving the matching key path into the variable, a ComponentSearch can save an attribute of the component instead. - /// - public ResultType Result - { - get - { - return this.resultField; - } - set - { - this.resultFieldSet = true; - this.resultField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ResultType from a string. - /// - public static ResultType ParseResultType(string value) - { - ResultType parsedValue; - ComponentSearch.TryParseResultType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ResultType from a string. - /// - public static bool TryParseResultType(string value, out ResultType parsedValue) - { - parsedValue = ResultType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("directory" == value)) - { - parsedValue = ResultType.directory; - } - else - { - if (("state" == value)) - { - parsedValue = ResultType.state; - } - else - { - if (("keyPath" == value)) - { - parsedValue = ResultType.keyPath; - } - else - { - parsedValue = ResultType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ComponentSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.variableFieldSet) - { - writer.WriteAttributeString("Variable", this.variableField); - } - if (this.conditionFieldSet) - { - writer.WriteAttributeString("Condition", this.conditionField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.guidFieldSet) - { - writer.WriteAttributeString("Guid", this.guidField); - } - if (this.productCodeFieldSet) - { - writer.WriteAttributeString("ProductCode", this.productCodeField); - } - if (this.resultFieldSet) - { - if ((this.resultField == ResultType.directory)) - { - writer.WriteAttributeString("Result", "directory"); - } - if ((this.resultField == ResultType.state)) - { - writer.WriteAttributeString("Result", "state"); - } - if ((this.resultField == ResultType.keyPath)) - { - writer.WriteAttributeString("Result", "keyPath"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Variable" == name)) - { - this.variableField = value; - this.variableFieldSet = true; - } - if (("Condition" == name)) - { - this.conditionField = value; - this.conditionFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("Guid" == name)) - { - this.guidField = value; - this.guidFieldSet = true; - } - if (("ProductCode" == name)) - { - this.productCodeField = value; - this.productCodeFieldSet = true; - } - if (("Result" == name)) - { - this.resultField = ComponentSearch.ParseResultType(value); - this.resultFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum ResultType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Saves the parent directory for the component's file key path; other types of key path are returned unmodified. - /// - directory, - - /// - /// 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) - /// - state, - - /// - /// Saves the key path of the component if installed. This is the default. - /// - keyPath, - } - } - - /// - /// References a ComponentSearch. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class ComponentSearchRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ComponentSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Describes a directory search. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class DirectorySearch : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string variableField; - - private bool variableFieldSet; - - private string conditionField; - - private bool conditionFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private string pathField; - - private bool pathFieldSet; - - private ResultType resultField; - - private bool resultFieldSet; - - private ISchemaElement parentElement; - - /// - /// Id of the search for ordering and dependency. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the variable in which to place the result of the search. - /// - public string Variable - { - get - { - return this.variableField; - } - set - { - this.variableFieldSet = true; - this.variableField = value; - } - } - - /// - /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. - /// - public string Condition - { - get - { - return this.conditionField; - } - set - { - this.conditionFieldSet = true; - this.conditionField = value; - } - } - - /// - /// Id of the search that this one should come after. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// Directory path to search for. - /// - public string Path - { - get - { - return this.pathField; - } - set - { - this.pathFieldSet = true; - this.pathField = value; - } - } - - /// - /// Rather than saving the matching directory path into the variable, a DirectorySearch can save an - /// attribute of the matching directory instead. - /// - public ResultType Result - { - get - { - return this.resultField; - } - set - { - this.resultFieldSet = true; - this.resultField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ResultType from a string. - /// - public static ResultType ParseResultType(string value) - { - ResultType parsedValue; - DirectorySearch.TryParseResultType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ResultType from a string. - /// - public static bool TryParseResultType(string value, out ResultType parsedValue) - { - parsedValue = ResultType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("exists" == value)) - { - parsedValue = ResultType.exists; - } - else - { - parsedValue = ResultType.IllegalValue; - return false; - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DirectorySearch", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.variableFieldSet) - { - writer.WriteAttributeString("Variable", this.variableField); - } - if (this.conditionFieldSet) - { - writer.WriteAttributeString("Condition", this.conditionField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.pathFieldSet) - { - writer.WriteAttributeString("Path", this.pathField); - } - if (this.resultFieldSet) - { - if ((this.resultField == ResultType.exists)) - { - writer.WriteAttributeString("Result", "exists"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Variable" == name)) - { - this.variableField = value; - this.variableFieldSet = true; - } - if (("Condition" == name)) - { - this.conditionField = value; - this.conditionFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("Path" == name)) - { - this.pathField = value; - this.pathFieldSet = true; - } - if (("Result" == name)) - { - this.resultField = DirectorySearch.ParseResultType(value); - this.resultFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum ResultType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Saves true if a matching directory is found; false otherwise. - /// - exists, - } - } - - /// - /// References a DirectorySearch. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class DirectorySearchRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DirectorySearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Creates an event source. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class EventSource : ISchemaElement, ISetAttributes - { - - private int categoryCountField; - - private bool categoryCountFieldSet; - - private string categoryMessageFileField; - - private bool categoryMessageFileFieldSet; - - private string eventMessageFileField; - - private bool eventMessageFileFieldSet; - - private YesNoType keyPathField; - - private bool keyPathFieldSet; - - private string logField; - - private bool logFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string parameterMessageFileField; - - private bool parameterMessageFileFieldSet; - - private YesNoType supportsErrorsField; - - private bool supportsErrorsFieldSet; - - private YesNoType supportsFailureAuditsField; - - private bool supportsFailureAuditsFieldSet; - - private YesNoType supportsInformationalsField; - - private bool supportsInformationalsFieldSet; - - private YesNoType supportsSuccessAuditsField; - - private bool supportsSuccessAuditsFieldSet; - - private YesNoType supportsWarningsField; - - private bool supportsWarningsFieldSet; - - private ISchemaElement parentElement; - - /// - /// The number of categories in CategoryMessageFile. CategoryMessageFile - /// must be specified too. - /// - public int CategoryCount - { - get - { - return this.categoryCountField; - } - set - { - this.categoryCountFieldSet = true; - this.categoryCountField = value; - } - } - - /// - /// Name of the category message file. CategoryCount must be specified too. - /// Note that this is a formatted field, so you can use [#fileId] syntax to - /// refer to a file being installed. It is also written as a REG_EXPAND_SZ - /// string, so you can use %environment_variable% syntax to refer to a file - /// already present on the user's machine. - /// - public string CategoryMessageFile - { - get - { - return this.categoryMessageFileField; - } - set - { - this.categoryMessageFileFieldSet = true; - this.categoryMessageFileField = value; - } - } - - /// - /// Name of the event message file. - /// Note that this is a formatted field, so you can use [#fileId] syntax to - /// refer to a file being installed. It is also written as a REG_EXPAND_SZ - /// string, so you can use %environment_variable% syntax to refer to a file - /// already present on the user's machine. - /// - public string EventMessageFile - { - get - { - return this.eventMessageFileField; - } - set - { - this.eventMessageFileFieldSet = true; - this.eventMessageFileField = value; - } - } - - /// - /// Marks the EventSource registry as the key path of the component it belongs to. - /// - public YesNoType KeyPath - { - get - { - return this.keyPathField; - } - set - { - this.keyPathFieldSet = true; - this.keyPathField = value; - } - } - - /// - /// Name of the event source's log. - /// - public string Log - { - get - { - return this.logField; - } - set - { - this.logFieldSet = true; - this.logField = value; - } - } - - /// - /// Name of the event source. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Name of the parameter message file. - /// Note that this is a formatted field, so you can use [#fileId] syntax to - /// refer to a file being installed. It is also written as a REG_EXPAND_SZ - /// string, so you can use %environment_variable% syntax to refer to a file - /// already present on the user's machine. - /// - public string ParameterMessageFile - { - get - { - return this.parameterMessageFileField; - } - set - { - this.parameterMessageFileFieldSet = true; - this.parameterMessageFileField = value; - } - } - - /// - /// Equivalent to EVENTLOG_ERROR_TYPE. - /// - public YesNoType SupportsErrors - { - get - { - return this.supportsErrorsField; - } - set - { - this.supportsErrorsFieldSet = true; - this.supportsErrorsField = value; - } - } - - /// - /// Equivalent to EVENTLOG_AUDIT_FAILURE. - /// - public YesNoType SupportsFailureAudits - { - get - { - return this.supportsFailureAuditsField; - } - set - { - this.supportsFailureAuditsFieldSet = true; - this.supportsFailureAuditsField = value; - } - } - - /// - /// Equivalent to EVENTLOG_INFORMATION_TYPE. - /// - public YesNoType SupportsInformationals - { - get - { - return this.supportsInformationalsField; - } - set - { - this.supportsInformationalsFieldSet = true; - this.supportsInformationalsField = value; - } - } - - /// - /// Equivalent to EVENTLOG_AUDIT_SUCCESS. - /// - public YesNoType SupportsSuccessAudits - { - get - { - return this.supportsSuccessAuditsField; - } - set - { - this.supportsSuccessAuditsFieldSet = true; - this.supportsSuccessAuditsField = value; - } - } - - /// - /// Equivalent to EVENTLOG_WARNING_TYPE. - /// - public YesNoType SupportsWarnings - { - get - { - return this.supportsWarningsField; - } - set - { - this.supportsWarningsFieldSet = true; - this.supportsWarningsField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("EventSource", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.categoryCountFieldSet) - { - writer.WriteAttributeString("CategoryCount", this.categoryCountField.ToString(CultureInfo.InvariantCulture)); - } - if (this.categoryMessageFileFieldSet) - { - writer.WriteAttributeString("CategoryMessageFile", this.categoryMessageFileField); - } - if (this.eventMessageFileFieldSet) - { - writer.WriteAttributeString("EventMessageFile", this.eventMessageFileField); - } - if (this.keyPathFieldSet) - { - if ((this.keyPathField == YesNoType.no)) - { - writer.WriteAttributeString("KeyPath", "no"); - } - if ((this.keyPathField == YesNoType.yes)) - { - writer.WriteAttributeString("KeyPath", "yes"); - } - } - if (this.logFieldSet) - { - writer.WriteAttributeString("Log", this.logField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.parameterMessageFileFieldSet) - { - writer.WriteAttributeString("ParameterMessageFile", this.parameterMessageFileField); - } - if (this.supportsErrorsFieldSet) - { - if ((this.supportsErrorsField == YesNoType.no)) - { - writer.WriteAttributeString("SupportsErrors", "no"); - } - if ((this.supportsErrorsField == YesNoType.yes)) - { - writer.WriteAttributeString("SupportsErrors", "yes"); - } - } - if (this.supportsFailureAuditsFieldSet) - { - if ((this.supportsFailureAuditsField == YesNoType.no)) - { - writer.WriteAttributeString("SupportsFailureAudits", "no"); - } - if ((this.supportsFailureAuditsField == YesNoType.yes)) - { - writer.WriteAttributeString("SupportsFailureAudits", "yes"); - } - } - if (this.supportsInformationalsFieldSet) - { - if ((this.supportsInformationalsField == YesNoType.no)) - { - writer.WriteAttributeString("SupportsInformationals", "no"); - } - if ((this.supportsInformationalsField == YesNoType.yes)) - { - writer.WriteAttributeString("SupportsInformationals", "yes"); - } - } - if (this.supportsSuccessAuditsFieldSet) - { - if ((this.supportsSuccessAuditsField == YesNoType.no)) - { - writer.WriteAttributeString("SupportsSuccessAudits", "no"); - } - if ((this.supportsSuccessAuditsField == YesNoType.yes)) - { - writer.WriteAttributeString("SupportsSuccessAudits", "yes"); - } - } - if (this.supportsWarningsFieldSet) - { - if ((this.supportsWarningsField == YesNoType.no)) - { - writer.WriteAttributeString("SupportsWarnings", "no"); - } - if ((this.supportsWarningsField == YesNoType.yes)) - { - writer.WriteAttributeString("SupportsWarnings", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("CategoryCount" == name)) - { - this.categoryCountField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.categoryCountFieldSet = true; - } - if (("CategoryMessageFile" == name)) - { - this.categoryMessageFileField = value; - this.categoryMessageFileFieldSet = true; - } - if (("EventMessageFile" == name)) - { - this.eventMessageFileField = value; - this.eventMessageFileFieldSet = true; - } - if (("KeyPath" == name)) - { - this.keyPathField = Enums.ParseYesNoType(value); - this.keyPathFieldSet = true; - } - if (("Log" == name)) - { - this.logField = value; - this.logFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("ParameterMessageFile" == name)) - { - this.parameterMessageFileField = value; - this.parameterMessageFileFieldSet = true; - } - if (("SupportsErrors" == name)) - { - this.supportsErrorsField = Enums.ParseYesNoType(value); - this.supportsErrorsFieldSet = true; - } - if (("SupportsFailureAudits" == name)) - { - this.supportsFailureAuditsField = Enums.ParseYesNoType(value); - this.supportsFailureAuditsFieldSet = true; - } - if (("SupportsInformationals" == name)) - { - this.supportsInformationalsField = Enums.ParseYesNoType(value); - this.supportsInformationalsFieldSet = true; - } - if (("SupportsSuccessAudits" == name)) - { - this.supportsSuccessAuditsField = Enums.ParseYesNoType(value); - this.supportsSuccessAuditsFieldSet = true; - } - if (("SupportsWarnings" == name)) - { - this.supportsWarningsField = Enums.ParseYesNoType(value); - this.supportsWarningsFieldSet = true; - } - } - } - - /// - /// Describes a file search. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class FileSearch : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string variableField; - - private bool variableFieldSet; - - private string conditionField; - - private bool conditionFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private string pathField; - - private bool pathFieldSet; - - private ResultType resultField; - - private bool resultFieldSet; - - private ISchemaElement parentElement; - - /// - /// Id of the search for ordering and dependency. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the variable in which to place the result of the search. - /// - public string Variable - { - get - { - return this.variableField; - } - set - { - this.variableFieldSet = true; - this.variableField = value; - } - } - - /// - /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. - /// - public string Condition - { - get - { - return this.conditionField; - } - set - { - this.conditionFieldSet = true; - this.conditionField = value; - } - } - - /// - /// Id of the search that this one should come after. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// File path to search for. - /// - public string Path - { - get - { - return this.pathField; - } - set - { - this.pathFieldSet = true; - this.pathField = value; - } - } - - /// - /// Rather than saving the matching file path into the variable, a FileSearch can save an attribute of the matching file instead. - /// - public ResultType Result - { - get - { - return this.resultField; - } - set - { - this.resultFieldSet = true; - this.resultField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ResultType from a string. - /// - public static ResultType ParseResultType(string value) - { - ResultType parsedValue; - FileSearch.TryParseResultType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ResultType from a string. - /// - public static bool TryParseResultType(string value, out ResultType parsedValue) - { - parsedValue = ResultType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("exists" == value)) - { - parsedValue = ResultType.exists; - } - else - { - if (("version" == value)) - { - parsedValue = ResultType.version; - } - else - { - parsedValue = ResultType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FileSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.variableFieldSet) - { - writer.WriteAttributeString("Variable", this.variableField); - } - if (this.conditionFieldSet) - { - writer.WriteAttributeString("Condition", this.conditionField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.pathFieldSet) - { - writer.WriteAttributeString("Path", this.pathField); - } - if (this.resultFieldSet) - { - if ((this.resultField == ResultType.exists)) - { - writer.WriteAttributeString("Result", "exists"); - } - if ((this.resultField == ResultType.version)) - { - writer.WriteAttributeString("Result", "version"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Variable" == name)) - { - this.variableField = value; - this.variableFieldSet = true; - } - if (("Condition" == name)) - { - this.conditionField = value; - this.conditionFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("Path" == name)) - { - this.pathField = value; - this.pathFieldSet = true; - } - if (("Result" == name)) - { - this.resultField = FileSearch.ParseResultType(value); - this.resultFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum ResultType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Saves true if a matching file is found; false otherwise. - /// - exists, - - /// - /// Saves the version information for files that have it (.exe, .dll); zero-version (0.0.0.0) otherwise. - /// - version, - } - } - - /// - /// References a FileSearch. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class FileSearchRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FileSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Creates a file share out of the component's directory. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class FileShare : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private ISchemaElement parentElement; - - public FileShare() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(FileSharePermission))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for the file share (primary key). - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the file share. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Description of the file share. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("FileSharePermission" == childName)) - { - childValue = new FileSharePermission(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FileShare", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - } - } - - /// - /// Sets ACLs on a FileShare. This element has no Id attribute. - /// The table and key are taken from the parent element. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class FileSharePermission : ISchemaElement, ISetAttributes - { - - private string userField; - - private bool userFieldSet; - - private YesNoType readField; - - private bool readFieldSet; - - private YesNoType deleteField; - - private bool deleteFieldSet; - - private YesNoType readPermissionField; - - private bool readPermissionFieldSet; - - private YesNoType changePermissionField; - - private bool changePermissionFieldSet; - - private YesNoType takeOwnershipField; - - private bool takeOwnershipFieldSet; - - private YesNoType readAttributesField; - - private bool readAttributesFieldSet; - - private YesNoType writeAttributesField; - - private bool writeAttributesFieldSet; - - private YesNoType readExtendedAttributesField; - - private bool readExtendedAttributesFieldSet; - - private YesNoType writeExtendedAttributesField; - - private bool writeExtendedAttributesFieldSet; - - private YesNoType synchronizeField; - - private bool synchronizeFieldSet; - - private YesNoType createFileField; - - private bool createFileFieldSet; - - private YesNoType createChildField; - - private bool createChildFieldSet; - - private YesNoType deleteChildField; - - private bool deleteChildFieldSet; - - private YesNoType traverseField; - - private bool traverseFieldSet; - - private YesNoType genericAllField; - - private bool genericAllFieldSet; - - private YesNoType genericExecuteField; - - private bool genericExecuteFieldSet; - - private YesNoType genericWriteField; - - private bool genericWriteFieldSet; - - private YesNoType genericReadField; - - private bool genericReadFieldSet; - - private ISchemaElement parentElement; - - public string User - { - get - { - return this.userField; - } - set - { - this.userFieldSet = true; - this.userField = value; - } - } - - public YesNoType Read - { - get - { - return this.readField; - } - set - { - this.readFieldSet = true; - this.readField = value; - } - } - - public YesNoType Delete - { - get - { - return this.deleteField; - } - set - { - this.deleteFieldSet = true; - this.deleteField = value; - } - } - - public YesNoType ReadPermission - { - get - { - return this.readPermissionField; - } - set - { - this.readPermissionFieldSet = true; - this.readPermissionField = value; - } - } - - public YesNoType ChangePermission - { - get - { - return this.changePermissionField; - } - set - { - this.changePermissionFieldSet = true; - this.changePermissionField = value; - } - } - - public YesNoType TakeOwnership - { - get - { - return this.takeOwnershipField; - } - set - { - this.takeOwnershipFieldSet = true; - this.takeOwnershipField = value; - } - } - - public YesNoType ReadAttributes - { - get - { - return this.readAttributesField; - } - set - { - this.readAttributesFieldSet = true; - this.readAttributesField = value; - } - } - - public YesNoType WriteAttributes - { - get - { - return this.writeAttributesField; - } - set - { - this.writeAttributesFieldSet = true; - this.writeAttributesField = value; - } - } - - public YesNoType ReadExtendedAttributes - { - get - { - return this.readExtendedAttributesField; - } - set - { - this.readExtendedAttributesFieldSet = true; - this.readExtendedAttributesField = value; - } - } - - public YesNoType WriteExtendedAttributes - { - get - { - return this.writeExtendedAttributesField; - } - set - { - this.writeExtendedAttributesFieldSet = true; - this.writeExtendedAttributesField = value; - } - } - - public YesNoType Synchronize - { - get - { - return this.synchronizeField; - } - set - { - this.synchronizeFieldSet = true; - this.synchronizeField = value; - } - } - - /// - /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent. - /// - public YesNoType CreateFile - { - get - { - return this.createFileField; - } - set - { - this.createFileFieldSet = true; - this.createFileField = value; - } - } - - /// - /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent. - /// - public YesNoType CreateChild - { - get - { - return this.createChildField; - } - set - { - this.createChildFieldSet = true; - this.createChildField = value; - } - } - - /// - /// 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. - /// - public YesNoType DeleteChild - { - get - { - return this.deleteChildField; - } - set - { - this.deleteChildFieldSet = true; - this.deleteChildField = value; - } - } - - /// - /// 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. - /// - public YesNoType Traverse - { - get - { - return this.traverseField; - } - set - { - this.traverseFieldSet = true; - this.traverseField = value; - } - } - - public YesNoType GenericAll - { - get - { - return this.genericAllField; - } - set - { - this.genericAllFieldSet = true; - this.genericAllField = value; - } - } - - public YesNoType GenericExecute - { - get - { - return this.genericExecuteField; - } - set - { - this.genericExecuteFieldSet = true; - this.genericExecuteField = value; - } - } - - public YesNoType GenericWrite - { - get - { - return this.genericWriteField; - } - set - { - this.genericWriteFieldSet = true; - this.genericWriteField = value; - } - } - - /// - /// specifying this will fail to grant read access - /// - public YesNoType GenericRead - { - get - { - return this.genericReadField; - } - set - { - this.genericReadFieldSet = true; - this.genericReadField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FileSharePermission", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.userFieldSet) - { - writer.WriteAttributeString("User", this.userField); - } - if (this.readFieldSet) - { - if ((this.readField == YesNoType.no)) - { - writer.WriteAttributeString("Read", "no"); - } - if ((this.readField == YesNoType.yes)) - { - writer.WriteAttributeString("Read", "yes"); - } - } - if (this.deleteFieldSet) - { - if ((this.deleteField == YesNoType.no)) - { - writer.WriteAttributeString("Delete", "no"); - } - if ((this.deleteField == YesNoType.yes)) - { - writer.WriteAttributeString("Delete", "yes"); - } - } - if (this.readPermissionFieldSet) - { - if ((this.readPermissionField == YesNoType.no)) - { - writer.WriteAttributeString("ReadPermission", "no"); - } - if ((this.readPermissionField == YesNoType.yes)) - { - writer.WriteAttributeString("ReadPermission", "yes"); - } - } - if (this.changePermissionFieldSet) - { - if ((this.changePermissionField == YesNoType.no)) - { - writer.WriteAttributeString("ChangePermission", "no"); - } - if ((this.changePermissionField == YesNoType.yes)) - { - writer.WriteAttributeString("ChangePermission", "yes"); - } - } - if (this.takeOwnershipFieldSet) - { - if ((this.takeOwnershipField == YesNoType.no)) - { - writer.WriteAttributeString("TakeOwnership", "no"); - } - if ((this.takeOwnershipField == YesNoType.yes)) - { - writer.WriteAttributeString("TakeOwnership", "yes"); - } - } - if (this.readAttributesFieldSet) - { - if ((this.readAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("ReadAttributes", "no"); - } - if ((this.readAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("ReadAttributes", "yes"); - } - } - if (this.writeAttributesFieldSet) - { - if ((this.writeAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("WriteAttributes", "no"); - } - if ((this.writeAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("WriteAttributes", "yes"); - } - } - if (this.readExtendedAttributesFieldSet) - { - if ((this.readExtendedAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("ReadExtendedAttributes", "no"); - } - if ((this.readExtendedAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("ReadExtendedAttributes", "yes"); - } - } - if (this.writeExtendedAttributesFieldSet) - { - if ((this.writeExtendedAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("WriteExtendedAttributes", "no"); - } - if ((this.writeExtendedAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("WriteExtendedAttributes", "yes"); - } - } - if (this.synchronizeFieldSet) - { - if ((this.synchronizeField == YesNoType.no)) - { - writer.WriteAttributeString("Synchronize", "no"); - } - if ((this.synchronizeField == YesNoType.yes)) - { - writer.WriteAttributeString("Synchronize", "yes"); - } - } - if (this.createFileFieldSet) - { - if ((this.createFileField == YesNoType.no)) - { - writer.WriteAttributeString("CreateFile", "no"); - } - if ((this.createFileField == YesNoType.yes)) - { - writer.WriteAttributeString("CreateFile", "yes"); - } - } - if (this.createChildFieldSet) - { - if ((this.createChildField == YesNoType.no)) - { - writer.WriteAttributeString("CreateChild", "no"); - } - if ((this.createChildField == YesNoType.yes)) - { - writer.WriteAttributeString("CreateChild", "yes"); - } - } - if (this.deleteChildFieldSet) - { - if ((this.deleteChildField == YesNoType.no)) - { - writer.WriteAttributeString("DeleteChild", "no"); - } - if ((this.deleteChildField == YesNoType.yes)) - { - writer.WriteAttributeString("DeleteChild", "yes"); - } - } - if (this.traverseFieldSet) - { - if ((this.traverseField == YesNoType.no)) - { - writer.WriteAttributeString("Traverse", "no"); - } - if ((this.traverseField == YesNoType.yes)) - { - writer.WriteAttributeString("Traverse", "yes"); - } - } - if (this.genericAllFieldSet) - { - if ((this.genericAllField == YesNoType.no)) - { - writer.WriteAttributeString("GenericAll", "no"); - } - if ((this.genericAllField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericAll", "yes"); - } - } - if (this.genericExecuteFieldSet) - { - if ((this.genericExecuteField == YesNoType.no)) - { - writer.WriteAttributeString("GenericExecute", "no"); - } - if ((this.genericExecuteField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericExecute", "yes"); - } - } - if (this.genericWriteFieldSet) - { - if ((this.genericWriteField == YesNoType.no)) - { - writer.WriteAttributeString("GenericWrite", "no"); - } - if ((this.genericWriteField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericWrite", "yes"); - } - } - if (this.genericReadFieldSet) - { - if ((this.genericReadField == YesNoType.no)) - { - writer.WriteAttributeString("GenericRead", "no"); - } - if ((this.genericReadField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericRead", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("User" == name)) - { - this.userField = value; - this.userFieldSet = true; - } - if (("Read" == name)) - { - this.readField = Enums.ParseYesNoType(value); - this.readFieldSet = true; - } - if (("Delete" == name)) - { - this.deleteField = Enums.ParseYesNoType(value); - this.deleteFieldSet = true; - } - if (("ReadPermission" == name)) - { - this.readPermissionField = Enums.ParseYesNoType(value); - this.readPermissionFieldSet = true; - } - if (("ChangePermission" == name)) - { - this.changePermissionField = Enums.ParseYesNoType(value); - this.changePermissionFieldSet = true; - } - if (("TakeOwnership" == name)) - { - this.takeOwnershipField = Enums.ParseYesNoType(value); - this.takeOwnershipFieldSet = true; - } - if (("ReadAttributes" == name)) - { - this.readAttributesField = Enums.ParseYesNoType(value); - this.readAttributesFieldSet = true; - } - if (("WriteAttributes" == name)) - { - this.writeAttributesField = Enums.ParseYesNoType(value); - this.writeAttributesFieldSet = true; - } - if (("ReadExtendedAttributes" == name)) - { - this.readExtendedAttributesField = Enums.ParseYesNoType(value); - this.readExtendedAttributesFieldSet = true; - } - if (("WriteExtendedAttributes" == name)) - { - this.writeExtendedAttributesField = Enums.ParseYesNoType(value); - this.writeExtendedAttributesFieldSet = true; - } - if (("Synchronize" == name)) - { - this.synchronizeField = Enums.ParseYesNoType(value); - this.synchronizeFieldSet = true; - } - if (("CreateFile" == name)) - { - this.createFileField = Enums.ParseYesNoType(value); - this.createFileFieldSet = true; - } - if (("CreateChild" == name)) - { - this.createChildField = Enums.ParseYesNoType(value); - this.createChildFieldSet = true; - } - if (("DeleteChild" == name)) - { - this.deleteChildField = Enums.ParseYesNoType(value); - this.deleteChildFieldSet = true; - } - if (("Traverse" == name)) - { - this.traverseField = Enums.ParseYesNoType(value); - this.traverseFieldSet = true; - } - if (("GenericAll" == name)) - { - this.genericAllField = Enums.ParseYesNoType(value); - this.genericAllFieldSet = true; - } - if (("GenericExecute" == name)) - { - this.genericExecuteField = Enums.ParseYesNoType(value); - this.genericExecuteFieldSet = true; - } - if (("GenericWrite" == name)) - { - this.genericWriteField = Enums.ParseYesNoType(value); - this.genericWriteFieldSet = true; - } - if (("GenericRead" == name)) - { - this.genericReadField = Enums.ParseYesNoType(value); - this.genericReadFieldSet = true; - } - } - } - - /// - /// Formats a file's contents at install time. The contents are formatted according to the rules of the - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class FormatFile : ISchemaElement, ISetAttributes - { - - private string binaryKeyField; - - private bool binaryKeyFieldSet; - - private ISchemaElement parentElement; - - /// - /// The id of a Binary row that contains a copy of the file. The file in the Binary table overwrites whatever - /// file is installed by the parent component. - /// - public string BinaryKey - { - get - { - return this.binaryKeyField; - } - set - { - this.binaryKeyFieldSet = true; - this.binaryKeyField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FormatFile", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.binaryKeyFieldSet) - { - writer.WriteAttributeString("BinaryKey", this.binaryKeyField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("BinaryKey" == name)) - { - this.binaryKeyField = value; - this.binaryKeyFieldSet = true; - } - } - } - - /// - /// Finds user groups on the local machine or specified Active Directory domain. The local machine will be - /// searched for the group first then fallback to looking in Active Directory. This element is not capable - /// of creating new groups but can be used to add new or existing users to an existing group. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class Group : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string domainField; - - private bool domainFieldSet; - - private ISchemaElement parentElement; - - /// - /// Unique identifier in your installation package for this group. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// A - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// An optional - /// - public string Domain - { - get - { - return this.domainField; - } - set - { - this.domainFieldSet = true; - this.domainField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Group", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.domainFieldSet) - { - writer.WriteAttributeString("Domain", this.domainField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Domain" == name)) - { - this.domainField = value; - this.domainFieldSet = true; - } - } - } - - /// - /// Used to join a user to a group - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class GroupRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("GroupRef", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Creates a shortcut to a URL. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class InternetShortcut : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string directoryField; - - private bool directoryFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string targetField; - - private bool targetFieldSet; - - private TypeType typeField; - - private bool typeFieldSet; - - private string iconFileField; - - private bool iconFileFieldSet; - - private int iconIndexField; - - private bool iconIndexFieldSet; - - private ISchemaElement parentElement; - - /// - /// Unique identifier in your installation package for this Internet shortcut. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Identifier reference to Directory element where shortcut is to be created. This attribute's value defaults to the parent Component directory. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - /// - /// The name of the shortcut file, which is visible to the user. (The .lnk - /// extension is added automatically and by default, is not shown to the user.) - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// URL that should be opened when the user selects the shortcut. Windows - /// opens the URL in the appropriate handler for the protocol specified - /// in the URL. Note that this is a formatted field, so you can use - /// [#fileId] syntax to refer to a file being installed (using the file: - /// protocol). - /// - public string Target - { - get - { - return this.targetField; - } - set - { - this.targetFieldSet = true; - this.targetField = value; - } - } - - /// - /// Which type of shortcut should be created. - /// - public TypeType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - /// - /// Icon file that should be displayed. Note that this is a formatted field, so you can use - /// [#fileId] syntax to refer to a file being installed (using the file: - /// protocol). - /// - public string IconFile - { - get - { - return this.iconFileField; - } - set - { - this.iconFileFieldSet = true; - this.iconFileField = value; - } - } - - /// - /// Index of the icon being referenced - /// - public int IconIndex - { - get - { - return this.iconIndexField; - } - set - { - this.iconIndexFieldSet = true; - this.iconIndexField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a TypeType from a string. - /// - public static TypeType ParseTypeType(string value) - { - TypeType parsedValue; - InternetShortcut.TryParseTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypeType from a string. - /// - public static bool TryParseTypeType(string value, out TypeType parsedValue) - { - parsedValue = TypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("url" == value)) - { - parsedValue = TypeType.url; - } - else - { - if (("link" == value)) - { - parsedValue = TypeType.link; - } - else - { - parsedValue = TypeType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InternetShortcut", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.targetFieldSet) - { - writer.WriteAttributeString("Target", this.targetField); - } - if (this.typeFieldSet) - { - if ((this.typeField == TypeType.url)) - { - writer.WriteAttributeString("Type", "url"); - } - if ((this.typeField == TypeType.link)) - { - writer.WriteAttributeString("Type", "link"); - } - } - if (this.iconFileFieldSet) - { - writer.WriteAttributeString("IconFile", this.iconFileField); - } - if (this.iconIndexFieldSet) - { - writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture)); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Target" == name)) - { - this.targetField = value; - this.targetFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = InternetShortcut.ParseTypeType(value); - this.typeFieldSet = true; - } - if (("IconFile" == name)) - { - this.iconFileField = value; - this.iconFileFieldSet = true; - } - if (("IconIndex" == name)) - { - this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.iconIndexFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum TypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Creates .url files using IUniformResourceLocatorW. - /// - url, - - /// - /// Creates .lnk files using IShellLinkW (default). - /// - link, - } - } - - /// - /// Used to create performance categories and configure performance counters. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class PerformanceCategory : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string helpField; - - private bool helpFieldSet; - - private YesNoType multiInstanceField; - - private bool multiInstanceFieldSet; - - private string libraryField; - - private bool libraryFieldSet; - - private string openField; - - private bool openFieldSet; - - private string closeField; - - private bool closeFieldSet; - - private string collectField; - - private bool collectFieldSet; - - private PerformanceCounterLanguageType defaultLanguageField; - - private bool defaultLanguageFieldSet; - - private ISchemaElement parentElement; - - public PerformanceCategory() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PerformanceCounter))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Unique identifier in your installation package for this performance counter category. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// 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. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Optional help text for the performance counter category. - /// - public string Help - { - get - { - return this.helpField; - } - set - { - this.helpFieldSet = true; - this.helpField = value; - } - } - - /// - /// Flag that specifies whether the performance counter category is multi or single instanced. Default is single instance. - /// - public YesNoType MultiInstance - { - get - { - return this.multiInstanceField; - } - set - { - this.multiInstanceFieldSet = true; - this.multiInstanceField = value; - } - } - - /// - /// DLL that contains the performance counter. The default is "netfxperf.dll" which should be used for all managed code performance counters. - /// - public string Library - { - get - { - return this.libraryField; - } - set - { - this.libraryFieldSet = true; - this.libraryField = value; - } - } - - /// - /// 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. - /// - public string Open - { - get - { - return this.openField; - } - set - { - this.openFieldSet = true; - this.openField = value; - } - } - - /// - /// 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. - /// - public string Close - { - get - { - return this.closeField; - } - set - { - this.closeFieldSet = true; - this.closeField = value; - } - } - - /// - /// 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. - /// - public string Collect - { - get - { - return this.collectField; - } - set - { - this.collectFieldSet = true; - this.collectField = value; - } - } - - /// - /// Default language for the performance category and contained counters' names and help text. - /// - public PerformanceCounterLanguageType DefaultLanguage - { - get - { - return this.defaultLanguageField; - } - set - { - this.defaultLanguageFieldSet = true; - this.defaultLanguageField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("PerformanceCounter" == childName)) - { - childValue = new PerformanceCounter(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PerformanceCategory", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.helpFieldSet) - { - writer.WriteAttributeString("Help", this.helpField); - } - if (this.multiInstanceFieldSet) - { - if ((this.multiInstanceField == YesNoType.no)) - { - writer.WriteAttributeString("MultiInstance", "no"); - } - if ((this.multiInstanceField == YesNoType.yes)) - { - writer.WriteAttributeString("MultiInstance", "yes"); - } - } - if (this.libraryFieldSet) - { - writer.WriteAttributeString("Library", this.libraryField); - } - if (this.openFieldSet) - { - writer.WriteAttributeString("Open", this.openField); - } - if (this.closeFieldSet) - { - writer.WriteAttributeString("Close", this.closeField); - } - if (this.collectFieldSet) - { - writer.WriteAttributeString("Collect", this.collectField); - } - if (this.defaultLanguageFieldSet) - { - if ((this.defaultLanguageField == PerformanceCounterLanguageType.afrikaans)) - { - writer.WriteAttributeString("DefaultLanguage", "afrikaans"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.albanian)) - { - writer.WriteAttributeString("DefaultLanguage", "albanian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.arabic)) - { - writer.WriteAttributeString("DefaultLanguage", "arabic"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.armenian)) - { - writer.WriteAttributeString("DefaultLanguage", "armenian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.assamese)) - { - writer.WriteAttributeString("DefaultLanguage", "assamese"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.azeri)) - { - writer.WriteAttributeString("DefaultLanguage", "azeri"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.basque)) - { - writer.WriteAttributeString("DefaultLanguage", "basque"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.belarusian)) - { - writer.WriteAttributeString("DefaultLanguage", "belarusian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.bengali)) - { - writer.WriteAttributeString("DefaultLanguage", "bengali"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.bulgarian)) - { - writer.WriteAttributeString("DefaultLanguage", "bulgarian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.catalan)) - { - writer.WriteAttributeString("DefaultLanguage", "catalan"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.chinese)) - { - writer.WriteAttributeString("DefaultLanguage", "chinese"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.croatian)) - { - writer.WriteAttributeString("DefaultLanguage", "croatian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.czech)) - { - writer.WriteAttributeString("DefaultLanguage", "czech"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.danish)) - { - writer.WriteAttributeString("DefaultLanguage", "danish"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.divehi)) - { - writer.WriteAttributeString("DefaultLanguage", "divehi"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.dutch)) - { - writer.WriteAttributeString("DefaultLanguage", "dutch"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.english)) - { - writer.WriteAttributeString("DefaultLanguage", "english"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.estonian)) - { - writer.WriteAttributeString("DefaultLanguage", "estonian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.faeroese)) - { - writer.WriteAttributeString("DefaultLanguage", "faeroese"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.farsi)) - { - writer.WriteAttributeString("DefaultLanguage", "farsi"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.finnish)) - { - writer.WriteAttributeString("DefaultLanguage", "finnish"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.french)) - { - writer.WriteAttributeString("DefaultLanguage", "french"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.galician)) - { - writer.WriteAttributeString("DefaultLanguage", "galician"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.georgian)) - { - writer.WriteAttributeString("DefaultLanguage", "georgian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.german)) - { - writer.WriteAttributeString("DefaultLanguage", "german"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.greek)) - { - writer.WriteAttributeString("DefaultLanguage", "greek"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.gujarati)) - { - writer.WriteAttributeString("DefaultLanguage", "gujarati"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.hebrew)) - { - writer.WriteAttributeString("DefaultLanguage", "hebrew"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.hindi)) - { - writer.WriteAttributeString("DefaultLanguage", "hindi"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.hungarian)) - { - writer.WriteAttributeString("DefaultLanguage", "hungarian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.icelandic)) - { - writer.WriteAttributeString("DefaultLanguage", "icelandic"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.indonesian)) - { - writer.WriteAttributeString("DefaultLanguage", "indonesian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.italian)) - { - writer.WriteAttributeString("DefaultLanguage", "italian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.japanese)) - { - writer.WriteAttributeString("DefaultLanguage", "japanese"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.kannada)) - { - writer.WriteAttributeString("DefaultLanguage", "kannada"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.kashmiri)) - { - writer.WriteAttributeString("DefaultLanguage", "kashmiri"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.kazak)) - { - writer.WriteAttributeString("DefaultLanguage", "kazak"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.konkani)) - { - writer.WriteAttributeString("DefaultLanguage", "konkani"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.korean)) - { - writer.WriteAttributeString("DefaultLanguage", "korean"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.kyrgyz)) - { - writer.WriteAttributeString("DefaultLanguage", "kyrgyz"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.latvian)) - { - writer.WriteAttributeString("DefaultLanguage", "latvian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.lithuanian)) - { - writer.WriteAttributeString("DefaultLanguage", "lithuanian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.macedonian)) - { - writer.WriteAttributeString("DefaultLanguage", "macedonian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.malay)) - { - writer.WriteAttributeString("DefaultLanguage", "malay"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.malayalam)) - { - writer.WriteAttributeString("DefaultLanguage", "malayalam"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.manipuri)) - { - writer.WriteAttributeString("DefaultLanguage", "manipuri"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.marathi)) - { - writer.WriteAttributeString("DefaultLanguage", "marathi"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.mongolian)) - { - writer.WriteAttributeString("DefaultLanguage", "mongolian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.nepali)) - { - writer.WriteAttributeString("DefaultLanguage", "nepali"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.norwegian)) - { - writer.WriteAttributeString("DefaultLanguage", "norwegian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.oriya)) - { - writer.WriteAttributeString("DefaultLanguage", "oriya"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.polish)) - { - writer.WriteAttributeString("DefaultLanguage", "polish"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.portuguese)) - { - writer.WriteAttributeString("DefaultLanguage", "portuguese"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.punjabi)) - { - writer.WriteAttributeString("DefaultLanguage", "punjabi"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.romanian)) - { - writer.WriteAttributeString("DefaultLanguage", "romanian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.russian)) - { - writer.WriteAttributeString("DefaultLanguage", "russian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.sanskrit)) - { - writer.WriteAttributeString("DefaultLanguage", "sanskrit"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.serbian)) - { - writer.WriteAttributeString("DefaultLanguage", "serbian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.sindhi)) - { - writer.WriteAttributeString("DefaultLanguage", "sindhi"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.slovak)) - { - writer.WriteAttributeString("DefaultLanguage", "slovak"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.slovenian)) - { - writer.WriteAttributeString("DefaultLanguage", "slovenian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.spanish)) - { - writer.WriteAttributeString("DefaultLanguage", "spanish"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.swahili)) - { - writer.WriteAttributeString("DefaultLanguage", "swahili"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.swedish)) - { - writer.WriteAttributeString("DefaultLanguage", "swedish"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.syriac)) - { - writer.WriteAttributeString("DefaultLanguage", "syriac"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.tamil)) - { - writer.WriteAttributeString("DefaultLanguage", "tamil"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.tatar)) - { - writer.WriteAttributeString("DefaultLanguage", "tatar"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.telugu)) - { - writer.WriteAttributeString("DefaultLanguage", "telugu"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.thai)) - { - writer.WriteAttributeString("DefaultLanguage", "thai"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.turkish)) - { - writer.WriteAttributeString("DefaultLanguage", "turkish"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.ukrainian)) - { - writer.WriteAttributeString("DefaultLanguage", "ukrainian"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.urdu)) - { - writer.WriteAttributeString("DefaultLanguage", "urdu"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.uzbek)) - { - writer.WriteAttributeString("DefaultLanguage", "uzbek"); - } - if ((this.defaultLanguageField == PerformanceCounterLanguageType.vietnamese)) - { - writer.WriteAttributeString("DefaultLanguage", "vietnamese"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Help" == name)) - { - this.helpField = value; - this.helpFieldSet = true; - } - if (("MultiInstance" == name)) - { - this.multiInstanceField = Enums.ParseYesNoType(value); - this.multiInstanceFieldSet = true; - } - if (("Library" == name)) - { - this.libraryField = value; - this.libraryFieldSet = true; - } - if (("Open" == name)) - { - this.openField = value; - this.openFieldSet = true; - } - if (("Close" == name)) - { - this.closeField = value; - this.closeFieldSet = true; - } - if (("Collect" == name)) - { - this.collectField = value; - this.collectFieldSet = true; - } - if (("DefaultLanguage" == name)) - { - this.defaultLanguageField = Enums.ParsePerformanceCounterLanguageType(value); - this.defaultLanguageFieldSet = true; - } - } - } - - /// - /// Creates a performance counter in a performance category. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class PerformanceCounter : ISchemaElement, ISetAttributes - { - - private string nameField; - - private bool nameFieldSet; - - private string helpField; - - private bool helpFieldSet; - - private PerformanceCounterTypesType typeField; - - private bool typeFieldSet; - - private PerformanceCounterLanguageType languageField; - - private bool languageFieldSet; - - private ISchemaElement parentElement; - - /// - /// Name for the performance counter. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Optional help text for the performance counter. - /// - public string Help - { - get - { - return this.helpField; - } - set - { - this.helpFieldSet = true; - this.helpField = value; - } - } - - /// - /// Type of the performance counter. - /// - public PerformanceCounterTypesType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - /// - /// Language for the peformance counter name and help. The default is to use the parent PerformanceCategory element's DefaultLanguage attribute. - /// - public PerformanceCounterLanguageType Language - { - get - { - return this.languageField; - } - set - { - this.languageFieldSet = true; - this.languageField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PerformanceCounter", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.helpFieldSet) - { - writer.WriteAttributeString("Help", this.helpField); - } - if (this.typeFieldSet) - { - if ((this.typeField == PerformanceCounterTypesType.averageBase)) - { - writer.WriteAttributeString("Type", "averageBase"); - } - if ((this.typeField == PerformanceCounterTypesType.averageCount64)) - { - writer.WriteAttributeString("Type", "averageCount64"); - } - if ((this.typeField == PerformanceCounterTypesType.averageTimer32)) - { - writer.WriteAttributeString("Type", "averageTimer32"); - } - if ((this.typeField == PerformanceCounterTypesType.counterDelta32)) - { - writer.WriteAttributeString("Type", "counterDelta32"); - } - if ((this.typeField == PerformanceCounterTypesType.counterTimerInverse)) - { - writer.WriteAttributeString("Type", "counterTimerInverse"); - } - if ((this.typeField == PerformanceCounterTypesType.sampleFraction)) - { - writer.WriteAttributeString("Type", "sampleFraction"); - } - if ((this.typeField == PerformanceCounterTypesType.timer100Ns)) - { - writer.WriteAttributeString("Type", "timer100Ns"); - } - if ((this.typeField == PerformanceCounterTypesType.counterTimer)) - { - writer.WriteAttributeString("Type", "counterTimer"); - } - if ((this.typeField == PerformanceCounterTypesType.rawFraction)) - { - writer.WriteAttributeString("Type", "rawFraction"); - } - if ((this.typeField == PerformanceCounterTypesType.timer100NsInverse)) - { - writer.WriteAttributeString("Type", "timer100NsInverse"); - } - if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer)) - { - writer.WriteAttributeString("Type", "counterMultiTimer"); - } - if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer100Ns)) - { - writer.WriteAttributeString("Type", "counterMultiTimer100Ns"); - } - if ((this.typeField == PerformanceCounterTypesType.counterMultiTimerInverse)) - { - writer.WriteAttributeString("Type", "counterMultiTimerInverse"); - } - if ((this.typeField == PerformanceCounterTypesType.counterMultiTimer100NsInverse)) - { - writer.WriteAttributeString("Type", "counterMultiTimer100NsInverse"); - } - if ((this.typeField == PerformanceCounterTypesType.elapsedTime)) - { - writer.WriteAttributeString("Type", "elapsedTime"); - } - if ((this.typeField == PerformanceCounterTypesType.sampleBase)) - { - writer.WriteAttributeString("Type", "sampleBase"); - } - if ((this.typeField == PerformanceCounterTypesType.rawBase)) - { - writer.WriteAttributeString("Type", "rawBase"); - } - if ((this.typeField == PerformanceCounterTypesType.counterMultiBase)) - { - writer.WriteAttributeString("Type", "counterMultiBase"); - } - if ((this.typeField == PerformanceCounterTypesType.rateOfCountsPerSecond64)) - { - writer.WriteAttributeString("Type", "rateOfCountsPerSecond64"); - } - if ((this.typeField == PerformanceCounterTypesType.rateOfCountsPerSecond32)) - { - writer.WriteAttributeString("Type", "rateOfCountsPerSecond32"); - } - if ((this.typeField == PerformanceCounterTypesType.countPerTimeInterval64)) - { - writer.WriteAttributeString("Type", "countPerTimeInterval64"); - } - if ((this.typeField == PerformanceCounterTypesType.countPerTimeInterval32)) - { - writer.WriteAttributeString("Type", "countPerTimeInterval32"); - } - if ((this.typeField == PerformanceCounterTypesType.sampleCounter)) - { - writer.WriteAttributeString("Type", "sampleCounter"); - } - if ((this.typeField == PerformanceCounterTypesType.counterDelta64)) - { - writer.WriteAttributeString("Type", "counterDelta64"); - } - if ((this.typeField == PerformanceCounterTypesType.numberOfItems64)) - { - writer.WriteAttributeString("Type", "numberOfItems64"); - } - if ((this.typeField == PerformanceCounterTypesType.numberOfItems32)) - { - writer.WriteAttributeString("Type", "numberOfItems32"); - } - if ((this.typeField == PerformanceCounterTypesType.numberOfItemsHEX64)) - { - writer.WriteAttributeString("Type", "numberOfItemsHEX64"); - } - if ((this.typeField == PerformanceCounterTypesType.numberOfItemsHEX32)) - { - writer.WriteAttributeString("Type", "numberOfItemsHEX32"); - } - } - if (this.languageFieldSet) - { - if ((this.languageField == PerformanceCounterLanguageType.afrikaans)) - { - writer.WriteAttributeString("Language", "afrikaans"); - } - if ((this.languageField == PerformanceCounterLanguageType.albanian)) - { - writer.WriteAttributeString("Language", "albanian"); - } - if ((this.languageField == PerformanceCounterLanguageType.arabic)) - { - writer.WriteAttributeString("Language", "arabic"); - } - if ((this.languageField == PerformanceCounterLanguageType.armenian)) - { - writer.WriteAttributeString("Language", "armenian"); - } - if ((this.languageField == PerformanceCounterLanguageType.assamese)) - { - writer.WriteAttributeString("Language", "assamese"); - } - if ((this.languageField == PerformanceCounterLanguageType.azeri)) - { - writer.WriteAttributeString("Language", "azeri"); - } - if ((this.languageField == PerformanceCounterLanguageType.basque)) - { - writer.WriteAttributeString("Language", "basque"); - } - if ((this.languageField == PerformanceCounterLanguageType.belarusian)) - { - writer.WriteAttributeString("Language", "belarusian"); - } - if ((this.languageField == PerformanceCounterLanguageType.bengali)) - { - writer.WriteAttributeString("Language", "bengali"); - } - if ((this.languageField == PerformanceCounterLanguageType.bulgarian)) - { - writer.WriteAttributeString("Language", "bulgarian"); - } - if ((this.languageField == PerformanceCounterLanguageType.catalan)) - { - writer.WriteAttributeString("Language", "catalan"); - } - if ((this.languageField == PerformanceCounterLanguageType.chinese)) - { - writer.WriteAttributeString("Language", "chinese"); - } - if ((this.languageField == PerformanceCounterLanguageType.croatian)) - { - writer.WriteAttributeString("Language", "croatian"); - } - if ((this.languageField == PerformanceCounterLanguageType.czech)) - { - writer.WriteAttributeString("Language", "czech"); - } - if ((this.languageField == PerformanceCounterLanguageType.danish)) - { - writer.WriteAttributeString("Language", "danish"); - } - if ((this.languageField == PerformanceCounterLanguageType.divehi)) - { - writer.WriteAttributeString("Language", "divehi"); - } - if ((this.languageField == PerformanceCounterLanguageType.dutch)) - { - writer.WriteAttributeString("Language", "dutch"); - } - if ((this.languageField == PerformanceCounterLanguageType.english)) - { - writer.WriteAttributeString("Language", "english"); - } - if ((this.languageField == PerformanceCounterLanguageType.estonian)) - { - writer.WriteAttributeString("Language", "estonian"); - } - if ((this.languageField == PerformanceCounterLanguageType.faeroese)) - { - writer.WriteAttributeString("Language", "faeroese"); - } - if ((this.languageField == PerformanceCounterLanguageType.farsi)) - { - writer.WriteAttributeString("Language", "farsi"); - } - if ((this.languageField == PerformanceCounterLanguageType.finnish)) - { - writer.WriteAttributeString("Language", "finnish"); - } - if ((this.languageField == PerformanceCounterLanguageType.french)) - { - writer.WriteAttributeString("Language", "french"); - } - if ((this.languageField == PerformanceCounterLanguageType.galician)) - { - writer.WriteAttributeString("Language", "galician"); - } - if ((this.languageField == PerformanceCounterLanguageType.georgian)) - { - writer.WriteAttributeString("Language", "georgian"); - } - if ((this.languageField == PerformanceCounterLanguageType.german)) - { - writer.WriteAttributeString("Language", "german"); - } - if ((this.languageField == PerformanceCounterLanguageType.greek)) - { - writer.WriteAttributeString("Language", "greek"); - } - if ((this.languageField == PerformanceCounterLanguageType.gujarati)) - { - writer.WriteAttributeString("Language", "gujarati"); - } - if ((this.languageField == PerformanceCounterLanguageType.hebrew)) - { - writer.WriteAttributeString("Language", "hebrew"); - } - if ((this.languageField == PerformanceCounterLanguageType.hindi)) - { - writer.WriteAttributeString("Language", "hindi"); - } - if ((this.languageField == PerformanceCounterLanguageType.hungarian)) - { - writer.WriteAttributeString("Language", "hungarian"); - } - if ((this.languageField == PerformanceCounterLanguageType.icelandic)) - { - writer.WriteAttributeString("Language", "icelandic"); - } - if ((this.languageField == PerformanceCounterLanguageType.indonesian)) - { - writer.WriteAttributeString("Language", "indonesian"); - } - if ((this.languageField == PerformanceCounterLanguageType.italian)) - { - writer.WriteAttributeString("Language", "italian"); - } - if ((this.languageField == PerformanceCounterLanguageType.japanese)) - { - writer.WriteAttributeString("Language", "japanese"); - } - if ((this.languageField == PerformanceCounterLanguageType.kannada)) - { - writer.WriteAttributeString("Language", "kannada"); - } - if ((this.languageField == PerformanceCounterLanguageType.kashmiri)) - { - writer.WriteAttributeString("Language", "kashmiri"); - } - if ((this.languageField == PerformanceCounterLanguageType.kazak)) - { - writer.WriteAttributeString("Language", "kazak"); - } - if ((this.languageField == PerformanceCounterLanguageType.konkani)) - { - writer.WriteAttributeString("Language", "konkani"); - } - if ((this.languageField == PerformanceCounterLanguageType.korean)) - { - writer.WriteAttributeString("Language", "korean"); - } - if ((this.languageField == PerformanceCounterLanguageType.kyrgyz)) - { - writer.WriteAttributeString("Language", "kyrgyz"); - } - if ((this.languageField == PerformanceCounterLanguageType.latvian)) - { - writer.WriteAttributeString("Language", "latvian"); - } - if ((this.languageField == PerformanceCounterLanguageType.lithuanian)) - { - writer.WriteAttributeString("Language", "lithuanian"); - } - if ((this.languageField == PerformanceCounterLanguageType.macedonian)) - { - writer.WriteAttributeString("Language", "macedonian"); - } - if ((this.languageField == PerformanceCounterLanguageType.malay)) - { - writer.WriteAttributeString("Language", "malay"); - } - if ((this.languageField == PerformanceCounterLanguageType.malayalam)) - { - writer.WriteAttributeString("Language", "malayalam"); - } - if ((this.languageField == PerformanceCounterLanguageType.manipuri)) - { - writer.WriteAttributeString("Language", "manipuri"); - } - if ((this.languageField == PerformanceCounterLanguageType.marathi)) - { - writer.WriteAttributeString("Language", "marathi"); - } - if ((this.languageField == PerformanceCounterLanguageType.mongolian)) - { - writer.WriteAttributeString("Language", "mongolian"); - } - if ((this.languageField == PerformanceCounterLanguageType.nepali)) - { - writer.WriteAttributeString("Language", "nepali"); - } - if ((this.languageField == PerformanceCounterLanguageType.norwegian)) - { - writer.WriteAttributeString("Language", "norwegian"); - } - if ((this.languageField == PerformanceCounterLanguageType.oriya)) - { - writer.WriteAttributeString("Language", "oriya"); - } - if ((this.languageField == PerformanceCounterLanguageType.polish)) - { - writer.WriteAttributeString("Language", "polish"); - } - if ((this.languageField == PerformanceCounterLanguageType.portuguese)) - { - writer.WriteAttributeString("Language", "portuguese"); - } - if ((this.languageField == PerformanceCounterLanguageType.punjabi)) - { - writer.WriteAttributeString("Language", "punjabi"); - } - if ((this.languageField == PerformanceCounterLanguageType.romanian)) - { - writer.WriteAttributeString("Language", "romanian"); - } - if ((this.languageField == PerformanceCounterLanguageType.russian)) - { - writer.WriteAttributeString("Language", "russian"); - } - if ((this.languageField == PerformanceCounterLanguageType.sanskrit)) - { - writer.WriteAttributeString("Language", "sanskrit"); - } - if ((this.languageField == PerformanceCounterLanguageType.serbian)) - { - writer.WriteAttributeString("Language", "serbian"); - } - if ((this.languageField == PerformanceCounterLanguageType.sindhi)) - { - writer.WriteAttributeString("Language", "sindhi"); - } - if ((this.languageField == PerformanceCounterLanguageType.slovak)) - { - writer.WriteAttributeString("Language", "slovak"); - } - if ((this.languageField == PerformanceCounterLanguageType.slovenian)) - { - writer.WriteAttributeString("Language", "slovenian"); - } - if ((this.languageField == PerformanceCounterLanguageType.spanish)) - { - writer.WriteAttributeString("Language", "spanish"); - } - if ((this.languageField == PerformanceCounterLanguageType.swahili)) - { - writer.WriteAttributeString("Language", "swahili"); - } - if ((this.languageField == PerformanceCounterLanguageType.swedish)) - { - writer.WriteAttributeString("Language", "swedish"); - } - if ((this.languageField == PerformanceCounterLanguageType.syriac)) - { - writer.WriteAttributeString("Language", "syriac"); - } - if ((this.languageField == PerformanceCounterLanguageType.tamil)) - { - writer.WriteAttributeString("Language", "tamil"); - } - if ((this.languageField == PerformanceCounterLanguageType.tatar)) - { - writer.WriteAttributeString("Language", "tatar"); - } - if ((this.languageField == PerformanceCounterLanguageType.telugu)) - { - writer.WriteAttributeString("Language", "telugu"); - } - if ((this.languageField == PerformanceCounterLanguageType.thai)) - { - writer.WriteAttributeString("Language", "thai"); - } - if ((this.languageField == PerformanceCounterLanguageType.turkish)) - { - writer.WriteAttributeString("Language", "turkish"); - } - if ((this.languageField == PerformanceCounterLanguageType.ukrainian)) - { - writer.WriteAttributeString("Language", "ukrainian"); - } - if ((this.languageField == PerformanceCounterLanguageType.urdu)) - { - writer.WriteAttributeString("Language", "urdu"); - } - if ((this.languageField == PerformanceCounterLanguageType.uzbek)) - { - writer.WriteAttributeString("Language", "uzbek"); - } - if ((this.languageField == PerformanceCounterLanguageType.vietnamese)) - { - writer.WriteAttributeString("Language", "vietnamese"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Help" == name)) - { - this.helpField = value; - this.helpFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = Enums.ParsePerformanceCounterTypesType(value); - this.typeFieldSet = true; - } - if (("Language" == name)) - { - this.languageField = Enums.ParsePerformanceCounterLanguageType(value); - this.languageFieldSet = true; - } - } - } - - /// - /// Used to install Perfmon counters. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class PerfCounter : ISchemaElement, ISetAttributes - { - - private string nameField; - - private bool nameFieldSet; - - private ISchemaElement parentElement; - - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PerfCounter", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - } - } - - /// - /// Used to install Perfmon Counter Manifests. - /// Note that this functionality cannot be used with major upgrades that are scheduled after the InstallExecute, - /// InstallExecuteAgain, or InstallFinalize actions. For more information on major upgrade scheduling, see - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class PerfCounterManifest : ISchemaElement, ISetAttributes - { - - private string resourceFileDirectoryField; - - private bool resourceFileDirectoryFieldSet; - - private ISchemaElement parentElement; - - /// - /// 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. - /// - public string ResourceFileDirectory - { - get - { - return this.resourceFileDirectoryField; - } - set - { - this.resourceFileDirectoryFieldSet = true; - this.resourceFileDirectoryField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PerfCounterManifest", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.resourceFileDirectoryFieldSet) - { - writer.WriteAttributeString("ResourceFileDirectory", this.resourceFileDirectoryField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("ResourceFileDirectory" == name)) - { - this.resourceFileDirectoryField = value; - this.resourceFileDirectoryFieldSet = true; - } - } - } - - /// - /// Used to install Event Manifests. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class EventManifest : ISchemaElement, ISetAttributes - { - - private string messageFileField; - - private bool messageFileFieldSet; - - private string parameterFileField; - - private bool parameterFileFieldSet; - - private string resourceFileField; - - private bool resourceFileFieldSet; - - private ISchemaElement parentElement; - - /// - /// 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. - /// - public string MessageFile - { - get - { - return this.messageFileField; - } - set - { - this.messageFileFieldSet = true; - this.messageFileField = value; - } - } - - /// - /// 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. - /// - public string ParameterFile - { - get - { - return this.parameterFileField; - } - set - { - this.parameterFileFieldSet = true; - this.parameterFileField = value; - } - } - - /// - /// 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. - /// - public string ResourceFile - { - get - { - return this.resourceFileField; - } - set - { - this.resourceFileFieldSet = true; - this.resourceFileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("EventManifest", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.messageFileFieldSet) - { - writer.WriteAttributeString("MessageFile", this.messageFileField); - } - if (this.parameterFileFieldSet) - { - writer.WriteAttributeString("ParameterFile", this.parameterFileField); - } - if (this.resourceFileFieldSet) - { - writer.WriteAttributeString("ResourceFile", this.resourceFileField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("MessageFile" == name)) - { - this.messageFileField = value; - this.messageFileFieldSet = true; - } - if (("ParameterFile" == name)) - { - this.parameterFileField = value; - this.parameterFileFieldSet = true; - } - if (("ResourceFile" == name)) - { - this.resourceFileField = value; - this.resourceFileFieldSet = true; - } - } - } - - /// - /// Sets ACLs on File, Registry, CreateFolder, or ServiceInstall. When under a Registry element, this cannot be used - /// if the Action attribute's value is remove or removeKeyOnInstall. This element has no Id attribute. - /// The table and key are taken from the parent element. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class PermissionEx : ISchemaElement, ISetAttributes - { - - private string domainField; - - private bool domainFieldSet; - - private string userField; - - private bool userFieldSet; - - private YesNoType readField; - - private bool readFieldSet; - - private YesNoType deleteField; - - private bool deleteFieldSet; - - private YesNoType readPermissionField; - - private bool readPermissionFieldSet; - - private YesNoType changePermissionField; - - private bool changePermissionFieldSet; - - private YesNoType takeOwnershipField; - - private bool takeOwnershipFieldSet; - - private YesNoType readAttributesField; - - private bool readAttributesFieldSet; - - private YesNoType writeAttributesField; - - private bool writeAttributesFieldSet; - - private YesNoType readExtendedAttributesField; - - private bool readExtendedAttributesFieldSet; - - private YesNoType writeExtendedAttributesField; - - private bool writeExtendedAttributesFieldSet; - - private YesNoType synchronizeField; - - private bool synchronizeFieldSet; - - private YesNoType createFileField; - - private bool createFileFieldSet; - - private YesNoType createChildField; - - private bool createChildFieldSet; - - private YesNoType deleteChildField; - - private bool deleteChildFieldSet; - - private YesNoType traverseField; - - private bool traverseFieldSet; - - private YesNoType appendField; - - private bool appendFieldSet; - - private YesNoType executeField; - - private bool executeFieldSet; - - private YesNoType writeField; - - private bool writeFieldSet; - - private YesNoType createSubkeysField; - - private bool createSubkeysFieldSet; - - private YesNoType enumerateSubkeysField; - - private bool enumerateSubkeysFieldSet; - - private YesNoType notifyField; - - private bool notifyFieldSet; - - private YesNoType createLinkField; - - private bool createLinkFieldSet; - - private YesNoType genericAllField; - - private bool genericAllFieldSet; - - private YesNoType genericExecuteField; - - private bool genericExecuteFieldSet; - - private YesNoType genericWriteField; - - private bool genericWriteFieldSet; - - private YesNoType genericReadField; - - private bool genericReadFieldSet; - - private YesNoType serviceQueryConfigField; - - private bool serviceQueryConfigFieldSet; - - private YesNoType serviceChangeConfigField; - - private bool serviceChangeConfigFieldSet; - - private YesNoType serviceQueryStatusField; - - private bool serviceQueryStatusFieldSet; - - private YesNoType serviceEnumerateDependentsField; - - private bool serviceEnumerateDependentsFieldSet; - - private YesNoType serviceStartField; - - private bool serviceStartFieldSet; - - private YesNoType serviceStopField; - - private bool serviceStopFieldSet; - - private YesNoType servicePauseContinueField; - - private bool servicePauseContinueFieldSet; - - private YesNoType serviceInterrogateField; - - private bool serviceInterrogateFieldSet; - - private YesNoType serviceUserDefinedControlField; - - private bool serviceUserDefinedControlFieldSet; - - private ISchemaElement parentElement; - - public string Domain - { - get - { - return this.domainField; - } - set - { - this.domainFieldSet = true; - this.domainField = value; - } - } - - public string User - { - get - { - return this.userField; - } - set - { - this.userFieldSet = true; - this.userField = value; - } - } - - public YesNoType Read - { - get - { - return this.readField; - } - set - { - this.readFieldSet = true; - this.readField = value; - } - } - - public YesNoType Delete - { - get - { - return this.deleteField; - } - set - { - this.deleteFieldSet = true; - this.deleteField = value; - } - } - - public YesNoType ReadPermission - { - get - { - return this.readPermissionField; - } - set - { - this.readPermissionFieldSet = true; - this.readPermissionField = value; - } - } - - public YesNoType ChangePermission - { - get - { - return this.changePermissionField; - } - set - { - this.changePermissionFieldSet = true; - this.changePermissionField = value; - } - } - - public YesNoType TakeOwnership - { - get - { - return this.takeOwnershipField; - } - set - { - this.takeOwnershipFieldSet = true; - this.takeOwnershipField = value; - } - } - - public YesNoType ReadAttributes - { - get - { - return this.readAttributesField; - } - set - { - this.readAttributesFieldSet = true; - this.readAttributesField = value; - } - } - - public YesNoType WriteAttributes - { - get - { - return this.writeAttributesField; - } - set - { - this.writeAttributesFieldSet = true; - this.writeAttributesField = value; - } - } - - public YesNoType ReadExtendedAttributes - { - get - { - return this.readExtendedAttributesField; - } - set - { - this.readExtendedAttributesFieldSet = true; - this.readExtendedAttributesField = value; - } - } - - public YesNoType WriteExtendedAttributes - { - get - { - return this.writeExtendedAttributesField; - } - set - { - this.writeExtendedAttributesFieldSet = true; - this.writeExtendedAttributesField = value; - } - } - - public YesNoType Synchronize - { - get - { - return this.synchronizeField; - } - set - { - this.synchronizeFieldSet = true; - this.synchronizeField = value; - } - } - - /// - /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent. - /// - public YesNoType CreateFile - { - get - { - return this.createFileField; - } - set - { - this.createFileFieldSet = true; - this.createFileField = value; - } - } - - /// - /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent. - /// - public YesNoType CreateChild - { - get - { - return this.createChildField; - } - set - { - this.createChildFieldSet = true; - this.createChildField = value; - } - } - - /// - /// 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. - /// - public YesNoType DeleteChild - { - get - { - return this.deleteChildField; - } - set - { - this.deleteChildFieldSet = true; - this.deleteChildField = value; - } - } - - /// - /// 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. - /// - public YesNoType Traverse - { - get - { - return this.traverseField; - } - set - { - this.traverseFieldSet = true; - this.traverseField = value; - } - } - - public YesNoType Append - { - get - { - return this.appendField; - } - set - { - this.appendFieldSet = true; - this.appendField = value; - } - } - - public YesNoType Execute - { - get - { - return this.executeField; - } - set - { - this.executeFieldSet = true; - this.executeField = value; - } - } - - public YesNoType Write - { - get - { - return this.writeField; - } - set - { - this.writeFieldSet = true; - this.writeField = value; - } - } - - public YesNoType CreateSubkeys - { - get - { - return this.createSubkeysField; - } - set - { - this.createSubkeysFieldSet = true; - this.createSubkeysField = value; - } - } - - public YesNoType EnumerateSubkeys - { - get - { - return this.enumerateSubkeysField; - } - set - { - this.enumerateSubkeysFieldSet = true; - this.enumerateSubkeysField = value; - } - } - - public YesNoType Notify - { - get - { - return this.notifyField; - } - set - { - this.notifyFieldSet = true; - this.notifyField = value; - } - } - - public YesNoType CreateLink - { - get - { - return this.createLinkField; - } - set - { - this.createLinkFieldSet = true; - this.createLinkField = value; - } - } - - public YesNoType GenericAll - { - get - { - return this.genericAllField; - } - set - { - this.genericAllFieldSet = true; - this.genericAllField = value; - } - } - - public YesNoType GenericExecute - { - get - { - return this.genericExecuteField; - } - set - { - this.genericExecuteFieldSet = true; - this.genericExecuteField = value; - } - } - - public YesNoType GenericWrite - { - get - { - return this.genericWriteField; - } - set - { - this.genericWriteFieldSet = true; - this.genericWriteField = value; - } - } - - /// - /// specifying this will fail to grant read access - /// - public YesNoType GenericRead - { - get - { - return this.genericReadField; - } - set - { - this.genericReadFieldSet = true; - this.genericReadField = value; - } - } - - /// - /// Required to call the QueryServiceConfig and QueryServiceConfig2 functions to query the service configuration. Only valid under a 'ServiceInstall' parent. - /// - public YesNoType ServiceQueryConfig - { - get - { - return this.serviceQueryConfigField; - } - set - { - this.serviceQueryConfigFieldSet = true; - this.serviceQueryConfigField = value; - } - } - - /// - /// Required to call the ChangeServiceConfig or ChangeServiceConfig2 function to change the service configuration. Only valid under a 'ServiceInstall' parent. - /// - public YesNoType ServiceChangeConfig - { - get - { - return this.serviceChangeConfigField; - } - set - { - this.serviceChangeConfigFieldSet = true; - this.serviceChangeConfigField = value; - } - } - - /// - /// Required to call the QueryServiceStatus function to ask the service control manager about the status of the service. Only valid under a 'ServiceInstall' parent. - /// - public YesNoType ServiceQueryStatus - { - get - { - return this.serviceQueryStatusField; - } - set - { - this.serviceQueryStatusFieldSet = true; - this.serviceQueryStatusField = value; - } - } - - /// - /// Required to call the EnumDependentServices function to enumerate all the services dependent on the service. Only valid under a 'ServiceInstall' parent. - /// - public YesNoType ServiceEnumerateDependents - { - get - { - return this.serviceEnumerateDependentsField; - } - set - { - this.serviceEnumerateDependentsFieldSet = true; - this.serviceEnumerateDependentsField = value; - } - } - - /// - /// Required to call the StartService function to start the service. Only valid under a 'ServiceInstall' parent. - /// - public YesNoType ServiceStart - { - get - { - return this.serviceStartField; - } - set - { - this.serviceStartFieldSet = true; - this.serviceStartField = value; - } - } - - /// - /// Required to call the ControlService function to stop the service. Only valid under a 'ServiceInstall' parent. - /// - public YesNoType ServiceStop - { - get - { - return this.serviceStopField; - } - set - { - this.serviceStopFieldSet = true; - this.serviceStopField = value; - } - } - - /// - /// Required to call the ControlService function to pause or continue the service. Only valid under a 'ServiceInstall' parent. - /// - public YesNoType ServicePauseContinue - { - get - { - return this.servicePauseContinueField; - } - set - { - this.servicePauseContinueFieldSet = true; - this.servicePauseContinueField = value; - } - } - - /// - /// Required to call the ControlService function to ask the service to report its status immediately. Only valid under a 'ServiceInstall' parent. - /// - public YesNoType ServiceInterrogate - { - get - { - return this.serviceInterrogateField; - } - set - { - this.serviceInterrogateFieldSet = true; - this.serviceInterrogateField = value; - } - } - - /// - /// Required to call the ControlService function to specify a user-defined control code. Only valid under a 'ServiceInstall' parent. - /// - public YesNoType ServiceUserDefinedControl - { - get - { - return this.serviceUserDefinedControlField; - } - set - { - this.serviceUserDefinedControlFieldSet = true; - this.serviceUserDefinedControlField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PermissionEx", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.domainFieldSet) - { - writer.WriteAttributeString("Domain", this.domainField); - } - if (this.userFieldSet) - { - writer.WriteAttributeString("User", this.userField); - } - if (this.readFieldSet) - { - if ((this.readField == YesNoType.no)) - { - writer.WriteAttributeString("Read", "no"); - } - if ((this.readField == YesNoType.yes)) - { - writer.WriteAttributeString("Read", "yes"); - } - } - if (this.deleteFieldSet) - { - if ((this.deleteField == YesNoType.no)) - { - writer.WriteAttributeString("Delete", "no"); - } - if ((this.deleteField == YesNoType.yes)) - { - writer.WriteAttributeString("Delete", "yes"); - } - } - if (this.readPermissionFieldSet) - { - if ((this.readPermissionField == YesNoType.no)) - { - writer.WriteAttributeString("ReadPermission", "no"); - } - if ((this.readPermissionField == YesNoType.yes)) - { - writer.WriteAttributeString("ReadPermission", "yes"); - } - } - if (this.changePermissionFieldSet) - { - if ((this.changePermissionField == YesNoType.no)) - { - writer.WriteAttributeString("ChangePermission", "no"); - } - if ((this.changePermissionField == YesNoType.yes)) - { - writer.WriteAttributeString("ChangePermission", "yes"); - } - } - if (this.takeOwnershipFieldSet) - { - if ((this.takeOwnershipField == YesNoType.no)) - { - writer.WriteAttributeString("TakeOwnership", "no"); - } - if ((this.takeOwnershipField == YesNoType.yes)) - { - writer.WriteAttributeString("TakeOwnership", "yes"); - } - } - if (this.readAttributesFieldSet) - { - if ((this.readAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("ReadAttributes", "no"); - } - if ((this.readAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("ReadAttributes", "yes"); - } - } - if (this.writeAttributesFieldSet) - { - if ((this.writeAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("WriteAttributes", "no"); - } - if ((this.writeAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("WriteAttributes", "yes"); - } - } - if (this.readExtendedAttributesFieldSet) - { - if ((this.readExtendedAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("ReadExtendedAttributes", "no"); - } - if ((this.readExtendedAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("ReadExtendedAttributes", "yes"); - } - } - if (this.writeExtendedAttributesFieldSet) - { - if ((this.writeExtendedAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("WriteExtendedAttributes", "no"); - } - if ((this.writeExtendedAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("WriteExtendedAttributes", "yes"); - } - } - if (this.synchronizeFieldSet) - { - if ((this.synchronizeField == YesNoType.no)) - { - writer.WriteAttributeString("Synchronize", "no"); - } - if ((this.synchronizeField == YesNoType.yes)) - { - writer.WriteAttributeString("Synchronize", "yes"); - } - } - if (this.createFileFieldSet) - { - if ((this.createFileField == YesNoType.no)) - { - writer.WriteAttributeString("CreateFile", "no"); - } - if ((this.createFileField == YesNoType.yes)) - { - writer.WriteAttributeString("CreateFile", "yes"); - } - } - if (this.createChildFieldSet) - { - if ((this.createChildField == YesNoType.no)) - { - writer.WriteAttributeString("CreateChild", "no"); - } - if ((this.createChildField == YesNoType.yes)) - { - writer.WriteAttributeString("CreateChild", "yes"); - } - } - if (this.deleteChildFieldSet) - { - if ((this.deleteChildField == YesNoType.no)) - { - writer.WriteAttributeString("DeleteChild", "no"); - } - if ((this.deleteChildField == YesNoType.yes)) - { - writer.WriteAttributeString("DeleteChild", "yes"); - } - } - if (this.traverseFieldSet) - { - if ((this.traverseField == YesNoType.no)) - { - writer.WriteAttributeString("Traverse", "no"); - } - if ((this.traverseField == YesNoType.yes)) - { - writer.WriteAttributeString("Traverse", "yes"); - } - } - if (this.appendFieldSet) - { - if ((this.appendField == YesNoType.no)) - { - writer.WriteAttributeString("Append", "no"); - } - if ((this.appendField == YesNoType.yes)) - { - writer.WriteAttributeString("Append", "yes"); - } - } - if (this.executeFieldSet) - { - if ((this.executeField == YesNoType.no)) - { - writer.WriteAttributeString("Execute", "no"); - } - if ((this.executeField == YesNoType.yes)) - { - writer.WriteAttributeString("Execute", "yes"); - } - } - if (this.writeFieldSet) - { - if ((this.writeField == YesNoType.no)) - { - writer.WriteAttributeString("Write", "no"); - } - if ((this.writeField == YesNoType.yes)) - { - writer.WriteAttributeString("Write", "yes"); - } - } - if (this.createSubkeysFieldSet) - { - if ((this.createSubkeysField == YesNoType.no)) - { - writer.WriteAttributeString("CreateSubkeys", "no"); - } - if ((this.createSubkeysField == YesNoType.yes)) - { - writer.WriteAttributeString("CreateSubkeys", "yes"); - } - } - if (this.enumerateSubkeysFieldSet) - { - if ((this.enumerateSubkeysField == YesNoType.no)) - { - writer.WriteAttributeString("EnumerateSubkeys", "no"); - } - if ((this.enumerateSubkeysField == YesNoType.yes)) - { - writer.WriteAttributeString("EnumerateSubkeys", "yes"); - } - } - if (this.notifyFieldSet) - { - if ((this.notifyField == YesNoType.no)) - { - writer.WriteAttributeString("Notify", "no"); - } - if ((this.notifyField == YesNoType.yes)) - { - writer.WriteAttributeString("Notify", "yes"); - } - } - if (this.createLinkFieldSet) - { - if ((this.createLinkField == YesNoType.no)) - { - writer.WriteAttributeString("CreateLink", "no"); - } - if ((this.createLinkField == YesNoType.yes)) - { - writer.WriteAttributeString("CreateLink", "yes"); - } - } - if (this.genericAllFieldSet) - { - if ((this.genericAllField == YesNoType.no)) - { - writer.WriteAttributeString("GenericAll", "no"); - } - if ((this.genericAllField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericAll", "yes"); - } - } - if (this.genericExecuteFieldSet) - { - if ((this.genericExecuteField == YesNoType.no)) - { - writer.WriteAttributeString("GenericExecute", "no"); - } - if ((this.genericExecuteField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericExecute", "yes"); - } - } - if (this.genericWriteFieldSet) - { - if ((this.genericWriteField == YesNoType.no)) - { - writer.WriteAttributeString("GenericWrite", "no"); - } - if ((this.genericWriteField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericWrite", "yes"); - } - } - if (this.genericReadFieldSet) - { - if ((this.genericReadField == YesNoType.no)) - { - writer.WriteAttributeString("GenericRead", "no"); - } - if ((this.genericReadField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericRead", "yes"); - } - } - if (this.serviceQueryConfigFieldSet) - { - if ((this.serviceQueryConfigField == YesNoType.no)) - { - writer.WriteAttributeString("ServiceQueryConfig", "no"); - } - if ((this.serviceQueryConfigField == YesNoType.yes)) - { - writer.WriteAttributeString("ServiceQueryConfig", "yes"); - } - } - if (this.serviceChangeConfigFieldSet) - { - if ((this.serviceChangeConfigField == YesNoType.no)) - { - writer.WriteAttributeString("ServiceChangeConfig", "no"); - } - if ((this.serviceChangeConfigField == YesNoType.yes)) - { - writer.WriteAttributeString("ServiceChangeConfig", "yes"); - } - } - if (this.serviceQueryStatusFieldSet) - { - if ((this.serviceQueryStatusField == YesNoType.no)) - { - writer.WriteAttributeString("ServiceQueryStatus", "no"); - } - if ((this.serviceQueryStatusField == YesNoType.yes)) - { - writer.WriteAttributeString("ServiceQueryStatus", "yes"); - } - } - if (this.serviceEnumerateDependentsFieldSet) - { - if ((this.serviceEnumerateDependentsField == YesNoType.no)) - { - writer.WriteAttributeString("ServiceEnumerateDependents", "no"); - } - if ((this.serviceEnumerateDependentsField == YesNoType.yes)) - { - writer.WriteAttributeString("ServiceEnumerateDependents", "yes"); - } - } - if (this.serviceStartFieldSet) - { - if ((this.serviceStartField == YesNoType.no)) - { - writer.WriteAttributeString("ServiceStart", "no"); - } - if ((this.serviceStartField == YesNoType.yes)) - { - writer.WriteAttributeString("ServiceStart", "yes"); - } - } - if (this.serviceStopFieldSet) - { - if ((this.serviceStopField == YesNoType.no)) - { - writer.WriteAttributeString("ServiceStop", "no"); - } - if ((this.serviceStopField == YesNoType.yes)) - { - writer.WriteAttributeString("ServiceStop", "yes"); - } - } - if (this.servicePauseContinueFieldSet) - { - if ((this.servicePauseContinueField == YesNoType.no)) - { - writer.WriteAttributeString("ServicePauseContinue", "no"); - } - if ((this.servicePauseContinueField == YesNoType.yes)) - { - writer.WriteAttributeString("ServicePauseContinue", "yes"); - } - } - if (this.serviceInterrogateFieldSet) - { - if ((this.serviceInterrogateField == YesNoType.no)) - { - writer.WriteAttributeString("ServiceInterrogate", "no"); - } - if ((this.serviceInterrogateField == YesNoType.yes)) - { - writer.WriteAttributeString("ServiceInterrogate", "yes"); - } - } - if (this.serviceUserDefinedControlFieldSet) - { - if ((this.serviceUserDefinedControlField == YesNoType.no)) - { - writer.WriteAttributeString("ServiceUserDefinedControl", "no"); - } - if ((this.serviceUserDefinedControlField == YesNoType.yes)) - { - writer.WriteAttributeString("ServiceUserDefinedControl", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Domain" == name)) - { - this.domainField = value; - this.domainFieldSet = true; - } - if (("User" == name)) - { - this.userField = value; - this.userFieldSet = true; - } - if (("Read" == name)) - { - this.readField = Enums.ParseYesNoType(value); - this.readFieldSet = true; - } - if (("Delete" == name)) - { - this.deleteField = Enums.ParseYesNoType(value); - this.deleteFieldSet = true; - } - if (("ReadPermission" == name)) - { - this.readPermissionField = Enums.ParseYesNoType(value); - this.readPermissionFieldSet = true; - } - if (("ChangePermission" == name)) - { - this.changePermissionField = Enums.ParseYesNoType(value); - this.changePermissionFieldSet = true; - } - if (("TakeOwnership" == name)) - { - this.takeOwnershipField = Enums.ParseYesNoType(value); - this.takeOwnershipFieldSet = true; - } - if (("ReadAttributes" == name)) - { - this.readAttributesField = Enums.ParseYesNoType(value); - this.readAttributesFieldSet = true; - } - if (("WriteAttributes" == name)) - { - this.writeAttributesField = Enums.ParseYesNoType(value); - this.writeAttributesFieldSet = true; - } - if (("ReadExtendedAttributes" == name)) - { - this.readExtendedAttributesField = Enums.ParseYesNoType(value); - this.readExtendedAttributesFieldSet = true; - } - if (("WriteExtendedAttributes" == name)) - { - this.writeExtendedAttributesField = Enums.ParseYesNoType(value); - this.writeExtendedAttributesFieldSet = true; - } - if (("Synchronize" == name)) - { - this.synchronizeField = Enums.ParseYesNoType(value); - this.synchronizeFieldSet = true; - } - if (("CreateFile" == name)) - { - this.createFileField = Enums.ParseYesNoType(value); - this.createFileFieldSet = true; - } - if (("CreateChild" == name)) - { - this.createChildField = Enums.ParseYesNoType(value); - this.createChildFieldSet = true; - } - if (("DeleteChild" == name)) - { - this.deleteChildField = Enums.ParseYesNoType(value); - this.deleteChildFieldSet = true; - } - if (("Traverse" == name)) - { - this.traverseField = Enums.ParseYesNoType(value); - this.traverseFieldSet = true; - } - if (("Append" == name)) - { - this.appendField = Enums.ParseYesNoType(value); - this.appendFieldSet = true; - } - if (("Execute" == name)) - { - this.executeField = Enums.ParseYesNoType(value); - this.executeFieldSet = true; - } - if (("Write" == name)) - { - this.writeField = Enums.ParseYesNoType(value); - this.writeFieldSet = true; - } - if (("CreateSubkeys" == name)) - { - this.createSubkeysField = Enums.ParseYesNoType(value); - this.createSubkeysFieldSet = true; - } - if (("EnumerateSubkeys" == name)) - { - this.enumerateSubkeysField = Enums.ParseYesNoType(value); - this.enumerateSubkeysFieldSet = true; - } - if (("Notify" == name)) - { - this.notifyField = Enums.ParseYesNoType(value); - this.notifyFieldSet = true; - } - if (("CreateLink" == name)) - { - this.createLinkField = Enums.ParseYesNoType(value); - this.createLinkFieldSet = true; - } - if (("GenericAll" == name)) - { - this.genericAllField = Enums.ParseYesNoType(value); - this.genericAllFieldSet = true; - } - if (("GenericExecute" == name)) - { - this.genericExecuteField = Enums.ParseYesNoType(value); - this.genericExecuteFieldSet = true; - } - if (("GenericWrite" == name)) - { - this.genericWriteField = Enums.ParseYesNoType(value); - this.genericWriteFieldSet = true; - } - if (("GenericRead" == name)) - { - this.genericReadField = Enums.ParseYesNoType(value); - this.genericReadFieldSet = true; - } - if (("ServiceQueryConfig" == name)) - { - this.serviceQueryConfigField = Enums.ParseYesNoType(value); - this.serviceQueryConfigFieldSet = true; - } - if (("ServiceChangeConfig" == name)) - { - this.serviceChangeConfigField = Enums.ParseYesNoType(value); - this.serviceChangeConfigFieldSet = true; - } - if (("ServiceQueryStatus" == name)) - { - this.serviceQueryStatusField = Enums.ParseYesNoType(value); - this.serviceQueryStatusFieldSet = true; - } - if (("ServiceEnumerateDependents" == name)) - { - this.serviceEnumerateDependentsField = Enums.ParseYesNoType(value); - this.serviceEnumerateDependentsFieldSet = true; - } - if (("ServiceStart" == name)) - { - this.serviceStartField = Enums.ParseYesNoType(value); - this.serviceStartFieldSet = true; - } - if (("ServiceStop" == name)) - { - this.serviceStopField = Enums.ParseYesNoType(value); - this.serviceStopFieldSet = true; - } - if (("ServicePauseContinue" == name)) - { - this.servicePauseContinueField = Enums.ParseYesNoType(value); - this.servicePauseContinueFieldSet = true; - } - if (("ServiceInterrogate" == name)) - { - this.serviceInterrogateField = Enums.ParseYesNoType(value); - this.serviceInterrogateFieldSet = true; - } - if (("ServiceUserDefinedControl" == name)) - { - this.serviceUserDefinedControlField = Enums.ParseYesNoType(value); - this.serviceUserDefinedControlFieldSet = true; - } - } - } - - /// - /// Describes a product search. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class ProductSearch : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string variableField; - - private bool variableFieldSet; - - private string conditionField; - - private bool conditionFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private string guidField; - - private bool guidFieldSet; - - private string productCodeField; - - private bool productCodeFieldSet; - - private string upgradeCodeField; - - private bool upgradeCodeFieldSet; - - private ResultType resultField; - - private bool resultFieldSet; - - private ISchemaElement parentElement; - - /// - /// Id of the search for ordering and dependency. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the variable in which to place the result of the search. - /// - public string Variable - { - get - { - return this.variableField; - } - set - { - this.variableFieldSet = true; - this.variableField = value; - } - } - - /// - /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. - /// - public string Condition - { - get - { - return this.conditionField; - } - set - { - this.conditionFieldSet = true; - this.conditionField = value; - } - } - - /// - /// Id of the search that this one should come after. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// 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. - /// - public string Guid - { - get - { - return this.guidField; - } - set - { - this.guidFieldSet = true; - this.guidField = value; - } - } - - /// - /// The ProductCode to use for the search. This attribute must be omitted if UpgradeCode is specified. - /// - public string ProductCode - { - get - { - return this.productCodeField; - } - set - { - this.productCodeFieldSet = true; - this.productCodeField = value; - } - } - - /// - /// 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. - /// - public string UpgradeCode - { - get - { - return this.upgradeCodeField; - } - set - { - this.upgradeCodeFieldSet = true; - this.upgradeCodeField = value; - } - } - - /// - /// Rather than saving the product version into the variable, a ProductSearch can save another attribute of the matching product instead. - /// - public ResultType Result - { - get - { - return this.resultField; - } - set - { - this.resultFieldSet = true; - this.resultField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ResultType from a string. - /// - public static ResultType ParseResultType(string value) - { - ResultType parsedValue; - ProductSearch.TryParseResultType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ResultType from a string. - /// - public static bool TryParseResultType(string value, out ResultType parsedValue) - { - parsedValue = ResultType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("version" == value)) - { - parsedValue = ResultType.version; - } - else - { - if (("language" == value)) - { - parsedValue = ResultType.language; - } - else - { - if (("state" == value)) - { - parsedValue = ResultType.state; - } - else - { - if (("assignment" == value)) - { - parsedValue = ResultType.assignment; - } - else - { - parsedValue = ResultType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ProductSearch", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.variableFieldSet) - { - writer.WriteAttributeString("Variable", this.variableField); - } - if (this.conditionFieldSet) - { - writer.WriteAttributeString("Condition", this.conditionField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.guidFieldSet) - { - writer.WriteAttributeString("Guid", this.guidField); - } - if (this.productCodeFieldSet) - { - writer.WriteAttributeString("ProductCode", this.productCodeField); - } - if (this.upgradeCodeFieldSet) - { - writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); - } - if (this.resultFieldSet) - { - if ((this.resultField == ResultType.version)) - { - writer.WriteAttributeString("Result", "version"); - } - if ((this.resultField == ResultType.language)) - { - writer.WriteAttributeString("Result", "language"); - } - if ((this.resultField == ResultType.state)) - { - writer.WriteAttributeString("Result", "state"); - } - if ((this.resultField == ResultType.assignment)) - { - writer.WriteAttributeString("Result", "assignment"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Variable" == name)) - { - this.variableField = value; - this.variableFieldSet = true; - } - if (("Condition" == name)) - { - this.conditionField = value; - this.conditionFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("Guid" == name)) - { - this.guidField = value; - this.guidFieldSet = true; - } - if (("ProductCode" == name)) - { - this.productCodeField = value; - this.productCodeFieldSet = true; - } - if (("UpgradeCode" == name)) - { - this.upgradeCodeField = value; - this.upgradeCodeFieldSet = true; - } - if (("Result" == name)) - { - this.resultField = ProductSearch.ParseResultType(value); - this.resultFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum ResultType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Saves the version of a matching product if found; 0.0.0.0 otherwise. This is the default. - /// - version, - - /// - /// Saves the language of a matching product if found; empty otherwise. - /// - language, - - /// - /// Saves the state of the product: advertised (1), absent (2), or locally installed (5). - /// - state, - - /// - /// Saves the assignment type of the product: per-user (0), or per-machine (1). - /// - assignment, - } - } - - /// - /// References a ProductSearch. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class ProductSearchRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ProductSearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Remove a folder and all contained files and folders if the parent component is selected for installation or removal. - /// The folder must be specified in the Property attribute as the name of a property that will have a value that resolves - /// to the full path of the folder before the CostInitialize action. Note that Directory ids cannot be used. - /// For more details, see the Remarks. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class RemoveFolderEx : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string propertyField; - - private bool propertyFieldSet; - - private OnType onField; - - private bool onFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary key used to identify this particular entry. If this is not specified, a stable identifier - /// will be generated at compile time based on the other attributes. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The id of a property that resolves to the full path of the source directory. The property does not have - /// to exist in the installer database at creation time; it could be created at installation time by a custom - /// action, on the command line, etc. The property value can contain environment variables surrounded by - /// percent signs such as from a REG_EXPAND_SZ registry value; environment variables will be expanded before - /// being evaluated for a full path. - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - /// - /// This value determines when the folder may be removed. - /// - public OnType On - { - get - { - return this.onField; - } - set - { - this.onFieldSet = true; - this.onField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a OnType from a string. - /// - public static OnType ParseOnType(string value) - { - OnType parsedValue; - RemoveFolderEx.TryParseOnType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a OnType from a string. - /// - public static bool TryParseOnType(string value, out OnType parsedValue) - { - parsedValue = OnType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("install" == value)) - { - parsedValue = OnType.install; - } - else - { - if (("uninstall" == value)) - { - parsedValue = OnType.uninstall; - } - else - { - if (("both" == value)) - { - parsedValue = OnType.both; - } - else - { - parsedValue = OnType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveFolderEx", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - if (this.onFieldSet) - { - if ((this.onField == OnType.install)) - { - writer.WriteAttributeString("On", "install"); - } - if ((this.onField == OnType.uninstall)) - { - writer.WriteAttributeString("On", "uninstall"); - } - if ((this.onField == OnType.both)) - { - writer.WriteAttributeString("On", "both"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - if (("On" == name)) - { - this.onField = RemoveFolderEx.ParseOnType(value); - this.onFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum OnType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Removes the folder only when the parent component is being installed (msiInstallStateLocal or msiInstallStateSource). - /// - install, - - /// - /// Default: Removes the folder only when the parent component is being removed (msiInstallStateAbsent). - /// - uninstall, - - /// - /// Removes the folder when the parent component is being installed or removed. - /// - both, - } - } - - /// - /// Registers a resource with the Restart Manager. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class RestartResource : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string pathField; - - private bool pathFieldSet; - - private string processNameField; - - private bool processNameFieldSet; - - private string serviceNameField; - - private bool serviceNameFieldSet; - - private ISchemaElement parentElement; - - /// - /// The unique identifier for this resource. A unique identifier will - /// be generated automatically if not specified. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The full path to the process module to register with the Restart Manager. - /// This can be a formatted value that resolves to a full path. - /// - public string Path - { - get - { - return this.pathField; - } - set - { - this.pathFieldSet = true; - this.pathField = value; - } - } - - /// - /// The name of a process to register with the Restart Manager. - /// This can be a formatted value that resolves to a process name. - /// - public string ProcessName - { - get - { - return this.processNameField; - } - set - { - this.processNameFieldSet = true; - this.processNameField = value; - } - } - - /// - /// The name of a Windows service to register with the Restart Manager. - /// This can be a formatted value that resolves to a service name. - /// - public string ServiceName - { - get - { - return this.serviceNameField; - } - set - { - this.serviceNameFieldSet = true; - this.serviceNameField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RestartResource", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.pathFieldSet) - { - writer.WriteAttributeString("Path", this.pathField); - } - if (this.processNameFieldSet) - { - writer.WriteAttributeString("ProcessName", this.processNameField); - } - if (this.serviceNameFieldSet) - { - writer.WriteAttributeString("ServiceName", this.serviceNameField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Path" == name)) - { - this.pathField = value; - this.pathFieldSet = true; - } - if (("ProcessName" == name)) - { - this.processNameField = value; - this.processNameFieldSet = true; - } - if (("ServiceName" == name)) - { - this.serviceNameField = value; - this.serviceNameFieldSet = true; - } - } - } - - /// - /// Describes a registry search. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class RegistrySearch : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string variableField; - - private bool variableFieldSet; - - private string conditionField; - - private bool conditionFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private RootType rootField; - - private bool rootFieldSet; - - private string keyField; - - private bool keyFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private FormatType formatField; - - private bool formatFieldSet; - - private YesNoType expandEnvironmentVariablesField; - - private bool expandEnvironmentVariablesFieldSet; - - private ResultType resultField; - - private bool resultFieldSet; - - private YesNoType win64Field; - - private bool win64FieldSet; - - private ISchemaElement parentElement; - - /// - /// Id of the search for ordering and dependency. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the variable in which to place the result of the search. - /// - public string Variable - { - get - { - return this.variableField; - } - set - { - this.variableFieldSet = true; - this.variableField = value; - } - } - - /// - /// Condition for evaluating the search. If this evaluates to false, the search is not executed at all. - /// - public string Condition - { - get - { - return this.conditionField; - } - set - { - this.conditionFieldSet = true; - this.conditionField = value; - } - } - - /// - /// Id of the search that this one should come after. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// Registry root hive to search under. - /// - public RootType Root - { - get - { - return this.rootField; - } - set - { - this.rootFieldSet = true; - this.rootField = value; - } - } - - /// - /// Key to search for. - /// - public string Key - { - get - { - return this.keyField; - } - set - { - this.keyFieldSet = true; - this.keyField = value; - } - } - - /// - /// Optional value to search for under the given Key. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// What format to return the value in. - /// - public FormatType Format - { - get - { - return this.formatField; - } - set - { - this.formatFieldSet = true; - this.formatField = value; - } - } - - /// - /// Whether to expand any environment variables in REG_SZ, REG_EXPAND_SZ, or REG_MULTI_SZ values. - /// - public YesNoType ExpandEnvironmentVariables - { - get - { - return this.expandEnvironmentVariablesField; - } - set - { - this.expandEnvironmentVariablesFieldSet = true; - this.expandEnvironmentVariablesField = value; - } - } - - /// - /// Rather than saving the matching registry value into the variable, a RegistrySearch can save an attribute of the matching entry instead. - /// - public ResultType Result - { - get - { - return this.resultField; - } - set - { - this.resultFieldSet = true; - this.resultField = value; - } - } - - /// - /// 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'. - /// - public YesNoType Win64 - { - get - { - return this.win64Field; - } - set - { - this.win64FieldSet = true; - this.win64Field = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a RootType from a string. - /// - public static RootType ParseRootType(string value) - { - RootType parsedValue; - RegistrySearch.TryParseRootType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a RootType from a string. - /// - public static bool TryParseRootType(string value, out RootType parsedValue) - { - parsedValue = RootType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("HKLM" == value)) - { - parsedValue = RootType.HKLM; - } - else - { - if (("HKCU" == value)) - { - parsedValue = RootType.HKCU; - } - else - { - if (("HKCR" == value)) - { - parsedValue = RootType.HKCR; - } - else - { - if (("HKU" == value)) - { - parsedValue = RootType.HKU; - } - else - { - parsedValue = RootType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Parses a FormatType from a string. - /// - public static FormatType ParseFormatType(string value) - { - FormatType parsedValue; - RegistrySearch.TryParseFormatType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a FormatType from a string. - /// - public static bool TryParseFormatType(string value, out FormatType parsedValue) - { - parsedValue = FormatType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("raw" == value)) - { - parsedValue = FormatType.raw; - } - else - { - if (("compatible" == value)) - { - parsedValue = FormatType.compatible; - } - else - { - parsedValue = FormatType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Parses a ResultType from a string. - /// - public static ResultType ParseResultType(string value) - { - ResultType parsedValue; - RegistrySearch.TryParseResultType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ResultType from a string. - /// - public static bool TryParseResultType(string value, out ResultType parsedValue) - { - parsedValue = ResultType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("exists" == value)) - { - parsedValue = ResultType.exists; - } - else - { - if (("value" == value)) - { - parsedValue = ResultType.value; - } - else - { - parsedValue = ResultType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegistrySearch", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.variableFieldSet) - { - writer.WriteAttributeString("Variable", this.variableField); - } - if (this.conditionFieldSet) - { - writer.WriteAttributeString("Condition", this.conditionField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.rootFieldSet) - { - if ((this.rootField == RootType.HKLM)) - { - writer.WriteAttributeString("Root", "HKLM"); - } - if ((this.rootField == RootType.HKCU)) - { - writer.WriteAttributeString("Root", "HKCU"); - } - if ((this.rootField == RootType.HKCR)) - { - writer.WriteAttributeString("Root", "HKCR"); - } - if ((this.rootField == RootType.HKU)) - { - writer.WriteAttributeString("Root", "HKU"); - } - } - if (this.keyFieldSet) - { - writer.WriteAttributeString("Key", this.keyField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.formatFieldSet) - { - if ((this.formatField == FormatType.raw)) - { - writer.WriteAttributeString("Format", "raw"); - } - if ((this.formatField == FormatType.compatible)) - { - writer.WriteAttributeString("Format", "compatible"); - } - } - if (this.expandEnvironmentVariablesFieldSet) - { - if ((this.expandEnvironmentVariablesField == YesNoType.no)) - { - writer.WriteAttributeString("ExpandEnvironmentVariables", "no"); - } - if ((this.expandEnvironmentVariablesField == YesNoType.yes)) - { - writer.WriteAttributeString("ExpandEnvironmentVariables", "yes"); - } - } - if (this.resultFieldSet) - { - if ((this.resultField == ResultType.exists)) - { - writer.WriteAttributeString("Result", "exists"); - } - if ((this.resultField == ResultType.value)) - { - writer.WriteAttributeString("Result", "value"); - } - } - if (this.win64FieldSet) - { - if ((this.win64Field == YesNoType.no)) - { - writer.WriteAttributeString("Win64", "no"); - } - if ((this.win64Field == YesNoType.yes)) - { - writer.WriteAttributeString("Win64", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Variable" == name)) - { - this.variableField = value; - this.variableFieldSet = true; - } - if (("Condition" == name)) - { - this.conditionField = value; - this.conditionFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("Root" == name)) - { - this.rootField = RegistrySearch.ParseRootType(value); - this.rootFieldSet = true; - } - if (("Key" == name)) - { - this.keyField = value; - this.keyFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Format" == name)) - { - this.formatField = RegistrySearch.ParseFormatType(value); - this.formatFieldSet = true; - } - if (("ExpandEnvironmentVariables" == name)) - { - this.expandEnvironmentVariablesField = Enums.ParseYesNoType(value); - this.expandEnvironmentVariablesFieldSet = true; - } - if (("Result" == name)) - { - this.resultField = RegistrySearch.ParseResultType(value); - this.resultFieldSet = true; - } - if (("Win64" == name)) - { - this.win64Field = Enums.ParseYesNoType(value); - this.win64FieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum RootType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// HKEY_LOCAL_MACHINE - /// - HKLM, - - /// - /// HKEY_CURRENT_USER - /// - HKCU, - - /// - /// HKEY_CLASSES_ROOT - /// - HKCR, - - /// - /// HKEY_USERS - /// - HKU, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum FormatType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Returns the unformatted value directly from the registry. For example, a REG_DWORD value of '1' is returned as '1', not '#1'. - /// - raw, - - /// - /// Returns the value formatted as Windows Installer would. For example, a REG_DWORD value of '1' is returned as '#1', not '1'. - /// - compatible, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum ResultType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Saves true if a matching registry entry is found; false otherwise. - /// - exists, - - /// - /// Saves the value of the registry key in the variable. This is the default. - /// - value, - } - } - - /// - /// References a RegistrySearch. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class RegistrySearchRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegistrySearchRef", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Service configuration information for failure actions. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class ServiceConfig : ISchemaElement, ISetAttributes - { - - private string serviceNameField; - - private bool serviceNameFieldSet; - - private FirstFailureActionTypeType firstFailureActionTypeField; - - private bool firstFailureActionTypeFieldSet; - - private SecondFailureActionTypeType secondFailureActionTypeField; - - private bool secondFailureActionTypeFieldSet; - - private ThirdFailureActionTypeType thirdFailureActionTypeField; - - private bool thirdFailureActionTypeFieldSet; - - private int resetPeriodInDaysField; - - private bool resetPeriodInDaysFieldSet; - - private int restartServiceDelayInSecondsField; - - private bool restartServiceDelayInSecondsFieldSet; - - private string programCommandLineField; - - private bool programCommandLineFieldSet; - - private string rebootMessageField; - - private bool rebootMessageFieldSet; - - private ISchemaElement parentElement; - - /// - /// Required if not under a ServiceInstall element. - /// - public string ServiceName - { - get - { - return this.serviceNameField; - } - set - { - this.serviceNameFieldSet = true; - this.serviceNameField = value; - } - } - - /// - /// Action to take on the first failure of the service. - /// - public FirstFailureActionTypeType FirstFailureActionType - { - get - { - return this.firstFailureActionTypeField; - } - set - { - this.firstFailureActionTypeFieldSet = true; - this.firstFailureActionTypeField = value; - } - } - - /// - /// Action to take on the second failure of the service. - /// - public SecondFailureActionTypeType SecondFailureActionType - { - get - { - return this.secondFailureActionTypeField; - } - set - { - this.secondFailureActionTypeFieldSet = true; - this.secondFailureActionTypeField = value; - } - } - - /// - /// Action to take on the third failure of the service. - /// - public ThirdFailureActionTypeType ThirdFailureActionType - { - get - { - return this.thirdFailureActionTypeField; - } - set - { - this.thirdFailureActionTypeFieldSet = true; - this.thirdFailureActionTypeField = value; - } - } - - /// - /// Number of days after which to reset the failure count to zero if there are no failures. - /// - public int ResetPeriodInDays - { - get - { - return this.resetPeriodInDaysField; - } - set - { - this.resetPeriodInDaysFieldSet = true; - this.resetPeriodInDaysField = value; - } - } - - /// - /// If any of the three *ActionType attributes is "restart", this specifies the number of seconds to wait before doing so. - /// - public int RestartServiceDelayInSeconds - { - get - { - return this.restartServiceDelayInSecondsField; - } - set - { - this.restartServiceDelayInSecondsFieldSet = true; - this.restartServiceDelayInSecondsField = value; - } - } - - /// - /// If any of the three *ActionType attributes is "runCommand", this specifies the command to run when doing so. This value is formatted. - /// - public string ProgramCommandLine - { - get - { - return this.programCommandLineField; - } - set - { - this.programCommandLineFieldSet = true; - this.programCommandLineField = value; - } - } - - /// - /// If any of the three *ActionType attributes is "reboot", this specifies the message to broadcast to server users before doing so. - /// - public string RebootMessage - { - get - { - return this.rebootMessageField; - } - set - { - this.rebootMessageFieldSet = true; - this.rebootMessageField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a FirstFailureActionTypeType from a string. - /// - public static FirstFailureActionTypeType ParseFirstFailureActionTypeType(string value) - { - FirstFailureActionTypeType parsedValue; - ServiceConfig.TryParseFirstFailureActionTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a FirstFailureActionTypeType from a string. - /// - public static bool TryParseFirstFailureActionTypeType(string value, out FirstFailureActionTypeType parsedValue) - { - parsedValue = FirstFailureActionTypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("none" == value)) - { - parsedValue = FirstFailureActionTypeType.none; - } - else - { - if (("reboot" == value)) - { - parsedValue = FirstFailureActionTypeType.reboot; - } - else - { - if (("restart" == value)) - { - parsedValue = FirstFailureActionTypeType.restart; - } - else - { - if (("runCommand" == value)) - { - parsedValue = FirstFailureActionTypeType.runCommand; - } - else - { - parsedValue = FirstFailureActionTypeType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Parses a SecondFailureActionTypeType from a string. - /// - public static SecondFailureActionTypeType ParseSecondFailureActionTypeType(string value) - { - SecondFailureActionTypeType parsedValue; - ServiceConfig.TryParseSecondFailureActionTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a SecondFailureActionTypeType from a string. - /// - public static bool TryParseSecondFailureActionTypeType(string value, out SecondFailureActionTypeType parsedValue) - { - parsedValue = SecondFailureActionTypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("none" == value)) - { - parsedValue = SecondFailureActionTypeType.none; - } - else - { - if (("reboot" == value)) - { - parsedValue = SecondFailureActionTypeType.reboot; - } - else - { - if (("restart" == value)) - { - parsedValue = SecondFailureActionTypeType.restart; - } - else - { - if (("runCommand" == value)) - { - parsedValue = SecondFailureActionTypeType.runCommand; - } - else - { - parsedValue = SecondFailureActionTypeType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Parses a ThirdFailureActionTypeType from a string. - /// - public static ThirdFailureActionTypeType ParseThirdFailureActionTypeType(string value) - { - ThirdFailureActionTypeType parsedValue; - ServiceConfig.TryParseThirdFailureActionTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ThirdFailureActionTypeType from a string. - /// - public static bool TryParseThirdFailureActionTypeType(string value, out ThirdFailureActionTypeType parsedValue) - { - parsedValue = ThirdFailureActionTypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("none" == value)) - { - parsedValue = ThirdFailureActionTypeType.none; - } - else - { - if (("reboot" == value)) - { - parsedValue = ThirdFailureActionTypeType.reboot; - } - else - { - if (("restart" == value)) - { - parsedValue = ThirdFailureActionTypeType.restart; - } - else - { - if (("runCommand" == value)) - { - parsedValue = ThirdFailureActionTypeType.runCommand; - } - else - { - parsedValue = ThirdFailureActionTypeType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ServiceConfig", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.serviceNameFieldSet) - { - writer.WriteAttributeString("ServiceName", this.serviceNameField); - } - if (this.firstFailureActionTypeFieldSet) - { - if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.none)) - { - writer.WriteAttributeString("FirstFailureActionType", "none"); - } - if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.reboot)) - { - writer.WriteAttributeString("FirstFailureActionType", "reboot"); - } - if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.restart)) - { - writer.WriteAttributeString("FirstFailureActionType", "restart"); - } - if ((this.firstFailureActionTypeField == FirstFailureActionTypeType.runCommand)) - { - writer.WriteAttributeString("FirstFailureActionType", "runCommand"); - } - } - if (this.secondFailureActionTypeFieldSet) - { - if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.none)) - { - writer.WriteAttributeString("SecondFailureActionType", "none"); - } - if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.reboot)) - { - writer.WriteAttributeString("SecondFailureActionType", "reboot"); - } - if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.restart)) - { - writer.WriteAttributeString("SecondFailureActionType", "restart"); - } - if ((this.secondFailureActionTypeField == SecondFailureActionTypeType.runCommand)) - { - writer.WriteAttributeString("SecondFailureActionType", "runCommand"); - } - } - if (this.thirdFailureActionTypeFieldSet) - { - if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.none)) - { - writer.WriteAttributeString("ThirdFailureActionType", "none"); - } - if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.reboot)) - { - writer.WriteAttributeString("ThirdFailureActionType", "reboot"); - } - if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.restart)) - { - writer.WriteAttributeString("ThirdFailureActionType", "restart"); - } - if ((this.thirdFailureActionTypeField == ThirdFailureActionTypeType.runCommand)) - { - writer.WriteAttributeString("ThirdFailureActionType", "runCommand"); - } - } - if (this.resetPeriodInDaysFieldSet) - { - writer.WriteAttributeString("ResetPeriodInDays", this.resetPeriodInDaysField.ToString(CultureInfo.InvariantCulture)); - } - if (this.restartServiceDelayInSecondsFieldSet) - { - writer.WriteAttributeString("RestartServiceDelayInSeconds", this.restartServiceDelayInSecondsField.ToString(CultureInfo.InvariantCulture)); - } - if (this.programCommandLineFieldSet) - { - writer.WriteAttributeString("ProgramCommandLine", this.programCommandLineField); - } - if (this.rebootMessageFieldSet) - { - writer.WriteAttributeString("RebootMessage", this.rebootMessageField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("ServiceName" == name)) - { - this.serviceNameField = value; - this.serviceNameFieldSet = true; - } - if (("FirstFailureActionType" == name)) - { - this.firstFailureActionTypeField = ServiceConfig.ParseFirstFailureActionTypeType(value); - this.firstFailureActionTypeFieldSet = true; - } - if (("SecondFailureActionType" == name)) - { - this.secondFailureActionTypeField = ServiceConfig.ParseSecondFailureActionTypeType(value); - this.secondFailureActionTypeFieldSet = true; - } - if (("ThirdFailureActionType" == name)) - { - this.thirdFailureActionTypeField = ServiceConfig.ParseThirdFailureActionTypeType(value); - this.thirdFailureActionTypeFieldSet = true; - } - if (("ResetPeriodInDays" == name)) - { - this.resetPeriodInDaysField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.resetPeriodInDaysFieldSet = true; - } - if (("RestartServiceDelayInSeconds" == name)) - { - this.restartServiceDelayInSecondsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.restartServiceDelayInSecondsFieldSet = true; - } - if (("ProgramCommandLine" == name)) - { - this.programCommandLineField = value; - this.programCommandLineFieldSet = true; - } - if (("RebootMessage" == name)) - { - this.rebootMessageField = value; - this.rebootMessageFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum FirstFailureActionTypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - none, - - reboot, - - restart, - - runCommand, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum SecondFailureActionTypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - none, - - reboot, - - restart, - - runCommand, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum ThirdFailureActionTypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - none, - - reboot, - - restart, - - runCommand, - } - } - - /// - /// Updates the last modified date/time of a file. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class TouchFile : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string pathField; - - private bool pathFieldSet; - - private YesNoType onInstallField; - - private bool onInstallFieldSet; - - private YesNoType onReinstallField; - - private bool onReinstallFieldSet; - - private YesNoType onUninstallField; - - private bool onUninstallFieldSet; - - private YesNoType nonvitalField; - - private bool nonvitalFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier for the touch file operation. If the identifier is not specified it will be generated. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Path of the file to update. This value is formatted. - /// - public string Path - { - get - { - return this.pathField; - } - set - { - this.pathFieldSet = true; - this.pathField = value; - } - } - - /// - /// 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'. - /// - public YesNoType OnInstall - { - get - { - return this.onInstallField; - } - set - { - this.onInstallFieldSet = true; - this.onInstallField = value; - } - } - - /// - /// 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'. - /// - public YesNoType OnReinstall - { - get - { - return this.onReinstallField; - } - set - { - this.onReinstallFieldSet = true; - this.onReinstallField = value; - } - } - - /// - /// 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'. - /// - public YesNoType OnUninstall - { - get - { - return this.onUninstallField; - } - set - { - this.onUninstallFieldSet = true; - this.onUninstallField = value; - } - } - - /// - /// Indicates the installation will succeed even if the modified time of the file cannot be updated. The default is 'no'. - /// - public YesNoType Nonvital - { - get - { - return this.nonvitalField; - } - set - { - this.nonvitalFieldSet = true; - this.nonvitalField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("TouchFile", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.pathFieldSet) - { - writer.WriteAttributeString("Path", this.pathField); - } - if (this.onInstallFieldSet) - { - if ((this.onInstallField == YesNoType.no)) - { - writer.WriteAttributeString("OnInstall", "no"); - } - if ((this.onInstallField == YesNoType.yes)) - { - writer.WriteAttributeString("OnInstall", "yes"); - } - } - if (this.onReinstallFieldSet) - { - if ((this.onReinstallField == YesNoType.no)) - { - writer.WriteAttributeString("OnReinstall", "no"); - } - if ((this.onReinstallField == YesNoType.yes)) - { - writer.WriteAttributeString("OnReinstall", "yes"); - } - } - if (this.onUninstallFieldSet) - { - if ((this.onUninstallField == YesNoType.no)) - { - writer.WriteAttributeString("OnUninstall", "no"); - } - if ((this.onUninstallField == YesNoType.yes)) - { - writer.WriteAttributeString("OnUninstall", "yes"); - } - } - if (this.nonvitalFieldSet) - { - if ((this.nonvitalField == YesNoType.no)) - { - writer.WriteAttributeString("Nonvital", "no"); - } - if ((this.nonvitalField == YesNoType.yes)) - { - writer.WriteAttributeString("Nonvital", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Path" == name)) - { - this.pathField = value; - this.pathFieldSet = true; - } - if (("OnInstall" == name)) - { - this.onInstallField = Enums.ParseYesNoType(value); - this.onInstallFieldSet = true; - } - if (("OnReinstall" == name)) - { - this.onReinstallField = Enums.ParseYesNoType(value); - this.onReinstallFieldSet = true; - } - if (("OnUninstall" == name)) - { - this.onUninstallField = Enums.ParseYesNoType(value); - this.onUninstallFieldSet = true; - } - if (("Nonvital" == name)) - { - this.nonvitalField = Enums.ParseYesNoType(value); - this.nonvitalFieldSet = true; - } - } - } - - /// - /// 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. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class User : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string domainField; - - private bool domainFieldSet; - - private string passwordField; - - private bool passwordFieldSet; - - private YesNoType passwordNeverExpiresField; - - private bool passwordNeverExpiresFieldSet; - - private YesNoType canNotChangePasswordField; - - private bool canNotChangePasswordFieldSet; - - private YesNoType removeOnUninstallField; - - private bool removeOnUninstallFieldSet; - - private YesNoType failIfExistsField; - - private bool failIfExistsFieldSet; - - private YesNoType logonAsServiceField; - - private bool logonAsServiceFieldSet; - - private YesNoType logonAsBatchJobField; - - private bool logonAsBatchJobFieldSet; - - private YesNoType updateIfExistsField; - - private bool updateIfExistsFieldSet; - - private YesNoType passwordExpiredField; - - private bool passwordExpiredFieldSet; - - private YesNoType disabledField; - - private bool disabledFieldSet; - - private YesNoType createUserField; - - private bool createUserFieldSet; - - private YesNoType vitalField; - - private bool vitalFieldSet; - - private ISchemaElement parentElement; - - public User() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(GroupRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// A - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// A - /// - public string Domain - { - get - { - return this.domainField; - } - set - { - this.domainFieldSet = true; - this.domainField = value; - } - } - - /// - /// Usually a Property that is passed in on the command-line to keep it more secure. - /// - public string Password - { - get - { - return this.passwordField; - } - set - { - this.passwordFieldSet = true; - this.passwordField = value; - } - } - - /// - /// The account's password never expires. Equivalent to UF_DONT_EXPIRE_PASSWD. - /// - public YesNoType PasswordNeverExpires - { - get - { - return this.passwordNeverExpiresField; - } - set - { - this.passwordNeverExpiresFieldSet = true; - this.passwordNeverExpiresField = value; - } - } - - /// - /// The user cannot change the account's password. Equivalent to UF_PASSWD_CANT_CHANGE. - /// - public YesNoType CanNotChangePassword - { - get - { - return this.canNotChangePasswordField; - } - set - { - this.canNotChangePasswordFieldSet = true; - this.canNotChangePasswordField = value; - } - } - - /// - /// Indicates whether the user account should be removed or left behind on uninstall. - /// - public YesNoType RemoveOnUninstall - { - get - { - return this.removeOnUninstallField; - } - set - { - this.removeOnUninstallFieldSet = true; - this.removeOnUninstallField = value; - } - } - - /// - /// Indicates if the install should fail if the user already exists. - /// - public YesNoType FailIfExists - { - get - { - return this.failIfExistsField; - } - set - { - this.failIfExistsFieldSet = true; - this.failIfExistsField = value; - } - } - - /// - /// 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. - /// - public YesNoType LogonAsService - { - get - { - return this.logonAsServiceField; - } - set - { - this.logonAsServiceFieldSet = true; - this.logonAsServiceField = value; - } - } - - /// - /// 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. - /// - public YesNoType LogonAsBatchJob - { - get - { - return this.logonAsBatchJobField; - } - set - { - this.logonAsBatchJobFieldSet = true; - this.logonAsBatchJobField = value; - } - } - - /// - /// Indicates if the user account properties should be updated if the user already exists. - /// - public YesNoType UpdateIfExists - { - get - { - return this.updateIfExistsField; - } - set - { - this.updateIfExistsFieldSet = true; - this.updateIfExistsField = value; - } - } - - /// - /// Indicates whether the user must change their password on their first login. - /// - public YesNoType PasswordExpired - { - get - { - return this.passwordExpiredField; - } - set - { - this.passwordExpiredFieldSet = true; - this.passwordExpiredField = value; - } - } - - /// - /// The account is disabled. Equivalent to UF_ACCOUNTDISABLE. - /// - public YesNoType Disabled - { - get - { - return this.disabledField; - } - set - { - this.disabledFieldSet = true; - this.disabledField = value; - } - } - - /// - /// 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. - /// - public YesNoType CreateUser - { - get - { - return this.createUserField; - } - set - { - this.createUserFieldSet = true; - this.createUserField = value; - } - } - - /// - /// Indicates whether failure to create the user or add the user to a group fails the installation. The default value is "yes". - /// - public YesNoType Vital - { - get - { - return this.vitalField; - } - set - { - this.vitalFieldSet = true; - this.vitalField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("GroupRef" == childName)) - { - childValue = new GroupRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("User", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.domainFieldSet) - { - writer.WriteAttributeString("Domain", this.domainField); - } - if (this.passwordFieldSet) - { - writer.WriteAttributeString("Password", this.passwordField); - } - if (this.passwordNeverExpiresFieldSet) - { - if ((this.passwordNeverExpiresField == YesNoType.no)) - { - writer.WriteAttributeString("PasswordNeverExpires", "no"); - } - if ((this.passwordNeverExpiresField == YesNoType.yes)) - { - writer.WriteAttributeString("PasswordNeverExpires", "yes"); - } - } - if (this.canNotChangePasswordFieldSet) - { - if ((this.canNotChangePasswordField == YesNoType.no)) - { - writer.WriteAttributeString("CanNotChangePassword", "no"); - } - if ((this.canNotChangePasswordField == YesNoType.yes)) - { - writer.WriteAttributeString("CanNotChangePassword", "yes"); - } - } - if (this.removeOnUninstallFieldSet) - { - if ((this.removeOnUninstallField == YesNoType.no)) - { - writer.WriteAttributeString("RemoveOnUninstall", "no"); - } - if ((this.removeOnUninstallField == YesNoType.yes)) - { - writer.WriteAttributeString("RemoveOnUninstall", "yes"); - } - } - if (this.failIfExistsFieldSet) - { - if ((this.failIfExistsField == YesNoType.no)) - { - writer.WriteAttributeString("FailIfExists", "no"); - } - if ((this.failIfExistsField == YesNoType.yes)) - { - writer.WriteAttributeString("FailIfExists", "yes"); - } - } - if (this.logonAsServiceFieldSet) - { - if ((this.logonAsServiceField == YesNoType.no)) - { - writer.WriteAttributeString("LogonAsService", "no"); - } - if ((this.logonAsServiceField == YesNoType.yes)) - { - writer.WriteAttributeString("LogonAsService", "yes"); - } - } - if (this.logonAsBatchJobFieldSet) - { - if ((this.logonAsBatchJobField == YesNoType.no)) - { - writer.WriteAttributeString("LogonAsBatchJob", "no"); - } - if ((this.logonAsBatchJobField == YesNoType.yes)) - { - writer.WriteAttributeString("LogonAsBatchJob", "yes"); - } - } - if (this.updateIfExistsFieldSet) - { - if ((this.updateIfExistsField == YesNoType.no)) - { - writer.WriteAttributeString("UpdateIfExists", "no"); - } - if ((this.updateIfExistsField == YesNoType.yes)) - { - writer.WriteAttributeString("UpdateIfExists", "yes"); - } - } - if (this.passwordExpiredFieldSet) - { - if ((this.passwordExpiredField == YesNoType.no)) - { - writer.WriteAttributeString("PasswordExpired", "no"); - } - if ((this.passwordExpiredField == YesNoType.yes)) - { - writer.WriteAttributeString("PasswordExpired", "yes"); - } - } - if (this.disabledFieldSet) - { - if ((this.disabledField == YesNoType.no)) - { - writer.WriteAttributeString("Disabled", "no"); - } - if ((this.disabledField == YesNoType.yes)) - { - writer.WriteAttributeString("Disabled", "yes"); - } - } - if (this.createUserFieldSet) - { - if ((this.createUserField == YesNoType.no)) - { - writer.WriteAttributeString("CreateUser", "no"); - } - if ((this.createUserField == YesNoType.yes)) - { - writer.WriteAttributeString("CreateUser", "yes"); - } - } - if (this.vitalFieldSet) - { - if ((this.vitalField == YesNoType.no)) - { - writer.WriteAttributeString("Vital", "no"); - } - if ((this.vitalField == YesNoType.yes)) - { - writer.WriteAttributeString("Vital", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Domain" == name)) - { - this.domainField = value; - this.domainFieldSet = true; - } - if (("Password" == name)) - { - this.passwordField = value; - this.passwordFieldSet = true; - } - if (("PasswordNeverExpires" == name)) - { - this.passwordNeverExpiresField = Enums.ParseYesNoType(value); - this.passwordNeverExpiresFieldSet = true; - } - if (("CanNotChangePassword" == name)) - { - this.canNotChangePasswordField = Enums.ParseYesNoType(value); - this.canNotChangePasswordFieldSet = true; - } - if (("RemoveOnUninstall" == name)) - { - this.removeOnUninstallField = Enums.ParseYesNoType(value); - this.removeOnUninstallFieldSet = true; - } - if (("FailIfExists" == name)) - { - this.failIfExistsField = Enums.ParseYesNoType(value); - this.failIfExistsFieldSet = true; - } - if (("LogonAsService" == name)) - { - this.logonAsServiceField = Enums.ParseYesNoType(value); - this.logonAsServiceFieldSet = true; - } - if (("LogonAsBatchJob" == name)) - { - this.logonAsBatchJobField = Enums.ParseYesNoType(value); - this.logonAsBatchJobFieldSet = true; - } - if (("UpdateIfExists" == name)) - { - this.updateIfExistsField = Enums.ParseYesNoType(value); - this.updateIfExistsFieldSet = true; - } - if (("PasswordExpired" == name)) - { - this.passwordExpiredField = Enums.ParseYesNoType(value); - this.passwordExpiredFieldSet = true; - } - if (("Disabled" == name)) - { - this.disabledField = Enums.ParseYesNoType(value); - this.disabledFieldSet = true; - } - if (("CreateUser" == name)) - { - this.createUserField = Enums.ParseYesNoType(value); - this.createUserFieldSet = true; - } - if (("Vital" == name)) - { - this.vitalField = Enums.ParseYesNoType(value); - this.vitalFieldSet = true; - } - } - } - - /// - /// Adds or removes .xml file entries. If you use the XmlFile element you must reference WixUtilExtension.dll as it contains the XmlFile custom actions. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class XmlFile : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string elementPathField; - - private bool elementPathFieldSet; - - private string fileField; - - private bool fileFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ActionType actionField; - - private bool actionFieldSet; - - private YesNoType permanentField; - - private bool permanentFieldSet; - - private YesNoType preserveModifiedDateField; - - private bool preserveModifiedDateFieldSet; - - private int sequenceField; - - private bool sequenceFieldSet; - - private SelectionLanguageType selectionLanguageField; - - private bool selectionLanguageFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier for xml file modification. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// 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. - /// - public string ElementPath - { - get - { - return this.elementPathField; - } - set - { - this.elementPathFieldSet = true; - this.elementPathField = value; - } - } - - /// - /// Path of the .xml file to configure. - /// - public string File - { - get - { - return this.fileField; - } - set - { - this.fileFieldSet = true; - this.fileField = value; - } - } - - /// - /// 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. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The value to be written. See the - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// The type of modification to be made to the XML file when the component is installed. - /// - public ActionType Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// Specifies whether or not the modification should be removed on uninstall. This has no effect on uninstall if the action was deleteValue. - /// - public YesNoType Permanent - { - get - { - return this.permanentField; - } - set - { - this.permanentFieldSet = true; - this.permanentField = value; - } - } - - /// - /// 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. - /// - public YesNoType PreserveModifiedDate - { - get - { - return this.preserveModifiedDateField; - } - set - { - this.preserveModifiedDateFieldSet = true; - this.preserveModifiedDateField = value; - } - } - - /// - /// 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. - /// - public int Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - /// - /// Specify whether the DOM object should use XPath language or the old XSLPattern language (default) as the query language. - /// - public SelectionLanguageType SelectionLanguage - { - get - { - return this.selectionLanguageField; - } - set - { - this.selectionLanguageFieldSet = true; - this.selectionLanguageField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ActionType from a string. - /// - public static ActionType ParseActionType(string value) - { - ActionType parsedValue; - XmlFile.TryParseActionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ActionType from a string. - /// - public static bool TryParseActionType(string value, out ActionType parsedValue) - { - parsedValue = ActionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("createElement" == value)) - { - parsedValue = ActionType.createElement; - } - else - { - if (("deleteValue" == value)) - { - parsedValue = ActionType.deleteValue; - } - else - { - if (("setValue" == value)) - { - parsedValue = ActionType.setValue; - } - else - { - if (("bulkSetValue" == value)) - { - parsedValue = ActionType.bulkSetValue; - } - else - { - parsedValue = ActionType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Parses a SelectionLanguageType from a string. - /// - public static SelectionLanguageType ParseSelectionLanguageType(string value) - { - SelectionLanguageType parsedValue; - XmlFile.TryParseSelectionLanguageType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a SelectionLanguageType from a string. - /// - public static bool TryParseSelectionLanguageType(string value, out SelectionLanguageType parsedValue) - { - parsedValue = SelectionLanguageType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("XPath" == value)) - { - parsedValue = SelectionLanguageType.XPath; - } - else - { - if (("XSLPattern" == value)) - { - parsedValue = SelectionLanguageType.XSLPattern; - } - else - { - parsedValue = SelectionLanguageType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("XmlFile", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.elementPathFieldSet) - { - writer.WriteAttributeString("ElementPath", this.elementPathField); - } - if (this.fileFieldSet) - { - writer.WriteAttributeString("File", this.fileField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.actionFieldSet) - { - if ((this.actionField == ActionType.createElement)) - { - writer.WriteAttributeString("Action", "createElement"); - } - if ((this.actionField == ActionType.deleteValue)) - { - writer.WriteAttributeString("Action", "deleteValue"); - } - if ((this.actionField == ActionType.setValue)) - { - writer.WriteAttributeString("Action", "setValue"); - } - if ((this.actionField == ActionType.bulkSetValue)) - { - writer.WriteAttributeString("Action", "bulkSetValue"); - } - } - if (this.permanentFieldSet) - { - if ((this.permanentField == YesNoType.no)) - { - writer.WriteAttributeString("Permanent", "no"); - } - if ((this.permanentField == YesNoType.yes)) - { - writer.WriteAttributeString("Permanent", "yes"); - } - } - if (this.preserveModifiedDateFieldSet) - { - if ((this.preserveModifiedDateField == YesNoType.no)) - { - writer.WriteAttributeString("PreserveModifiedDate", "no"); - } - if ((this.preserveModifiedDateField == YesNoType.yes)) - { - writer.WriteAttributeString("PreserveModifiedDate", "yes"); - } - } - if (this.sequenceFieldSet) - { - writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); - } - if (this.selectionLanguageFieldSet) - { - if ((this.selectionLanguageField == SelectionLanguageType.XPath)) - { - writer.WriteAttributeString("SelectionLanguage", "XPath"); - } - if ((this.selectionLanguageField == SelectionLanguageType.XSLPattern)) - { - writer.WriteAttributeString("SelectionLanguage", "XSLPattern"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("ElementPath" == name)) - { - this.elementPathField = value; - this.elementPathFieldSet = true; - } - if (("File" == name)) - { - this.fileField = value; - this.fileFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Action" == name)) - { - this.actionField = XmlFile.ParseActionType(value); - this.actionFieldSet = true; - } - if (("Permanent" == name)) - { - this.permanentField = Enums.ParseYesNoType(value); - this.permanentFieldSet = true; - } - if (("PreserveModifiedDate" == name)) - { - this.preserveModifiedDateField = Enums.ParseYesNoType(value); - this.preserveModifiedDateFieldSet = true; - } - if (("Sequence" == name)) - { - this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sequenceFieldSet = true; - } - if (("SelectionLanguage" == name)) - { - this.selectionLanguageField = XmlFile.ParseSelectionLanguageType(value); - this.selectionLanguageFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum ActionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// 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. - /// - createElement, - - /// - /// 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. - /// - deleteValue, - - /// - /// 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. - /// - setValue, - - /// - /// 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. - /// - bulkSetValue, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum SelectionLanguageType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - XPath, - - XSLPattern, - } - } - - /// - /// Adds or removes .xml file entries. If you use the XmlConfig element you must reference WixUtilExtension.dll as it contains the XmlConfig custom actions. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class XmlConfig : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ActionType actionField; - - private bool actionFieldSet; - - private string elementIdField; - - private bool elementIdFieldSet; - - private string elementPathField; - - private bool elementPathFieldSet; - - private string fileField; - - private bool fileFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private NodeType nodeField; - - private bool nodeFieldSet; - - private OnType onField; - - private bool onFieldSet; - - private YesNoType preserveModifiedDateField; - - private bool preserveModifiedDateFieldSet; - - private int sequenceField; - - private bool sequenceFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private string verifyPathField; - - private bool verifyPathFieldSet; - - private ISchemaElement parentElement; - - public XmlConfig() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(XmlConfig))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for xml file modification. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public ActionType Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// The Id of another XmlConfig to add attributes to. In this case, the 'ElementPath', 'Action', 'Node', and 'On' attributes must be omitted. - /// - public string ElementId - { - get - { - return this.elementIdField; - } - set - { - this.elementIdFieldSet = true; - this.elementIdField = value; - } - } - - /// - /// 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. - /// - public string ElementPath - { - get - { - return this.elementPathField; - } - set - { - this.elementPathFieldSet = true; - this.elementPathField = value; - } - } - - /// - /// Path of the .xml file to configure. - /// - public string File - { - get - { - return this.fileField; - } - set - { - this.fileFieldSet = true; - this.fileField = value; - } - } - - /// - /// 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. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - public NodeType Node - { - get - { - return this.nodeField; - } - set - { - this.nodeFieldSet = true; - this.nodeField = value; - } - } - - public OnType On - { - get - { - return this.onField; - } - set - { - this.onFieldSet = true; - this.onField = value; - } - } - - /// - /// 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. - /// - public YesNoType PreserveModifiedDate - { - get - { - return this.preserveModifiedDateField; - } - set - { - this.preserveModifiedDateFieldSet = true; - this.preserveModifiedDateField = value; - } - } - - /// - /// 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. - /// - public int Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - /// - /// The value to be written. See the - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// 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. - /// - public string VerifyPath - { - get - { - return this.verifyPathField; - } - set - { - this.verifyPathFieldSet = true; - this.verifyPathField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("XmlConfig" == childName)) - { - childValue = new XmlConfig(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a ActionType from a string. - /// - public static ActionType ParseActionType(string value) - { - ActionType parsedValue; - XmlConfig.TryParseActionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ActionType from a string. - /// - public static bool TryParseActionType(string value, out ActionType parsedValue) - { - parsedValue = ActionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("create" == value)) - { - parsedValue = ActionType.create; - } - else - { - if (("delete" == value)) - { - parsedValue = ActionType.delete; - } - else - { - parsedValue = ActionType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Parses a NodeType from a string. - /// - public static NodeType ParseNodeType(string value) - { - NodeType parsedValue; - XmlConfig.TryParseNodeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a NodeType from a string. - /// - public static bool TryParseNodeType(string value, out NodeType parsedValue) - { - parsedValue = NodeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("element" == value)) - { - parsedValue = NodeType.element; - } - else - { - if (("value" == value)) - { - parsedValue = NodeType.value; - } - else - { - if (("document" == value)) - { - parsedValue = NodeType.document; - } - else - { - parsedValue = NodeType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a OnType from a string. - /// - public static OnType ParseOnType(string value) - { - OnType parsedValue; - XmlConfig.TryParseOnType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a OnType from a string. - /// - public static bool TryParseOnType(string value, out OnType parsedValue) - { - parsedValue = OnType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("install" == value)) - { - parsedValue = OnType.install; - } - else - { - if (("uninstall" == value)) - { - parsedValue = OnType.uninstall; - } - else - { - parsedValue = OnType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("XmlConfig", "http://wixtoolset.org/schemas/v4/wxs/util"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.actionFieldSet) - { - if ((this.actionField == ActionType.create)) - { - writer.WriteAttributeString("Action", "create"); - } - if ((this.actionField == ActionType.delete)) - { - writer.WriteAttributeString("Action", "delete"); - } - } - if (this.elementIdFieldSet) - { - writer.WriteAttributeString("ElementId", this.elementIdField); - } - if (this.elementPathFieldSet) - { - writer.WriteAttributeString("ElementPath", this.elementPathField); - } - if (this.fileFieldSet) - { - writer.WriteAttributeString("File", this.fileField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.nodeFieldSet) - { - if ((this.nodeField == NodeType.element)) - { - writer.WriteAttributeString("Node", "element"); - } - if ((this.nodeField == NodeType.value)) - { - writer.WriteAttributeString("Node", "value"); - } - if ((this.nodeField == NodeType.document)) - { - writer.WriteAttributeString("Node", "document"); - } - } - if (this.onFieldSet) - { - if ((this.onField == OnType.install)) - { - writer.WriteAttributeString("On", "install"); - } - if ((this.onField == OnType.uninstall)) - { - writer.WriteAttributeString("On", "uninstall"); - } - } - if (this.preserveModifiedDateFieldSet) - { - if ((this.preserveModifiedDateField == YesNoType.no)) - { - writer.WriteAttributeString("PreserveModifiedDate", "no"); - } - if ((this.preserveModifiedDateField == YesNoType.yes)) - { - writer.WriteAttributeString("PreserveModifiedDate", "yes"); - } - } - if (this.sequenceFieldSet) - { - writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.verifyPathFieldSet) - { - writer.WriteAttributeString("VerifyPath", this.verifyPathField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Action" == name)) - { - this.actionField = XmlConfig.ParseActionType(value); - this.actionFieldSet = true; - } - if (("ElementId" == name)) - { - this.elementIdField = value; - this.elementIdFieldSet = true; - } - if (("ElementPath" == name)) - { - this.elementPathField = value; - this.elementPathFieldSet = true; - } - if (("File" == name)) - { - this.fileField = value; - this.fileFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Node" == name)) - { - this.nodeField = XmlConfig.ParseNodeType(value); - this.nodeFieldSet = true; - } - if (("On" == name)) - { - this.onField = XmlConfig.ParseOnType(value); - this.onFieldSet = true; - } - if (("PreserveModifiedDate" == name)) - { - this.preserveModifiedDateField = Enums.ParseYesNoType(value); - this.preserveModifiedDateFieldSet = true; - } - if (("Sequence" == name)) - { - this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sequenceFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("VerifyPath" == name)) - { - this.verifyPathField = value; - this.verifyPathFieldSet = true; - } - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum ActionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - create, - - delete, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum NodeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - element, - - value, - - document, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum OnType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - install, - - uninstall, - } - } -} diff --git a/src/wix/heat/Serialize/vs.cs b/src/wix/heat/Serialize/vs.cs deleted file mode 100644 index 8f926efc..00000000 --- a/src/wix/heat/Serialize/vs.cs +++ /dev/null @@ -1,1574 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#pragma warning disable 1591 -namespace WixToolset.Harvesters.Serialize.VS -{ - using System; - using System.CodeDom.Compiler; - using System.Collections; - using System.Diagnostics.CodeAnalysis; - using System.Globalization; - using System.Xml; - using WixToolset.Harvesters.Serialize; - - - /// - /// Values of this type will either be "yes" or "no". - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public enum YesNoType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - no, - - yes, - } - - [GeneratedCode("XsdGen", "4.0.0.0")] - public class Enums - { - - /// - /// Parses a YesNoType from a string. - /// - public static YesNoType ParseYesNoType(string value) - { - YesNoType parsedValue; - Enums.TryParseYesNoType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a YesNoType from a string. - /// - public static bool TryParseYesNoType(string value, out YesNoType parsedValue) - { - parsedValue = YesNoType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("no" == value)) - { - parsedValue = YesNoType.no; - } - else - { - if (("yes" == value)) - { - parsedValue = YesNoType.yes; - } - else - { - parsedValue = YesNoType.IllegalValue; - return false; - } - } - return true; - } - } - - /// - /// Help Namespace for a help collection. The parent file is the key for the HxC (Collection) file. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class HelpCollection : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private YesNoType suppressCustomActionsField; - - private bool suppressCustomActionsFieldSet; - - private ISchemaElement parentElement; - - public HelpCollection() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFileRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFilterRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PlugCollectionInto))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Primary Key for HelpNamespace. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Friendly name for Namespace. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Internal Microsoft Help ID for this Namespace. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - /// - public YesNoType SuppressCustomActions - { - get - { - return this.suppressCustomActionsField; - } - set - { - this.suppressCustomActionsFieldSet = true; - this.suppressCustomActionsField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("HelpFileRef" == childName)) - { - childValue = new HelpFileRef(); - } - if (("HelpFilterRef" == childName)) - { - childValue = new HelpFilterRef(); - } - if (("PlugCollectionInto" == childName)) - { - childValue = new PlugCollectionInto(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("HelpCollection", "http://wixtoolset.org/schemas/v4/wxs/vs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.suppressCustomActionsFieldSet) - { - if ((this.suppressCustomActionsField == YesNoType.no)) - { - writer.WriteAttributeString("SuppressCustomActions", "no"); - } - if ((this.suppressCustomActionsField == YesNoType.yes)) - { - writer.WriteAttributeString("SuppressCustomActions", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("SuppressCustomActions" == name)) - { - this.suppressCustomActionsField = Enums.ParseYesNoType(value); - this.suppressCustomActionsFieldSet = true; - } - } - } - - /// - /// Filter for Help Namespace. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class HelpFilter : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string filterDefinitionField; - - private bool filterDefinitionFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private YesNoType suppressCustomActionsField; - - private bool suppressCustomActionsFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary Key for HelpFilter. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Query String for Help Filter. - /// - public string FilterDefinition - { - get - { - return this.filterDefinitionField; - } - set - { - this.filterDefinitionFieldSet = true; - this.filterDefinitionField = value; - } - } - - /// - /// Friendly name for Filter. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - /// - public YesNoType SuppressCustomActions - { - get - { - return this.suppressCustomActionsField; - } - set - { - this.suppressCustomActionsFieldSet = true; - this.suppressCustomActionsField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("HelpFilter", "http://wixtoolset.org/schemas/v4/wxs/vs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.filterDefinitionFieldSet) - { - writer.WriteAttributeString("FilterDefinition", this.filterDefinitionField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.suppressCustomActionsFieldSet) - { - if ((this.suppressCustomActionsField == YesNoType.no)) - { - writer.WriteAttributeString("SuppressCustomActions", "no"); - } - if ((this.suppressCustomActionsField == YesNoType.yes)) - { - writer.WriteAttributeString("SuppressCustomActions", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("FilterDefinition" == name)) - { - this.filterDefinitionField = value; - this.filterDefinitionFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("SuppressCustomActions" == name)) - { - this.suppressCustomActionsField = Enums.ParseYesNoType(value); - this.suppressCustomActionsFieldSet = true; - } - } - } - - /// - /// File for Help Namespace. The parent file is the key for HxS (Title) file. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class HelpFile : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string attributeIndexField; - - private bool attributeIndexFieldSet; - - private string indexField; - - private bool indexFieldSet; - - private int languageField; - - private bool languageFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string sampleLocationField; - - private bool sampleLocationFieldSet; - - private string searchField; - - private bool searchFieldSet; - - private YesNoType suppressCustomActionsField; - - private bool suppressCustomActionsFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary Key for HelpFile Table. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Key for HxR (Attributes) file. - /// - public string AttributeIndex - { - get - { - return this.attributeIndexField; - } - set - { - this.attributeIndexFieldSet = true; - this.attributeIndexField = value; - } - } - - /// - /// Key for HxI (Index) file. - /// - public string Index - { - get - { - return this.indexField; - } - set - { - this.indexFieldSet = true; - this.indexField = value; - } - } - - /// - /// Language ID for content file. - /// - public int Language - { - get - { - return this.languageField; - } - set - { - this.languageFieldSet = true; - this.languageField = value; - } - } - - /// - /// Internal Microsoft Help ID for this HelpFile. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Key for a file that is in the "root" of the samples directory for this HelpFile. - /// - public string SampleLocation - { - get - { - return this.sampleLocationField; - } - set - { - this.sampleLocationFieldSet = true; - this.sampleLocationField = value; - } - } - - /// - /// Key for HxQ (Query) file. - /// - public string Search - { - get - { - return this.searchField; - } - set - { - this.searchFieldSet = true; - this.searchField = value; - } - } - - /// - /// Suppress linking Help registration custom actions. Help redistributable merge modules will be required. Use this when building a merge module. - /// - public YesNoType SuppressCustomActions - { - get - { - return this.suppressCustomActionsField; - } - set - { - this.suppressCustomActionsFieldSet = true; - this.suppressCustomActionsField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("HelpFile", "http://wixtoolset.org/schemas/v4/wxs/vs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.attributeIndexFieldSet) - { - writer.WriteAttributeString("AttributeIndex", this.attributeIndexField); - } - if (this.indexFieldSet) - { - writer.WriteAttributeString("Index", this.indexField); - } - if (this.languageFieldSet) - { - writer.WriteAttributeString("Language", this.languageField.ToString(CultureInfo.InvariantCulture)); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.sampleLocationFieldSet) - { - writer.WriteAttributeString("SampleLocation", this.sampleLocationField); - } - if (this.searchFieldSet) - { - writer.WriteAttributeString("Search", this.searchField); - } - if (this.suppressCustomActionsFieldSet) - { - if ((this.suppressCustomActionsField == YesNoType.no)) - { - writer.WriteAttributeString("SuppressCustomActions", "no"); - } - if ((this.suppressCustomActionsField == YesNoType.yes)) - { - writer.WriteAttributeString("SuppressCustomActions", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("AttributeIndex" == name)) - { - this.attributeIndexField = value; - this.attributeIndexFieldSet = true; - } - if (("Index" == name)) - { - this.indexField = value; - this.indexFieldSet = true; - } - if (("Language" == name)) - { - this.languageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.languageFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("SampleLocation" == name)) - { - this.sampleLocationField = value; - this.sampleLocationFieldSet = true; - } - if (("Search" == name)) - { - this.searchField = value; - this.searchFieldSet = true; - } - if (("SuppressCustomActions" == name)) - { - this.suppressCustomActionsField = Enums.ParseYesNoType(value); - this.suppressCustomActionsFieldSet = true; - } - } - } - - /// - /// Plugin for Help Namespace. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class PlugCollectionInto : ISchemaElement, ISetAttributes - { - - private string attributesField; - - private bool attributesFieldSet; - - private string tableOfContentsField; - - private bool tableOfContentsFieldSet; - - private string targetCollectionField; - - private bool targetCollectionFieldSet; - - private string targetTableOfContentsField; - - private bool targetTableOfContentsFieldSet; - - private string targetFeatureField; - - private bool targetFeatureFieldSet; - - private YesNoType suppressExternalNamespacesField; - - private bool suppressExternalNamespacesFieldSet; - - private ISchemaElement parentElement; - - /// - /// Key for HxA (Attributes) file of child namespace. - /// - public string Attributes - { - get - { - return this.attributesField; - } - set - { - this.attributesFieldSet = true; - this.attributesField = value; - } - } - - /// - /// Key for HxT file of child namespace. - /// - public string TableOfContents - { - get - { - return this.tableOfContentsField; - } - set - { - this.tableOfContentsFieldSet = true; - this.tableOfContentsField = value; - } - } - - /// - /// Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted. - /// The following special keys can be used to plug into external namespaces defined outside of the installer. - /// MS_VSIPCC_v80 : Visual Studio 2005 - /// MS.VSIPCC.v90 : Visual Studio 2008 - /// - public string TargetCollection - { - get - { - return this.targetCollectionField; - } - set - { - this.targetCollectionFieldSet = true; - this.targetCollectionField = value; - } - } - - /// - /// Key for HxT file of parent namespace that now includes the new child namespace. - /// - public string TargetTableOfContents - { - get - { - return this.targetTableOfContentsField; - } - set - { - this.targetTableOfContentsFieldSet = true; - this.targetTableOfContentsField = value; - } - } - - /// - /// Key for the feature parent of this help collection. Required only when plugging into external namespaces. - /// - public string TargetFeature - { - get - { - return this.targetFeatureField; - } - set - { - this.targetFeatureFieldSet = true; - this.targetFeatureField = value; - } - } - - /// - /// Suppress linking Visual Studio Help namespaces. Help redistributable merge modules will be required. Use this when building a merge module. - /// - public YesNoType SuppressExternalNamespaces - { - get - { - return this.suppressExternalNamespacesField; - } - set - { - this.suppressExternalNamespacesFieldSet = true; - this.suppressExternalNamespacesField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PlugCollectionInto", "http://wixtoolset.org/schemas/v4/wxs/vs"); - if (this.attributesFieldSet) - { - writer.WriteAttributeString("Attributes", this.attributesField); - } - if (this.tableOfContentsFieldSet) - { - writer.WriteAttributeString("TableOfContents", this.tableOfContentsField); - } - if (this.targetCollectionFieldSet) - { - writer.WriteAttributeString("TargetCollection", this.targetCollectionField); - } - if (this.targetTableOfContentsFieldSet) - { - writer.WriteAttributeString("TargetTableOfContents", this.targetTableOfContentsField); - } - if (this.targetFeatureFieldSet) - { - writer.WriteAttributeString("TargetFeature", this.targetFeatureField); - } - if (this.suppressExternalNamespacesFieldSet) - { - if ((this.suppressExternalNamespacesField == YesNoType.no)) - { - writer.WriteAttributeString("SuppressExternalNamespaces", "no"); - } - if ((this.suppressExternalNamespacesField == YesNoType.yes)) - { - writer.WriteAttributeString("SuppressExternalNamespaces", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Attributes" == name)) - { - this.attributesField = value; - this.attributesFieldSet = true; - } - if (("TableOfContents" == name)) - { - this.tableOfContentsField = value; - this.tableOfContentsFieldSet = true; - } - if (("TargetCollection" == name)) - { - this.targetCollectionField = value; - this.targetCollectionFieldSet = true; - } - if (("TargetTableOfContents" == name)) - { - this.targetTableOfContentsField = value; - this.targetTableOfContentsFieldSet = true; - } - if (("TargetFeature" == name)) - { - this.targetFeatureField = value; - this.targetFeatureFieldSet = true; - } - if (("SuppressExternalNamespaces" == name)) - { - this.suppressExternalNamespacesField = Enums.ParseYesNoType(value); - this.suppressExternalNamespacesFieldSet = true; - } - } - } - - /// - /// Create a reference to a HelpFile element in another Fragment. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class HelpFileRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary Key for HelpFile Table. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("HelpFileRef", "http://wixtoolset.org/schemas/v4/wxs/vs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Create a reference to a HelpFile element in another Fragment. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class HelpFilterRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary Key for HelpFilter. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("HelpFilterRef", "http://wixtoolset.org/schemas/v4/wxs/vs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Create a reference to a HelpCollection element in another Fragment. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class HelpCollectionRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public HelpCollectionRef() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(HelpFileRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Primary Key for HelpNamespace Table. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("HelpFileRef" == childName)) - { - childValue = new HelpFileRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("HelpCollectionRef", "http://wixtoolset.org/schemas/v4/wxs/vs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// This element provides the metdata required to install/uninstall a file as - /// a VSIX Package. The VSIX package file will be installed as part of the MSI - /// then passed to the VSIX installer to install the VSIX package. To avoid the - /// duplication, simply use the MSI to install the VSIX package itself. - /// - [GeneratedCode("XsdGen", "4.0.0.0")] - public class VsixPackage : ISchemaElement, ISetAttributes - { - - private string fileField; - - private bool fileFieldSet; - - private string packageIdField; - - private bool packageIdFieldSet; - - private YesNoType permanentField; - - private bool permanentFieldSet; - - private string targetField; - - private bool targetFieldSet; - - private string targetVersionField; - - private bool targetVersionFieldSet; - - private YesNoType vitalField; - - private bool vitalFieldSet; - - private string vsixInstallerPathPropertyField; - - private bool vsixInstallerPathPropertyFieldSet; - - private ISchemaElement parentElement; - - /// - /// Reference to file identifer. This attribute is required when the element is not a - /// child of a File element and is invalid when the element is a child of the File element. - /// - public string File - { - get - { - return this.fileField; - } - set - { - this.fileFieldSet = true; - this.fileField = value; - } - } - - /// - /// Identity of the VSIX package per its internal manifest. If this value is not correct - /// the VSIX package will not correctly uninstall. - /// - public string PackageId - { - get - { - return this.packageIdField; - } - set - { - this.packageIdFieldSet = true; - this.packageIdField = value; - } - } - - /// - /// Indicates whether the VSIX package is uninstalled when the parent Component is uninstalled. - /// The default is 'no'. - /// - public YesNoType Permanent - { - get - { - return this.permanentField; - } - set - { - this.permanentFieldSet = true; - this.permanentField = value; - } - } - - /// - /// Specifies the SKU of Visual Studio in which to register the extension. If no target - /// is specified the extension is registered with all installed SKUs. If the Target - /// attribute is specified the TargetVersion attribute must also be specified. The - /// following is a list of known Visual Studio targets: integratedShell, professional, - /// premium, ultimate, vbExpress, vcExpress, vcsExpress, vwdExpress - /// - public string Target - { - get - { - return this.targetField; - } - set - { - this.targetFieldSet = true; - this.targetField = value; - } - } - - /// - /// Specifies the version of Visual Studio in which to register the extension. This attribute - /// is required if the Target attribute is specified. - /// - public string TargetVersion - { - get - { - return this.targetVersionField; - } - set - { - this.targetVersionFieldSet = true; - this.targetVersionField = value; - } - } - - /// - /// Indicates whether failure to install the VSIX package causes the installation to rollback. - /// The default is 'yes'. - /// - public YesNoType Vital - { - get - { - return this.vitalField; - } - set - { - this.vitalFieldSet = true; - this.vitalField = value; - } - } - - /// - /// Optional reference to a Property element that contains the path to the VsixInstaller.exe. - /// By default, the latest VsixInstaller.exe on the machine will be used to install the VSIX - /// package. It is highly recommended that this attribute is *not* used. - /// - public string VsixInstallerPathProperty - { - get - { - return this.vsixInstallerPathPropertyField; - } - set - { - this.vsixInstallerPathPropertyFieldSet = true; - this.vsixInstallerPathPropertyField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("VsixPackage", "http://wixtoolset.org/schemas/v4/wxs/vs"); - if (this.fileFieldSet) - { - writer.WriteAttributeString("File", this.fileField); - } - if (this.packageIdFieldSet) - { - writer.WriteAttributeString("PackageId", this.packageIdField); - } - if (this.permanentFieldSet) - { - if ((this.permanentField == YesNoType.no)) - { - writer.WriteAttributeString("Permanent", "no"); - } - if ((this.permanentField == YesNoType.yes)) - { - writer.WriteAttributeString("Permanent", "yes"); - } - } - if (this.targetFieldSet) - { - writer.WriteAttributeString("Target", this.targetField); - } - if (this.targetVersionFieldSet) - { - writer.WriteAttributeString("TargetVersion", this.targetVersionField); - } - if (this.vitalFieldSet) - { - if ((this.vitalField == YesNoType.no)) - { - writer.WriteAttributeString("Vital", "no"); - } - if ((this.vitalField == YesNoType.yes)) - { - writer.WriteAttributeString("Vital", "yes"); - } - } - if (this.vsixInstallerPathPropertyFieldSet) - { - writer.WriteAttributeString("VsixInstallerPathProperty", this.vsixInstallerPathPropertyField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("File" == name)) - { - this.fileField = value; - this.fileFieldSet = true; - } - if (("PackageId" == name)) - { - this.packageIdField = value; - this.packageIdFieldSet = true; - } - if (("Permanent" == name)) - { - this.permanentField = Enums.ParseYesNoType(value); - this.permanentFieldSet = true; - } - if (("Target" == name)) - { - this.targetField = value; - this.targetFieldSet = true; - } - if (("TargetVersion" == name)) - { - this.targetVersionField = value; - this.targetVersionFieldSet = true; - } - if (("Vital" == name)) - { - this.vitalField = Enums.ParseYesNoType(value); - this.vitalFieldSet = true; - } - if (("VsixInstallerPathProperty" == name)) - { - this.vsixInstallerPathPropertyField = value; - this.vsixInstallerPathPropertyFieldSet = true; - } - } - } -} diff --git a/src/wix/heat/Serialize/wix.cs b/src/wix/heat/Serialize/wix.cs deleted file mode 100644 index b881fb92..00000000 --- a/src/wix/heat/Serialize/wix.cs +++ /dev/null @@ -1,57736 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -#pragma warning disable 1591 // TODO: add documentation -namespace WixToolset.Harvesters.Serialize -{ - using System; - using System.CodeDom.Compiler; - using System.Collections; - using System.Diagnostics.CodeAnalysis; - using System.Globalization; - using System.Xml; - - /// - /// Values of this type will either be "attached" or "detached". - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum BurnContainerType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - attached, - - detached, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Enums - { - - /// - /// Parses a BurnContainerType from a string. - /// - public static BurnContainerType ParseBurnContainerType(string value) - { - BurnContainerType parsedValue; - Enums.TryParseBurnContainerType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a BurnContainerType from a string. - /// - public static bool TryParseBurnContainerType(string value, out BurnContainerType parsedValue) - { - parsedValue = BurnContainerType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("attached" == value)) - { - parsedValue = BurnContainerType.attached; - } - else - { - if (("detached" == value)) - { - parsedValue = BurnContainerType.detached; - } - else - { - parsedValue = BurnContainerType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Parses a BurnExeProtocolType from a string. - /// - public static BurnExeProtocolType ParseBurnExeProtocolType(string value) - { - BurnExeProtocolType parsedValue; - Enums.TryParseBurnExeProtocolType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a BurnExeProtocolType from a string. - /// - public static bool TryParseBurnExeProtocolType(string value, out BurnExeProtocolType parsedValue) - { - parsedValue = BurnExeProtocolType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("none" == value)) - { - parsedValue = BurnExeProtocolType.none; - } - else - { - if (("burn" == value)) - { - parsedValue = BurnExeProtocolType.burn; - } - else - { - if (("netfx4" == value)) - { - parsedValue = BurnExeProtocolType.netfx4; - } - else - { - parsedValue = BurnExeProtocolType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a YesNoType from a string. - /// - public static YesNoType ParseYesNoType(string value) - { - YesNoType parsedValue; - Enums.TryParseYesNoType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a YesNoType from a string. - /// - public static bool TryParseYesNoType(string value, out YesNoType parsedValue) - { - parsedValue = YesNoType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("no" == value)) - { - parsedValue = YesNoType.no; - } - else - { - if (("yes" == value)) - { - parsedValue = YesNoType.yes; - } - else - { - parsedValue = YesNoType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Parses a YesNoButtonType from a string. - /// - public static YesNoButtonType ParseYesNoButtonType(string value) - { - YesNoButtonType parsedValue; - Enums.TryParseYesNoButtonType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a YesNoButtonType from a string. - /// - public static bool TryParseYesNoButtonType(string value, out YesNoButtonType parsedValue) - { - parsedValue = YesNoButtonType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("no" == value)) - { - parsedValue = YesNoButtonType.no; - } - else - { - if (("yes" == value)) - { - parsedValue = YesNoButtonType.yes; - } - else - { - if (("button" == value)) - { - parsedValue = YesNoButtonType.button; - } - else - { - parsedValue = YesNoButtonType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a YesNoDefaultType from a string. - /// - public static YesNoDefaultType ParseYesNoDefaultType(string value) - { - YesNoDefaultType parsedValue; - Enums.TryParseYesNoDefaultType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a YesNoDefaultType from a string. - /// - public static bool TryParseYesNoDefaultType(string value, out YesNoDefaultType parsedValue) - { - parsedValue = YesNoDefaultType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("default" == value)) - { - parsedValue = YesNoDefaultType.@default; - } - else - { - if (("no" == value)) - { - parsedValue = YesNoDefaultType.no; - } - else - { - if (("yes" == value)) - { - parsedValue = YesNoDefaultType.yes; - } - else - { - parsedValue = YesNoDefaultType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a BundleCacheType from a string. - /// - public static BundleCacheType ParseBundleCacheType(string value) - { - Enums.TryBundleCacheType(value, out var parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a YesNoAlwaysType from a string. - /// - public static bool TryBundleCacheType(string value, out BundleCacheType parsedValue) - { - parsedValue = BundleCacheType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - - if (("force" == value)) - { - parsedValue = BundleCacheType.force; - } - else - { - if (("remove" == value)) - { - parsedValue = BundleCacheType.remove; - } - else - { - if (("keep" == value)) - { - parsedValue = BundleCacheType.keep; - } - else - { - return false; - } - } - } - return true; - } - - /// - /// Parses a RegistryRootType from a string. - /// - public static RegistryRootType ParseRegistryRootType(string value) - { - RegistryRootType parsedValue; - Enums.TryParseRegistryRootType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a RegistryRootType from a string. - /// - public static bool TryParseRegistryRootType(string value, out RegistryRootType parsedValue) - { - parsedValue = RegistryRootType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("HKMU" == value)) - { - parsedValue = RegistryRootType.HKMU; - } - else - { - if (("HKCR" == value)) - { - parsedValue = RegistryRootType.HKCR; - } - else - { - if (("HKCU" == value)) - { - parsedValue = RegistryRootType.HKCU; - } - else - { - if (("HKLM" == value)) - { - parsedValue = RegistryRootType.HKLM; - } - else - { - if (("HKU" == value)) - { - parsedValue = RegistryRootType.HKU; - } - else - { - parsedValue = RegistryRootType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - - /// - /// Parses a ExitType from a string. - /// - public static ExitType ParseExitType(string value) - { - ExitType parsedValue; - Enums.TryParseExitType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ExitType from a string. - /// - public static bool TryParseExitType(string value, out ExitType parsedValue) - { - parsedValue = ExitType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("success" == value)) - { - parsedValue = ExitType.success; - } - else - { - if (("cancel" == value)) - { - parsedValue = ExitType.cancel; - } - else - { - if (("error" == value)) - { - parsedValue = ExitType.error; - } - else - { - if (("suspend" == value)) - { - parsedValue = ExitType.suspend; - } - else - { - parsedValue = ExitType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Parses a InstallUninstallType from a string. - /// - public static InstallUninstallType ParseInstallUninstallType(string value) - { - InstallUninstallType parsedValue; - Enums.TryParseInstallUninstallType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a InstallUninstallType from a string. - /// - public static bool TryParseInstallUninstallType(string value, out InstallUninstallType parsedValue) - { - parsedValue = InstallUninstallType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("install" == value)) - { - parsedValue = InstallUninstallType.install; - } - else - { - if (("uninstall" == value)) - { - parsedValue = InstallUninstallType.uninstall; - } - else - { - if (("both" == value)) - { - parsedValue = InstallUninstallType.both; - } - else - { - parsedValue = InstallUninstallType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a SequenceType from a string. - /// - public static SequenceType ParseSequenceType(string value) - { - SequenceType parsedValue; - Enums.TryParseSequenceType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a SequenceType from a string. - /// - public static bool TryParseSequenceType(string value, out SequenceType parsedValue) - { - parsedValue = SequenceType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("both" == value)) - { - parsedValue = SequenceType.both; - } - else - { - if (("first" == value)) - { - parsedValue = SequenceType.first; - } - else - { - if (("execute" == value)) - { - parsedValue = SequenceType.execute; - } - else - { - if (("ui" == value)) - { - parsedValue = SequenceType.ui; - } - else - { - parsedValue = SequenceType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Parses a CompressionLevelType from a string. - /// - public static CompressionLevelType ParseCompressionLevelType(string value) - { - CompressionLevelType parsedValue; - Enums.TryParseCompressionLevelType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a CompressionLevelType from a string. - /// - public static bool TryParseCompressionLevelType(string value, out CompressionLevelType parsedValue) - { - parsedValue = CompressionLevelType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("high" == value)) - { - parsedValue = CompressionLevelType.high; - } - else - { - if (("low" == value)) - { - parsedValue = CompressionLevelType.low; - } - else - { - if (("medium" == value)) - { - parsedValue = CompressionLevelType.medium; - } - else - { - if (("mszip" == value)) - { - parsedValue = CompressionLevelType.mszip; - } - else - { - if (("none" == value)) - { - parsedValue = CompressionLevelType.none; - } - else - { - parsedValue = CompressionLevelType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - } - - /// - /// The list of communcation protocols with executable packages Burn supports. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum BurnExeProtocolType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// The executable package does not support a communication protocol. - /// - none, - - /// - /// The executable package is another Burn bundle and supports the Burn communication protocol. - /// - burn, - - /// - /// The executable package implements the .NET Framework v4.0 communication protocol. - /// - netfx4, - } - - /// - /// Values of this type will either be "yes" or "no". - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum YesNoType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - no, - - yes, - } - - /// - /// Values of this type will either be "button", "yes" or "no". - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum YesNoButtonType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - no, - - yes, - - button, - } - - /// - /// Values of this type will either be "default", "yes", or "no". - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum YesNoDefaultType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - @default, - - no, - - yes, - } - - /// - /// Values of this type will either be "always", "yes", or "no". - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum BundleCacheType - { - NotSet = -1, - - force, - - remove, - - keep, - } - - /// - /// Values of this type represent possible registry roots. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum RegistryRootType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// A per-user installation will make the operation occur under HKEY_CURRENT_USER. - /// A per-machine installation will make the operation occur under HKEY_LOCAL_MACHINE. - /// - HKMU, - - /// - /// Operation occurs under HKEY_CLASSES_ROOT. When using Windows 2000 or later, the installer writes or removes the value - /// from the HKCU\Software\Classes hive during per-user installations. When using Windows 2000 or later operating systems, - /// the installer writes or removes the value from the HKLM\Software\Classes hive during per-machine installations. - /// - HKCR, - - /// - /// Operation occurs under HKEY_CURRENT_USER. It is recommended to set the KeyPath='yes' attribute when setting this value for writing values - /// in order to ensure that the installer writes the necessary registry entries when there are multiple users on the same computer. - /// - HKCU, - - /// - /// Operation occurs under HKEY_LOCAL_MACHINE. - /// - HKLM, - - /// - /// Operation occurs under HKEY_USERS. - /// - HKU, - } - - /// - /// 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. - /// Multiple actions can have exit types assigned, but every action and exit type must be different. Exit types are typically used with dialog boxes. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ExitType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - success, - - cancel, - - error, - - suspend, - } - - /// - /// Specifies whether an action occur on install, uninstall or both. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum InstallUninstallType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// The action should happen during install (msiInstallStateLocal or msiInstallStateSource). - /// - install, - - /// - /// The action should happen during uninstall (msiInstallStateAbsent). - /// - uninstall, - - /// - /// The action should happen during both install and uninstall. - /// - both, - } - - /// - /// Controls which sequences the item assignment is sequenced in. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum SequenceType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Schedules the assignment in the InstallUISequence and the InstallExecuteSequence. - /// - both, - - /// - /// Schedules the assignment to run in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped. - /// - first, - - /// - /// Schedules the assignment only in the the InstallExecuteSequence. - /// - execute, - - /// - /// Schedules the assignment only in the the InstallUISequence. - /// - ui, - } - - /// - /// Indicates the compression level for a cabinet. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum CompressionLevelType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - high, - - low, - - medium, - - mszip, - - none, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public abstract class ActionModuleSequenceType : ISchemaElement, ISetAttributes - { - - private string afterField; - - private bool afterFieldSet; - - private string beforeField; - - private bool beforeFieldSet; - - private YesNoType overridableField; - - private bool overridableFieldSet; - - private int sequenceField; - - private bool sequenceFieldSet; - - private YesNoType suppressField; - - private bool suppressFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// The name of an action that this action should come after. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// The name of an action that this action should come before. - /// - public string Before - { - get - { - return this.beforeField; - } - set - { - this.beforeFieldSet = true; - this.beforeField = value; - } - } - - /// - /// If "yes", the sequencing of this action may be overridden by sequencing elsewhere. - /// - public YesNoType Overridable - { - get - { - return this.overridableField; - } - set - { - this.overridableFieldSet = true; - this.overridableField = value; - } - } - - /// - /// A value used to indicate the position of this action in a sequence. - /// - public int Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - /// - /// If yes, this action will not occur. - /// - public YesNoType Suppress - { - get - { - return this.suppressField; - } - set - { - this.suppressFieldSet = true; - this.suppressField = value; - } - } - - /// - /// Text node specifies the condition of the action. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.beforeFieldSet) - { - writer.WriteAttributeString("Before", this.beforeField); - } - if (this.overridableFieldSet) - { - if ((this.overridableField == YesNoType.no)) - { - writer.WriteAttributeString("Overridable", "no"); - } - if ((this.overridableField == YesNoType.yes)) - { - writer.WriteAttributeString("Overridable", "yes"); - } - } - if (this.sequenceFieldSet) - { - writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); - } - if (this.suppressFieldSet) - { - if ((this.suppressField == YesNoType.no)) - { - writer.WriteAttributeString("Suppress", "no"); - } - if ((this.suppressField == YesNoType.yes)) - { - writer.WriteAttributeString("Suppress", "yes"); - } - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("Before" == name)) - { - this.beforeField = value; - this.beforeFieldSet = true; - } - if (("Overridable" == name)) - { - this.overridableField = Enums.ParseYesNoType(value); - this.overridableFieldSet = true; - } - if (("Sequence" == name)) - { - this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sequenceFieldSet = true; - } - if (("Suppress" == name)) - { - this.suppressField = Enums.ParseYesNoType(value); - this.suppressFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public abstract class ActionSequenceType : ISchemaElement, ISetAttributes - { - - private int sequenceField; - - private bool sequenceFieldSet; - - private YesNoType suppressField; - - private bool suppressFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// A value used to indicate the position of this action in a sequence. - /// - public int Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - /// - /// If yes, this action will not occur. - /// - public YesNoType Suppress - { - get - { - return this.suppressField; - } - set - { - this.suppressFieldSet = true; - this.suppressField = value; - } - } - - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - if (this.sequenceFieldSet) - { - writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); - } - if (this.suppressFieldSet) - { - if ((this.suppressField == YesNoType.no)) - { - writer.WriteAttributeString("Suppress", "no"); - } - if ((this.suppressField == YesNoType.yes)) - { - writer.WriteAttributeString("Suppress", "yes"); - } - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Sequence" == name)) - { - this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sequenceFieldSet = true; - } - if (("Suppress" == name)) - { - this.suppressField = Enums.ParseYesNoType(value); - this.suppressFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - /// - /// This is the top-level container element for every wxs file. Among the possible children, - /// the Bundle, Package, Module, Patch, and PatchCreation elements are analogous to the main function in a C program. - /// There can only be one of these present when linking occurs. Package compiles into an msi file, - /// Module compiles into an msm file, PatchCreation compiles into a pcp file. The Fragment element - /// is an atomic unit which ultimately links into either a Package, Module, or PatchCreation. The - /// Fragment can either be completely included or excluded during linking. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Wix : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string requiredVersionField; - - private bool requiredVersionFieldSet; - - private ISchemaElement parentElement; - - public Wix() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence); - ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Bundle))); - childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Package))); - childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Module))); - childCollection2.AddItem(new ElementCollection.ChoiceItem(typeof(Patch))); - childCollection1.AddCollection(childCollection2); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(Fragment))); - childCollection0.AddCollection(childCollection1); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCreation))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Required version of the WiX toolset to compile this input file. - /// - public string RequiredVersion - { - get - { - return this.requiredVersionField; - } - set - { - this.requiredVersionFieldSet = true; - this.requiredVersionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Bundle" == childName)) - { - childValue = new Bundle(); - } - if (("Package" == childName)) - { - childValue = new Package(); - } - if (("Module" == childName)) - { - childValue = new Module(); - } - if (("Patch" == childName)) - { - childValue = new Patch(); - } - if (("Fragment" == childName)) - { - childValue = new Fragment(); - } - if (("PatchCreation" == childName)) - { - childValue = new PatchCreation(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Wix", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.requiredVersionFieldSet) - { - writer.WriteAttributeString("RequiredVersion", this.requiredVersionField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("RequiredVersion" == name)) - { - this.requiredVersionField = value; - this.requiredVersionFieldSet = true; - } - } - } - - /// - /// This is the top-level container element for every wxi file. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Include : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private ISchemaElement parentElement; - - public Include() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Include", "http://wixtoolset.org/schemas/v4/wxs"); - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - } - } - - /// - /// The root element for creating bundled packages. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Bundle : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string aboutUrlField; - - private bool aboutUrlFieldSet; - - private string copyrightField; - - private bool copyrightFieldSet; - - private YesNoDefaultType compressedField; - - private bool compressedFieldSet; - - private YesNoButtonType disableModifyField; - - private bool disableModifyFieldSet; - - private YesNoType disableRemoveField; - - private bool disableRemoveFieldSet; - - private YesNoType disableRepairField; - - private bool disableRepairFieldSet; - - private string helpTelephoneField; - - private bool helpTelephoneFieldSet; - - private string helpUrlField; - - private bool helpUrlFieldSet; - - private string iconSourceFileField; - - private bool iconSourceFileFieldSet; - - private string manufacturerField; - - private bool manufacturerFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string parentNameField; - - private bool parentNameFieldSet; - - private string splashScreenSourceFileField; - - private bool splashScreenSourceFileFieldSet; - - private string tagField; - - private bool tagFieldSet; - - private string updateUrlField; - - private bool updateUrlFieldSet; - - private string upgradeCodeField; - - private bool upgradeCodeFieldSet; - - private string versionField; - - private bool versionFieldSet; - - private string conditionField; - - private bool conditionFieldSet; - - private ISchemaElement parentElement; - - public Bundle() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ApprovedExeForElevation))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Log))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Catalog))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplication))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplicationRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(OptionalUpdateRegistration))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Chain))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Container))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ContainerRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroup))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RelatedBundle))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Update))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Variable))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// A URL for more information about the bundle to display in Programs and Features (also - /// known as Add/Remove Programs). - /// - public string AboutUrl - { - get - { - return this.aboutUrlField; - } - set - { - this.aboutUrlFieldSet = true; - this.aboutUrlField = value; - } - } - - /// - /// The legal copyright found in the version resources of final bundle executable. If - /// this attribute is not provided the copyright will be set to "Copyright (c) [Bundle/@Manufacturer]. All rights reserved.". - /// - public string Copyright - { - get - { - return this.copyrightField; - } - set - { - this.copyrightFieldSet = true; - this.copyrightField = value; - } - } - - /// - /// 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. - /// - public YesNoDefaultType Compressed - { - get - { - return this.compressedField; - } - set - { - this.compressedFieldSet = true; - this.compressedField = value; - } - } - - /// - /// Determines whether the bundle can be modified via the Programs and Features (also known as - /// Add/Remove Programs). If the value is "button" then Programs and Features will show a single - /// "Uninstall/Change" button. If the value is "yes" then Programs and Features will only show - /// the "Uninstall" button". If the value is "no", the default, then a "Change" button is shown. - /// See the DisableRemove attribute for information how to not display the bundle in Programs - /// and Features. - /// - public YesNoButtonType DisableModify - { - get - { - return this.disableModifyField; - } - set - { - this.disableModifyFieldSet = true; - this.disableModifyField = value; - } - } - - /// - /// Determines whether the bundle can be removed via the Programs and Features (also - /// known as Add/Remove Programs). If the value is "yes" then the "Uninstall" button will - /// not be displayed. The default is "no" which ensures there is an "Uninstall" button to - /// remove the bundle. If the "DisableModify" attribute is also "yes" or "button" then the - /// bundle will not be displayed in Progams and Features and another mechanism (such as - /// registering as a related bundle addon) must be used to ensure the bundle can be removed. - /// - public YesNoType DisableRemove - { - get - { - return this.disableRemoveField; - } - set - { - this.disableRemoveFieldSet = true; - this.disableRemoveField = value; - } - } - - public YesNoType DisableRepair - { - get - { - return this.disableRepairField; - } - set - { - this.disableRepairFieldSet = true; - this.disableRepairField = value; - } - } - - /// - /// A telephone number for help to display in Programs and Features (also known as - /// Add/Remove Programs). - /// - public string HelpTelephone - { - get - { - return this.helpTelephoneField; - } - set - { - this.helpTelephoneFieldSet = true; - this.helpTelephoneField = value; - } - } - - /// - /// A URL to the help for the bundle to display in Programs and Features (also known as - /// Add/Remove Programs). - /// - public string HelpUrl - { - get - { - return this.helpUrlField; - } - set - { - this.helpUrlFieldSet = true; - this.helpUrlField = value; - } - } - - /// - /// Path to an icon that will replace the default icon in the final Bundle executable. - /// This icon will also be displayed in Programs and Features (also known as Add/Remove - /// Programs). - /// - public string IconSourceFile - { - get - { - return this.iconSourceFileField; - } - set - { - this.iconSourceFileFieldSet = true; - this.iconSourceFileField = value; - } - } - - /// - /// The publisher of the bundle to display in Programs and Features (also known as - /// Add/Remove Programs). - /// - public string Manufacturer - { - get - { - return this.manufacturerField; - } - set - { - this.manufacturerFieldSet = true; - this.manufacturerField = value; - } - } - - /// - /// The name of the bundle to display in Programs and Features (also known as Add/Remove - /// Programs). This name can be accessed and overwritten by a BootstrapperApplication - /// using the WixBundleName bundle variable. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The name of the parent bundle to display in Installed Updates (also known as Add/Remove - /// Programs). This name is used to nest or group bundles that will appear as updates. - /// If the parent name does not actually exist, a virtual parent is created automatically. - /// - public string ParentName - { - get - { - return this.parentNameField; - } - set - { - this.parentNameFieldSet = true; - this.parentNameField = value; - } - } - - /// - /// 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. - /// - public string SplashScreenSourceFile - { - get - { - return this.splashScreenSourceFileField; - } - set - { - this.splashScreenSourceFileFieldSet = true; - this.splashScreenSourceFileField = value; - } - } - - /// - /// 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. - /// - public string Tag - { - get - { - return this.tagField; - } - set - { - this.tagFieldSet = true; - this.tagField = value; - } - } - - /// - /// A URL for updates of the bundle to display in Programs and Features (also - /// known as Add/Remove Programs). - /// - public string UpdateUrl - { - get - { - return this.updateUrlField; - } - set - { - this.updateUrlFieldSet = true; - this.updateUrlField = value; - } - } - - /// - /// Unique identifier for a family of bundles. If two bundles have the same UpgradeCode the - /// bundle with the highest version will be installed. - /// - public string UpgradeCode - { - get - { - return this.upgradeCodeField; - } - set - { - this.upgradeCodeFieldSet = true; - this.upgradeCodeField = value; - } - } - - /// - /// The version of the bundle. Newer versions upgrade earlier versions of the bundles - /// with matching UpgradeCodes. If the bundle is registered in Programs and Features - /// then this attribute will be displayed in the Programs and Features user interface. - /// - public string Version - { - get - { - return this.versionField; - } - set - { - this.versionFieldSet = true; - this.versionField = value; - } - } - - /// - /// The condition of the bundle. If the condition is not met, the bundle will - /// refuse to run. Conditions are checked before the bootstrapper application is loaded - /// (before detect), and thus can only reference built-in variables such as - /// variables which indicate the version of the OS. - /// - public string Condition - { - get - { - return this.conditionField; - } - set - { - this.conditionFieldSet = true; - this.conditionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ApprovedExeForElevation" == childName)) - { - childValue = new ApprovedExeForElevation(); - } - if (("Log" == childName)) - { - childValue = new Log(); - } - if (("Catalog" == childName)) - { - childValue = new Catalog(); - } - if (("BootstrapperApplication" == childName)) - { - childValue = new BootstrapperApplication(); - } - if (("BootstrapperApplicationRef" == childName)) - { - childValue = new BootstrapperApplicationRef(); - } - if (("OptionalUpdateRegistration" == childName)) - { - childValue = new OptionalUpdateRegistration(); - } - if (("Chain" == childName)) - { - childValue = new Chain(); - } - if (("Container" == childName)) - { - childValue = new Container(); - } - if (("ContainerRef" == childName)) - { - childValue = new ContainerRef(); - } - if (("PayloadGroup" == childName)) - { - childValue = new PayloadGroup(); - } - if (("PayloadGroupRef" == childName)) - { - childValue = new PayloadGroupRef(); - } - if (("RelatedBundle" == childName)) - { - childValue = new RelatedBundle(); - } - if (("Update" == childName)) - { - childValue = new Update(); - } - if (("Variable" == childName)) - { - childValue = new Variable(); - } - if (("WixVariable" == childName)) - { - childValue = new WixVariable(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Bundle", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.aboutUrlFieldSet) - { - writer.WriteAttributeString("AboutUrl", this.aboutUrlField); - } - if (this.copyrightFieldSet) - { - writer.WriteAttributeString("Copyright", this.copyrightField); - } - if (this.compressedFieldSet) - { - if ((this.compressedField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("Compressed", "default"); - } - if ((this.compressedField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("Compressed", "no"); - } - if ((this.compressedField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("Compressed", "yes"); - } - } - if (this.disableModifyFieldSet) - { - if ((this.disableModifyField == YesNoButtonType.no)) - { - writer.WriteAttributeString("DisableModify", "no"); - } - if ((this.disableModifyField == YesNoButtonType.yes)) - { - writer.WriteAttributeString("DisableModify", "yes"); - } - if ((this.disableModifyField == YesNoButtonType.button)) - { - writer.WriteAttributeString("DisableModify", "button"); - } - } - if (this.disableRemoveFieldSet) - { - if ((this.disableRemoveField == YesNoType.no)) - { - writer.WriteAttributeString("DisableRemove", "no"); - } - if ((this.disableRemoveField == YesNoType.yes)) - { - writer.WriteAttributeString("DisableRemove", "yes"); - } - } - if (this.disableRepairFieldSet) - { - if ((this.disableRepairField == YesNoType.no)) - { - writer.WriteAttributeString("DisableRepair", "no"); - } - if ((this.disableRepairField == YesNoType.yes)) - { - writer.WriteAttributeString("DisableRepair", "yes"); - } - } - if (this.helpTelephoneFieldSet) - { - writer.WriteAttributeString("HelpTelephone", this.helpTelephoneField); - } - if (this.helpUrlFieldSet) - { - writer.WriteAttributeString("HelpUrl", this.helpUrlField); - } - if (this.iconSourceFileFieldSet) - { - writer.WriteAttributeString("IconSourceFile", this.iconSourceFileField); - } - if (this.manufacturerFieldSet) - { - writer.WriteAttributeString("Manufacturer", this.manufacturerField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.parentNameFieldSet) - { - writer.WriteAttributeString("ParentName", this.parentNameField); - } - if (this.splashScreenSourceFileFieldSet) - { - writer.WriteAttributeString("SplashScreenSourceFile", this.splashScreenSourceFileField); - } - if (this.tagFieldSet) - { - writer.WriteAttributeString("Tag", this.tagField); - } - if (this.updateUrlFieldSet) - { - writer.WriteAttributeString("UpdateUrl", this.updateUrlField); - } - if (this.upgradeCodeFieldSet) - { - writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); - } - if (this.versionFieldSet) - { - writer.WriteAttributeString("Version", this.versionField); - } - if (this.conditionFieldSet) - { - writer.WriteAttributeString("Condition", this.conditionField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("AboutUrl" == name)) - { - this.aboutUrlField = value; - this.aboutUrlFieldSet = true; - } - if (("Copyright" == name)) - { - this.copyrightField = value; - this.copyrightFieldSet = true; - } - if (("Compressed" == name)) - { - this.compressedField = Enums.ParseYesNoDefaultType(value); - this.compressedFieldSet = true; - } - if (("DisableModify" == name)) - { - this.disableModifyField = Enums.ParseYesNoButtonType(value); - this.disableModifyFieldSet = true; - } - if (("DisableRemove" == name)) - { - this.disableRemoveField = Enums.ParseYesNoType(value); - this.disableRemoveFieldSet = true; - } - if (("DisableRepair" == name)) - { - this.disableRepairField = Enums.ParseYesNoType(value); - this.disableRepairFieldSet = true; - } - if (("HelpTelephone" == name)) - { - this.helpTelephoneField = value; - this.helpTelephoneFieldSet = true; - } - if (("HelpUrl" == name)) - { - this.helpUrlField = value; - this.helpUrlFieldSet = true; - } - if (("IconSourceFile" == name)) - { - this.iconSourceFileField = value; - this.iconSourceFileFieldSet = true; - } - if (("Manufacturer" == name)) - { - this.manufacturerField = value; - this.manufacturerFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("ParentName" == name)) - { - this.parentNameField = value; - this.parentNameFieldSet = true; - } - if (("SplashScreenSourceFile" == name)) - { - this.splashScreenSourceFileField = value; - this.splashScreenSourceFileFieldSet = true; - } - if (("Tag" == name)) - { - this.tagField = value; - this.tagFieldSet = true; - } - if (("UpdateUrl" == name)) - { - this.updateUrlField = value; - this.updateUrlFieldSet = true; - } - if (("UpgradeCode" == name)) - { - this.upgradeCodeField = value; - this.upgradeCodeFieldSet = true; - } - if (("Version" == name)) - { - this.versionField = value; - this.versionFieldSet = true; - } - if (("Condition" == name)) - { - this.conditionField = value; - this.conditionFieldSet = true; - } - } - } - - /// - /// Provides information about an .exe so that the BA can request the engine to run it elevated from any secure location. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ApprovedExeForElevation : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string keyField; - - private bool keyFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private YesNoType win64Field; - - private bool win64FieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the ApprovedExeForElevation element. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The key path. - /// For security purposes, the root key will be HKLM and Variables are not supported. - /// - public string Key - { - get - { - return this.keyField; - } - set - { - this.keyFieldSet = true; - this.keyField = value; - } - } - - /// - /// The value name. - /// For security purposes, Variables are not supported. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// 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'. - /// - public YesNoType Win64 - { - get - { - return this.win64Field; - } - set - { - this.win64FieldSet = true; - this.win64Field = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ApprovedExeForElevation", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.keyFieldSet) - { - writer.WriteAttributeString("Key", this.keyField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.win64FieldSet) - { - if ((this.win64Field == YesNoType.no)) - { - writer.WriteAttributeString("Win64", "no"); - } - if ((this.win64Field == YesNoType.yes)) - { - writer.WriteAttributeString("Win64", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Key" == name)) - { - this.keyField = value; - this.keyFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Win64" == name)) - { - this.win64Field = Enums.ParseYesNoType(value); - this.win64FieldSet = true; - } - } - } - - /// - /// Overrides the default log settings for a bundle. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Log : ISchemaElement, ISetAttributes - { - - private YesNoType disableField; - - private bool disableFieldSet; - - private string pathVariableField; - - private bool pathVariableFieldSet; - - private string prefixField; - - private bool prefixFieldSet; - - private string extensionField; - - private bool extensionFieldSet; - - private ISchemaElement parentElement; - - /// - /// Disables the default logging in the Bundle. The end user can still generate a - /// log file by specifying the "-l" command-line argument when installing the - /// Bundle. - /// - public YesNoType Disable - { - get - { - return this.disableField; - } - set - { - this.disableFieldSet = true; - this.disableField = value; - } - } - - /// - /// Name of a Variable that will hold the path to the log file. An empty value - /// will cause the variable to not be set. The default is "WixBundleLog". - /// - public string PathVariable - { - get - { - return this.pathVariableField; - } - set - { - this.pathVariableFieldSet = true; - this.pathVariableField = value; - } - } - - /// - /// File name and optionally a relative path to use as the prefix for the log file. The - /// default is to use the Bundle/@Name or, if Bundle/@Name is not specified, the value - /// "Setup". - /// - public string Prefix - { - get - { - return this.prefixField; - } - set - { - this.prefixFieldSet = true; - this.prefixField = value; - } - } - - /// - /// The extension to use for the log. The default is ".log". - /// - public string Extension - { - get - { - return this.extensionField; - } - set - { - this.extensionFieldSet = true; - this.extensionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Log", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.disableFieldSet) - { - if ((this.disableField == YesNoType.no)) - { - writer.WriteAttributeString("Disable", "no"); - } - if ((this.disableField == YesNoType.yes)) - { - writer.WriteAttributeString("Disable", "yes"); - } - } - if (this.pathVariableFieldSet) - { - writer.WriteAttributeString("PathVariable", this.pathVariableField); - } - if (this.prefixFieldSet) - { - writer.WriteAttributeString("Prefix", this.prefixField); - } - if (this.extensionFieldSet) - { - writer.WriteAttributeString("Extension", this.extensionField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Disable" == name)) - { - this.disableField = Enums.ParseYesNoType(value); - this.disableFieldSet = true; - } - if (("PathVariable" == name)) - { - this.pathVariableField = value; - this.pathVariableFieldSet = true; - } - if (("Prefix" == name)) - { - this.prefixField = value; - this.prefixFieldSet = true; - } - if (("Extension" == name)) - { - this.extensionField = value; - this.extensionFieldSet = true; - } - } - } - - /// - /// Specify one or more catalog files that will be used to verify the contents of the bundle. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Catalog : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the catalog element. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The catalog file - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Catalog", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - } - } - - /// - /// Contains all the relevant information about the setup UI. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class BootstrapperApplication : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private ISchemaElement parentElement; - - public BootstrapperApplication() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// The identifier of the BootstrapperApplication element. Only required if you want to reference this element using a BootstrapperApplicationRef element. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The DLL with the bootstrapper application entry function. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - /// - /// 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. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Payload" == childName)) - { - childValue = new Payload(); - } - if (("PayloadGroupRef" == childName)) - { - childValue = new PayloadGroupRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("BootstrapperApplication", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - } - } - - /// - /// Used to reference a BootstrapperApplication element and optionally add additional payloads to the bootstrapper application. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class BootstrapperApplicationRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public BootstrapperApplicationRef() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// The identifier of the BootstrapperApplication element to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Payload" == childName)) - { - childValue = new Payload(); - } - if (("PayloadGroupRef" == childName)) - { - childValue = new PayloadGroupRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("BootstrapperApplicationRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// This element has been deprecated. Use the BootstrapperApplication element instead. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UX : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string splashScreenSourceFileField; - - private bool splashScreenSourceFileFieldSet; - - private ISchemaElement parentElement; - - public UX() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// See the BootstrapperApplication instead. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - /// - /// See the BootstrapperApplication instead. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// See the BootstrapperApplication instead. - /// - public string SplashScreenSourceFile - { - get - { - return this.splashScreenSourceFileField; - } - set - { - this.splashScreenSourceFileFieldSet = true; - this.splashScreenSourceFileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Payload" == childName)) - { - childValue = new Payload(); - } - if (("PayloadGroupRef" == childName)) - { - childValue = new PayloadGroupRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UX", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.splashScreenSourceFileFieldSet) - { - writer.WriteAttributeString("SplashScreenSourceFile", this.splashScreenSourceFileField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("SplashScreenSourceFile" == name)) - { - this.splashScreenSourceFileField = value; - this.splashScreenSourceFileFieldSet = true; - } - } - } - - /// - /// Writes additional information to the Windows registry that can be used to detect the bundle. - /// This registration is intended primarily for update to an existing product. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class OptionalUpdateRegistration : ISchemaElement, ISetAttributes - { - - private string manufacturerField; - - private bool manufacturerFieldSet; - - private string departmentField; - - private bool departmentFieldSet; - - private string productFamilyField; - - private bool productFamilyFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string classificationField; - - private bool classificationFieldSet; - - private ISchemaElement parentElement; - - /// - /// The name of the manufacturer. The default is the Bundle/@Manufacturer attribute, - /// but may also be a short form, ex: Acme instead of Acme Corporation. - /// An error is generated at build time if neither attribute is specified. - /// - public string Manufacturer - { - get - { - return this.manufacturerField; - } - set - { - this.manufacturerFieldSet = true; - this.manufacturerField = value; - } - } - - /// - /// The name of the department or division publishing the update bundle. - /// The PublishingGroup registry value is not written if this attribute is not specified. - /// - public string Department - { - get - { - return this.departmentField; - } - set - { - this.departmentFieldSet = true; - this.departmentField = value; - } - } - - /// - /// The name of the family of products being updated. The default is the Bundle/@ParentName attribute. - /// The corresponding registry key is not created if neither attribute is specified. - /// - public string ProductFamily - { - get - { - return this.productFamilyField; - } - set - { - this.productFamilyFieldSet = true; - this.productFamilyField = value; - } - } - - /// - /// The name of the bundle. The default is the Bundle/@Name attribute, - /// but may also be a short form, ex: KB12345 instead of Update to Product (KB12345). - /// An error is generated at build time if neither attribute is specified. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The release type of the update bundle, such as Update, Security Update, Service Pack, etc. - /// The default value is Update. - /// - public string Classification - { - get - { - return this.classificationField; - } - set - { - this.classificationFieldSet = true; - this.classificationField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("OptionalUpdateRegistration", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.manufacturerFieldSet) - { - writer.WriteAttributeString("Manufacturer", this.manufacturerField); - } - if (this.departmentFieldSet) - { - writer.WriteAttributeString("Department", this.departmentField); - } - if (this.productFamilyFieldSet) - { - writer.WriteAttributeString("ProductFamily", this.productFamilyField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.classificationFieldSet) - { - writer.WriteAttributeString("Classification", this.classificationField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Manufacturer" == name)) - { - this.manufacturerField = value; - this.manufacturerFieldSet = true; - } - if (("Department" == name)) - { - this.departmentField = value; - this.departmentFieldSet = true; - } - if (("ProductFamily" == name)) - { - this.productFamilyField = value; - this.productFamilyFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Classification" == name)) - { - this.classificationField = value; - this.classificationFieldSet = true; - } - } - } - - /// - /// Contains the chain of packages to install. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Chain : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private YesNoType disableRollbackField; - - private bool disableRollbackFieldSet; - - private YesNoType disableSystemRestoreField; - - private bool disableSystemRestoreFieldSet; - - private YesNoType parallelCacheField; - - private bool parallelCacheFieldSet; - - private ISchemaElement parentElement; - - public Chain() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPackage))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MspPackage))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackage))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackage))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RollbackBoundary))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Specifies whether the bundle will attempt to rollback packages - /// executed in the chain. If "yes" is specified then when a vital - /// package fails to install only that package will rollback and the - /// chain will stop with the error. The default is "no" which - /// indicates all packages executed during the chain will be - /// rolledback to their previous state when a vital package fails. - /// - public YesNoType DisableRollback - { - get - { - return this.disableRollbackField; - } - set - { - this.disableRollbackFieldSet = true; - this.disableRollbackField = value; - } - } - - /// - /// Specifies whether the bundle will attempt to create a system - /// restore point when executing the chain. If "yes" is specified then - /// a system restore point will not be created. The default is "no" which - /// indicates a system restore point will be created when the bundle is - /// installed, uninstalled, repaired, modified, etc. If the system restore - /// point cannot be created, the bundle will log the issue and continue. - /// - public YesNoType DisableSystemRestore - { - get - { - return this.disableSystemRestoreField; - } - set - { - this.disableSystemRestoreFieldSet = true; - this.disableSystemRestoreField = value; - } - } - - /// - /// Specifies whether the bundle will start installing packages - /// while other packages are still being cached. If "yes", - /// packages will start executing when a rollback boundary is - /// encountered. The default is "no" which dictates all packages - /// must be cached before any packages will start to be installed. - /// - public YesNoType ParallelCache - { - get - { - return this.parallelCacheField; - } - set - { - this.parallelCacheFieldSet = true; - this.parallelCacheField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("MsiPackage" == childName)) - { - childValue = new MsiPackage(); - } - if (("MspPackage" == childName)) - { - childValue = new MspPackage(); - } - if (("MsuPackage" == childName)) - { - childValue = new MsuPackage(); - } - if (("ExePackage" == childName)) - { - childValue = new ExePackage(); - } - if (("RollbackBoundary" == childName)) - { - childValue = new RollbackBoundary(); - } - if (("PackageGroupRef" == childName)) - { - childValue = new PackageGroupRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Chain", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.disableRollbackFieldSet) - { - if ((this.disableRollbackField == YesNoType.no)) - { - writer.WriteAttributeString("DisableRollback", "no"); - } - if ((this.disableRollbackField == YesNoType.yes)) - { - writer.WriteAttributeString("DisableRollback", "yes"); - } - } - if (this.disableSystemRestoreFieldSet) - { - if ((this.disableSystemRestoreField == YesNoType.no)) - { - writer.WriteAttributeString("DisableSystemRestore", "no"); - } - if ((this.disableSystemRestoreField == YesNoType.yes)) - { - writer.WriteAttributeString("DisableSystemRestore", "yes"); - } - } - if (this.parallelCacheFieldSet) - { - if ((this.parallelCacheField == YesNoType.no)) - { - writer.WriteAttributeString("ParallelCache", "no"); - } - if ((this.parallelCacheField == YesNoType.yes)) - { - writer.WriteAttributeString("ParallelCache", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("DisableRollback" == name)) - { - this.disableRollbackField = Enums.ParseYesNoType(value); - this.disableRollbackFieldSet = true; - } - if (("DisableSystemRestore" == name)) - { - this.disableSystemRestoreField = Enums.ParseYesNoType(value); - this.disableSystemRestoreFieldSet = true; - } - if (("ParallelCache" == name)) - { - this.parallelCacheField = Enums.ParseYesNoType(value); - this.parallelCacheFieldSet = true; - } - } - } - - /// - /// Describes a single msi package to install. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MsiPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string downloadUrlField; - - private bool downloadUrlFieldSet; - - private string idField; - - private bool idFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private string installSizeField; - - private bool installSizeFieldSet; - - private string installConditionField; - - private bool installConditionFieldSet; - - private BundleCacheType cacheField; - - private bool cacheFieldSet; - - private string cacheIdField; - - private bool cacheIdFieldSet; - - private string displayNameField; - - private bool displayNameFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string logPathVariableField; - - private bool logPathVariableFieldSet; - - private string rollbackLogPathVariableField; - - private bool rollbackLogPathVariableFieldSet; - - private YesNoType permanentField; - - private bool permanentFieldSet; - - private YesNoType vitalField; - - private bool vitalFieldSet; - - private YesNoDefaultType compressedField; - - private bool compressedFieldSet; - - private YesNoType enableSignatureVerificationField; - - private bool enableSignatureVerificationFieldSet; - - private YesNoType enableFeatureSelectionField; - - private bool enableFeatureSelectionFieldSet; - - private YesNoType forcePerMachineField; - - private bool forcePerMachineFieldSet; - - private YesNoType suppressLooseFilePayloadGenerationField; - - private bool suppressLooseFilePayloadGenerationFieldSet; - - private YesNoType visibleField; - - private bool visibleFieldSet; - - private ISchemaElement parentElement; - - public MsiPackage() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiProperty))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SlipstreamMsp))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Location of the package to add to the bundle. The default value is the Name attribute, if provided. - /// At a minimum, the SourceFile or Name attribute must be specified. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - /// - /// The destination path and file name for this chain payload. Use this attribute to rename the - /// chain entry point or extract it into a subfolder. The default value is the file name from the - /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified. - /// The use of '..' directories is not allowed. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - public string DownloadUrl - { - get - { - return this.downloadUrlField; - } - set - { - this.downloadUrlFieldSet = true; - this.downloadUrlField = value; - } - } - - /// - /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute - /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores). - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The identifier of another package that this one should be installed after. By default the After - /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this - /// attribute is specified ensure that a cycle is not created explicitly or implicitly. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// The size this package will take on disk in bytes after it is installed. By default, the binder will - /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs) - /// and use the total for the install size of the package. - /// - public string InstallSize - { - get - { - return this.installSizeField; - } - set - { - this.installSizeFieldSet = true; - this.installSizeField = value; - } - } - - /// - /// 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. - /// - public string InstallCondition - { - get - { - return this.installConditionField; - } - set - { - this.installConditionFieldSet = true; - this.installConditionField = value; - } - } - - /// - /// Whether to cache the package. The default is "yes". - /// - public BundleCacheType Cache - { - get - { - return this.cacheField; - } - set - { - this.cacheFieldSet = true; - this.cacheField = value; - } - } - - /// - /// The identifier to use when caching the package. - /// - public string CacheId - { - get - { - return this.cacheIdField; - } - set - { - this.cacheIdFieldSet = true; - this.cacheIdField = value; - } - } - - /// - /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages - /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use - /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the - /// bootstrapper application data manifest. - /// - public string DisplayName - { - get - { - return this.displayNameField; - } - set - { - this.displayNameFieldSet = true; - this.displayNameField = value; - } - } - - /// - /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages - /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use - /// the Description patch metadata property. Other package types must use this attribute to define a description in the - /// bootstrapper application data manifest. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not - /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging. - /// - public string LogPathVariable - { - get - { - return this.logPathVariableField; - } - set - { - this.logPathVariableFieldSet = true; - this.logPathVariableField = value; - } - } - - /// - /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause - /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which - /// default to no logging. - /// - public string RollbackLogPathVariable - { - get - { - return this.rollbackLogPathVariableField; - } - set - { - this.rollbackLogPathVariableFieldSet = true; - this.rollbackLogPathVariableField = value; - } - } - - /// - /// Specifies whether the package can be uninstalled. The default is "no". - /// - public YesNoType Permanent - { - get - { - return this.permanentField; - } - set - { - this.permanentFieldSet = true; - this.permanentField = value; - } - } - - /// - /// Specifies whether the package must succeed for the chain to continue. The default "yes" - /// indicates that if the package fails then the chain will fail and rollback or stop. If - /// "no" is specified then the chain will continue even if the package reports failure. - /// - public YesNoType Vital - { - get - { - return this.vitalField; - } - set - { - this.vitalFieldSet = true; - this.vitalField = value; - } - } - - /// - /// Whether the package payload should be embedded in a container or left as an external payload. - /// - public YesNoDefaultType Compressed - { - get - { - return this.compressedField; - } - set - { - this.compressedFieldSet = true; - this.compressedField = value; - } - } - - /// - /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes" - /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the - /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures. - /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no". - /// - public YesNoType EnableSignatureVerification - { - get - { - return this.enableSignatureVerificationField; - } - set - { - this.enableSignatureVerificationFieldSet = true; - this.enableSignatureVerificationField = value; - } - } - - /// - /// Specifies whether the bundle will allow individual control over the installation state of Features inside - /// the msi package. Managing feature selection requires special care to ensure the install, modify, update and - /// uninstall behavior of the package is always correct. The default is "no". - /// - public YesNoType EnableFeatureSelection - { - get - { - return this.enableFeatureSelectionField; - } - set - { - this.enableFeatureSelectionFieldSet = true; - this.enableFeatureSelectionField = value; - } - } - - /// - /// Override the automatic per-machine detection of MSI packages and force the package to be per-machine. - /// The default is "no", which allows the tools to detect the expected value. - /// - public YesNoType ForcePerMachine - { - get - { - return this.forcePerMachineField; - } - set - { - this.forcePerMachineFieldSet = true; - this.forcePerMachineField = value; - } - } - - /// - /// This attribute has been deprecated. When the value is "yes", the Binder will not read the MSI package - /// to detect uncompressed files that would otherwise be automatically included in the Bundle as Payloads. - /// The resulting Bundle may not be able to install the MSI package correctly. The default is "no". - /// - public YesNoType SuppressLooseFilePayloadGeneration - { - get - { - return this.suppressLooseFilePayloadGenerationField; - } - set - { - this.suppressLooseFilePayloadGenerationFieldSet = true; - this.suppressLooseFilePayloadGenerationField = value; - } - } - - /// - /// Specifies whether the MSI will be displayed in Programs and Features (also known as Add/Remove Programs). If "yes" is - /// specified the MSI package information will be displayed in Programs and Features. The default "no" indicates the MSI - /// will not be displayed. - /// - public YesNoType Visible - { - get - { - return this.visibleField; - } - set - { - this.visibleFieldSet = true; - this.visibleField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("MsiProperty" == childName)) - { - childValue = new MsiProperty(); - } - if (("SlipstreamMsp" == childName)) - { - childValue = new SlipstreamMsp(); - } - if (("Payload" == childName)) - { - childValue = new Payload(); - } - if (("PayloadGroupRef" == childName)) - { - childValue = new PayloadGroupRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MsiPackage", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.downloadUrlFieldSet) - { - writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); - } - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.installSizeFieldSet) - { - writer.WriteAttributeString("InstallSize", this.installSizeField); - } - if (this.installConditionFieldSet) - { - writer.WriteAttributeString("InstallCondition", this.installConditionField); - } - if (this.cacheFieldSet) - { - if ((this.cacheField == BundleCacheType.force)) - { - writer.WriteAttributeString("Cache", "force"); - } - if ((this.cacheField == BundleCacheType.remove)) - { - writer.WriteAttributeString("Cache", "remove"); - } - if ((this.cacheField == BundleCacheType.keep)) - { - writer.WriteAttributeString("Cache", "keep"); - } - } - if (this.cacheIdFieldSet) - { - writer.WriteAttributeString("CacheId", this.cacheIdField); - } - if (this.displayNameFieldSet) - { - writer.WriteAttributeString("DisplayName", this.displayNameField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.logPathVariableFieldSet) - { - writer.WriteAttributeString("LogPathVariable", this.logPathVariableField); - } - if (this.rollbackLogPathVariableFieldSet) - { - writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField); - } - if (this.permanentFieldSet) - { - if ((this.permanentField == YesNoType.no)) - { - writer.WriteAttributeString("Permanent", "no"); - } - if ((this.permanentField == YesNoType.yes)) - { - writer.WriteAttributeString("Permanent", "yes"); - } - } - if (this.vitalFieldSet) - { - if ((this.vitalField == YesNoType.no)) - { - writer.WriteAttributeString("Vital", "no"); - } - if ((this.vitalField == YesNoType.yes)) - { - writer.WriteAttributeString("Vital", "yes"); - } - } - if (this.compressedFieldSet) - { - if ((this.compressedField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("Compressed", "default"); - } - if ((this.compressedField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("Compressed", "no"); - } - if ((this.compressedField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("Compressed", "yes"); - } - } - if (this.enableSignatureVerificationFieldSet) - { - if ((this.enableSignatureVerificationField == YesNoType.no)) - { - writer.WriteAttributeString("EnableSignatureVerification", "no"); - } - if ((this.enableSignatureVerificationField == YesNoType.yes)) - { - writer.WriteAttributeString("EnableSignatureVerification", "yes"); - } - } - if (this.enableFeatureSelectionFieldSet) - { - if ((this.enableFeatureSelectionField == YesNoType.no)) - { - writer.WriteAttributeString("EnableFeatureSelection", "no"); - } - if ((this.enableFeatureSelectionField == YesNoType.yes)) - { - writer.WriteAttributeString("EnableFeatureSelection", "yes"); - } - } - if (this.forcePerMachineFieldSet) - { - if ((this.forcePerMachineField == YesNoType.no)) - { - writer.WriteAttributeString("ForcePerMachine", "no"); - } - if ((this.forcePerMachineField == YesNoType.yes)) - { - writer.WriteAttributeString("ForcePerMachine", "yes"); - } - } - if (this.suppressLooseFilePayloadGenerationFieldSet) - { - if ((this.suppressLooseFilePayloadGenerationField == YesNoType.no)) - { - writer.WriteAttributeString("SuppressLooseFilePayloadGeneration", "no"); - } - if ((this.suppressLooseFilePayloadGenerationField == YesNoType.yes)) - { - writer.WriteAttributeString("SuppressLooseFilePayloadGeneration", "yes"); - } - } - if (this.visibleFieldSet) - { - if ((this.visibleField == YesNoType.no)) - { - writer.WriteAttributeString("Visible", "no"); - } - if ((this.visibleField == YesNoType.yes)) - { - writer.WriteAttributeString("Visible", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("DownloadUrl" == name)) - { - this.downloadUrlField = value; - this.downloadUrlFieldSet = true; - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("InstallSize" == name)) - { - this.installSizeField = value; - this.installSizeFieldSet = true; - } - if (("InstallCondition" == name)) - { - this.installConditionField = value; - this.installConditionFieldSet = true; - } - if (("Cache" == name)) - { - this.cacheField = Enums.ParseBundleCacheType(value); - this.cacheFieldSet = true; - } - if (("CacheId" == name)) - { - this.cacheIdField = value; - this.cacheIdFieldSet = true; - } - if (("DisplayName" == name)) - { - this.displayNameField = value; - this.displayNameFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("LogPathVariable" == name)) - { - this.logPathVariableField = value; - this.logPathVariableFieldSet = true; - } - if (("RollbackLogPathVariable" == name)) - { - this.rollbackLogPathVariableField = value; - this.rollbackLogPathVariableFieldSet = true; - } - if (("Permanent" == name)) - { - this.permanentField = Enums.ParseYesNoType(value); - this.permanentFieldSet = true; - } - if (("Vital" == name)) - { - this.vitalField = Enums.ParseYesNoType(value); - this.vitalFieldSet = true; - } - if (("Compressed" == name)) - { - this.compressedField = Enums.ParseYesNoDefaultType(value); - this.compressedFieldSet = true; - } - if (("EnableSignatureVerification" == name)) - { - this.enableSignatureVerificationField = Enums.ParseYesNoType(value); - this.enableSignatureVerificationFieldSet = true; - } - if (("EnableFeatureSelection" == name)) - { - this.enableFeatureSelectionField = Enums.ParseYesNoType(value); - this.enableFeatureSelectionFieldSet = true; - } - if (("ForcePerMachine" == name)) - { - this.forcePerMachineField = Enums.ParseYesNoType(value); - this.forcePerMachineFieldSet = true; - } - if (("SuppressLooseFilePayloadGeneration" == name)) - { - this.suppressLooseFilePayloadGenerationField = Enums.ParseYesNoType(value); - this.suppressLooseFilePayloadGenerationFieldSet = true; - } - if (("Visible" == name)) - { - this.visibleField = Enums.ParseYesNoType(value); - this.visibleFieldSet = true; - } - } - } - - /// - /// Describes a single msp package to install. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MspPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string downloadUrlField; - - private bool downloadUrlFieldSet; - - private string idField; - - private bool idFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private string installSizeField; - - private bool installSizeFieldSet; - - private string installConditionField; - - private bool installConditionFieldSet; - - private BundleCacheType cacheField; - - private bool cacheFieldSet; - - private string cacheIdField; - - private bool cacheIdFieldSet; - - private string displayNameField; - - private bool displayNameFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string logPathVariableField; - - private bool logPathVariableFieldSet; - - private string rollbackLogPathVariableField; - - private bool rollbackLogPathVariableFieldSet; - - private YesNoType permanentField; - - private bool permanentFieldSet; - - private YesNoType vitalField; - - private bool vitalFieldSet; - - private YesNoDefaultType compressedField; - - private bool compressedFieldSet; - - private YesNoType enableSignatureVerificationField; - - private bool enableSignatureVerificationFieldSet; - - private YesNoDefaultType perMachineField; - - private bool perMachineFieldSet; - - private YesNoType slipstreamField; - - private bool slipstreamFieldSet; - - private ISchemaElement parentElement; - - public MspPackage() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiProperty))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Location of the package to add to the bundle. The default value is the Name attribute, if provided. - /// At a minimum, the SourceFile or Name attribute must be specified. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - /// - /// The destination path and file name for this chain payload. Use this attribute to rename the - /// chain entry point or extract it into a subfolder. The default value is the file name from the - /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified. - /// The use of '..' directories is not allowed. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - public string DownloadUrl - { - get - { - return this.downloadUrlField; - } - set - { - this.downloadUrlFieldSet = true; - this.downloadUrlField = value; - } - } - - /// - /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute - /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores). - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The identifier of another package that this one should be installed after. By default the After - /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this - /// attribute is specified ensure that a cycle is not created explicitly or implicitly. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// The size this package will take on disk in bytes after it is installed. By default, the binder will - /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs) - /// and use the total for the install size of the package. - /// - public string InstallSize - { - get - { - return this.installSizeField; - } - set - { - this.installSizeFieldSet = true; - this.installSizeField = value; - } - } - - /// - /// 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. - /// - public string InstallCondition - { - get - { - return this.installConditionField; - } - set - { - this.installConditionFieldSet = true; - this.installConditionField = value; - } - } - - /// - /// Whether to cache the package. The default is "keep". - /// - public BundleCacheType Cache - { - get - { - return this.cacheField; - } - set - { - this.cacheFieldSet = true; - this.cacheField = value; - } - } - - /// - /// The identifier to use when caching the package. - /// - public string CacheId - { - get - { - return this.cacheIdField; - } - set - { - this.cacheIdFieldSet = true; - this.cacheIdField = value; - } - } - - /// - /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages - /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use - /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the - /// bootstrapper application data manifest. - /// - public string DisplayName - { - get - { - return this.displayNameField; - } - set - { - this.displayNameFieldSet = true; - this.displayNameField = value; - } - } - - /// - /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages - /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use - /// the Description patch metadata property. Other package types must use this attribute to define a description in the - /// bootstrapper application data manifest. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not - /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging. - /// - public string LogPathVariable - { - get - { - return this.logPathVariableField; - } - set - { - this.logPathVariableFieldSet = true; - this.logPathVariableField = value; - } - } - - /// - /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause - /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which - /// default to no logging. - /// - public string RollbackLogPathVariable - { - get - { - return this.rollbackLogPathVariableField; - } - set - { - this.rollbackLogPathVariableFieldSet = true; - this.rollbackLogPathVariableField = value; - } - } - - /// - /// Specifies whether the package can be uninstalled. The default is "no". - /// - public YesNoType Permanent - { - get - { - return this.permanentField; - } - set - { - this.permanentFieldSet = true; - this.permanentField = value; - } - } - - /// - /// Specifies whether the package must succeed for the chain to continue. The default "yes" - /// indicates that if the package fails then the chain will fail and rollback or stop. If - /// "no" is specified then the chain will continue even if the package reports failure. - /// - public YesNoType Vital - { - get - { - return this.vitalField; - } - set - { - this.vitalFieldSet = true; - this.vitalField = value; - } - } - - /// - /// Whether the package payload should be embedded in a container or left as an external payload. - /// - public YesNoDefaultType Compressed - { - get - { - return this.compressedField; - } - set - { - this.compressedFieldSet = true; - this.compressedField = value; - } - } - - /// - /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes" - /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the - /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures. - /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no". - /// - public YesNoType EnableSignatureVerification - { - get - { - return this.enableSignatureVerificationField; - } - set - { - this.enableSignatureVerificationFieldSet = true; - this.enableSignatureVerificationField = value; - } - } - - /// - /// Indicates the package must be executed elevated. The default is "no". - /// - public YesNoDefaultType PerMachine - { - get - { - return this.perMachineField; - } - set - { - this.perMachineFieldSet = true; - this.perMachineField = value; - } - } - - /// - /// Specifies whether to automatically slipstream the patch for any target msi packages in the chain. The default is "no". - /// Even when the value is "no", you can still author the SlipstreamMsp element under MsiPackage elements as desired. - /// - public YesNoType Slipstream - { - get - { - return this.slipstreamField; - } - set - { - this.slipstreamFieldSet = true; - this.slipstreamField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("MsiProperty" == childName)) - { - childValue = new MsiProperty(); - } - if (("Payload" == childName)) - { - childValue = new Payload(); - } - if (("PayloadGroupRef" == childName)) - { - childValue = new PayloadGroupRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MspPackage", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.downloadUrlFieldSet) - { - writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); - } - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.installSizeFieldSet) - { - writer.WriteAttributeString("InstallSize", this.installSizeField); - } - if (this.installConditionFieldSet) - { - writer.WriteAttributeString("InstallCondition", this.installConditionField); - } - if (this.cacheFieldSet) - { - if ((this.cacheField == BundleCacheType.force)) - { - writer.WriteAttributeString("Cache", "force"); - } - if ((this.cacheField == BundleCacheType.remove)) - { - writer.WriteAttributeString("Cache", "remove"); - } - if ((this.cacheField == BundleCacheType.keep)) - { - writer.WriteAttributeString("Cache", "keep"); - } - } - if (this.cacheIdFieldSet) - { - writer.WriteAttributeString("CacheId", this.cacheIdField); - } - if (this.displayNameFieldSet) - { - writer.WriteAttributeString("DisplayName", this.displayNameField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.logPathVariableFieldSet) - { - writer.WriteAttributeString("LogPathVariable", this.logPathVariableField); - } - if (this.rollbackLogPathVariableFieldSet) - { - writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField); - } - if (this.permanentFieldSet) - { - if ((this.permanentField == YesNoType.no)) - { - writer.WriteAttributeString("Permanent", "no"); - } - if ((this.permanentField == YesNoType.yes)) - { - writer.WriteAttributeString("Permanent", "yes"); - } - } - if (this.vitalFieldSet) - { - if ((this.vitalField == YesNoType.no)) - { - writer.WriteAttributeString("Vital", "no"); - } - if ((this.vitalField == YesNoType.yes)) - { - writer.WriteAttributeString("Vital", "yes"); - } - } - if (this.compressedFieldSet) - { - if ((this.compressedField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("Compressed", "default"); - } - if ((this.compressedField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("Compressed", "no"); - } - if ((this.compressedField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("Compressed", "yes"); - } - } - if (this.enableSignatureVerificationFieldSet) - { - if ((this.enableSignatureVerificationField == YesNoType.no)) - { - writer.WriteAttributeString("EnableSignatureVerification", "no"); - } - if ((this.enableSignatureVerificationField == YesNoType.yes)) - { - writer.WriteAttributeString("EnableSignatureVerification", "yes"); - } - } - if (this.perMachineFieldSet) - { - if ((this.perMachineField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("PerMachine", "default"); - } - if ((this.perMachineField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("PerMachine", "no"); - } - if ((this.perMachineField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("PerMachine", "yes"); - } - } - if (this.slipstreamFieldSet) - { - if ((this.slipstreamField == YesNoType.no)) - { - writer.WriteAttributeString("Slipstream", "no"); - } - if ((this.slipstreamField == YesNoType.yes)) - { - writer.WriteAttributeString("Slipstream", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("DownloadUrl" == name)) - { - this.downloadUrlField = value; - this.downloadUrlFieldSet = true; - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("InstallSize" == name)) - { - this.installSizeField = value; - this.installSizeFieldSet = true; - } - if (("InstallCondition" == name)) - { - this.installConditionField = value; - this.installConditionFieldSet = true; - } - if (("Cache" == name)) - { - this.cacheField = Enums.ParseBundleCacheType(value); - this.cacheFieldSet = true; - } - if (("CacheId" == name)) - { - this.cacheIdField = value; - this.cacheIdFieldSet = true; - } - if (("DisplayName" == name)) - { - this.displayNameField = value; - this.displayNameFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("LogPathVariable" == name)) - { - this.logPathVariableField = value; - this.logPathVariableFieldSet = true; - } - if (("RollbackLogPathVariable" == name)) - { - this.rollbackLogPathVariableField = value; - this.rollbackLogPathVariableFieldSet = true; - } - if (("Permanent" == name)) - { - this.permanentField = Enums.ParseYesNoType(value); - this.permanentFieldSet = true; - } - if (("Vital" == name)) - { - this.vitalField = Enums.ParseYesNoType(value); - this.vitalFieldSet = true; - } - if (("Compressed" == name)) - { - this.compressedField = Enums.ParseYesNoDefaultType(value); - this.compressedFieldSet = true; - } - if (("EnableSignatureVerification" == name)) - { - this.enableSignatureVerificationField = Enums.ParseYesNoType(value); - this.enableSignatureVerificationFieldSet = true; - } - if (("PerMachine" == name)) - { - this.perMachineField = Enums.ParseYesNoDefaultType(value); - this.perMachineFieldSet = true; - } - if (("Slipstream" == name)) - { - this.slipstreamField = Enums.ParseYesNoType(value); - this.slipstreamFieldSet = true; - } - } - } - - /// - /// Describes a single msu package to install. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MsuPackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string downloadUrlField; - - private bool downloadUrlFieldSet; - - private string idField; - - private bool idFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private string installSizeField; - - private bool installSizeFieldSet; - - private string installConditionField; - - private bool installConditionFieldSet; - - private BundleCacheType cacheField; - - private bool cacheFieldSet; - - private string cacheIdField; - - private bool cacheIdFieldSet; - - private string displayNameField; - - private bool displayNameFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string logPathVariableField; - - private bool logPathVariableFieldSet; - - private string rollbackLogPathVariableField; - - private bool rollbackLogPathVariableFieldSet; - - private YesNoType permanentField; - - private bool permanentFieldSet; - - private YesNoType vitalField; - - private bool vitalFieldSet; - - private YesNoDefaultType compressedField; - - private bool compressedFieldSet; - - private YesNoType enableSignatureVerificationField; - - private bool enableSignatureVerificationFieldSet; - - private string detectConditionField; - - private bool detectConditionFieldSet; - - private string kBField; - - private bool kBFieldSet; - - private ISchemaElement parentElement; - - public MsuPackage() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackagePayload))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Location of the package to add to the bundle. The default value is the Name attribute, if provided. - /// At a minimum, the SourceFile or Name attribute must be specified. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - /// - /// The destination path and file name for this chain payload. Use this attribute to rename the - /// chain entry point or extract it into a subfolder. The default value is the file name from the - /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified. - /// The use of '..' directories is not allowed. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - public string DownloadUrl - { - get - { - return this.downloadUrlField; - } - set - { - this.downloadUrlFieldSet = true; - this.downloadUrlField = value; - } - } - - /// - /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute - /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores). - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The identifier of another package that this one should be installed after. By default the After - /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this - /// attribute is specified ensure that a cycle is not created explicitly or implicitly. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// The size this package will take on disk in bytes after it is installed. By default, the binder will - /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs) - /// and use the total for the install size of the package. - /// - public string InstallSize - { - get - { - return this.installSizeField; - } - set - { - this.installSizeFieldSet = true; - this.installSizeField = value; - } - } - - /// - /// 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. - /// - public string InstallCondition - { - get - { - return this.installConditionField; - } - set - { - this.installConditionFieldSet = true; - this.installConditionField = value; - } - } - - /// - /// Whether to cache the package. The default is "yes". - /// - public BundleCacheType Cache - { - get - { - return this.cacheField; - } - set - { - this.cacheFieldSet = true; - this.cacheField = value; - } - } - - /// - /// The identifier to use when caching the package. - /// - public string CacheId - { - get - { - return this.cacheIdField; - } - set - { - this.cacheIdFieldSet = true; - this.cacheIdField = value; - } - } - - /// - /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages - /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use - /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the - /// bootstrapper application data manifest. - /// - public string DisplayName - { - get - { - return this.displayNameField; - } - set - { - this.displayNameFieldSet = true; - this.displayNameField = value; - } - } - - /// - /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages - /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use - /// the Description patch metadata property. Other package types must use this attribute to define a description in the - /// bootstrapper application data manifest. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not - /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging. - /// - public string LogPathVariable - { - get - { - return this.logPathVariableField; - } - set - { - this.logPathVariableFieldSet = true; - this.logPathVariableField = value; - } - } - - /// - /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause - /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which - /// default to no logging. - /// - public string RollbackLogPathVariable - { - get - { - return this.rollbackLogPathVariableField; - } - set - { - this.rollbackLogPathVariableFieldSet = true; - this.rollbackLogPathVariableField = value; - } - } - - /// - /// Specifies whether the package can be uninstalled. The default is "no". - /// - public YesNoType Permanent - { - get - { - return this.permanentField; - } - set - { - this.permanentFieldSet = true; - this.permanentField = value; - } - } - - /// - /// Specifies whether the package must succeed for the chain to continue. The default "yes" - /// indicates that if the package fails then the chain will fail and rollback or stop. If - /// "no" is specified then the chain will continue even if the package reports failure. - /// - public YesNoType Vital - { - get - { - return this.vitalField; - } - set - { - this.vitalFieldSet = true; - this.vitalField = value; - } - } - - /// - /// Whether the package payload should be embedded in a container or left as an external payload. - /// - public YesNoDefaultType Compressed - { - get - { - return this.compressedField; - } - set - { - this.compressedFieldSet = true; - this.compressedField = value; - } - } - - /// - /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes" - /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the - /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures. - /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no". - /// - public YesNoType EnableSignatureVerification - { - get - { - return this.enableSignatureVerificationField; - } - set - { - this.enableSignatureVerificationFieldSet = true; - this.enableSignatureVerificationField = value; - } - } - - /// - /// A condition that determines if the package is present on the target system. This condition can use built-in - /// variables and variables returned by searches. This condition is necessary because Windows doesn't provide a - /// method to detect the presence of an MsuPackage. Burn uses this condition to determine how to treat this - /// package during a bundle action; for example, if this condition is false or omitted and the bundle is being - /// installed, Burn will install this package. - /// - public string DetectCondition - { - get - { - return this.detectConditionField; - } - set - { - this.detectConditionFieldSet = true; - this.detectConditionField = value; - } - } - - /// - /// The knowledge base identifier for the MSU. The KB attribute must be specified to enable the MSU package to - /// be uninstalled. Even then MSU uninstallation is only supported on Windows 7 and later. When the KB attribute - /// is specified, the Permanent attribute will the control whether the package is uninstalled. - /// - public string KB - { - get - { - return this.kBField; - } - set - { - this.kBFieldSet = true; - this.kBField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Payload" == childName)) - { - childValue = new Payload(); - } - if (("PayloadGroupRef" == childName)) - { - childValue = new PayloadGroupRef(); - } - if (("MsuPackagePayload" == childName)) - { - childValue = new MsuPackagePayload(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MsuPackage", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.downloadUrlFieldSet) - { - writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); - } - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.installSizeFieldSet) - { - writer.WriteAttributeString("InstallSize", this.installSizeField); - } - if (this.installConditionFieldSet) - { - writer.WriteAttributeString("InstallCondition", this.installConditionField); - } - if (this.cacheFieldSet) - { - if ((this.cacheField == BundleCacheType.force)) - { - writer.WriteAttributeString("Cache", "force"); - } - if ((this.cacheField == BundleCacheType.remove)) - { - writer.WriteAttributeString("Cache", "remove"); - } - if ((this.cacheField == BundleCacheType.keep)) - { - writer.WriteAttributeString("Cache", "keep"); - } - } - if (this.cacheIdFieldSet) - { - writer.WriteAttributeString("CacheId", this.cacheIdField); - } - if (this.displayNameFieldSet) - { - writer.WriteAttributeString("DisplayName", this.displayNameField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.logPathVariableFieldSet) - { - writer.WriteAttributeString("LogPathVariable", this.logPathVariableField); - } - if (this.rollbackLogPathVariableFieldSet) - { - writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField); - } - if (this.permanentFieldSet) - { - if ((this.permanentField == YesNoType.no)) - { - writer.WriteAttributeString("Permanent", "no"); - } - if ((this.permanentField == YesNoType.yes)) - { - writer.WriteAttributeString("Permanent", "yes"); - } - } - if (this.vitalFieldSet) - { - if ((this.vitalField == YesNoType.no)) - { - writer.WriteAttributeString("Vital", "no"); - } - if ((this.vitalField == YesNoType.yes)) - { - writer.WriteAttributeString("Vital", "yes"); - } - } - if (this.compressedFieldSet) - { - if ((this.compressedField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("Compressed", "default"); - } - if ((this.compressedField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("Compressed", "no"); - } - if ((this.compressedField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("Compressed", "yes"); - } - } - if (this.enableSignatureVerificationFieldSet) - { - if ((this.enableSignatureVerificationField == YesNoType.no)) - { - writer.WriteAttributeString("EnableSignatureVerification", "no"); - } - if ((this.enableSignatureVerificationField == YesNoType.yes)) - { - writer.WriteAttributeString("EnableSignatureVerification", "yes"); - } - } - if (this.detectConditionFieldSet) - { - writer.WriteAttributeString("DetectCondition", this.detectConditionField); - } - if (this.kBFieldSet) - { - writer.WriteAttributeString("KB", this.kBField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("DownloadUrl" == name)) - { - this.downloadUrlField = value; - this.downloadUrlFieldSet = true; - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("InstallSize" == name)) - { - this.installSizeField = value; - this.installSizeFieldSet = true; - } - if (("InstallCondition" == name)) - { - this.installConditionField = value; - this.installConditionFieldSet = true; - } - if (("Cache" == name)) - { - this.cacheField = Enums.ParseBundleCacheType(value); - this.cacheFieldSet = true; - } - if (("CacheId" == name)) - { - this.cacheIdField = value; - this.cacheIdFieldSet = true; - } - if (("DisplayName" == name)) - { - this.displayNameField = value; - this.displayNameFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("LogPathVariable" == name)) - { - this.logPathVariableField = value; - this.logPathVariableFieldSet = true; - } - if (("RollbackLogPathVariable" == name)) - { - this.rollbackLogPathVariableField = value; - this.rollbackLogPathVariableFieldSet = true; - } - if (("Permanent" == name)) - { - this.permanentField = Enums.ParseYesNoType(value); - this.permanentFieldSet = true; - } - if (("Vital" == name)) - { - this.vitalField = Enums.ParseYesNoType(value); - this.vitalFieldSet = true; - } - if (("Compressed" == name)) - { - this.compressedField = Enums.ParseYesNoDefaultType(value); - this.compressedFieldSet = true; - } - if (("EnableSignatureVerification" == name)) - { - this.enableSignatureVerificationField = Enums.ParseYesNoType(value); - this.enableSignatureVerificationFieldSet = true; - } - if (("DetectCondition" == name)) - { - this.detectConditionField = value; - this.detectConditionFieldSet = true; - } - if (("KB" == name)) - { - this.kBField = value; - this.kBFieldSet = true; - } - } - } - - /// - /// Describes a single exe package to install. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ExePackage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string downloadUrlField; - - private bool downloadUrlFieldSet; - - private string idField; - - private bool idFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private string installSizeField; - - private bool installSizeFieldSet; - - private string installConditionField; - - private bool installConditionFieldSet; - - private BundleCacheType cacheField; - - private bool cacheFieldSet; - - private string cacheIdField; - - private bool cacheIdFieldSet; - - private string displayNameField; - - private bool displayNameFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string logPathVariableField; - - private bool logPathVariableFieldSet; - - private string rollbackLogPathVariableField; - - private bool rollbackLogPathVariableFieldSet; - - private YesNoType permanentField; - - private bool permanentFieldSet; - - private YesNoType vitalField; - - private bool vitalFieldSet; - - private YesNoDefaultType compressedField; - - private bool compressedFieldSet; - - private YesNoType enableSignatureVerificationField; - - private bool enableSignatureVerificationFieldSet; - - private string detectConditionField; - - private bool detectConditionFieldSet; - - private string installCommandField; - - private bool installCommandFieldSet; - - private string repairCommandField; - - private bool repairCommandFieldSet; - - private string uninstallCommandField; - - private bool uninstallCommandFieldSet; - - private YesNoDefaultType perMachineField; - - private bool perMachineFieldSet; - - private BurnExeProtocolType protocolField; - - private bool protocolFieldSet; - - private ISchemaElement parentElement; - - public ExePackage() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackagePayload))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExitCode))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CommandLine))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Location of the package to add to the bundle. The default value is the Name attribute, if provided. - /// At a minimum, the SourceFile or Name attribute must be specified. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - /// - /// The destination path and file name for this chain payload. Use this attribute to rename the - /// chain entry point or extract it into a subfolder. The default value is the file name from the - /// SourceFile attribute, if provided. At a minimum, the Name or SourceFile attribute must be specified. - /// The use of '..' directories is not allowed. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - public string DownloadUrl - { - get - { - return this.downloadUrlField; - } - set - { - this.downloadUrlFieldSet = true; - this.downloadUrlField = value; - } - } - - /// - /// Identifier for this package, for ordering and cross-referencing. The default is the Name attribute - /// modified to be suitable as an identifier (i.e. invalid characters are replaced with underscores). - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The identifier of another package that this one should be installed after. By default the After - /// attribute is set to the previous sibling package in the Chain or PackageGroup element. If this - /// attribute is specified ensure that a cycle is not created explicitly or implicitly. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// The size this package will take on disk in bytes after it is installed. By default, the binder will - /// calculate the install size by scanning the package (File table for MSIs, Payloads for EXEs) - /// and use the total for the install size of the package. - /// - public string InstallSize - { - get - { - return this.installSizeField; - } - set - { - this.installSizeFieldSet = true; - this.installSizeField = value; - } - } - - /// - /// 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. - /// - public string InstallCondition - { - get - { - return this.installConditionField; - } - set - { - this.installConditionFieldSet = true; - this.installConditionField = value; - } - } - - /// - /// Whether to cache the package. The default is "yes". - /// - public BundleCacheType Cache - { - get - { - return this.cacheField; - } - set - { - this.cacheFieldSet = true; - this.cacheField = value; - } - } - - /// - /// The identifier to use when caching the package. - /// - public string CacheId - { - get - { - return this.cacheIdField; - } - set - { - this.cacheIdFieldSet = true; - this.cacheIdField = value; - } - } - - /// - /// Specifies the display name to place in the bootstrapper application data manifest for the package. By default, ExePackages - /// use the ProductName field from the version information, MsiPackages use the ProductName property, and MspPackages use - /// the DisplayName patch metadata property. Other package types must use this attribute to define a display name in the - /// bootstrapper application data manifest. - /// - public string DisplayName - { - get - { - return this.displayNameField; - } - set - { - this.displayNameFieldSet = true; - this.displayNameField = value; - } - } - - /// - /// Specifies the description to place in the bootstrapper application data manifest for the package. By default, ExePackages - /// use the FileName field from the version information, MsiPackages use the ARPCOMMENTS property, and MspPackages use - /// the Description patch metadata property. Other package types must use this attribute to define a description in the - /// bootstrapper application data manifest. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Name of a Variable that will hold the path to the log file. An empty value will cause the variable to not - /// be set. The default is "WixBundleLog_[PackageId]" except for MSU packages which default to no logging. - /// - public string LogPathVariable - { - get - { - return this.logPathVariableField; - } - set - { - this.logPathVariableFieldSet = true; - this.logPathVariableField = value; - } - } - - /// - /// Name of a Variable that will hold the path to the log file used during rollback. An empty value will cause - /// the variable to not be set. The default is "WixBundleRollbackLog_[PackageId]" except for MSU packages which - /// default to no logging. - /// - public string RollbackLogPathVariable - { - get - { - return this.rollbackLogPathVariableField; - } - set - { - this.rollbackLogPathVariableFieldSet = true; - this.rollbackLogPathVariableField = value; - } - } - - /// - /// Specifies whether the package can be uninstalled. The default is "no". - /// - public YesNoType Permanent - { - get - { - return this.permanentField; - } - set - { - this.permanentFieldSet = true; - this.permanentField = value; - } - } - - /// - /// Specifies whether the package must succeed for the chain to continue. The default "yes" - /// indicates that if the package fails then the chain will fail and rollback or stop. If - /// "no" is specified then the chain will continue even if the package reports failure. - /// - public YesNoType Vital - { - get - { - return this.vitalField; - } - set - { - this.vitalFieldSet = true; - this.vitalField = value; - } - } - - /// - /// Whether the package payload should be embedded in a container or left as an external payload. - /// - public YesNoDefaultType Compressed - { - get - { - return this.compressedField; - } - set - { - this.compressedFieldSet = true; - this.compressedField = value; - } - } - - /// - /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes" - /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the - /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures. - /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no". - /// - public YesNoType EnableSignatureVerification - { - get - { - return this.enableSignatureVerificationField; - } - set - { - this.enableSignatureVerificationFieldSet = true; - this.enableSignatureVerificationField = value; - } - } - - /// - /// A condition that determines if the package is present on the target system. This condition can use built-in - /// variables and variables returned by searches. This condition is necessary because Windows doesn't provide a - /// method to detect the presence of an ExePackage. Burn uses this condition to determine how to treat this - /// package during a bundle action; for example, if this condition is false or omitted and the bundle is being - /// installed, Burn will install this package. - /// - public string DetectCondition - { - get - { - return this.detectConditionField; - } - set - { - this.detectConditionFieldSet = true; - this.detectConditionField = value; - } - } - - /// - /// 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. - /// - public string InstallCommand - { - get - { - return this.installCommandField; - } - set - { - this.installCommandFieldSet = true; - this.installCommandField = value; - } - } - - /// - /// The command-line arguments to specify to indicate a repair. If the executable package can be repaired but - /// does not require any special command-line arguments to do so then set the attribute's value to blank. To - /// indicate that the package does not support repair, omit this attribute. - /// - public string RepairCommand - { - get - { - return this.repairCommandField; - } - set - { - this.repairCommandFieldSet = true; - this.repairCommandField = value; - } - } - - /// - /// 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". - /// - public string UninstallCommand - { - get - { - return this.uninstallCommandField; - } - set - { - this.uninstallCommandFieldSet = true; - this.uninstallCommandField = value; - } - } - - /// - /// Indicates the package must be executed elevated. The default is "no". - /// - public YesNoDefaultType PerMachine - { - get - { - return this.perMachineField; - } - set - { - this.perMachineFieldSet = true; - this.perMachineField = value; - } - } - - /// - /// Indicates the communication protocol the package supports for extended progress and error reporting. The default is "none". - /// - public BurnExeProtocolType Protocol - { - get - { - return this.protocolField; - } - set - { - this.protocolFieldSet = true; - this.protocolField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Payload" == childName)) - { - childValue = new Payload(); - } - if (("PayloadGroupRef" == childName)) - { - childValue = new PayloadGroupRef(); - } - if (("ExePackagePayload" == childName)) - { - childValue = new ExePackagePayload(); - } - if (("ExitCode" == childName)) - { - childValue = new ExitCode(); - } - if (("CommandLine" == childName)) - { - childValue = new CommandLine(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ExePackage", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.downloadUrlFieldSet) - { - writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); - } - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.installSizeFieldSet) - { - writer.WriteAttributeString("InstallSize", this.installSizeField); - } - if (this.installConditionFieldSet) - { - writer.WriteAttributeString("InstallCondition", this.installConditionField); - } - if (this.cacheFieldSet) - { - if ((this.cacheField == BundleCacheType.force)) - { - writer.WriteAttributeString("Cache", "force"); - } - if ((this.cacheField == BundleCacheType.remove)) - { - writer.WriteAttributeString("Cache", "remove"); - } - if ((this.cacheField == BundleCacheType.keep)) - { - writer.WriteAttributeString("Cache", "keep"); - } - } - if (this.cacheIdFieldSet) - { - writer.WriteAttributeString("CacheId", this.cacheIdField); - } - if (this.displayNameFieldSet) - { - writer.WriteAttributeString("DisplayName", this.displayNameField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.logPathVariableFieldSet) - { - writer.WriteAttributeString("LogPathVariable", this.logPathVariableField); - } - if (this.rollbackLogPathVariableFieldSet) - { - writer.WriteAttributeString("RollbackLogPathVariable", this.rollbackLogPathVariableField); - } - if (this.permanentFieldSet) - { - if ((this.permanentField == YesNoType.no)) - { - writer.WriteAttributeString("Permanent", "no"); - } - if ((this.permanentField == YesNoType.yes)) - { - writer.WriteAttributeString("Permanent", "yes"); - } - } - if (this.vitalFieldSet) - { - if ((this.vitalField == YesNoType.no)) - { - writer.WriteAttributeString("Vital", "no"); - } - if ((this.vitalField == YesNoType.yes)) - { - writer.WriteAttributeString("Vital", "yes"); - } - } - if (this.compressedFieldSet) - { - if ((this.compressedField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("Compressed", "default"); - } - if ((this.compressedField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("Compressed", "no"); - } - if ((this.compressedField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("Compressed", "yes"); - } - } - if (this.enableSignatureVerificationFieldSet) - { - if ((this.enableSignatureVerificationField == YesNoType.no)) - { - writer.WriteAttributeString("EnableSignatureVerification", "no"); - } - if ((this.enableSignatureVerificationField == YesNoType.yes)) - { - writer.WriteAttributeString("EnableSignatureVerification", "yes"); - } - } - if (this.detectConditionFieldSet) - { - writer.WriteAttributeString("DetectCondition", this.detectConditionField); - } - if (this.installCommandFieldSet) - { - writer.WriteAttributeString("InstallCommand", this.installCommandField); - } - if (this.repairCommandFieldSet) - { - writer.WriteAttributeString("RepairCommand", this.repairCommandField); - } - if (this.uninstallCommandFieldSet) - { - writer.WriteAttributeString("UninstallCommand", this.uninstallCommandField); - } - if (this.perMachineFieldSet) - { - if ((this.perMachineField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("PerMachine", "default"); - } - if ((this.perMachineField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("PerMachine", "no"); - } - if ((this.perMachineField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("PerMachine", "yes"); - } - } - if (this.protocolFieldSet) - { - if ((this.protocolField == BurnExeProtocolType.none)) - { - writer.WriteAttributeString("Protocol", "none"); - } - if ((this.protocolField == BurnExeProtocolType.burn)) - { - writer.WriteAttributeString("Protocol", "burn"); - } - if ((this.protocolField == BurnExeProtocolType.netfx4)) - { - writer.WriteAttributeString("Protocol", "netfx4"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("DownloadUrl" == name)) - { - this.downloadUrlField = value; - this.downloadUrlFieldSet = true; - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("InstallSize" == name)) - { - this.installSizeField = value; - this.installSizeFieldSet = true; - } - if (("InstallCondition" == name)) - { - this.installConditionField = value; - this.installConditionFieldSet = true; - } - if (("Cache" == name)) - { - this.cacheField = Enums.ParseBundleCacheType(value); - this.cacheFieldSet = true; - } - if (("CacheId" == name)) - { - this.cacheIdField = value; - this.cacheIdFieldSet = true; - } - if (("DisplayName" == name)) - { - this.displayNameField = value; - this.displayNameFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("LogPathVariable" == name)) - { - this.logPathVariableField = value; - this.logPathVariableFieldSet = true; - } - if (("RollbackLogPathVariable" == name)) - { - this.rollbackLogPathVariableField = value; - this.rollbackLogPathVariableFieldSet = true; - } - if (("Permanent" == name)) - { - this.permanentField = Enums.ParseYesNoType(value); - this.permanentFieldSet = true; - } - if (("Vital" == name)) - { - this.vitalField = Enums.ParseYesNoType(value); - this.vitalFieldSet = true; - } - if (("Compressed" == name)) - { - this.compressedField = Enums.ParseYesNoDefaultType(value); - this.compressedFieldSet = true; - } - if (("EnableSignatureVerification" == name)) - { - this.enableSignatureVerificationField = Enums.ParseYesNoType(value); - this.enableSignatureVerificationFieldSet = true; - } - if (("DetectCondition" == name)) - { - this.detectConditionField = value; - this.detectConditionFieldSet = true; - } - if (("InstallCommand" == name)) - { - this.installCommandField = value; - this.installCommandFieldSet = true; - } - if (("RepairCommand" == name)) - { - this.repairCommandField = value; - this.repairCommandFieldSet = true; - } - if (("UninstallCommand" == name)) - { - this.uninstallCommandField = value; - this.uninstallCommandFieldSet = true; - } - if (("PerMachine" == name)) - { - this.perMachineField = Enums.ParseYesNoDefaultType(value); - this.perMachineFieldSet = true; - } - if (("Protocol" == name)) - { - this.protocolField = Enums.ParseBurnExeProtocolType(value); - this.protocolFieldSet = true; - } - } - } - - /// - /// Describes a rollback boundary in the chain. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RollbackBoundary : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private YesNoType vitalField; - - private bool vitalFieldSet; - - private YesNoType transactionField; - - private bool transactionFieldSet; - - private ISchemaElement parentElement; - - public RollbackBoundary() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for this rollback boundary, for ordering and cross-referencing. If this attribute is - /// not provided a stable identifier will be generated. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Specifies whether the rollback boundary aborts the chain. The default "yes" indicates that if - /// the rollback boundary is encountered then the chain will fail and rollback or stop. If "no" - /// is specified then the chain should continue successfuly at the next rollback boundary. - /// - public YesNoType Vital - { - get - { - return this.vitalField; - } - set - { - this.vitalFieldSet = true; - this.vitalField = value; - } - } - - /// - /// Specifies whether the rollback boundary is wrapped in an MSI transaction. The default is "no" - /// - public YesNoType Transaction - { - get - { - return this.transactionField; - } - set - { - this.transactionFieldSet = true; - this.transactionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RollbackBoundary", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.vitalFieldSet) - { - if ((this.vitalField == YesNoType.no)) - { - writer.WriteAttributeString("Vital", "no"); - } - if ((this.vitalField == YesNoType.yes)) - { - writer.WriteAttributeString("Vital", "yes"); - } - } - if (this.transactionFieldSet) - { - if ((this.transactionField == YesNoType.no)) - { - writer.WriteAttributeString("Transaction", "no"); - } - if ((this.transactionField == YesNoType.yes)) - { - writer.WriteAttributeString("Transaction", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Vital" == name)) - { - this.vitalField = Enums.ParseYesNoType(value); - this.vitalFieldSet = true; - } - if (("Transaction" == name)) - { - this.transactionField = Enums.ParseYesNoType(value); - this.transactionFieldSet = true; - } - } - } - - /// - /// Describes a package group to a bootstrapper. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PackageGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public PackageGroup() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPackage))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MspPackage))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsuPackage))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExePackage))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RollbackBoundary))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for package group. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("MsiPackage" == childName)) - { - childValue = new MsiPackage(); - } - if (("MspPackage" == childName)) - { - childValue = new MspPackage(); - } - if (("MsuPackage" == childName)) - { - childValue = new MsuPackage(); - } - if (("ExePackage" == childName)) - { - childValue = new ExePackage(); - } - if (("RollbackBoundary" == childName)) - { - childValue = new RollbackBoundary(); - } - if (("PackageGroupRef" == childName)) - { - childValue = new PackageGroupRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PackageGroup", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Create a reference to PackageGroup element that exists inside a Bundle or Fragment element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PackageGroupRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the PackageGroup element to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The identifier of a package that this group should be installed after. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PackageGroupRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - } - } - - /// - /// Allows an MSI property to be set based on the value of a burn engine expression. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MsiProperty : ISchemaElement, ISetAttributes - { - - private string nameField; - - private bool nameFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - /// - /// 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 - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// 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. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MsiProperty", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - } - - /// - /// Specifies a patch included in the same bundle that is installed when the parent MSI package is installed. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class SlipstreamMsp : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier for a MspPackage in the bundle. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("SlipstreamMsp", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Describes a burn engine variable to define. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Variable : ISchemaElement, ISetAttributes - { - - private YesNoType hiddenField; - - private bool hiddenFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private YesNoType persistedField; - - private bool persistedFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private TypeType typeField; - - private bool typeFieldSet; - - private ISchemaElement parentElement; - - /// - /// Whether the value of the variable should be hidden. - /// - public YesNoType Hidden - { - get - { - return this.hiddenField; - } - set - { - this.hiddenFieldSet = true; - this.hiddenField = value; - } - } - - /// - /// The name for the variable. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Whether the variable should be persisted. - /// - public YesNoType Persisted - { - get - { - return this.persistedField; - } - set - { - this.persistedFieldSet = true; - this.persistedField = value; - } - } - - /// - /// Starting value for the variable. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// Type of the variable, inferred from the value if not specified. - /// - public TypeType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a TypeType from a string. - /// - public static TypeType ParseTypeType(string value) - { - TypeType parsedValue; - Variable.TryParseTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypeType from a string. - /// - public static bool TryParseTypeType(string value, out TypeType parsedValue) - { - parsedValue = TypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("string" == value)) - { - parsedValue = TypeType.@string; - } - else - { - if (("numeric" == value)) - { - parsedValue = TypeType.numeric; - } - else - { - if (("version" == value)) - { - parsedValue = TypeType.version; - } - else - { - parsedValue = TypeType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Variable", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.hiddenFieldSet) - { - if ((this.hiddenField == YesNoType.no)) - { - writer.WriteAttributeString("Hidden", "no"); - } - if ((this.hiddenField == YesNoType.yes)) - { - writer.WriteAttributeString("Hidden", "yes"); - } - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.persistedFieldSet) - { - if ((this.persistedField == YesNoType.no)) - { - writer.WriteAttributeString("Persisted", "no"); - } - if ((this.persistedField == YesNoType.yes)) - { - writer.WriteAttributeString("Persisted", "yes"); - } - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.typeFieldSet) - { - if ((this.typeField == TypeType.@string)) - { - writer.WriteAttributeString("Type", "string"); - } - if ((this.typeField == TypeType.numeric)) - { - writer.WriteAttributeString("Type", "numeric"); - } - if ((this.typeField == TypeType.version)) - { - writer.WriteAttributeString("Type", "version"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Hidden" == name)) - { - this.hiddenField = Enums.ParseYesNoType(value); - this.hiddenFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Persisted" == name)) - { - this.persistedField = Enums.ParseYesNoType(value); - this.persistedFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = Variable.ParseTypeType(value); - this.typeFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum TypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - @string, - - numeric, - - version, - } - } - - /// - /// Representation of a file that contains one or more files. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Container : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string downloadUrlField; - - private bool downloadUrlFieldSet; - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private BurnContainerType typeField; - - private bool typeFieldSet; - - private ISchemaElement parentElement; - - public Container() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroupRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public string DownloadUrl - { - get - { - return this.downloadUrlField; - } - set - { - this.downloadUrlFieldSet = true; - this.downloadUrlField = value; - } - } - - /// - /// The unique identifier for the container. If this attribute is not specified the Name attribute will be used. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The file name for this container. A relative path may be provided to place the container in a sub-folder of the bundle. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Indicates whether the container is "attached" to the bundle executable or placed external to the bundle extecutable as "detached". If - /// this attribute is not specified, the default is to create a detached container. - /// - public BurnContainerType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("PackageGroupRef" == childName)) - { - childValue = new PackageGroupRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Container", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.downloadUrlFieldSet) - { - writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); - } - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.typeFieldSet) - { - if ((this.typeField == BurnContainerType.attached)) - { - writer.WriteAttributeString("Type", "attached"); - } - if ((this.typeField == BurnContainerType.detached)) - { - writer.WriteAttributeString("Type", "detached"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("DownloadUrl" == name)) - { - this.downloadUrlField = value; - this.downloadUrlFieldSet = true; - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = Enums.ParseBurnContainerType(value); - this.typeFieldSet = true; - } - } - } - - /// - /// Create a reference to an existing Container element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ContainerRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of Container element to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ContainerRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Describes map of exit code returned from executable package to a bootstrapper behavior. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ExitCode : ISchemaElement, ISetAttributes - { - - private int valueField; - - private bool valueFieldSet; - - private BehaviorType behaviorField; - - private bool behaviorFieldSet; - - private ISchemaElement parentElement; - - /// - /// Exit code returned from executable package. If no value is provided it means all values not explicitly set default to this behavior. - /// - public int Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// Choose one of the supported behaviors error codes: success, error, scheduleReboot, forceReboot. - /// - public BehaviorType Behavior - { - get - { - return this.behaviorField; - } - set - { - this.behaviorFieldSet = true; - this.behaviorField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a BehaviorType from a string. - /// - public static BehaviorType ParseBehaviorType(string value) - { - BehaviorType parsedValue; - ExitCode.TryParseBehaviorType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a BehaviorType from a string. - /// - public static bool TryParseBehaviorType(string value, out BehaviorType parsedValue) - { - parsedValue = BehaviorType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("success" == value)) - { - parsedValue = BehaviorType.success; - } - else - { - if (("error" == value)) - { - parsedValue = BehaviorType.error; - } - else - { - if (("scheduleReboot" == value)) - { - parsedValue = BehaviorType.scheduleReboot; - } - else - { - if (("forceReboot" == value)) - { - parsedValue = BehaviorType.forceReboot; - } - else - { - parsedValue = BehaviorType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ExitCode", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField.ToString(CultureInfo.InvariantCulture)); - } - if (this.behaviorFieldSet) - { - if ((this.behaviorField == BehaviorType.success)) - { - writer.WriteAttributeString("Behavior", "success"); - } - if ((this.behaviorField == BehaviorType.error)) - { - writer.WriteAttributeString("Behavior", "error"); - } - if ((this.behaviorField == BehaviorType.scheduleReboot)) - { - writer.WriteAttributeString("Behavior", "scheduleReboot"); - } - if ((this.behaviorField == BehaviorType.forceReboot)) - { - writer.WriteAttributeString("Behavior", "forceReboot"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Value" == name)) - { - this.valueField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.valueFieldSet = true; - } - if (("Behavior" == name)) - { - this.behaviorField = ExitCode.ParseBehaviorType(value); - this.behaviorFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum BehaviorType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - success, - - error, - - scheduleReboot, - - forceReboot, - } - } - - /// - /// Describes additional, conditional command-line arguments for an ExePackage. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CommandLine : ISchemaElement, ISetAttributes - { - - private string installArgumentField; - - private bool installArgumentFieldSet; - - private string uninstallArgumentField; - - private bool uninstallArgumentFieldSet; - - private string repairArgumentField; - - private bool repairArgumentFieldSet; - - private string conditionField; - - private bool conditionFieldSet; - - private ISchemaElement parentElement; - - /// - /// Additional command-line arguments to apply during package installation if Condition is true. - /// - public string InstallArgument - { - get - { - return this.installArgumentField; - } - set - { - this.installArgumentFieldSet = true; - this.installArgumentField = value; - } - } - - /// - /// Additional command-line arguments to apply during package uninstallation if Condition is true. - /// - public string UninstallArgument - { - get - { - return this.uninstallArgumentField; - } - set - { - this.uninstallArgumentFieldSet = true; - this.uninstallArgumentField = value; - } - } - - /// - /// Additional command-line arguments to apply during package repair if Condition is true. - /// - public string RepairArgument - { - get - { - return this.repairArgumentField; - } - set - { - this.repairArgumentFieldSet = true; - this.repairArgumentField = value; - } - } - - /// - /// The condition that controls whether the command-line arguments specified in the - /// InstallArgument, UninstallArgument, or RepairArgument attributes are appended to the - /// command line passed to the ExePackage. Which attribute is used depends on the - /// action being applied to the ExePackage. For example, when the ExePackage is - /// being installed, the InstallArgument attribute value is appended to the command - /// line when the ExePackage is executed. - /// - public string Condition - { - get - { - return this.conditionField; - } - set - { - this.conditionFieldSet = true; - this.conditionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CommandLine", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.installArgumentFieldSet) - { - writer.WriteAttributeString("InstallArgument", this.installArgumentField); - } - if (this.uninstallArgumentFieldSet) - { - writer.WriteAttributeString("UninstallArgument", this.uninstallArgumentField); - } - if (this.repairArgumentFieldSet) - { - writer.WriteAttributeString("RepairArgument", this.repairArgumentField); - } - if (this.conditionFieldSet) - { - writer.WriteAttributeString("Condition", this.conditionField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("InstallArgument" == name)) - { - this.installArgumentField = value; - this.installArgumentFieldSet = true; - } - if (("UninstallArgument" == name)) - { - this.uninstallArgumentField = value; - this.uninstallArgumentFieldSet = true; - } - if (("RepairArgument" == name)) - { - this.repairArgumentField = value; - this.repairArgumentFieldSet = true; - } - if (("Condition" == name)) - { - this.conditionField = value; - this.conditionFieldSet = true; - } - } - } - - /// - /// Describes a payload to a bootstrapper. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Payload : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private YesNoDefaultType compressedField; - - private bool compressedFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string downloadUrlField; - - private bool downloadUrlFieldSet; - - private YesNoType enableSignatureVerificationField; - - private bool enableSignatureVerificationFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of Payload element. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Whether the payload should be embedded in a container or left as an external payload. - /// - public YesNoDefaultType Compressed - { - get - { - return this.compressedField; - } - set - { - this.compressedFieldSet = true; - this.compressedField = value; - } - } - - /// - /// Location of the source file. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - /// - /// The destination path and file name for this payload. The default is the source file name. The use of '..' directories is not allowed. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - public string DownloadUrl - { - get - { - return this.downloadUrlField; - } - set - { - this.downloadUrlFieldSet = true; - this.downloadUrlField = value; - } - } - - /// - /// By default, a Bundle will use the hash of a package to verify its contents. If this attribute is set to "yes" - /// and the package is signed with an Authenticode signature the Bundle will verify the contents of the package using the - /// signature instead. Beware that there are many real world issues with Windows verifying Authenticode signatures. - /// Since the Authenticode signatures are no more secure than hashing the packages directly, the default is "no". - /// - public YesNoType EnableSignatureVerification - { - get - { - return this.enableSignatureVerificationField; - } - set - { - this.enableSignatureVerificationFieldSet = true; - this.enableSignatureVerificationField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Payload", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.compressedFieldSet) - { - if ((this.compressedField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("Compressed", "default"); - } - if ((this.compressedField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("Compressed", "no"); - } - if ((this.compressedField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("Compressed", "yes"); - } - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.downloadUrlFieldSet) - { - writer.WriteAttributeString("DownloadUrl", this.downloadUrlField); - } - if (this.enableSignatureVerificationFieldSet) - { - if ((this.enableSignatureVerificationField == YesNoType.no)) - { - writer.WriteAttributeString("EnableSignatureVerification", "no"); - } - if ((this.enableSignatureVerificationField == YesNoType.yes)) - { - writer.WriteAttributeString("EnableSignatureVerification", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Compressed" == name)) - { - this.compressedField = Enums.ParseYesNoDefaultType(value); - this.compressedFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("DownloadUrl" == name)) - { - this.downloadUrlField = value; - this.downloadUrlFieldSet = true; - } - if (("EnableSignatureVerification" == name)) - { - this.enableSignatureVerificationField = Enums.ParseYesNoType(value); - this.enableSignatureVerificationFieldSet = true; - } - } - } - - /// - /// Describes a payload group to a bootstrapper. PayloadGroups referenced from within a Bundle are tied to the Bundle. - /// PayloadGroups referenced from a Fragment are tied to the context of whatever references them such as an ExePackage or MsiPackage. - /// It is possible to share a PayloadGroup between multiple Packages and/or a Bundle by creating multiple references to it. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PayloadGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public PayloadGroup() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Payload))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroupRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for payload group. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Payload" == childName)) - { - childValue = new Payload(); - } - if (("PayloadGroupRef" == childName)) - { - childValue = new PayloadGroupRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PayloadGroup", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Create a reference to PayloadGroup element that exists inside a Bundle or Fragment element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PayloadGroupRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the PayloadGroup element to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PayloadGroupRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - public class ExePackagePayload : RemotePayload - { - public ExePackagePayload() : base("ExePackagePayload") { } - } - - public class MsuPackagePayload : RemotePayload - { - public MsuPackagePayload() : base("MsuPackagePayload") { } - } - - /// - /// Describes information about a remote file payload that is not available at the time of building the bundle. - /// The parent must specify DownloadUrl and must not specify SourceFile when using this element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public abstract class RemotePayload : ISchemaElement, ISetAttributes - { - private string elementName; - - public RemotePayload(string elementName) - { - this.elementName = elementName; - } - - private string descriptionField; - - private bool descriptionFieldSet; - - private string hashField; - - private bool hashFieldSet; - - private string productNameField; - - private bool productNameFieldSet; - - private long sizeField; - - private bool sizeFieldSet; - - private string versionField; - - private bool versionFieldSet; - - private ISchemaElement parentElement; - - /// - /// Description of the file from version resources. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// SHA-1 hash of the RemotePayload. Include this attribute if the remote file is unsigned or SuppressSignatureVerification is set to Yes. - /// - public string Hash - { - get - { - return this.hashField; - } - set - { - this.hashFieldSet = true; - this.hashField = value; - } - } - - /// - /// Product name of the file from version resouces. - /// - public string ProductName - { - get - { - return this.productNameField; - } - set - { - this.productNameFieldSet = true; - this.productNameField = value; - } - } - - /// - /// Size of the remote file in bytes. - /// - public long Size - { - get - { - return this.sizeField; - } - set - { - this.sizeFieldSet = true; - this.sizeField = value; - } - } - - /// - /// Version of the remote file - /// - public string Version - { - get - { - return this.versionField; - } - set - { - this.versionFieldSet = true; - this.versionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement(this.elementName, "http://wixtoolset.org/schemas/v4/wxs"); - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.hashFieldSet) - { - writer.WriteAttributeString("Hash", this.hashField); - } - if (this.productNameFieldSet) - { - writer.WriteAttributeString("ProductName", this.productNameField); - } - if (this.sizeFieldSet) - { - writer.WriteAttributeString("Size", this.sizeField.ToString(CultureInfo.InvariantCulture)); - } - if (this.versionFieldSet) - { - writer.WriteAttributeString("Version", this.versionField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("Hash" == name)) - { - this.hashField = value; - this.hashFieldSet = true; - } - if (("ProductName" == name)) - { - this.productNameField = value; - this.productNameFieldSet = true; - } - if (("Size" == name)) - { - this.sizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sizeFieldSet = true; - } - if (("Version" == name)) - { - this.versionField = value; - this.versionFieldSet = true; - } - } - } - - /// - /// Create a RelatedBundle element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RelatedBundle : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ActionType actionField; - - private bool actionFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the RelatedBundle group. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The action to take on bundles related to this one. Detect is the default. - /// - public ActionType Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ActionType from a string. - /// - public static ActionType ParseActionType(string value) - { - ActionType parsedValue; - RelatedBundle.TryParseActionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ActionType from a string. - /// - public static bool TryParseActionType(string value, out ActionType parsedValue) - { - parsedValue = ActionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("Detect" == value)) - { - parsedValue = ActionType.Detect; - } - else - { - if (("Upgrade" == value)) - { - parsedValue = ActionType.Upgrade; - } - else - { - if (("Addon" == value)) - { - parsedValue = ActionType.Addon; - } - else - { - if (("Patch" == value)) - { - parsedValue = ActionType.Patch; - } - else - { - parsedValue = ActionType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RelatedBundle", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.actionFieldSet) - { - if ((this.actionField == ActionType.Detect)) - { - writer.WriteAttributeString("Action", "Detect"); - } - if ((this.actionField == ActionType.Upgrade)) - { - writer.WriteAttributeString("Action", "Upgrade"); - } - if ((this.actionField == ActionType.Addon)) - { - writer.WriteAttributeString("Action", "Addon"); - } - if ((this.actionField == ActionType.Patch)) - { - writer.WriteAttributeString("Action", "Patch"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Action" == name)) - { - this.actionField = RelatedBundle.ParseActionType(value); - this.actionFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ActionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - Detect, - - Upgrade, - - Addon, - - Patch, - } - } - - /// - /// Defines the update for a Bundle. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Update : ISchemaElement, ISetAttributes - { - - private string locationField; - - private bool locationFieldSet; - - private ISchemaElement parentElement; - - /// - /// The absolute path or URL to check for an update bundle. Currently the engine provides this value - /// in the IBootstrapperApplication::OnDetectUpdateBegin() and otherwise ignores the value. In the - /// future the engine will be able to acquire an update bundle from the location and determine if it - /// is newer than the current executing bundle. - /// - public string Location - { - get - { - return this.locationField; - } - set - { - this.locationFieldSet = true; - this.locationField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Update", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.locationFieldSet) - { - writer.WriteAttributeString("Location", this.locationField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Location" == name)) - { - this.locationField = value; - this.locationFieldSet = true; - } - } - } - - /// - /// The Package element is analogous to the main function in a C program. When linking, only one Package section - /// can be given to the linker to produce a successful result. Using this element creates an msi file. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Package : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string codepageField; - - private bool codepageFieldSet; - - private string languageField; - - private bool languageFieldSet; - - private string manufacturerField; - - private bool manufacturerFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string upgradeCodeField; - - private bool upgradeCodeFieldSet; - - private string versionField; - - private bool versionFieldSet; - - private ISchemaElement parentElement; - - public Package() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SummaryInformation))); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Binary))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComplianceCheck))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroup))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Condition))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Directory))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Feature))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Icon))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(InstanceTransforms))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(MajorUpgrade))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Media))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(MediaTemplate))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PackageCertificates))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCertificates))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Property))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UI))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Upgrade))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable))); - ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence))); - childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence))); - childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence))); - childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence))); - childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence))); - childCollection1.AddCollection(childCollection2); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// The product code GUID for the product. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The code page integer value or web name for the resulting MSI. See remarks for more information. - /// - public string Codepage - { - get - { - return this.codepageField; - } - set - { - this.codepageFieldSet = true; - this.codepageField = value; - } - } - - /// - /// The decimal language ID (LCID) for the product. - /// - public string Language - { - get - { - return this.languageField; - } - set - { - this.languageFieldSet = true; - this.languageField = value; - } - } - - /// - /// The manufacturer of the product. - /// - public string Manufacturer - { - get - { - return this.manufacturerField; - } - set - { - this.manufacturerFieldSet = true; - this.manufacturerField = value; - } - } - - /// - /// The descriptive name of the product. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The upgrade code GUID for the product. - /// - public string UpgradeCode - { - get - { - return this.upgradeCodeField; - } - set - { - this.upgradeCodeFieldSet = true; - this.upgradeCodeField = value; - } - } - - /// - /// The product's version string. - /// - public string Version - { - get - { - return this.versionField; - } - set - { - this.versionFieldSet = true; - this.versionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("SummaryInformation" == childName)) - { - childValue = new SummaryInformation(); - } - if (("AppId" == childName)) - { - childValue = new AppId(); - } - if (("Binary" == childName)) - { - childValue = new Binary(); - } - if (("ComplianceCheck" == childName)) - { - childValue = new ComplianceCheck(); - } - if (("Component" == childName)) - { - childValue = new Component(); - } - if (("ComponentGroup" == childName)) - { - childValue = new ComponentGroup(); - } - if (("Condition" == childName)) - { - childValue = new Condition(); - } - if (("CustomAction" == childName)) - { - childValue = new CustomAction(); - } - if (("CustomActionRef" == childName)) - { - childValue = new CustomActionRef(); - } - if (("CustomTable" == childName)) - { - childValue = new CustomTable(); - } - if (("Directory" == childName)) - { - childValue = new Directory(); - } - if (("DirectoryRef" == childName)) - { - childValue = new DirectoryRef(); - } - if (("EmbeddedChainer" == childName)) - { - childValue = new EmbeddedChainer(); - } - if (("EmbeddedChainerRef" == childName)) - { - childValue = new EmbeddedChainerRef(); - } - if (("EnsureTable" == childName)) - { - childValue = new EnsureTable(); - } - if (("Feature" == childName)) - { - childValue = new Feature(); - } - if (("FeatureRef" == childName)) - { - childValue = new FeatureRef(); - } - if (("FeatureGroupRef" == childName)) - { - childValue = new FeatureGroupRef(); - } - if (("Icon" == childName)) - { - childValue = new Icon(); - } - if (("InstanceTransforms" == childName)) - { - childValue = new InstanceTransforms(); - } - if (("MajorUpgrade" == childName)) - { - childValue = new MajorUpgrade(); - } - if (("Media" == childName)) - { - childValue = new Media(); - } - if (("MediaTemplate" == childName)) - { - childValue = new MediaTemplate(); - } - if (("PackageCertificates" == childName)) - { - childValue = new PackageCertificates(); - } - if (("PatchCertificates" == childName)) - { - childValue = new PatchCertificates(); - } - if (("Property" == childName)) - { - childValue = new Property(); - } - if (("PropertyRef" == childName)) - { - childValue = new PropertyRef(); - } - if (("SetDirectory" == childName)) - { - childValue = new SetDirectory(); - } - if (("SetProperty" == childName)) - { - childValue = new SetProperty(); - } - if (("SFPCatalog" == childName)) - { - childValue = new SFPCatalog(); - } - if (("SymbolPath" == childName)) - { - childValue = new SymbolPath(); - } - if (("UI" == childName)) - { - childValue = new UI(); - } - if (("UIRef" == childName)) - { - childValue = new UIRef(); - } - if (("Upgrade" == childName)) - { - childValue = new Upgrade(); - } - if (("WixVariable" == childName)) - { - childValue = new WixVariable(); - } - if (("InstallExecuteSequence" == childName)) - { - childValue = new InstallExecuteSequence(); - } - if (("InstallUISequence" == childName)) - { - childValue = new InstallUISequence(); - } - if (("AdminExecuteSequence" == childName)) - { - childValue = new AdminExecuteSequence(); - } - if (("AdminUISequence" == childName)) - { - childValue = new AdminUISequence(); - } - if (("AdvertiseExecuteSequence" == childName)) - { - childValue = new AdvertiseExecuteSequence(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Package", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.codepageFieldSet) - { - writer.WriteAttributeString("Codepage", this.codepageField); - } - if (this.languageFieldSet) - { - writer.WriteAttributeString("Language", this.languageField); - } - if (this.manufacturerFieldSet) - { - writer.WriteAttributeString("Manufacturer", this.manufacturerField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.upgradeCodeFieldSet) - { - writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); - } - if (this.versionFieldSet) - { - writer.WriteAttributeString("Version", this.versionField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Codepage" == name)) - { - this.codepageField = value; - this.codepageFieldSet = true; - } - if (("Language" == name)) - { - this.languageField = value; - this.languageFieldSet = true; - } - if (("Manufacturer" == name)) - { - this.manufacturerField = value; - this.manufacturerFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("UpgradeCode" == name)) - { - this.upgradeCodeField = value; - this.upgradeCodeFieldSet = true; - } - if (("Version" == name)) - { - this.versionField = value; - this.versionFieldSet = true; - } - } - } - - /// - /// The Module element is analogous to the main function in a C program. When linking, only - /// one Module section can be given to the linker to produce a successful result. Using this - /// element creates an msm file. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Module : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string codepageField; - - private bool codepageFieldSet; - - private string guidField; - - private bool guidFieldSet; - - private string languageField; - - private bool languageFieldSet; - - private string versionField; - - private bool versionFieldSet; - - private ISchemaElement parentElement; - - public Module() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SummaryInformation))); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Binary))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Configuration))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Dependency))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Directory))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Exclusion))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Icon))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreModularization))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreTable))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Property))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Substitution))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UI))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable))); - ElementCollection childCollection2 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence))); - childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence))); - childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence))); - childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence))); - childCollection2.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence))); - childCollection1.AddCollection(childCollection2); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// The name of the merge module (not the file name). - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The code page integer value or web name for the resulting MSM. See remarks for more information. - /// - public string Codepage - { - get - { - return this.codepageField; - } - set - { - this.codepageFieldSet = true; - this.codepageField = value; - } - } - - /// - /// The modularizaion Guid. - /// - public string Guid - { - get - { - return this.guidField; - } - set - { - this.guidFieldSet = true; - this.guidField = value; - } - } - - /// - /// The decimal language ID (LCID) of the merge module. - /// - public string Language - { - get - { - return this.languageField; - } - set - { - this.languageFieldSet = true; - this.languageField = value; - } - } - - /// - /// The major and minor versions of the merge module. - /// - public string Version - { - get - { - return this.versionField; - } - set - { - this.versionFieldSet = true; - this.versionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("SummaryInformation" == childName)) - { - childValue = new SummaryInformation(); - } - if (("AppId" == childName)) - { - childValue = new AppId(); - } - if (("Binary" == childName)) - { - childValue = new Binary(); - } - if (("Component" == childName)) - { - childValue = new Component(); - } - if (("ComponentGroupRef" == childName)) - { - childValue = new ComponentGroupRef(); - } - if (("ComponentRef" == childName)) - { - childValue = new ComponentRef(); - } - if (("Configuration" == childName)) - { - childValue = new Configuration(); - } - if (("CustomAction" == childName)) - { - childValue = new CustomAction(); - } - if (("CustomActionRef" == childName)) - { - childValue = new CustomActionRef(); - } - if (("CustomTable" == childName)) - { - childValue = new CustomTable(); - } - if (("Dependency" == childName)) - { - childValue = new Dependency(); - } - if (("Directory" == childName)) - { - childValue = new Directory(); - } - if (("DirectoryRef" == childName)) - { - childValue = new DirectoryRef(); - } - if (("EmbeddedChainer" == childName)) - { - childValue = new EmbeddedChainer(); - } - if (("EmbeddedChainerRef" == childName)) - { - childValue = new EmbeddedChainerRef(); - } - if (("EnsureTable" == childName)) - { - childValue = new EnsureTable(); - } - if (("Exclusion" == childName)) - { - childValue = new Exclusion(); - } - if (("Icon" == childName)) - { - childValue = new Icon(); - } - if (("IgnoreModularization" == childName)) - { - childValue = new IgnoreModularization(); - } - if (("IgnoreTable" == childName)) - { - childValue = new IgnoreTable(); - } - if (("Property" == childName)) - { - childValue = new Property(); - } - if (("PropertyRef" == childName)) - { - childValue = new PropertyRef(); - } - if (("SetDirectory" == childName)) - { - childValue = new SetDirectory(); - } - if (("SetProperty" == childName)) - { - childValue = new SetProperty(); - } - if (("SFPCatalog" == childName)) - { - childValue = new SFPCatalog(); - } - if (("Substitution" == childName)) - { - childValue = new Substitution(); - } - if (("UI" == childName)) - { - childValue = new UI(); - } - if (("UIRef" == childName)) - { - childValue = new UIRef(); - } - if (("WixVariable" == childName)) - { - childValue = new WixVariable(); - } - if (("InstallExecuteSequence" == childName)) - { - childValue = new InstallExecuteSequence(); - } - if (("InstallUISequence" == childName)) - { - childValue = new InstallUISequence(); - } - if (("AdminExecuteSequence" == childName)) - { - childValue = new AdminExecuteSequence(); - } - if (("AdminUISequence" == childName)) - { - childValue = new AdminUISequence(); - } - if (("AdvertiseExecuteSequence" == childName)) - { - childValue = new AdvertiseExecuteSequence(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Module", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.codepageFieldSet) - { - writer.WriteAttributeString("Codepage", this.codepageField); - } - if (this.guidFieldSet) - { - writer.WriteAttributeString("Guid", this.guidField); - } - if (this.languageFieldSet) - { - writer.WriteAttributeString("Language", this.languageField); - } - if (this.versionFieldSet) - { - writer.WriteAttributeString("Version", this.versionField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Codepage" == name)) - { - this.codepageField = value; - this.codepageFieldSet = true; - } - if (("Guid" == name)) - { - this.guidField = value; - this.guidFieldSet = true; - } - if (("Language" == name)) - { - this.languageField = value; - this.languageFieldSet = true; - } - if (("Version" == name)) - { - this.versionField = value; - this.versionFieldSet = true; - } - } - } - - /// - /// Declares a dependency on another merge module. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Dependency : ISchemaElement, ISetAttributes - { - - private string requiredIdField; - - private bool requiredIdFieldSet; - - private int requiredLanguageField; - - private bool requiredLanguageFieldSet; - - private string requiredVersionField; - - private bool requiredVersionFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier of the merge module required by the merge module. - /// - public string RequiredId - { - get - { - return this.requiredIdField; - } - set - { - this.requiredIdFieldSet = true; - this.requiredIdField = value; - } - } - - /// - /// Numeric language ID of the merge module in RequiredID. - /// - public int RequiredLanguage - { - get - { - return this.requiredLanguageField; - } - set - { - this.requiredLanguageFieldSet = true; - this.requiredLanguageField = value; - } - } - - /// - /// Version of the merge module in RequiredID. - /// - public string RequiredVersion - { - get - { - return this.requiredVersionField; - } - set - { - this.requiredVersionFieldSet = true; - this.requiredVersionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Dependency", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.requiredIdFieldSet) - { - writer.WriteAttributeString("RequiredId", this.requiredIdField); - } - if (this.requiredLanguageFieldSet) - { - writer.WriteAttributeString("RequiredLanguage", this.requiredLanguageField.ToString(CultureInfo.InvariantCulture)); - } - if (this.requiredVersionFieldSet) - { - writer.WriteAttributeString("RequiredVersion", this.requiredVersionField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("RequiredId" == name)) - { - this.requiredIdField = value; - this.requiredIdFieldSet = true; - } - if (("RequiredLanguage" == name)) - { - this.requiredLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.requiredLanguageFieldSet = true; - } - if (("RequiredVersion" == name)) - { - this.requiredVersionField = value; - this.requiredVersionFieldSet = true; - } - } - } - - /// - /// Declares a merge module with which this merge module is incompatible. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Exclusion : ISchemaElement, ISetAttributes - { - - private string excludedIdField; - - private bool excludedIdFieldSet; - - private int excludeExceptLanguageField; - - private bool excludeExceptLanguageFieldSet; - - private int excludeLanguageField; - - private bool excludeLanguageFieldSet; - - private string excludedMinVersionField; - - private bool excludedMinVersionFieldSet; - - private string excludedMaxVersionField; - - private bool excludedMaxVersionFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier of the merge module that is incompatible. - /// - public string ExcludedId - { - get - { - return this.excludedIdField; - } - set - { - this.excludedIdFieldSet = true; - this.excludedIdField = value; - } - } - - /// - /// 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. - /// - public int ExcludeExceptLanguage - { - get - { - return this.excludeExceptLanguageField; - } - set - { - this.excludeExceptLanguageFieldSet = true; - this.excludeExceptLanguageField = value; - } - } - - /// - /// Numeric language ID of the merge module in ExcludedID. The specified language will be excluded. Only one of ExcludeExceptLanguage and ExcludeLanguage may be specified. - /// - public int ExcludeLanguage - { - get - { - return this.excludeLanguageField; - } - set - { - this.excludeLanguageFieldSet = true; - this.excludeLanguageField = value; - } - } - - /// - /// 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. - /// - public string ExcludedMinVersion - { - get - { - return this.excludedMinVersionField; - } - set - { - this.excludedMinVersionFieldSet = true; - this.excludedMinVersionField = value; - } - } - - /// - /// 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. - /// - public string ExcludedMaxVersion - { - get - { - return this.excludedMaxVersionField; - } - set - { - this.excludedMaxVersionFieldSet = true; - this.excludedMaxVersionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Exclusion", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.excludedIdFieldSet) - { - writer.WriteAttributeString("ExcludedId", this.excludedIdField); - } - if (this.excludeExceptLanguageFieldSet) - { - writer.WriteAttributeString("ExcludeExceptLanguage", this.excludeExceptLanguageField.ToString(CultureInfo.InvariantCulture)); - } - if (this.excludeLanguageFieldSet) - { - writer.WriteAttributeString("ExcludeLanguage", this.excludeLanguageField.ToString(CultureInfo.InvariantCulture)); - } - if (this.excludedMinVersionFieldSet) - { - writer.WriteAttributeString("ExcludedMinVersion", this.excludedMinVersionField); - } - if (this.excludedMaxVersionFieldSet) - { - writer.WriteAttributeString("ExcludedMaxVersion", this.excludedMaxVersionField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("ExcludedId" == name)) - { - this.excludedIdField = value; - this.excludedIdFieldSet = true; - } - if (("ExcludeExceptLanguage" == name)) - { - this.excludeExceptLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.excludeExceptLanguageFieldSet = true; - } - if (("ExcludeLanguage" == name)) - { - this.excludeLanguageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.excludeLanguageFieldSet = true; - } - if (("ExcludedMinVersion" == name)) - { - this.excludedMinVersionField = value; - this.excludedMinVersionFieldSet = true; - } - if (("ExcludedMaxVersion" == name)) - { - this.excludedMaxVersionField = value; - this.excludedMaxVersionFieldSet = true; - } - } - } - - /// - /// Defines the configurable attributes of merge module. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Configuration : ISchemaElement, ISetAttributes - { - - private string nameField; - - private bool nameFieldSet; - - private FormatType formatField; - - private bool formatFieldSet; - - private string typeField; - - private bool typeFieldSet; - - private string contextDataField; - - private bool contextDataFieldSet; - - private string defaultValueField; - - private bool defaultValueFieldSet; - - private YesNoType keyNoOrphanField; - - private bool keyNoOrphanFieldSet; - - private YesNoType nonNullableField; - - private bool nonNullableFieldSet; - - private string displayNameField; - - private bool displayNameFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string helpLocationField; - - private bool helpLocationFieldSet; - - private string helpKeywordField; - - private bool helpKeywordFieldSet; - - private ISchemaElement parentElement; - - /// - /// Defines the name of the configurable item. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Specifies the format of the data being changed. - /// - public FormatType Format - { - get - { - return this.formatField; - } - set - { - this.formatFieldSet = true; - this.formatField = value; - } - } - - /// - /// Specifies the type of the data being changed. - /// - public string Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - /// - /// Specifies a semantic context for the requested data. - /// - public string ContextData - { - get - { - return this.contextDataField; - } - set - { - this.contextDataFieldSet = true; - this.contextDataField = value; - } - } - - /// - /// Specifies a default value for the item in this record if the merge tool declines to provide a value. - /// - public string DefaultValue - { - get - { - return this.defaultValueField; - } - set - { - this.defaultValueFieldSet = true; - this.defaultValueField = value; - } - } - - /// - /// Does not merge rule according to rules in MSI SDK. - /// - public YesNoType KeyNoOrphan - { - get - { - return this.keyNoOrphanField; - } - set - { - this.keyNoOrphanFieldSet = true; - this.keyNoOrphanField = value; - } - } - - /// - /// If yes, null is not a valid entry. - /// - public YesNoType NonNullable - { - get - { - return this.nonNullableField; - } - set - { - this.nonNullableFieldSet = true; - this.nonNullableField = value; - } - } - - /// - /// Display name for authoring. - /// - public string DisplayName - { - get - { - return this.displayNameField; - } - set - { - this.displayNameFieldSet = true; - this.displayNameField = value; - } - } - - /// - /// Description for authoring. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Location of chm file for authoring. - /// - public string HelpLocation - { - get - { - return this.helpLocationField; - } - set - { - this.helpLocationFieldSet = true; - this.helpLocationField = value; - } - } - - /// - /// Keyword into chm file for authoring. - /// - public string HelpKeyword - { - get - { - return this.helpKeywordField; - } - set - { - this.helpKeywordFieldSet = true; - this.helpKeywordField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a FormatType from a string. - /// - public static FormatType ParseFormatType(string value) - { - FormatType parsedValue; - Configuration.TryParseFormatType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a FormatType from a string. - /// - public static bool TryParseFormatType(string value, out FormatType parsedValue) - { - parsedValue = FormatType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("Text" == value)) - { - parsedValue = FormatType.Text; - } - else - { - if (("Key" == value)) - { - parsedValue = FormatType.Key; - } - else - { - if (("Integer" == value)) - { - parsedValue = FormatType.Integer; - } - else - { - if (("Bitfield" == value)) - { - parsedValue = FormatType.Bitfield; - } - else - { - parsedValue = FormatType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Configuration", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.formatFieldSet) - { - if ((this.formatField == FormatType.Text)) - { - writer.WriteAttributeString("Format", "Text"); - } - if ((this.formatField == FormatType.Key)) - { - writer.WriteAttributeString("Format", "Key"); - } - if ((this.formatField == FormatType.Integer)) - { - writer.WriteAttributeString("Format", "Integer"); - } - if ((this.formatField == FormatType.Bitfield)) - { - writer.WriteAttributeString("Format", "Bitfield"); - } - } - if (this.typeFieldSet) - { - writer.WriteAttributeString("Type", this.typeField); - } - if (this.contextDataFieldSet) - { - writer.WriteAttributeString("ContextData", this.contextDataField); - } - if (this.defaultValueFieldSet) - { - writer.WriteAttributeString("DefaultValue", this.defaultValueField); - } - if (this.keyNoOrphanFieldSet) - { - if ((this.keyNoOrphanField == YesNoType.no)) - { - writer.WriteAttributeString("KeyNoOrphan", "no"); - } - if ((this.keyNoOrphanField == YesNoType.yes)) - { - writer.WriteAttributeString("KeyNoOrphan", "yes"); - } - } - if (this.nonNullableFieldSet) - { - if ((this.nonNullableField == YesNoType.no)) - { - writer.WriteAttributeString("NonNullable", "no"); - } - if ((this.nonNullableField == YesNoType.yes)) - { - writer.WriteAttributeString("NonNullable", "yes"); - } - } - if (this.displayNameFieldSet) - { - writer.WriteAttributeString("DisplayName", this.displayNameField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.helpLocationFieldSet) - { - writer.WriteAttributeString("HelpLocation", this.helpLocationField); - } - if (this.helpKeywordFieldSet) - { - writer.WriteAttributeString("HelpKeyword", this.helpKeywordField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Format" == name)) - { - this.formatField = Configuration.ParseFormatType(value); - this.formatFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = value; - this.typeFieldSet = true; - } - if (("ContextData" == name)) - { - this.contextDataField = value; - this.contextDataFieldSet = true; - } - if (("DefaultValue" == name)) - { - this.defaultValueField = value; - this.defaultValueFieldSet = true; - } - if (("KeyNoOrphan" == name)) - { - this.keyNoOrphanField = Enums.ParseYesNoType(value); - this.keyNoOrphanFieldSet = true; - } - if (("NonNullable" == name)) - { - this.nonNullableField = Enums.ParseYesNoType(value); - this.nonNullableFieldSet = true; - } - if (("DisplayName" == name)) - { - this.displayNameField = value; - this.displayNameFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("HelpLocation" == name)) - { - this.helpLocationField = value; - this.helpLocationFieldSet = true; - } - if (("HelpKeyword" == name)) - { - this.helpKeywordField = value; - this.helpKeywordFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum FormatType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - Text, - - Key, - - Integer, - - Bitfield, - } - } - - /// - /// Specifies the configurable fields of a module database and provides a template for the configuration of each field. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Substitution : ISchemaElement, ISetAttributes - { - - private string tableField; - - private bool tableFieldSet; - - private string rowField; - - private bool rowFieldSet; - - private string columnField; - - private bool columnFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - /// - /// Specifies the name of the table being modified in the module database. - /// - public string Table - { - get - { - return this.tableField; - } - set - { - this.tableFieldSet = true; - this.tableField = value; - } - } - - /// - /// Specifies the primary keys of the target row in the table named in the Table column. If multiple keys, separated by semicolons. - /// - public string Row - { - get - { - return this.rowField; - } - set - { - this.rowFieldSet = true; - this.rowField = value; - } - } - - /// - /// Specifies the target column in the row named in the Row column. - /// - public string Column - { - get - { - return this.columnField; - } - set - { - this.columnFieldSet = true; - this.columnField = value; - } - } - - /// - /// Provides a formatting template for the data being substituted into the target field specified by Table, Row, and Column. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Substitution", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.tableFieldSet) - { - writer.WriteAttributeString("Table", this.tableField); - } - if (this.rowFieldSet) - { - writer.WriteAttributeString("Row", this.rowField); - } - if (this.columnFieldSet) - { - writer.WriteAttributeString("Column", this.columnField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Table" == name)) - { - this.tableField = value; - this.tableFieldSet = true; - } - if (("Row" == name)) - { - this.rowField = value; - this.rowFieldSet = true; - } - if (("Column" == name)) - { - this.columnField = value; - this.columnFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - } - - /// - /// Specifies a table from the merge module that is not merged into an .msi file. - /// If the table already exists in an .msi file, it is not modified by the merge. - /// The specified table can therefore contain data that is unneeded after the merge. - /// To minimize the size of the .msm file, it is recommended that developers remove - /// unused tables from modules intended for redistribution rather than creating - /// IgnoreTable elements for those tables. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class IgnoreTable : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The name of the table in the merge module that is not to be merged into the .msi file. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("IgnoreTable", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// The Fragment element is the building block of creating an installer database in WiX. Once defined, - /// the Fragment becomes an immutable, atomic unit which can either be completely included or excluded - /// from a product. The contents of a Fragment element can be linked into a product by utilizing one - /// of the many *Ref elements. When linking in a Fragment, it will be necessary to link in all of its - /// individual units. For instance, if a given Fragment contains two Component elements, you must link - /// both under features using ComponentRef for each linked Component. Otherwise, you will get a linker - /// warning and have a floating Component that does not appear under any Feature. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Fragment : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public Fragment() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Binary))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplication))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BootstrapperApplicationRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComplianceCheck))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroup))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Container))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomAction))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CustomTable))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainer))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedChainerRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EnsureTable))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroup))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Icon))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreModularization))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Media))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MediaTemplate))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageGroup))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PackageCertificates))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchCertificates))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroup))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PayloadGroup))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RelatedBundle))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetDirectory))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetProperty))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UI))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Upgrade))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Variable))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WixVariable))); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallExecuteSequence))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminExecuteSequence))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdvertiseExecuteSequence))); - childCollection0.AddCollection(childCollection1); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Optional identifier for a Fragment. Should only be set by advanced users to tag sections. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("AppId" == childName)) - { - childValue = new AppId(); - } - if (("Binary" == childName)) - { - childValue = new Binary(); - } - if (("BootstrapperApplication" == childName)) - { - childValue = new BootstrapperApplication(); - } - if (("BootstrapperApplicationRef" == childName)) - { - childValue = new BootstrapperApplicationRef(); - } - if (("ComplianceCheck" == childName)) - { - childValue = new ComplianceCheck(); - } - if (("Component" == childName)) - { - childValue = new Component(); - } - if (("ComponentGroup" == childName)) - { - childValue = new ComponentGroup(); - } - if (("Condition" == childName)) - { - childValue = new Condition(); - } - if (("Container" == childName)) - { - childValue = new Container(); - } - if (("CustomAction" == childName)) - { - childValue = new CustomAction(); - } - if (("CustomActionRef" == childName)) - { - childValue = new CustomActionRef(); - } - if (("CustomTable" == childName)) - { - childValue = new CustomTable(); - } - if (("Directory" == childName)) - { - childValue = new Directory(); - } - if (("DirectoryRef" == childName)) - { - childValue = new DirectoryRef(); - } - if (("EmbeddedChainer" == childName)) - { - childValue = new EmbeddedChainer(); - } - if (("EmbeddedChainerRef" == childName)) - { - childValue = new EmbeddedChainerRef(); - } - if (("EnsureTable" == childName)) - { - childValue = new EnsureTable(); - } - if (("Feature" == childName)) - { - childValue = new Feature(); - } - if (("FeatureGroup" == childName)) - { - childValue = new FeatureGroup(); - } - if (("FeatureRef" == childName)) - { - childValue = new FeatureRef(); - } - if (("Icon" == childName)) - { - childValue = new Icon(); - } - if (("IgnoreModularization" == childName)) - { - childValue = new IgnoreModularization(); - } - if (("Media" == childName)) - { - childValue = new Media(); - } - if (("MediaTemplate" == childName)) - { - childValue = new MediaTemplate(); - } - if (("PackageGroup" == childName)) - { - childValue = new PackageGroup(); - } - if (("PackageCertificates" == childName)) - { - childValue = new PackageCertificates(); - } - if (("PatchCertificates" == childName)) - { - childValue = new PatchCertificates(); - } - if (("PatchFamily" == childName)) - { - childValue = new PatchFamily(); - } - if (("PatchFamilyGroup" == childName)) - { - childValue = new PatchFamilyGroup(); - } - if (("PayloadGroup" == childName)) - { - childValue = new PayloadGroup(); - } - if (("Property" == childName)) - { - childValue = new Property(); - } - if (("PropertyRef" == childName)) - { - childValue = new PropertyRef(); - } - if (("RelatedBundle" == childName)) - { - childValue = new RelatedBundle(); - } - if (("SetDirectory" == childName)) - { - childValue = new SetDirectory(); - } - if (("SetProperty" == childName)) - { - childValue = new SetProperty(); - } - if (("SFPCatalog" == childName)) - { - childValue = new SFPCatalog(); - } - if (("UI" == childName)) - { - childValue = new UI(); - } - if (("UIRef" == childName)) - { - childValue = new UIRef(); - } - if (("Upgrade" == childName)) - { - childValue = new Upgrade(); - } - if (("Variable" == childName)) - { - childValue = new Variable(); - } - if (("WixVariable" == childName)) - { - childValue = new WixVariable(); - } - if (("InstallExecuteSequence" == childName)) - { - childValue = new InstallExecuteSequence(); - } - if (("InstallUISequence" == childName)) - { - childValue = new InstallUISequence(); - } - if (("AdminExecuteSequence" == childName)) - { - childValue = new AdminExecuteSequence(); - } - if (("AdminUISequence" == childName)) - { - childValue = new AdminUISequence(); - } - if (("AdvertiseExecuteSequence" == childName)) - { - childValue = new AdvertiseExecuteSequence(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Fragment", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// The Patch element is analogous to the main function in a C program. When linking, only one Patch section - /// can be given to the linker to produce a successful result. Using this element creates an MSP file. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Patch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string codepageField; - - private bool codepageFieldSet; - - private YesNoType allowRemovalField; - - private bool allowRemovalFieldSet; - - private string classificationField; - - private bool classificationFieldSet; - - private string clientPatchIdField; - - private bool clientPatchIdFieldSet; - - private YesNoType apiPatchingSymbolNoImagehlpFlagField; - - private bool apiPatchingSymbolNoImagehlpFlagFieldSet; - - private YesNoType apiPatchingSymbolNoFailuresFlagField; - - private bool apiPatchingSymbolNoFailuresFlagFieldSet; - - private YesNoType apiPatchingSymbolUndecoratedTooFlagField; - - private bool apiPatchingSymbolUndecoratedTooFlagFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string displayNameField; - - private bool displayNameFieldSet; - - private string commentsField; - - private bool commentsFieldSet; - - private string manufacturerField; - - private bool manufacturerFieldSet; - - private YesNoType minorUpdateTargetRTMField; - - private bool minorUpdateTargetRTMFieldSet; - - private string moreInfoURLField; - - private bool moreInfoURLFieldSet; - - private YesNoType optimizedInstallModeField; - - private bool optimizedInstallModeFieldSet; - - private string targetProductNameField; - - private bool targetProductNameFieldSet; - - private YesNoType optimizePatchSizeForLargeFilesField; - - private bool optimizePatchSizeForLargeFilesFieldSet; - - private ISchemaElement parentElement; - - public Patch() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchInformation))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Media))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(OptimizeCustomActions))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroup))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroupRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchProperty))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCodes))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Patch code for this patch. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The code page integer value or web name for the resulting MSP. See remarks for more information. - /// - public string Codepage - { - get - { - return this.codepageField; - } - set - { - this.codepageFieldSet = true; - this.codepageField = value; - } - } - - /// - /// Whether this is an uninstallable patch. - /// - public YesNoType AllowRemoval - { - get - { - return this.allowRemovalField; - } - set - { - this.allowRemovalFieldSet = true; - this.allowRemovalField = value; - } - } - - /// - /// Category of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup. - /// - public string Classification - { - get - { - return this.classificationField; - } - set - { - this.classificationFieldSet = true; - this.classificationField = value; - } - } - - /// - /// An easily referenced identity unique to a patch that can be used in product authoring. See remarks for more information. - /// - public string ClientPatchId - { - get - { - return this.clientPatchIdField; - } - set - { - this.clientPatchIdFieldSet = true; - this.clientPatchIdField = value; - } - } - - /// - /// Flag used when creating a binary file patch. Default is "no". Don't use imagehlp.dll. - /// - public YesNoType ApiPatchingSymbolNoImagehlpFlag - { - get - { - return this.apiPatchingSymbolNoImagehlpFlagField; - } - set - { - this.apiPatchingSymbolNoImagehlpFlagFieldSet = true; - this.apiPatchingSymbolNoImagehlpFlagField = value; - } - } - - /// - /// Flag used when creating a binary file patch. Default is "no". Don't fail patch due to imagehlp failures. - /// - public YesNoType ApiPatchingSymbolNoFailuresFlag - { - get - { - return this.apiPatchingSymbolNoFailuresFlagField; - } - set - { - this.apiPatchingSymbolNoFailuresFlagFieldSet = true; - this.apiPatchingSymbolNoFailuresFlagField = value; - } - } - - /// - /// Flag used when creating a binary file patch. Default is "no". After matching decorated symbols, try to match remaining by undecorated names. - /// - public YesNoType ApiPatchingSymbolUndecoratedTooFlag - { - get - { - return this.apiPatchingSymbolUndecoratedTooFlagField; - } - set - { - this.apiPatchingSymbolUndecoratedTooFlagFieldSet = true; - this.apiPatchingSymbolUndecoratedTooFlagField = value; - } - } - - /// - /// Description of the patch. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on. - /// - public string DisplayName - { - get - { - return this.displayNameField; - } - set - { - this.displayNameFieldSet = true; - this.displayNameField = value; - } - } - - /// - /// Optional comments for browsing. - /// - public string Comments - { - get - { - return this.commentsField; - } - set - { - this.commentsFieldSet = true; - this.commentsField = value; - } - } - - /// - /// Vendor releasing the package - /// - public string Manufacturer - { - get - { - return this.manufacturerField; - } - set - { - this.manufacturerFieldSet = true; - this.manufacturerField = value; - } - } - - /// - /// Indicates that the patch targets the RTM version of the product or the most recent major - /// upgrade patch. Author this optional property in minor update patches that contain sequencing - /// information to indicate that the patch removes all patches up to the RTM version of the - /// product, or up to the most recent major upgrade patch. This property is available beginning - /// with Windows Installer 3.1. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public YesNoType MinorUpdateTargetRTM - { - get - { - return this.minorUpdateTargetRTMField; - } - set - { - this.minorUpdateTargetRTMFieldSet = true; - this.minorUpdateTargetRTMField = value; - } - } - - /// - /// A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public string MoreInfoURL - { - get - { - return this.moreInfoURLField; - } - set - { - this.moreInfoURLFieldSet = true; - this.moreInfoURLField = value; - } - } - - /// - /// If this attribute is set to 'yes' in all the patches to be applied in a transaction, the - /// application of the patch is optimized if possible. Available beginning with Windows Installer 3.1. - /// - public YesNoType OptimizedInstallMode - { - get - { - return this.optimizedInstallModeField; - } - set - { - this.optimizedInstallModeFieldSet = true; - this.optimizedInstallModeField = value; - } - } - - /// - /// Name of the application or target product suite. - /// - public string TargetProductName - { - get - { - return this.targetProductNameField; - } - set - { - this.targetProductNameFieldSet = true; - this.targetProductNameField = value; - } - } - - /// - /// When this attribute is set, patches for files greater than approximately 4 MB in size may be made smaller. - /// - public YesNoType OptimizePatchSizeForLargeFiles - { - get - { - return this.optimizePatchSizeForLargeFilesField; - } - set - { - this.optimizePatchSizeForLargeFilesFieldSet = true; - this.optimizePatchSizeForLargeFilesField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("PatchInformation" == childName)) - { - childValue = new PatchInformation(); - } - if (("Media" == childName)) - { - childValue = new Media(); - } - if (("OptimizeCustomActions" == childName)) - { - childValue = new OptimizeCustomActions(); - } - if (("PatchFamily" == childName)) - { - childValue = new PatchFamily(); - } - if (("PatchFamilyRef" == childName)) - { - childValue = new PatchFamilyRef(); - } - if (("PatchFamilyGroup" == childName)) - { - childValue = new PatchFamilyGroup(); - } - if (("PatchFamilyGroupRef" == childName)) - { - childValue = new PatchFamilyGroupRef(); - } - if (("PatchProperty" == childName)) - { - childValue = new PatchProperty(); - } - if (("TargetProductCodes" == childName)) - { - childValue = new TargetProductCodes(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Patch", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.codepageFieldSet) - { - writer.WriteAttributeString("Codepage", this.codepageField); - } - if (this.allowRemovalFieldSet) - { - if ((this.allowRemovalField == YesNoType.no)) - { - writer.WriteAttributeString("AllowRemoval", "no"); - } - if ((this.allowRemovalField == YesNoType.yes)) - { - writer.WriteAttributeString("AllowRemoval", "yes"); - } - } - if (this.classificationFieldSet) - { - writer.WriteAttributeString("Classification", this.classificationField); - } - if (this.clientPatchIdFieldSet) - { - writer.WriteAttributeString("ClientPatchId", this.clientPatchIdField); - } - if (this.apiPatchingSymbolNoImagehlpFlagFieldSet) - { - if ((this.apiPatchingSymbolNoImagehlpFlagField == YesNoType.no)) - { - writer.WriteAttributeString("ApiPatchingSymbolNoImagehlpFlag", "no"); - } - if ((this.apiPatchingSymbolNoImagehlpFlagField == YesNoType.yes)) - { - writer.WriteAttributeString("ApiPatchingSymbolNoImagehlpFlag", "yes"); - } - } - if (this.apiPatchingSymbolNoFailuresFlagFieldSet) - { - if ((this.apiPatchingSymbolNoFailuresFlagField == YesNoType.no)) - { - writer.WriteAttributeString("ApiPatchingSymbolNoFailuresFlag", "no"); - } - if ((this.apiPatchingSymbolNoFailuresFlagField == YesNoType.yes)) - { - writer.WriteAttributeString("ApiPatchingSymbolNoFailuresFlag", "yes"); - } - } - if (this.apiPatchingSymbolUndecoratedTooFlagFieldSet) - { - if ((this.apiPatchingSymbolUndecoratedTooFlagField == YesNoType.no)) - { - writer.WriteAttributeString("ApiPatchingSymbolUndecoratedTooFlag", "no"); - } - if ((this.apiPatchingSymbolUndecoratedTooFlagField == YesNoType.yes)) - { - writer.WriteAttributeString("ApiPatchingSymbolUndecoratedTooFlag", "yes"); - } - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.displayNameFieldSet) - { - writer.WriteAttributeString("DisplayName", this.displayNameField); - } - if (this.commentsFieldSet) - { - writer.WriteAttributeString("Comments", this.commentsField); - } - if (this.manufacturerFieldSet) - { - writer.WriteAttributeString("Manufacturer", this.manufacturerField); - } - if (this.minorUpdateTargetRTMFieldSet) - { - if ((this.minorUpdateTargetRTMField == YesNoType.no)) - { - writer.WriteAttributeString("MinorUpdateTargetRTM", "no"); - } - if ((this.minorUpdateTargetRTMField == YesNoType.yes)) - { - writer.WriteAttributeString("MinorUpdateTargetRTM", "yes"); - } - } - if (this.moreInfoURLFieldSet) - { - writer.WriteAttributeString("MoreInfoURL", this.moreInfoURLField); - } - if (this.optimizedInstallModeFieldSet) - { - if ((this.optimizedInstallModeField == YesNoType.no)) - { - writer.WriteAttributeString("OptimizedInstallMode", "no"); - } - if ((this.optimizedInstallModeField == YesNoType.yes)) - { - writer.WriteAttributeString("OptimizedInstallMode", "yes"); - } - } - if (this.targetProductNameFieldSet) - { - writer.WriteAttributeString("TargetProductName", this.targetProductNameField); - } - if (this.optimizePatchSizeForLargeFilesFieldSet) - { - if ((this.optimizePatchSizeForLargeFilesField == YesNoType.no)) - { - writer.WriteAttributeString("OptimizePatchSizeForLargeFiles", "no"); - } - if ((this.optimizePatchSizeForLargeFilesField == YesNoType.yes)) - { - writer.WriteAttributeString("OptimizePatchSizeForLargeFiles", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Codepage" == name)) - { - this.codepageField = value; - this.codepageFieldSet = true; - } - if (("AllowRemoval" == name)) - { - this.allowRemovalField = Enums.ParseYesNoType(value); - this.allowRemovalFieldSet = true; - } - if (("Classification" == name)) - { - this.classificationField = value; - this.classificationFieldSet = true; - } - if (("ClientPatchId" == name)) - { - this.clientPatchIdField = value; - this.clientPatchIdFieldSet = true; - } - if (("ApiPatchingSymbolNoImagehlpFlag" == name)) - { - this.apiPatchingSymbolNoImagehlpFlagField = Enums.ParseYesNoType(value); - this.apiPatchingSymbolNoImagehlpFlagFieldSet = true; - } - if (("ApiPatchingSymbolNoFailuresFlag" == name)) - { - this.apiPatchingSymbolNoFailuresFlagField = Enums.ParseYesNoType(value); - this.apiPatchingSymbolNoFailuresFlagFieldSet = true; - } - if (("ApiPatchingSymbolUndecoratedTooFlag" == name)) - { - this.apiPatchingSymbolUndecoratedTooFlagField = Enums.ParseYesNoType(value); - this.apiPatchingSymbolUndecoratedTooFlagFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("DisplayName" == name)) - { - this.displayNameField = value; - this.displayNameFieldSet = true; - } - if (("Comments" == name)) - { - this.commentsField = value; - this.commentsFieldSet = true; - } - if (("Manufacturer" == name)) - { - this.manufacturerField = value; - this.manufacturerFieldSet = true; - } - if (("MinorUpdateTargetRTM" == name)) - { - this.minorUpdateTargetRTMField = Enums.ParseYesNoType(value); - this.minorUpdateTargetRTMFieldSet = true; - } - if (("MoreInfoURL" == name)) - { - this.moreInfoURLField = value; - this.moreInfoURLFieldSet = true; - } - if (("OptimizedInstallMode" == name)) - { - this.optimizedInstallModeField = Enums.ParseYesNoType(value); - this.optimizedInstallModeFieldSet = true; - } - if (("TargetProductName" == name)) - { - this.targetProductNameField = value; - this.targetProductNameFieldSet = true; - } - if (("OptimizePatchSizeForLargeFiles" == name)) - { - this.optimizePatchSizeForLargeFilesField = Enums.ParseYesNoType(value); - this.optimizePatchSizeForLargeFilesFieldSet = true; - } - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Validate : ISchemaElement, ISetAttributes - { - - private YesNoType productIdField; - - private bool productIdFieldSet; - - private YesNoType productLanguageField; - - private bool productLanguageFieldSet; - - private ProductVersionType productVersionField; - - private bool productVersionFieldSet; - - private ProductVersionOperatorType productVersionOperatorField; - - private bool productVersionOperatorFieldSet; - - private YesNoType upgradeCodeField; - - private bool upgradeCodeFieldSet; - - private YesNoType ignoreAddExistingRowField; - - private bool ignoreAddExistingRowFieldSet; - - private YesNoType ignoreAddExistingTableField; - - private bool ignoreAddExistingTableFieldSet; - - private YesNoType ignoreDeleteMissingRowField; - - private bool ignoreDeleteMissingRowFieldSet; - - private YesNoType ignoreDeleteMissingTableField; - - private bool ignoreDeleteMissingTableFieldSet; - - private YesNoType ignoreUpdateMissingRowField; - - private bool ignoreUpdateMissingRowFieldSet; - - private YesNoType ignoreChangingCodePageField; - - private bool ignoreChangingCodePageFieldSet; - - private ISchemaElement parentElement; - - /// - /// Requires that the installed ProductCode match the target ProductCode used to create the transform. The default is 'yes'. - /// - public YesNoType ProductId - { - get - { - return this.productIdField; - } - set - { - this.productIdFieldSet = true; - this.productIdField = value; - } - } - - /// - /// Requires that the installed ProductLanguage match the target ProductLanguage used to create the transform. The default is 'no'. - /// - public YesNoType ProductLanguage - { - get - { - return this.productLanguageField; - } - set - { - this.productLanguageFieldSet = true; - this.productLanguageField = value; - } - } - - /// - /// Determines how many fields of the installed ProductVersion to compare. See remarks for more information. The default is 'Update'. - /// - public ProductVersionType ProductVersion - { - get - { - return this.productVersionField; - } - set - { - this.productVersionFieldSet = true; - this.productVersionField = value; - } - } - - /// - /// 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'. - /// - public ProductVersionOperatorType ProductVersionOperator - { - get - { - return this.productVersionOperatorField; - } - set - { - this.productVersionOperatorFieldSet = true; - this.productVersionOperatorField = value; - } - } - - /// - /// Requires that the installed UpgradeCode match the target UpgradeCode used to create the transform. The default is 'yes'. - /// - public YesNoType UpgradeCode - { - get - { - return this.upgradeCodeField; - } - set - { - this.upgradeCodeFieldSet = true; - this.upgradeCodeField = value; - } - } - - /// - /// Ignore errors when adding existing rows. The default is 'yes'. - /// - public YesNoType IgnoreAddExistingRow - { - get - { - return this.ignoreAddExistingRowField; - } - set - { - this.ignoreAddExistingRowFieldSet = true; - this.ignoreAddExistingRowField = value; - } - } - - /// - /// Ignore errors when adding existing tables. The default is 'yes'. - /// - public YesNoType IgnoreAddExistingTable - { - get - { - return this.ignoreAddExistingTableField; - } - set - { - this.ignoreAddExistingTableFieldSet = true; - this.ignoreAddExistingTableField = value; - } - } - - /// - /// Ignore errors when deleting missing rows. The default is 'yes'. - /// - public YesNoType IgnoreDeleteMissingRow - { - get - { - return this.ignoreDeleteMissingRowField; - } - set - { - this.ignoreDeleteMissingRowFieldSet = true; - this.ignoreDeleteMissingRowField = value; - } - } - - /// - /// Ignore errors when deleting missing tables. The default is 'yes'. - /// - public YesNoType IgnoreDeleteMissingTable - { - get - { - return this.ignoreDeleteMissingTableField; - } - set - { - this.ignoreDeleteMissingTableFieldSet = true; - this.ignoreDeleteMissingTableField = value; - } - } - - /// - /// Ignore errors when updating missing rows. The default is 'yes'. - /// - public YesNoType IgnoreUpdateMissingRow - { - get - { - return this.ignoreUpdateMissingRowField; - } - set - { - this.ignoreUpdateMissingRowFieldSet = true; - this.ignoreUpdateMissingRowField = value; - } - } - - /// - /// Ignore errors when changing the database code page. The default is 'no'. - /// - public YesNoType IgnoreChangingCodePage - { - get - { - return this.ignoreChangingCodePageField; - } - set - { - this.ignoreChangingCodePageFieldSet = true; - this.ignoreChangingCodePageField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ProductVersionType from a string. - /// - public static ProductVersionType ParseProductVersionType(string value) - { - ProductVersionType parsedValue; - Validate.TryParseProductVersionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ProductVersionType from a string. - /// - public static bool TryParseProductVersionType(string value, out ProductVersionType parsedValue) - { - parsedValue = ProductVersionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("Major" == value)) - { - parsedValue = ProductVersionType.Major; - } - else - { - if (("Minor" == value)) - { - parsedValue = ProductVersionType.Minor; - } - else - { - if (("Update" == value)) - { - parsedValue = ProductVersionType.Update; - } - else - { - parsedValue = ProductVersionType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a ProductVersionOperatorType from a string. - /// - public static ProductVersionOperatorType ParseProductVersionOperatorType(string value) - { - ProductVersionOperatorType parsedValue; - Validate.TryParseProductVersionOperatorType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ProductVersionOperatorType from a string. - /// - public static bool TryParseProductVersionOperatorType(string value, out ProductVersionOperatorType parsedValue) - { - parsedValue = ProductVersionOperatorType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("Lesser" == value)) - { - parsedValue = ProductVersionOperatorType.Lesser; - } - else - { - if (("LesserOrEqual" == value)) - { - parsedValue = ProductVersionOperatorType.LesserOrEqual; - } - else - { - if (("Equal" == value)) - { - parsedValue = ProductVersionOperatorType.Equal; - } - else - { - if (("GreaterOrEqual" == value)) - { - parsedValue = ProductVersionOperatorType.GreaterOrEqual; - } - else - { - if (("Greater" == value)) - { - parsedValue = ProductVersionOperatorType.Greater; - } - else - { - parsedValue = ProductVersionOperatorType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Validate", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.productIdFieldSet) - { - if ((this.productIdField == YesNoType.no)) - { - writer.WriteAttributeString("ProductId", "no"); - } - if ((this.productIdField == YesNoType.yes)) - { - writer.WriteAttributeString("ProductId", "yes"); - } - } - if (this.productLanguageFieldSet) - { - if ((this.productLanguageField == YesNoType.no)) - { - writer.WriteAttributeString("ProductLanguage", "no"); - } - if ((this.productLanguageField == YesNoType.yes)) - { - writer.WriteAttributeString("ProductLanguage", "yes"); - } - } - if (this.productVersionFieldSet) - { - if ((this.productVersionField == ProductVersionType.Major)) - { - writer.WriteAttributeString("ProductVersion", "Major"); - } - if ((this.productVersionField == ProductVersionType.Minor)) - { - writer.WriteAttributeString("ProductVersion", "Minor"); - } - if ((this.productVersionField == ProductVersionType.Update)) - { - writer.WriteAttributeString("ProductVersion", "Update"); - } - } - if (this.productVersionOperatorFieldSet) - { - if ((this.productVersionOperatorField == ProductVersionOperatorType.Lesser)) - { - writer.WriteAttributeString("ProductVersionOperator", "Lesser"); - } - if ((this.productVersionOperatorField == ProductVersionOperatorType.LesserOrEqual)) - { - writer.WriteAttributeString("ProductVersionOperator", "LesserOrEqual"); - } - if ((this.productVersionOperatorField == ProductVersionOperatorType.Equal)) - { - writer.WriteAttributeString("ProductVersionOperator", "Equal"); - } - if ((this.productVersionOperatorField == ProductVersionOperatorType.GreaterOrEqual)) - { - writer.WriteAttributeString("ProductVersionOperator", "GreaterOrEqual"); - } - if ((this.productVersionOperatorField == ProductVersionOperatorType.Greater)) - { - writer.WriteAttributeString("ProductVersionOperator", "Greater"); - } - } - if (this.upgradeCodeFieldSet) - { - if ((this.upgradeCodeField == YesNoType.no)) - { - writer.WriteAttributeString("UpgradeCode", "no"); - } - if ((this.upgradeCodeField == YesNoType.yes)) - { - writer.WriteAttributeString("UpgradeCode", "yes"); - } - } - if (this.ignoreAddExistingRowFieldSet) - { - if ((this.ignoreAddExistingRowField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreAddExistingRow", "no"); - } - if ((this.ignoreAddExistingRowField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreAddExistingRow", "yes"); - } - } - if (this.ignoreAddExistingTableFieldSet) - { - if ((this.ignoreAddExistingTableField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreAddExistingTable", "no"); - } - if ((this.ignoreAddExistingTableField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreAddExistingTable", "yes"); - } - } - if (this.ignoreDeleteMissingRowFieldSet) - { - if ((this.ignoreDeleteMissingRowField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreDeleteMissingRow", "no"); - } - if ((this.ignoreDeleteMissingRowField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreDeleteMissingRow", "yes"); - } - } - if (this.ignoreDeleteMissingTableFieldSet) - { - if ((this.ignoreDeleteMissingTableField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreDeleteMissingTable", "no"); - } - if ((this.ignoreDeleteMissingTableField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreDeleteMissingTable", "yes"); - } - } - if (this.ignoreUpdateMissingRowFieldSet) - { - if ((this.ignoreUpdateMissingRowField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreUpdateMissingRow", "no"); - } - if ((this.ignoreUpdateMissingRowField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreUpdateMissingRow", "yes"); - } - } - if (this.ignoreChangingCodePageFieldSet) - { - if ((this.ignoreChangingCodePageField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreChangingCodePage", "no"); - } - if ((this.ignoreChangingCodePageField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreChangingCodePage", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("ProductId" == name)) - { - this.productIdField = Enums.ParseYesNoType(value); - this.productIdFieldSet = true; - } - if (("ProductLanguage" == name)) - { - this.productLanguageField = Enums.ParseYesNoType(value); - this.productLanguageFieldSet = true; - } - if (("ProductVersion" == name)) - { - this.productVersionField = Validate.ParseProductVersionType(value); - this.productVersionFieldSet = true; - } - if (("ProductVersionOperator" == name)) - { - this.productVersionOperatorField = Validate.ParseProductVersionOperatorType(value); - this.productVersionOperatorFieldSet = true; - } - if (("UpgradeCode" == name)) - { - this.upgradeCodeField = Enums.ParseYesNoType(value); - this.upgradeCodeFieldSet = true; - } - if (("IgnoreAddExistingRow" == name)) - { - this.ignoreAddExistingRowField = Enums.ParseYesNoType(value); - this.ignoreAddExistingRowFieldSet = true; - } - if (("IgnoreAddExistingTable" == name)) - { - this.ignoreAddExistingTableField = Enums.ParseYesNoType(value); - this.ignoreAddExistingTableFieldSet = true; - } - if (("IgnoreDeleteMissingRow" == name)) - { - this.ignoreDeleteMissingRowField = Enums.ParseYesNoType(value); - this.ignoreDeleteMissingRowFieldSet = true; - } - if (("IgnoreDeleteMissingTable" == name)) - { - this.ignoreDeleteMissingTableField = Enums.ParseYesNoType(value); - this.ignoreDeleteMissingTableFieldSet = true; - } - if (("IgnoreUpdateMissingRow" == name)) - { - this.ignoreUpdateMissingRowField = Enums.ParseYesNoType(value); - this.ignoreUpdateMissingRowFieldSet = true; - } - if (("IgnoreChangingCodePage" == name)) - { - this.ignoreChangingCodePageField = Enums.ParseYesNoType(value); - this.ignoreChangingCodePageFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ProductVersionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Checks the major version. - /// - Major, - - /// - /// Checks the major and minor versions. - /// - Minor, - - /// - /// Checks the major, minor, and update versions. - /// - Update, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ProductVersionOperatorType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Installed ProductVersion < target ProductVersion. - /// - Lesser, - - /// - /// Installed ProductVersion <= target ProductVersion. - /// - LesserOrEqual, - - /// - /// Installed ProductVersion = target ProductVersion. - /// - Equal, - - /// - /// Installed ProductVersion >= target ProductVersion. - /// - GreaterOrEqual, - - /// - /// Installed ProductVersion > target ProductVersion. - /// - Greater, - } - } - - /// - /// Indicates whether custom actions can be skipped when applying the patch. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class OptimizeCustomActions : ISchemaElement, ISetAttributes - { - - private YesNoType skipAssignmentField; - - private bool skipAssignmentFieldSet; - - private YesNoType skipImmediateField; - - private bool skipImmediateFieldSet; - - private YesNoType skipDeferredField; - - private bool skipDeferredFieldSet; - - private ISchemaElement parentElement; - - /// - /// Skip property (type 51) and directory (type 35) assignment custom actions. - /// - public YesNoType SkipAssignment - { - get - { - return this.skipAssignmentField; - } - set - { - this.skipAssignmentFieldSet = true; - this.skipAssignmentField = value; - } - } - - /// - /// Skip immediate custom actions that are not property or directory assignment custom actions. - /// - public YesNoType SkipImmediate - { - get - { - return this.skipImmediateField; - } - set - { - this.skipImmediateFieldSet = true; - this.skipImmediateField = value; - } - } - - /// - /// Skip custom actions that run within the script. - /// - public YesNoType SkipDeferred - { - get - { - return this.skipDeferredField; - } - set - { - this.skipDeferredFieldSet = true; - this.skipDeferredField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("OptimizeCustomActions", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.skipAssignmentFieldSet) - { - if ((this.skipAssignmentField == YesNoType.no)) - { - writer.WriteAttributeString("SkipAssignment", "no"); - } - if ((this.skipAssignmentField == YesNoType.yes)) - { - writer.WriteAttributeString("SkipAssignment", "yes"); - } - } - if (this.skipImmediateFieldSet) - { - if ((this.skipImmediateField == YesNoType.no)) - { - writer.WriteAttributeString("SkipImmediate", "no"); - } - if ((this.skipImmediateField == YesNoType.yes)) - { - writer.WriteAttributeString("SkipImmediate", "yes"); - } - } - if (this.skipDeferredFieldSet) - { - if ((this.skipDeferredField == YesNoType.no)) - { - writer.WriteAttributeString("SkipDeferred", "no"); - } - if ((this.skipDeferredField == YesNoType.yes)) - { - writer.WriteAttributeString("SkipDeferred", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("SkipAssignment" == name)) - { - this.skipAssignmentField = Enums.ParseYesNoType(value); - this.skipAssignmentFieldSet = true; - } - if (("SkipImmediate" == name)) - { - this.skipImmediateField = Enums.ParseYesNoType(value); - this.skipImmediateFieldSet = true; - } - if (("SkipDeferred" == name)) - { - this.skipDeferredField = Enums.ParseYesNoType(value); - this.skipDeferredFieldSet = true; - } - } - } - - /// - /// Identifies a set of product versions. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchBaseline : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public PatchBaseline() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Validate))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for a set of product versions. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Validate" == childName)) - { - childValue = new Validate(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchBaseline", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Collection of items that should be kept from the differences between two products. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchFamily : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string productCodeField; - - private bool productCodeFieldSet; - - private string versionField; - - private bool versionFieldSet; - - private YesNoType supersedeField; - - private bool supersedeFieldSet; - - private ISchemaElement parentElement; - - public PatchFamily() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(All))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(BinaryRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomActionRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificateRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DirectoryRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IconRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier which indicates a sequence family to which this patch belongs. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Specifies the ProductCode of the product that this family applies to. - /// - public string ProductCode - { - get - { - return this.productCodeField; - } - set - { - this.productCodeFieldSet = true; - this.productCodeField = value; - } - } - - /// - /// 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. - /// - public string Version - { - get - { - return this.versionField; - } - set - { - this.versionFieldSet = true; - this.versionField = value; - } - } - - /// - /// Set this value to 'yes' to indicate that this patch will supersede all previous patches in this patch family. - /// The default value is 'no'. - /// - public YesNoType Supersede - { - get - { - return this.supersedeField; - } - set - { - this.supersedeFieldSet = true; - this.supersedeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("All" == childName)) - { - childValue = new All(); - } - if (("BinaryRef" == childName)) - { - childValue = new BinaryRef(); - } - if (("ComponentRef" == childName)) - { - childValue = new ComponentRef(); - } - if (("CustomActionRef" == childName)) - { - childValue = new CustomActionRef(); - } - if (("DigitalCertificateRef" == childName)) - { - childValue = new DigitalCertificateRef(); - } - if (("DirectoryRef" == childName)) - { - childValue = new DirectoryRef(); - } - if (("FeatureRef" == childName)) - { - childValue = new FeatureRef(); - } - if (("IconRef" == childName)) - { - childValue = new IconRef(); - } - if (("PropertyRef" == childName)) - { - childValue = new PropertyRef(); - } - if (("UIRef" == childName)) - { - childValue = new UIRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchFamily", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.productCodeFieldSet) - { - writer.WriteAttributeString("ProductCode", this.productCodeField); - } - if (this.versionFieldSet) - { - writer.WriteAttributeString("Version", this.versionField); - } - if (this.supersedeFieldSet) - { - if ((this.supersedeField == YesNoType.no)) - { - writer.WriteAttributeString("Supersede", "no"); - } - if ((this.supersedeField == YesNoType.yes)) - { - writer.WriteAttributeString("Supersede", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("ProductCode" == name)) - { - this.productCodeField = value; - this.productCodeFieldSet = true; - } - if (("Version" == name)) - { - this.versionField = value; - this.versionFieldSet = true; - } - if (("Supersede" == name)) - { - this.supersedeField = Enums.ParseYesNoType(value); - this.supersedeFieldSet = true; - } - } - } - - /// - /// Groups together multiple patch families to be used in other locations. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchFamilyGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public PatchFamilyGroup() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamily))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFamilyGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for the PatchFamilyGroup. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("PatchFamily" == childName)) - { - childValue = new PatchFamily(); - } - if (("PatchFamilyRef" == childName)) - { - childValue = new PatchFamilyRef(); - } - if (("PatchFamilyGroupRef" == childName)) - { - childValue = new PatchFamilyGroupRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchFamilyGroup", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Create a reference to a PatchFamilyGroup in another Fragment. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchFamilyGroupRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the PatchFamilyGroup to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchFamilyGroupRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// The PatchCreation element is analogous to the main function in a C program. When linking, only one PatchCreation section - /// can be given to the linker to produce a successful result. Using this element creates a pcp file. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchCreation : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private YesNoType allowMajorVersionMismatchesField; - - private bool allowMajorVersionMismatchesFieldSet; - - private YesNoType allowProductCodeMismatchesField; - - private bool allowProductCodeMismatchesFieldSet; - - private YesNoType cleanWorkingFolderField; - - private bool cleanWorkingFolderFieldSet; - - private string codepageField; - - private bool codepageFieldSet; - - private string outputPathField; - - private bool outputPathFieldSet; - - private string sourceListField; - - private bool sourceListFieldSet; - - private int symbolFlagsField; - - private bool symbolFlagsFieldSet; - - private YesNoType wholeFilesOnlyField; - - private bool wholeFilesOnlyFieldSet; - - private ISchemaElement parentElement; - - public PatchCreation() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PatchInformation))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(PatchMetadata))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Family))); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchProperty))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchSequence))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ReplacePatch))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCode))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// PatchCreation identifier; this is the primary key for identifying patches. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Use this to set whether the major versions between the upgrade and target images match. See - /// - public YesNoType AllowMajorVersionMismatches - { - get - { - return this.allowMajorVersionMismatchesField; - } - set - { - this.allowMajorVersionMismatchesFieldSet = true; - this.allowMajorVersionMismatchesField = value; - } - } - - /// - /// Use this to set whether the product code between the upgrade and target images match. See - /// - public YesNoType AllowProductCodeMismatches - { - get - { - return this.allowProductCodeMismatchesField; - } - set - { - this.allowProductCodeMismatchesFieldSet = true; - this.allowProductCodeMismatchesField = value; - } - } - - /// - /// Use this to set whether Patchwiz should clean the temp folder when finished. See - /// - public YesNoType CleanWorkingFolder - { - get - { - return this.cleanWorkingFolderField; - } - set - { - this.cleanWorkingFolderFieldSet = true; - this.cleanWorkingFolderField = value; - } - } - - /// - /// The code page integer value or web name for the resulting PCP. See remarks for more information. - /// - public string Codepage - { - get - { - return this.codepageField; - } - set - { - this.codepageFieldSet = true; - this.codepageField = value; - } - } - - /// - /// The full path, including file name, of the patch package file that is to be generated. See - /// - public string OutputPath - { - get - { - return this.outputPathField; - } - set - { - this.outputPathFieldSet = true; - this.outputPathField = value; - } - } - - /// - /// Used to locate the .msp file for the patch if the cached copy is unavailable. See - /// - public string SourceList - { - get - { - return this.sourceListField; - } - set - { - this.sourceListFieldSet = true; - this.sourceListField = value; - } - } - - /// - /// An 8-digit hex integer representing the combination of patch symbol usage flags to use when creating a binary file patch. See - /// - public int SymbolFlags - { - get - { - return this.symbolFlagsField; - } - set - { - this.symbolFlagsFieldSet = true; - this.symbolFlagsField = value; - } - } - - /// - /// Use this to set whether changing files should be included in their entirety. See - /// - public YesNoType WholeFilesOnly - { - get - { - return this.wholeFilesOnlyField; - } - set - { - this.wholeFilesOnlyFieldSet = true; - this.wholeFilesOnlyField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("PatchInformation" == childName)) - { - childValue = new PatchInformation(); - } - if (("PatchMetadata" == childName)) - { - childValue = new PatchMetadata(); - } - if (("Family" == childName)) - { - childValue = new Family(); - } - if (("PatchProperty" == childName)) - { - childValue = new PatchProperty(); - } - if (("PatchSequence" == childName)) - { - childValue = new PatchSequence(); - } - if (("ReplacePatch" == childName)) - { - childValue = new ReplacePatch(); - } - if (("TargetProductCode" == childName)) - { - childValue = new TargetProductCode(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchCreation", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.allowMajorVersionMismatchesFieldSet) - { - if ((this.allowMajorVersionMismatchesField == YesNoType.no)) - { - writer.WriteAttributeString("AllowMajorVersionMismatches", "no"); - } - if ((this.allowMajorVersionMismatchesField == YesNoType.yes)) - { - writer.WriteAttributeString("AllowMajorVersionMismatches", "yes"); - } - } - if (this.allowProductCodeMismatchesFieldSet) - { - if ((this.allowProductCodeMismatchesField == YesNoType.no)) - { - writer.WriteAttributeString("AllowProductCodeMismatches", "no"); - } - if ((this.allowProductCodeMismatchesField == YesNoType.yes)) - { - writer.WriteAttributeString("AllowProductCodeMismatches", "yes"); - } - } - if (this.cleanWorkingFolderFieldSet) - { - if ((this.cleanWorkingFolderField == YesNoType.no)) - { - writer.WriteAttributeString("CleanWorkingFolder", "no"); - } - if ((this.cleanWorkingFolderField == YesNoType.yes)) - { - writer.WriteAttributeString("CleanWorkingFolder", "yes"); - } - } - if (this.codepageFieldSet) - { - writer.WriteAttributeString("Codepage", this.codepageField); - } - if (this.outputPathFieldSet) - { - writer.WriteAttributeString("OutputPath", this.outputPathField); - } - if (this.sourceListFieldSet) - { - writer.WriteAttributeString("SourceList", this.sourceListField); - } - if (this.symbolFlagsFieldSet) - { - writer.WriteAttributeString("SymbolFlags", this.symbolFlagsField.ToString(CultureInfo.InvariantCulture)); - } - if (this.wholeFilesOnlyFieldSet) - { - if ((this.wholeFilesOnlyField == YesNoType.no)) - { - writer.WriteAttributeString("WholeFilesOnly", "no"); - } - if ((this.wholeFilesOnlyField == YesNoType.yes)) - { - writer.WriteAttributeString("WholeFilesOnly", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("AllowMajorVersionMismatches" == name)) - { - this.allowMajorVersionMismatchesField = Enums.ParseYesNoType(value); - this.allowMajorVersionMismatchesFieldSet = true; - } - if (("AllowProductCodeMismatches" == name)) - { - this.allowProductCodeMismatchesField = Enums.ParseYesNoType(value); - this.allowProductCodeMismatchesFieldSet = true; - } - if (("CleanWorkingFolder" == name)) - { - this.cleanWorkingFolderField = Enums.ParseYesNoType(value); - this.cleanWorkingFolderFieldSet = true; - } - if (("Codepage" == name)) - { - this.codepageField = value; - this.codepageFieldSet = true; - } - if (("OutputPath" == name)) - { - this.outputPathField = value; - this.outputPathFieldSet = true; - } - if (("SourceList" == name)) - { - this.sourceListField = value; - this.sourceListFieldSet = true; - } - if (("SymbolFlags" == name)) - { - this.symbolFlagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.symbolFlagsFieldSet = true; - } - if (("WholeFilesOnly" == name)) - { - this.wholeFilesOnlyField = Enums.ParseYesNoType(value); - this.wholeFilesOnlyFieldSet = true; - } - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchInformation : ISchemaElement, ISetAttributes - { - - private string descriptionField; - - private bool descriptionFieldSet; - - private string platformsField; - - private bool platformsFieldSet; - - private string languagesField; - - private bool languagesFieldSet; - - private string manufacturerField; - - private bool manufacturerFieldSet; - - private string keywordsField; - - private bool keywordsFieldSet; - - private string commentsField; - - private bool commentsFieldSet; - - private YesNoDefaultType readOnlyField; - - private bool readOnlyFieldSet; - - private string summaryCodepageField; - - private bool summaryCodepageFieldSet; - - private YesNoType shortNamesField; - - private bool shortNamesFieldSet; - - private YesNoType compressedField; - - private bool compressedFieldSet; - - private YesNoType adminImageField; - - private bool adminImageFieldSet; - - private ISchemaElement parentElement; - - /// - /// A short description of the patch that includes the name of the product. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - public string Platforms - { - get - { - return this.platformsField; - } - set - { - this.platformsFieldSet = true; - this.platformsField = value; - } - } - - public string Languages - { - get - { - return this.languagesField; - } - set - { - this.languagesFieldSet = true; - this.languagesField = value; - } - } - - /// - /// The name of the manufacturer of the patch package. - /// - public string Manufacturer - { - get - { - return this.manufacturerField; - } - set - { - this.manufacturerFieldSet = true; - this.manufacturerField = value; - } - } - - /// - /// A semicolon-delimited list of network or URL locations for alternate sources of the patch. The default is "Installer,Patching,PCP,Database". - /// - public string Keywords - { - get - { - return this.keywordsField; - } - set - { - this.keywordsFieldSet = true; - this.keywordsField = value; - } - } - - /// - /// General purpose of the patch package. For example, "This patch contains the logic and data required to install - /// - public string Comments - { - get - { - return this.commentsField; - } - set - { - this.commentsFieldSet = true; - this.commentsField = value; - } - } - - /// - /// The value of this attribute conveys whether the package should be opened as read-only. - /// A database editing tool should not modify a read-only enforced database and should - /// issue a warning at attempts to modify a read-only recommended database. - /// - public YesNoDefaultType ReadOnly - { - get - { - return this.readOnlyField; - } - set - { - this.readOnlyFieldSet = true; - this.readOnlyField = value; - } - } - - /// - /// The code page integer value or web name for summary info strings only. The default is 1252. See remarks for more information. - /// - public string SummaryCodepage - { - get - { - return this.summaryCodepageField; - } - set - { - this.summaryCodepageFieldSet = true; - this.summaryCodepageField = value; - } - } - - public YesNoType ShortNames - { - get - { - return this.shortNamesField; - } - set - { - this.shortNamesFieldSet = true; - this.shortNamesField = value; - } - } - - public YesNoType Compressed - { - get - { - return this.compressedField; - } - set - { - this.compressedFieldSet = true; - this.compressedField = value; - } - } - - public YesNoType AdminImage - { - get - { - return this.adminImageField; - } - set - { - this.adminImageFieldSet = true; - this.adminImageField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchInformation", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.platformsFieldSet) - { - writer.WriteAttributeString("Platforms", this.platformsField); - } - if (this.languagesFieldSet) - { - writer.WriteAttributeString("Languages", this.languagesField); - } - if (this.manufacturerFieldSet) - { - writer.WriteAttributeString("Manufacturer", this.manufacturerField); - } - if (this.keywordsFieldSet) - { - writer.WriteAttributeString("Keywords", this.keywordsField); - } - if (this.commentsFieldSet) - { - writer.WriteAttributeString("Comments", this.commentsField); - } - if (this.readOnlyFieldSet) - { - if ((this.readOnlyField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("ReadOnly", "default"); - } - if ((this.readOnlyField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("ReadOnly", "no"); - } - if ((this.readOnlyField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("ReadOnly", "yes"); - } - } - if (this.summaryCodepageFieldSet) - { - writer.WriteAttributeString("SummaryCodepage", this.summaryCodepageField); - } - if (this.shortNamesFieldSet) - { - if ((this.shortNamesField == YesNoType.no)) - { - writer.WriteAttributeString("ShortNames", "no"); - } - if ((this.shortNamesField == YesNoType.yes)) - { - writer.WriteAttributeString("ShortNames", "yes"); - } - } - if (this.compressedFieldSet) - { - if ((this.compressedField == YesNoType.no)) - { - writer.WriteAttributeString("Compressed", "no"); - } - if ((this.compressedField == YesNoType.yes)) - { - writer.WriteAttributeString("Compressed", "yes"); - } - } - if (this.adminImageFieldSet) - { - if ((this.adminImageField == YesNoType.no)) - { - writer.WriteAttributeString("AdminImage", "no"); - } - if ((this.adminImageField == YesNoType.yes)) - { - writer.WriteAttributeString("AdminImage", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("Platforms" == name)) - { - this.platformsField = value; - this.platformsFieldSet = true; - } - if (("Languages" == name)) - { - this.languagesField = value; - this.languagesFieldSet = true; - } - if (("Manufacturer" == name)) - { - this.manufacturerField = value; - this.manufacturerFieldSet = true; - } - if (("Keywords" == name)) - { - this.keywordsField = value; - this.keywordsFieldSet = true; - } - if (("Comments" == name)) - { - this.commentsField = value; - this.commentsFieldSet = true; - } - if (("ReadOnly" == name)) - { - this.readOnlyField = Enums.ParseYesNoDefaultType(value); - this.readOnlyFieldSet = true; - } - if (("SummaryCodepage" == name)) - { - this.summaryCodepageField = value; - this.summaryCodepageFieldSet = true; - } - if (("ShortNames" == name)) - { - this.shortNamesField = Enums.ParseYesNoType(value); - this.shortNamesFieldSet = true; - } - if (("Compressed" == name)) - { - this.compressedField = Enums.ParseYesNoType(value); - this.compressedFieldSet = true; - } - if (("AdminImage" == name)) - { - this.adminImageField = Enums.ParseYesNoType(value); - this.adminImageFieldSet = true; - } - } - } - - /// - /// Properties about the patch to be placed in the PatchMetadata table. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchMetadata : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private YesNoType allowRemovalField; - - private bool allowRemovalFieldSet; - - private string classificationField; - - private bool classificationFieldSet; - - private string creationTimeUTCField; - - private bool creationTimeUTCFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string displayNameField; - - private bool displayNameFieldSet; - - private string manufacturerNameField; - - private bool manufacturerNameFieldSet; - - private string minorUpdateTargetRTMField; - - private bool minorUpdateTargetRTMFieldSet; - - private string moreInfoURLField; - - private bool moreInfoURLFieldSet; - - private YesNoType optimizedInstallModeField; - - private bool optimizedInstallModeFieldSet; - - private string targetProductNameField; - - private bool targetProductNameFieldSet; - - private ISchemaElement parentElement; - - public PatchMetadata() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(CustomProperty))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(OptimizeCustomActions))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Whether this is an uninstallable patch. - /// - public YesNoType AllowRemoval - { - get - { - return this.allowRemovalField; - } - set - { - this.allowRemovalFieldSet = true; - this.allowRemovalField = value; - } - } - - /// - /// Category of updates. Recommended values are Critical Update, Hotfix, Security Rollup, Security Update, Service Pack, Update, Update Rollup. - /// - public string Classification - { - get - { - return this.classificationField; - } - set - { - this.classificationFieldSet = true; - this.classificationField = value; - } - } - - /// - /// Creation time of the .msp file in the form mm-dd-yy HH:MM (month-day-year hour:minute). - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public string CreationTimeUTC - { - get - { - return this.creationTimeUTCField; - } - set - { - this.creationTimeUTCFieldSet = true; - this.creationTimeUTCField = value; - } - } - - /// - /// Description of the patch. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// A title for the patch that is suitable for public display. In Add/Remove Programs from XP SP2 on. - /// - public string DisplayName - { - get - { - return this.displayNameField; - } - set - { - this.displayNameFieldSet = true; - this.displayNameField = value; - } - } - - /// - /// Name of the manufacturer. - /// - public string ManufacturerName - { - get - { - return this.manufacturerNameField; - } - set - { - this.manufacturerNameFieldSet = true; - this.manufacturerNameField = value; - } - } - - /// - /// Indicates that the patch targets the RTM version of the product or the most recent major - /// upgrade patch. Author this optional property in minor update patches that contain sequencing - /// information to indicate that the patch removes all patches up to the RTM version of the - /// product, or up to the most recent major upgrade patch. This property is available beginning - /// with Windows Installer 3.1. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public string MinorUpdateTargetRTM - { - get - { - return this.minorUpdateTargetRTMField; - } - set - { - this.minorUpdateTargetRTMFieldSet = true; - this.minorUpdateTargetRTMField = value; - } - } - - /// - /// A URL that provides information specific to this patch. In Add/Remove Programs from XP SP2 on. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public string MoreInfoURL - { - get - { - return this.moreInfoURLField; - } - set - { - this.moreInfoURLFieldSet = true; - this.moreInfoURLField = value; - } - } - - /// - /// If this attribute is set to 'yes' in all the patches to be applied in a transaction, the - /// application of the patch is optimized if possible. Available beginning with Windows Installer 3.1. - /// - public YesNoType OptimizedInstallMode - { - get - { - return this.optimizedInstallModeField; - } - set - { - this.optimizedInstallModeFieldSet = true; - this.optimizedInstallModeField = value; - } - } - - /// - /// Name of the application or target product suite. - /// - public string TargetProductName - { - get - { - return this.targetProductNameField; - } - set - { - this.targetProductNameFieldSet = true; - this.targetProductNameField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("CustomProperty" == childName)) - { - childValue = new CustomProperty(); - } - if (("OptimizeCustomActions" == childName)) - { - childValue = new OptimizeCustomActions(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchMetadata", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.allowRemovalFieldSet) - { - if ((this.allowRemovalField == YesNoType.no)) - { - writer.WriteAttributeString("AllowRemoval", "no"); - } - if ((this.allowRemovalField == YesNoType.yes)) - { - writer.WriteAttributeString("AllowRemoval", "yes"); - } - } - if (this.classificationFieldSet) - { - writer.WriteAttributeString("Classification", this.classificationField); - } - if (this.creationTimeUTCFieldSet) - { - writer.WriteAttributeString("CreationTimeUTC", this.creationTimeUTCField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.displayNameFieldSet) - { - writer.WriteAttributeString("DisplayName", this.displayNameField); - } - if (this.manufacturerNameFieldSet) - { - writer.WriteAttributeString("ManufacturerName", this.manufacturerNameField); - } - if (this.minorUpdateTargetRTMFieldSet) - { - writer.WriteAttributeString("MinorUpdateTargetRTM", this.minorUpdateTargetRTMField); - } - if (this.moreInfoURLFieldSet) - { - writer.WriteAttributeString("MoreInfoURL", this.moreInfoURLField); - } - if (this.optimizedInstallModeFieldSet) - { - if ((this.optimizedInstallModeField == YesNoType.no)) - { - writer.WriteAttributeString("OptimizedInstallMode", "no"); - } - if ((this.optimizedInstallModeField == YesNoType.yes)) - { - writer.WriteAttributeString("OptimizedInstallMode", "yes"); - } - } - if (this.targetProductNameFieldSet) - { - writer.WriteAttributeString("TargetProductName", this.targetProductNameField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("AllowRemoval" == name)) - { - this.allowRemovalField = Enums.ParseYesNoType(value); - this.allowRemovalFieldSet = true; - } - if (("Classification" == name)) - { - this.classificationField = value; - this.classificationFieldSet = true; - } - if (("CreationTimeUTC" == name)) - { - this.creationTimeUTCField = value; - this.creationTimeUTCFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("DisplayName" == name)) - { - this.displayNameField = value; - this.displayNameFieldSet = true; - } - if (("ManufacturerName" == name)) - { - this.manufacturerNameField = value; - this.manufacturerNameFieldSet = true; - } - if (("MinorUpdateTargetRTM" == name)) - { - this.minorUpdateTargetRTMField = value; - this.minorUpdateTargetRTMFieldSet = true; - } - if (("MoreInfoURL" == name)) - { - this.moreInfoURLField = value; - this.moreInfoURLFieldSet = true; - } - if (("OptimizedInstallMode" == name)) - { - this.optimizedInstallModeField = Enums.ParseYesNoType(value); - this.optimizedInstallModeFieldSet = true; - } - if (("TargetProductName" == name)) - { - this.targetProductNameField = value; - this.targetProductNameFieldSet = true; - } - } - } - - /// - /// A custom property for the PatchMetadata table. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CustomProperty : ISchemaElement, ISetAttributes - { - - private string companyField; - - private bool companyFieldSet; - - private string propertyField; - - private bool propertyFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - /// - /// The name of the company. - /// - public string Company - { - get - { - return this.companyField; - } - set - { - this.companyFieldSet = true; - this.companyField = value; - } - } - - /// - /// The name of the metadata property. - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - /// - /// Value of the metadata property. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CustomProperty", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.companyFieldSet) - { - writer.WriteAttributeString("Company", this.companyField); - } - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Company" == name)) - { - this.companyField = value; - this.companyFieldSet = true; - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - } - - /// - /// A patch that is deprecated by this patch. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ReplacePatch : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// Patch GUID to be unregistered if it exists on the machine targeted by this patch. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ReplacePatch", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// The product codes for products that can accept the patch. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class TargetProductCodes : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private YesNoType replaceField; - - private bool replaceFieldSet; - - private ISchemaElement parentElement; - - public TargetProductCodes() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TargetProductCode))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Whether to replace the product codes that can accept the patch from the target packages with the child elements. - /// - public YesNoType Replace - { - get - { - return this.replaceField; - } - set - { - this.replaceFieldSet = true; - this.replaceField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("TargetProductCode" == childName)) - { - childValue = new TargetProductCode(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("TargetProductCodes", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.replaceFieldSet) - { - if ((this.replaceField == YesNoType.no)) - { - writer.WriteAttributeString("Replace", "no"); - } - if ((this.replaceField == YesNoType.yes)) - { - writer.WriteAttributeString("Replace", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Replace" == name)) - { - this.replaceField = Enums.ParseYesNoType(value); - this.replaceFieldSet = true; - } - } - } - - /// - /// A product code for a product that can accept the patch. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class TargetProductCode : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The product code for a product that can accept the patch. This can be '*'. See remarks for more information. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("TargetProductCode", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// A property for this patch database. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchProperty : ISchemaElement, ISetAttributes - { - - private string companyField; - - private bool companyFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - /// - /// Name of the company for a custom metadata property. - /// - public string Company - { - get - { - return this.companyField; - } - set - { - this.companyFieldSet = true; - this.companyField = value; - } - } - - /// - /// Name of the patch property. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Value of the patch property. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchProperty", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.companyFieldSet) - { - writer.WriteAttributeString("Company", this.companyField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Company" == name)) - { - this.companyField = value; - this.companyFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - } - - /// - /// Sequence information for this patch database. Sequence information is generated automatically in most cases, and rarely needs to be set explicitly. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchSequence : ISchemaElement, ISetAttributes - { - - private string patchFamilyField; - - private bool patchFamilyFieldSet; - - private string productCodeField; - - private bool productCodeFieldSet; - - private string sequenceField; - - private bool sequenceFieldSet; - - private YesNoType supersedeField; - - private bool supersedeFieldSet; - - private string targetField; - - private bool targetFieldSet; - - private string targetImageField; - - private bool targetImageFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier which indicates a sequence family to which this patch belongs. - /// - public string PatchFamily - { - get - { - return this.patchFamilyField; - } - set - { - this.patchFamilyFieldSet = true; - this.patchFamilyField = value; - } - } - - /// - /// Specifies the ProductCode of the product that this family applies to. - /// This attribute cannot the specified if the TargetImage attribute is specified. - /// - public string ProductCode - { - get - { - return this.productCodeField; - } - set - { - this.productCodeFieldSet = true; - this.productCodeField = value; - } - } - - /// - /// 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. - /// - public string Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - /// - /// Set this value to 'yes' to indicate that this patch will supersede all previous patches in this patch family. - /// The default value is 'no'. - /// - public YesNoType Supersede - { - get - { - return this.supersedeField; - } - set - { - this.supersedeFieldSet = true; - this.supersedeField = value; - } - } - - public string Target - { - get - { - return this.targetField; - } - set - { - this.targetFieldSet = true; - this.targetField = value; - } - } - - /// - /// Specifies the TargetImage that this family applies to. - /// This attribute cannot the specified if the ProductCode attribute is specified. - /// - public string TargetImage - { - get - { - return this.targetImageField; - } - set - { - this.targetImageFieldSet = true; - this.targetImageField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchSequence", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.patchFamilyFieldSet) - { - writer.WriteAttributeString("PatchFamily", this.patchFamilyField); - } - if (this.productCodeFieldSet) - { - writer.WriteAttributeString("ProductCode", this.productCodeField); - } - if (this.sequenceFieldSet) - { - writer.WriteAttributeString("Sequence", this.sequenceField); - } - if (this.supersedeFieldSet) - { - if ((this.supersedeField == YesNoType.no)) - { - writer.WriteAttributeString("Supersede", "no"); - } - if ((this.supersedeField == YesNoType.yes)) - { - writer.WriteAttributeString("Supersede", "yes"); - } - } - if (this.targetFieldSet) - { - writer.WriteAttributeString("Target", this.targetField); - } - if (this.targetImageFieldSet) - { - writer.WriteAttributeString("TargetImage", this.targetImageField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("PatchFamily" == name)) - { - this.patchFamilyField = value; - this.patchFamilyFieldSet = true; - } - if (("ProductCode" == name)) - { - this.productCodeField = value; - this.productCodeFieldSet = true; - } - if (("Sequence" == name)) - { - this.sequenceField = value; - this.sequenceFieldSet = true; - } - if (("Supersede" == name)) - { - this.supersedeField = Enums.ParseYesNoType(value); - this.supersedeFieldSet = true; - } - if (("Target" == name)) - { - this.targetField = value; - this.targetFieldSet = true; - } - if (("TargetImage" == name)) - { - this.targetImageField = value; - this.targetImageFieldSet = true; - } - } - } - - /// - /// Group of one or more upgraded images of a product. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Family : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string diskIdField; - - private bool diskIdFieldSet; - - private string diskPromptField; - - private bool diskPromptFieldSet; - - private string mediaSrcPropField; - - private bool mediaSrcPropFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private int sequenceStartField; - - private bool sequenceStartFieldSet; - - private string volumeLabelField; - - private bool volumeLabelFieldSet; - - private ISchemaElement parentElement; - - public Family() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(UpgradeImage))); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ExternalFile))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectFile))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Entered into the DiskId field of the new Media table record. - /// - public string DiskId - { - get - { - return this.diskIdField; - } - set - { - this.diskIdFieldSet = true; - this.diskIdField = value; - } - } - - /// - /// Value to display in the "[1]" of the DiskPrompt Property. Using this attribute will require you to define a DiskPrompt Property. - /// - public string DiskPrompt - { - get - { - return this.diskPromptField; - } - set - { - this.diskPromptFieldSet = true; - this.diskPromptField = value; - } - } - - /// - /// Entered into the Source field of the new Media table entry of the upgraded image. - /// - public string MediaSrcProp - { - get - { - return this.mediaSrcPropField; - } - set - { - this.mediaSrcPropFieldSet = true; - this.mediaSrcPropField = value; - } - } - - /// - /// Identifier for the family. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Sequence number for the starting file. - /// - public int SequenceStart - { - get - { - return this.sequenceStartField; - } - set - { - this.sequenceStartFieldSet = true; - this.sequenceStartField = value; - } - } - - /// - /// Entered into the VolumeLabel field of the new Media table record. - /// - public string VolumeLabel - { - get - { - return this.volumeLabelField; - } - set - { - this.volumeLabelFieldSet = true; - this.volumeLabelField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("UpgradeImage" == childName)) - { - childValue = new UpgradeImage(); - } - if (("ExternalFile" == childName)) - { - childValue = new ExternalFile(); - } - if (("ProtectFile" == childName)) - { - childValue = new ProtectFile(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Family", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.diskIdFieldSet) - { - writer.WriteAttributeString("DiskId", this.diskIdField); - } - if (this.diskPromptFieldSet) - { - writer.WriteAttributeString("DiskPrompt", this.diskPromptField); - } - if (this.mediaSrcPropFieldSet) - { - writer.WriteAttributeString("MediaSrcProp", this.mediaSrcPropField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.sequenceStartFieldSet) - { - writer.WriteAttributeString("SequenceStart", this.sequenceStartField.ToString(CultureInfo.InvariantCulture)); - } - if (this.volumeLabelFieldSet) - { - writer.WriteAttributeString("VolumeLabel", this.volumeLabelField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("DiskId" == name)) - { - this.diskIdField = value; - this.diskIdFieldSet = true; - } - if (("DiskPrompt" == name)) - { - this.diskPromptField = value; - this.diskPromptFieldSet = true; - } - if (("MediaSrcProp" == name)) - { - this.mediaSrcPropField = value; - this.mediaSrcPropFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("SequenceStart" == name)) - { - this.sequenceStartField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sequenceStartFieldSet = true; - } - if (("VolumeLabel" == name)) - { - this.volumeLabelField = value; - this.volumeLabelFieldSet = true; - } - } - } - - /// - /// Contains information about the upgraded images of the product. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UpgradeImage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string srcField; - - private bool srcFieldSet; - - private string sourcePatchField; - - private bool sourcePatchFieldSet; - - private string srcPatchField; - - private bool srcPatchFieldSet; - - private ISchemaElement parentElement; - - public UpgradeImage() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(TargetImage))); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(UpgradeFile))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier to connect target images with upgraded image. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Full path to location of msi file for upgraded image. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string src - { - get - { - return this.srcField; - } - set - { - this.srcFieldSet = true; - this.srcField = value; - } - } - - /// - /// Modified copy of the upgraded installation database that contains additional authoring specific to patching. - /// - public string SourcePatch - { - get - { - return this.sourcePatchField; - } - set - { - this.sourcePatchFieldSet = true; - this.sourcePatchField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string srcPatch - { - get - { - return this.srcPatchField; - } - set - { - this.srcPatchFieldSet = true; - this.srcPatchField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("TargetImage" == childName)) - { - childValue = new TargetImage(); - } - if (("SymbolPath" == childName)) - { - childValue = new SymbolPath(); - } - if (("UpgradeFile" == childName)) - { - childValue = new UpgradeFile(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UpgradeImage", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.srcFieldSet) - { - writer.WriteAttributeString("src", this.srcField); - } - if (this.sourcePatchFieldSet) - { - writer.WriteAttributeString("SourcePatch", this.sourcePatchField); - } - if (this.srcPatchFieldSet) - { - writer.WriteAttributeString("srcPatch", this.srcPatchField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("src" == name)) - { - this.srcField = value; - this.srcFieldSet = true; - } - if (("SourcePatch" == name)) - { - this.sourcePatchField = value; - this.sourcePatchFieldSet = true; - } - if (("srcPatch" == name)) - { - this.srcPatchField = value; - this.srcPatchFieldSet = true; - } - } - } - - /// - /// Contains information about the target images of the product. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class TargetImage : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string srcField; - - private bool srcFieldSet; - - private int orderField; - - private bool orderFieldSet; - - private string validationField; - - private bool validationFieldSet; - - private YesNoType ignoreMissingFilesField; - - private bool ignoreMissingFilesFieldSet; - - private ISchemaElement parentElement; - - public TargetImage() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TargetFile))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for the target image. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Full path to the location of the msi file for the target image. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string src - { - get - { - return this.srcField; - } - set - { - this.srcFieldSet = true; - this.srcField = value; - } - } - - /// - /// Relative order of the target image. - /// - public int Order - { - get - { - return this.orderField; - } - set - { - this.orderFieldSet = true; - this.orderField = value; - } - } - - /// - /// Product checking to avoid applying irrelevant transforms. - /// - public string Validation - { - get - { - return this.validationField; - } - set - { - this.validationFieldSet = true; - this.validationField = value; - } - } - - /// - /// Files missing from the target image are ignored by the installer. - /// - public YesNoType IgnoreMissingFiles - { - get - { - return this.ignoreMissingFilesField; - } - set - { - this.ignoreMissingFilesFieldSet = true; - this.ignoreMissingFilesField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("SymbolPath" == childName)) - { - childValue = new SymbolPath(); - } - if (("TargetFile" == childName)) - { - childValue = new TargetFile(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("TargetImage", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.srcFieldSet) - { - writer.WriteAttributeString("src", this.srcField); - } - if (this.orderFieldSet) - { - writer.WriteAttributeString("Order", this.orderField.ToString(CultureInfo.InvariantCulture)); - } - if (this.validationFieldSet) - { - writer.WriteAttributeString("Validation", this.validationField); - } - if (this.ignoreMissingFilesFieldSet) - { - if ((this.ignoreMissingFilesField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreMissingFiles", "no"); - } - if ((this.ignoreMissingFilesField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreMissingFiles", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("src" == name)) - { - this.srcField = value; - this.srcFieldSet = true; - } - if (("Order" == name)) - { - this.orderField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.orderFieldSet = true; - } - if (("Validation" == name)) - { - this.validationField = value; - this.validationFieldSet = true; - } - if (("IgnoreMissingFiles" == name)) - { - this.ignoreMissingFilesField = Enums.ParseYesNoType(value); - this.ignoreMissingFilesFieldSet = true; - } - } - } - - /// - /// Information about specific files in a target image. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class TargetFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public TargetFile() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SymbolPath))); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreRange))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectRange))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Foreign key into the File table. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("SymbolPath" == childName)) - { - childValue = new SymbolPath(); - } - if (("IgnoreRange" == childName)) - { - childValue = new IgnoreRange(); - } - if (("ProtectRange" == childName)) - { - childValue = new ProtectRange(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("TargetFile", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Specifies part of a file that is to be ignored during patching. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class IgnoreRange : ISchemaElement, ISetAttributes - { - - private int offsetField; - - private bool offsetFieldSet; - - private int lengthField; - - private bool lengthFieldSet; - - private ISchemaElement parentElement; - - /// - /// Offset of the start of the range. - /// - public int Offset - { - get - { - return this.offsetField; - } - set - { - this.offsetFieldSet = true; - this.offsetField = value; - } - } - - /// - /// Length of the range. - /// - public int Length - { - get - { - return this.lengthField; - } - set - { - this.lengthFieldSet = true; - this.lengthField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("IgnoreRange", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.offsetFieldSet) - { - writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture)); - } - if (this.lengthFieldSet) - { - writer.WriteAttributeString("Length", this.lengthField.ToString(CultureInfo.InvariantCulture)); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Offset" == name)) - { - this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.offsetFieldSet = true; - } - if (("Length" == name)) - { - this.lengthField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.lengthFieldSet = true; - } - } - } - - /// - /// Specifies part of a file that cannot be overwritten during patching. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ProtectRange : ISchemaElement, ISetAttributes - { - - private int offsetField; - - private bool offsetFieldSet; - - private int lengthField; - - private bool lengthFieldSet; - - private ISchemaElement parentElement; - - /// - /// Offset of the start of the range. - /// - public int Offset - { - get - { - return this.offsetField; - } - set - { - this.offsetFieldSet = true; - this.offsetField = value; - } - } - - /// - /// Length of the range. - /// - public int Length - { - get - { - return this.lengthField; - } - set - { - this.lengthFieldSet = true; - this.lengthField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ProtectRange", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.offsetFieldSet) - { - writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture)); - } - if (this.lengthFieldSet) - { - writer.WriteAttributeString("Length", this.lengthField.ToString(CultureInfo.InvariantCulture)); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Offset" == name)) - { - this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.offsetFieldSet = true; - } - if (("Length" == name)) - { - this.lengthField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.lengthFieldSet = true; - } - } - } - - /// - /// Specifies a file to be protected. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ProtectFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string fileField; - - private bool fileFieldSet; - - private ISchemaElement parentElement; - - public ProtectFile() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProtectRange))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Foreign key into the File table. - /// - public string File - { - get - { - return this.fileField; - } - set - { - this.fileFieldSet = true; - this.fileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ProtectRange" == childName)) - { - childValue = new ProtectRange(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ProtectFile", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.fileFieldSet) - { - writer.WriteAttributeString("File", this.fileField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("File" == name)) - { - this.fileField = value; - this.fileFieldSet = true; - } - } - } - - /// - /// Contains information about specific files that are not part of a regular target image. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ExternalFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string fileField; - - private bool fileFieldSet; - - private string sourceField; - - private bool sourceFieldSet; - - private string srcField; - - private bool srcFieldSet; - - private int orderField; - - private bool orderFieldSet; - - private ISchemaElement parentElement; - - public ExternalFile() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ProtectRange))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(SymbolPath))); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(IgnoreRange))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Foreign key into the File table. - /// - public string File - { - get - { - return this.fileField; - } - set - { - this.fileFieldSet = true; - this.fileField = value; - } - } - - /// - /// Full path of the external file. - /// - public string Source - { - get - { - return this.sourceField; - } - set - { - this.sourceFieldSet = true; - this.sourceField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string src - { - get - { - return this.srcField; - } - set - { - this.srcFieldSet = true; - this.srcField = value; - } - } - - /// - /// Specifies the order of the external files to use when creating the patch. - /// - public int Order - { - get - { - return this.orderField; - } - set - { - this.orderFieldSet = true; - this.orderField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ProtectRange" == childName)) - { - childValue = new ProtectRange(); - } - if (("SymbolPath" == childName)) - { - childValue = new SymbolPath(); - } - if (("IgnoreRange" == childName)) - { - childValue = new IgnoreRange(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ExternalFile", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.fileFieldSet) - { - writer.WriteAttributeString("File", this.fileField); - } - if (this.sourceFieldSet) - { - writer.WriteAttributeString("Source", this.sourceField); - } - if (this.srcFieldSet) - { - writer.WriteAttributeString("src", this.srcField); - } - if (this.orderFieldSet) - { - writer.WriteAttributeString("Order", this.orderField.ToString(CultureInfo.InvariantCulture)); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("File" == name)) - { - this.fileField = value; - this.fileFieldSet = true; - } - if (("Source" == name)) - { - this.sourceField = value; - this.sourceFieldSet = true; - } - if (("src" == name)) - { - this.srcField = value; - this.srcFieldSet = true; - } - if (("Order" == name)) - { - this.orderField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.orderFieldSet = true; - } - } - } - - /// - /// Specifies files to either ignore or to specify optional data about a file. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UpgradeFile : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string fileField; - - private bool fileFieldSet; - - private YesNoType ignoreField; - - private bool ignoreFieldSet; - - private YesNoType allowIgnoreOnErrorField; - - private bool allowIgnoreOnErrorFieldSet; - - private YesNoType wholeFileField; - - private bool wholeFileFieldSet; - - private ISchemaElement parentElement; - - public UpgradeFile() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Foreign key into the File table. - /// - public string File - { - get - { - return this.fileField; - } - set - { - this.fileFieldSet = true; - this.fileField = value; - } - } - - /// - /// If yes, the file is ignored during patching, and the next two attributes are ignored. - /// - public YesNoType Ignore - { - get - { - return this.ignoreField; - } - set - { - this.ignoreFieldSet = true; - this.ignoreField = value; - } - } - - /// - /// Specifies whether patching this file is vital. - /// - public YesNoType AllowIgnoreOnError - { - get - { - return this.allowIgnoreOnErrorField; - } - set - { - this.allowIgnoreOnErrorFieldSet = true; - this.allowIgnoreOnErrorField = value; - } - } - - /// - /// Whether the whole file should be installed, rather than creating a binary patch. - /// - public YesNoType WholeFile - { - get - { - return this.wholeFileField; - } - set - { - this.wholeFileFieldSet = true; - this.wholeFileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("SymbolPath" == childName)) - { - childValue = new SymbolPath(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UpgradeFile", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.fileFieldSet) - { - writer.WriteAttributeString("File", this.fileField); - } - if (this.ignoreFieldSet) - { - if ((this.ignoreField == YesNoType.no)) - { - writer.WriteAttributeString("Ignore", "no"); - } - if ((this.ignoreField == YesNoType.yes)) - { - writer.WriteAttributeString("Ignore", "yes"); - } - } - if (this.allowIgnoreOnErrorFieldSet) - { - if ((this.allowIgnoreOnErrorField == YesNoType.no)) - { - writer.WriteAttributeString("AllowIgnoreOnError", "no"); - } - if ((this.allowIgnoreOnErrorField == YesNoType.yes)) - { - writer.WriteAttributeString("AllowIgnoreOnError", "yes"); - } - } - if (this.wholeFileFieldSet) - { - if ((this.wholeFileField == YesNoType.no)) - { - writer.WriteAttributeString("WholeFile", "no"); - } - if ((this.wholeFileField == YesNoType.yes)) - { - writer.WriteAttributeString("WholeFile", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("File" == name)) - { - this.fileField = value; - this.fileFieldSet = true; - } - if (("Ignore" == name)) - { - this.ignoreField = Enums.ParseYesNoType(value); - this.ignoreFieldSet = true; - } - if (("AllowIgnoreOnError" == name)) - { - this.allowIgnoreOnErrorField = Enums.ParseYesNoType(value); - this.allowIgnoreOnErrorFieldSet = true; - } - if (("WholeFile" == name)) - { - this.wholeFileField = Enums.ParseYesNoType(value); - this.wholeFileFieldSet = true; - } - } - } - - /// - /// A path to symbols. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class SymbolPath : ISchemaElement, ISetAttributes - { - - private string pathField; - - private bool pathFieldSet; - - private ISchemaElement parentElement; - - /// - /// The path. - /// - public string Path - { - get - { - return this.pathField; - } - set - { - this.pathFieldSet = true; - this.pathField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("SymbolPath", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.pathFieldSet) - { - writer.WriteAttributeString("Path", this.pathField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Path" == name)) - { - this.pathField = value; - this.pathFieldSet = true; - } - } - } - - /// - /// Properties about the package 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class SummaryInformation : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private YesNoType adminImageField; - - private bool adminImageFieldSet; - - private string commentsField; - - private bool commentsFieldSet; - - private YesNoType compressedField; - - private bool compressedFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private InstallPrivilegesType installPrivilegesField; - - private bool installPrivilegesFieldSet; - - private InstallScopeType installScopeField; - - private bool installScopeFieldSet; - - private int installerVersionField; - - private bool installerVersionFieldSet; - - private string keywordsField; - - private bool keywordsFieldSet; - - private string languagesField; - - private bool languagesFieldSet; - - private string manufacturerField; - - private bool manufacturerFieldSet; - - private string platformsField; - - private bool platformsFieldSet; - - private PlatformType platformField; - - private bool platformFieldSet; - - private YesNoDefaultType readOnlyField; - - private bool readOnlyFieldSet; - - private YesNoType shortNamesField; - - private bool shortNamesFieldSet; - - private string summaryCodepageField; - - private bool summaryCodepageFieldSet; - - private ISchemaElement parentElement; - - /// - /// The package code GUID for a product or merge module. - /// When compiling a product, this attribute should not be set in order to allow the package - /// code to be generated for each build. - /// When compiling a merge module, this attribute must be set to the modularization guid. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Set to 'yes' if the source is an admin image. - /// - public YesNoType AdminImage - { - get - { - return this.adminImageField; - } - set - { - this.adminImageFieldSet = true; - this.adminImageField = value; - } - } - - /// - /// Optional comments for browsing. - /// - public string Comments - { - get - { - return this.commentsField; - } - set - { - this.commentsFieldSet = true; - this.commentsField = value; - } - } - - /// - /// Set to 'yes' to have compressed files in the source. - /// This attribute cannot be set for merge modules. - /// - public YesNoType Compressed - { - get - { - return this.compressedField; - } - set - { - this.compressedFieldSet = true; - this.compressedField = value; - } - } - - /// - /// The product full name or description. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Use this attribute to specify the priviliges required to install the package on Windows Vista and above. - /// - public InstallPrivilegesType InstallPrivileges - { - get - { - return this.installPrivilegesField; - } - set - { - this.installPrivilegesFieldSet = true; - this.installPrivilegesField = value; - } - } - - /// - /// Use this attribute to specify the installation scope of this package: per-machine or per-user. - /// - public InstallScopeType InstallScope - { - get - { - return this.installScopeField; - } - set - { - this.installScopeFieldSet = true; - this.installScopeField = value; - } - } - - /// - /// The minimum version of the Windows Installer required to install this package. Take the major version of the required Windows Installer - /// and multiply by a 100 then add the minor version of the Windows Installer. For example, "200" would represent Windows Installer 2.0 and - /// "405" would represent Windows Installer 4.5. For 64-bit Windows Installer packages, this property is set to 200 by default as - /// Windows Installer 2.0 was the first version to support 64-bit packages. - /// - public int InstallerVersion - { - get - { - return this.installerVersionField; - } - set - { - this.installerVersionFieldSet = true; - this.installerVersionField = value; - } - } - - /// - /// Optional keywords for browsing. - /// - public string Keywords - { - get - { - return this.keywordsField; - } - set - { - this.keywordsFieldSet = true; - this.keywordsField = value; - } - } - - /// - /// The list of language IDs (LCIDs) supported in the package. - /// - public string Languages - { - get - { - return this.languagesField; - } - set - { - this.languagesFieldSet = true; - this.languagesField = value; - } - } - - /// - /// The vendor releasing the package. - /// - public string Manufacturer - { - get - { - return this.manufacturerField; - } - set - { - this.manufacturerFieldSet = true; - this.manufacturerField = value; - } - } - - /// - /// The list of platforms supported by the package. This attribute has been deprecated. - /// Specify the -arch switch at the candle.exe command line or the InstallerPlatform - /// property in a .wixproj MSBuild project. - /// - public string Platforms - { - get - { - return this.platformsField; - } - set - { - this.platformsFieldSet = true; - this.platformsField = value; - } - } - - /// - /// The platform supported by the package. Use of this attribute is discouraged; instead, - /// specify the -arch switch at the candle.exe command line or the InstallerPlatform - /// property in a .wixproj MSBuild project. - /// - public PlatformType Platform - { - get - { - return this.platformField; - } - set - { - this.platformFieldSet = true; - this.platformField = value; - } - } - - /// - /// The value of this attribute conveys whether the package should be opened as read-only. - /// A database editing tool should not modify a read-only enforced database and should - /// issue a warning at attempts to modify a read-only recommended database. - /// - public YesNoDefaultType ReadOnly - { - get - { - return this.readOnlyField; - } - set - { - this.readOnlyFieldSet = true; - this.readOnlyField = value; - } - } - - /// - /// Set to 'yes' to have short filenames in the source. - /// - public YesNoType ShortNames - { - get - { - return this.shortNamesField; - } - set - { - this.shortNamesFieldSet = true; - this.shortNamesField = value; - } - } - - /// - /// The code page integer value or web name for summary info strings only. See remarks for more information. - /// - public string SummaryCodepage - { - get - { - return this.summaryCodepageField; - } - set - { - this.summaryCodepageFieldSet = true; - this.summaryCodepageField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a InstallPrivilegesType from a string. - /// - public static InstallPrivilegesType ParseInstallPrivilegesType(string value) - { - InstallPrivilegesType parsedValue; - SummaryInformation.TryParseInstallPrivilegesType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a InstallPrivilegesType from a string. - /// - public static bool TryParseInstallPrivilegesType(string value, out InstallPrivilegesType parsedValue) - { - parsedValue = InstallPrivilegesType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("limited" == value)) - { - parsedValue = InstallPrivilegesType.limited; - } - else - { - if (("elevated" == value)) - { - parsedValue = InstallPrivilegesType.elevated; - } - else - { - parsedValue = InstallPrivilegesType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Parses a InstallScopeType from a string. - /// - public static InstallScopeType ParseInstallScopeType(string value) - { - InstallScopeType parsedValue; - SummaryInformation.TryParseInstallScopeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a InstallScopeType from a string. - /// - public static bool TryParseInstallScopeType(string value, out InstallScopeType parsedValue) - { - parsedValue = InstallScopeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("perMachine" == value)) - { - parsedValue = InstallScopeType.perMachine; - } - else - { - if (("perUser" == value)) - { - parsedValue = InstallScopeType.perUser; - } - else - { - parsedValue = InstallScopeType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Parses a PlatformType from a string. - /// - public static PlatformType ParsePlatformType(string value) - { - PlatformType parsedValue; - SummaryInformation.TryParsePlatformType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a PlatformType from a string. - /// - public static bool TryParsePlatformType(string value, out PlatformType parsedValue) - { - parsedValue = PlatformType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("x86" == value)) - { - parsedValue = PlatformType.x86; - } - else - { - if (("ia64" == value)) - { - parsedValue = PlatformType.ia64; - } - else - { - if (("x64" == value)) - { - parsedValue = PlatformType.x64; - } - else - { - if (("arm" == value)) - { - parsedValue = PlatformType.arm; - } - else - { - if (("intel" == value)) - { - parsedValue = PlatformType.intel; - } - else - { - if (("intel64" == value)) - { - parsedValue = PlatformType.intel64; - } - else - { - parsedValue = PlatformType.IllegalValue; - return false; - } - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("SummaryInformation", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.adminImageFieldSet) - { - if ((this.adminImageField == YesNoType.no)) - { - writer.WriteAttributeString("AdminImage", "no"); - } - if ((this.adminImageField == YesNoType.yes)) - { - writer.WriteAttributeString("AdminImage", "yes"); - } - } - if (this.commentsFieldSet) - { - writer.WriteAttributeString("Comments", this.commentsField); - } - if (this.compressedFieldSet) - { - if ((this.compressedField == YesNoType.no)) - { - writer.WriteAttributeString("Compressed", "no"); - } - if ((this.compressedField == YesNoType.yes)) - { - writer.WriteAttributeString("Compressed", "yes"); - } - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.installPrivilegesFieldSet) - { - if ((this.installPrivilegesField == InstallPrivilegesType.limited)) - { - writer.WriteAttributeString("InstallPrivileges", "limited"); - } - if ((this.installPrivilegesField == InstallPrivilegesType.elevated)) - { - writer.WriteAttributeString("InstallPrivileges", "elevated"); - } - } - if (this.installScopeFieldSet) - { - if ((this.installScopeField == InstallScopeType.perMachine)) - { - writer.WriteAttributeString("InstallScope", "perMachine"); - } - if ((this.installScopeField == InstallScopeType.perUser)) - { - writer.WriteAttributeString("InstallScope", "perUser"); - } - } - if (this.installerVersionFieldSet) - { - writer.WriteAttributeString("InstallerVersion", this.installerVersionField.ToString(CultureInfo.InvariantCulture)); - } - if (this.keywordsFieldSet) - { - writer.WriteAttributeString("Keywords", this.keywordsField); - } - if (this.languagesFieldSet) - { - writer.WriteAttributeString("Languages", this.languagesField); - } - if (this.manufacturerFieldSet) - { - writer.WriteAttributeString("Manufacturer", this.manufacturerField); - } - if (this.platformsFieldSet) - { - writer.WriteAttributeString("Platforms", this.platformsField); - } - if (this.platformFieldSet) - { - if ((this.platformField == PlatformType.x86)) - { - writer.WriteAttributeString("Platform", "x86"); - } - if ((this.platformField == PlatformType.ia64)) - { - writer.WriteAttributeString("Platform", "ia64"); - } - if ((this.platformField == PlatformType.x64)) - { - writer.WriteAttributeString("Platform", "x64"); - } - if ((this.platformField == PlatformType.arm)) - { - writer.WriteAttributeString("Platform", "arm"); - } - if ((this.platformField == PlatformType.intel)) - { - writer.WriteAttributeString("Platform", "intel"); - } - if ((this.platformField == PlatformType.intel64)) - { - writer.WriteAttributeString("Platform", "intel64"); - } - } - if (this.readOnlyFieldSet) - { - if ((this.readOnlyField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("ReadOnly", "default"); - } - if ((this.readOnlyField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("ReadOnly", "no"); - } - if ((this.readOnlyField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("ReadOnly", "yes"); - } - } - if (this.shortNamesFieldSet) - { - if ((this.shortNamesField == YesNoType.no)) - { - writer.WriteAttributeString("ShortNames", "no"); - } - if ((this.shortNamesField == YesNoType.yes)) - { - writer.WriteAttributeString("ShortNames", "yes"); - } - } - if (this.summaryCodepageFieldSet) - { - writer.WriteAttributeString("SummaryCodepage", this.summaryCodepageField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("AdminImage" == name)) - { - this.adminImageField = Enums.ParseYesNoType(value); - this.adminImageFieldSet = true; - } - if (("Comments" == name)) - { - this.commentsField = value; - this.commentsFieldSet = true; - } - if (("Compressed" == name)) - { - this.compressedField = Enums.ParseYesNoType(value); - this.compressedFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("InstallPrivileges" == name)) - { - this.installPrivilegesField = SummaryInformation.ParseInstallPrivilegesType(value); - this.installPrivilegesFieldSet = true; - } - if (("InstallScope" == name)) - { - this.installScopeField = SummaryInformation.ParseInstallScopeType(value); - this.installScopeFieldSet = true; - } - if (("InstallerVersion" == name)) - { - this.installerVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.installerVersionFieldSet = true; - } - if (("Keywords" == name)) - { - this.keywordsField = value; - this.keywordsFieldSet = true; - } - if (("Languages" == name)) - { - this.languagesField = value; - this.languagesFieldSet = true; - } - if (("Manufacturer" == name)) - { - this.manufacturerField = value; - this.manufacturerFieldSet = true; - } - if (("Platforms" == name)) - { - this.platformsField = value; - this.platformsFieldSet = true; - } - if (("Platform" == name)) - { - this.platformField = SummaryInformation.ParsePlatformType(value); - this.platformFieldSet = true; - } - if (("ReadOnly" == name)) - { - this.readOnlyField = Enums.ParseYesNoDefaultType(value); - this.readOnlyFieldSet = true; - } - if (("ShortNames" == name)) - { - this.shortNamesField = Enums.ParseYesNoType(value); - this.shortNamesFieldSet = true; - } - if (("SummaryCodepage" == name)) - { - this.summaryCodepageField = value; - this.summaryCodepageFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum InstallPrivilegesType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Set this value to declare that the package does not require elevated privileges to install. - /// - limited, - - /// - /// Set this value to declare that the package requires elevated privileges to install. - /// This is the default value. - /// - elevated, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum InstallScopeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Set this value to declare that the package is a per-machine installation and requires elevated privileges to install. - /// Sets the ALLUSERS property to 1. - /// - perMachine, - - /// - /// Set this value to declare that the package is a per-user installation and does not require elevated privileges to install. - /// Sets the package's InstallPrivileges attribute to "limited." - /// - perUser, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum PlatformType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Set this value to declare that the package is an x86 package. - /// - x86, - - /// - /// Set this value to declare that the package is an ia64 package. - /// This value requires that the InstallerVersion property be set to 200 or greater. - /// - ia64, - - /// - /// Set this value to declare that the package is an x64 package. - /// This value requires that the InstallerVersion property be set to 200 or greater. - /// - x64, - - /// - /// Set this value to declare that the package is an arm package. - /// This value requires that the InstallerVersion property be set to 500 or greater. - /// - arm, - - /// - /// This value has been deprecated. Use "x86" instead. - /// - intel, - - /// - /// This value has been deprecated. Use "ia64" instead. - /// - intel64, - } - } - - /// - /// The MsiAssemblyName table specifies the schema for the elements of a strong assembly cache name for a .NET Framework or Win32 assembly. - /// Consider using the Assembly attribute on File element to have the toolset populate these entries automatically. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class AssemblyName : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - /// - /// Name of the attribute associated with the value specified in the Value column. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Value associated with the name specified in the Name column. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("AssemblyName", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - } - - /// - /// Identifies the possible signer certificates used to digitally sign patches. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchCertificates : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private ISchemaElement parentElement; - - public PatchCertificates() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("DigitalCertificate" == childName)) - { - childValue = new DigitalCertificate(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchCertificates", "http://wixtoolset.org/schemas/v4/wxs"); - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - } - } - - /// - /// Digital signatures that identify installation packages in a multi-product transaction. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PackageCertificates : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private ISchemaElement parentElement; - - public PackageCertificates() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("DigitalCertificate" == childName)) - { - childValue = new DigitalCertificate(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PackageCertificates", "http://wixtoolset.org/schemas/v4/wxs"); - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - } - } - - /// - /// Adds a digital certificate. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class DigitalCertificate : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier for a certificate file. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The path to the certificate file. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DigitalCertificate", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - } - } - - /// - /// Reference to a DigitalCertificate element. This will force the entire referenced Fragment's contents - /// to be included in the installer database. This is only used for references when patching. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class DigitalCertificateRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DigitalCertificateRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Adds a digital signature. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class DigitalSignature : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private ISchemaElement parentElement; - - public DigitalSignature() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalCertificate))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// The path to signature's optional hash file. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("DigitalCertificate" == childName)) - { - childValue = new DigitalCertificate(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DigitalSignature", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - } - } - - /// - /// Adds a system file protection update catalog file - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class SFPCatalog : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string nameField; - - private bool nameFieldSet; - - private string dependencyField; - - private bool dependencyFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private ISchemaElement parentElement; - - public SFPCatalog() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPCatalog))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SFPFile))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Filename for catalog file when installed. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Used to define dependency outside of the package. - /// - public string Dependency - { - get - { - return this.dependencyField; - } - set - { - this.dependencyFieldSet = true; - this.dependencyField = value; - } - } - - /// - /// Path to catalog file in binary. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("SFPCatalog" == childName)) - { - childValue = new SFPCatalog(); - } - if (("SFPFile" == childName)) - { - childValue = new SFPFile(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("SFPCatalog", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.dependencyFieldSet) - { - writer.WriteAttributeString("Dependency", this.dependencyField); - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Dependency" == name)) - { - this.dependencyField = value; - this.dependencyFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - } - } - - /// - /// Provides a many-to-many mapping from the SFPCatalog table to the File table - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class SFPFile : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary Key to File Table. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("SFPFile", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Adds or removes .ini file entries. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class IniFile : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ActionType actionField; - - private bool actionFieldSet; - - private string directoryField; - - private bool directoryFieldSet; - - private string keyField; - - private bool keyFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string sectionField; - - private bool sectionFieldSet; - - private string shortNameField; - - private bool shortNameFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier for ini file. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The type of modification to be made. - /// - public ActionType Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// 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. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - /// - /// The localizable .ini file key within the section. - /// - public string Key - { - get - { - return this.keyField; - } - set - { - this.keyFieldSet = true; - this.keyField = value; - } - } - - /// - /// In prior versions of the WiX toolset, this attribute specified the short name. - /// This attribute's value may now be either a short or long name. - /// If a short name is specified, the ShortName attribute may not be specified. - /// Also, if this value is a long name, the ShortName attribute may be omitted to - /// allow WiX to attempt to generate a unique short name. - /// However, if this name collides with another file or you wish to manually specify - /// the short name, then the ShortName attribute may be specified. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The localizable .ini file section. - /// - public string Section - { - get - { - return this.sectionField; - } - set - { - this.sectionFieldSet = true; - this.sectionField = value; - } - } - - /// - /// The short name of the in 8.3 format. - /// This attribute should only be set if there is a conflict between generated short names - /// or the user wants to manually specify the short name. - /// - public string ShortName - { - get - { - return this.shortNameField; - } - set - { - this.shortNameFieldSet = true; - this.shortNameField = value; - } - } - - /// - /// The localizable value to be written or deleted. This attribute must be set if - /// the Action attribute's value is "addLine", "addTag", or "createLine". - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ActionType from a string. - /// - public static ActionType ParseActionType(string value) - { - ActionType parsedValue; - IniFile.TryParseActionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ActionType from a string. - /// - public static bool TryParseActionType(string value, out ActionType parsedValue) - { - parsedValue = ActionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("addLine" == value)) - { - parsedValue = ActionType.addLine; - } - else - { - if (("addTag" == value)) - { - parsedValue = ActionType.addTag; - } - else - { - if (("createLine" == value)) - { - parsedValue = ActionType.createLine; - } - else - { - if (("removeLine" == value)) - { - parsedValue = ActionType.removeLine; - } - else - { - if (("removeTag" == value)) - { - parsedValue = ActionType.removeTag; - } - else - { - parsedValue = ActionType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("IniFile", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.actionFieldSet) - { - if ((this.actionField == ActionType.addLine)) - { - writer.WriteAttributeString("Action", "addLine"); - } - if ((this.actionField == ActionType.addTag)) - { - writer.WriteAttributeString("Action", "addTag"); - } - if ((this.actionField == ActionType.createLine)) - { - writer.WriteAttributeString("Action", "createLine"); - } - if ((this.actionField == ActionType.removeLine)) - { - writer.WriteAttributeString("Action", "removeLine"); - } - if ((this.actionField == ActionType.removeTag)) - { - writer.WriteAttributeString("Action", "removeTag"); - } - } - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - if (this.keyFieldSet) - { - writer.WriteAttributeString("Key", this.keyField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.sectionFieldSet) - { - writer.WriteAttributeString("Section", this.sectionField); - } - if (this.shortNameFieldSet) - { - writer.WriteAttributeString("ShortName", this.shortNameField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Action" == name)) - { - this.actionField = IniFile.ParseActionType(value); - this.actionFieldSet = true; - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - if (("Key" == name)) - { - this.keyField = value; - this.keyFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Section" == name)) - { - this.sectionField = value; - this.sectionFieldSet = true; - } - if (("ShortName" == name)) - { - this.shortNameField = value; - this.shortNameFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ActionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Creates or updates an .ini entry. - /// - addLine, - - /// - /// Creates a new entry or appends a new comma-separated value to an existing entry. - /// - addTag, - - /// - /// Creates an .ini entry only if the entry does no already exist. - /// - createLine, - - /// - /// Removes an .ini entry. - /// - removeLine, - - /// - /// Removes a tag from an .ini entry. - /// - removeTag, - } - } - - /// - /// ODBCDataSource for a Component - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ODBCDataSource : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string driverNameField; - - private bool driverNameFieldSet; - - private RegistrationType registrationField; - - private bool registrationFieldSet; - - private YesNoType keyPathField; - - private bool keyPathFieldSet; - - private ISchemaElement parentElement; - - public ODBCDataSource() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier of the data source. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name for the data source. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Required if not found as child of ODBCDriver element - /// - public string DriverName - { - get - { - return this.driverNameField; - } - set - { - this.driverNameFieldSet = true; - this.driverNameField = value; - } - } - - /// - /// Scope for which the data source should be registered. - /// - public RegistrationType Registration - { - get - { - return this.registrationField; - } - set - { - this.registrationFieldSet = true; - this.registrationField = value; - } - } - - /// - /// Set 'yes' to force this file to be key path for parent Component - /// - public YesNoType KeyPath - { - get - { - return this.keyPathField; - } - set - { - this.keyPathFieldSet = true; - this.keyPathField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Property" == childName)) - { - childValue = new Property(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a RegistrationType from a string. - /// - public static RegistrationType ParseRegistrationType(string value) - { - RegistrationType parsedValue; - ODBCDataSource.TryParseRegistrationType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a RegistrationType from a string. - /// - public static bool TryParseRegistrationType(string value, out RegistrationType parsedValue) - { - parsedValue = RegistrationType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("machine" == value)) - { - parsedValue = RegistrationType.machine; - } - else - { - if (("user" == value)) - { - parsedValue = RegistrationType.user; - } - else - { - parsedValue = RegistrationType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ODBCDataSource", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.driverNameFieldSet) - { - writer.WriteAttributeString("DriverName", this.driverNameField); - } - if (this.registrationFieldSet) - { - if ((this.registrationField == RegistrationType.machine)) - { - writer.WriteAttributeString("Registration", "machine"); - } - if ((this.registrationField == RegistrationType.user)) - { - writer.WriteAttributeString("Registration", "user"); - } - } - if (this.keyPathFieldSet) - { - if ((this.keyPathField == YesNoType.no)) - { - writer.WriteAttributeString("KeyPath", "no"); - } - if ((this.keyPathField == YesNoType.yes)) - { - writer.WriteAttributeString("KeyPath", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("DriverName" == name)) - { - this.driverNameField = value; - this.driverNameFieldSet = true; - } - if (("Registration" == name)) - { - this.registrationField = ODBCDataSource.ParseRegistrationType(value); - this.registrationFieldSet = true; - } - if (("KeyPath" == name)) - { - this.keyPathField = Enums.ParseYesNoType(value); - this.keyPathFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum RegistrationType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Data source is registered per machine. - /// - machine, - - /// - /// Data source is registered per user. - /// - user, - } - } - - /// - /// ODBCDriver for a Component - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ODBCDriver : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string fileField; - - private bool fileFieldSet; - - private string setupFileField; - - private bool setupFileFieldSet; - - private ISchemaElement parentElement; - - public ODBCDriver() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ODBCDataSource))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for the driver. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name for the driver. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Required if not found as child of File element - /// - public string File - { - get - { - return this.fileField; - } - set - { - this.fileFieldSet = true; - this.fileField = value; - } - } - - /// - /// Required if not found as child of File element or different from File attribute above - /// - public string SetupFile - { - get - { - return this.setupFileField; - } - set - { - this.setupFileFieldSet = true; - this.setupFileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Property" == childName)) - { - childValue = new Property(); - } - if (("ODBCDataSource" == childName)) - { - childValue = new ODBCDataSource(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ODBCDriver", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.fileFieldSet) - { - writer.WriteAttributeString("File", this.fileField); - } - if (this.setupFileFieldSet) - { - writer.WriteAttributeString("SetupFile", this.setupFileField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("File" == name)) - { - this.fileField = value; - this.fileFieldSet = true; - } - if (("SetupFile" == name)) - { - this.setupFileField = value; - this.setupFileFieldSet = true; - } - } - } - - /// - /// ODBCTranslator for a Component - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ODBCTranslator : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string fileField; - - private bool fileFieldSet; - - private string setupFileField; - - private bool setupFileFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier for the translator. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name for the translator. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Required if not found as child of File element - /// - public string File - { - get - { - return this.fileField; - } - set - { - this.fileFieldSet = true; - this.fileField = value; - } - } - - /// - /// Required if not found as child of File element or different from File attribute above - /// - public string SetupFile - { - get - { - return this.setupFileField; - } - set - { - this.setupFileFieldSet = true; - this.setupFileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ODBCTranslator", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.fileFieldSet) - { - writer.WriteAttributeString("File", this.fileField); - } - if (this.setupFileFieldSet) - { - writer.WriteAttributeString("SetupFile", this.setupFileField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("File" == name)) - { - this.fileField = value; - this.fileFieldSet = true; - } - if (("SetupFile" == name)) - { - this.setupFileField = value; - this.setupFileFieldSet = true; - } - } - } - - /// - /// Searches for file and assigns to fullpath value of parent Property - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class FileSearch : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string shortNameField; - - private bool shortNameFieldSet; - - private int minSizeField; - - private bool minSizeFieldSet; - - private int maxSizeField; - - private bool maxSizeFieldSet; - - private string minVersionField; - - private bool minVersionFieldSet; - - private string maxVersionField; - - private bool maxVersionFieldSet; - - private DateTime minDateField; - - private bool minDateFieldSet; - - private DateTime maxDateField; - - private bool maxDateFieldSet; - - private string languagesField; - - private bool languagesFieldSet; - - private ISchemaElement parentElement; - - /// - /// 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. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// In prior versions of the WiX toolset, this attribute specified the short file name. - /// This attribute's value may now be either a short or long file name. - /// If a short file name is specified, the ShortName attribute may not be specified. - /// If you wish to manually specify the short file name, then the ShortName - /// attribute may be specified. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The short file name of the file in 8.3 format. - /// There is a Windows Installer bug which prevents the FileSearch functionality from working - /// if both a short and long file name are specified. Since the Name attribute allows either - /// a short or long name to be specified, it is the only attribute related to file names which - /// should be specified. - /// - public string ShortName - { - get - { - return this.shortNameField; - } - set - { - this.shortNameFieldSet = true; - this.shortNameField = value; - } - } - - /// - /// The minimum size of the file. - /// - public int MinSize - { - get - { - return this.minSizeField; - } - set - { - this.minSizeFieldSet = true; - this.minSizeField = value; - } - } - - /// - /// The maximum size of the file. - /// - public int MaxSize - { - get - { - return this.maxSizeField; - } - set - { - this.maxSizeFieldSet = true; - this.maxSizeField = value; - } - } - - /// - /// The minimum version of the file. - /// - public string MinVersion - { - get - { - return this.minVersionField; - } - set - { - this.minVersionFieldSet = true; - this.minVersionField = value; - } - } - - /// - /// The maximum version of the file. - /// - public string MaxVersion - { - get - { - return this.maxVersionField; - } - set - { - this.maxVersionFieldSet = true; - this.maxVersionField = value; - } - } - - /// - /// 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. - /// - public DateTime MinDate - { - get - { - return this.minDateField; - } - set - { - this.minDateFieldSet = true; - this.minDateField = value; - } - } - - /// - /// 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. - /// - public DateTime MaxDate - { - get - { - return this.maxDateField; - } - set - { - this.maxDateFieldSet = true; - this.maxDateField = value; - } - } - - /// - /// The languages supported by the file. - /// - public string Languages - { - get - { - return this.languagesField; - } - set - { - this.languagesFieldSet = true; - this.languagesField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FileSearch", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.shortNameFieldSet) - { - writer.WriteAttributeString("ShortName", this.shortNameField); - } - if (this.minSizeFieldSet) - { - writer.WriteAttributeString("MinSize", this.minSizeField.ToString(CultureInfo.InvariantCulture)); - } - if (this.maxSizeFieldSet) - { - writer.WriteAttributeString("MaxSize", this.maxSizeField.ToString(CultureInfo.InvariantCulture)); - } - if (this.minVersionFieldSet) - { - writer.WriteAttributeString("MinVersion", this.minVersionField); - } - if (this.maxVersionFieldSet) - { - writer.WriteAttributeString("MaxVersion", this.maxVersionField); - } - if (this.minDateFieldSet) - { - writer.WriteAttributeString("MinDate", this.minDateField.ToString("yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture.DateTimeFormat)); - } - if (this.maxDateFieldSet) - { - writer.WriteAttributeString("MaxDate", this.maxDateField.ToString("yyyy-MM-ddTHH:mm:ss", CultureInfo.InvariantCulture.DateTimeFormat)); - } - if (this.languagesFieldSet) - { - writer.WriteAttributeString("Languages", this.languagesField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("ShortName" == name)) - { - this.shortNameField = value; - this.shortNameFieldSet = true; - } - if (("MinSize" == name)) - { - this.minSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.minSizeFieldSet = true; - } - if (("MaxSize" == name)) - { - this.maxSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.maxSizeFieldSet = true; - } - if (("MinVersion" == name)) - { - this.minVersionField = value; - this.minVersionFieldSet = true; - } - if (("MaxVersion" == name)) - { - this.maxVersionField = value; - this.maxVersionFieldSet = true; - } - if (("MinDate" == name)) - { - this.minDateField = Convert.ToDateTime(value, CultureInfo.InvariantCulture); - this.minDateFieldSet = true; - } - if (("MaxDate" == name)) - { - this.maxDateField = Convert.ToDateTime(value, CultureInfo.InvariantCulture); - this.maxDateFieldSet = true; - } - if (("Languages" == name)) - { - this.languagesField = value; - this.languagesFieldSet = true; - } - } - } - - /// - /// References an existing FileSearch element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class FileSearchRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// Specify the Id to the FileSearch to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FileSearchRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Searches for directory and assigns to value of parent Property. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class DirectorySearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string pathField; - - private bool pathFieldSet; - - private int depthField; - - private bool depthFieldSet; - - private YesNoType assignToPropertyField; - - private bool assignToPropertyFieldSet; - - private ISchemaElement parentElement; - - public DirectorySearch() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Unique identifier for the directory search. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Path on the user's system. Either absolute, or relative to containing directories. - /// - public string Path - { - get - { - return this.pathField; - } - set - { - this.pathFieldSet = true; - this.pathField = value; - } - } - - /// - /// Depth below the path that the installer searches for the file or directory specified by the search. See remarks for more information. - /// - public int Depth - { - get - { - return this.depthField; - } - set - { - this.depthFieldSet = true; - this.depthField = value; - } - } - - /// - /// Set the value of the outer Property to the result of this search. See remarks for more information. - /// - public YesNoType AssignToProperty - { - get - { - return this.assignToPropertyField; - } - set - { - this.assignToPropertyFieldSet = true; - this.assignToPropertyField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("DirectorySearch" == childName)) - { - childValue = new DirectorySearch(); - } - if (("DirectorySearchRef" == childName)) - { - childValue = new DirectorySearchRef(); - } - if (("FileSearch" == childName)) - { - childValue = new FileSearch(); - } - if (("FileSearchRef" == childName)) - { - childValue = new FileSearchRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DirectorySearch", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.pathFieldSet) - { - writer.WriteAttributeString("Path", this.pathField); - } - if (this.depthFieldSet) - { - writer.WriteAttributeString("Depth", this.depthField.ToString(CultureInfo.InvariantCulture)); - } - if (this.assignToPropertyFieldSet) - { - if ((this.assignToPropertyField == YesNoType.no)) - { - writer.WriteAttributeString("AssignToProperty", "no"); - } - if ((this.assignToPropertyField == YesNoType.yes)) - { - writer.WriteAttributeString("AssignToProperty", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Path" == name)) - { - this.pathField = value; - this.pathFieldSet = true; - } - if (("Depth" == name)) - { - this.depthField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.depthFieldSet = true; - } - if (("AssignToProperty" == name)) - { - this.assignToPropertyField = Enums.ParseYesNoType(value); - this.assignToPropertyFieldSet = true; - } - } - } - - /// - /// References an existing DirectorySearch element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class DirectorySearchRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string parentField; - - private bool parentFieldSet; - - private string pathField; - - private bool pathFieldSet; - - private ISchemaElement parentElement; - - public DirectorySearchRef() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Id of the search being referred to. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// 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. - /// - public string Parent - { - get - { - return this.parentField; - } - set - { - this.parentFieldSet = true; - this.parentField = value; - } - } - - /// - /// Path on the user's system. Either absolute, or relative to containing directories. - /// - public string Path - { - get - { - return this.pathField; - } - set - { - this.pathFieldSet = true; - this.pathField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("DirectorySearch" == childName)) - { - childValue = new DirectorySearch(); - } - if (("DirectorySearchRef" == childName)) - { - childValue = new DirectorySearchRef(); - } - if (("FileSearch" == childName)) - { - childValue = new FileSearch(); - } - if (("FileSearchRef" == childName)) - { - childValue = new FileSearchRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DirectorySearchRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.parentFieldSet) - { - writer.WriteAttributeString("Parent", this.parentField); - } - if (this.pathFieldSet) - { - writer.WriteAttributeString("Path", this.pathField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Parent" == name)) - { - this.parentField = value; - this.parentFieldSet = true; - } - if (("Path" == name)) - { - this.pathField = value; - this.pathFieldSet = true; - } - } - } - - /// - /// Searches for file or directory and assigns to value of parent Property. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ComponentSearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string guidField; - - private bool guidFieldSet; - - private TypeType typeField; - - private bool typeFieldSet; - - private ISchemaElement parentElement; - - public ComponentSearch() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The component ID of the component whose key path is to be used for the search. - /// - public string Guid - { - get - { - return this.guidField; - } - set - { - this.guidFieldSet = true; - this.guidField = value; - } - } - - /// - /// Must be file if last child is FileSearch element and must be directory if last child is DirectorySearch element. - /// - public TypeType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("DirectorySearch" == childName)) - { - childValue = new DirectorySearch(); - } - if (("DirectorySearchRef" == childName)) - { - childValue = new DirectorySearchRef(); - } - if (("FileSearch" == childName)) - { - childValue = new FileSearch(); - } - if (("FileSearchRef" == childName)) - { - childValue = new FileSearchRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a TypeType from a string. - /// - public static TypeType ParseTypeType(string value) - { - TypeType parsedValue; - ComponentSearch.TryParseTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypeType from a string. - /// - public static bool TryParseTypeType(string value, out TypeType parsedValue) - { - parsedValue = TypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("directory" == value)) - { - parsedValue = TypeType.directory; - } - else - { - if (("file" == value)) - { - parsedValue = TypeType.file; - } - else - { - parsedValue = TypeType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ComponentSearch", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.guidFieldSet) - { - writer.WriteAttributeString("Guid", this.guidField); - } - if (this.typeFieldSet) - { - if ((this.typeField == TypeType.directory)) - { - writer.WriteAttributeString("Type", "directory"); - } - if ((this.typeField == TypeType.file)) - { - writer.WriteAttributeString("Type", "file"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Guid" == name)) - { - this.guidField = value; - this.guidFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = ComponentSearch.ParseTypeType(value); - this.typeFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum TypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// The key path of the component is a directory. - /// - directory, - - /// - /// The key path of the component is a file. This is the default value. - /// - file, - } - } - - /// - /// Searches for file, directory or registry key and assigns to value of parent Property - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class IniFileSearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private int fieldField; - - private bool fieldFieldSet; - - private string keyField; - - private bool keyFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string sectionField; - - private bool sectionFieldSet; - - private string shortNameField; - - private bool shortNameFieldSet; - - private TypeType typeField; - - private bool typeFieldSet; - - private ISchemaElement parentElement; - - public IniFileSearch() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// External key into the Signature table. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The field in the .ini line. If field is Null or 0, the entire line is read. - /// - public int Field - { - get - { - return this.fieldField; - } - set - { - this.fieldFieldSet = true; - this.fieldField = value; - } - } - - /// - /// The key value within the section. - /// - public string Key - { - get - { - return this.keyField; - } - set - { - this.keyFieldSet = true; - this.keyField = value; - } - } - - /// - /// In prior versions of the WiX toolset, this attribute specified the short name. - /// This attribute's value may now be either a short or long name. - /// If a short name is specified, the ShortName attribute may not be specified. - /// Also, if this value is a long name, the ShortName attribute may be omitted to - /// allow WiX to attempt to generate a unique short name. - /// However, if you wish to manually specify the short name, then the ShortName - /// attribute may be specified. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The localizable .ini file section. - /// - public string Section - { - get - { - return this.sectionField; - } - set - { - this.sectionFieldSet = true; - this.sectionField = value; - } - } - - /// - /// The short name of the file in 8.3 format. - /// This attribute should only be set if the user wants to manually specify the short name. - /// - public string ShortName - { - get - { - return this.shortNameField; - } - set - { - this.shortNameFieldSet = true; - this.shortNameField = value; - } - } - - /// - /// Must be file if last child is FileSearch element and must be directory if last child is DirectorySearch element. - /// - public TypeType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("DirectorySearch" == childName)) - { - childValue = new DirectorySearch(); - } - if (("DirectorySearchRef" == childName)) - { - childValue = new DirectorySearchRef(); - } - if (("FileSearch" == childName)) - { - childValue = new FileSearch(); - } - if (("FileSearchRef" == childName)) - { - childValue = new FileSearchRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a TypeType from a string. - /// - public static TypeType ParseTypeType(string value) - { - TypeType parsedValue; - IniFileSearch.TryParseTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypeType from a string. - /// - public static bool TryParseTypeType(string value, out TypeType parsedValue) - { - parsedValue = TypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("directory" == value)) - { - parsedValue = TypeType.directory; - } - else - { - if (("file" == value)) - { - parsedValue = TypeType.file; - } - else - { - if (("raw" == value)) - { - parsedValue = TypeType.raw; - } - else - { - parsedValue = TypeType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("IniFileSearch", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.fieldFieldSet) - { - writer.WriteAttributeString("Field", this.fieldField.ToString(CultureInfo.InvariantCulture)); - } - if (this.keyFieldSet) - { - writer.WriteAttributeString("Key", this.keyField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.sectionFieldSet) - { - writer.WriteAttributeString("Section", this.sectionField); - } - if (this.shortNameFieldSet) - { - writer.WriteAttributeString("ShortName", this.shortNameField); - } - if (this.typeFieldSet) - { - if ((this.typeField == TypeType.directory)) - { - writer.WriteAttributeString("Type", "directory"); - } - if ((this.typeField == TypeType.file)) - { - writer.WriteAttributeString("Type", "file"); - } - if ((this.typeField == TypeType.raw)) - { - writer.WriteAttributeString("Type", "raw"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Field" == name)) - { - this.fieldField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.fieldFieldSet = true; - } - if (("Key" == name)) - { - this.keyField = value; - this.keyFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Section" == name)) - { - this.sectionField = value; - this.sectionFieldSet = true; - } - if (("ShortName" == name)) - { - this.shortNameField = value; - this.shortNameFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = IniFileSearch.ParseTypeType(value); - this.typeFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum TypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// A directory location. - /// - directory, - - /// - /// A file location. This is the default value. - /// - file, - - /// - /// A raw .ini value. - /// - raw, - } - } - - /// - /// Searches for file, directory or registry key and assigns to value of parent Property - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegistrySearch : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private RootType rootField; - - private bool rootFieldSet; - - private string keyField; - - private bool keyFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private TypeType typeField; - - private bool typeFieldSet; - - private YesNoType win64Field; - - private bool win64FieldSet; - - private ISchemaElement parentElement; - - public RegistrySearch() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileSearchRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Signature to be used for the file, directory or registry key being searched for. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Root key for the registry value. - /// - public RootType Root - { - get - { - return this.rootField; - } - set - { - this.rootFieldSet = true; - this.rootField = value; - } - } - - /// - /// Key for the registry value. - /// - public string Key - { - get - { - return this.keyField; - } - set - { - this.keyFieldSet = true; - this.keyField = value; - } - } - - /// - /// Registry value name. If this value is null, then the value from the key's unnamed or default value, if any, is retrieved. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The value must be 'file' if the child is a FileSearch element, and must be 'directory' if child is a DirectorySearch element. - /// - public TypeType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - /// - /// 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 based on the platform set by the -arch switch to candle.exe - /// or the InstallerPlatform property in a .wixproj MSBuild project: - /// For x86 and ARM, the default value is 'no'. - /// For x64 and IA64, the default value is 'yes'. - /// - public YesNoType Win64 - { - get - { - return this.win64Field; - } - set - { - this.win64FieldSet = true; - this.win64Field = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("DirectorySearch" == childName)) - { - childValue = new DirectorySearch(); - } - if (("DirectorySearchRef" == childName)) - { - childValue = new DirectorySearchRef(); - } - if (("FileSearch" == childName)) - { - childValue = new FileSearch(); - } - if (("FileSearchRef" == childName)) - { - childValue = new FileSearchRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a RootType from a string. - /// - public static RootType ParseRootType(string value) - { - RootType parsedValue; - RegistrySearch.TryParseRootType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a RootType from a string. - /// - public static bool TryParseRootType(string value, out RootType parsedValue) - { - parsedValue = RootType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("HKCR" == value)) - { - parsedValue = RootType.HKCR; - } - else - { - if (("HKCU" == value)) - { - parsedValue = RootType.HKCU; - } - else - { - if (("HKLM" == value)) - { - parsedValue = RootType.HKLM; - } - else - { - if (("HKU" == value)) - { - parsedValue = RootType.HKU; - } - else - { - parsedValue = RootType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Parses a TypeType from a string. - /// - public static TypeType ParseTypeType(string value) - { - TypeType parsedValue; - RegistrySearch.TryParseTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypeType from a string. - /// - public static bool TryParseTypeType(string value, out TypeType parsedValue) - { - parsedValue = TypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("directory" == value)) - { - parsedValue = TypeType.directory; - } - else - { - if (("file" == value)) - { - parsedValue = TypeType.file; - } - else - { - if (("raw" == value)) - { - parsedValue = TypeType.raw; - } - else - { - parsedValue = TypeType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegistrySearch", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.rootFieldSet) - { - if ((this.rootField == RootType.HKCR)) - { - writer.WriteAttributeString("Root", "HKCR"); - } - if ((this.rootField == RootType.HKCU)) - { - writer.WriteAttributeString("Root", "HKCU"); - } - if ((this.rootField == RootType.HKLM)) - { - writer.WriteAttributeString("Root", "HKLM"); - } - if ((this.rootField == RootType.HKU)) - { - writer.WriteAttributeString("Root", "HKU"); - } - } - if (this.keyFieldSet) - { - writer.WriteAttributeString("Key", this.keyField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.typeFieldSet) - { - if ((this.typeField == TypeType.directory)) - { - writer.WriteAttributeString("Type", "directory"); - } - if ((this.typeField == TypeType.file)) - { - writer.WriteAttributeString("Type", "file"); - } - if ((this.typeField == TypeType.raw)) - { - writer.WriteAttributeString("Type", "raw"); - } - } - if (this.win64FieldSet) - { - if ((this.win64Field == YesNoType.no)) - { - writer.WriteAttributeString("Win64", "no"); - } - if ((this.win64Field == YesNoType.yes)) - { - writer.WriteAttributeString("Win64", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Root" == name)) - { - this.rootField = RegistrySearch.ParseRootType(value); - this.rootFieldSet = true; - } - if (("Key" == name)) - { - this.keyField = value; - this.keyFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = RegistrySearch.ParseTypeType(value); - this.typeFieldSet = true; - } - if (("Win64" == name)) - { - this.win64Field = Enums.ParseYesNoType(value); - this.win64FieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum RootType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// HKEY_CLASSES_ROOT - /// - HKCR, - - /// - /// HKEY_CURRENT_USER - /// - HKCU, - - /// - /// HKEY_LOCAL_MACHINE - /// - HKLM, - - /// - /// HKEY_USERS - /// - HKU, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum TypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// The registry value contains the path to a directory. - /// - directory, - - /// - /// 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. - /// - file, - - /// - /// Sets the raw value from the registry value. Please note that this value will contain a prefix as follows: - /// - raw, - } - } - - /// - /// References an existing RegistrySearch element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegistrySearchRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// Specify the Id of the RegistrySearch to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegistrySearchRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Sets the parent of a nested DirectorySearch element to CCP_DRIVE. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ComplianceDrive : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private ISchemaElement parentElement; - - public ComplianceDrive() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DirectorySearchRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("DirectorySearch" == childName)) - { - childValue = new DirectorySearch(); - } - if (("DirectorySearchRef" == childName)) - { - childValue = new DirectorySearchRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ComplianceDrive", "http://wixtoolset.org/schemas/v4/wxs"); - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - } - } - - /// - /// Adds a row to the CCPSearch table. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ComplianceCheck : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private ISchemaElement parentElement; - - public ComplianceCheck() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComplianceDrive))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComponentSearch))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearch))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(IniFileSearch))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearch))); - childCollection0.AddCollection(childCollection1); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ComplianceDrive" == childName)) - { - childValue = new ComplianceDrive(); - } - if (("ComponentSearch" == childName)) - { - childValue = new ComponentSearch(); - } - if (("RegistrySearch" == childName)) - { - childValue = new RegistrySearch(); - } - if (("IniFileSearch" == childName)) - { - childValue = new IniFileSearch(); - } - if (("DirectorySearch" == childName)) - { - childValue = new DirectorySearch(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ComplianceCheck", "http://wixtoolset.org/schemas/v4/wxs"); - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - } - } - - /// - /// Property value for a Package or Module. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Property : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private YesNoType complianceCheckField; - - private bool complianceCheckFieldSet; - - private YesNoType adminField; - - private bool adminFieldSet; - - private YesNoType secureField; - - private bool secureFieldSet; - - private YesNoType hiddenField; - - private bool hiddenFieldSet; - - private YesNoType suppressModularizationField; - - private bool suppressModularizationFieldSet; - - private ISchemaElement parentElement; - - public Property() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComplianceDrive))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ComponentSearch))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearch))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(RegistrySearchRef))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(IniFileSearch))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearch))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(DirectorySearchRef))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(ProductSearch))); - childCollection0.AddCollection(childCollection1); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Unique identifier for Property. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Sets a default value for the property. The value will be overwritten if the Property is used for a search. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// Adds a row to the CCPSearch table. This attribute is only valid when this Property contains a search element. - /// - public YesNoType ComplianceCheck - { - get - { - return this.complianceCheckField; - } - set - { - this.complianceCheckFieldSet = true; - this.complianceCheckField = value; - } - } - - /// - /// Denotes that the Property is saved during - /// - public YesNoType Admin - { - get - { - return this.adminField; - } - set - { - this.adminFieldSet = true; - this.adminField = value; - } - } - - /// - /// Denotes that the Property can be passed to the server side when doing a managed installation with elevated privileges. See the - /// - public YesNoType Secure - { - get - { - return this.secureField; - } - set - { - this.secureFieldSet = true; - this.secureField = value; - } - } - - /// - /// Denotes that the Property is not logged during installation. See the - /// - public YesNoType Hidden - { - get - { - return this.hiddenField; - } - set - { - this.hiddenFieldSet = true; - this.hiddenField = value; - } - } - - /// - /// Use to suppress modularization of this property identifier in merge modules. - /// Using this functionality is strongly discouraged; it should only be - /// necessary as a workaround of last resort in rare scenarios. - /// - public YesNoType SuppressModularization - { - get - { - return this.suppressModularizationField; - } - set - { - this.suppressModularizationFieldSet = true; - this.suppressModularizationField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ComplianceDrive" == childName)) - { - childValue = new ComplianceDrive(); - } - if (("ComponentSearch" == childName)) - { - childValue = new ComponentSearch(); - } - if (("RegistrySearch" == childName)) - { - childValue = new RegistrySearch(); - } - if (("RegistrySearchRef" == childName)) - { - childValue = new RegistrySearchRef(); - } - if (("IniFileSearch" == childName)) - { - childValue = new IniFileSearch(); - } - if (("DirectorySearch" == childName)) - { - childValue = new DirectorySearch(); - } - if (("DirectorySearchRef" == childName)) - { - childValue = new DirectorySearchRef(); - } - if (("ProductSearch" == childName)) - { - childValue = new ProductSearch(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Property", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.complianceCheckFieldSet) - { - if ((this.complianceCheckField == YesNoType.no)) - { - writer.WriteAttributeString("ComplianceCheck", "no"); - } - if ((this.complianceCheckField == YesNoType.yes)) - { - writer.WriteAttributeString("ComplianceCheck", "yes"); - } - } - if (this.adminFieldSet) - { - if ((this.adminField == YesNoType.no)) - { - writer.WriteAttributeString("Admin", "no"); - } - if ((this.adminField == YesNoType.yes)) - { - writer.WriteAttributeString("Admin", "yes"); - } - } - if (this.secureFieldSet) - { - if ((this.secureField == YesNoType.no)) - { - writer.WriteAttributeString("Secure", "no"); - } - if ((this.secureField == YesNoType.yes)) - { - writer.WriteAttributeString("Secure", "yes"); - } - } - if (this.hiddenFieldSet) - { - if ((this.hiddenField == YesNoType.no)) - { - writer.WriteAttributeString("Hidden", "no"); - } - if ((this.hiddenField == YesNoType.yes)) - { - writer.WriteAttributeString("Hidden", "yes"); - } - } - if (this.suppressModularizationFieldSet) - { - if ((this.suppressModularizationField == YesNoType.no)) - { - writer.WriteAttributeString("SuppressModularization", "no"); - } - if ((this.suppressModularizationField == YesNoType.yes)) - { - writer.WriteAttributeString("SuppressModularization", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("ComplianceCheck" == name)) - { - this.complianceCheckField = Enums.ParseYesNoType(value); - this.complianceCheckFieldSet = true; - } - if (("Admin" == name)) - { - this.adminField = Enums.ParseYesNoType(value); - this.adminFieldSet = true; - } - if (("Secure" == name)) - { - this.secureField = Enums.ParseYesNoType(value); - this.secureFieldSet = true; - } - if (("Hidden" == name)) - { - this.hiddenField = Enums.ParseYesNoType(value); - this.hiddenFieldSet = true; - } - if (("SuppressModularization" == name)) - { - this.suppressModularizationField = Enums.ParseYesNoType(value); - this.suppressModularizationFieldSet = true; - } - } - } - - /// - /// Reference to a Property value. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PropertyRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier of Property to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PropertyRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Shortcut, default target is parent File, CreateFolder, or Component's Directory - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Shortcut : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string directoryField; - - private bool directoryFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string shortNameField; - - private bool shortNameFieldSet; - - private string targetField; - - private bool targetFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string argumentsField; - - private bool argumentsFieldSet; - - private int hotkeyField; - - private bool hotkeyFieldSet; - - private string iconField; - - private bool iconFieldSet; - - private int iconIndexField; - - private bool iconIndexFieldSet; - - private ShowType showField; - - private bool showFieldSet; - - private string workingDirectoryField; - - private bool workingDirectoryFieldSet; - - private YesNoType advertiseField; - - private bool advertiseFieldSet; - - private string displayResourceDllField; - - private bool displayResourceDllFieldSet; - - private int displayResourceIdField; - - private bool displayResourceIdFieldSet; - - private string descriptionResourceDllField; - - private bool descriptionResourceDllFieldSet; - - private int descriptionResourceIdField; - - private bool descriptionResourceIdFieldSet; - - private ISchemaElement parentElement; - - public Shortcut() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Icon))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ShortcutProperty))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Unique identifier for the shortcut. This value will serve as the primary key for the row. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// 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. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - /// - /// In prior versions of the WiX toolset, this attribute specified the short name. - /// This attribute's value may now be either a short or long name. - /// If a short name is specified, the ShortName attribute may not be specified. - /// Also, if this value is a long name, the ShortName attribute may be omitted to - /// allow WiX to attempt to generate a unique short name. - /// However, if this name collides with another shortcut or you wish to manually specify - /// the short name, then the ShortName attribute may be specified. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The short name of the shortcut in 8.3 format. - /// This attribute should only be set if there is a conflict between generated short names - /// or the user wants to manually specify the short name. - /// - public string ShortName - { - get - { - return this.shortNameField; - } - set - { - this.shortNameFieldSet = true; - this.shortNameField = value; - } - } - - /// - /// This attribute can only be set if this Shortcut element is nested under a Component element. - /// When nested under a Component element, this attribute's value will default to the parent directory. - /// This attribute's value is the target for a non-advertised shortcut. - /// This attribute is not valid for advertised shortcuts. - /// 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. - /// - public string Target - { - get - { - return this.targetField; - } - set - { - this.targetFieldSet = true; - this.targetField = value; - } - } - - /// - /// The localizable description for the shortcut. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// The command-line arguments for the shortcut. Note that the resolution of properties - /// in the Arguments field is limited. A property formatted as [Property] in this field can only be resolved if the - /// property already has the intended value when the component owning the shortcut is installed. For example, for the - /// argument "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and - /// the component that owns the shortcut. - /// - public string Arguments - { - get - { - return this.argumentsField; - } - set - { - this.argumentsFieldSet = true; - this.argumentsField = value; - } - } - - /// - /// The hotkey for the shortcut. The low-order byte contains the virtual-key code for - /// the key, and the high-order byte contains modifier flags. This must be a non-negative number. Authors of - /// installation packages are generally recommend not to set this option, because this can add duplicate hotkeys to a - /// users desktop. In addition, the practice of assigning hotkeys to shortcuts can be problematic for users using hotkeys - /// for accessibility. - /// - public int Hotkey - { - get - { - return this.hotkeyField; - } - set - { - this.hotkeyFieldSet = true; - this.hotkeyField = value; - } - } - - /// - /// Identifier reference to Icon element. The Icon identifier should have the same extension - /// as the file that it points at. For example, a shortcut to an executable (e.g. "my.exe") should reference an Icon with identifier - /// like "MyIcon.exe" - /// - public string Icon - { - get - { - return this.iconField; - } - set - { - this.iconFieldSet = true; - this.iconField = value; - } - } - - /// - /// Identifier reference to Icon element. - /// - public int IconIndex - { - get - { - return this.iconIndexField; - } - set - { - this.iconIndexFieldSet = true; - this.iconIndexField = value; - } - } - - public ShowType Show - { - get - { - return this.showField; - } - set - { - this.showFieldSet = true; - this.showField = value; - } - } - - /// - /// Directory identifier (or Property identifier that resolves to a directory) that resolves - /// to the path of the working directory for the shortcut. - /// - public string WorkingDirectory - { - get - { - return this.workingDirectoryField; - } - set - { - this.workingDirectoryFieldSet = true; - this.workingDirectoryField = value; - } - } - - /// - /// Specifies if the shortcut should be advertised or not. Note that advertised shortcuts - /// always point at a particular application, identified by a ProductCode, and should not be shared between applications. - /// Advertised shortcuts only work for the most recently installed application, and are removed when that application is - /// removed. The default value is 'no'. - /// - public YesNoType Advertise - { - get - { - return this.advertiseField; - } - set - { - this.advertiseFieldSet = true; - this.advertiseField = value; - } - } - - /// - /// The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally - /// authored using [#filekey] form. When this attribute is specified, the DisplayResourceId attribute must also - /// be provided. - /// - /// This attribute is only used on Windows Vista and above. If this attribute is not populated and the install - /// is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and - /// the install is running on Vista and above, the value in the Name attribute is ignored. - /// - public string DisplayResourceDll - { - get - { - return this.displayResourceDllField; - } - set - { - this.displayResourceDllFieldSet = true; - this.displayResourceDllField = value; - } - } - - /// - /// The display name index for the shortcut. This must be a non-negative number. When this attribute is specified, the - /// DisplayResourceDll attribute must also be provided. - /// - /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install - /// is running on Vista and above, the value in the Name attribute is used. If this attribute is specified and - /// the install is running on Vista and above, the value in the Name attribute is ignored. - /// - public int DisplayResourceId - { - get - { - return this.displayResourceIdField; - } - set - { - this.displayResourceIdFieldSet = true; - this.displayResourceIdField = value; - } - } - - /// - /// The Formatted string providing the full path to the language neutral file containing the MUI Manifest. Generally - /// authored using [#filekey] form. When this attribute is specified, the DescriptionResourceId attribute must also - /// be provided. - /// - /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install - /// is running on Vista and above, the value in the Name attribute is used. If this attribute is provided and - /// the install is running on Vista and above, the value in the Name attribute is ignored. - /// - public string DescriptionResourceDll - { - get - { - return this.descriptionResourceDllField; - } - set - { - this.descriptionResourceDllFieldSet = true; - this.descriptionResourceDllField = value; - } - } - - /// - /// The description name index for the shortcut. This must be a non-negative number. When this attribute is specified, - /// the DescriptionResourceDll attribute must also be populated. - /// - /// This attribute is only used on Windows Vista and above. If this attribute is not specified and the install - /// is running on Vista and above, the value in the Name attribute is used. If this attribute is populated and the - /// install is running on Vista and above, the value in the Name attribute is ignored. - /// - public int DescriptionResourceId - { - get - { - return this.descriptionResourceIdField; - } - set - { - this.descriptionResourceIdFieldSet = true; - this.descriptionResourceIdField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Icon" == childName)) - { - childValue = new Icon(); - } - if (("ShortcutProperty" == childName)) - { - childValue = new ShortcutProperty(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a ShowType from a string. - /// - public static ShowType ParseShowType(string value) - { - ShowType parsedValue; - Shortcut.TryParseShowType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ShowType from a string. - /// - public static bool TryParseShowType(string value, out ShowType parsedValue) - { - parsedValue = ShowType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("normal" == value)) - { - parsedValue = ShowType.normal; - } - else - { - if (("minimized" == value)) - { - parsedValue = ShowType.minimized; - } - else - { - if (("maximized" == value)) - { - parsedValue = ShowType.maximized; - } - else - { - parsedValue = ShowType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Shortcut", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.shortNameFieldSet) - { - writer.WriteAttributeString("ShortName", this.shortNameField); - } - if (this.targetFieldSet) - { - writer.WriteAttributeString("Target", this.targetField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.argumentsFieldSet) - { - writer.WriteAttributeString("Arguments", this.argumentsField); - } - if (this.hotkeyFieldSet) - { - writer.WriteAttributeString("Hotkey", this.hotkeyField.ToString(CultureInfo.InvariantCulture)); - } - if (this.iconFieldSet) - { - writer.WriteAttributeString("Icon", this.iconField); - } - if (this.iconIndexFieldSet) - { - writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture)); - } - if (this.showFieldSet) - { - if ((this.showField == ShowType.normal)) - { - writer.WriteAttributeString("Show", "normal"); - } - if ((this.showField == ShowType.minimized)) - { - writer.WriteAttributeString("Show", "minimized"); - } - if ((this.showField == ShowType.maximized)) - { - writer.WriteAttributeString("Show", "maximized"); - } - } - if (this.workingDirectoryFieldSet) - { - writer.WriteAttributeString("WorkingDirectory", this.workingDirectoryField); - } - if (this.advertiseFieldSet) - { - if ((this.advertiseField == YesNoType.no)) - { - writer.WriteAttributeString("Advertise", "no"); - } - if ((this.advertiseField == YesNoType.yes)) - { - writer.WriteAttributeString("Advertise", "yes"); - } - } - if (this.displayResourceDllFieldSet) - { - writer.WriteAttributeString("DisplayResourceDll", this.displayResourceDllField); - } - if (this.displayResourceIdFieldSet) - { - writer.WriteAttributeString("DisplayResourceId", this.displayResourceIdField.ToString(CultureInfo.InvariantCulture)); - } - if (this.descriptionResourceDllFieldSet) - { - writer.WriteAttributeString("DescriptionResourceDll", this.descriptionResourceDllField); - } - if (this.descriptionResourceIdFieldSet) - { - writer.WriteAttributeString("DescriptionResourceId", this.descriptionResourceIdField.ToString(CultureInfo.InvariantCulture)); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("ShortName" == name)) - { - this.shortNameField = value; - this.shortNameFieldSet = true; - } - if (("Target" == name)) - { - this.targetField = value; - this.targetFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("Arguments" == name)) - { - this.argumentsField = value; - this.argumentsFieldSet = true; - } - if (("Hotkey" == name)) - { - this.hotkeyField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.hotkeyFieldSet = true; - } - if (("Icon" == name)) - { - this.iconField = value; - this.iconFieldSet = true; - } - if (("IconIndex" == name)) - { - this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.iconIndexFieldSet = true; - } - if (("Show" == name)) - { - this.showField = Shortcut.ParseShowType(value); - this.showFieldSet = true; - } - if (("WorkingDirectory" == name)) - { - this.workingDirectoryField = value; - this.workingDirectoryFieldSet = true; - } - if (("Advertise" == name)) - { - this.advertiseField = Enums.ParseYesNoType(value); - this.advertiseFieldSet = true; - } - if (("DisplayResourceDll" == name)) - { - this.displayResourceDllField = value; - this.displayResourceDllFieldSet = true; - } - if (("DisplayResourceId" == name)) - { - this.displayResourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.displayResourceIdFieldSet = true; - } - if (("DescriptionResourceDll" == name)) - { - this.descriptionResourceDllField = value; - this.descriptionResourceDllFieldSet = true; - } - if (("DescriptionResourceId" == name)) - { - this.descriptionResourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.descriptionResourceIdFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ShowType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// The shortcut target will be displayed using the SW_SHOWNORMAL attribute. - /// - normal, - - /// - /// The shortcut target will be displayed using the SW_SHOWMINNOACTIVE attribute. - /// - minimized, - - /// - /// The shortcut target will be displayed using the SW_SHOWMAXIMIZED attribute. - /// - maximized, - } - } - - /// - /// Property values for a shortcut. This element's functionality is available starting with MSI 5.0. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ShortcutProperty : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string keyField; - - private bool keyFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - /// - /// Unique identifier for MsiShortcutProperty table. If omitted, a stable identifier will be generated from the parent shortcut identifier and Key value. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// A formatted string identifying the property to be set. - /// - public string Key - { - get - { - return this.keyField; - } - set - { - this.keyFieldSet = true; - this.keyField = value; - } - } - - /// - /// A formatted string supplying the value of the property. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ShortcutProperty", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.keyFieldSet) - { - writer.WriteAttributeString("Key", this.keyField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Key" == name)) - { - this.keyField = value; - this.keyFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - } - - /// - /// Sets ACLs on File, Registry, or CreateFolder. When under a Registry element, this cannot be used - /// if the Action attribute's value is remove or removeKeyOnInstall. This element has no Id attribute. - /// The table and key are taken from the parent element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Permission : ISchemaElement, ISetAttributes - { - - private string domainField; - - private bool domainFieldSet; - - private string userField; - - private bool userFieldSet; - - private YesNoType readField; - - private bool readFieldSet; - - private YesNoType deleteField; - - private bool deleteFieldSet; - - private YesNoType readPermissionField; - - private bool readPermissionFieldSet; - - private YesNoType changePermissionField; - - private bool changePermissionFieldSet; - - private YesNoType takeOwnershipField; - - private bool takeOwnershipFieldSet; - - private YesNoType specificRightsAllField; - - private bool specificRightsAllFieldSet; - - private YesNoType readAttributesField; - - private bool readAttributesFieldSet; - - private YesNoType writeAttributesField; - - private bool writeAttributesFieldSet; - - private YesNoType readExtendedAttributesField; - - private bool readExtendedAttributesFieldSet; - - private YesNoType writeExtendedAttributesField; - - private bool writeExtendedAttributesFieldSet; - - private YesNoType synchronizeField; - - private bool synchronizeFieldSet; - - private YesNoType createFileField; - - private bool createFileFieldSet; - - private YesNoType createChildField; - - private bool createChildFieldSet; - - private YesNoType deleteChildField; - - private bool deleteChildFieldSet; - - private YesNoType traverseField; - - private bool traverseFieldSet; - - private YesNoType appendField; - - private bool appendFieldSet; - - private YesNoType executeField; - - private bool executeFieldSet; - - private YesNoType fileAllRightsField; - - private bool fileAllRightsFieldSet; - - private YesNoType writeField; - - private bool writeFieldSet; - - private YesNoType createSubkeysField; - - private bool createSubkeysFieldSet; - - private YesNoType enumerateSubkeysField; - - private bool enumerateSubkeysFieldSet; - - private YesNoType notifyField; - - private bool notifyFieldSet; - - private YesNoType createLinkField; - - private bool createLinkFieldSet; - - private YesNoType genericAllField; - - private bool genericAllFieldSet; - - private YesNoType genericExecuteField; - - private bool genericExecuteFieldSet; - - private YesNoType genericWriteField; - - private bool genericWriteFieldSet; - - private YesNoType genericReadField; - - private bool genericReadFieldSet; - - private ISchemaElement parentElement; - - public string Domain - { - get - { - return this.domainField; - } - set - { - this.domainFieldSet = true; - this.domainField = value; - } - } - - public string User - { - get - { - return this.userField; - } - set - { - this.userFieldSet = true; - this.userField = value; - } - } - - public YesNoType Read - { - get - { - return this.readField; - } - set - { - this.readFieldSet = true; - this.readField = value; - } - } - - public YesNoType Delete - { - get - { - return this.deleteField; - } - set - { - this.deleteFieldSet = true; - this.deleteField = value; - } - } - - public YesNoType ReadPermission - { - get - { - return this.readPermissionField; - } - set - { - this.readPermissionFieldSet = true; - this.readPermissionField = value; - } - } - - public YesNoType ChangePermission - { - get - { - return this.changePermissionField; - } - set - { - this.changePermissionFieldSet = true; - this.changePermissionField = value; - } - } - - public YesNoType TakeOwnership - { - get - { - return this.takeOwnershipField; - } - set - { - this.takeOwnershipFieldSet = true; - this.takeOwnershipField = value; - } - } - - /// - /// Bit mask for SPECIFIC_RIGHTS_ALL from WinNT.h (0x0000FFFF). - /// - public YesNoType SpecificRightsAll - { - get - { - return this.specificRightsAllField; - } - set - { - this.specificRightsAllFieldSet = true; - this.specificRightsAllField = value; - } - } - - public YesNoType ReadAttributes - { - get - { - return this.readAttributesField; - } - set - { - this.readAttributesFieldSet = true; - this.readAttributesField = value; - } - } - - public YesNoType WriteAttributes - { - get - { - return this.writeAttributesField; - } - set - { - this.writeAttributesFieldSet = true; - this.writeAttributesField = value; - } - } - - public YesNoType ReadExtendedAttributes - { - get - { - return this.readExtendedAttributesField; - } - set - { - this.readExtendedAttributesFieldSet = true; - this.readExtendedAttributesField = value; - } - } - - public YesNoType WriteExtendedAttributes - { - get - { - return this.writeExtendedAttributesField; - } - set - { - this.writeExtendedAttributesFieldSet = true; - this.writeExtendedAttributesField = value; - } - } - - public YesNoType Synchronize - { - get - { - return this.synchronizeField; - } - set - { - this.synchronizeFieldSet = true; - this.synchronizeField = value; - } - } - - /// - /// For a directory, the right to create a file in the directory. Only valid under a 'CreateFolder' parent. - /// - public YesNoType CreateFile - { - get - { - return this.createFileField; - } - set - { - this.createFileFieldSet = true; - this.createFileField = value; - } - } - - /// - /// For a directory, the right to create a subdirectory. Only valid under a 'CreateFolder' parent. - /// - public YesNoType CreateChild - { - get - { - return this.createChildField; - } - set - { - this.createChildFieldSet = true; - this.createChildField = value; - } - } - - /// - /// 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. - /// - public YesNoType DeleteChild - { - get - { - return this.deleteChildField; - } - set - { - this.deleteChildFieldSet = true; - this.deleteChildField = value; - } - } - - /// - /// 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. - /// - public YesNoType Traverse - { - get - { - return this.traverseField; - } - set - { - this.traverseFieldSet = true; - this.traverseField = value; - } - } - - public YesNoType Append - { - get - { - return this.appendField; - } - set - { - this.appendFieldSet = true; - this.appendField = value; - } - } - - public YesNoType Execute - { - get - { - return this.executeField; - } - set - { - this.executeFieldSet = true; - this.executeField = value; - } - } - - /// - /// Bit mask for FILE_ALL_ACCESS from WinNT.h (0x001F01FF). - /// - public YesNoType FileAllRights - { - get - { - return this.fileAllRightsField; - } - set - { - this.fileAllRightsFieldSet = true; - this.fileAllRightsField = value; - } - } - - public YesNoType Write - { - get - { - return this.writeField; - } - set - { - this.writeFieldSet = true; - this.writeField = value; - } - } - - public YesNoType CreateSubkeys - { - get - { - return this.createSubkeysField; - } - set - { - this.createSubkeysFieldSet = true; - this.createSubkeysField = value; - } - } - - public YesNoType EnumerateSubkeys - { - get - { - return this.enumerateSubkeysField; - } - set - { - this.enumerateSubkeysFieldSet = true; - this.enumerateSubkeysField = value; - } - } - - public YesNoType Notify - { - get - { - return this.notifyField; - } - set - { - this.notifyFieldSet = true; - this.notifyField = value; - } - } - - public YesNoType CreateLink - { - get - { - return this.createLinkField; - } - set - { - this.createLinkFieldSet = true; - this.createLinkField = value; - } - } - - public YesNoType GenericAll - { - get - { - return this.genericAllField; - } - set - { - this.genericAllFieldSet = true; - this.genericAllField = value; - } - } - - public YesNoType GenericExecute - { - get - { - return this.genericExecuteField; - } - set - { - this.genericExecuteFieldSet = true; - this.genericExecuteField = value; - } - } - - public YesNoType GenericWrite - { - get - { - return this.genericWriteField; - } - set - { - this.genericWriteFieldSet = true; - this.genericWriteField = value; - } - } - - /// - /// specifying this will fail to grant read access - /// - public YesNoType GenericRead - { - get - { - return this.genericReadField; - } - set - { - this.genericReadFieldSet = true; - this.genericReadField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Permission", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.domainFieldSet) - { - writer.WriteAttributeString("Domain", this.domainField); - } - if (this.userFieldSet) - { - writer.WriteAttributeString("User", this.userField); - } - if (this.readFieldSet) - { - if ((this.readField == YesNoType.no)) - { - writer.WriteAttributeString("Read", "no"); - } - if ((this.readField == YesNoType.yes)) - { - writer.WriteAttributeString("Read", "yes"); - } - } - if (this.deleteFieldSet) - { - if ((this.deleteField == YesNoType.no)) - { - writer.WriteAttributeString("Delete", "no"); - } - if ((this.deleteField == YesNoType.yes)) - { - writer.WriteAttributeString("Delete", "yes"); - } - } - if (this.readPermissionFieldSet) - { - if ((this.readPermissionField == YesNoType.no)) - { - writer.WriteAttributeString("ReadPermission", "no"); - } - if ((this.readPermissionField == YesNoType.yes)) - { - writer.WriteAttributeString("ReadPermission", "yes"); - } - } - if (this.changePermissionFieldSet) - { - if ((this.changePermissionField == YesNoType.no)) - { - writer.WriteAttributeString("ChangePermission", "no"); - } - if ((this.changePermissionField == YesNoType.yes)) - { - writer.WriteAttributeString("ChangePermission", "yes"); - } - } - if (this.takeOwnershipFieldSet) - { - if ((this.takeOwnershipField == YesNoType.no)) - { - writer.WriteAttributeString("TakeOwnership", "no"); - } - if ((this.takeOwnershipField == YesNoType.yes)) - { - writer.WriteAttributeString("TakeOwnership", "yes"); - } - } - if (this.specificRightsAllFieldSet) - { - if ((this.specificRightsAllField == YesNoType.no)) - { - writer.WriteAttributeString("SpecificRightsAll", "no"); - } - if ((this.specificRightsAllField == YesNoType.yes)) - { - writer.WriteAttributeString("SpecificRightsAll", "yes"); - } - } - if (this.readAttributesFieldSet) - { - if ((this.readAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("ReadAttributes", "no"); - } - if ((this.readAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("ReadAttributes", "yes"); - } - } - if (this.writeAttributesFieldSet) - { - if ((this.writeAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("WriteAttributes", "no"); - } - if ((this.writeAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("WriteAttributes", "yes"); - } - } - if (this.readExtendedAttributesFieldSet) - { - if ((this.readExtendedAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("ReadExtendedAttributes", "no"); - } - if ((this.readExtendedAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("ReadExtendedAttributes", "yes"); - } - } - if (this.writeExtendedAttributesFieldSet) - { - if ((this.writeExtendedAttributesField == YesNoType.no)) - { - writer.WriteAttributeString("WriteExtendedAttributes", "no"); - } - if ((this.writeExtendedAttributesField == YesNoType.yes)) - { - writer.WriteAttributeString("WriteExtendedAttributes", "yes"); - } - } - if (this.synchronizeFieldSet) - { - if ((this.synchronizeField == YesNoType.no)) - { - writer.WriteAttributeString("Synchronize", "no"); - } - if ((this.synchronizeField == YesNoType.yes)) - { - writer.WriteAttributeString("Synchronize", "yes"); - } - } - if (this.createFileFieldSet) - { - if ((this.createFileField == YesNoType.no)) - { - writer.WriteAttributeString("CreateFile", "no"); - } - if ((this.createFileField == YesNoType.yes)) - { - writer.WriteAttributeString("CreateFile", "yes"); - } - } - if (this.createChildFieldSet) - { - if ((this.createChildField == YesNoType.no)) - { - writer.WriteAttributeString("CreateChild", "no"); - } - if ((this.createChildField == YesNoType.yes)) - { - writer.WriteAttributeString("CreateChild", "yes"); - } - } - if (this.deleteChildFieldSet) - { - if ((this.deleteChildField == YesNoType.no)) - { - writer.WriteAttributeString("DeleteChild", "no"); - } - if ((this.deleteChildField == YesNoType.yes)) - { - writer.WriteAttributeString("DeleteChild", "yes"); - } - } - if (this.traverseFieldSet) - { - if ((this.traverseField == YesNoType.no)) - { - writer.WriteAttributeString("Traverse", "no"); - } - if ((this.traverseField == YesNoType.yes)) - { - writer.WriteAttributeString("Traverse", "yes"); - } - } - if (this.appendFieldSet) - { - if ((this.appendField == YesNoType.no)) - { - writer.WriteAttributeString("Append", "no"); - } - if ((this.appendField == YesNoType.yes)) - { - writer.WriteAttributeString("Append", "yes"); - } - } - if (this.executeFieldSet) - { - if ((this.executeField == YesNoType.no)) - { - writer.WriteAttributeString("Execute", "no"); - } - if ((this.executeField == YesNoType.yes)) - { - writer.WriteAttributeString("Execute", "yes"); - } - } - if (this.fileAllRightsFieldSet) - { - if ((this.fileAllRightsField == YesNoType.no)) - { - writer.WriteAttributeString("FileAllRights", "no"); - } - if ((this.fileAllRightsField == YesNoType.yes)) - { - writer.WriteAttributeString("FileAllRights", "yes"); - } - } - if (this.writeFieldSet) - { - if ((this.writeField == YesNoType.no)) - { - writer.WriteAttributeString("Write", "no"); - } - if ((this.writeField == YesNoType.yes)) - { - writer.WriteAttributeString("Write", "yes"); - } - } - if (this.createSubkeysFieldSet) - { - if ((this.createSubkeysField == YesNoType.no)) - { - writer.WriteAttributeString("CreateSubkeys", "no"); - } - if ((this.createSubkeysField == YesNoType.yes)) - { - writer.WriteAttributeString("CreateSubkeys", "yes"); - } - } - if (this.enumerateSubkeysFieldSet) - { - if ((this.enumerateSubkeysField == YesNoType.no)) - { - writer.WriteAttributeString("EnumerateSubkeys", "no"); - } - if ((this.enumerateSubkeysField == YesNoType.yes)) - { - writer.WriteAttributeString("EnumerateSubkeys", "yes"); - } - } - if (this.notifyFieldSet) - { - if ((this.notifyField == YesNoType.no)) - { - writer.WriteAttributeString("Notify", "no"); - } - if ((this.notifyField == YesNoType.yes)) - { - writer.WriteAttributeString("Notify", "yes"); - } - } - if (this.createLinkFieldSet) - { - if ((this.createLinkField == YesNoType.no)) - { - writer.WriteAttributeString("CreateLink", "no"); - } - if ((this.createLinkField == YesNoType.yes)) - { - writer.WriteAttributeString("CreateLink", "yes"); - } - } - if (this.genericAllFieldSet) - { - if ((this.genericAllField == YesNoType.no)) - { - writer.WriteAttributeString("GenericAll", "no"); - } - if ((this.genericAllField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericAll", "yes"); - } - } - if (this.genericExecuteFieldSet) - { - if ((this.genericExecuteField == YesNoType.no)) - { - writer.WriteAttributeString("GenericExecute", "no"); - } - if ((this.genericExecuteField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericExecute", "yes"); - } - } - if (this.genericWriteFieldSet) - { - if ((this.genericWriteField == YesNoType.no)) - { - writer.WriteAttributeString("GenericWrite", "no"); - } - if ((this.genericWriteField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericWrite", "yes"); - } - } - if (this.genericReadFieldSet) - { - if ((this.genericReadField == YesNoType.no)) - { - writer.WriteAttributeString("GenericRead", "no"); - } - if ((this.genericReadField == YesNoType.yes)) - { - writer.WriteAttributeString("GenericRead", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Domain" == name)) - { - this.domainField = value; - this.domainFieldSet = true; - } - if (("User" == name)) - { - this.userField = value; - this.userFieldSet = true; - } - if (("Read" == name)) - { - this.readField = Enums.ParseYesNoType(value); - this.readFieldSet = true; - } - if (("Delete" == name)) - { - this.deleteField = Enums.ParseYesNoType(value); - this.deleteFieldSet = true; - } - if (("ReadPermission" == name)) - { - this.readPermissionField = Enums.ParseYesNoType(value); - this.readPermissionFieldSet = true; - } - if (("ChangePermission" == name)) - { - this.changePermissionField = Enums.ParseYesNoType(value); - this.changePermissionFieldSet = true; - } - if (("TakeOwnership" == name)) - { - this.takeOwnershipField = Enums.ParseYesNoType(value); - this.takeOwnershipFieldSet = true; - } - if (("SpecificRightsAll" == name)) - { - this.specificRightsAllField = Enums.ParseYesNoType(value); - this.specificRightsAllFieldSet = true; - } - if (("ReadAttributes" == name)) - { - this.readAttributesField = Enums.ParseYesNoType(value); - this.readAttributesFieldSet = true; - } - if (("WriteAttributes" == name)) - { - this.writeAttributesField = Enums.ParseYesNoType(value); - this.writeAttributesFieldSet = true; - } - if (("ReadExtendedAttributes" == name)) - { - this.readExtendedAttributesField = Enums.ParseYesNoType(value); - this.readExtendedAttributesFieldSet = true; - } - if (("WriteExtendedAttributes" == name)) - { - this.writeExtendedAttributesField = Enums.ParseYesNoType(value); - this.writeExtendedAttributesFieldSet = true; - } - if (("Synchronize" == name)) - { - this.synchronizeField = Enums.ParseYesNoType(value); - this.synchronizeFieldSet = true; - } - if (("CreateFile" == name)) - { - this.createFileField = Enums.ParseYesNoType(value); - this.createFileFieldSet = true; - } - if (("CreateChild" == name)) - { - this.createChildField = Enums.ParseYesNoType(value); - this.createChildFieldSet = true; - } - if (("DeleteChild" == name)) - { - this.deleteChildField = Enums.ParseYesNoType(value); - this.deleteChildFieldSet = true; - } - if (("Traverse" == name)) - { - this.traverseField = Enums.ParseYesNoType(value); - this.traverseFieldSet = true; - } - if (("Append" == name)) - { - this.appendField = Enums.ParseYesNoType(value); - this.appendFieldSet = true; - } - if (("Execute" == name)) - { - this.executeField = Enums.ParseYesNoType(value); - this.executeFieldSet = true; - } - if (("FileAllRights" == name)) - { - this.fileAllRightsField = Enums.ParseYesNoType(value); - this.fileAllRightsFieldSet = true; - } - if (("Write" == name)) - { - this.writeField = Enums.ParseYesNoType(value); - this.writeFieldSet = true; - } - if (("CreateSubkeys" == name)) - { - this.createSubkeysField = Enums.ParseYesNoType(value); - this.createSubkeysFieldSet = true; - } - if (("EnumerateSubkeys" == name)) - { - this.enumerateSubkeysField = Enums.ParseYesNoType(value); - this.enumerateSubkeysFieldSet = true; - } - if (("Notify" == name)) - { - this.notifyField = Enums.ParseYesNoType(value); - this.notifyFieldSet = true; - } - if (("CreateLink" == name)) - { - this.createLinkField = Enums.ParseYesNoType(value); - this.createLinkFieldSet = true; - } - if (("GenericAll" == name)) - { - this.genericAllField = Enums.ParseYesNoType(value); - this.genericAllFieldSet = true; - } - if (("GenericExecute" == name)) - { - this.genericExecuteField = Enums.ParseYesNoType(value); - this.genericExecuteFieldSet = true; - } - if (("GenericWrite" == name)) - { - this.genericWriteField = Enums.ParseYesNoType(value); - this.genericWriteFieldSet = true; - } - if (("GenericRead" == name)) - { - this.genericReadField = Enums.ParseYesNoType(value); - this.genericReadFieldSet = true; - } - } - } - - /// - /// Sets ACLs on File, Registry, or CreateFolder. When under a Registry element, this cannot be used - /// if the Action attribute's value is remove or removeKeyOnInstall. This element is only available - /// when installing with MSI 5.0. For downlevel support, see the PermissionEx element from the - /// WixUtilExtension. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PermissionEx : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string sddlField; - - private bool sddlFieldSet; - - private ISchemaElement parentElement; - - public PermissionEx() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Condition))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Primary key used to identify this particular entry. If this is not specified the parent element's Id attribute - /// will be used instead. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Security descriptor to apply to parent object. - /// - public string Sddl - { - get - { - return this.sddlField; - } - set - { - this.sddlFieldSet = true; - this.sddlField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Condition" == childName)) - { - childValue = new Condition(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PermissionEx", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.sddlFieldSet) - { - writer.WriteAttributeString("Sddl", this.sddlField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Sddl" == name)) - { - this.sddlField = value; - this.sddlFieldSet = true; - } - } - } - - /// - /// Copy or move an existing file on the target machine, or copy a file that is being installed, to another destination. When - /// this element is nested under a File element, the parent file will be installed, then copied to the specified destination - /// if the parent component of the file is selected for installation or removal. When this element is nested under - /// a Component element and no FileId attribute is specified, the file to copy or move must already be on the target machine. - /// When this element is nested under a Component element and the FileId attribute is specified, the specified file is installed, - /// then copied to the specified destination if the parent component is selected for installation or removal (use - /// this option to control the copy of a file in a different component by the parent component's installation state). If the - /// specified destination directory is the same as the directory containing the original file and the name for the proposed source - /// file is the same as the original, then no action takes place. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CopyFile : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string fileIdField; - - private bool fileIdFieldSet; - - private string sourceDirectoryField; - - private bool sourceDirectoryFieldSet; - - private string sourcePropertyField; - - private bool sourcePropertyFieldSet; - - private string sourceNameField; - - private bool sourceNameFieldSet; - - private string destinationDirectoryField; - - private bool destinationDirectoryFieldSet; - - private string destinationPropertyField; - - private bool destinationPropertyFieldSet; - - private string destinationNameField; - - private bool destinationNameFieldSet; - - private string destinationShortNameField; - - private bool destinationShortNameFieldSet; - - private YesNoType deleteField; - - private bool deleteFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary key used to identify this particular entry. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// This attribute cannot be specified if the element is nested under a File element. Set this attribute's value to the identifier - /// of a file from a different component to copy it based on the install state of the parent component. - /// - public string FileId - { - get - { - return this.fileIdField; - } - set - { - this.fileIdFieldSet = true; - this.fileIdField = value; - } - } - - /// - /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set - /// this value to the source directory from which to copy or move an existing file on the target machine. This Directory must - /// exist in the installer database at creation time. This attribute cannot be specified in conjunction with SourceProperty. - /// - public string SourceDirectory - { - get - { - return this.sourceDirectoryField; - } - set - { - this.sourceDirectoryFieldSet = true; - this.sourceDirectoryField = value; - } - } - - /// - /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set - /// this value to a property that will have a value that resolves to the full path of the source directory (or full path - /// including file name if SourceName is not specified). The property does not have to exist in the installer database at - /// creation time; it could be created at installation time by a custom action, on the command line, etc. This attribute - /// cannot be specified in conjunction with SourceDirectory. - /// - public string SourceProperty - { - get - { - return this.sourcePropertyField; - } - set - { - this.sourcePropertyFieldSet = true; - this.sourcePropertyField = value; - } - } - - /// - /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. Set - /// this value to the localizable name of the file(s) to be copied or moved. All of the files that - /// match the wild card will be removed from the specified directory. The value is a filename that may also - /// contain the wild card characters "?" for any single character or "*" for zero or more occurrences of any character. If this - /// attribute is not specified (and this element is not nested under a File element or specify a FileId attribute) then the - /// SourceProperty attribute should be set to the name of a property that will resolve to the full path of the source filename. - /// If the value of this attribute contains a "*" wildcard and the DestinationName attribute is specified, all moved or copied - /// files retain the file names from their sources. - /// - public string SourceName - { - get - { - return this.sourceNameField; - } - set - { - this.sourceNameFieldSet = true; - this.sourceNameField = value; - } - } - - /// - /// Set this value to the destination directory where an existing file on the target machine should be moved or copied to. This - /// Directory must exist in the installer database at creation time. This attribute cannot be specified in conjunction with - /// DestinationProperty. - /// - public string DestinationDirectory - { - get - { - return this.destinationDirectoryField; - } - set - { - this.destinationDirectoryFieldSet = true; - this.destinationDirectoryField = value; - } - } - - /// - /// Set this value to a property that will have a value that resolves to the full path of the destination directory. The property - /// does not have to exist in the installer database at creation time; it could be created at installation time by a custom - /// action, on the command line, etc. This attribute cannot be specified in conjunction with DestinationDirectory. - /// - public string DestinationProperty - { - get - { - return this.destinationPropertyField; - } - set - { - this.destinationPropertyFieldSet = true; - this.destinationPropertyField = value; - } - } - - /// - /// In prior versions of the WiX toolset, this attribute specified the short file name. - /// Now set this value to the localizable name to be given to the original file after it is moved or copied. - /// If this attribute is not specified, then the destination file is given the same name as the source file. - /// If a short file name is specified, the DestinationShortName attribute may not be specified. - /// Also, if this value is a long file name, the DestinationShortName attribute may be omitted to - /// allow WiX to attempt to generate a unique short file name. - /// However, if this name collides with another file or you wish to manually specify - /// the short file name, then the DestinationShortName attribute may be specified. - /// - public string DestinationName - { - get - { - return this.destinationNameField; - } - set - { - this.destinationNameFieldSet = true; - this.destinationNameField = value; - } - } - - /// - /// The short file name of the file in 8.3 format. - /// This attribute should only be set if there is a conflict between generated short file names - /// or you wish to manually specify the short file name. - /// - public string DestinationShortName - { - get - { - return this.destinationShortNameField; - } - set - { - this.destinationShortNameFieldSet = true; - this.destinationShortNameField = value; - } - } - - /// - /// This attribute cannot be specified if the element is nested under a File element or the FileId attribute is specified. In other - /// cases, if the attribute is not specified, the default value is "no" and the file is copied, not moved. Set the value to "yes" - /// in order to move the file (thus deleting the source file) instead of copying it. - /// - public YesNoType Delete - { - get - { - return this.deleteField; - } - set - { - this.deleteFieldSet = true; - this.deleteField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CopyFile", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.fileIdFieldSet) - { - writer.WriteAttributeString("FileId", this.fileIdField); - } - if (this.sourceDirectoryFieldSet) - { - writer.WriteAttributeString("SourceDirectory", this.sourceDirectoryField); - } - if (this.sourcePropertyFieldSet) - { - writer.WriteAttributeString("SourceProperty", this.sourcePropertyField); - } - if (this.sourceNameFieldSet) - { - writer.WriteAttributeString("SourceName", this.sourceNameField); - } - if (this.destinationDirectoryFieldSet) - { - writer.WriteAttributeString("DestinationDirectory", this.destinationDirectoryField); - } - if (this.destinationPropertyFieldSet) - { - writer.WriteAttributeString("DestinationProperty", this.destinationPropertyField); - } - if (this.destinationNameFieldSet) - { - writer.WriteAttributeString("DestinationName", this.destinationNameField); - } - if (this.destinationShortNameFieldSet) - { - writer.WriteAttributeString("DestinationShortName", this.destinationShortNameField); - } - if (this.deleteFieldSet) - { - if ((this.deleteField == YesNoType.no)) - { - writer.WriteAttributeString("Delete", "no"); - } - if ((this.deleteField == YesNoType.yes)) - { - writer.WriteAttributeString("Delete", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("FileId" == name)) - { - this.fileIdField = value; - this.fileIdFieldSet = true; - } - if (("SourceDirectory" == name)) - { - this.sourceDirectoryField = value; - this.sourceDirectoryFieldSet = true; - } - if (("SourceProperty" == name)) - { - this.sourcePropertyField = value; - this.sourcePropertyFieldSet = true; - } - if (("SourceName" == name)) - { - this.sourceNameField = value; - this.sourceNameFieldSet = true; - } - if (("DestinationDirectory" == name)) - { - this.destinationDirectoryField = value; - this.destinationDirectoryFieldSet = true; - } - if (("DestinationProperty" == name)) - { - this.destinationPropertyField = value; - this.destinationPropertyFieldSet = true; - } - if (("DestinationName" == name)) - { - this.destinationNameField = value; - this.destinationNameFieldSet = true; - } - if (("DestinationShortName" == name)) - { - this.destinationShortNameField = value; - this.destinationShortNameFieldSet = true; - } - if (("Delete" == name)) - { - this.deleteField = Enums.ParseYesNoType(value); - this.deleteFieldSet = true; - } - } - } - - /// - /// File specification for File table, must be child node of Component. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class File : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string companionFileField; - - private bool companionFileFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private YesNoType keyPathField; - - private bool keyPathFieldSet; - - private string shortNameField; - - private bool shortNameFieldSet; - - private YesNoType readOnlyField; - - private bool readOnlyFieldSet; - - private YesNoType hiddenField; - - private bool hiddenFieldSet; - - private YesNoType systemField; - - private bool systemFieldSet; - - private YesNoType vitalField; - - private bool vitalFieldSet; - - private YesNoType checksumField; - - private bool checksumFieldSet; - - private YesNoDefaultType compressedField; - - private bool compressedFieldSet; - - private string bindPathField; - - private bool bindPathFieldSet; - - private int selfRegCostField; - - private bool selfRegCostFieldSet; - - private YesNoType trueTypeField; - - private bool trueTypeFieldSet; - - private string fontTitleField; - - private bool fontTitleFieldSet; - - private string defaultLanguageField; - - private bool defaultLanguageFieldSet; - - private int defaultSizeField; - - private bool defaultSizeFieldSet; - - private string defaultVersionField; - - private bool defaultVersionFieldSet; - - private AssemblyType assemblyField; - - private bool assemblyFieldSet; - - private string assemblyManifestField; - - private bool assemblyManifestFieldSet; - - private string assemblyApplicationField; - - private bool assemblyApplicationFieldSet; - - private ProcessorArchitectureType processorArchitectureField; - - private bool processorArchitectureFieldSet; - - private string diskIdField; - - private bool diskIdFieldSet; - - private string sourceField; - - private bool sourceFieldSet; - - private string srcField; - - private bool srcFieldSet; - - private int patchGroupField; - - private bool patchGroupFieldSet; - - private YesNoType patchIgnoreField; - - private bool patchIgnoreFieldSet; - - private YesNoType patchAllowIgnoreOnErrorField; - - private bool patchAllowIgnoreOnErrorFieldSet; - - private YesNoType patchWholeFileField; - - private bool patchWholeFileFieldSet; - - private ISchemaElement parentElement; - - public File() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AssemblyName))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CopyFile))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDriver))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCTranslator))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TypeLib))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// 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]. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Set this attribute to make this file a companion child of another file. The installation - /// state of a companion file depends not on its own file versioning information, but on the versioning of its - /// companion parent. A file that is the key path for its component can not be a companion file (that means - /// this attribute cannot be set if KeyPath="yes" for this file). The Version attribute cannot be set along - /// with this attribute since companion files are not installed based on their own version. - /// - public string CompanionFile - { - get - { - return this.companionFileField; - } - set - { - this.companionFileFieldSet = true; - this.companionFileField = value; - } - } - - /// - /// In prior versions of the WiX toolset, this attribute specified the short file name. - /// This attribute's value may now be either a short or long file name. - /// If a short file name is specified, the ShortName attribute may not be specified. - /// Also, if this value is a long file name, the ShortName attribute may be omitted to - /// allow WiX to attempt to generate a unique short file name. - /// However, if this name collides with another file or you wish to manually specify - /// the short file name, then the ShortName attribute may be specified. - /// Finally, if this attribute is omitted then its default value is the file name portion - /// of the Source attribute, if one is specified, or the value of the Id attribute, if - /// the Source attribute is omitted or doesn't contain a file name. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Set to yes in order to force this file to be the key path for the parent component. - /// - public YesNoType KeyPath - { - get - { - return this.keyPathField; - } - set - { - this.keyPathFieldSet = true; - this.keyPathField = value; - } - } - - /// - /// The short file name of the file in 8.3 format. - /// This attribute should only be set if there is a conflict between generated short file names - /// or the user wants to manually specify the short file name. - /// - public string ShortName - { - get - { - return this.shortNameField; - } - set - { - this.shortNameFieldSet = true; - this.shortNameField = value; - } - } - - /// - /// Set to yes in order to have the file's read-only attribute set when it is installed on the target machine. - /// - public YesNoType ReadOnly - { - get - { - return this.readOnlyField; - } - set - { - this.readOnlyFieldSet = true; - this.readOnlyField = value; - } - } - - /// - /// Set to yes in order to have the file's hidden attribute set when it is installed on the target machine. - /// - public YesNoType Hidden - { - get - { - return this.hiddenField; - } - set - { - this.hiddenFieldSet = true; - this.hiddenField = value; - } - } - - /// - /// Set to yes in order to have the file's system attribute set when it is installed on the target machine. - /// - public YesNoType System - { - get - { - return this.systemField; - } - set - { - this.systemFieldSet = true; - this.systemField = value; - } - } - - /// - /// 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. - /// - public YesNoType Vital - { - get - { - return this.vitalField; - } - set - { - this.vitalFieldSet = true; - this.vitalField = value; - } - } - - /// - /// 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. - /// - public YesNoType Checksum - { - get - { - return this.checksumField; - } - set - { - this.checksumFieldSet = true; - this.checksumField = value; - } - } - - /// - /// Sets the file's source type compression. A setting of "yes" or "no" will override the setting in the Word Count Summary Property. - /// - public YesNoDefaultType Compressed - { - get - { - return this.compressedField; - } - set - { - this.compressedFieldSet = true; - this.compressedField = value; - } - } - - /// - /// 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. - /// - public string BindPath - { - get - { - return this.bindPathField; - } - set - { - this.bindPathFieldSet = true; - this.bindPathField = value; - } - } - - /// - /// 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. - /// - public int SelfRegCost - { - get - { - return this.selfRegCostField; - } - set - { - this.selfRegCostFieldSet = true; - this.selfRegCostField = value; - } - } - - /// - /// 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. - /// - public YesNoType TrueType - { - get - { - return this.trueTypeField; - } - set - { - this.trueTypeFieldSet = true; - this.trueTypeField = value; - } - } - - /// - /// 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. - /// - public string FontTitle - { - get - { - return this.fontTitleField; - } - set - { - this.fontTitleFieldSet = true; - this.fontTitleField = value; - } - } - - /// - /// 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. - /// - public string DefaultLanguage - { - get - { - return this.defaultLanguageField; - } - set - { - this.defaultLanguageFieldSet = true; - this.defaultLanguageField = value; - } - } - - /// - /// 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. - /// - public int DefaultSize - { - get - { - return this.defaultSizeField; - } - set - { - this.defaultSizeFieldSet = true; - this.defaultSizeField = value; - } - } - - /// - /// 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. - /// - public string DefaultVersion - { - get - { - return this.defaultVersionField; - } - set - { - this.defaultVersionFieldSet = true; - this.defaultVersionField = value; - } - } - - /// - /// Specifies if this File is a Win32 Assembly or .NET Assembly that needs to be installed into the - /// Global Assembly Cache (GAC). If the value is '.net' or 'win32', this file must also be the key path of the Component. - /// - public AssemblyType Assembly - { - get - { - return this.assemblyField; - } - set - { - this.assemblyFieldSet = true; - this.assemblyField = value; - } - } - - /// - /// Specifies the file identifier of the manifest file that describes this assembly. - /// The manifest file should be in the same component as the assembly it describes. - /// This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'. - /// - public string AssemblyManifest - { - get - { - return this.assemblyManifestField; - } - set - { - this.assemblyManifestFieldSet = true; - this.assemblyManifestField = value; - } - } - - /// - /// Specifies the file identifier of the application file. This assembly will be isolated - /// to the same directory as the application file. - /// If this attribute is absent, the assembly will be installed to the Global Assembly Cache (GAC). - /// This attribute may only be specified if the Assembly attribute is set to '.net' or 'win32'. - /// - public string AssemblyApplication - { - get - { - return this.assemblyApplicationField; - } - set - { - this.assemblyApplicationFieldSet = true; - this.assemblyApplicationField = value; - } - } - - /// - /// Specifies the architecture for this assembly. This attribute should only be used on .NET Framework 2.0 or higher assemblies. - /// - public ProcessorArchitectureType ProcessorArchitecture - { - get - { - return this.processorArchitectureField; - } - set - { - this.processorArchitectureFieldSet = true; - this.processorArchitectureField = value; - } - } - - /// - /// The value of this attribute should correspond to the Id attribute of a Media - /// element authored elsewhere. By creating this connection between a file and - /// its media, you set the packaging options to the values specified in the Media - /// element (values such as compression level, cab embedding, etc...). Specifying - /// the DiskId attribute on the File element overrides the default DiskId attribute - /// from the parent Component element. If no DiskId attribute is specified, - /// the default is "1". This DiskId attribute is ignored when creating a merge module - /// because merge modules do not have media. - /// - public string DiskId - { - get - { - return this.diskIdField; - } - set - { - this.diskIdFieldSet = true; - this.diskIdField = value; - } - } - - /// - /// 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 - /// - public string Source - { - get - { - return this.sourceField; - } - set - { - this.sourceFieldSet = true; - this.sourceField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string src - { - get - { - return this.srcField; - } - set - { - this.srcFieldSet = true; - this.srcField = value; - } - } - - /// - /// This attribute must be set for patch-added files. Each patch should be assigned a different patch group number. Patch groups - /// numbers must be greater 0 and should be assigned consecutively. For example, the first patch should use PatchGroup='1', the - /// second patch will have PatchGroup='2', etc... - /// - public int PatchGroup - { - get - { - return this.patchGroupField; - } - set - { - this.patchGroupFieldSet = true; - this.patchGroupField = value; - } - } - - /// - /// Prevents the updating of the file that is in fact changed in the upgraded image relative to the target images. - /// - public YesNoType PatchIgnore - { - get - { - return this.patchIgnoreField; - } - set - { - this.patchIgnoreFieldSet = true; - this.patchIgnoreField = value; - } - } - - /// - /// Set to indicate that the patch is non-vital. - /// - public YesNoType PatchAllowIgnoreOnError - { - get - { - return this.patchAllowIgnoreOnErrorField; - } - set - { - this.patchAllowIgnoreOnErrorFieldSet = true; - this.patchAllowIgnoreOnErrorField = value; - } - } - - /// - /// Set if the entire file should be installed rather than creating a binary patch. - /// - public YesNoType PatchWholeFile - { - get - { - return this.patchWholeFileField; - } - set - { - this.patchWholeFileFieldSet = true; - this.patchWholeFileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("AssemblyName" == childName)) - { - childValue = new AssemblyName(); - } - if (("Permission" == childName)) - { - childValue = new Permission(); - } - if (("PermissionEx" == childName)) - { - childValue = new PermissionEx(); - } - if (("CopyFile" == childName)) - { - childValue = new CopyFile(); - } - if (("Shortcut" == childName)) - { - childValue = new Shortcut(); - } - if (("ODBCDriver" == childName)) - { - childValue = new ODBCDriver(); - } - if (("ODBCTranslator" == childName)) - { - childValue = new ODBCTranslator(); - } - if (("SymbolPath" == childName)) - { - childValue = new SymbolPath(); - } - if (("Class" == childName)) - { - childValue = new Class(); - } - if (("AppId" == childName)) - { - childValue = new AppId(); - } - if (("TypeLib" == childName)) - { - childValue = new TypeLib(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a AssemblyType from a string. - /// - public static AssemblyType ParseAssemblyType(string value) - { - AssemblyType parsedValue; - File.TryParseAssemblyType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a AssemblyType from a string. - /// - public static bool TryParseAssemblyType(string value, out AssemblyType parsedValue) - { - parsedValue = AssemblyType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if ((".net" == value)) - { - parsedValue = AssemblyType.net; - } - else - { - if (("no" == value)) - { - parsedValue = AssemblyType.no; - } - else - { - if (("win32" == value)) - { - parsedValue = AssemblyType.win32; - } - else - { - parsedValue = AssemblyType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a ProcessorArchitectureType from a string. - /// - public static ProcessorArchitectureType ParseProcessorArchitectureType(string value) - { - ProcessorArchitectureType parsedValue; - File.TryParseProcessorArchitectureType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ProcessorArchitectureType from a string. - /// - public static bool TryParseProcessorArchitectureType(string value, out ProcessorArchitectureType parsedValue) - { - parsedValue = ProcessorArchitectureType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("msil" == value)) - { - parsedValue = ProcessorArchitectureType.msil; - } - else - { - if (("x86" == value)) - { - parsedValue = ProcessorArchitectureType.x86; - } - else - { - if (("x64" == value)) - { - parsedValue = ProcessorArchitectureType.x64; - } - else - { - if (("ia64" == value)) - { - parsedValue = ProcessorArchitectureType.ia64; - } - else - { - parsedValue = ProcessorArchitectureType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("File", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.companionFileFieldSet) - { - writer.WriteAttributeString("CompanionFile", this.companionFileField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.keyPathFieldSet) - { - if ((this.keyPathField == YesNoType.no)) - { - writer.WriteAttributeString("KeyPath", "no"); - } - if ((this.keyPathField == YesNoType.yes)) - { - writer.WriteAttributeString("KeyPath", "yes"); - } - } - if (this.shortNameFieldSet) - { - writer.WriteAttributeString("ShortName", this.shortNameField); - } - if (this.readOnlyFieldSet) - { - if ((this.readOnlyField == YesNoType.no)) - { - writer.WriteAttributeString("ReadOnly", "no"); - } - if ((this.readOnlyField == YesNoType.yes)) - { - writer.WriteAttributeString("ReadOnly", "yes"); - } - } - if (this.hiddenFieldSet) - { - if ((this.hiddenField == YesNoType.no)) - { - writer.WriteAttributeString("Hidden", "no"); - } - if ((this.hiddenField == YesNoType.yes)) - { - writer.WriteAttributeString("Hidden", "yes"); - } - } - if (this.systemFieldSet) - { - if ((this.systemField == YesNoType.no)) - { - writer.WriteAttributeString("System", "no"); - } - if ((this.systemField == YesNoType.yes)) - { - writer.WriteAttributeString("System", "yes"); - } - } - if (this.vitalFieldSet) - { - if ((this.vitalField == YesNoType.no)) - { - writer.WriteAttributeString("Vital", "no"); - } - if ((this.vitalField == YesNoType.yes)) - { - writer.WriteAttributeString("Vital", "yes"); - } - } - if (this.checksumFieldSet) - { - if ((this.checksumField == YesNoType.no)) - { - writer.WriteAttributeString("Checksum", "no"); - } - if ((this.checksumField == YesNoType.yes)) - { - writer.WriteAttributeString("Checksum", "yes"); - } - } - if (this.compressedFieldSet) - { - if ((this.compressedField == YesNoDefaultType.@default)) - { - writer.WriteAttributeString("Compressed", "default"); - } - if ((this.compressedField == YesNoDefaultType.no)) - { - writer.WriteAttributeString("Compressed", "no"); - } - if ((this.compressedField == YesNoDefaultType.yes)) - { - writer.WriteAttributeString("Compressed", "yes"); - } - } - if (this.bindPathFieldSet) - { - writer.WriteAttributeString("BindPath", this.bindPathField); - } - if (this.selfRegCostFieldSet) - { - writer.WriteAttributeString("SelfRegCost", this.selfRegCostField.ToString(CultureInfo.InvariantCulture)); - } - if (this.trueTypeFieldSet) - { - if ((this.trueTypeField == YesNoType.no)) - { - writer.WriteAttributeString("TrueType", "no"); - } - if ((this.trueTypeField == YesNoType.yes)) - { - writer.WriteAttributeString("TrueType", "yes"); - } - } - if (this.fontTitleFieldSet) - { - writer.WriteAttributeString("FontTitle", this.fontTitleField); - } - if (this.defaultLanguageFieldSet) - { - writer.WriteAttributeString("DefaultLanguage", this.defaultLanguageField); - } - if (this.defaultSizeFieldSet) - { - writer.WriteAttributeString("DefaultSize", this.defaultSizeField.ToString(CultureInfo.InvariantCulture)); - } - if (this.defaultVersionFieldSet) - { - writer.WriteAttributeString("DefaultVersion", this.defaultVersionField); - } - if (this.assemblyFieldSet) - { - if ((this.assemblyField == AssemblyType.net)) - { - writer.WriteAttributeString("Assembly", ".net"); - } - if ((this.assemblyField == AssemblyType.no)) - { - writer.WriteAttributeString("Assembly", "no"); - } - if ((this.assemblyField == AssemblyType.win32)) - { - writer.WriteAttributeString("Assembly", "win32"); - } - } - if (this.assemblyManifestFieldSet) - { - writer.WriteAttributeString("AssemblyManifest", this.assemblyManifestField); - } - if (this.assemblyApplicationFieldSet) - { - writer.WriteAttributeString("AssemblyApplication", this.assemblyApplicationField); - } - if (this.processorArchitectureFieldSet) - { - if ((this.processorArchitectureField == ProcessorArchitectureType.msil)) - { - writer.WriteAttributeString("ProcessorArchitecture", "msil"); - } - if ((this.processorArchitectureField == ProcessorArchitectureType.x86)) - { - writer.WriteAttributeString("ProcessorArchitecture", "x86"); - } - if ((this.processorArchitectureField == ProcessorArchitectureType.x64)) - { - writer.WriteAttributeString("ProcessorArchitecture", "x64"); - } - if ((this.processorArchitectureField == ProcessorArchitectureType.ia64)) - { - writer.WriteAttributeString("ProcessorArchitecture", "ia64"); - } - } - if (this.diskIdFieldSet) - { - writer.WriteAttributeString("DiskId", this.diskIdField); - } - if (this.sourceFieldSet) - { - writer.WriteAttributeString("Source", this.sourceField); - } - if (this.srcFieldSet) - { - writer.WriteAttributeString("src", this.srcField); - } - if (this.patchGroupFieldSet) - { - writer.WriteAttributeString("PatchGroup", this.patchGroupField.ToString(CultureInfo.InvariantCulture)); - } - if (this.patchIgnoreFieldSet) - { - if ((this.patchIgnoreField == YesNoType.no)) - { - writer.WriteAttributeString("PatchIgnore", "no"); - } - if ((this.patchIgnoreField == YesNoType.yes)) - { - writer.WriteAttributeString("PatchIgnore", "yes"); - } - } - if (this.patchAllowIgnoreOnErrorFieldSet) - { - if ((this.patchAllowIgnoreOnErrorField == YesNoType.no)) - { - writer.WriteAttributeString("PatchAllowIgnoreOnError", "no"); - } - if ((this.patchAllowIgnoreOnErrorField == YesNoType.yes)) - { - writer.WriteAttributeString("PatchAllowIgnoreOnError", "yes"); - } - } - if (this.patchWholeFileFieldSet) - { - if ((this.patchWholeFileField == YesNoType.no)) - { - writer.WriteAttributeString("PatchWholeFile", "no"); - } - if ((this.patchWholeFileField == YesNoType.yes)) - { - writer.WriteAttributeString("PatchWholeFile", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("CompanionFile" == name)) - { - this.companionFileField = value; - this.companionFileFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("KeyPath" == name)) - { - this.keyPathField = Enums.ParseYesNoType(value); - this.keyPathFieldSet = true; - } - if (("ShortName" == name)) - { - this.shortNameField = value; - this.shortNameFieldSet = true; - } - if (("ReadOnly" == name)) - { - this.readOnlyField = Enums.ParseYesNoType(value); - this.readOnlyFieldSet = true; - } - if (("Hidden" == name)) - { - this.hiddenField = Enums.ParseYesNoType(value); - this.hiddenFieldSet = true; - } - if (("System" == name)) - { - this.systemField = Enums.ParseYesNoType(value); - this.systemFieldSet = true; - } - if (("Vital" == name)) - { - this.vitalField = Enums.ParseYesNoType(value); - this.vitalFieldSet = true; - } - if (("Checksum" == name)) - { - this.checksumField = Enums.ParseYesNoType(value); - this.checksumFieldSet = true; - } - if (("Compressed" == name)) - { - this.compressedField = Enums.ParseYesNoDefaultType(value); - this.compressedFieldSet = true; - } - if (("BindPath" == name)) - { - this.bindPathField = value; - this.bindPathFieldSet = true; - } - if (("SelfRegCost" == name)) - { - this.selfRegCostField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.selfRegCostFieldSet = true; - } - if (("TrueType" == name)) - { - this.trueTypeField = Enums.ParseYesNoType(value); - this.trueTypeFieldSet = true; - } - if (("FontTitle" == name)) - { - this.fontTitleField = value; - this.fontTitleFieldSet = true; - } - if (("DefaultLanguage" == name)) - { - this.defaultLanguageField = value; - this.defaultLanguageFieldSet = true; - } - if (("DefaultSize" == name)) - { - this.defaultSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.defaultSizeFieldSet = true; - } - if (("DefaultVersion" == name)) - { - this.defaultVersionField = value; - this.defaultVersionFieldSet = true; - } - if (("Assembly" == name)) - { - this.assemblyField = File.ParseAssemblyType(value); - this.assemblyFieldSet = true; - } - if (("AssemblyManifest" == name)) - { - this.assemblyManifestField = value; - this.assemblyManifestFieldSet = true; - } - if (("AssemblyApplication" == name)) - { - this.assemblyApplicationField = value; - this.assemblyApplicationFieldSet = true; - } - if (("ProcessorArchitecture" == name)) - { - this.processorArchitectureField = File.ParseProcessorArchitectureType(value); - this.processorArchitectureFieldSet = true; - } - if (("DiskId" == name)) - { - this.diskIdField = value; - this.diskIdFieldSet = true; - } - if (("Source" == name)) - { - this.sourceField = value; - this.sourceFieldSet = true; - } - if (("src" == name)) - { - this.srcField = value; - this.srcFieldSet = true; - } - if (("PatchGroup" == name)) - { - this.patchGroupField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.patchGroupFieldSet = true; - } - if (("PatchIgnore" == name)) - { - this.patchIgnoreField = Enums.ParseYesNoType(value); - this.patchIgnoreFieldSet = true; - } - if (("PatchAllowIgnoreOnError" == name)) - { - this.patchAllowIgnoreOnErrorField = Enums.ParseYesNoType(value); - this.patchAllowIgnoreOnErrorFieldSet = true; - } - if (("PatchWholeFile" == name)) - { - this.patchWholeFileField = Enums.ParseYesNoType(value); - this.patchWholeFileFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum AssemblyType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// The file is a .NET Framework assembly. - /// - net, - - /// - /// The file is not a .NET Framework or Win32 assembly. This is the default value. - /// - no, - - /// - /// The file is a Win32 assembly. - /// - win32, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ProcessorArchitectureType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// The file is a .NET Framework assembly that is processor-neutral. - /// - msil, - - /// - /// The file is a .NET Framework assembly for the x86 processor. - /// - x86, - - /// - /// The file is a .NET Framework assembly for the x64 processor. - /// - x64, - - /// - /// The file is a .NET Framework assembly for the ia64 processor. - /// - ia64, - } - } - - /// - /// Use several of these elements to specify each registry value in a multiString registry value. This element - /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The - /// values should go in the text area of the MultiStringValue element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MultiStringValue : ISetAttributes, ISchemaElement - { - - private ISchemaElement parentElement; - - private string contentField; - - private bool contentFieldSet; - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Use several of these elements to specify each registry value in a multiString registry value. This element - /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The - /// values should go in the text area of the MultiStringValue element. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MultiStringValue", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - } - - /// - /// Used for organization of child RegistryValue elements or to create a registry key - /// (and optionally remove it during uninstallation). - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegistryKey : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ActionType actionField; - - private bool actionFieldSet; - - private YesNoType forceCreateOnInstallField; - - private bool forceCreateOnInstallFieldSet; - - private YesNoType forceDeleteOnUninstallField; - - private bool forceDeleteOnUninstallFieldSet; - - private string keyField; - - private bool keyFieldSet; - - private RegistryRootType rootField; - - private bool rootFieldSet; - - private ISchemaElement parentElement; - - public RegistryKey() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryKey))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be - /// generated by hashing the parent Component identifier, Root, Key, and Name. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The Action attribute has been deprecated. In most cases, you can simply omit @Action. If you need to force Windows Installer - /// to create an empty key or recursively delete the key, use the ForceCreateOnInstall or ForceDeleteOnUninstall attributes instead. - /// - public ActionType Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// Set this attribute to 'yes' to create an empty key, if absent, when the parent component is installed. - /// This value is needed only to create an empty key with no subkeys or values. Windows Installer creates - /// keys as needed to store subkeys and values. The default is "no". - /// - public YesNoType ForceCreateOnInstall - { - get - { - return this.forceCreateOnInstallField; - } - set - { - this.forceCreateOnInstallFieldSet = true; - this.forceCreateOnInstallField = value; - } - } - - /// - /// Set this attribute to 'yes' to remove the key with all its values and subkeys when the parent component is uninstalled. - /// 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 - /// removes all values and subkeys that it creates, so this option just adds additional overhead to uninstall. - /// The default is "no". - /// - public YesNoType ForceDeleteOnUninstall - { - get - { - return this.forceDeleteOnUninstallField; - } - set - { - this.forceDeleteOnUninstallFieldSet = true; - this.forceDeleteOnUninstallField = value; - } - } - - /// - /// The localizable key for the registry value. - /// If the parent element is a RegistryKey, this value may be omitted to use the - /// path of the parent, or if its specified it will be appended to the path of the parent. - /// - public string Key - { - get - { - return this.keyField; - } - set - { - this.keyFieldSet = true; - this.keyField = value; - } - } - - /// - /// The predefined root key for the registry value. - /// - public RegistryRootType Root - { - get - { - return this.rootField; - } - set - { - this.rootFieldSet = true; - this.rootField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("RegistryKey" == childName)) - { - childValue = new RegistryKey(); - } - if (("RegistryValue" == childName)) - { - childValue = new RegistryValue(); - } - if (("Permission" == childName)) - { - childValue = new Permission(); - } - if (("PermissionEx" == childName)) - { - childValue = new PermissionEx(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a ActionType from a string. - /// - public static ActionType ParseActionType(string value) - { - ActionType parsedValue; - RegistryKey.TryParseActionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ActionType from a string. - /// - public static bool TryParseActionType(string value, out ActionType parsedValue) - { - parsedValue = ActionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("create" == value)) - { - parsedValue = ActionType.create; - } - else - { - if (("createAndRemoveOnUninstall" == value)) - { - parsedValue = ActionType.createAndRemoveOnUninstall; - } - else - { - if (("none" == value)) - { - parsedValue = ActionType.none; - } - else - { - parsedValue = ActionType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegistryKey", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.actionFieldSet) - { - if ((this.actionField == ActionType.create)) - { - writer.WriteAttributeString("Action", "create"); - } - if ((this.actionField == ActionType.createAndRemoveOnUninstall)) - { - writer.WriteAttributeString("Action", "createAndRemoveOnUninstall"); - } - if ((this.actionField == ActionType.none)) - { - writer.WriteAttributeString("Action", "none"); - } - } - if (this.forceCreateOnInstallFieldSet) - { - if ((this.forceCreateOnInstallField == YesNoType.no)) - { - writer.WriteAttributeString("ForceCreateOnInstall", "no"); - } - if ((this.forceCreateOnInstallField == YesNoType.yes)) - { - writer.WriteAttributeString("ForceCreateOnInstall", "yes"); - } - } - if (this.forceDeleteOnUninstallFieldSet) - { - if ((this.forceDeleteOnUninstallField == YesNoType.no)) - { - writer.WriteAttributeString("ForceDeleteOnUninstall", "no"); - } - if ((this.forceDeleteOnUninstallField == YesNoType.yes)) - { - writer.WriteAttributeString("ForceDeleteOnUninstall", "yes"); - } - } - if (this.keyFieldSet) - { - writer.WriteAttributeString("Key", this.keyField); - } - if (this.rootFieldSet) - { - if ((this.rootField == RegistryRootType.HKMU)) - { - writer.WriteAttributeString("Root", "HKMU"); - } - if ((this.rootField == RegistryRootType.HKCR)) - { - writer.WriteAttributeString("Root", "HKCR"); - } - if ((this.rootField == RegistryRootType.HKCU)) - { - writer.WriteAttributeString("Root", "HKCU"); - } - if ((this.rootField == RegistryRootType.HKLM)) - { - writer.WriteAttributeString("Root", "HKLM"); - } - if ((this.rootField == RegistryRootType.HKU)) - { - writer.WriteAttributeString("Root", "HKU"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Action" == name)) - { - this.actionField = RegistryKey.ParseActionType(value); - this.actionFieldSet = true; - } - if (("ForceCreateOnInstall" == name)) - { - this.forceCreateOnInstallField = Enums.ParseYesNoType(value); - this.forceCreateOnInstallFieldSet = true; - } - if (("ForceDeleteOnUninstall" == name)) - { - this.forceDeleteOnUninstallField = Enums.ParseYesNoType(value); - this.forceDeleteOnUninstallFieldSet = true; - } - if (("Key" == name)) - { - this.keyField = value; - this.keyFieldSet = true; - } - if (("Root" == name)) - { - this.rootField = Enums.ParseRegistryRootType(value); - this.rootFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ActionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Creates the key, if absent, when the parent component is installed. - /// - create, - - /// - /// 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. - /// 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 - /// removes all values and subkeys that it creates, so this option just adds additional overhead to uninstall. - /// - createAndRemoveOnUninstall, - - /// - /// Does nothing; this element is used merely in WiX authoring for organization and does nothing to the final output. - /// This is the default value. - /// - none, - } - } - - /// - /// Used to create a registry value. For multi-string values, this can be used to prepend or append values. - /// - /// For legacy authoring: Use several of these elements to specify each registry value in a multiString registry value. This element - /// cannot be used if the Value attribute is specified unless the Type attribute is set to 'multiString'. The - /// values should go in the text area of the RegistryValue element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegistryValue : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private RegistryRootType rootField; - - private bool rootFieldSet; - - private string keyField; - - private bool keyFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private TypeType typeField; - - private bool typeFieldSet; - - private ActionType actionField; - - private bool actionFieldSet; - - private YesNoType keyPathField; - - private bool keyPathFieldSet; - - private ISchemaElement parentElement; - - public RegistryValue() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MultiStringValue))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be - /// generated by hashing the parent Component identifier, Root, Key, and Name. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The predefined root key for the registry value. - /// - public RegistryRootType Root - { - get - { - return this.rootField; - } - set - { - this.rootFieldSet = true; - this.rootField = value; - } - } - - /// - /// The localizable key for the registry value. - /// If the parent element is a RegistryKey, this value may be omitted to use the - /// path of the parent, or if its specified it will be appended to the path of the parent. - /// - public string Key - { - get - { - return this.keyField; - } - set - { - this.keyFieldSet = true; - this.keyField = value; - } - } - - /// - /// The localizable registry value name. If this attribute is not provided the default value for the registry key will - /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not - /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Set this attribute to the localizable registry value. This value is formatted. The Windows Installer allows - /// several special values to be set for this attribute. You should not use them in WiX. Instead use appropriate - /// values in the Type attribute to get the desired behavior. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// Set this attribute to the type of the desired registry key. This attribute must be specified whenever the Value - /// attribute or a child RegistryValue element is specified. This attribute - /// should only be set when the value of the Action attribute does not include the word 'remove'. - /// - public TypeType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - /// - /// This is the action that will be taken for this registry value. - /// - public ActionType Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// Set this attribute to 'yes' to make this registry key the KeyPath of the parent component. - /// Only one resource (registry, file, etc) can be the KeyPath of a component. - /// - public YesNoType KeyPath - { - get - { - return this.keyPathField; - } - set - { - this.keyPathFieldSet = true; - this.keyPathField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Permission" == childName)) - { - childValue = new Permission(); - } - if (("PermissionEx" == childName)) - { - childValue = new PermissionEx(); - } - if (("MultiStringValue" == childName)) - { - childValue = new MultiStringValue(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a TypeType from a string. - /// - public static TypeType ParseTypeType(string value) - { - TypeType parsedValue; - RegistryValue.TryParseTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypeType from a string. - /// - public static bool TryParseTypeType(string value, out TypeType parsedValue) - { - parsedValue = TypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("string" == value)) - { - parsedValue = TypeType.@string; - } - else - { - if (("integer" == value)) - { - parsedValue = TypeType.integer; - } - else - { - if (("binary" == value)) - { - parsedValue = TypeType.binary; - } - else - { - if (("expandable" == value)) - { - parsedValue = TypeType.expandable; - } - else - { - if (("multiString" == value)) - { - parsedValue = TypeType.multiString; - } - else - { - parsedValue = TypeType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - - /// - /// Parses a ActionType from a string. - /// - public static ActionType ParseActionType(string value) - { - ActionType parsedValue; - RegistryValue.TryParseActionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ActionType from a string. - /// - public static bool TryParseActionType(string value, out ActionType parsedValue) - { - parsedValue = ActionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("append" == value)) - { - parsedValue = ActionType.append; - } - else - { - if (("prepend" == value)) - { - parsedValue = ActionType.prepend; - } - else - { - if (("write" == value)) - { - parsedValue = ActionType.write; - } - else - { - parsedValue = ActionType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegistryValue", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.rootFieldSet) - { - if ((this.rootField == RegistryRootType.HKMU)) - { - writer.WriteAttributeString("Root", "HKMU"); - } - if ((this.rootField == RegistryRootType.HKCR)) - { - writer.WriteAttributeString("Root", "HKCR"); - } - if ((this.rootField == RegistryRootType.HKCU)) - { - writer.WriteAttributeString("Root", "HKCU"); - } - if ((this.rootField == RegistryRootType.HKLM)) - { - writer.WriteAttributeString("Root", "HKLM"); - } - if ((this.rootField == RegistryRootType.HKU)) - { - writer.WriteAttributeString("Root", "HKU"); - } - } - if (this.keyFieldSet) - { - writer.WriteAttributeString("Key", this.keyField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.typeFieldSet) - { - if ((this.typeField == TypeType.@string)) - { - writer.WriteAttributeString("Type", "string"); - } - if ((this.typeField == TypeType.integer)) - { - writer.WriteAttributeString("Type", "integer"); - } - if ((this.typeField == TypeType.binary)) - { - writer.WriteAttributeString("Type", "binary"); - } - if ((this.typeField == TypeType.expandable)) - { - writer.WriteAttributeString("Type", "expandable"); - } - if ((this.typeField == TypeType.multiString)) - { - writer.WriteAttributeString("Type", "multiString"); - } - } - if (this.actionFieldSet) - { - if ((this.actionField == ActionType.append)) - { - writer.WriteAttributeString("Action", "append"); - } - if ((this.actionField == ActionType.prepend)) - { - writer.WriteAttributeString("Action", "prepend"); - } - if ((this.actionField == ActionType.write)) - { - writer.WriteAttributeString("Action", "write"); - } - } - if (this.keyPathFieldSet) - { - if ((this.keyPathField == YesNoType.no)) - { - writer.WriteAttributeString("KeyPath", "no"); - } - if ((this.keyPathField == YesNoType.yes)) - { - writer.WriteAttributeString("KeyPath", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Root" == name)) - { - this.rootField = Enums.ParseRegistryRootType(value); - this.rootFieldSet = true; - } - if (("Key" == name)) - { - this.keyField = value; - this.keyFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = RegistryValue.ParseTypeType(value); - this.typeFieldSet = true; - } - if (("Action" == name)) - { - this.actionField = RegistryValue.ParseActionType(value); - this.actionFieldSet = true; - } - if (("KeyPath" == name)) - { - this.keyPathField = Enums.ParseYesNoType(value); - this.keyPathFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum TypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// The value is interpreted and stored as a string (REG_SZ). - /// - @string, - - /// - /// The value is interpreted and stored as an integer (REG_DWORD). - /// - integer, - - /// - /// The value is interpreted and stored as a hexadecimal value (REG_BINARY). - /// - binary, - - /// - /// The value is interpreted and stored as an expandable string (REG_EXPAND_SZ). - /// - expandable, - - /// - /// The value is interpreted and stored as a multiple strings (REG_MULTI_SZ). - /// Please note that this value will only result in a multi-string value if there is more than one registry value - /// or the Action attribute's value is 'append' or 'prepend'. Otherwise a string value will be created. - /// - multiString, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ActionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Appends the specified value(s) to a multiString registry value. - /// - append, - - /// - /// Prepends the specified value(s) to a multiString registry value. - /// - prepend, - - /// - /// Writes a registry value. This is the default value. - /// - write, - } - } - - /// - /// Used for removing registry keys and all child keys either during install or uninstall. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveRegistryKey : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ActionType actionField; - - private bool actionFieldSet; - - private string keyField; - - private bool keyFieldSet; - - private RegistryRootType rootField; - - private bool rootFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be - /// generated by hashing the parent Component identifier, Root, Key, and Name. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// This is the action that will be taken for this registry value. - /// - public ActionType Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// The localizable key for the registry value. - /// - public string Key - { - get - { - return this.keyField; - } - set - { - this.keyFieldSet = true; - this.keyField = value; - } - } - - /// - /// The predefined root key for the registry value. - /// - public RegistryRootType Root - { - get - { - return this.rootField; - } - set - { - this.rootFieldSet = true; - this.rootField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ActionType from a string. - /// - public static ActionType ParseActionType(string value) - { - ActionType parsedValue; - RemoveRegistryKey.TryParseActionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ActionType from a string. - /// - public static bool TryParseActionType(string value, out ActionType parsedValue) - { - parsedValue = ActionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("removeOnInstall" == value)) - { - parsedValue = ActionType.removeOnInstall; - } - else - { - if (("removeOnUninstall" == value)) - { - parsedValue = ActionType.removeOnUninstall; - } - else - { - parsedValue = ActionType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveRegistryKey", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.actionFieldSet) - { - if ((this.actionField == ActionType.removeOnInstall)) - { - writer.WriteAttributeString("Action", "removeOnInstall"); - } - if ((this.actionField == ActionType.removeOnUninstall)) - { - writer.WriteAttributeString("Action", "removeOnUninstall"); - } - } - if (this.keyFieldSet) - { - writer.WriteAttributeString("Key", this.keyField); - } - if (this.rootFieldSet) - { - if ((this.rootField == RegistryRootType.HKMU)) - { - writer.WriteAttributeString("Root", "HKMU"); - } - if ((this.rootField == RegistryRootType.HKCR)) - { - writer.WriteAttributeString("Root", "HKCR"); - } - if ((this.rootField == RegistryRootType.HKCU)) - { - writer.WriteAttributeString("Root", "HKCU"); - } - if ((this.rootField == RegistryRootType.HKLM)) - { - writer.WriteAttributeString("Root", "HKLM"); - } - if ((this.rootField == RegistryRootType.HKU)) - { - writer.WriteAttributeString("Root", "HKU"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Action" == name)) - { - this.actionField = RemoveRegistryKey.ParseActionType(value); - this.actionFieldSet = true; - } - if (("Key" == name)) - { - this.keyField = value; - this.keyFieldSet = true; - } - if (("Root" == name)) - { - this.rootField = Enums.ParseRegistryRootType(value); - this.rootFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ActionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Removes a key with all its values and subkeys when the parent component is installed. - /// - removeOnInstall, - - /// - /// Removes a key with all its values and subkeys when the parent component is uninstalled. - /// - removeOnUninstall, - } - } - - /// - /// Used to remove a registry value during installation. - /// There is no standard way to remove a single registry value during uninstall (but you can remove an entire key with RemoveRegistryKey). - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveRegistryValue : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string keyField; - - private bool keyFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private RegistryRootType rootField; - - private bool rootFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be - /// generated by hashing the parent Component identifier, Root, Key, and Name. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The localizable key for the registry value. - /// If the parent element is a RegistryKey, this value may be omitted to use the - /// path of the parent, or if its specified it will be appended to the path of the parent. - /// - public string Key - { - get - { - return this.keyField; - } - set - { - this.keyFieldSet = true; - this.keyField = value; - } - } - - /// - /// The localizable registry value name. If this attribute is not provided the default value for the registry key will - /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not - /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The predefined root key for the registry value. - /// - public RegistryRootType Root - { - get - { - return this.rootField; - } - set - { - this.rootFieldSet = true; - this.rootField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveRegistryValue", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.keyFieldSet) - { - writer.WriteAttributeString("Key", this.keyField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.rootFieldSet) - { - if ((this.rootField == RegistryRootType.HKMU)) - { - writer.WriteAttributeString("Root", "HKMU"); - } - if ((this.rootField == RegistryRootType.HKCR)) - { - writer.WriteAttributeString("Root", "HKCR"); - } - if ((this.rootField == RegistryRootType.HKCU)) - { - writer.WriteAttributeString("Root", "HKCU"); - } - if ((this.rootField == RegistryRootType.HKLM)) - { - writer.WriteAttributeString("Root", "HKLM"); - } - if ((this.rootField == RegistryRootType.HKU)) - { - writer.WriteAttributeString("Root", "HKU"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Key" == name)) - { - this.keyField = value; - this.keyFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Root" == name)) - { - this.rootField = Enums.ParseRegistryRootType(value); - this.rootFieldSet = true; - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Registry : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ActionType actionField; - - private bool actionFieldSet; - - private string keyField; - - private bool keyFieldSet; - - private YesNoType keyPathField; - - private bool keyPathFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private RegistryRootType rootField; - - private bool rootFieldSet; - - private TypeType typeField; - - private bool typeFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - public Registry() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Registry))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Primary key used to identify this particular entry. If this attribute is not specified, an identifier will be - /// generated by hashing the parent Component identifier, Root, Key, and Name. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// This is the action that will be taken for this registry key. - /// - public ActionType Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// The localizable key for the registry value. - /// - public string Key - { - get - { - return this.keyField; - } - set - { - this.keyFieldSet = true; - this.keyField = value; - } - } - - /// - /// Set this attribute to 'yes' to make this registry key the KeyPath of the parent component. Only one resource (registry, - /// file, etc) can be the KeyPath of a component. - /// - public YesNoType KeyPath - { - get - { - return this.keyPathField; - } - set - { - this.keyPathFieldSet = true; - this.keyPathField = value; - } - } - - /// - /// The localizable registry value name. If this attribute is not provided the default value for the registry key will - /// be set instead. The Windows Installer allows several special values to be set for this attribute. You should not - /// use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The predefined root key for the registry value. - /// - public RegistryRootType Root - { - get - { - return this.rootField; - } - set - { - this.rootFieldSet = true; - this.rootField = value; - } - } - - /// - /// Set this attribute to the type of the desired registry key. This attribute must be specified whenever the Value - /// attribute or a child RegistryValue element is specified. This attribute - /// should only be set when the value of the Action attribute does not include the word 'remove'. - /// - public TypeType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - /// - /// Set this attribute to the localizable registry value. This value is formatted. The Windows Installer allows - /// several special values to be set for this attribute. You should not use them in WiX. Instead use appropriate - /// values in the Type attribute to get the desired behavior. This attribute cannot be specified if the Action - /// attribute's value contains the word 'remove'. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Permission" == childName)) - { - childValue = new Permission(); - } - if (("PermissionEx" == childName)) - { - childValue = new PermissionEx(); - } - if (("RegistryValue" == childName)) - { - childValue = new RegistryValue(); - } - if (("Registry" == childName)) - { - childValue = new Registry(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a ActionType from a string. - /// - public static ActionType ParseActionType(string value) - { - ActionType parsedValue; - Registry.TryParseActionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ActionType from a string. - /// - public static bool TryParseActionType(string value, out ActionType parsedValue) - { - parsedValue = ActionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("append" == value)) - { - parsedValue = ActionType.append; - } - else - { - if (("createKey" == value)) - { - parsedValue = ActionType.createKey; - } - else - { - if (("createKeyAndRemoveKeyOnUninstall" == value)) - { - parsedValue = ActionType.createKeyAndRemoveKeyOnUninstall; - } - else - { - if (("prepend" == value)) - { - parsedValue = ActionType.prepend; - } - else - { - if (("remove" == value)) - { - parsedValue = ActionType.remove; - } - else - { - if (("removeKeyOnInstall" == value)) - { - parsedValue = ActionType.removeKeyOnInstall; - } - else - { - if (("removeKeyOnUninstall" == value)) - { - parsedValue = ActionType.removeKeyOnUninstall; - } - else - { - if (("write" == value)) - { - parsedValue = ActionType.write; - } - else - { - parsedValue = ActionType.IllegalValue; - return false; - } - } - } - } - } - } - } - } - return true; - } - - /// - /// Parses a TypeType from a string. - /// - public static TypeType ParseTypeType(string value) - { - TypeType parsedValue; - Registry.TryParseTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypeType from a string. - /// - public static bool TryParseTypeType(string value, out TypeType parsedValue) - { - parsedValue = TypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("string" == value)) - { - parsedValue = TypeType.@string; - } - else - { - if (("integer" == value)) - { - parsedValue = TypeType.integer; - } - else - { - if (("binary" == value)) - { - parsedValue = TypeType.binary; - } - else - { - if (("expandable" == value)) - { - parsedValue = TypeType.expandable; - } - else - { - if (("multiString" == value)) - { - parsedValue = TypeType.multiString; - } - else - { - parsedValue = TypeType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Registry", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.actionFieldSet) - { - if ((this.actionField == ActionType.append)) - { - writer.WriteAttributeString("Action", "append"); - } - if ((this.actionField == ActionType.createKey)) - { - writer.WriteAttributeString("Action", "createKey"); - } - if ((this.actionField == ActionType.createKeyAndRemoveKeyOnUninstall)) - { - writer.WriteAttributeString("Action", "createKeyAndRemoveKeyOnUninstall"); - } - if ((this.actionField == ActionType.prepend)) - { - writer.WriteAttributeString("Action", "prepend"); - } - if ((this.actionField == ActionType.remove)) - { - writer.WriteAttributeString("Action", "remove"); - } - if ((this.actionField == ActionType.removeKeyOnInstall)) - { - writer.WriteAttributeString("Action", "removeKeyOnInstall"); - } - if ((this.actionField == ActionType.removeKeyOnUninstall)) - { - writer.WriteAttributeString("Action", "removeKeyOnUninstall"); - } - if ((this.actionField == ActionType.write)) - { - writer.WriteAttributeString("Action", "write"); - } - } - if (this.keyFieldSet) - { - writer.WriteAttributeString("Key", this.keyField); - } - if (this.keyPathFieldSet) - { - if ((this.keyPathField == YesNoType.no)) - { - writer.WriteAttributeString("KeyPath", "no"); - } - if ((this.keyPathField == YesNoType.yes)) - { - writer.WriteAttributeString("KeyPath", "yes"); - } - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.rootFieldSet) - { - if ((this.rootField == RegistryRootType.HKMU)) - { - writer.WriteAttributeString("Root", "HKMU"); - } - if ((this.rootField == RegistryRootType.HKCR)) - { - writer.WriteAttributeString("Root", "HKCR"); - } - if ((this.rootField == RegistryRootType.HKCU)) - { - writer.WriteAttributeString("Root", "HKCU"); - } - if ((this.rootField == RegistryRootType.HKLM)) - { - writer.WriteAttributeString("Root", "HKLM"); - } - if ((this.rootField == RegistryRootType.HKU)) - { - writer.WriteAttributeString("Root", "HKU"); - } - } - if (this.typeFieldSet) - { - if ((this.typeField == TypeType.@string)) - { - writer.WriteAttributeString("Type", "string"); - } - if ((this.typeField == TypeType.integer)) - { - writer.WriteAttributeString("Type", "integer"); - } - if ((this.typeField == TypeType.binary)) - { - writer.WriteAttributeString("Type", "binary"); - } - if ((this.typeField == TypeType.expandable)) - { - writer.WriteAttributeString("Type", "expandable"); - } - if ((this.typeField == TypeType.multiString)) - { - writer.WriteAttributeString("Type", "multiString"); - } - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Action" == name)) - { - this.actionField = Registry.ParseActionType(value); - this.actionFieldSet = true; - } - if (("Key" == name)) - { - this.keyField = value; - this.keyFieldSet = true; - } - if (("KeyPath" == name)) - { - this.keyPathField = Enums.ParseYesNoType(value); - this.keyPathFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Root" == name)) - { - this.rootField = Enums.ParseRegistryRootType(value); - this.rootFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = Registry.ParseTypeType(value); - this.typeFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ActionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Appends the specified value(s) to a multiString registry key. - /// - append, - - /// - /// Creates the key, if absent, when the parent component is installed. - /// - createKey, - - /// - /// 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. - /// - createKeyAndRemoveKeyOnUninstall, - - /// - /// Prepends the specified value(s) to a multiString registry key. - /// - prepend, - - /// - /// Removes a registry name when the parent component is installed. - /// - remove, - - /// - /// Removes a key with all its values and subkeys when the parent component is installed. - /// - removeKeyOnInstall, - - /// - /// Removes a key with all its values and subkeys when the parent component is uninstalled. - /// - removeKeyOnUninstall, - - /// - /// Writes a registry value. - /// - write, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum TypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// The value is interpreted and stored as a string (REG_SZ). - /// - @string, - - /// - /// The value is interpreted and stored as an integer (REG_DWORD). - /// - integer, - - /// - /// The value is interpreted and stored as a hexadecimal value (REG_BINARY). - /// - binary, - - /// - /// The value is interpreted and stored as an expandable string (REG_EXPAND_SZ). - /// - expandable, - - /// - /// The value is interpreted and stored as a multiple strings (REG_MULTI_SZ). - /// Please note that this value will only result in a multi-string value if there is more than one registry value - /// or the Action attribute's value is 'append' or 'prepend'. Otherwise a string value will be created. - /// - multiString, - } - } - - /// - /// Remove a file(s) if the parent component is selected for installation or removal. Multiple files can be removed - /// by specifying a wildcard for the value of the Name attribute. By default, the source - /// directory of the file is the directory of the parent component. This can be overridden by specifying the - /// Directory attribute with a value corresponding to the Id of the source directory, or by specifying the Property - /// attribute with a value corresponding to a property that will have a value that resolves to the full path - /// to the source directory. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveFile : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string directoryField; - - private bool directoryFieldSet; - - private string propertyField; - - private bool propertyFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string shortNameField; - - private bool shortNameFieldSet; - - private InstallUninstallType onField; - - private bool onFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary key used to identify this particular entry. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Overrides the directory of the parent component with a specific Directory. This Directory must exist in the - /// installer database at creation time. This attribute cannot be specified in conjunction with the Property attribute. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - /// - /// Overrides the directory of the parent component with the value of the specified property. The property - /// should have a value that resolves to the full path of the source directory. The property does not have - /// to exist in the installer database at creation time; it could be created at installation time by a custom - /// action, on the command line, etc. This attribute cannot be specified in conjunction with the Directory attribute. - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - /// - /// This value should be set to the localizable name of the file(s) to be removed. All of the files that - /// match the wild card will be removed from the specified directory. The value is a filename that may also - /// contain the wild card characters "?" for any single character or "*" for zero or more occurrences of any character. - /// In prior versions of the WiX toolset, this attribute specified the short file name. - /// This attribute's value may now be either a short or long file name. - /// If a short file name is specified, the ShortName attribute may not be specified. - /// Also, if this value is a long file name, the ShortName attribute may be omitted to - /// allow WiX to attempt to generate a unique short file name. - /// However, if you wish to manually specify the short file name, then the ShortName attribute may be specified. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The short file name of the file in 8.3 format. - /// This attribute should only be set if you want to manually specify the short file name. - /// - public string ShortName - { - get - { - return this.shortNameField; - } - set - { - this.shortNameFieldSet = true; - this.shortNameField = value; - } - } - - /// - /// This value determines the time at which the file(s) may be removed. For 'install', the file will - /// be removed only when the parent component is being installed (msiInstallStateLocal or - /// msiInstallStateSource); for 'uninstall', the file will be removed only when the parent component - /// is being removed (msiInstallStateAbsent); for 'both', the file will be removed in both cases. - /// - public InstallUninstallType On - { - get - { - return this.onField; - } - set - { - this.onFieldSet = true; - this.onField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveFile", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.shortNameFieldSet) - { - writer.WriteAttributeString("ShortName", this.shortNameField); - } - if (this.onFieldSet) - { - if ((this.onField == InstallUninstallType.install)) - { - writer.WriteAttributeString("On", "install"); - } - if ((this.onField == InstallUninstallType.uninstall)) - { - writer.WriteAttributeString("On", "uninstall"); - } - if ((this.onField == InstallUninstallType.both)) - { - writer.WriteAttributeString("On", "both"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("ShortName" == name)) - { - this.shortNameField = value; - this.shortNameFieldSet = true; - } - if (("On" == name)) - { - this.onField = Enums.ParseInstallUninstallType(value); - this.onFieldSet = true; - } - } - } - - /// - /// Remove an empty folder if the parent component is selected for installation or removal. By default, the folder - /// is the directory of the parent component. This can be overridden by specifying the Directory attribute - /// with a value corresponding to the Id of the directory, or by specifying the Property attribute with a value - /// corresponding to a property that will have a value that resolves to the full path of the folder. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveFolder : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string directoryField; - - private bool directoryFieldSet; - - private string propertyField; - - private bool propertyFieldSet; - - private InstallUninstallType onField; - - private bool onFieldSet; - - private ISchemaElement parentElement; - - /// - /// Primary key used to identify this particular entry. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Overrides the directory of the parent component with a specific Directory. This Directory must exist in the - /// installer database at creation time. This attribute cannot be specified in conjunction with the Property attribute. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - /// - /// Overrides the directory of the parent component with the value of the specified property. The property - /// should have a value that resolves to the full path of the source directory. The property does not have - /// to exist in the installer database at creation time; it could be created at installation time by a custom - /// action, on the command line, etc. This attribute cannot be specified in conjunction with the Directory attribute. - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - /// - /// This value determines the time at which the folder may be removed, based on the install/uninstall of the parent component. - /// For 'install', the folder will be removed only when the parent component is being installed (msiInstallStateLocal or - /// msiInstallStateSource); for 'uninstall', the folder will be removed only when the parent component - /// is being removed (msiInstallStateAbsent); for 'both', the folder will be removed in both cases. - /// - public InstallUninstallType On - { - get - { - return this.onField; - } - set - { - this.onFieldSet = true; - this.onField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveFolder", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - if (this.onFieldSet) - { - if ((this.onField == InstallUninstallType.install)) - { - writer.WriteAttributeString("On", "install"); - } - if ((this.onField == InstallUninstallType.uninstall)) - { - writer.WriteAttributeString("On", "uninstall"); - } - if ((this.onField == InstallUninstallType.both)) - { - writer.WriteAttributeString("On", "both"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - if (("On" == name)) - { - this.onField = Enums.ParseInstallUninstallType(value); - this.onFieldSet = true; - } - } - } - - /// - /// Create folder as part of parent Component. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CreateFolder : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string directoryField; - - private bool directoryFieldSet; - - private ISchemaElement parentElement; - - public CreateFolder() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Permission))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier of Directory to create. Defaults to Directory of parent Component. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Shortcut" == childName)) - { - childValue = new Shortcut(); - } - if (("Permission" == childName)) - { - childValue = new Permission(); - } - if (("PermissionEx" == childName)) - { - childValue = new PermissionEx(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CreateFolder", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - } - } - - /// - /// Optional way for defining AppData, generally used for complex CDATA. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class AppData : ISetAttributes, ISchemaElement - { - - private ISchemaElement parentElement; - - private string contentField; - - private bool contentFieldSet; - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Optional way for defining AppData, generally used for complex CDATA. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("AppData", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - } - - /// - /// Qualified published component for parent Component - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Category : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string qualifierField; - - private bool qualifierFieldSet; - - private string appDataField; - - private bool appDataFieldSet; - - private string featureField; - - private bool featureFieldSet; - - private ISchemaElement parentElement; - - public Category() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(AppData))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// A string GUID that represents the category of components being grouped together. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// 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. - /// - public string Qualifier - { - get - { - return this.qualifierField; - } - set - { - this.qualifierFieldSet = true; - this.qualifierField = value; - } - } - - /// - /// 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. - /// - public string AppData - { - get - { - return this.appDataField; - } - set - { - this.appDataFieldSet = true; - this.appDataField = value; - } - } - - /// - /// Feature that controls the advertisement of the category. Defaults to the primary Feature for the parent Component . - /// - public string Feature - { - get - { - return this.featureField; - } - set - { - this.featureFieldSet = true; - this.featureField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("AppData" == childName)) - { - childValue = new AppData(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Category", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.qualifierFieldSet) - { - writer.WriteAttributeString("Qualifier", this.qualifierField); - } - if (this.appDataFieldSet) - { - writer.WriteAttributeString("AppData", this.appDataField); - } - if (this.featureFieldSet) - { - writer.WriteAttributeString("Feature", this.featureField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Qualifier" == name)) - { - this.qualifierField = value; - this.qualifierFieldSet = true; - } - if (("AppData" == name)) - { - this.appDataField = value; - this.appDataFieldSet = true; - } - if (("Feature" == name)) - { - this.featureField = value; - this.featureFieldSet = true; - } - } - } - - /// - /// MIME content-type for an Extension - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MIME : ISchemaElement, ISetAttributes - { - - private YesNoType advertiseField; - - private bool advertiseFieldSet; - - private string contentTypeField; - - private bool contentTypeFieldSet; - - private string classField; - - private bool classFieldSet; - - private YesNoType defaultField; - - private bool defaultFieldSet; - - private ISchemaElement parentElement; - - /// - /// 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. - /// - public YesNoType Advertise - { - get - { - return this.advertiseField; - } - set - { - this.advertiseFieldSet = true; - this.advertiseField = value; - } - } - - /// - /// This is the identifier for the MIME content. It is commonly written in the form of type/format. - /// - public string ContentType - { - get - { - return this.contentTypeField; - } - set - { - this.contentTypeFieldSet = true; - this.contentTypeField = value; - } - } - - /// - /// Class ID for the COM server that is to be associated with the MIME content. - /// - public string Class - { - get - { - return this.classField; - } - set - { - this.classFieldSet = true; - this.classField = value; - } - } - - /// - /// If 'yes', become the content type for the parent Extension. The default value is 'no'. - /// - public YesNoType Default - { - get - { - return this.defaultField; - } - set - { - this.defaultFieldSet = true; - this.defaultField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MIME", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.advertiseFieldSet) - { - if ((this.advertiseField == YesNoType.no)) - { - writer.WriteAttributeString("Advertise", "no"); - } - if ((this.advertiseField == YesNoType.yes)) - { - writer.WriteAttributeString("Advertise", "yes"); - } - } - if (this.contentTypeFieldSet) - { - writer.WriteAttributeString("ContentType", this.contentTypeField); - } - if (this.classFieldSet) - { - writer.WriteAttributeString("Class", this.classField); - } - if (this.defaultFieldSet) - { - if ((this.defaultField == YesNoType.no)) - { - writer.WriteAttributeString("Default", "no"); - } - if ((this.defaultField == YesNoType.yes)) - { - writer.WriteAttributeString("Default", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Advertise" == name)) - { - this.advertiseField = Enums.ParseYesNoType(value); - this.advertiseFieldSet = true; - } - if (("ContentType" == name)) - { - this.contentTypeField = value; - this.contentTypeFieldSet = true; - } - if (("Class" == name)) - { - this.classField = value; - this.classFieldSet = true; - } - if (("Default" == name)) - { - this.defaultField = Enums.ParseYesNoType(value); - this.defaultFieldSet = true; - } - } - } - - /// - /// Verb definition for an Extension. When advertised, this element creates a row in the - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Verb : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string commandField; - - private bool commandFieldSet; - - private string argumentField; - - private bool argumentFieldSet; - - private int sequenceField; - - private bool sequenceFieldSet; - - private string targetField; - - private bool targetFieldSet; - - private string targetFileField; - - private bool targetFileFieldSet; - - private string targetPropertyField; - - private bool targetPropertyFieldSet; - - private ISchemaElement parentElement; - - /// - /// The verb for the command. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The localized text displayed on the context menu. - /// - public string Command - { - get - { - return this.commandField; - } - set - { - this.commandFieldSet = true; - this.commandField = value; - } - } - - /// - /// Value for the command arguments. Note that the resolution of properties in the - /// Argument field is limited. A property formatted as [Property] in this field can only be resolved if the property - /// already has the intended value when the component owning the verb is installed. For example, for the argument - /// "[#MyDoc.doc]" to resolve to the correct value, the same process must be installing the file MyDoc.doc and the - /// component that owns the verb. - /// - public string Argument - { - get - { - return this.argumentField; - } - set - { - this.argumentFieldSet = true; - this.argumentField = value; - } - } - - /// - /// The sequence of the commands. Only verbs for which the Sequence is specified - /// are used to prepare an ordered list for the default value of the shell key. The Verb with the lowest value in this - /// column becomes the default verb. Used only for Advertised verbs. - /// - public int Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - public string Target - { - get - { - return this.targetField; - } - set - { - this.targetFieldSet = true; - this.targetField = value; - } - } - - /// - /// Either this attribute or the TargetProperty attribute must be specified for a non-advertised verb. - /// The value should be the identifier of the target file to be executed for the verb. - /// - public string TargetFile - { - get - { - return this.targetFileField; - } - set - { - this.targetFileFieldSet = true; - this.targetFileField = value; - } - } - - /// - /// Either this attribute or the TargetFile attribute must be specified for a non-advertised verb. - /// 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. - /// - public string TargetProperty - { - get - { - return this.targetPropertyField; - } - set - { - this.targetPropertyFieldSet = true; - this.targetPropertyField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Verb", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.commandFieldSet) - { - writer.WriteAttributeString("Command", this.commandField); - } - if (this.argumentFieldSet) - { - writer.WriteAttributeString("Argument", this.argumentField); - } - if (this.sequenceFieldSet) - { - writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); - } - if (this.targetFieldSet) - { - writer.WriteAttributeString("Target", this.targetField); - } - if (this.targetFileFieldSet) - { - writer.WriteAttributeString("TargetFile", this.targetFileField); - } - if (this.targetPropertyFieldSet) - { - writer.WriteAttributeString("TargetProperty", this.targetPropertyField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Command" == name)) - { - this.commandField = value; - this.commandFieldSet = true; - } - if (("Argument" == name)) - { - this.argumentField = value; - this.argumentFieldSet = true; - } - if (("Sequence" == name)) - { - this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sequenceFieldSet = true; - } - if (("Target" == name)) - { - this.targetField = value; - this.targetFieldSet = true; - } - if (("TargetFile" == name)) - { - this.targetFileField = value; - this.targetFileFieldSet = true; - } - if (("TargetProperty" == name)) - { - this.targetPropertyField = value; - this.targetPropertyFieldSet = true; - } - } - } - - /// - /// Extension for a Component - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Extension : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string contentTypeField; - - private bool contentTypeFieldSet; - - private YesNoType advertiseField; - - private bool advertiseFieldSet; - - private ISchemaElement parentElement; - - public Extension() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MIME))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Verb))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// This is simply the file extension, like "doc" or "xml". Do not include the preceding period. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The MIME type that is to be written. - /// - public string ContentType - { - get - { - return this.contentTypeField; - } - set - { - this.contentTypeFieldSet = true; - this.contentTypeField = value; - } - } - - /// - /// Whether this extension is to be advertised. The default is "no". - /// - public YesNoType Advertise - { - get - { - return this.advertiseField; - } - set - { - this.advertiseFieldSet = true; - this.advertiseField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("MIME" == childName)) - { - childValue = new MIME(); - } - if (("Verb" == childName)) - { - childValue = new Verb(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Extension", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.contentTypeFieldSet) - { - writer.WriteAttributeString("ContentType", this.contentTypeField); - } - if (this.advertiseFieldSet) - { - if ((this.advertiseField == YesNoType.no)) - { - writer.WriteAttributeString("Advertise", "no"); - } - if ((this.advertiseField == YesNoType.yes)) - { - writer.WriteAttributeString("Advertise", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("ContentType" == name)) - { - this.contentTypeField = value; - this.contentTypeFieldSet = true; - } - if (("Advertise" == name)) - { - this.advertiseField = Enums.ParseYesNoType(value); - this.advertiseFieldSet = true; - } - } - } - - /// - /// Register a type library (TypeLib). Please note that in order to properly use this - /// non-advertised, you will need use this element with Advertise='no' and also author the - /// appropriate child Interface elements by extracting them from the type library itself. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class TypeLib : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private YesNoType advertiseField; - - private bool advertiseFieldSet; - - private YesNoType controlField; - - private bool controlFieldSet; - - private int costField; - - private bool costFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private YesNoType hasDiskImageField; - - private bool hasDiskImageFieldSet; - - private string helpDirectoryField; - - private bool helpDirectoryFieldSet; - - private YesNoType hiddenField; - - private bool hiddenFieldSet; - - private int languageField; - - private bool languageFieldSet; - - private int majorVersionField; - - private bool majorVersionFieldSet; - - private int minorVersionField; - - private bool minorVersionFieldSet; - - private int resourceIdField; - - private bool resourceIdFieldSet; - - private YesNoType restrictedField; - - private bool restrictedFieldSet; - - private ISchemaElement parentElement; - - public TypeLib() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// The GUID that identifes the type library. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Value of 'yes' will create a row in the TypeLib table. - /// Value of 'no' will create rows in the Registry table. - /// The default value is 'no'. - /// - public YesNoType Advertise - { - get - { - return this.advertiseField; - } - set - { - this.advertiseFieldSet = true; - this.advertiseField = value; - } - } - - /// - /// Value of 'yes' means the type library describes controls, and should not be displayed in type browsers intended for nonvisual objects. - /// This attribute can only be set if Advertise='no'. - /// - public YesNoType Control - { - get - { - return this.controlField; - } - set - { - this.controlFieldSet = true; - this.controlField = value; - } - } - - /// - /// The cost associated with the registration of the type library in bytes. This attribute cannot be set if Advertise='no'. - /// - public int Cost - { - get - { - return this.costField; - } - set - { - this.costFieldSet = true; - this.costField = value; - } - } - - /// - /// The localizable description of the type library. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Value of 'yes' means the type library exists in a persisted form on disk. This attribute can only be set if Advertise='no'. - /// - public YesNoType HasDiskImage - { - get - { - return this.hasDiskImageField; - } - set - { - this.hasDiskImageFieldSet = true; - this.hasDiskImageField = value; - } - } - - /// - /// The identifier of the Directory element for the help directory. - /// - public string HelpDirectory - { - get - { - return this.helpDirectoryField; - } - set - { - this.helpDirectoryFieldSet = true; - this.helpDirectoryField = value; - } - } - - /// - /// Value of 'yes' means the type library should not be displayed to users, although its use is not restricted. - /// Should be used by controls. Hosts should create a new type library that wraps the control with extended properties. - /// This attribute can only be set if Advertise='no'. - /// - public YesNoType Hidden - { - get - { - return this.hiddenField; - } - set - { - this.hiddenFieldSet = true; - this.hiddenField = value; - } - } - - /// - /// The language of the type library. This must be a non-negative integer. - /// - public int Language - { - get - { - return this.languageField; - } - set - { - this.languageFieldSet = true; - this.languageField = value; - } - } - - /// - /// The major version of the type library. The value should be an integer from 0 - 255. - /// - public int MajorVersion - { - get - { - return this.majorVersionField; - } - set - { - this.majorVersionFieldSet = true; - this.majorVersionField = value; - } - } - - /// - /// The minor version of the type library. The value should be an integer from 0 - 255. - /// - public int MinorVersion - { - get - { - return this.minorVersionField; - } - set - { - this.minorVersionFieldSet = true; - this.minorVersionField = value; - } - } - - /// - /// The resource id of a typelib. The value is appended to the end of the typelib path in the registry. - /// - public int ResourceId - { - get - { - return this.resourceIdField; - } - set - { - this.resourceIdFieldSet = true; - this.resourceIdField = value; - } - } - - /// - /// 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'. - /// - public YesNoType Restricted - { - get - { - return this.restrictedField; - } - set - { - this.restrictedFieldSet = true; - this.restrictedField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("AppId" == childName)) - { - childValue = new AppId(); - } - if (("Class" == childName)) - { - childValue = new Class(); - } - if (("Interface" == childName)) - { - childValue = new Interface(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("TypeLib", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.advertiseFieldSet) - { - if ((this.advertiseField == YesNoType.no)) - { - writer.WriteAttributeString("Advertise", "no"); - } - if ((this.advertiseField == YesNoType.yes)) - { - writer.WriteAttributeString("Advertise", "yes"); - } - } - if (this.controlFieldSet) - { - if ((this.controlField == YesNoType.no)) - { - writer.WriteAttributeString("Control", "no"); - } - if ((this.controlField == YesNoType.yes)) - { - writer.WriteAttributeString("Control", "yes"); - } - } - if (this.costFieldSet) - { - writer.WriteAttributeString("Cost", this.costField.ToString(CultureInfo.InvariantCulture)); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.hasDiskImageFieldSet) - { - if ((this.hasDiskImageField == YesNoType.no)) - { - writer.WriteAttributeString("HasDiskImage", "no"); - } - if ((this.hasDiskImageField == YesNoType.yes)) - { - writer.WriteAttributeString("HasDiskImage", "yes"); - } - } - if (this.helpDirectoryFieldSet) - { - writer.WriteAttributeString("HelpDirectory", this.helpDirectoryField); - } - if (this.hiddenFieldSet) - { - if ((this.hiddenField == YesNoType.no)) - { - writer.WriteAttributeString("Hidden", "no"); - } - if ((this.hiddenField == YesNoType.yes)) - { - writer.WriteAttributeString("Hidden", "yes"); - } - } - if (this.languageFieldSet) - { - writer.WriteAttributeString("Language", this.languageField.ToString(CultureInfo.InvariantCulture)); - } - if (this.majorVersionFieldSet) - { - writer.WriteAttributeString("MajorVersion", this.majorVersionField.ToString(CultureInfo.InvariantCulture)); - } - if (this.minorVersionFieldSet) - { - writer.WriteAttributeString("MinorVersion", this.minorVersionField.ToString(CultureInfo.InvariantCulture)); - } - if (this.resourceIdFieldSet) - { - writer.WriteAttributeString("ResourceId", this.resourceIdField.ToString(CultureInfo.InvariantCulture)); - } - if (this.restrictedFieldSet) - { - if ((this.restrictedField == YesNoType.no)) - { - writer.WriteAttributeString("Restricted", "no"); - } - if ((this.restrictedField == YesNoType.yes)) - { - writer.WriteAttributeString("Restricted", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Advertise" == name)) - { - this.advertiseField = Enums.ParseYesNoType(value); - this.advertiseFieldSet = true; - } - if (("Control" == name)) - { - this.controlField = Enums.ParseYesNoType(value); - this.controlFieldSet = true; - } - if (("Cost" == name)) - { - this.costField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.costFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("HasDiskImage" == name)) - { - this.hasDiskImageField = Enums.ParseYesNoType(value); - this.hasDiskImageFieldSet = true; - } - if (("HelpDirectory" == name)) - { - this.helpDirectoryField = value; - this.helpDirectoryFieldSet = true; - } - if (("Hidden" == name)) - { - this.hiddenField = Enums.ParseYesNoType(value); - this.hiddenFieldSet = true; - } - if (("Language" == name)) - { - this.languageField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.languageFieldSet = true; - } - if (("MajorVersion" == name)) - { - this.majorVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.majorVersionFieldSet = true; - } - if (("MinorVersion" == name)) - { - this.minorVersionField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.minorVersionFieldSet = true; - } - if (("ResourceId" == name)) - { - this.resourceIdField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.resourceIdFieldSet = true; - } - if (("Restricted" == name)) - { - this.restrictedField = Enums.ParseYesNoType(value); - this.restrictedFieldSet = true; - } - } - } - - /// - /// ProgId registration for parent Component. If ProgId has an associated Class, it must be a child of that element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ProgId : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string iconField; - - private bool iconFieldSet; - - private int iconIndexField; - - private bool iconIndexFieldSet; - - private YesNoType advertiseField; - - private bool advertiseFieldSet; - - private string noOpenField; - - private bool noOpenFieldSet; - - private ISchemaElement parentElement; - - public ProgId() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ProgId))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Extension))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// 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. - /// - public string Icon - { - get - { - return this.iconField; - } - set - { - this.iconFieldSet = true; - this.iconField = value; - } - } - - public int IconIndex - { - get - { - return this.iconIndexField; - } - set - { - this.iconIndexFieldSet = true; - this.iconIndexField = value; - } - } - - public YesNoType Advertise - { - get - { - return this.advertiseField; - } - set - { - this.advertiseFieldSet = true; - this.advertiseField = value; - } - } - - /// - /// 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. - /// - public string NoOpen - { - get - { - return this.noOpenField; - } - set - { - this.noOpenFieldSet = true; - this.noOpenField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ProgId" == childName)) - { - childValue = new ProgId(); - } - if (("Extension" == childName)) - { - childValue = new Extension(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ProgId", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.iconFieldSet) - { - writer.WriteAttributeString("Icon", this.iconField); - } - if (this.iconIndexFieldSet) - { - writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture)); - } - if (this.advertiseFieldSet) - { - if ((this.advertiseField == YesNoType.no)) - { - writer.WriteAttributeString("Advertise", "no"); - } - if ((this.advertiseField == YesNoType.yes)) - { - writer.WriteAttributeString("Advertise", "yes"); - } - } - if (this.noOpenFieldSet) - { - writer.WriteAttributeString("NoOpen", this.noOpenField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("Icon" == name)) - { - this.iconField = value; - this.iconFieldSet = true; - } - if (("IconIndex" == name)) - { - this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.iconIndexFieldSet = true; - } - if (("Advertise" == name)) - { - this.advertiseField = Enums.ParseYesNoType(value); - this.advertiseFieldSet = true; - } - if (("NoOpen" == name)) - { - this.noOpenField = value; - this.noOpenFieldSet = true; - } - } - } - - /// - /// Application ID containing DCOM information for the associated application GUID. - /// If this element is nested under a Fragment, Module, or Package element, it must be - /// advertised. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class AppId : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private YesNoType activateAtStorageField; - - private bool activateAtStorageFieldSet; - - private YesNoType advertiseField; - - private bool advertiseFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string dllSurrogateField; - - private bool dllSurrogateFieldSet; - - private string idField; - - private bool idFieldSet; - - private string localServiceField; - - private bool localServiceFieldSet; - - private string remoteServerNameField; - - private bool remoteServerNameFieldSet; - - private YesNoType runAsInteractiveUserField; - - private bool runAsInteractiveUserFieldSet; - - private string serviceParametersField; - - private bool serviceParametersFieldSet; - - private ISchemaElement parentElement; - - public AppId() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Set this value to 'yes' to configure the client to activate on the same system as persistent storage. - /// - public YesNoType ActivateAtStorage - { - get - { - return this.activateAtStorageField; - } - set - { - this.activateAtStorageFieldSet = true; - this.activateAtStorageField = value; - } - } - - /// - /// Set this value to 'yes' in order to create a normal AppId table row. Set this value to 'no' in order to - /// generate Registry rows that perform similar registration (without the often problematic Windows Installer - /// advertising behavior). - /// - public YesNoType Advertise - { - get - { - return this.advertiseField; - } - set - { - this.advertiseFieldSet = true; - this.advertiseField = value; - } - } - - /// - /// Set this value to the description of the AppId. It can only be specified when the AppId is not being advertised. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Set this value to specify that the class is a DLL that is to be activated in a surrogate EXE - /// process, and the surrogate process to be used is the path of a surrogate EXE file specified by the value. - /// - public string DllSurrogate - { - get - { - return this.dllSurrogateField; - } - set - { - this.dllSurrogateFieldSet = true; - this.dllSurrogateField = value; - } - } - - /// - /// Set this value to the AppID GUID that corresponds to the named executable. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Set this value to the name of a service to allow the object to be installed as a Win32 service. - /// - public string LocalService - { - get - { - return this.localServiceField; - } - set - { - this.localServiceFieldSet = true; - this.localServiceField = value; - } - } - - /// - /// Set this value to the name of the remote server to configure the client to request the object - /// be run at a particular machine whenever an activation function is called for which a COSERVERINFO - /// structure is not specified. - /// - public string RemoteServerName - { - get - { - return this.remoteServerNameField; - } - set - { - this.remoteServerNameFieldSet = true; - this.remoteServerNameField = value; - } - } - - /// - /// Set this value to 'yes' to configure a class to run under the identity of the user currently - /// logged on and connected to the interactive desktop when activated by a remote client without - /// being written as a Win32 service. - /// - public YesNoType RunAsInteractiveUser - { - get - { - return this.runAsInteractiveUserField; - } - set - { - this.runAsInteractiveUserFieldSet = true; - this.runAsInteractiveUserField = value; - } - } - - /// - /// Set this value to the parameters to be passed to a LocalService on invocation. - /// - public string ServiceParameters - { - get - { - return this.serviceParametersField; - } - set - { - this.serviceParametersFieldSet = true; - this.serviceParametersField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Class" == childName)) - { - childValue = new Class(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("AppId", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.activateAtStorageFieldSet) - { - if ((this.activateAtStorageField == YesNoType.no)) - { - writer.WriteAttributeString("ActivateAtStorage", "no"); - } - if ((this.activateAtStorageField == YesNoType.yes)) - { - writer.WriteAttributeString("ActivateAtStorage", "yes"); - } - } - if (this.advertiseFieldSet) - { - if ((this.advertiseField == YesNoType.no)) - { - writer.WriteAttributeString("Advertise", "no"); - } - if ((this.advertiseField == YesNoType.yes)) - { - writer.WriteAttributeString("Advertise", "yes"); - } - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.dllSurrogateFieldSet) - { - writer.WriteAttributeString("DllSurrogate", this.dllSurrogateField); - } - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.localServiceFieldSet) - { - writer.WriteAttributeString("LocalService", this.localServiceField); - } - if (this.remoteServerNameFieldSet) - { - writer.WriteAttributeString("RemoteServerName", this.remoteServerNameField); - } - if (this.runAsInteractiveUserFieldSet) - { - if ((this.runAsInteractiveUserField == YesNoType.no)) - { - writer.WriteAttributeString("RunAsInteractiveUser", "no"); - } - if ((this.runAsInteractiveUserField == YesNoType.yes)) - { - writer.WriteAttributeString("RunAsInteractiveUser", "yes"); - } - } - if (this.serviceParametersFieldSet) - { - writer.WriteAttributeString("ServiceParameters", this.serviceParametersField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("ActivateAtStorage" == name)) - { - this.activateAtStorageField = Enums.ParseYesNoType(value); - this.activateAtStorageFieldSet = true; - } - if (("Advertise" == name)) - { - this.advertiseField = Enums.ParseYesNoType(value); - this.advertiseFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("DllSurrogate" == name)) - { - this.dllSurrogateField = value; - this.dllSurrogateFieldSet = true; - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("LocalService" == name)) - { - this.localServiceField = value; - this.localServiceFieldSet = true; - } - if (("RemoteServerName" == name)) - { - this.remoteServerNameField = value; - this.remoteServerNameFieldSet = true; - } - if (("RunAsInteractiveUser" == name)) - { - this.runAsInteractiveUserField = Enums.ParseYesNoType(value); - this.runAsInteractiveUserFieldSet = true; - } - if (("ServiceParameters" == name)) - { - this.serviceParametersField = value; - this.serviceParametersFieldSet = true; - } - } - } - - /// - /// COM Class registration for parent Component. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Class : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ContextType contextField; - - private bool contextFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string appIdField; - - private bool appIdFieldSet; - - private string iconField; - - private bool iconFieldSet; - - private int iconIndexField; - - private bool iconIndexFieldSet; - - private string handlerField; - - private bool handlerFieldSet; - - private string argumentField; - - private bool argumentFieldSet; - - private YesNoType relativePathField; - - private bool relativePathFieldSet; - - private YesNoType advertiseField; - - private bool advertiseFieldSet; - - private ThreadingModelType threadingModelField; - - private bool threadingModelFieldSet; - - private string versionField; - - private bool versionFieldSet; - - private YesNoType insertableField; - - private bool insertableFieldSet; - - private YesNoType programmableField; - - private bool programmableFieldSet; - - private string foreignServerField; - - private bool foreignServerFieldSet; - - private string serverField; - - private bool serverFieldSet; - - private YesNoType shortPathField; - - private bool shortPathFieldSet; - - private YesNoType safeForScriptingField; - - private bool safeForScriptingFieldSet; - - private YesNoType safeForInitializingField; - - private bool safeForInitializingFieldSet; - - private YesNoType controlField; - - private bool controlFieldSet; - - private ISchemaElement parentElement; - - public Class() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgId))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileTypeMask))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// The Class identifier (CLSID) of a COM server. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The server context(s) for this COM server. This attribute is optional for VB6 libraries that are marked "PublicNotCreateable". - /// Class elements marked Advertised must specify at least one server context. It is most common for there to be a single value - /// for the Context attribute. - /// - public ContextType Context - { - get - { - return this.contextField; - } - set - { - this.contextFieldSet = true; - this.contextField = value; - } - } - - /// - /// Localized description associated with the Class ID and Program ID. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// This attribute is only allowed when a Class is advertised. Using this attribute will reference an Application ID - /// containing DCOM information for the associated application GUID. The value must correspond to an AppId/@Id of an - /// AppId element nested under a Fragment, Module, or Package element. To associate an AppId with a non-advertised - /// class, nest the class within a parent AppId element. - /// - public string AppId - { - get - { - return this.appIdField; - } - set - { - this.appIdFieldSet = true; - this.appIdField = value; - } - } - - /// - /// The file providing the icon associated with this CLSID. Reference to an Icon element - /// (should match the Id attribute of an Icon element). This is currently not supported if the - /// value of the Advertise attribute is "no". - /// - public string Icon - { - get - { - return this.iconField; - } - set - { - this.iconFieldSet = true; - this.iconField = value; - } - } - - /// - /// Icon index into the icon file. - /// - public int IconIndex - { - get - { - return this.iconIndexField; - } - set - { - this.iconIndexFieldSet = true; - this.iconIndexField = value; - } - } - - /// - /// The default inproc handler. May be optionally provided only for Context = LocalServer or - /// LocalServer32. Value of "1" creates a 16-bit InprocHandler (appearing as the InprocHandler - /// value). Value of "2" creates a 32-bit InprocHandler (appearing as the InprocHandler32 value). - /// Value of "3" creates 16-bit as well as 32-bit InprocHandlers. A non-numeric value is treated - /// as a system file that serves as the 32-bit InprocHandler (appearing as the InprocHandler32 value). - /// - public string Handler - { - get - { - return this.handlerField; - } - set - { - this.handlerFieldSet = true; - this.handlerField = value; - } - } - - /// - /// This column is optional only when the Context column is set to "LocalServer" - /// or "LocalServer32" server context. The text is registered as the argument against - /// the OLE server and is used by OLE for invoking the server. Note that the resolution - /// of properties in the Argument field is limited. A property formatted as [Property] in - /// this field can only be resolved if the property already has the intended value when - /// the component owning the class is installed. For example, for the argument "[#MyDoc.doc]" - /// to resolve to the correct value, the same process must be installing the file MyDoc.doc and the - /// component that owns the class. - /// - public string Argument - { - get - { - return this.argumentField; - } - set - { - this.argumentFieldSet = true; - this.argumentField = value; - } - } - - /// - /// When the value is "yes", the bare file name can be used for COM servers. The installer - /// registers the file name only instead of the complete path. This enables the server in - /// the current directory to take precedence and allows multiple copies of the same component. - /// - public YesNoType RelativePath - { - get - { - return this.relativePathField; - } - set - { - this.relativePathFieldSet = true; - this.relativePathField = value; - } - } - - /// - /// Set this value to "yes" in order to create a normal Class table row. Set this value to - /// "no" in order to generate Registry rows that perform similar registration (without the - /// often problematic Windows Installer advertising behavior). - /// - public YesNoType Advertise - { - get - { - return this.advertiseField; - } - set - { - this.advertiseFieldSet = true; - this.advertiseField = value; - } - } - - /// - /// Threading model for the CLSID. - /// - public ThreadingModelType ThreadingModel - { - get - { - return this.threadingModelField; - } - set - { - this.threadingModelFieldSet = true; - this.threadingModelField = value; - } - } - - /// - /// Version for the CLSID. - /// - public string Version - { - get - { - return this.versionField; - } - set - { - this.versionFieldSet = true; - this.versionField = value; - } - } - - /// - /// Specifies the CLSID may be insertable. - /// - public YesNoType Insertable - { - get - { - return this.insertableField; - } - set - { - this.insertableFieldSet = true; - this.insertableField = value; - } - } - - /// - /// Specifies the CLSID may be programmable. - /// - public YesNoType Programmable - { - get - { - return this.programmableField; - } - set - { - this.programmableFieldSet = true; - this.programmableField = value; - } - } - - /// - /// May only be specified if the value of the Advertise attribute is "no" and Server has not been specified. In addition, it may only - /// be used when the Class element is directly under the Component element. The value can be - /// that of an registry type (REG_SZ). This attribute should be used to specify foreign servers, such as mscoree.dll if needed. - /// - public string ForeignServer - { - get - { - return this.foreignServerField; - } - set - { - this.foreignServerFieldSet = true; - this.foreignServerField = value; - } - } - - /// - /// May only be specified if the value of the Advertise attribute is "no" and the ForeignServer attribute is not specified. File Id of the - /// COM server file. If this element is nested under a File element, this value defaults to - /// the value of the parent File/@Id. - /// - public string Server - { - get - { - return this.serverField; - } - set - { - this.serverFieldSet = true; - this.serverField = value; - } - } - - /// - /// 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. - /// - public YesNoType ShortPath - { - get - { - return this.shortPathField; - } - set - { - this.shortPathFieldSet = true; - this.shortPathField = value; - } - } - - /// - /// May only be specified if the value of the Advertise attribute is "no". - /// - public YesNoType SafeForScripting - { - get - { - return this.safeForScriptingField; - } - set - { - this.safeForScriptingFieldSet = true; - this.safeForScriptingField = value; - } - } - - /// - /// May only be specified if the value of the Advertise attribute is "no". - /// - public YesNoType SafeForInitializing - { - get - { - return this.safeForInitializingField; - } - set - { - this.safeForInitializingFieldSet = true; - this.safeForInitializingField = value; - } - } - - /// - /// Set this attribute's value to 'yes' to identify an object as an ActiveX Control. The default value is 'no'. - /// - public YesNoType Control - { - get - { - return this.controlField; - } - set - { - this.controlFieldSet = true; - this.controlField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ProgId" == childName)) - { - childValue = new ProgId(); - } - if (("FileTypeMask" == childName)) - { - childValue = new FileTypeMask(); - } - if (("Interface" == childName)) - { - childValue = new Interface(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Tries to parse a ContextType from a string. - /// - public static bool TryParseContextType(string value, out ContextType parsedValue) - { - parsedValue = ContextType.None; - if (string.IsNullOrEmpty(value)) - { - return false; - } - string[] splitValue = value.Split(" \t\r\n".ToCharArray(), System.StringSplitOptions.RemoveEmptyEntries); - for (System.Collections.IEnumerator enumerator = splitValue.GetEnumerator(); enumerator.MoveNext(); - ) - { - string currentValue = ((string)(enumerator.Current)); - if (("LocalServer" == currentValue)) - { - parsedValue = (parsedValue | ContextType.LocalServer); - } - else - { - if (("LocalServer32" == currentValue)) - { - parsedValue = (parsedValue | ContextType.LocalServer32); - } - else - { - if (("InprocServer" == currentValue)) - { - parsedValue = (parsedValue | ContextType.InprocServer); - } - else - { - if (("InprocServer32" == currentValue)) - { - parsedValue = (parsedValue | ContextType.InprocServer32); - } - else - { - parsedValue = ContextType.None; - return false; - } - } - } - } - } - return true; - } - - /// - /// Parses a ThreadingModelType from a string. - /// - public static ThreadingModelType ParseThreadingModelType(string value) - { - ThreadingModelType parsedValue; - Class.TryParseThreadingModelType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ThreadingModelType from a string. - /// - public static bool TryParseThreadingModelType(string value, out ThreadingModelType parsedValue) - { - parsedValue = ThreadingModelType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("apartment" == value)) - { - parsedValue = ThreadingModelType.apartment; - } - else - { - if (("free" == value)) - { - parsedValue = ThreadingModelType.free; - } - else - { - if (("both" == value)) - { - parsedValue = ThreadingModelType.both; - } - else - { - if (("neutral" == value)) - { - parsedValue = ThreadingModelType.neutral; - } - else - { - if (("single" == value)) - { - parsedValue = ThreadingModelType.single; - } - else - { - if (("rental" == value)) - { - parsedValue = ThreadingModelType.rental; - } - else - { - parsedValue = ThreadingModelType.IllegalValue; - return false; - } - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Class", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.contextFieldSet) - { - string outputValue = ""; - if (((this.contextField & ContextType.LocalServer) - != 0)) - { - if ((outputValue.Length != 0)) - { - outputValue = (outputValue + " "); - } - outputValue = (outputValue + "LocalServer"); - } - if (((this.contextField & ContextType.LocalServer32) - != 0)) - { - if ((outputValue.Length != 0)) - { - outputValue = (outputValue + " "); - } - outputValue = (outputValue + "LocalServer32"); - } - if (((this.contextField & ContextType.InprocServer) - != 0)) - { - if ((outputValue.Length != 0)) - { - outputValue = (outputValue + " "); - } - outputValue = (outputValue + "InprocServer"); - } - if (((this.contextField & ContextType.InprocServer32) - != 0)) - { - if ((outputValue.Length != 0)) - { - outputValue = (outputValue + " "); - } - outputValue = (outputValue + "InprocServer32"); - } - writer.WriteAttributeString("Context", outputValue); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.appIdFieldSet) - { - writer.WriteAttributeString("AppId", this.appIdField); - } - if (this.iconFieldSet) - { - writer.WriteAttributeString("Icon", this.iconField); - } - if (this.iconIndexFieldSet) - { - writer.WriteAttributeString("IconIndex", this.iconIndexField.ToString(CultureInfo.InvariantCulture)); - } - if (this.handlerFieldSet) - { - writer.WriteAttributeString("Handler", this.handlerField); - } - if (this.argumentFieldSet) - { - writer.WriteAttributeString("Argument", this.argumentField); - } - if (this.relativePathFieldSet) - { - if ((this.relativePathField == YesNoType.no)) - { - writer.WriteAttributeString("RelativePath", "no"); - } - if ((this.relativePathField == YesNoType.yes)) - { - writer.WriteAttributeString("RelativePath", "yes"); - } - } - if (this.advertiseFieldSet) - { - if ((this.advertiseField == YesNoType.no)) - { - writer.WriteAttributeString("Advertise", "no"); - } - if ((this.advertiseField == YesNoType.yes)) - { - writer.WriteAttributeString("Advertise", "yes"); - } - } - if (this.threadingModelFieldSet) - { - if ((this.threadingModelField == ThreadingModelType.apartment)) - { - writer.WriteAttributeString("ThreadingModel", "apartment"); - } - if ((this.threadingModelField == ThreadingModelType.free)) - { - writer.WriteAttributeString("ThreadingModel", "free"); - } - if ((this.threadingModelField == ThreadingModelType.both)) - { - writer.WriteAttributeString("ThreadingModel", "both"); - } - if ((this.threadingModelField == ThreadingModelType.neutral)) - { - writer.WriteAttributeString("ThreadingModel", "neutral"); - } - if ((this.threadingModelField == ThreadingModelType.single)) - { - writer.WriteAttributeString("ThreadingModel", "single"); - } - if ((this.threadingModelField == ThreadingModelType.rental)) - { - writer.WriteAttributeString("ThreadingModel", "rental"); - } - } - if (this.versionFieldSet) - { - writer.WriteAttributeString("Version", this.versionField); - } - if (this.insertableFieldSet) - { - if ((this.insertableField == YesNoType.no)) - { - writer.WriteAttributeString("Insertable", "no"); - } - if ((this.insertableField == YesNoType.yes)) - { - writer.WriteAttributeString("Insertable", "yes"); - } - } - if (this.programmableFieldSet) - { - if ((this.programmableField == YesNoType.no)) - { - writer.WriteAttributeString("Programmable", "no"); - } - if ((this.programmableField == YesNoType.yes)) - { - writer.WriteAttributeString("Programmable", "yes"); - } - } - if (this.foreignServerFieldSet) - { - writer.WriteAttributeString("ForeignServer", this.foreignServerField); - } - if (this.serverFieldSet) - { - writer.WriteAttributeString("Server", this.serverField); - } - if (this.shortPathFieldSet) - { - if ((this.shortPathField == YesNoType.no)) - { - writer.WriteAttributeString("ShortPath", "no"); - } - if ((this.shortPathField == YesNoType.yes)) - { - writer.WriteAttributeString("ShortPath", "yes"); - } - } - if (this.safeForScriptingFieldSet) - { - if ((this.safeForScriptingField == YesNoType.no)) - { - writer.WriteAttributeString("SafeForScripting", "no"); - } - if ((this.safeForScriptingField == YesNoType.yes)) - { - writer.WriteAttributeString("SafeForScripting", "yes"); - } - } - if (this.safeForInitializingFieldSet) - { - if ((this.safeForInitializingField == YesNoType.no)) - { - writer.WriteAttributeString("SafeForInitializing", "no"); - } - if ((this.safeForInitializingField == YesNoType.yes)) - { - writer.WriteAttributeString("SafeForInitializing", "yes"); - } - } - if (this.controlFieldSet) - { - if ((this.controlField == YesNoType.no)) - { - writer.WriteAttributeString("Control", "no"); - } - if ((this.controlField == YesNoType.yes)) - { - writer.WriteAttributeString("Control", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Context" == name)) - { - Class.TryParseContextType(value, out this.contextField); - this.contextFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("AppId" == name)) - { - this.appIdField = value; - this.appIdFieldSet = true; - } - if (("Icon" == name)) - { - this.iconField = value; - this.iconFieldSet = true; - } - if (("IconIndex" == name)) - { - this.iconIndexField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.iconIndexFieldSet = true; - } - if (("Handler" == name)) - { - this.handlerField = value; - this.handlerFieldSet = true; - } - if (("Argument" == name)) - { - this.argumentField = value; - this.argumentFieldSet = true; - } - if (("RelativePath" == name)) - { - this.relativePathField = Enums.ParseYesNoType(value); - this.relativePathFieldSet = true; - } - if (("Advertise" == name)) - { - this.advertiseField = Enums.ParseYesNoType(value); - this.advertiseFieldSet = true; - } - if (("ThreadingModel" == name)) - { - this.threadingModelField = Class.ParseThreadingModelType(value); - this.threadingModelFieldSet = true; - } - if (("Version" == name)) - { - this.versionField = value; - this.versionFieldSet = true; - } - if (("Insertable" == name)) - { - this.insertableField = Enums.ParseYesNoType(value); - this.insertableFieldSet = true; - } - if (("Programmable" == name)) - { - this.programmableField = Enums.ParseYesNoType(value); - this.programmableFieldSet = true; - } - if (("ForeignServer" == name)) - { - this.foreignServerField = value; - this.foreignServerFieldSet = true; - } - if (("Server" == name)) - { - this.serverField = value; - this.serverFieldSet = true; - } - if (("ShortPath" == name)) - { - this.shortPathField = Enums.ParseYesNoType(value); - this.shortPathFieldSet = true; - } - if (("SafeForScripting" == name)) - { - this.safeForScriptingField = Enums.ParseYesNoType(value); - this.safeForScriptingFieldSet = true; - } - if (("SafeForInitializing" == name)) - { - this.safeForInitializingField = Enums.ParseYesNoType(value); - this.safeForInitializingFieldSet = true; - } - if (("Control" == name)) - { - this.controlField = Enums.ParseYesNoType(value); - this.controlFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - [Flags()] - public enum ContextType - { - - None = 0, - - /// - /// A 16-bit local server application. - /// - LocalServer = 1, - - /// - /// A 32-bit local server application. - /// - LocalServer32 = 2, - - /// - /// A 16-bit in-process server DLL. - /// - InprocServer = 4, - - /// - /// A 32-bit in-process server DLL. - /// - InprocServer32 = 8, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ThreadingModelType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - apartment, - - free, - - both, - - neutral, - - single, - - rental, - } - } - - /// - /// COM Interface registration for parent TypeLib. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Interface : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string baseInterfaceField; - - private bool baseInterfaceFieldSet; - - private string proxyStubClassIdField; - - private bool proxyStubClassIdFieldSet; - - private string proxyStubClassId32Field; - - private bool proxyStubClassId32FieldSet; - - private int numMethodsField; - - private bool numMethodsFieldSet; - - private YesNoType versionedField; - - private bool versionedFieldSet; - - private ISchemaElement parentElement; - - /// - /// GUID identifier for COM Interface. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name for COM Interface. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Identifies the interface from which the current interface is derived. - /// - public string BaseInterface - { - get - { - return this.baseInterfaceField; - } - set - { - this.baseInterfaceFieldSet = true; - this.baseInterfaceField = value; - } - } - - /// - /// GUID CLSID for proxy stub to COM Interface. - /// - public string ProxyStubClassId - { - get - { - return this.proxyStubClassIdField; - } - set - { - this.proxyStubClassIdFieldSet = true; - this.proxyStubClassIdField = value; - } - } - - /// - /// GUID CLSID for 32-bit proxy stub to COM Interface. - /// - public string ProxyStubClassId32 - { - get - { - return this.proxyStubClassId32Field; - } - set - { - this.proxyStubClassId32FieldSet = true; - this.proxyStubClassId32Field = value; - } - } - - /// - /// Number of methods implemented on COM Interface. - /// - public int NumMethods - { - get - { - return this.numMethodsField; - } - set - { - this.numMethodsFieldSet = true; - this.numMethodsField = value; - } - } - - /// - /// Determines whether a Typelib version entry should be created with the other COM Interface registry keys. Default is 'yes'. - /// - public YesNoType Versioned - { - get - { - return this.versionedField; - } - set - { - this.versionedFieldSet = true; - this.versionedField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Interface", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.baseInterfaceFieldSet) - { - writer.WriteAttributeString("BaseInterface", this.baseInterfaceField); - } - if (this.proxyStubClassIdFieldSet) - { - writer.WriteAttributeString("ProxyStubClassId", this.proxyStubClassIdField); - } - if (this.proxyStubClassId32FieldSet) - { - writer.WriteAttributeString("ProxyStubClassId32", this.proxyStubClassId32Field); - } - if (this.numMethodsFieldSet) - { - writer.WriteAttributeString("NumMethods", this.numMethodsField.ToString(CultureInfo.InvariantCulture)); - } - if (this.versionedFieldSet) - { - if ((this.versionedField == YesNoType.no)) - { - writer.WriteAttributeString("Versioned", "no"); - } - if ((this.versionedField == YesNoType.yes)) - { - writer.WriteAttributeString("Versioned", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("BaseInterface" == name)) - { - this.baseInterfaceField = value; - this.baseInterfaceFieldSet = true; - } - if (("ProxyStubClassId" == name)) - { - this.proxyStubClassIdField = value; - this.proxyStubClassIdFieldSet = true; - } - if (("ProxyStubClassId32" == name)) - { - this.proxyStubClassId32Field = value; - this.proxyStubClassId32FieldSet = true; - } - if (("NumMethods" == name)) - { - this.numMethodsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.numMethodsFieldSet = true; - } - if (("Versioned" == name)) - { - this.versionedField = Enums.ParseYesNoType(value); - this.versionedFieldSet = true; - } - } - } - - /// - /// FileType data for class Id registration. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class FileTypeMask : ISchemaElement, ISetAttributes - { - - private int offsetField; - - private bool offsetFieldSet; - - private string maskField; - - private bool maskFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - /// - /// Offset into file. If positive, offset is from the beginning; if negative, offset is from the end. - /// - public int Offset - { - get - { - return this.offsetField; - } - set - { - this.offsetFieldSet = true; - this.offsetField = value; - } - } - - /// - /// Hex value that is AND'd against the bytes in the file at Offset. - /// - public string Mask - { - get - { - return this.maskField; - } - set - { - this.maskFieldSet = true; - this.maskField = value; - } - } - - /// - /// 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. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FileTypeMask", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.offsetFieldSet) - { - writer.WriteAttributeString("Offset", this.offsetField.ToString(CultureInfo.InvariantCulture)); - } - if (this.maskFieldSet) - { - writer.WriteAttributeString("Mask", this.maskField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Offset" == name)) - { - this.offsetField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.offsetFieldSet = true; - } - if (("Mask" == name)) - { - this.maskField = value; - this.maskFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - } - - /// - /// Service or group of services that must start before the parent service. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ServiceDependency : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private YesNoType groupField; - - private bool groupFieldSet; - - private ISchemaElement parentElement; - - /// - /// The value of this attribute should be one of the following: - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Set to 'yes' to indicate that the value in the Id attribute is the name of a group of services. - /// - public YesNoType Group - { - get - { - return this.groupField; - } - set - { - this.groupFieldSet = true; - this.groupField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ServiceDependency", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.groupFieldSet) - { - if ((this.groupField == YesNoType.no)) - { - writer.WriteAttributeString("Group", "no"); - } - if ((this.groupField == YesNoType.yes)) - { - writer.WriteAttributeString("Group", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Group" == name)) - { - this.groupField = Enums.ParseYesNoType(value); - this.groupFieldSet = true; - } - } - } - - /// - /// Adds services for parent Component. Use the ServiceControl element to remove services. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ServiceInstall : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string displayNameField; - - private bool displayNameFieldSet; - - private TypeType typeField; - - private bool typeFieldSet; - - private YesNoType interactiveField; - - private bool interactiveFieldSet; - - private StartType startField; - - private bool startFieldSet; - - private ErrorControlType errorControlField; - - private bool errorControlFieldSet; - - private YesNoType vitalField; - - private bool vitalFieldSet; - - private string loadOrderGroupField; - - private bool loadOrderGroupFieldSet; - - private string accountField; - - private bool accountFieldSet; - - private string passwordField; - - private bool passwordFieldSet; - - private string argumentsField; - - private bool argumentsFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private YesNoType eraseDescriptionField; - - private bool eraseDescriptionFieldSet; - - private ISchemaElement parentElement; - - public ServiceInstall() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PermissionEx))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceDependency))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfig))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfigFailureActions))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Unique identifier for this service configuration. This value will default to the Name attribute if not - /// specified. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// This column is the string that gives the service name to install. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// This column is the localizable string that user interface programs use to identify the service. - /// - public string DisplayName - { - get - { - return this.displayNameField; - } - set - { - this.displayNameFieldSet = true; - this.displayNameField = value; - } - } - - /// - /// The Windows Installer does not currently support kernelDriver or systemDriver. - /// - public TypeType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - /// - /// Whether or not the service interacts with the desktop. - /// - public YesNoType Interactive - { - get - { - return this.interactiveField; - } - set - { - this.interactiveFieldSet = true; - this.interactiveField = value; - } - } - - /// - /// Determines when the service should be started. The Windows Installer does not support boot or system. - /// - public StartType Start - { - get - { - return this.startField; - } - set - { - this.startFieldSet = true; - this.startField = value; - } - } - - /// - /// Determines what action should be taken on an error. - /// - public ErrorControlType ErrorControl - { - get - { - return this.errorControlField; - } - set - { - this.errorControlFieldSet = true; - this.errorControlField = value; - } - } - - /// - /// The overall install should fail if this service fails to install. - /// - public YesNoType Vital - { - get - { - return this.vitalField; - } - set - { - this.vitalFieldSet = true; - this.vitalField = value; - } - } - - /// - /// The load ordering group that this service should be a part of. - /// - public string LoadOrderGroup - { - get - { - return this.loadOrderGroupField; - } - set - { - this.loadOrderGroupFieldSet = true; - this.loadOrderGroupField = value; - } - } - - /// - /// Fully qualified names must be used even for local accounts, e.g.: ".\LOCAL_ACCOUNT". Valid only when ServiceType is ownProcess. - /// - public string Account - { - get - { - return this.accountField; - } - set - { - this.accountFieldSet = true; - this.accountField = value; - } - } - - /// - /// The password for the account. Valid only when the account has a password. - /// - public string Password - { - get - { - return this.passwordField; - } - set - { - this.passwordFieldSet = true; - this.passwordField = value; - } - } - - /// - /// Contains any command line arguments or properties required to run the service. - /// - public string Arguments - { - get - { - return this.argumentsField; - } - set - { - this.argumentsFieldSet = true; - this.argumentsField = value; - } - } - - /// - /// Sets the description of the service. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Determines whether the existing service description will be ignored. If 'yes', the service description will be null, even if the Description attribute is set. - /// - public YesNoType EraseDescription - { - get - { - return this.eraseDescriptionField; - } - set - { - this.eraseDescriptionFieldSet = true; - this.eraseDescriptionField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("PermissionEx" == childName)) - { - childValue = new PermissionEx(); - } - if (("ServiceDependency" == childName)) - { - childValue = new ServiceDependency(); - } - if (("ServiceConfig" == childName)) - { - childValue = new ServiceConfig(); - } - if (("ServiceConfigFailureActions" == childName)) - { - childValue = new ServiceConfigFailureActions(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a TypeType from a string. - /// - public static TypeType ParseTypeType(string value) - { - TypeType parsedValue; - ServiceInstall.TryParseTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypeType from a string. - /// - public static bool TryParseTypeType(string value, out TypeType parsedValue) - { - parsedValue = TypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("ownProcess" == value)) - { - parsedValue = TypeType.ownProcess; - } - else - { - if (("shareProcess" == value)) - { - parsedValue = TypeType.shareProcess; - } - else - { - if (("kernelDriver" == value)) - { - parsedValue = TypeType.kernelDriver; - } - else - { - if (("systemDriver" == value)) - { - parsedValue = TypeType.systemDriver; - } - else - { - parsedValue = TypeType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Parses a StartType from a string. - /// - public static StartType ParseStartType(string value) - { - StartType parsedValue; - ServiceInstall.TryParseStartType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a StartType from a string. - /// - public static bool TryParseStartType(string value, out StartType parsedValue) - { - parsedValue = StartType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("auto" == value)) - { - parsedValue = StartType.auto; - } - else - { - if (("demand" == value)) - { - parsedValue = StartType.demand; - } - else - { - if (("disabled" == value)) - { - parsedValue = StartType.disabled; - } - else - { - if (("boot" == value)) - { - parsedValue = StartType.boot; - } - else - { - if (("system" == value)) - { - parsedValue = StartType.system; - } - else - { - parsedValue = StartType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - - /// - /// Parses a ErrorControlType from a string. - /// - public static ErrorControlType ParseErrorControlType(string value) - { - ErrorControlType parsedValue; - ServiceInstall.TryParseErrorControlType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ErrorControlType from a string. - /// - public static bool TryParseErrorControlType(string value, out ErrorControlType parsedValue) - { - parsedValue = ErrorControlType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("ignore" == value)) - { - parsedValue = ErrorControlType.ignore; - } - else - { - if (("normal" == value)) - { - parsedValue = ErrorControlType.normal; - } - else - { - if (("critical" == value)) - { - parsedValue = ErrorControlType.critical; - } - else - { - parsedValue = ErrorControlType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ServiceInstall", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.displayNameFieldSet) - { - writer.WriteAttributeString("DisplayName", this.displayNameField); - } - if (this.typeFieldSet) - { - if ((this.typeField == TypeType.ownProcess)) - { - writer.WriteAttributeString("Type", "ownProcess"); - } - if ((this.typeField == TypeType.shareProcess)) - { - writer.WriteAttributeString("Type", "shareProcess"); - } - if ((this.typeField == TypeType.kernelDriver)) - { - writer.WriteAttributeString("Type", "kernelDriver"); - } - if ((this.typeField == TypeType.systemDriver)) - { - writer.WriteAttributeString("Type", "systemDriver"); - } - } - if (this.interactiveFieldSet) - { - if ((this.interactiveField == YesNoType.no)) - { - writer.WriteAttributeString("Interactive", "no"); - } - if ((this.interactiveField == YesNoType.yes)) - { - writer.WriteAttributeString("Interactive", "yes"); - } - } - if (this.startFieldSet) - { - if ((this.startField == StartType.auto)) - { - writer.WriteAttributeString("Start", "auto"); - } - if ((this.startField == StartType.demand)) - { - writer.WriteAttributeString("Start", "demand"); - } - if ((this.startField == StartType.disabled)) - { - writer.WriteAttributeString("Start", "disabled"); - } - if ((this.startField == StartType.boot)) - { - writer.WriteAttributeString("Start", "boot"); - } - if ((this.startField == StartType.system)) - { - writer.WriteAttributeString("Start", "system"); - } - } - if (this.errorControlFieldSet) - { - if ((this.errorControlField == ErrorControlType.ignore)) - { - writer.WriteAttributeString("ErrorControl", "ignore"); - } - if ((this.errorControlField == ErrorControlType.normal)) - { - writer.WriteAttributeString("ErrorControl", "normal"); - } - if ((this.errorControlField == ErrorControlType.critical)) - { - writer.WriteAttributeString("ErrorControl", "critical"); - } - } - if (this.vitalFieldSet) - { - if ((this.vitalField == YesNoType.no)) - { - writer.WriteAttributeString("Vital", "no"); - } - if ((this.vitalField == YesNoType.yes)) - { - writer.WriteAttributeString("Vital", "yes"); - } - } - if (this.loadOrderGroupFieldSet) - { - writer.WriteAttributeString("LoadOrderGroup", this.loadOrderGroupField); - } - if (this.accountFieldSet) - { - writer.WriteAttributeString("Account", this.accountField); - } - if (this.passwordFieldSet) - { - writer.WriteAttributeString("Password", this.passwordField); - } - if (this.argumentsFieldSet) - { - writer.WriteAttributeString("Arguments", this.argumentsField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.eraseDescriptionFieldSet) - { - if ((this.eraseDescriptionField == YesNoType.no)) - { - writer.WriteAttributeString("EraseDescription", "no"); - } - if ((this.eraseDescriptionField == YesNoType.yes)) - { - writer.WriteAttributeString("EraseDescription", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("DisplayName" == name)) - { - this.displayNameField = value; - this.displayNameFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = ServiceInstall.ParseTypeType(value); - this.typeFieldSet = true; - } - if (("Interactive" == name)) - { - this.interactiveField = Enums.ParseYesNoType(value); - this.interactiveFieldSet = true; - } - if (("Start" == name)) - { - this.startField = ServiceInstall.ParseStartType(value); - this.startFieldSet = true; - } - if (("ErrorControl" == name)) - { - this.errorControlField = ServiceInstall.ParseErrorControlType(value); - this.errorControlFieldSet = true; - } - if (("Vital" == name)) - { - this.vitalField = Enums.ParseYesNoType(value); - this.vitalFieldSet = true; - } - if (("LoadOrderGroup" == name)) - { - this.loadOrderGroupField = value; - this.loadOrderGroupFieldSet = true; - } - if (("Account" == name)) - { - this.accountField = value; - this.accountFieldSet = true; - } - if (("Password" == name)) - { - this.passwordField = value; - this.passwordFieldSet = true; - } - if (("Arguments" == name)) - { - this.argumentsField = value; - this.argumentsFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("EraseDescription" == name)) - { - this.eraseDescriptionField = Enums.ParseYesNoType(value); - this.eraseDescriptionFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum TypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// A Win32 service that runs its own process. - /// - ownProcess, - - /// - /// A Win32 service that shares a process. - /// - shareProcess, - - /// - /// A kernel driver service. This value is not currently supported by the Windows Installer. - /// - kernelDriver, - - /// - /// A file system driver service. This value is not currently supported by the Windows Installer. - /// - systemDriver, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum StartType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// The service will start during startup of the system. - /// - auto, - - /// - /// The service will start when the service control manager calls the StartService function. - /// - demand, - - /// - /// The service can no longer be started. - /// - disabled, - - /// - /// 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. - /// - boot, - - /// - /// The service is a device driver that will be started by the IoInitSystem function. This value is not currently supported by the Windows Installer. - /// - system, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ErrorControlType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Logs the error and continues with the startup operation. - /// - ignore, - - /// - /// Logs the error, displays a message box and continues the startup operation. - /// - normal, - - /// - /// 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. - /// - critical, - } - } - - /// - /// Argument used in ServiceControl parent - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ServiceArgument : ISetAttributes, ISchemaElement - { - - private ISchemaElement parentElement; - - private string contentField; - - private bool contentFieldSet; - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Argument used in ServiceControl parent - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ServiceArgument", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - } - - /// - /// Starts, stops, and removes services for parent Component. This element is used to control the state - /// of a service installed by the MSI or MSM file by using the start, stop and remove attributes. - /// For example, Start='install' Stop='both' Remove='uninstall' would mean: start the service on install, - /// remove the service when the product is uninstalled, and stop the service both on install and uninstall. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ServiceControl : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private InstallUninstallType startField; - - private bool startFieldSet; - - private InstallUninstallType stopField; - - private bool stopFieldSet; - - private InstallUninstallType removeField; - - private bool removeFieldSet; - - private YesNoType waitField; - - private bool waitFieldSet; - - private ISchemaElement parentElement; - - public ServiceControl() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ServiceArgument))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the service. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Specifies whether the service should be started by the StartServices action on install, uninstall or both. - /// For 'install', the service will be started only when the parent component is being installed (msiInstallStateLocal or - /// msiInstallStateSource); for 'uninstall', the service will be started only when the parent component - /// is being removed (msiInstallStateAbsent); for 'both', the service will be started in both cases. - /// - public InstallUninstallType Start - { - get - { - return this.startField; - } - set - { - this.startFieldSet = true; - this.startField = value; - } - } - - /// - /// Specifies whether the service should be stopped by the StopServices action on install, uninstall or both. - /// For 'install', the service will be stopped only when the parent component is being installed (msiInstallStateLocal or - /// msiInstallStateSource); for 'uninstall', the service will be stopped only when the parent component - /// is being removed (msiInstallStateAbsent); for 'both', the service will be stopped in both cases. - /// - public InstallUninstallType Stop - { - get - { - return this.stopField; - } - set - { - this.stopFieldSet = true; - this.stopField = value; - } - } - - /// - /// Specifies whether the service should be removed by the DeleteServices action on install, uninstall or both. - /// For 'install', the service will be removed only when the parent component is being installed (msiInstallStateLocal or - /// msiInstallStateSource); for 'uninstall', the service will be removed only when the parent component - /// is being removed (msiInstallStateAbsent); for 'both', the service will be removed in both cases. - /// - public InstallUninstallType Remove - { - get - { - return this.removeField; - } - set - { - this.removeFieldSet = true; - this.removeField = value; - } - } - - /// - /// Specifies whether or not to wait for the service to complete before continuing. The default is 'yes'. - /// - public YesNoType Wait - { - get - { - return this.waitField; - } - set - { - this.waitFieldSet = true; - this.waitField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ServiceArgument" == childName)) - { - childValue = new ServiceArgument(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ServiceControl", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.startFieldSet) - { - if ((this.startField == InstallUninstallType.install)) - { - writer.WriteAttributeString("Start", "install"); - } - if ((this.startField == InstallUninstallType.uninstall)) - { - writer.WriteAttributeString("Start", "uninstall"); - } - if ((this.startField == InstallUninstallType.both)) - { - writer.WriteAttributeString("Start", "both"); - } - } - if (this.stopFieldSet) - { - if ((this.stopField == InstallUninstallType.install)) - { - writer.WriteAttributeString("Stop", "install"); - } - if ((this.stopField == InstallUninstallType.uninstall)) - { - writer.WriteAttributeString("Stop", "uninstall"); - } - if ((this.stopField == InstallUninstallType.both)) - { - writer.WriteAttributeString("Stop", "both"); - } - } - if (this.removeFieldSet) - { - if ((this.removeField == InstallUninstallType.install)) - { - writer.WriteAttributeString("Remove", "install"); - } - if ((this.removeField == InstallUninstallType.uninstall)) - { - writer.WriteAttributeString("Remove", "uninstall"); - } - if ((this.removeField == InstallUninstallType.both)) - { - writer.WriteAttributeString("Remove", "both"); - } - } - if (this.waitFieldSet) - { - if ((this.waitField == YesNoType.no)) - { - writer.WriteAttributeString("Wait", "no"); - } - if ((this.waitField == YesNoType.yes)) - { - writer.WriteAttributeString("Wait", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Start" == name)) - { - this.startField = Enums.ParseInstallUninstallType(value); - this.startFieldSet = true; - } - if (("Stop" == name)) - { - this.stopField = Enums.ParseInstallUninstallType(value); - this.stopFieldSet = true; - } - if (("Remove" == name)) - { - this.removeField = Enums.ParseInstallUninstallType(value); - this.removeFieldSet = true; - } - if (("Wait" == name)) - { - this.waitField = Enums.ParseYesNoType(value); - this.waitFieldSet = true; - } - } - } - - /// - /// Privilege required by service configured by ServiceConfig parent. Valid values are a - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RequiredPrivilege : ISetAttributes, ISchemaElement - { - - private ISchemaElement parentElement; - - private string contentField; - - private bool contentFieldSet; - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Privilege required by service configured by ServiceConfig parent. Valid values are a - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RequiredPrivilege", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - } - - /// - /// Configures a service being installed or one that already exists. This element's functionality is available starting with MSI 5.0. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ServiceConfig : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string delayedAutoStartField; - - private bool delayedAutoStartFieldSet; - - private string failureActionsWhenField; - - private bool failureActionsWhenFieldSet; - - private string preShutdownDelayField; - - private bool preShutdownDelayFieldSet; - - private YesNoType onInstallField; - - private bool onInstallFieldSet; - - private YesNoType onReinstallField; - - private bool onReinstallFieldSet; - - private YesNoType onUninstallField; - - private bool onUninstallFieldSet; - - private string serviceNameField; - - private bool serviceNameFieldSet; - - private string serviceSidField; - - private bool serviceSidFieldSet; - - private ISchemaElement parentElement; - - public ServiceConfig() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RequiredPrivilege))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Unique identifier for this service configuration. This value will default to the ServiceName attribute if not - /// specified. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// This attribute specifies whether an auto-start service should delay its start until after all other auto-start - /// services. This attribute only affects auto-start services. Allowed values are "yes", "no" or a Formatted property that - /// resolves to "1" (for "yes") or "0" (for "no"). If this attribute is not present the setting is not configured. - /// - public string DelayedAutoStart - { - get - { - return this.delayedAutoStartField; - } - set - { - this.delayedAutoStartFieldSet = true; - this.delayedAutoStartField = value; - } - } - - /// - /// This attribute specifies when failure actions should be applied. Allowed values are "failedToStop", "failedToStopOrReturnedError" - /// or a Formatted property that resolves to "1" (for "failedToStopOrReturnedError") or "0" (for "failedToStop"). If this attribute - /// is not present the setting is not configured. - /// - public string FailureActionsWhen - { - get - { - return this.failureActionsWhenField; - } - set - { - this.failureActionsWhenFieldSet = true; - this.failureActionsWhenField = value; - } - } - - /// - /// This attribute specifies time in milliseconds that the Service Control Manager (SCM) waits after notifying the service of a system - /// shutdown. If this attribute is not present the default value, 3 minutes, is used. - /// - public string PreShutdownDelay - { - get - { - return this.preShutdownDelayField; - } - set - { - this.preShutdownDelayFieldSet = true; - this.preShutdownDelayField = value; - } - } - - /// - /// Specifies whether to configure the service when the parent Component is installed. This attribute may be combined with OnReinstall - /// and OnUninstall. - /// - public YesNoType OnInstall - { - get - { - return this.onInstallField; - } - set - { - this.onInstallFieldSet = true; - this.onInstallField = value; - } - } - - /// - /// Specifies whether to configure the service when the parent Component is reinstalled. This attribute may be combined with OnInstall - /// and OnUninstall. - /// - public YesNoType OnReinstall - { - get - { - return this.onReinstallField; - } - set - { - this.onReinstallFieldSet = true; - this.onReinstallField = value; - } - } - - /// - /// Specifies whether to configure the service when the parent Component is uninstalled. This attribute may be combined with OnInstall - /// and OnReinstall. - /// - public YesNoType OnUninstall - { - get - { - return this.onUninstallField; - } - set - { - this.onUninstallFieldSet = true; - this.onUninstallField = value; - } - } - - /// - /// Specifies the name of the service to configure. This value will default to the ServiceInstall/@Name attribute when nested under - /// a ServiceInstall element. - /// - public string ServiceName - { - get - { - return this.serviceNameField; - } - set - { - this.serviceNameFieldSet = true; - this.serviceNameField = value; - } - } - - /// - /// Specifies the service SID to apply to the service. Valid values are "none", "restricted", "unrestricted" or a Formatted property - /// that resolves to "0" (for "none"), "3" (for "restricted") or "1" (for "unrestricted"). If this attribute is not present the - /// setting is not configured. - /// - public string ServiceSid - { - get - { - return this.serviceSidField; - } - set - { - this.serviceSidFieldSet = true; - this.serviceSidField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("RequiredPrivilege" == childName)) - { - childValue = new RequiredPrivilege(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ServiceConfig", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.delayedAutoStartFieldSet) - { - writer.WriteAttributeString("DelayedAutoStart", this.delayedAutoStartField); - } - if (this.failureActionsWhenFieldSet) - { - writer.WriteAttributeString("FailureActionsWhen", this.failureActionsWhenField); - } - if (this.preShutdownDelayFieldSet) - { - writer.WriteAttributeString("PreShutdownDelay", this.preShutdownDelayField); - } - if (this.onInstallFieldSet) - { - if ((this.onInstallField == YesNoType.no)) - { - writer.WriteAttributeString("OnInstall", "no"); - } - if ((this.onInstallField == YesNoType.yes)) - { - writer.WriteAttributeString("OnInstall", "yes"); - } - } - if (this.onReinstallFieldSet) - { - if ((this.onReinstallField == YesNoType.no)) - { - writer.WriteAttributeString("OnReinstall", "no"); - } - if ((this.onReinstallField == YesNoType.yes)) - { - writer.WriteAttributeString("OnReinstall", "yes"); - } - } - if (this.onUninstallFieldSet) - { - if ((this.onUninstallField == YesNoType.no)) - { - writer.WriteAttributeString("OnUninstall", "no"); - } - if ((this.onUninstallField == YesNoType.yes)) - { - writer.WriteAttributeString("OnUninstall", "yes"); - } - } - if (this.serviceNameFieldSet) - { - writer.WriteAttributeString("ServiceName", this.serviceNameField); - } - if (this.serviceSidFieldSet) - { - writer.WriteAttributeString("ServiceSid", this.serviceSidField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("DelayedAutoStart" == name)) - { - this.delayedAutoStartField = value; - this.delayedAutoStartFieldSet = true; - } - if (("FailureActionsWhen" == name)) - { - this.failureActionsWhenField = value; - this.failureActionsWhenFieldSet = true; - } - if (("PreShutdownDelay" == name)) - { - this.preShutdownDelayField = value; - this.preShutdownDelayFieldSet = true; - } - if (("OnInstall" == name)) - { - this.onInstallField = Enums.ParseYesNoType(value); - this.onInstallFieldSet = true; - } - if (("OnReinstall" == name)) - { - this.onReinstallField = Enums.ParseYesNoType(value); - this.onReinstallFieldSet = true; - } - if (("OnUninstall" == name)) - { - this.onUninstallField = Enums.ParseYesNoType(value); - this.onUninstallFieldSet = true; - } - if (("ServiceName" == name)) - { - this.serviceNameField = value; - this.serviceNameFieldSet = true; - } - if (("ServiceSid" == name)) - { - this.serviceSidField = value; - this.serviceSidFieldSet = true; - } - } - } - - /// - /// Failure action for a ServiceConfigFailureActions element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Failure : ISchemaElement, ISetAttributes - { - - private string actionField; - - private bool actionFieldSet; - - private string delayField; - - private bool delayFieldSet; - - private ISchemaElement parentElement; - - /// - /// Specifies the action to take when the service fails. Valid values are "none", "restartComputer", "restartService", "runCommand" or a Formatted property - /// that resolves to "0" (for "none"), "1" (for "restartService"), "2" (for "restartComputer") or "3" (for "runCommand"). - /// - public string Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// Specifies the time in milliseconds to wait before performing the value from the Action attribute. - /// - public string Delay - { - get - { - return this.delayField; - } - set - { - this.delayFieldSet = true; - this.delayField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Failure", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.actionFieldSet) - { - writer.WriteAttributeString("Action", this.actionField); - } - if (this.delayFieldSet) - { - writer.WriteAttributeString("Delay", this.delayField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Action" == name)) - { - this.actionField = value; - this.actionFieldSet = true; - } - if (("Delay" == name)) - { - this.delayField = value; - this.delayFieldSet = true; - } - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ServiceConfigFailureActions : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string commandField; - - private bool commandFieldSet; - - private YesNoType onInstallField; - - private bool onInstallFieldSet; - - private YesNoType onReinstallField; - - private bool onReinstallFieldSet; - - private YesNoType onUninstallField; - - private bool onUninstallFieldSet; - - private string rebootMessageField; - - private bool rebootMessageFieldSet; - - private string resetPeriodField; - - private bool resetPeriodFieldSet; - - private string serviceNameField; - - private bool serviceNameFieldSet; - - private ISchemaElement parentElement; - - public ServiceConfigFailureActions() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Failure))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Unique identifier for this service configuration. This value will default to the ServiceName attribute if not - /// specified. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// This attribute specifies command to execute when a "runCommand" failure action hit. If an empty string is provided it clears - /// the existing command. If this attribute is not present the setting is not changed. - /// - public string Command - { - get - { - return this.commandField; - } - set - { - this.commandFieldSet = true; - this.commandField = value; - } - } - - /// - /// Specifies whether to configure the service when the parent Component is installed. This attribute may be combined with OnReinstall - /// and OnUninstall. - /// - public YesNoType OnInstall - { - get - { - return this.onInstallField; - } - set - { - this.onInstallFieldSet = true; - this.onInstallField = value; - } - } - - /// - /// Specifies whether to configure the service when the parent Component is reinstalled. This attribute may be combined with OnInstall - /// and OnUninstall. - /// - public YesNoType OnReinstall - { - get - { - return this.onReinstallField; - } - set - { - this.onReinstallFieldSet = true; - this.onReinstallField = value; - } - } - - /// - /// Specifies whether to configure the service when the parent Component is uninstalled. This attribute may be combined with OnInstall - /// and OnReinstall. - /// - public YesNoType OnUninstall - { - get - { - return this.onUninstallField; - } - set - { - this.onUninstallFieldSet = true; - this.onUninstallField = value; - } - } - - /// - /// Specifies the message to show for a reboot failure action. If an empty string is provided it clears any existing reboot message. If this - /// attribute is not present the setting is not changed. - /// - public string RebootMessage - { - get - { - return this.rebootMessageField; - } - set - { - this.rebootMessageFieldSet = true; - this.rebootMessageField = value; - } - } - - /// - /// Specifies the time in seconds to reset the failure count. If this attribute is not present the failure count will not be reset. - /// - public string ResetPeriod - { - get - { - return this.resetPeriodField; - } - set - { - this.resetPeriodFieldSet = true; - this.resetPeriodField = value; - } - } - - /// - /// Specifies the name of the service to configure. This value will default to the ServiceInstall/@Name attribute when nested under - /// a ServiceInstall element. - /// - public string ServiceName - { - get - { - return this.serviceNameField; - } - set - { - this.serviceNameFieldSet = true; - this.serviceNameField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Failure" == childName)) - { - childValue = new Failure(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ServiceConfigFailureActions", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.commandFieldSet) - { - writer.WriteAttributeString("Command", this.commandField); - } - if (this.onInstallFieldSet) - { - if ((this.onInstallField == YesNoType.no)) - { - writer.WriteAttributeString("OnInstall", "no"); - } - if ((this.onInstallField == YesNoType.yes)) - { - writer.WriteAttributeString("OnInstall", "yes"); - } - } - if (this.onReinstallFieldSet) - { - if ((this.onReinstallField == YesNoType.no)) - { - writer.WriteAttributeString("OnReinstall", "no"); - } - if ((this.onReinstallField == YesNoType.yes)) - { - writer.WriteAttributeString("OnReinstall", "yes"); - } - } - if (this.onUninstallFieldSet) - { - if ((this.onUninstallField == YesNoType.no)) - { - writer.WriteAttributeString("OnUninstall", "no"); - } - if ((this.onUninstallField == YesNoType.yes)) - { - writer.WriteAttributeString("OnUninstall", "yes"); - } - } - if (this.rebootMessageFieldSet) - { - writer.WriteAttributeString("RebootMessage", this.rebootMessageField); - } - if (this.resetPeriodFieldSet) - { - writer.WriteAttributeString("ResetPeriod", this.resetPeriodField); - } - if (this.serviceNameFieldSet) - { - writer.WriteAttributeString("ServiceName", this.serviceNameField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Command" == name)) - { - this.commandField = value; - this.commandFieldSet = true; - } - if (("OnInstall" == name)) - { - this.onInstallField = Enums.ParseYesNoType(value); - this.onInstallFieldSet = true; - } - if (("OnReinstall" == name)) - { - this.onReinstallField = Enums.ParseYesNoType(value); - this.onReinstallFieldSet = true; - } - if (("OnUninstall" == name)) - { - this.onUninstallField = Enums.ParseYesNoType(value); - this.onUninstallFieldSet = true; - } - if (("RebootMessage" == name)) - { - this.rebootMessageField = value; - this.rebootMessageFieldSet = true; - } - if (("ResetPeriod" == name)) - { - this.resetPeriodField = value; - this.resetPeriodFieldSet = true; - } - if (("ServiceName" == name)) - { - this.serviceNameField = value; - this.serviceNameFieldSet = true; - } - } - } - - /// - /// Environment variables added or removed for the parent component. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Environment : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private string separatorField; - - private bool separatorFieldSet; - - private ActionType actionField; - - private bool actionFieldSet; - - private PartType partField; - - private bool partFieldSet; - - private YesNoType permanentField; - - private bool permanentFieldSet; - - private YesNoType systemField; - - private bool systemFieldSet; - - private ISchemaElement parentElement; - - /// - /// Unique identifier for environment entry. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Name of the environment variable. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The value to set into the environment variable. - /// If this attribute is not set, the environment variable is removed during installation if it exists on the machine. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// Optional attribute to change the separator used between values. By default a semicolon is used. - /// - public string Separator - { - get - { - return this.separatorField; - } - set - { - this.separatorFieldSet = true; - this.separatorField = value; - } - } - - /// - /// Specfies whether the environmental variable should be created, set or removed when the parent component is installed. - /// - public ActionType Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - public PartType Part - { - get - { - return this.partField; - } - set - { - this.partFieldSet = true; - this.partField = value; - } - } - - /// - /// Specifies that the environment variable should not be removed on uninstall. - /// - public YesNoType Permanent - { - get - { - return this.permanentField; - } - set - { - this.permanentFieldSet = true; - this.permanentField = value; - } - } - - /// - /// Specifies that the environment variable should be added to the system environment space. The default - /// is 'no' which indicates the environment variable is added to the user environment space. - /// - public YesNoType System - { - get - { - return this.systemField; - } - set - { - this.systemFieldSet = true; - this.systemField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ActionType from a string. - /// - public static ActionType ParseActionType(string value) - { - ActionType parsedValue; - Environment.TryParseActionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ActionType from a string. - /// - public static bool TryParseActionType(string value, out ActionType parsedValue) - { - parsedValue = ActionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("create" == value)) - { - parsedValue = ActionType.create; - } - else - { - if (("set" == value)) - { - parsedValue = ActionType.set; - } - else - { - if (("remove" == value)) - { - parsedValue = ActionType.remove; - } - else - { - parsedValue = ActionType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a PartType from a string. - /// - public static PartType ParsePartType(string value) - { - PartType parsedValue; - Environment.TryParsePartType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a PartType from a string. - /// - public static bool TryParsePartType(string value, out PartType parsedValue) - { - parsedValue = PartType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("all" == value)) - { - parsedValue = PartType.all; - } - else - { - if (("first" == value)) - { - parsedValue = PartType.first; - } - else - { - if (("last" == value)) - { - parsedValue = PartType.last; - } - else - { - parsedValue = PartType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Environment", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.separatorFieldSet) - { - writer.WriteAttributeString("Separator", this.separatorField); - } - if (this.actionFieldSet) - { - if ((this.actionField == ActionType.create)) - { - writer.WriteAttributeString("Action", "create"); - } - if ((this.actionField == ActionType.set)) - { - writer.WriteAttributeString("Action", "set"); - } - if ((this.actionField == ActionType.remove)) - { - writer.WriteAttributeString("Action", "remove"); - } - } - if (this.partFieldSet) - { - if ((this.partField == PartType.all)) - { - writer.WriteAttributeString("Part", "all"); - } - if ((this.partField == PartType.first)) - { - writer.WriteAttributeString("Part", "first"); - } - if ((this.partField == PartType.last)) - { - writer.WriteAttributeString("Part", "last"); - } - } - if (this.permanentFieldSet) - { - if ((this.permanentField == YesNoType.no)) - { - writer.WriteAttributeString("Permanent", "no"); - } - if ((this.permanentField == YesNoType.yes)) - { - writer.WriteAttributeString("Permanent", "yes"); - } - } - if (this.systemFieldSet) - { - if ((this.systemField == YesNoType.no)) - { - writer.WriteAttributeString("System", "no"); - } - if ((this.systemField == YesNoType.yes)) - { - writer.WriteAttributeString("System", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Separator" == name)) - { - this.separatorField = value; - this.separatorFieldSet = true; - } - if (("Action" == name)) - { - this.actionField = Environment.ParseActionType(value); - this.actionFieldSet = true; - } - if (("Part" == name)) - { - this.partField = Environment.ParsePartType(value); - this.partFieldSet = true; - } - if (("Permanent" == name)) - { - this.permanentField = Enums.ParseYesNoType(value); - this.permanentFieldSet = true; - } - if (("System" == name)) - { - this.systemField = Enums.ParseYesNoType(value); - this.systemFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ActionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// 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. - /// - create, - - /// - /// 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. - /// - set, - - /// - /// Removes the environment variable during an installation. - /// The installer only removes an environment variable during an installation if the name and value - /// of the variable match the entries in the Name and Value attributes. - /// If you want to remove an environment variable, regardless of its value, do not set the Value attribute. - /// - remove, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum PartType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// This value is the entire environmental variable. This is the default. - /// - all, - - /// - /// This value is prefixed. - /// - first, - - /// - /// This value is appended. - /// - last, - } - } - - /// - /// Conditions for components, controls, features, and products. The condition is specified in the inner text of the element. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Condition : ISchemaElement, ISetAttributes - { - - private ActionType actionField; - - private bool actionFieldSet; - - private int levelField; - - private bool levelFieldSet; - - private string messageField; - - private bool messageFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// Used only under Control elements and is required. Allows specific actions to be applied to a control based - /// on the result of this condition. - /// - public ActionType Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// Used only under Feature elements and is required. Allows modifying the level of a Feature based on the - /// result of this condition. - /// - public int Level - { - get - { - return this.levelField; - } - set - { - this.levelFieldSet = true; - this.levelField = value; - } - } - - /// - /// Used only under Fragment or Package elements and is required. Set the value to the text to display when the - /// condition fails and the installation must be terminated. - /// - public string Message - { - get - { - return this.messageField; - } - set - { - this.messageFieldSet = true; - this.messageField = value; - } - } - - /// - /// Under a Component element, the condition becomes the condition of the component. Under a Control element, - /// the condition becomes a ControlCondition entry. Under a Feature element, the condition becomes a Condition - /// entry. Under a Fragment or Package element, the condition becomes a LaunchCondition entry. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ActionType from a string. - /// - public static ActionType ParseActionType(string value) - { - ActionType parsedValue; - Condition.TryParseActionType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ActionType from a string. - /// - public static bool TryParseActionType(string value, out ActionType parsedValue) - { - parsedValue = ActionType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("default" == value)) - { - parsedValue = ActionType.@default; - } - else - { - if (("enable" == value)) - { - parsedValue = ActionType.enable; - } - else - { - if (("disable" == value)) - { - parsedValue = ActionType.disable; - } - else - { - if (("hide" == value)) - { - parsedValue = ActionType.hide; - } - else - { - if (("show" == value)) - { - parsedValue = ActionType.show; - } - else - { - parsedValue = ActionType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Condition", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.actionFieldSet) - { - if ((this.actionField == ActionType.@default)) - { - writer.WriteAttributeString("Action", "default"); - } - if ((this.actionField == ActionType.enable)) - { - writer.WriteAttributeString("Action", "enable"); - } - if ((this.actionField == ActionType.disable)) - { - writer.WriteAttributeString("Action", "disable"); - } - if ((this.actionField == ActionType.hide)) - { - writer.WriteAttributeString("Action", "hide"); - } - if ((this.actionField == ActionType.show)) - { - writer.WriteAttributeString("Action", "show"); - } - } - if (this.levelFieldSet) - { - writer.WriteAttributeString("Level", this.levelField.ToString(CultureInfo.InvariantCulture)); - } - if (this.messageFieldSet) - { - writer.WriteAttributeString("Message", this.messageField); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Action" == name)) - { - this.actionField = Condition.ParseActionType(value); - this.actionFieldSet = true; - } - if (("Level" == name)) - { - this.levelField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.levelFieldSet = true; - } - if (("Message" == name)) - { - this.messageField = value; - this.messageFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ActionType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Set the Control as the default. Only used under Control elements. - /// - @default, - - /// - /// Enable the Control. Only used under Control elements. - /// - enable, - - /// - /// Disable the Control. Only used under Control elements. - /// - disable, - - /// - /// Hide the Control. Only used under Control elements. - /// - hide, - - /// - /// Display the Control. Only used under Control elements. - /// - show, - } - } - - /// - /// Shared Component to be privately replicated in folder of parent Component - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class IsolateComponent : ISchemaElement, ISetAttributes - { - - private string sharedField; - - private bool sharedFieldSet; - - private ISchemaElement parentElement; - - /// - /// Shared Component for this application Component. - /// - public string Shared - { - get - { - return this.sharedField; - } - set - { - this.sharedFieldSet = true; - this.sharedField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("IsolateComponent", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.sharedFieldSet) - { - writer.WriteAttributeString("Shared", this.sharedField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Shared" == name)) - { - this.sharedField = value; - this.sharedFieldSet = true; - } - } - } - - /// - /// Disk cost to reserve in a folder for running locally and/or from source. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ReserveCost : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string directoryField; - - private bool directoryFieldSet; - - private int runFromSourceField; - - private bool runFromSourceFieldSet; - - private int runLocalField; - - private bool runLocalFieldSet; - - private ISchemaElement parentElement; - - /// - /// A primary key that uniquely identifies this ReserveCost entry. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Adds the amount of disk space specified in RunFromSource or RunLocal to the volume cost of the device containing the directory. - /// If this attribute is not set, it will default to the directory of parent component. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - /// - /// The number of bytes of disk space to reserve if the component is installed to run from source. - /// - public int RunFromSource - { - get - { - return this.runFromSourceField; - } - set - { - this.runFromSourceFieldSet = true; - this.runFromSourceField = value; - } - } - - /// - /// The number of bytes of disk space to reserve if the component is installed to run locally. - /// - public int RunLocal - { - get - { - return this.runLocalField; - } - set - { - this.runLocalFieldSet = true; - this.runLocalField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ReserveCost", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - if (this.runFromSourceFieldSet) - { - writer.WriteAttributeString("RunFromSource", this.runFromSourceField.ToString(CultureInfo.InvariantCulture)); - } - if (this.runLocalFieldSet) - { - writer.WriteAttributeString("RunLocal", this.runLocalField.ToString(CultureInfo.InvariantCulture)); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - if (("RunFromSource" == name)) - { - this.runFromSourceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.runFromSourceFieldSet = true; - } - if (("RunLocal" == name)) - { - this.runLocalField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.runLocalFieldSet = true; - } - } - } - - /// - /// Component for parent Directory - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Component : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private int comPlusFlagsField; - - private bool comPlusFlagsFieldSet; - - private YesNoType disableRegistryReflectionField; - - private bool disableRegistryReflectionFieldSet; - - private string directoryField; - - private bool directoryFieldSet; - - private string diskIdField; - - private bool diskIdFieldSet; - - private string featureField; - - private bool featureFieldSet; - - private string guidField; - - private bool guidFieldSet; - - private YesNoType keyPathField; - - private bool keyPathFieldSet; - - private LocationType locationField; - - private bool locationFieldSet; - - private YesNoType multiInstanceField; - - private bool multiInstanceFieldSet; - - private YesNoType neverOverwriteField; - - private bool neverOverwriteFieldSet; - - private YesNoType permanentField; - - private bool permanentFieldSet; - - private YesNoType sharedField; - - private bool sharedFieldSet; - - private YesNoType sharedDllRefCountField; - - private bool sharedDllRefCountFieldSet; - - private YesNoType transitiveField; - - private bool transitiveFieldSet; - - private YesNoType uninstallWhenSupersededField; - - private bool uninstallWhenSupersededFieldSet; - - private YesNoType win64Field; - - private bool win64FieldSet; - - private ISchemaElement parentElement; - - public Component() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppId))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Category))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Class))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CopyFile))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateFolder))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Environment))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Extension))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(File))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IniFile))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Interface))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponent))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDataSource))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCDriver))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ODBCTranslator))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgId))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Registry))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryKey))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegistryValue))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFile))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFolder))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryKey))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryValue))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ReserveCost))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceControl))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfig))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceConfigFailureActions))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ServiceInstall))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Shortcut))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TypeLib))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Component identifier; this is the primary key for identifying components. If omitted, - /// the compiler defaults the identifier to the identifier of the resource that is the - /// explicit keypath of the component (for example, a child File element with KeyPath - /// attribute with value 'yes'. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Set this attribute to create a ComPlus entry. The value should be the export flags used - /// during the generation of the .msi file. For more information see the COM+ documentation - /// in the Platform SDK. - /// - public int ComPlusFlags - { - get - { - return this.comPlusFlagsField; - } - set - { - this.comPlusFlagsFieldSet = true; - this.comPlusFlagsField = value; - } - } - - /// - /// Set this attribute to 'yes' in order to disable registry reflection on all existing and - /// new registry keys affected by this component. - /// When set to 'yes', the Windows Installer calls the RegDisableReflectionKey on each key - /// being accessed by the component. - /// This bit is available with Windows Installer version 4.0 and is ignored on 32-bit systems. - /// - public YesNoType DisableRegistryReflection - { - get - { - return this.disableRegistryReflectionField; - } - set - { - this.disableRegistryReflectionFieldSet = true; - this.disableRegistryReflectionField = value; - } - } - - /// - /// Sets the Directory of the Component. If this element is nested under a Directory element, - /// this value defaults to the value of the parent Directory/@Id. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - /// - /// This attribute provides a default DiskId attribute for all child File elements. Specifying - /// the DiskId on a Component element will override any DiskId attributes set by parent Directory - /// or DirectoryRef elements. See the File element's DiskId attribute for more information about - /// the purpose of the DiskId. - /// - public string DiskId - { - get - { - return this.diskIdField; - } - set - { - this.diskIdFieldSet = true; - this.diskIdField = value; - } - } - - /// - /// Identifies a feature to which this component belongs, as a shorthand for a child - /// ComponentRef element of the Feature element. The value of this attribute should - /// correspond to the Id attribute of a Feature element authored elsewhere. Note that - /// a single component can belong to multiple features but this attribute allows you - /// to specify only a single feature. - /// - public string Feature - { - get - { - return this.featureField; - } - set - { - this.featureFieldSet = true; - this.featureField = value; - } - } - - /// - /// This value should be a guid that uniquely identifies this component's contents, language, platform, and version. - /// If omitted, the default value is '*' which indicates that the linker should generate a stable guid. - /// Generatable guids are supported only for components with a single file as the component's keypath - /// or no files and a registry value as the keypath. - /// It's also possible to set the value to an empty string to specify an unmanaged component. - /// Unmanaged components are a security vulnerability because the component cannot be removed or repaired - /// by Windows Installer (it is essentially an unpatchable, permanent component). Therefore, a guid should - /// always be specified for any component which contains resources that may need to be patched in the future. - /// - public string Guid - { - get - { - return this.guidField; - } - set - { - this.guidFieldSet = true; - this.guidField = value; - } - } - - /// - /// If this attribute's value is set to 'yes', then the Directory of this Component is used - /// as the KeyPath. To set a Registry value or File as the KeyPath of a component, set the - /// KeyPath attribute to 'yes' on one of those child elements. If KeyPath is not set to 'yes' for the - /// Component or for a child Registry value or File, WiX will look at the child elements under the - /// Component in sequential order and try to automatically select one of them as a key path. Allowing - /// WiX to automatically select a key path can be dangerous because adding or removing child elements - /// under the Component can inadvertantly cause the key path to change, which can lead to - /// installation problems. - /// - public YesNoType KeyPath - { - get - { - return this.keyPathField; - } - set - { - this.keyPathFieldSet = true; - this.keyPathField = value; - } - } - - /// - /// Optional value that specifies the location that the component can be run from. - /// - public LocationType Location - { - get - { - return this.locationField; - } - set - { - this.locationFieldSet = true; - this.locationField = value; - } - } - - /// - /// If this attribute is set to 'yes', a new Component/@Guid will be generated for each - /// instance transform. Ensure that all of the resources contained in a multi-instance - /// Component will be installed to different paths based on the instance Property; otherwise, - /// the Component Rules will be violated. - /// - public YesNoType MultiInstance - { - get - { - return this.multiInstanceField; - } - set - { - this.multiInstanceFieldSet = true; - this.multiInstanceField = value; - } - } - - /// - /// If this attribute is set to 'yes', the installer does not install or reinstall the - /// component if a key path file or a key path registry entry for the component already - /// exists. The application does register itself as a client of the component. Use this - /// flag only for components that are being registered by the Registry table. Do not use - /// this flag for components registered by the AppId, Class, Extension, ProgId, MIME, and - /// Verb tables. - /// - public YesNoType NeverOverwrite - { - get - { - return this.neverOverwriteField; - } - set - { - this.neverOverwriteFieldSet = true; - this.neverOverwriteField = value; - } - } - - /// - /// If this attribute is set to 'yes', the installer does not remove the component during - /// an uninstall. The installer registers an extra system client for the component in - /// the Windows Installer registry settings (which basically just means that at least one - /// product is always referencing this component). Note that this option differs from the - /// behavior of not setting a guid because although the component is permanent, it is still - /// patchable (because Windows Installer still tracks it), it's just not uninstallable. - /// - public YesNoType Permanent - { - get - { - return this.permanentField; - } - set - { - this.permanentFieldSet = true; - this.permanentField = value; - } - } - - /// - /// If this attribute's value is set to 'yes', enables advanced patching semantics for - /// Components that are shared across multiple Products. Specifically, the Windows Installer - /// will cache the shared files to improve patch uninstall. This functionality is available - /// in Windows Installer 4.5 and later. - /// - public YesNoType Shared - { - get - { - return this.sharedField; - } - set - { - this.sharedFieldSet = true; - this.sharedField = value; - } - } - - /// - /// If this attribute's value is set to 'yes', the installer increments the reference count - /// in the shared DLL registry of the component's key file. If this bit is not set, the - /// installer increments the reference count only if the reference count already exists. - /// - public YesNoType SharedDllRefCount - { - get - { - return this.sharedDllRefCountField; - } - set - { - this.sharedDllRefCountFieldSet = true; - this.sharedDllRefCountField = value; - } - } - - /// - /// If this attribute is set to 'yes', the installer reevaluates the value of the statement - /// in the Condition upon a reinstall. If the value was previously False and has changed to - /// True, the installer installs the component. If the value was previously True and has - /// changed to False, the installer removes the component even if the component has other - /// products as clients. - /// - public YesNoType Transitive - { - get - { - return this.transitiveField; - } - set - { - this.transitiveFieldSet = true; - this.transitiveField = value; - } - } - - /// - /// If this attribute is set to 'yes', the installer will uninstall the Component's files - /// and registry keys when it is superseded by a patch. This functionality is available in - /// Windows Installer 4.5 and later. - /// - public YesNoType UninstallWhenSuperseded - { - get - { - return this.uninstallWhenSupersededField; - } - set - { - this.uninstallWhenSupersededFieldSet = true; - this.uninstallWhenSupersededField = value; - } - } - - /// - /// Set this attribute to 'yes' to mark this as a 64-bit component. This attribute facilitates - /// the installation of packages that include both 32-bit and 64-bit components. If this is a 64-bit - /// component replacing a 32-bit component, set this attribute to 'yes' and assign a new GUID in the Guid attribute. - /// The default value is based on the platform set by the -arch switch to candle.exe - /// or the InstallerPlatform property in a .wixproj MSBuild project: - /// For x86 and ARM, the default value is 'no'. - /// For x64 and IA64, the default value is 'yes'. - /// - public YesNoType Win64 - { - get - { - return this.win64Field; - } - set - { - this.win64FieldSet = true; - this.win64Field = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("AppId" == childName)) - { - childValue = new AppId(); - } - if (("Category" == childName)) - { - childValue = new Category(); - } - if (("Class" == childName)) - { - childValue = new Class(); - } - if (("Condition" == childName)) - { - childValue = new Condition(); - } - if (("CopyFile" == childName)) - { - childValue = new CopyFile(); - } - if (("CreateFolder" == childName)) - { - childValue = new CreateFolder(); - } - if (("Environment" == childName)) - { - childValue = new Environment(); - } - if (("Extension" == childName)) - { - childValue = new Extension(); - } - if (("File" == childName)) - { - childValue = new File(); - } - if (("IniFile" == childName)) - { - childValue = new IniFile(); - } - if (("Interface" == childName)) - { - childValue = new Interface(); - } - if (("IsolateComponent" == childName)) - { - childValue = new IsolateComponent(); - } - if (("ODBCDataSource" == childName)) - { - childValue = new ODBCDataSource(); - } - if (("ODBCDriver" == childName)) - { - childValue = new ODBCDriver(); - } - if (("ODBCTranslator" == childName)) - { - childValue = new ODBCTranslator(); - } - if (("ProgId" == childName)) - { - childValue = new ProgId(); - } - if (("Registry" == childName)) - { - childValue = new Registry(); - } - if (("RegistryKey" == childName)) - { - childValue = new RegistryKey(); - } - if (("RegistryValue" == childName)) - { - childValue = new RegistryValue(); - } - if (("RemoveFile" == childName)) - { - childValue = new RemoveFile(); - } - if (("RemoveFolder" == childName)) - { - childValue = new RemoveFolder(); - } - if (("RemoveRegistryKey" == childName)) - { - childValue = new RemoveRegistryKey(); - } - if (("RemoveRegistryValue" == childName)) - { - childValue = new RemoveRegistryValue(); - } - if (("ReserveCost" == childName)) - { - childValue = new ReserveCost(); - } - if (("ServiceControl" == childName)) - { - childValue = new ServiceControl(); - } - if (("ServiceConfig" == childName)) - { - childValue = new ServiceConfig(); - } - if (("ServiceConfigFailureActions" == childName)) - { - childValue = new ServiceConfigFailureActions(); - } - if (("ServiceInstall" == childName)) - { - childValue = new ServiceInstall(); - } - if (("Shortcut" == childName)) - { - childValue = new Shortcut(); - } - if (("SymbolPath" == childName)) - { - childValue = new SymbolPath(); - } - if (("TypeLib" == childName)) - { - childValue = new TypeLib(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a LocationType from a string. - /// - public static LocationType ParseLocationType(string value) - { - LocationType parsedValue; - Component.TryParseLocationType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a LocationType from a string. - /// - public static bool TryParseLocationType(string value, out LocationType parsedValue) - { - parsedValue = LocationType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("local" == value)) - { - parsedValue = LocationType.local; - } - else - { - if (("source" == value)) - { - parsedValue = LocationType.source; - } - else - { - if (("either" == value)) - { - parsedValue = LocationType.either; - } - else - { - parsedValue = LocationType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Component", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.comPlusFlagsFieldSet) - { - writer.WriteAttributeString("ComPlusFlags", this.comPlusFlagsField.ToString(CultureInfo.InvariantCulture)); - } - if (this.disableRegistryReflectionFieldSet) - { - if ((this.disableRegistryReflectionField == YesNoType.no)) - { - writer.WriteAttributeString("DisableRegistryReflection", "no"); - } - if ((this.disableRegistryReflectionField == YesNoType.yes)) - { - writer.WriteAttributeString("DisableRegistryReflection", "yes"); - } - } - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - if (this.diskIdFieldSet) - { - writer.WriteAttributeString("DiskId", this.diskIdField); - } - if (this.featureFieldSet) - { - writer.WriteAttributeString("Feature", this.featureField); - } - if (this.guidFieldSet) - { - writer.WriteAttributeString("Guid", this.guidField); - } - if (this.keyPathFieldSet) - { - if ((this.keyPathField == YesNoType.no)) - { - writer.WriteAttributeString("KeyPath", "no"); - } - if ((this.keyPathField == YesNoType.yes)) - { - writer.WriteAttributeString("KeyPath", "yes"); - } - } - if (this.locationFieldSet) - { - if ((this.locationField == LocationType.local)) - { - writer.WriteAttributeString("Location", "local"); - } - if ((this.locationField == LocationType.source)) - { - writer.WriteAttributeString("Location", "source"); - } - if ((this.locationField == LocationType.either)) - { - writer.WriteAttributeString("Location", "either"); - } - } - if (this.multiInstanceFieldSet) - { - if ((this.multiInstanceField == YesNoType.no)) - { - writer.WriteAttributeString("MultiInstance", "no"); - } - if ((this.multiInstanceField == YesNoType.yes)) - { - writer.WriteAttributeString("MultiInstance", "yes"); - } - } - if (this.neverOverwriteFieldSet) - { - if ((this.neverOverwriteField == YesNoType.no)) - { - writer.WriteAttributeString("NeverOverwrite", "no"); - } - if ((this.neverOverwriteField == YesNoType.yes)) - { - writer.WriteAttributeString("NeverOverwrite", "yes"); - } - } - if (this.permanentFieldSet) - { - if ((this.permanentField == YesNoType.no)) - { - writer.WriteAttributeString("Permanent", "no"); - } - if ((this.permanentField == YesNoType.yes)) - { - writer.WriteAttributeString("Permanent", "yes"); - } - } - if (this.sharedFieldSet) - { - if ((this.sharedField == YesNoType.no)) - { - writer.WriteAttributeString("Shared", "no"); - } - if ((this.sharedField == YesNoType.yes)) - { - writer.WriteAttributeString("Shared", "yes"); - } - } - if (this.sharedDllRefCountFieldSet) - { - if ((this.sharedDllRefCountField == YesNoType.no)) - { - writer.WriteAttributeString("SharedDllRefCount", "no"); - } - if ((this.sharedDllRefCountField == YesNoType.yes)) - { - writer.WriteAttributeString("SharedDllRefCount", "yes"); - } - } - if (this.transitiveFieldSet) - { - if ((this.transitiveField == YesNoType.no)) - { - writer.WriteAttributeString("Transitive", "no"); - } - if ((this.transitiveField == YesNoType.yes)) - { - writer.WriteAttributeString("Transitive", "yes"); - } - } - if (this.uninstallWhenSupersededFieldSet) - { - if ((this.uninstallWhenSupersededField == YesNoType.no)) - { - writer.WriteAttributeString("UninstallWhenSuperseded", "no"); - } - if ((this.uninstallWhenSupersededField == YesNoType.yes)) - { - writer.WriteAttributeString("UninstallWhenSuperseded", "yes"); - } - } - if (this.win64FieldSet) - { - if ((this.win64Field == YesNoType.no)) - { - writer.WriteAttributeString("Win64", "no"); - } - if ((this.win64Field == YesNoType.yes)) - { - writer.WriteAttributeString("Win64", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("ComPlusFlags" == name)) - { - this.comPlusFlagsField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.comPlusFlagsFieldSet = true; - } - if (("DisableRegistryReflection" == name)) - { - this.disableRegistryReflectionField = Enums.ParseYesNoType(value); - this.disableRegistryReflectionFieldSet = true; - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - if (("DiskId" == name)) - { - this.diskIdField = value; - this.diskIdFieldSet = true; - } - if (("Feature" == name)) - { - this.featureField = value; - this.featureFieldSet = true; - } - if (("Guid" == name)) - { - this.guidField = value; - this.guidFieldSet = true; - } - if (("KeyPath" == name)) - { - this.keyPathField = Enums.ParseYesNoType(value); - this.keyPathFieldSet = true; - } - if (("Location" == name)) - { - this.locationField = Component.ParseLocationType(value); - this.locationFieldSet = true; - } - if (("MultiInstance" == name)) - { - this.multiInstanceField = Enums.ParseYesNoType(value); - this.multiInstanceFieldSet = true; - } - if (("NeverOverwrite" == name)) - { - this.neverOverwriteField = Enums.ParseYesNoType(value); - this.neverOverwriteFieldSet = true; - } - if (("Permanent" == name)) - { - this.permanentField = Enums.ParseYesNoType(value); - this.permanentFieldSet = true; - } - if (("Shared" == name)) - { - this.sharedField = Enums.ParseYesNoType(value); - this.sharedFieldSet = true; - } - if (("SharedDllRefCount" == name)) - { - this.sharedDllRefCountField = Enums.ParseYesNoType(value); - this.sharedDllRefCountFieldSet = true; - } - if (("Transitive" == name)) - { - this.transitiveField = Enums.ParseYesNoType(value); - this.transitiveFieldSet = true; - } - if (("UninstallWhenSuperseded" == name)) - { - this.uninstallWhenSupersededField = Enums.ParseYesNoType(value); - this.uninstallWhenSupersededFieldSet = true; - } - if (("Win64" == name)) - { - this.win64Field = Enums.ParseYesNoType(value); - this.win64FieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum LocationType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Prevents the component from running from the source or the network (this is the default behavior if this attribute is not set). - /// - local, - - /// - /// Enforces that the component can only be run from the source (it cannot be run from the user's computer). - /// - source, - - /// - /// Allows the component to run from source or locally. - /// - either, - } - } - - /// - /// Groups together multiple components to be used in other locations. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ComponentGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string directoryField; - - private bool directoryFieldSet; - - private string sourceField; - - private bool sourceFieldSet; - - private ISchemaElement parentElement; - - public ComponentGroup() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for the ComponentGroup. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Sets the default directory identifier for child Component elements. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - /// - /// Used to set the default file system source for child Component elements. For more information, see - /// - public string Source - { - get - { - return this.sourceField; - } - set - { - this.sourceFieldSet = true; - this.sourceField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Component" == childName)) - { - childValue = new Component(); - } - if (("ComponentGroupRef" == childName)) - { - childValue = new ComponentGroupRef(); - } - if (("ComponentRef" == childName)) - { - childValue = new ComponentRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ComponentGroup", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - if (this.sourceFieldSet) - { - writer.WriteAttributeString("Source", this.sourceField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - if (("Source" == name)) - { - this.sourceField = value; - this.sourceFieldSet = true; - } - } - } - - /// - /// Create a reference to a ComponentGroup in another Fragment. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ComponentGroupRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private YesNoType primaryField; - - private bool primaryFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the ComponentGroup to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Set this attribute to 'yes' in order to make the parent feature of this component - /// the primary feature for this component. Components may belong to multiple features. - /// By designating a feature as the primary feature of a component, you ensure that - /// whenever a component is selected for install-on-demand (IOD), the primary feature - /// will be the one to install it. This attribute should only be set if a component - /// actually nests under multiple features. If a component nests under only one feature, - /// that feature is the primary feature for the component. You cannot set more than one - /// feature as the primary feature of a given component. - /// - public YesNoType Primary - { - get - { - return this.primaryField; - } - set - { - this.primaryFieldSet = true; - this.primaryField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ComponentGroupRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.primaryFieldSet) - { - if ((this.primaryField == YesNoType.no)) - { - writer.WriteAttributeString("Primary", "no"); - } - if ((this.primaryField == YesNoType.yes)) - { - writer.WriteAttributeString("Primary", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Primary" == name)) - { - this.primaryField = Enums.ParseYesNoType(value); - this.primaryFieldSet = true; - } - } - } - - /// - /// Used only for PatchFamilies to include all changes between the baseline and upgraded packages in a patch. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class All : ISetAttributes, ISchemaElement - { - - private ISchemaElement parentElement; - - private string contentField; - - private bool contentFieldSet; - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Used only for PatchFamilies to include all changes between the baseline and upgraded packages in a patch. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("All", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - } - - /// - /// Used only for PatchFamilies to include only a binary table entry in a patch. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class BinaryRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the Binary element to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("BinaryRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Used only for PatchFamilies to include only a icon table entry in a patch. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class IconRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the Icon element to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("IconRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Create a reference to a Feature element in another Fragment. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ComponentRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private YesNoType primaryField; - - private bool primaryFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the Component element to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Set this attribute to 'yes' in order to make the parent feature of this component - /// the primary feature for this component. Components may belong to multiple features. - /// By designating a feature as the primary feature of a component, you ensure that - /// whenever a component is selected for install-on-demand (IOD), the primary feature - /// will be the one to install it. This attribute should only be set if a component - /// actually nests under multiple features. If a component nests under only one feature, - /// that feature is the primary feature for the component. You cannot set more than one - /// feature as the primary feature of a given component. - /// - public YesNoType Primary - { - get - { - return this.primaryField; - } - set - { - this.primaryFieldSet = true; - this.primaryField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ComponentRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.primaryFieldSet) - { - if ((this.primaryField == YesNoType.no)) - { - writer.WriteAttributeString("Primary", "no"); - } - if ((this.primaryField == YesNoType.yes)) - { - writer.WriteAttributeString("Primary", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Primary" == name)) - { - this.primaryField = Enums.ParseYesNoType(value); - this.primaryFieldSet = true; - } - } - } - - /// - /// Merge directive to bring in a merge module that will be redirected to the parent directory. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Merge : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string diskIdField; - - private bool diskIdFieldSet; - - private YesNoType fileCompressionField; - - private bool fileCompressionFieldSet; - - private string languageField; - - private bool languageFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string srcField; - - private bool srcFieldSet; - - private ISchemaElement parentElement; - - public Merge() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ConfigurationData))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// The unique identifier for the Merge element in the source code. Referenced by the MergeRef/@Id. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The value of this attribute should correspond to the Id attribute of a - /// Media element authored elsewhere. By creating this connection between the merge module and Media - /// element, you set the packaging options to the values specified in the Media - /// element (values such as compression level, cab embedding, etc...). - /// - public string DiskId - { - get - { - return this.diskIdField; - } - set - { - this.diskIdFieldSet = true; - this.diskIdField = value; - } - } - - /// - /// Specifies if the files in the merge module should be compressed. - /// - public YesNoType FileCompression - { - get - { - return this.fileCompressionField; - } - set - { - this.fileCompressionFieldSet = true; - this.fileCompressionField = value; - } - } - - /// - /// Specifies the decimal LCID or localization token for the language to merge the Module in as. - /// - public string Language - { - get - { - return this.languageField; - } - set - { - this.languageFieldSet = true; - this.languageField = value; - } - } - - /// - /// Path to the source location of the merge module. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string src - { - get - { - return this.srcField; - } - set - { - this.srcFieldSet = true; - this.srcField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ConfigurationData" == childName)) - { - childValue = new ConfigurationData(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Merge", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.diskIdFieldSet) - { - writer.WriteAttributeString("DiskId", this.diskIdField); - } - if (this.fileCompressionFieldSet) - { - if ((this.fileCompressionField == YesNoType.no)) - { - writer.WriteAttributeString("FileCompression", "no"); - } - if ((this.fileCompressionField == YesNoType.yes)) - { - writer.WriteAttributeString("FileCompression", "yes"); - } - } - if (this.languageFieldSet) - { - writer.WriteAttributeString("Language", this.languageField); - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.srcFieldSet) - { - writer.WriteAttributeString("src", this.srcField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("DiskId" == name)) - { - this.diskIdField = value; - this.diskIdFieldSet = true; - } - if (("FileCompression" == name)) - { - this.fileCompressionField = Enums.ParseYesNoType(value); - this.fileCompressionFieldSet = true; - } - if (("Language" == name)) - { - this.languageField = value; - this.languageFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("src" == name)) - { - this.srcField = value; - this.srcFieldSet = true; - } - } - } - - /// - /// Merge reference to connect a Merge Module to parent Feature - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MergeRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private YesNoType primaryField; - - private bool primaryFieldSet; - - private ISchemaElement parentElement; - - /// - /// The unique identifier for the Merge element to be referenced. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Specifies whether the feature containing this MergeRef is the primary feature for advertising the merge module's components. - /// - public YesNoType Primary - { - get - { - return this.primaryField; - } - set - { - this.primaryFieldSet = true; - this.primaryField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MergeRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.primaryFieldSet) - { - if ((this.primaryField == YesNoType.no)) - { - writer.WriteAttributeString("Primary", "no"); - } - if ((this.primaryField == YesNoType.yes)) - { - writer.WriteAttributeString("Primary", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Primary" == name)) - { - this.primaryField = Enums.ParseYesNoType(value); - this.primaryFieldSet = true; - } - } - } - - /// - /// Data to use as input to a configurable merge module. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ConfigurationData : ISchemaElement, ISetAttributes - { - - private string nameField; - - private bool nameFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - /// - /// Name of the item in the ModuleConfiguration table. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Value to be passed to configurable merge module. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ConfigurationData", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - } - - /// - /// Directory layout for the product. Also specifies the mappings between source and target directories. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Directory : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string componentGuidGenerationSeedField; - - private bool componentGuidGenerationSeedFieldSet; - - private string diskIdField; - - private bool diskIdFieldSet; - - private string fileSourceField; - - private bool fileSourceFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string shortNameField; - - private bool shortNameFieldSet; - - private string shortSourceNameField; - - private bool shortSourceNameFieldSet; - - private string sourceNameField; - - private bool sourceNameFieldSet; - - private string srcField; - - private bool srcFieldSet; - - private ISchemaElement parentElement; - - public Directory() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Merge))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// This value is the unique identifier of the directory entry. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The Component Guid Generation Seed is a guid that must be used when a Component with the generate guid directive ("*") - /// is not rooted in a standard Windows Installer directory (for example, ProgramFilesFolder or CommonFilesFolder). - /// It is recommended that this attribute be avoided and that developers install their Components under standard - /// directories with unique names instead (for example, "ProgramFilesFolder\Company Name Product Name Version"). It is - /// important to note that once a directory is assigned a Component Guid Generation Seed the value must not change until - /// (and must be changed when) the path to that directory, including itself and all parent directories, changes. - /// - public string ComponentGuidGenerationSeed - { - get - { - return this.componentGuidGenerationSeedField; - } - set - { - this.componentGuidGenerationSeedFieldSet = true; - this.componentGuidGenerationSeedField = value; - } - } - - /// - /// Sets the default disk identifier for the files contained in this directory. - /// This attribute's value may be overridden by a child Component, Directory, - /// Merge or File element. See the File or Merge elements' DiskId attribute for - /// more information. - /// - public string DiskId - { - get - { - return this.diskIdField; - } - set - { - this.diskIdFieldSet = true; - this.diskIdField = value; - } - } - - /// - /// Used to set the file system source for this directory's child elements. For more information, see - /// - public string FileSource - { - get - { - return this.fileSourceField; - } - set - { - this.fileSourceFieldSet = true; - this.fileSourceField = value; - } - } - - /// - /// The name of the directory. - /// - /// Do not specify this attribute if this directory represents - /// the same directory as the parent (see the Windows Installer SDK's - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The short name of the directory in 8.3 format. - /// This attribute should only be set if there is a conflict between generated short directory names - /// or the user wants to manually specify the short directory name. - /// - public string ShortName - { - get - { - return this.shortNameField; - } - set - { - this.shortNameFieldSet = true; - this.shortNameField = value; - } - } - - /// - /// The short name of the directory on the source media in 8.3 format. - /// This attribute should only be set if there is a conflict between generated short directory names - /// or the user wants to manually specify the short source directory name. - /// - public string ShortSourceName - { - get - { - return this.shortSourceNameField; - } - set - { - this.shortSourceNameFieldSet = true; - this.shortSourceNameField = value; - } - } - - /// - /// The name of the directory on the source media. - /// If this attribute is not specified, Windows Installer will default to the Name attribute. - /// - /// In prior versions of the WiX toolset, this attribute specified the short source directory name. - /// This attribute's value may now be either a short or long directory name. - /// If a short directory name is specified, the ShortSourceName attribute may not be specified. - /// If a long directory name is specified, the LongSource attribute may not be specified. - /// Also, if this value is a long directory name, the ShortSourceName attribute may be omitted to - /// allow WiX to attempt to generate a unique short directory name. - /// However, if this name collides with another directory or you wish to manually specify - /// the short directory name, then the ShortSourceName attribute may be specified. - /// - public string SourceName - { - get - { - return this.sourceNameField; - } - set - { - this.sourceNameFieldSet = true; - this.sourceNameField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string src - { - get - { - return this.srcField; - } - set - { - this.srcFieldSet = true; - this.srcField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Component" == childName)) - { - childValue = new Component(); - } - if (("Directory" == childName)) - { - childValue = new Directory(); - } - if (("Merge" == childName)) - { - childValue = new Merge(); - } - if (("SymbolPath" == childName)) - { - childValue = new SymbolPath(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Directory", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.componentGuidGenerationSeedFieldSet) - { - writer.WriteAttributeString("ComponentGuidGenerationSeed", this.componentGuidGenerationSeedField); - } - if (this.diskIdFieldSet) - { - writer.WriteAttributeString("DiskId", this.diskIdField); - } - if (this.fileSourceFieldSet) - { - writer.WriteAttributeString("FileSource", this.fileSourceField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.shortNameFieldSet) - { - writer.WriteAttributeString("ShortName", this.shortNameField); - } - if (this.shortSourceNameFieldSet) - { - writer.WriteAttributeString("ShortSourceName", this.shortSourceNameField); - } - if (this.sourceNameFieldSet) - { - writer.WriteAttributeString("SourceName", this.sourceNameField); - } - if (this.srcFieldSet) - { - writer.WriteAttributeString("src", this.srcField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("ComponentGuidGenerationSeed" == name)) - { - this.componentGuidGenerationSeedField = value; - this.componentGuidGenerationSeedFieldSet = true; - } - if (("DiskId" == name)) - { - this.diskIdField = value; - this.diskIdFieldSet = true; - } - if (("FileSource" == name)) - { - this.fileSourceField = value; - this.fileSourceFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("ShortName" == name)) - { - this.shortNameField = value; - this.shortNameFieldSet = true; - } - if (("ShortSourceName" == name)) - { - this.shortSourceNameField = value; - this.shortSourceNameFieldSet = true; - } - if (("SourceName" == name)) - { - this.sourceNameField = value; - this.sourceNameFieldSet = true; - } - if (("src" == name)) - { - this.srcField = value; - this.srcFieldSet = true; - } - } - } - - /// - /// Create a reference to a Directory element in another Fragment. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class DirectoryRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string diskIdField; - - private bool diskIdFieldSet; - - private string fileSourceField; - - private bool fileSourceFieldSet; - - private string srcField; - - private bool srcFieldSet; - - private ISchemaElement parentElement; - - public DirectoryRef() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Directory))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Merge))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// The identifier of the Directory element to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Sets the default disk identifier for the files contained in this directory. - /// This attribute's value may be overridden by a child Component, Directory, - /// Merge or File element. See the File or Merge elements' DiskId attribute for - /// more information. - /// - public string DiskId - { - get - { - return this.diskIdField; - } - set - { - this.diskIdFieldSet = true; - this.diskIdField = value; - } - } - - /// - /// Used to set the file system source for this DirectoryRef's child elements. For more information, see - /// - public string FileSource - { - get - { - return this.fileSourceField; - } - set - { - this.fileSourceFieldSet = true; - this.fileSourceField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string src - { - get - { - return this.srcField; - } - set - { - this.srcFieldSet = true; - this.srcField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Component" == childName)) - { - childValue = new Component(); - } - if (("Directory" == childName)) - { - childValue = new Directory(); - } - if (("Merge" == childName)) - { - childValue = new Merge(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DirectoryRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.diskIdFieldSet) - { - writer.WriteAttributeString("DiskId", this.diskIdField); - } - if (this.fileSourceFieldSet) - { - writer.WriteAttributeString("FileSource", this.fileSourceField); - } - if (this.srcFieldSet) - { - writer.WriteAttributeString("src", this.srcField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("DiskId" == name)) - { - this.diskIdField = value; - this.diskIdFieldSet = true; - } - if (("FileSource" == name)) - { - this.fileSourceField = value; - this.fileSourceFieldSet = true; - } - if (("src" == name)) - { - this.srcField = value; - this.srcFieldSet = true; - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UpgradeVersion : ISchemaElement, ISetAttributes - { - - private string minimumField; - - private bool minimumFieldSet; - - private string maximumField; - - private bool maximumFieldSet; - - private string languageField; - - private bool languageFieldSet; - - private string removeFeaturesField; - - private bool removeFeaturesFieldSet; - - private string propertyField; - - private bool propertyFieldSet; - - private YesNoType migrateFeaturesField; - - private bool migrateFeaturesFieldSet; - - private YesNoType onlyDetectField; - - private bool onlyDetectFieldSet; - - private YesNoType ignoreRemoveFailureField; - - private bool ignoreRemoveFailureFieldSet; - - private YesNoType includeMinimumField; - - private bool includeMinimumFieldSet; - - private YesNoType includeMaximumField; - - private bool includeMaximumFieldSet; - - private YesNoType excludeLanguagesField; - - private bool excludeLanguagesFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// Specifies the lower bound on the range of product versions to be detected by FindRelatedProducts. - /// - public string Minimum - { - get - { - return this.minimumField; - } - set - { - this.minimumFieldSet = true; - this.minimumField = value; - } - } - - /// - /// Specifies the upper boundary of the range of product versions detected by FindRelatedProducts. - /// - public string Maximum - { - get - { - return this.maximumField; - } - set - { - this.maximumFieldSet = true; - this.maximumField = value; - } - } - - /// - /// 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. - /// - public string Language - { - get - { - return this.languageField; - } - set - { - this.languageFieldSet = true; - this.languageField = value; - } - } - - /// - /// 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. - /// - public string RemoveFeatures - { - get - { - return this.removeFeaturesField; - } - set - { - this.removeFeaturesFieldSet = true; - this.removeFeaturesField = value; - } - } - - /// - /// 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 - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - /// - /// Set to "yes" to migrate feature states from upgraded products by enabling the logic in the MigrateFeatureStates action. - /// - public YesNoType MigrateFeatures - { - get - { - return this.migrateFeaturesField; - } - set - { - this.migrateFeaturesFieldSet = true; - this.migrateFeaturesField = value; - } - } - - /// - /// Set to "yes" to detect products and applications but do not uninstall. - /// - public YesNoType OnlyDetect - { - get - { - return this.onlyDetectField; - } - set - { - this.onlyDetectFieldSet = true; - this.onlyDetectField = value; - } - } - - /// - /// Set to "yes" to continue installation upon failure to remove a product or application. - /// - public YesNoType IgnoreRemoveFailure - { - get - { - return this.ignoreRemoveFailureField; - } - set - { - this.ignoreRemoveFailureFieldSet = true; - this.ignoreRemoveFailureField = value; - } - } - - /// - /// Set to "no" to make the range of versions detected exclude the value specified in Minimum. This attribute is "yes" by default. - /// - public YesNoType IncludeMinimum - { - get - { - return this.includeMinimumField; - } - set - { - this.includeMinimumFieldSet = true; - this.includeMinimumField = value; - } - } - - /// - /// Set to "yes" to make the range of versions detected include the value specified in Maximum. - /// - public YesNoType IncludeMaximum - { - get - { - return this.includeMaximumField; - } - set - { - this.includeMaximumFieldSet = true; - this.includeMaximumField = value; - } - } - - /// - /// Set to "yes" to detect all languages, excluding the languages listed in the Language attribute. - /// - public YesNoType ExcludeLanguages - { - get - { - return this.excludeLanguagesField; - } - set - { - this.excludeLanguagesFieldSet = true; - this.excludeLanguagesField = value; - } - } - - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UpgradeVersion", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.minimumFieldSet) - { - writer.WriteAttributeString("Minimum", this.minimumField); - } - if (this.maximumFieldSet) - { - writer.WriteAttributeString("Maximum", this.maximumField); - } - if (this.languageFieldSet) - { - writer.WriteAttributeString("Language", this.languageField); - } - if (this.removeFeaturesFieldSet) - { - writer.WriteAttributeString("RemoveFeatures", this.removeFeaturesField); - } - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - if (this.migrateFeaturesFieldSet) - { - if ((this.migrateFeaturesField == YesNoType.no)) - { - writer.WriteAttributeString("MigrateFeatures", "no"); - } - if ((this.migrateFeaturesField == YesNoType.yes)) - { - writer.WriteAttributeString("MigrateFeatures", "yes"); - } - } - if (this.onlyDetectFieldSet) - { - if ((this.onlyDetectField == YesNoType.no)) - { - writer.WriteAttributeString("OnlyDetect", "no"); - } - if ((this.onlyDetectField == YesNoType.yes)) - { - writer.WriteAttributeString("OnlyDetect", "yes"); - } - } - if (this.ignoreRemoveFailureFieldSet) - { - if ((this.ignoreRemoveFailureField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreRemoveFailure", "no"); - } - if ((this.ignoreRemoveFailureField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreRemoveFailure", "yes"); - } - } - if (this.includeMinimumFieldSet) - { - if ((this.includeMinimumField == YesNoType.no)) - { - writer.WriteAttributeString("IncludeMinimum", "no"); - } - if ((this.includeMinimumField == YesNoType.yes)) - { - writer.WriteAttributeString("IncludeMinimum", "yes"); - } - } - if (this.includeMaximumFieldSet) - { - if ((this.includeMaximumField == YesNoType.no)) - { - writer.WriteAttributeString("IncludeMaximum", "no"); - } - if ((this.includeMaximumField == YesNoType.yes)) - { - writer.WriteAttributeString("IncludeMaximum", "yes"); - } - } - if (this.excludeLanguagesFieldSet) - { - if ((this.excludeLanguagesField == YesNoType.no)) - { - writer.WriteAttributeString("ExcludeLanguages", "no"); - } - if ((this.excludeLanguagesField == YesNoType.yes)) - { - writer.WriteAttributeString("ExcludeLanguages", "yes"); - } - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Minimum" == name)) - { - this.minimumField = value; - this.minimumFieldSet = true; - } - if (("Maximum" == name)) - { - this.maximumField = value; - this.maximumFieldSet = true; - } - if (("Language" == name)) - { - this.languageField = value; - this.languageFieldSet = true; - } - if (("RemoveFeatures" == name)) - { - this.removeFeaturesField = value; - this.removeFeaturesFieldSet = true; - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - if (("MigrateFeatures" == name)) - { - this.migrateFeaturesField = Enums.ParseYesNoType(value); - this.migrateFeaturesFieldSet = true; - } - if (("OnlyDetect" == name)) - { - this.onlyDetectField = Enums.ParseYesNoType(value); - this.onlyDetectFieldSet = true; - } - if (("IgnoreRemoveFailure" == name)) - { - this.ignoreRemoveFailureField = Enums.ParseYesNoType(value); - this.ignoreRemoveFailureFieldSet = true; - } - if (("IncludeMinimum" == name)) - { - this.includeMinimumField = Enums.ParseYesNoType(value); - this.includeMinimumFieldSet = true; - } - if (("IncludeMaximum" == name)) - { - this.includeMaximumField = Enums.ParseYesNoType(value); - this.includeMaximumFieldSet = true; - } - if (("ExcludeLanguages" == name)) - { - this.excludeLanguagesField = Enums.ParseYesNoType(value); - this.excludeLanguagesFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - /// - /// Upgrade info for a particular UpgradeCode - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Upgrade : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public Upgrade() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UpgradeVersion))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// This value specifies the upgrade code for the products that are to be detected by the FindRelatedProducts action. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("UpgradeVersion" == childName)) - { - childValue = new UpgradeVersion(); - } - if (("Property" == childName)) - { - childValue = new Property(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Upgrade", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// A feature for the Feature table. Features are the smallest installable unit. See msi.chm for more - /// detailed information on the myriad installation options for a feature. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Feature : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private AbsentType absentField; - - private bool absentFieldSet; - - private AllowAdvertiseType allowAdvertiseField; - - private bool allowAdvertiseFieldSet; - - private string configurableDirectoryField; - - private bool configurableDirectoryFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private string displayField; - - private bool displayFieldSet; - - private InstallDefaultType installDefaultField; - - private bool installDefaultFieldSet; - - private int levelField; - - private bool levelFieldSet; - - private string titleField; - - private bool titleFieldSet; - - private TypicalDefaultType typicalDefaultField; - - private bool typicalDefaultFieldSet; - - private ISchemaElement parentElement; - - public Feature() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Condition))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Unique identifier of the feature. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// This attribute determines if a user will have the option to set a feature to absent in the user interface. - /// - public AbsentType Absent - { - get - { - return this.absentField; - } - set - { - this.absentFieldSet = true; - this.absentField = value; - } - } - - /// - /// This attribute determines the possible advertise states for this feature. - /// - public AllowAdvertiseType AllowAdvertise - { - get - { - return this.allowAdvertiseField; - } - set - { - this.allowAdvertiseFieldSet = true; - this.allowAdvertiseField = value; - } - } - - /// - /// Specify the Id of a Directory that can be configured by the user at installation time. This identifier - /// must be a public property and therefore completely uppercase. - /// - public string ConfigurableDirectory - { - get - { - return this.configurableDirectoryField; - } - set - { - this.configurableDirectoryFieldSet = true; - this.configurableDirectoryField = value; - } - } - - /// - /// Longer string of text describing the feature. This localizable string is displayed by the - /// Text Control of the Selection Dialog. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// Determines the initial display of this feature in the feature tree. - /// This attribute's value should be one of the following: - /// - public string Display - { - get - { - return this.displayField; - } - set - { - this.displayFieldSet = true; - this.displayField = value; - } - } - - /// - /// This attribute determines the default install/run location of a feature. This attribute cannot be specified - /// if the value of the FollowParent attribute is 'yes' since that would ask the installer to force this feature - /// to follow the parent installation state and simultaneously favor a particular installation state just for this feature. - /// - public InstallDefaultType InstallDefault - { - get - { - return this.installDefaultField; - } - set - { - this.installDefaultFieldSet = true; - this.installDefaultField = value; - } - } - - /// - /// Sets the install level of this feature. A value of 0 will disable the feature. Processing the - /// Condition Table can modify the level value (this is set via the Condition child element). The - /// default value is "1". - /// - public int Level - { - get - { - return this.levelField; - } - set - { - this.levelFieldSet = true; - this.levelField = value; - } - } - - /// - /// Short string of text identifying the feature. This string is listed as an item by the - /// SelectionTree control of the Selection Dialog. - /// - public string Title - { - get - { - return this.titleField; - } - set - { - this.titleFieldSet = true; - this.titleField = value; - } - } - - /// - /// This attribute determines the default advertise state of the feature. - /// - public TypicalDefaultType TypicalDefault - { - get - { - return this.typicalDefaultField; - } - set - { - this.typicalDefaultFieldSet = true; - this.typicalDefaultField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Component" == childName)) - { - childValue = new Component(); - } - if (("ComponentGroupRef" == childName)) - { - childValue = new ComponentGroupRef(); - } - if (("ComponentRef" == childName)) - { - childValue = new ComponentRef(); - } - if (("Condition" == childName)) - { - childValue = new Condition(); - } - if (("Feature" == childName)) - { - childValue = new Feature(); - } - if (("FeatureGroupRef" == childName)) - { - childValue = new FeatureGroupRef(); - } - if (("FeatureRef" == childName)) - { - childValue = new FeatureRef(); - } - if (("MergeRef" == childName)) - { - childValue = new MergeRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a AbsentType from a string. - /// - public static AbsentType ParseAbsentType(string value) - { - AbsentType parsedValue; - Feature.TryParseAbsentType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a AbsentType from a string. - /// - public static bool TryParseAbsentType(string value, out AbsentType parsedValue) - { - parsedValue = AbsentType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("allow" == value)) - { - parsedValue = AbsentType.allow; - } - else - { - if (("disallow" == value)) - { - parsedValue = AbsentType.disallow; - } - else - { - parsedValue = AbsentType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Parses a AllowAdvertiseType from a string. - /// - public static AllowAdvertiseType ParseAllowAdvertiseType(string value) - { - AllowAdvertiseType parsedValue; - Feature.TryParseAllowAdvertiseType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a AllowAdvertiseType from a string. - /// - public static bool TryParseAllowAdvertiseType(string value, out AllowAdvertiseType parsedValue) - { - parsedValue = AllowAdvertiseType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("no" == value)) - { - parsedValue = AllowAdvertiseType.no; - } - else - { - if (("system" == value)) - { - parsedValue = AllowAdvertiseType.system; - } - else - { - if (("yes" == value)) - { - parsedValue = AllowAdvertiseType.yes; - } - else - { - parsedValue = AllowAdvertiseType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a InstallDefaultType from a string. - /// - public static InstallDefaultType ParseInstallDefaultType(string value) - { - InstallDefaultType parsedValue; - Feature.TryParseInstallDefaultType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a InstallDefaultType from a string. - /// - public static bool TryParseInstallDefaultType(string value, out InstallDefaultType parsedValue) - { - parsedValue = InstallDefaultType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("followParent" == value)) - { - parsedValue = InstallDefaultType.followParent; - } - else - { - if (("local" == value)) - { - parsedValue = InstallDefaultType.local; - } - else - { - if (("source" == value)) - { - parsedValue = InstallDefaultType.source; - } - else - { - parsedValue = InstallDefaultType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a TypicalDefaultType from a string. - /// - public static TypicalDefaultType ParseTypicalDefaultType(string value) - { - TypicalDefaultType parsedValue; - Feature.TryParseTypicalDefaultType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypicalDefaultType from a string. - /// - public static bool TryParseTypicalDefaultType(string value, out TypicalDefaultType parsedValue) - { - parsedValue = TypicalDefaultType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("advertise" == value)) - { - parsedValue = TypicalDefaultType.advertise; - } - else - { - if (("install" == value)) - { - parsedValue = TypicalDefaultType.install; - } - else - { - parsedValue = TypicalDefaultType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Feature", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.absentFieldSet) - { - if ((this.absentField == AbsentType.allow)) - { - writer.WriteAttributeString("Absent", "allow"); - } - if ((this.absentField == AbsentType.disallow)) - { - writer.WriteAttributeString("Absent", "disallow"); - } - } - if (this.allowAdvertiseFieldSet) - { - if ((this.allowAdvertiseField == AllowAdvertiseType.no)) - { - writer.WriteAttributeString("AllowAdvertise", "no"); - } - if ((this.allowAdvertiseField == AllowAdvertiseType.system)) - { - writer.WriteAttributeString("AllowAdvertise", "system"); - } - if ((this.allowAdvertiseField == AllowAdvertiseType.yes)) - { - writer.WriteAttributeString("AllowAdvertise", "yes"); - } - } - if (this.configurableDirectoryFieldSet) - { - writer.WriteAttributeString("ConfigurableDirectory", this.configurableDirectoryField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.displayFieldSet) - { - writer.WriteAttributeString("Display", this.displayField); - } - if (this.installDefaultFieldSet) - { - if ((this.installDefaultField == InstallDefaultType.followParent)) - { - writer.WriteAttributeString("InstallDefault", "followParent"); - } - if ((this.installDefaultField == InstallDefaultType.local)) - { - writer.WriteAttributeString("InstallDefault", "local"); - } - if ((this.installDefaultField == InstallDefaultType.source)) - { - writer.WriteAttributeString("InstallDefault", "source"); - } - } - if (this.levelFieldSet) - { - writer.WriteAttributeString("Level", this.levelField.ToString(CultureInfo.InvariantCulture)); - } - if (this.titleFieldSet) - { - writer.WriteAttributeString("Title", this.titleField); - } - if (this.typicalDefaultFieldSet) - { - if ((this.typicalDefaultField == TypicalDefaultType.advertise)) - { - writer.WriteAttributeString("TypicalDefault", "advertise"); - } - if ((this.typicalDefaultField == TypicalDefaultType.install)) - { - writer.WriteAttributeString("TypicalDefault", "install"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Absent" == name)) - { - this.absentField = Feature.ParseAbsentType(value); - this.absentFieldSet = true; - } - if (("AllowAdvertise" == name)) - { - this.allowAdvertiseField = Feature.ParseAllowAdvertiseType(value); - this.allowAdvertiseFieldSet = true; - } - if (("ConfigurableDirectory" == name)) - { - this.configurableDirectoryField = value; - this.configurableDirectoryFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("Display" == name)) - { - this.displayField = value; - this.displayFieldSet = true; - } - if (("InstallDefault" == name)) - { - this.installDefaultField = Feature.ParseInstallDefaultType(value); - this.installDefaultFieldSet = true; - } - if (("Level" == name)) - { - this.levelField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.levelFieldSet = true; - } - if (("Title" == name)) - { - this.titleField = value; - this.titleFieldSet = true; - } - if (("TypicalDefault" == name)) - { - this.typicalDefaultField = Feature.ParseTypicalDefaultType(value); - this.typicalDefaultFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum AbsentType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Allows the user interface to display an option to change the feature state to Absent. - /// - allow, - - /// - /// Prevents the user interface from displaying an option to change the feature state - /// to Absent by setting the msidbFeatureAttributesUIDisallowAbsent attribute. This will force the feature - /// to the installation state, whether or not the feature is visible in the UI. - /// - disallow, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum AllowAdvertiseType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Prevents this feature from being advertised by setting the msidbFeatureAttributesDisallowAdvertise attribute. - /// - no, - - /// - /// Prevents advertising for this feature if the operating system shell does not support Windows Installer - /// descriptors by setting the msidbFeatureAttributesNoUnsupportedAdvertise attribute. - /// - system, - - /// - /// Allows the feature to be advertised. - /// - yes, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum InstallDefaultType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Forces the feature to follow the same installation state as its parent feature. - /// - followParent, - - /// - /// Favors installing this feature locally by setting the msidbFeatureAttributesFavorLocal attribute. - /// - local, - - /// - /// Favors running this feature from source by setting the msidbFeatureAttributesFavorSource attribute. - /// - source, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum TypicalDefaultType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Sets the feature to be advertised by setting the msidbFeatureAttributesFavorAdvertise attribute. - /// This value cannot be set if the value of the AllowAdvertise attribute is 'no' since that would ask the installer to - /// disallow the advertised state for this feature while at the same time favoring it. - /// - advertise, - - /// - /// Sets the feature to the default non-advertised installation option. - /// - install, - } - } - - /// - /// Groups together multiple components, features, and merges to be used in other locations. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class FeatureGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public FeatureGroup() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for the FeatureGroup. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Component" == childName)) - { - childValue = new Component(); - } - if (("ComponentGroupRef" == childName)) - { - childValue = new ComponentGroupRef(); - } - if (("ComponentRef" == childName)) - { - childValue = new ComponentRef(); - } - if (("Feature" == childName)) - { - childValue = new Feature(); - } - if (("FeatureGroupRef" == childName)) - { - childValue = new FeatureGroupRef(); - } - if (("FeatureRef" == childName)) - { - childValue = new FeatureRef(); - } - if (("MergeRef" == childName)) - { - childValue = new MergeRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FeatureGroup", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Create a reference to a FeatureGroup in another Fragment. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class FeatureGroupRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private YesNoType ignoreParentField; - - private bool ignoreParentFieldSet; - - private YesNoType primaryField; - - private bool primaryFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the FeatureGroup to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Normally feature group references that end up nested under a parent element create a - /// connection to that parent. This behavior is undesirable when trying to simply reference - /// to a FeatureGroup in a different Fragment. Specify 'yes' to have this feature group - /// reference not create a connection to its parent. The default is 'no'. - /// - public YesNoType IgnoreParent - { - get - { - return this.ignoreParentField; - } - set - { - this.ignoreParentFieldSet = true; - this.ignoreParentField = value; - } - } - - /// - /// Set this attribute to 'yes' in order to make the parent feature of this group - /// the primary feature for any components and merges contained in the group. - /// Features may belong to multiple features. By designating a feature as the - /// primary feature of a component or merge, you ensure that whenever a component is - /// selected for install-on-demand (IOD), the primary feature will be the one to install - /// it. This attribute should only be set if a component actually nests under multiple - /// features. If a component nests under only one feature, that feature is the primary - /// feature for the component. You cannot set more than one feature as the primary - /// feature of a given component. - /// - public YesNoType Primary - { - get - { - return this.primaryField; - } - set - { - this.primaryFieldSet = true; - this.primaryField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FeatureGroupRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.ignoreParentFieldSet) - { - if ((this.ignoreParentField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreParent", "no"); - } - if ((this.ignoreParentField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreParent", "yes"); - } - } - if (this.primaryFieldSet) - { - if ((this.primaryField == YesNoType.no)) - { - writer.WriteAttributeString("Primary", "no"); - } - if ((this.primaryField == YesNoType.yes)) - { - writer.WriteAttributeString("Primary", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("IgnoreParent" == name)) - { - this.ignoreParentField = Enums.ParseYesNoType(value); - this.ignoreParentFieldSet = true; - } - if (("Primary" == name)) - { - this.primaryField = Enums.ParseYesNoType(value); - this.primaryFieldSet = true; - } - } - } - - /// - /// Create a reference to a Feature element in another Fragment. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class FeatureRef : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private YesNoType ignoreParentField; - - private bool ignoreParentFieldSet; - - private ISchemaElement parentElement; - - public FeatureRef() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Component))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComponentRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Feature))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroup))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FeatureGroupRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MergeRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// The identifier of the Feature element to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Normally feature references that are nested under a parent element create a connection to that - /// parent. This behavior is undesirable when trying to simply reference a Feature in a different - /// Fragment. Specify 'yes' to have this feature reference not create a connection to its parent. - /// The default is 'no'. - /// - public YesNoType IgnoreParent - { - get - { - return this.ignoreParentField; - } - set - { - this.ignoreParentFieldSet = true; - this.ignoreParentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Component" == childName)) - { - childValue = new Component(); - } - if (("ComponentGroupRef" == childName)) - { - childValue = new ComponentGroupRef(); - } - if (("ComponentRef" == childName)) - { - childValue = new ComponentRef(); - } - if (("Feature" == childName)) - { - childValue = new Feature(); - } - if (("FeatureRef" == childName)) - { - childValue = new FeatureRef(); - } - if (("FeatureGroup" == childName)) - { - childValue = new FeatureGroup(); - } - if (("FeatureGroupRef" == childName)) - { - childValue = new FeatureGroupRef(); - } - if (("MergeRef" == childName)) - { - childValue = new MergeRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FeatureRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.ignoreParentFieldSet) - { - if ((this.ignoreParentField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreParent", "no"); - } - if ((this.ignoreParentField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreParent", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("IgnoreParent" == name)) - { - this.ignoreParentField = Enums.ParseYesNoType(value); - this.ignoreParentFieldSet = true; - } - } - } - - /// - /// Media element describes a disk that makes up the source media for the installation. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Media : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string cabinetField; - - private bool cabinetFieldSet; - - private CompressionLevelType compressionLevelField; - - private bool compressionLevelFieldSet; - - private string diskPromptField; - - private bool diskPromptFieldSet; - - private YesNoType embedCabField; - - private bool embedCabFieldSet; - - private string layoutField; - - private bool layoutFieldSet; - - private string srcField; - - private bool srcFieldSet; - - private string volumeLabelField; - - private bool volumeLabelFieldSet; - - private string sourceField; - - private bool sourceFieldSet; - - private ISchemaElement parentElement; - - public Media() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(DigitalSignature))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(PatchBaseline))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(SymbolPath))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Disk identifier for Media table. This number must be equal to or greater than 1. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// 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. - /// - public string Cabinet - { - get - { - return this.cabinetField; - } - set - { - this.cabinetFieldSet = true; - this.cabinetField = value; - } - } - - /// - /// Indicates the compression level for the Media's cabinet. This attribute can - /// only be used in conjunction with the Cabinet attribute. The default is 'mszip'. - /// - public CompressionLevelType CompressionLevel - { - get - { - return this.compressionLevelField; - } - set - { - this.compressionLevelFieldSet = true; - this.compressionLevelField = value; - } - } - - /// - /// 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. - /// - public string DiskPrompt - { - get - { - return this.diskPromptField; - } - set - { - this.diskPromptFieldSet = true; - this.diskPromptField = value; - } - } - - /// - /// Instructs the binder to embed the cabinet in the product if 'yes'. This attribute can only be specified in conjunction with the Cabinet attribute. - /// - public YesNoType EmbedCab - { - get - { - return this.embedCabField; - } - set - { - this.embedCabFieldSet = true; - this.embedCabField = value; - } - } - - /// - /// This attribute specifies the root directory for the uncompressed files that - /// are a part of this Media element. By default, the src will be the output - /// directory for the final image. The default value ensures the binder generates - /// an installable image. If a relative path is specified in the src attribute, - /// the value will be appended to the image's output directory. If an absolute - /// path is provided, that path will be used without modification. The latter two - /// options are provided to ease the layout of an image onto multiple medias (CDs/DVDs). - /// - public string Layout - { - get - { - return this.layoutField; - } - set - { - this.layoutFieldSet = true; - this.layoutField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string src - { - get - { - return this.srcField; - } - set - { - this.srcFieldSet = true; - this.srcField = value; - } - } - - /// - /// The label attributed to the volume. This is the volume label returned - /// by the GetVolumeInformation function. If the SourceDir property refers - /// to a removable (floppy or CD-ROM) volume, then this volume label is - /// used to verify that the proper disk is in the drive before attempting - /// to install files. The entry in this column must match the volume label - /// of the physical media. - /// - public string VolumeLabel - { - get - { - return this.volumeLabelField; - } - set - { - this.volumeLabelFieldSet = true; - this.volumeLabelField = value; - } - } - - /// - /// Optional property that identifies the source of the embedded cabinet. - /// If a cabinet is specified for a patch, this property should be defined - /// and unique to each patch so that the embedded cabinet containing patched - /// and new files can be located in the patch package. If the cabinet is not - /// embedded - this is not typical - the cabinet can be found in the directory - /// referenced in this column. If empty, the external cabinet must be located - /// in the SourceDir directory. - /// - public string Source - { - get - { - return this.sourceField; - } - set - { - this.sourceFieldSet = true; - this.sourceField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("DigitalSignature" == childName)) - { - childValue = new DigitalSignature(); - } - if (("PatchBaseline" == childName)) - { - childValue = new PatchBaseline(); - } - if (("SymbolPath" == childName)) - { - childValue = new SymbolPath(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Media", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.cabinetFieldSet) - { - writer.WriteAttributeString("Cabinet", this.cabinetField); - } - if (this.compressionLevelFieldSet) - { - if ((this.compressionLevelField == CompressionLevelType.high)) - { - writer.WriteAttributeString("CompressionLevel", "high"); - } - if ((this.compressionLevelField == CompressionLevelType.low)) - { - writer.WriteAttributeString("CompressionLevel", "low"); - } - if ((this.compressionLevelField == CompressionLevelType.medium)) - { - writer.WriteAttributeString("CompressionLevel", "medium"); - } - if ((this.compressionLevelField == CompressionLevelType.mszip)) - { - writer.WriteAttributeString("CompressionLevel", "mszip"); - } - if ((this.compressionLevelField == CompressionLevelType.none)) - { - writer.WriteAttributeString("CompressionLevel", "none"); - } - } - if (this.diskPromptFieldSet) - { - writer.WriteAttributeString("DiskPrompt", this.diskPromptField); - } - if (this.embedCabFieldSet) - { - if ((this.embedCabField == YesNoType.no)) - { - writer.WriteAttributeString("EmbedCab", "no"); - } - if ((this.embedCabField == YesNoType.yes)) - { - writer.WriteAttributeString("EmbedCab", "yes"); - } - } - if (this.layoutFieldSet) - { - writer.WriteAttributeString("Layout", this.layoutField); - } - if (this.srcFieldSet) - { - writer.WriteAttributeString("src", this.srcField); - } - if (this.volumeLabelFieldSet) - { - writer.WriteAttributeString("VolumeLabel", this.volumeLabelField); - } - if (this.sourceFieldSet) - { - writer.WriteAttributeString("Source", this.sourceField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Cabinet" == name)) - { - this.cabinetField = value; - this.cabinetFieldSet = true; - } - if (("CompressionLevel" == name)) - { - this.compressionLevelField = Enums.ParseCompressionLevelType(value); - this.compressionLevelFieldSet = true; - } - if (("DiskPrompt" == name)) - { - this.diskPromptField = value; - this.diskPromptFieldSet = true; - } - if (("EmbedCab" == name)) - { - this.embedCabField = Enums.ParseYesNoType(value); - this.embedCabFieldSet = true; - } - if (("Layout" == name)) - { - this.layoutField = value; - this.layoutFieldSet = true; - } - if (("src" == name)) - { - this.srcField = value; - this.srcFieldSet = true; - } - if (("VolumeLabel" == name)) - { - this.volumeLabelField = value; - this.volumeLabelFieldSet = true; - } - if (("Source" == name)) - { - this.sourceField = value; - this.sourceFieldSet = true; - } - } - } - - /// - /// MediaTeplate element describes information to automatically assign files to cabinets. - /// A maximumum number of cabinets created is 999. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MediaTemplate : ISchemaElement, ISetAttributes - { - - private string cabinetTemplateField; - - private bool cabinetTemplateFieldSet; - - private CompressionLevelType compressionLevelField; - - private bool compressionLevelFieldSet; - - private string diskPromptField; - - private bool diskPromptFieldSet; - - private YesNoType embedCabField; - - private bool embedCabFieldSet; - - private string volumeLabelField; - - private bool volumeLabelFieldSet; - - private int maximumUncompressedMediaSizeField; - - private bool maximumUncompressedMediaSizeFieldSet; - - private int maximumCabinetSizeForLargeFileSplittingField; - - private bool maximumCabinetSizeForLargeFileSplittingFieldSet; - - private ISchemaElement parentElement; - - /// - /// Templated name of the cabinet if some or all of the files stored on the media are in - /// a cabinet file. This name must begin with either a letter or an underscore, contain - /// maximum of five characters and {0} in the cabinet name part and must end three character extension. - /// The default is cab{0}.cab. - /// - public string CabinetTemplate - { - get - { - return this.cabinetTemplateField; - } - set - { - this.cabinetTemplateFieldSet = true; - this.cabinetTemplateField = value; - } - } - - /// - /// Indicates the compression level for the Media's cabinet. This attribute can - /// only be used in conjunction with the Cabinet attribute. The default is 'mszip'. - /// - public CompressionLevelType CompressionLevel - { - get - { - return this.compressionLevelField; - } - set - { - this.compressionLevelFieldSet = true; - this.compressionLevelField = value; - } - } - - /// - /// 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. - /// - public string DiskPrompt - { - get - { - return this.diskPromptField; - } - set - { - this.diskPromptFieldSet = true; - this.diskPromptField = value; - } - } - - /// - /// Instructs the binder to embed the cabinets in the product if 'yes'. - /// - public YesNoType EmbedCab - { - get - { - return this.embedCabField; - } - set - { - this.embedCabFieldSet = true; - this.embedCabField = value; - } - } - - /// - /// The label attributed to the volume. This is the volume label returned - /// by the GetVolumeInformation function. If the SourceDir property refers - /// to a removable (floppy or CD-ROM) volume, then this volume label is - /// used to verify that the proper disk is in the drive before attempting - /// to install files. The entry in this column must match the volume label - /// of the physical media. - /// - public string VolumeLabel - { - get - { - return this.volumeLabelField; - } - set - { - this.volumeLabelFieldSet = true; - this.volumeLabelField = value; - } - } - - /// - /// Size of uncompressed files in each cabinet, in megabytes. WIX_MUMS environment variable - /// can be used to override this value. Default value is 200 MB. - /// - public int MaximumUncompressedMediaSize - { - get - { - return this.maximumUncompressedMediaSizeField; - } - set - { - this.maximumUncompressedMediaSizeFieldSet = true; - this.maximumUncompressedMediaSizeField = value; - } - } - - /// - /// Maximum size of cabinet files in megabytes for large files. This attribute is used for packaging - /// files that are larger than MaximumUncompressedMediaSize into smaller cabinets. If cabinet size - /// exceed this value, then setting this attribute will cause the file to be split into multiple - /// cabinets of this maximum size. For simply controlling cabinet size without file splitting use - /// MaximumUncompressedMediaSize attribute. Setting this attribute will disable smart cabbing feature - /// for this Fragment / Package. Setting WIX_MCSLFS environment variable can be used to override this - /// value. Minimum allowed value of this attribute is 20 MB. Maximum allowed value and the Default - /// value of this attribute is 2048 MB (2 GB). - /// - public int MaximumCabinetSizeForLargeFileSplitting - { - get - { - return this.maximumCabinetSizeForLargeFileSplittingField; - } - set - { - this.maximumCabinetSizeForLargeFileSplittingFieldSet = true; - this.maximumCabinetSizeForLargeFileSplittingField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a CompressionLevelType from a string. - /// - public static CompressionLevelType ParseCompressionLevelType(string value) - { - CompressionLevelType parsedValue; - MediaTemplate.TryParseCompressionLevelType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a CompressionLevelType from a string. - /// - public static bool TryParseCompressionLevelType(string value, out CompressionLevelType parsedValue) - { - parsedValue = CompressionLevelType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("high" == value)) - { - parsedValue = CompressionLevelType.high; - } - else - { - if (("low" == value)) - { - parsedValue = CompressionLevelType.low; - } - else - { - if (("medium" == value)) - { - parsedValue = CompressionLevelType.medium; - } - else - { - if (("mszip" == value)) - { - parsedValue = CompressionLevelType.mszip; - } - else - { - if (("none" == value)) - { - parsedValue = CompressionLevelType.none; - } - else - { - parsedValue = CompressionLevelType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MediaTemplate", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.cabinetTemplateFieldSet) - { - writer.WriteAttributeString("CabinetTemplate", this.cabinetTemplateField); - } - if (this.compressionLevelFieldSet) - { - if ((this.compressionLevelField == CompressionLevelType.high)) - { - writer.WriteAttributeString("CompressionLevel", "high"); - } - if ((this.compressionLevelField == CompressionLevelType.low)) - { - writer.WriteAttributeString("CompressionLevel", "low"); - } - if ((this.compressionLevelField == CompressionLevelType.medium)) - { - writer.WriteAttributeString("CompressionLevel", "medium"); - } - if ((this.compressionLevelField == CompressionLevelType.mszip)) - { - writer.WriteAttributeString("CompressionLevel", "mszip"); - } - if ((this.compressionLevelField == CompressionLevelType.none)) - { - writer.WriteAttributeString("CompressionLevel", "none"); - } - } - if (this.diskPromptFieldSet) - { - writer.WriteAttributeString("DiskPrompt", this.diskPromptField); - } - if (this.embedCabFieldSet) - { - if ((this.embedCabField == YesNoType.no)) - { - writer.WriteAttributeString("EmbedCab", "no"); - } - if ((this.embedCabField == YesNoType.yes)) - { - writer.WriteAttributeString("EmbedCab", "yes"); - } - } - if (this.volumeLabelFieldSet) - { - writer.WriteAttributeString("VolumeLabel", this.volumeLabelField); - } - if (this.maximumUncompressedMediaSizeFieldSet) - { - writer.WriteAttributeString("MaximumUncompressedMediaSize", this.maximumUncompressedMediaSizeField.ToString(CultureInfo.InvariantCulture)); - } - if (this.maximumCabinetSizeForLargeFileSplittingFieldSet) - { - writer.WriteAttributeString("MaximumCabinetSizeForLargeFileSplitting", this.maximumCabinetSizeForLargeFileSplittingField.ToString(CultureInfo.InvariantCulture)); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("CabinetTemplate" == name)) - { - this.cabinetTemplateField = value; - this.cabinetTemplateFieldSet = true; - } - if (("CompressionLevel" == name)) - { - this.compressionLevelField = MediaTemplate.ParseCompressionLevelType(value); - this.compressionLevelFieldSet = true; - } - if (("DiskPrompt" == name)) - { - this.diskPromptField = value; - this.diskPromptFieldSet = true; - } - if (("EmbedCab" == name)) - { - this.embedCabField = Enums.ParseYesNoType(value); - this.embedCabFieldSet = true; - } - if (("VolumeLabel" == name)) - { - this.volumeLabelField = value; - this.volumeLabelFieldSet = true; - } - if (("MaximumUncompressedMediaSize" == name)) - { - this.maximumUncompressedMediaSizeField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.maximumUncompressedMediaSizeFieldSet = true; - } - if (("MaximumCabinetSizeForLargeFileSplitting" == name)) - { - this.maximumCabinetSizeForLargeFileSplittingField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.maximumCabinetSizeForLargeFileSplittingFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum CompressionLevelType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - high, - - low, - - medium, - - mszip, - - none, - } - } - - /// - /// This element has been deprecated. - /// Use the Binary/@SuppressModularization, CustomAction/@SuppressModularization, or Property/@SuppressModularization attributes instead. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class IgnoreModularization : ISchemaElement, ISetAttributes - { - - private string nameField; - - private bool nameFieldSet; - - private TypeType typeField; - - private bool typeFieldSet; - - private ISchemaElement parentElement; - - /// - /// The name of the item to ignore modularization for. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// The type of the item to ignore modularization for. - /// - public TypeType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a TypeType from a string. - /// - public static TypeType ParseTypeType(string value) - { - TypeType parsedValue; - IgnoreModularization.TryParseTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypeType from a string. - /// - public static bool TryParseTypeType(string value, out TypeType parsedValue) - { - parsedValue = TypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("Action" == value)) - { - parsedValue = TypeType.Action; - } - else - { - if (("Property" == value)) - { - parsedValue = TypeType.Property; - } - else - { - if (("Directory" == value)) - { - parsedValue = TypeType.Directory; - } - else - { - parsedValue = TypeType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("IgnoreModularization", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.typeFieldSet) - { - if ((this.typeField == TypeType.Action)) - { - writer.WriteAttributeString("Type", "Action"); - } - if ((this.typeField == TypeType.Property)) - { - writer.WriteAttributeString("Type", "Property"); - } - if ((this.typeField == TypeType.Directory)) - { - writer.WriteAttributeString("Type", "Directory"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = IgnoreModularization.ParseTypeType(value); - this.typeFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum TypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - Action, - - Property, - - Directory, - } - } - - /// - /// Specifies a custom action to be added to the MSI CustomAction table. Various combinations of the attributes for this element - /// correspond to different custom action types. For more information about custom actions see the - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CustomAction : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string binaryKeyField; - - private bool binaryKeyFieldSet; - - private string fileKeyField; - - private bool fileKeyFieldSet; - - private string propertyField; - - private bool propertyFieldSet; - - private string directoryField; - - private bool directoryFieldSet; - - private string dllEntryField; - - private bool dllEntryFieldSet; - - private string exeCommandField; - - private bool exeCommandFieldSet; - - private string jScriptCallField; - - private bool jScriptCallFieldSet; - - private string vBScriptCallField; - - private bool vBScriptCallFieldSet; - - private ScriptType scriptField; - - private bool scriptFieldSet; - - private YesNoType suppressModularizationField; - - private bool suppressModularizationFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private string errorField; - - private bool errorFieldSet; - - private ReturnType returnField; - - private bool returnFieldSet; - - private ExecuteType executeField; - - private bool executeFieldSet; - - private YesNoType impersonateField; - - private bool impersonateFieldSet; - - private YesNoType patchUninstallField; - - private bool patchUninstallFieldSet; - - private YesNoType win64Field; - - private bool win64FieldSet; - - private YesNoType terminalServerAwareField; - - private bool terminalServerAwareFieldSet; - - private YesNoType hideTargetField; - - private bool hideTargetFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the custom action. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// This attribute is a reference to a Binary element with matching Id attribute. That binary stream contains - /// the custom action for use during install. The custom action will not be installed into a target directory. This attribute is - /// typically used with the DllEntry attribute to specify the custom action DLL to use for a type 1 custom action, with the ExeCommand - /// attribute to specify a type 17 custom action that runs an embedded executable, or with the VBScriptCall or JScriptCall attributes - /// to specify a type 5 or 6 custom action. - /// - public string BinaryKey - { - get - { - return this.binaryKeyField; - } - set - { - this.binaryKeyFieldSet = true; - this.binaryKeyField = value; - } - } - - /// - /// This attribute specifies a reference to a File element with matching Id attribute that - /// will execute the custom action code in the file after the file is installed. This - /// attribute is typically used with the ExeCommand attribute to specify a type 18 custom action - /// that runs an installed executable, with the DllEntry attribute to specify an installed custom - /// action DLL to use for a type 17 custom action, or with the VBScriptCall or JScriptCall - /// attributes to specify a type 21 or 22 custom action. - /// - public string FileKey - { - get - { - return this.fileKeyField; - } - set - { - this.fileKeyFieldSet = true; - this.fileKeyField = value; - } - } - - /// - /// This attribute specifies a reference to a Property element with matching Id attribute that specifies the Property - /// to be used or updated on execution of this custom action. This attribute is - /// typically used with the Value attribute to create a type 51 custom action that parses - /// the text in Value and places it into the specified Property. This attribute is also used with - /// the ExeCommand attribute to create a type 50 custom action that uses the value of the - /// given property to specify the path to the executable. Type 51 custom actions are often useful to - /// pass values to a deferred custom action. - /// See - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - /// - /// This attribute specifies a reference to a Directory element with matching Id attribute containing a directory path. - /// This attribute is typically used with the ExeCommand attribute to specify the source executable for a type 34 - /// custom action, or with the Value attribute to specify a formatted string to place in the specified Directory - /// table entry in a type 35 custom action. - /// - public string Directory - { - get - { - return this.directoryField; - } - set - { - this.directoryFieldSet = true; - this.directoryField = value; - } - } - - /// - /// This attribute specifies the name of a function in a custom action to execute. - /// This attribute is used with the BinaryKey attribute to create a type 1 custom - /// action, or with the FileKey attribute to create a type 17 custom action. - /// - public string DllEntry - { - get - { - return this.dllEntryField; - } - set - { - this.dllEntryFieldSet = true; - this.dllEntryField = value; - } - } - - /// - /// This attribute specifies the command line parameters to supply to an externally - /// run executable. This attribute is typically used with the BinaryKey attribute for a type 2 custom action, - /// the FileKey attribute for a type 18 custom action, the Property attribute for a type 50 custom action, - /// or the Directory attribute for a type 34 custom action that specify the executable to run. - /// - public string ExeCommand - { - get - { - return this.exeCommandField; - } - set - { - this.exeCommandFieldSet = true; - this.exeCommandField = value; - } - } - - /// - /// This attribute specifies the name of the JScript function to execute in a script. The script must be - /// provided in a Binary element identified by the BinaryKey attribute described above. In other words, this - /// attribute must be specified in conjunction with the BinaryKey attribute. - /// - public string JScriptCall - { - get - { - return this.jScriptCallField; - } - set - { - this.jScriptCallFieldSet = true; - this.jScriptCallField = value; - } - } - - /// - /// This attribute specifies the name of the VBScript Subroutine to execute in a script. The script must be - /// provided in a Binary element identified by the BinaryKey attribute described above. In other words, this - /// attribute must be specified in conjunction with the BinaryKey attribute. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public string VBScriptCall - { - get - { - return this.vBScriptCallField; - } - set - { - this.vBScriptCallFieldSet = true; - this.vBScriptCallField = value; - } - } - - /// - /// Creates a type 37 or 38 custom action. The text of the element should contain the script to be embedded in the package. - /// - public ScriptType Script - { - get - { - return this.scriptField; - } - set - { - this.scriptFieldSet = true; - this.scriptField = value; - } - } - - /// - /// Use to suppress modularization of this custom action name in merge modules. - /// This should only be necessary for table-driven custom actions because the - /// table name which they interact with cannot be modularized, so there can only - /// be one instance of the table. - /// - public YesNoType SuppressModularization - { - get - { - return this.suppressModularizationField; - } - set - { - this.suppressModularizationFieldSet = true; - this.suppressModularizationField = value; - } - } - - /// - /// This attribute specifies a string value to use in the custom action. This attribute - /// must be used with the Property attribute to set the property as part of a - /// type 51 custom action or with the Directory attribute to set a directory path in that - /// table in a type 35 custom action. The value can be a literal value or derived from a - /// Property element using the - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// This attribute specifies an index in the MSI Error table to use as an error message for a - /// type 19 custom action that displays the error message and aborts a product's installation. - /// - public string Error - { - get - { - return this.errorField; - } - set - { - this.errorFieldSet = true; - this.errorField = value; - } - } - - /// - /// Set this attribute to set the return behavior of the custom action. - /// - public ReturnType Return - { - get - { - return this.returnField; - } - set - { - this.returnFieldSet = true; - this.returnField = value; - } - } - - /// - /// This attribute indicates the scheduling of the custom action. - /// - public ExecuteType Execute - { - get - { - return this.executeField; - } - set - { - this.executeFieldSet = true; - this.executeField = value; - } - } - - /// - /// This attribute specifies whether the Windows Installer, which executes as LocalSystem, - /// should impersonate the user context of the installing user when executing this custom action. - /// Typically the value should be 'yes', except when the custom action needs elevated privileges - /// to apply changes to the machine. - /// - public YesNoType Impersonate - { - get - { - return this.impersonateField; - } - set - { - this.impersonateFieldSet = true; - this.impersonateField = value; - } - } - - /// - /// This attribute specifies that the Windows Installer, execute the custom action only when - /// a patch is being uninstalled. These custom actions should also be conditioned using the - /// MSIPATCHREMOVE property to ensure proper down level (less than Windows Installer 4.5) - /// behavior. - /// - public YesNoType PatchUninstall - { - get - { - return this.patchUninstallField; - } - set - { - this.patchUninstallFieldSet = true; - this.patchUninstallField = value; - } - } - - /// - /// Specifies that a script custom action targets a 64-bit platform. Valid only when used with - /// the Script, VBScriptCall, and JScriptCall attributes. - /// The default value is based on the platform set by the -arch switch to candle.exe - /// or the InstallerPlatform property in a .wixproj MSBuild project: - /// For x86 and ARM, the default value is 'no'. - /// For x64 and IA64, the default value is 'yes'. - /// - public YesNoType Win64 - { - get - { - return this.win64Field; - } - set - { - this.win64FieldSet = true; - this.win64Field = value; - } - } - - /// - /// This attribute specifies controls whether the custom action will impersonate the - /// installing user during per-machine installs on Terminal Server machines. - /// Deferred execution custom actions that do not specify this attribute, or explicitly set it 'no', - /// will run with no user impersonation on Terminal Server machines during - /// per-machine installations. This attribute is only applicable when installing on the - /// Windows Server 2003 family. - /// - public YesNoType TerminalServerAware - { - get - { - return this.terminalServerAwareField; - } - set - { - this.terminalServerAwareFieldSet = true; - this.terminalServerAwareField = value; - } - } - - /// - /// Ensures the installer does not log the CustomActionData for the deferred custom action. - /// - public YesNoType HideTarget - { - get - { - return this.hideTargetField; - } - set - { - this.hideTargetFieldSet = true; - this.hideTargetField = value; - } - } - - /// - /// The text node is only valid if the Script attribute is specified. In that case, the text node contains the script to embed. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ScriptType from a string. - /// - public static ScriptType ParseScriptType(string value) - { - ScriptType parsedValue; - CustomAction.TryParseScriptType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ScriptType from a string. - /// - public static bool TryParseScriptType(string value, out ScriptType parsedValue) - { - parsedValue = ScriptType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("jscript" == value)) - { - parsedValue = ScriptType.jscript; - } - else - { - if (("vbscript" == value)) - { - parsedValue = ScriptType.vbscript; - } - else - { - parsedValue = ScriptType.IllegalValue; - return false; - } - } - return true; - } - - /// - /// Parses a ReturnType from a string. - /// - public static ReturnType ParseReturnType(string value) - { - ReturnType parsedValue; - CustomAction.TryParseReturnType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ReturnType from a string. - /// - public static bool TryParseReturnType(string value, out ReturnType parsedValue) - { - parsedValue = ReturnType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("asyncNoWait" == value)) - { - parsedValue = ReturnType.asyncNoWait; - } - else - { - if (("asyncWait" == value)) - { - parsedValue = ReturnType.asyncWait; - } - else - { - if (("check" == value)) - { - parsedValue = ReturnType.check; - } - else - { - if (("ignore" == value)) - { - parsedValue = ReturnType.ignore; - } - else - { - parsedValue = ReturnType.IllegalValue; - return false; - } - } - } - } - return true; - } - - /// - /// Parses a ExecuteType from a string. - /// - public static ExecuteType ParseExecuteType(string value) - { - ExecuteType parsedValue; - CustomAction.TryParseExecuteType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ExecuteType from a string. - /// - public static bool TryParseExecuteType(string value, out ExecuteType parsedValue) - { - parsedValue = ExecuteType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("commit" == value)) - { - parsedValue = ExecuteType.commit; - } - else - { - if (("deferred" == value)) - { - parsedValue = ExecuteType.deferred; - } - else - { - if (("firstSequence" == value)) - { - parsedValue = ExecuteType.firstSequence; - } - else - { - if (("immediate" == value)) - { - parsedValue = ExecuteType.immediate; - } - else - { - if (("oncePerProcess" == value)) - { - parsedValue = ExecuteType.oncePerProcess; - } - else - { - if (("rollback" == value)) - { - parsedValue = ExecuteType.rollback; - } - else - { - if (("secondSequence" == value)) - { - parsedValue = ExecuteType.secondSequence; - } - else - { - parsedValue = ExecuteType.IllegalValue; - return false; - } - } - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CustomAction", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.binaryKeyFieldSet) - { - writer.WriteAttributeString("BinaryKey", this.binaryKeyField); - } - if (this.fileKeyFieldSet) - { - writer.WriteAttributeString("FileKey", this.fileKeyField); - } - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - if (this.directoryFieldSet) - { - writer.WriteAttributeString("Directory", this.directoryField); - } - if (this.dllEntryFieldSet) - { - writer.WriteAttributeString("DllEntry", this.dllEntryField); - } - if (this.exeCommandFieldSet) - { - writer.WriteAttributeString("ExeCommand", this.exeCommandField); - } - if (this.jScriptCallFieldSet) - { - writer.WriteAttributeString("JScriptCall", this.jScriptCallField); - } - if (this.vBScriptCallFieldSet) - { - writer.WriteAttributeString("VBScriptCall", this.vBScriptCallField); - } - if (this.scriptFieldSet) - { - if ((this.scriptField == ScriptType.jscript)) - { - writer.WriteAttributeString("Script", "jscript"); - } - if ((this.scriptField == ScriptType.vbscript)) - { - writer.WriteAttributeString("Script", "vbscript"); - } - } - if (this.suppressModularizationFieldSet) - { - if ((this.suppressModularizationField == YesNoType.no)) - { - writer.WriteAttributeString("SuppressModularization", "no"); - } - if ((this.suppressModularizationField == YesNoType.yes)) - { - writer.WriteAttributeString("SuppressModularization", "yes"); - } - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.errorFieldSet) - { - writer.WriteAttributeString("Error", this.errorField); - } - if (this.returnFieldSet) - { - if ((this.returnField == ReturnType.asyncNoWait)) - { - writer.WriteAttributeString("Return", "asyncNoWait"); - } - if ((this.returnField == ReturnType.asyncWait)) - { - writer.WriteAttributeString("Return", "asyncWait"); - } - if ((this.returnField == ReturnType.check)) - { - writer.WriteAttributeString("Return", "check"); - } - if ((this.returnField == ReturnType.ignore)) - { - writer.WriteAttributeString("Return", "ignore"); - } - } - if (this.executeFieldSet) - { - if ((this.executeField == ExecuteType.commit)) - { - writer.WriteAttributeString("Execute", "commit"); - } - if ((this.executeField == ExecuteType.deferred)) - { - writer.WriteAttributeString("Execute", "deferred"); - } - if ((this.executeField == ExecuteType.firstSequence)) - { - writer.WriteAttributeString("Execute", "firstSequence"); - } - if ((this.executeField == ExecuteType.immediate)) - { - writer.WriteAttributeString("Execute", "immediate"); - } - if ((this.executeField == ExecuteType.oncePerProcess)) - { - writer.WriteAttributeString("Execute", "oncePerProcess"); - } - if ((this.executeField == ExecuteType.rollback)) - { - writer.WriteAttributeString("Execute", "rollback"); - } - if ((this.executeField == ExecuteType.secondSequence)) - { - writer.WriteAttributeString("Execute", "secondSequence"); - } - } - if (this.impersonateFieldSet) - { - if ((this.impersonateField == YesNoType.no)) - { - writer.WriteAttributeString("Impersonate", "no"); - } - if ((this.impersonateField == YesNoType.yes)) - { - writer.WriteAttributeString("Impersonate", "yes"); - } - } - if (this.patchUninstallFieldSet) - { - if ((this.patchUninstallField == YesNoType.no)) - { - writer.WriteAttributeString("PatchUninstall", "no"); - } - if ((this.patchUninstallField == YesNoType.yes)) - { - writer.WriteAttributeString("PatchUninstall", "yes"); - } - } - if (this.win64FieldSet) - { - if ((this.win64Field == YesNoType.no)) - { - writer.WriteAttributeString("Win64", "no"); - } - if ((this.win64Field == YesNoType.yes)) - { - writer.WriteAttributeString("Win64", "yes"); - } - } - if (this.terminalServerAwareFieldSet) - { - if ((this.terminalServerAwareField == YesNoType.no)) - { - writer.WriteAttributeString("TerminalServerAware", "no"); - } - if ((this.terminalServerAwareField == YesNoType.yes)) - { - writer.WriteAttributeString("TerminalServerAware", "yes"); - } - } - if (this.hideTargetFieldSet) - { - if ((this.hideTargetField == YesNoType.no)) - { - writer.WriteAttributeString("HideTarget", "no"); - } - if ((this.hideTargetField == YesNoType.yes)) - { - writer.WriteAttributeString("HideTarget", "yes"); - } - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("BinaryKey" == name)) - { - this.binaryKeyField = value; - this.binaryKeyFieldSet = true; - } - if (("FileKey" == name)) - { - this.fileKeyField = value; - this.fileKeyFieldSet = true; - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - if (("Directory" == name)) - { - this.directoryField = value; - this.directoryFieldSet = true; - } - if (("DllEntry" == name)) - { - this.dllEntryField = value; - this.dllEntryFieldSet = true; - } - if (("ExeCommand" == name)) - { - this.exeCommandField = value; - this.exeCommandFieldSet = true; - } - if (("JScriptCall" == name)) - { - this.jScriptCallField = value; - this.jScriptCallFieldSet = true; - } - if (("VBScriptCall" == name)) - { - this.vBScriptCallField = value; - this.vBScriptCallFieldSet = true; - } - if (("Script" == name)) - { - this.scriptField = CustomAction.ParseScriptType(value); - this.scriptFieldSet = true; - } - if (("SuppressModularization" == name)) - { - this.suppressModularizationField = Enums.ParseYesNoType(value); - this.suppressModularizationFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Error" == name)) - { - this.errorField = value; - this.errorFieldSet = true; - } - if (("Return" == name)) - { - this.returnField = CustomAction.ParseReturnType(value); - this.returnFieldSet = true; - } - if (("Execute" == name)) - { - this.executeField = CustomAction.ParseExecuteType(value); - this.executeFieldSet = true; - } - if (("Impersonate" == name)) - { - this.impersonateField = Enums.ParseYesNoType(value); - this.impersonateFieldSet = true; - } - if (("PatchUninstall" == name)) - { - this.patchUninstallField = Enums.ParseYesNoType(value); - this.patchUninstallFieldSet = true; - } - if (("Win64" == name)) - { - this.win64Field = Enums.ParseYesNoType(value); - this.win64FieldSet = true; - } - if (("TerminalServerAware" == name)) - { - this.terminalServerAwareField = Enums.ParseYesNoType(value); - this.terminalServerAwareFieldSet = true; - } - if (("HideTarget" == name)) - { - this.hideTargetField = Enums.ParseYesNoType(value); - this.hideTargetFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ScriptType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - jscript, - - vbscript, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ReturnType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Indicates that the custom action will run asyncronously and execution may continue after the installer terminates. - /// - asyncNoWait, - - /// - /// Indicates that the custom action will run asynchronously but the installer will wait for the return code at sequence end. - /// - asyncWait, - - /// - /// Indicates that the custom action will run synchronously and the return code will be checked for success. This is the default. - /// - check, - - /// - /// Indicates that the custom action will run synchronously and the return code will not be checked. - /// - ignore, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ExecuteType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Indicates that the custom action will run after successful completion of the installation script (at the end of the installation). - /// - commit, - - /// - /// Indicates that the custom action runs in-script (possibly with elevated privileges). - /// - deferred, - - /// - /// Indicates that the custom action will only run in the first sequence that runs it. - /// - firstSequence, - - /// - /// Indicates that the custom action will run during normal processing time with user privileges. This is the default. - /// - immediate, - - /// - /// Indicates that the custom action will only run in the first sequence that runs it in the same process. - /// - oncePerProcess, - - /// - /// Indicates that a custom action will run in the rollback sequence when a failure - /// occurs during installation, usually to undo changes made by a deferred custom action. - /// - rollback, - - /// - /// Indicates that a custom action should be run a second time if it was previously run in an earlier sequence. - /// - secondSequence, - } - } - - /// - /// This will cause the entire contents of the Fragment containing the referenced CustomAction to be - /// included in the installer database. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CustomActionRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the CustomAction to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CustomActionRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Sets a Directory to a particular value. This is accomplished by creating a Type 51 custom action that is appropriately scheduled in - /// the InstallUISequence and InstallExecuteSequence. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class SetDirectory : ISchemaElement, ISetAttributes - { - - private string actionField; - - private bool actionFieldSet; - - private string idField; - - private bool idFieldSet; - - private SequenceType sequenceField; - - private bool sequenceFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// By default the action is "Set" + Id attribute's value. This optional attribute can override the action name in the case - /// where multiple SetDirectory elements target the same Id (probably with mutually exclusive conditions). - /// - public string Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// This attribute specifies a reference to a Directory element with matching Id attribute. The path of the Directory will be set to - /// the Value attribute. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Controls which sequences the Directory assignment is sequenced in. - /// For 'execute', the assignment is scheduled in the InstallExecuteSequence. - /// For 'ui', the assignment is scheduled in the InstallUISequence. - /// For 'first', the assignment is scheduled in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped at install time. - /// For 'both', the assignment is scheduled in both the InstallUISequence and the InstallExecuteSequence. - /// The default is 'both'. - /// - public SequenceType Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - /// - /// This attribute specifies a string value to assign to the Directory. The value can be a literal value or derived from a - /// Property element using the - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// The condition that determines whether the Directory is set. If the condition evaluates to false, the SetDirectory is skipped. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("SetDirectory", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.actionFieldSet) - { - writer.WriteAttributeString("Action", this.actionField); - } - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.sequenceFieldSet) - { - if ((this.sequenceField == SequenceType.both)) - { - writer.WriteAttributeString("Sequence", "both"); - } - if ((this.sequenceField == SequenceType.first)) - { - writer.WriteAttributeString("Sequence", "first"); - } - if ((this.sequenceField == SequenceType.execute)) - { - writer.WriteAttributeString("Sequence", "execute"); - } - if ((this.sequenceField == SequenceType.ui)) - { - writer.WriteAttributeString("Sequence", "ui"); - } - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Action" == name)) - { - this.actionField = value; - this.actionFieldSet = true; - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Sequence" == name)) - { - this.sequenceField = Enums.ParseSequenceType(value); - this.sequenceFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - /// - /// Sets a Property to a particular value. This is accomplished by creating a Type 51 custom action that is appropriately scheduled in - /// the InstallUISequence and InstallExecuteSequence. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class SetProperty : ISchemaElement, ISetAttributes - { - - private string actionField; - - private bool actionFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private string beforeField; - - private bool beforeFieldSet; - - private string idField; - - private bool idFieldSet; - - private SequenceType sequenceField; - - private bool sequenceFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// By default the action is "Set" + Id attribute's value. This optional attribute can override the action name in the case - /// where multiple SetProperty elements target the same Id (probably with mutually exclusive conditions). - /// - public string Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// 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. - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// 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. - /// - public string Before - { - get - { - return this.beforeField; - } - set - { - this.beforeFieldSet = true; - this.beforeField = value; - } - } - - /// - /// This attribute specifies the Property to set to the Value. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Controls which sequences the Property assignment is sequenced in. - /// For 'execute', the assignment is scheduled in the InstallExecuteSequence. - /// For 'ui', the assignment is scheduled in the InstallUISequence. - /// For 'first', the assignment is scheduled in the InstallUISequence or the InstallExecuteSequence if the InstallUISequence is skipped at install time. - /// For 'both', the assignment is scheduled in both the InstallUISequence and the InstallExecuteSequence. - /// The default is 'both'. - /// - public SequenceType Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - /// - /// This attribute specifies a string value to assign to the Property. The value can be a literal value or derived from a - /// Property element using the - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// The condition that determines whether the Property is set. If the condition evaluates to false, the Set is skipped. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("SetProperty", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.actionFieldSet) - { - writer.WriteAttributeString("Action", this.actionField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.beforeFieldSet) - { - writer.WriteAttributeString("Before", this.beforeField); - } - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.sequenceFieldSet) - { - if ((this.sequenceField == SequenceType.both)) - { - writer.WriteAttributeString("Sequence", "both"); - } - if ((this.sequenceField == SequenceType.first)) - { - writer.WriteAttributeString("Sequence", "first"); - } - if ((this.sequenceField == SequenceType.execute)) - { - writer.WriteAttributeString("Sequence", "execute"); - } - if ((this.sequenceField == SequenceType.ui)) - { - writer.WriteAttributeString("Sequence", "ui"); - } - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Action" == name)) - { - this.actionField = value; - this.actionFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("Before" == name)) - { - this.beforeField = value; - this.beforeFieldSet = true; - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Sequence" == name)) - { - this.sequenceField = Enums.ParseSequenceType(value); - this.sequenceFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - /// - /// This will cause the entire contents of the Fragment containing the referenced PatchFamily to be - /// used in the process of creating a patch. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchFamilyRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string productCodeField; - - private bool productCodeFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the PatchFamily to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Specifies the ProductCode of the product that this family applies to. - /// - public string ProductCode - { - get - { - return this.productCodeField; - } - set - { - this.productCodeFieldSet = true; - this.productCodeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchFamilyRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.productCodeFieldSet) - { - writer.WriteAttributeString("ProductCode", this.productCodeField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("ProductCode" == name)) - { - this.productCodeField = value; - this.productCodeFieldSet = true; - } - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ValidateProductID : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ValidateProductID", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CostInitialize : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CostInitialize", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class FileCost : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FileCost", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class IsolateComponents : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("IsolateComponents", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CostFinalize : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CostFinalize", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class SetODBCFolders : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("SetODBCFolders", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MigrateFeatureStates : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MigrateFeatureStates", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Initiates the execution sequence. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ExecuteAction : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ExecuteAction", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstallValidate : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstallValidate", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstallInitialize : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstallInitialize", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Ensures the needed amount of space exists in the registry. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class AllocateRegistrySpace : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("AllocateRegistrySpace", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ProcessComponents : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ProcessComponents", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Manages the unadvertisement of components listed in the PublishComponent table. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UnpublishComponents : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UnpublishComponents", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MsiUnpublishAssemblies : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MsiUnpublishAssemblies", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UnpublishFeatures : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UnpublishFeatures", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Stops system services. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class StopServices : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("StopServices", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Stops a service and removes its registration from the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class DeleteServices : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DeleteServices", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Removes COM+ applications from the registry. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UnregisterComPlus : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UnregisterComPlus", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class SelfUnregModules : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("SelfUnregModules", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Unregisters type libraries from the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UnregisterTypeLibraries : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UnregisterTypeLibraries", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveODBC : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveODBC", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Removes registration information about installed fonts from the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UnregisterFonts : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UnregisterFonts", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveRegistryValues : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveRegistryValues", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UnregisterClassInfo : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UnregisterClassInfo", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UnregisterExtensionInfo : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UnregisterExtensionInfo", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Manages the unregistration of OLE ProgId information with the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UnregisterProgIdInfo : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UnregisterProgIdInfo", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Unregisters MIME-related registry information from the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UnregisterMIMEInfo : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UnregisterMIMEInfo", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveIniValues : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveIniValues", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveShortcuts : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveShortcuts", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Modifies the values of environment variables. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveEnvironmentStrings : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveEnvironmentStrings", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Deletes files installed by the DuplicateFiles action. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveDuplicateFiles : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveDuplicateFiles", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Removes files previously installed by the InstallFiles action. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveFiles : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveFiles", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveFolders : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveFolders", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CreateFolders : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CreateFolders", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MoveFiles : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MoveFiles", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Copies the product database to the administrative installation point. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstallAdminPackage : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstallAdminPackage", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstallFiles : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstallFiles", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Duplicates files installed by the InstallFiles action. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class DuplicateFiles : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DuplicateFiles", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PatchFiles : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PatchFiles", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class BindImage : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("BindImage", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Manages the creation of shortcuts. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CreateShortcuts : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CreateShortcuts", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Manages the registration of COM class information with the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegisterClassInfo : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegisterClassInfo", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Manages the registration of extension related information with the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegisterExtensionInfo : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegisterExtensionInfo", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Manages the registration of OLE ProgId information with the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegisterProgIdInfo : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegisterProgIdInfo", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Registers MIME-related registry information with the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegisterMIMEInfo : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegisterMIMEInfo", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Sets up an application's registry information. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class WriteRegistryValues : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WriteRegistryValues", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class WriteIniValues : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WriteIniValues", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Modifies the values of environment variables. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class WriteEnvironmentStrings : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WriteEnvironmentStrings", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Registers installed fonts with the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegisterFonts : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegisterFonts", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstallODBC : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstallODBC", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Registers type libraries with the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegisterTypeLibraries : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegisterTypeLibraries", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class SelfRegModules : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("SelfRegModules", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Registers COM+ applications. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegisterComPlus : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegisterComPlus", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Registers a service for the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstallServices : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstallServices", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Starts system services. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class StartServices : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("StartServices", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegisterUser : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegisterUser", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Registers the product information with the installer. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RegisterProduct : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RegisterProduct", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Manages the advertisement of the components from the PublishComponent table. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PublishComponents : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PublishComponents", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Manages the advertisement of CLR and Win32 assemblies. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MsiPublishAssemblies : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MsiPublishAssemblies", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Writes each feature's state into the system registry. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PublishFeatures : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PublishFeatures", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Manages the advertisement of the product information with the system. The condition for this action may be specified in the element's inner text. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class PublishProduct : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("PublishProduct", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstallFinalize : ActionSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstallFinalize", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class AppSearch : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("AppSearch", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CCPSearch : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CCPSearch", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RMCCPSearch : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RMCCPSearch", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class LaunchConditions : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("LaunchConditions", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class FindRelatedProducts : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("FindRelatedProducts", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstallExecute : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstallExecute", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstallExecuteAgain : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstallExecuteAgain", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class DisableRollback : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DisableRollback", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RemoveExistingProducts : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RemoveExistingProducts", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ScheduleReboot : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ScheduleReboot", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ForceReboot : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ForceReboot", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// 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. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ResolveSource : ActionModuleSequenceType, ISchemaElement - { - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public override void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ResolveSource", "http://wixtoolset.org/schemas/v4/wxs"); - base.OutputXml(writer); - writer.WriteEndElement(); - } - } - - /// - /// Use to sequence a custom action. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Custom : ISchemaElement, ISetAttributes - { - - private string actionField; - - private bool actionFieldSet; - - private ExitType onExitField; - - private bool onExitFieldSet; - - private string beforeField; - - private bool beforeFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private YesNoType overridableField; - - private bool overridableFieldSet; - - private int sequenceField; - - private bool sequenceFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// The action to which the Custom element applies. - /// - public string Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// Mutually exclusive with Before, After, and Sequence attributes - /// - public ExitType OnExit - { - get - { - return this.onExitField; - } - set - { - this.onExitFieldSet = true; - this.onExitField = value; - } - } - - /// - /// The name of the standard or custom action before which this action should be performed. Mutually exclusive with OnExit, After, and Sequence attributes - /// - public string Before - { - get - { - return this.beforeField; - } - set - { - this.beforeFieldSet = true; - this.beforeField = value; - } - } - - /// - /// The name of the standard or custom action after which this action should be performed. Mutually exclusive with Before, OnExit, and Sequence attributes - /// - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// If "yes", the sequencing of this action may be overridden by sequencing elsewhere. - /// - public YesNoType Overridable - { - get - { - return this.overridableField; - } - set - { - this.overridableFieldSet = true; - this.overridableField = value; - } - } - - /// - /// The sequence number for this action. Mutually exclusive with Before, After, and OnExit attributes - /// - public int Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - /// - /// Text node specifies the condition of the action. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Custom", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.actionFieldSet) - { - writer.WriteAttributeString("Action", this.actionField); - } - if (this.onExitFieldSet) - { - if ((this.onExitField == ExitType.success)) - { - writer.WriteAttributeString("OnExit", "success"); - } - if ((this.onExitField == ExitType.cancel)) - { - writer.WriteAttributeString("OnExit", "cancel"); - } - if ((this.onExitField == ExitType.error)) - { - writer.WriteAttributeString("OnExit", "error"); - } - if ((this.onExitField == ExitType.suspend)) - { - writer.WriteAttributeString("OnExit", "suspend"); - } - } - if (this.beforeFieldSet) - { - writer.WriteAttributeString("Before", this.beforeField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.overridableFieldSet) - { - if ((this.overridableField == YesNoType.no)) - { - writer.WriteAttributeString("Overridable", "no"); - } - if ((this.overridableField == YesNoType.yes)) - { - writer.WriteAttributeString("Overridable", "yes"); - } - } - if (this.sequenceFieldSet) - { - writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Action" == name)) - { - this.actionField = value; - this.actionFieldSet = true; - } - if (("OnExit" == name)) - { - this.onExitField = Enums.ParseExitType(value); - this.onExitFieldSet = true; - } - if (("Before" == name)) - { - this.beforeField = value; - this.beforeFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("Overridable" == name)) - { - this.overridableField = Enums.ParseYesNoType(value); - this.overridableFieldSet = true; - } - if (("Sequence" == name)) - { - this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sequenceFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Show : ISchemaElement, ISetAttributes - { - - private string dialogField; - - private bool dialogFieldSet; - - private ExitType onExitField; - - private bool onExitFieldSet; - - private string beforeField; - - private bool beforeFieldSet; - - private string afterField; - - private bool afterFieldSet; - - private YesNoType overridableField; - - private bool overridableFieldSet; - - private int sequenceField; - - private bool sequenceFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - public string Dialog - { - get - { - return this.dialogField; - } - set - { - this.dialogFieldSet = true; - this.dialogField = value; - } - } - - /// - /// mutually exclusive with Before, After, and Sequence attributes - /// - public ExitType OnExit - { - get - { - return this.onExitField; - } - set - { - this.onExitFieldSet = true; - this.onExitField = value; - } - } - - public string Before - { - get - { - return this.beforeField; - } - set - { - this.beforeFieldSet = true; - this.beforeField = value; - } - } - - public string After - { - get - { - return this.afterField; - } - set - { - this.afterFieldSet = true; - this.afterField = value; - } - } - - /// - /// If "yes", the sequencing of this dialog may be overridden by sequencing elsewhere. - /// - public YesNoType Overridable - { - get - { - return this.overridableField; - } - set - { - this.overridableFieldSet = true; - this.overridableField = value; - } - } - - public int Sequence - { - get - { - return this.sequenceField; - } - set - { - this.sequenceFieldSet = true; - this.sequenceField = value; - } - } - - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Show", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.dialogFieldSet) - { - writer.WriteAttributeString("Dialog", this.dialogField); - } - if (this.onExitFieldSet) - { - if ((this.onExitField == ExitType.success)) - { - writer.WriteAttributeString("OnExit", "success"); - } - if ((this.onExitField == ExitType.cancel)) - { - writer.WriteAttributeString("OnExit", "cancel"); - } - if ((this.onExitField == ExitType.error)) - { - writer.WriteAttributeString("OnExit", "error"); - } - if ((this.onExitField == ExitType.suspend)) - { - writer.WriteAttributeString("OnExit", "suspend"); - } - } - if (this.beforeFieldSet) - { - writer.WriteAttributeString("Before", this.beforeField); - } - if (this.afterFieldSet) - { - writer.WriteAttributeString("After", this.afterField); - } - if (this.overridableFieldSet) - { - if ((this.overridableField == YesNoType.no)) - { - writer.WriteAttributeString("Overridable", "no"); - } - if ((this.overridableField == YesNoType.yes)) - { - writer.WriteAttributeString("Overridable", "yes"); - } - } - if (this.sequenceFieldSet) - { - writer.WriteAttributeString("Sequence", this.sequenceField.ToString(CultureInfo.InvariantCulture)); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Dialog" == name)) - { - this.dialogField = value; - this.dialogFieldSet = true; - } - if (("OnExit" == name)) - { - this.onExitField = Enums.ParseExitType(value); - this.onExitFieldSet = true; - } - if (("Before" == name)) - { - this.beforeField = value; - this.beforeFieldSet = true; - } - if (("After" == name)) - { - this.afterField = value; - this.afterFieldSet = true; - } - if (("Overridable" == name)) - { - this.overridableField = Enums.ParseYesNoType(value); - this.overridableFieldSet = true; - } - if (("Sequence" == name)) - { - this.sequenceField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.sequenceFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstallUISequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private ISchemaElement parentElement; - - public InstallUISequence() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Show))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ScheduleReboot))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FindRelatedProducts))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppSearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CCPSearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RMCCPSearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ValidateProductID))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponents))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MigrateFeatureStates))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExecuteAction))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Custom" == childName)) - { - childValue = new Custom(); - } - if (("Show" == childName)) - { - childValue = new Show(); - } - if (("ScheduleReboot" == childName)) - { - childValue = new ScheduleReboot(); - } - if (("LaunchConditions" == childName)) - { - childValue = new LaunchConditions(); - } - if (("FindRelatedProducts" == childName)) - { - childValue = new FindRelatedProducts(); - } - if (("AppSearch" == childName)) - { - childValue = new AppSearch(); - } - if (("CCPSearch" == childName)) - { - childValue = new CCPSearch(); - } - if (("RMCCPSearch" == childName)) - { - childValue = new RMCCPSearch(); - } - if (("ValidateProductID" == childName)) - { - childValue = new ValidateProductID(); - } - if (("CostInitialize" == childName)) - { - childValue = new CostInitialize(); - } - if (("FileCost" == childName)) - { - childValue = new FileCost(); - } - if (("IsolateComponents" == childName)) - { - childValue = new IsolateComponents(); - } - if (("ResolveSource" == childName)) - { - childValue = new ResolveSource(); - } - if (("CostFinalize" == childName)) - { - childValue = new CostFinalize(); - } - if (("MigrateFeatureStates" == childName)) - { - childValue = new MigrateFeatureStates(); - } - if (("ExecuteAction" == childName)) - { - childValue = new ExecuteAction(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstallUISequence", "http://wixtoolset.org/schemas/v4/wxs"); - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstallExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private ISchemaElement parentElement; - - public InstallExecuteSequence() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ScheduleReboot))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ForceReboot))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FindRelatedProducts))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AppSearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CCPSearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RMCCPSearch))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ValidateProductID))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(IsolateComponents))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SetODBCFolders))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MigrateFeatureStates))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(AllocateRegistrySpace))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProcessComponents))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnpublishComponents))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnpublishFeatures))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(StopServices))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DeleteServices))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterComPlus))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SelfUnregModules))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterTypeLibraries))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveODBC))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterFonts))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveRegistryValues))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterClassInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterExtensionInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterProgIdInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UnregisterMIMEInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveIniValues))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveShortcuts))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveEnvironmentStrings))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveDuplicateFiles))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFiles))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveFolders))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateFolders))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MoveFiles))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DuplicateFiles))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFiles))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BindImage))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateShortcuts))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterClassInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterExtensionInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProgIdInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterMIMEInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteRegistryValues))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteIniValues))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(WriteEnvironmentStrings))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterFonts))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallODBC))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterTypeLibraries))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(SelfRegModules))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterComPlus))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallServices))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(StartServices))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterUser))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProduct))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishComponents))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishFeatures))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishProduct))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RemoveExistingProducts))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DisableRollback))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallExecute))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallExecuteAgain))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPublishAssemblies))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiUnpublishAssemblies))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Custom" == childName)) - { - childValue = new Custom(); - } - if (("ScheduleReboot" == childName)) - { - childValue = new ScheduleReboot(); - } - if (("ForceReboot" == childName)) - { - childValue = new ForceReboot(); - } - if (("ResolveSource" == childName)) - { - childValue = new ResolveSource(); - } - if (("LaunchConditions" == childName)) - { - childValue = new LaunchConditions(); - } - if (("FindRelatedProducts" == childName)) - { - childValue = new FindRelatedProducts(); - } - if (("AppSearch" == childName)) - { - childValue = new AppSearch(); - } - if (("CCPSearch" == childName)) - { - childValue = new CCPSearch(); - } - if (("RMCCPSearch" == childName)) - { - childValue = new RMCCPSearch(); - } - if (("ValidateProductID" == childName)) - { - childValue = new ValidateProductID(); - } - if (("CostInitialize" == childName)) - { - childValue = new CostInitialize(); - } - if (("FileCost" == childName)) - { - childValue = new FileCost(); - } - if (("IsolateComponents" == childName)) - { - childValue = new IsolateComponents(); - } - if (("CostFinalize" == childName)) - { - childValue = new CostFinalize(); - } - if (("SetODBCFolders" == childName)) - { - childValue = new SetODBCFolders(); - } - if (("MigrateFeatureStates" == childName)) - { - childValue = new MigrateFeatureStates(); - } - if (("InstallValidate" == childName)) - { - childValue = new InstallValidate(); - } - if (("InstallInitialize" == childName)) - { - childValue = new InstallInitialize(); - } - if (("AllocateRegistrySpace" == childName)) - { - childValue = new AllocateRegistrySpace(); - } - if (("ProcessComponents" == childName)) - { - childValue = new ProcessComponents(); - } - if (("UnpublishComponents" == childName)) - { - childValue = new UnpublishComponents(); - } - if (("UnpublishFeatures" == childName)) - { - childValue = new UnpublishFeatures(); - } - if (("StopServices" == childName)) - { - childValue = new StopServices(); - } - if (("DeleteServices" == childName)) - { - childValue = new DeleteServices(); - } - if (("UnregisterComPlus" == childName)) - { - childValue = new UnregisterComPlus(); - } - if (("SelfUnregModules" == childName)) - { - childValue = new SelfUnregModules(); - } - if (("UnregisterTypeLibraries" == childName)) - { - childValue = new UnregisterTypeLibraries(); - } - if (("RemoveODBC" == childName)) - { - childValue = new RemoveODBC(); - } - if (("UnregisterFonts" == childName)) - { - childValue = new UnregisterFonts(); - } - if (("RemoveRegistryValues" == childName)) - { - childValue = new RemoveRegistryValues(); - } - if (("UnregisterClassInfo" == childName)) - { - childValue = new UnregisterClassInfo(); - } - if (("UnregisterExtensionInfo" == childName)) - { - childValue = new UnregisterExtensionInfo(); - } - if (("UnregisterProgIdInfo" == childName)) - { - childValue = new UnregisterProgIdInfo(); - } - if (("UnregisterMIMEInfo" == childName)) - { - childValue = new UnregisterMIMEInfo(); - } - if (("RemoveIniValues" == childName)) - { - childValue = new RemoveIniValues(); - } - if (("RemoveShortcuts" == childName)) - { - childValue = new RemoveShortcuts(); - } - if (("RemoveEnvironmentStrings" == childName)) - { - childValue = new RemoveEnvironmentStrings(); - } - if (("RemoveDuplicateFiles" == childName)) - { - childValue = new RemoveDuplicateFiles(); - } - if (("RemoveFiles" == childName)) - { - childValue = new RemoveFiles(); - } - if (("RemoveFolders" == childName)) - { - childValue = new RemoveFolders(); - } - if (("CreateFolders" == childName)) - { - childValue = new CreateFolders(); - } - if (("MoveFiles" == childName)) - { - childValue = new MoveFiles(); - } - if (("InstallFiles" == childName)) - { - childValue = new InstallFiles(); - } - if (("DuplicateFiles" == childName)) - { - childValue = new DuplicateFiles(); - } - if (("PatchFiles" == childName)) - { - childValue = new PatchFiles(); - } - if (("BindImage" == childName)) - { - childValue = new BindImage(); - } - if (("CreateShortcuts" == childName)) - { - childValue = new CreateShortcuts(); - } - if (("RegisterClassInfo" == childName)) - { - childValue = new RegisterClassInfo(); - } - if (("RegisterExtensionInfo" == childName)) - { - childValue = new RegisterExtensionInfo(); - } - if (("RegisterProgIdInfo" == childName)) - { - childValue = new RegisterProgIdInfo(); - } - if (("RegisterMIMEInfo" == childName)) - { - childValue = new RegisterMIMEInfo(); - } - if (("WriteRegistryValues" == childName)) - { - childValue = new WriteRegistryValues(); - } - if (("WriteIniValues" == childName)) - { - childValue = new WriteIniValues(); - } - if (("WriteEnvironmentStrings" == childName)) - { - childValue = new WriteEnvironmentStrings(); - } - if (("RegisterFonts" == childName)) - { - childValue = new RegisterFonts(); - } - if (("InstallODBC" == childName)) - { - childValue = new InstallODBC(); - } - if (("RegisterTypeLibraries" == childName)) - { - childValue = new RegisterTypeLibraries(); - } - if (("SelfRegModules" == childName)) - { - childValue = new SelfRegModules(); - } - if (("RegisterComPlus" == childName)) - { - childValue = new RegisterComPlus(); - } - if (("InstallServices" == childName)) - { - childValue = new InstallServices(); - } - if (("StartServices" == childName)) - { - childValue = new StartServices(); - } - if (("RegisterUser" == childName)) - { - childValue = new RegisterUser(); - } - if (("RegisterProduct" == childName)) - { - childValue = new RegisterProduct(); - } - if (("PublishComponents" == childName)) - { - childValue = new PublishComponents(); - } - if (("PublishFeatures" == childName)) - { - childValue = new PublishFeatures(); - } - if (("PublishProduct" == childName)) - { - childValue = new PublishProduct(); - } - if (("InstallFinalize" == childName)) - { - childValue = new InstallFinalize(); - } - if (("RemoveExistingProducts" == childName)) - { - childValue = new RemoveExistingProducts(); - } - if (("DisableRollback" == childName)) - { - childValue = new DisableRollback(); - } - if (("InstallExecute" == childName)) - { - childValue = new InstallExecute(); - } - if (("InstallExecuteAgain" == childName)) - { - childValue = new InstallExecuteAgain(); - } - if (("MsiPublishAssemblies" == childName)) - { - childValue = new MsiPublishAssemblies(); - } - if (("MsiUnpublishAssemblies" == childName)) - { - childValue = new MsiUnpublishAssemblies(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstallExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs"); - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class AdminUISequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private ISchemaElement parentElement; - - public AdminUISequence() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Show))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ExecuteAction))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallAdminPackage))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Custom" == childName)) - { - childValue = new Custom(); - } - if (("Show" == childName)) - { - childValue = new Show(); - } - if (("CostInitialize" == childName)) - { - childValue = new CostInitialize(); - } - if (("FileCost" == childName)) - { - childValue = new FileCost(); - } - if (("CostFinalize" == childName)) - { - childValue = new CostFinalize(); - } - if (("ExecuteAction" == childName)) - { - childValue = new ExecuteAction(); - } - if (("InstallValidate" == childName)) - { - childValue = new InstallValidate(); - } - if (("InstallInitialize" == childName)) - { - childValue = new InstallInitialize(); - } - if (("InstallAdminPackage" == childName)) - { - childValue = new InstallAdminPackage(); - } - if (("InstallFiles" == childName)) - { - childValue = new InstallFiles(); - } - if (("InstallFinalize" == childName)) - { - childValue = new InstallFinalize(); - } - if (("LaunchConditions" == childName)) - { - childValue = new LaunchConditions(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("AdminUISequence", "http://wixtoolset.org/schemas/v4/wxs"); - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class AdminExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private ISchemaElement parentElement; - - public AdminExecuteSequence() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(FileCost))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallAdminPackage))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFiles))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PatchFiles))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(LaunchConditions))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ResolveSource))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Custom" == childName)) - { - childValue = new Custom(); - } - if (("CostInitialize" == childName)) - { - childValue = new CostInitialize(); - } - if (("FileCost" == childName)) - { - childValue = new FileCost(); - } - if (("CostFinalize" == childName)) - { - childValue = new CostFinalize(); - } - if (("InstallValidate" == childName)) - { - childValue = new InstallValidate(); - } - if (("InstallInitialize" == childName)) - { - childValue = new InstallInitialize(); - } - if (("InstallAdminPackage" == childName)) - { - childValue = new InstallAdminPackage(); - } - if (("InstallFiles" == childName)) - { - childValue = new InstallFiles(); - } - if (("PatchFiles" == childName)) - { - childValue = new PatchFiles(); - } - if (("InstallFinalize" == childName)) - { - childValue = new InstallFinalize(); - } - if (("LaunchConditions" == childName)) - { - childValue = new LaunchConditions(); - } - if (("ResolveSource" == childName)) - { - childValue = new ResolveSource(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("AdminExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs"); - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class AdvertiseExecuteSequence : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private ISchemaElement parentElement; - - public AdvertiseExecuteSequence() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostInitialize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CostFinalize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Custom))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallValidate))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallInitialize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(CreateShortcuts))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterClassInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterExtensionInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterMIMEInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RegisterProgIdInfo))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishComponents))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishFeatures))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PublishProduct))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(InstallFinalize))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(MsiPublishAssemblies))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("CostInitialize" == childName)) - { - childValue = new CostInitialize(); - } - if (("CostFinalize" == childName)) - { - childValue = new CostFinalize(); - } - if (("Custom" == childName)) - { - childValue = new Custom(); - } - if (("InstallValidate" == childName)) - { - childValue = new InstallValidate(); - } - if (("InstallInitialize" == childName)) - { - childValue = new InstallInitialize(); - } - if (("CreateShortcuts" == childName)) - { - childValue = new CreateShortcuts(); - } - if (("RegisterClassInfo" == childName)) - { - childValue = new RegisterClassInfo(); - } - if (("RegisterExtensionInfo" == childName)) - { - childValue = new RegisterExtensionInfo(); - } - if (("RegisterMIMEInfo" == childName)) - { - childValue = new RegisterMIMEInfo(); - } - if (("RegisterProgIdInfo" == childName)) - { - childValue = new RegisterProgIdInfo(); - } - if (("PublishComponents" == childName)) - { - childValue = new PublishComponents(); - } - if (("PublishFeatures" == childName)) - { - childValue = new PublishFeatures(); - } - if (("PublishProduct" == childName)) - { - childValue = new PublishProduct(); - } - if (("InstallFinalize" == childName)) - { - childValue = new InstallFinalize(); - } - if (("MsiPublishAssemblies" == childName)) - { - childValue = new MsiPublishAssemblies(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("AdvertiseExecuteSequence", "http://wixtoolset.org/schemas/v4/wxs"); - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - } - } - - /// - /// Binary data used for CustomAction elements and UI controls. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Binary : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string srcField; - - private bool srcFieldSet; - - private YesNoType suppressModularizationField; - - private bool suppressModularizationFieldSet; - - private ISchemaElement parentElement; - - public Binary() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ISchemaElement))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// 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. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Path to the binary file. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string src - { - get - { - return this.srcField; - } - set - { - this.srcFieldSet = true; - this.srcField = value; - } - } - - /// - /// Use to suppress modularization of this Binary identifier in merge modules. - /// - public YesNoType SuppressModularization - { - get - { - return this.suppressModularizationField; - } - set - { - this.suppressModularizationFieldSet = true; - this.suppressModularizationField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Binary", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.srcFieldSet) - { - writer.WriteAttributeString("src", this.srcField); - } - if (this.suppressModularizationFieldSet) - { - if ((this.suppressModularizationField == YesNoType.no)) - { - writer.WriteAttributeString("SuppressModularization", "no"); - } - if ((this.suppressModularizationField == YesNoType.yes)) - { - writer.WriteAttributeString("SuppressModularization", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("src" == name)) - { - this.srcField = value; - this.srcFieldSet = true; - } - if (("SuppressModularization" == name)) - { - this.suppressModularizationField = Enums.ParseYesNoType(value); - this.suppressModularizationFieldSet = true; - } - } - } - - /// - /// Icon used for Shortcut, ProgId, or Class elements (but not UI controls) - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Icon : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string srcField; - - private bool srcFieldSet; - - private ISchemaElement parentElement; - - /// - /// 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. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Path to the icon file. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string src - { - get - { - return this.srcField; - } - set - { - this.srcFieldSet = true; - this.srcField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Icon", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.srcFieldSet) - { - writer.WriteAttributeString("src", this.srcField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("src" == name)) - { - this.srcField = value; - this.srcFieldSet = true; - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class EmbeddedChainer : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string commandLineField; - - private bool commandLineFieldSet; - - private string binarySourceField; - - private bool binarySourceFieldSet; - - private string fileSourceField; - - private bool fileSourceFieldSet; - - private string propertySourceField; - - private bool propertySourceFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// Unique identifier for embedded chainer. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Value to append to the transaction handle and passed to the chainer executable. - /// - public string CommandLine - { - get - { - return this.commandLineField; - } - set - { - this.commandLineFieldSet = true; - this.commandLineField = value; - } - } - - /// - /// Reference to the Binary element that contains the chainer executable. Mutually exclusive with - /// the FileSource and PropertySource attributes. - /// - public string BinarySource - { - get - { - return this.binarySourceField; - } - set - { - this.binarySourceFieldSet = true; - this.binarySourceField = value; - } - } - - /// - /// Reference to the File element that is the chainer executable. Mutually exclusive with - /// the BinarySource and PropertySource attributes. - /// - public string FileSource - { - get - { - return this.fileSourceField; - } - set - { - this.fileSourceFieldSet = true; - this.fileSourceField = value; - } - } - - /// - /// Reference to a Property that resolves to the full path to the chainer executable. Mutually exclusive with - /// the BinarySource and FileSource attributes. - /// - public string PropertySource - { - get - { - return this.propertySourceField; - } - set - { - this.propertySourceFieldSet = true; - this.propertySourceField = value; - } - } - - /// - /// Element value is the condition. CDATA may be used to when a condition contains many XML characters - /// that must be escaped. It is important to note that each EmbeddedChainer element must have a mutually exclusive condition - /// to ensure that only one embedded chainer will execute at a time. If the conditions are not mutually exclusive the chainer - /// that executes is undeterministic. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("EmbeddedChainer", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.commandLineFieldSet) - { - writer.WriteAttributeString("CommandLine", this.commandLineField); - } - if (this.binarySourceFieldSet) - { - writer.WriteAttributeString("BinarySource", this.binarySourceField); - } - if (this.fileSourceFieldSet) - { - writer.WriteAttributeString("FileSource", this.fileSourceField); - } - if (this.propertySourceFieldSet) - { - writer.WriteAttributeString("PropertySource", this.propertySourceField); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("CommandLine" == name)) - { - this.commandLineField = value; - this.commandLineFieldSet = true; - } - if (("BinarySource" == name)) - { - this.binarySourceField = value; - this.binarySourceFieldSet = true; - } - if (("FileSource" == name)) - { - this.fileSourceField = value; - this.fileSourceFieldSet = true; - } - if (("PropertySource" == name)) - { - this.propertySourceField = value; - this.propertySourceFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - /// - /// Reference to an EmbeddedChainer element. This will force the entire referenced Fragment's contents - /// to be included in the installer database. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class EmbeddedChainerRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("EmbeddedChainerRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Element value is the condition. Use CDATA if message contains delimiter characters. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class EmbeddedUI : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private YesNoType ignoreFatalExitField; - - private bool ignoreFatalExitFieldSet; - - private YesNoType ignoreErrorField; - - private bool ignoreErrorFieldSet; - - private YesNoType ignoreWarningField; - - private bool ignoreWarningFieldSet; - - private YesNoType ignoreUserField; - - private bool ignoreUserFieldSet; - - private YesNoType ignoreInfoField; - - private bool ignoreInfoFieldSet; - - private YesNoType ignoreFilesInUseField; - - private bool ignoreFilesInUseFieldSet; - - private YesNoType ignoreResolveSourceField; - - private bool ignoreResolveSourceFieldSet; - - private YesNoType ignoreOutOfDiskSpaceField; - - private bool ignoreOutOfDiskSpaceFieldSet; - - private YesNoType ignoreActionStartField; - - private bool ignoreActionStartFieldSet; - - private YesNoType ignoreActionDataField; - - private bool ignoreActionDataFieldSet; - - private YesNoType ignoreProgressField; - - private bool ignoreProgressFieldSet; - - private YesNoType ignoreCommonDataField; - - private bool ignoreCommonDataFieldSet; - - private YesNoType ignoreInitializeField; - - private bool ignoreInitializeFieldSet; - - private YesNoType ignoreTerminateField; - - private bool ignoreTerminateFieldSet; - - private YesNoType ignoreShowDialogField; - - private bool ignoreShowDialogFieldSet; - - private YesNoType ignoreRMFilesInUseField; - - private bool ignoreRMFilesInUseFieldSet; - - private YesNoType ignoreInstallStartField; - - private bool ignoreInstallStartFieldSet; - - private YesNoType ignoreInstallEndField; - - private bool ignoreInstallEndFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private YesNoType supportBasicUIField; - - private bool supportBasicUIFieldSet; - - private ISchemaElement parentElement; - - public EmbeddedUI() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(EmbeddedUIResource))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Unique identifier for embedded UI.If this attribute is not specified the Name attribute or the file name - /// portion of the SourceFile attribute will be used. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_FATALEXIT messages. - /// - public YesNoType IgnoreFatalExit - { - get - { - return this.ignoreFatalExitField; - } - set - { - this.ignoreFatalExitFieldSet = true; - this.ignoreFatalExitField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_ERROR messages. - /// - public YesNoType IgnoreError - { - get - { - return this.ignoreErrorField; - } - set - { - this.ignoreErrorFieldSet = true; - this.ignoreErrorField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_WARNING messages. - /// - public YesNoType IgnoreWarning - { - get - { - return this.ignoreWarningField; - } - set - { - this.ignoreWarningFieldSet = true; - this.ignoreWarningField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_USER messages. - /// - public YesNoType IgnoreUser - { - get - { - return this.ignoreUserField; - } - set - { - this.ignoreUserFieldSet = true; - this.ignoreUserField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_INFO messages. - /// - public YesNoType IgnoreInfo - { - get - { - return this.ignoreInfoField; - } - set - { - this.ignoreInfoFieldSet = true; - this.ignoreInfoField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_FILESINUSE messages. - /// - public YesNoType IgnoreFilesInUse - { - get - { - return this.ignoreFilesInUseField; - } - set - { - this.ignoreFilesInUseFieldSet = true; - this.ignoreFilesInUseField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_RESOLVESOURCE messages. - /// - public YesNoType IgnoreResolveSource - { - get - { - return this.ignoreResolveSourceField; - } - set - { - this.ignoreResolveSourceFieldSet = true; - this.ignoreResolveSourceField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_OUTOFDISKSPACE messages. - /// - public YesNoType IgnoreOutOfDiskSpace - { - get - { - return this.ignoreOutOfDiskSpaceField; - } - set - { - this.ignoreOutOfDiskSpaceFieldSet = true; - this.ignoreOutOfDiskSpaceField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_ACTIONSTART messages. - /// - public YesNoType IgnoreActionStart - { - get - { - return this.ignoreActionStartField; - } - set - { - this.ignoreActionStartFieldSet = true; - this.ignoreActionStartField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_ACTIONDATA messages. - /// - public YesNoType IgnoreActionData - { - get - { - return this.ignoreActionDataField; - } - set - { - this.ignoreActionDataFieldSet = true; - this.ignoreActionDataField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_PROGRESS messages. - /// - public YesNoType IgnoreProgress - { - get - { - return this.ignoreProgressField; - } - set - { - this.ignoreProgressFieldSet = true; - this.ignoreProgressField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_COMMONDATA messages. - /// - public YesNoType IgnoreCommonData - { - get - { - return this.ignoreCommonDataField; - } - set - { - this.ignoreCommonDataFieldSet = true; - this.ignoreCommonDataField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_INITIALIZE messages. - /// - public YesNoType IgnoreInitialize - { - get - { - return this.ignoreInitializeField; - } - set - { - this.ignoreInitializeFieldSet = true; - this.ignoreInitializeField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_TERMINATE messages. - /// - public YesNoType IgnoreTerminate - { - get - { - return this.ignoreTerminateField; - } - set - { - this.ignoreTerminateFieldSet = true; - this.ignoreTerminateField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_SHOWDIALOG messages. - /// - public YesNoType IgnoreShowDialog - { - get - { - return this.ignoreShowDialogField; - } - set - { - this.ignoreShowDialogFieldSet = true; - this.ignoreShowDialogField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_RMFILESINUSE messages. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public YesNoType IgnoreRMFilesInUse - { - get - { - return this.ignoreRMFilesInUseField; - } - set - { - this.ignoreRMFilesInUseFieldSet = true; - this.ignoreRMFilesInUseField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_INSTALLSTART messages. - /// - public YesNoType IgnoreInstallStart - { - get - { - return this.ignoreInstallStartField; - } - set - { - this.ignoreInstallStartFieldSet = true; - this.ignoreInstallStartField = value; - } - } - - /// - /// Embedded UI will not recieve any INSTALLLOGMODE_INSTALLEND messages. - /// - public YesNoType IgnoreInstallEnd - { - get - { - return this.ignoreInstallEndField; - } - set - { - this.ignoreInstallEndFieldSet = true; - this.ignoreInstallEndField = value; - } - } - - /// - /// The name for the embedded UI DLL when it is extracted from the package and executed. (Windows Installer - /// does not support the typical short filename and long filename combination for embedded UI files as it - /// does for other kinds of files.) If this attribute is not specified the file name portion of the SourceFile - /// attribute will be used. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Path to the binary file that is the embedded UI. This must be a DLL that exports the following - /// three entry points: InitializeEmbeddedUI, EmbeddedUIHandler and ShutdownEmbeddedUI. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - /// - /// Set yes to allow the Windows Installer to display the embedded UI during basic UI level installation. - /// - public YesNoType SupportBasicUI - { - get - { - return this.supportBasicUIField; - } - set - { - this.supportBasicUIFieldSet = true; - this.supportBasicUIField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("EmbeddedUIResource" == childName)) - { - childValue = new EmbeddedUIResource(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("EmbeddedUI", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.ignoreFatalExitFieldSet) - { - if ((this.ignoreFatalExitField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreFatalExit", "no"); - } - if ((this.ignoreFatalExitField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreFatalExit", "yes"); - } - } - if (this.ignoreErrorFieldSet) - { - if ((this.ignoreErrorField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreError", "no"); - } - if ((this.ignoreErrorField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreError", "yes"); - } - } - if (this.ignoreWarningFieldSet) - { - if ((this.ignoreWarningField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreWarning", "no"); - } - if ((this.ignoreWarningField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreWarning", "yes"); - } - } - if (this.ignoreUserFieldSet) - { - if ((this.ignoreUserField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreUser", "no"); - } - if ((this.ignoreUserField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreUser", "yes"); - } - } - if (this.ignoreInfoFieldSet) - { - if ((this.ignoreInfoField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreInfo", "no"); - } - if ((this.ignoreInfoField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreInfo", "yes"); - } - } - if (this.ignoreFilesInUseFieldSet) - { - if ((this.ignoreFilesInUseField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreFilesInUse", "no"); - } - if ((this.ignoreFilesInUseField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreFilesInUse", "yes"); - } - } - if (this.ignoreResolveSourceFieldSet) - { - if ((this.ignoreResolveSourceField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreResolveSource", "no"); - } - if ((this.ignoreResolveSourceField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreResolveSource", "yes"); - } - } - if (this.ignoreOutOfDiskSpaceFieldSet) - { - if ((this.ignoreOutOfDiskSpaceField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreOutOfDiskSpace", "no"); - } - if ((this.ignoreOutOfDiskSpaceField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreOutOfDiskSpace", "yes"); - } - } - if (this.ignoreActionStartFieldSet) - { - if ((this.ignoreActionStartField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreActionStart", "no"); - } - if ((this.ignoreActionStartField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreActionStart", "yes"); - } - } - if (this.ignoreActionDataFieldSet) - { - if ((this.ignoreActionDataField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreActionData", "no"); - } - if ((this.ignoreActionDataField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreActionData", "yes"); - } - } - if (this.ignoreProgressFieldSet) - { - if ((this.ignoreProgressField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreProgress", "no"); - } - if ((this.ignoreProgressField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreProgress", "yes"); - } - } - if (this.ignoreCommonDataFieldSet) - { - if ((this.ignoreCommonDataField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreCommonData", "no"); - } - if ((this.ignoreCommonDataField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreCommonData", "yes"); - } - } - if (this.ignoreInitializeFieldSet) - { - if ((this.ignoreInitializeField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreInitialize", "no"); - } - if ((this.ignoreInitializeField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreInitialize", "yes"); - } - } - if (this.ignoreTerminateFieldSet) - { - if ((this.ignoreTerminateField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreTerminate", "no"); - } - if ((this.ignoreTerminateField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreTerminate", "yes"); - } - } - if (this.ignoreShowDialogFieldSet) - { - if ((this.ignoreShowDialogField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreShowDialog", "no"); - } - if ((this.ignoreShowDialogField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreShowDialog", "yes"); - } - } - if (this.ignoreRMFilesInUseFieldSet) - { - if ((this.ignoreRMFilesInUseField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreRMFilesInUse", "no"); - } - if ((this.ignoreRMFilesInUseField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreRMFilesInUse", "yes"); - } - } - if (this.ignoreInstallStartFieldSet) - { - if ((this.ignoreInstallStartField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreInstallStart", "no"); - } - if ((this.ignoreInstallStartField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreInstallStart", "yes"); - } - } - if (this.ignoreInstallEndFieldSet) - { - if ((this.ignoreInstallEndField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreInstallEnd", "no"); - } - if ((this.ignoreInstallEndField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreInstallEnd", "yes"); - } - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.supportBasicUIFieldSet) - { - if ((this.supportBasicUIField == YesNoType.no)) - { - writer.WriteAttributeString("SupportBasicUI", "no"); - } - if ((this.supportBasicUIField == YesNoType.yes)) - { - writer.WriteAttributeString("SupportBasicUI", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("IgnoreFatalExit" == name)) - { - this.ignoreFatalExitField = Enums.ParseYesNoType(value); - this.ignoreFatalExitFieldSet = true; - } - if (("IgnoreError" == name)) - { - this.ignoreErrorField = Enums.ParseYesNoType(value); - this.ignoreErrorFieldSet = true; - } - if (("IgnoreWarning" == name)) - { - this.ignoreWarningField = Enums.ParseYesNoType(value); - this.ignoreWarningFieldSet = true; - } - if (("IgnoreUser" == name)) - { - this.ignoreUserField = Enums.ParseYesNoType(value); - this.ignoreUserFieldSet = true; - } - if (("IgnoreInfo" == name)) - { - this.ignoreInfoField = Enums.ParseYesNoType(value); - this.ignoreInfoFieldSet = true; - } - if (("IgnoreFilesInUse" == name)) - { - this.ignoreFilesInUseField = Enums.ParseYesNoType(value); - this.ignoreFilesInUseFieldSet = true; - } - if (("IgnoreResolveSource" == name)) - { - this.ignoreResolveSourceField = Enums.ParseYesNoType(value); - this.ignoreResolveSourceFieldSet = true; - } - if (("IgnoreOutOfDiskSpace" == name)) - { - this.ignoreOutOfDiskSpaceField = Enums.ParseYesNoType(value); - this.ignoreOutOfDiskSpaceFieldSet = true; - } - if (("IgnoreActionStart" == name)) - { - this.ignoreActionStartField = Enums.ParseYesNoType(value); - this.ignoreActionStartFieldSet = true; - } - if (("IgnoreActionData" == name)) - { - this.ignoreActionDataField = Enums.ParseYesNoType(value); - this.ignoreActionDataFieldSet = true; - } - if (("IgnoreProgress" == name)) - { - this.ignoreProgressField = Enums.ParseYesNoType(value); - this.ignoreProgressFieldSet = true; - } - if (("IgnoreCommonData" == name)) - { - this.ignoreCommonDataField = Enums.ParseYesNoType(value); - this.ignoreCommonDataFieldSet = true; - } - if (("IgnoreInitialize" == name)) - { - this.ignoreInitializeField = Enums.ParseYesNoType(value); - this.ignoreInitializeFieldSet = true; - } - if (("IgnoreTerminate" == name)) - { - this.ignoreTerminateField = Enums.ParseYesNoType(value); - this.ignoreTerminateFieldSet = true; - } - if (("IgnoreShowDialog" == name)) - { - this.ignoreShowDialogField = Enums.ParseYesNoType(value); - this.ignoreShowDialogFieldSet = true; - } - if (("IgnoreRMFilesInUse" == name)) - { - this.ignoreRMFilesInUseField = Enums.ParseYesNoType(value); - this.ignoreRMFilesInUseFieldSet = true; - } - if (("IgnoreInstallStart" == name)) - { - this.ignoreInstallStartField = Enums.ParseYesNoType(value); - this.ignoreInstallStartFieldSet = true; - } - if (("IgnoreInstallEnd" == name)) - { - this.ignoreInstallEndField = Enums.ParseYesNoType(value); - this.ignoreInstallEndFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("SupportBasicUI" == name)) - { - this.supportBasicUIField = Enums.ParseYesNoType(value); - this.supportBasicUIFieldSet = true; - } - } - } - - /// - /// Defines a resource for use by the embedded UI. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class EmbeddedUIResource : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string nameField; - - private bool nameFieldSet; - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier for the embedded UI resource. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The name for the resource when it is extracted from the package for use by the embedded UI DLL. (Windows - /// Installer does not support the typical short filename and long filename combination for embedded UI files - /// as it does for other kinds of files.) If this attribute is not specified the Id attribute will be used. - /// - public string Name - { - get - { - return this.nameField; - } - set - { - this.nameFieldSet = true; - this.nameField = value; - } - } - - /// - /// Path to the binary file that is the embedded UI resource. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("EmbeddedUIResource", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.nameFieldSet) - { - writer.WriteAttributeString("Name", this.nameField); - } - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Name" == name)) - { - this.nameField = value; - this.nameFieldSet = true; - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Error : ISchemaElement, ISetAttributes - { - - private int idField; - - private bool idFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// Number of the error for which a message is being provided. See MSI SDK for error definitions. - /// - public int Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Element value is Message, use CDATA if message contains delimiter characters - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Error", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField.ToString(CultureInfo.InvariantCulture)); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.idFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Publish : ISchemaElement, ISetAttributes - { - - private string controlField; - - private bool controlFieldSet; - - private string dialogField; - - private bool dialogFieldSet; - - private string eventField; - - private bool eventFieldSet; - - private string orderField; - - private bool orderFieldSet; - - private string propertyField; - - private bool propertyFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// The parent Control for this Publish element, should only be specified when this element is a child of the UI element. - /// - public string Control - { - get - { - return this.controlField; - } - set - { - this.controlFieldSet = true; - this.controlField = value; - } - } - - /// - /// The parent Dialog for this Publish element, should only be specified when this element is a child of the UI element. - /// This attribute will create a reference to the specified Dialog, so an additional DialogRef is not necessary. - /// - public string Dialog - { - get - { - return this.dialogField; - } - set - { - this.dialogFieldSet = true; - this.dialogField = value; - } - } - - /// - /// Set this attribute's value to one of the standard control events to trigger that event. - /// Either this attribute or the Property attribute must be set, but not both at the same time. - /// - public string Event - { - get - { - return this.eventField; - } - set - { - this.eventFieldSet = true; - this.eventField = value; - } - } - - /// - /// This attribute should only need to be set if this element is nested under a UI element in order to - /// control the order in which this publish event will be started. - /// If this element is nested under a Control element, the default value will be one greater than any - /// previous Publish element's order (the first element's default value is 1). - /// If this element is nested under a UI element, the default value is always 1 (it does not get a - /// default value based on any previous Publish elements). - /// - public string Order - { - get - { - return this.orderField; - } - set - { - this.orderFieldSet = true; - this.orderField = value; - } - } - - /// - /// Set this attribute's value to a property name to set that property. - /// Either this attribute or the Event attribute must be set, but not both at the same time. - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - /// - /// If the Property attribute is specified, set the value of this attribute to the new value for the property. - /// To set a property to null, do not set this attribute (the ControlEvent Argument column will be set to '{}'). - /// Otherwise, this attribute's value should be the argument for the event specified in the Event attribute. - /// If the event doesn't take an attribute, a common value to use is "0". - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// The element value is the optional Condition expression. - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Publish", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.controlFieldSet) - { - writer.WriteAttributeString("Control", this.controlField); - } - if (this.dialogFieldSet) - { - writer.WriteAttributeString("Dialog", this.dialogField); - } - if (this.eventFieldSet) - { - writer.WriteAttributeString("Event", this.eventField); - } - if (this.orderFieldSet) - { - writer.WriteAttributeString("Order", this.orderField); - } - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Control" == name)) - { - this.controlField = value; - this.controlFieldSet = true; - } - if (("Dialog" == name)) - { - this.dialogField = value; - this.dialogFieldSet = true; - } - if (("Event" == name)) - { - this.eventField = value; - this.eventFieldSet = true; - } - if (("Order" == name)) - { - this.orderField = value; - this.orderFieldSet = true; - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - /// - /// Sets attributes for events in the EventMapping table - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Subscribe : ISchemaElement, ISetAttributes - { - - private string eventField; - - private bool eventFieldSet; - - private string attributeField; - - private bool attributeFieldSet; - - private ISchemaElement parentElement; - - /// - /// must be one of the standard control events' - /// - public string Event - { - get - { - return this.eventField; - } - set - { - this.eventFieldSet = true; - this.eventField = value; - } - } - - /// - /// if not present can only handle enable, disable, hide, unhide events - /// - public string Attribute - { - get - { - return this.attributeField; - } - set - { - this.attributeFieldSet = true; - this.attributeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Subscribe", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.eventFieldSet) - { - writer.WriteAttributeString("Event", this.eventField); - } - if (this.attributeFieldSet) - { - writer.WriteAttributeString("Attribute", this.attributeField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Event" == name)) - { - this.eventField = value; - this.eventFieldSet = true; - } - if (("Attribute" == name)) - { - this.attributeField = value; - this.attributeFieldSet = true; - } - } - } - - /// - /// An alternative to using the Text attribute when the value contains special XML characters like <, >, or &. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Text : ISchemaElement, ISetAttributes - { - - private string sourceFileField; - - private bool sourceFileFieldSet; - - private string srcField; - - private bool srcFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// Instructs the text to be imported from a file instead of the element value during the binding process. - /// - public string SourceFile - { - get - { - return this.sourceFileField; - } - set - { - this.sourceFileFieldSet = true; - this.sourceFileField = value; - } - } - - [SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly")] - public string src - { - get - { - return this.srcField; - } - set - { - this.srcFieldSet = true; - this.srcField = value; - } - } - - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Text", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.sourceFileFieldSet) - { - writer.WriteAttributeString("SourceFile", this.sourceFileField); - } - if (this.srcFieldSet) - { - writer.WriteAttributeString("src", this.srcField); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("SourceFile" == name)) - { - this.sourceFileField = value; - this.sourceFileFieldSet = true; - } - if (("src" == name)) - { - this.srcField = value; - this.srcFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - /// - /// Contains the controls that appear on each dialog. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Control : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string typeField; - - private bool typeFieldSet; - - private string xField; - - private bool xFieldSet; - - private string yField; - - private bool yFieldSet; - - private string widthField; - - private bool widthFieldSet; - - private string heightField; - - private bool heightFieldSet; - - private string propertyField; - - private bool propertyFieldSet; - - private string textField; - - private bool textFieldSet; - - private string helpField; - - private bool helpFieldSet; - - private string toolTipField; - - private bool toolTipFieldSet; - - private string checkBoxValueField; - - private bool checkBoxValueFieldSet; - - private string checkBoxPropertyRefField; - - private bool checkBoxPropertyRefFieldSet; - - private YesNoType tabSkipField; - - private bool tabSkipFieldSet; - - private YesNoType defaultField; - - private bool defaultFieldSet; - - private YesNoType cancelField; - - private bool cancelFieldSet; - - private YesNoType hiddenField; - - private bool hiddenFieldSet; - - private YesNoType disabledField; - - private bool disabledFieldSet; - - private YesNoType sunkenField; - - private bool sunkenFieldSet; - - private YesNoType indirectField; - - private bool indirectFieldSet; - - private YesNoType integerField; - - private bool integerFieldSet; - - private YesNoType rightToLeftField; - - private bool rightToLeftFieldSet; - - private YesNoType rightAlignedField; - - private bool rightAlignedFieldSet; - - private YesNoType leftScrollField; - - private bool leftScrollFieldSet; - - private YesNoType transparentField; - - private bool transparentFieldSet; - - private YesNoType noPrefixField; - - private bool noPrefixFieldSet; - - private YesNoType noWrapField; - - private bool noWrapFieldSet; - - private YesNoType formatSizeField; - - private bool formatSizeFieldSet; - - private YesNoType userLanguageField; - - private bool userLanguageFieldSet; - - private YesNoType multilineField; - - private bool multilineFieldSet; - - private YesNoType passwordField; - - private bool passwordFieldSet; - - private YesNoType progressBlocksField; - - private bool progressBlocksFieldSet; - - private YesNoType removableField; - - private bool removableFieldSet; - - private YesNoType fixedField; - - private bool fixedFieldSet; - - private YesNoType remoteField; - - private bool remoteFieldSet; - - private YesNoType cDROMField; - - private bool cDROMFieldSet; - - private YesNoType rAMDiskField; - - private bool rAMDiskFieldSet; - - private YesNoType floppyField; - - private bool floppyFieldSet; - - private YesNoType showRollbackCostField; - - private bool showRollbackCostFieldSet; - - private YesNoType sortedField; - - private bool sortedFieldSet; - - private YesNoType comboListField; - - private bool comboListFieldSet; - - private YesNoType imageField; - - private bool imageFieldSet; - - private IconSizeType iconSizeField; - - private bool iconSizeFieldSet; - - private YesNoType fixedSizeField; - - private bool fixedSizeFieldSet; - - private YesNoType iconField; - - private bool iconFieldSet; - - private YesNoType bitmapField; - - private bool bitmapFieldSet; - - private YesNoType pushLikeField; - - private bool pushLikeFieldSet; - - private YesNoType hasBorderField; - - private bool hasBorderFieldSet; - - private YesNoType elevationShieldField; - - private bool elevationShieldFieldSet; - - private ISchemaElement parentElement; - - public Control() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Text))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ComboBox))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListBox))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListView))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RadioButtonGroup))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Property))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Binary))); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Condition))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Publish))); - childCollection1.AddItem(new ElementCollection.ChoiceItem(typeof(Subscribe))); - childCollection0.AddCollection(childCollection1); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Combined with the Dialog Id to make up the primary key of the Control table. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// 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 - /// - public string Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - /// - /// Horizontal coordinate of the upper-left corner of the rectangular boundary of the control. This must be a non-negative number. - /// - public string X - { - get - { - return this.xField; - } - set - { - this.xFieldSet = true; - this.xField = value; - } - } - - /// - /// Vertical coordinate of the upper-left corner of the rectangular boundary of the control. This must be a non-negative number. - /// - public string Y - { - get - { - return this.yField; - } - set - { - this.yFieldSet = true; - this.yField = value; - } - } - - /// - /// Width of the rectangular boundary of the control. This must be a non-negative number. - /// - public string Width - { - get - { - return this.widthField; - } - set - { - this.widthFieldSet = true; - this.widthField = value; - } - } - - /// - /// Height of the rectangular boundary of the control. This must be a non-negative number. - /// - public string Height - { - get - { - return this.heightField; - } - set - { - this.heightFieldSet = true; - this.heightField = value; - } - } - - /// - /// The name of a defined property to be linked to this control. This column is required for active controls. - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - /// - /// 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 - /// - public string Text - { - get - { - return this.textField; - } - set - { - this.textFieldSet = true; - this.textField = value; - } - } - - /// - /// This attribute is reserved for future use. There is no need to use this until Windows Installer uses it for something. - /// - public string Help - { - get - { - return this.helpField; - } - set - { - this.helpFieldSet = true; - this.helpField = value; - } - } - - /// - /// The string used for the Tooltip. - /// - public string ToolTip - { - get - { - return this.toolTipField; - } - set - { - this.toolTipFieldSet = true; - this.toolTipField = value; - } - } - - /// - /// 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. - /// - public string CheckBoxValue - { - get - { - return this.checkBoxValueField; - } - set - { - this.checkBoxValueFieldSet = true; - this.checkBoxValueField = value; - } - } - - /// - /// 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. - /// - public string CheckBoxPropertyRef - { - get - { - return this.checkBoxPropertyRefField; - } - set - { - this.checkBoxPropertyRefFieldSet = true; - this.checkBoxPropertyRefField = value; - } - } - - /// - /// Set this attribute to "yes" to cause this Control to be skipped in the tab sequence. - /// - public YesNoType TabSkip - { - get - { - return this.tabSkipField; - } - set - { - this.tabSkipFieldSet = true; - this.tabSkipField = value; - } - } - - /// - /// Set this attribute to "yes" to cause this Control to be invoked by the return key. - /// - public YesNoType Default - { - get - { - return this.defaultField; - } - set - { - this.defaultFieldSet = true; - this.defaultField = value; - } - } - - /// - /// Set this attribute to "yes" to cause this Control to be invoked by the escape key. - /// - public YesNoType Cancel - { - get - { - return this.cancelField; - } - set - { - this.cancelFieldSet = true; - this.cancelField = value; - } - } - - /// - /// Set this attribute to "yes" to cause the Control to be hidden. - /// - public YesNoType Hidden - { - get - { - return this.hiddenField; - } - set - { - this.hiddenFieldSet = true; - this.hiddenField = value; - } - } - - /// - /// Set this attribute to "yes" to cause the Control to be disabled. - /// - public YesNoType Disabled - { - get - { - return this.disabledField; - } - set - { - this.disabledFieldSet = true; - this.disabledField = value; - } - } - - /// - /// Set this attribute to "yes" to cause the Control to be sunken. - /// - public YesNoType Sunken - { - get - { - return this.sunkenField; - } - set - { - this.sunkenFieldSet = true; - this.sunkenField = value; - } - } - - /// - /// 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. - /// - public YesNoType Indirect - { - get - { - return this.indirectField; - } - set - { - this.indirectFieldSet = true; - this.indirectField = value; - } - } - - /// - /// 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. - /// - public YesNoType Integer - { - get - { - return this.integerField; - } - set - { - this.integerFieldSet = true; - this.integerField = value; - } - } - - /// - /// Set this attribute to "yes" to cause the Control to display from right to left. - /// - public YesNoType RightToLeft - { - get - { - return this.rightToLeftField; - } - set - { - this.rightToLeftFieldSet = true; - this.rightToLeftField = value; - } - } - - /// - /// Set this attribute to "yes" to cause the Control to be right aligned. - /// - public YesNoType RightAligned - { - get - { - return this.rightAlignedField; - } - set - { - this.rightAlignedFieldSet = true; - this.rightAlignedField = value; - } - } - - /// - /// Set this attribute to "yes" to cause the scroll bar to display on the left side of the Control. - /// - public YesNoType LeftScroll - { - get - { - return this.leftScrollField; - } - set - { - this.leftScrollFieldSet = true; - this.leftScrollField = value; - } - } - - /// - /// This attribute is only valid for Text Controls. - /// - public YesNoType Transparent - { - get - { - return this.transparentField; - } - set - { - this.transparentFieldSet = true; - this.transparentField = value; - } - } - - /// - /// This attribute is only valid for Text Controls. - /// - public YesNoType NoPrefix - { - get - { - return this.noPrefixField; - } - set - { - this.noPrefixFieldSet = true; - this.noPrefixField = value; - } - } - - /// - /// This attribute is only valid for Text Controls. - /// - public YesNoType NoWrap - { - get - { - return this.noWrapField; - } - set - { - this.noWrapFieldSet = true; - this.noWrapField = value; - } - } - - /// - /// This attribute is only valid for Text Controls. - /// - public YesNoType FormatSize - { - get - { - return this.formatSizeField; - } - set - { - this.formatSizeFieldSet = true; - this.formatSizeField = value; - } - } - - /// - /// This attribute is only valid for Text Controls. - /// - public YesNoType UserLanguage - { - get - { - return this.userLanguageField; - } - set - { - this.userLanguageFieldSet = true; - this.userLanguageField = value; - } - } - - /// - /// This attribute is only valid for Edit Controls. - /// - public YesNoType Multiline - { - get - { - return this.multilineField; - } - set - { - this.multilineFieldSet = true; - this.multilineField = value; - } - } - - /// - /// This attribute is only valid for Edit Controls. - /// - public YesNoType Password - { - get - { - return this.passwordField; - } - set - { - this.passwordFieldSet = true; - this.passwordField = value; - } - } - - /// - /// This attribute is only valid for ProgressBar Controls. - /// - public YesNoType ProgressBlocks - { - get - { - return this.progressBlocksField; - } - set - { - this.progressBlocksFieldSet = true; - this.progressBlocksField = value; - } - } - - /// - /// This attribute is only valid for Volume and Directory Controls. - /// - public YesNoType Removable - { - get - { - return this.removableField; - } - set - { - this.removableFieldSet = true; - this.removableField = value; - } - } - - /// - /// This attribute is only valid for Volume and Directory Controls. - /// - public YesNoType Fixed - { - get - { - return this.fixedField; - } - set - { - this.fixedFieldSet = true; - this.fixedField = value; - } - } - - /// - /// This attribute is only valid for Volume and Directory Controls. - /// - public YesNoType Remote - { - get - { - return this.remoteField; - } - set - { - this.remoteFieldSet = true; - this.remoteField = value; - } - } - - /// - /// This attribute is only valid for Volume and Directory Controls. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public YesNoType CDROM - { - get - { - return this.cDROMField; - } - set - { - this.cDROMFieldSet = true; - this.cDROMField = value; - } - } - - /// - /// This attribute is only valid for Volume and Directory Controls. - /// - [SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased")] - public YesNoType RAMDisk - { - get - { - return this.rAMDiskField; - } - set - { - this.rAMDiskFieldSet = true; - this.rAMDiskField = value; - } - } - - /// - /// This attribute is only valid for Volume and Directory Controls. - /// - public YesNoType Floppy - { - get - { - return this.floppyField; - } - set - { - this.floppyFieldSet = true; - this.floppyField = value; - } - } - - /// - /// This attribute is only valid for VolumeCostList Controls. - /// - public YesNoType ShowRollbackCost - { - get - { - return this.showRollbackCostField; - } - set - { - this.showRollbackCostFieldSet = true; - this.showRollbackCostField = value; - } - } - - /// - /// This attribute is only valid for ListBox, ListView, and ComboBox Controls. Set - /// the value of this attribute to "yes" to have entries appear in the order specified under the Control. - /// If the attribute value is "no" or absent the entries in the control will appear in alphabetical order. - /// - public YesNoType Sorted - { - get - { - return this.sortedField; - } - set - { - this.sortedFieldSet = true; - this.sortedField = value; - } - } - - /// - /// This attribute is only valid for ComboBox Controls. - /// - public YesNoType ComboList - { - get - { - return this.comboListField; - } - set - { - this.comboListFieldSet = true; - this.comboListField = value; - } - } - - /// - /// This attribute is only valid for RadioButton, PushButton, and Icon Controls. - /// - public YesNoType Image - { - get - { - return this.imageField; - } - set - { - this.imageFieldSet = true; - this.imageField = value; - } - } - - /// - /// This attribute is only valid for RadioButton, PushButton, and Icon Controls. - /// - public IconSizeType IconSize - { - get - { - return this.iconSizeField; - } - set - { - this.iconSizeFieldSet = true; - this.iconSizeField = value; - } - } - - /// - /// This attribute is only valid for RadioButton, PushButton, and Icon Controls. - /// - public YesNoType FixedSize - { - get - { - return this.fixedSizeField; - } - set - { - this.fixedSizeFieldSet = true; - this.fixedSizeField = value; - } - } - - /// - /// This attribute is only valid for RadioButton and PushButton Controls. - /// - public YesNoType Icon - { - get - { - return this.iconField; - } - set - { - this.iconFieldSet = true; - this.iconField = value; - } - } - - /// - /// This attribute is only valid for RadioButton and PushButton Controls. - /// - public YesNoType Bitmap - { - get - { - return this.bitmapField; - } - set - { - this.bitmapFieldSet = true; - this.bitmapField = value; - } - } - - /// - /// This attribute is only valid for RadioButton and Checkbox Controls. - /// - public YesNoType PushLike - { - get - { - return this.pushLikeField; - } - set - { - this.pushLikeFieldSet = true; - this.pushLikeField = value; - } - } - - /// - /// This attribute is only valid for RadioButton Controls. - /// - public YesNoType HasBorder - { - get - { - return this.hasBorderField; - } - set - { - this.hasBorderFieldSet = true; - this.hasBorderField = value; - } - } - - /// - /// This attribute is only valid for PushButton controls. - /// Set this attribute to "yes" to add the User Account Control (UAC) elevation icon (shield icon) to the PushButton control. - /// If this attribute's value is "yes" and the installation is not yet running with elevated privileges, - /// the pushbutton control is created using the User Account Control (UAC) elevation icon (shield icon). - /// If this attribute's value is "yes" and the installation is already running with elevated privileges, - /// the pushbutton control is created using the other icon attributes. - /// Otherwise, the pushbutton control is created using the other icon attributes. - /// - public YesNoType ElevationShield - { - get - { - return this.elevationShieldField; - } - set - { - this.elevationShieldFieldSet = true; - this.elevationShieldField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Text" == childName)) - { - childValue = new Text(); - } - if (("ComboBox" == childName)) - { - childValue = new ComboBox(); - } - if (("ListBox" == childName)) - { - childValue = new ListBox(); - } - if (("ListView" == childName)) - { - childValue = new ListView(); - } - if (("RadioButtonGroup" == childName)) - { - childValue = new RadioButtonGroup(); - } - if (("Property" == childName)) - { - childValue = new Property(); - } - if (("Binary" == childName)) - { - childValue = new Binary(); - } - if (("Condition" == childName)) - { - childValue = new Condition(); - } - if (("Publish" == childName)) - { - childValue = new Publish(); - } - if (("Subscribe" == childName)) - { - childValue = new Subscribe(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Parses a IconSizeType from a string. - /// - public static IconSizeType ParseIconSizeType(string value) - { - IconSizeType parsedValue; - Control.TryParseIconSizeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a IconSizeType from a string. - /// - public static bool TryParseIconSizeType(string value, out IconSizeType parsedValue) - { - parsedValue = IconSizeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("16" == value)) - { - parsedValue = IconSizeType.Item16; - } - else - { - if (("32" == value)) - { - parsedValue = IconSizeType.Item32; - } - else - { - if (("48" == value)) - { - parsedValue = IconSizeType.Item48; - } - else - { - parsedValue = IconSizeType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Control", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.typeFieldSet) - { - writer.WriteAttributeString("Type", this.typeField); - } - if (this.xFieldSet) - { - writer.WriteAttributeString("X", this.xField); - } - if (this.yFieldSet) - { - writer.WriteAttributeString("Y", this.yField); - } - if (this.widthFieldSet) - { - writer.WriteAttributeString("Width", this.widthField); - } - if (this.heightFieldSet) - { - writer.WriteAttributeString("Height", this.heightField); - } - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - if (this.textFieldSet) - { - writer.WriteAttributeString("Text", this.textField); - } - if (this.helpFieldSet) - { - writer.WriteAttributeString("Help", this.helpField); - } - if (this.toolTipFieldSet) - { - writer.WriteAttributeString("ToolTip", this.toolTipField); - } - if (this.checkBoxValueFieldSet) - { - writer.WriteAttributeString("CheckBoxValue", this.checkBoxValueField); - } - if (this.checkBoxPropertyRefFieldSet) - { - writer.WriteAttributeString("CheckBoxPropertyRef", this.checkBoxPropertyRefField); - } - if (this.tabSkipFieldSet) - { - if ((this.tabSkipField == YesNoType.no)) - { - writer.WriteAttributeString("TabSkip", "no"); - } - if ((this.tabSkipField == YesNoType.yes)) - { - writer.WriteAttributeString("TabSkip", "yes"); - } - } - if (this.defaultFieldSet) - { - if ((this.defaultField == YesNoType.no)) - { - writer.WriteAttributeString("Default", "no"); - } - if ((this.defaultField == YesNoType.yes)) - { - writer.WriteAttributeString("Default", "yes"); - } - } - if (this.cancelFieldSet) - { - if ((this.cancelField == YesNoType.no)) - { - writer.WriteAttributeString("Cancel", "no"); - } - if ((this.cancelField == YesNoType.yes)) - { - writer.WriteAttributeString("Cancel", "yes"); - } - } - if (this.hiddenFieldSet) - { - if ((this.hiddenField == YesNoType.no)) - { - writer.WriteAttributeString("Hidden", "no"); - } - if ((this.hiddenField == YesNoType.yes)) - { - writer.WriteAttributeString("Hidden", "yes"); - } - } - if (this.disabledFieldSet) - { - if ((this.disabledField == YesNoType.no)) - { - writer.WriteAttributeString("Disabled", "no"); - } - if ((this.disabledField == YesNoType.yes)) - { - writer.WriteAttributeString("Disabled", "yes"); - } - } - if (this.sunkenFieldSet) - { - if ((this.sunkenField == YesNoType.no)) - { - writer.WriteAttributeString("Sunken", "no"); - } - if ((this.sunkenField == YesNoType.yes)) - { - writer.WriteAttributeString("Sunken", "yes"); - } - } - if (this.indirectFieldSet) - { - if ((this.indirectField == YesNoType.no)) - { - writer.WriteAttributeString("Indirect", "no"); - } - if ((this.indirectField == YesNoType.yes)) - { - writer.WriteAttributeString("Indirect", "yes"); - } - } - if (this.integerFieldSet) - { - if ((this.integerField == YesNoType.no)) - { - writer.WriteAttributeString("Integer", "no"); - } - if ((this.integerField == YesNoType.yes)) - { - writer.WriteAttributeString("Integer", "yes"); - } - } - if (this.rightToLeftFieldSet) - { - if ((this.rightToLeftField == YesNoType.no)) - { - writer.WriteAttributeString("RightToLeft", "no"); - } - if ((this.rightToLeftField == YesNoType.yes)) - { - writer.WriteAttributeString("RightToLeft", "yes"); - } - } - if (this.rightAlignedFieldSet) - { - if ((this.rightAlignedField == YesNoType.no)) - { - writer.WriteAttributeString("RightAligned", "no"); - } - if ((this.rightAlignedField == YesNoType.yes)) - { - writer.WriteAttributeString("RightAligned", "yes"); - } - } - if (this.leftScrollFieldSet) - { - if ((this.leftScrollField == YesNoType.no)) - { - writer.WriteAttributeString("LeftScroll", "no"); - } - if ((this.leftScrollField == YesNoType.yes)) - { - writer.WriteAttributeString("LeftScroll", "yes"); - } - } - if (this.transparentFieldSet) - { - if ((this.transparentField == YesNoType.no)) - { - writer.WriteAttributeString("Transparent", "no"); - } - if ((this.transparentField == YesNoType.yes)) - { - writer.WriteAttributeString("Transparent", "yes"); - } - } - if (this.noPrefixFieldSet) - { - if ((this.noPrefixField == YesNoType.no)) - { - writer.WriteAttributeString("NoPrefix", "no"); - } - if ((this.noPrefixField == YesNoType.yes)) - { - writer.WriteAttributeString("NoPrefix", "yes"); - } - } - if (this.noWrapFieldSet) - { - if ((this.noWrapField == YesNoType.no)) - { - writer.WriteAttributeString("NoWrap", "no"); - } - if ((this.noWrapField == YesNoType.yes)) - { - writer.WriteAttributeString("NoWrap", "yes"); - } - } - if (this.formatSizeFieldSet) - { - if ((this.formatSizeField == YesNoType.no)) - { - writer.WriteAttributeString("FormatSize", "no"); - } - if ((this.formatSizeField == YesNoType.yes)) - { - writer.WriteAttributeString("FormatSize", "yes"); - } - } - if (this.userLanguageFieldSet) - { - if ((this.userLanguageField == YesNoType.no)) - { - writer.WriteAttributeString("UserLanguage", "no"); - } - if ((this.userLanguageField == YesNoType.yes)) - { - writer.WriteAttributeString("UserLanguage", "yes"); - } - } - if (this.multilineFieldSet) - { - if ((this.multilineField == YesNoType.no)) - { - writer.WriteAttributeString("Multiline", "no"); - } - if ((this.multilineField == YesNoType.yes)) - { - writer.WriteAttributeString("Multiline", "yes"); - } - } - if (this.passwordFieldSet) - { - if ((this.passwordField == YesNoType.no)) - { - writer.WriteAttributeString("Password", "no"); - } - if ((this.passwordField == YesNoType.yes)) - { - writer.WriteAttributeString("Password", "yes"); - } - } - if (this.progressBlocksFieldSet) - { - if ((this.progressBlocksField == YesNoType.no)) - { - writer.WriteAttributeString("ProgressBlocks", "no"); - } - if ((this.progressBlocksField == YesNoType.yes)) - { - writer.WriteAttributeString("ProgressBlocks", "yes"); - } - } - if (this.removableFieldSet) - { - if ((this.removableField == YesNoType.no)) - { - writer.WriteAttributeString("Removable", "no"); - } - if ((this.removableField == YesNoType.yes)) - { - writer.WriteAttributeString("Removable", "yes"); - } - } - if (this.fixedFieldSet) - { - if ((this.fixedField == YesNoType.no)) - { - writer.WriteAttributeString("Fixed", "no"); - } - if ((this.fixedField == YesNoType.yes)) - { - writer.WriteAttributeString("Fixed", "yes"); - } - } - if (this.remoteFieldSet) - { - if ((this.remoteField == YesNoType.no)) - { - writer.WriteAttributeString("Remote", "no"); - } - if ((this.remoteField == YesNoType.yes)) - { - writer.WriteAttributeString("Remote", "yes"); - } - } - if (this.cDROMFieldSet) - { - if ((this.cDROMField == YesNoType.no)) - { - writer.WriteAttributeString("CDROM", "no"); - } - if ((this.cDROMField == YesNoType.yes)) - { - writer.WriteAttributeString("CDROM", "yes"); - } - } - if (this.rAMDiskFieldSet) - { - if ((this.rAMDiskField == YesNoType.no)) - { - writer.WriteAttributeString("RAMDisk", "no"); - } - if ((this.rAMDiskField == YesNoType.yes)) - { - writer.WriteAttributeString("RAMDisk", "yes"); - } - } - if (this.floppyFieldSet) - { - if ((this.floppyField == YesNoType.no)) - { - writer.WriteAttributeString("Floppy", "no"); - } - if ((this.floppyField == YesNoType.yes)) - { - writer.WriteAttributeString("Floppy", "yes"); - } - } - if (this.showRollbackCostFieldSet) - { - if ((this.showRollbackCostField == YesNoType.no)) - { - writer.WriteAttributeString("ShowRollbackCost", "no"); - } - if ((this.showRollbackCostField == YesNoType.yes)) - { - writer.WriteAttributeString("ShowRollbackCost", "yes"); - } - } - if (this.sortedFieldSet) - { - if ((this.sortedField == YesNoType.no)) - { - writer.WriteAttributeString("Sorted", "no"); - } - if ((this.sortedField == YesNoType.yes)) - { - writer.WriteAttributeString("Sorted", "yes"); - } - } - if (this.comboListFieldSet) - { - if ((this.comboListField == YesNoType.no)) - { - writer.WriteAttributeString("ComboList", "no"); - } - if ((this.comboListField == YesNoType.yes)) - { - writer.WriteAttributeString("ComboList", "yes"); - } - } - if (this.imageFieldSet) - { - if ((this.imageField == YesNoType.no)) - { - writer.WriteAttributeString("Image", "no"); - } - if ((this.imageField == YesNoType.yes)) - { - writer.WriteAttributeString("Image", "yes"); - } - } - if (this.iconSizeFieldSet) - { - if ((this.iconSizeField == IconSizeType.Item16)) - { - writer.WriteAttributeString("IconSize", "16"); - } - if ((this.iconSizeField == IconSizeType.Item32)) - { - writer.WriteAttributeString("IconSize", "32"); - } - if ((this.iconSizeField == IconSizeType.Item48)) - { - writer.WriteAttributeString("IconSize", "48"); - } - } - if (this.fixedSizeFieldSet) - { - if ((this.fixedSizeField == YesNoType.no)) - { - writer.WriteAttributeString("FixedSize", "no"); - } - if ((this.fixedSizeField == YesNoType.yes)) - { - writer.WriteAttributeString("FixedSize", "yes"); - } - } - if (this.iconFieldSet) - { - if ((this.iconField == YesNoType.no)) - { - writer.WriteAttributeString("Icon", "no"); - } - if ((this.iconField == YesNoType.yes)) - { - writer.WriteAttributeString("Icon", "yes"); - } - } - if (this.bitmapFieldSet) - { - if ((this.bitmapField == YesNoType.no)) - { - writer.WriteAttributeString("Bitmap", "no"); - } - if ((this.bitmapField == YesNoType.yes)) - { - writer.WriteAttributeString("Bitmap", "yes"); - } - } - if (this.pushLikeFieldSet) - { - if ((this.pushLikeField == YesNoType.no)) - { - writer.WriteAttributeString("PushLike", "no"); - } - if ((this.pushLikeField == YesNoType.yes)) - { - writer.WriteAttributeString("PushLike", "yes"); - } - } - if (this.hasBorderFieldSet) - { - if ((this.hasBorderField == YesNoType.no)) - { - writer.WriteAttributeString("HasBorder", "no"); - } - if ((this.hasBorderField == YesNoType.yes)) - { - writer.WriteAttributeString("HasBorder", "yes"); - } - } - if (this.elevationShieldFieldSet) - { - if ((this.elevationShieldField == YesNoType.no)) - { - writer.WriteAttributeString("ElevationShield", "no"); - } - if ((this.elevationShieldField == YesNoType.yes)) - { - writer.WriteAttributeString("ElevationShield", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = value; - this.typeFieldSet = true; - } - if (("X" == name)) - { - this.xField = value; - this.xFieldSet = true; - } - if (("Y" == name)) - { - this.yField = value; - this.yFieldSet = true; - } - if (("Width" == name)) - { - this.widthField = value; - this.widthFieldSet = true; - } - if (("Height" == name)) - { - this.heightField = value; - this.heightFieldSet = true; - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - if (("Text" == name)) - { - this.textField = value; - this.textFieldSet = true; - } - if (("Help" == name)) - { - this.helpField = value; - this.helpFieldSet = true; - } - if (("ToolTip" == name)) - { - this.toolTipField = value; - this.toolTipFieldSet = true; - } - if (("CheckBoxValue" == name)) - { - this.checkBoxValueField = value; - this.checkBoxValueFieldSet = true; - } - if (("CheckBoxPropertyRef" == name)) - { - this.checkBoxPropertyRefField = value; - this.checkBoxPropertyRefFieldSet = true; - } - if (("TabSkip" == name)) - { - this.tabSkipField = Enums.ParseYesNoType(value); - this.tabSkipFieldSet = true; - } - if (("Default" == name)) - { - this.defaultField = Enums.ParseYesNoType(value); - this.defaultFieldSet = true; - } - if (("Cancel" == name)) - { - this.cancelField = Enums.ParseYesNoType(value); - this.cancelFieldSet = true; - } - if (("Hidden" == name)) - { - this.hiddenField = Enums.ParseYesNoType(value); - this.hiddenFieldSet = true; - } - if (("Disabled" == name)) - { - this.disabledField = Enums.ParseYesNoType(value); - this.disabledFieldSet = true; - } - if (("Sunken" == name)) - { - this.sunkenField = Enums.ParseYesNoType(value); - this.sunkenFieldSet = true; - } - if (("Indirect" == name)) - { - this.indirectField = Enums.ParseYesNoType(value); - this.indirectFieldSet = true; - } - if (("Integer" == name)) - { - this.integerField = Enums.ParseYesNoType(value); - this.integerFieldSet = true; - } - if (("RightToLeft" == name)) - { - this.rightToLeftField = Enums.ParseYesNoType(value); - this.rightToLeftFieldSet = true; - } - if (("RightAligned" == name)) - { - this.rightAlignedField = Enums.ParseYesNoType(value); - this.rightAlignedFieldSet = true; - } - if (("LeftScroll" == name)) - { - this.leftScrollField = Enums.ParseYesNoType(value); - this.leftScrollFieldSet = true; - } - if (("Transparent" == name)) - { - this.transparentField = Enums.ParseYesNoType(value); - this.transparentFieldSet = true; - } - if (("NoPrefix" == name)) - { - this.noPrefixField = Enums.ParseYesNoType(value); - this.noPrefixFieldSet = true; - } - if (("NoWrap" == name)) - { - this.noWrapField = Enums.ParseYesNoType(value); - this.noWrapFieldSet = true; - } - if (("FormatSize" == name)) - { - this.formatSizeField = Enums.ParseYesNoType(value); - this.formatSizeFieldSet = true; - } - if (("UserLanguage" == name)) - { - this.userLanguageField = Enums.ParseYesNoType(value); - this.userLanguageFieldSet = true; - } - if (("Multiline" == name)) - { - this.multilineField = Enums.ParseYesNoType(value); - this.multilineFieldSet = true; - } - if (("Password" == name)) - { - this.passwordField = Enums.ParseYesNoType(value); - this.passwordFieldSet = true; - } - if (("ProgressBlocks" == name)) - { - this.progressBlocksField = Enums.ParseYesNoType(value); - this.progressBlocksFieldSet = true; - } - if (("Removable" == name)) - { - this.removableField = Enums.ParseYesNoType(value); - this.removableFieldSet = true; - } - if (("Fixed" == name)) - { - this.fixedField = Enums.ParseYesNoType(value); - this.fixedFieldSet = true; - } - if (("Remote" == name)) - { - this.remoteField = Enums.ParseYesNoType(value); - this.remoteFieldSet = true; - } - if (("CDROM" == name)) - { - this.cDROMField = Enums.ParseYesNoType(value); - this.cDROMFieldSet = true; - } - if (("RAMDisk" == name)) - { - this.rAMDiskField = Enums.ParseYesNoType(value); - this.rAMDiskFieldSet = true; - } - if (("Floppy" == name)) - { - this.floppyField = Enums.ParseYesNoType(value); - this.floppyFieldSet = true; - } - if (("ShowRollbackCost" == name)) - { - this.showRollbackCostField = Enums.ParseYesNoType(value); - this.showRollbackCostFieldSet = true; - } - if (("Sorted" == name)) - { - this.sortedField = Enums.ParseYesNoType(value); - this.sortedFieldSet = true; - } - if (("ComboList" == name)) - { - this.comboListField = Enums.ParseYesNoType(value); - this.comboListFieldSet = true; - } - if (("Image" == name)) - { - this.imageField = Enums.ParseYesNoType(value); - this.imageFieldSet = true; - } - if (("IconSize" == name)) - { - this.iconSizeField = Control.ParseIconSizeType(value); - this.iconSizeFieldSet = true; - } - if (("FixedSize" == name)) - { - this.fixedSizeField = Enums.ParseYesNoType(value); - this.fixedSizeFieldSet = true; - } - if (("Icon" == name)) - { - this.iconField = Enums.ParseYesNoType(value); - this.iconFieldSet = true; - } - if (("Bitmap" == name)) - { - this.bitmapField = Enums.ParseYesNoType(value); - this.bitmapFieldSet = true; - } - if (("PushLike" == name)) - { - this.pushLikeField = Enums.ParseYesNoType(value); - this.pushLikeFieldSet = true; - } - if (("HasBorder" == name)) - { - this.hasBorderField = Enums.ParseYesNoType(value); - this.hasBorderFieldSet = true; - } - if (("ElevationShield" == name)) - { - this.elevationShieldField = Enums.ParseYesNoType(value); - this.elevationShieldFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum IconSizeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - Item16, - - Item32, - - Item48, - } - } - - /// - /// Billboard to display during install of a Feature - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Billboard : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private string featureField; - - private bool featureFieldSet; - - private ISchemaElement parentElement; - - public Billboard() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Control))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Unique identifier for the Billboard. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Feature whose state determines if the Billboard is shown. - /// - public string Feature - { - get - { - return this.featureField; - } - set - { - this.featureFieldSet = true; - this.featureField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Control" == childName)) - { - childValue = new Control(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Billboard", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.featureFieldSet) - { - writer.WriteAttributeString("Feature", this.featureField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Feature" == name)) - { - this.featureField = value; - this.featureFieldSet = true; - } - } - } - - /// - /// Billboard action during which child Billboards are displayed - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class BillboardAction : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public BillboardAction() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Billboard))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Action name that determines when the Billboard should be shown. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Billboard" == childName)) - { - childValue = new Billboard(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("BillboardAction", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Defines a dialog box in the Dialog Table. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Dialog : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private int xField; - - private bool xFieldSet; - - private int yField; - - private bool yFieldSet; - - private int widthField; - - private bool widthFieldSet; - - private int heightField; - - private bool heightFieldSet; - - private string titleField; - - private bool titleFieldSet; - - private YesNoType hiddenField; - - private bool hiddenFieldSet; - - private YesNoType modelessField; - - private bool modelessFieldSet; - - private YesNoType noMinimizeField; - - private bool noMinimizeFieldSet; - - private YesNoType systemModalField; - - private bool systemModalFieldSet; - - private YesNoType keepModelessField; - - private bool keepModelessFieldSet; - - private YesNoType trackDiskSpaceField; - - private bool trackDiskSpaceFieldSet; - - private YesNoType customPaletteField; - - private bool customPaletteFieldSet; - - private YesNoType rightToLeftField; - - private bool rightToLeftFieldSet; - - private YesNoType rightAlignedField; - - private bool rightAlignedFieldSet; - - private YesNoType leftScrollField; - - private bool leftScrollFieldSet; - - private YesNoType errorDialogField; - - private bool errorDialogFieldSet; - - private ISchemaElement parentElement; - - public Dialog() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Control))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Unique identifier for the dialog. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Horizontal placement of the dialog box as a percentage of screen width. The default value is 50. - /// - public int X - { - get - { - return this.xField; - } - set - { - this.xFieldSet = true; - this.xField = value; - } - } - - /// - /// Vertical placement of the dialog box as a percentage of screen height. The default value is 50. - /// - public int Y - { - get - { - return this.yField; - } - set - { - this.yFieldSet = true; - this.yField = value; - } - } - - /// - /// The width of the dialog box in dialog units. - /// - public int Width - { - get - { - return this.widthField; - } - set - { - this.widthFieldSet = true; - this.widthField = value; - } - } - - /// - /// The height of the dialog box in dialog units. - /// - public int Height - { - get - { - return this.heightField; - } - set - { - this.heightFieldSet = true; - this.heightField = value; - } - } - - /// - /// The title of the dialog box. - /// - public string Title - { - get - { - return this.titleField; - } - set - { - this.titleFieldSet = true; - this.titleField = value; - } - } - - /// - /// Used to hide the dialog. - /// - public YesNoType Hidden - { - get - { - return this.hiddenField; - } - set - { - this.hiddenFieldSet = true; - this.hiddenField = value; - } - } - - /// - /// Used to set the dialog as modeless. - /// - public YesNoType Modeless - { - get - { - return this.modelessField; - } - set - { - this.modelessFieldSet = true; - this.modelessField = value; - } - } - - /// - /// Used to specify if the dialog can be minimized. - /// - public YesNoType NoMinimize - { - get - { - return this.noMinimizeField; - } - set - { - this.noMinimizeFieldSet = true; - this.noMinimizeField = value; - } - } - - /// - /// Used to set the dialog as system modal. - /// - public YesNoType SystemModal - { - get - { - return this.systemModalField; - } - set - { - this.systemModalFieldSet = true; - this.systemModalField = value; - } - } - - /// - /// Keep modeless dialogs alive when this dialog is created through DoAction. - /// - public YesNoType KeepModeless - { - get - { - return this.keepModelessField; - } - set - { - this.keepModelessFieldSet = true; - this.keepModelessField = value; - } - } - - /// - /// Have the dialog periodically call the installer to check if available disk space has changed. - /// - public YesNoType TrackDiskSpace - { - get - { - return this.trackDiskSpaceField; - } - set - { - this.trackDiskSpaceFieldSet = true; - this.trackDiskSpaceField = value; - } - } - - /// - /// Used to specify if pictures in the dialog box are rendered with a custom palette. - /// - public YesNoType CustomPalette - { - get - { - return this.customPaletteField; - } - set - { - this.customPaletteFieldSet = true; - this.customPaletteField = value; - } - } - - /// - /// Used to specify if the text in the dialog should be displayed in right to left reading order. - /// - public YesNoType RightToLeft - { - get - { - return this.rightToLeftField; - } - set - { - this.rightToLeftFieldSet = true; - this.rightToLeftField = value; - } - } - - /// - /// Align text on the right. - /// - public YesNoType RightAligned - { - get - { - return this.rightAlignedField; - } - set - { - this.rightAlignedFieldSet = true; - this.rightAlignedField = value; - } - } - - /// - /// Used to align the scroll bar on the left. - /// - public YesNoType LeftScroll - { - get - { - return this.leftScrollField; - } - set - { - this.leftScrollFieldSet = true; - this.leftScrollField = value; - } - } - - /// - /// Specifies this dialog as an error dialog. - /// - public YesNoType ErrorDialog - { - get - { - return this.errorDialogField; - } - set - { - this.errorDialogFieldSet = true; - this.errorDialogField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Control" == childName)) - { - childValue = new Control(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Dialog", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.xFieldSet) - { - writer.WriteAttributeString("X", this.xField.ToString(CultureInfo.InvariantCulture)); - } - if (this.yFieldSet) - { - writer.WriteAttributeString("Y", this.yField.ToString(CultureInfo.InvariantCulture)); - } - if (this.widthFieldSet) - { - writer.WriteAttributeString("Width", this.widthField.ToString(CultureInfo.InvariantCulture)); - } - if (this.heightFieldSet) - { - writer.WriteAttributeString("Height", this.heightField.ToString(CultureInfo.InvariantCulture)); - } - if (this.titleFieldSet) - { - writer.WriteAttributeString("Title", this.titleField); - } - if (this.hiddenFieldSet) - { - if ((this.hiddenField == YesNoType.no)) - { - writer.WriteAttributeString("Hidden", "no"); - } - if ((this.hiddenField == YesNoType.yes)) - { - writer.WriteAttributeString("Hidden", "yes"); - } - } - if (this.modelessFieldSet) - { - if ((this.modelessField == YesNoType.no)) - { - writer.WriteAttributeString("Modeless", "no"); - } - if ((this.modelessField == YesNoType.yes)) - { - writer.WriteAttributeString("Modeless", "yes"); - } - } - if (this.noMinimizeFieldSet) - { - if ((this.noMinimizeField == YesNoType.no)) - { - writer.WriteAttributeString("NoMinimize", "no"); - } - if ((this.noMinimizeField == YesNoType.yes)) - { - writer.WriteAttributeString("NoMinimize", "yes"); - } - } - if (this.systemModalFieldSet) - { - if ((this.systemModalField == YesNoType.no)) - { - writer.WriteAttributeString("SystemModal", "no"); - } - if ((this.systemModalField == YesNoType.yes)) - { - writer.WriteAttributeString("SystemModal", "yes"); - } - } - if (this.keepModelessFieldSet) - { - if ((this.keepModelessField == YesNoType.no)) - { - writer.WriteAttributeString("KeepModeless", "no"); - } - if ((this.keepModelessField == YesNoType.yes)) - { - writer.WriteAttributeString("KeepModeless", "yes"); - } - } - if (this.trackDiskSpaceFieldSet) - { - if ((this.trackDiskSpaceField == YesNoType.no)) - { - writer.WriteAttributeString("TrackDiskSpace", "no"); - } - if ((this.trackDiskSpaceField == YesNoType.yes)) - { - writer.WriteAttributeString("TrackDiskSpace", "yes"); - } - } - if (this.customPaletteFieldSet) - { - if ((this.customPaletteField == YesNoType.no)) - { - writer.WriteAttributeString("CustomPalette", "no"); - } - if ((this.customPaletteField == YesNoType.yes)) - { - writer.WriteAttributeString("CustomPalette", "yes"); - } - } - if (this.rightToLeftFieldSet) - { - if ((this.rightToLeftField == YesNoType.no)) - { - writer.WriteAttributeString("RightToLeft", "no"); - } - if ((this.rightToLeftField == YesNoType.yes)) - { - writer.WriteAttributeString("RightToLeft", "yes"); - } - } - if (this.rightAlignedFieldSet) - { - if ((this.rightAlignedField == YesNoType.no)) - { - writer.WriteAttributeString("RightAligned", "no"); - } - if ((this.rightAlignedField == YesNoType.yes)) - { - writer.WriteAttributeString("RightAligned", "yes"); - } - } - if (this.leftScrollFieldSet) - { - if ((this.leftScrollField == YesNoType.no)) - { - writer.WriteAttributeString("LeftScroll", "no"); - } - if ((this.leftScrollField == YesNoType.yes)) - { - writer.WriteAttributeString("LeftScroll", "yes"); - } - } - if (this.errorDialogFieldSet) - { - if ((this.errorDialogField == YesNoType.no)) - { - writer.WriteAttributeString("ErrorDialog", "no"); - } - if ((this.errorDialogField == YesNoType.yes)) - { - writer.WriteAttributeString("ErrorDialog", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("X" == name)) - { - this.xField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.xFieldSet = true; - } - if (("Y" == name)) - { - this.yField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.yFieldSet = true; - } - if (("Width" == name)) - { - this.widthField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.widthFieldSet = true; - } - if (("Height" == name)) - { - this.heightField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.heightFieldSet = true; - } - if (("Title" == name)) - { - this.titleField = value; - this.titleFieldSet = true; - } - if (("Hidden" == name)) - { - this.hiddenField = Enums.ParseYesNoType(value); - this.hiddenFieldSet = true; - } - if (("Modeless" == name)) - { - this.modelessField = Enums.ParseYesNoType(value); - this.modelessFieldSet = true; - } - if (("NoMinimize" == name)) - { - this.noMinimizeField = Enums.ParseYesNoType(value); - this.noMinimizeFieldSet = true; - } - if (("SystemModal" == name)) - { - this.systemModalField = Enums.ParseYesNoType(value); - this.systemModalFieldSet = true; - } - if (("KeepModeless" == name)) - { - this.keepModelessField = Enums.ParseYesNoType(value); - this.keepModelessFieldSet = true; - } - if (("TrackDiskSpace" == name)) - { - this.trackDiskSpaceField = Enums.ParseYesNoType(value); - this.trackDiskSpaceFieldSet = true; - } - if (("CustomPalette" == name)) - { - this.customPaletteField = Enums.ParseYesNoType(value); - this.customPaletteFieldSet = true; - } - if (("RightToLeft" == name)) - { - this.rightToLeftField = Enums.ParseYesNoType(value); - this.rightToLeftFieldSet = true; - } - if (("RightAligned" == name)) - { - this.rightAlignedField = Enums.ParseYesNoType(value); - this.rightAlignedFieldSet = true; - } - if (("LeftScroll" == name)) - { - this.leftScrollField = Enums.ParseYesNoType(value); - this.leftScrollFieldSet = true; - } - if (("ErrorDialog" == name)) - { - this.errorDialogField = Enums.ParseYesNoType(value); - this.errorDialogFieldSet = true; - } - } - } - - /// - /// Reference to a Dialog. This will cause the entire referenced section's contents - /// to be included in the installer database. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class DialogRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identifier of the Dialog to reference. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("DialogRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ProgressText : ISchemaElement, ISetAttributes - { - - private string actionField; - - private bool actionFieldSet; - - private string templateField; - - private bool templateFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - public string Action - { - get - { - return this.actionField; - } - set - { - this.actionFieldSet = true; - this.actionField = value; - } - } - - /// - /// used to format ActionData messages from action processing - /// - public string Template - { - get - { - return this.templateField; - } - set - { - this.templateFieldSet = true; - this.templateField = value; - } - } - - /// - /// Element value is progress message text for action - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ProgressText", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.actionFieldSet) - { - writer.WriteAttributeString("Action", this.actionField); - } - if (this.templateFieldSet) - { - writer.WriteAttributeString("Template", this.templateField); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Action" == name)) - { - this.actionField = value; - this.actionFieldSet = true; - } - if (("Template" == name)) - { - this.templateField = value; - this.templateFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class TextStyle : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string faceNameField; - - private bool faceNameFieldSet; - - private string sizeField; - - private bool sizeFieldSet; - - private int redField; - - private bool redFieldSet; - - private int greenField; - - private bool greenFieldSet; - - private int blueField; - - private bool blueFieldSet; - - private YesNoType boldField; - - private bool boldFieldSet; - - private YesNoType italicField; - - private bool italicFieldSet; - - private YesNoType underlineField; - - private bool underlineFieldSet; - - private YesNoType strikeField; - - private bool strikeFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public string FaceName - { - get - { - return this.faceNameField; - } - set - { - this.faceNameFieldSet = true; - this.faceNameField = value; - } - } - - public string Size - { - get - { - return this.sizeField; - } - set - { - this.sizeFieldSet = true; - this.sizeField = value; - } - } - - /// - /// 0 to 255 - /// - public int Red - { - get - { - return this.redField; - } - set - { - this.redFieldSet = true; - this.redField = value; - } - } - - /// - /// 0 to 255 - /// - public int Green - { - get - { - return this.greenField; - } - set - { - this.greenFieldSet = true; - this.greenField = value; - } - } - - /// - /// 0 to 255 - /// - public int Blue - { - get - { - return this.blueField; - } - set - { - this.blueFieldSet = true; - this.blueField = value; - } - } - - public YesNoType Bold - { - get - { - return this.boldField; - } - set - { - this.boldFieldSet = true; - this.boldField = value; - } - } - - public YesNoType Italic - { - get - { - return this.italicField; - } - set - { - this.italicFieldSet = true; - this.italicField = value; - } - } - - public YesNoType Underline - { - get - { - return this.underlineField; - } - set - { - this.underlineFieldSet = true; - this.underlineField = value; - } - } - - public YesNoType Strike - { - get - { - return this.strikeField; - } - set - { - this.strikeFieldSet = true; - this.strikeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("TextStyle", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.faceNameFieldSet) - { - writer.WriteAttributeString("FaceName", this.faceNameField); - } - if (this.sizeFieldSet) - { - writer.WriteAttributeString("Size", this.sizeField); - } - if (this.redFieldSet) - { - writer.WriteAttributeString("Red", this.redField.ToString(CultureInfo.InvariantCulture)); - } - if (this.greenFieldSet) - { - writer.WriteAttributeString("Green", this.greenField.ToString(CultureInfo.InvariantCulture)); - } - if (this.blueFieldSet) - { - writer.WriteAttributeString("Blue", this.blueField.ToString(CultureInfo.InvariantCulture)); - } - if (this.boldFieldSet) - { - if ((this.boldField == YesNoType.no)) - { - writer.WriteAttributeString("Bold", "no"); - } - if ((this.boldField == YesNoType.yes)) - { - writer.WriteAttributeString("Bold", "yes"); - } - } - if (this.italicFieldSet) - { - if ((this.italicField == YesNoType.no)) - { - writer.WriteAttributeString("Italic", "no"); - } - if ((this.italicField == YesNoType.yes)) - { - writer.WriteAttributeString("Italic", "yes"); - } - } - if (this.underlineFieldSet) - { - if ((this.underlineField == YesNoType.no)) - { - writer.WriteAttributeString("Underline", "no"); - } - if ((this.underlineField == YesNoType.yes)) - { - writer.WriteAttributeString("Underline", "yes"); - } - } - if (this.strikeFieldSet) - { - if ((this.strikeField == YesNoType.no)) - { - writer.WriteAttributeString("Strike", "no"); - } - if ((this.strikeField == YesNoType.yes)) - { - writer.WriteAttributeString("Strike", "yes"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("FaceName" == name)) - { - this.faceNameField = value; - this.faceNameFieldSet = true; - } - if (("Size" == name)) - { - this.sizeField = value; - this.sizeFieldSet = true; - } - if (("Red" == name)) - { - this.redField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.redFieldSet = true; - } - if (("Green" == name)) - { - this.greenField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.greenFieldSet = true; - } - if (("Blue" == name)) - { - this.blueField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.blueFieldSet = true; - } - if (("Bold" == name)) - { - this.boldField = Enums.ParseYesNoType(value); - this.boldFieldSet = true; - } - if (("Italic" == name)) - { - this.italicField = Enums.ParseYesNoType(value); - this.italicFieldSet = true; - } - if (("Underline" == name)) - { - this.underlineField = Enums.ParseYesNoType(value); - this.underlineFieldSet = true; - } - if (("Strike" == name)) - { - this.strikeField = Enums.ParseYesNoType(value); - this.strikeFieldSet = true; - } - } - } - - /// - /// The value (and optional text) associated with an item in a ComboBox, ListBox, or ListView. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ListItem : ISchemaElement, ISetAttributes - { - - private string valueField; - - private bool valueFieldSet; - - private string textField; - - private bool textFieldSet; - - private string iconField; - - private bool iconFieldSet; - - private ISchemaElement parentElement; - - /// - /// The value assigned to the associated ComboBox, ListBox, or ListView property if this item is selected. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - /// - /// The localizable, visible text to be assigned to the item. - /// If not specified, this will default to the value of the Value attribute. - /// - public string Text - { - get - { - return this.textField; - } - set - { - this.textFieldSet = true; - this.textField = value; - } - } - - /// - /// The identifier of the Binary (not Icon) element containing the icon to associate with this item. - /// This value is only valid when nested under a ListView element. - /// - public string Icon - { - get - { - return this.iconField; - } - set - { - this.iconFieldSet = true; - this.iconField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ListItem", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.textFieldSet) - { - writer.WriteAttributeString("Text", this.textField); - } - if (this.iconFieldSet) - { - writer.WriteAttributeString("Icon", this.iconField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Text" == name)) - { - this.textField = value; - this.textFieldSet = true; - } - if (("Icon" == name)) - { - this.iconField = value; - this.iconFieldSet = true; - } - } - } - - /// - /// Set of items for a particular ListBox control tied to an install Property - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ListBox : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string propertyField; - - private bool propertyFieldSet; - - private ISchemaElement parentElement; - - public ListBox() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Property tied to this group - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ListItem" == childName)) - { - childValue = new ListItem(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ListBox", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - } - } - - /// - /// Set of items for a particular ComboBox control tied to an install Property - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ComboBox : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string propertyField; - - private bool propertyFieldSet; - - private ISchemaElement parentElement; - - public ComboBox() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Property tied to this group - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ListItem" == childName)) - { - childValue = new ListItem(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ComboBox", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - } - } - - /// - /// Set of items for a particular ListView control tied to an install Property - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ListView : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string propertyField; - - private bool propertyFieldSet; - - private ISchemaElement parentElement; - - public ListView() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(ListItem))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Property tied to this group - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("ListItem" == childName)) - { - childValue = new ListItem(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ListView", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - } - } - - /// - /// Text or Icon plus Value that is assigned to the Property of the parent Control (RadioButtonGroup). - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RadioButton : ISchemaElement, ISetAttributes - { - - private string bitmapField; - - private bool bitmapFieldSet; - - private string heightField; - - private bool heightFieldSet; - - private string helpField; - - private bool helpFieldSet; - - private string iconField; - - private bool iconFieldSet; - - private string textField; - - private bool textFieldSet; - - private string toolTipField; - - private bool toolTipFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private string widthField; - - private bool widthFieldSet; - - private string xField; - - private bool xFieldSet; - - private string yField; - - private bool yFieldSet; - - private ISchemaElement parentElement; - - /// - /// This attribute defines the bitmap displayed with the radio button. The value of the attribute creates a reference - /// to a Binary element that represents the bitmap. This attribute is mutually exclusive with the Icon and Text - /// attributes. - /// - public string Bitmap - { - get - { - return this.bitmapField; - } - set - { - this.bitmapFieldSet = true; - this.bitmapField = value; - } - } - - public string Height - { - get - { - return this.heightField; - } - set - { - this.heightFieldSet = true; - this.heightField = value; - } - } - - public string Help - { - get - { - return this.helpField; - } - set - { - this.helpFieldSet = true; - this.helpField = value; - } - } - - /// - /// This attribute defines the icon displayed with the radio button. The value of the attribute creates a reference - /// to a Binary element that represents the icon. This attribute is mutually exclusive with the Bitmap and Text - /// attributes. - /// - public string Icon - { - get - { - return this.iconField; - } - set - { - this.iconFieldSet = true; - this.iconField = value; - } - } - - /// - /// Text displayed with the radio button. This attribute is mutually exclusive with the Bitmap and Icon attributes. - /// - public string Text - { - get - { - return this.textField; - } - set - { - this.textFieldSet = true; - this.textField = value; - } - } - - public string ToolTip - { - get - { - return this.toolTipField; - } - set - { - this.toolTipFieldSet = true; - this.toolTipField = value; - } - } - - /// - /// Value assigned to the associated control Property when this radio button is selected. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public string Width - { - get - { - return this.widthField; - } - set - { - this.widthFieldSet = true; - this.widthField = value; - } - } - - public string X - { - get - { - return this.xField; - } - set - { - this.xFieldSet = true; - this.xField = value; - } - } - - public string Y - { - get - { - return this.yField; - } - set - { - this.yFieldSet = true; - this.yField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RadioButton", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.bitmapFieldSet) - { - writer.WriteAttributeString("Bitmap", this.bitmapField); - } - if (this.heightFieldSet) - { - writer.WriteAttributeString("Height", this.heightField); - } - if (this.helpFieldSet) - { - writer.WriteAttributeString("Help", this.helpField); - } - if (this.iconFieldSet) - { - writer.WriteAttributeString("Icon", this.iconField); - } - if (this.textFieldSet) - { - writer.WriteAttributeString("Text", this.textField); - } - if (this.toolTipFieldSet) - { - writer.WriteAttributeString("ToolTip", this.toolTipField); - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - if (this.widthFieldSet) - { - writer.WriteAttributeString("Width", this.widthField); - } - if (this.xFieldSet) - { - writer.WriteAttributeString("X", this.xField); - } - if (this.yFieldSet) - { - writer.WriteAttributeString("Y", this.yField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Bitmap" == name)) - { - this.bitmapField = value; - this.bitmapFieldSet = true; - } - if (("Height" == name)) - { - this.heightField = value; - this.heightFieldSet = true; - } - if (("Help" == name)) - { - this.helpField = value; - this.helpFieldSet = true; - } - if (("Icon" == name)) - { - this.iconField = value; - this.iconFieldSet = true; - } - if (("Text" == name)) - { - this.textField = value; - this.textFieldSet = true; - } - if (("ToolTip" == name)) - { - this.toolTipField = value; - this.toolTipFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - if (("Width" == name)) - { - this.widthField = value; - this.widthFieldSet = true; - } - if (("X" == name)) - { - this.xField = value; - this.xFieldSet = true; - } - if (("Y" == name)) - { - this.yField = value; - this.yFieldSet = true; - } - } - } - - /// - /// Set of radio buttons tied to the specified Property - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class RadioButtonGroup : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string propertyField; - - private bool propertyFieldSet; - - private ISchemaElement parentElement; - - public RadioButtonGroup() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(RadioButton))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Property tied to this group. - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("RadioButton" == childName)) - { - childValue = new RadioButton(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("RadioButtonGroup", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - } - } - - /// - /// Text associated with certain controls - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UIText : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Element value is text, may use CDATA if needed to escape XML delimiters - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UIText", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - /// - /// Reference to a UI element. This will force the entire referenced Fragment's contents - /// to be included in the installer database. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UIRef : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UIRef", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Enclosing element to compartmentalize UI specifications. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class UI : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - public UI() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(EmbeddedUI))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Error))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ProgressText))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(BillboardAction))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ComboBox))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ListBox))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(ListView))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(RadioButtonGroup))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(TextStyle))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIText))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Dialog))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(DialogRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Publish))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(PropertyRef))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Property))); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Binary))); - ElementCollection childCollection1 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(AdminUISequence))); - childCollection1.AddItem(new ElementCollection.SequenceItem(typeof(InstallUISequence))); - childCollection0.AddCollection(childCollection1); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(UIRef))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("EmbeddedUI" == childName)) - { - childValue = new EmbeddedUI(); - } - if (("Error" == childName)) - { - childValue = new Error(); - } - if (("ProgressText" == childName)) - { - childValue = new ProgressText(); - } - if (("BillboardAction" == childName)) - { - childValue = new BillboardAction(); - } - if (("ComboBox" == childName)) - { - childValue = new ComboBox(); - } - if (("ListBox" == childName)) - { - childValue = new ListBox(); - } - if (("ListView" == childName)) - { - childValue = new ListView(); - } - if (("RadioButtonGroup" == childName)) - { - childValue = new RadioButtonGroup(); - } - if (("TextStyle" == childName)) - { - childValue = new TextStyle(); - } - if (("UIText" == childName)) - { - childValue = new UIText(); - } - if (("Dialog" == childName)) - { - childValue = new Dialog(); - } - if (("DialogRef" == childName)) - { - childValue = new DialogRef(); - } - if (("Publish" == childName)) - { - childValue = new Publish(); - } - if (("PropertyRef" == childName)) - { - childValue = new PropertyRef(); - } - if (("Property" == childName)) - { - childValue = new Property(); - } - if (("Binary" == childName)) - { - childValue = new Binary(); - } - if (("AdminUISequence" == childName)) - { - childValue = new AdminUISequence(); - } - if (("InstallUISequence" == childName)) - { - childValue = new InstallUISequence(); - } - if (("UIRef" == childName)) - { - childValue = new UIRef(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("UI", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// Defines a custom table for use from a custom action. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class CustomTable : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string idField; - - private bool idFieldSet; - - private YesNoType bootstrapperApplicationDataField; - - private bool bootstrapperApplicationDataFieldSet; - - private ISchemaElement parentElement; - - public CustomTable() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Column))); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Row))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// Identifier for the custom table. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Indicates the table data is transformed into the bootstrapper application data manifest. - /// - public YesNoType BootstrapperApplicationData - { - get - { - return this.bootstrapperApplicationDataField; - } - set - { - this.bootstrapperApplicationDataFieldSet = true; - this.bootstrapperApplicationDataField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Column" == childName)) - { - childValue = new Column(); - } - if (("Row" == childName)) - { - childValue = new Row(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("CustomTable", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.bootstrapperApplicationDataFieldSet) - { - if ((this.bootstrapperApplicationDataField == YesNoType.no)) - { - writer.WriteAttributeString("BootstrapperApplicationData", "no"); - } - if ((this.bootstrapperApplicationDataField == YesNoType.yes)) - { - writer.WriteAttributeString("BootstrapperApplicationData", "yes"); - } - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("BootstrapperApplicationData" == name)) - { - this.bootstrapperApplicationDataField = Enums.ParseYesNoType(value); - this.bootstrapperApplicationDataFieldSet = true; - } - } - } - - /// - /// Column definition for a Custom Table - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Column : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private YesNoType primaryKeyField; - - private bool primaryKeyFieldSet; - - private TypeType typeField; - - private bool typeFieldSet; - - private int widthField; - - private bool widthFieldSet; - - private YesNoType nullableField; - - private bool nullableFieldSet; - - private YesNoType localizableField; - - private bool localizableFieldSet; - - private long minValueField; - - private bool minValueFieldSet; - - private long maxValueField; - - private bool maxValueFieldSet; - - private string keyTableField; - - private bool keyTableFieldSet; - - private int keyColumnField; - - private bool keyColumnFieldSet; - - private CategoryType categoryField; - - private bool categoryFieldSet; - - private string setField; - - private bool setFieldSet; - - private string descriptionField; - - private bool descriptionFieldSet; - - private ModularizeType modularizeField; - - private bool modularizeFieldSet; - - private ISchemaElement parentElement; - - /// - /// Identifier for the column. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Whether this column is a primary key. - /// - public YesNoType PrimaryKey - { - get - { - return this.primaryKeyField; - } - set - { - this.primaryKeyFieldSet = true; - this.primaryKeyField = value; - } - } - - /// - /// The type of this column. - /// - public TypeType Type - { - get - { - return this.typeField; - } - set - { - this.typeFieldSet = true; - this.typeField = value; - } - } - - /// - /// Width of this column. - /// - public int Width - { - get - { - return this.widthField; - } - set - { - this.widthFieldSet = true; - this.widthField = value; - } - } - - /// - /// Whether this column can be left null. - /// - public YesNoType Nullable - { - get - { - return this.nullableField; - } - set - { - this.nullableFieldSet = true; - this.nullableField = value; - } - } - - /// - /// Whether this column can be localized. - /// - public YesNoType Localizable - { - get - { - return this.localizableField; - } - set - { - this.localizableFieldSet = true; - this.localizableField = value; - } - } - - /// - /// Minimum value for a numeric value, date or version in this column. - /// - public long MinValue - { - get - { - return this.minValueField; - } - set - { - this.minValueFieldSet = true; - this.minValueField = value; - } - } - - /// - /// Maximum value for a numeric value, date or version in this column. - /// - public long MaxValue - { - get - { - return this.maxValueField; - } - set - { - this.maxValueFieldSet = true; - this.maxValueField = value; - } - } - - /// - /// Table in which this column is an external key. Can be semicolon delimited. - /// - public string KeyTable - { - get - { - return this.keyTableField; - } - set - { - this.keyTableFieldSet = true; - this.keyTableField = value; - } - } - - /// - /// Column in the table in KeyTable attribute. - /// - public int KeyColumn - { - get - { - return this.keyColumnField; - } - set - { - this.keyColumnFieldSet = true; - this.keyColumnField = value; - } - } - - /// - /// Category of this column. - /// This attribute must be specified with a value of 'Binary' if the Type attribute's value is 'binary'. - /// - public CategoryType Category - { - get - { - return this.categoryField; - } - set - { - this.categoryFieldSet = true; - this.categoryField = value; - } - } - - /// - /// Semicolon delimited list of permissible values. - /// - public string Set - { - get - { - return this.setField; - } - set - { - this.setFieldSet = true; - this.setField = value; - } - } - - /// - /// Description of this column. - /// - public string Description - { - get - { - return this.descriptionField; - } - set - { - this.descriptionFieldSet = true; - this.descriptionField = value; - } - } - - /// - /// How this column should be modularized, if at all. - /// - public ModularizeType Modularize - { - get - { - return this.modularizeField; - } - set - { - this.modularizeFieldSet = true; - this.modularizeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a TypeType from a string. - /// - public static TypeType ParseTypeType(string value) - { - TypeType parsedValue; - Column.TryParseTypeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a TypeType from a string. - /// - public static bool TryParseTypeType(string value, out TypeType parsedValue) - { - parsedValue = TypeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("binary" == value)) - { - parsedValue = TypeType.binary; - } - else - { - if (("int" == value)) - { - parsedValue = TypeType.@int; - } - else - { - if (("string" == value)) - { - parsedValue = TypeType.@string; - } - else - { - parsedValue = TypeType.IllegalValue; - return false; - } - } - } - return true; - } - - /// - /// Parses a CategoryType from a string. - /// - public static CategoryType ParseCategoryType(string value) - { - CategoryType parsedValue; - Column.TryParseCategoryType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a CategoryType from a string. - /// - public static bool TryParseCategoryType(string value, out CategoryType parsedValue) - { - parsedValue = CategoryType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("Text" == value)) - { - parsedValue = CategoryType.text; - } - else - { - if (("UpperCase" == value)) - { - parsedValue = CategoryType.upperCase; - } - else - { - if (("LowerCase" == value)) - { - parsedValue = CategoryType.lowerCase; - } - else - { - if (("Integer" == value)) - { - parsedValue = CategoryType.integer; - } - else - { - if (("DoubleInteger" == value)) - { - parsedValue = CategoryType.doubleInteger; - } - else - { - if (("TimeDate" == value)) - { - parsedValue = CategoryType.timeDate; - } - else - { - if (("Identifier" == value)) - { - parsedValue = CategoryType.identifier; - } - else - { - if (("Property" == value)) - { - parsedValue = CategoryType.property; - } - else - { - if (("Filename" == value)) - { - parsedValue = CategoryType.filename; - } - else - { - if (("WildCardFilename" == value)) - { - parsedValue = CategoryType.wildCardFilename; - } - else - { - if (("Path" == value)) - { - parsedValue = CategoryType.path; - } - else - { - if (("Paths" == value)) - { - parsedValue = CategoryType.paths; - } - else - { - if (("AnyPath" == value)) - { - parsedValue = CategoryType.anyPath; - } - else - { - if (("DefaultDir" == value)) - { - parsedValue = CategoryType.defaultDir; - } - else - { - if (("RegPath" == value)) - { - parsedValue = CategoryType.regPath; - } - else - { - if (("Formatted" == value)) - { - parsedValue = CategoryType.formatted; - } - else - { - if (("FormattedSddl" == value)) - { - parsedValue = CategoryType.formattedSddl; - } - else - { - if (("Template" == value)) - { - parsedValue = CategoryType.template; - } - else - { - if (("Condition" == value)) - { - parsedValue = CategoryType.condition; - } - else - { - if (("Guid" == value)) - { - parsedValue = CategoryType.guid; - } - else - { - if (("Version" == value)) - { - parsedValue = CategoryType.version; - } - else - { - if (("Language" == value)) - { - parsedValue = CategoryType.language; - } - else - { - if (("Binary" == value)) - { - parsedValue = CategoryType.binary; - } - else - { - if (("CustomSource" == value)) - { - parsedValue = CategoryType.customSource; - } - else - { - if (("Cabinet" == value)) - { - parsedValue = CategoryType.cabinet; - } - else - { - if (("Shortcut" == value)) - { - parsedValue = CategoryType.shortcut; - } - else - { - parsedValue = CategoryType.IllegalValue; - return false; - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - return true; - } - - /// - /// Parses a ModularizeType from a string. - /// - public static ModularizeType ParseModularizeType(string value) - { - ModularizeType parsedValue; - Column.TryParseModularizeType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ModularizeType from a string. - /// - public static bool TryParseModularizeType(string value, out ModularizeType parsedValue) - { - parsedValue = ModularizeType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("None" == value)) - { - parsedValue = ModularizeType.None; - } - else - { - if (("Column" == value)) - { - parsedValue = ModularizeType.Column; - } - else - { - if (("Condition" == value)) - { - parsedValue = ModularizeType.Condition; - } - else - { - if (("Icon" == value)) - { - parsedValue = ModularizeType.Icon; - } - else - { - if (("Property" == value)) - { - parsedValue = ModularizeType.Property; - } - else - { - if (("SemicolonDelimited" == value)) - { - parsedValue = ModularizeType.SemicolonDelimited; - } - else - { - parsedValue = ModularizeType.IllegalValue; - return false; - } - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Column", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.primaryKeyFieldSet) - { - if ((this.primaryKeyField == YesNoType.no)) - { - writer.WriteAttributeString("PrimaryKey", "no"); - } - if ((this.primaryKeyField == YesNoType.yes)) - { - writer.WriteAttributeString("PrimaryKey", "yes"); - } - } - if (this.typeFieldSet) - { - if ((this.typeField == TypeType.binary)) - { - writer.WriteAttributeString("Type", "binary"); - } - if ((this.typeField == TypeType.@int)) - { - writer.WriteAttributeString("Type", "int"); - } - if ((this.typeField == TypeType.@string)) - { - writer.WriteAttributeString("Type", "string"); - } - } - if (this.widthFieldSet) - { - writer.WriteAttributeString("Width", this.widthField.ToString(CultureInfo.InvariantCulture)); - } - if (this.nullableFieldSet) - { - if ((this.nullableField == YesNoType.no)) - { - writer.WriteAttributeString("Nullable", "no"); - } - if ((this.nullableField == YesNoType.yes)) - { - writer.WriteAttributeString("Nullable", "yes"); - } - } - if (this.localizableFieldSet) - { - if ((this.localizableField == YesNoType.no)) - { - writer.WriteAttributeString("Localizable", "no"); - } - if ((this.localizableField == YesNoType.yes)) - { - writer.WriteAttributeString("Localizable", "yes"); - } - } - if (this.minValueFieldSet) - { - writer.WriteAttributeString("MinValue", this.minValueField.ToString(CultureInfo.InvariantCulture)); - } - if (this.maxValueFieldSet) - { - writer.WriteAttributeString("MaxValue", this.maxValueField.ToString(CultureInfo.InvariantCulture)); - } - if (this.keyTableFieldSet) - { - writer.WriteAttributeString("KeyTable", this.keyTableField); - } - if (this.keyColumnFieldSet) - { - writer.WriteAttributeString("KeyColumn", this.keyColumnField.ToString(CultureInfo.InvariantCulture)); - } - if (this.categoryFieldSet) - { - if ((this.categoryField == CategoryType.text)) - { - writer.WriteAttributeString("Category", "text"); - } - if ((this.categoryField == CategoryType.upperCase)) - { - writer.WriteAttributeString("Category", "upperCase"); - } - if ((this.categoryField == CategoryType.lowerCase)) - { - writer.WriteAttributeString("Category", "lowerCase"); - } - if ((this.categoryField == CategoryType.integer)) - { - writer.WriteAttributeString("Category", "integer"); - } - if ((this.categoryField == CategoryType.doubleInteger)) - { - writer.WriteAttributeString("Category", "doubleInteger"); - } - if ((this.categoryField == CategoryType.timeDate)) - { - writer.WriteAttributeString("Category", "timeDate"); - } - if ((this.categoryField == CategoryType.identifier)) - { - writer.WriteAttributeString("Category", "identifier"); - } - if ((this.categoryField == CategoryType.property)) - { - writer.WriteAttributeString("Category", "property"); - } - if ((this.categoryField == CategoryType.filename)) - { - writer.WriteAttributeString("Category", "filename"); - } - if ((this.categoryField == CategoryType.wildCardFilename)) - { - writer.WriteAttributeString("Category", "wildCardFilename"); - } - if ((this.categoryField == CategoryType.path)) - { - writer.WriteAttributeString("Category", "path"); - } - if ((this.categoryField == CategoryType.paths)) - { - writer.WriteAttributeString("Category", "paths"); - } - if ((this.categoryField == CategoryType.anyPath)) - { - writer.WriteAttributeString("Category", "anyPath"); - } - if ((this.categoryField == CategoryType.defaultDir)) - { - writer.WriteAttributeString("Category", "defaultDir"); - } - if ((this.categoryField == CategoryType.regPath)) - { - writer.WriteAttributeString("Category", "regPath"); - } - if ((this.categoryField == CategoryType.formatted)) - { - writer.WriteAttributeString("Category", "formatted"); - } - if ((this.categoryField == CategoryType.formattedSddl)) - { - writer.WriteAttributeString("Category", "formattedSddl"); - } - if ((this.categoryField == CategoryType.template)) - { - writer.WriteAttributeString("Category", "template"); - } - if ((this.categoryField == CategoryType.condition)) - { - writer.WriteAttributeString("Category", "condition"); - } - if ((this.categoryField == CategoryType.guid)) - { - writer.WriteAttributeString("Category", "guid"); - } - if ((this.categoryField == CategoryType.version)) - { - writer.WriteAttributeString("Category", "version"); - } - if ((this.categoryField == CategoryType.language)) - { - writer.WriteAttributeString("Category", "language"); - } - if ((this.categoryField == CategoryType.binary)) - { - writer.WriteAttributeString("Category", "Binary"); - } - if ((this.categoryField == CategoryType.customSource)) - { - writer.WriteAttributeString("Category", "customSource"); - } - if ((this.categoryField == CategoryType.cabinet)) - { - writer.WriteAttributeString("Category", "cabinet"); - } - if ((this.categoryField == CategoryType.shortcut)) - { - writer.WriteAttributeString("Category", "shortcut"); - } - } - if (this.setFieldSet) - { - writer.WriteAttributeString("Set", this.setField); - } - if (this.descriptionFieldSet) - { - writer.WriteAttributeString("Description", this.descriptionField); - } - if (this.modularizeFieldSet) - { - if ((this.modularizeField == ModularizeType.None)) - { - writer.WriteAttributeString("Modularize", "None"); - } - if ((this.modularizeField == ModularizeType.Column)) - { - writer.WriteAttributeString("Modularize", "Column"); - } - if ((this.modularizeField == ModularizeType.Condition)) - { - writer.WriteAttributeString("Modularize", "Condition"); - } - if ((this.modularizeField == ModularizeType.Icon)) - { - writer.WriteAttributeString("Modularize", "Icon"); - } - if ((this.modularizeField == ModularizeType.Property)) - { - writer.WriteAttributeString("Modularize", "Property"); - } - if ((this.modularizeField == ModularizeType.SemicolonDelimited)) - { - writer.WriteAttributeString("Modularize", "SemicolonDelimited"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("PrimaryKey" == name)) - { - this.primaryKeyField = Enums.ParseYesNoType(value); - this.primaryKeyFieldSet = true; - } - if (("Type" == name)) - { - this.typeField = Column.ParseTypeType(value); - this.typeFieldSet = true; - } - if (("Width" == name)) - { - this.widthField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.widthFieldSet = true; - } - if (("Nullable" == name)) - { - this.nullableField = Enums.ParseYesNoType(value); - this.nullableFieldSet = true; - } - if (("Localizable" == name)) - { - this.localizableField = Enums.ParseYesNoType(value); - this.localizableFieldSet = true; - } - if (("MinValue" == name)) - { - this.minValueField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.minValueFieldSet = true; - } - if (("MaxValue" == name)) - { - this.maxValueField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.maxValueFieldSet = true; - } - if (("KeyTable" == name)) - { - this.keyTableField = value; - this.keyTableFieldSet = true; - } - if (("KeyColumn" == name)) - { - this.keyColumnField = Convert.ToInt32(value, CultureInfo.InvariantCulture); - this.keyColumnFieldSet = true; - } - if (("Category" == name)) - { - this.categoryField = Column.ParseCategoryType(value); - this.categoryFieldSet = true; - } - if (("Set" == name)) - { - this.setField = value; - this.setFieldSet = true; - } - if (("Description" == name)) - { - this.descriptionField = value; - this.descriptionFieldSet = true; - } - if (("Modularize" == name)) - { - this.modularizeField = Column.ParseModularizeType(value); - this.modularizeFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum TypeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Column contains a path to a file that will be inserted into the column as a binary object. - /// If this value is set, the Category attribute must also be set with a value of 'Binary' to pass ICE validation. - /// - binary, - - /// - /// Column contains an integer or datetime value (the MinValue and MaxValue attributes should also be set). - /// - @int, - - /// - /// Column contains a non-localizable string value. - /// - @string, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum CategoryType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - text, - - upperCase, - - lowerCase, - - integer, - - doubleInteger, - - timeDate, - - identifier, - - property, - - filename, - - wildCardFilename, - - path, - - paths, - - anyPath, - - defaultDir, - - regPath, - - formatted, - - formattedSddl, - - template, - - condition, - - guid, - - version, - - language, - - binary, - - customSource, - - cabinet, - - shortcut, - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ModularizeType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// Column should not be modularized. This is the default value. - /// - None, - - /// - /// Column should be modularized. - /// - Column, - - /// - /// Column is a condition and should be modularized. - /// - Condition, - - /// - /// When the column is an primary or foreign key to the Icon table it should be modularized special. - /// - Icon, - - /// - /// Any Properties in the column should be modularized. - /// - Property, - - /// - /// Semi-colon list of keys, all of which need to be modularized. - /// - SemicolonDelimited, - } - } - - /// - /// Row data for a Custom Table - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Row : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private ISchemaElement parentElement; - - public Row() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Sequence); - childCollection0.AddItem(new ElementCollection.SequenceItem(typeof(Data))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Data" == childName)) - { - childValue = new Data(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Row", "http://wixtoolset.org/schemas/v4/wxs"); - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - } - } - - /// - /// Used for a Custom Table. Specifies the data for the parent Row and specified Column. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Data : ISchemaElement, ISetAttributes - { - - private string columnField; - - private bool columnFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// Specifies in which column to insert this data. - /// - public string Column - { - get - { - return this.columnField; - } - set - { - this.columnFieldSet = true; - this.columnField = value; - } - } - - /// - /// A data value - /// - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Data", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.columnFieldSet) - { - writer.WriteAttributeString("Column", this.columnField); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Column" == name)) - { - this.columnField = value; - this.columnFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } - - /// - /// Use this element to ensure that a table appears in the installer database, even if its empty. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class EnsureTable : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private ISchemaElement parentElement; - - /// - /// The name of the table. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("EnsureTable", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - } - } - - /// - /// This element exposes advanced WiX functionality. Use this element to declare WiX variables - /// from directly within your authoring. WiX variables are not resolved until the final msi/msm/pcp - /// file is actually generated. WiX variables do not persist into the msi/msm/pcp file, so they cannot - /// be used when an MSI file is being installed; it's a WiX-only concept. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class WixVariable : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private YesNoType overridableField; - - private bool overridableFieldSet; - - private string valueField; - - private bool valueFieldSet; - - private ISchemaElement parentElement; - - /// - /// The name of the variable. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// Set this value to 'yes' in order to make the variable's value overridable either by - /// another WixVariable entry or via the command-line option -d<name>=<value> - /// for light.exe. If the same variable is declared overridable in multiple places it - /// will cause an error (since WiX won't know which value is correct). The default value - /// is 'no'. - /// - public YesNoType Overridable - { - get - { - return this.overridableField; - } - set - { - this.overridableFieldSet = true; - this.overridableField = value; - } - } - - /// - /// The value of the variable. The value cannot be an empty string because that would - /// make it possible to accidentally set a column to null. - /// - public string Value - { - get - { - return this.valueField; - } - set - { - this.valueFieldSet = true; - this.valueField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("WixVariable", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.overridableFieldSet) - { - if ((this.overridableField == YesNoType.no)) - { - writer.WriteAttributeString("Overridable", "no"); - } - if ((this.overridableField == YesNoType.yes)) - { - writer.WriteAttributeString("Overridable", "yes"); - } - } - if (this.valueFieldSet) - { - writer.WriteAttributeString("Value", this.valueField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("Overridable" == name)) - { - this.overridableField = Enums.ParseYesNoType(value); - this.overridableFieldSet = true; - } - if (("Value" == name)) - { - this.valueField = value; - this.valueFieldSet = true; - } - } - } - - /// - /// Use this element to contain definitions for instance transforms. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class InstanceTransforms : IParentElement, ICreateChildren, ISchemaElement, ISetAttributes - { - - private ElementCollection children; - - private string propertyField; - - private bool propertyFieldSet; - - private ISchemaElement parentElement; - - public InstanceTransforms() - { - ElementCollection childCollection0 = new ElementCollection(ElementCollection.CollectionType.Choice); - childCollection0.AddItem(new ElementCollection.ChoiceItem(typeof(Instance))); - this.children = childCollection0; - } - - public virtual IEnumerable Children - { - get - { - return this.children; - } - } - - [SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers")] - public virtual IEnumerable this[System.Type childType] - { - get - { - return this.children.Filter(childType); - } - } - - /// - /// The Id of the Property who's value should change for each instance. - /// - public string Property - { - get - { - return this.propertyField; - } - set - { - this.propertyFieldSet = true; - this.propertyField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - public virtual void AddChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.AddElement(child); - child.ParentElement = this; - } - - public virtual void RemoveChild(ISchemaElement child) - { - if ((null == child)) - { - throw new ArgumentNullException("child"); - } - this.children.RemoveElement(child); - child.ParentElement = null; - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - ISchemaElement ICreateChildren.CreateChild(string childName) - { - if (String.IsNullOrEmpty(childName)) - { - throw new ArgumentNullException("childName"); - } - ISchemaElement childValue = null; - if (("Instance" == childName)) - { - childValue = new Instance(); - } - if ((null == childValue)) - { - throw new InvalidOperationException(String.Concat(childName, " is not a valid child name.")); - } - return childValue; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("InstanceTransforms", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.propertyFieldSet) - { - writer.WriteAttributeString("Property", this.propertyField); - } - for (IEnumerator enumerator = this.children.GetEnumerator(); enumerator.MoveNext(); ) - { - ISchemaElement childElement = ((ISchemaElement)(enumerator.Current)); - childElement.OutputXml(writer); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Property" == name)) - { - this.propertyField = value; - this.propertyFieldSet = true; - } - } - } - - /// - /// Defines an instance transform for your product. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class Instance : ISchemaElement, ISetAttributes - { - - private string idField; - - private bool idFieldSet; - - private string productCodeField; - - private bool productCodeFieldSet; - - private string productNameField; - - private bool productNameFieldSet; - - private string upgradeCodeField; - - private bool upgradeCodeFieldSet; - - private ISchemaElement parentElement; - - /// - /// The identity of the instance transform. This value will define the name by which the instance - /// should be referred to on the command line. In addition, the value of the this attribute will - /// determine what the value of the property specified in Property attribute on InstanceTransforms - /// will change to for each instance. - /// - public string Id - { - get - { - return this.idField; - } - set - { - this.idFieldSet = true; - this.idField = value; - } - } - - /// - /// The ProductCode for this instance. - /// - public string ProductCode - { - get - { - return this.productCodeField; - } - set - { - this.productCodeFieldSet = true; - this.productCodeField = value; - } - } - - /// - /// The ProductName for this instance. - /// - public string ProductName - { - get - { - return this.productNameField; - } - set - { - this.productNameFieldSet = true; - this.productNameField = value; - } - } - - /// - /// The UpgradeCode for this instance. - /// - public string UpgradeCode - { - get - { - return this.upgradeCodeField; - } - set - { - this.upgradeCodeFieldSet = true; - this.upgradeCodeField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("Instance", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.idFieldSet) - { - writer.WriteAttributeString("Id", this.idField); - } - if (this.productCodeFieldSet) - { - writer.WriteAttributeString("ProductCode", this.productCodeField); - } - if (this.productNameFieldSet) - { - writer.WriteAttributeString("ProductName", this.productNameField); - } - if (this.upgradeCodeFieldSet) - { - writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Id" == name)) - { - this.idField = value; - this.idFieldSet = true; - } - if (("ProductCode" == name)) - { - this.productCodeField = value; - this.productCodeFieldSet = true; - } - if (("ProductName" == name)) - { - this.productNameField = value; - this.productNameFieldSet = true; - } - if (("UpgradeCode" == name)) - { - this.upgradeCodeField = value; - this.upgradeCodeFieldSet = true; - } - } - } - - /// - /// Simplifies authoring for major upgrades, including support for preventing downgrades. - /// - /// The parent Package element must have valid UpgradeCode and Version attributes. - /// - /// When the FindRelatedProducts action detects a related product installed on the system, - /// it appends the product code to the property named WIX_UPGRADE_DETECTED. After the - /// FindRelatedProducts action is run, the value of the WIX_UPGRADE_DETECTED property is a - /// list of product codes, separated by semicolons (;), detected on the system. - /// - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class MajorUpgrade : ISchemaElement, ISetAttributes - { - - private YesNoType allowDowngradesField; - - private bool allowDowngradesFieldSet; - - private YesNoType allowSameVersionUpgradesField; - - private bool allowSameVersionUpgradesFieldSet; - - private YesNoType disallowField; - - private bool disallowFieldSet; - - private string downgradeErrorMessageField; - - private bool downgradeErrorMessageFieldSet; - - private string disallowUpgradeErrorMessageField; - - private bool disallowUpgradeErrorMessageFieldSet; - - private YesNoType migrateFeaturesField; - - private bool migrateFeaturesFieldSet; - - private YesNoType ignoreLanguageField; - - private bool ignoreLanguageFieldSet; - - private YesNoType ignoreRemoveFailureField; - - private bool ignoreRemoveFailureFieldSet; - - private string removeFeaturesField; - - private bool removeFeaturesFieldSet; - - private ScheduleType scheduleField; - - private bool scheduleFieldSet; - - private ISchemaElement parentElement; - - /// - /// When set to no (the default), products with lower version numbers are blocked from - /// installing when a product with a higher version is installed; the DowngradeErrorMessage - /// attribute must also be specified. - /// - /// When set to yes, any version can be installed over any other version. - /// - public YesNoType AllowDowngrades - { - get - { - return this.allowDowngradesField; - } - set - { - this.allowDowngradesFieldSet = true; - this.allowDowngradesField = value; - } - } - - /// - /// When set to no (the default), installing a product with the same version and upgrade code - /// (but different product code) is allowed and treated by MSI as two products. When set to yes, - /// WiX sets the msidbUpgradeAttributesVersionMaxInclusive attribute, which tells MSI to treat - /// a product with the same version as a major upgrade. - /// - /// This is useful when two product versions differ only in the fourth version field. MSI - /// specifically ignores that field when comparing product versions, so two products that - /// differ only in the fourth version field are the same product and need this attribute set to - /// yes to be detected. - /// - /// Note that because MSI ignores the fourth product version field, setting this attribute to - /// yes also allows downgrades when the first three product version fields are identical. - /// For example, product version 1.0.0.1 will "upgrade" 1.0.0.2998 because they're seen as the - /// same version (1.0.0). That could reintroduce serious bugs so the safest choice is to change - /// the first three version fields and omit this attribute to get the default of no. - /// - /// This attribute cannot be "yes" when AllowDowngrades is also "yes" -- AllowDowngrades - /// already allows two products with the same version number to upgrade each other. - /// - public YesNoType AllowSameVersionUpgrades - { - get - { - return this.allowSameVersionUpgradesField; - } - set - { - this.allowSameVersionUpgradesFieldSet = true; - this.allowSameVersionUpgradesField = value; - } - } - - /// - /// When set to yes, products with higer version numbers are blocked from - /// installing when a product with a lower version is installed; the UpgradeErrorMessage - /// attribute must also be specified. - /// - /// When set to no (the default), any version can be installed over any lower version. - /// - public YesNoType Disallow - { - get - { - return this.disallowField; - } - set - { - this.disallowFieldSet = true; - this.disallowField = value; - } - } - - /// - /// The message displayed if users try to install a product with a lower version number - /// when a product with a higher version is installed. Used only when AllowDowngrades - /// is no (the default). - /// - public string DowngradeErrorMessage - { - get - { - return this.downgradeErrorMessageField; - } - set - { - this.downgradeErrorMessageFieldSet = true; - this.downgradeErrorMessageField = value; - } - } - - /// - /// The message displayed if users try to install a product with a higer version number - /// when a product with a lower version is installed. Used only when Disallow - /// is yes. - /// - public string DisallowUpgradeErrorMessage - { - get - { - return this.disallowUpgradeErrorMessageField; - } - set - { - this.disallowUpgradeErrorMessageFieldSet = true; - this.disallowUpgradeErrorMessageField = value; - } - } - - /// - /// When set to yes (the default), the MigrateFeatureStates standard action will set the - /// feature states of the upgrade product to those of the installed product. - /// - /// When set to no, the installed features have no effect on the upgrade installation. - /// - public YesNoType MigrateFeatures - { - get - { - return this.migrateFeaturesField; - } - set - { - this.migrateFeaturesFieldSet = true; - this.migrateFeaturesField = value; - } - } - - /// - /// When set to yes, the Upgrade table rows will match any product with the same UpgradeCode. - /// - /// When set to no (the default), the Upgrade table rows will match only products with the - /// same UpgradeCode and ProductLanguage. - /// - public YesNoType IgnoreLanguage - { - get - { - return this.ignoreLanguageField; - } - set - { - this.ignoreLanguageFieldSet = true; - this.ignoreLanguageField = value; - } - } - - /// - /// When set to yes, failures removing the installed product during the upgrade will be - /// ignored. - /// - /// When set to no (the default), failures removing the installed product during the upgrade - /// will be considered a failure and, depending on the scheduling, roll back the upgrade. - /// - public YesNoType IgnoreRemoveFailure - { - get - { - return this.ignoreRemoveFailureField; - } - set - { - this.ignoreRemoveFailureFieldSet = true; - this.ignoreRemoveFailureField = value; - } - } - - /// - /// A formatted string that contains the list of features to remove from the installed - /// product. The default is to remove all features. Note that if you use formatted property - /// values that evaluate to an empty string, no features will be removed; only omitting - /// this attribute defaults to removing all features. - /// - public string RemoveFeatures - { - get - { - return this.removeFeaturesField; - } - set - { - this.removeFeaturesFieldSet = true; - this.removeFeaturesField = value; - } - } - - /// - /// Determines the scheduling of the RemoveExistingProducts standard action, which is when - /// the installed product is removed. The default is "afterInstallValidate" which removes - /// the installed product entirely before installing the upgrade product. It's slowest but - /// gives the most flexibility in changing components and features in the upgrade product. - /// - /// For more information, see - /// - public ScheduleType Schedule - { - get - { - return this.scheduleField; - } - set - { - this.scheduleFieldSet = true; - this.scheduleField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Parses a ScheduleType from a string. - /// - public static ScheduleType ParseScheduleType(string value) - { - ScheduleType parsedValue; - MajorUpgrade.TryParseScheduleType(value, out parsedValue); - return parsedValue; - } - - /// - /// Tries to parse a ScheduleType from a string. - /// - public static bool TryParseScheduleType(string value, out ScheduleType parsedValue) - { - parsedValue = ScheduleType.NotSet; - if (string.IsNullOrEmpty(value)) - { - return false; - } - if (("afterInstallValidate" == value)) - { - parsedValue = ScheduleType.afterInstallValidate; - } - else - { - if (("afterInstallInitialize" == value)) - { - parsedValue = ScheduleType.afterInstallInitialize; - } - else - { - if (("afterInstallExecute" == value)) - { - parsedValue = ScheduleType.afterInstallExecute; - } - else - { - if (("afterInstallExecuteAgain" == value)) - { - parsedValue = ScheduleType.afterInstallExecuteAgain; - } - else - { - if (("afterInstallFinalize" == value)) - { - parsedValue = ScheduleType.afterInstallFinalize; - } - else - { - parsedValue = ScheduleType.IllegalValue; - return false; - } - } - } - } - } - return true; - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("MajorUpgrade", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.allowDowngradesFieldSet) - { - if ((this.allowDowngradesField == YesNoType.no)) - { - writer.WriteAttributeString("AllowDowngrades", "no"); - } - if ((this.allowDowngradesField == YesNoType.yes)) - { - writer.WriteAttributeString("AllowDowngrades", "yes"); - } - } - if (this.allowSameVersionUpgradesFieldSet) - { - if ((this.allowSameVersionUpgradesField == YesNoType.no)) - { - writer.WriteAttributeString("AllowSameVersionUpgrades", "no"); - } - if ((this.allowSameVersionUpgradesField == YesNoType.yes)) - { - writer.WriteAttributeString("AllowSameVersionUpgrades", "yes"); - } - } - if (this.disallowFieldSet) - { - if ((this.disallowField == YesNoType.no)) - { - writer.WriteAttributeString("Disallow", "no"); - } - if ((this.disallowField == YesNoType.yes)) - { - writer.WriteAttributeString("Disallow", "yes"); - } - } - if (this.downgradeErrorMessageFieldSet) - { - writer.WriteAttributeString("DowngradeErrorMessage", this.downgradeErrorMessageField); - } - if (this.disallowUpgradeErrorMessageFieldSet) - { - writer.WriteAttributeString("DisallowUpgradeErrorMessage", this.disallowUpgradeErrorMessageField); - } - if (this.migrateFeaturesFieldSet) - { - if ((this.migrateFeaturesField == YesNoType.no)) - { - writer.WriteAttributeString("MigrateFeatures", "no"); - } - if ((this.migrateFeaturesField == YesNoType.yes)) - { - writer.WriteAttributeString("MigrateFeatures", "yes"); - } - } - if (this.ignoreLanguageFieldSet) - { - if ((this.ignoreLanguageField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreLanguage", "no"); - } - if ((this.ignoreLanguageField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreLanguage", "yes"); - } - } - if (this.ignoreRemoveFailureFieldSet) - { - if ((this.ignoreRemoveFailureField == YesNoType.no)) - { - writer.WriteAttributeString("IgnoreRemoveFailure", "no"); - } - if ((this.ignoreRemoveFailureField == YesNoType.yes)) - { - writer.WriteAttributeString("IgnoreRemoveFailure", "yes"); - } - } - if (this.removeFeaturesFieldSet) - { - writer.WriteAttributeString("RemoveFeatures", this.removeFeaturesField); - } - if (this.scheduleFieldSet) - { - if ((this.scheduleField == ScheduleType.afterInstallValidate)) - { - writer.WriteAttributeString("Schedule", "afterInstallValidate"); - } - if ((this.scheduleField == ScheduleType.afterInstallInitialize)) - { - writer.WriteAttributeString("Schedule", "afterInstallInitialize"); - } - if ((this.scheduleField == ScheduleType.afterInstallExecute)) - { - writer.WriteAttributeString("Schedule", "afterInstallExecute"); - } - if ((this.scheduleField == ScheduleType.afterInstallExecuteAgain)) - { - writer.WriteAttributeString("Schedule", "afterInstallExecuteAgain"); - } - if ((this.scheduleField == ScheduleType.afterInstallFinalize)) - { - writer.WriteAttributeString("Schedule", "afterInstallFinalize"); - } - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("AllowDowngrades" == name)) - { - this.allowDowngradesField = Enums.ParseYesNoType(value); - this.allowDowngradesFieldSet = true; - } - if (("AllowSameVersionUpgrades" == name)) - { - this.allowSameVersionUpgradesField = Enums.ParseYesNoType(value); - this.allowSameVersionUpgradesFieldSet = true; - } - if (("Disallow" == name)) - { - this.disallowField = Enums.ParseYesNoType(value); - this.disallowFieldSet = true; - } - if (("DowngradeErrorMessage" == name)) - { - this.downgradeErrorMessageField = value; - this.downgradeErrorMessageFieldSet = true; - } - if (("DisallowUpgradeErrorMessage" == name)) - { - this.disallowUpgradeErrorMessageField = value; - this.disallowUpgradeErrorMessageFieldSet = true; - } - if (("MigrateFeatures" == name)) - { - this.migrateFeaturesField = Enums.ParseYesNoType(value); - this.migrateFeaturesFieldSet = true; - } - if (("IgnoreLanguage" == name)) - { - this.ignoreLanguageField = Enums.ParseYesNoType(value); - this.ignoreLanguageFieldSet = true; - } - if (("IgnoreRemoveFailure" == name)) - { - this.ignoreRemoveFailureField = Enums.ParseYesNoType(value); - this.ignoreRemoveFailureFieldSet = true; - } - if (("RemoveFeatures" == name)) - { - this.removeFeaturesField = value; - this.removeFeaturesFieldSet = true; - } - if (("Schedule" == name)) - { - this.scheduleField = MajorUpgrade.ParseScheduleType(value); - this.scheduleFieldSet = true; - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public enum ScheduleType - { - - IllegalValue = int.MaxValue, - - NotSet = -1, - - /// - /// (Default) Schedules RemoveExistingProducts after the InstallValidate standard - /// action. This scheduling removes the installed product entirely before installing - /// the upgrade product. It's slowest but gives the most flexibility in changing - /// components and features in the upgrade product. Note that if the installation - /// of the upgrade product fails, the machine will have neither version installed. - /// - afterInstallValidate, - - /// - /// Schedules RemoveExistingProducts after the InstallInitialize standard action. - /// This is similar to the afterInstallValidate scheduling, but if the installation - /// of the upgrade product fails, Windows Installer also rolls back the removal of - /// the installed product -- in other words, reinstalls it. - /// - afterInstallInitialize, - - /// - /// Schedules RemoveExistingProducts between the InstallExecute and InstallFinalize standard actions. - /// This scheduling installs the upgrade product "on top of" the installed product then lets - /// RemoveExistingProducts uninstall any components that don't also exist in the upgrade product. - /// Note that this scheduling requires strict adherence to the component rules because it relies - /// on component reference counts to be accurate during installation of the upgrade product and - /// removal of the installed product. For more information, see - /// - afterInstallExecute, - - /// - /// Schedules RemoveExistingProducts between the InstallExecuteAgain and InstallFinalize standard actions. - /// This is identical to the afterInstallExecute scheduling but after the InstallExecuteAgain standard - /// action instead of InstallExecute. - /// - afterInstallExecuteAgain, - - /// - /// Schedules RemoveExistingProducts after the InstallFinalize standard action. This is similar to the - /// afterInstallExecute and afterInstallExecuteAgain schedulings but takes place outside the - /// installation transaction so if installation of the upgrade product fails, Windows Installer does - /// not roll back the removal of the installed product, so the machine will have both versions - /// installed. - /// - afterInstallFinalize, - } - } - - [GeneratedCode("WixBuildTools.XsdGen", "4.0.0.0")] - public class ProductSearch : ISchemaElement, ISetAttributes - { - - private string minimumField; - - private bool minimumFieldSet; - - private string maximumField; - - private bool maximumFieldSet; - - private string languageField; - - private bool languageFieldSet; - - private YesNoType includeMinimumField; - - private bool includeMinimumFieldSet; - - private YesNoType includeMaximumField; - - private bool includeMaximumFieldSet; - - private YesNoType excludeLanguagesField; - - private bool excludeLanguagesFieldSet; - - private string upgradeCodeField; - - private bool upgradeCodeFieldSet; - - private string contentField; - - private bool contentFieldSet; - - private ISchemaElement parentElement; - - /// - /// Specifies the lower bound on the range of product versions to be detected by FindRelatedProducts. - /// - public string Minimum - { - get - { - return this.minimumField; - } - set - { - this.minimumFieldSet = true; - this.minimumField = value; - } - } - - /// - /// Specifies the upper boundary of the range of product versions detected by FindRelatedProducts. - /// - public string Maximum - { - get - { - return this.maximumField; - } - set - { - this.maximumFieldSet = true; - this.maximumField = value; - } - } - - /// - /// 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. - /// - public string Language - { - get - { - return this.languageField; - } - set - { - this.languageFieldSet = true; - this.languageField = value; - } - } - - /// - /// Set to "no" to make the range of versions detected exclude the value specified in Minimum. This attribute is "yes" by default. - /// - public YesNoType IncludeMinimum - { - get - { - return this.includeMinimumField; - } - set - { - this.includeMinimumFieldSet = true; - this.includeMinimumField = value; - } - } - - /// - /// Set to "yes" to make the range of versions detected include the value specified in Maximum. - /// - public YesNoType IncludeMaximum - { - get - { - return this.includeMaximumField; - } - set - { - this.includeMaximumFieldSet = true; - this.includeMaximumField = value; - } - } - - /// - /// Set to "yes" to detect all languages, excluding the languages listed in the Language attribute. - /// - public YesNoType ExcludeLanguages - { - get - { - return this.excludeLanguagesField; - } - set - { - this.excludeLanguagesFieldSet = true; - this.excludeLanguagesField = value; - } - } - - /// - /// This value specifies the upgrade code for the products that are to be detected by the FindRelatedProducts action. - /// - public string UpgradeCode - { - get - { - return this.upgradeCodeField; - } - set - { - this.upgradeCodeFieldSet = true; - this.upgradeCodeField = value; - } - } - - public string Content - { - get - { - return this.contentField; - } - set - { - this.contentFieldSet = true; - this.contentField = value; - } - } - - public virtual ISchemaElement ParentElement - { - get - { - return this.parentElement; - } - set - { - this.parentElement = value; - } - } - - /// - /// Processes this element and all child elements into an XmlWriter. - /// - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - public virtual void OutputXml(XmlWriter writer) - { - if ((null == writer)) - { - throw new ArgumentNullException("writer"); - } - writer.WriteStartElement("ProductSearch", "http://wixtoolset.org/schemas/v4/wxs"); - if (this.minimumFieldSet) - { - writer.WriteAttributeString("Minimum", this.minimumField); - } - if (this.maximumFieldSet) - { - writer.WriteAttributeString("Maximum", this.maximumField); - } - if (this.languageFieldSet) - { - writer.WriteAttributeString("Language", this.languageField); - } - if (this.includeMinimumFieldSet) - { - if ((this.includeMinimumField == YesNoType.no)) - { - writer.WriteAttributeString("IncludeMinimum", "no"); - } - if ((this.includeMinimumField == YesNoType.yes)) - { - writer.WriteAttributeString("IncludeMinimum", "yes"); - } - } - if (this.includeMaximumFieldSet) - { - if ((this.includeMaximumField == YesNoType.no)) - { - writer.WriteAttributeString("IncludeMaximum", "no"); - } - if ((this.includeMaximumField == YesNoType.yes)) - { - writer.WriteAttributeString("IncludeMaximum", "yes"); - } - } - if (this.excludeLanguagesFieldSet) - { - if ((this.excludeLanguagesField == YesNoType.no)) - { - writer.WriteAttributeString("ExcludeLanguages", "no"); - } - if ((this.excludeLanguagesField == YesNoType.yes)) - { - writer.WriteAttributeString("ExcludeLanguages", "yes"); - } - } - if (this.upgradeCodeFieldSet) - { - writer.WriteAttributeString("UpgradeCode", this.upgradeCodeField); - } - if (this.contentFieldSet) - { - writer.WriteString(this.contentField); - } - writer.WriteEndElement(); - } - - [SuppressMessage("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")] - [SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")] - void ISetAttributes.SetAttribute(string name, string value) - { - if (String.IsNullOrEmpty(name)) - { - throw new ArgumentNullException("name"); - } - if (("Minimum" == name)) - { - this.minimumField = value; - this.minimumFieldSet = true; - } - if (("Maximum" == name)) - { - this.maximumField = value; - this.maximumFieldSet = true; - } - if (("Language" == name)) - { - this.languageField = value; - this.languageFieldSet = true; - } - if (("IncludeMinimum" == name)) - { - this.includeMinimumField = Enums.ParseYesNoType(value); - this.includeMinimumFieldSet = true; - } - if (("IncludeMaximum" == name)) - { - this.includeMaximumField = Enums.ParseYesNoType(value); - this.includeMaximumFieldSet = true; - } - if (("ExcludeLanguages" == name)) - { - this.excludeLanguagesField = Enums.ParseYesNoType(value); - this.excludeLanguagesFieldSet = true; - } - if (("UpgradeCode" == name)) - { - this.upgradeCodeField = value; - this.upgradeCodeFieldSet = true; - } - if (("Content" == name)) - { - this.contentField = value; - this.contentFieldSet = true; - } - } - } -} diff --git a/src/wix/heat/TypeLibraryHarvester.cs b/src/wix/heat/TypeLibraryHarvester.cs deleted file mode 100644 index b5c1cba6..00000000 --- a/src/wix/heat/TypeLibraryHarvester.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Globalization; - using System.Runtime.InteropServices; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// Harvest WiX authoring from a type library file. - /// - public sealed class TypeLibraryHarvester - { - /// - /// Harvest the registry values written by RegisterTypeLib. - /// - /// The file to harvest registry values from. - /// The harvested registry values. - public Wix.RegistryValue[] HarvestRegistryValues(string path) - { - using (RegistryHarvester registryHarvester = new RegistryHarvester(true)) - { - NativeMethods.RegisterTypeLibrary(path); - - return registryHarvester.HarvestRegistry(); - } - } - - /// - /// Parses a hexadecimal version string into a Version object. - /// - /// Hexadecimal version string, for example "1.A.3C.F241" - /// Version object, or null if versionString is not a valid hex version. - public static Version ParseHexVersion(string versionString) - { - if (String.IsNullOrEmpty(versionString)) - { - return null; - } - - int[] versionNumbers = new int[4]; - string[] versionNumberStrings = versionString.Split('.'); - - for (int i = 0; i < versionNumbers.Length && i < versionNumberStrings.Length; i++) - { - if (!Int32.TryParse(versionNumberStrings[i], NumberStyles.HexNumber, CultureInfo.InvariantCulture, out versionNumbers[i])) - { - return null; - } - } - - return new Version(versionNumbers[0], versionNumbers[1], versionNumbers[2], versionNumbers[3]); - } - - /// - /// Native methods for registering type libraries. - /// - private sealed class NativeMethods - { - /// - /// Registers a type library. - /// - /// The type library file to register. - internal static void RegisterTypeLibrary(string typeLibraryFile) - { - IntPtr ptlib; - - LoadTypeLib(typeLibraryFile, out ptlib); - - RegisterTypeLib(ptlib, typeLibraryFile, null); - } - - /// - /// Loads and registers a type library. - /// - /// Contains the name of the file from which LoadTypeLib should attempt to load a type library. - /// On return, contains a pointer to a pointer to the loaded type library. - /// LoadTypeLib will not register the type library if the path of the type library is specified. - [DllImport("oleaut32.dll", PreserveSig = false)] - private static extern void LoadTypeLib([MarshalAs(UnmanagedType.BStr)] string szFile, out IntPtr pptlib); - - /// - /// Adds information about a type library to the system registry. - /// - /// Pointer to the type library being registered. - /// Fully qualified path specification for the type library being registered. - /// Directory in which the Help file for the library being registered can be found. Can be Null. - [DllImport("oleaut32.dll", PreserveSig = false)] - private static extern void RegisterTypeLib(IntPtr ptlib, [MarshalAs(UnmanagedType.BStr)] string szFullPath, [MarshalAs(UnmanagedType.BStr)] string szHelpDir); - } - } -} diff --git a/src/wix/heat/UtilFinalizeHarvesterMutator.cs b/src/wix/heat/UtilFinalizeHarvesterMutator.cs deleted file mode 100644 index 5af56e89..00000000 --- a/src/wix/heat/UtilFinalizeHarvesterMutator.cs +++ /dev/null @@ -1,1185 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections; - using System.Collections.Generic; - using System.Collections.Specialized; - using System.Globalization; - using System.IO; - using System.Runtime.InteropServices; - using System.Text; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// The finalize harvester mutator for the WiX Toolset Utility Extension. - /// - public sealed class UtilFinalizeHarvesterMutator : BaseMutatorExtension - { - private ArrayList components; - private ArrayList directories; - private SortedList directoryPaths; - private Hashtable filePaths; - private ArrayList files; - private ArrayList registryValues; - private bool suppressCOMElements; - private bool suppressVB6COMElements; - private string preprocessorVariable; - - /// - /// Instantiate a new UtilFinalizeHarvesterMutator. - /// - public UtilFinalizeHarvesterMutator() - { - this.components = new ArrayList(); - this.directories = new ArrayList(); - this.directoryPaths = new SortedList(); - this.filePaths = new Hashtable(); - this.files = new ArrayList(); - this.registryValues = new ArrayList(); - } - - /// - /// Gets or sets the preprocessor variable for substitution. - /// - /// The preprocessor variable for substitution. - public string PreprocessorVariable - { - get { return this.preprocessorVariable; } - set { this.preprocessorVariable = value; } - } - - /// - /// Gets the sequence of the extension. - /// - /// The sequence of the extension. - public override int Sequence - { - get { return 2000; } - } - - /// - /// Gets or sets the option to suppress COM elements. - /// - /// The option to suppress COM elements. - public bool SuppressCOMElements - { - get { return this.suppressCOMElements; } - set { this.suppressCOMElements = value; } - } - - /// - /// Gets or sets the option to suppress VB6 COM elements. - /// - /// The option to suppress VB6 COM elements. - public bool SuppressVB6COMElements - { - get { return this.suppressVB6COMElements; } - set { this.suppressVB6COMElements = value; } - } - - /// - /// Mutate a WiX document. - /// - /// The Wix document element. - public override void Mutate(Wix.Wix wix) - { - this.components.Clear(); - this.directories.Clear(); - this.directoryPaths.Clear(); - this.filePaths.Clear(); - this.files.Clear(); - this.registryValues.Clear(); - - // index elements in this wix document - this.IndexElement(wix); - - this.MutateDirectories(); - this.MutateFiles(); - this.MutateRegistryValues(); - - // must occur after all the registry values have been formatted - this.MutateComponents(); - } - - /// - /// Index an element. - /// - /// The element to index. - private void IndexElement(Wix.ISchemaElement element) - { - if (element is Wix.Component) - { - // Component elements only need to be indexed if COM registry values will be strongly typed - if (!this.suppressCOMElements) - { - this.components.Add(element); - } - } - else if (element is Wix.Directory) - { - this.directories.Add(element); - } - else if (element is Wix.File) - { - this.files.Add(element); - } - else if (element is Wix.RegistryValue) - { - this.registryValues.Add(element); - } - - // index the child elements - if (element is Wix.IParentElement) - { - foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children) - { - this.IndexElement(childElement); - } - } - } - - /// - /// Mutate the components. - /// - private void MutateComponents() - { - if (this.suppressVB6COMElements) - { - // Search for VB6 specific COM registrations - foreach (Wix.Component component in this.components) - { - ArrayList vb6RegistryValues = new ArrayList(); - - foreach (Wix.RegistryValue registryValue in component[typeof(Wix.RegistryValue)]) - { - if (Wix.RegistryValue.ActionType.write == registryValue.Action && Wix.RegistryRootType.HKCR == registryValue.Root) - { - string[] parts = registryValue.Key.Split('\\'); - - if (String.Equals(parts[0], "CLSID", StringComparison.OrdinalIgnoreCase)) - { - // Search for the VB6 CLSID {D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731} - if (2 <= parts.Length) - { - if (String.Equals(parts[1], "{D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731}", StringComparison.OrdinalIgnoreCase)) - { - if (!vb6RegistryValues.Contains(registryValue)) - { - vb6RegistryValues.Add(registryValue); - } - } - } - } - else if (String.Equals(parts[0], "TypeLib", StringComparison.OrdinalIgnoreCase)) - { - // Search for the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046} - if (2 <= parts.Length) - { - if (String.Equals(parts[1], "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) || - String.Equals(parts[1], "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase)) - { - if (!vb6RegistryValues.Contains(registryValue)) - { - vb6RegistryValues.Add(registryValue); - } - } - } - } - else if (String.Equals(parts[0], "Interface", StringComparison.OrdinalIgnoreCase)) - { - // Search for any Interfaces that reference the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046} - if (3 <= parts.Length) - { - if (String.Equals(parts[2], "TypeLib", StringComparison.OrdinalIgnoreCase)) - { - if (String.Equals(registryValue.Value, "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) || - String.Equals(registryValue.Value, "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase)) - { - // Having found a match we have to loop through again finding the matching Interface entries - foreach (Wix.RegistryValue regValue in component[typeof(Wix.RegistryValue)]) - { - if (Wix.RegistryValue.ActionType.write == regValue.Action && Wix.RegistryRootType.HKCR == regValue.Root) - { - string[] rvparts = regValue.Key.Split('\\'); - if (String.Equals(rvparts[0], "Interface", StringComparison.OrdinalIgnoreCase)) - { - if (2 <= rvparts.Length) - { - if (String.Equals(rvparts[1], parts[1], StringComparison.OrdinalIgnoreCase)) - { - if (!vb6RegistryValues.Contains(regValue)) - { - vb6RegistryValues.Add(regValue); - } - } - } - } - } - } - } - } - } - } - } - } - - // Remove all the VB6 specific COM registry values - foreach (Object entry in vb6RegistryValues) - { - component.RemoveChild((Wix.RegistryValue)entry); - } - } - } - - foreach (Wix.Component component in this.components) - { - SortedList indexedElements = CollectionsUtil.CreateCaseInsensitiveSortedList(); - SortedList indexedRegistryValues = CollectionsUtil.CreateCaseInsensitiveSortedList(); - List duplicateRegistryValues = new List(); - - // index all the File elements - foreach (Wix.File file in component[typeof(Wix.File)]) - { - indexedElements.Add(String.Concat("file/", file.Id), file); - } - - // group all the registry values by the COM element they would correspond to and - // create a COM element for each group - foreach (Wix.RegistryValue registryValue in component[typeof(Wix.RegistryValue)]) - { - if (!String.IsNullOrEmpty(registryValue.Key) && Wix.RegistryValue.ActionType.write == registryValue.Action && Wix.RegistryRootType.HKCR == registryValue.Root && Wix.RegistryValue.TypeType.@string == registryValue.Type) - { - string index = null; - string[] parts = registryValue.Key.Split('\\'); - - // create a COM element for COM registration and index it - if (1 <= parts.Length) - { - if (String.Equals(parts[0], "AppID", StringComparison.OrdinalIgnoreCase)) - { - // only work with GUID AppIds here - if (2 <= parts.Length && parts[1].StartsWith("{", StringComparison.Ordinal) && parts[1].EndsWith("}", StringComparison.Ordinal)) - { - index = String.Concat(parts[0], '/', parts[1]); - - if (!indexedElements.Contains(index)) - { - Wix.AppId appId = new Wix.AppId(); - appId.Id = parts[1].ToUpper(CultureInfo.InvariantCulture); - indexedElements.Add(index, appId); - } - } - } - else if (String.Equals(parts[0], "CLSID", StringComparison.OrdinalIgnoreCase)) - { - if (2 <= parts.Length) - { - index = String.Concat(parts[0], '/', parts[1]); - - if (!indexedElements.Contains(index)) - { - Wix.Class wixClass = new Wix.Class(); - wixClass.Id = parts[1].ToUpper(CultureInfo.InvariantCulture); - indexedElements.Add(index, wixClass); - } - } - } - else if (String.Equals(parts[0], "Component Categories", StringComparison.OrdinalIgnoreCase)) - { - // If this is the .NET Component Category it should not end up in the authoring. Therefore, add - // the registry key to the duplicate list to ensure it gets removed later. - if (String.Equals(parts[1], "{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}", StringComparison.OrdinalIgnoreCase)) - { - duplicateRegistryValues.Add(registryValue); - } - else - { - // TODO: add support for Component Categories to the compiler. - } - } - else if (String.Equals(parts[0], "Interface", StringComparison.OrdinalIgnoreCase)) - { - if (2 <= parts.Length) - { - index = String.Concat(parts[0], '/', parts[1]); - - if (!indexedElements.Contains(index)) - { - Wix.Interface wixInterface = new Wix.Interface(); - wixInterface.Id = parts[1].ToUpper(CultureInfo.InvariantCulture); - indexedElements.Add(index, wixInterface); - } - } - } - else if (String.Equals(parts[0], "TypeLib", StringComparison.Ordinal)) - { - if (3 <= parts.Length) - { - // use a special index to ensure progIds are processed before classes - index = String.Concat(".typelib/", parts[1], '/', parts[2]); - - if (!indexedElements.Contains(index)) - { - Version version = TypeLibraryHarvester.ParseHexVersion(parts[2]); - if (version != null) - { - Wix.TypeLib typeLib = new Wix.TypeLib(); - typeLib.Id = parts[1].ToUpper(CultureInfo.InvariantCulture); - typeLib.MajorVersion = version.Major; - typeLib.MinorVersion = version.Minor; - indexedElements.Add(index, typeLib); - } - else // not a valid type library registry value - { - index = null; - } - } - } - } - else if (parts[0].StartsWith(".", StringComparison.Ordinal)) - { - // extension - } - else // ProgId (hopefully) - { - // use a special index to ensure progIds are processed before classes - index = String.Concat(".progid/", parts[0]); - - if (!indexedElements.Contains(index)) - { - Wix.ProgId progId = new Wix.ProgId(); - progId.Id = parts[0]; - indexedElements.Add(index, progId); - } - } - } - - // index the RegistryValue element according to the COM element it corresponds to - if (null != index) - { - SortedList registryValues = (SortedList)indexedRegistryValues[index]; - - if (null == registryValues) - { - registryValues = CollectionsUtil.CreateCaseInsensitiveSortedList(); - indexedRegistryValues.Add(index, registryValues); - } - - try - { - registryValues.Add(String.Concat(registryValue.Key, '/', registryValue.Name), registryValue); - } - catch (ArgumentException) - { - duplicateRegistryValues.Add(registryValue); - - if (String.IsNullOrEmpty(registryValue.Value)) - { - this.Core.Messaging.Write(HarvesterWarnings.DuplicateDllRegistryEntry(String.Concat(registryValue.Key, '/', registryValue.Name), component.Id)); - } - else - { - this.Core.Messaging.Write(HarvesterWarnings.DuplicateDllRegistryEntry(String.Concat(registryValue.Key, '/', registryValue.Name), registryValue.Value, component.Id)); - } - } - } - } - } - - foreach (Wix.RegistryValue removeRegistryEntry in duplicateRegistryValues) - { - component.RemoveChild(removeRegistryEntry); - } - - // set various values on the COM elements from their corresponding registry values - Hashtable indexedProcessedRegistryValues = new Hashtable(); - foreach (DictionaryEntry entry in indexedRegistryValues) - { - Wix.ISchemaElement element = (Wix.ISchemaElement)indexedElements[entry.Key]; - string parentIndex = null; - SortedList registryValues = (SortedList)entry.Value; - - // element-specific variables (for really tough situations) - string classAppId = null; - bool threadingModelSet = false; - - foreach (Wix.RegistryValue registryValue in registryValues.Values) - { - string[] parts = registryValue.Key.ToLower(CultureInfo.InvariantCulture).Split('\\'); - bool processed = false; - - if (element is Wix.AppId) - { - Wix.AppId appId = (Wix.AppId)element; - - if (2 == parts.Length) - { - if (null == registryValue.Name) - { - appId.Description = registryValue.Value; - processed = true; - } - } - } - else if (element is Wix.Class) - { - Wix.Class wixClass = (Wix.Class)element; - - if (2 == parts.Length) - { - if (null == registryValue.Name) - { - wixClass.Description = registryValue.Value; - processed = true; - } - else if (String.Equals(registryValue.Name, "AppID", StringComparison.OrdinalIgnoreCase)) - { - classAppId = registryValue.Value; - processed = true; - } - } - else if (3 == parts.Length) - { - Wix.Class.ContextType contextType = Wix.Class.ContextType.None; - - switch (parts[2]) - { - case "control": - wixClass.Control = Wix.YesNoType.yes; - processed = true; - break; - case "inprochandler": - if (null == registryValue.Name) - { - if (null == wixClass.Handler) - { - wixClass.Handler = "1"; - processed = true; - } - else if ("2" == wixClass.Handler) - { - wixClass.Handler = "3"; - processed = true; - } - } - break; - case "inprochandler32": - if (null == registryValue.Name) - { - if (null == wixClass.Handler) - { - wixClass.Handler = "2"; - processed = true; - } - else if ("1" == wixClass.Handler) - { - wixClass.Handler = "3"; - processed = true; - } - } - break; - case "inprocserver": - contextType = Wix.Class.ContextType.InprocServer; - break; - case "inprocserver32": - contextType = Wix.Class.ContextType.InprocServer32; - break; - case "insertable": - wixClass.Insertable = Wix.YesNoType.yes; - processed = true; - break; - case "localserver": - contextType = Wix.Class.ContextType.LocalServer; - break; - case "localserver32": - contextType = Wix.Class.ContextType.LocalServer32; - break; - case "progid": - if (null == registryValue.Name) - { - Wix.ProgId progId = (Wix.ProgId)indexedElements[String.Concat(".progid/", registryValue.Value)]; - - // verify that the versioned ProgId appears under this Class element - // if not, toss the entire element - if (null == progId || wixClass != progId.ParentElement) - { - element = null; - } - else - { - processed = true; - } - } - break; - case "programmable": - wixClass.Programmable = Wix.YesNoType.yes; - processed = true; - break; - case "typelib": - if (null == registryValue.Name) - { - foreach (DictionaryEntry indexedEntry in indexedElements) - { - string key = (string)indexedEntry.Key; - Wix.ISchemaElement possibleTypeLib = (Wix.ISchemaElement)indexedEntry.Value; - - if (key.StartsWith(".typelib/", StringComparison.Ordinal) && - 0 == String.Compare(key, 9, registryValue.Value, 0, registryValue.Value.Length, StringComparison.OrdinalIgnoreCase)) - { - // ensure the TypeLib is nested under the same thing we want the Class under - if (null == parentIndex || indexedElements[parentIndex] == possibleTypeLib.ParentElement) - { - parentIndex = key; - processed = true; - } - } - } - } - break; - case "version": - if (null == registryValue.Name) - { - wixClass.Version = registryValue.Value; - processed = true; - } - break; - case "versionindependentprogid": - if (null == registryValue.Name) - { - Wix.ProgId progId = (Wix.ProgId)indexedElements[String.Concat(".progid/", registryValue.Value)]; - - // verify that the version independent ProgId appears somewhere - // under this Class element - if not, toss the entire element - if (null == progId || wixClass != progId.ParentElement) - { - // check the parent of the parent - if (null == progId || null == progId.ParentElement || wixClass != progId.ParentElement.ParentElement) - { - element = null; - } - } - - processed = true; - } - break; - } - - if (Wix.Class.ContextType.None != contextType) - { - wixClass.Context |= contextType; - - if (null == registryValue.Name) - { - if ((registryValue.Value.StartsWith("[!", StringComparison.Ordinal) || registryValue.Value.StartsWith("[#", StringComparison.Ordinal)) - && registryValue.Value.EndsWith("]", StringComparison.Ordinal)) - { - parentIndex = String.Concat("file/", registryValue.Value.Substring(2, registryValue.Value.Length - 3)); - processed = true; - } - else if (String.Equals(Path.GetFileName(registryValue.Value), "mscoree.dll", StringComparison.OrdinalIgnoreCase)) - { - wixClass.ForeignServer = "mscoree.dll"; - processed = true; - } - else if (String.Equals(Path.GetFileName(registryValue.Value), "msvbvm60.dll", StringComparison.OrdinalIgnoreCase)) - { - wixClass.ForeignServer = "msvbvm60.dll"; - processed = true; - } - else - { - // Some servers are specifying relative paths (which the above code doesn't find) - // If there's any ambiguity leave it alone and let the developer figure it out when it breaks in the compiler - - bool possibleDuplicate = false; - string possibleParentIndex = null; - - foreach (Wix.File file in this.files) - { - if (String.Equals(registryValue.Value, Path.GetFileName(file.Source), StringComparison.OrdinalIgnoreCase)) - { - if (null == possibleParentIndex) - { - possibleParentIndex = String.Concat("file/", file.Id); - } - else - { - possibleDuplicate = true; - break; - } - } - } - - if (!possibleDuplicate) - { - if (null == possibleParentIndex) - { - wixClass.ForeignServer = registryValue.Value; - processed = true; - } - else - { - parentIndex = possibleParentIndex; - wixClass.RelativePath = Wix.YesNoType.yes; - processed = true; - } - } - } - } - else if (String.Equals(registryValue.Name, "ThreadingModel", StringComparison.OrdinalIgnoreCase)) - { - Wix.Class.ThreadingModelType threadingModel; - - if (String.Equals(registryValue.Value, "apartment", StringComparison.OrdinalIgnoreCase)) - { - threadingModel = Wix.Class.ThreadingModelType.apartment; - processed = true; - } - else if (String.Equals(registryValue.Value, "both", StringComparison.OrdinalIgnoreCase)) - { - threadingModel = Wix.Class.ThreadingModelType.both; - processed = true; - } - else if (String.Equals(registryValue.Value, "free", StringComparison.OrdinalIgnoreCase)) - { - threadingModel = Wix.Class.ThreadingModelType.free; - processed = true; - } - else if (String.Equals(registryValue.Value, "neutral", StringComparison.OrdinalIgnoreCase)) - { - threadingModel = Wix.Class.ThreadingModelType.neutral; - processed = true; - } - else if (String.Equals(registryValue.Value, "rental", StringComparison.OrdinalIgnoreCase)) - { - threadingModel = Wix.Class.ThreadingModelType.rental; - processed = true; - } - else if (String.Equals(registryValue.Value, "single", StringComparison.OrdinalIgnoreCase)) - { - threadingModel = Wix.Class.ThreadingModelType.single; - processed = true; - } - else - { - continue; - } - - if (!threadingModelSet || wixClass.ThreadingModel == threadingModel) - { - wixClass.ThreadingModel = threadingModel; - threadingModelSet = true; - } - else - { - element = null; - break; - } - } - } - } - else if (4 == parts.Length) - { - if (String.Equals(parts[2], "implemented categories", StringComparison.Ordinal)) - { - switch (parts[3]) - { - case "{7dd95801-9882-11cf-9fa9-00aa006c42c4}": - wixClass.SafeForScripting = Wix.YesNoType.yes; - processed = true; - break; - case "{7dd95802-9882-11cf-9fa9-00aa006c42c4}": - wixClass.SafeForInitializing = Wix.YesNoType.yes; - processed = true; - break; - } - } - } - } - else if (element is Wix.Interface) - { - Wix.Interface wixInterface = (Wix.Interface)element; - - if (2 == parts.Length && null == registryValue.Name) - { - wixInterface.Name = registryValue.Value; - processed = true; - } - else if (3 == parts.Length) - { - switch (parts[2]) - { - case "proxystubclsid": - if (null == registryValue.Name) - { - wixInterface.ProxyStubClassId = registryValue.Value.ToUpper(CultureInfo.InvariantCulture); - processed = true; - } - break; - case "proxystubclsid32": - if (null == registryValue.Name) - { - wixInterface.ProxyStubClassId32 = registryValue.Value.ToUpper(CultureInfo.InvariantCulture); - processed = true; - } - break; - case "nummethods": - if (null == registryValue.Name) - { - wixInterface.NumMethods = Convert.ToInt32(registryValue.Value, CultureInfo.InvariantCulture); - processed = true; - } - break; - case "typelib": - if (String.Equals("Version", registryValue.Name, StringComparison.OrdinalIgnoreCase)) - { - parentIndex = String.Concat(parentIndex, registryValue.Value); - processed = true; - } - else if (null == registryValue.Name) // TypeLib guid - { - parentIndex = String.Concat(".typelib/", registryValue.Value, '/', parentIndex); - processed = true; - } - break; - } - } - } - else if (element is Wix.ProgId) - { - Wix.ProgId progId = (Wix.ProgId)element; - - if (null == registryValue.Name) - { - if (1 == parts.Length) - { - progId.Description = registryValue.Value; - processed = true; - } - else if (2 == parts.Length) - { - if (String.Equals(parts[1], "CLSID", StringComparison.OrdinalIgnoreCase)) - { - parentIndex = String.Concat("CLSID/", registryValue.Value); - processed = true; - } - else if (String.Equals(parts[1], "CurVer", StringComparison.OrdinalIgnoreCase)) - { - // If a progId points to its own ProgId with CurVer, it isn't meaningful, so ignore it - if (!String.Equals(progId.Id, registryValue.Value, StringComparison.OrdinalIgnoreCase)) - { - // this registry value should usually be processed second so the - // version independent ProgId should be under the versioned one - parentIndex = String.Concat(".progid/", registryValue.Value); - processed = true; - } - } - } - } - } - else if (element is Wix.TypeLib) - { - Wix.TypeLib typeLib = (Wix.TypeLib)element; - - if (null == registryValue.Name) - { - if (3 == parts.Length) - { - typeLib.Description = registryValue.Value; - processed = true; - } - else if (4 == parts.Length) - { - if (String.Equals(parts[3], "flags", StringComparison.OrdinalIgnoreCase)) - { - int flags = Convert.ToInt32(registryValue.Value, CultureInfo.InvariantCulture); - - if (0x1 == (flags & 0x1)) - { - typeLib.Restricted = Wix.YesNoType.yes; - } - - if (0x2 == (flags & 0x2)) - { - typeLib.Control = Wix.YesNoType.yes; - } - - if (0x4 == (flags & 0x4)) - { - typeLib.Hidden = Wix.YesNoType.yes; - } - - if (0x8 == (flags & 0x8)) - { - typeLib.HasDiskImage = Wix.YesNoType.yes; - } - - processed = true; - } - else if (String.Equals(parts[3], "helpdir", StringComparison.OrdinalIgnoreCase)) - { - if (registryValue.Value.StartsWith("[", StringComparison.Ordinal) && (registryValue.Value.EndsWith("]", StringComparison.Ordinal) - || registryValue.Value.EndsWith("]\\", StringComparison.Ordinal))) - { - typeLib.HelpDirectory = registryValue.Value.Substring(1, registryValue.Value.LastIndexOf(']') - 1); - } - else if (0 == String.Compare(registryValue.Value, Environment.SystemDirectory, StringComparison.OrdinalIgnoreCase)) // VB6 DLLs register their help directory as SystemFolder - { - typeLib.HelpDirectory = "SystemFolder"; - } - else if (null != component.Directory) // -sfrag has not been specified - { - typeLib.HelpDirectory = component.Directory; - } - else if (component.ParentElement is Wix.Directory) // -sfrag has been specified - { - typeLib.HelpDirectory = ((Wix.Directory)component.ParentElement).Id; - } - else if (component.ParentElement is Wix.DirectoryRef) // -sfrag has been specified - { - typeLib.HelpDirectory = ((Wix.DirectoryRef)component.ParentElement).Id; - } - - //If the helpdir has not matched a known directory, drop it because it cannot be resolved. - processed = true; - } - } - else if (5 == parts.Length && String.Equals("win32", parts[4], StringComparison.OrdinalIgnoreCase)) - { - typeLib.Language = Convert.ToInt32(parts[3], CultureInfo.InvariantCulture); - - if ((registryValue.Value.StartsWith("[!", StringComparison.Ordinal) || registryValue.Value.StartsWith("[#", StringComparison.Ordinal)) - && registryValue.Value.EndsWith("]", StringComparison.Ordinal)) - { - parentIndex = String.Concat("file/", registryValue.Value.Substring(2, registryValue.Value.Length - 3)); - } - - processed = true; - } - } - } - - // index the processed registry values by their corresponding COM element - if (processed) - { - indexedProcessedRegistryValues.Add(registryValue, element); - } - } - - // parent the COM element - if (null != element) - { - if (null != parentIndex) - { - Wix.IParentElement parentElement = (Wix.IParentElement)indexedElements[parentIndex]; - - if (null != parentElement) - { - parentElement.AddChild(element); - } - } - else if (0 < indexedProcessedRegistryValues.Count) - { - component.AddChild(element); - } - - // special handling for AppID since it doesn't fit the general model - if (null != classAppId) - { - Wix.AppId appId = (Wix.AppId)indexedElements[String.Concat("AppID/", classAppId)]; - - // move the Class element under the AppId (and put the AppId under its old parent) - if (null != appId) - { - // move the AppId element - ((Wix.IParentElement)appId.ParentElement).RemoveChild(appId); - ((Wix.IParentElement)element.ParentElement).AddChild(appId); - - // move the Class element - ((Wix.IParentElement)element.ParentElement).RemoveChild(element); - appId.AddChild(element); - } - } - } - } - - // remove the RegistryValue elements which were converted into COM elements - // that were successfully nested under the Component element - foreach (DictionaryEntry entry in indexedProcessedRegistryValues) - { - Wix.ISchemaElement element = (Wix.ISchemaElement)entry.Value; - Wix.RegistryValue registryValue = (Wix.RegistryValue)entry.Key; - - while (null != element) - { - if (element == component) - { - ((Wix.IParentElement)registryValue.ParentElement).RemoveChild(registryValue); - break; - } - - element = element.ParentElement; - } - } - } - } - - /// - /// Mutate the directories. - /// - private void MutateDirectories() - { - foreach (Wix.Directory directory in this.directories) - { - string path = directory.FileSource; - - // create a new directory element without the FileSource attribute - if (null != path) - { - Wix.Directory newDirectory = new Wix.Directory(); - - newDirectory.Id = directory.Id; - newDirectory.Name = directory.Name; - - foreach (Wix.ISchemaElement element in directory.Children) - { - newDirectory.AddChild(element); - } - - ((Wix.IParentElement)directory.ParentElement).AddChild(newDirectory); - ((Wix.IParentElement)directory.ParentElement).RemoveChild(directory); - - if (null != newDirectory.Id) - { - this.directoryPaths[path.ToLower(CultureInfo.InvariantCulture)] = String.Concat("[", newDirectory.Id, "]"); - } - } - } - } - - /// - /// Mutate the files. - /// - private void MutateFiles() - { - string sourceDirSubstitution = this.preprocessorVariable; - if (sourceDirSubstitution != null) - { - string prefix = "$("; - if (sourceDirSubstitution.StartsWith("wix.", StringComparison.Ordinal)) - { - prefix = "!("; - } - sourceDirSubstitution = String.Concat(prefix, sourceDirSubstitution, ")"); - } - - foreach (Wix.File file in this.files) - { - if (null != file.Id && null != file.Source) - { - string fileSource = this.Core.ResolveFilePath(file.Source); - - // index the long path - this.filePaths[fileSource.ToLower(CultureInfo.InvariantCulture)] = String.Concat("[#", file.Id, "]"); - - // index the long path as a URL for assembly harvesting - Uri fileUri = new Uri(fileSource); - this.filePaths[fileUri.ToString().ToLower(CultureInfo.InvariantCulture)] = String.Concat("file:///[#", file.Id, "]"); - - // index the short path - string shortPath = NativeMethods.GetShortPathName(fileSource); - this.filePaths[shortPath.ToLower(CultureInfo.InvariantCulture)] = String.Concat("[!", file.Id, "]"); - - // escape literal $ characters - file.Source = file.Source.Replace("$", "$$"); - - if (null != sourceDirSubstitution && file.Source.StartsWith("SourceDir\\", StringComparison.Ordinal)) - { - file.Source = file.Source.Substring(9).Insert(0, sourceDirSubstitution); - } - } - } - } - - /// - /// Mutate an individual registry string, according to a collection of replacement items. - /// - /// The string to mutate. - /// The collection of items to replace within the string. - /// The mutated registry string. - private string MutateRegistryString(string value, ICollection replace) - { - int index; - string lowercaseValue = value.ToLower(CultureInfo.InvariantCulture); - - foreach (DictionaryEntry entry in replace) - { - while (0 <= (index = lowercaseValue.IndexOf((string)entry.Key, StringComparison.Ordinal))) - { - value = value.Remove(index, ((string)entry.Key).Length); - value = value.Insert(index, (string)entry.Value); - lowercaseValue = value.ToLower(CultureInfo.InvariantCulture); - } - } - - return value; - } - - /// - /// Mutate the registry values. - /// - private void MutateRegistryValues() - { - if (this.SuppressVB6COMElements && this.SuppressCOMElements) - { - var vb6RegistryValues = new List(); - foreach (Wix.RegistryValue registryValue in this.registryValues) - { - if (IsVb6RegistryValue(registryValue)) - { - if (!vb6RegistryValues.Contains(registryValue)) - { - vb6RegistryValues.Add(registryValue); - } - } - } - - // Remove all the VB6 specific COM registry values - foreach (var reg in vb6RegistryValues) - { - if (reg.ParentElement is Wix.Component component) - { - component.RemoveChild(reg); - } - this.registryValues.Remove(reg); - } - } - - - ArrayList reversedDirectoryPaths = new ArrayList(); - - // reverse the indexed directory paths to ensure the longest paths are found first - foreach (DictionaryEntry entry in this.directoryPaths) - { - reversedDirectoryPaths.Insert(0, entry); - } - - foreach (Wix.RegistryValue registryValue in this.registryValues) - { - // Multi-string values are stored as children - their "Value" member is null - if (Wix.RegistryValue.TypeType.multiString == registryValue.Type) - { - foreach (Wix.MultiStringValue multiStringValue in registryValue.Children) - { - // first replace file paths with their MSI tokens - multiStringValue.Content = this.MutateRegistryString(multiStringValue.Content, (ICollection)this.filePaths); - // next replace directory paths with their MSI tokens - multiStringValue.Content = this.MutateRegistryString(multiStringValue.Content, (ICollection)reversedDirectoryPaths); - } - } - else - { - // first replace file paths with their MSI tokens - registryValue.Value = this.MutateRegistryString(registryValue.Value, (ICollection)this.filePaths); - // next replace directory paths with their MSI tokens - registryValue.Value = this.MutateRegistryString(registryValue.Value, (ICollection)reversedDirectoryPaths); - } - } - } - - private static bool IsVb6RegistryValue(Wix.RegistryValue registryValue) - { - if (Wix.RegistryValue.ActionType.write == registryValue.Action && Wix.RegistryRootType.HKCR == registryValue.Root) - { - string[] parts = registryValue.Key.Split('\\'); - if (String.Equals(parts[0], "CLSID", StringComparison.OrdinalIgnoreCase)) - { - // Search for the VB6 CLSID {D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731} - if (2 <= parts.Length) - { - if (String.Equals(parts[1], "{D5DE8D20-5BB8-11D1-A1E3-00A0C90F2731}", StringComparison.OrdinalIgnoreCase)) - { - return true; - } - } - } - else if (String.Equals(parts[0], "TypeLib", StringComparison.OrdinalIgnoreCase)) - { - // Search for the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046} - if (2 <= parts.Length) - { - if (String.Equals(parts[1], "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) || - String.Equals(parts[1], "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase)) - { - return true; - } - } - } - else if (String.Equals(parts[0], "Interface", StringComparison.OrdinalIgnoreCase)) - { - // Search for any Interfaces that reference the VB6 TypeLibs {EA544A21-C82D-11D1-A3E4-00A0C90AEA82} or {000204EF-0000-0000-C000-000000000046} - if (3 <= parts.Length) - { - if (String.Equals(parts[2], "TypeLib", StringComparison.OrdinalIgnoreCase)) - { - if (String.Equals(registryValue.Value, "{EA544A21-C82D-11D1-A3E4-00A0C90AEA82}", StringComparison.OrdinalIgnoreCase) || - String.Equals(registryValue.Value, "{000204EF-0000-0000-C000-000000000046}", StringComparison.OrdinalIgnoreCase)) - { - return true; - } - } - } - } - } - return false; - } - - /// - /// The native methods for grabbing machine-specific short file paths. - /// - private class NativeMethods - { - /// - /// Gets the short name for a file. - /// - /// Fullpath to file on disk. - /// Short name for file. - internal static string GetShortPathName(string fullPath) - { - var bufferSize = (int)GetShortPathName(fullPath, null, 0); - if (0 == bufferSize) - { - int err = System.Runtime.InteropServices.Marshal.GetLastWin32Error(); - throw new System.Runtime.InteropServices.COMException(String.Concat("Failed to get short path buffer size for file: ", fullPath), err); - } - - bufferSize += 1; - var shortPath = new StringBuilder(bufferSize, bufferSize); - - uint result = GetShortPathName(fullPath, shortPath, bufferSize); - - if (0 == result) - { - int err = System.Runtime.InteropServices.Marshal.GetLastWin32Error(); - throw new System.Runtime.InteropServices.COMException(String.Concat("Failed to get short path name for file: ", fullPath), err); - } - - return shortPath.ToString(); - } - - /// - /// Gets the short name for a file. - /// - /// Long path to convert to short path. - /// Short path from long path. - /// Size of short path. - /// zero if success. - [DllImport("kernel32.dll", EntryPoint = "GetShortPathNameW", CharSet = CharSet.Unicode, ExactSpelling = true, SetLastError = true)] - internal static extern uint GetShortPathName(string longPath, StringBuilder shortPath, [MarshalAs(UnmanagedType.U4)]int buffer); - } - } -} diff --git a/src/wix/heat/UtilHarvesterMutator.cs b/src/wix/heat/UtilHarvesterMutator.cs deleted file mode 100644 index af2584e3..00000000 --- a/src/wix/heat/UtilHarvesterMutator.cs +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections; - using System.IO; - using System.Reflection; - using System.Runtime.InteropServices; - using WixToolset.Data; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// The WiX Toolset harvester mutator. - /// - public sealed class UtilHarvesterMutator : BaseMutatorExtension - { - // Flags for SetErrorMode() native method. - private const UInt32 SEM_FAILCRITICALERRORS = 0x0001; - private const UInt32 SEM_NOGPFAULTERRORBOX = 0x0002; - private const UInt32 SEM_NOALIGNMENTFAULTEXCEPT = 0x0004; - private const UInt32 SEM_NOOPENFILEERRORBOX = 0x8000; - - // Remember whether we were able to call OaEnablePerUserTLibRegistration - private bool calledPerUserTLibReg; - - /// - /// allow process to handle serious system errors. - /// - [DllImport("Kernel32.dll")] - private static extern void SetErrorMode(UInt32 uiMode); - - /// - /// enable the RegisterTypeLib API to use the appropriate override mapping for non-admin users on Vista - /// - [DllImport("Oleaut32.dll")] - private static extern void OaEnablePerUserTLibRegistration(); - - public UtilHarvesterMutator() - { - this.calledPerUserTLibReg = false; - - SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); - - try - { - OaEnablePerUserTLibRegistration(); - this.calledPerUserTLibReg = true; - } - catch (EntryPointNotFoundException) - { - } - } - - /// - /// Gets the sequence of this mutator extension. - /// - /// The sequence of this mutator extension. - public override int Sequence - { - get { return 100; } - } - - /// - /// Mutate a WiX document. - /// - /// The Wix document element. - public override void Mutate(Wix.Wix wix) - { - this.MutateElement(null, wix); - } - - /// - /// Mutate an element. - /// - /// The parent of the element to mutate. - /// The element to mutate. - private void MutateElement(Wix.IParentElement parentElement, Wix.ISchemaElement element) - { - if (element is Wix.File) - { - this.MutateFile(parentElement, (Wix.File)element); - } - - // mutate the child elements - if (element is Wix.IParentElement) - { - ArrayList childElements = new ArrayList(); - - // copy the child elements to a temporary array (to allow them to be deleted/moved) - foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children) - { - childElements.Add(childElement); - } - - foreach (Wix.ISchemaElement childElement in childElements) - { - this.MutateElement((Wix.IParentElement)element, childElement); - } - } - } - - /// - /// Mutate a file. - /// - /// The parent of the element to mutate. - /// The file to mutate. - private void MutateFile(Wix.IParentElement parentElement, Wix.File file) - { - if (null != file.Source) - { - string fileExtension = Path.GetExtension(file.Source); - string fileSource = this.Core.ResolveFilePath(file.Source); - - if (String.Equals(".ax", fileExtension, StringComparison.OrdinalIgnoreCase) || // DirectShow filter - String.Equals(".dll", fileExtension, StringComparison.OrdinalIgnoreCase) || - String.Equals(".exe", fileExtension, StringComparison.OrdinalIgnoreCase) || - String.Equals(".ocx", fileExtension, StringComparison.OrdinalIgnoreCase)) // ActiveX - { - // try the assembly harvester - try - { - AssemblyHarvester assemblyHarvester = new AssemblyHarvester(); - - this.Core.Messaging.Write(HarvesterVerboses.HarvestingAssembly(fileSource)); - Wix.RegistryValue[] registryValues = assemblyHarvester.HarvestRegistryValues(fileSource); - - foreach (Wix.RegistryValue registryValue in registryValues) - { - parentElement.AddChild(registryValue); - } - - // also try self-reg since we could have a mixed-mode assembly - this.HarvestSelfReg(parentElement, fileSource); - } - catch (BadImageFormatException) // not an assembly, try raw DLL. - { - this.HarvestSelfReg(parentElement, fileSource); - } - catch (Exception ex) - { - this.Core.Messaging.Write(HarvesterWarnings.AssemblyHarvestFailed(fileSource, ex.Message)); - } - } - else if (String.Equals(".olb", fileExtension, StringComparison.OrdinalIgnoreCase) || // type library - String.Equals(".tlb", fileExtension, StringComparison.OrdinalIgnoreCase)) // type library - { - // try the type library harvester - try - { - TypeLibraryHarvester typeLibHarvester = new TypeLibraryHarvester(); - - this.Core.Messaging.Write(HarvesterVerboses.HarvestingTypeLib(fileSource)); - Wix.RegistryValue[] registryValues = typeLibHarvester.HarvestRegistryValues(fileSource); - - foreach (Wix.RegistryValue registryValue in registryValues) - { - parentElement.AddChild(registryValue); - } - } - catch (COMException ce) - { - // 0x8002801C (TYPE_E_REGISTRYACCESS) - // If we don't have permission to harvest typelibs, it's likely because we're on - // Vista or higher and aren't an Admin, or don't have the appropriate QFE installed. - if (!this.calledPerUserTLibReg && (0x8002801c == unchecked((uint)ce.ErrorCode))) - { - this.Core.Messaging.Write(WarningMessages.InsufficientPermissionHarvestTypeLib()); - } - else if (0x80029C4A == unchecked((uint)ce.ErrorCode)) // generic can't load type library - { - this.Core.Messaging.Write(HarvesterWarnings.TypeLibLoadFailed(fileSource, ce.Message)); - } - } - } - } - } - - /// - /// Calls self-reg harvester. - /// - /// The parent element. - /// The file source. - private void HarvestSelfReg(Wix.IParentElement parentElement, string fileSource) - { - // try the self-reg harvester - try - { - DllHarvester dllHarvester = new DllHarvester(); - - this.Core.Messaging.Write(HarvesterVerboses.HarvestingSelfReg(fileSource)); - Wix.RegistryValue[] registryValues = dllHarvester.HarvestRegistryValues(fileSource); - - foreach (Wix.RegistryValue registryValue in registryValues) - { - parentElement.AddChild(registryValue); - } - } - catch (TargetInvocationException tie) - { - if (tie.InnerException is EntryPointNotFoundException) - { - // No DllRegisterServer(), which is fine by me. - } - else - { - this.Core.Messaging.Write(HarvesterWarnings.SelfRegHarvestFailed(fileSource, tie.Message)); - } - } - catch (Exception ex) - { - this.Core.Messaging.Write(HarvesterWarnings.SelfRegHarvestFailed(fileSource, ex.Message)); - } - } - } -} diff --git a/src/wix/heat/UtilHeatExtension.cs b/src/wix/heat/UtilHeatExtension.cs deleted file mode 100644 index 5ad5ef8a..00000000 --- a/src/wix/heat/UtilHeatExtension.cs +++ /dev/null @@ -1,397 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections.Generic; - using System.IO; - using WixToolset.Core.Burn.Interfaces; - using WixToolset.Data; - using WixToolset.Data.Symbols; - using WixToolset.Extensibility.Services; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - - /// - /// A utility heat extension for the WiX Toolset Harvester application. - /// - public sealed class UtilHeatExtension : BaseHeatExtension - { - public UtilHeatExtension(IServiceProvider serviceProvider) - { - this.PayloadHarvester = serviceProvider.GetService(); - } - - private IPayloadHarvester PayloadHarvester { get; } - - /// - /// Gets the supported command line types for this extension. - /// - /// The supported command line types for this extension. - public override HeatCommandLineOption[] CommandLineTypes - { - get - { - return new HeatCommandLineOption[] - { - new HeatCommandLineOption("dir", "harvest a directory"), - new HeatCommandLineOption("file", "harvest a file"), - new HeatCommandLineOption("exepackagepayload", "harvest a bundle payload as ExePackagePayload"), - new HeatCommandLineOption("msupackagepayload", "harvest a bundle payload as MsuPackagePayload"), - new HeatCommandLineOption("perf", "harvest performance counters"), - new HeatCommandLineOption("reg", "harvest a .reg file"), - new HeatCommandLineOption("-ag", "autogenerate component guids at compile time"), - new HeatCommandLineOption("-cg ", "component group name (cannot contain spaces e.g -cg MyComponentGroup)"), - new HeatCommandLineOption("-dr ", "directory reference to root directories (cannot contain spaces e.g. -dr MyAppDirRef)"), - new HeatCommandLineOption("-var ", "substitute File/@Source=\"SourceDir\" with a preprocessor or a wix variable" + Environment.NewLine + - "(e.g. -var var.MySource will become File/@Source=\"$(var.MySource)\\myfile.txt\" and " + Environment.NewLine + - "-var wix.MySource will become File/@Source=\"!(wix.MySource)\\myfile.txt\""), - new HeatCommandLineOption("-gg", "generate guids now"), - new HeatCommandLineOption("-g1", "generated guids are not in brackets"), - new HeatCommandLineOption("-ke", "keep empty directories"), - new HeatCommandLineOption("-scom", "suppress COM elements"), - new HeatCommandLineOption("-sfrag", "suppress fragments"), - new HeatCommandLineOption("-srd", "suppress harvesting the root directory as an element"), - new HeatCommandLineOption("-svb6", "suppress VB6 COM elements"), - new HeatCommandLineOption("-sreg", "suppress registry harvesting"), - new HeatCommandLineOption("-suid", "suppress unique identifiers for files, components, & directories"), - new HeatCommandLineOption("-t", "transform harvested output with XSL file"), - new HeatCommandLineOption("-template", "use template, one of: fragment,module,product"), - }; - } - } - - /// - /// Parse the command line options for this extension. - /// - /// The active harvester type. - /// The option arguments. - public override void ParseOptions(string type, string[] args) - { - bool active = false; - IHarvesterExtension harvesterExtension = null; - bool suppressHarvestingRegistryValues = false; - UtilFinalizeHarvesterMutator utilFinalizeHarvesterMutator = new UtilFinalizeHarvesterMutator(); - UtilMutator utilMutator = new UtilMutator(); - List transformMutators = new List(); - GenerateType generateType = GenerateType.Components; - - // select the harvester - switch (type) - { - case "dir": - harvesterExtension = new DirectoryHarvester(); - active = true; - break; - case "file": - harvesterExtension = new FileHarvester(); - active = true; - break; - case "perf": - harvesterExtension = new PerformanceCategoryHarvester(); - active = true; - break; - case "reg": - harvesterExtension = new RegFileHarvester(); - active = true; - break; - } - - // set default settings - utilMutator.CreateFragments = true; - utilMutator.SetUniqueIdentifiers = true; - - // parse the options - for (int i = 0; i < args.Length; i++) - { - string commandSwitch = args[i]; - - if (null == commandSwitch || 0 == commandSwitch.Length) // skip blank arguments - { - continue; - } - - if ('-' == commandSwitch[0] || '/' == commandSwitch[0]) - { - string truncatedCommandSwitch = commandSwitch.Substring(1); - - if ("ag" == truncatedCommandSwitch) - { - utilMutator.AutogenerateGuids = true; - } - else if ("cg" == truncatedCommandSwitch) - { - utilMutator.ComponentGroupName = this.GetArgumentParameter(args, i); - - if (this.Core.Messaging.EncounteredError) - { - return; - } - } - else if ("dr" == truncatedCommandSwitch) - { - string dr = this.GetArgumentParameter(args, i); - - if (this.Core.Messaging.EncounteredError) - { - return; - } - - if (harvesterExtension is DirectoryHarvester) - { - ((DirectoryHarvester)harvesterExtension).RootedDirectoryRef = dr; - } - else if (harvesterExtension is FileHarvester) - { - ((FileHarvester)harvesterExtension).RootedDirectoryRef = dr; - } - } - else if ("gg" == truncatedCommandSwitch) - { - utilMutator.GenerateGuids = true; - } - else if ("g1" == truncatedCommandSwitch) - { - utilMutator.GuidFormat = "D"; - } - else if ("ke" == truncatedCommandSwitch) - { - if (harvesterExtension is DirectoryHarvester) - { - ((DirectoryHarvester)harvesterExtension).KeepEmptyDirectories = true; - } - else if (active) - { - // TODO: error message - not applicable to file harvester - } - } - else if ("scom" == truncatedCommandSwitch) - { - if (active) - { - utilFinalizeHarvesterMutator.SuppressCOMElements = true; - } - else - { - // TODO: error message - not applicable - } - } - else if ("svb6" == truncatedCommandSwitch) - { - if (active) - { - utilFinalizeHarvesterMutator.SuppressVB6COMElements = true; - } - else - { - // TODO: error message - not applicable - } - } - else if ("sfrag" == truncatedCommandSwitch) - { - utilMutator.CreateFragments = false; - } - else if ("srd" == truncatedCommandSwitch) - { - if (harvesterExtension is DirectoryHarvester) - { - ((DirectoryHarvester)harvesterExtension).SuppressRootDirectory = true; - } - else if (harvesterExtension is FileHarvester) - { - ((FileHarvester)harvesterExtension).SuppressRootDirectory = true; - } - } - else if ("sreg" == truncatedCommandSwitch) - { - suppressHarvestingRegistryValues = true; - } - else if ("suid" == truncatedCommandSwitch) - { - utilMutator.SetUniqueIdentifiers = false; - - if (harvesterExtension is DirectoryHarvester) - { - ((DirectoryHarvester)harvesterExtension).SetUniqueIdentifiers = false; - } - else if (harvesterExtension is FileHarvester) - { - ((FileHarvester)harvesterExtension).SetUniqueIdentifiers = false; - } - } - else if (truncatedCommandSwitch.StartsWith("t:", StringComparison.Ordinal) || "t" == truncatedCommandSwitch) - { - string xslFile; - if (truncatedCommandSwitch.StartsWith("t:", StringComparison.Ordinal)) - { - this.Core.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("t:", "t")); - xslFile = truncatedCommandSwitch.Substring(2); - } - else - { - xslFile = this.GetArgumentParameter(args, i, true); - } - - if (0 <= xslFile.IndexOf('\"')) - { - this.Core.Messaging.Write(ErrorMessages.PathCannotContainQuote(xslFile)); - return; - } - - try - { - xslFile = Path.GetFullPath(xslFile); - } - catch (Exception e) - { - this.Core.Messaging.Write(ErrorMessages.InvalidCommandLineFileName(xslFile, e.Message)); - return; - } - - transformMutators.Add(new UtilTransformMutator(xslFile, transformMutators.Count)); - } - else if (truncatedCommandSwitch.StartsWith("template:", StringComparison.Ordinal) || "template" == truncatedCommandSwitch) - { - string template; - if(truncatedCommandSwitch.StartsWith("template:", StringComparison.Ordinal)) - { - this.Core.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("template:", "template")); - template = truncatedCommandSwitch.Substring(9); - } - else - { - template = this.GetArgumentParameter(args, i); - } - - switch (template) - { - case "fragment": - utilMutator.TemplateType = TemplateType.Fragment; - break; - case "module": - utilMutator.TemplateType = TemplateType.Module; - break; - case "product": - utilMutator.TemplateType = TemplateType.Package ; - break; - default: - // TODO: error - break; - } - } - else if ("var" == truncatedCommandSwitch) - { - if (active) - { - utilFinalizeHarvesterMutator.PreprocessorVariable = this.GetArgumentParameter(args, i); - - if (this.Core.Messaging.EncounteredError) - { - return; - } - } - } - else if ("generate" == truncatedCommandSwitch) - { - if (harvesterExtension is DirectoryHarvester) - { - string genType = this.GetArgumentParameter(args, i).ToUpperInvariant(); - switch (genType) - { - case "COMPONENTS": - generateType = GenerateType.Components; - break; - case "PAYLOADGROUP": - generateType = GenerateType.PayloadGroup; - break; - default: - throw new WixException(HarvesterErrors.InvalidDirectoryOutputType(genType)); - } - } - else - { - // TODO: error message - not applicable - } - } - } - } - - // set the appropriate harvester extension - if (active) - { - this.Core.Harvester.Extension = harvesterExtension; - - if (!suppressHarvestingRegistryValues) - { - this.Core.Mutator.AddExtension(new UtilHarvesterMutator()); - } - - this.Core.Mutator.AddExtension(utilFinalizeHarvesterMutator); - - if (harvesterExtension is DirectoryHarvester directoryHarvester) - { - directoryHarvester.GenerateType = generateType; - this.Core.Harvester.Core.RootDirectory = this.Core.Harvester.Core.ExtensionArgument; - } - else if (harvesterExtension is FileHarvester) - { - if (((FileHarvester)harvesterExtension).SuppressRootDirectory) - { - this.Core.Harvester.Core.RootDirectory = Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument)); - } - else - { - this.Core.Harvester.Core.RootDirectory = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument))); - - // GetDirectoryName() returns null for root paths such as "c:\", so make sure to support that as well - if (null == this.Core.Harvester.Core.RootDirectory) - { - this.Core.Harvester.Core.RootDirectory = Path.GetPathRoot(Path.GetDirectoryName(Path.GetFullPath(this.Core.Harvester.Core.ExtensionArgument))); - } - } - } - } - - // set the mutator - this.Core.Mutator.AddExtension(utilMutator); - - // add the transforms - foreach (UtilTransformMutator transformMutator in transformMutators) - { - this.Core.Mutator.AddExtension(transformMutator); - } - } - - private string GetArgumentParameter(string[] args, int index) - { - return this.GetArgumentParameter(args, index, false); - } - - private string GetArgumentParameter(string[] args, int index, bool allowSpaces) - { - string truncatedCommandSwitch = args[index]; - string commandSwitchValue = args[index + 1]; - - //increment the index to the switch value - index++; - - if (IsValidArg(args, index) && !String.IsNullOrEmpty(commandSwitchValue.Trim())) - { - if (!allowSpaces && commandSwitchValue.Contains(" ")) - { - this.Core.Messaging.Write(HarvesterErrors.SpacesNotAllowedInArgumentValue(truncatedCommandSwitch, commandSwitchValue)); - } - else - { - return commandSwitchValue; - } - } - else - { - this.Core.Messaging.Write(HarvesterErrors.ArgumentRequiresValue(truncatedCommandSwitch)); - } - - return null; - } - } -} diff --git a/src/wix/heat/UtilMutator.cs b/src/wix/heat/UtilMutator.cs deleted file mode 100644 index 0bc15cd6..00000000 --- a/src/wix/heat/UtilMutator.cs +++ /dev/null @@ -1,633 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections; - using System.Diagnostics; - using System.Globalization; - using System.IO; - using WixToolset.Harvesters.Extensibility; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// The template type. - /// - public enum TemplateType - { - /// - /// A fragment template. - /// - Fragment, - - /// - /// A module template. - /// - Module, - - /// - /// A product template. - /// - Package - } - - /// - /// The mutator for the WiX Toolset Internet Information Services Extension. - /// - public sealed class UtilMutator : BaseMutatorExtension - { - private ArrayList components; - private ArrayList componentGroups; - private string componentGroupName; - private bool createFragments; - private ArrayList directories; - private ArrayList directoryRefs; - private ArrayList files; - private ArrayList features; - private SortedList fragments; - private bool autogenerateGuids; - private bool generateGuids; - private string guidFormat = "B"; // Defaults to guid in {} - private Wix.IParentElement rootElement; - private bool setUniqueIdentifiers; - private TemplateType templateType; - - /// - /// Instantiate a new UtilMutator. - /// - public UtilMutator() - { - this.components = new ArrayList(); - this.componentGroups = new ArrayList(); - this.directories = new ArrayList(); - this.directoryRefs = new ArrayList(); - this.features = new ArrayList(); - this.files = new ArrayList(); - this.fragments = new SortedList(); - } - - /// - /// Gets or sets the value of the component group name. - /// - /// The component group name. - public string ComponentGroupName - { - get { return this.componentGroupName; } - set { this.componentGroupName = value; } - } - - /// - /// Gets or sets the option to create fragments. - /// - /// The option to create fragments. - public bool CreateFragments - { - get { return this.createFragments; } - set { this.createFragments = value; } - } - - /// - /// Gets or sets the option to autogenerate component guids at compile time. - /// - /// The option to autogenerate component guids. - public bool AutogenerateGuids - { - get { return this.autogenerateGuids; } - set { this.autogenerateGuids = value; } - } - - /// - /// Gets or sets the option to generate missing guids. - /// - /// The option to generate missing guids. - public bool GenerateGuids - { - get { return this.generateGuids; } - set { this.generateGuids = value; } - } - - /// - /// Gets or sets the option to set the format of guids. - /// D - 32 digits separated by hyphens: - /// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - /// B - 32 digits separated by hyphens, enclosed in brackets: - /// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} - /// - /// Guid format either B or D. - public string GuidFormat - { - get { return this.guidFormat; } - set { this.guidFormat = value; } - } - - /// - /// Gets the sequence of the extension. - /// - /// The sequence of the extension. - public override int Sequence - { - get { return 1000; } - } - - /// - /// Gets of sets the option to set unique identifiers. - /// - /// The option to set unique identifiers. - public bool SetUniqueIdentifiers - { - get { return this.setUniqueIdentifiers; } - set { this.setUniqueIdentifiers = value; } - } - - /// - /// Gets or sets the template type. - /// - /// The template type. - public TemplateType TemplateType - { - get { return this.templateType; } - set { this.templateType = value; } - } - - /// - /// Mutate a WiX document. - /// - /// The Wix document element. - public override void Mutate(Wix.Wix wix) - { - this.components.Clear(); - this.directories.Clear(); - this.directoryRefs.Clear(); - this.features.Clear(); - this.files.Clear(); - this.fragments.Clear(); - this.rootElement = null; - - // index elements in this wix document - this.IndexElement(wix); - - this.MutateWix(wix); - - this.MutateFiles(); - - this.MutateDirectories(); - - this.MutateComponents(); - - if (null != this.componentGroupName) - { - this.CreateComponentGroup(wix); - } - - // add the components to the product feature after all the identifiers have been set - if (TemplateType.Package == this.templateType) - { - Wix.Feature feature = (Wix.Feature)this.features[0]; - - foreach (Wix.ComponentGroup group in this.componentGroups) - { - Wix.ComponentGroupRef componentGroupRef = new Wix.ComponentGroupRef(); - componentGroupRef.Id = group.Id; - - feature.AddChild(componentGroupRef); - } - } - else if (TemplateType.Module == this.templateType) - { - foreach (Wix.ISchemaElement element in wix.Children) - { - if (element is Wix.Module) - { - foreach (Wix.ComponentGroup group in this.componentGroups) - { - Wix.ComponentGroupRef componentGroupRef = new Wix.ComponentGroupRef(); - componentGroupRef.Id = group.Id; - - ((Wix.IParentElement)element).AddChild(componentGroupRef); - } - break; - } - } - } - - //if(!this.createFragments && TemplateType.Package - foreach (Wix.Fragment fragment in this.fragments.Values) - { - wix.AddChild(fragment); - } - } - - /// - /// Creates a component group with a given name. - /// - /// The Wix document element. - private void CreateComponentGroup(Wix.Wix wix) - { - Wix.ComponentGroup componentGroup = new Wix.ComponentGroup(); - componentGroup.Id = this.componentGroupName; - this.componentGroups.Add(componentGroup); - - Wix.Fragment cgFragment = new Wix.Fragment(); - cgFragment.AddChild(componentGroup); - wix.AddChild(cgFragment); - - int componentCount = 0; - for (; componentCount < this.components.Count; componentCount++) - { - Wix.Component c = this.components[componentCount] as Wix.Component; - - if (this.createFragments) - { - if (c.ParentElement is Wix.Directory) - { - Wix.Directory parentDirectory = c.ParentElement as Wix.Directory; - - componentGroup.AddChild(c); - c.Directory = parentDirectory.Id; - parentDirectory.RemoveChild(c); - } - else if (c.ParentElement is Wix.DirectoryRef) - { - Wix.DirectoryRef parentDirectory = c.ParentElement as Wix.DirectoryRef; - - componentGroup.AddChild(c); - c.Directory = parentDirectory.Id; - parentDirectory.RemoveChild(c); - - // Remove whole fragment if moving the component to the component group just leaves an empty DirectoryRef - if (0 < this.fragments.Count && parentDirectory.ParentElement is Wix.Fragment) - { - Wix.Fragment parentFragment = parentDirectory.ParentElement as Wix.Fragment; - int childCount = 0; - foreach (Wix.ISchemaElement element in parentFragment.Children) - { - childCount++; - } - - // 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. - if (1 == childCount && !String.IsNullOrEmpty(c.Id)) - { - int removeIndex = this.fragments.IndexOfKey(String.Concat("Component:", c.Id)); - if (0 <= removeIndex) - { - this.fragments.RemoveAt(removeIndex); - } - } - } - } - } - else - { - Wix.ComponentRef componentRef = new Wix.ComponentRef(); - componentRef.Id = c.Id; - componentGroup.AddChild(componentRef); - } - } - } - - /// - /// Index an element. - /// - /// The element to index. - private void IndexElement(Wix.ISchemaElement element) - { - if (element is Wix.Component) - { - this.components.Add(element); - } - else if (element is Wix.ComponentGroup) - { - this.componentGroups.Add(element); - } - else if (element is Wix.Directory) - { - this.directories.Add(element); - } - else if (element is Wix.DirectoryRef) - { - this.directoryRefs.Add(element); - } - else if (element is Wix.Feature) - { - this.features.Add(element); - } - else if (element is Wix.File) - { - this.files.Add(element); - } - else if (element is Wix.Module || element is Wix.PatchCreation || element is Wix.Package) - { - Debug.Assert(null == this.rootElement); - this.rootElement = (Wix.IParentElement)element; - } - - // index the child elements - if (element is Wix.IParentElement) - { - foreach (Wix.ISchemaElement childElement in ((Wix.IParentElement)element).Children) - { - this.IndexElement(childElement); - } - } - } - - /// - /// Mutate the components. - /// - private void MutateComponents() - { - IdentifierGenerator identifierGenerator = new IdentifierGenerator("Component", this.Core); - if (TemplateType.Module == this.templateType) - { - identifierGenerator.MaxIdentifierLength = IdentifierGenerator.MaxModuleIdentifierLength; - } - - foreach (Wix.Component component in this.components) - { - if (null == component.Id) - { - string firstFileId = string.Empty; - - // attempt to create a possible identifier from the first file identifier in the component - foreach (Wix.File file in component[typeof(Wix.File)]) - { - firstFileId = file.Id; - break; - } - - if (string.IsNullOrEmpty(firstFileId)) - { - firstFileId = this.GetGuid(); - } - - component.Id = identifierGenerator.GetIdentifier(firstFileId); - } - - if (null == component.Guid) - { - if (this.AutogenerateGuids) - { - component.Guid = "*"; - } - else - { - component.Guid = this.GetGuid(); - } - } - - if (this.createFragments && component.ParentElement is Wix.Directory) - { - Wix.Directory directory = (Wix.Directory)component.ParentElement; - - // parent directory must have an identifier to create a reference to it - if (null == directory.Id) - { - break; - } - - if (this.rootElement is Wix.Module) - { - // add a ComponentRef for the Component - Wix.ComponentRef componentRef = new Wix.ComponentRef(); - componentRef.Id = component.Id; - this.rootElement.AddChild(componentRef); - } - - // create a new Fragment - Wix.Fragment fragment = new Wix.Fragment(); - this.fragments.Add(String.Concat("Component:", (null != component.Id ? component.Id : this.fragments.Count.ToString())), fragment); - - // create a new DirectoryRef - Wix.DirectoryRef directoryRef = new Wix.DirectoryRef(); - directoryRef.Id = directory.Id; - fragment.AddChild(directoryRef); - - // move the Component from the the Directory to the DirectoryRef - directory.RemoveChild(component); - directoryRef.AddChild(component); - } - } - } - - /// - /// Mutate the directories. - /// - private void MutateDirectories() - { - if (!this.setUniqueIdentifiers) - { - // assign all identifiers before fragmenting (because fragmenting requires them all to be present) - IdentifierGenerator identifierGenerator = new IdentifierGenerator("Directory", this.Core); - if (TemplateType.Module == this.templateType) - { - identifierGenerator.MaxIdentifierLength = IdentifierGenerator.MaxModuleIdentifierLength; - } - - foreach (Wix.Directory directory in this.directories) - { - if (null == directory.Id) - { - directory.Id = identifierGenerator.GetIdentifier(directory.Name); - } - } - } - - if (this.createFragments) - { - foreach (Wix.Directory directory in this.directories) - { - if (directory.ParentElement is Wix.Directory) - { - Wix.Directory parentDirectory = (Wix.Directory)directory.ParentElement; - - // parent directory must have an identifier to create a reference to it - if (null == parentDirectory.Id) - { - return; - } - - // create a new Fragment - Wix.Fragment fragment = new Wix.Fragment(); - this.fragments.Add(String.Concat("Directory:", ("TARGETDIR" == directory.Id ? null : (null != directory.Id ? directory.Id : this.fragments.Count.ToString()))), fragment); - - // create a new DirectoryRef - Wix.DirectoryRef directoryRef = new Wix.DirectoryRef(); - directoryRef.Id = parentDirectory.Id; - fragment.AddChild(directoryRef); - - // move the Directory from the parent Directory to DirectoryRef - parentDirectory.RemoveChild(directory); - directoryRef.AddChild(directory); - } - else if (directory.ParentElement is Wix.Fragment) - { - // When creating fragments, remove any top-level Directory elements; - // the fragments should be pulled in by their DirectoryRefs instead. - Wix.Fragment parent = (Wix.Fragment)directory.ParentElement; - parent.RemoveChild(directory); - - // Remove the fragment if it is empty. - if (parent.Children.GetEnumerator().Current == null && parent.ParentElement != null) - { - ((Wix.IParentElement)parent.ParentElement).RemoveChild(parent); - } - } - else if (directory.ParentElement == this.rootElement) - { - // create a new Fragment - Wix.Fragment fragment = new Wix.Fragment(); - this.fragments.Add(String.Concat("Directory:", ("TARGETDIR" == directory.Id ? null : (null != directory.Id ? directory.Id : this.fragments.Count.ToString()))), fragment); - - // move the Directory from the root element to the Fragment - this.rootElement.RemoveChild(directory); - fragment.AddChild(directory); - } - } - } - } - - /// - /// Mutate the files. - /// - private void MutateFiles() - { - IdentifierGenerator identifierGenerator = new IdentifierGenerator("File", this.Core); - if (TemplateType.Module == this.templateType) - { - identifierGenerator.MaxIdentifierLength = IdentifierGenerator.MaxModuleIdentifierLength; - } - - foreach (Wix.File file in this.files) - { - if (null == file.Id) - { - file.Id = identifierGenerator.GetIdentifier(Path.GetFileName(file.Source)); - } - } - } - - /// - /// Mutate a Wix element. - /// - /// The Wix element to mutate. - private void MutateWix(Wix.Wix wix) - { - if (TemplateType.Fragment != this.templateType) - { - if (null != this.rootElement || 0 != this.features.Count) - { - throw new Exception("The template option cannot be used with Feature, Package, or Module elements present."); - } - - // create a package element although it won't always be used - Wix.SummaryInformation package = new Wix.SummaryInformation(); - if (TemplateType.Module == this.templateType) - { - package.Id = this.GetGuid(); - } - else - { - package.Compressed = Wix.YesNoType.yes; - } - - package.InstallerVersion = 200; - - Wix.Directory targetDir = new Wix.Directory(); - targetDir.Id = "TARGETDIR"; - targetDir.Name = "SourceDir"; - - foreach (Wix.DirectoryRef directoryRef in this.directoryRefs) - { - if (String.Equals(directoryRef.Id, "TARGETDIR", StringComparison.OrdinalIgnoreCase)) - { - Wix.IParentElement parent = directoryRef.ParentElement as Wix.IParentElement; - - foreach (Wix.ISchemaElement element in directoryRef.Children) - { - targetDir.AddChild(element); - } - - parent.RemoveChild(directoryRef); - - if (null != ((Wix.ISchemaElement)parent).ParentElement) - { - int i = 0; - - foreach (Wix.ISchemaElement element in parent.Children) - { - i++; - } - - if (0 == i) - { - Wix.IParentElement supParent = (Wix.IParentElement)((Wix.ISchemaElement)parent).ParentElement; - supParent.RemoveChild((Wix.ISchemaElement)parent); - } - } - - break; - } - } - - if (TemplateType.Module == this.templateType) - { - Wix.Module module = new Wix.Module(); - module.Id = "PUT-MODULE-NAME-HERE"; - module.Language = "1033"; - module.Version = "1.0.0.0"; - - package.Manufacturer = "PUT-COMPANY-NAME-HERE"; - module.AddChild(package); - module.AddChild(targetDir); - - wix.AddChild(module); - this.rootElement = module; - } - else // product - { - Wix.Package product = new Wix.Package(); - product.Id = this.GetGuid(); - product.Language = "1033"; - product.Manufacturer = "PUT-COMPANY-NAME-HERE"; - product.Name = "PUT-PRODUCT-NAME-HERE"; - product.UpgradeCode = this.GetGuid(); - product.Version = "1.0.0.0"; - product.AddChild(package); - product.AddChild(targetDir); - - Wix.Media media = new Wix.Media(); - media.Id = "1"; - media.Cabinet = "product.cab"; - media.EmbedCab = Wix.YesNoType.yes; - product.AddChild(media); - - Wix.Feature feature = new Wix.Feature(); - feature.Id = "ProductFeature"; - feature.Title = "PUT-FEATURE-TITLE-HERE"; - feature.Level = 1; - product.AddChild(feature); - this.features.Add(feature); - - wix.AddChild(product); - this.rootElement = product; - } - } - } - - /// - /// Get a generated guid or a placeholder for a guid. - /// - /// A generated guid or placeholder. - private string GetGuid() - { - if (this.generateGuids) - { - return Guid.NewGuid().ToString(this.guidFormat, CultureInfo.InvariantCulture).ToUpper(CultureInfo.InvariantCulture); - } - else - { - return "PUT-GUID-HERE"; - } - } - } -} diff --git a/src/wix/heat/UtilTransformMutator.cs b/src/wix/heat/UtilTransformMutator.cs deleted file mode 100644 index 2d3f2bb0..00000000 --- a/src/wix/heat/UtilTransformMutator.cs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.IO; - using System.Xml; - using System.Xml.Xsl; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - - public sealed class UtilTransformMutator : BaseMutatorExtension - { - private string transform; - private int transformSequence; - - /// - /// Instantiate a new UtilTransformMutator. - /// - /// Path to the XSL transform file. - /// Order in which the transform should be applied, - /// relative to other transforms. - public UtilTransformMutator(string transform, int transformSequence) - { - this.transform = transform; - this.transformSequence = transformSequence; - } - - /// - /// Gets the sequence of the extension. - /// - /// The sequence of the extension. - public override int Sequence - { - get { return 3000 + this.transformSequence; } - } - - /// - /// Mutate a WiX document as a string. - /// - /// The Wix document element as a string. - /// The mutated Wix document as a string. - public override string Mutate(string wixString) - { - try - { - XslCompiledTransform xslt = new XslCompiledTransform(); - xslt.Load(this.transform, XsltSettings.TrustedXslt, new XmlUrlResolver()); - - using (XmlTextReader xmlReader = new XmlTextReader(new StringReader(wixString))) - { - using (StringWriter stringWriter = new StringWriter()) - { - XmlWriterSettings xmlSettings = new XmlWriterSettings(); - xmlSettings.Indent = true; - xmlSettings.IndentChars = " "; - xmlSettings.OmitXmlDeclaration = true; - - using (XmlWriter xmlWriter = XmlWriter.Create(stringWriter, xmlSettings)) - { - xslt.Transform(xmlReader, xmlWriter); - } - - wixString = stringWriter.ToString(); - } - } - } - catch (Exception ex) - { - this.Core.Messaging.Write(HarvesterErrors.ErrorTransformingHarvestedWiX(this.transform, ex.Message)); - return null; - } - - return wixString; - } - } -} diff --git a/src/wix/heat/VSHeatExtension.cs b/src/wix/heat/VSHeatExtension.cs deleted file mode 100644 index d31cd25a..00000000 --- a/src/wix/heat/VSHeatExtension.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.Collections; - using WixToolset.Data; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - - /// - /// Defines generated element types. - /// - public enum GenerateType - { - /// Generate Components. - Components, - - /// Generate a Container with Payloads. - Container, - - /// Generate a Bundle PackageGroups. - PackageGroup, - - /// Generate a PayloadGroup with Payloads. - PayloadGroup, - } - - /// - /// VS-related extensions for the WiX Toolset Harvester application. - /// - public sealed class VSHeatExtension : BaseHeatExtension - { - /// - /// Gets the supported command line types for this extension. - /// - /// The supported command line types for this extension. - public override HeatCommandLineOption[] CommandLineTypes - { - get - { - return new HeatCommandLineOption[] - { - new HeatCommandLineOption("project", "harvest outputs of a VS project"), - new HeatCommandLineOption("-configuration", "configuration to set when harvesting the project"), - new HeatCommandLineOption("-directoryid", "overridden directory id for generated directory elements"), - new HeatCommandLineOption("-generate", Environment.NewLine + - " specify what elements to generate, one of:" + Environment.NewLine + - " components, container, payloadgroup, packagegroup" + Environment.NewLine + - " (default is components)"), - new HeatCommandLineOption("-msbuildbinpath", "msbuild bin directory path"), - new HeatCommandLineOption("-platform", "platform to set when harvesting the project"), - new HeatCommandLineOption("-pog", Environment.NewLine + - " specify output group of VS project, one of:" + Environment.NewLine + - " " + String.Join(",", VSProjectHarvester.GetOutputGroupNames()) + Environment.NewLine + - " This option may be repeated for multiple output groups."), - new HeatCommandLineOption("-projectname", "overridden project name to use in variables"), - new HeatCommandLineOption("-usetoolsversion", "ignore msbuildbinpath if project specifies known msbuild version"), - new HeatCommandLineOption("-wixvar", "generate binder variables instead of preprocessor variables"), - }; - } - } - - /// - /// Parse the command line options for this extension. - /// - /// The active harvester type. - /// The option arguments. - public override void ParseOptions(string type, string[] args) - { - if ("project" == type) - { - string[] allOutputGroups = VSProjectHarvester.GetOutputGroupNames(); - bool suppressUniqueId = false; - bool generateWixVars = false; - bool useToolsVersion = false; - GenerateType generateType = GenerateType.Components; - string directoryIds = null; - string msbuildBinPath = null; - string projectName = null; - string configuration = null; - string platform = null; - ArrayList outputGroups = new ArrayList(); - - for (int i = 0; i < args.Length; i++) - { - if ("-configuration" == args[i]) - { - configuration = args[++i]; - } - else if ("-directoryid" == args[i]) - { - if (!IsValidArg(args, ++i)) - { - throw new WixException(HarvesterErrors.InvalidDirectoryId(args[i])); - } - - directoryIds = args[i]; - } - else if ("-generate" == args[i]) - { - if (!IsValidArg(args, ++i)) - { - throw new WixException(HarvesterErrors.InvalidProjectOutputType(args[i])); - } - - string genType = args[i].ToUpperInvariant(); - switch(genType) - { - case "CONTAINER": - generateType = GenerateType.Container; - break; - case "COMPONENTS": - generateType = GenerateType.Components; - break; - case "PACKAGEGROUP": - generateType = GenerateType.PackageGroup; - break; - case "PAYLOADGROUP": - generateType = GenerateType.PayloadGroup; - break; - default: - throw new WixException(HarvesterErrors.InvalidProjectOutputType(genType)); - } - } - else if ("-msbuildbinpath" == args[i]) - { - if (!IsValidArg(args, ++i)) - { - throw new WixException(HarvesterErrors.ArgumentRequiresValue(args[i-1])); - } - - msbuildBinPath = args[i]; - } - else if ("-platform" == args[i]) - { - platform = args[++i]; - } - else if ("-pog" == args[i]) - { - if (!IsValidArg(args, ++i)) - { - throw new WixException(HarvesterErrors.InvalidOutputGroup(args[i])); - } - - string pogName = args[i]; - bool found = false; - foreach (string availableOutputGroup in allOutputGroups) - { - if (String.Equals(pogName, availableOutputGroup, StringComparison.Ordinal)) - { - outputGroups.Add(availableOutputGroup); - found = true; - break; - } - } - - if (!found) - { - throw new WixException(HarvesterErrors.InvalidOutputGroup(pogName)); - } - } - else if (args[i].StartsWith("-pog:", StringComparison.Ordinal)) - { - this.Core.Messaging.Write(WarningMessages.DeprecatedCommandLineSwitch("pog:", "pog")); - - string pogName = args[i].Substring(5); - bool found = false; - foreach (string availableOutputGroup in allOutputGroups) - { - if (String.Equals(pogName, availableOutputGroup, StringComparison.Ordinal)) - { - outputGroups.Add(availableOutputGroup); - found = true; - break; - } - } - - if (!found) - { - throw new WixException(HarvesterErrors.InvalidOutputGroup(pogName)); - } - } - else if ("-projectname" == args[i]) - { - if (!IsValidArg(args, ++i)) - { - throw new WixException(HarvesterErrors.InvalidProjectName(args[i])); - } - - projectName = args[i]; - } - else if ("-suid" == args[i]) - { - suppressUniqueId = true; - } - else if ("-usetoolsversion" == args[i]) - { - useToolsVersion = true; - } - else if ("-wixvar" == args[i]) - { - generateWixVars = true; - } - } - - if (outputGroups.Count == 0) - { - throw new WixException(HarvesterErrors.NoOutputGroupSpecified()); - } - - VSProjectHarvester harvester = new VSProjectHarvester( - (string[]) outputGroups.ToArray(typeof(string))); - - harvester.SetUniqueIdentifiers = !suppressUniqueId; - harvester.GenerateWixVars = generateWixVars; - harvester.GenerateType = generateType; - harvester.DirectoryIds = directoryIds; - harvester.MsbuildBinPath = msbuildBinPath; - harvester.ProjectName = projectName; - harvester.Configuration = configuration; - harvester.Platform = platform; - harvester.UseToolsVersion = String.IsNullOrEmpty(msbuildBinPath) || useToolsVersion; - - this.Core.Harvester.Extension = harvester; - } - } - } -} diff --git a/src/wix/heat/VSProjectHarvester.cs b/src/wix/heat/VSProjectHarvester.cs deleted file mode 100644 index 93b20cd8..00000000 --- a/src/wix/heat/VSProjectHarvester.cs +++ /dev/null @@ -1,1455 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolset.Harvesters -{ - using System; - using System.IO; - using System.Reflection; - using System.Collections; - using System.Collections.Generic; - using System.Globalization; - using System.Text.RegularExpressions; - using System.Xml; - using WixToolset.Data; - using WixToolset.Extensibility.Services; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - using Wix = WixToolset.Harvesters.Serialize; - - /// - /// Harvest WiX authoring for the outputs of a VS project. - /// - public sealed class VSProjectHarvester : BaseHarvesterExtension - { - // These format strings are used for generated element identifiers. - // {0} = project name - // {1} = POG name - // {2} = file name - private const string DirectoryIdFormat = "{0}.{1}"; - private const string ComponentIdFormat = "{0}.{1}.{2}"; - private const string FileIdFormat = "{0}.{1}.{2}"; - private const string VariableFormat = "$(var.{0}.{1})"; - private const string WixVariableFormat = "!(wix.{0}.{1})"; - - private const string ComponentPrefix = "cmp"; - private const string DirectoryPrefix = "dir"; - private const string FilePrefix = "fil"; - - private string projectGUID; - private string directoryIds; - private string directoryRefSeed; - private string projectName; - private string configuration; - private string platform; - private bool setUniqueIdentifiers; - private GenerateType generateType; - private bool generateWixVars; - - - private static readonly ProjectOutputGroup[] allOutputGroups = new ProjectOutputGroup[] - { - new ProjectOutputGroup("Binaries", "BuiltProjectOutputGroup", "TargetDir"), - new ProjectOutputGroup("Symbols", "DebugSymbolsProjectOutputGroup", "TargetDir"), - new ProjectOutputGroup("Documents", "DocumentationProjectOutputGroup", "ProjectDir"), - new ProjectOutputGroup("Satellites", "SatelliteDllsProjectOutputGroup", "TargetDir"), - new ProjectOutputGroup("Sources", "SourceFilesProjectOutputGroup", "ProjectDir"), - new ProjectOutputGroup("Content", "ContentFilesProjectOutputGroup", "ProjectDir"), - }; - - private string[] outputGroups; - - /// - /// Instantiate a new VSProjectHarvester. - /// - /// List of project output groups to harvest. - public VSProjectHarvester(string[] outputGroups) - { - if (outputGroups == null) - { - throw new ArgumentNullException("outputGroups"); - } - - this.outputGroups = outputGroups; - } - - /// - /// Gets or sets the configuration to set when harvesting. - /// - /// The configuration to set when harvesting. - public string Configuration - { - get { return this.configuration; } - set { this.configuration = value; } - } - - public string DirectoryIds - { - get { return this.directoryIds; } - set { this.directoryIds = value; } - } - - /// - /// Gets or sets what type of elements are to be generated. - /// - /// The type of elements being generated. - public GenerateType GenerateType - { - get { return this.generateType; } - set { this.generateType = value; } - } - - /// - /// Gets or sets whether or not to use wix variables. - /// - /// Whether or not to use wix variables. - public bool GenerateWixVars - { - get { return this.generateWixVars; } - set { this.generateWixVars = value; } - } - - /// - /// Gets or sets the location to load MSBuild from. - /// - public string MsbuildBinPath { get; set; } - - /// - /// Gets or sets the platform to set when harvesting. - /// - /// The platform to set when harvesting. - public string Platform - { - get { return this.platform; } - set { this.platform = value; } - } - - /// - /// Gets or sets the project name to use in wix variables. - /// - /// The project name to use in wix variables. - public string ProjectName - { - get { return this.projectName; } - set { this.projectName = value; } - } - - /// - /// Gets or sets the option to set unique identifiers. - /// - /// The option to set unique identifiers. - public bool SetUniqueIdentifiers - { - get { return this.setUniqueIdentifiers; } - set { this.setUniqueIdentifiers = value; } - } - - /// - /// Gets or sets whether to ignore MsbuildBinPath when the project file specifies a known MSBuild version. - /// - public bool UseToolsVersion { get; set; } - - /// - /// Gets a list of friendly output group names that will be recognized on the command-line. - /// - /// Array of output group names. - public static string[] GetOutputGroupNames() - { - string[] names = new string[VSProjectHarvester.allOutputGroups.Length]; - for (int i = 0; i < names.Length; i++) - { - names[i] = VSProjectHarvester.allOutputGroups[i].Name; - } - return names; - } - - /// - /// Harvest a VS project. - /// - /// The path of the VS project file. - /// The harvested directory. - public override Wix.Fragment[] Harvest(string argument) - { - if (null == argument) - { - throw new ArgumentNullException("argument"); - } - - if (!System.IO.File.Exists(argument)) - { - throw new FileNotFoundException(argument); - } - - // Match specified output group names to available POG structures - // and collect list of build output groups to pass to MSBuild. - ProjectOutputGroup[] pogs = new ProjectOutputGroup[this.outputGroups.Length]; - string[] buildOutputGroups = new string[this.outputGroups.Length]; - for (int i = 0; i < this.outputGroups.Length; i++) - { - foreach (ProjectOutputGroup pog in VSProjectHarvester.allOutputGroups) - { - if (pog.Name == this.outputGroups[i]) - { - pogs[i] = pog; - buildOutputGroups[i] = pog.BuildOutputGroup; - } - } - - if (buildOutputGroups[i] == null) - { - throw new WixException(HarvesterErrors.InvalidOutputGroup(this.outputGroups[i])); - } - } - - string projectFile = Path.GetFullPath(argument); - - IDictionary buildOutputs = this.GetProjectBuildOutputs(projectFile, buildOutputGroups); - - ArrayList fragmentList = new ArrayList(); - - for (int i = 0; i < pogs.Length; i++) - { - this.HarvestProjectOutputGroup(projectFile, buildOutputs, pogs[i], fragmentList); - } - - return (Wix.Fragment[]) fragmentList.ToArray(typeof(Wix.Fragment)); - } - - /// - /// Runs MSBuild on a project file to get the list of filenames for the specified output groups. - /// - /// VS MSBuild project file to load. - /// List of MSBuild output group names. - /// Dictionary mapping output group names to lists of filenames in the group. - private IDictionary GetProjectBuildOutputs(string projectFile, string[] buildOutputGroups) - { - MSBuildProject project = this.GetMsbuildProject(projectFile); - - project.Load(projectFile); - - IDictionary buildOutputs = new Hashtable(); - - string originalDirectory = System.IO.Directory.GetCurrentDirectory(); - System.IO.Directory.SetCurrentDirectory(Path.GetDirectoryName(projectFile)); - bool buildSuccess = false; - try - { - buildSuccess = project.Build(projectFile, buildOutputGroups, buildOutputs); - } - finally - { - System.IO.Directory.SetCurrentDirectory(originalDirectory); - } - - if (!buildSuccess) - { - throw new WixException(HarvesterErrors.BuildFailed()); - } - - this.projectGUID = project.GetEvaluatedProperty("ProjectGuid"); - - if (null == this.projectGUID) - { - throw new WixException(HarvesterErrors.BuildFailed()); - } - - IDictionary newDictionary = new Dictionary(); - foreach (string buildOutput in buildOutputs.Keys) - { - IEnumerable buildOutputFiles = buildOutputs[buildOutput] as IEnumerable; - - bool hasFiles = false; - - foreach (object file in buildOutputFiles) - { - hasFiles = true; - break; - } - - // Try the item group if no outputs - if (!hasFiles) - { - IEnumerable itemFiles = project.GetEvaluatedItemsByName(String.Concat(buildOutput, "Output")); - List itemFileList = new List(); - - // Get each BuildItem and add the file path to our list - foreach (object itemFile in itemFiles) - { - itemFileList.Add(project.GetBuildItem(itemFile)); - } - - // Use our list for this build output - newDictionary.Add(buildOutput, itemFileList); - } - else - { - newDictionary.Add(buildOutput, buildOutputFiles); - } - } - - return newDictionary; - } - - /// - /// Creates WiX fragments for files in one output group. - /// - /// VS MSBuild project file. - /// Dictionary of build outputs retrieved from an MSBuild run on the project file. - /// Project output group parameters. - /// List to which generated fragments will be added. - /// Count of harvested files. - private int HarvestProjectOutputGroup(string projectFile, IDictionary buildOutputs, ProjectOutputGroup pog, IList fragmentList) - { - string projectName = Path.GetFileNameWithoutExtension(projectFile); - string projectBaseDir = null; - - if (this.ProjectName != null) - { - projectName = this.ProjectName; - } - - string sanitizedProjectName = this.Core.CreateIdentifierFromFilename(projectName); - - Wix.IParentElement harvestParent; - - if (this.GenerateType == GenerateType.Container) - { - Wix.Container container = new Wix.Container(); - harvestParent = container; - - container.Name = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name); - } - else if (this.GenerateType == GenerateType.PayloadGroup) - { - Wix.PayloadGroup payloadGroup = new Wix.PayloadGroup(); - harvestParent = payloadGroup; - - payloadGroup.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name); - } - else if (this.GenerateType == GenerateType.PackageGroup) - { - Wix.PackageGroup packageGroup = new Wix.PackageGroup(); - harvestParent = packageGroup; - - packageGroup.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name); - } - else - { - Wix.DirectoryRef directoryRef = new Wix.DirectoryRef(); - harvestParent = directoryRef; - - if (!String.IsNullOrEmpty(this.directoryIds)) - { - directoryRef.Id = this.directoryIds; - } - else if (this.setUniqueIdentifiers) - { - directoryRef.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name); - } - else - { - directoryRef.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name)); - } - - this.directoryRefSeed = this.Core.GenerateIdentifier(DirectoryPrefix, this.projectGUID, pog.Name); - } - - IEnumerable pogFiles = buildOutputs[pog.BuildOutputGroup] as IEnumerable; - if (pogFiles == null) - { - throw new WixException(HarvesterErrors.MissingProjectOutputGroup( - projectFile, pog.BuildOutputGroup)); - } - - if (pog.FileSource == "ProjectDir") - { - projectBaseDir = Path.GetDirectoryName(projectFile) + "\\"; - } - - int harvestCount = this.HarvestProjectOutputGroupFiles(projectBaseDir, projectName, pog.Name, pog.FileSource, pogFiles, harvestParent); - - if (this.GenerateType == GenerateType.Container) - { - // harvestParent must be a Container at this point - Wix.Container container = harvestParent as Wix.Container; - - Wix.Fragment fragment = new Wix.Fragment(); - fragment.AddChild(container); - fragmentList.Add(fragment); - } - else if (this.GenerateType == GenerateType.PackageGroup) - { - // harvestParent must be a PackageGroup at this point - Wix.PackageGroup packageGroup = harvestParent as Wix.PackageGroup; - - Wix.Fragment fragment = new Wix.Fragment(); - fragment.AddChild(packageGroup); - fragmentList.Add(fragment); - } - else if (this.GenerateType == GenerateType.PayloadGroup) - { - // harvestParent must be a Container at this point - Wix.PayloadGroup payloadGroup = harvestParent as Wix.PayloadGroup; - - Wix.Fragment fragment = new Wix.Fragment(); - fragment.AddChild(payloadGroup); - fragmentList.Add(fragment); - } - else - { - // harvestParent must be a DirectoryRef at this point - Wix.DirectoryRef directoryRef = harvestParent as Wix.DirectoryRef; - - if (harvestCount > 0) - { - Wix.Fragment drf = new Wix.Fragment(); - drf.AddChild(directoryRef); - fragmentList.Add(drf); - } - - Wix.ComponentGroup cg = new Wix.ComponentGroup(); - - if (this.setUniqueIdentifiers || !String.IsNullOrEmpty(this.directoryIds)) - { - cg.Id = String.Format(CultureInfo.InvariantCulture, DirectoryIdFormat, sanitizedProjectName, pog.Name); - } - else - { - cg.Id = directoryRef.Id; - } - - if (harvestCount > 0) - { - this.AddComponentsToComponentGroup(directoryRef, cg); - } - - Wix.Fragment cgf = new Wix.Fragment(); - cgf.AddChild(cg); - fragmentList.Add(cgf); - } - - return harvestCount; - } - - /// - /// Add all Components in an element tree to a ComponentGroup. - /// - /// Parent of an element tree that will be searched for Components. - /// The ComponentGroup the Components will be added to. - private void AddComponentsToComponentGroup(Wix.IParentElement parent, Wix.ComponentGroup cg) - { - foreach (Wix.ISchemaElement childElement in parent.Children) - { - Wix.Component c = childElement as Wix.Component; - if (c != null) - { - Wix.ComponentRef cr = new Wix.ComponentRef(); - cr.Id = c.Id; - cg.AddChild(cr); - } - else - { - Wix.IParentElement p = childElement as Wix.IParentElement; - if (p != null) - { - this.AddComponentsToComponentGroup(p, cg); - } - } - } - } - - /// - /// Harvest files from one output group of a VS project. - /// - /// The base directory of the files. - /// Name of the project, to be used as a prefix for generated identifiers. - /// Name of the project output group, used for generating identifiers for WiX elements. - /// The ProjectOutputGroup file source. - /// The files from one output group to harvest. - /// The parent element that will contain the components of the harvested files. - /// The number of files harvested. - private int HarvestProjectOutputGroupFiles(string baseDir, string projectName, string pogName, string pogFileSource, IEnumerable outputGroupFiles, Wix.IParentElement parent) - { - int fileCount = 0; - - Wix.ISchemaElement exeFile = null; - Wix.ISchemaElement dllFile = null; - Wix.ISchemaElement appConfigFile = null; - - // Keep track of files inserted - // Files can have different absolute paths but get mapped to the same SourceFile - // after the project variables have been used. For example, a WiX project that - // is building multiple cultures will have many output MSIs/MSMs, but will all get - // mapped to $(var.ProjName.TargetDir)\ProjName.msm. These duplicates would - // prevent generated code from compiling. - Dictionary seenList = new Dictionary(); - - foreach (object output in outputGroupFiles) - { - string filePath = output.ToString(); - string fileName = Path.GetFileName(filePath); - string fileDir = Path.GetDirectoryName(filePath); - string link = null; - - MethodInfo getMetadataMethod = output.GetType().GetMethod("GetMetadata"); - if (getMetadataMethod != null) - { - link = (string)getMetadataMethod.Invoke(output, new object[] { "Link" }); - if (!String.IsNullOrEmpty(link)) - { - fileDir = Path.GetDirectoryName(Path.Combine(baseDir, link)); - } - } - - Wix.IParentElement parentDir = parent; - // Ignore Containers and PayloadGroups because they do not have a nested structure. - if (baseDir != null && !String.Equals(Path.GetDirectoryName(baseDir), fileDir, StringComparison.OrdinalIgnoreCase) - && this.GenerateType != GenerateType.Container && this.GenerateType != GenerateType.PackageGroup && this.GenerateType != GenerateType.PayloadGroup) - { - Uri baseUri = new Uri(baseDir); - Uri relativeUri = baseUri.MakeRelativeUri(new Uri(fileDir)); - parentDir = this.GetSubDirElement(parentDir, relativeUri); - } - - string parentDirId = null; - - if (parentDir is Wix.DirectoryRef) - { - parentDirId = this.directoryRefSeed; - } - else if (parentDir is Wix.Directory) - { - parentDirId = ((Wix.Directory)parentDir).Id; - } - - if (this.GenerateType == GenerateType.Container || this.GenerateType == GenerateType.PayloadGroup) - { - Wix.Payload payload = new Wix.Payload(); - - this.HarvestProjectOutputGroupPayloadFile(baseDir, projectName, pogName, pogFileSource, filePath, fileName, link, parentDir, payload, seenList); - } - else if (this.GenerateType == GenerateType.PackageGroup) - { - this.HarvestProjectOutputGroupPackage(projectName, pogName, pogFileSource, filePath, fileName, link, parentDir, seenList); - } - else - { - Wix.Component component = new Wix.Component(); - Wix.File file = new Wix.File(); - - this.HarvestProjectOutputGroupFile(baseDir, projectName, pogName, pogFileSource, filePath, fileName, link, parentDir, parentDirId, component, file, seenList); - - if (String.Equals(Path.GetExtension(file.Source), ".exe", StringComparison.OrdinalIgnoreCase)) - { - exeFile = file; - } - else if (String.Equals(Path.GetExtension(file.Source), ".dll", StringComparison.OrdinalIgnoreCase)) - { - dllFile = file; - } - else if (file.Source.EndsWith("app.config", StringComparison.OrdinalIgnoreCase)) - { - appConfigFile = file; - } - } - - fileCount++; - } - - // if there was no exe file found fallback on the dll file found - if (exeFile == null && dllFile != null) - { - exeFile = dllFile; - } - - // Special case for the app.config file in the Binaries POG... - // The POG refers to the files in the OBJ directory, while the - // generated WiX code references them in the bin directory. - // The app.config file gets renamed to match the exe name. - if ("Binaries" == pogName && null != exeFile && null != appConfigFile) - { - if (appConfigFile is Wix.File) - { - Wix.File appConfigFileAsWixFile = appConfigFile as Wix.File; - Wix.File exeFileAsWixFile = exeFile as Wix.File; - // Case insensitive replace - appConfigFileAsWixFile.Source = Regex.Replace(appConfigFileAsWixFile.Source, @"app\.config", Path.GetFileName(exeFileAsWixFile.Source) + ".config", RegexOptions.IgnoreCase); - } - } - - return fileCount; - } - - 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 seenList) - { - string varFormat = VariableFormat; - if (this.generateWixVars) - { - varFormat = WixVariableFormat; - } - - if (pogName.Equals("Satellites", StringComparison.OrdinalIgnoreCase)) - { - Wix.Directory locDirectory = new Wix.Directory(); - - locDirectory.Name = Path.GetFileName(Path.GetDirectoryName(Path.GetFullPath(filePath))); - file.Source = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", locDirectory.Name, "\\", Path.GetFileName(filePath)); - - if (!seenList.ContainsKey(file.Source)) - { - parentDir.AddChild(locDirectory); - locDirectory.AddChild(component); - component.AddChild(file); - seenList.Add(file.Source, true); - - if (this.setUniqueIdentifiers) - { - locDirectory.Id = this.Core.GenerateIdentifier(DirectoryPrefix, parentDirId, locDirectory.Name); - file.Id = this.Core.GenerateIdentifier(FilePrefix, locDirectory.Id, fileName); - component.Id = this.Core.GenerateIdentifier(ComponentPrefix, locDirectory.Id, file.Id); - } - else - { - locDirectory.Id = this.Core.CreateIdentifierFromFilename(String.Format(DirectoryIdFormat, (parentDir is Wix.DirectoryRef) ? ((Wix.DirectoryRef)parentDir).Id : parentDirId, locDirectory.Name)); - file.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.FileIdFormat, projectName, pogName, String.Concat(locDirectory.Name, ".", fileName))); - component.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.ComponentIdFormat, projectName, pogName, String.Concat(locDirectory.Name, ".", fileName))); - } - } - } - else - { - file.Source = GenerateSourceFilePath(baseDir, projectName, pogFileSource, filePath, link, varFormat); - - if (!seenList.ContainsKey(file.Source)) - { - component.AddChild(file); - parentDir.AddChild(component); - seenList.Add(file.Source, true); - - if (this.setUniqueIdentifiers) - { - file.Id = this.Core.GenerateIdentifier(FilePrefix, parentDirId, fileName); - component.Id = this.Core.GenerateIdentifier(ComponentPrefix, parentDirId, file.Id); - } - else - { - file.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.FileIdFormat, projectName, pogName, fileName)); - component.Id = this.Core.CreateIdentifierFromFilename(String.Format(CultureInfo.InvariantCulture, VSProjectHarvester.ComponentIdFormat, projectName, pogName, fileName)); - } - } - } - } - - private void HarvestProjectOutputGroupPackage(string projectName, string pogName, string pogFileSource, string filePath, string fileName, string link, Wix.IParentElement parentDir, Dictionary seenList) - { - string varFormat = VariableFormat; - if (this.generateWixVars) - { - varFormat = WixVariableFormat; - } - - if (pogName.Equals("Binaries", StringComparison.OrdinalIgnoreCase)) - { - if (String.Equals(Path.GetExtension(filePath), ".exe", StringComparison.OrdinalIgnoreCase)) - { - Wix.ExePackage exePackage = new Wix.ExePackage(); - exePackage.SourceFile = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", Path.GetFileName(filePath)); - if (!seenList.ContainsKey(exePackage.SourceFile)) - { - parentDir.AddChild(exePackage); - seenList.Add(exePackage.SourceFile, true); - } - } - else if (String.Equals(Path.GetExtension(filePath), ".msi", StringComparison.OrdinalIgnoreCase)) - { - Wix.MsiPackage msiPackage = new Wix.MsiPackage(); - msiPackage.SourceFile = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", Path.GetFileName(filePath)); - if (!seenList.ContainsKey(msiPackage.SourceFile)) - { - parentDir.AddChild(msiPackage); - seenList.Add(msiPackage.SourceFile, true); - } - } - } - } - - private void HarvestProjectOutputGroupPayloadFile(string baseDir, string projectName, string pogName, string pogFileSource, string filePath, string fileName, string link, Wix.IParentElement parentDir, Wix.Payload file, Dictionary seenList) - { - string varFormat = VariableFormat; - if (this.generateWixVars) - { - varFormat = WixVariableFormat; - } - - if (pogName.Equals("Satellites", StringComparison.OrdinalIgnoreCase)) - { - string locDirectoryName = Path.GetFileName(Path.GetDirectoryName(Path.GetFullPath(filePath))); - file.SourceFile = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", locDirectoryName, "\\", Path.GetFileName(filePath)); - - if (!seenList.ContainsKey(file.SourceFile)) - { - parentDir.AddChild(file); - seenList.Add(file.SourceFile, true); - } - } - else - { - file.SourceFile = GenerateSourceFilePath(baseDir, projectName, pogFileSource, filePath, link, varFormat); - - if (!seenList.ContainsKey(file.SourceFile)) - { - parentDir.AddChild(file); - seenList.Add(file.SourceFile, true); - } - } - } - - /// - /// Helper function to generates a source file path when harvesting files. - /// - /// - /// - /// - /// - /// - /// - /// - private static string GenerateSourceFilePath(string baseDir, string projectName, string pogFileSource, string filePath, string link, string varFormat) - { - string ret; - - if (null == baseDir && !String.IsNullOrEmpty(link)) - { - // This needs to be the absolute path as a link can be located anywhere. - ret = filePath; - } - else if (null == baseDir) - { - ret = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", Path.GetFileName(filePath)); - } - else if (filePath.StartsWith(baseDir, StringComparison.OrdinalIgnoreCase)) - { - ret = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", filePath.Substring(baseDir.Length)); - } - else - { - // come up with a relative path to the file - Uri sourcePathUri = new Uri(filePath); - Uri baseDirUri = new Uri(baseDir); - Uri sourceRelativeUri = baseDirUri.MakeRelativeUri(sourcePathUri); - string relativePath = sourceRelativeUri.ToString().Replace('/', Path.DirectorySeparatorChar); - if (!sourceRelativeUri.UserEscaped) - { - relativePath = Uri.UnescapeDataString(relativePath); - } - - ret = String.Concat(String.Format(CultureInfo.InvariantCulture, varFormat, projectName, pogFileSource), "\\", relativePath); - } - - return ret; - } - - /// - /// Gets a Directory element corresponding to a relative subdirectory within the project, - /// either by locating a suitable existing Directory or creating a new one. - /// - /// The parent element which the subdirectory is relative to. - /// Relative path of the subdirectory. - /// Directory element for the relative path. - private Wix.IParentElement GetSubDirElement(Wix.IParentElement parentDir, Uri relativeUri) - { - string[] segments = relativeUri.ToString().Split('\\', '/'); - string firstSubDirName = Uri.UnescapeDataString(segments[0]); - DirectoryAttributeAccessor subDir = null; - - if (String.Equals(firstSubDirName, "..", StringComparison.Ordinal)) - { - return parentDir; - } - - Type directoryType; - Type directoryRefType; - if (parentDir is Wix.Directory || parentDir is Wix.DirectoryRef) - { - directoryType = typeof(Wix.Directory); - directoryRefType = typeof(Wix.DirectoryRef); - } - else - { - throw new ArgumentException("GetSubDirElement parentDir"); - } - - // Search for an existing directory element. - foreach (Wix.ISchemaElement childElement in parentDir.Children) - { - if(VSProjectHarvester.AreTypesEquivalent(childElement.GetType(), directoryType)) - { - DirectoryAttributeAccessor childDir = new DirectoryAttributeAccessor(childElement); - if (String.Equals(childDir.Name, firstSubDirName, StringComparison.OrdinalIgnoreCase)) - { - subDir = childDir; - break; - } - } - } - - if (subDir == null) - { - string parentId = null; - DirectoryAttributeAccessor parentDirectory = null; - DirectoryAttributeAccessor parentDirectoryRef = null; - - if (VSProjectHarvester.AreTypesEquivalent(parentDir.GetType(), directoryType)) - { - parentDirectory = new DirectoryAttributeAccessor((Wix.ISchemaElement)parentDir); - } - else if (VSProjectHarvester.AreTypesEquivalent(parentDir.GetType(), directoryRefType)) - { - parentDirectoryRef = new DirectoryAttributeAccessor((Wix.ISchemaElement)parentDir); - } - - if (parentDirectory != null) - { - parentId = parentDirectory.Id; - } - else if (parentDirectoryRef != null) - { - if (this.setUniqueIdentifiers) - { - //Use the GUID of the project instead of the project name to help keep things stable. - parentId = this.directoryRefSeed; - } - else - { - parentId = parentDirectoryRef.Id; - } - } - - Wix.ISchemaElement newDirectory = (Wix.ISchemaElement)directoryType.GetConstructor(new Type[] { }).Invoke(null); - subDir = new DirectoryAttributeAccessor(newDirectory); - - if (this.setUniqueIdentifiers) - { - subDir.Id = this.Core.GenerateIdentifier(DirectoryPrefix, parentId, firstSubDirName); - } - else - { - subDir.Id = String.Format(DirectoryIdFormat, parentId, firstSubDirName); - } - - subDir.Name = firstSubDirName; - - parentDir.AddChild(subDir.Element); - } - - if (segments.Length == 1) - { - return subDir.ElementAsParent; - } - else - { - Uri nextRelativeUri = new Uri(Uri.UnescapeDataString(relativeUri.ToString()).Substring(firstSubDirName.Length + 1), UriKind.Relative); - return this.GetSubDirElement(subDir.ElementAsParent, nextRelativeUri); - } - } - - private MSBuildProject GetMsbuildProject(string projectFile) - { - XmlDocument document = new XmlDocument(); - try - { - document.Load(projectFile); - } - catch (Exception e) - { - throw new WixException(HarvesterErrors.CannotLoadProject(projectFile, e.Message)); - } - - string version = null; - - if (this.UseToolsVersion) - { - foreach (XmlNode child in document.ChildNodes) - { - if (String.Equals(child.Name, "Project", StringComparison.Ordinal) && child.Attributes != null) - { - XmlNode toolsVersionAttribute = child.Attributes["ToolsVersion"]; - if (toolsVersionAttribute != null) - { - version = toolsVersionAttribute.Value; - this.Core.Messaging.Write(HarvesterVerboses.FoundToolsVersion(version)); - - break; - } - } - } - - switch (version) - { - case "4.0": - version = "4.0.0.0"; - break; - case "12.0": - version = "12.0.0.0"; - break; - case "14.0": - version = "14.0.0.0"; - break; - default: - if (String.IsNullOrEmpty(this.MsbuildBinPath)) - { - throw new WixException(HarvesterErrors.MsbuildBinPathRequired(version ?? "(none)")); - } - - version = null; - break; - } - } - - var project = this.ConstructMsbuild40Project(version); - return project; - } - - private Assembly ResolveFromMsbuildBinPath(object sender, ResolveEventArgs args) - { - var assemblyName = new AssemblyName(args.Name); - - var assemblyPath = Path.Combine(this.MsbuildBinPath, $"{assemblyName.Name}.dll"); - if (!File.Exists(assemblyPath)) - { - return null; - } - - return Assembly.LoadFrom(assemblyPath); - } - - private MSBuildProject ConstructMsbuild40Project(string loadVersion) - { - const string MSBuildEngineAssemblyName = "Microsoft.Build, Version={0}, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; - const string MSBuildFrameworkAssemblyName = "Microsoft.Build.Framework, Version={0}, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"; - Assembly msbuildAssembly; - Assembly msbuildFrameworkAssembly; - - if (loadVersion == null) - { - this.Core.Messaging.Write(HarvesterVerboses.LoadingProjectWithBinPath(this.MsbuildBinPath)); - AppDomain.CurrentDomain.AssemblyResolve += this.ResolveFromMsbuildBinPath; - - try - { - msbuildAssembly = Assembly.Load("Microsoft.Build"); - } - catch (Exception e) - { - throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message)); - } - - try - { - msbuildFrameworkAssembly = Assembly.Load("Microsoft.Build.Framework"); - } - catch (Exception e) - { - throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message)); - } - } - else - { - this.Core.Messaging.Write(HarvesterVerboses.LoadingProjectWithVersion(loadVersion)); - - try - { - msbuildAssembly = Assembly.Load(String.Format(MSBuildEngineAssemblyName, loadVersion)); - } - catch (Exception e) - { - throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message)); - } - - try - { - msbuildFrameworkAssembly = Assembly.Load(String.Format(MSBuildFrameworkAssemblyName, loadVersion)); - } - catch (Exception e) - { - throw new WixException(HarvesterErrors.CannotLoadMSBuildAssembly(e.Message)); - } - } - - Type projectType; - Type buildItemType; - - Type buildManagerType; - Type buildParametersType; - Type buildRequestDataFlagsType; - Type buildRequestDataType; - Type hostServicesType; - Type projectCollectionType; - Type projectInstanceType; - - Type writeHandlerType; - Type colorSetterType; - Type colorResetterType; - Type loggerVerbosityType; - Type consoleLoggerType; - Type iLoggerType; - - try - { - buildItemType = msbuildAssembly.GetType("Microsoft.Build.Execution.ProjectItemInstance", true); - projectType = msbuildAssembly.GetType("Microsoft.Build.Evaluation.Project", true); - - buildManagerType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildManager", true); - buildParametersType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildParameters", true); - buildRequestDataFlagsType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildRequestDataFlags", true); - buildRequestDataType = msbuildAssembly.GetType("Microsoft.Build.Execution.BuildRequestData", true); - hostServicesType = msbuildAssembly.GetType("Microsoft.Build.Execution.HostServices", true); - projectCollectionType = msbuildAssembly.GetType("Microsoft.Build.Evaluation.ProjectCollection", true); - projectInstanceType = msbuildAssembly.GetType("Microsoft.Build.Execution.ProjectInstance", true); - - writeHandlerType = msbuildAssembly.GetType("Microsoft.Build.Logging.WriteHandler", true); - colorSetterType = msbuildAssembly.GetType("Microsoft.Build.Logging.ColorSetter", true); - colorResetterType = msbuildAssembly.GetType("Microsoft.Build.Logging.ColorResetter", true); - loggerVerbosityType = msbuildFrameworkAssembly.GetType("Microsoft.Build.Framework.LoggerVerbosity", true); - consoleLoggerType = msbuildAssembly.GetType("Microsoft.Build.Logging.ConsoleLogger", true); - iLoggerType = msbuildFrameworkAssembly.GetType("Microsoft.Build.Framework.ILogger", true); - } - catch (TargetInvocationException tie) - { - throw new WixException(HarvesterErrors.CannotLoadMSBuildEngine(tie.InnerException.Message)); - } - catch (Exception e) - { - throw new WixException(HarvesterErrors.CannotLoadMSBuildEngine(e.Message)); - } - - MSBuild40Types types = new MSBuild40Types(); - types.buildManagerType = buildManagerType; - types.buildParametersType = buildParametersType; - types.buildRequestDataFlagsType = buildRequestDataFlagsType; - types.buildRequestDataType = buildRequestDataType; - types.hostServicesType = hostServicesType; - types.projectCollectionType = projectCollectionType; - types.projectInstanceType = projectInstanceType; - types.writeHandlerType = writeHandlerType; - types.colorSetterType = colorSetterType; - types.colorResetterType = colorResetterType; - types.loggerVerbosityType = loggerVerbosityType; - types.consoleLoggerType = consoleLoggerType; - types.iLoggerType = iLoggerType; - return new MSBuild40Project(null, projectType, buildItemType, loadVersion, types, this.Core, this.configuration, this.platform); - } - - private static bool AreTypesEquivalent(Type a, Type b) - { - return (a == b) || (a.IsAssignableFrom(b) && b.IsAssignableFrom(a)); - } - - private abstract class MSBuildProject - { - protected Type projectType; - protected Type buildItemType; - protected object project; - private string loadVersion; - - public MSBuildProject(object project, Type projectType, Type buildItemType, string loadVersion) - { - this.project = project; - this.projectType = projectType; - this.buildItemType = buildItemType; - this.loadVersion = loadVersion; - } - - public string LoadVersion - { - get { return this.loadVersion; } - } - - public abstract bool Build(string projectFileName, string[] targetNames, IDictionary targetOutputs); - - public abstract MSBuildProjectItemType GetBuildItem(object buildItem); - - public abstract IEnumerable GetEvaluatedItemsByName(string itemName); - - public abstract string GetEvaluatedProperty(string propertyName); - - public abstract void Load(string projectFileName); - } - - private abstract class MSBuildProjectItemType - { - public MSBuildProjectItemType(object buildItem) - { - this.buildItem = buildItem; - } - - public abstract override string ToString(); - - public abstract string GetMetadata(string name); - - protected object buildItem; - } - - - private struct MSBuild40Types - { - public Type buildManagerType; - public Type buildParametersType; - public Type buildRequestDataFlagsType; - public Type buildRequestDataType; - public Type hostServicesType; - public Type projectCollectionType; - public Type projectInstanceType; - public Type writeHandlerType; - public Type colorSetterType; - public Type colorResetterType; - public Type loggerVerbosityType; - public Type consoleLoggerType; - public Type iLoggerType; - } - - private class MSBuild40Project : MSBuildProject - { - private MSBuild40Types types; - private object projectCollection; - private object currentProjectInstance; - private object buildManager; - private object buildParameters; - private IHarvesterCore harvesterCore; - - public MSBuild40Project(object project, Type projectType, Type buildItemType, string loadVersion, MSBuild40Types types, IHarvesterCore harvesterCore, string configuration, string platform) - : base(project, projectType, buildItemType, loadVersion) - { - this.types = types; - this.harvesterCore = harvesterCore; - - this.buildParameters = this.types.buildParametersType.GetConstructor(new Type[] { }).Invoke(null); - - try - { - var loggers = this.CreateLoggers(); - - // this.buildParameters.Loggers = loggers; - this.types.buildParametersType.GetProperty("Loggers").SetValue(this.buildParameters, loggers, null); - } - catch (TargetInvocationException tie) - { - if (this.harvesterCore != null) - { - this.harvesterCore.Messaging.Write(HarvesterWarnings.NoLogger(tie.InnerException.Message)); - } - } - catch (Exception e) - { - if (this.harvesterCore != null) - { - this.harvesterCore.Messaging.Write(HarvesterWarnings.NoLogger(e.Message)); - } - } - - this.buildManager = this.types.buildManagerType.GetConstructor(new Type[] { }).Invoke(null); - - if (configuration != null || platform != null) - { - Dictionary globalVariables = new Dictionary(); - if (configuration != null) - { - globalVariables.Add("Configuration", configuration); - } - - if (platform != null) - { - globalVariables.Add("Platform", platform); - } - - this.projectCollection = this.types.projectCollectionType.GetConstructor(new Type[] { typeof(IDictionary) }).Invoke(new object[] { globalVariables }); - } - else - { - this.projectCollection = this.types.projectCollectionType.GetConstructor(new Type[] {}).Invoke(null); - } - } - - private object CreateLoggers() - { - var logger = new HarvestLogger(this.harvesterCore.Messaging); - var loggerVerbosity = Enum.Parse(this.types.loggerVerbosityType, "Minimal"); - var writeHandler = Delegate.CreateDelegate(this.types.writeHandlerType, logger, nameof(logger.LogMessage)); - var colorSetter = Delegate.CreateDelegate(this.types.colorSetterType, logger, nameof(logger.SetColor)); - var colorResetter = Delegate.CreateDelegate(this.types.colorResetterType, logger, nameof(logger.ResetColor)); - - var consoleLoggerCtor = this.types.consoleLoggerType.GetConstructor(new Type[] { - this.types.loggerVerbosityType, - this.types.writeHandlerType, - this.types.colorSetterType, - this.types.colorResetterType, - }); - var consoleLogger = consoleLoggerCtor.Invoke(new object[] { loggerVerbosity, writeHandler, colorSetter, colorResetter }); - - var loggers = Array.CreateInstance(this.types.iLoggerType, 1); - loggers.SetValue(consoleLogger, 0); - - return loggers; - } - - public override bool Build(string projectFileName, string[] targetNames, IDictionary targetOutputs) - { - try - { - // this.buildManager.BeginBuild(this.buildParameters); - this.types.buildManagerType.GetMethod("BeginBuild", new Type[] { this.types.buildParametersType }).Invoke(this.buildManager, new object[] { this.buildParameters }); - - // buildRequestData = new BuildRequestData(this.currentProjectInstance, targetNames, null, BuildRequestData.BuildRequestDataFlags.ReplaceExistingProjectInstance); - ConstructorInfo buildRequestDataCtor = this.types.buildRequestDataType.GetConstructor( - new Type[] - { - this.types.projectInstanceType, typeof(string[]), this.types.hostServicesType, this.types.buildRequestDataFlagsType - }); - object buildRequestDataFlags = this.types.buildRequestDataFlagsType.GetField("ReplaceExistingProjectInstance").GetRawConstantValue(); - object buildRequestData = buildRequestDataCtor.Invoke(new object[] { this.currentProjectInstance, targetNames, null, buildRequestDataFlags }); - - // BuildSubmission submission = this.buildManager.PendBuildRequest(buildRequestData); - object submission = this.types.buildManagerType.GetMethod("PendBuildRequest", new Type[] { this.types.buildRequestDataType }) - .Invoke(this.buildManager, new object[] { buildRequestData }); - - // BuildResult buildResult = submission.Execute(); - object buildResult = submission.GetType().GetMethod("Execute", new Type[] { }).Invoke(submission, null); - - // bool buildSucceeded = buildResult.OverallResult == BuildResult.Success; - object overallResult = buildResult.GetType().GetProperty("OverallResult").GetValue(buildResult, null); - bool buildSucceeded = String.Equals(overallResult.ToString(), "Success", StringComparison.Ordinal); - - // this.buildManager.EndBuild(); - this.types.buildManagerType.GetMethod("EndBuild", new Type[] { }).Invoke(this.buildManager, null); - - // fill in empty lists for each target so that heat will look at the item group later - foreach (string target in targetNames) - { - targetOutputs.Add(target, new List()); - } - - return buildSucceeded; - } - catch (TargetInvocationException tie) - { - throw new WixException(HarvesterErrors.CannotBuildProject(projectFileName, tie.InnerException.Message)); - } - catch (Exception e) - { - throw new WixException(HarvesterErrors.CannotBuildProject(projectFileName, e.Message)); - } - } - - public override MSBuildProjectItemType GetBuildItem(object buildItem) - { - return new MSBuild40ProjectItemType(buildItem); - } - - public override IEnumerable GetEvaluatedItemsByName(string itemName) - { - MethodInfo getEvaluatedItem = this.types.projectInstanceType.GetMethod("GetItems", new Type[] { typeof(string) }); - return (IEnumerable)getEvaluatedItem.Invoke(this.currentProjectInstance, new object[] { itemName }); - } - - public override string GetEvaluatedProperty(string propertyName) - { - MethodInfo getProperty = this.types.projectInstanceType.GetMethod("GetPropertyValue", new Type[] { typeof(string) }); - return (string)getProperty.Invoke(this.currentProjectInstance, new object[] { propertyName }); - } - - public override void Load(string projectFileName) - { - try - { - //this.project = this.projectCollection.LoadProject(projectFileName); - this.project = this.types.projectCollectionType.GetMethod("LoadProject", new Type[] { typeof(string) }).Invoke(this.projectCollection, new object[] { projectFileName }); - - // this.currentProjectInstance = this.project.CreateProjectInstance(); - MethodInfo createProjectInstanceMethod = this.projectType.GetMethod("CreateProjectInstance", new Type[] { }); - this.currentProjectInstance = createProjectInstanceMethod.Invoke(this.project, null); - } - catch (TargetInvocationException tie) - { - throw new WixException(HarvesterErrors.CannotLoadProject(projectFileName, tie.InnerException.Message)); - } - catch (Exception e) - { - throw new WixException(HarvesterErrors.CannotLoadProject(projectFileName, e.Message)); - } - } - } - - private class MSBuild40ProjectItemType : MSBuildProjectItemType - { - public MSBuild40ProjectItemType(object buildItem) - : base(buildItem) - { - } - - public override string ToString() - { - PropertyInfo includeProperty = this.buildItem.GetType().GetProperty("EvaluatedInclude"); - return (string)includeProperty.GetValue(this.buildItem, null); - } - - public override string GetMetadata(string name) - { - MethodInfo getMetadataMethod = this.buildItem.GetType().GetMethod("GetMetadataValue"); - if (null != getMetadataMethod) - { - return (string)getMetadataMethod.Invoke(this.buildItem, new object[] { name }); - } - return string.Empty; - } - } - - /// - /// Used internally in the VSProjectHarvester class to encapsulate - /// the settings for a particular MSBuild "project output group". - /// - private struct ProjectOutputGroup - { - public readonly string Name; - public readonly string BuildOutputGroup; - public readonly string FileSource; - - /// - /// Creates a new project output group. - /// - /// Friendly name used by heat. - /// MSBuild's name of the project output group. - /// VS directory token containing the files of the POG. - public ProjectOutputGroup(string name, string buildOutputGroup, string fileSource) - { - this.Name = name; - this.BuildOutputGroup = buildOutputGroup; - this.FileSource = fileSource; - } - } - - /// - /// Internal class for getting and setting common attrbiutes on - /// directory elements. - /// - internal class DirectoryAttributeAccessor - { - public Wix.ISchemaElement directoryElement; - - public DirectoryAttributeAccessor(Wix.ISchemaElement directoryElement) - { - this.directoryElement = directoryElement; - } - - /// - /// Gets the element as a ISchemaElement. - /// - public Wix.ISchemaElement Element - { - get { return this.directoryElement; } - } - - /// - /// Gets the element as a IParentElement. - /// - public Wix.IParentElement ElementAsParent - { - get { return (Wix.IParentElement)this.directoryElement; } - } - - /// - /// Gets or sets the Id attrbiute. - /// - public string Id - { - get - { - if (this.directoryElement is Wix.Directory wixDirectory) - { - return wixDirectory.Id; - } - else if (this.directoryElement is Wix.DirectoryRef wixDirectoryRef) - { - return wixDirectoryRef.Id; - } - else - { - throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Id")); - } - } - set - { - if (this.directoryElement is Wix.Directory wixDirectory) - { - wixDirectory.Id = value; - } - else if (this.directoryElement is Wix.DirectoryRef wixDirectoryRef) - { - wixDirectoryRef.Id = value; - } - else - { - throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Id")); - } - } - } - - /// - /// Gets or sets the Name attribute. - /// - public string Name - { - get - { - if (this.directoryElement is Wix.Directory wixDirectory) - { - return wixDirectory.Name; - } - else - { - throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Name")); - } - } - set - { - if (this.directoryElement is Wix.Directory wixDirectory) - { - wixDirectory.Name = value; - } - else - { - throw new WixException(HarvesterErrors.DirectoryAttributeAccessorBadType("Name")); - } - } - } - } - - internal class HarvestLogger - { - public HarvestLogger(IMessaging messaging) - { - this.Color = ConsoleColor.Black; - this.Messaging = messaging; - } - - private ConsoleColor Color { get; set; } - private IMessaging Messaging { get; } - - public void LogMessage(string message) - { - if (this.Color == ConsoleColor.Red) - { - this.Messaging.Write(HarvesterErrors.BuildErrorDuringHarvesting(message)); - } - } - - public void SetColor(ConsoleColor color) - { - this.Color = color; - } - - public void ResetColor() - { - this.Color = ConsoleColor.Black; - } - } - } -} diff --git a/src/wix/heat/app.config b/src/wix/heat/app.config deleted file mode 100644 index 65d3d6c3..00000000 --- a/src/wix/heat/app.config +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/wix/heat/heat.csproj b/src/wix/heat/heat.csproj deleted file mode 100644 index 88fd2eb0..00000000 --- a/src/wix/heat/heat.csproj +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - netcoreapp3.1;net472 - Exe - Harvester - WiX Harvester - embedded - true - - win-x86;win-x64 - app.config - heat.exe.manifest - LatestMajor - - - - - - - - - True - True - WixHarvesterStrings.resx - - - - - - ResXFileCodeGenerator - WixHarvesterStrings.Designer.cs - - - - - - - - - - - - - - diff --git a/src/wix/heat/heat.exe.manifest b/src/wix/heat/heat.exe.manifest deleted file mode 100644 index b4adfbb7..00000000 --- a/src/wix/heat/heat.exe.manifest +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - WiX Toolset Harvester - - - - - - - - - - true - - - diff --git a/src/wix/heat/heat.net461.v3.ncrunchproject b/src/wix/heat/heat.net461.v3.ncrunchproject deleted file mode 100644 index cf22dfa9..00000000 --- a/src/wix/heat/heat.net461.v3.ncrunchproject +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/wix/heat/heat.netcoreapp2.1.v3.ncrunchproject b/src/wix/heat/heat.netcoreapp2.1.v3.ncrunchproject deleted file mode 100644 index cf22dfa9..00000000 --- a/src/wix/heat/heat.netcoreapp2.1.v3.ncrunchproject +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/wix/publish_t.proj b/src/wix/publish_t.proj index 55b5216c..160cba83 100644 --- a/src/wix/publish_t.proj +++ b/src/wix/publish_t.proj @@ -3,15 +3,12 @@ - - - diff --git a/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj b/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj index 4ae0f4a8..fe8a78e9 100644 --- a/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj +++ b/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj @@ -32,7 +32,5 @@ - - diff --git a/src/wix/test/WixToolsetTest.Heat/HeatRunner.cs b/src/wix/test/WixToolsetTest.Heat/HeatRunner.cs deleted file mode 100644 index 287698a9..00000000 --- a/src/wix/test/WixToolsetTest.Heat/HeatRunner.cs +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolsetTest.Harvesters -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - using WixToolset.Core; - using WixToolset.Core.Burn; - using WixToolset.Core.TestPackage; - using WixToolset.Data; - using WixToolset.Extensibility.Data; - using WixToolset.Extensibility.Services; - using WixToolset.Harvesters; - - /// - /// Utility class to emulate heat.exe. - /// - public static class HeatRunner - { - /// - /// Emulates calling heat.exe. - /// - /// - /// - /// - /// - public static int Execute(string[] args, out List messages, bool warningsAsErrors = true) - { - var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider(); - var task = Execute(args, serviceProvider, out messages, warningsAsErrors: warningsAsErrors); - return task.Result; - } - - /// - /// Emulates calling wix.exe with standard backends. - /// This overload always treats warnings as errors. - /// - /// - /// - public static WixRunnerResult Execute(params string[] args) - { - return Execute(true, args); - } - - /// - /// Emulates calling wix.exe with standard backends. - /// - /// - /// - /// - public static WixRunnerResult Execute(bool warningsAsErrors, params string[] args) - { - var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider(); - var exitCode = Execute(args, serviceProvider, out var messages, warningsAsErrors: warningsAsErrors); - return new WixRunnerResult { ExitCode = exitCode.Result, Messages = messages.ToArray() }; - } - - /// - /// Emulates calling wix.exe with standard backends. - /// - /// - /// - /// - /// - /// - public static Task Execute(string[] args, IWixToolsetCoreServiceProvider coreProvider, out List messages, bool warningsAsErrors = true) - { - coreProvider.AddBundleBackend(); - - var listener = new TestMessageListener(); - - messages = listener.Messages; - - var messaging = coreProvider.GetService(); - messaging.SetListener(listener); - - if (warningsAsErrors) - { - messaging.WarningsAsError = true; - } - - var arguments = coreProvider.GetService(); - arguments.Populate(args); - - var commandLine = HeatCommandLineFactory.CreateCommandLine(coreProvider); - var command = commandLine.ParseStandardCommandLine(arguments); - return command?.ExecuteAsync(CancellationToken.None) ?? Task.FromResult(1); - } - } -} diff --git a/src/wix/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj b/src/wix/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj deleted file mode 100644 index 1ba62393..00000000 --- a/src/wix/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - netcoreapp3.1 - false - false - - - - - - - - - - - - - - - - - diff --git a/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs b/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs index f9a13312..40ebad5b 100644 --- a/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs +++ b/src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs @@ -11,6 +11,9 @@ namespace WixToolsetTest.Sdk public class MsbuildFixture { + public static readonly string WixMsbuildPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildFixture).Assembly.CodeBase).AbsolutePath), "..", "..", "..", "publish", "WixToolset.Sdk"); + public static readonly string WixPropsPath = Path.Combine(WixMsbuildPath, "build", "WixToolset.Sdk.props"); + [Theory] [InlineData(BuildSystem.DotNetCoreSdk)] [InlineData(BuildSystem.MSBuild)] @@ -26,7 +29,10 @@ namespace WixToolsetTest.Sdk var binFolder = Path.Combine(baseFolder, @"bin\"); var projectPath = Path.Combine(baseFolder, "SimpleBundle.wixproj"); - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { "-p:SignOutput=true" }); + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath), + "-p:SignOutput=true", + }); result.AssertSuccess(); var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); @@ -66,7 +72,10 @@ namespace WixToolsetTest.Sdk var binFolder = Path.Combine(baseFolder, @"bin\"); var projectPath = Path.Combine(baseFolder, "UncompressedBundle.wixproj"); - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { "-p:SignOutput=true" }); + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath), + "-p:SignOutput=true" + }); result.AssertSuccess(); var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); @@ -106,7 +115,9 @@ namespace WixToolsetTest.Sdk var binFolder = Path.Combine(baseFolder, @"bin\"); var projectPath = Path.Combine(baseFolder, "SimpleMergeModule.wixproj"); - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath); + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath) + }); result.AssertSuccess(); var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); @@ -142,7 +153,10 @@ namespace WixToolsetTest.Sdk var binFolder = Path.Combine(baseFolder, @"bin\"); var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj"); - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { "-p:SignOutput=true" }); + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath), + "-p:SignOutput=true" + }); result.AssertSuccess(); var platformSwitches = result.Output.Where(line => line.Contains("-platform x86")); @@ -208,7 +222,9 @@ namespace WixToolsetTest.Sdk var binFolder = Path.Combine(baseFolder, @"bin\"); var projectPath = Path.Combine(baseFolder, "MergeMsiPackage.wixproj"); - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath); + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath) + }); result.AssertSuccess(); var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); @@ -270,6 +286,7 @@ namespace WixToolsetTest.Sdk var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath), wixpdbType == null ? String.Empty : $"-p:WixPdbType={wixpdbType}", "-p:SuppressValidation=true" }); @@ -300,6 +317,7 @@ namespace WixToolsetTest.Sdk var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath), $"-p:Platform=x64", }); result.AssertSuccess(); @@ -337,6 +355,7 @@ namespace WixToolsetTest.Sdk var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath), MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "SuppressIces", "ICE12"), }, suppressValidation: false); result.AssertSuccess(); @@ -360,6 +379,7 @@ namespace WixToolsetTest.Sdk var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath), MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "SuppressSpecificWarnings", "1118;1102"), }); result.AssertSuccess(); @@ -389,6 +409,7 @@ namespace WixToolsetTest.Sdk var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath), "-p:OutputType=IntermediatePostLink", }, outOfProc: outOfProc); result.AssertSuccess(); @@ -418,7 +439,9 @@ namespace WixToolsetTest.Sdk var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj"); // Build - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, verbosityLevel: "diag"); + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath) + }, verbosityLevel: "diag"); result.AssertSuccess(); var buildOutput = String.Join("\r\n", result.Output); @@ -432,6 +455,7 @@ namespace WixToolsetTest.Sdk // Clean result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath), "-t:Clean", }, verbosityLevel: "diag"); result.AssertSuccess(); @@ -477,7 +501,7 @@ namespace WixToolsetTest.Sdk var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { - MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixToolDir", Path.Combine(MsbuildUtilities.WixMsbuildPath, "broken", "net461")), + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixToolDir", Path.Combine(MsbuildFixture.WixMsbuildPath, "broken", "net461")), }, outOfProc: true); Assert.Equal(1, result.ExitCode); diff --git a/src/wix/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs b/src/wix/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs deleted file mode 100644 index f1fa2453..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs +++ /dev/null @@ -1,375 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolsetTest.Sdk -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using WixBuildTools.TestSupport; - using WixToolset.Core.TestPackage; - using WixToolset.Data; - using WixToolset.Data.Symbols; - using Xunit; - - public class MsbuildHeatFixture - { - [Theory] - [InlineData(BuildSystem.DotNetCoreSdk)] - [InlineData(BuildSystem.MSBuild)] - [InlineData(BuildSystem.MSBuild64)] - public void CanBuildHeatFilePackage(BuildSystem buildSystem) - { - var sourceFolder = TestData.Get(@"TestData\HeatFilePackage"); - - using (var fs = new TestDataFolderFileSystem()) - { - fs.Initialize(sourceFolder); - var baseFolder = fs.BaseFolder; - var binFolder = Path.Combine(baseFolder, @"bin\"); - var intermediateFolder = Path.Combine(baseFolder, @"obj\"); - var projectPath = Path.Combine(baseFolder, "HeatFilePackage.wixproj"); - - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath); - result.AssertSuccess(); - - var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true); - Assert.Single(heatCommandLines); - - var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); - WixAssert.StringCollectionEmpty(warnings); - - var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs"); - Assert.True(File.Exists(generatedFilePath)); - - var generatedContents = File.ReadAllText(generatedFilePath); - var testXml = generatedContents.GetTestXml(); - WixAssert.StringEqual(@"" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "", testXml); - - var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatFilePackage.wixpdb"); - Assert.True(File.Exists(pdbPath)); - - var intermediate = Intermediate.Load(pdbPath); - var section = intermediate.Sections.Single(); - - var fileSymbol = section.Symbols.OfType().Single(); - WixAssert.StringEqual(@"SourceDir\HeatFilePackage.wixproj", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath()?.Path); - } - } - - [Theory] - [InlineData(BuildSystem.DotNetCoreSdk)] - [InlineData(BuildSystem.MSBuild)] - [InlineData(BuildSystem.MSBuild64)] - public void CanBuildHeatFileWithMultipleFilesPackage(BuildSystem buildSystem) - { - var sourceFolder = TestData.Get(@"TestData\HeatFileMultipleFilesSameFileName"); - - using (var fs = new TestDataFolderFileSystem()) - { - fs.Initialize(sourceFolder); - var baseFolder = fs.BaseFolder; - var binFolder = Path.Combine(baseFolder, @"bin\"); - var intermediateFolder = Path.Combine(baseFolder, @"obj\"); - var projectPath = Path.Combine(baseFolder, "HeatFileMultipleFilesSameFileName.wixproj"); - - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath); - result.AssertSuccess(); - - var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true); - Assert.Equal(2, heatCommandLines.Count()); - - var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); - WixAssert.StringCollectionEmpty(warnings); - - var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs"); - Assert.True(File.Exists(generatedFilePath)); - - var generatedContents = File.ReadAllText(generatedFilePath); - var testXml = generatedContents.GetTestXml(); - WixAssert.StringEqual("" + - "" + - "" + - "" + - @"" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "", testXml); - - generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs"); - Assert.True(File.Exists(generatedFilePath)); - - generatedContents = File.ReadAllText(generatedFilePath); - testXml = generatedContents.GetTestXml(); - WixAssert.StringEqual("" + - "" + - "" + - "" + - @"" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "", testXml); - - var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatFileMultipleFilesSameFileName.wixpdb"); - Assert.True(File.Exists(pdbPath)); - - var intermediate = Intermediate.Load(pdbPath); - var section = intermediate.Sections.Single(); - - var fileSymbols = section.Symbols.OfType().ToArray(); - WixAssert.StringEqual(@"SourceDir\MyProgram.txt", fileSymbols[0][FileSymbolFields.Source].PreviousValue.AsPath()?.Path); - WixAssert.StringEqual(@"SourceDir\MyProgram.json", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath()?.Path); - } - } - - [Theory] - [InlineData(BuildSystem.DotNetCoreSdk, true)] - [InlineData(BuildSystem.DotNetCoreSdk, false)] - [InlineData(BuildSystem.MSBuild, true)] - [InlineData(BuildSystem.MSBuild, false)] - [InlineData(BuildSystem.MSBuild64, true)] - [InlineData(BuildSystem.MSBuild64, false)] - public void CanBuildHeatProjectPreSdkStyle(BuildSystem buildSystem, bool useToolsVersion) - { - var sourceFolder = TestData.Get(@"TestData\HeatProject"); - - using (var fs = new TestDataFolderFileSystem()) - { - fs.Initialize(sourceFolder); - var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectPreSdkStyle"); - var binFolder = Path.Combine(baseFolder, @"bin\"); - var intermediateFolder = Path.Combine(baseFolder, @"obj\"); - var projectPath = Path.Combine(baseFolder, "HeatProjectPreSdkStyle.wixproj"); - - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] - { - useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty, - }); - result.AssertSuccess(); - - var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true); - var heatCommandLine = Assert.Single(heatCommandLines); - - if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk) - { - Assert.Contains("-usetoolsversion", heatCommandLine); - } - else - { - Assert.DoesNotContain("-usetoolsversion", heatCommandLine); - } - - var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); - WixAssert.StringCollectionEmpty(warnings); - - var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_ToolsVersion4Cs.wxs"); - Assert.True(File.Exists(generatedFilePath)); - - var generatedContents = File.ReadAllText(generatedFilePath); - var testXml = generatedContents.GetTestXml(); - WixAssert.StringEqual(@"" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "", testXml); - - var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatProjectPreSdkStyle.wixpdb"); - Assert.True(File.Exists(pdbPath)); - - var intermediate = Intermediate.Load(pdbPath); - var section = intermediate.Sections.Single(); - - var fileSymbol = section.Symbols.OfType().Single(); - WixAssert.StringEqual(Path.Combine(fs.BaseFolder, "ToolsVersion4Cs", "bin", "Release\\\\ToolsVersion4Cs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path); - } - } - - [Theory] - [InlineData(BuildSystem.DotNetCoreSdk, true)] - [InlineData(BuildSystem.DotNetCoreSdk, false)] - [InlineData(BuildSystem.MSBuild, true)] - [InlineData(BuildSystem.MSBuild, false)] - [InlineData(BuildSystem.MSBuild64, true)] - [InlineData(BuildSystem.MSBuild64, false)] - public void CanBuildHeatProjectSdkStyle(BuildSystem buildSystem, bool useToolsVersion) - { - var sourceFolder = TestData.Get(@"TestData\HeatProject"); - - using (var fs = new TestDataFolderFileSystem()) - { - fs.Initialize(sourceFolder); - var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectSdkStyle"); - var binFolder = Path.Combine(baseFolder, @"bin\"); - var intermediateFolder = Path.Combine(baseFolder, @"obj\"); - var projectPath = Path.Combine(baseFolder, "HeatProjectSdkStyle.wixproj"); - var referencedProjectPath = Path.Combine(fs.BaseFolder, "SdkStyleCs", "SdkStyleCs.csproj"); - - var result = MsbuildUtilities.BuildProject(buildSystem, referencedProjectPath, new[] - { - "-t:restore", - }); - result.AssertSuccess(); - - result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] - { - useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty, - }); - result.AssertSuccess(); - - var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true); - var heatCommandLine = Assert.Single(heatCommandLines); - - if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk) - { - Assert.Contains("-usetoolsversion", heatCommandLine); - } - else - { - Assert.DoesNotContain("-usetoolsversion", heatCommandLine); - } - - var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); - WixAssert.StringCollectionEmpty(warnings); - - var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_SdkStyleCs.wxs"); - Assert.True(File.Exists(generatedFilePath)); - - var generatedContents = File.ReadAllText(generatedFilePath); - var testXml = generatedContents.GetTestXml(); - WixAssert.StringEqual(@"" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "", testXml); - - var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatProjectSdkStyle.wixpdb"); - Assert.True(File.Exists(pdbPath)); - - var intermediate = Intermediate.Load(pdbPath); - var section = intermediate.Sections.Single(); - - var fileSymbol = section.Symbols.OfType().Single(); - WixAssert.StringEqual(Path.Combine(fs.BaseFolder, "SdkStyleCs", "bin", "Release", "netstandard2.0\\\\SdkStyleCs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path); - } - } - } -} diff --git a/src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs b/src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs deleted file mode 100644 index 028ea0cf..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright(c) .NET Foundation and contributors.All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace WixToolsetTest.Sdk -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using WixBuildTools.TestSupport; - - public enum BuildSystem - { - DotNetCoreSdk, - MSBuild, - MSBuild64, - } - - public static class MsbuildUtilities - { - public static readonly string WixMsbuildPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildUtilities).Assembly.CodeBase).AbsolutePath), "..", "..", "..", "publish", "WixToolset.Sdk"); - public static readonly string WixPropsPath = Path.Combine(WixMsbuildPath, "build", "WixToolset.Sdk.props"); - - public static MsbuildRunnerResult BuildProject(BuildSystem buildSystem, string projectPath, string[] arguments = null, string configuration = "Release", bool? outOfProc = null, string verbosityLevel = "normal", bool suppressValidation = true) - { - var allArgs = new List - { - $"-verbosity:{verbosityLevel}", - $"-p:Configuration={configuration}", - $"-p:SuppressValidation={suppressValidation}", - GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildUtilities.WixPropsPath), - // Node reuse means that child msbuild processes can stay around after the build completes. - // Under that scenario, the root msbuild does not reliably close its streams which causes us to hang. - "-nr:false", - $"-bl:{Path.ChangeExtension(projectPath, ".binlog")}" - }; - - if (outOfProc.HasValue) - { - allArgs.Add($"-p:RunWixToolsOutOfProc={outOfProc.Value}"); - } - - if (arguments != null) - { - allArgs.AddRange(arguments); - } - - switch (buildSystem) - { - case BuildSystem.DotNetCoreSdk: - { - allArgs.Add(projectPath); - var result = DotnetRunner.Execute("msbuild", allArgs.ToArray()); - return new MsbuildRunnerResult - { - ExitCode = result.ExitCode, - Output = result.StandardOutput, - }; - } - case BuildSystem.MSBuild: - case BuildSystem.MSBuild64: - { - return MsbuildRunner.Execute(projectPath, allArgs.ToArray(), buildSystem == BuildSystem.MSBuild64); - } - default: - { - throw new NotImplementedException(); - } - } - } - - public static string GetQuotedPropertySwitch(BuildSystem buildSystem, string propertyName, string valueToQuote) - { - switch (buildSystem) - { - case BuildSystem.DotNetCoreSdk: - { - return $"-p:{propertyName}=\\\"{valueToQuote}\\\""; - } - case BuildSystem.MSBuild: - case BuildSystem.MSBuild64: - { - return $"-p:{propertyName}=\"{valueToQuote}\""; - } - default: - { - throw new NotImplementedException(); - } - } - } - - public static IEnumerable GetToolCommandLines(MsbuildRunnerResult result, string toolName, string operation, BuildSystem buildSystem, bool? outOfProc = null) - { - var expectedOutOfProc = buildSystem == BuildSystem.DotNetCoreSdk || outOfProc.HasValue && outOfProc.Value; - var expectedToolExe = !expectedOutOfProc ? $"({toolName}.exe)" : - buildSystem == BuildSystem.DotNetCoreSdk ? $"{toolName}.dll\"" : $"{toolName}.exe"; - var expectedToolCommand = $"{expectedToolExe} {operation}"; - return result.Output.Where(line => line.Contains(expectedToolCommand)); - } - } -} diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj deleted file mode 100644 index 7d751319..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj +++ /dev/null @@ -1,58 +0,0 @@ - - - - - Debug - x86 - - - - 7fb77005-c6e0-454f-8c2d-0a4a79c918ba - - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - Debug - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - Debug - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - - - - - - - - - - - - true - - - - - TxtProductComponents - INSTALLFOLDER - true - - - JsonProductComponents - INSTALLFOLDER - true - - - - - \ No newline at end of file diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json deleted file mode 100644 index 5f282702..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt deleted file mode 100644 index 5f282702..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs deleted file mode 100644 index 5abcee9f..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj deleted file mode 100644 index 3988acaf..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj +++ /dev/null @@ -1,53 +0,0 @@ - - - - - Debug - x86 - - - - 7fb77005-c6e0-454f-8c2d-0a4a79c918ba - - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - Debug - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - Debug - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - - - - - - - - - - - - true - - - - - ProductComponents - INSTALLFOLDER - true - - - - - \ No newline at end of file diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs deleted file mode 100644 index f5fa8cf6..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj deleted file mode 100644 index c569e8ac..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - Debug - x86 - - - - BB919765-DD69-41E7-91C5-415A69BE923E - - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - Debug - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - Debug - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - - - - - - - - - - - - true - true - - - - - - - - \ No newline at end of file diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs deleted file mode 100644 index 6c12861b..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj deleted file mode 100644 index 907f0bb0..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - Debug - x86 - - - - CE998A54-9BEC-4268-BFA2-8E3DAE5831C8 - - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - Debug - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - Debug - - - $(Platform) - bin\$(Platform)\$(Configuration)\ - - - - - - - - - - - - true - true - - - - - - - - \ No newline at end of file diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs deleted file mode 100644 index d30218f3..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs deleted file mode 100644 index 2b2c5be2..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - -namespace SdkStyleCs -{ - public class SdkStyleCs - { - } -} diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj deleted file mode 100644 index 755976bc..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - netstandard2.0 - - diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs deleted file mode 100644 index c29a2303..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,11 +0,0 @@ -// 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. - -using System; -using System.Reflection; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("ToolsVersion4Cs")] -[assembly: AssemblyDescription("ToolsVersion4Cs")] -[assembly: AssemblyProduct("WiX Toolset")] -[assembly: AssemblyCompany("WiX Toolset Team")] -[assembly: AssemblyCopyright("Copyright (c) .NET Foundation and contributors. All rights reserved.")] diff --git a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj b/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj deleted file mode 100644 index e5723ea2..00000000 --- a/src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - {8B19578A-816A-48A1-A6C4-58067334EB79} - ToolsVersion4Cs - Library - ToolsVersion4Cs - v4.7.2 - - - true - false - $(DefineConstants);DEBUG;TRACE - bin\Debug\ - - - true - true - $(DefineConstants);TRACE - bin\Release\ - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/wix/wix.cmd b/src/wix/wix.cmd index 281f7f68..17c1ab6f 100644 --- a/src/wix/wix.cmd +++ b/src/wix/wix.cmd @@ -30,22 +30,18 @@ dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core -l "trx;LogFile dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core.Burn -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Core.Burn.trx" || exit /b dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core.Native -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Core.Native.trx" || exit /b dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.CoreIntegration -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.CoreIntegration.trx" || exit /b -dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Heat -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Heat.trx" || exit /b :: Publish msbuild publish_t.proj -p:Configuration=%_C% -nologo -warnaserror -bl:%_L%\wix_publish.binlog || exit /b robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x86\buildtasks %_P%\WixToolset.Sdk\tools\net472\x86 %_RCO% /XF Microsoft.Build.*.dll -robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x86\heat %_P%\WixToolset.Sdk\tools\net472\x86 %_RCO% robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x86\wix %_P%\WixToolset.Sdk\tools\net472\x86 %_RCO% robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x64\buildtasks %_P%\WixToolset.Sdk\tools\net472\x64 %_RCO% /XF Microsoft.Build.*.dll -robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x64\heat %_P%\WixToolset.Sdk\tools\net472\x64 %_RCO% robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x64\wix %_P%\WixToolset.Sdk\tools\net472\x64 %_RCO% robocopy %_P_OBJ%\WixToolset.Sdk\separate\netcoreapp3.1\buildtasks %_P%\WixToolset.Sdk\tools\netcoreapp3.1 %_RCO% /XF Microsoft.Build.*.dll -robocopy %_P_OBJ%\WixToolset.Sdk\separate\netcoreapp3.1\heat %_P%\WixToolset.Sdk\tools\netcoreapp3.1 %_RCO% robocopy %_P_OBJ%\WixToolset.Sdk\separate\netcoreapp3.1\wix %_P%\WixToolset.Sdk\tools\netcoreapp3.1 %_RCO% msbuild -t:Publish -p:Configuration=%_C% -nologo -warnaserror WixToolset.Sdk\WixToolset.Sdk.csproj -bl:%_L%\wix_sdk_publish.binlog || exit /b @@ -59,7 +55,7 @@ dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.BuildTasks -l "trx;L dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Sdk -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Sdk.trx" || exit /b :: Pack -msbuild pack_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\wix_pack.binlog || exit /b +msbuild pack_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\wix_pack.binlog || exit /b @popd @endlocal diff --git a/src/wix/wix.sln b/src/wix/wix.sln index 81faf8be..13ca8785 100644 --- a/src/wix/wix.sln +++ b/src/wix/wix.sln @@ -34,8 +34,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixnative", "wixnative\wixn EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.Native", "WixToolset.Core.Native\WixToolset.Core.Native.csproj", "{81533C6A-E145-4EB5-9658-3ACA8A2A6323}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "heat", "heat\heat.csproj", "{E08BCE70-7D77-4B70-83F1-F08A7B58FC16}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wix", "wix\wix.csproj", "{C933FB6B-074C-4ED2-B961-7639A7877B3A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.BuildTasks", "WixToolset.BuildTasks\WixToolset.BuildTasks.csproj", "{D04EE8DF-85E5-42E5-B7B4-D064818F32C5}" @@ -44,8 +42,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Sdk", "WixToolse EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Sdk", "test\WixToolsetTest.Sdk\WixToolsetTest.Sdk.csproj", "{C44BB95F-5020-4876-933C-B73A24C488FD}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Heat", "test\WixToolsetTest.Heat\WixToolsetTest.Heat.csproj", "{9D788104-2636-4E4C-891C-08FF05FEC31E}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Core.Native", "test\WixToolsetTest.Core.Native\WixToolsetTest.Core.Native.csproj", "{93645356-5D5F-45DE-AC7F-252D35E1ACE5}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BuildTasks", "test\WixToolsetTest.BuildTasks\WixToolsetTest.BuildTasks.csproj", "{A05698E0-30D9-4B36-8F3B-585A99D67118}" @@ -306,22 +302,6 @@ Global {81533C6A-E145-4EB5-9658-3ACA8A2A6323}.Release|x64.Build.0 = Release|Any CPU {81533C6A-E145-4EB5-9658-3ACA8A2A6323}.Release|x86.ActiveCfg = Release|Any CPU {81533C6A-E145-4EB5-9658-3ACA8A2A6323}.Release|x86.Build.0 = Release|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|ARM64.Build.0 = Debug|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|x64.ActiveCfg = Debug|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|x64.Build.0 = Debug|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|x86.ActiveCfg = Debug|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|x86.Build.0 = Debug|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|Any CPU.Build.0 = Release|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|ARM64.ActiveCfg = Release|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|ARM64.Build.0 = Release|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|x64.ActiveCfg = Release|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|x64.Build.0 = Release|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|x86.ActiveCfg = Release|Any CPU - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|x86.Build.0 = Release|Any CPU {C933FB6B-074C-4ED2-B961-7639A7877B3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C933FB6B-074C-4ED2-B961-7639A7877B3A}.Debug|Any CPU.Build.0 = Debug|Any CPU {C933FB6B-074C-4ED2-B961-7639A7877B3A}.Debug|ARM64.ActiveCfg = Debug|Any CPU @@ -386,22 +366,6 @@ Global {C44BB95F-5020-4876-933C-B73A24C488FD}.Release|x64.Build.0 = Release|Any CPU {C44BB95F-5020-4876-933C-B73A24C488FD}.Release|x86.ActiveCfg = Release|Any CPU {C44BB95F-5020-4876-933C-B73A24C488FD}.Release|x86.Build.0 = Release|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|ARM64.Build.0 = Debug|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|x64.ActiveCfg = Debug|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|x64.Build.0 = Debug|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|x86.ActiveCfg = Debug|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|x86.Build.0 = Debug|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|Any CPU.Build.0 = Release|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|ARM64.ActiveCfg = Release|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|ARM64.Build.0 = Release|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|x64.ActiveCfg = Release|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|x64.Build.0 = Release|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|x86.ActiveCfg = Release|Any CPU - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|x86.Build.0 = Release|Any CPU {93645356-5D5F-45DE-AC7F-252D35E1ACE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {93645356-5D5F-45DE-AC7F-252D35E1ACE5}.Debug|Any CPU.Build.0 = Debug|Any CPU {93645356-5D5F-45DE-AC7F-252D35E1ACE5}.Debug|ARM64.ActiveCfg = Debug|Any CPU @@ -478,7 +442,6 @@ Global {DF63F589-028E-45A1-A212-948FACF1FDCD} = {1284331E-BC6C-426D-AAAF-140C0174F875} {23FC60D7-B101-42F8-9786-DB7A9CD964A2} = {1284331E-BC6C-426D-AAAF-140C0174F875} {C44BB95F-5020-4876-933C-B73A24C488FD} = {1284331E-BC6C-426D-AAAF-140C0174F875} - {9D788104-2636-4E4C-891C-08FF05FEC31E} = {1284331E-BC6C-426D-AAAF-140C0174F875} {93645356-5D5F-45DE-AC7F-252D35E1ACE5} = {1284331E-BC6C-426D-AAAF-140C0174F875} {A05698E0-30D9-4B36-8F3B-585A99D67118} = {1284331E-BC6C-426D-AAAF-140C0174F875} {392817AE-4493-4BED-A7FD-2399379E1B1C} = {1284331E-BC6C-426D-AAAF-140C0174F875} -- cgit v1.2.3-55-g6feb